I'm teaching myself C# and I am up to studying the try, catch and finally. The book I'm using is discussing how the finally block runs regardless of whether or not the try block is successful. But, wouldn't code that is written outside of the catch block be run anyway even if it wasn't in finally? If so, what's the point of finally? This is the example program the book is providing:  class myAppClass {     public static void Main()     {         int[] myArray = new int[5];          try         {             for (int ctr = 0; ctr <10; ctr++)             {                 myArray[ctr] = ctr;             }         }         catch         {             Console.WriteLine("Exception caught");         }         finally         {             Console.WriteLine("Done with exception handling");         }         Console.WriteLine("End of Program");         Console.ReadLine();                 } }


Please explain the complete steps involved in the installation of OpenSSH server on Ubuntu

I am having trouble installing openssh-server in Ubuntu. Particularly I want to know how to generate RSA public private key pair and the related concepts.  What are the modifications to default config files most commonly applied? How to grant root permission to login? How to add firewall?


What happens when anti-matter falls into a black hole?

Let's say a black hole of mass $M$ and a very compact lump of anti-matter () also of mass $M$ are traveling toward each other. What does an outside observer see when they meet?  Will they blow themselves apart in a  matter/anti-matter reaction? Or will their masses combine, never quite meeting in the infinite time dilation at the event horizon?


On  question, there is a YouTube video in , on the Android app the video shows up as a white space. There is no indication that it is a video.  Would it be possible to show the video in the app or link to the video on YouTube instead?


How to get rid of this peculiarly nasty pop up ad?

I've read through the posts  and tried many things suggested in the posts: I looked into my Task Manager and couldn't find any suspicious processes running; I did a full system scan with Windows Defender; I even wiped clean my hard drive and re-installed my Windows 8 OS and applications/programs.   But I just can't get rid of this:    It never appears on "major" websites like www.microsoft.com or www.usnews.com; it most often pops up on forums, like www.cplusplus.com/forum/ or www.linuxforums.org/forum/; it advertises anything (usually obscure) from car rental business to insurance.  When it pops up, I immediately look into Task Manager, but I can't find any new/suspicious processes running; I tried to "inspect element" on Chrome but I don't know where I should look...  I'm suspecting if some existing program is causing this, because I have the exact same programs on my PC before and after I re-installed my OS. But all my programs are developing tools like Eclipse, GitHub, Visual Studio, etc (except for Foxit reader; but again, I'm not running it when I see the pop-up)  I get this pop-up almost daily--Need help!


I have a jTable that containing some accounts data. I want to disable a button when i click on jTable Row, if the cell text(Data) is "NO" of column number 4 (in code vise column 3). Below is my code, but it does not work.    int selectedRow = tblJournalBatchList.getSelectedRow(); if (tblJournalBatchList.getValueAt(selectedRow, 3) == "NO") {     btnPost.setEnabled(false); }   What's wrong with my code?


How do I syntax check a Bash script without running it?

Is it possible to check a bash script syntax without executing it?  Using Perl, I can run perl -c 'script name'. Is there any equivalent command for bash scripts?


How do I change the default locale in Ubuntu Server?

I have a remote server which I installed and have been trying to unsuccessfully change the locale to french for a few hours. Below are the contents of my locale files:  /etc/default/locale:  LANG="fr_FR.UTF-8" LANGUAGE="fr_FR.UTF-8" LC_CTYPE="fr_FR.UTF-8" LC_NUMERIC="fr_FR.UTF-8" LC_TIME="fr_FR.UTF-8" LC_COLLATE="fr_FR.UTF-8" LC_MONETARY="fr_FR.UTF-8" LC_MESSAGES="fr_FR.UTF-8" LC_PAPER="fr_FR.UTF-8" LC_NAME="fr_FR.UTF-8" LC_ADDRESS="fr_FR.UTF-8" LC_TELEPHONE="fr_FR.UTF-8" LC_MEASUREMENT="fr_FR.UTF-8" LC_IDENTIFICATION="fr_FR.UTF-8" LC_ALL="fr_FR.UTF-8   /var/lib/locales/supported.d/local:  fr_FR.UTF-8 UTF-8 en_US.UTF-8 UTF-8 en_GB ISO-8859-1 en_GB.UTF-8 UTF-8 en_GB.ISO-8859-15 ISO-8859-15 fr_BE.UTF-8 UTF-8 fr_CA.UTF-8 UTF-8 fr_CH.UTF-8 UTF-8 fr_LU.UTF-8 UTF-8 fr_FR ISO-8859-1   Everything is still defaulting to english dates and the $ currency in my web app. Is there something else I'm overlooking? I should also mention that I have dpkg re-configured and restarted the server after changes were made.


Is it possible to detect file location when running it?

Say I have a file called calc.exe ( for example).  When I go to CMD and I run calc.exe it runs  because Windows has PATH settings in its environment variables.  Path information is  also accessible via typing path in cmd. ( as we all know).  Question  But - Is there any command in cmd that shows me information like this :   c:\> locate_Where_It_Will_run_From calc.exe   Response :   c:\windows   I mean , the only solution which I see now is to run :   dir /s  calc.exe   And then to match results with the PATH information .  Is there any such command which will show me the information of my example above ?


What do I need in a lens for studio portrait photography?

I'm going to start in photography and I'm looking to build a home photography studio. I'm planning to get a Canon 60D (wished for a 7D though). I'd like to find out what are the recommended lenses for shooting, mostly portraits, in studio. I have the option of the Canon 18-135mm IS or 17-85mm lens bundle. Or should I rather buy the body only and then buy a lens separate? I have a budget of $400-$500 for a standalone lens.   I plan to shoot mostly in studio but will want to shoot outside as well.


How to find an a function whose inverse is also its multiplicative inverse?

I'm looking for a function $f(x)$ so that $f_{inv}(x) = \frac{1}{f(x)}$. Does such a function exist and if so, how do I find it?


How do I read the LaTeX kernel code source?

I'm embarrassed to ask this. At one time I knew the answer and even had a printed copy of the code. I have tried texdoc with various options but was unable to come up with the one I needed.  At the moment I am particularly interested in the definitions of \addcontentsline, \contentsline, \addtocontents and any friends.  GOM


How to measure on a grid the area of a sphere area spell or effect centered on a creature?

Per the 's Wild Magic Surge table (PHB, p. 104)     07-08: You cast fireball as a 3rd-level spell centered on yourself.   There's other questionable area spells in that list (grease is a 10 foot square, so your square and which three?), but I'll focus on spheres like  (PHB p. 241):     (...) Each creature in a 20-foot-radius sphere centered on the point must (...)   My problem is, the sources I found so far - including the   to similar questions here - talk about measuring spheres from grid square intersections, whereas this clearly talks about it being centered on the unlucky Wild Magic sorcerer. Plus, since it's a wild magic effect, it doesn't exactly have a caster that can pick a point of origin. Is there an accepted way to measure an effect like this?


I've been trying to figure out how CEVA's Theorem can be implemented in solving this problem, but I'm coming up short and cannot make any progress with this problem.  The problem states;  A convex hexagon ABCDEF satisfies |AB| = |BC|; |CD| = |DE|; |EF| = |FA|. Prove that the lines containing the altitudes of the triangles BCD, DEF, FAB starting respectively at the vertices C, E, A intersect at a common point.  Any advice or guidance is much appreciated!


How do Americans pronounce "it would", "it was", etc.?

How do you pronounce "it would", "it was", etc. in American English? That is, how do you pronounce the T when it precedes a semi-vowel such as "w"? Is there a stop T or not when the words are pronounced fast? I know, when followed by a vowel, it's a flap T (as in "it is"), and, when followed by a consonant, it's a full T (as in "it looks"). Yet, I can't put my finger on this.


How to alert user that is leaving a page without saving the info

I did a small table thats ask for product name and product # my question how can I alert the user that he is leaving the page without saving the information.  <form action="index.php" method="post"> <input type="text" name="pnumber" value="" placeholder="Product Number...."/>  <input type="text" name="pname"   placeholder="Product Name...." /> <br> <button id="save">save</button> </form>


Doing Math calculations within ArcMap Dynamic Text?

Is it posssible to perform any math on ESRI ArcMap dynamic text?  For example I have the area of a SDE park layer's SHAPE.AREA, but it is in m2 because the layer is in NAD_1983_UTM_Zone_17N.  I want to show the area in hectares (m2 / 10000).  How do I do this?  Is it possible to add two fields together and display it in dynamic text?


Is stacking bare hard drives on top of one another safe?

I have several bare (not in an enclosure) hard drives that need to be stored for an extended period of time. Will stacking them on top of one another cause any problems in terms of data being lost or corrupted?


Do Windows Vista programs work on Ubuntu?

I purchased some old software that was made for Windows Vista. Will they work on Ubuntu? Will they work on Windows 7 or 8?


Caused by: java.lang.NullPointerException: SharedPreference error

I'm new to android. I use Shared Preferences named "MyPref" to store and retrieve values. The code logic is, "MyPref" stores userid, usertype (customer, driver). In my SplashActivity I have written the following code. If user id is not null and user type equals either customer or driver the activity should navigate accordingly. But I get the following error: Kindly help  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.SharedPreferences android.content.Context.getSharedPreferences(java.lang.String, int)' on a null object reference   SplashActivity:  public class SplashActivity extends AppCompatActivity {     SharedPreferences pref;     SharedPreferences.Editor editor;     Context context;     @Override     protected void onCreate(@Nullable Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_splash);         getWindow().setSoftInputMode(                 WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);         pref = context.getSharedPreferences("MyPref", 0);         editor = pref.edit();         String userid=pref.getString("userid","");         Log.e("userid",userid);         if(userid!=null)         {             String usertype=pref.getString("usertype1","");             if(usertype.equals("customer"))             {                 Intent customer=new Intent(SplashActivity.this, HomeFragment.class);                 startActivity(customer);             }             else             {                 Intent driver=new Intent(SplashActivity.this, DriverDashboardFragment.class);                 startActivity(driver);             }         }         else         {             Intent walk=new Intent(SplashActivity.this,WalkThroughActivity.class);             startActivity(walk);         }          new Handler().postDelayed(new Runnable() {              @Override             public void run() {              }         }, 2000);     }      @Override     protected void onResume() {         super.onResume();     } }


Can I mask a program on the OS from the command line?

So, I wanted to know if it was possible to mask a running program (not visible from task manager) from the command line. Also, can I see all programs, hidden or otherwise from the command line?


If GCD(a,b)=d,   then can we say that GCD(a^n,b^n)=d^n? for all positive integers n.  This doubt is inspired from GCD(a,b)=1 implies GCD(a^n,b^n)=1 for all positive integers n.


How do I transfer .blend files to a new PC and still keep all the materials?

I have been using my laptop for the longest time with blender. I recently got a new PC. When I copied the .blend file and dropped it in my new PC, no materials were on my mesh. How do I fix this??


What happens if we change the definition of quotient ring to the one that does not have ideal restriction?

From Wikipedia:     Given a ring R and a two-sided ideal I in R, we may define an   equivalence relation ~ on R as follows:  a ~ b if and only if a − b is in I.       Using the ideal properties, it is not difficult to check that ~ is a   congruence relation. In case a ~ b, we say that a and b are congruent   modulo I. The equivalence class of the element a in R is given by  [a] = a + I := { a + r : r in I }.       This equivalence class is also sometimes written as a mod I and called   the "residue class of a modulo I".      The set of all such equivalence classes is denoted by R/I; it becomes   a ring, the factor ring or quotient ring of R modulo I, if one defines  (a + I) + (b + I) = (a + b) + I; (a + I)(b + I) = (a b) + I.    Suppose that we no longer restrict $I$ to be an ideal, but just any set that is a subset of $R$ and is not an ideal of $R$. Then would it be impossible to satisfy  (a + I) + (b + I) = (a + b) + I and (a + I)(b + I) = (a b) + I all the time if $I$ is not an ideal?


I've seen that the question of whether we could  has been asked before. However, what about filtering by users? Let's say, there are certain users whose questions I really appreciate, or conversely, there are certain users whose questions I sometimes don't want to see. Currently, I can't filter by user the same way I can filter by tags. Would this be something possible but I just don't know how? Or if not currently possible, could it be a feature to be considered for addition? I could bookmark those users' profile page to see what they have been posting, but it's not quite the same as a filter for questions. I wouldn't have to open dozens of bookmarked profile pages, for example.


I'm studying algebraic topology and got stuck.  a. $X_n\in \mathbb{R}^3$ is the union of $n$ distinct lines through the origin. Find $\pi_1(\mathbb{R}^3-X_n)$ for each $n$.  b. Let $X$ be the sum of two tori $S_1\times S_1$ by identifying a circle $S_1\times x_0$ in a torus with $S_1\times x_0$ of the other torus. Find $\pi_1(X)$.  For (a), $\pi_1(\mathbb{R}^3-X_1)=\mathbb{Z}.$ But I cannot compute $n\ge 2$ cases.. for (b), I guess the group is $<a,b,c|ab=ba,bc=cb>$ from Van Kampen. Is it correct?


Group homomorphism from finite abelian group to $\mathbb{C}\setminus\{0\}$

Let $G$ be a finite abelian group, $g\in G$ be an element of order $n$ and  $\xi = \exp (\frac{2\pi i}{n})$. I want to show that for each $0\leq i\leq n-1$, there are exactly $\frac{|G|}{n}$ group homomorphisms $G\to \mathbb{C}\setminus\{0\}$ which satisfy $g\mapsto \xi^i$. I applied the structure theorem of finite abelian group, but it doesn't seem to help me.


Let $p$ be a prime. Let $f(x) = 3x+1$ and $g(x) = 6x+1$. Show that if $f(x) = p$, then $g(y) = p$.

The full question states: Let $p$ be a prime. Let $f(x) = 3x+1$ and $g(x) = 6x+1$. Show that: if there exists $x\in \Bbb N$ such that $f(x) = p$, then there exists $y\in \Bbb N$ $g(y) = p$.    My attempt at this was quite simple. I said that as $p$ is prime, and cannot equal 2, as $3x + 1 \not= 2$, $p$ must be odd, therefore $x$ is even. I've got a proof for that as well, but I'm quite confident that that's fine.   Thus, $x$ can be written as $2y$. $$3(2y) + 1 = p$$ $$6y + 1 =p$$ Thus, if $f(x) = p$, then $g(y) =p$.  I'm just not sure if this is a reasonable proof.


I tried running some code to reset my proxy:  if [ $(id -u) -ne 0 ]; then   echo "This script must be run as root";   exit 1; fi  gsettings set org.gnome.system.proxy mode 'none' ;  grep PATH /etc/environment > lol.t; cat lol.t > /etc/environment;  printf "" > /etc/apt/apt.conf.d/95proxies;  rm -rf lol.t;   and it messed with my desktop environment. I made prior post about this and another user said I had some of my home files owned by root. I took their advice and put the permissions back, using:  sudo chown -R user:user ~/   But even after that, my background is the only thing that loads after logging in. I'm using Xubuntu 16.04 with xfce desktop.


I'm trying to solve an exercise about first order stochastic dominance, and there is this one question that I'm not able to answer.  Here are the hypothesis of the exercise:  Let Y ∼ F and Y' ∼ G, that means Y (resp. Y') has a probability law given by the distribution function F (resp. G).  Assume that Y ≥ 0 and Y' ≥ 0 and E(Y) + E(Y')< ∞.  Here comes the question:  -Show that if the survival function of Y first order dominates over the survival function of Y', then if Y and Y' are independent, we have P(Y ≥ Y') ≥ 1/2.  I don't see how to use that Y and Y' are in this case independant.  Maybe I should set X=Y-Y' and then use the convolution?  Any help, would be appreciated, thanks !  Alex


Why do so many fans say that the "binoculars scene" was never shown in theatres?

I'd like to know why so many Star Wars fans are so sure that the famously deleted scene on Tatooine in which Luke watches the space battle through his binoculars never made it into a theatrical print in 1977.  My brother and I saw it together and discussed it afterward, then when we saw the movie in rerelease a year or two later, we were mystified as to why this scene had been cut, not realizing that the print we saw in '77 was not the official release print. Years later, when the film was released on VHS, we were disappointed that the scene hadn't been restored. And now, after finding a clip on YouTube featuring the binoculars scene and watching for the first time in thirty-eight years, we learn that the fact of the scene ever showing theatrically is suddenly in dispute. The explanation offered by fans (though not by George Lucas, as far as I know) is that we are misremembering, and that we must have seen some comic book or novelization containing the scene, so our brains created a false memory. The problem with this theory is that in my case--and no doubt in the case of many others in my age group who also remember the scene--I was strictly a fan of the Star Wars cinematic experience, and I had no interest in any Star Wars related comic books or other material that might have contained references to the deleted scene. With no other frame of reference to the scene other than actually seeing it in 1977, it is impossible for me to have formed a false memory of it (and then there's the additional memories, shared by my brother, of discussing the scene afterward). At this point, it is likely impossible that we'll ever find hard evidence to corroborate my recollection, such as a surviving print containing the scene. but it should be remembered that absence of proof is not proof of absence. My question is simply whether anyone knows the ultimate source of the resistance to the notion that such a print could have circulated.


Moderators can't edit the "What kind of questions should I not ask here?" section of the FAQ

On Software Engineering we want to update our FAQ to contain a list of what's not allowed much like the  and  ones.  See   However, I've only just noticed that while there is an "edit" link below the What kind of questions can I ask here? section there isn't one below the What kind of questions should I not ask here? section.  So rather than having to bother the developers can we have edit rights over this section as well? After all what's off topic is just as important as what's on topic, and it's just as likely to evolve over time (see Super User as a prime example of this).  We've quite a good list of things we agree shouldn't be asked on Software Engineering and would like to update the FAQ. We'll just edit them into main section for now, but it would be nice to be able to edit the "proper" section.  Can anyone say whether a) this is going to be done and b) when? (and don't say 6 to 8 weeks)


Searching for open source literature management software

I recently started my PhD and now try to find a convenient software for managing my literature research. What I want it to be able to do is:   Let me highlight PDFs Add notes to PDFs Add tags to my literature (as a bonus:) load methadata and create bibtex files   I personally really like Mendeley as it does pretty much exactly that. At my institute we have a strict open source policy though, which excludes Mendeley. Is there an open source alternative to Mendeley, which runs under Linux Gnome?   Thanks for your input.


Suggested edit review should show custom rejection reasons

Somewhat similar to , but rather more limited: when Rejecting an edit, not only the count of custom rejection reasons but the actual text of the reasons should be shown, IMO. Just now I  on SO that tidied some code in a trivially correct and substantially superior way because it looked perfectly legitimate and I couldn't understand why anyone would bother with a custom rejection reason. As it turned out, it was code in a question, of course.  In this case, the rejection reason correctly identified the problem, and had I seen it, I would have been reminded of that aspect I had neglected to check.


I'm trying to find out how much memory my objects take to see how many of them are ending up on the  (which is anything over 85,000 bytes). Is it as simple as adding 4 for an int, 8 for a long, 4 (or 8 if you're on 64 bit) for any reference types etc for each object, or are there overheads for methods, properties, etc.?


var a=new Number(6);  var b=new Object(6); a===b;  //false   I just do not understand why a===b return false. It has same type and come from same instance.


I never quite understood why negative feedback is more used than positive feedback.   Using feedback makes it possible to adjust the gain, and thereby specify how much the input should be amplified.   But why is negative feedback more commonly used when we want to amplify small voltages from sensor readings such as photodiodes etc.   The output of the op-amp becomes the negative amplified value of the input (input and output has different polarity), which don't make sense why it should be useful..    Hence would i always use positive feedback, but I can see that the internet disagrees with me, so must be wrong somewhere in my "reasoning" so what am I doing wrong?


How to install Win7 with dual boot in my ubuntu 12.04

I have ubuntu 12.04 and want to install win7 with dual boot because mi CLARO modem (Argentina) doesn`t work with ubuntu. How I do it?


Active camera have a short view distance,how do I increase it?

For some reason when I render or turn into active camera mode the mesh obj disappear as I move farther. I need help on how to increase that view range.


QGIS Raster->Interpolation Error: "wkb access out of bounds"

I´m rather new to QGIS.  So the issue is this. I downloaded some terrain data from INEGI (Mexico´s Geographic Information Institute) which contained the contour slope.  I had no issue doing it with the original data downloaded from the site, I had the info and followed  simple tutorial to get the Interpolation Raster.  I had proceeded to join 4 maps using Vector->Data Management Tools-> Merge Vector Layers and had no problems after the merge.  Having merged for maps the resulting map came out to be rather large for an interpolation and for my project I needed high resolution. So I need to clip a section of those slope maps to generate a raster of only a part of the map.  So I did that, I created a new ShapeFile layer and created a rectangular polygon that determined the area to be clipped. Then I went ahead and used Vector->Geoprocessing Tools-> Clip.     Having done this successfully I went ahead and used the exact same procedure to Interpolate this new slope and the error message I have been trying to solve for the past 3 hours appeared. "wkb access out of bounds".  This problem is exclusive to the "Triangular Interpolation (TIN)", Interpolation Method. While troubleshooting I tried the "Inverse Distance Weighing (IDW)" method which calculated somewhat successfully but with unsatisfactory results.


How do I get my stuff off a non-working Ubuntu machine?

So, I've somehow managed to wreck my Ubuntu machine (Ubuntu 16.04) by installing some software.   Now, when I try to log in, the screen just goes black for a bit and then takes me back to log in screen. Same happens when I try to log in with a different desktop environment, as I was using Gnome Shell instead of the Unity environment.    I can, however, log in as a guest but it won't connect to the internet.  So, can someone please advise me as to the best method for recovering all my stuff? I want to get all my stuff off then reinstall Ubuntu 17. I don't suppose there's any way to do this as a guest, or will I need to do it via BIOS or some other thing?


How to report time and other information on all bash commands?

Most of the things I run in the terminal take a long time to compute and I would like to have bash output a time report at the end of every command entered into the terminal. Is there something I can put into my bashrc to do this?  Example:  $ find / -ls <find / -ls return info> start time = 10:21:54 | end time = 10:31:34 | time lapsed = 00:10:20 $   or  $ make all <make all return info> start time = 10:21:54 | end time = 10:31:34 | time lapsed = 00:10:20   It would be nice to be able to add a list of exceptions for commands like cd, but it wouldn't really bother me.


How do I speed up the animation time for switching between desktop spaces?

Is there a way to speed up the animation time for switching between spaces? (Or maybe turning them off?). Preferably without buying a third party app. Maybe there's an option defaults.  I'm on Sierra 10.12.6.  Thanks


Usage question: "Relation" vs. "Relationship"

What is the difference between relation and relationship?   What's the purpose of the suffix?


Beginner here - java IF ELSE used with text

I just started reading about JAVA and I want to make a little program that when using Scanner is I type "yes", "no" or just something random I will get different messages.The problem if with the lines:   if (LEAVE == "yes") {         System.out.println("ok, lets go");      if (LEAVE == "no") {         System.out.println("you dont have a choice"); } else {         System.out.println("it's a yes or no question");   I receive the error : Operator "==" cannot be applied to "java.util.scanner", "java.lang.String". I saw on a site that it would be better if I replaced "==" with .equals,but I still get an error..  Help please :S  Code below:  package com.company; import java.util.Scanner; public class Main {      public static void main(String[] args) {         Scanner LEAVE = new Scanner(System.in);          System.out.println("do you want to answer this test?");         LEAVE.next();          System.out.println("first q: would you leave the hotel?");         LEAVE.next();         if (LEAVE == "yes") {             System.out.println("ok, lets go");         }         LEAVE.nextLine();         if (LEAVE == "no") {             System.out.println("you dont have a choice");             LEAVE.nextLine();         } else {             System.out.println("it's a yes or no question");          }     }}


In 'apt-cache depends' output, what is the meaning of Suggests, Recommends, |, ?

I've checked the man/info page, but there is no reference to some aspects of the output fomat of apt-cache depends     The man/info page tried to be helpful (in an obtuse manner); quote: "For the specific meaning of the remainder of the output it is best to consult the apt source code"    Now in fairness to the info page, that quote was in regards to the 'showpkg' option which it had reasonably explained, but my option had no such explanation...   I understand that Linux info comes from many sources (not just man/info pages), and I don't particularly want to rummage through the source (altough somtimes I do), so here is an example of what I'd like to know the meaning of.    # I can assume what these mean, but...  #  What does | mean? (probably means 'or'???) #  What does <pkg> and the following indentations  mean?  #  At the end, the interaction(?) of Suggest and Recommends puzzles me.  $ apt-cache depends solr-common solr-common       Depends: debconf  |Depends: openjdk-6-jre-headless  |Depends: <java5-runtime-headless>     default-jre-headless     gcj-4.4-jre-headless     gcj-jre-headless     gij-4.3    openjdk-6-jre-headless   Depends: <java6-runtime-headless>     default-jre-headless     openjdk-6-jre-headless   Depends: libcommons-codec-java   Depends: libcommons-csv-java   Depends: libcommons-fileupload-java   Depends: libcommons-httpclient-java   Depends: libcommons-io-java   Depends: libjaxp1.3-java   Depends: libjetty-java   Depends: liblucene2-java   Depends: libservlet2.5-java   Depends: libslf4j-java   Depends: libxml-commons-external-java   Suggests: libmysql-java  |Recommends: solr-tomcat   Recommends: solr-jetty


\leqslant causes "Undefined control sequence"

I have the following line: $0 \leqslant b \leqslant 1$  I want to display 0 <= b <= 1, but I get Undefined control sequence  thanks


I have a output of the command df and using cut I have successfully extracted  22%. But the problem is I want only 22 not the %, as I will be comparing the value with another integer variable. How to do it in Bash ?


Different websites suggest using one of those two packages.  \usepackage{graphicx} \usepackage{graphics}   What are differences between them? Which is better?


Prove or disprove:   if $f(x)\geq 0$ is uniformly continuous on $[1, \infty)$ and $\int_1^{\infty}f(x)dx$ converges, then $\lim_{x\rightarrow\infty}f(x)=0$   I'm pretty sure it's true because if f is only continuous, all opposite examples I know use infinite amount of x valus where f(x)=1 for example (like a triangle of height 1 with a smaller base for each natural x). But such an example wouldn't be possible because the function would be too "steep" around natural x's.  I'm looking for a hint on how to formalize this, I was thinking about Lagrange but obviously f isn't necessarily differentiable...


Change Footer properties based on content length

I am working on footers for an html page and wanted an implementation of something that keeps the footer below page level when the main content takes up less space than the page height. If the content takes up more space than the page height, then I want the footer to become just like a regular element and expand(not stick below the page anymore). I have a example below. Red: header Blue: content Green: Footer When content is minimal:  Since the content(blue) is takes up minimal space, I want to keep the footer right below the page so when the user scrolls, it starts to show. When content is more: Now that the blue takes up more than 1 page, I want the footer to get pushed down with the content so that it doesn't overlap or mess up the content.  Right now, I have code that can satisfy the first case but ALWAYS stays directly below the page. This means that it overlaps the content if the content goes past 1 page of length. I am new to HTML so if anyone has suggestions that would be great!


I'm familiar with many fine vegan cheeses, ranging from cream-cheese to Camambert. Undoubtedly much progress has been made in this area in recent years. The one (important) cheese I have yet to find a suitable replacement for is Mozzarella.  More specifically, I'm interested in a vegan cheese substitute which successfully mimics both the flavor and texture of melted Mozzarella. All soy-based substitutes I've tried which did have stringy properties suffered from very high stickiness, and adhered to the roof of the mouth resulting in an unpleasant experience.  Another recipe I've tried is cashew based cheese combined with tapioca flour, though both flavor and texture were less than adequate.


How to send email on custom button using Javascript

I have created custom button to send visualforce page url with opportunity id in opportunity detail page. How can i send URl like '' with creating controller or page.


Show that the polynomial $7X^5 + 71X^3 - 9$ is irreducible in $\mathbb{Z}[X]$

Show that the polynomial $f(X) = 7X^5 + 71X^3 - 9$ is irreducible in $\mathbb{Z}[X]$  My solution:  Using the irreducibility test: "Reduction Mod p Test"  $f(X)$ is clearly primitive and that the prime number 2 does not divide the leading coefficient.  It is therefore enough to prove the polynomial $\bar{\pi}_2(f(X)) = X^5+X^3-\bar{1} \in (\mathbb{Z}/2\mathbb{Z})[X]$ is irreducible.  $\bar{\pi}_2(f(X))$ has no roots in $(\mathbb{Z}/2\mathbb{Z})[X]$ (to verify this evaluate the polynomial at the two elements $\bar{0}$ and $\bar{1}$ of $(\mathbb{Z}/2\mathbb{Z})[X]$  Thus, if it were reducible then it would have to be of the form $g(X) \cdot h(X)$, where $g(X), h(X) \in (\mathbb{Z}/2\mathbb{Z})[X]$ are both irreducible of degree $2$. Which is not possible.  Concluding that $\bar{\pi}_2(f(X))$ is irreducible in $(\mathbb{Z}/2\mathbb{Z})[X]$, whereby $f(X)$ is irreducible in $\mathbb{Z}[X]$.


Eigenstates and eigenvalues of the operator $xp+ px$

It is a hermitian operator, right? So, what are its eigenstates and eigenvalues? It is known that it is the infinitesimal generator of the dilation group in 1d. But apparently, a nontrivial dilation operator has no eigenstate!   ps. The last statement is wrong.


Give web sever directory full permission

I managed to change DocumentRoot directory form /var/www to /home/user/www and working fine except the problem that I can not copy/paste or even delete any file without root access.  Since I use SASS compiler software in which some files are compiled and outputted within the project directory. It is no more output any files and give permission denied.  I need help making all DocumentRoot sub folders and files have full permission without root access.


Looking for a science fiction movie with tentacles and a cure?

I saw this movie as a kid so I can only recall certain scenes from it but the general idea is that some kind of tentacle alien invaded a town and a team of scientists and soldiers were sent there to contain it.   The most vivid scene I remember is when the tentacle oozed through the streets and grabbed a scientist wearing a white hazmat suit by the legs and filled his suit with some black liquid up to the top. He then fell down, his hazmat helmet glass broke, then momentarily woke up and spoke some dialogues before dying for good.  Another scene involves one of the main characters walking through the street back to the research trailer when he was stopped by a dog (which is probably infected with the tentacle). He then said something along the line of "I just want to help out humanity" or something similar before the dog lets him continue on. I think they were trying to research a cure or something to fight the alien with at this point.


Links in newsletter preview link to YouTube

The problem: The links at the bottom of the Stack Exchange newsletter link to a YouTube video instead of the right place on the website. I´m not sure if this is an oversight or a clever hack.  Screenshot:


The below bash script was written in ~10 sec, but packaging it would take me hours of skimming through  so I ask my self if there is an easy way out there that I don't know about.  #!/usr/bin/env bash  echo "Hello World"


Can water vaporize without reaching 100 degrees celsius?

I think many of you just let water sit somewhere outside, on a surface it can not be absorbed in. What happened to the water? Did it vaporize? Can water still vaporize if it is not on 100 degrees celsius? If not where did it go? If yes then how come we weren't taught about it at school?


In software engineering we use version control systems. Every time we check in modifications we usually leave a message with a summary of change. The question for me has always been: what is the most appropriate and practical tense and form for these messages? Examples:   Changed the function argument type to int Function argument type changed to int Function argument type is changed to int Function argument type has been changed to int Function argument type is now int   By "practical" I mean, because most messages are in the same form, they should be succinct, to the point, technical/formal. Best candidate in this regard is probably (2). Sometimes it is tempting to use (5) but you end up flooding your message log with "now", which is not nice. (4) is too long although looks (to me) appropriate in many cases. And finally, (1) and (3) feel wrong somehow, although (1) especially is a widely used one in programming, as far as I can tell.  Any thoughts, suggestions?  Edit: some other forms found by some googling:   Change the function argument type to int Changing ... Changes ...


Are my data normal? chi-squared for goodness of fit

I have been tasked with determining if my observed data follow a normal distribution.  With 119 observations (continuous data from -4 to 4), I was able to create a histogram with 25 bins, and upon observation it looks bell-shaped.  I was recommended to do a chi-squared for goodness of fit test to determine if the data is normally distributed, but in the examples I've seen the data is categorical. So, I'm stuck.


Tags not completely hidden when used in spoilers

I think I discovered a .   Tags like  are not completely hidden when used in spoilers. It seems not to be browser-related; I checked Safari and Chrome on Mac, and IE on Windows.  For future reference, this is how it looked like at the moment of posting:


Weird spacing on mobile web Achievement drop-down tab

There is some weird spacing on the mobile web site:    Additionally, the main font color has changed from black to yellow:    Can this be fixed please?


Is the StackExchange forum template available for other websites than their network?

I would like to know if there might be the possibility to use the StackExchange page setup as a template in a website. Is there any licence (with page setup & code) which might be available for purchase?


What are the implications of --no-install-recommends (apt-get install)?

When I install packages using --no-install-recommends, can I say only packages listed  as "depends" are installed?  I ask because I suspect  might be caused by some packages not being installed. Some time back, I also had problems with Wireless Drivers and seemed to be missing something.


Why we cannot computing the integral of P(x) in Bayesian Inference analytically?

Recently, I read slides on Variational Inference. The Bayesian rule is $$         P(\mathbf{z} | \mathbf{x} ; \mathbf{\theta}) = \frac{P(\mathbf{x}|\mathbf{z}; \mathbf{\theta})P(\mathbf{z}; \mathbf{\theta})}{ P(\mathbf{x}; \mathbf{\theta}) } $$ And we can calculate the integral of $P(\mathbf{x}; \mathbf{\theta})$, however, why we can't computing the integral of it analytically? Does it mean find calculating the integral is hard? Or we can find such closed-form formulation to calculate the integral but the computation is not polynomial? Many slides claim that it is hard to compute the integral of $P(x)$ in Bayesian Inference analytically. But few slides explain why.


Parsing a CSV file in PHP using regular expressions

I have a text file (similar to CSV concept) to parse and load into different columns.  I receive it from an external application I can't modify. It uses ";" as field separator but unfortunatly we can have the same char also inside some content.  Here a little sample:  Code;Name;Address;E_mail;Contact name 000001;FUTURAMA SNC;VIA BARBAPAPA, 1;info@gmail.com;matteo futuro; 000006;FERRANTIBUS SRL;VIA TOPOLINO, 1;amministrazione@gmail.com;nicola ferri; 000008;MORMORO SPA;VIA CICCETTI, 30;"cri@mormoro.it; rossi@mormoro.it";panebianco gianpietro;   we use this code to parse the file      $file = fopen("C:\\wamp\\www\\testcsv\\customers.csv","r"); $result =""; $i=0;  while(! feof($file)) {     $result[$i++]=  fgets($file); }  for($j=1;$j<count($result);$j++){     $tempData = preg_split("/[;]/",$result[$j]);     print_r( $tempData ); }   as you can see, in the last line of the sample file, we have ";" char inside email field.... so it is read as another column separator and in the third record the email field is splitted as 2 column, with the result I have an additional column.  Is there any way, using regular expression to skip ; char if it is inside the "" chars?  Thanks in advance for the help


When riding through city traffic, what are the best ways to increase the chance you are seen, given a bit of space, and are not touched by any vehicles?


Ubuntu manual upgrader for 19.04 still showing development version for 19.04

I am attempting to upgrade Ubuntu 18.10 to 19.04 (I am writing this on the release date for 19.04) and my graphical update manager is not finding the release.  (I am set to the main update server)  I used "update-manager -d" and the release that popped up was listed as the development release.


I've been trying forever to find solutions to this problem. When I render, my scene gets grainy under the influence of light and after searching the internet I can't find a proper solution:    I want to know how to get rid of the grainy-ness on the diffuse object under the light, and also the two random white pixels. I'm using Cycles, my sampling is at 4000 and my light bounces are set the limited global illumination.  P.S. Can anyone tell me how my GTX 1070 took 5 minutes to render this (and/or how I can render more efficiently)?


How do I evaluate the integral $\int \frac{1}{x^3 -1}dx$

this is my first question here so I hope I did everything right. Still really new to LaTeX as well$$\int \frac{1}{x^3 -1}dx $$  I first used partial fractions to decompose this integral into two parts$$\int \frac{1}{3(x-1)}dx -\frac{1}{3} \int \frac{x+2}{x^2 + x + 1}dx$$   I definitely can solve the first part as $\frac{\ln(x-1)}{3}$ but I'm stuck with the second part as I don't know what to do since the denominator is not easily factor-able.   Thanks in advance to anybody taking the time to read this.  Edit: I do know that you can complete the square to make the integral prettier, but I don't know how to cancel the numerator or seperate it to relate the integral to $\int \frac{1}{x^2 + 1}$ to get some value of arctan(x) +c


AuraClientService.postProcess: error in processing [RangeError: Maximum call stack size exceeded] - Client Side Action

I have a lightning component that is using ui:inputSelect.   The component code:              <div class="slds-form-element__control">                 <ui:inputSelect class="slds-select" aura:id="quals" change="{!c.getPreCodes}">                     <aura:iteration items="{!v.questions}" var="q">                          <ui:inputSelectOption aura:id="question" text="{!q.Id}" label="{!q.Question_Text__c}"/>                     </aura:iteration>                 </ui:inputSelect>             </div>   The controller:      getPreCodes : function(cmp, event, helper){         var selected = cmp.find("quals").get("v.value");          var action = cmp.get("c.getPreCodes");         action.setParams({             "qualID" : selected         });         action.setCallback(this, function(response){             var state = response.getState();             if (state === "SUCCESS") {                  console.log('precodes: ', response.getReturnValue());              }         });          $A.enqueueAction(action);     }   The basic logic is that the uiSelect is dynamically populated on init (this works fine). When a user makes a selection the "change" parameter function is fired to retrieve a list from the database and pass it to another component.   However, the change function {!c.getPreCodes} seems to be called recursively causing a      "Something has gone wrong. AuraClientService.postProcess: error in   processing [RangeError: Maximum call stack size exceeded] . Please try   again."   error. If I comment out the enqueueAction the function only runs once (nothing is called recursively) so I suspect it has something to do with the controller call.


My material is showing up correctly in the preview window, but not in rendered mode

I am trying to get this wall to look like this material (screenshot taken from the preview window in the material editor):    But, it just shows up like this (the gray area is the part that has the material applied to it):    This what the nodes look like:   Why does the correct material show up in the preview window, but not in the rendered version?


Is it possible to revert preapplied alpha blend and find original color?

I have a color 0xADADAD, it was originally white, now it's grey, because it's been alpha blended with 30%(0.3 alpha) black + the unknown original value. In this case I know from lots of trial and error that the original color was 0xF8F8F8  Problem is I have over 20 other colors that need to be fixed like this, but I have no accurate way of finding the original colors. Is there a formula I can do to figure this out? Is it even possible?


Where should I post about a Raspberry Pi server?

I have a question about how much space I need for a server on Raspberry Pi.      For example, I just bought a Raspberry Pi for running a server. I now need a SD card, but I don't know how much space to commit to at first. I might need it for the OS, and software for running the server. How much storage should I buy right now."   Should I post it on the Server Fault Stack Exchange, the Hardware Recommendations beta or the Raspberry Pi Stack Exchange?


How do I prove the following: $f(S\cup T) = f(S) \cup f(T)$

I have a question.   How do I prove the following identity? $$  f(S\cup T) = f(S) \cup f(T) $$


What is the meaning of the kviews unit used on Stack Overflow??


Why use Microsoft account login as an adult in the family?

We have a family computer running Windows 10. My kids use their Microsoft accounts to log in, so that I can use parental controls. I have a Microsoft account too, but is there any reason for me to log in with my Microsoft account instead of using a local account? I can use all the parental controls through a browser regardless of how I'm logged into Windows.  Or to put it another way, will the parental controls work the same if I log in using a local account, as long as the kids log in with their Microsoft accounts?


How can I get back a system file after deleting it from my Mac?

I've deleted a system file from my Mac and need to get it back.  System files can include:   hidden files in the root of / - especially unix files in /private  /System files /Library files /Applications files that ship with the core OS   System files are not any app, user files or files that can be regenerated by a known sequence such as cache files, Spotlight index files, etc…    Canonical question and answer for .


I made a browser app, and have gotten some positive feedback, and someone asked if I could put buttons on it.   It is located here:   Background: You use the right and left arrow keys to control the snake.  However, there are no arrow keys on mobile, I would like to add buttons to the game.  I was wondering where they would go best.


Convert utf8-characters to iso-88591 and back in PHP

Some of my script are using different encoding, and when I try to combine them, this has becom an issue.  But I can't change the encoding they use, instead I want to change the encodig of the result from script A, and use it as parameter in script B.   So: is there any simple way to change a string from UTF-8 to ISO-88591 in PHP? I have looked at utf_encode and _decode, but they doesn't do what i want. Why doesn't there exsist any "utf2iso()"-function, or similar?  I don't think I have characters that can't be written in ISO-format, so that shouldn't be an huge issue.


I know this is kinda stupid thing but I had some issues in my mysql database, I fixed them but when I had to delete some folders I executed a command to delete this folder /etc/mysql I have a lot of important databases which disallows me to reinstall MySQL. Is there anything like any command that allows me to recover these files? Everything was in default format so I don't really care about like the old format. If so please reply to this topic with answer or even send me a .zip file contains all files with default format for the latest MySQL version (5.7).  Thanks. I use ubuntu 16.04 by the way.   EDIT: after processing what is showing here as someone linked this topic in comments  So now I have an issue with MySQL itself.   Here's the Error message:  Job for mysql.service failed because the control process exited with error code. See "systemctl status mysql.service" and "journalctl -xe" for details. invoke-rc.d: initscript mysql, action "start" failed. ● mysql.service - MySQL Community Server    Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled)    Active: activating (auto-restart) (Result: exit-code) since Sat 2019-12-21 16:59:38 EST; 5ms ago   Process: 3942 ExecStartPost=/usr/share/mysql/mysql-systemd-start post (code=exited, status=0/SUCCESS)   Process: 3941 ExecStart=/usr/sbin/mysqld (code=exited, status=2)   Process: 3933 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS)  Main PID: 3941 (code=exited, status=2)  Dec 21 16:59:38 ns529730 systemd[1]: Failed to start MySQL Community Server. Dec 21 16:59:38 ns529730 systemd[1]: mysql.service: Unit entered failed state. Dec 21 16:59:38 ns529730 systemd[1]: mysql.service: Failed with result 'exit-code'. dpkg: error processing package mysql-server-5.7 (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  mysql-server-5.7 E: Sub-process /usr/bin/dpkg returned an error code (1)


I am looking to only apply certain rules if domain is *.example.com. How can I do this?  ##start if domain is *.example.com##  RewriteEngine On RewriteCond %{HTTPS} !=on RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]  RewriteCond %{HTTP_HOST} ^demo RewriteRule ^robots\.txt$ robots_allow.txt  ##end if domain is *.example.com  <IfModule mod_deflate.c>     <filesMatch "\.(js|css|html|php)$">         SetOutputFilter DEFLATE     </filesMatch> </IfModule>


Does C# regex support embedding regex options directly inside the regex itself?

Some regular expression engines support embedding regex options directly inside the regex itself. Like (?i)is, which matches the string is ignoring cases. Does C# support this feature? I skimmed over the documentation at , but didn't find anything.


MySQL - Autoincrement does not increment sequentally if last row was deleted

I have a table which contains an auto incremented primary key id. If I delete the last row (highest id, for exampe id = 6) and insert a new row, the new id starts at 7. Which paramater I have to change that the primary key starts at 6?  CREATE TABLE animals (  id MEDIUMINT NOT NULL AUTO_INCREMENT,  name CHAR(30) NOT NULL,  PRIMARY KEY (id) ) ENGINE=MyISAM;  INSERT INTO animals (name) VALUES ('dog'),('cat'),('penguin'), ('lax'),('whale'),('ostrich');   Result: id  name 1   dog 2   cat 3   penguin 4   lax 5   whale 6   ostrich    DELETE FROM animals WHERE id = 6; INSERT INTO animals (name) VALUES ('x');   Result: id  name 1   dog 2   cat 3   penguin 4   lax 5   whale 7   x    Thanks for advice.


Help with South African 90 Day Visitor visa

I am a brit visiting family and friends in South Africa with my duel brit/south african GF, I have already been granted a 90 day Visitor visa which expires the end of July, unfortunately i haven't been able to do the rest of my itinerary yet and am wanting to leave South Africa and return until October (which is when the return flight to England is booked) I have read lots of conflicting information about going on holiday to Botswana or similar surrounding countries for a few weeks or having to return home to then come back again to obtain the new 90 day visa. I have also called the Embassy who informed me that you have to leave 90 days between each 90 day visa is granted which is crazy surely? She also wasn't really listening and never asked me my country of origin. Any help would  be appreciated as I am eager to return for another adventure with my GF. I do not intend on overstaying as we both live in England etc and have just taken a year travelling break both visiting Australia and now visiting South Africa. Thanks


Debian's corresponding command for add-apt-repository?

I want to run this in Debian 8.1  sudo add-apt-repository -y ppa:nemh/systemback sudo apt-get update sudo apt-get install systemback   but I cannot find add-apt-repository in Debian 8.1 and its apt-file search/apt-cache search.   Is Debian's way of changing the source just editing the file /etc/apt/sources.list?


Multiple proofs of $\sum_{d|n}{\phi(d)}=n$

I am looking for multiple proofs of that statement: here $\phi(n)$ denotes the Euler’s totient  $$\sum_{d|n}{\phi(d)}=n$$   Here’s one:   By unique factorisation theorem: $n=\prod_{k=1}^{m}{p_k^{\alpha_k}}$ and $d=\prod_{k=1}^{m}{p_k^{\beta_k}}$ where $0\leq \beta_k\leq \alpha_k$ so:   \begin{align} \sum_{d|n}{\phi(d)}&=\sum_{0\leq \beta_k\leq \alpha_k}{\phi\left(\prod_{k=1}^{m}{p_k^{\beta_k}}\right)}\\ &= \sum_{0\leq \beta_k\leq \alpha_k}{\prod_{k=1}^{m}\phi({p_k^{\beta_k})}}\\ &=\sum_{0\leq \beta_k\leq \alpha_k}{\prod_{k=1}^{m}{(p_k^{\beta_k}-p_k^{\beta_k-1}})}\\ &=\prod_{k=1}^{m}{\sum_{0\leq \beta_k\leq \alpha_k}{(p_k^{\beta_k}-p_k^{\beta_k-1}}})\\ &= \prod_{k=1}^{m}{p_k^{\alpha_k}}\\ &=n. \end{align}


What is the fastest way in terminal to get a count of files when there is so many of them?

$ ls -l JSON_files/*.json | wc -l bash: /usr/bin/ls: Argument list too long 0   How can I get the count of files in a folder if I have 300k or 1M or more JSON files in a directory?


what's an elegant way to show that $x(1-x) \leq \frac14$?

for $x \in \mathbb{R}$, consider $f(x) = x(1-x)$, using traditional methods of finding global extremas, we can show that the derivative has a unique zero at $x= \frac12$ and $f''(\frac12) < 0$, thus $x(1-x) \leq \frac14 = f(\frac12)$  is there a more elegant way ?


I have a function of the following form:  $J = \|W^TW-I\|_F^2$   Where, $W$ is a matrix and $F$ is the Frobenius Norm.  How can I find the derivative of $\frac{\partial J}{\partial W}$ ?


What is the opposite of "preaching to the choir"?

I have found "Whistling into the wind" online but I do not think it fits because it seems to mean that your words are not heard, whereas the opposite should mean that you're being informed by someone of a 'fact' with which you strongly disagree.  I generally respond, "you're preaching to the choir", when somebody 'vents' to me about something that I too take some issue with, which may be an evolution of the idiom used when you tell someone something they already know, rather than something they agree with.


I'm a noob when it comes to using particle systems to create grass, so I've been trying to improve those skills. However, on my latest test render...something rather strange has appeared. Or rather, two of the very same strange somethings...    As you no doubt see, there are two-ish black and whitish-yellow squares of speckledinest that have randomly appeared on the render. I have not the least idea of from whence they came, as they do not even match the tile size that I used. I am using 128 samples and  a denoiser. The grass is using the Principled BSDF node.  Could somebody please give an explanation of where these came from?


If I were to buy something a day before my due date for my credit card bill, would I be charged interest?

First of all, I am a resident of Canada.  I am  new to credit cards, so I hope my question makes sense. I've had my card for a few months ago and I've always paid the balance in full by the time the due date rolls around. Just out of curiosity, say the day after tomorrow was my due date. If I made a purchase tomorrow and didn't pay it off by the day after tomorrow, would I be charged any interest on it? Is there any negative ramifications at all for doing this?  Thanks.


Why aren't there moderator elections on Meta.SE?

Why aren't there moderator elections here on Meta.SE? It seems to be moderated only by employees. I know that there aren't elections because  it shows no election history. Is there a reason for this? Should there be elections here?


How portable are /dev/stdin, /dev/stdout and /dev/stderr?

Occasionally I need to specify a "path-equivalent" of one of the standard IO streams (stdin, stdout, stderr).  Since 99% of the time I work with Linux, I just prepend /dev/ to get /dev/stdin, etc., and this "seems to do the right thing".  But, for one thing, I've always been uneasy about such a rationale (because, of course, "it seems to work" until it doesn't).  Furthermore, I have no good sense for how portable this maneuver is.  So I have a few questions:   In the context of Linux, is it safe (yes/no) to equate stdin, stdout, and stderr with /dev/stdin, /dev/stdout, and /dev/stderr? More generally, is this equivalence "adequately portable"?   I could not find any POSIX references.


The elusive difference between force and impulse

is defined as the product of a force $F$ acting for a (short) time $t$, $J = F*t$, and that is very clear. What I find difficult to understand is how a force can exist that doesn't act for a time.  If we consider the most common and observable force: gravity, the force of gravity is defined as $m*g$ and for a body of 1 Kg of mass is equivalent to $\approx$ 10 N.  But whenever we consider gravity we must consider the time, if a book falls from the table to the ground (h = .8m) the force acts for a (short) time t = 0.4 sec.   Is there/can there be a force that doesn't act for a time? Can you explain why do not refer to the fall of the book as the impulse of gravity?  Why if the same (short) time happens in a collision we call it an impulse? Isn't always a force actually an impulse?   update:     I'm not sure it's helpful to think about the gravitational force,   because I can't see a similar physical system where we can imagine the   gravitational force deliverting a non-zero impulse in zero time. - John Rennie   If I got it right, you are saying that we must consider it impulse when $t=0$?, else it is force.    But, also when the book falls to the ground because of gravity there is a change of momentum, why is that not impulse? That is the elusive difference, for me.    is not defined over a billion years, but:     a force is any interaction which tends to change the motion of an   object.[1] In other words, a force can cause an object with mass to   change its velocity (which includes to begin moving from a state of   rest), i.e., to accelerate. Force can also be described by intuitive   concepts such as a push or a pull.   therefore also in a collision there is a push on a ball, exactly the same as here: there is a push on the book that tends to change its motion. What is the difference?


Java - Ordering of numbers in an array and keep that order for an array of strings

Java Question: I have an array of doubles and an array of strings each 26 in length. I would like the array of doubles (lets call it weights) to when going through the Arrays.sort() function, the strings get sorted in the same manner. Example: Before: Name: Bob | Weight: 3.6 Name: Steve | Weight: 11.0 Name: Thomas | Weight: 2.2     After: Name: Thomas | Weight: 2.2 Name: Bob | Weight: 3.6 Name: Steve | Weight: 11.0             I have thought about this for some time but I have no Idea how I would go about doing this.


How can I recover from accidental chown -R

I am an Ubuntu newbie, and I accidentally typed chown www-data:www-data * -R. After a while, I tried to restart, but my computer couldn't even start, saying:   # Your screen, graphics cards, and input device settings could not be detected correctly.  # You will need to configure these yourself.    the command I executed is like this:  cd /home sudo chown www-data:www-data * -R   sudo usermod -a -G www-data username   Is there any way I can get out of this mess? Thank you


What kind of prep and considerations for using a night photo in print work?

One thing I still struggle with is using night photos in advertisements. I tend to avoid it but sometimes its necessary or requested.  I find it difficult on glossy and even worse on a newsprint to work with any sort of night photo.  What kind of prep and/or adjustments can be taken to a night shot to make sure it doesn't come out looking too dark, flat, hard to see, kinda lost on the paper.  Say something like this using a photo from Unsplash for a quick example, no affiliation at all with Milwaukee.    Or again with a photo from Unsplash:    When actually printing these can quickly look overly dark and muddy.


Connect to Passwordless Administrator account through RDP

There is one account on my PC, "Administrator", without a password.   When I try to connect to it via RDP it says "Unable to log you on because of an account restriction".  I think that is because the account doesn't have a password.   I don't need password for my account. Can I somehow get around this limitation?


Describe explicitly all inner products on $\mathbb{R}$ and $\mathbb{C}$

I know this is an elementary question, however I am really lost as to where to start.  Since both $\mathbb{R}$ and $\mathbb{C}$ are finite-dimensional I think the inner product will be completely determined by the basis $\{1\}$.   I am not sure where to go from here.


How can I texture my object so that it has two different colors?

So I have looked at other questions and they do not answer my own so I now resort to typing here. My problem is visually simple, the texture does not show when plastered onto the UV image. The reason this is a real problem is that the object needs two different colors otherwise I'd be fine. If there is a way I can divide the object into two I would love to hear about it. Thanks in advance for any help that you provide!   I removed the image from the nodes here^


Power supply adapter for Arduino Pro Mini

First of, i'm not from electronics background, i'm sorry if my question sounds stupid or irrelevant. I recently started a project as a hobby with a help of  i have purchased all the components and has built the circuit half way but i'm stuck at what kind of power adapter should i use i currently own a mobile adapter with output of 5V 350mA. But the Absolute ration of Arduino Pro Mini is 200mA as per   Is it possible to use a 5V 350mA DC input to my chip ? Or would it burn off my chip? if so what kind of adapter or a current regulator should i use ? A current regulator circuit would be much appreciated.


Not enough space for post score when using a custom font

Votes count is split into two strings.    Link for question:   List of defaultly installed fonts in my phone:   The bug does not affect 2 of 6 fonts (independently of font size):    NewSmartGothic Coffee      App Version: 1.0.85 Device Manufacturer: LGE Device Model: LG-D802 OS Version: 5.0.2 (152331922a212)


In phone number validation 9,10,14 digit numbers should be valid,if number start with + then any digit number should be valid

In my phone number validation i need to validate only 9,10,14 digit numbers and 11,12,13 numbers are not valid,if phone number start with + then any digit number should be valid.Any  preg_match code available? please help. :(


Why does Linux show both more and less memory than I physically have installed?

I know about swap - this question isn't about that. In dmesg, the Linux (x86-64) kernel tells me this about how much memory I have:  [    0.000000] Memory: 3890880k/4915200k available (6073k kernel code, 861160k absent, 163160k reserved, 5015k data, 1596k init)   cat /proc/meminfo tells me that I have  MemTotal:        3910472 kB   And by my calculations, I think I should have exactly 4*1024*1024=4194304k RAM. Which is way smaller than the second figure in the dmesg line above!  What's with all these different figures?  By the way, uname -a outputs:  Linux pavilion 3.2.2-1.fc16.x86_64 #1 SMP Thu Jan 26 03:21:58 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux


Taj Mahal is made of Granite.   Vs      Taj Mahal was made of Granite.   Which one's more correct?   Similarly,      This film was shot using the Nikon D700.   Vs     The film is shot using the Nikon D700.   As far as I know, we use past simple for something that happened at a specific point in the past which may/may not have significance in the present. But we use simple present to talk about facts or truth. For example:     Bread is made of flour.   So which one of the above expressions are correct in both cases?


Problem with installing Nvidia driver 319

I have Ubuntu ver. 12.04 and Nvidia ver. 304. After i updated my driver to 319 which is recommended in Additional Driver, I got stuck in the booting screen with something like: AppArmor etc. (black screen with yellow code) so i had to reinstall my OS.   Please could you help me how to install it correctly without error, because I am new with Linux.  Thank you very much!


I'm completely new to Bash, and I'm trying to make a simple script to automate Git pulling and pushing from a repo, but I can't get it to work.  Here is a pastebin of the code:   #!/bin/bash #Git Puller / Pusher for MobArenaBattles  echo "Please type whether you want to pull or push:"  read proc cd $HOME/Desktop/IdeaProjects/Plugins/MobArenaBattles  if ["$proc"="push"]; then   echo "Please type the commit message:"   read message   git status   git add -A   git commit -m $message   git push elif ["$proc"="pull"]; then   git status   git pull else   echo "Invalid choice! Exiting." fi   The error I get is:  ./MAB Git.sh: line 9: [push=push]: command not found ./MAB Git.sh: line 16: [push=pull]: command not found   I have tried using == and -eq but it comes up with the same error. Sorry if I'm being stupid, it's my first attempt.  Thanks in advance.


Can you curve 1 edge without adding more edges to it?

I've scoured the internet for how to make a simple, single curve from 1 edge, but apparently that is some monumental task in Blender lol  Here's a picture of what I'm working on:   I'm just trying to curve the selected edge to make it match the green curve to its left  I use Blender pretty much exclusively to rig clothes to 3D models, so about anything outside of that is foreign to me, but I'm trying to slowly venture out to learn more so I can use less other programs  Anyway, is there any way to curve this lone 2D edge without having to add more edges? Everything I saw online mentioned beveling, which as far as I could discern, involved me making and selecting more edges to curve, which won't work, need the number of faces to stay the same and for it all to stay in 2D in this step  Sorry if this is a dumb question, but I seriously cannot find anything that tells me a way to curve a 2D edge, which is driving me insane. I know there has to be some way to do it, even if it's not simple for whatever reason  Thanks


Is temperature of a single molecule defined?

Is  of a single molecule defined?  This question just cropped up in my mind as I have often heard of laws being violated when it comes to the scale of a single molecule. Does this happen in case of temperature too?


GnuCash/Finance::Quote not working for Vanguard funds

I have money in some Vanguard funds (VTSAX and VTTSX), and track my money locally in GnuCash. Some time ago, I had it set up to automatically update the prices of these funds (Price Editor → Get Quotes). The last time this definitely worked was March of 2017. More recent attempts to autofetch prices have resulted in "There was an unknown error while retrieving the price quotes". I've finally gotten fed up with manual input and want to get the automatics working again. I already found  saying that the Yahoo Finance API is gone, but these securities are set up with the single quote source "Vanguard", not any of the Yahoo sources. Would the fix be the same as for the Yahoo issue, or is this unrelated?


What are the different distinct groups of spicy

I remember being told once long ago that there are 7 different types of spicy:  -Capsaicin (chilli) -Horseradish (Wasabi) -Ginger -Mustard -Cinnamon -Garlic -Cloves    These make a bit of intuitive sense to me (from a taste perspective), though I can't find much to back this up.     breaks them up into the following 8 botanical groups:      -Fruits, such as Cayenne pepper   -Roots and rhizomes, such as turmeric, ginger and galingale   -Seeds, such as fennel, mustard, nutmeg, and black pepper   -Barks, such as cinnamon and cassia   -Flower buds, such as cloves   -Stigmas, such as saffron   -Arils, such as mace (part of nutmeg plant fruit)   -Resins, such as asafoetida      mentions different chemicals for different types of spicy and their effects on hotness (such as capsaicin, gingerol (ginger) and allyl isothiocyanate (wasabi)), but its not very complete.    My Question:     What are the distinct chemically related spice groups? How would you describe each group in terms of flavour?


I've created a sequence in my Oracle database. It will increment by 1 every time when i started my application and inserted in the table. The table look like this:  create table COUNTERS_DELEGATION (   counter_id     NUMBER not null,   counter_number LONG not null,   current_date   NUMBER not null )   In the field current_date i will insert the current year.   My question is: When the year increment for example from 2016 to 2017 i want to start my sequence again from initial value 1. Is this possible?


Control your smartphone using your laptop please answer!

I have a sony xperia zr and the lower screen recently smashed. Touch screen capability has also gone. Does anyone know of an app or a method for connecting it to my laptop and gaining full control of the phone through the laptop?  PS: I reformat my phone!


How to count number of characters in a string

I am trying to count the amount of 'x' characters that are in a string, and print out the number. I end up just counting the number of characters in the string instead. Here is what I have tried:  int count = 0;  for (int j = 0; j < input1.length(); j++) {   char character = input1.charAt(j);   count++; }  if (indexX != -1)   {      System.out.println("x count: "+count);   } // indexX = input1.indexOf('x');


How to remap Super + w to a different keyboard shortcut?

How can I remap the Super+w shortcut, which spreads all the windows, to one of the function keys?


Recently installed OS from Windows regretting please help

**I  watch movies from www.usadisk.com daily religously it is Korean language. They require that I install their ActiveXSetup.exe and don't have an .exe for UNIX on the site for this:" DOS/Windows executable (application/x-ms-dos-executable)" Please help I am regretting installing this O/S Ubuntu it will not allow me to access these videos on the site stated above where I am a monthly member. I would appreciate a rapid response from Ubuntu community. I decided to trust in your word tat you are the best OS in the world.**strong text****


I am using the aps journal template and appendices are added by using  \appendix \section{bla bla}   So the result I get is:  "Appendix A: bla bla"  However I would like to know how to change the "Appendix A" for "App A" for example.  Thanks


Why is particle physics called high energy physics?

The highest energy accelerator till date is the LHC which operates at an energy scale of perhaps 10-100 TeV. In SI units this is about $\sim 10^{-6}-10^{-5}$ Joule which is several orders of magnitude smaller than the energy scales we are used to in daily life. For example, the work done and heat produced by thermodynamic engines are hundreds of Joules.  Why is then particle physics regarded as the 'high energy physics'? 'High' with respect to what? I feel this has something to do with very small masses of the elementary particles. Incidentally, why is it difficult to reach energies as high as hundreds of Joules for elementary particles?


Uniformly convergence on the convergent circle for complex power series!

The power series $f(z)=\sum_{n=0}^{\infty}a_nz^n$ has convergent radius $r>0$, so $f(z)$ is analytic in $|z|<r$. MOREOVER, we suppose $f(z)=\sum_{n=0}^{\infty}a_nz^n$ is continuous on the closed disk $|z|\leq r$. My question is that: Does the series $\sum_{n=0}^{\infty}a_nz^n$ converge uniformly on the closed disk $|z|\leq r$? In my opinion, I can give a example such as: the series  $$f(z)=\sum_{n=1}^{\infty}\frac{z^n}{n^2}$$ has radius $r=1$ and converges uniformly on the closed unit disk $|z|\leq1$. I do not know whether my question is right or wrong. Any hints will welcome!


How to create an index map of atlas features in QGIS 3?

I realise that this question has been asked before (), however I am still unable to figure out how to create an index map of atlas features in the QGIS map composer.  Basically, I have a line and I have five atlas maps showing the extent of the line, and to show where which map corresponds to the line a I need five overviews on a map with numbers on them, which will look similar to below:    I've created five overviews, but as all of these must be set to correspond to the main map frame, all of them show the overview for which ever atlas feature is selected at the time, rather than appearing as separate index tiles.  Can anyone tell me where I am going wrong?


#include <stdio.h> #define IsLowerCase(c) (((c)>='a') && ((c)<='z')) #define ToUpperCase(s) (IsLowerCase(s)? (s)-'a' + 'A': (s))  int main(void){      char *string = "abcdefghijklmnopqrstuvwxyz";      while(*string != '\0'){         *string = ToUpperCase(*string);         ++string;     }  }   warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]


How to check that web page is loaded 100 percent?

Is there any way to check that, web page is loaded 100 percent in javascript?   100 percent means all the images,files,scripts,styles everything that a web page contains.


Android: Null Exception error for retrieving value from snapshop to textview

I am creating a feedback app where the user rates a service from 1-5 and I display the average of all the user's ratings (till date) on the next page. The average rating is coming out to be fine but I am not able to fetch the total number of users from snapshot that have rated on the app till now. Here is the code - public class Score extends AppCompatActivity {      TextView avgScore;     TextView totalUsers;     double userCount;     DatabaseReference dbRef;       @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         requestWindowFeature(Window.FEATURE_NO_TITLE); //will hide the title         getSupportActionBar().hide(); // hide the title bar         this.getWindow().setFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN,                 WindowManager.LayoutParams.FLAG_FULLSCREEN); //enable full screen         setContentView(R.layout.score);         avgScore = findViewById(R.id.textView2);         dbRef = FirebaseDatabase.getInstance().getReference().child("Users");         scoreRealTime();     }      public void scoreRealTime() {         dbRef.addValueEventListener(new ValueEventListener() {             @Override             public void onDataChange(@NonNull DataSnapshot snapshot) {                 double total = 0;                 for (DataSnapshot ds : snapshot.getChildren()){                     UserHelper helper = ds.getValue(UserHelper.class);                     double values = Double.parseDouble(String.valueOf(helper.rating)); //                  double values = Double.parseDouble(ds.child("rating").getValue().toString());                     total = total + values;                     userCount = snapshot.getChildrenCount();                 }                 double average = (double) total / snapshot.getChildrenCount();                 avgScore.setText(String.format("%.2f", average));                 //System.out.println(userCount);                 totalUsers.setText((int) userCount); //error occurs here             }              @Override             public void onCancelled(@NonNull DatabaseError error) {             }         });     } }  This is the error log - E/AndroidRuntime: FATAL EXCEPTION: main     Process: com.example.feedback, PID: 26338     java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(int)' on a null object reference         at com.example.feedback.Score$1.onDataChange(Score.java:60)         at com.google.firebase.database.core.ValueEventRegistration.fireEvent(ValueEventRegistration.java:75)         at com.google.firebase.database.core.view.DataEvent.fire(DataEvent.java:63)         at com.google.firebase.database.core.view.EventRaiser$1.run(EventRaiser.java:55)         at android.os.Handler.handleCallback(Handler.java:883)         at android.os.Handler.dispatchMessage(Handler.java:100)         at android.os.Looper.loop(Looper.java:214)         at android.app.ActivityThread.main(ActivityThread.java:7356)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:492)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:930)  EDIT: Also, it would be really great if you could explain why the NullPointerException is occurring here or occurs in general. Thanks.


Is there an analog to the Runge-Lenz vector for a 3D spherically symmetric harmonic potential?

The Runge-Lenz vector is an "extra" conserved quantity for Keplerian $\frac{1}{r}$ potentials, which is in addition to the usual energy and angular momentum conservation present in all central force potentials.    I suppose it is not a coincidence that $\frac{1}{r}$ potentials have this extra conserved quantity and are also one of the two central force potentials that have closed orbits.  Indeed, one may think of the RL vector as an expression for the orientation and eccentricity of the elliptical orbit, which is conserved iff the orbit closes on itself.    This then leads me to think that there must be an analog to the RL vector in an $r^2$ potential, which is the other central force potnetial that has closed orbits.  Surely, we can define a vector pointing along the direction of the orbit's major axis, that has magnitude proprtional to the eccentricity, and this will be conserved.  Is there any way to write down such a vector in terms of dynamical variables, and thus obtain an $r^2$ analog for the RL vector?


How should i invoke an instance which implements abstract method

I have an abstract class and a class which extends it and implements the methods without adding further methods of its own.  Let's call the classes A and B. B extends A. should i create an instance of class B like this  A newInstance = new B();   or like this  B newInstance = new B();   Does it make any difference and which is a better practice ?


Is it possible to tell pdflatex to terminate after the first error?

In case of a syntax error, pdflatex usually (in \errorstopmode) gets interactive and asks you what to do. I know I can press:   X to terminate S to enter \scrollmode (continue processing without stopping if further syntax errors arise, but stop for other errors) R to enter \nonstopmode (continue processing without stopping if further errors arise) Q to enter \batchmode (continue processing without stopping if further errors arise and suppress further output to the terminal)   Apparently, only the latter three (SRQ) can be provided implicitly by the respecive \...mode commands or the -interaction=...mode command line option. However, what I need is a mode that mimics the implicit pressing of X, that is, to make the pdflatex process terminate after the first error.


Java - Passing arguments to the Main method

I'm just a beginner to write programs in Java. How to pass the arguments (Array of strings) to the main method? I'm using Eclipse as an IDE  public static void main(String[] args) {     // TODO Auto-generated method stub     if (args[0].equals("-h"))         System.out.print("Hello,");     else if (args[0].equals("-g"))         System.out.print("Goodbye,");      // print the other command-line arguments     for (int i = 1; i < args.length; i++)         System.out.print(" " + args[i]);      System.out.println("!"); }


I have ubuntu 12.10 and I can't play dvd movies. I tried every kmplayer vlc gnomeVLC could not read the file (Input/output error).  File reading failed: VLC could not read the file (Input/output error). File reading failed: VLC could not read the file (Input/output error). Your input can't be opened: VLC is unable to open the MRL 'dvd:///media/ahsidddiqui/Ubuntu%20OEM%2012.10%20amd64%20UALinux/'. Check the log for details. Your input can't be opened: VLC is unable to open the MRL 'dvd:///media/ahsidddiqui/Ubuntu%20OEM%2012.10%20amd64%20UALinux/'. Check the log for details.


Is it possible to query 2 databases that are on 2 servers? So I'd have 2 connections like this:  $con1 = mysqli_connect("192.168.0.1","my_user","my_password","db1"); $con2 = mysqli_connect("123.456.7.8","my_user","my_password","db2");   But I'm then not sure how the query would work, because I normally use the connection to query the database:  $con1->query("SELECT...");   Is it possible to connect to 2 databases in the same connection?


I'm running the daily Ubuntu image (Yakkety Yak) and I would like to build my own Ubuntu image (alternate right now but instructions for a live image also help) while adding a few PPAs. There are several guides on the Ubuntu Community Help wiki, but they all seem to be outdated. I've also attempted to read Ubuntu's and Debian's code for doing this, but I'm not seeing exactly how they are used.  How do I do this without installing the ancient Trusty Tahr?


Android Studio: attempt to invoke virtual method 'void android.widget.button.setonclicklistener

I have the following code and whenever I start to run it, it will display the message Unfortunately  has stopped. It used to run before but now it is not. I have no errors in my program. Any idea what the problem might is pls? Below is my code:  Code in Main Activity:when button is clicked the message shows up unfortunately etc..  public class ContactsMain extends AppCompatActivity {  public static final int REQUEST_CODE_AddContact=1;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_contacts_main);      Button b = (Button) findViewById(R.id.addContact);     b.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View a) {              Intent i = new Intent(a.getContext(), AddContact.class);              startActivityForResult(i, REQUEST_CODE_AddContact);         }     }); }   }  Activity AddContact code:  package com.example.maria.maria_caruana_1bsc5;   public class AddContact extends AppCompatActivity {      public static final int REQUEST_CODE_ContactsMain=3;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.content_add_contact);          Button b1 = (Button) findViewById(R.id.btnGoBack);         b1.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View d) {                  Intent i = new Intent(d.getContext(), ContactsMain.class);                  startActivityForResult(i, REQUEST_CODE_ContactsMain);             }         });      } }


If minimal degree is at least $k$, then the graph contians a path of length at least $k$

$G$ is a simple graph that consists of a vertex set $V(G) = \{v_1, v_2, ..., v_n\}$ and an edge set $E(G) = \{e_1, e_2, ..., e_m\}$ where each edge is an ordered pair of vertices. The edge $\{u,v\}$ is denoted $uv$.  A walk of length $k$ is a sequence $v_0,e_1,v_1,e_2,...,e_k,v_k$ of vertices and edges such that $e_i=v_{i-1}v_i$ for all $i$. A path is a walk with no repeated vertex.    Prove:  If $G$ is a finite simple graph in which every vertex has degree at least $k$, then $G$ contains a path of length at least $k$.  I believe this has something to do with the longest path but I can't come up with a reasoning/proof that is of length of at least $k$.


Evaluating $\lim_{n \to \infty} \sum_{k=1}^n \frac{1}{ n + k}$

I'm having some trouble evaluating the following limit: $$\lim_{n \to \infty} \sum_{k=1}^n \frac{1}{ n + k}$$ I think that I'm supposed to transform this into an integral using Riemann Sums. How should I proceed? Because I can't see anything that resembles a Riemann sum.


My computer sometimes runs at 100% CPU and gets real slow. When I start task manager to see which process is causing it, there is a process named "1347142115.exe" and it uses 99% of the CPU. When I end it, CPU usage goes back to normal. I don't know which application causes this process so I can't uninstall it. Is this a virus? How do I get rid of it? Is a format necessary?


I'm modelling a courtroom for an assignment, and I'm happy with it so far, although I feel like adding textures to finish it off. The problem is - I have no idea how to texture the thing. I have alot of things, tables, chairs, walls, etc.  The issue is that when I apply the material to something (like a table), it ends up appearing all over the room, on everything. How can I give a table a wood texture, chairs a different one, walls a different one, one for carpet, etc?


Proof that $\mathrm{ker}(f^*) = \mathrm{im}(f)^{\perp} $

Where $ f: V \rightarrow V  $ is a linear operator on an inner product space $V$, I'm trying to show that $$ \mathrm{ker}(f^*) = \mathrm{im}(f)^{\perp} $$  i.e. the Kernel of the adjoint is equal to the orthogonal complement of the image of f.  I taking the inner product of $f(v)$, where $v \in V$  and an arbitary element of the kernel, $k \in \mathrm{ker}(f^*) $  $$\langle f(v), k\rangle = \langle v, f^*(k)\rangle = \langle v, 0\rangle = 0$$  And then taking the inner product of $f(v)$ with $w$, where $w \in  \mathrm{im}(f)^{\perp}$  By definition  of the orthogonal complement to the image of f,   $$ \langle f(v), w\rangle = 0 $$  My question is, now that we have   $$ \langle f(v), k\rangle = \langle f(v), w\rangle = 0 $$  What can we conclude? I would like to conclude that because $w$ and $k$ are arbitary elements of their respective subspaces, that these must be equal, i.e. $ \mathrm{ker}(f^*) = \mathrm{im}(f)^{\perp} $  However, I am not sure this is mathematically sound, is that conclusion valid or are there any technical barriers or additional statements that would have to be made to make that watertight?


Formation of ammonia from air and moisture

On extended bicycle trips I sometimes slept under a plastic sheet, which helped with mosquitoes on hot nights. But there was a noticeable build-up of ammonia which made this almost impossible for more than an hour or so at a time.   Air is mostly nitrogen $(N_2)$ and there is always water (containing hydrogen) on a humid day. But I wonder about the mechanism for the formation of ammonia under these circumstances? There are (according to Wiki) trace amounts of methane and $H_2$ in the air. But methane and hydrogen (g) are I think pretty stable.   I wonder if the presence of exhaled air (containing $CO_2)$ could be a factor?  Thanks for any ideas.


Wrong Meta Description is showing at Google SERP

I am facing a problem with Meta Description. I have given a Meta Description but Google index & showing another page's Meta Description at SERP for my example.com main domain. Meta Title is right.  I also request to Google for re-index through Fetch as Google also but for some days no changes showed.   At this time is there any perfect solution. or Will I update again Meta Tags?


Estimate parameters from truncated normal sample

I have a question like this, $X \sim N(\mu,\sigma^2)$ with unknown parameters. Now, a sample of size $m$ generated from X, but filter by X < T, i.e., any number larger than T will be ignored and continue until we have $m$ samples.   How to estimate $\mu$ and $\sigma$?   I suppose we could use E-M algorithm? Since this is similar to the case of missing data.   This is what I've come up so far:   $L(\mu,\sigma^2;x_1,..,x_m,x_{m+1},..x_n) = \prod_i^m f(x_i) \prod_{m+1}^n (1-\Phi(T))$ $Log L(\mu,\sigma^2;x_1,..x_m,x_{m+1},..x_n) = \sum_i^m log(f(x_i)) + \sum_{m+1}^n log(1-\Phi(T))$  Then how to take derivative of the Log likelihood with respect to $\mu$ and $\sigma^2$, also $n$ is unknown, need to be estimated here?


Show that $\frac{1}{a}+\frac{1}{b}+\frac{1}{c} \geq \frac{9}{a+b+c}$ for positive $a,b,c$

Show that $\frac{1}{a}+\frac{1}{b}+\frac{1}{c} \geq \frac{9}{a+b+c}$, if $a,b,c$ are positive.   Well, I got that $bc(a+b+c)+ac(a+b+c)+ab(a+b+c)\geq9abc$.


How do I prove that the group $H$ is abelian in this question?

So I have a group $H$ and a direct product $H \times H$, which is also a group. Then, I am considering a set $A$ = {$(h,h)| h \in H$}. If $A \unlhd G \times G$, I have to show that $H$ is abelian.   My attempt:   So if I consider two arbitrary elements $h_1, h_2 \in H$, then $(h_1,h_1), (h_2,h_2) \in A$. Normality of $A$ means for any $(h,h') \in H \times H$, $(h_1,h_1).(h,h').(h_2,h_2)^{-1} \in A$, and after some steps, I get that $(h_1.h.h_2^{-1}, h_1.h'.h_2^{-1}) \in A$. I am confused as to what the next step is. Can anyone help me?


Save Stream with different encoding as a UTF8 file

I have a Stream in which there is uploaded text file. The file can have any encoding - ANSI, UTF8 without BOM, UTF8 with BOM. The file has characters which are specific for some languages - e.g. ąę. I need to save all files as UTF8 BOM files on the server side, but I can't force all users to upload me UTF8 BOM files. Special characters in saved file must maintain correct - so ąę. How can I do this?  I have:          using (Stream inputStream = file.InputStream)         {             byte[] bytes = ReadFully2(inputStream);             string utf8string = .....what here?.....             System.IO.File.WriteAllText("", utf8string, System.Text.Encoding.UTF8);         }   public static byte[] ReadFully2(Stream input) {     input.Position = 0;     using (MemoryStream ms = new MemoryStream())     {         input.CopyTo(ms);         return ms.ToArray();     } }


Where can I get a Canon 7D / 7D Mark II card slot cover replacement part?

I own a Canon 7D Mark II. I broke off the card slot cover and need a replacement. Where could I find this? What would it cost?


$S^2 \times S^2$ is diffeomophic to $G_2(\mathbb{R}^4)$

$G_2(\mathbb{R}^4)$ is the Grassmannian manifold of two-dimensional subspaces of $\mathbb{R}^4$. I would like a detailed proof. Can it be done explicitly? I mean, showing the map and checking its differentiability using charts?


Can I use windows documents after install linux?

As the title, Can I use windows documents after install linux ?


How to insert the default time correctly?

I want to insert a data, automatically generate a time and date. How to achieve? As shown below:


Optimizing 4GB RAM for Android development using Android Studio 4 on Linux

I am using Android Studio 4 on Ubuntu 20.04 LTS with Intel Corei3 Processor(Intel® Core™ i3-2120 CPU @ 3.30GHz × 4). After starting Android Studio, more than 90% of physical memory gets used. I am not even using any virtual Device with it but connecting my android phone  by USB to my PC. I have run a Hard Disk Health Check and  Memtest86 to ensure that the RAM and hard disk is not faulty. None of the two reports any errors. Hard Disk Health Check: SMART Attributes Data Structure revision number: 16 Vendor Specific SMART Attributes with Thresholds: ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE   1 Raw_Read_Error_Rate     0x000b   100   100   016    Pre-fail  Always       -       0   2 Throughput_Performance  0x0005   136   136   054    Pre-fail  Offline      -       93   3 Spin_Up_Time            0x0007   121   121   024    Pre-fail  Always       -       190 (Average 190)   4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       3937   5 Reallocated_Sector_Ct   0x0033   096   096   005    Pre-fail  Always       -       249   7 Seek_Error_Rate         0x000b   100   100   067    Pre-fail  Always       -       0   8 Seek_Time_Performance   0x0005   115   115   020    Pre-fail  Offline      -       34   9 Power_On_Hours          0x0012   100   100   000    Old_age   Always       -       4904  10 Spin_Retry_Count        0x0013   100   100   060    Pre-fail  Always       -       0  12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       3937 192 Power-Off_Retract_Count 0x0032   097   097   000    Old_age   Always       -       4568 193 Load_Cycle_Count        0x0012   097   097   000    Old_age   Always       -       4568 194 Temperature_Celsius     0x0002   181   181   000    Old_age   Always       -       33 (Min/Max 18/49) 196 Reallocated_Event_Count 0x0032   093   093   000    Old_age   Always       -       310 197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0 198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0 199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0  SMART Error Log Version: 1 No Errors Logged  Complete report is  Memtest86:  studio64.vmoptions: # Runs JVM in Server mode with more optimizations and resources usage # It may slow down the startup, but if you usually keep IDE running for few hours/days # JVM may profile and optimize IDE better. Feel free to remove this flag. # -server  #Sets the initial memory allocation pool -Xms512m  #Sets the maximum  memory allocation pool -Xmx1G  # Sets the size of the allocated class metadata space that will trigger a GC the first time it # is exceeded, default max value is 350m -XX:MetaspaceSize=512m  Question: How do I optimize the physical memory or do I really need to consider increasing the system memory(RAM)? I have gone through  post but really looking if we have any other workaround. Edit: free.h output               total        used        free      shared  buff/cache   available Mem:          3.5Gi       3.0Gi       122Mi       136Mi       405Mi       161Mi Swap:         2.0Gi       675Mi       1.3Gi


Is it correct to use certain special characters when naming filenames in Linux?

Is it correct to use certain special characters, as +, &, ', . (dot) and , (comma), basically, in filenames.   I understand that you can use - and _ with no problem, but doing some research I have been unable to find something definite about the other symbols; some say that you can, some say that you can't, and some others say that it is "not encouraged" to use them (whatever that means).


Best way to debug parameterized query in c#

Based on the question in post above, most people suggested that "parameterized query" is the best solution to avoid the sql injection.   Below is my code by using the sql injection  public DataSet checkemp(string user) {     strsql = "SELECT * from employee where employeeid = @userid";     SqlConnection con = new SqlConnection(connectionString);     SqlDataAdapter da = new SqlDataAdapter(strsql, connectionString);     da.SelectCommand.Parameters.Add("@userid", SqlDbType.VarChar, 50).Value = user;         // pretend the user name is "Micheal"     con.Open();     DataSet ds = new DataSet();     da.Fill(ds);     con.Close();     con.Dispose();     return ds; }   During the debugging, I can only get the query "SELECT * from employee where employeeid = @userid" if I point on "strsql" label, but not "SELECT * from employee where employeeid = 'Micheal'.  Any solution suggested to solve this question and make it most efficiency? thanks everyone!


So, I am following a , and it is using Python code to create an audio visualizer in Blender. Now, I've always been a coding geek, but I don't actually know Python. I've taken a few shots at it but overall, I don't know Python, however, I can read and understand the code because I know basic programming concepts. Now, I'm following this tutorial as closely as I can (the tutorial does not provide code to copy and paste) and I am getting a syntax error. As far as I can tell, there is no syntax error. The line of code (specified by the error message) appears perfect. This line of code is supposed to set the 3D cursor to the active object's origin. Here's the catch: if I run that exact same line of code in the console, it executes just fine. So here's the error message I get:  File "C:\Me\Blender\Blender Projects\audio visualisation.blend\AudioVisualizer", line 17 bpy.context.scene.cursor_location = bpy.context.active_object.location    ^ SyntaxError: invalid syntax location: <unknown location>:-1   It tells me to look in the console for error message, but the console doesn't output anything.    Thanks!  EDIT: Alright. I've tried all the examples and all the procedures that have been suggested by you guys, but it keeps feeding me errors. According to the console, one of the problems it is spitting out is in C:\Program Files\Blender Foundation\Blender\2.74\scripts\modules\bpy\ops.py. This makes me think there is a bug in the API that is causing one of the many errors. EDIT: Here are the error messages I get for my code. Original Code:  Error:   File "C:\Gannon\Blender\Blender Projects\audio visualisation.blend\Audi o Visualizer", line 35     bpy.ops.graph.sound_bake(filepath="C:\Gannon\Blender\Sounds\Music\Batty McFa dden.mp3", low=i*step high=i*step+step                           ^ SyntaxError: invalid syntax    gandalf3's Code and zeffii's Code are essentially the same with alternative formatting which changes the line numbers where the error occurs.  Error: Unsupported audio format  Traceback (most recent call last):   File "C:\Gannon\Blender\Blender Projects\audio visualisation.blend\Audio Visua lizer", line 42, in <module>   File "C:\Gannon\Blender\Blender Projects\audio visualisation.blend\Audio Visua lizer", line 35, in spiral   File "C:\Program Files\Blender Foundation\Blender\2.74\scripts\modules\bpy\ops .py", line 189, in __call__     ret = op_call(self.idname_py(), None, kw) RuntimeError: Error: Unsupported audio format