Fragment : void android.view.View.unFocus(android.view.View) on a null object reference

Since the crash is coming from internal library of android and the most suspected code is below, this crash is coming in Oreo devices only  ChatAlertDialogFragment chatAlertDialogFragment = ChatAlertDialogFragment.getInstance(bundle); chatAlertDialogFragment.show(getFragmentManager(), ChatAlertDialogFragment.class.getSimpleName());   NOTE: When we replace simple fragment manager with the support fragment manger then it works fine.  This is the exception log  07-18 14:59:45.103 E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.aspiringminds.amcat.debug, PID: 13679     java.lang.NullPointerException: Attempt to invoke virtual method 'void android.view.View.unFocus(android.view.View)' on a null object reference         at android.view.ViewGroup.removeViewInternal(ViewGroup.java:5207)         at android.view.ViewGroup.removeViewAt(ViewGroup.java:5170)         at android.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1561)         at android.app.FragmentManagerImpl.moveToState(FragmentManager.java:1611)         at android.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2204)         at android.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2148)         at android.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2049)         at android.app.FragmentManagerImpl$1.run(FragmentManager.java:718)         at android.os.Handler.handleCallback(Handler.java:789)         at android.os.Handler.dispatchMessage(Handler.java:98)         at android.os.Looper.loop(Looper.java:164)         at android.app.ActivityThread.main(ActivityThread.java:6541)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:240)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:767)   ChatAlertDialogFragment class code  public class ChatAlertDialogFragment extends DialogFragment {   public static ChatAlertDialogFragment getInstance(Bundle bundle) {     ChatAlertDialogFragment chatAlertDialogFragment = new ChatAlertDialogFragment();     chatAlertDialogFragment.setCancelable(false);     chatAlertDialogFragment.setArguments(bundle);     return chatAlertDialogFragment;   }    @Override   public Dialog onCreateDialog(Bundle savedInstanceState) {     super.setStyle(android.R.style.Theme_Holo_Light_Dialog_MinWidth, android.R.style.Theme_Holo_Light_Dialog_MinWidth);     Dialog dialog = super.onCreateDialog(savedInstanceState);     dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);     dialog.setCanceledOnTouchOutside(false);     dialog.setCancelable(false);     return dialog;   } }


How do I fix broken .exe file association in Windows Vista?

Somehow the file association for all .exe files has been deleted on my windows vista machine. For some reason the only thing I can open is Firefox. I think it was the result of a virus. So I have tried a couple registry edit fixes but none have worked. Has anyone run into this?


How to include custom command options in a bash script with $1 and $2?

I have a script myscript.sh  #!/bin/sh  echo $1 $2   which is used something like ...  ./myscript.sh foo bar   which gives me an output of ...  foo bar     but how can i make this script include custom command options? for example ...  ./myscript.sh -a foo and corespond to $1   and  ./myscript.sh -b bar and corespond to $2


assigning multiple meshes the same material

Is there a way to select multiple objects and assign a material to all of them at once. Any attempt I have made only applies it to the last object selected.


Setting a greyscale (or monochrome) color scheme

I would like to see everything on my computer screen in grayscale (like say the kindle screen). How do I do this?


How does gravity affect light although it's massless?

I'm doing a school project and my question is, how does gravity affect light  although it's massless?


i'm building some program. apache guacamole (VNC tool) makes log in console. (it can be tweak for make log in file, but i won't) so, my program reads log in console and determine which user(id) accessed(connected) or leave(disconnected).  but it gives me "java lang nullpointer exception at line 19". so here is my code.  import java.util.*; import java.lang.*; import java.io.*;  class id {     public static void main (String[] args) throws java.lang.Exception     {     String connect    = "connect";     String disconnect = "disconnect";     String id;     int strindex, endindex; //mark start, end index      while(true){          String phrase = System.console().readLine();         if(phrase.equals(""))             continue;          if(phrase.contains(disconnect)){             if( (strindex=phrase.indexOf("- User ")) > -1 )             strindex = strindex + 8;                 endindex = phrase.indexOf('"', strindex);         id = phrase.substring(strindex, endindex);          System.out.println(id);         System.out.println("disco\n");         //dockerfile_logout+pause;         }//islogout          else if(phrase.contains(connect)){             if( (strindex=phrase.indexOf("- User ")) > -1 )             strindex = strindex + 8;                 endindex = phrase.indexOf('"', strindex);         id = phrase.substring(strindex, endindex);          System.out.println(id);         System.out.println("connected\n");         //dockerfile_login+start!        }//islogin      }//while }   }


12.04 LTS - 14.04 LTS File Manager: No sidebar tree or menu bar

After upgrading from Desktop 12.04 LTS to Desktop 14.04 LTS. The File Manager seems to be severely degraded. The sidebar no longer allows a tree-structured view of directories. The menu bar is very limited with no File, Edit, View, etc. There does not seem to be any alternate means of doing what these things did in 12.04. Any insights appreciated. -chaz


In Red Mars, why did Frank want to kill John?

I know he was jealous about Maya, but the book implied some political reason that wasn't ever explained, to my recollection.


I want that admins can update rights for users, because admins can also add more rights I need to  get the row from a $_GET and put it in the query;          if(isset($_GET['flip'], $_GET['userid'],$_GET['newval'])) {             switch($_GET['newval']) {                case 1:                     $upd = $db->prepare("                         UPDATE premissions                         SET ? = '1'                         WHERE userId = ?                     ");                     break;                case 0:                default:                      $upd = $db->prepare("                         UPDATE premissions                         SET ? = '0'                         WHERE userId = ?                     ");                     break;                                    }               $upd->execute(array($_GET['flip'], $_GET['userid']));         }   But now I get this error message:     Fatal error: Uncaught exception 'PDOException' with message   'SQLSTATE[42000]: Syntax error or access violation: 1064 You have an   error in your SQL syntax; check the manual that corresponds to your   MySQL server version for the right syntax to use near '? = '1' WHERE   userId = ?' at line 2'   I understand that something is wrong with the syntax but I don`t know how to fix it.


CSS: How to display text in the middle of container?

its posibily to set text in the middle of container regardless of its size ?  HTML:  ..     This text is short length, it is shown in the middle              Lorem ipsum dolor sit amet       and when the text length is long, I want everything to be displayed in the middle
     Lorem ipsum dolor sit amet, ipsum loroes eheu
   CSS:  .text {     position:absolute;     left:25px;     top:13px;     width:120px;     font-size:11px;     color:#fff; } ._text {     position:absolute;     left:25px;     top:7px;     width:120px;     font-size:11px;     color:#fff; } .container {     position:relative;     background:#010101;     width:150px;     height:40px; }


Why does Picard order 'Tea. Earl Grey. Hot.'?

The Enterprise-D's computer shows us on multiple occasions that it can deal with natural language input.  One notable example of extended conversation is in TNG '11001010':  PICARD: Computer, explain Red Alert. COMPUTER: Initiated as a programmed response. The magnetic field containing the antimatter had weakened. There was no fail-safe available. PICARD: Why wasn't I notified? COMPUTER: Unknown. PICARD: Present condition? COMPUTER: The magnetic field is now restored. Containment is restored. Propulsion is at maximum efficiency.  This continues for a while, so I shan't bore you with the details. The Computer can even deal with Lwaxana Troi's talking to it as if it were a person:  LWAXANA: Hello, computer? Is Commander Riker still on the Bridge? COMPUTER: Negative. Riker is currently in holodeck three. LWAXANA: Holodeck? Where is that? COMPUTER: Follow the comm. panel lights. They will lead you there.  (TNG 'Manhunt') So, if the computer can deal with natural language requests, why does Picard order 'Tea. Earl Grey. Hot.' rather than something more like 'Replicate a cup of hot Earl Grey tea?'


How to reopen a question by a third party

Today I have stumbled across a question that was closed . When reading this question , I thought it was valid, and I even might have an answer for it . So I went and read  and  along with some other related questions here on meta . The issue is that because :  I do NOT have 3000 points to vote for opening,  The said question is not my own ,  The person who closed it did not leave a comment, It seems that I have no option to reopen it and answer.   What one should do in that case ? Flag it for moderator ?  I would think this is not the appropriate action here . Contact the closer personally  ? - Same as Above (and also , how ?) Leaving a simple comment ? By reading the above mentioned questions - leaving a simple comment will do nothing by itself to reopen or to catch attention (unless someone else stumbles upon it ..) So what are my options for action ?? (the question is  for reference)


How would gravity change on a planet rotating around itself very fast?

Let's take a planet identical to Earth, but with rotation speed multiplied by ten thousand. What would happen with the gravity if it was spinning madly around itself? Would the centrifugal force make objects seem lighter than on normal Earth? Would the people on that planet be able to jump higher?


How do I make an object face the mouse position, but only on one plane?

I want a game object to turn and look towards where the mouse was clicked (in world space).  It works well when considering all 3 dimensions, but I really only care for the plane formed by the x and z axis, not the y.  I've tried to fix this by setting the y of the directionTarget to the y of the object's position, but that gives weird results.  My code looks like this:  Quaternion rotationTarget;     float rotationLerpProgress;     float rotationLerpDuration = 1f;      // Use this for initialization     void Start ()     {      }      // Update is called once per frame     void Update ()     {             if (Input.GetMouseButtonDown (0)) {                     var ray = Camera.main.ScreenPointToRay (Input.mousePosition);                     RaycastHit rayHit;                      if (Physics.Raycast (ray, out rayHit)) {                             var rayHitPoint = rayHit.point;                              var rotationDirection = transform.position - rayHitPoint;                                                            rotationDirection.Normalize ();                             //rotationDirection.y = transform.position.y;                             rotationTarget = Quaternion.LookRotation (rotationDirection);                             rotationLerpProgress = Time.deltaTime;                     }                     //targetPosition = Camera.main.ScreenToWorldPoint (Input.mousePosition);                                     }              if (rotationTarget != transform.rotation) {                      transform.rotation = Quaternion.Lerp (transform.rotation, rotationTarget, rotationLerpProgress / rotationLerpDuration);                     rotationLerpProgress += Time.deltaTime;                       if (rotationLerpProgress >= rotationLerpDuration) {                              transform.rotation = rotationTarget;                     }              }      }   I must be missing something. How do I do this right?


How to fill in optional function arguments automatically with corresponding dictionary values?

Let's say I have a function in Python:  def foo(x,a=".",b=2):     ...   and I have a dictionary:  param_dict = {'a':'!', 'b':5}   How would I be able to communicate the values in param_dict to foo, matching the corresponding dictionary key to the argument name, and do so in an automatic way?  (i.e., not manually writing out foo(x,a=param_dict['a'],b=param_dict['b']))  Also would like it so that if the corresponding key isn't found in param_dict, the default value of the argument is kept.


This is Roger Penrose' book The Road to Reality's title   Currently my document begins like this,      \documentclass{report}     \usepackage{bm}     \usepackage{xcolor}     \usepackage{varwidth}     \usepackage{array}     \usepackage{geometry}     \usepackage[pdftex,bookmarks=true]{hyperref}     \usepackage{pdfpages}     \usepackage{amsmath}     \usepackage{amssymb}     \usepackage{graphicx}     \usepackage{amsthm}     \usepackage{tikz-cd}     \usetikzlibrary{cd}     \usepackage{tikz}     \usepackage{appendix}     \usepackage{eso-pic}     \usetikzlibrary{positioning}     \usepackage[explicit]{titlesec}     \RequirePackage{fix-cm}      \definecolor{bluegreen}{rgb}{-.2,.4,0.6}      \newcommand\semihuge{\@setfontsize\semihuge{18.72}{20.38}}      \titleformat{\chapter}[display]         {\normalfont\huge}         {\hspace*{-60pt}\thechapter.~#1}         {-10pt}         {\hspace*{-110pt}\rule{\dimexpr\textwidth+20pt\relax}{0pt}}     \titleformat{name=\chapter,numberless}[display]%conents         {\normalfont\bfseries\huge}         {\hspace*{175pt}#1}         {-12pt}         {\hspace*{-110pt}\rule{\dimexpr\textwidth+30pt\relax}{0pt}}         \titlespacing*{\chapter}{0pt}{0pt}{30pt}       \geometry{     top=20mm,     total={145mm,230mm}     }     \hypersetup{         colorlinks=true,         linkcolor=bluegreen,         filecolor=magenta,         urlcolor=cyan,         pdftitle={Sharelatex Example},         bookmarks=true,     }     \tikzset{>=stealth}      \newcommand\BackgroundPic{         \put(0,0){             \parbox[b][\paperheight]{\paperwidth}{%                 \vfill                 \centering                 \includegraphics[width=\paperwidth,height=\paperheight]{BackGroundPDF.pdf}                 \vfill             }}}         \begin{document}      \begin{titlepage}     \end{titlepage}     \pagenumbering{roman}      \title{\Huge\textsc{The Road to Reality}}     {}     \date{}      \maketitle     \newpage       \tableofcontents     \newpage      \clearpage     \pagenumbering{arabic} \end{document}


How to perform do-release-upgrade from 15.04 to 16.04 or later verions?

I have vivid 15.04. I tries the comments how to update and upgrade from the EOL versions such as vivid. I still get 404 error for repositories. I deactivatd PPAs , still the same problem. I get "fail to update repository information check your internet"?


Until next week vs Until the next week - using the definite article?

I am struggling with understanding the difference in meaning when the definite article is used with certain time expressions:     He is coming back to London, but not until next year.       He didn't win the competition until the next year.   When should the definite article be used? I remember it could to do with denoting the period itself, as in "He has done it in the last year" (past 365 days) and "He did it last year" (2018). Or is it something else? What if I include the definite article in the first sentence or omit it the second?  This question specifically concerns using "until" with those words.


In the arrangement shown in the figure, the ends P and Q of an inextensible string move downwards with uniform speed $u$, pulleys A and B are fixed. With what speed does the mass M move upwards?    My attempt: I resolved the component of $u$ along the $y-$axis. That is $u\cos\theta+u\cos\theta=2u\cos\theta$. But the answer is $\frac{u}{\cos\theta}$.  My questions  why can’t I simply resolve vector into components and solve ? I’m unable to determine my mistake. What am I missing here?


What is the difference between sanity and smoke testing?

When there is a new build we perform smoke testing,in few projects they call it as sanity testing. Can someone please elaborate on the difference between the both?


How to remove CentOS boot option in BIOS

I installed CentOS before and already change to Windows 10 now. But the boot option for the CentOS still in BIOS even after I formatted the hard disk.     Any fix?


Let $x$ be a real number. If $|x|< \varepsilon$ for any $\varepsilon>0$, then $x=0$. That was a lemma in my lecture today. My Dr. proceeded as follows:  Suppose that $x≠0$ Choose $\varepsilon =|x|/2>0$ We have $|x|<|x|/2$  (according to our assumption) Which is a contradiction Thus $x=0$  But I have a little question here:  If I took $\varepsilon=1>0$  I have $|x|<1$  Then $-1<x<1$  Thus we can't assure the value $x=0$, it has more values, since $x$ is a real number in the interval $]-1,1[$ Is my Dr.'s solution accurate or am I missing something?


Copying shapefile then making feature layer using ArcPy gives ERROR 000732?

The only thing I need is an exact copy of an existing shapefile in the same directory with a different name.  I have tried:   arcpy.CopyFeatures_management (ORLinks, MyLinks) #ORLinks: old links, MyLinks: new links   but for some reason, I cant make it a feature layer using:  arcpy.MakeFeatureLayer_management(MyLinks, 'MyLinks')   Error Encountered:  Error: Failed to execute. Parameters are not valid. ERROR 000732: Input Features: Dataset  M:\RAIL\Rail2.0.shp does not exist or is not supported Failed to execute (MakeFeatureLayer).


Searching a library for something, failing to find it, the later discovering it was there

If an effect would have you search your library for a specific card, say 's forestcycle has you search for a forest, and you can't find it in your library, but it turns out later that there was a forest in your library that you just did not look hard enough, how do you resolve this issue?


Finding the elements in the group of units of the ring of integers modulo n that are their own inverse.

Let $n > 1$ be any positive integer and consider $(\mathbb{Z}/n)^\times$. We want to find all elements $x \in (\mathbb{Z}/n)^\times$ such that $x \equiv x^{-1} \mod n$.  After testing a few different $n$, I am certain that the only elements will be $1$ and $n - 1$. This is certainly true when $n$ is prime. Showing it when $n$ is composite is more difficult:  Assume that $x \equiv x^{-1} \mod n$. Then $x^2 \equiv 1 \mod n$ and so $x^2 - 1 \equiv 0 \mod n$, which implies that $(x - 1)(x + 1) \equiv 0 \mod n$. Now if $n$ is prime, we could just conclude that $n | (x - 1)$ or $n | (x + 1)$. But I am unsure what to do in the case that $n$ is composite.


Let $\gamma:[0,1] \to \mathbb R^n$ be a smooth closed curve, such that $\gamma(0)=\gamma(1), \gamma'(0)=\gamma'(1), |\gamma'(a)|=1$ and let $B_r=\{x| \exists t, |\gamma(t)-x|<r\}$. How can i show that the volume of $B_r$ is equal to $br^{(n-1)}$ for $r <\varepsilon$ for some $\varepsilon>0$. And how can I find $b$? It is intuitively obvious. But how can one prove it? I have no idea.


I am trying to access an Ubuntu server using SSH. I haven't changed my username and password. I have been accessing it using SSH for a while now. When I write a command like: ssh administrator@1.1.1.1 and insert a password, I get the error:Permission denied. Can anybody please help?  Thanks.


I tutored an American exchange student in Finland last year and occasionally he, on Facebook, would say something like "word thank you" or simply "word" and he said it means "okay". I was curious and tried to do a bit of research but didn't really find anything. Is this kind of use for the word "word" in any way common? Where does it come from?


how does a car move? and how do the brakes affect its velocity?

im doing a project that requires me to understand how cars move. from what I understand , its the friction that is creates in the tires that enables the tire to rotate, which then push the car forward. the velocity of the car also depends how much torque is generated by the axle that is connected to the wheel. what I don't understand is what do the brakes(drum or disk) do to the wheel that allow it to decrease its velocity. I know that when the brake pedal is pressed , it created friction within the tire to slow it down, but there is cases were the car still moves despite that the tires stop rotating. for sake of simplicity, im ignoring heat generated by the friction between the brake pads and wheel drum/disk, also neglecting air resistance.  at t=0, car is inputted with a certain v velocity. what I have to do is find the distance and time traveled, but I would also like to graph the rate at which the car deaccelerates depending on what type of brake it is used.  is there any good sources I can use to find to help me solve this? or could anyone describe what's going on in detail? ill clarify more if this doesn't make sense.  EDIT: the websites provided by the comments only focus on the first part of my question(which was very helpful thank you), but the second part still is not answered. the problem I have is understanding what does the brake due to wheel that allow it to deaccelerate(the whole car). since the torque created by the friction between the wheel and the surface is what causes it to move, do the brakes decrease the amount of friction created by the wheel and surface?


Doom-style 8 directions sprite math HELP C++

I'm trying to get Doom-style 8 direction sprite rotation that changes its sprite depending on the camera and the forward vector of the entity just like this video here: .  I've searched around the internet for a solution and I have found some people that have been having the same issue but no one that really got it working like it should. I managed to figure out how to get the entity to change it's sprite depending on the camera view angle but I can't figure out how to account for the entity's own forward vector. I would assume you'll use the CrossProduct but I'm not sure...  Here is my code:  // Get the angles angles = entity->parms.axis.ToAngles();  // Compute the forward and normalize forward = angles.ToForward();  // Compute the direction and normalize direction = rg.renderView.origin - entity->parms.origin; direction.Normalize();  odVec3 point = forward.Cross(direction); (NOT USED)  // Compute the yaw angle yaw = RAD2DEG(odMath::ATan(direction.y, direction.x)); yaw = odMath::AngleNormalize360(yaw);           if (yaw >= 22.5f && yaw < 67.5f)             entity->parms.skin = R_FindSkin("skins/sdk/rotation/angle_1");         else if (yaw >= 67.5f && yaw < 112.5f)             entity->parms.skin = R_FindSkin("skins/sdk/rotation/angle_2");         else if (yaw >= 112.5f && yaw < 157.5f)             entity->parms.skin = R_FindSkin("skins/sdk/rotation/angle_3");         else if (yaw >= 157.0f && yaw < 202.5f)             entity->parms.skin = R_FindSkin("skins/sdk/rotation/angle_4");         else if (yaw >= 202.5f && yaw < 247.5f)             entity->parms.skin = R_FindSkin("skins/sdk/rotation/angle_5");         else if (yaw >= 247.5f && yaw < 292.5f)             entity->parms.skin = R_FindSkin("skins/sdk/rotation/angle_6");         else if (yaw >= 292.5f && yaw < 337.5f)             entity->parms.skin = R_FindSkin("skins/sdk/rotation/angle_7");         else             entity->parms.skin = R_FindSkin("skins/sdk/rotation/angle_0");


Can't launch jd-gui on ubuntu 14.04 64 bits

I downloaded jd-gui from  i.e. jd-gui-0.3.5.linux.i686.tar.gz  Extracted it.   Now if I try to launch the jd-gui from double clicking on the icon, nothing happens, but using console I get following error:  ~/Downloads/jd-gui-0.3.5.linux.i686$ ./jd-gui  ./jd-gui: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory   Can anybody help?


Should bash shells be replaced with the new patched version?

This question has generated a lot of downvoting on three SE sites so let me try to explain where it comes from.  The magnitude of the bash "shellshock" problem may turn out to be larger than anything since Y2K.  Having been part of a complete replacement of a large data center for Y2K, I'm alarmed at the panic that's been generated over shellshock (appropo name, btw). I'm concerned that rushing in quick fixes without extensive planning and testing is going to create far greater problems than the one we think we are facing.  For Y2K, we learned that the date code fixes were the easy part.  The massively more complex, error-prone, and unscheduled downtime-producing part was discovering and fixing/mitigating the failures in other software caused by the fixes. Some of these weren't discovered until the new systems had been in production for months. Despite a herculean effort, a few even resulted in organizational policy changes because they were too disruptive to fix.  I am not suggesting that security-patching is unadvisable.  However, in this case only, I have noticed a suspicious series of events culminating in not just another run-of-the-mill vulnerability, but one demanding massive updating of systems affecting virtually every person using a computer on the planet.  The vulnerability is real. But is the need for instant action?  It is this combination of factors that gives me pause...  A fact...      A timeline...         Ramifications...   The Bash shellshock "vulnerability" has been a "feature" of Bash for 22 years. You'd think in all that time, in all those high-security environments that run Unix or Linux, someone would have worried about misuse. Now, every installation of Bash in the world is about to be replaced. Though Bash is open-source, few people actually take the time to study the code of such large and complex programs. Bash is written in C, which supports embedded assembly-language code. Code that even fewer programmers have the skills to read. Bash is written in C, which easily supports treating any block of binary, such as something labeled as data or a small image, as code. Thus, a skilled programmer could hide "backdoor" code in plain sight, and it probably wouldn't be discovered unless it caused an error of some kind.   The claim...  ""  The question...  Should bash shells be replaced with these new patched versions?  RESOURCES          Update 2017-09-28  After 3 years, someone actually found a sliver of usefulness in this and upvoted the question?  Well then, let me a mea culpa...  The above's focus on the circumstances surrounding Shellshock's announcement were a knee-jerk reaction on my part. A reaction I regret. While factual, the "conspiratorial" tone produced a backlash that obscured anything of value. I leave it intact only so that the many good comments make sense.  Enough new versions of most of the software involved have been released and well vetted by now that Shellshock may only still be of some concern to those running low-powered systems that must use older software. My alarm at the time was over the dangers of blindly removing 22 year old functionality from those systems with no analysis of the impact. Apparently, it turns out that the functionality was rarely, if ever, used.


why do i get two heads with this code? how can i get rid of that one at the end?  \documentclass[a4paper,10pt]{article} \usepackage[latin1]{inputenc} \usepackage{tikz}  \begin{document} \begin{tikzpicture}   [     important line/.style={thick,shorten <=4pt,->}   ]     \draw[important line] (8.5,1.5) coordinate (A)  edge node[above,sloped] {\tiny text}  (7,2.7)         coordinate (B) node[] {};  \end{tikzpicture} \end{document}


What happens if I use a 1A power supply in a router that requires 1.2A?

I have this d-link router, it's original power supply was 5V and 1.2A, but I found a 5V 1A supply.  It is working, but does it represent a risk to use it? What could happen?


Can I use a fixed IV with AES-GCM if I only encrypt unique plaintext values?

My use case guarantees that all plaintext values are unique. In this case, is it safe to use a fixed IV with AES-GCM to carry our encryption/decryption?


I was fooling around with a , which looks like a really nice and easy to use device. For some reason I couldn't get mine to output sound on its speaker outputs, so I decided it is faulty. But it did output fine on its line out output, so I attached some headphones and had fun with it. While it worked (the line out, I never managed to get speaker out to work) I was powering it with 4.5V - 5V from my PSU. I tried powering it with 3.3V (more like ~3.22) from the same PCU and it didn't work. I thought it is OK, since 3.3V is stated as its minimum operating voltage and my PSU outputs a bit less, so whatever. But then I tried powering it with a coin cell, which I first measured to about 3.25V, it blinked once and never ever came back to life. Now it won't work no matter how I power it. It still draws its typical ~30ma from the PSU, but doesn't play any sounds anymore. Honestly, I don't really care about the device (it seemed like it was faulty anyway), but it made me ask myself, whether undervoltage can actually be dangerous for a circuit and potentially kill it. It could be just a coincidence, but I'd rather know whether or not undervoltage can be potentially dangerous, so I don't brick something I actually care about in the future.


Setup wizard on samsung phone: run or make it run

How can i make a samsung phone, go through setup wizard again so the end user may personalize the phone?  I tried the factory reset but it wipes all data and applications installed, my interest is to keep applications and only wipe existing user data.  Is there any way to run it through ADB?... (this way i can only turn the phone off and let the end user handle the rest)


is shared storage safe in Postgres if all servers are read-only?

Description of shared storage in Postgres:   Related question:   Both of these make it clear that it's not safe to have one write instance and many readers.  What about if all instances are read-only?


I recently asked a question which I still haven't gotten the answer to, yet some people decided to downvote my question. I agree that downvoting is useful for discerning which solution is the right one, but why do people downvote questions?   I am a beginner iOS developer, so maybe a lot of the questions I ask are not useful for intermediate or advanced developers, but I am using this site just like anyone else: to learn. It saddens me that there are some people out there who choose to use their privilege of downvoting so that my question is shown fewer to the users on this site. If the question is not useful to you advanced developers, it is useful to someone, especially to the person asking the question.   So to those who downvote questions, why do you do it?


I have something like this:

   this is the html. Inside of the container, I add other div elements using jQuery.  $(document).ready(function () {     $.get("/Ask", {}, function (response, status) {         $.each(response.cars, function (index, val) {             $("#container").append("
" + val.carName + "
" + val.date + "
");         });     });      $("div").click(function (e) {         e.stopPropagation();         alert($(this).attr("id"));     }); });   On click, I want to retrieve the id from my inner divs (they are 1, 2, 3) but whenever I click on any of the divs added using jQuery, it shows container or nothing at all. How can I get the id from the recently added divs? Tried even with:  $(".q").click(function(){     alert($(this).attr("id")); });


What are benefits/importance for protected question?

I want to know what the benefits/advantages are of protecting a question? Because only preventing to answer by <10 reputation seems not so effective/efficient (as 10 reputation can easily be achieved for user with 1 rep. ex: if only 5 suggested edits approved!)  So, there should be suitable advantages and importance for protected questions. Maybe future request to update or apply new effective similar to protection so that standard and canonical questions (essential part of information/knowledge based Questions) can be secured!


Prove that the closed unit ball of $L^2[a,b]$ is closed in $L^1[a,b]$.  My friends and I have literally been pouring over this problem for days now without success.  We've been using Hölder's inequality, and especially its special case the Cauchy-Schwarz Inequality.  We've also been using Minkowski's (the triangle) Inequality, and also the inequality:  $||f||_{p_1}\leq(b-a)^{\frac{p_2-p_1}{p_1p_2}}\;||f||_{p_2}$ for $1\leq p_1\leq p_2\leq\infty$  The other inequalities being:  $||fg||_1\leq||f||_p\cdot ||f||_q$ for $\frac{1}{p}+\frac{1}{q}=1$ and if $p=1$ then $q=\infty$ (Hölder's)  $||f+g||_p\leq ||f||_p+||g||_p$ (Triangle)  $||fg||_1\leq ||f||_2\cdot ||g||_2$ (Cauchy-Schwarz)  I'll just say that we've been a lot of places with these inequalities, but nowhere we want to go. We defined $A$ to be the closed unit ball in $L^2[a,b]$:  $$A:=\{\;f\in L^2[a,b] : ||f||_2\leq 1\}.$$  And now we want to consider functions in $L^1[a,b]$ (and thus with the $L^1$ metric), and prove that if every open ball around a function contains a point from $A$, then that function is actually in $A$.  Can anyone help us with this?  Thanks.


If $\{x,\{x,y\}\} = \{z, \{z,t\}\}$, then must it be $x = z$ and $y = t$?   Can you explain, or can you give hint?


Just wanted to ask: Is there some reason to name a function as variable in JavaScript?  (I mean using Dep two times. Just was crawling in Vue.js and found this)  var Dep = function Dep () {     this.id = uid++;     this.subs = [];   };


C# Regex Phone Number Check Accepts Only xxx-xxx-xxxx

I have the following phone numbers and I need a regex that validate only numbers with format xxx-xxx-xxxx 281-388-0388   OK 281 388 0388   NO OK (281)-388-0388 NO OK (281)-388-0388 NO OK  I have this regex \(?\d{3}\)?-? *\d{3}-? *-?\d{4} but all the above four number will be valid.


Show that of x is in the closure of a set, then there exists a sequence that converges to x

Given a metric space $X$ and $E \subseteq X$. How can I show that $x \in \overline{E}$ if and only if there exists a sequence $x_n \in E$ such that $\lim_{n\to\infty} x_n=x$.


how to install software onto ubuntu on hp pavillion

i have just installed Ubuntu, how do I install software from usb onto hp pavillion laptop, running Ubuntu?  thanks  ron devere


Why is a[j] equal to j[a] for every array a and integer j?

I am reading through the section about pointers and arrays from "The c++ programming language", and I came across something that stumps me.     For every built-in array a and integer j within the range of a, we   have:      a[j] == *(&a[0]+j) == *(a+j) == *(j+a) == j[a]   I understand why *(&a[0]+j) means the same as a[j], because &a[0] points to the first element of a and then it's incremented by j.  I also get that *(a+j) and *(j+a) are equal to a[j], a gets implicitly converted from an array to a pointer to the first element of a, and then incremented by j and dereferenced.  But why is a[j] == j[a]?  What am I missing?


Speed of different em radiation in a medium

Does all frequency of light travel with the same speed in a particular material like glass?  Since by cauchy's relation refractive index change with wavelength which implies the speed also changes.  But as derived from maxwells equation, the speed of light should only depent on medium through which it travel and not on its frequency or wavelength. V=1/sqrt(epsilon*mu)  Does different colours have different speed in a particular medium?


Depriving your application to run multiple times

I created an application in java and I want it to run only once. If the application is already running, a messagebox should popup telling the user that the application is already running.  Any idea?


Meta Description has HTML entities, will Google show the real character or the entity code in SERP?

Will Google's SERP show the ampersand (&) or the ampersand HTML entity &amp; in its snippet? Here is my description meta tag:  <meta content="Questions &amp; Answers" name="description"/>


For positive, decreasing $a_n$, must $a_n=O(1/n)$ for the series $\sum_{n=1}^{\infty} a_n$ to converge?

If $a_n$ is a sequence of decreasing positive numbers, must $a_n=O(1/n)$ for the series $\sum_{n=1}^{\infty} a_n$  to converge? I think it's true but a proof eludes me. My ideas so far: Suppose it's not true, then for all $C>0$ and for all $N \in \mathbb{N}$ there exists $n \geq N$ such that $a_n>C/N$. Take $C=1$. Let $n_k$ be a sequence such that $a_{n_k}>1/n_k$.  If the $n_k$ are close together then the series clearly won't converge (since $\sum_{n=1}^{\infty} 1/n$ diverges) If the $n_k$ are all say a constant $M$ apart, so $n_k=Mk$, then the series will diverge since $\sum_{n=1}^{\infty} 1/a_n \geq \sum_{k=1}^{\infty} M \cdot(1/Mk)=\infty$ If the $n_k$ are rapidly getting further and further apart then $$\sum_{n=1}^{n_k} =\sum_{n=1}^{n_1} a_n + \sum_{n=n_1}^{n_2} a_n +...+\sum_{n=n_{k-1}}^{n_k} a_n \geq \frac{n_1}{n_1}+\frac{n_2-n_1}{n_2}+....+\frac{n_k-n_{k-1}}{n_k} \approx k. $$  So these three cases lead me to believe it is true but I don't know how to prove it. Any help would be appreciated. It seems like there should be a simple proof of this.


How do I prevent someone spamming a Linux public folder?

I recently created a Public folder for my user on samba. I have it set up so that anyone can access it on my network(it's just me and a couple other computers). How do I prevent the other computers from dumping huge amounts of data into that folder, and thus exceeding the amount of space the drive holds. e.g. Someone dumps 200GB of garbled text onto a 50GB drive. I guess what I am asking is "how to limit a folders capacity?".


Let $p$ be a prime number. Prove that the polynomial $P(x) = x^{p−1} + 2x^{p−2} + 3x^{p−3} +···+ (p − 1)x + p$ is irreducible in $\mathbb Z[x].$ The Eisenstein-Schönemann theorem cannot be used to conclude anything at this stage. Is there some other method to prove this? This was a question that required only elementary mathematics i.e. fields etc. are not required.


I was reading a book on group theory and there was problem in the book that states:      Prove that the dihedral groups $D_n$ are all Lagrangian for $n\geq3$.   Apologies the previous hint was not for this question.  If anyone could answer this question is would be hugely appreciated.


What is the difference between these three ways to clear a Textbox?

I am bit confused between the below three ways to clear the contents of a textbox. I am working with WPF and found All are working, but I am unable to find the difference.  Can someone please explain to me about it with some examples?   txtUserName.Clear(); txtUserName.Text = string.Empty; txtUserName.Text = "";


I have a memory usage problem with my Checkpoint Firewall (it's a physical firewall).  On my monitoring software OPManager I can see that 94% of my memory is used.  In SSH, when i enter this command : TOP.  I can see this :  Mem:   4138776k total,  3879220k used,   259556k free,   348976k buffers Swap:  9992388k total,        0k used,  9992388k free,  2777396k cached   So my monitoring is true, but when I sort the processes by memory I don't see which processes are using so much memory.  You can see the top screenshot here:    I do not understand how my firewall uses memory. Can anybody help me?


Evaluate $\sum\limits_{n=1}^{\infty} \frac{1}{2^n}\tan\frac{x}{2^n}$.   My attempt:   Let $S$ = $\sum\limits_{n=1}^{\infty} \frac{1}{2^n}$ $tan{\frac{x}{2^n}}$  $\int S dx$ = $\sum\limits_{n=1}^{\infty}$ $\int \frac{1}{2^n}$ $tan{\frac{x}{2^n}} dx$  = $\sum\limits_{n=1}^{\infty}$ $\ln \sec {\frac{x}{2^n}}$  = $\ln(\prod_{n=1}^{\infty}\sec {\frac{x}{2^n}})$  not sure how to proceed with this,   Due to the limitations of my school syllabus, I would greatly appreciate a solution involving complex numbers.  Thanks


Borg Nanoprobes and shapeshifters/changelings

This question is mainly about if there was any canon occasion when the Borg tried to infect a founder/shapeshifter with nanoprobes and if there was, what was the result. If it did not occur, I'm also curious about educated guesses on if it is possible for the borg to assimilate a shapeshifter, or the entire Great Link. I know borg nanoprobes are mostly capable of assimilating humanoids but not exclusively. Also nanoprobes work on a cellular/subcellular level, so they might effect Changelings too.


Query plan (JSON format) in pgAdmin not showing completely

I would like to use the tool . For it I need to paste the execution plan in json format. If I try to get the execution plan in pgAdmin with this query:   EXPLAIN (ANALYZE, COSTS, VERBOSE, BUFFERS, FORMAT JSON) SELECT DISTINCT key FROM test.table   I don't get the whole json:  query plan    Can I get the whole json? Could I export it from the SQL editor?


Does there exist a $1$-form $\alpha$ with $d\alpha = \omega$?

Let $\omega := dx \wedge dy$ denote the standard area form on $\mathbb{R}^2$. As the question title suggests, does there exist a $1$-form $\alpha$ with $d\alpha = \omega$?


Why does $\frac{p+2q}{p+q}$ approximate $\sqrt 2$?

I recently found out that starting with $\frac{1}{1}$ and letting $p$ be the numerator and $q$ the denominator, then you can generate a sequence that approximates $\sqrt 2$ using:  $$\frac{p+2q}{p+q}$$  The first few terms of the sequence are:  $\frac{1}{1}$, $\frac{3}{2}$, $\frac{7}{5}$, $\frac{17}{12}$, $\frac{41}{29}$, $\frac{99}{70}$, $...$  But why is this case?


What's the difference between 'allow' and 'allow for'?

To be precise, I know that allow means to permit, and allow for is more like to make something possible, to enable, to make a provision for, but I'm still in doubt when I have to decide whether to use the preposition for or not.  For example, in the sentence taken from Google Dictionary entry used to explain usage of allow:     They agreed to a ceasefire to allow talks with the government.   I'm not sure what I would use in this example — maybe even allow for.


Why is pseudorapidity defined as $-\log \tan \theta/2$

Why the log? Is it there to make the growth of the function slower?  As this is a common experimental observable, it doesn't seem reasonable to take the range from $[0,\infty)$ to $(-\infty,\infty)$ (For a particle emitted along the beam axis after collision $\theta = 0$ wouldn't be better to have a number that says how close it is to zero rather than one that says how large a number it is. I hope that makes the question clear.)


"Wizards have banks?" "Just the one. Gringotts. Run by goblins." Harry dropped the bit of sausage he was holding. "Goblins?" "Yeah -- so yeh'd be mad ter try an' rob it, I'll tell yeh that. Never mess with goblins, Harry. Gringotts is the safest place in the world fer anything yeh want ter keep safe -- 'cept maybe Hogwarts. As a matter o' fact, I gotta visit Gringotts anyway. Fer Dumbledore. Hogwarts business." Hagrid drew himself up proudly. "He usually gets me ter do important stuff fer him. Fetchin' you gettin' things from Gringotts -- knows he can trust me, see. "Got everythin'? Come on, then." Harry Potter and the Philosopher's Stone Pg 48 (emphasis mine)  And then...  “I need to break into a Gringotts vault.” Harry had not meant to say it so badly... “Harry—” said Hermione, but she was cut off by Griphook. “Break into a Gringotts vault?” repeated the goblin, wincing a little as he shifted his position upon the bed. “It is impossible.” “No, it isn’t,” Ron contradicted him. “It’s been done.” “Yeah,” said Harry. “The same day I first met you, Griphook. My birthday, seven years ago.” Harry Potter and the Deathly Hallows Pg 410 (emphasis mine)  And then......  “Never mind that stuff ... Is it true? Did you break into Gringotts? Did you escape on a dragon? It’s everywhere, everyone’s talking about it, Terry Boot got beaten up by Carrow for yelling about it in the Great Hall at dinner!” “Yeah, it’s true,” said Harry. Harry Potter and the Deathly Hallows Pg 480 (emphasis mine)  If Harry, Ron, and Hermione were able to completely tamper the security of a super massively big bank holding billions of galleons, and other precious things, how could it be considered secure? There could be many many such people, such attackers!


Check if a program exists from a python script

How do I check if a program exists from a python script?  Let's say you want to check if wget or curl are available. We'll assume that they should be in path.  It would be the best to see a multiplatform solution but for the moment, Linux is enough.  Hints:    running the command and checking for return code is not always enough as some tools do return non 0 result even when you try --version.  nothing should be visible on screen when checking for the command   Also, I would appreciate a solution that that is more general, like is_tool(name)


I've stumbled across the following notation a couple times reading physics articles on wikipedia: $$\partial_{\mu}$$ But what does it mean? They don't clarify.  Source:


I'm trying to use the knife tool. I click on the tool and it does appear. But when I try to press LMB to cut, instead of the guidelines I am supposed to create appearing, the only thing that happens is that only the green square that marks the beginning appears, and it always appears at the source point of the object. (you can see in the gif I added that i'm trying to click and nothing happens) In addition, from time to time it happens that the tool does respond to my clicks. (It should be noted that sometimes it reacts and sometimes not. In both cases it happens for no apparent reason) But even when the tool responds, it seems that for some reason it constantly insists on choosing the edges of the objects instead of creating edges the way I draw with the mouse. I tried of course to check if it had anything to do with the edge selection mode, but no matter what mode I was in or what object I tried to perform the action on, All I could do was make this green square appear and nothing more. I believe this is some definition that has changed in this specific project, because in every other project the knife works properly. please help!!


I know force:navigateToURL will open up a site in a new window. Is there any way to navigate to a different site in the current window?


CIFS randomly losing connection to Windows share

I have had a couple of directories mounted remotely from a Debian Jessie, in a Windows share, for a few months.  In the last weeks, I keep having complaints of random disconnects from the mountpoint, and had to do a  sudo mount -a   to regain the mount connectivity, a couple of times (the server is used once or twice a week).  e.g. the mounts are not recovering often after some period without being used.  The Windows administrator also told me the Windows server has not been rebooted for a while.  Today, coincidentally when doing mount -a again, it only worked in the 2nd try, while the first try gave the following error:  sudo mount -a mount error(104): Connection reset by peer Refer to the mount.cifs(8) manual page (e.g. man mount.cifs) mount error(112): Host is down Refer to the mount.cifs(8) manual page (e.g. man mount.cifs)   The directories are mounted from /etc/fstab as such:  //10.2.1.2/XX/ZZ/YY    /mnt/mount_point        cifs    credentials=/root/.smbcredentials,iocharset=utf8,file_mode=0770,dir_mode=0770,uid=1001,gid=1001 0 0  When doing a mount command, you can also see the option echo_interval is activated by default at 60 minutes.  $mount //10.2.1.2/XX/ZZ/YY on /mnt/mount_point type cifs (rw,relatime,vers=1.0,cache=strict,username=someusername,domain=XXX,uid=1001,forceuid,gid=1001,forcegid,addr=10.2.1.2,file_mode=0770,dir_mode=0770,nounix,serverino,mapposix,rsize=61440,wsize=65536,echo_interval=60,actimeo=1)  What to do?


How to vertically and horizontally center an image in a div

I am struggling to center images in divs.  This is what I have so far:

     How do I get the two images on the right hand side to be centered vertically and horizontally in their respective divs?


$A$ and $B$ are $3\times 3$ real matrices such that $\operatorname{rank}(AB)=1$, then $\operatorname{rank}(BA$) can not be which of the following?

I was thinking about the problem that says:     If $A$ and $B$ are $3\times 3$ real matrices such that $\operatorname{rank}(AB)=1$, then $\operatorname{rank}(BA)$ can not be which of the following?   (a) $0$   (b) $1$   (c) $2$   (d) $3$.   My attempt: I have chosen suitable $3 \times 3 $ matrices for $A$ and $B$ keeping in mind that $\operatorname{rank}(AB)=1$. Say for example if I take $A$ and $B$ to be  $$A = \begin{pmatrix} 1 &2  &0 \\  0 & 0 &0 \\  0 & 0 &0  \end{pmatrix}$$  and  $$B = \begin{pmatrix} -2 &1  &0 \\  1 & 0 &0 \\  0 & 0 &0  \end{pmatrix}$$ respectively, then I see $\operatorname{rank}(AB) = \operatorname{rank}(BA) = 1$. So, option (b) can not be correct. Do I have to keep choosing the matrices and then observe which of the option holds good. Is this kind of approach right to tackle the problem? I am looking for a direct way (e.g. application to some theorem) which can give me the result. I have also noticed that $AB$ and $BA$ are similar matrices as we see that $A^{-1}(AB)A=BA$. Is this observation going to help me in any way? Thanks in advance for your time.


Is it true that the order of $ab$ is always equal to the order of $ba$?

How do I prove that if $a$, $b$ are elements of group, then $o(ab) = o(ba)$?   For some reason I end up doing the proof for abelian(ness?), i.e., I assume that the order of $ab$ is $2$ and do the steps that lead me to conclude that $ab=ba$, so the orders must be the same. Is that the right way to do it?


The mean of a normally distributed variable to the fourth power

Suppose that I have a random variable $X\sim\mathcal{N}\left(0,1\right)$.  I know that $$\mathbb{E}\left[X\right]=0$$ $$\mathbb{E}\left[X^{2}\right]=\operatorname{var}\left(X\right)+\left(\mathbb{E}\left[X\right]\right)^{2}=1-0=1$$ But then how would I calculate $\mathbb{E}\left[X^{4}\right]$?  (By the way, I do not have any background in moments and moment generating functions, so could I request for more explanation if your response involves moments and moment generating functions please?)  Thank you!


What does the "@" (at) symbol mean on OSX ls?

When I check permission of less files from the command line on my Snow Leopard OSX system using Bash I see -rw-r--r--@ for certain files and for others I just see -rw-r--r-- What does the @ mean here?


Let $\,f:[a,b] \rightarrow  \Bbb R $ be  continuous  and  $\int_a^b f(x)g(x)\,dx=0$, whenever $g:[a,b] \rightarrow  \Bbb R $ is  continuous and $\int_a^b g(x)\,dx=0$.  Show that $f$ is a constant function.  I tried a bunch of things including the mid-point integral theorem(?) but to no avail. I'd appreciate an explanation of a solution because I really don't see where to go with this one..


Tool or utility for automatically checking internet speeds

My workplace is deciding whether to switch ISPs, so I have been tasked with checking our internet connection speeds twice a day (once at 2pm, once at 2am).  I am wondering if there was a utility that I could download and run that would do this automatically in the background over the next couple of weeks, and give me a CSV of the results.


on click event in javascript not triggering

I am using JQuery sortable and have two two lists that I am moving items from one to another.  The first move works just fine with a double click.  Now that it is in the second list, I want to allow users to remove items by clicking and hitting the delete key.  My plan to do this is to have a click event trigger and decorate the list item with a class, and then when the delete key is hit, it will delete all items with that class.  At this point, I am having issues getting the click event to take hold.  Since I am creating the list items dynamic, I am using the on event keyword.  My html for the second list looks like this.

   My js for trying to handle the click event looks like this.  $('.cartSortable li').on("click", function () {     alert('here');     $(this).toggleClass("selected"); });   The alert is there so that I know if it was hit.  Let me know what you think is wrong or where my understanding is lacking.


"Data collected helps scientists" or "data that is collected helps scientists"

The real-time data collected helps scientists better understand what’s   happening to rivers and estuaries around the world.   Should it be,      "The real-time data that is collected..."?    What is the rule regarding this?


How do I echo a lot of content in a bash script?

I would like to do   echo "[this thing]"   This thing is  \documentclass{article} \usepackage{rotating} \usepackage{pdfpages} \usepackage{verbatim} \usepackage{amsmath, amsfonts, amssymb, textcomp, mathtools, xparse} \usepackage[T4, OT1]{fontenc} \usepackage{graphicx} \graphicspath{{/Users/Masi/Dropbox/Physiology/images/}} % Animations cannot be included here % \addmediapath{ {/Users/Masi/Dropbox/Physiology/animations/} } \usepackage{newunicodechar} \usepackage{multirow} \DeclarePairedDelimiter{\abs}{\lvert}{\rvert} \DeclarePairedDelimiter{\norm}{\lVert}{\rVert} \usepackage{color} \usepackage{hyperref} \usepackage{media9} % animations swf \usepackage{Tabbing} \usepackage{doi, natbib} \hypersetup{ colorlinks=true, linkcolor=blue, citecolor=blue, allcolors=blue } \usepackage[affil-it]{authblk} \usepackage{import} \usepackage{color} \usepackage[normalem]{ulem} \usepackage{titling} % Two titles in one document \DeclarePairedDelimiter{\abs}{\lvert}{\rvert}   %%%%%%%%%%%%%%%%%%%%%%%%%%% Question and Answer %%%%%%%%%%%%%%%%%  \usepackage[framemethod=tikz]{mdframed}  \mdfdefinestyle{ans}{   linecolor=cyan,   backgroundcolor=yellow!20,     frametitlebackgroundcolor=green!40,     frametitlerule=true } \newcounter{question}[section]% \setcounter{question}{0}  \newenvironment{question}[1]{% \refstepcounter{question}%     \begin{mdframed}[style=ans,frametitle={Question: #1}] }{%     \end{mdframed}% }%   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  %%%%%%%%%%%%%% Smaller things  \newtheorem{case}{Case logic} \mdfdefinestyle{que}{   linecolor=cyan,   backgroundcolor=cyan!20, } \surroundwithmdframed[style=que]{case}  \newtheorem{sidenote}{Sidenote} \mdfdefinestyle{que}{   linecolor=cyan,   backgroundcolor=cyan!20, } \surroundwithmdframed[style=que]{sidenote}   \newtheorem{citation}{Citation} \mdfdefinestyle{que}{   linecolor=cyan,   backgroundcolor=yellow!20, } \surroundwithmdframed[style=que]{citation}  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%     \newtheorem{theorem}{Theorem} \newtheorem{proposition}[theorem]{Proposition} \newenvironment{definition}[1][Definition]{\begin{trivlist} \item[\hskip \labelsep {\bfseries #1}] \emph}{\end{trivlist}} \providecommand{\keywords}[1]{\textbf{Keywords:} #1}   %%%%%%%%%%%%%%%%%%%%%%%%% Counter Section %%%%%%%%%%%%%%%%%%%%%% \makeatletter   \def\@part[#1]#2{%     \ifnum \c@secnumdepth >\m@ne       \refstepcounter{part}%     \fi     \addcontentsline{toc}{part}{#1}%     {\parindent \z@ \raggedright      \interlinepenalty \@M      \normalfont      \LARGE \bfseries #2%      \markboth{}{}\par}%     \nobreak     \vskip 3ex     \@afterheading} \@addtoreset{section}{part}     \makeatother %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%   How can you echo such a big content in Bash file well?


Remove type attribute from script and style tags added by WordPress

Warning: The type attribute is unnecessary for JavaScript resources.     From line 10, column 146; to line 10, column 176     feed/" /> <script type="text/javascript">window      Warning: The type attribute for the style element is not needed and should be omitted.     From line 11, column 1798; to line 11, column 1820     </script> <style type="text/css">img.wp      Warning: The type attribute for the style element is not needed and should be omitted.     From line 23, column 193; to line 23, column 251     a='all' /><style id='kirki-styles-global-inline-css' type='text/css'>.envel      Warning: The type attribute is unnecessary for JavaScript resources.     From line 23, column 905; to line 23, column 1010     }</style> <script async type="text/javascript" src="http://....../wp-content/cache/minify/df983.js"></scri      Warning: The type attribute for the style element is not needed and should be omitted.     From line 70, column 126; to line 70, column 167     70.png" /><style type="text/css" id="wp-custom-css">@media      Warning: The type attribute is unnecessary for JavaScript resources.     From line 441, column 156; to line 441, column 261     iv></div> <script defer type="text/javascript" src="http://......./wp-content/cache/minify/26938.js"></scri      Warning: The type attribute is unnecessary for JavaScript resources.     From line 441, column 272; to line 441, column 302     </script> <script type='text/javascript'>/*  */      Warning: The type attribute is unnecessary for JavaScript resources.     From line 443, column 17; to line 443, column 122     </script> <script defer type="text/javascript" src="http://......../wp-content/cache/minify/6ce07.js"></scri  These errors are some new introduction by W3C and they have started to creep in last 3-4 days only. We enqueue scripts like this → wp_register_script( 'custom-js', get_template_directory_uri() . '/js/custom.js', array( 'jquery' ), '1.1', true );     wp_enqueue_script( 'custom-js' );  Can we fix this from the above enqueuing method somehow? Update → these are the actual errors. In the red box are coming from W3 total cache.


Which would be advised as the first line in a bash script:  #! /usr/bin/env bash   or   #! /bin/bash


Create a bootable ubuntu Usb stick on Mac

I have followed the instructions from various posts at the forum and I when I execute in the terminal  sudo dd if=/path/to/downloaded.img of=/dev/rdiskN bs=1m   then it requires the password but instead it does not let me type the password. If i press enter then the same thing until I repeat it three times which will require me to execute the above command again. Anyone knows why and how to solve it?


I wish to show that if the topological space X has a countable base, then every base contains a countable base. I know if if a space has a countable base, then it has countable dense subset but they are not the same statements apparently~


I'm a very emotionally flat person in real life, and the way I act in reality is relatively unique. The result of this is that every character I've ever made has been painfully recognizable as me. Even if I try to put a spin on it during character creation, in practice it doesn't play out in a meaningful way. I really don't want to be "that guy" for the sake of others and myself. How do I give my characters a personality of their own without becoming a bad caricature?


Prove $\sin(1)\sin(2)\sin(3)\cdots\sin(n)$ converges as $n\to\infty$

Does this sequence $\sin(1)\sin(2)\cdots\sin(n)$ converge to 0? Or does it converge at all?


I am from Pakistan. I am planning to apply for a UK tourist visa with my wife and 6-year-old child. I am a businessman and the main applicant. My wife is a housewife. My visit will be for 15 days in London.  I want to ask for some information. I have GBP 4,000 for this visit. Is this enough for 15 days? How do I distribute it in my three visa forms? How to fill these fields on all three forms?   What is the cost to you personally of your trip in GBP(£)? The total amount of money you have for this trip?   Please help me with this matter.


Like it or not, . . . (Whether you like it or not)   I've come across this kind of phrase many times, but this is the only one--among no-subject subjunctives--that I can be sure it's common and right to use. So, I want to know how far it is allowed to use no-subject subjunctives and how common it is. By far, I mean, is it okay to use any verbs and any objectives instead of like and it to make such a subjunctive? And how commonly is it used in daily conversations?  My examples of the question one:   (Whether you) Went there or not, it's not my concern. (Whether you) Be here or not, you should never break the oath.   Are these okay to use?


How can I monitor disk I/O in a particular directory?

I've got a few processes with a known name that all write to files in a single directory. I'd like to log the number of disk block reads and writes over a period (not just file access) to test whether a parameter change reduces the amount of I/O significantly. I'm currently using iostat -d -p, but that is limited to the whole partition.


Can we use a pronoun in the place of Attributive adjective?

Predicate adjectives Example: The sea is blue. Attributive adjectives Example: The blue sea.  Attributive adjectives are adjectives that describe a characteristic (or attribute) of the noun or pronoun that they modify.  Here is my doubt. Predicate adjectives Example: It is blue.  Attributive adjectives Example: The blue ( ? ).  By definition, can we use "it" in (?) place or can we use a pronoun in the place of Attributive adjective?


I know how shading works with faces:     That's set by choosing Smooth/Flat under Faces in the Shading menu:    But what do the other two options—Edges and Vertices—do?


How can I edit bevel parameters on a mesh object I created last week?

Blender 2.90.1 on Windows 8.1 I created a simple mesh object last week (Plane.002 - default name), extruded it to make a rectangular solid, then I edited one of the edges (CTRL+B) with a nice 3-segment bevel. Now I've decided it will render better with more segments. Where are the bevel params stored for Plane.002 so that I can change Segments=3 to Segments=7 ? Can it be edited? Thx!


The following picture was taken from  on Stack Overflow.    As you can see, the 54k count fits centered in its container, but for counts greater than 99k, the count is no longer centered.  I'm requesting that div.answer-votes tags be made flexible width to allow for votes totaling 100k or greater.


How to change keyboard layout via command line cmd.exe on Windows XP/7?

Is is possible to change the keyboard layout via command line on Windows XP/7?


Changing the size of the mouse pointer in Ubuntu MATE 18.04 does not work

I have Ubuntu 18.04 with the gnome-desktop  and parallel the Ubuntu MATE desktop installed. While I can easily change the size of the mouse pointer (DMZ-White) in the Gnome3 desktop , this does not work on the MATE desktop. I use for this the dconf-editor.  Maybe someone knows a solution?  Thanks a lot.


How do I calculate the area of a 2d polygon?

Assuming a series of points in 2d space that do not self-intersect, what is an efficient method of determining the area of the resulting polygon?  As a side note, this is not homework and I am not looking for code.  I am looking for a description I can use to implement my own method.  I have my ideas about pulling a sequence of triangles from the list of points, but I know there are a bunch of edge cases regarding convex and concave polygons that I probably won't catch.


UNITY : I want to make my UI text fade in after 5 seconds

I know this question has been asked and asked but none of the topics i visited gave me an answer. I'm making a game programmed in c# where you control a boat and i want my UI to appear smoothly by fading in after X seconds. May someone help me?


Proof that difference of compact and closed sets is also closed

I am trying to prove that for any $A$ compact, $B$ closed sets $\Rightarrow A-B = \{a-b | a\in A, b\in B\}$ is also closed, where A and B are subsets of a topological vector space $X$.


Can I install Ubuntu on a computer that has no operating system?

I have an old laptop that has had System32 deleted. Is it possible to install ubuntu, and if so HOW?  Thank you!


I open the app Enter Stack Overflow Click Show tags See list of tags Search a tag Select a tag See the list of posts for that tag Open a post and read it Kick BACK-BUTTON   I am now back to step 4 and have to redo 5-7 every time. I would expect to get back to step 7.     App Version: 1.0.89 Device Manufacturer: samsung Device Model: SM-G900F   OS Version: 6.0.1 (G900FXXU1CPFH)


I have a formula which is like this  =COUNTIFS('sheet1 '!W:W,">0",'sheet1 '!A:A,"Truck")  which is count all data in column W (sheet1) larger than 0, which are called Truck in column A.  Now, I want this formula to read the same information but by consider a range of dates in between 1st of October to 15th (I have dates in Column B). Any input is greatly appreciate. Thanks


Editing notes overflow into footer without background

As I was about to edit a question on Stackoverflow (and Meta) I noticed the sidebar notes overflow into the footer. This also seems to be happening in meta.  Happens to me on:   Chrome 41 OS X Firefox 37 OS X Safari 8       Update  Since there is a , let me update my question and target specifically Meta. Since the question already has an answer and it states the sidebar is more important, then maybe on sites like Meta.SE where the sidebar is transparent, there should be a white background.


Is it possible in Python make a static attribute of class which will be same for all instances (objects) of that class, they all will use same reference to that attribute without creating their own attributes.   For example :  class myClass:     __a = 0      def __init__(self, b, c):         self.b = b         self.c = c      def increase_A(self):         self.__a += 1         return      def get_A(self):         return self.__a   So if I have  myObject1 = myClass(1,2) myObject2 = myClass(3,4)  myObject2.increase_A()  print myObject1.get_A()     will show one and not zero, couse they share the same variable ?


Is adjoint of singular matrix singular? What would be its rank?

Let $A$ be a square and singular matrix of order $n$.  Is $\operatorname{adj}(A)$ necessarily singular? What would be the rank of $\operatorname{adj}(A)$?


Is it possible to sync files via rsync and let rsync only compare mtime informations?  Or is there another tool for this job?  That means that such a tool only copies src to destination if the src is newer than the destination. Comparable to GNU cp --update - but also over ssh ...


Is there an automated way to create composites from multiple images of a moving object?

I have a large series of aligned images of an object in motion (camera and background stationary) I want to overlay into a single image to show the object in each frame without any alpha blending.  I could do this in Photoshop by importing each image as a separate layer, and then unmasking the object in each layer, as noted in  But with dozens of images per composite I'm wondering if there is a more efficient method to do this.


What is the pronunciation of "the" before the vowel "e"?

How do you pronounce the vowel in the article "the" when used before "evil"? (American English)


Why do I get this JRE JDK error message?

Package icedtea-8-plugin is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'icedtea-8-plugin' has no installation candidate


First of all, how can atmospheric pressure be same in a closed room when it clearly depend on the height of the air column. Compared to atmosphere, the room few metres high so how can air pressure be same. Secondly, how can human body sustain such high pressure. If a body gets hits by a truck on all side with the same pressure, he will be crushed. Even if internal pressure is equal why would not the skin get crushed. Why aren't everyday crushed. Thirdly, if book is held on a table with few mm of separation, will the air pressure underneath the book be same and how. Will the there be air flow. What happens to air pressure between small gaps between objects


I am working on a game-engine and the time has come to model a simple map. I thought, since i already use blender for models, why not for the map, since creating a world-editor can be time-consuming. The problem is, my engine expects the world to be in quadratic chunks of equal size. I'd like to model the map as a big plane with structures on-top in Blender and afterwards, cut the whole scene with plane and structures in equal quads to export them individually. Is this possible?  Example:   I'd need the whole terrain-plane to get split at the red lines and the little house, so every part of the house is in the corresponding chunk when i export the chunks.  Alternatively, when i create multiple equal-sized quadratic planes, to somehow glue one edge of one plane to another edge of another plane, so i neither get holes in between, nor get overlapping faces?


Dec 31st is Monday  -Closed until Monday (Monday will open)    -Closed until Dec 31st    Is this second option not as clear as using the day of the week? Would it be clearer to say, 'Closing until end of Dec 31st'? (If i want to include that date) Would using the day of the week after make it more clear than using just the date?


Example of a function with only finitely many discontinuities which is not Riemann integrable?

I know that bounded functions on compact intervals $[a,b]$ with only finitely (or countably) many discontinuities are Riemann integrable. What is an example of an unbounded function with only finitely many discontinuties defined on a compact interval $[a,b]$ which is not Riemann integrable?   I assume there must be some for the bounded hypothesis to be needed.


Does a gap of 10 months after Master's degree affect my chances for a future academic career?

I am soon to submit my PhD thesis and I am currently looking for postdoc positions. I would eventually like to stay in academia and was concerned if my past gap year would harm my chances in getting a position.  After my master's degree, I got an R&D job and worked there for 4 months before quitting it as I did not enjoy it there. My plan was to join my master's lab as a research fellow, and I had an offer for that from my advisor. But, I got a bad disease and I fell ill for 3 months. I was not hospitalized, but had to live with my parents for the period. As I always wanted to pursue PhD, I was searching for a position in the meantime. During the 3 months, I gave GRE (scored poorly, thanks to my illness) and applied to universities and professors. I got a positive response and I was sure of getting a PhD position.  However, it was already February and if I were to join a PhD program, I would have to wait till September. Also, the visa process and other formalities take time. So, I decided to not go further with the research fellow, and take time to complete the visa processing, spend time with parents and travel around.  I had a blast of time. Learned so much during that time. But, I don't have anything concrete to show for that 9-10 months period.  My concern is, how much will that affect my future career?


Before i write my own asp.net app, i wanted to see if there is an existing service already. What i am looking for is send # of zombies the player killed at the end of game to the service. The service than shows sum of all zombies killed that day in the world by other players.  It will also show top 3 players by their summed score today, not their best score in one game. Is there such service available or do i have to roll out my own? thanks  Moderator marked this as duplicate of  but the service mentioned in the topic is no longer in service.


Could someone give an intuition on the concepts of homology and homology groups? I have been reading the definition of these, but don't have a clear understanding of them. Thanks!


I found this problem in Discrete Mathematics and Its Applications while studying for an exam and am having trouble solving it. Prove that for $a,b\in N^*, a \ge b, 2\gcd(a,b) = \gcd(a+b, a-b)$ if $a$ and $b$ are odd. My current idea was to use the principles in the Euclidean Algorithm to somehow prove it, but I'm running into a wall. Any help would be great, thanks!


Man stranded alone on alien planet with alien machine

I read a story in an old scifi mag years back from the 60's or 70's (in Amazing Stories maybe) about a guy stranded alone on an alien planet where there was an intelligent machine that could make things. The only food he had was rotting crumbs from his pocket so all the food that the machine was able to replicate for him only made him sick.  To save his life:      in the end the machine decided to change him instead, into something it could cater for   brilliant little twist as usual. That's about all I remember. Does anyone know the name of that story? I would love to track it down again.


What does each graph quadrant mean with LDAvis plot in R?

I write about  that shows a big probability mass. It's a web-based interactive visualization of topics estimated using Latent Dirichlet Allocation that is built using a combination of R and D3; the default for scaling the set of inter-topic distances defaults to Principal Components, but other algorithms are also enabled.    This is the way that it finally shows with some data I found online and used to understand Latent Dirichlet Allocation topic modeling. As far as I understand, this graph is ideal to give out final names to each topic according to the frequency or relevance of each term given the topic but I've got two questions:   1. What would you simply say about topic 8 position on the graph? Meaning that I can't tell what each square represents in this graph, I can't tell in plain words what's the difference between topic 1 and 10, or topic 8 and 3, given their position on this graph?   2. What can you say about the big gray line in comparison with the red filling when lambda is 0? I think I get that when lambda is 1, it's meaning about plain frequency of the term in the whole corpus vs the frequency of the terms in that topic, but I'm not sure I get it with putting more weight in the ratio from red to gray: what is the gray line saying about that term and how is red contrasting?  You can get this for a model named lda_model$plot() found .   I am looking for the main idea at least. If there is info I need to add please tell me.


Failed to load session "ubuntu" problem (maybe a error with Compiz?)

I was fooling around in a program (I forgot what it's called) and I had just seen a thing that made it so I could have multiple desktops at once. When I decided I didn't want it anymore, I thought that I had put it on from Compiz (since Compiz had options for the multiple desktops (called Cube I think), and so I disabled everything with the name "Cube" in it.  I closed my computer and once I went to login into my account, I saw that the bar on the side had disappeared. I went to restart and once I was back at the login screen, I decided to go see if I had the same problem in the Guest account. I went in it and the bar was still there, untouched. I decided that I should uninstall Compiz because the thing that I deactivated that caused the problem was from that.  I uninstalled it and when I restarted/came back on the login screen, I entered my password to go onto my main account and I received the message: Failed to load session "ubuntu". I then tried with my Guest account, but I had the same problem on it too.  Now I'm screwed in Windows 8 and I'm wondering what I can do to fix it. I've tried something about writing something in the command box that you access by pressing     Ctrl-Alt-F3 (the root terminal I believe). When it asks me my password I write and I have a problem where it tells me that I wrote the wrong password. I've tried it enough times to know that there's a problem with the program.


Vertical alignment of tabular to baseline in an itemize environment

I have a tabular inside an itemize environment:  \documentclass{article} \begin{document}     \begin{itemize}         \item[(b)]         \begin{tabular}{|c|c|}             ...         \end{tabular}     \end{itemize} \end{document}   It looks like this:    But I want it to look like this:    I.e. I want to align the top of the table to the present item baseline. How?


'That's how Physics work' or 'That's how Physics works'

Do you say 'That's how physics work' or 'That's how physics works'?   The former one seems more intuitive and has a high chance of making it into a conversation but the latter one seems correct too. Or is it that they are both correct?   Considering you are talking about physics as discipline in the context of the latter while you're discussing the multitude of possibilities within physics in the case of the former.  Googling this made it pretty clear that native speakers use both these terms.


Riemann Sums proving function identically zero

Let $f$ be continuous on $[a,b]$. Suppose that $f(x)\geqslant 0$ for every $x \in [a,b]$ and that $$\int_a^b f(x)\mathsf dx = 0.$$ Prove that $f$ is identically zero on $[a,b]$.  So I know to use Riemann Sums to show that the integral is being canceled out due to the fact that the function can't go below the $x$-axis. However, I am not sure how to show that in proof form.


While watching interesting mathematics videos, I found one of the papers  of Srinivasa Ramanujan to G.H.Hardy in which he had written $1^3+2^3+3^3+4^3+\cdots=\frac{1}{120}$.  The problem is that every term on the left is more than $\frac{1}{120}$ yet the sum is $\frac{1}{120}$. How is that ???  I know that there are many and much more interesting things  presented by Ramanujan (like $1-1+1-1+1...=\frac{1}{2}$ and $1+2+3+4.....=\frac{-1}{12}$) but for now I am interested in the summation in the title. Any idea/hint is heartily welcome. Thanks.   the video I'm talking about.


Does logistic regression take into account prior probabilities of classes?

Most examples of logistic regression uses a cutoff (for classification) of 0.5. But I suspect this is a reasonable starting point only if you have equal number of positive samples and negative samples.  Suppose we want to classify whether someone will get a disease or has a disease. We randomly draw 1000 people from the population. Only 50 (5%) of the 1000 people have the disease, while the other 95% don't. Suppose we train a logistic model based on various attributes of the 1000 people.  Would it be reasonable to use a cutoff of 0.05 for this case? Any prediction greater than 0.05 gets classified as "disease." I understand the threshold should be determined by acceptable number of false positives/negatives, but I'm just talking about a starting point here.  Suppose the ground truth is that 5% of population has this disease. But in a 2nd case, we sample in such a way so that we have 500 people with the disease and 500 don't, and train another model. We would expect the output from the logistic model to be a lot closer to 0.5 than 0.05 in this 2nd case right?  This makes me think that the logistic regression uses the distribution of the different classes in the training data as their prior probabilities. And the output is the posterior probability. Is this a way to understand it?


What is the preferred choice below?  A) "The order was unexpectedly cancelled."  B) "The order was cancelled unexpectedly."  I am guessing "cancelled" is a verb and "unexpectedly" is an adverb.  (Please correct me if wrong.)  Is there a hard or soft rule about adverb placement?


Why did Aunt Petunia mistreat Harry Potter given that Harry was so rich and she had more to gain by treating a rich boy well?

Her retirement will be secured if rich Harry financially supports her if her retirement fund runs out. Given her mistreatment, nobody will blame Harry if he dumps her aside when she grows old.   Why did Aunt Petunia kill the golden goose with her bad behavior? She should have tried hard to get into the good books of the golden goose.


How to set a font for math mode? I would like to have something like Segoe UI of something similar. Thank you  \documentclass{article} \usepackage{fontspec} \usepackage{firamath-otf} \begin{document} \begin{equation} x+y=45 \end{equation}  \end{document}   Error:


“The authors of the study, one of the most closely watched overviews of the global high-end retail market, predicted that such expansion would drive up growth across the global luxury market by as much as 8 percent.”   My question: what does "by as much as 8 percent" mean? Does it mean "by 8 percent" or "by up to 8 percent"?


I have seen the following syntax in a LaTeX example :  \( Inline math formula \)   What is the difference between those delimiters and $ ?


VisualForce error - Custom Button to add existing records

I am receiving the following Error:  Unknown property 'AddExistingSpecsExt.Specifications__c' Line 0   VisualForce Code  <apex:page controller="AddExistingSpecsExt">     <apex:form>         <apex:pageblock title="Associate Specifications to Products">             <apex:pageMessages />             <apex:pageblockbuttons location="top">                 <apex:commandbutton value="Associate" action="{!associate}" />                 <apex:commandbutton value="Cancel" action="{!cancel}"/>             </apex:pageblockbuttons>             <apex:pageBlockSection>                 <apex:pageBlockSectionItem>                     <apex:outputLabel>Specification Name</apex:outputLabel>                     <apex:outputText>{!Specifications__c.Name}</apex:outputText>                    </apex:pageBlockSectionItem>               <apex:pageBlockSectionItem>                     <apex:outputLabel>Specifications</apex:outputLabel>                     <apex:inputField value="{!Specifications__r.Product__c}"/>                 </apex:pageBlockSectionItem>                             </apex:pageBlockSection>         </apex:pageblock>     </apex:form> </apex:page>   Controller  public with sharing class AddExistingSpecsExt {      public Specifications__c loadedSpec { get; private set; }  public AddExistingSpecsExt() {     String specId = ApexPages.currentPage().getParameters().get('id');     if (String.isBlank(specId)) return;      List<Specifications__c> candidates = [         SELECT Id, Name, Product__c FROM Specifications__c WHERE Id = :specId LIMIT 1     ];     if (!candidates.isEmpty()) loadedSpec = candidates[0]; }     public PageReference associate () {          Specifications__c candidates = new Specifications__c ( Id = loadedSpec.Product__c, Name =loadedSpec.Id);          try {             Database.update(candidates);         } catch (Exception error) {             ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR, 'Error while associating.' + error.getMessage()));         }          PageReference page = new PageReference('/' + candidates);          return page.setRedirect(true);     }      public PageReference cancel () {         PageReference page = new PageReference('/' + Null);         return page.setRedirect(true);             }  }


iterating over an iterable using generator function

im facing this question, and I was hoping some of you might help out:     Write a function that accepts an iterable and a positive number n. The function returns a new iterator that gives values from the original in tuples of length n. Pad missing values with 'None' if needed for the very last tuple.   for example:  for x in bunch_together(range(10),3): print(x)  return values are  (0, 1, 2) (3, 4, 5) (6, 7, 8) (9, None, None)  This is what I come up with so far:  def bunch_together(iterable,n):     tup = tuple()     for item in iterable:         for i in range(n):             tup += (i,)         yield tup   but this obviously doesn't work because I didnt accounted for the range at all(the output as of now looks something like this:  (0, 1, 2) (0, 1, 2, 0, 1, 2) (0, 1, 2, 0, 1, 2, 0, 1, 2) ...#(goes on)   I could either create a generator of build an iterator (as in building a class composed of init iter and next) Thanks for the help!


Trace morphism in Lipman's "Dualizing sheaves, differentials and residues on algebraic varieties".

Let $f: V \to W$ be a finite surjective morphism of varieties, with $W$ proper and normal. Does there exist a trace map $$ \operatorname{trace}\colon f_* \mathcal O_V \to \mathcal O_W? $$ I know that such a thing exists if $f$ is etalé, or (more generally) finite and flat. Does normality of $W$ help here? Lipman seems to assume the existence in his exposition Dualizing sheaves, differentials, and residues on algebraic varieties, but doesn't explain it further.  In general, if $A \subset B$ is a finite ring extension, there is a finite fileld extension $K \subset L$ of fraction fields, and a  $\operatorname{trace}: L \to K$. I guess one wants to restrict this to $B$ and hopes it ends up in $A$? I find it hard to find examples where $f$ is not finite and flat, but , $$\mathbb C[x^2, xy, y^2] \subset \mathbb C[x,y]$$ gives an example where $X$ is regular, $Y$ is normal, but $f$ is not flat. However, considering the extension of quotient fields $K \subset L$ one sees that $L = K(x)$, and $x$ has degree $2$. The trace mapping is then given by \begin{align*} \operatorname{trace}: L & \to K \\ 1 & \mapsto \operatorname{trace} \begin{pmatrix} 1 & 0 \\ 1 & 0 \end{pmatrix} = 2 \\ x & \mapsto \operatorname{trace}\begin{pmatrix} 0 & x^2 \\ 1 & 0 \end{pmatrix} = 0 \\ y & \mapsto \operatorname{trace}\begin{pmatrix} 0 & xy \\ \frac{xy}{x^2} & 0 \end{pmatrix} = 0. \end{align*} Since $\mathbb C[x,y]$ is generated by $x,y$ as a $\mathbb C[x^2, xy, y^2]$-module, we see indeed that the trace morphism descends to a morphism $$ \mathbb C[x,y] \to \mathbb C[x^2, xy, y^2].$$ Are there examples where the trace map does not descend?


Why did this edit get attributed to the community user?

It seems that  by the OP of  was attributed to the community user.   I'm assuming that the edit was by the OP from the edit summary:     updated my question   and from the actual update. Both texts are speaking in the first person.


Why is there a 2 day delay when you don't immediately answer your own question?

When you    don't click the Answer Your Own Question checkbox then find the correct answer to your question and you answer your own question before 2 days go by you can't select your own answer   You've figured out the the correct answer to solve your own problem.  Why should the delay exist?  I can understand a 10 minute delay to hinder new users, but a 2 day delay makes no sense.  There is nothing that prevents the author from selecting a different answer at a later time, should one prove to be better, but if there is a somewhat specific question and the author figures out the answer earlier than the 2 day time frame, there shouldn't be anything preventing him from selecting his answer.


How to simplify the given boolean expression to simplest form?

I have the expression xy+xy'z+x'yz'. I have tried a number of ways to simplify it. What approach will ensure that this expression is reduced to its simplest form?


What is the purpose of the strdup() function in C?


Aligning with symbol inside `\left...\rigth` brackets or parentheses

I would like to align an equation on the equality sign with a symbol that is inside a \left\{...\rigth\} expression. Like this, \begin{align*} P \left \{ X &\in A \right \} \\ &= P \left \{ X_0 \in B \right \} \end{align*}  But this produces an error "Missing \right.." and the right hand side } from the first line is not displayed.  Why is this so, and is there a work around?


How busy is the E50/D1 motorway in Czech Republic?

According to Google maps there is road work on E50 from Prague to Brno. We are going to drive that route next week, how bad is it? Would it be better to take a different route? Google maps also show road work on road 12.  Anyone that has any information about the route Prague -> Brno.


I always get the analogy of the pretend sun on a piece of cloth pulling everything down such as the image attached below: But What I never really understood is what IS that piece of cloth. Like is it some sort of invisible force field or something? Sorry if I sound a little crazy, I only recently started reading a little bit of popular physics (fabric of the cosmos).


How can a user earn almost 100 reputation points with no upvoted questions and no profiles on other sites?

This profile  got almost 100 reputation points & 30 votes casted & no upvoted questions.  So there is no way to achieve 100 reputation points.  It only joined in movies community only.  please explain me how this profile got this many reputations with no upvoted post?


Suppress equation number when not refered to

Is is possible to use only equation or align environments without the * and then automatically suppress the equation number if there is nothing refering to that equation? It would make the LaTeX-life much easier I think.


Software needed to scrape data from graph

Anybody have any experience with software (preferably free, preferably open source) that will take an image of data plotted on cartesian coordinates (a standard, everyday plot) and extract the coordinates of the points plotted on the graph?  Essentially, this is a data-mining problem and a reverse data-visualization problem.


Keeping the upvote animation after april 1st has passed

I have grown fond of the upvote animation as i am sure most of you did as well, was wondering if we could choose to keep it after april 1st has passed.  The unicorns and I have bonded, it would be heartless and cruel to separate us now :(


Words that mean ''to inadvertently say something''

Like when you're talking and inadvertently say something and then realize it.


How can I make a plane always look at camera? Like in old videogames, like Doom or Wolfenstein, this kind of software used static images that always looked at the camera, is this possible to make on Blender Cycles?


How can I use wget to get files recursively if the username contains an @?

Firstly my main goal is to try and get FTP files recursively in Centos.  However the actual FTP login contains an @ which ruins the syntax.  Is there some way to place the username in "double quotes" or some such equivalent such that I can use @in the username?


How to get previous paragraph text to wrap around an anchored object?

Here's my problem illustrated with two screenshots.  In the first screenshot the "ideal" scenario, you can see the anchor position (the ¥ between the two paragraphs) of the image, and when positioned to the top corner of the anchor the "wrap text around object" works. The x-offset is just to show that the text does indeed wrap around the image on both sides.    In this second screenshot the anchor position corner is picked so that the image will protrude into the paragraph that precedes the anchor position, and for some reason the text in that paragraph does not respect the text wrap of the image.    Why is that and how can I avoid this from happening?  P.S. I wouldn't on purpose choose to place the anchor position this way, but the anchor option "Keep within Top/Bottom column boundaries" is what actually makes this happen even when positioning the image as per screenshot 1, so I'm looking for way to solve this issue of failing to wrap in previous paragraph in a more general sense.


How to disable Boot menu (F10-F12) on laptop?

While turning on my laptop, I wanted to disable a possibility to use "F10" boot menu (maybe it's F12 on other models). I want that no-one should be able to enter my DESKTOP (Even though I'm also using user-account password at Windows login screen). So, if BOOT is available, someone might use LIVE-CD to access my pc.  How to do that?


Python Float value 4.999999999999999 when saved in excel is showing value as 5.0

I am working on cosine similarity and I am struggling with below two problems:  1- When two text are exact match, I am getting score as 5.000000000000023.  2- When only one character is changed, I am getting score as 4.999999999999999.  When I save the result in excel. For both the case,values are coming as 5.  I tried math.isclose function to handle the above situation for my further analysis. But I want to save the exact score as it is irrespective of the Decimal places in Excel file as I want to use this output file in Qliksense for visualization and there if I keep the Threshold value for my score as 5.0 I may loose few records with value 5.000000000000023.


Combinatorics Pigeonhole principle series

Let a, b denote series with length of 2n  such that for every 1 $\leq$ i $\leq$ 2n: 1 $\leq$ $a_i$ $\leq$ n and 1 $\leq$ $b_i$ $\leq$ n  prove that there are index sets I, J $\subseteq$ [2n] such that  $$\sum_{i \in I} a_i = \sum_{j \in J} b_j$$  That question was taken from homework of combinatorics and graph theory course


Non-parameteric test on 2*2 contingency table

I got a data that can be categorized in two different ways and I like to test their association. The initial thought is Chi-squared test. However, the data is not normally distributed. What is the prefered test on such non-normally distributed contingency table?


Why do different materials absorb and reflect different wavelengths of light?

How so are different pigments differently coloured?


Can someone explain how to create fancy boxes like this in ConTeXt MKIV and probably with MetaFun?    According to @JairoADelRio link and MetaFun manual it is easy to change title text, to round and to change the background color of the title box.  However, any change I make only appears in title box. Why is that so? What do I miss? And how to round and to change the background color of the the content box?  Plus, how to get space between title and the box around it?


Is there any book that tells theorems about prime numbers with proofs. I know undergraduate calculus. I need a book that explains everything in detail.


How to connect faces between 2 edge loops?

I'm trying to fill empty space in my mesh, and I looked at the knife tool page on the Blender Wiki, and I'm not sure if there's a way to make it so that a new edge is made using the knife tool. I took a screenshot, and hopefully it'll explain better than I can of what I'm trying to do. Oh and I'm using Blender version 2.71, by the way.


Get back to number 1 position for keyword

Our site is prikkabelled.nl. We deal in prikkabel which is Dutch for (Illumination cable). We used to have the number one spot for the keyword prikkabel for almost a year, but we dropped to the second spot on the 8th of July 2017. How to determine what was the exact cause of this? We had some downtime of a few hours around that day, but according to Matt Cutts of Google, this is not a contributing factor for SE position. How tom more accurately determine the reason behind the shift from number 1 to number 2 spot?


Show an animated gif (retrieved as a BLOB) in a PictureBox on a separate thread

I need to show an animated gif, which I retrieve as a BLOB from a database (rather than a file), on a PictureBox, but I can't block the UI. The user can press a button that stops the referred animation.  So I create a UserControl that contains the PictureBox, where I can set the image to be shown. When I put this control on the form and starts the animation, everything occurs as expected, except for the fact that I can't press the button, 'cause the form is blocked.  When I start the animation from a Thread, the button are enabled and clickable, but in this case the animation "flickers".  I can easily change the PictureBox to another component, since it can show animated gifs. I can also transform the animated gif to some other format, if needed...  Note that    My images are animated gifs that came from BLOB's on a database and not normal files I do not want (in fact, It's forbidden, by requirements) create a file with the images (even a temporary file)   Any thoughts?


how can I increase my swap space in this sitution?

I have 16gb Ram,but I need 48gb....so I should increase my swap space to 32. Can I?  I ve tried to use Gparted but it's sth such as lock (or mount)!!!! tnx


Construction of a specific non-commutative and infinite group (with conditions on the order of the elements)

I am struggling with the following problem:     Find a group $G$ such that whenever $m, n, k \geq 2$ are natural numbers, then there exist $a, b \in G$ such that the order of $a$ is $m$, order of $b$ is $n$, and order of $ab$ is $k$.   The group $G$ necessarily has to be non-commutative and infinite.


Primary ideals are those whose quotient has irreducible prime spectrum.

I'm currently trying to figure out primary ideals and I think I proved the following geometric statement, but I'm not sure if I did it right and would like to have some feedback.     Lemma: An ideal $\mathfrak{a}$ of a commutative ring $A$ is primary if and only if $\text{Spec}(A/\mathfrak{a})$ is irreducible.   Proof: First note that $\text{Spec}(A/\mathfrak{a})$ is irreducible if and only if $\sqrt{(0)} \subset A / \mathfrak{a}$ is a prime ideal. Now suppose $\mathfrak{a}$ is primary, and $\bar x \cdot \bar y \in\sqrt{0} \subset A / \mathfrak{a}$. Then $x^n\cdot y^n = (xy)^n \in \mathfrak{a}$ for some $n \in \mathbb{N}$, so either $x^n \in \mathfrak{a}$ or $(y^n)^m \in \mathfrak{a}$ for some $m \in \mathbb{N}$. I.e. either $x \in \sqrt{(0)}$ or $y \in \sqrt{(0)}$.  Conversely, suppose $x \cdot y \in \mathfrak{a}$. Then either $x$ or $y$ is nilpotent modulo $\mathfrak{a}$, i.e. $x^n \in \mathfrak{a}$ or $y^n \in \mathfrak{a}$.  I'm still not 100% sure that I'm done here, because I only have $x^n \in \mathfrak{a}$, not $x\in \mathfrak{a}$. Am I missing something, or is the claim wrong? If so, I would like to see a counterexample.


Single word meaning 'funny if it weren't so sad'

'Funny if it weren't so sad' is used to describe situations which are very sad, for example because of utter incompetence in a serious situation, so sad in fact that one goes on to say it could be deemed funny.  I am specifically looking for a word which emphasises that the funny or comic part follows from the sad or tragic part. Full disclosure: this clarification was added after the first answer. This is also where the question differs from   One word to describe this is pathetic, however I feel that word isn't quite strong enough. :     "causing feelings of sadness, sympathy, or sometimes lack of respect, especially because a person or an animal is suffering"   Example sentence (the bold is to be replaced by another word, the [would be] could be left out or replaced for a form of to be):     So at that point we lost the nuclear football, apparently it has been put on some commercial flight and it's now travelling at 10 kilometres over the Atlantic, this situation [would be] funny if it weren't so sad.