I have an interesting dilemma... I am hosting several .mp4 files on a WAMP server. I am well aware of the method of storing files outside of the document root and using a PHP script to authenticate a user before retrieving the file contents. However, these .mp4 files are required to be inside the document root. Is there any way that I can authenticate a user who is trying to directly access one of these files? I have tried a .htaccess rewrite that takes a requested URL ending in ".mp4" and redirects to a PHP script passing the requested file as a parameter, but of course this just loops.   This is the rewrite rule in the .htaccess file...  RewriteEngine on RewriteRule ^(.*).mp4$ /media/auth.php?file=$1.mp4   The idea was, a user will try to access , this reuest would get routed to a PHP script (auth.php) that would pick up the requested file from the URL using $_GET['file'], it would authenticate the user using a $_SESSION variable, and then user a header('Location: ' . $file) to send the authenticated user to the actual file. Again, I realized quickly after implementing this that it would just loop...  Any help would be greatly appreciated. Thanks!  Here's why they cannot be outside the doc root...  @IdontDownVote, very complicated, but I'll attempt a short version... I have this MOSTLY working great with files outside the doc root, with one serious issue. When I access the files using the PHP script, I am able to view the video in the Chrome browser, play, pause, rewind, the whole deal. The only (big) problem is when I use this method, I am not able to Cast the video. When I access a .mp4 file directly, it gives me the option to Download or Cast, but using the PHP script, only the Download option is available. Believe me, I have tried everything including discussing with two Google developers. I posted on Stack Overflow about this issue here with no joy...    I am not sure why this is getting downvoted, this is causing my a lot of headache and I am just looking for advice...

What is the best way to password protect quicktime streaming videos using php/.htaccess. They are being streamed using rtsp, but I can use other formats if necessary.  I know how to do authentication with php, but I'm not sure how to setup authentication so that will protect the streaming files urls so that a user can't just copy the url and share it.  Or am I overthinking this and I can just use a normal authentication scheme and place the files in a protected directory?


I tried to rewrite the integral as $$\int (\cos^2x)(\cos^2x)dx$$ which in turn I used the trig identity of $\cos^2x = 1 - \sin^2x$ and therefore changed $$\int (\cos^2x)(\cos^2x)dx = \int (1 - \sin^2x)(1 - \sin^2x)dx = \int ( \sin^4x - \sin^2x + 1) dx$$  I then tried to do u substitution where $u=\sin x$ and $du=\cos x dx$  But my answer was completely wrong...I ended up getting $$\frac{\sin^5x}{5}+\sin x-\frac{2\cos^3x}{3}+K, \quad K\in \mathbb R$$  Am I doing $u$ substitution wrong or is there a better way to solve this integral?

$$\int \cos^4 x\,\mathrm dx  = \int (1 - \sin^2x)^2\,\mathrm dx.$$  I tried using $\cos^2(x) + \sin^2(x)$ = 1. This was on the integration by parts section of my textbook.  The integral I came out with is given me a hard time. I double checked my work and I feel I am on the right track but I feel stuck. I tried u substitution but there is no $\cos x$ to leverage with.


I created an android project in Android Eclipse and I want to connect to the database I've created in SQLite Manager.  The database will be saved locally. It is basically a read only only app, there are no create delete update actions done by the user. My queries will be a lot of select queries. I have my data base made and want to import it into android project. What are the steps? I have my model classes created. What else do I need in order to have to connected? Do I store the SQLite file in the assets folder etc?   I have the database made in the firefox addon SQLite Manager!

If your application requires a database and it comes with built in data, what is the best way to ship that application? Should I:   Precreate the SQLite database and include it in the .apk? Include the SQL commands with the application and have it create the database and insert the data on first use?   The drawbacks I see are:   Possible SQLite version mismatches might cause problems and I currently don't know where the database should go and how to access it. It may take a really long time to create and populate the database on the device.   Any suggestions? Pointers to the documentation regarding any issues would be greatly appreciated.


i'm a fresh ubuntu user and I've installed a double boot with Wind 8 and Ubuntu 13.04, but since yesterday I'm receiving an error showing:     error: unknown filesystem   grub rescue>   The fact is when I do ls (hdX,gptY)/ all I get is "error:unknown filesystem" again.   And the solutions posted don't work because I don't know why but I can't access the BIOS pressin F2 or to the boot pressing F12, the simply don't work since the error.

I have a multiboot system set up. The system has three drives. Multiboot is configured with Windows XP, Windows 7, and Ubuntu - all on the first drive. I had a lot of unpartitioned space left on the drive and was reserving it for adding other OSes and for storing files there in the future.  One day I went ahead and downloaded Partition Wizard and created a logical NTFS partition from within Windows 7, still some unpartitioned space left over. Everything worked fine, until I rebooted the computer a few days later.  Now I'm getting:    error: unknown filesystem.   grub rescue>   First of all I was surprised not to find any kind of help command, by trying:    help, ?, man, --help, -h, bash, cmd, etc.  Now I'm stuck with non-bootable system. I have started researching the issue and finding that people usually recommend to boot to a Live CD and fix the issue from there. Is there a way to fix this issue from within grub rescue without the need for Live CD?  UPDATE  By following the steps from , I was able to boot to initramfs prompt. But not anywhere further than that.  So far from reading the manual on , I was able to see my drives and partitions using ls command. For the first hard drive I see the following: (hd0) (hd0,msdos6) (hd0,msdos5) (hd0,msdos2) (hd0,msdos1)  I now know that (hd0,msdos6) contains Linux on it, since ls (hd0,msdos6)/ lists directories. Others will give "error: unknown filesystem."  UPDATE 2  After the following commands I am now getting to the boot menu and can boot into Windows 7 and Ubuntu, but upon reboot I have to repeat these steps.    ls ls (hd0,msdos6)/ set root=(hd0,msdos6) ls / set prefix=(hd0,msdos6)/boot/grub insmod /boot/grub/linux.mod normal   UPDATE 3  Thanks Shashank Singh, with your instructions I have simplified my steps to the following. I have learned from you that I can replace msdos6 with just a 6 and that I can just do insmod normal instead of insmod /boot/grub/linux.mod. Now I just need to figure out how to save this settings from within grub itself, without booting into any OS.  set root=(hd0,6) set prefix=(hd0,6)/boot/grub insmod normal normal   UPDATE 4  Well, it seems like it is a requirement to boot into Linux. After booting into Ubuntu I have performed the following steps described in the :  sudo update-grub sudo grub-install /dev/sda   This did not resolve the issue. I still get the grub rescue prompt. What do I need to do to permanently fix it?  I have also learned that drive numbers as in hd0 need to be translated to drive letters as in /dev/sda for some commands. hd1 would be sdb, hd2 would be sdc, and so on. Partitions listed in grub as (hd0,msdos6) would be translated to /dev/sda6.  UPDATE 5  I could not figure out why the following did not fix grub:  sudo update-grub sudo grub-install /dev/sda   So I downloaded  based on an answer from  post. That seemed to do the trick after I picked the "Recommended Repair (repairs most frequent problems)" option.


Is it possible to search something using Firefox in Spotlight search? When I choose the option "search in the internet" it always open Safari. My question is then, is it possible somehow to set Firefox as the "default" browser in iOS?  I am using iOS 9.1 in an iPad mini.

I really want to use Firefox as my main browser but can't find a way to make it the default browser on iOS: this make it's adoption much more complicated. Is it totally impossible?   Edit - Example of use case: while clicking a link in the Twitter app, I would like it to open directly in Firefox.  I won't jailbreak.


So I understand that indexes are crucial because they allow you to make queries without having to look at the entire collection, but what exactly is an index? What really happens to the data when you call .createIndex()? Thanks!

Given that indexing is so important as your data set increases in size, can someone explain how indexing works at a database-agnostic level?  For information on queries to index a field, check out .


Verify the identity:  $$\frac{(\cos(x+h) - \cos x)}{h} = \cos x  \left(\frac{\cos h - 1}{h}\right)- \sin x  \left(\frac{\sin h }{h}\right)$$  =(Cosxcosh - sin x sin h -cos x)/h.   I can't think of where to go from here.  Thanks

The proof of two angles for sine function is derived using $$\sin(A+B)=\sin A\cos B+\sin B\cos A$$ and $$\cos(A+B)=\cos A\cos B-\sin A\sin B$$ for cosine function. I know how to derive both of the proofs using acute angles which can be seen here  but pretty sure those who have taken trig know what I'm talking about. So I know how to derive and prove both of the two-angle functions using the acute angles, but what I am completely confused about is where those triangles came from. So for proving the two-angle cosine function, we look at two acute angles, $A$ and $B$, where $A+B<90$ and keep on expanding. So my question is, where did those two triangles come from and what is the intuition behind having two acute triangles on top of each other?


Suppose $S = 1 - 1 + 1 - 1 + 1 - 1 + 1\ldots$. Then $1 - S = S$ so $S = \frac{1}{2}$ Now suppose $T = 1 - 2 + 3 - 4\ldots$.  We can also write $T = 0 + 1 - 2 + 3 - 4\ldots$. Adding the two we get $2T = (1+0)+(-2+1)+(3-2)+(-4+3)\ldots$ or $2T = 1 - 1 + 1 - 1\ldots$, so $T = \frac{1}{4}$. Now let $P=1+2+3+4+5\ldots$. It can be easily seen that $P-T = 4P$ or $P=-\frac{T}{3} =-\frac{1}{12}$ so we have $P = -\frac{1}{12}$ How it is possible that $1 + 2 + 3 + 4\ldots=-\frac{1}{12}$?

$\displaystyle\sum_{n=1}^\infty \frac{1}{n^s}$ only converges to $\zeta(s)$ if $\text{Re}(s) > 1$.  Why should analytically continuing to $\zeta(-1)$ give the right answer?


If $A$ is a symmetric positive semidefinite matrix, then $A+\alpha I$ with $\alpha> 0$ is positive definite?  Or are there some conditions to $\alpha$  so that it verifies?  $I$ is the identity matrix

If I have a positive semidefinite matrix $A_{n\times n}$, I want to transform it to positive definite matrix. I plug the following operation to the original matrix: $$B=A+\lambda I_{n}$$ where $\lambda > 0$. I want to know whether B is positive definite matrix. Could anyone proof it?


As we all know, headmasters and headmistresses that passed away are being honored by making them all a portrait that can communicate to the present headmaster/headmistress of the current regime of Hogwarts.  But I didn't read in the 7th book if there was a portrait placed in the office showing Severus Snape since he is already dead and had finished his work as a headmaster of Hogwarts.

Throughout the Harry Potter series, we see that deceased Headmasters of the school get a semi-sentient portrait of themselves in the Headmaster's Office, at the service of the current Headmaster. Do all Headmasters get a portrait? What are the conditions of getting one? For instance, there are a couple of times when Dumbledore is temporarily deposed as Headmaster: Dolores Umbridge takes over the job in Order of the Phoenix, and Minerva McGonagall takes the job in Chamber of Secrets and Half Blood Prince. Will Umbridge and McGonagall have portraits in the Headmaster's Office when they expire?


Steps to Reproduce ##   Tap ask a question type some text in body/description field copy/cut  Paste in different location Notice text size is smaller   Expectation  Given I have copied text, when I paste the text in the same or a different location, then the text size will be the same as when I copied it.   App Version: 1.6.6.2 Device: iPhone 7 OS Version: Version 13.1.3 (Build 17A878)

While I can post external texts into question and answer bodies, it preserves the old font style, spacing and size (although the markdown display won’t be affected by that.)   App Version: 1.6.6.2 Device: iPhone 6 OS Version: Version 11.0.3 (Build 15A432)


I want to replace " from a string with ^.  String str = "hello \"there"; System.out.println(str); String str1 = str.replaceAll("\"", "^"); System.out.println(str1); String str2= str1.replaceAll("^", "\""); System.out.println(str2);   and the output is :  hello "there hello ^there "hello ^there   why I am getting extra " in start of string and ^ in between string  I am expecting:  hello "there

I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


Look at the following sentence that I just saw while viewing a profile:  Apparently, this user prefers to keep an air of mystery about them.   As it looks, them refers to this user, right? This user refers to one person; however, the pronoun them is used which refers to many people and seems incompatible.  Can somebody explain why this sentence is right and why him/her aren't used?

Is there a pronoun I can use as a gender-neutral pronoun when referring back to a singular noun phrase?  Each student should save his questions until the end. Each student should save her questions until the end.


Brief description about what I am trying to do:   It's a simple messaging app  In my first activity I have a list-view and few buttons.    User presses any of the button and the information about which button was pressed was stored in shared preferences. When user presses any list item, an intent is triggered that takes him to new activity where which list item was pressed is analyzed by putExtra() from intent.  In second activity, depending on which value came with intent, a string value for newString is decided.   Problem When screen rotates, app crashes with this error -     Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference   Following is the code in second activity -   String newString = "Default_Channel";  public static final String MyPREFERENCES = "MyPrefs" ; SharedPreferences sharedpreferences;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_chat2);      .     .     .      sharedpreferences = getSharedPreferences(MyPREFERENCES, Context.MODE_PRIVATE);      String restoredText = sharedpreferences.getString("CurrentUser", null);     if (restoredText != null) {         currentUserName = sharedpreferences.getString("CurrentUser", "unknown");//"unknown" is the default value.         .         .         .     }     else     {         currentUser.setText("not signed in");     }       if (savedInstanceState == null)     {         Bundle extras = getIntent().getExtras();         if(extras == null)         {             newString= "Default_Channel";         }         else         {             newString= extras.getString("LIST_ITEM_CLICKED");         }     }     else     {         newString= (String) savedInstanceState.getSerializable("LIST_ITEM_CLICKED");     }      // *** GETTING ERROR HERE On this line *** //       switch (newString)     {         case "User_1":             .             .             .             break;         case "User_2":             .             .             .             break;         case "User_3":             .             .             .             break;         case "Default_Channel":             .             .             .             break;     }   I am getting NULL pointer exception where I have mentioned it in code ! Its Line between Else statement and Switch.  Also, I understand what is NULL pointer exception and this is not what I am asking. I am getting NULL pointer when screen rotates, i.e. when activity restarts without intent.   I am new to android programming and not able to figure out what's going wrong here.   Edit: This is not duplicate question with "What is NULL pointer exception".

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


Is there a way to make the vertices on the following directed graph with a set Euler cycles  colored? Provide the TeX code as well as explain how to color vertices!

I tried to use Tikz to draw large graphs with specific toologies and I am running into some problems. Since not all nodes can be represented explicitly, I am forced to use an ellipsis. I tried to define this ellipsis as a node, but the dots appear horizontally and not as shown in figure, i.e., it would be great if the ellipsis are three adjacent points on  the circumference of the circle where other nodes rest.  The same problem arises even when I have a complete graph. Can someone help me out with this? Thanks!     Code so far:  \begin{tikzpicture}[->,>=stealth', shorten>=1pt, auto, node distance=2.8cm, semithick]  \tikzstyle{peer}=[draw,circle,violet,bottom color=\lav, top color= white, text=violet, minimum width=8pt]  \tikzstyle{superpeer}=[draw, circle, burntorange, left color=\oran, text=violet, minimum width=25pt]   \node[superpeer] (A) {$0$};   \node[peer]         (B)  at ($ (A) + (20:4) $) {$1$};   \node[peer]         (C)  at ($ (A) + (-52:4) $) {$2$};   \node[peer]         (D)   at ($ (A) + (-124:4) $){$3$};   \node[draw=none] (F)  at ($ (A) + (-176:4) $){$\cdots$};     \node[peer] (E) at ($ (A) + (92:4) $) {$N$};    \path (A) edge [color=blue, sloped] node[]{$\lambda_{01}, \mu_{01}$} (B);   \path (A) edge [color=blue, sloped] node[] {$\lambda_{02}, \mu_{02}$} (C);   \path (A) edge [color=blue, sloped] node[] {$\lambda_{03}, \mu_{03}$}(D);   \path (A) edge [color=blue, sloped, below] node[] {$\lambda_{0N}, \mu_{0N}$} (E);   \path (B) edge [color=blue, sloped] node[] {$\lambda_{10}, \mu_{10}$}(A);   \path (C) edge [color=blue, sloped] node[] {$\lambda_{20}, \mu_{20}$}(A);   \path (D) edge [color=blue, sloped] node[] {$\lambda_{30}, \mu_{30}$}(A);   \path (E) edge [color=blue, sloped, above] node[] {$\lambda_{N0}, \mu_{N0}$}(A); \end{tikzpicture}


When shaded in Look Dev mode, there's a kind of coloured lighting so the darker faces are yellow and the lighter faces are blue. Is there a way of disabling this so the shading is more greyscale like in 2.79? The faces of this cube should be in black and white only but the colours look very different in the viewport. Thanks.

Is it possible to change the default mesh color/shading in 2.8 to be more like 2.79? I'm finding it hard to see finer detail in 2.8. On the left is 2.8 and the right is 2.79


I have come across a sentence where 'Niagara Falls' is used without an article. I seem to remember that there is a basic rule of the English language that there should be an article before any specific countable noun. Niagara Falls is a set of three spectacular waterfalls located on the US-Canadian border which makes it plural specific noun. Then why not 'The Niagara Falls'?

In AmE (and probably other dialects as well) there are certain place names and other proper nouns that either have a compulsory definite article or a compulsory lack of one attached to them.   For example:     The Upper West Side - Neighborhood in New York City with a compulsory The.   Midtown (Manhattan) - Compulsory lack of The.   Google - Compulsory lack of The to the point of .   Facebook - Compulsory lack of The .      Then there are others which are pseudo-plurals:     The Bronx -  Always gets The and is occasionally treated as plural.   Yonkers - Never gets The, never treated as a plural.    My question:  Is there a name for this phenomenon?  I know that the rules of articles in English are very fluid, but is there a rhyme or reason to this?


I've got this NullPointerException that I can't get rid of, I could use a bit of help, please :)  So I've got a button in my 1st activity that is supposed to send me to this 2nd activity ( where the problem is ), but when I click on the button my activity crashes and displays this error.  When I tried my 2nd activity on its own, it worked fine, but when I attached my 2 projects the error popped.   This is the error :   Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Button.setOnClickListener(android.view.View$OnClickListener)' on a null object reference   And this is my code :  public class entery_names extends AppCompatActivity {  RelativeLayout layout; RelativeLayout.LayoutParams params; Button mBtn_add_et = null; int id; int i; static int previousid;  @SuppressLint("NewApi") @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);     //Submit = (Button)loginDialog.findViewById(R.id.Submit);     mBtn_add_et = findViewById(R.id.btn_add_et);      mBtn_add_et.setOnClickListener(new View.OnClickListener() { // this line is the problem apparently         @Override         public void onClick(View view) {             if (id <= 4) {                 EditText et = new EditText(entery_names.this);                 id = View.generateViewId();                 et.setId(id);                 layout = findViewById(R.id.relativeLayout);                 params = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);                 params.addRule(RelativeLayout.BELOW, id);                 if (previousid == 0)                     params.addRule(RelativeLayout.BELOW, R.id.et3);                 else                     params.addRule(RelativeLayout.BELOW, previousid);                 previousid = et.getId();                 et.setHint("Enter Name");                 et.setHintTextColor(getResources().getColor(R.color.colorTransparentWhite));                 et.setTextColor(getResources().getColor(R.color.colorTransparentWhite));                 et.setX(findViewById(R.id.et1).getX());                 layout.addView(et, params);             }         }     }); }   }  Thanks!


Is there any test from the command line to prove whether a UEFI/BIOS booted as UEFI, or as Legacy?

I have a Windows 7 x64 install USB and want to know if the installer has booted into EFI or BIOS mode.  I found a solution , but it doesn't work since notepad couldn't find: \Windows\Panther\setupact.log


I get the options to change the passphrase when I open the 'Disks' utility. However, I'm curious to know how to remove the passphrase (with encryption still happening with auto-decrypt on boot) or how to disable encryption.

I recently installed Ubuntu 12.10 and it requires a passphrase to boot up (I installed it with an encrypted file system).  Do I have to reinstall to change to a standard unencrypted file system?


when I was doing c program in Ubuntu 12.04 , there is a font configuration warning shown by terminal. What should I do?  shayna@shayna-Vostro-3446:~$ gedit hello6.c Fontconfig warning: "/etc/fonts/conf.d/89-tlwg-garuda-synthetic.conf", line 9: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/89-tlwg-garuda-synthetic.conf", line 21: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/89-tlwg-kinnari-synthetic.conf", line 9: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/89-tlwg-kinnari-synthetic.conf", line 21: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/89-tlwg-loma-synthetic.conf", line 12: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/89-tlwg-umpush-synthetic.conf", line 9: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/89-tlwg-umpush-synthetic.conf", line 21: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 9: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 22: Having multiple <family> in <alias> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 22: Having multiple <family> in <alias> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 22: Having multiple <family> in <alias> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 26: Having multiple <family> in <alias> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 31: Having multiple values in <test> isn't supported and may not works as expected Fontconfig warning: "/etc/fonts/conf.d/90-fonts-nanum.conf", line 40: Having multiple values in <test> isn't supported and may not works as expected shayna@shayna-Vostro-3446:~$ gcc hello6.c -o hello6 shayna@shayna-Vostro-3446:~$ ./hello6 shayna@shayna-Vostro-3446:~$

I am getting the following error frequently. (Example: when running zenity,firefox etc. commands / applications.)  Fontconfig warning: "/etc/fonts/conf.d/90-fonts-unfonts-core.conf", line 11: Having multiple values in <test> isn't supported and may not work as expected   Here is contents of file /etc/fonts/conf.d/90-fonts-unfonts-core.conf:  <?xml version="1.0"?> <!DOCTYPE fontconfig SYSTEM "fonts.dtd"> <fontconfig>     <match target="font">         <test name="family" qual="any">             <string>은 바탕</string><string>UnBatang</string>                 <string>은 돋움</string><string>UnDotum</string>                 <string>은 궁서</string><string>UnGungseo</string>                 <string>은 필기</string><string>UnPilgi</string>                 <string>은 그래픽</string><string>UnGraphic</string>         </test>          <edit name="antialias" mode="assign" binding="strong"><bool>true</bool></edit>         <edit name="hinting"   mode="assign" binding="strong"><bool>false</bool></edit>         <edit name="autohint"  mode="assign" binding="strong"><bool>true</bool></edit>         <edit name="hintstyle" mode="assign" binding="strong"><const>hintslight</const></edit>     </match> </fontconfig>   How to solve it?


Generally to detect the hydrogen spectrum people uses the hydrogen gas tube as a light source. My question is, since the gas in the tube is the hydrogen molecule $H_2$ why is the spectrum equal to the spectrum of atomic hydrogen $H$ ?

One of the basic experiments everybody learns about when it comes to physics is the spectroscopy of hydrogen gas. The typical set-up has a charge discharge lamp containing the hydrogen. The resulting spectra are then discussed with the atomic properties of the hydrogen atom.  The gas however is not mono-atomic but it is present as $\textrm{H}_{2}$. The 1s orbitals creating the $\sigma$-bond and the electrons are occupying the bound state. This is at a lower energy when compared to the 1s states of the atomic hydrogen. The higher energy orbitals will also influence each other as they are overlapping. So my question is, why does the atomic hydrogen description works for this experiment?  Possible answers I could think of are:   The bounding effects are negligible The $\textrm H_{2}$ spectra are only visible shortly after the lamp is switched on. The constant electron bombardment is slowly dissociating all $\textrm H_{2}$.   For the later I am very unsure if a charge discharge lamp is able to produce conditions to archive that. If it comes out that this is the answer, does anyone know where to find more details on the spectroscopic properties of $\textrm H_2$?


This might not be a 100% LaTeX question since it is a matter of PDFs, but I think that the LaTeX crowd is the most appropriate audience for it.  I have an unpublished research paper that I am writing in LaTeX, and I have to send its PDF to some people whom I don’t trust completely, so I am paranoid that someone will copy it. I would like to secure it in the sense that the text, table and figures cannot be copied, i.e. that the paper is rendered useless. Both "technical" (e.g. protect pdf) and other (e.g. change irrelevant text in the paper to produce a different version) solutions are seeked.  I know that the safest way is just not to send it around, but I have to, and frankly, I have no clue what to do here. I also know that each PDF can be locked, but that can be easily broken. Putting diagonal watermarks across the whole pages is also not a solution because text and images can be copied, and watermarks destroy the readability. Another thing would be to put watermarks on raster figures directly in the file, so they are useless if copied.  Do you have a solution for this? What did you do in similar situations?

My questions is very simple. How can I set security setting for a PDF file created with PDFLatex?  I should set some password or print permissions, etc.


I accidentally lost some of the system files by executing the following command in the terminal:   sudo apt-get purge wine\*   Most of the installed software (terminal, software center, libreoffice etc.) are now lost.  Does anybody have a solution for this issue?

I accidentally removed all the packages starting with the name jpeg with:  sudo apt-get remove jpeg*   This screwed up a lot of things, removed Unity, Firefox, Flash player etc.  I somehow managed to recover the desktop and unity but then a lot of things are still buggy. For example .rpm files and .tag.gz just won't open up at all.  What I want is a way to fix everything that's amiss. Something that is the equivalent of a 'repair installation' with a windows disc.  Any tips, anyone?


Let us say I have process A which spawns process B, which spawns process C. Under what circumstances will killing A kill the whole chain (or tree I guess) and when will it not? I sometimes find it does, and sometimes that B ends up with ppid 1 and C is untouched.   Does this behaviour vary between particular Linux kernel versions?

I have been studying the Linux kernel behaviour for quite some time now, and it's always been clear to me that:     When a process dies, all its children are given back to the init process (PID 1) until they eventually die.   However, recently, someone with much more experience than me with the kernel told me that:     When a process exits, all its children also die (unless you use NOHUP in which case they get back to init).   Now, even though I don't believe this, I still wrote a simple program to make sure of it. I know I should not rely on time (sleep) for tests since it all depends on process scheduling, yet for this simple case, I think that's fairly enough.  int main(void){     printf("Father process spawned (%d).\n", getpid());     sleep(5);      if(fork() == 0){         printf("Child process spawned (%d => %d).\n", getppid(), getpid());         sleep(15);         printf("Child process exiting (%d => %d).\n", getppid(), getpid());         exit(0);     }      sleep(5);     printf(stdout, "Father process exiting (%d).\n", getpid());     return EXIT_SUCCESS; }   Here is the program's output, with the associated ps result every time printf talks:  $ ./test & Father process spawned (435).  $ ps -ef | grep test myuser    435    392   tty1    ./test  Child process spawned (435 => 436).  $ ps -ef | grep test myuser    435    392   tty1    ./test myuser    436    435   tty1    ./test  Father process exiting (435).  $ ps -ef | grep test myuser    436    1     tty1    ./test  Child process exiting (436).   Now, as you can see, this behaves quite as I would have expected it to. The orphan process (436) is given back to init (1) until it dies.  However, is there any UNIX-based system on which this behaviour does not apply by default? Is there any system on which the death of a process immediately triggers the death of all its children?


I have a really fast computer, so resources isn't an issue, but what I want is to be able to chunkload my VANILLA world from a SMP / bukkit /etc., but bukkit's download pages have been taken down, so probably not bukkit. I just want to load my vanilla farms (Mob farm, sugar cane farm) and not have issues.

I have built an iron farm somewhere far away from my actual spawn chunks in my single player world. In hindsight, this was a dumb idea, but I can't exactly change it anymore. I'd like to keep the thing running all the time, so I'm looking for a way to keep the chunks loaded.  I'm running minecraft 1.12.1, is it possible at the moment? I have looked at some chunk loader mods, but chicken chunk loader hasn't been updated yet, and the others simply didn't work.  I have tried moving the spawn chunks, but that hasn't done anything either.  Edit: I have worked this out with IronAnvil, and it ended up being a render setting in optifine which didn't load them correctly somehow. It has been working fine after I reset my optifine settings to default.


I currently have two partitions on one hard drive. Windows 7 is installed on partition C, and Ubuntu is installed on partition D.  I wish to format the Windows Partition and replace windows 7 with windows 8.1. Ubuntu wasn't installed with Wubi.  Will Ubuntu be ok ?

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


The time command is very useful for checking how much time it takes for a piece of code that I develop to run... However, I'd like to have a way to check the memory consumption of the codes that I develop too, regardless of the language that I use. So, if it's bash, python, or node.js... I'd like to have a way of checking how much RAM memory I used on the code, just so I can get more aware of what I'm doing avoiding memory duplication and stuff like that. Is there any command line that I can use for checking the amount of memory that a script that I create consumes?

How do I measure the peak memory of an application running on Linux?  I run this app in batch so I cannot use RSS since, it reports the current memory. I need the peak memory that the application has used to be reported at the end.   The VmPeak is not a solution either, since it reports the allocated memory and also does not calculates from the real Ram but also from the Hard Disk.


(e.g. on this site.)  This omission hides the alterations that the site makes automatically and silently upon submission e.g. .

It would be really swell if the question title was included right above the preview of the body of the question. Every so often, I'll be asking about something and the very act of composing a good question helps me better refine the problem. I go back and forth between SO and my workspace testing other possibilities and working on getting the best SSCCE. As I'm going back and forth updating the question, I'm constantly looking down at the preview, making sure everything's just right. Once it is, I hit submit and see: Plz halp me Porblem with issue That is followed by a brilliant question that should have been titled something like How can I reduce manifold wear when using third-party flanges? This is exacerbated by the dupe suggestions. For a question of any length, the title I entered won't even be on screen by the time I'm near posting. Even when it is, it's easy to lose it up there as it's literally the smallest text on the top half of the page. Thankfully I can edit to go fix things, but it would be easier to just get it right the first time.  I know that improving the quality of titles around here is of keen interest, and this seems like an easy change that wouldn't bother anyone. Thoughts? Update: Seeing how there's continuing furor over , showing askers their title with the automatic edits applied might help a lot.  Some people will post "Question title broken?" questions here on meta, but those are the people whose titles are currently being broken without them noticing.  Hopefully everyone else will get the hint and write better titles. (There could even be a link to the policy when automatic edits are applied, but that starts to sound like real work to add.)


I understand that electromagnetic waves are caused by the oscillation of electric and magnetic fields. But how? Are there magnetic and electric fields in air, or in vacuum? How does this oscillation form a wave? Sorry, I am a new at this site, please simply put you answer so that I can understand.

This is perhaps a total newbie question, and I will try to formulate it the best I can, so here it goes. How does an electromagnetic wave travel through for example, the vacuum of space?   I usually see that waves are explained using analogies with water, pieces of rope, the strings of a guitar, etc, but it seems to me that all those waves need a medium to propagate. In fact, from my point of view, in those examples the wave as a "thing" does not exist, it's just the medium that moves (involuntary reference to The Matrix, sorry).   But in space there is no medium, so how does a wave travel? Are there free particles of some sort in this "vacuum" or something? I believe , so supposedly there isn't a medium for the wave to travel through.   Moreover, I've seen other answers that describe light as a perturbation of the electromagnetic field, but isn't the existence of the field, potential until disturbed? How can it travel through something it does not exist until it's disturbed by the traveling light in the first place? (this last sentence is probably a big misconception by me).


When I watched a Youtube video in fullscreen it worked fine, but when I turned back from fullscreen to normal, the screen was frozen and I was unable to type anything from my keyboard. I restarted my machine to escape this issue. However, when I see video from videos app or vlc on fullscreen and come back, nothing froze.   I searched, and found some things relating to Chrome or flash, but I found nothing that helped me.  My current system is Ubuntu 16.04, Intel® Core™ i5-3230M CPU @ 2.60GHz × 4, 8GB Ram, and Intel HD 4000.    EDIT The issue happened when I upgraded OpenGL & Mesa. I tried downgrading but the issue wasn't gone. So I must reinstall Ubuntu.

All operating systems freeze sometimes, and Ubuntu is no exception. What should I do to regain control when...   just one program stops responding? nothing at all responds to mouse clicks or key presses? the mouse stops moving entirely? I have an    In what order should I try various solutions before deciding to pull the power plug?  What should I do when starting up Ubuntu fails?  Is there a diagnostic procedure I can follow?


I need a helper class with functions which are useful everywhere in my program. Ideally, I wanted a file with a single namespace like below which I can include anywhere in my program: namespace myhelpers{   int func(){     //function with implementation in one file.    } }  This doesn't work because I can't have multiple definitions of the function, so I separated into .h and .cpp and still get errors. Code below: myhelpers.h #ifndef MYHELPERS #define MYHELPERS #include <vector>  class myhelpers { public:     template <class M>     static std::vector<M> func1(double i); }; #endif  myhelpers.cpp #include "myhelpers.h" template<class M> // <--making this function a non-template function fixes the error.  std::vector<M> myhelpers::func1(double i ) {     return std::vector<double>(5); };  main.cpp #include "someclass.h" int main() {     // also want to use my helpers here.  }  someclass.cpp #include "myhelpers.h" #include "someclass.h" int someclass::func(int i) {     myhelpers::func1<double>(10.0);     return 1; }  someclass.h class someclass {     int func(int i); };  I get this linker error: Severity    Code    Description Project File    Line    Suppression State Error   LNK2019 unresolved external symbol "public: static class std::vector<double,class std::allocator > __cdecl myhelpers::func1(double)" (??$func1@N@myhelpers@@SA?AV?$vector@NV?$allocator@N@std@@@std@@N@Z) referenced in function "private: int __thiscall someclass::func(int)" (?func@someclass@@AAEHH@Z)  directory/someclass.obj 1 If I remove the template from the myhelpers function this linker error disappears, I don't see how this template function changes fixes the error, but I need the templates in my helper functions. I've spent hours looking online for the best way to have a helper class like this but can't find a good answer. Thanks.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


Essentially, we have "[singular subject] was/were [plural object]."  Which is correct?  "What mattered was my determination and effort."  "What mattered were my determination and effort."  I understand that "my determination and efforts" can be replaced with a singular adjective (e.g. "What mattered was important."). This makes me think "was" is correct.  However, "determination" and "effort" are two words.  In the above sentence, "are two words" is correct instead of "is two words", which leads me to believe that "were" is correct.  Maybe the fact that "determination" and "effort" are not quantifiable is making the singular choice sound more "right" than the plural choice or vice versa.

I can't figure out if the below sentence should use “was” or “were”, since I'm not sure what the subject of the sentence is. Is the sentence incomplete? How do I handle this kind of sentence, where no nouns or pronouns are present?     Knowing how to jump and being able to run was / were crucial during my high jump career.


I have been giving the following question    Consider the following problem with alternative constraints: max $2x_1-79x_2$ subject to $0\le x_1\le 20, 0\le x_2 \le 30$ and at least one of the following inequalities holds: $-2x_1+3x_2\ge0$ (1) $5x_1-4x_2\ge0$ (2) $7x_1+8x_2\le40$ (3) Formulate this problem as an integer programming problem.   My answer to this is    max $2x_1-79x_2$ subject to $0\le x_1\le 20, 0\le x_2 \le 30$ $2x_1-3x_2\le M_1 (1-y_1)$ $4x_2-5x_1\le M_2(1-y_2)$ $7x_1+8x_2-40\le M_3 (1-y_3)$ $\sum^3_{j=1}y_j\ge1$ $y_j\in \{0,1\}$ for $j=1,2,3$ Choose $M_j$ so ignored constraints will not be binding.    Is this an acceptable answer? Have I made any mistakes? If yes, where abouts? Thank you:)

Formulate the following Integer Program considering alternative constraints  \begin{align}\max \qquad &2x-79y\\[0.2cm]\text{ subject to}\qquad& 0\le x\le 20 \, \text{ and }\, 0\le y\le 30\end{align}  and at least one of the following inequalities holds: \begin{align}-2x+3y&\ge 0\\[0.2cm]5x-4y&\ge0\\[0.2cm]7x+8y&\le40\end{align}


I have a function $ \frac{x+1}{x^2-3x+4} $ which I've decomposed into $ \frac{x}{x^2-3x+4} + \frac{1}{x^2-3x+4} $.  By using the definitions of even and odd functions, I know that x is an odd function, $ x^2-3x+4 $ is neither even nor odd, and 1 is a constant and constants are considered even. so my question is: is an odd function over a function neither even nor odd, still odd? Same question from an a constant (even?) function.  Thank you for your help!  Also not sure if it's relevant, but for $ x^2-3x+4 $ we obtain non-real roots, and it is also worth noting that $ \frac{x}{x^2-3x+4} $ is zero when $ x=0 $. though $ x^2-3x+4 $ is always greater than roughly $ ~1.6 $.

I have been given the task to rewrite a function as a sum of an even and an odd function. But when I went to analyze the parts of the original function I noticed that one part was neither even nor odd.   The original function was: $g(x) = (x + 1) / (x^2 - 3x + 4$)  After analyzing I realized that when using f(-x) to determine symmetry it produced a 'neither' result. How would I go about writing a function that is neither even nor odd as an even function. (It would have to be an even function as the (x+1) part of the original function is odd and since I need to write it as a sum of even and odd, the denominator would need to be even.


I'm not a technie; I don't know anything about coding. I'm a somewhat basic computer user. However, now that Microsoft has phased out support for Windows XP, I HAVE to change OSs. However, I don't have the money for buying a new computer, so I read some articles, and I learned about Lubuntu: a supposedly lightweight XP-esque OS.  But here's the thing: I don't know how to install Lubuntu. I also don't want to dual-boot, so I have to replace XP with the new OS. And although I have a 4 GiB flashdrive, I don't have a burnable or writable CD.   So, how do I do this...? I'm not experienced in this field... I wish there was an installer wizard or whatever that could do all that for me: eliminate XP from my computer, then install Lubuntu onto it.  Please help me? Any help at ALL would be GREATLY appreciated...  Thank you.  Computer Specs: Microsoft Windows XP Professional Ver. 2002, SP3 (32-bit)  Btw, I checked my Hard Drive space and RAM space: I do have the min. requirements covered.

I would like to see a full how-to guide on how to install Ubuntu.


I just started writing in JavaScript a few hours ago and I've seen some code use:  var a = function()  function FunctionName()

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


I was working with an exercise on FCC and got confused by RegEx's capture group behaviors. I would appreciate if an expert could help me clear my confusion. Why did not fixRegex2 works?  let str = "one two three"; let fixRegex = /(\w+)\s(\w+)\s(\w+)/;  let fixRegex2 = /(\w+)(\s)\1\2\1/;  console.log(str.match(fixRegex));//works ok, return "one two three" console.log(str.match(fixRegex2));//no match at all!   I am pretty sure fixRegex2 would work since I did something similar in the past and it worked:  let repeatNum = "42 42 42"; let reRegex = /(\d+)(\s)\1\2\1/; console.log(repeatNum.match(reRegex));// works ok, return "42 42 42"

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


Why does Ubuntu keep showing this icon?   Info:   Ubuntu 20.04 GNOME dash-to-panel used

I have a Dell XPS 15 9570 with a Dell WD19 Dock and on this Dock I have 2 Monitors. The internal Monitor of the Notebook is off but the Lid is open.  I have installed Ubuntu 20.04 LTS.  Everything is working fine, except the following Icon in the Top bar is blinking (Appearing and Disappearing). I don´t know what that is.  It looks like a cord but the Notebook charging as expected.    It blinks sometimes in a faster and another Time in a slower speed -> Something between 2 - 5 Seconds.  Appearing:   Disappearing:   The Dock are the complete Time connected.  Exact behavior: It's blinking when I have connected my Laptop to the WD19 Docking Station. It's not blinking when I connect my Laptop ONLY to the normal Power Cord or have NO connection to Dock and Power Cord. But it's also blinking when I connect to the Docking Station AND the normal Power Cord.  Do anyone knows what this means? And how can I stop this? It's really annoying when some icons jumping all the time left and right!  Here I found some logs. Maybe this is the Event:


Good night,  I've been studying a bit more about LaTeX, more specifically about TikZ and how to create images with it and I've come across this image on the manual:    The image above is on the 90th page of the manual (V 2.10).  The image above got my interest because I might teach statistics next semester and this could be a different way of showing data to my students but I didn't find it's code in the manual so I could study it (I'm afraid of having missed it though).  How can I draw something similar to that in TikZ? Thanks in advance.

I really like the 'ring chart' or 'wheel chart' given as an example on page 88 of the PGF manual. It is like a pie chart, but with a label in the centre. Unfortunately, the manual doesn't give the source for that chart. Does anyone have an example? Thanks.


Please help :/  I have an ASUS x550c laptop with a MediaTek MT7630e wifi card. The wired internet works, but wireless doesn't. I have tried all the online solutions and none of them work. Since I need this laptop for work I am very close to giving up and going back to Windows :/  I've also seen this bug, doesn't give me encouragement that it's been sitting unresolved like this for the last 9 months:   What I am asking for here:   Are there any news on this bug or is there anybody that has a similar setup that managed to get wireless working on their laptop? Is there an alternative, like a WiFi USB stick or an adapter that can be plugged in into the ethernet port (and that works with Ubuntu)? I am willing to try anything as long as it doesn't entail having access to routers (I am imagining a scenario in a hotel where this is not possible) Is there a Linux distro that would work with this setup/card? (not sure if this is ok to ask here but I am desperate)   A few symptoms:   "rfkill list all" doesn't show anything after I did the first answer from here:  I bought this USB stick:  and since it doesn't have Linux drivers (Hardware B1) I downloaded ndiswrapper and tried installing XP drivers through that - didn't work. Fn+F2 button doesn't work, WiFi lamp doesn't turn on   Thanks for your time!!

It worked with the pre-installed Ubuntu, but after re-installing Ubuntu dual-boot with Windows 8.1, the WiFi is not working.  Is there a driver for this adapter that will work on Ubuntu 12.04?


Why int array[1000][1000] is memory issue in C program when it is declared in main method instead of global declaration?

The following code is generating a stack overflow error for me  int main(int argc, char* argv[]) {     int sieve[2000000];     return 0; }   How do I get around this? I am using Turbo C++ but would like to keep my code in C  EDIT:  Thanks for the advice.  The code above was only for example, I actually declare the array in a function and not in sub main.  Also, I needed the array to be initialized to zeros, so when I googled malloc, I discovered that calloc was perfect for my purposes.  Malloc/calloc also has the advantage over allocating on the stack of allowing me to declare the size using a variable.


I'm new to this site. Although I  had made my account almost 6 months ago,  I've started using stackexchange only very recently (about 10-15 days). I'm active particularly on stackexchange mathematics. The reason why I'm writing this is I want to know in what ways can a person lose reputation on any stackexchange website? I had a reputation of 717 on stackexchange mathematics but the moment I refreshed the page I lost about 20 points and my reputation came down to 697. No-one has downvoted any of my posts. I do not have any problem with losing reputation but I should like to know where I lost 20 points without any reason?

If I am concerned that my reputation score is incorrect, how can I audit it, or get a report of a detailed breakdown of my reputation?


I want to launch different activities depending on the values of 2 EditText fields on the start activity, one should start for admins, the other for all other users.  I think you 'll understand better seeing the code I 've done so far:  package com.example.xxx;  import android.app.Activity; import android.content.Intent; import android.os.Bundle; import android.widget.Button; import android.widget.EditText; import android.view.View;  public class MainScreenActivity extends Activity {      EditText USERNAME, PASSWORD;     String username, password;     Button btnLogin;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_login);         USERNAME = (EditText) findViewById(R.id.username);         PASSWORD = (EditText) findViewById(R.id.password);          // Button         btnLogin = (Button) findViewById(R.id.btnLogin);           // login click event         btnLogin.setOnClickListener(new View.OnClickListener() {              @Override             public void onClick(View view) {                 // Launching next activity                 if (USERNAME="admin" && PASSWORD="1234") {                     Intent i = new Intent(getApplicationContext(), admin.class);                     startActivity(i);                  } else {                  Intent i = new Intent(getApplicationContext(), user_form.class);                 startActivity(i);                 }             }         });     } }   The error is at the if statement, on PASSWORD="1234" says "Incompatible operand types EditText and String". I also tried password="1234" and password.toString="1234" but no luck.  I'm not even sure if I'm to use 'USERNAME' and 'PASSWORD' or 'username' and 'password'. How can I make this work?  EDIT: Ok now the code is correct, having if (USERNAME.getText().equals("admin") && PASSWORD.getText().equals("1234")), but the application always opens the user_form activity, and not the admin, even though I input the specific values. Where is the mistake?

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


Problem:      Suppose that for every $n\in\mathbb{N}$, $a_n\in\mathbb{R}$ and $a_n\ge 0$. Given that   $$\sum_0^\infty a_n$$   converges, show that    $$\sum_1^\infty \frac{\sqrt{a_n}}{n} $$   converges.   Source: Rudin, Principles of Mathematical Analysis, Chapter 3, Exercise 7.

Let $a_1,a_2,a_3,\ldots$ be reals. Prove that if $\sum_{n=1}^{\infty} a_n^{2}$ converges, then so does $\sum_{n=1}^{\infty} \frac {a_n}{n}$.   For this I have shown the case for when $ a_n^{2} \le\frac {|a_n|}{n}$ $\Rightarrow$ $ |a_n|\le\frac {1}{n}$ $\Rightarrow$ $\frac {|a_n|}{n} \le \frac{1}{n^{2}}$ and we know that $\sum_{n=1}^{\infty} \frac {1}{n^{2}}$ converges and hence $\sum_{n=1}^{\infty}\frac {a_n}{n}$ converges by the comparison test. Now considering $ a_n^{2} \ge\frac {|a_n|}{n}$ $\Rightarrow$ $\frac {|a_n|}{n} \le a_n^{2}$ $\rightarrow$ combining the two cases for any n we have: $\frac {|a_n|}{n}\le\frac{1}{n^{2}}+a_n^{2}$ Hence using the comparion test again we know that $\sum_{n=1}^{\infty} a_n^{2}$ converges and $\sum_{n=1}^{\infty} \frac {1}{n^{2}}$ converges hence the sum converges so we can conclude that $\sum_{n=1}^{\infty} \frac {a_n}{n}$ is absoluetly convergent $\Rightarrow$ convergent.  Not to sure if this is correct, any help would be much appreciated, many thanks.


When starting out at level 1 everyone gets a single BAB, indicating they can only do 1 attack.  Once a characters BAB reaches 6, they get another BAB at 1.  Now, does that mean that a level 1 rogue with TWF gets 2 hits (one with each hand) or do they get more, then with the 2nd BAB at level 6 they get 3 attacks or...?  TWF is confusing me and the text isn't helping. Any clarification would be great!

I'm quite confused about attacking with two weapons in both hands and wondering what is required to be able to do to (in Pathfinder).  1. Base Attack Bonus Looking at the base attack bonus tables for different classes (e.g. the ) it seems like up to +5 you get only one attack per full action but starting from base-attack-bonus of +6 you get a second attack with +1.  2. Feats There is a feat . The existence of the feat sounds like you could not do two-weapon-fighting without it. However, in the description of "normal" it says:     If you wield a second weapon in your off hand, you can get one extra attack per round with that weapon. When fighting in this way you suffer a –6 penalty with your regular attack or attacks with your primary hand and a –10 penalty to the attack with your off hand. If your off-hand weapon is light, the penalties are reduced by 2 each.   3. Core Rulebook Chapter about combat If I understand the  it says that you need a full-round action do attack with both weapons in two hands.  So how do these things interact? Can I only attack with my off-hand weapon if my base-attack-bonus is high enough that I get second one with +1?  If not, how does the "multiple attacks from high base-attack-bonus" interact with dual-wielding? Assuming I reached a state of base-attack-bonus with +11/+6/+1 and have a full-round action to attack. Does that mean I can either attack with my primary weapon three times or use the primary weapon and off-hand weapon to attack only twice? Why would I then ever choose dual-wielding? Or can I attack three times with both weapons (leading to a total of 6 attacks with heavy malus) Or would I get 3 attacks with the primary weapon + 1 attack with the off-hand weapon? If so, what attack bonus do I have to use for each of the attacks?


Say I want to find meta stackexchange. Is there any conspicuous link from main site to it's meta?  Is there such feature already?  I usually found that on google.

How do you expect users to:   Know that a site's meta-site exists (and what it's for)? Find the hyperlink to the meta-site?   I know it exists, of course, and how to get there; I'm wondering how (or even whether) you expect new or naive users to do that.  I think there isn't a link to Meta from the main site, am I right (except one link in the "list of all 171 Stack Exchange sites" drop-down menu on the toolbar)?  Sometimes I tell people to post a question on Meta instead of on the main site -- I don't realise that they may not know that Meta exists, and that if they do (because they've been there before) they don't know how to get there (because they haven't yet investigated everything on the toolbar).


I have this warning each time I run apt update on Ubuntu 20.04.2 : N: Skipping acquire of configured file 'universe/binary-i386/Packages' as repository 'http://miktex.org/download/ubuntu focal InRelease' doesn't support architecture 'i386'  I know that I need the i386 arch for certain packages, but I would like to know if it is possible to prevent apt to scan the i386 release of the miktex Is it possible to do that?

I am trying to use a file repository for updating linux/ubuntu on a non-connected machine. The architecture for this machine (uname -a):  x86_64 GNU/Linux   The results of dpkg --printarchitecture are:  amd64   It is a Trusty Tahr amd64 machine, and it specifically says this, for example, in the aptitude sources.list file. Also, the "About this Computer" in ubuntu specifically says the machine is 64-bit. So, I installed the amd64 packages on the machine. However, when I try to do apt-get update, I get errors such as:  W: Failed to fetch file:/var/spool/apt-mirror-trusty/mirror/archive.ubuntu.com/ubuntu/dists/trusty/main/binary-i386/Packages  File not found   So, in other words, even though it is a 64-bit machine, apt is inexplicably trying to read i386 packages. Why is it doing this and how can I make it use the 64-bit packages?  Note that there is nothing in sources.list that specifies i386.  The only uncommented line in the sources.list file is:  deb file:///var/spool/apt-mirror-trusty/mirror/archive.ubuntu.com/ubuntu trusty main restricted universe multiverse


I just registered an account at Stack Exchange.com. So far I only joined two network sites (meta, and cross validated). I somehow understand how the login system works for the network sites. What I don't get is why I get automatically logged in although I explicitly logged out of all sites.  It goes like this: I log out explicitly of any site and of Stack Exchange.com. When I now click on 'log in' at Stack Exchange.com and choose 'log in with Stack Exchange account' it automatically logs in without asking for my password. The only thing I can do is to delete my browser history.  I find this very troublesome, since this makes using a shared or public computer (which I do from time to time) very unsafe.  Does anyone know what's up with this?

Every time I log in from a shared computer on Stack Overflow, I am not able to log out.  Even if I click log out, it takes me to the home page and when I click the login link it automatically logs me back in. I neither allow my browser to save passwords or nor to remember me.  I get this message each time     Welcome back user. Click here to refresh the page   Each time I have to clear all my cookies from my browser to log out from it. Why does this happen?


I have a huge number of files that were copied into an old OS X 10.6 server.  Problem is there are a large number that came over with a time last opened but no create or modified dates.  Is there a basic script to go through and change the create date to the last opened date?

Could you please let me know how I can change the creation date of a file in Lion.  I realise there is the touch-t command but that does not work in Lion.  A couple of people have mentioned another way, but I think they've written the solution in "coder" language rather than layman language - would someone be able to answer it in a way a layman can execute?   Many thanks for your help.


I know that in general if the correlation of two random variables is zero, it is always true that two variables are independent, and it is possible to provide some examples which are dependent with zero correlation. However, all examples that I have seen, use nonlinear relation between two variables. Can we say if two random variables have zero correlation will be independent (not using nonlinear relation but linear model)?

If two variables have 0 correlation, why are they not necessarily independent? Are zero correlated variables independent under special circumstances ?  If possible, I am looking for an intuitive explanation, not a highly technical one.


So I'm installing a version of Linux Mint. I would like to edit the programs and files that are included in the ISO, because there is not always internet access. For example,  a very specific wallpaper, as well as Mine-craft, and Java (there's more, but this is where I'm leaving this). If this is impossible, how would I make a similar changes with a Distro builder?

I am looking for a archive manager that will allow me to look into the contents without needing to mount it and also to add or remove contents by drag and drop style. The Windows' equivalent would be PowerISO, MagicISO or even 7-zip.  Many people suggested mounting and then copying into another directory, add/remove files, and make image again. Is that the only way?


I am confused. I thought Spiderman's ability to shoot web was through biologically built-in nodules in his wrists due to the mutations that happened when he was bitten by the spider.   But then in MCU films and the most recent Spider-verse film by Sony, we see that he's using artificial shooters on his wrists.   So which is more original to Spider-canon? Is his ability to shoot/produce web supposed to be biological as part of the mutation? Or was it always artificial?

When Spider-Man spurts web from his wrist to swing through the streets, does he use a cartridge fitted in his wrist, or is that a secretion of his body due to the radioactive spider bite?  In the Spider-Man movie, his wrist looks like it’s secreting the web, but in the Spider-Man game we have to collect cartridges to refill the web. Also in the game, even if the cartridge is not filled, some minimum amount of web is still there. Also in the latest movie, The Amazing Spider-Man, I think he uses a web cartridge fitted in the wrist.


I am using StringBuilder to show comma between records, but also getting comma at the end of Last Record  How to control on this ? I don't like to see comma at the end of last record - because it's useless     for (int i = 0; i < arrayList.size(); i++) {          String name = arrayList.get(i).getName();         int price = arrayList.get(i).getPrice();          stringBuilder.append(strName);         stringBuilder.append(" - "+price+",");      }          stringFinal = stringBuilder.toString();

While working in a Java app, I recently needed to assemble a comma-delimited list of values to pass to another web service without knowing how many elements there would be in advance. The best I could come up with off the top of my head was something like this:  public String appendWithDelimiter( String original, String addition, String delimiter ) {     if ( original.equals( "" ) ) {         return addition;     } else {         return original + delimiter + addition;     } }  String parameterString = ""; if ( condition ) parameterString = appendWithDelimiter( parameterString, "elementName", "," ); if ( anotherCondition ) parameterString = appendWithDelimiter( parameterString, "anotherElementName", "," );   I realize this isn't particularly efficient, since there are strings being created all over the place, but I was going for clarity more than optimization.  In Ruby, I can do something like this instead, which feels much more elegant:  parameterArray = []; parameterArray << "elementName" if condition; parameterArray << "anotherElementName" if anotherCondition; parameterString = parameterArray.join(",");   But since Java lacks a join command, I couldn't figure out anything equivalent.  So, what's the best way to do this in Java?


When I installed Windows 10, I created edited the HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\Personalization registry key by adding a NoLockScreen DWORD value and set it to 1. This had the effect of disabling the sliding panel on the lock screen, so that when my computer booted up or I locked my session, I would be presented with the password entry screen immediately (without having to press a key to slide the panel out of the way).  Unfortunately, the recent Anniversary Update seems to have undone this. I've tried deleting the value and re-adding it, but the lock screen is still present.  Is there some other way to remove the sliding-panel over the lock screen in Windows 10 which works for versions after the Anniversary Update?  I don't seem to have the local group policy editor in my version of Windows 10 Professional (possibly because I have the 32-bit operating system?).

The Windows 10 "anniversary update" is coming out tomorrow and according to some  the group policy to disable the lock screen is no longer effective on anything below the Enterprise edition. I'd like to know what options/workarounds are left to disable this nonsense on Pro editions.  Regards.


Problem: Find all values of $b$ for which the equations $1988x^2 + bx + 8891 = 0$ and $8891x^2 + bx + 1988 = 0$ have a common root. What I have done so far: Let the roots of the first quadratic be $r_1$ and $r_2$, and the roots of the second quadratic be $s_1$ and $s_2$. We have the following equations.  $r_1+r_2 = \frac{-b}{1988}$ $r_1r_2=\frac{8891}{1988}$ $s_1+s_2 = \frac{-b}{8891}$ $s_1s_2 = \frac{1988}{8891}$  Without loss of generality, we can let $r_1=s_1$, but I am not sure how to solve these equations after that. Tips?

$1988x^2  + bx +8991$ and  $8991x^2 +bx + 1988$  have a common root, what are the possible values of b?  I tried getting solutions using the quadratic formula and interchanged the $\pm$ to get the values of b but it seemed looked like i was bashing it and the numbers were getting too high. What is the proper approach to this problem?


This is a story I read back in the late 1990's or early 2000's. It was a sci-fi story and the plot was centered in a city. I believe it was on Earth. There were different tribes of Aliens that fought each other through proxy. Each tribe had augmented humans in different ways and used the humans to fight each other.  I believe there were also robots or cyborgs of some sort.  All of the humans had trackers in their wrists under their tendons. In order to escape, some of them cut the trackers out with a knife. At least one person was able to use a bit of psychic ability where they visualized the tracker being outside of their wrist and then it became so.  That's all I can recall.

I read a YA novel in the early 2000s that I think takes place on Earth some time in the future. The human race has been enslaved by some other race, possibly aliens. If I remember correctly, humans were kept as slaves for some purpose and then exterminated at age 16, and I think some girls were kept to breed.  I remember scenes of a band of teenagers walking around sewers fighting these aliens who bled a blue "ichor." The only thing I distinctly remember about the book was that it was the first place I saw the word "ichor."  This is a pretty sorry description; but does anyone have a clue what this book was?


I have gas powered hot water heat in a home I purchased. When I tested it this morning I got a lot of whistling and other noises that subsided for the most part. After the heat had run for 20-30 minutes, I checked it radiator in the house. All the radiators were at least warm, with the exception of one of the radiators upstairs.  What could cause this single radiator to not get warm at all? I noticed slight temperature variances between the other radiators, but this one seemed to not be warm at all. I assume it should get warm if the hot water is flowing through it, and I also assume the hot water must be flowing through it to complete the circuit. So, what gives?

Almost all of the radiators (forced water) in my house heat up fine. However, a single radiator needs regular bleeding (~1/day) in order to heat. Note, this radiator is not at the highest point in the house (it's a split level; I'd say it's around 3/4 of the way up), and radiators higher up are plenty hot.  Also, there no obvious water/corrosion stains around this radiator.  What might be causing this problem, and how do I fix it?


In the Star Wars universe can droids be Force-sensitive? Were there any droids that could use Force powers?  Is it possible in the Star Wars universe for a droid to become Force-sensitive?  What about androids if not droids? I think biological material is needed.

In the films, I only saw organic life forms become Jedi or Sith. Were there ever any droids who could use the Force? Or is that impossible because of the ?


Let's say we have a Foo class and we want to instantiate a lists of foos, which we can do as follows:  foo_list = [Foo()] * 3   Now what if we do foo_list[0].x = 5? This statement will set the attribute x to all of the instances inside the list!!!  When I found this it blew my mind. The problem is that when we create a list like that, apparently python will create the Foo instance first, then the list instance, and then append the same object to it 3 times, but I really would expect it to do something like this:  foo_list = [Foo() for i in range(3)]   Wouldn't you too? Well, now I know that definitely this syntactic sugar can't be used as I wanted to use it, but then, what is it used for? The only thing I can think of is to create a list with an initial size like this: list = [None] * 5, and that doesn't make much sense to me in the case of python.  Does this syntax have any other really useful use case?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I'm trying to calculate the force of a man falling from a bridge into water below. Thus far I've calculated everything except for the force he would experience hitting the water. Would I need to do some estimation to figure it out or what? I'm a little confused with where to go from here.  The final velocity of the body would be 40.07 m/s and the mass of the body is 78 kg. I imagine that's all you would need to be able to find the force since I calculated everything else already.

I'm calculating the force of a body hitting water from a high height. So far I've figured out the velocity at the time of collisions would be 40 m/s. The body is 78 kg. I seem to need the time it takes for it to accelerate to a stop after hitting the water but I can't find any concrete numbers for that, what would be a good estimation?


Prove $$\prod_{n=1}^\infty\cos\frac{x}{2^n}=\frac{\sin x}{x},x\neq0$$   This equation may be famous, but I have no idea how to start. I suppose it is related to another eqution:  (Euler)And how can I prove the $follwing$ eqution? $$\sin x=x(1-\frac{x^2}{\pi^2})(1-\frac{x^2}{2^2\pi^2})\cdots=x\prod_{n=1}^\infty (1-\frac{n^2}{2^2\pi^2})$$ I can't find the relation of the two. Maybe I am stuck in a wrong way,thanks for your help.

This limit seemed quite unusual to me as there aren't any intermediate forms or series expansions which are generally used in limits. Stuck on this for a while now .Here's how it goes :    $$ \lim \limits_{n \to \infty} \left[\cos\left(x \over 2\right)\cos\left(x \over 4\right)       \cos\left(x \over 8\right)\ \cdots\ \cos\left(x \over 2^{n}\right)\right] $$


I am trying to prove this (it looks true to me) :  Let $A,B $ be two sets. If there is a surjection $A\to B $ and a surjection $B\to A$ then $A $ and $B $ are in bijection.  I showed that is it equivalent to the following statement :  If there is an injection $A\to B $ and an injection $B\to A$ then $A $ and $B $ are in bijection.  But I am stuck, I don't see how to prove either.

Let $A,B$ be two sets. The  states that if there is an injection $f\colon A\to B$ and an injection $g\colon B\to A$, then there exists a bijection $h\colon A\to B$.  I was wondering whether the following statements are true (maybe by using the AC if necessary):   Suppose $f \colon A\to B$ and $g\colon B\to A$ are both surjective, does this imply that there is a bijection between $A$ and $B$. Suppose either $f\colon A\to B$ or $g\colon  A\to B$ is surjective and the other one injective, does this imply that there is a bijection between $A$ and $B$.


I have a content page say content type "spl content" which has few related pages(added using field entity reference). when i create page in admin I can link multiple pages to my page using  entity reference which i call in this specific case as related pages.  I have custom template for content type "spl content", here I get all the node ids of related pages but I want to access further details of the related pages.  Is it possible in twig template having path themes/custom/{themename}/templates/node--spl-content.html.twig to fetch details of related node?  I do get node ids of related pages by looping node.field_related_pages  {% for item in node.field_related_pages %}  {{item.entity.id}}  {% endfor %}   item.entity.id prints the node id of every related page. I need to have body content and other field of related page in this twig.  Any help is appreciated.

I'm trying to figure how I can get all the values inside an entity reference field  As shown in this image, I have an entity field called Target Participants(field_program_participants) with multiple values.    I have tried to output the values using node.field_program_participants.entity.label, but it only outputs one value.     How can I output all the values inside the field


I want to prove that $ e^x \ge 1+x $ for all $ x \in R $ , using Mean Value Theorem it can be proved for $ x \gt 0 $, and equality holds for $ x = 0$, however I can't solve it for $ x \lt 0 $

The elementary but very useful inequality that $1+x \le e^x$ for all real $x$ has a number of different proofs, some of which can be found online. But is there a particularly slick, intuitive or canonical proof? I would ideally like a proof which fits into a few lines, is accessible to students with limited calculus experience, and does not involve too much analysis of different cases.


I have problems with filtering LiDAR data within geoprocessing tools and python scripts. It simply doesn't work despite everyting looks correct. Filtering works only when I apply filter in properties of LAS dataset layer.  Here is an example of code which I'm using. I'm trying to filter only buildings class = 6. Sadly the result does not correspond to filter class values. In this example, result includes all classes unless I manualy filter LAS dataset in layer properties. Anyone had this problem?  # Process: Make LAS Dataset Layer lasDatasetLayer = arcpy.MakeLasDatasetLayer_management(inputLasd, "LasDatasetLayer", 6, "", "false", "true", "true", "false", "") # Process: LAS Dataset to Raster (2) rasterFromLas = arcpy.LasDatasetToRaster_conversion(lasDatasetLayer, "rasterFromLas", "ELEVATION", "BINNING AVERAGE NONE", "FLOAT", "CELLSIZE", "1", "1")   I've read similar Q&As but they don't mention MakeLasDatasetLayer tool problems:

I am trying to create a Digital Earth Model (DEM) using ArcPy under ArcGIS Pro 2, but I am running into some problems.   I can generate a DEM within ArcGIS Pro by selecting only the ground points under LAS files in the LAS dataset properties, but when I try to run the same code within ArcPy, it generates a DEM using all the points.   Any ideas how you select the return point type in ArcPy?   Here is the code that I have used.  arcpy.conversion.LasDatasetToRaster(lasd, "Test_arcpy_dem", "ELEVATION", "BINNING AVERAGE LINEAR", "FLOAT", "CELLSIZE", 10, 1)   As I said, this generates two different outputs, depending if I am in ArcGIS Pro or not.


I have an exercise in general topology as follows:  Let $f:X\rightarrow Y$ be a map between topological spaces. Assume that $X=\cup _{i\in I} X_i$ with $X_i$ closed subsets of $X$, and $f|_{X_i}: X_i\rightarrow Y$ is continuous for every $i$. We can prove that if $I$ is finite, then $f$ is continuous on $X$. However, do we have a counter-example when $I$ is countable?  Thanks for your help!

The gluing lemma for closed sets states:     Given a finite closed cover $\{A_i\}$ of a topological space $X$, together with continuous maps $\{f_i : A_i \to Y\}$ into some other topological space $Y$, there exists a unique continuous map $f : X \to Y$ whose restriction to each $A_i$ is equal to $f_i$.   Question: What is a good and simple counter-example when the gluing lemma fails in the case that $\{A_i\}$ is infinite, but countably so.  My attempt: I have only been able find a silly counter-example: let $\{A_\alpha\}$ be the collection of all points of $X = [0,1] \subset \mathbb{R}$, and let $f_\alpha = 0$ for all $\alpha$ except for $\alpha = \alpha_0$, for which $A_{\alpha_0} = \{0\}$ and $f_{\alpha_0} = 1$.


The set $\mathbb{N}$ is the set of nonnegative integers.  Let $ f : \Bbb{N} \rightarrow \Bbb{Q}$ be defined such that 1.) $f(2n) = \dfrac{1}{f(n)+1}$ for all integers $n>0$, and 2.) $f(2n + 1 ) = f(n)+1$ for all $n\in\Bbb{N}$. If $f(0)=0$, then determine the value of $n\in\mathbb{N}$ such that $f(n)=\dfrac{14}{5}$.

Let $f:\mathbb{N} \to \mathbb{Q}^+$ defined as follows : $$\begin{cases} f(0) = 0 \\ f(2n) = \dfrac{1}{f(n)+1} \\ f(2n+1) = f(n)+1 \end{cases}\,.$$ It is asked to prove the injectivity then the surjectivity of $f$.  After examining first values taken by $f$, I proved by induction that $f(2^k)=\dfrac{F_k}{F_{k+1}}$ where $(F_n)$ is the fibonacci sequence. Also one notes that if $m$ and $n$ have different parity then we can't have $f(m) = f(n)$ since $f(2\mathbb{N}) \subset (0,1)$ and $f(2\mathbb{N}+1) \subset [1,+\infty)$. Any ideas on how to finish the proof of injectivity and any thoughts about surjectivity are welcome. Thanks


Suppose that $W_1$ and $W_2$ are i.i.d. and $P(W_i>x)=x^{-1/2}$ and $x$ is greater than or equal to $1$ and $i=1,2.$ How do you show that $P(W_1+W_2>x)=(2\sqrt{x-1})/x$? I know it involves calculus either differentiation or integration but I am not sure how to go about it. Any ideas?  Also, how do I use this above information for W to show that the value at risk (VAR alpha) is super-additive for all alpha values within 0 and 1 meaning that How do I show that VAR alpha(W1+W2)>VAR alpha(W1)+VAR alpha(W2). Any ideas?

For long time I did not understand why the "sum" of two random variables is , whereas a mixture density function sum of $f(x)$ and $g(x)$ is $p\,f(x)+(1-p)g(x)$; the arithmetic sum and not their convolution. The exact phrase "the sum of two random variables" appears in google 146,000 times, and is elliptical as follows. If one considers an RV to yield a single value, then that single value can be added to another RV single value, which has nothing to do with convolution, at least not directly, all that is is a sum of two numbers. An RV outcome in statistics is however a collection of values and thus a more exact phrase would be something like "the set of coordinated sums of pairs of associated individual values from two RV's is their discrete convolution"...and can be approximated by the convolution of the density functions corresponding to those RV's. Even simpler language: 2 RV's of $n$-samples are in effect two n-dimensional vectors that add as their vector sum.           Please show the details of how the sum of two random variables are a convolution and a sum.


Since you cast the find familiar spell to get a familiar, is the familiar a magical effect? And if that is true, would you be able to target the familiar with the dispel magic spell and get the familiar destroyed/killed/dispelled?  Would this then be a good reason to cast find familiar at a higher level?

In D&D 5e, the spell Dispel Magic says     Choose one creature, object, or magical effect within   range.    The rest of the spell description explains that spells "on the target" of a level lower than that at which Dispel Magic was cast automatically end, and those of a higher level require a check.  This makes perfect sense when targeting creatures or objects which may have spells on them. But what does it mean to target a magical effect?  Does it mean that you can choose to target just one specific ongoing spell effect instead of stripping the whole shebang (clearing a negative spell from an ally with positive spells also in place, or a positive spell from an enemy who is under attack from a negative spell)?  Or, is this only for the special case of certain spells (like Imprisonment) which have effects which specifically mention being targeted by Dispel Magic, and since no effect is described otherwise? (This is a literal reading: a spell is a magical effect, but does not have spells on it, so the Dispel Magic effect has nothing to act on.)  Or — and I think this is a stretch — can magical effects which are not spells be dispelled by Dispel Magic? If so, what are the mechanics?


So, these are the questions:     $12$. Let $G$ be a nonempty set closed under associative product,   which in addition satisfies:   a) There exists an $e \in G$ such that $a.e=a$ for all $a \in G.$   b) Give $a\in G$, there exists an element $y(a)\in G$ such that $a.y(a) = e$. Prove that $G$ is a group.   I thought that this question is stupid since that's exactly the definition of a group. However, I was stumped after reading problem $13$. Question $13$ goes like this:     $13.$ Prove, by an example, that the conclusion of problem $12$ is false   if we assume instead: a') There exists an $e \in G$ such that   $a.e=a$ for all $a \in G.$ b') Give $a\in G$, there exists an   element $y(a)\in G$ such that $y(a).a = e$   .  After realising that I'll need to prove that $a.y(a)=y(a).a=e$ in question $12$, I thought:  In $12$ b), $a.y(a) = e \Rightarrow (y(a).a).(y(a).a) = (y(a).e).a = y(a).a$. So using $12$ a) $(a.e=a)$, we have $y(a).a = e$.  This part is certainly false since the same method proves that $13$ is also a group, and also it could be that $e$ may not be unique in $G$ so I cannot assert that $y(a).a=a$ (Am I correct about this?).  So, my question is what do I need to show here to prove that $G$ is a group. Not to ask too much, but I couldn't find any example for question $13$ either. I think that I'll need to find a closed set where $a.e=a$ does not necessarily imply $e.a=a$. But I'm hopeless.

I. Let $G$ be a nonempty set closed under an associative product, which in addition satisfies:  (a) There exists an $e\in G$ such that $a\cdot e=a$ for all $a\in G$.  (b) Give $a\in G$, there exists an element $a^{-1}\in G$ such that $a\cdot a^{-1}=e$.  Prove that $G$ must be a group under this product.  II. Prove, by an example, that right indentity element and left inverse does not imply that $G$ is group.  My solution:      I. Since $G$ is closed  set under an associative product, i.e. if $a,b,c\in G$ then $(a\cdot b)\cdot c=a\cdot (b\cdot c)\in G$. Taking $c=e$ we get $(a\cdot b)\cdot  e=a\cdot (b\cdot e)=a\cdot b \in G$. We have shown that $\cdot$ is binary operation.       Since $a\in G$ then $a^{-1}\in G$ and we have the following identities $$a^{-1}=a^{-1}\cdot e=a^{-1}\cdot (a\cdot a^{-1})=(a^{-1}\cdot a)\cdot a^{-1} $$   Then    $$ \begin{align} e &= a^{-1}\cdot (a^{-1})^{-1} \\ &= \left( \left( a^{-1}\cdot a \right) \cdot a^{-1} \right) \cdot \left( a^{-1}\right)^{-1} \\ &= \left( a^{-1}\cdot a \right) \cdot \left( a^{-1}\cdot \left( a^{-1} \right)^{-1} \right) \\ &= \left( a^{-1}\cdot a \right) \cdot e \\ &=a^{-1}\cdot a.  \end{align} $$   Thus we have shown that    $$ a\cdot a^{-1}=a^{-1}\cdot a=e. $$   Then we see that    $$ e\cdot a= \left( a\cdot a^{-1} \right) \cdot a = a \cdot \left( a^{-1} \cdot  a \right) = a \cdot e = a. $$       We have shown that for this set $G$ and the associative binary operation assumed to be defined on $G$, the properties of the existence of a two-sided identity element in $G$ and the existence  in $G$ of a two-sided inverse for each element of $G$ are satisfied. Therefore $G$ is indeed a group.   II. But II indeed is true. Lets take the set $G=\{a,b,e\}$ and define the product $\cdot$ by the following identities: $e\cdot e=a\cdot e=b\cdot e=e$ and $a^{-1}=b, \ b^{-1}=a$ and consider the following multiplication table for our set $G$  $\begin{array}{c | c c c c c} \hline\hline  & e & a & b  \\ \hline e & e & b & b & \\ a & a & a & e & \\ b & b & e & a & \\ \hline  \end{array} $  It's easy to verify that conditions of second problem hold for our $G$, however, $G$ is not group since we can show that $b=a$.  Is my reasoning above correct?  EDIT: Maybe this is a duplicate but I would like to know if my solution is true since I have solved it by myself. Especiaaly I am interested in the solution of the second problem.


Let $\alpha$ be an irrational number. There is a well-known result saying that $\{e^{k\alpha \pi i}: k\in \mathbb Z \}$ is dense in $S^1 $. In the  of this result, the Pigeonhole Principle can't guarantee that we can always choose $i>j$. So I wonder how we can prove that $\{e^{k\alpha \pi i}: k\in \mathbb N \}$ is dense in $S^1 $ by using that result or modifying its proof($\mathbb N$ is the set of natural numbers). Thanks in advance.

Let $q \in \mathbb C$, $|q|=1$ and $q^n \neq 1, \forall n \in \mathbb N$. Show that $\{q^n:  n \in \mathbb N\}$ is dense in $S^1$.  My attempt: As $(q^n)$ is limited, there is subsequence $(q^{n_j})$ convergent. So given $\epsilon > 0, \exists j_0 \in \mathbb N, \quad |q^{n_j} - q^{n_k}| < \epsilon, \quad \forall j,k \geq j_0$. Supose that $n_j > n_k$, then  $|q^{n_j} - q^{n_k}| = |q^{n_k}||q^{n_j - n_k} - 1| = |q^{n_j - n_k} - 1| < \epsilon, \quad \forall j, k \geq j_0$. So, there is a subsequence of $(q^n)$ that converges to $1$.  Using this fact, how can I ensure that for all $w \in S^1$ there is a subsequence of $(q^n)$ that converges to  $w$?


I have some pictures taken with my sony digital camera.They are blurry,Is there any way to fix that?

I have heard quotes which say "If its not good, delete it."  I go by that advice, but sometimes you capture some precious moment but you see that photo is slightly blurred because of camera shake. I don't have an IS lens, and it's too late to somehow do it over.  What best one can do in post processing to improve the quality of the picture?  Ideally, I'd like to use Gimp or Picassa for this.  Edit: I came across a video regarding this -


I was trying to install R-base but I'm facing unmet dependencies. I have tried all possible ways to uninstall and install, re-run mongodb services... but nothing worked. The installation shows an error. Uninstallation doesn't work. This is the error: Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  mongodb-org-server : Depends: libcurl3 (>= 7.16.2) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.  I have tried many solutions from Stack Overflow, but nothing works.

I am not sure what caused this error, but here is what the whole error says, and also this is sitting as a notification, and preventing me from updating any software using Update Manager - Please provide some assistance or tell me how to figure out what to do to fix it.  Could not calculate the upgrade  An unresolvable problem occurred while calculating the upgrade.  Please report this bug against the 'update-manager' package and include the following error message: 'E:Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.'


Is it possible to add on to the text of a label without changing existing text? I'm new to mac development in Xcode so any help is appreciated.

Are there any shortcuts to (stringByAppendingString:) string concatenation in Objective-C, or shortcuts for working with NSString in general?  For example, I'd like to make:  NSString *myString = @"This"; NSString *test = [myString stringByAppendingString:@" is just a test"];   something more like:  string myString = "This"; string test = myString + " is just a test";


Is there an official resource from where high resolution logos for the various Stack Exchange network websites can be obtained? I am talking about logos of network sites that are launched and have a custom logo available and not looking for generic logo that sites have which is currently in beta.  I am aware of the  page, but it contains icons only for a handful of main sites, such as Stack Exchange, Stack Overflow, Server Fault and Super User. Also, they do not contain the solid colored logos as seen on the landing screen of the Stack Exchange mobile apps.  It would be nice if both solid and full color variants are available. An example of what I am looking for:     The logos would be used for non-commercial purposes. While it would be possible to scrape off the resources from corresponding webpages, I am interested in knowing if they are available through more formal means.

On , there are download options for only certain logos/icons. Shouldn't this include all the graduated sites logos/icons? I think it should.


What is the easiest and fastest way? I'm definitely slower than the zerg player. I usually lose because I cheese(troll), and get discovered, but I usually don't lose. What is the best build order to defend roach rush, because I'm used to cheesing and not good at making a good base?

I recently saw an  that's even faster than the popular 5 roach rush build. This build gets to 7 roaches in about 4:40. How would I counter this build? I'm mostly Toss, but please suggest counters for any of the races.    Update: Apparently the original creators of the build optimization program are working on Protoss and Terran versions -


Suppose $f(x+y)=f(x) + f(y)$ for all $x,y \in \mathbb R$ and $f$ is continuous at a point $a \in \mathbb R$. Prove that $f$ is continuous at every $b \in \mathbb R$.   I know that in order to prove continuity we can use the definition that states that $\lim_{x\to b}f(x+y)=f(b)$ then the function is continuous however I do not know how to show that the limit will be $f(b)$ for the function. Thanks in Advance.

Suppose that $f$ is continuous at $x_0$ and $f$ satisfies $f(x)+f(y)=f(x+y)$. Then how can we prove that $f$ is continuous at $x$ for all $x$? I seems to have problem doing anything with it. Thanks in advance.


The square and circle below are tangent at one point and meet at four other points, as shown. If the side of the square is 8 units long, what's the radius of the circle?

An exam for high school students had the following problem:  Let the point $E$ be the midpoint of the line segment $AD$ on the square $ABCD$. Then let a circle be determined by the points $E$, $B$ and $C$ as shown on the diagram. Which of the geometric figures has the greater perimeter, the square or the circle?    Of course, there are some ways to solve this problem. One method is as follows: assume the side lengths of the square is $1$, put everything somewhere on a Cartesian coordinate system, find the midpoint of the circle using the coordinates of $E$, $B$ and $C$, then find the radius of the circle, and finally use the radius to calculate the circle's circumference and compare it to the perimeter of the square.   The problem with that method is that ostensibly this problem is supposed to be very simple; it shouldn't require the student to know the formula for the midpoint of a circle given three coordinates. Therefore the question here is: does there exist a simple way to solve the problem without knowing any complicated geometric formulas?


Just noticed this on superuser. Refreshed the page, still buggy. Using newest Firefox :-)

It appears that on Server Fault and Super User, the navigation bar and question title have suddenly become misplaced. The same does not occur on SO and mSO, nor on any of the other SE sites I spot-checked.  This is being seen in both Chrome and Firefox and just began occurring within the last few minutes.      What it should look like:      While this was fixed for a few hours, it has returned as of 22:05.


Show that a ring $R$ is a division ring if and only if, for each nonzero   $a\in R$, there is a unique element $b\in R$ such that $aba = a$.    $\Rightarrow$ Assume $R$ is a division ring. Let $a\in R$. So there exists $a^{-1}$ such that $aa^{-1}=1=a^{-1}a$. So $aa^{-1}=a^{-1}a$.   Now I am not sure to find a $b$ such that $aba=a$?  $\Leftarrow$ Assume $aba=a$ for nonzero $a\in R$. Let $r\in R$ such that $ra=1$. Then $a=aba=a(ra)=(ar)a$ so $ar=1$. Therefore $r$ is the inverse of $a$ and so $a$ is a unit and $R$ is a division ring.  This hinges on the fact that $ra=1$, is that something I can say?

Let $\left(A,+, \cdot\right)$ be a ring with $1$  that satisfies the following condition:  For any nonzero $a\in A$, there exists a unique $b\in A$ such that $aba = a$.  Show that $b$ also satisfies $bab = b$, and that all nonzero elements of $A$ are invertible.


Prove that it is impossible to find any positive integers a, b, c such that $(2a+b)(2b+a) = 2^c$.  This problem has been driving me crazy. Thanks for helping.

I have been boggled by this question for a while as well. Prove that $$(2a+b)(2b+a)=2^c$$  Is impossible.  I know that if a and b do exist then they must be even. I am trying to use this fact to contradict the statement. I haven also tried rewriting a and b as products of powers of twos and a odd factor