I mistakenly ran a command that made sudo no longer a set-uid binary and it's no longer owned by root and now I can use it at all. I want to go into grub to correct this but I can't access grub because my grub timeout is 0 and I can't change the grub config file because it requires root permission (sudo) to write to the file. Any ideas on solutions for any of these problems please? sudo chown -R adstefnum /usr  That's the command I ran.


Positioning tables inwithout default latex positioning mechanism

Hi I am querying about some suggestions regarding latex table placement. In m latex document I have an appendix section at the end of the paper. The appendix contains a couple of tables and a figure no text. I placed mu bibliography before the appendix. That was ok, but the guidelines suggests that I need to place the appendix before the bibliography. I did so, moved the appendix section before bibliography.  But after that the default lace handling mechanism of latex is placing the tables and figures in the appendix in the midst of the references which is not desired. I just want them to appear after the references. How can I force that?


In Lightroom, how can I automatically apply profile corrections on import?

I almost always want the profile correct applied, but it's an extra step. Any ideas on how to apply these automatically?


Showing that $A\cap B = A\setminus (A\setminus B)$

How does one show that $A\cap B = A\setminus (A\setminus B)$?  My thinking is that if $x\in A\setminus (A\setminus B)$ then this means that $x\in A$ and $x\notin A\setminus B$, which means that $x\in A$ and ($x\notin A$ and $x\in B$), but I don't see why the expression in parentheses should simplify to just $x\in B$. Any insight would be helpful.  Maybe $(x\in A^c$ and $x\in B)$, i.e, $x\in A^c\cap B$ is a possible simplification of the expression in parentheses, but still don't see why this simplifies to just $x\in B$.


Separable polynomial definition (Confused)

I understand there is a new and old definition of separable polynomial ().  For the following definition:  a) A polynomial over $F$ is said to be separable if it has no multiple roots. (given in Dummit & Foote)  b) a polynomial P(X) over a given field K is separable if its roots are distinct in an algebraic closure of K (Wikipedia)  c) A polynomial f in F[X] is a separable polynomial if and only if every irreducible factor of f in F[X] has distinct roots ()  Question) Which is the correct definition?  I can see that (b) implies (c), for instance, but not sure if they are equivalent.  Thanks for help.


ReactJS: Check if values of array is inside object

I have an object like this: let column = ["A", "B", "C", "D"]  validation: {     type: ...     id: ...     // and possible report that could exists or not     reportA: ...     reportB: ...     //other possible reports added }  I have a column of 4 label, and I have to check if in the validation object exists the report created for the column. So I should check if validation.report"column" exists, if it exists I save the value of the report["column"] in the state, also I'll do a call function. How Can I check if column has the corresponding report in the validation object? I have tried something like this:   column.forEach( value => {         if(this.state.validation + `report${value}`){          setState(....)      }    else{     this.getData(value)     }  it always print me as the data exists inside this.state.validation


Do the laws of cricket allow running on the last ball, even after winning?

Say, teamA score is 368 (369 to win), and teamB is batting at 368 (or 366). One run (or 3 runs) will make them win. The batsman hits the ball for a six, so score is 374 (or 372) which is more than the required 369. Even then the runs are counted for the team and for the batsman.  Now, on the last ball, suppose the batsman did not hit a six, but ran for a single : teamB will win. Can the batsmen continue to run until the ball is dead ?  Why will they want this ? (A) If batsman is at 98 and wants to reach a century. (B) If batsman has a career total of 9998 and wants to reach 1000 runs. (C) If the batsman has a very high record strike rate, and wants to remain at that record strike rate. (D) In the championship, this is the last quarterfinal, & even winning will put teamB equal to teamC, and the better runrate at the end of the quarterfinals will enable them to move to the semifinals. (E) Many similar situations can happen.  So coming back to the question : Do the laws of cricket allow running on the last ball, even after winning ?  In most of the matches I have seen, after winning, the batsmen do not even look where the ball is and start celebrating the win. If the rules did not allow them to run more, then fine. If the rules did allow it, then has there been any game where they did run more ?


Ubuntu 20.04 Kernel driver not installed (rc=-1908)

I use Virtualbox and yesterday it display me this error Kernel  driver not installed (rc=-1908) The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please reinstall virtualbox-dkms package and load the kernel module by executing 'modprobe vboxdrv' as root. If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system's documentation for more information. where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT. I found a lot of tips and tutorials but nothing wworks. I'm using Ubuntu 20.04


A contradictory integral: $\int \sin x \cos x \, \mathrm dx$

I've been thinking about integration lately, and I've come up with a question that I'm not sure how to address. Consider $$ \int \sin x\cos x \, \mathrm dx = - \int -\sin x \cos x \, \mathrm dx $$ I started with the integral on the left hand side, which suggests a typical $u$-substitution. Let $u=\sin x$ then $\, \mathrm du=\cos x \, \mathrm dx$. So the integral evaluates to $$ \int \sin x\cos x \, \mathrm dx = \frac{\sin^2(x)}{2} $$ But the original integral also suggests an alternate substitution. Let $u=\cos x$ and then $du=-\sin x \, dx$. So now $$ \int \sin x\cos x \, \mathrm dx =- \int -\sin x \cos x \, \mathrm dx= -\frac{\cos^2(x)}{2} $$ So now I have that the integral evaluates to two different functions. I've tried playing with some different trigonometric identities, but I haven't been able to show that this is true and I'm fairly certain I haven't had any success because the statement itself isn't true. What am I doing wrong? How do you evaluate $\int \sin x\cos x \, \mathrm  dx$?


I have a bike I purchased from a rental company about 8 years ago. It would have been three years old then, so that makes it a 2008 year bike. I could have sworn it was made by a medium end bike company, like Trek or Specialized, but I can't remember. I've also covered the bike in bumper stickers so I can't see the original graphics. I do have a logo from the front though.   It's a 24 speed but I really doubt that that matters. Here's a side view, but it just looks like a pretty generic bike to me.    I don't think it is a duplicate because I really don't care who made it, but the bike is for sale and a potential buyer may care.  This bike was rented, and later purchased, on Cape Cod, United States.


Proving $\lim_{n\to\infty} \|T^n\|^{\frac{1}{n}}$ exists and equals $\inf_n \|T^n\|^{\frac{1}{n}}$ for linear operator $T$ on Banach space

This is an exercise I have encountered in my functional analysis class.  Let $T$ be a bounded, linear operator on the Banach space $X$. We are asked to prove $\lim_{n\to\infty} \|T^n\|^{\frac{1}{n}}$ exists and equals $\inf_n \|T^n\|^{\frac{1}{n}}$ using the following steps   We define $a_n = \log \|T^n\|$ and we are asked to show $a_{m+n} \leq a_m + a_n$. This is simple using the fact that the operator norm is submultiplicative and we can take $log$ to get addition. I managed to do this.   For a fixed positive integer $m$ we define $n=mq+r$ for $q,r$ positive integers and $0 \leq r \leq m-1$. We are asked to use the previous step to establish $$ \limsup_n \frac{a_n}{n} \leq \frac{a_m}{m}. $$ This I could not do and I have no idea how to do this.   Finally, we are asked to show $\lim_{n \to \infty} \frac{a_n}{n} = \inf_n \frac{a_n}{n}$ and from this we are asked to conclude that $\lim_{n\to\infty} \|T^n\|^{\frac{1}{n}}$ exists and equals $\inf_n \|T^n\|^{\frac{1}{n}}$. This I also could not do and I have no idea how to do this.  Steps 2 and 3 have me stumped and I have no idea how to actually do them. I would appreciate all help with this. I thank all helpers. ****** Progress: I thought perhaps to normalize the operator $T$ so that $\|T\|=1$ and the powers have norm at most 1 so that the sequence $a_n \leq 0$ after taking $\log$. Can this make things simpler, and is this even allowed?


I've installed Ubuntu 14.04 LTS recently on my laptop and I can't connect to the internet via WiFi. I've used Wireless Info Script recommended here:  And I got following results:   What should I do to make my WiFi work?


Can we add "recommendations" to the list of "What kinds of questions should I not ask here" in the FAQ?

We already have the following in the FAQ under "":        every answer is equally valid: “What’s your favorite ____________?”   your answer is provided along with the question, and you expect more answers: “I use ____________ for ____________, what do you use?”   there is no actual problem to be solved: “I’m curious if other people feel like I do.”   we are being asked an open-ended, hypothetical question: “What if ____________ happened?”   it is a rant disguised as a question: “____________ sucks, am I right?”      Can we add the following to the list, the higher-up the better?        you are asking for a product/tool recommendation, such as "Any recommendations for a ____________" or "Can anyone suggest a ____________ ?"      As I type this, I realize that recommendations could fall under the first bullet point, "Every answer is equally valid", but this tends to be overlooked a lot.    In that case, instead of a new bullet point, could we update the first bullet point to something along the lines of:        every answer is equally valid: “What’s your favorite ____________?”, or “Can you suggest/recommend a ____________?”      This way, recommendations and suggestions are explicitly called out as invalid.


Counting homomorphisms between $\Bbb Z$ and $\Bbb Z_n$ and also between $\Bbb Z_n$ and $\Bbb Q$

Recently, I have tried to find out how many group homomorphisms exist from $\Bbb Z$ to  $\Bbb Z_n$ .   My argument goes like this: (in the following, $\tau$ and $\phi$ denote the well-known number theoretic functions)  Let, $\psi$ be such a homomorphism. Since $\Bbb Z$ is cyclic, hence $\psi{(\Bbb Z)}$ must be a cyclic subgroup of $\Bbb Z_n$ with the generator $\psi{(1)}$ . Using properties of Cyclic groups, we obtain that $| \psi{(\Bbb Z)}|$ can be any positive integer m such that $ m | n$ , hence there are in total $\tau (n)$ number of possibilities for  $| \psi{(\Bbb Z)}|$ and hence for $ o(\psi(1))$.   Let S denote the set of all positive integer divisors of n, i.e. $$ S = \{d \in {\Bbb Z}^+ : d | n \}$$ , then |S| =  $\tau(n)$ .  Again, since $\psi{(\Bbb Z)}$ is cyclic it follows that for each $d \in S$, we have $\phi(d)$ number of possible distinct images.  Since for each such image (for each divisor) it defines a homomorphism, the required number of homomorphisms are : $$\sum_{d|n} \phi(d) = n$$ and among these n homomorphisms , there are precisely $\phi(n)$ number of epimorphisms.  Conversely, from $\Bbb Z_n$ to $\Bbb Z$ I get that there exists only one homomorphism namely the 0 homomorphism.  Are my claims and arguments correct? If there is any mistake, please help me by correcting it.   I was also trying to find out how many homomorphisms exist from $\Bbb Z_n$ to $\Bbb Q$ i.e. precisely as group homomorphism and as ring homomorphism. Also, conversely, how many homomorphisms exist from $\Bbb Q$ to $\Bbb Z_n$ again as group homomorphism and ring homomorphism seperately and also how many out of these are epimorphisms (in each case).   Thanks in advance for helping.


End user cannot open a .xls report exported from Salesforce

Whenever one of my end users clicks "Export Details" or "Printable View" on a report and chooses .xls (default), the report will download. When she clicks on it to open, Excel opens but the area where the report should be is blank and gray. This happens will all Salesforce reports she exports. Exporting to .csv is working just fine. Also to note, she has Windows 7 Professional and Microsoft Excel 2010.  I logged in as her from my laptop and was unable to replicate the issue as everything worked fine for me. We did a screensharing session and I logged in as myself on her computer, but we still encountered the issue.  Any other .xls files are opening just fine for her in Excel. She mentioned she did a Windows update yesterday and that might have something to do with it. It's just curious that it's only happening with Salesforce reports.  Has anybody else encountered this issue? Do you think this is more of a laptop problem or a Salesforce problem?


How to best implement Equals for custom types?

Say for a Point2 class, and the following Equals:  public override bool Equals ( object obj )  public bool Equals ( Point2 obj )   This is the one that is shown in the Effective C# 3:  public override bool Equals ( object obj ) {     // STEP 1: Check for null     if ( obj == null )     {         return false;     }      // STEP 3: equivalent data types     if ( this.GetType ( ) != obj.GetType ( ) )     {         return false;     }     return Equals ( ( Point2 ) obj ); }  public bool Equals ( Point2 obj ) {     // STEP 1: Check for null if nullable (e.g., a reference type)     if ( obj == null )     {         return false;     }     // STEP 2: Check for ReferenceEquals if this is a reference type     if ( ReferenceEquals ( this, obj ) )     {         return true;     }     // STEP 4: Possibly check for equivalent hash codes     if ( this.GetHashCode ( ) != obj.GetHashCode ( ) )     {         return false;     }     // STEP 5: Check base.Equals if base overrides Equals()     System.Diagnostics.Debug.Assert (         base.GetType ( ) != typeof ( object ) );      if ( !base.Equals ( obj ) )     {         return false;     }      // STEP 6: Compare identifying fields for equality.     return ( ( this.X.Equals ( obj.X ) ) && ( this.Y.Equals ( obj.Y ) ) ); }


How to stop MAC address from changing after disconnecting?

so i change my MAC address with macchanger -A wlp68s0b1 at boot with crontab, here is what happens when i disconnect and reconnect :  while connecting after boot :  rahman@debian:~$ macchanger -s wlp68s0b1 Current MAC:   00:22:31:c6:38:45 (SMT&C Co., Ltd.) Permanent MAC: 00:00:00:00:00:00 (FAKE CORPORATION)   after disconnecting :  rahman@debian:~$ macchanger -s wlp68s0b1 Current MAC:   16:7b:e7:3c:d3:cd (unknown) Permanent MAC: 00:00:00:00:00:00 (FAKE CORPORATION)   after reconnecting :  rahman@debian:~$ macchanger -s wlp68s0b1 Current MAC:   00:00:00:00:00:00 (FAKE CORPORATION) Permanent MAC: 00:00:00:00:00:00 (FAKE CORPORATION)   and so on, and with every disconnect i get a different random MAC address which fades on reconnecting giving me my real MAC address , what causes that and how to stop it ?  some outputs :  rahman@debian:~$ lspci -nn |grep 14e4 44:00.0 Network controller [0280]: Broadcom Limited BCM4313 802.11bgn Wireless Network Adapter [14e4:4727] (rev 01) rahman@debian:~$ uname -a Linux debian 4.9.0-3-amd64 #1 SMP Debian 4.9.30-2+deb9u5 (2017-09-19) x86_64 GNU/Linux rahman@debian:~$ sudo ifconfig  enp0s25: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500         ether 00:24:c0:7b:a8:8b  txqueuelen 1000  (Ethernet)         RX packets 0  bytes 0 (0.0 B)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 0  bytes 0 (0.0 B)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0         device interrupt 20  memory 0xd4800000-d4820000    enp0s25:avahi: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500         inet 169.254.9.109  netmask 255.255.0.0  broadcast 169.254.255.255         ether 00:24:c0:7b:a8:8b  txqueuelen 1000  (Ethernet)         device interrupt 20  memory 0xd4800000-d4820000    lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536         inet 127.0.0.1  netmask 255.0.0.0         inet6 ::1  prefixlen 128  scopeid 0x10<host>         loop  txqueuelen 1  (Local Loopback)         RX packets 9436  bytes 6584515 (6.2 MiB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 9436  bytes 6584515 (6.2 MiB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  wlp68s0b1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500         inet 192.168.1.5  netmask 255.255.255.0  broadcast 192.168.1.255         inet6 fe80::6711:9875:eb78:24fc  prefixlen 64  scopeid 0x20<link>         inet6 fd9c:c172:b03b:ce00:f1e0:695e:7da0:91a  prefixlen 64  scopeid 0x0<global>         ether 00:00:00:00:00:00  txqueuelen 1000  (Ethernet)         RX packets 484346  bytes 641850809 (612.1 MiB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 368394  bytes 44259668 (42.2 MiB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  rahman@debian:~$ sudo iwconfig  lo        no wireless extensions.  enp0s25   no wireless extensions.  wlp68s0b1  IEEE 802.11  ESSID:"3bdo"             Mode:Managed  Frequency:2.447 GHz  Access Point: 9C:C1:72:B0:3B:D4              Bit Rate=65 Mb/s   Tx-Power=30 dBm              Retry short limit:7   RTS thr:off   Fragment thr:off           Encryption key:off           Power Management:off           Link Quality=54/70  Signal level=-56 dBm             Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0           Tx excessive retries:4  Invalid misc:183   Missed beacon:0


I deleted all partitions and I installed Ubuntu 12.04 LTS. Well, when I startup my PC, after the Ubuntu's logo, a black screen appears but I hear the log on sound.  If I restart and connect other screen, the OS starts sucessfully. Any ideas?  Thanks!


What is this Windows 8 icon for as rectangle icon in the title bar?

Every Window in Windows 8 got this icon if it gots the focus. When clicking on it, nothing seems to happen.   How does this icon work?


Batch file to compress WinSxS files that haven't been used in a while

I plan to compress unused files in the WinSxS directory because the directory is too big.  To do so I enabled tracking of last file access time (fsutil behavior set disablelastaccess 0). I'll use the PC normally for a few days, but will also try to use every program I occasionally use. Then I want to enable NTFS compression for all files in WinSxS that haven't been accessed in the last month.  To do this manually I need to change the owner, then grant permission to modify, then set compression attribute.   Does someone already have a reliable batch script that does this (going through files in C:/Windows/WinSxS/**/* last accessed before date, change permissions, and set compression attribute)?


Can someone guide me how i can connect two salesforce personal Org using REST Services.  Basically I have very little idea about Web Services.  But i want to integrate two Org using REST web service.  Thanks in Advanvce Guys


I have read that you cannot explicitly invoke the destructor on integral types: using myint = int; int a = 3; a.~myint();  Why does this compile?


I am trying to solve this problem and I seem to misunderstand the idea of kinetic friction.  A block is placed on a plane inclined at angle $\theta$. The coefficient of friction between the block and the plane is $\mu = \tan \theta$. The block is given a kick so that it initially moves with speed $V $horizontally along the plane (that is, in the direction perpendicular to the direction pointing straight down the plane). What is the speed of the block after a very long time?  I got that the kinetic friction is equal to the gravitational force along the plane which is $f = mg\sin \theta$. If you give a push horizontally (x-direction), instantly the kinetic friction is going to act on and decrease the velocity until it becomes zero. But wouldn't this kinetic friction also act along the y-direction of the plane? As the box moves in y-direction due to gravity of $mg\sin \theta$, the kinetic friction of equal magnitude will apply instantly on the opposite direction. How can the box move downwards and gain velocity when the kinetic friction will act right away as the box moves a little bit. I don't know why this box wouldn't be stuck in y-direction.


Can one prove that a group of order 150 is not simple using element counting?

I'd like to know whether it's possible to show that a group of order 150 is not simple using only element counting (or mostly element counting). I have seen a solution to this problem here   (), but the method is different.  EDIT:  By "element counting," I mean using Sylow's theorems to determine what $n_2$, $n_3$, and $n_5$ can be (other than 1; if any of these were 1, then we'd be done!) and then hopefully use this information to conclude that $G$ is simple.  (As user1729 points out below, the only chance seems to be to do something smart with the Sylow 5-subgroups.  I guess I am asking if anyone can think of such a smart thing to do!)


Reflection on static members of a generic type

I have the following class.  class MyClass<T> {     private static List<T> _Values;     public static List<T> Values     {         get { return (_Values = _Values ?? new List<T>()); }     } }   I have used it several times like this.  MyClass<Int32>.Values.Add(1); MyClass<String>.Values.Add("1");   Is there any possibility to retrieve all Lists of all types that have ever been used and are in the memory now using reflection?  Something like   var lists = typeof(MyClass<>)     .MemoryOccurrences()     .Select(x => x.GetStaticVariable("Values")); // two lists expected in this case


How to filter an object from an array based on a condition in javascript

I have an array of objects which is as shown below: this.clusters = [{ clusterId: "1a-2c-3c-4d", clusterName: "A", clusterType: "a", },  { clusterId: "1q-2q-3w-4a", clusterName: "B", clusterType: "b", },  { clusterId: "3h-5r-2j-9t", clusterName: "B", clusterType: "c", },  ] And I have another array which has the following data: this.unwantedCluster = [{  clusterName: "A"  clusterType: "c"  cluster_id: "1a-2c-3c-4d" }]  So, I want to filter out the clusters list and remove the unwantedCluster from that list. I have tried the below code for the same: this.clusters.filter(a=>{         this.unwantedCluster.map(b=>{           return ( b.cluster_id !== a.clusterId)         })       })  But, the above code is returning an empty array. I am not getting the desired result where the new clusters list will not have the unwantedCluster object.


Is there any standard / criteria of good forecast measured by SMAPE and MASE?

I have built a forecasting model for a company. Since it is dedicated to practical usage, I prefer to use the relative error parameter (like MAPE, SMAPE, & MASE) as a measurement for my model performance and display it on the dashboard (the percentage error is easier to understand by user). I found an interesting reference about the criteria of a good forecast result based on MAPE from Lewis (1982):  ...but in my case, I can't use MAPE for some dataset because there is some zero actual demand so it can't be used as denominator in MAPE. So, I use SMAPE & MASE instead, but I can't find any good references about good forecast result criteria based on SMAPE & MASE, nothing like above. So, I'd really appreciate any help/suggestion about it :), Thank You! Reference: Lewis, C. D., 1982. Industrial and Business Forecasting Methods. London: Butterworths.


Based on , someone posted a link to pic of the larger collage of ships the question was based on.    What is the ID of all these ships? Some are quite easy of course, like the Millennium Falcon, USS Enterprise and the TARDIS. But I'm not sure of all of them.   Can someone put numbers on the ships to make the identification easier?


Looking for a simple proof that groups of order $2p$ are up to isomorphism $\mathbb{Z}_{2p}$ and $D_{p}$ .

I'm looking for a simple proof that up to isomorphism every group of order 2p (p prime) is either $\mathbb{Z}_{2p}$ or $D_{p}$ (The Dihedral group of order 2p).  I should note that by simple I mean short and elegant and not necessarily elementary. So feel free to use tools like Sylow Theorems, Cauchy Theorem and similar stuff.  Thanks a lot!


13.04 stopped playing streams in Rhythbox and totem

The stream does not play in Rhythmbox nor totem. It played fine before the upgrade; it looks like a regression from . The streams play in mplayer and play fine when downloaded with wget and then opened in totem. I suspect there is either a bug in gstreamer, or I am missing some component of gstreamer, somehow.   Is this a known bug: if so where can I help debug it? What part, package or addong for gstreamer manages streaming of mp3? Is rhythbox using gstreamer at all? If not, I am probably looking in the wrong direction.


In an academic writing, is it correct to make reference to "the data itself", being that data is a plural noun and itself is a singular pronoun?


Cannot change permission to external hard drive on Ubuntu 18.04

I know this question has been asked before, but I cannot find a solution for Ubuntu 18.04  I have an external hard drive (FAT32) that had a default name with spaces that was making my life hell for scripting. So I manually changed the mount point to  /media/$user/Ext1TB but now I do not have write access to the disk and cannot save or modify the content. It used to work fine.  Things I have tried:  sudo chown -R $USER:$USER path/to/folder gksu nautilus (doesn't work on 18.04?) sudo chmod -R 777 /<folder name or path>   changing permissions through sudo nautilus (works but does not stay like that)  So I am a bit out of ideas. Any other suggestion that doesn't involve formatting?  I have already looked at the following posts:       Edit: Thanks to guiverc I now understand the problem with FAT32 permissions. I have tried the following with no result:  sudo mount /dev/sda1 /media/$USER/Ext1TB   should I add the -w? The help says it is implicit. Can somebody help with the mount call?  From what I understand of the post suggested to make it permanent I have to add or modify a line in fstab similar to this:  UUID=8C52-C1CD /home/storage auto   user,umask=000,utf8,auto  0   0   But I have no idea on how to build the line, find the correct UUID number and set the correct options. Any suggestion with that?


I'm a linux nubie. For some reason my /boot is really small. I need to do a software update but when I try it says I need to free space. here is what is on my /boot now. I'm not sure what I should remove. I took a screen shot of what is on my /boot, any help in what is extra and what I should remove is appreciated. thanks!


Find the number of ordered pairs of positive integers (x, y) that satisfy the equation (1/x) +(1/y)= 1/2004.

after some simplification, we get (2004y)/(y-2004)=x  and by looking at the prime factorization of 2004 we observe there are only 12 ways in which 2004 can be expressed as the product of two integers. which gives us 12 ordered pairs.But the answer is 45. how?(sorry for not using mathjax my browser does not support it)


I just installed Ubuntu for the first time and have no experience with linux. buntu@ubuntu:~$ sudo apt install gnome-tweaks Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package gnome-tweaks  I am trying to set up a bootable usb and I can't figure out why E: Unable to locate package gnome-tweaks keeps happening.


I'm new to latex and I was wondering is there a way to achieve something like this in latex? I have searched the internet but I achieve a good solution.  post is good but it didn't have written anything on the brackets. Thanks.


Can a pitcher switch throwing arms at any time during an inning, or in between pitches?

I have been playing baseball my entire life and I just thought of this question... if a pitcher is ambidextrous (can throw with both arms), is he/she able to switch throwing arms in the middle of an inning, game, or in between pitches?   I know that switch-hit batters are allowed to switch to the other side of home-plate at anytime before the pitcher is ready to pitch, but can the pitcher do the same?  Some pitchers like Billy Wagner had custom gloves made that had 6 finger slots so that he was able to use the glove on both hands at any given time, but when he pitched in games it was either left or right and not both.  Also, Billy could throw over 90 mph with both arms.  I mean if you have that god given ability why worry about changing your arm slot to try and trick the batter's view when you could just throw with the other arm?


I'm sure everyone is familiar with the Ship of Theseus paradox, basically "If you replace parts of a ship over time until none of the original ship is left, is the end product still the same ship?"  I just read pop philosophy books, so spare me if this is an idiotic question, but could this be applied to the Brain and consciousness? If you were the take individual atoms/neurons, and somehow replace them with its exact copy one at a time, how would the person experience that?   I don't think there would be an interruption of consciousness, but at the end it's a completely separate (but identical) brain from the one you started with. Exactly as if you had just cloned the whole thing, right? But without interruption.  What interests me is the gradual transition of consciousness here, is it possible to know how that would  work?  I think I remember hearing people argue similarly for both the existence of a transcendent soul and also AI consciousness. And the only other discussion I found of this was on a flat earth forum, so I don't know what to make of that.   I hope I articulated my question clearly. Thank you!


I'm using Salesforce functionality that you upload the attachment and I'm wondering is there anyway of setting strict requirements for the upload?  Is image must be 400px x 400px?


My code for presenting results looks like this:      private void presentResult(List<Long> result) {     if(result.size() == 0) {         System.out.println("No matching values for the provided query.");     }            for(String s : result) {         System.out.println(s);     } }   But I want to return a hashmap instead of a list so I want it to be like this:      private void presentResult(Map<LocalDate, Long> result) {     if(result.size() == 0) {         System.out.println("No matching values for the provided query.");     }            for(Map<LocalDate, Long> s : result) {         System.out.println(s);     } }   But then I get this error: "Can only iterate over an array or an instance of java.lang.Iterable" How can it be solved?


What is a capacitor doing in this circuit?

I'm trying to understand some Op-Amp circuits given in a PDF by NI that shows a collection of useful opamp based circuit configurations.   I'm confused about this one that says Inverting amplifier with high input impedance. My doubt is what is the purpose of using a capacitor in the feedback loop of this circuit? Doesn't this circuit behave like an integrator with the capacitor in that position? How is it contributing to high input impedance? Please help!


Detect unplugged network cable with Delphi 7

I am building an application which retrieves data from an sql server. The specifications are the app to be running in either one or more machines which, however, are in the same LAN with the one that the sql server is hosted. 5 days ago I faced the situation about what would happen if for some reason the network cable of either one of the computers that run the app, or the computer that hosts the sql server, gets unplugged. I realized that the application gets frozen and then Delpi-7 produces error messages. Eventually the app terminates in an unfriendly way.   I tried to find a way to handle this event trough the "connection:= false" of the ADO1 control or through the table events that the applications was retrieving at the time of disconnection but unfortunately I failed.  So I am asking whether there is a way to detect when the LAN network cable - or the connection with the sql server - gets loose, so to show a message to the user to inspect his connections and - In the worst scenario - to end the application in a more friendly way (e.g. using the "application.terminate" command).  Thank you in advance


This is a very simple but confusing puzzle.  A customer buys goods worth $200$ rupees from a shop. The shopkeeper selling these goods makes zero profit from this purchase.  The lady gives him a $1000$ rupee note.  The shopkeeper has no change, so he goes next door to another shopkeeper to get change for the $1000$ rupee note. He keeps $200$ for himself and returns $800$ to the customer.  Later, the second shopkeeper from next door comes back with the $1000$ rupee note with a stamp on it saying "counterfeit" and takes his money back.  How much loss does the first shopkeeper face?


Can I gift a game via the PlayStation Network?

Is it possible to "gift" a game (e.g., Castle Crashers) to someone through the PlayStation Network?  I don't have a PS3 but was considering buying Castle Crashers as a gift for a friend so that we could play co-op.  Is this possible?


What is the network address (x.x.x.0) used for?

It appears to be common practice to not use the first address in a subnet, that is the IP 192.168.0.0/24, or a more exotic example would be 172.20.20.64/29.  The ipcalc tool I frequently use follows the same practice:  $ ipcalc -n -b 172.20.20.64/29 Address:   172.20.20.64          Netmask:   255.255.255.248 = 29  Wildcard:  0.0.0.7               => Network:   172.20.20.64/29       HostMin:   172.20.20.65          HostMax:   172.20.20.70          Broadcast: 172.20.20.71          Hosts/Net: 6                     Class B, Private Internet   But why is that HostMin is not simply 64 in this case? The 64 address is a valid address, right? And whatever the answer, does the same apply to IPv6?  Perhaps slightly related: it also appears possible to use a TCP port 0 and an UDP port 0. Are these valid or used anywhere?


Is there a term for word sets that are like a palindrome but for whole set of words?

I'm looking for a term that are like a palindrome but for whole set of words and not just letters  Examples:  Set 1   You do? Do you?   Set 2   Venture Capital Capital Venture   Set 3    List Item Item List   I've searched through the old questions and also googled quite a bit, but couldn't get a definitive answer. "Chiasmus" was a close one, but I'm not sure if it is the correct answer.  Also, thank you in advance since the comments form suggest that I avoid telling thanks in comments.


Install Alongside Windows or Something Else - Which should I use?

I have old notebook with BIOS (not EFI) installed with Windows 8 RTM, want to install Ubuntu 12.10 by booting to a LiveCD.   Doing some research, I found method either to choose Something Else or Install Alongside... Which method should I use?


hope I am right in this section.  I am unsure with error propagation. When calculation the error in a titration, many errors has to be taken into account:  Error in Glassware/ Error in Balance/ Error in Burette etc.  I learned that the absolute and relative error have only 1 significant figure and that the total amount is rounded to the decimal place of the error.  Therefore 5.34532g ± 0.001428g would be 5.345g ± 0.001g  The relative error is 0.001g/5.345g = 0.00018709 = 0.0002 If there is an experiment with a lot of steps and error propagation wouldn't the rounding of all the errors in every single step change the result a lot? Wouldn't rounding the error just in the end make more sense?  Many thanks in advance.


how do you differentiate $\ln(x)$ using the difference quotient.

So the limit is as $h$ approaches $0$ of $\displaystyle \frac{\ln(x+h)-\ln(x)}{h}$, which simplifies to $\displaystyle\frac{\ln\left(\frac{x+h}{x}\right)}{h}$, which simplifies to $\displaystyle\frac{\ln\left(1+ \frac hx\right)}{h}$.  I got stuck here.  , how should I continue?


Is there a way to do credited graduate level math courses (not a complete program just couple of specific courses)

I have completed my undergraduate (bachelor's of engineering) degree. I am looking to go for a masters, but I lack some prerequisite math courses on my transcript. Is there a way to get credited math courses (like stochastic calculus, probabilistic theory, etc.)? I am from India, planning on applying mainly to european institutes. I have done good number of mathematical courses. But, lack only 2 courses for fulfilling the prerequisite. My planned universities dont have a pre master that I know of. Note: The most important part is being able to get the credits and transcript. As I cannot share just a certificate. I havent been accepted. I need to complete the courses to meet the prerequisite for my application.


Automatically switching proxy server settings

I have a local proxy server running on my network that I'd like to route web traffic through while I'm at home. I can do this under System Preferences > Network > Advanced > Proxies, Web Proxy (HTTP) and Secure Web Proxy (HTTPS).  However, I only want to use this proxy server when I'm on my home network. It seems that this setting persists even as I change Wi-Fi networks, unlike on iOS.   And I only want to use it when I am not otherwise connected to my office's VPN.  Is there a good solution for managing this for me?


I have a MeshRenderer mr public variable in script1. I dragged mesh1 from the assets in the mr place in the inspector of script1. mesh1 has a material mat1, I try to change this material to mat2 using this mr.sharedMaterial = mat2; but the material doesn't change. It only changes the material in the assets but not the one in the hierarchy, so in the runtime nothing changes. Any advice please?


The Equivalent Term for Pharmacy in the UK

In the States, we use the term "pharmacy" or "drugstore," but what is the equivalent in the UK? I checked two sources, but came up with nothing.


Is it somehow possible to get better audio quality sound when Bluetooth headphones are on hands-free mode?  When it is audio only, sound quality is good (16-bit 44 kHz) but when I talk through the microphone, audio quality is changed to poor (16-bit 8 kHz) like an old radio. Or I do not hear something through headphones. I have Creative Sound Blaster Jam.  Simple, have set Bluetooth Audio Renderer (Bluetooth stereo audio), for playing, with Bluetooth Audio Input Device (Bluetooth Hands-free audio), for recording?


Windows 7 not selected as default on boot-up (dual boot)

I have successfully installed a dual boot on my HP 248 G notebook.   Ubuntu on SSD caddy  Windows 7 on HDD     When I start the notebook it starts with Ubuntu first. Is there a way I can set Windows to boot first by default?


While visiting technical sites to do my job I'm also learning spoilers from movies I want to see. Can you fix this? Current one pertains to movies.stackexchange.com and Infinity War.


According to the wiki on :   Redstone Wire powers itself, the block below it, or the block it is pointing to.   I'm having trouble understanding what this is saying.  According to the statement, it sounds like only a one of those three things is ever true at once per redstone wire.  However, from my testing it appears redstone can power both the block it is in and the block below it at the same time.  I've also noticed that the block below redstone wire can activate a piston next to it (or a redstone torch), but not a redstone wire running next to it (i.e., if you have a block between preventing the redstone wire from running down from the upper block to the lower block).  So what are the conditions that determine whether the block below redstone wire becomes powered?  And is there a difference between a "powered" block from redstone wire versus powered blocks from other sources?  What am I missing in my mental model of how redstone transmission works?


I'm running into an issue with my dissertation. I'm using a template created to format my dissertation according to the University's guidelines. When I format it using the twoside argument for the class, I get my list of figures and List of Tables pages each with an extra page afterward saying List of Figures - Continued, but there is nothing else on the page. This only happens with the twoside argument.


Create custom list in sharepoint with a list template using JQuery

I need to create a custom list in Sharepoint 2007 using JQuery (only!) using a custom list template. I'm using Sharepoint 2007. Is there any way to do it? I already know to create the list and update columns as said at


first excuse me for my bad english (i speak spanish).  I am trying submit a form uploading with an image.  When i want send normal data (how text string) i do this:  First import modules:  import urllib.request  import urllib.parse  import http.cookiejar   Preparing cookies and headers:  cj = http.cookiejar.CookieJar() open = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(cj)) abriendo.addheaders = [("User-agent","Mozilla/5.0")] urllib.request.install_opener(open)   Encode the url data, i use the id (it is in the web form html )  valor1 = {"username":"test1","password","hello"} valor2 = urllib.parse.urlencode(valor1) finalvalor = valor2.encode("UTF-8")   Now can send post data (remember, this is an example with string data)  nav = urllib.request.urlopen(url,finalvalor) navread = str(nav.read())   Url variable have the post url  This work good, but i have problems to send a image.  The web form start with this code:   <form enctype="multipart/form-data" onsubmit="return ver('espera');"           action="example.php" method="post">     <input type="hidden" name="MAX_FILE_SIZE" value="5300000">

                 <input size="25" id="uploadFile1" name="uploadFile1" type="file">   I do  dicc = {"uploadFile1":open("1.jpg","rb")} nav = urllib.request.urlopen(url,dicc) navread = str(nav.read())   Have this Error:  ValueError: Content-Length should be specified for iterable data of type <class 'dict'> {'uploadFile1': <_io.BufferedReader name='1.jpg'>   I try to encode the data ( enconde dicc how normal url ) but not work (do not send any data). I surfed in googe and i think that binary data need to encode to base64 ??  Finally, the question is, how can upload a image with urllib.request module?  Thanks for read.


What is the recommended way to use VeraCrypt in Ubuntu?

I have a number of encrypted volumes on external media encrypted either with TrueCrypt or VeraCrypt. What is the recommended way to install and use VeraCrypt under Ubuntu?


Physical meaning of Legendre transformation

I would like to know the physical meaning of the , if there is any? I've used it in thermodynamics and classical mechanics and it seemed only a change of coordinates?


Find maximum value of $\int_{0}^{1}\left(f(x)\right)^3dx$

Find maximum possible value of $\int_{0}^{1}\left(f(x)\right)^3dx$ given that $-1\leq f(x)\leq 1$ and that $\int_{0}^{1}f(x)dx=0$.  My attempt:  I tried to guess such functions which could satisfy all the above conditions but could not arrive at any conclusion.


Reflect the specific of meta sites on meta site’s top banner

I take an Academia site for an example, but almost any other site is affected. To check the issue just open sites in browser private mode.   I noticed that top banner of main and meta sites are the same except of site names:                    But the right banner for meta says that site is used for discussion of main site. I suggest to reflect this specific in the top banner too:        In particular it possibly can prevent (or at least reduce) posting a question on meta sites instead of main for some newbies than already has 5+ rep to participate on meta. I’ve seen small amount of post on ruSO.meta which should be questioned on main sites instead. And think that same behavior can exists on any SE site.


Update profile information - Calling Update profile information on Meta Stack Exchange profile does not get dynamic anchor links

When navigating to your own network profile and selecting Update profile info from a profile which has formatting i.e. links, it doesn't seem the formatting is copied over to the Stack Exchange profile.  I imagine the generic Stack Exchange profile is different from Meta.StackExchange where Meta is an actual community, so it has its own profile. I'm not sure if this is expected? I am filing a bug anyway, but feel free to close if this is expected.  Stack Overflow Profile:    Stack Exchange Profile:


Java string, insert a dash after every 8 characters, starting from the right

What's the best way to insert a - (dash/minus character) after every 8 characters in a Java String, starting from the right?  Examples:  1111 -> 1111 111111111 -> 1-11111111 1111111111111111 -> 11111111-11111111 100001111111111111111 -> 10000-11111111-11111111   My attempt, to show that I have tried doing it myself (a comment below asks: "is this homework?":  import junit.framework.TestCase; public class InsertCharacterAfterEveryNCharacters extends TestCase {   public static String insertSpacerAfterNCharactersFromTheRight(char spacer,       int spacing, String string) {     final int length = string.length();     final int newStringCapacity = length + (int) Math.ceil(length / (double) spacing);     StringBuilder stringBuilder = new StringBuilder(newStringCapacity);     for (int i = length - 1; i >= 0; i--) {       stringBuilder.append(string.charAt(i));       if (i % spacing == 0 && i > 0) {         stringBuilder.append(spacer);       }     }     return stringBuilder.toString();   }   public static void testInsertSpacerAfterNCharactersFromTheRight() {     assertEquals("", insertSpacerAfterNCharactersFromTheRight('-', 8, ""));     assertEquals("1", insertSpacerAfterNCharactersFromTheRight('-', 8, "1"));     assertEquals("11", insertSpacerAfterNCharactersFromTheRight('-', 8, "11"));     assertEquals("11111111",         insertSpacerAfterNCharactersFromTheRight('-', 8, "11111111"));     assertEquals("1-11111111",         insertSpacerAfterNCharactersFromTheRight('-', 8, "111111111"));     assertEquals("11111111-11111111",         insertSpacerAfterNCharactersFromTheRight('-', 8, "1111111111111111"));   } }


View full text of long notification bubble

I use npm tool of laravel called mix, to transform JS ES6 to ES5  When there is error during transformation the npm tool popups system message (Like when I connect to Wifi etc..)  Now the message is long so not all the message shown in the popup I need to see the all message, how can I achieve that?  In mint I have in the bar an icon with all errors but in Ubuntu I didn't find anything like that.  I tried to look in system logs but nothing is there  Screen shot of the message    Thanks


generating 40 MHz clock from 50 MHz in VHDL

In VHDL how can I get a clock frequency of 40 MHz if my onboard clock is 50 MHz. I know how to divide the frequency by integers but this case is dividing by 1.25. I am using this for VGA so I think it's important that it is precise. thanks!


What kind of pump works for hard to reach kids valves?

Could you recommend a pump that can inflate this?  I want to jump off a bridge right now :/


Question about Galois group of a splitting field

I have a question about Galois group. Actually, we are considering : $P(X) = X^6-5$. The roots on a algebraic closure are : $X = \{5^{\frac{1}{6}}, z_65^{\frac{1}{6}}, ..., z_{6}^55^{\frac{1}{6}} \}$, where $z_6$ is a primitive root of $X^6-1$. Let $L =   \mathbb{Q}(5^{\frac{1}{6}}, z_65^{\frac{1}{6}}, ..., z_{6}^55^{\frac{1}{6}}) = \mathbb{Q(5^{\frac{1}{6}}, i\sqrt3)}$. Now, we want to find the Galois group $G=Gal(L/\mathbb{Q})$.  I've take $\sigma \in G$. So $\sigma_{|\mathbb{Q(5^{\frac{1}{6}})}}$ is a morphism, which is detemined by $\sigma(5^{\frac{1}{6}})$, so we have 6 possibilities $\sigma(5^{\frac{1}{6}}) \in X$. And then, I would like to extend, in a certain way, the restriction of $\sigma$ on $\mathbb{Q(5^{\frac{1}{6}}})$, to the real $\sigma$. We can notice that $\mathbb{Q(5^{\frac{1}{6}}}) \cap \mathbb{Q}(i\sqrt3) = \mathbb{Q}$. So, I would like to extend the little morphism to the big one, saying that :  $\sigma : (5^{\frac{1}{6}}, i\sqrt3) \rightarrow (5^{\frac{1}{6}}z_6^k, +-i\sqrt3)$   is well defined, and go all over the elements of $G$.  But actually, I can't see why this morphism would be well defined. Actually, the condition $\mathbb{Q(5^{\frac{1}{6}}}) \cap \mathbb{Q}(i\sqrt3) = \mathbb{Q}$ seems to be not enough to conclude, as we can see it through the example of $\mathbb{Q}(j, 2^{\frac{1}{3}})$.   So, how to conclude ? And if this way to proceed is not the good one, how to find the Galois group ?  **Edit ** Or maybe, I can conclude by saying that we know that $[L:\mathbb{Q}] = 12$ cause $[L:\mathbb{Q}] = [L : \mathbb{Q}(5^{\frac{1}{6}})] [\mathbb{Q}(5^{\frac{1}{6}}) : \mathbb{Q}]$, and $[\mathbb{Q}(5^{\frac{1}{6}}) : \mathbb{Q}] = 6$ and the first one is $\geq 2$, and as $|G| \leq 12$, we can conclude ?


How to prevent code injection to JS files in shared hosting?

I have a shared hosting that I use to upload front end projects only. My file manager has only HTML, CSS & JS files. I don't have any forms or receive anything from the user. But every few months, I get code injected to my JS files and it causes the creation of random email accounts/subdomains/redirection to other websites. The code I found in the files:  I have a SSL certificate, the permission of the affected files is 0644. Judging by the code in the pic, what's the cause to this problem and what can I do to stop it? Thanks.


Why are reputation points the basis for obtaining privileges

If reputation points only reflect a user's knowledge in an area, why is it used as the sole basis to grant such privileges? How can you trust someone because he answered a number of questions correctly?   I've seen plenty of "high-reputation" users with very rude attitudes. Countless times closing legitimate questions, only because their buddy had a similar opinion. When is stackoverflow going to fix this flawed reputation system?


It will take a few minutes to cook the steak through How long do I need to bake it for and at what temperature?


A finite summation of double binomial coefficients

I find the following identity and have checked on Mathematica, while I have no idea how to prove it:  $$\sum_{j=0}^n(-1)^{n-j}\binom{p+j}{j}\binom{n+\beta}{n-j}=\binom{p-\beta}{n}, \quad \beta>-1, \quad p>\beta-1.$$  It seems that proof by induction does not work and because of the gamma function, the transform technique does not work either.


Non-Selective Query Error but I am Using IDs

I am receiving an error when trying to add a chatter comment. I have a system of classes and 2 triggers that send a custom email notification when a chatter post has been added to a case or when a comment has been added to a chatter post. The handler and gateway for the FeedItems seems to be working fine, but I get an error when adding a comment to a chatter post. The error says: "Non-Selective Query against a large object type (more than 10000 rows). The query in my code that is throwing this error is:   User itemOwner = [select id, Email, Case_Chatter_Email_Notifications__c From User where id IN (select CreatedById From FeedItem Where Id =: feedItemId )];   return itemOwner;   Since I am using IDs, I am having a difficult time determining why this query is non-selective. Any input on where I should be looking would be greatly helpful.


I want to know what is the following integral  $\int e^{-(y-\mu)^T \Lambda(y-\mu) } dy$ I am trying to see the properties of gaussian integral but I couldn't find anything for this one. Any help guys?  I want to know how given    where Z(x) is the partition function    This is the   If the integration that you guys have given is correct there should be $|\Lambda|^{1/2}$ at the end instead of just $|\Lambda|$ in $\frac{1}{Z(x)}$. I doubt that there is a type in the paper. So I must be missing something  Can anyone explain why that guy didn't have $|\Lambda|^{1/2}$ but  $|\Lambda|$ instead???


What is the difference between kinetic energy and change in kinetic energy? Wouldn't the change in kinetic energy give a result which is a kinetic energy and if the change in kinetic energy can be negative then the resultant KE can also be negative which is not possible. Isn't it?


How to calculate new Date value from a Date variable and a int variable

I am trying to create a little application which holds the data of licenses, I allow the user to input the date it was the redeemed and the license length.  I want to create a day's remaining field where the user can view how many days they have left until they have redeemed the new license.  I've used jxDatepicker  and have three combo boxes where the user selects the number of years, months and days the license is available for  int days = Integer.parseInt(cboDays.getSelectedItem().toString()); Date dRedeemed = cboDate.getDate(); SimpleDateFormat format = new SimpleDateFormat("dd/MM/YYYY"); String strRedeemed = format.format(dRedeemed); days = (years * 365) + (months * 12) + days;   EDIT  I think i have left some people quite confused. That or i don't understand how this would fix my problem. Ill try and describe in a little more detail  Scenario  User can record their license using the application, they enter the day the license was redeemed and they also input the length of the license(days).   I am trying to figure out if you are able to calculate a new date from both these variables. for example   days = INPUT FROM USER;     dateRedeemed = new Date();    newDate = dateRedeemed + days;


I'm having some trouble with the following question:  Determine all natural numbers $n,m$ such that: $\gcd(n,m)=10$, and $\text{lcm}(n,m)=100$.  Using this I arrived at the following conditions:  $\gcd(n,m)=10$ $nm=1000$  But I don't know how to proceed. How can I do this?


In the following sentence, should I say spelled or spelt:     You spelt/spelled "Pneumonoultramicroscopicsilicovolcanoconiosis" wrong.


Named blocks to limit variable scope: good idea?

For years, I've been using named blocks to limit the scope of temporary variables.  I've never seen this done anywhere else, which makes me wonder if this is a bad idea.  Especially since the Eclipse IDE flags these as warnings by default.  I've used this to good effect, I think, in my own code.  But since it is un-idiomatic to the point where good programmers will distrust it when they see it, I really have two ways to go from here:     avoid doing it, or  promote it, with the hope that it will become an idiom.   Example (within a larger method):  final Date nextTuesday; initNextTuesday: {     GregorianCalendar cal = new GregorianCalendar();     ... // About 5-10 lines of setting the calendar fields     nextTuesday = cal.getTime(); }   Here I'm using a GregorianCalendar just to initialize a date, and I want to make sure that I don't accidentally reuse it.  Some people have commented that you don't actually need to name the block.  While that's true, a raw block looks even more like a bug, as the intent is unclear.  Furthermore, naming something encourages you to think about the intention of the block.  The goal here is to identify distinct sections of code, not to give every temporary variable its own scope.  Many people have commented that it's best to go straight to small methods.  I agree that this should be your first instinct.  However, there may be several mitigating factors:   To even consider a named block, the code should be short, one-off code that will never be called elsewhere. A named block is a quick way to organize an oversized method without creating a one-off method with a dozen parameters.  This is especially true when a class is in flux, and the inputs are likely to change from version to version. Creating a new method encourages its reuse, which may be ill-advised if the use cases aren't well-established.  A named block is easier (psychologically, at least) to throw away. Especially for unit tests, you may need to define a dozen different objects for one-off assertions, and they are just different enough that you can't (yet) find a way to consolidate them into a small number of methods, nor can you think of a way to distinguish them with names that aren't a mile long.   Advantages of using the named scope:   Can't accidentally reuse temporary variables Limited scope gives garbage collector and JIT compiler more information about programmer intent Block name provides a comment on a block of code, which I find more readable than open-ended comments Makes it easier to refactor code out of a big method into little methods, or vice versa, since the named block is easier to separate than unstructured code.   Disadvantages:  Not idiomatic: programmers who haven't seen this use of named blocks (i.e. everyone but me) assume it's buggy, since they can't find references to the block name.  (Just like Eclipse does.)  And getting something to become idiomatic is an uphill battle.  It can be used as an excuse for bad programming habits, such as:   Making huge, monolithic methods where several small methods would be more legible. Layers of indentation too deep to read easily.   Note:  I've edited this question extensively, based on some thoughtful responses.  Thanks!


Can't install gnome extensions in Firefox - No ON/OFF button

I have a freshly installed Ubuntu 16.04 and I don't have the ON/OFF button in the gnome extensions site. I have no horizontal ribbons. Everything is installed as far as i know. Do you have any ideas about this?


How can I prove that the cofinite topology on a countable set is first countable?

Is the cofinite topology on a countable set first countable? I know it is not first countable on R but I don't know how to prove that it is first countable on a countable set.


Calculate logarithm and exponential using simple calculator

Is there a formula/way how to calculate logarithm precisely like log(3.587) or calculate 5^0.358 just using simple calculator.. I mean calculate precisely like scientific calculator not in estimation result.


Is it possible to use a before trigger to pre-fill fields?

Is it possible to for example pre fill/pre-populate field of an Quote with field values of an opportunity so the user can see the populated fiels before saving, since the Id is generated after insert? I tried the following with no success:  trigger trgQuoteOpp on Quote (before insert) {     for(Quote a : Trigger.New) {         Id quoteId = a.Id;         if(quoteId !=null){Id OppId=[SELECT OpportunityId FROM Quote WHERE Id =:quoteId ORDER by Name].Id;                           System.debug(OppId);                           }         System.debug(quoteId);       }  }


Do I have to rebuy Minecraft after getting a new computer?

If I have minecraft downloaded on a single pc but I am getting a new computer do I have to buy it again?


Showing $\sup \{ \sin n \mid n\in \mathbb N \} =1$

how to prove  $\sup \{ \sin n \mid n\in \mathbb N \} =1$


Find the matrix that associated to a given quadratic form

Please help me complete my answer and find the matrix associated to a given quadratic form, here is my work and effort on that    Here's my attempt to answer it


I submitted my paper to ICANN2016 conference in which we could choose among the possible options of "poster" and "oral" presentation at the submission time. I submitted for the oral category and received the acceptance notice as a "full paper" to be in the proceedings, but no info on the type of presentation (oral/poster).  Then I registered as they requested to do so before the deadline, but later on, when the conference program become revealed on the website I noticed that I am placed in one of the poster sessions and even in a so "irrelevant" session!   Honestly I become less motivated to participate in the conference as I've heard that the posters are mostly a way the organizers try to compensate the conference expenses (they have 80 posters in the conference). And the chances of getting noticed or getting any useful feedback on my work can be so subtle! Also not to mention that in the review feedback there was no detail about the review process which could be considered as useful feedback on my work. Just a simple general comment like "the work is so solid, technical and great.."  So I came to a sort of conclusion that I already wasted my publication by submitting it to the conference!  Also I was wondering if I can withdraw from participation and ask my payment back? considering that they didn't mention the type of the presentation in the acceptance notice, and also the fact that I chose the oral presentation in the submission.


Why can't we use set(setter) without a get(getter)?

I need to just display the result of the user input field in following code:  public class EX_1 { public Integer i1{set;} public Integer i2{set;} public Integer result=i1+i2; public Integer display(){     return result; } }   Here, i1 and i2 are the field values that user will fill within a visualforce page and result is the variable to be displayed. But this is showing error   Variable is not visible: EX_1.i1 Variable is not visible: EX_1.i2   Please explain this.


How to get a button's value with event listener and make this variable available for other function in JS?

I am a beginner and have not been able to find a solution on Google for days. That is why I have come to Stack Overflow today and ask for support. Once again, please excuse if the code or my question isn't on a high level yet, I'm trying to get there. The following code tells me that the variable playerSelection cannot be found. To see whether this value is generated at all, I built in console.log(playerSelection) and see that it is generated within this function. I suspect that the variable playerSelection is only available within this function and cannot be found outside of this function. That's how I came up with this question: How can I make this variable accessible to the other function playRound?   var buttons = document.getElementsByClassName("button");  for (i of buttons) {   i.addEventListener("click", function(e) {     let playerSelection = e.srcElement.value;     console.log(playerSelection);     playRound();   }) };  function computerPlay() {   const shapes = ['rock', 'paper', 'scissors'];   const random = Math.floor(Math.random() * shapes.length);   console.log(shapes[random]); };  let computerSelection = computerPlay();  function playRound() {   if (playerSelection === computerSelection) {     console.log("Tie! Repeat to break the tie");   } else if (playerSelection === 'rock' && computerSelection === 'paper') {     console.log("You Lose! Paper beats Rock");   } else if (playerSelection === 'rock' && computerSelection === 'scissors') {     console.log("You Win! Rock beats Scissors");   } else if (playerSelection === 'paper' && computerSelection === 'rock') {     console.log("You Win! Paper beats Rock");   } else if (playerSelection === 'paper' && computerSelection === 'scissors') {     console.log("You Lose! Scissors beats Paper");   } else if (playerSelection === 'scissors' && computerSelection === 'rock') {     console.log("You Lose! Rock beats Scissors");   } else if (playerSelection === 'scissors' && computerSelection === 'paper') {     console.log("You Win! Scissors beats Paper");   } else {     console.log("Invalid input! Please try again");   } }; <div class="buttons">   <button class="button" value="rock">Rock</button>   <button class="button" value="paper">Paper</button>   <button class="button" value="scissors">Scissor</button> </div>


Merge jq output into a comma separated string

I am trying to curl some URL which returns a json file, then I want to parse hosts from it and create a comma separated string.  I have the first part working   curl -s -u "admin:admin" -H "X-Requested-By: ambari" "https://hbasecluster.net/api/v1/clusters/mycluster/services/ZOOKEEPER/components/ZOOKEEPER_SERVER" | jq -r '.host_components[].HostRoles.host_name'   which returns   zk0-mycluster.net zk1-mycluster.net zk2-mycluster.net   Now I want to join these into one string like  zk0-mycluster.net,zk1-mycluster.net,zk2-mycluster.net


php is not able to read hebrew from mysql database

Hey I am trying to read Hebrew chars from PhpMyAdmin table and it just comes out as a mess, on the table it look's fine and written in Hebrew but when I move it to php using SELECT the output is like this:   05deu05d9u05e8u05d4u05deu05d9u05e8u05d4u05deu05d9u05e8u05d4   I tried encoding the php page to utf-8 and it didn't helped my table is enconde as  utf8_general_ci  I don't know what to do..  my php code is:  $sql = "select * from sample;";   $conn = mysqli_connect($host,$username,$password,$db);    if (!$conn->set_charset("utf8")) {       printf("Error loading character set utf8: %s\n", $conn->error);   } else {       printf("Current character set: %s\n", $conn->character_set_name());   }   $result = mysqli_query($conn,$sql);  $response = array();  while($row = mysqli_fetch_array($result)) {     array_push($response,array($row[0],$row[1],$row[2],$row[3],$row[4],$row[5],$row[6])); } $str = json_encode(array($response)); $str = clean($str); echo $str; mysqli_close($conn);  function clean($string) {     $string = str_replace(' ', ' ', $string);     $string = preg_replace('/[^a-zA-Z0-9,: -]/', '', $string);     return preg_replace('/-+/', '-', $string); } ?>


Solve $$e^{4z} +e^{3z} + e^{2z} + e^z  + 1 = 0.$$  I have attempted this problem with the usual definition by writing $z=x+iy$ and using $e^z = e^x(\cos y + i \sin y)$ but got a large unsolvable mess. Is there something I'm missing?


I want to copy and paste a small code snippet from OneNote into an answer.  I have done this dozens of times, but today when I attempt it, the window thinks I want to paste in an image or a link.  I just want a simple copy and paste of text.  How do I convince it that's all I want? In response to comments: I am working on a Windows 10 machine using Firefox.  Also, several people have pointed to another similar question.  However, the answer there did not help me with my issue.


Wrong Root Name Appearing in Terminal | MacOS

I just noticed today that a weird name that appeared on my teminal "rrmando2x13g" as shown in the image below. Usually only my computer name (removed in cyan) used to appear. Does this mean its a malware or someone else has logged in to my computer?  Is there a way to remove this?


Make a TikZ automata edge pass "outside " the automata

I am trying to draw a Moore machine with TikZ. This is what I have so far:  \documentclass{minimal} \usepackage{tikz} \usetikzlibrary{arrows,automata,positioning}  \begin{document} \begin{tikzpicture}[>=latex',shorten >=1pt,node distance=3cm,on grid,auto]   \node[state,initial] (q0-e) {$q_0/\epsilon$};   \node[state] (q0-1) [below right=of q0-e] {$q_0'/1$};   \node[state] (q1-0) [above right=of q0-1] {$q_1/0$};   \node[state] (q2-1) [below right=of q1-0] {$q_2/1$};   \node[state,accepting] (q3-0) [below left=of q0-1] {$q_3/0$};   \node[state,accepting] (q3-1) [below right=of q0-1] {$q_3'/1$};   \path[->] (q0-e) edge node {a} (q1-0);   \path[->] (q0-e) edge node {b} (q3-0);   \path[->] (q0-1) edge node {a} (q1-0);   \path[->] (q0-1) edge [bend right] node {b} (q3-0);   \path[->] (q1-0) edge [bend left=90,looseness=2.5] node {a} (q3-1);   \path[->] (q1-0) edge node {b} (q2-1);   \path[->] (q2-1) edge node {a} (q0-1);   \path[->] (q2-1) edge node {b} (q3-1);   \path[->] (q3-0) edge node {a} (q3-1);   \path[->] (q3-0) edge [bend right] node {b} (q0-1);   \path[->] (q3-1) edge [loop below] node {a} (q3-1);   \path[->] (q3-1) edge node {b} (q0-1); \end{tikzpicture} \end{document}   And it produces the automaton below:    But I would like to have the edge from $q_1/0$ to $q_3'/1$ to pass "outside" the automaton, like shown by the red line of the following picture:    Can anyone show how to achieve that? Thanks.


How do I export and import content types (including fields) between environments?

I've been trying to find a smart way of exporting content type and all its fields from one installation of Drupal to another. The core "Configuration synchronization" export only export the content type, but not its fields and configuration.  So far I have not met anything applicable for Drupal 8. All I can find is mentions of this functionality is possible in .   , however I cannot find any good documenation on how the "drupal config:import" or "drupal config:import:single" works.  Is it really so hard to export and import content types between environments or have I missed something essential?


How do I change the page numbering style using the fancyhdr package?

MWE : \documentclass[10pt, letter]{report}  \usepackage[margin=1.250in]{geometry} \usepackage[table]{xcolor}  \usepackage{fancyhdr}  \pagestyle{fancy} \rhead{} \fancyfoot[C]{Page \thepage} \renewcommand{\headrulewidth}{0pt}  \begin{document}  \chapter{Introduction} This chapter  xxxxx \clearpage  xxxx \clearpage  xxxx  \end{document}   Look how it is not Page 1.


How to export photos from the new Photos app in full quality?

I noticed that the new Photos.app reduces image size on export. If I drag & drop a photo from the Photos library, the size is reduced by at least 50%.  How do I get rid of this behavior and recover my original photo file?


How do I quicken / sum up larger (but not army-scale) d20/DnD3.x combat?

I'll be rather specific:  Imagine you have five lv7 characters (in DnD3.5), a bunch of their followers (skeletons raised by their priestess and whatnot), and they're facing about the same number of opponents who pose a balanced (and, let's say, quite matching) challenge to the group.  In what ways can you speed up / sum up and get the result of the confrontation? The story would benefit a great deal from omitting or at least speeding really up the IRL hours long dice-rolling. (Yes, keeping track of which friendly skeleton hit which opposing skeleton is truly tedious, yet their presence in the story is both inevitable and good.)  (Side-question: Is there maybe a free app online that can intelligently play out such a skirmish?)  Answers relying on mechanics from, and/or usable in other d20 products are welcome.


How to get all the 2 by 2 combinations from a list?

I have a list a = ['A', 'B', 'C']  and from that list, How to get all the 2 by 2 combinations? Like this: A, B A, C B, A B, C C, A C, B


Starting from the idea that $$\sum_{n=1}^\infty n = -\frac{1}{12}$$  It's fairly natural to ask about the series of odd numbers $$\sum_{n=1}^{\infty} (2n - 1)$$ I worked this out in two different ways, and get two different answers. By my first method $$\sum_{n=1}^{\infty} (2n - 1)  + 2\bigg( \sum_{n=1}^\infty n \bigg) = \sum_{n=1}^\infty n$$ $$\therefore ~\sum_{n=1}^{\infty} (2n - 1) = - \sum_{n=1}^\infty n = \frac{1}{12}$$ But then by the second $$\sum_{n=1}^{\infty} (2n - 1)  - \sum_{n=1}^\infty n = \sum_{n=1}^\infty n$$ $$\therefore ~\sum_{n=1}^{\infty} (2n - 1) = 2 \sum_{n=1}^\infty n = -  \frac{1}{6}$$ Is there any reason to prefer one of these answers over the other? Or is the sum over all odd numbers simply undefined? In which case, was there a way to tell that in advance?  I'm also curious if this extends to other series of a similar form $$\sum_{n=1}^{\infty} (an + b)$$ Are such series undefined whenever $b \neq 0$?


What is the history behind capitalization of None, True and False in Python?

Python has some of the value-like objects capitalized: True, False, None.  >>> type(True) <type 'bool'> >>> type(None) <type 'NoneType'> >>>   As the current PEP-8 style guide recommends writing instances and variable names in lowercase, what is the history behind writing these value-like objects capitalized?  As it is answered / commented that built-ins are capitalized, but what is the rationale and inspiration behind this? In most languages built-ins are all uppercase, so one would expect Python to follow this paradigm?


How to encode the filename parameter of Content-Disposition header in HTTP?

Web applications that want to force a resource to be downloaded rather than directly rendered in a Web browser issue a Content-Disposition header in the HTTP response of the form:  Content-Disposition: attachment; filename=FILENAME  The filename parameter can be used to suggest a name for the file into which the resource is downloaded by the browser.  (Content-Disposition), however, states in  (The Filename Parameter) that the file name can only use US-ASCII characters:     Current [RFC 2045] grammar restricts   parameter values (and hence   Content-Disposition filenames) to   US-ASCII.  We recognize the great   desirability of allowing arbitrary   character sets in filenames, but it is   beyond the scope of this document to   define the necessary mechanisms.   There is empirical evidence, nevertheless, that most popular Web browsers today seem to permit non-US-ASCII characters yet (for the lack of a standard) disagree on the encoding scheme and character set specification of the file name. Question is then, what are the various schemes and encodings employed by the popular browsers if the file name “naïvefile” (without quotes and where the third letter is U+00EF) needed to be encoded into the Content-Disposition header?  For the purpose of this question, popular browsers being:   Firefox  Internet Explorer  Safari Google Chrome  Opera


How can I store my connection passwords in putty?


How can I remove incomplete installation of Ubuntu 13.04?

I was trying to install Ubuntu 13.04 alongside with my Windows 8.1. But after the completion of installation, I logged in 1 time only. When I was logged in again to Ubuntu, the display was only blinking.  So I tried to install Ubuntu again from CD but the problem remains. Then I tried to install it through Windows but the same. Then I tried to delete Ubuntu partition through Windows, now my Windows as well as Ubuntu is not working. How can I fix this with Ubuntu live booting?  EDIT: Now I can access Windows but Ubuntu is just blinking as before. Can I uninstall Ubuntu?


'He don't have knowledge ' vs 'He doesn't have knowledge'

Which one of the statements below is correct?   He don't have knowledge about others. He doesn't have knowledge about others.


Whenever someone casts an enchant on one of my creatures, do I control that enchantment?

Say I control Genesis Hydra, then an opponent casts Claustrophobia onto Genesis Hydra, do I control Claustrophobia?


Synchronized method ans synchronized blocks in Java

I'm just starting with synchronization in Java and I have small question.  Is this method:    public synchronized void method() {     // ... do staff ... }   Is equal to:  public void method() {     synchronize(this) {         // ... do staff ...     } }   PS  Recently I watched 2 good confs about Java (and from this comes my question), . Do you have some relative videos (I'm interested in programming in Java and Android).


Int a[] = {1,2};  String s = a.toString(); //what's going on here.  My output is   I@something for integer array. C@something for char array.  How to I correctly convert any array into string.


Let $f:\mathbb{N} \rightarrow \mathbb{N}$ such that $f(1)=2011$ and $f(n)= \frac{1}{n^2 -1}(f(1)+f(2)+...+f(n-1))$ for $n \ge 2$. Calculate $f(2011)$

Being $f:\mathbb{N} \rightarrow \mathbb{N}$ such that $f(1)=2011$ and $f(n)=  \frac{1}{n^2 -1}(f(1)+f(2)+...+f(n-1))$ for $n \ge 2$. Calculate $f(2011)$  When calculating $f(n)$ I need to consider the sum of the previous elements, from $2011$ to $f(n-1)$. But when considering each of these, I need again the the sum of the previous $f(n)$. I've never met a problem like this. It seems like a sequence  by recursion: are there any rules when approaching problems like this?


Prove that inequality $\sum _{cyc}\frac{a^2+b^2}{a+b}\le \frac{3\left(a^2+b^2+c^2\right)}{a+b+c}$


Add click event to a dynamically added element using jQuery

I have the HTML below:
                                        <input name="tpp[]" type="text" style="width:90%"/>        +
 	   and the JavaScript code:  $(document).ready(function(){     $('#addtpp').click(function(){          var box = $("#tppBox");           box.append("
<input name='tpp[]' type='text' style='width:90%'></input> \n\              -
");     });      $(".removetpp").on('click',function(){         $(this).parent().remove();     });  });   Although input fields with - are added, when I press - to delete nothing happens! What am I doing wrong?   Thanks in advance!


Can Mylan stockholder claim capital loss on Ciatris merger?

What is the consequence to Mylan stock holders. Can they claim a capital loss? When does their starting date begin? They seem to have different rules than Pfizer stockholders in some instances.


Benefits & Practicality of Virtual Machines

I have been living under a rock for the past 5 - 8 years, and am just now getting up to speed with virtualization, virtual machines and platforms like VMware or VirtualBox.  I think I am starting to get them, but there are two concepts about VMs that I'm just choking on for some reason; one has to do with their intrinsic benefit to the enterprise, and the other has to do with their practicality when being used.  So I understand that you can have multiple VMs running on the same physical machine, all doing their own "thing" as if they were separate machines. So let's say I want to make a nice little virtual network of servers in my home office so I can have a big sandbox to play inside of for all my projects. I set up 2 physical machines as servers, and on each of them I have, say, 4 virtual machines running (1 might be an app server, another might be a RDBMS, another might be a message broker, etc.).   Besides saving me money (as I only have to provide 2 physical machines instead of buying 8 servers), what instrinsic benefit/purpose do these VMs serve here? I don't care how clever virtual machines are, if my computer only has 8GB of RAM, and I have 4 VMs running on it, those VMs only get 8GB of RAM to share between them. Putting 4 VMs on my server doesn't endow it with 4 times that amount of RAM! So, as far as I see it, VMs save you money on hardware, but just end up bogging down that hardware as you have multiple machines competing over the same pool of resources. What am I missing here? Can VMs communicate with each other over your network using high-level protocols like TCP/IP, HTTP, FTP, etc.? Otherwise, it just doesn't make sense to implement all these VMs if you have to feed them separate and independent chunks of data/requests to process.


Dynamically display a CSV file as an HTML table on a web page

I'd like to take a CSV file living server-side and display it dynamically as an html table. E.g., this:  Name, Age, Sex "Cantor, Georg", 163, M   should become this:

 Name	 Age	 Sex

 Cantor, Georg	 163	 M
   Solutions in any language are welcome.


I am having a problem getting to the parent window. I have a window that has 2 frames...one of the frame opens another window which in returns open a third window. In the third window I want to refresh the very first window by doing this  window.opener.window.opener.close();    it only works for non frame setup...what can I use for the frame. I am open to using jquery too


I wanted to know the definition of  just like as we define displacement, current etc.    **Note:**There should be no mention of time period or time interval in the definition.


Dimensions in the logarithmic form of the Arrhenius equation

The logarithmic form of the Arrhenius equation is:  $\displaystyle\ln k=\ln A-\frac{E_a}{RT}$  Here $k$ and $A$ have dimensions whereas $\displaystyle\frac{E_a}{RT}$ is dimensionless. In other words, $k$ and $A$ have dimensions whereas $\ln k$ and $\ln A$ are dimensionless. How can this be?


Is this corruption a JS/CSS bug in stack exchange?

When I scroll the 'similar questions' box the text of the items overlaps making them unreadable. See screenshot (this site) and screen cast (SO).  I keep coming across this recently. I'm using Firefox 72 (but it's been happening for a month or so, so expect some earlier version(s) too).


I'm getting System.FinalException: Record is read-only Trigger.Grossamount while I try to save record on Sales__c. trigger Grossamount1 on Sales__c ( after insert, after update) {     if (trigger.isAfter){         if( Trigger.isUpdate || Trigger.isInsert) {             List<Recurring__c> childListToUpdate = new List<Recurring__c>();                          for(Sales__c t: Trigger.new){                 if(t.Type__c == 'One Time' ){                     t.Gross_Amount__c = t.Amount__c;                 }                   else if(t.Type__c == 'Recurring' ){                     Date new1= t.Sale_Date__c;                     t.Amount_Recurring__c = t.Amount__c * t.Term__c;                     Recurring__c child = new Recurring__c();                     child.Sales__c = t.Id;                     System.debug(child.Sales__c);                     child.Name = t.Name;                     child.Amount__c= t.Amount__c;                     child.Due_Date__c = new1;                     if(t.Frequency__c == 'Quarterly'){                         for(integer i =0; i < t.Term__c; i++){                               Date new2 = new1.addMonths(4);                             new1 = new2;                                 System.debug('Hi');                             childListToUpdate.add(child);                         }                      }                     else if(t.Frequency__c== 'Weekly'){                         for(integer i =0; i < t.Term__c; i++){                                                            Date new2 = new1.addDays(7);                             new1 = new2;                                   childListToUpdate.add(child);                         }                      }                     else if(t.Frequency__c== 'Monthly'){                         for(integer i =0; i < t.Term__c; i++){                               Date new2 = new1.addMonths(1);                             new1 = new2;                                 System.debug('Hi');                             childListToUpdate.add(child);                         }                      }                     else {                         for(integer i =0; i < t.Term__c; i++){                               Date new2 = new1.addMonths(12);                             new1 = new2;                                 System.debug('Hi');                             childListToUpdate.add(child);                         }                      }                 }                 else {                     t.Amount_Service__c = t.Amount__c;                     t.Gross_Amount__c = t.Amount_Service__c;                 }                 }             insert childListToUpdate;         }     } }


What is the best method to test if a program exists for a shell script?

I'm just curious to know how to best check if a program exists. I've seen solutions with    test command hash type which [   Which is the best method, is there a right answer? What does the POSIX and LSB specs say about this?


How to show seconds on the Windows 10 tray clock

How do I show seconds on the Windows tray clock? I've tried the advanced options in the control panel, but I'm not sure how do I do it. Is it like hh:mm:ss or is it something else?


After some research on google and stackoverflow I came to the conclusion to ask this question myself:  Is there a more or less portable way to get a list of all files from a directory?   I want to support a shortcut in my application where you can give it a directory from the command line and it traverses it and its subdirectories automatically. I am free to use C and C++ but don't want to depand on any thrid-party libraries if possible.  Thanks in advance!  Edit:  Regarding the duplicate-question: I already found that one and tried it but the dirent.h wasn't working for me. That's why I wrote this. Also regarding C/C++: my application is currently written in pure C and I would favor a C-only solution but if a better C++ solution is suggested it would also be acceptable.


Reopen review queue showing wrong reason for reopening

Have a look at . It was showing "This question was edited after it was closed" as a reason to reopen. But  was not edited after it was closed.   The last edit was on Oct 26 '08 at 21:15.        And it was closed on Nov 28 '11 at 22:44    Also there is no revision in the review page:        Actually it was in the queue because someone voted to reopen. I think this happens due to   See some examples from Meta review queue:


Can deleted posts be queried on data explorer?

For various reasons, I would like to search though posts including deleted ones, however it seems that deleted posts are not exported.  If there a way to query them?  If not, why aren't deleted posts exported? What's the big deal? The percentage of posts that are deleted is not that big - I would expect that exporting them too wouldn't make a big impact on data explorer.


Printing list in Python with serial numbers

I have a alphanumeric list variable for example  a = ['dwe','fw4fe4f','gvfes','fw4f',44,'vwe4d','sv','vsed']   To print all, I use   for each in a:     print each   Now I want serial number also added to the each element. so that it can print like.  1.dwe 2.fw4fe4f 3.gvfes   & so on


CP - Difference between --no-dereference (-P) and -d options

What is the difference between --no-dereference (-P) and -d options for the cp command?  I know -d is the same as if both --no-dereference and --preserve=links were specified but what exactly does --preserve=links do? Should I use -d or -P?


What is the LaTeX command for this symbol? Looks like \smile over a \frown

The symbol looks like this:    In context:    It occurs in the paper: "Linear type theory for asynchronous session types - S. J. Gay & V. T. Vasconcelos".  What command can I use to generate this symbol? I've tried \overset{\smile}{\frown} but it doesn't look quite right - the \frown comes out too big.


i. It is a known fact that unbiased estimator of the population variance is given by: $S^{2}=\dfrac{1}{n-1}\sum_{i=1}^{n}\left(x_{i}-\bar{x}\right)^{2}$  This has no prior distribution assumption, so it should hold for any distribution of $X$.  ii. In linear regression, unbiased estimator of the error ($\epsilon$) variance is given by: $S^{2}=\dfrac{1}{n-p-1}\sum_{i=1}^{n}\left(y_{i}-\hat{y}_{i}\right)^{2}$  which is the sum of squares of the residuals divided by the sample size minus the number of features.  My question is, why we don't use the formula given by (i) treating the residuals as a sample from the distribution of $\epsilon$? What is the difference between the two?


What is the purpose of having two variables ($@,$*) to transmit the arguments of a command into a script?

I have read of the special variables used in a script $@ and $*. As far as I understand, the arguments used while executing the script are stored into two special variables, once all arguments into $@ and once all arguments into $*, this way they can be accessed inside the script.  I do not understand why there must be two special variables for the same set of arguments. What is the difference, when is the one and when the other special variable used ?


Difference between "On your mark, get set, go" and "Ready, steady, go"

Watching Kipper with my son tonight, I was struck by the phrase "Ready, steady, go!"  I don't often hear this sequence.  In my upbringing, it has been mostly "On your mark, get set, go!"  I had thought the difference might be between British English and North American English, but when I search for "Ready Steady Go," I get a whole lot of unrelated hits related to music.    Is there a regional preference in the usage of these phrases to start a race, or are they perhaps associated with particular sports?


How to format the date in this Google Apps Script

I've come across this rank checking script.  I'm not sure exactly where I found it but it's built on Google Docs and a script which automates the rank checking process.  I understand a bit of coding but not enough to really figure this out.  I'm certain someone here can figure it out.  The script runs nightly, queries Google for my keywords and then populates blank cells in a Google Spreadsheet.  The date format which appears is 15.06.2014 06:08:21  I'd like it to be a date format I'm more familiar with, such as mm/dd/yyyy or something like that.   Anyhow, I've dabbled with the script (what language is this written in?  python?) and I see it sets a variable named curDat to new Date().  From my understanding, Date() is a function that is being called and no parameters are being passed to it - correct?  Is the problem in the Date() function or is this just a simple case of my having to format the date in Google Spreadsheets?  Here's a paste of the entire script - it is short:  function myFunction() {   var sheet = SpreadsheetApp.getActiveSheet();   sheet.insertColumnBefore(5);   var column = sheet.getRange('B13:B');   var values = column.getValues();   var rankingdrop = sheet.getRange("c8").getValue();   var ct = 0;   var colors = [];   while ( values[ct][0] != "" ) {   var formu = sheet.getRange("d" + (ct+13)).getFormula();     sheet.getRange("d" + (ct+13)).setFormula(formu);     Utilities.sleep(3000);   var rank = sheet.getRange("d" + (ct+13)).getValue();   sheet.getRange("e" + (ct+13)).setValue(rank);   var oldrank = sheet.getRange("f" + (ct+13)).getValue();   var colorcell = sheet.getRange("e" + (ct+13));     if(rank > oldrank){     colorcell.setFontColor("#ff0000");   } else if (rank < oldrank){     colorcell.setFontColor("#088A08");   }     if (rank - oldrank >= rankingdrop) {       var mailalert = true;     }     ct++;   }   var sendmail = sheet.getRange("c7").getValue();   if (mailalert == true && sendmail == "yes")  {     var emailAddress = sheet.getRange("c9").getValue();     var message = "Ranking alert. Please check your rankings";     var url = sheet.getRange("c4").getValue();     var subject = ("Ranking Alert for " + url);     MailApp.sendEmail(emailAddress, subject, message);   }   var curDat = new Date();   var startOTY = curDat.getFullYear();   var curValue = Date.parse(curDat);   var begDat = new Date(startOTY,0,1);   var begValue = Date.parse(begDat);   var weekNum = parseInt((curValue - begValue)/604800000)+1;   sheet.getRange("e12").setValue(curDat); }


How can I combine the contents of two cells in excel?

I'd like to combine the contents of A1 "Hello," with the contents of B1 "It's Me" in the cell C1 so it will read "Hello, It's Me."   I know I can do it manually, but I have to repeat the process several times, so I was hoping there was a command for that. I am using excel for Mac.


Alternative methods to prove that $Z_m$ is a field under addition and multiplication $\bmod\ m$ iff $m$ is a prime

I am looking for ways to prove that $\mathbb{Z}_m=\{0,1,2,\dots,m-1\}$ is a field under addition and multiplication $\bmod\ m$ iff $m$ is a prime.   I tried it this way: If $m$ is a prime $p$,it is obvious that most importantly, we need to prove that every non-zero element in $\mathbb{Z_p}$ has an inverse in $\mathbb{Z_p}$.We note that if $a,b\in \mathbb{Z_p}$, then $a\cdot b\in \mathbb{Z_p} \dots \boxed{*}$. Next, $a^p\equiv a \bmod p$ for prime $p$(the proof follows by induction on $a$).As  $\displaystyle 0\leq a\leq p-1$,$a\not =p$. Thus $$a^{p-1}\equiv 1 \bmod p$$ for prime $p$ which,together with $\boxed{*}$ guarantees the existence of an inverse in $\mathbb{Z_p}$.Proving the other properties is simple.  Conversely,if $\mathbb{Z_m}$ is a field,then every non-zero element of $\mathbb{Z_m}$ has an inverse.Note that inverse of an element is unique.For if $a\cdot b\equiv a\cdot c\equiv 1 \bmod m$,then $(a\cdot b)\cdot c\equiv c\equiv (a\cdot c)\cdot b\equiv b \bmod m$ i.e $m|(b-c)\implies b-c=0(0\leq a\leq m-1,a\in \mathbb{Z_m})$.So, inverses must be unique and every element is either an inverse of itself or has in inverse in the field.That allows us to conclude that $[(m-1)!]^2\equiv 1 \bmod m$ which can only mean that either  $(m-1)!\equiv 1 \bmod m$ or $(m-1)!\equiv -1 \bmod m$. If $m$ is not a prime, it has a prime factor, say $p$. $ 0\leq p\leq m-1\implies p|(m-1)!\implies p|1$or $-1$ which is absurd, a contradiction.Thus $m$ is prime.  I feel that this method is too involved and complicated. Can anyone please suggest some other method?(Some context: This is a problem from Finite Dimensional Vector Spaces by Paul Halmos. I am learning linear algebra for the first time.It seems some of the comments have been posted on the assumption that I know rings and fields; I don't. )


How to show that $\mathbb{Q}(i,\sqrt[4]{1+i} )$ is not contained in any cyclotomic extension of $\mathbb{Q}(i)$?

I want to show that $\mathbb{Q}(i,\sqrt[4]{1+i} )$ is normal and thus nonabelian extension of $\mathbb{Q}$, but got stuck. The main problem is that for the extension to be normal $\root4\of{1-i}$ should also be an element. I failed to show that. Thank you for your helps. ----------------------edit--------------- My question arose from , page 5, Remark 2.7. It is given as a counterexample of Kronecker and Weber theorem: When $K=\mathbb{Q}(i)$, $K(\root4\of{1-i})$ can never be any intermediate field of $K({ \zeta  }_{ n })/K$, where ${ \zeta  }_{ n }$ is a primitive $n$-th root of unity. I first expected that above statement could be proved by showing that $K(\root4\of{1-i})$ is not abelian over  $\mathbb{Q}$ since any cyclotomic extension of K is a cyclotomic extension of $\mathbb{Q}$ thus abelian. However from your advices, it seems that it's not even normal. But I can't still understand the method you showed me.. Is there any more easy explanation for this? When $K=\mathbb{Q}(i)$, $K(\root4\of{1-i})$ can never be any intermediate field of $K({ \zeta  }_{ n })/K$, where ${ \zeta  }_{ n }$ is a primitive $n$-th root of unity. I only know about elementary field and Galois theory.


This is really a "beware" posting rather than a question, although I provide the work-around that has appeared elsewhere. The new "feature": Babel Version 3.49, dated 2020/10/03, used with an option main=[mainlanguage] breaks things such as the language used for "Figure" with LaTeX generally, "Proof" with amstheorem, "References" for printbibliography with biblatex/biber or bibtex, and "Index" from \makeindex and \printindex. Example: \RequirePackage{filecontents} \begin{filecontents}{mybib.bib} @article{foo1999,   title={Title},   author={Doe, John},   journal={International Journal of Nonsense},   year={1999} } \end{filecontents}  \documentclass{article}  \usepackage[russian,french,ngerman,polish,main=english]{babel}  \usepackage{amsthm} \newtheorem{thm}{Theorem} \usepackage{biblatex} \addbibresource{mybib.bib} \usepackage{imakeidx} \makeindex  \begin{document}  \begin{thm}\index{arithmetic} $2+2 = 4$. \end{thm}  \begin{proof} $2+2 = 2+(1+1) = (2+1) + 1 = 3 + 1 = 4$. \end{proof}  \begin{figure}[h!] \centering \framebox[2in][c]{\rule{0pt}{2in}} \caption{Look at this!} \end{figure}  See this book: \cite{foo1999}  \printbibliography \nopagebreak \printindex  \end{document}   Cure for the feature:" Just replace main=english from the babel option list with english (or similarly, whatever the main language is, put it last in the list). In the docs for Babel 3.49, see the Note at the bottom of page 6, and the discussion preceding it. Related:


I am beginner for web development and i am trying to align below p element center vertically but its not working can some one help me please      <meta charset="utf-8">   <meta name="viewport" content="width=device-width, initial-scale=1">   <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css">

hgjsafakfjlajflksjf


I have 2 files and 1 directory in /home/ubuntu1 /home/ubuntu1 ├── code.py ├── code.pyc └── templates     └── index.html  I'm trying to copy all of them to /home/ubuntu2 I've tried cp *.*, which is to copy only files. I've also tried cp -R, which turns out to copy only directory. Is there a command could be used to copy everything in a directory?


Can't mock an extension method wtih JustMock

I am trying to mock an extension method with . For some reason it throws the following error:  "Test method TestProject1.JustMockTest.TestMethod threw exception:  Telerik.JustMock.Core.ElevatedMockingException: Cannot mock 'TestProject1.Foo'. The profiler must be enabled to mock, arrange or execute the specified target."  How can I fix this?


Prove that $\left|\sin x\right|\leq|x|,\;\;\forall x\in \Bbb{R}$

After doing a lot of proofs, I received feedback that some of these proofs may be questionable if we don't show our assumption of $\sin{x}$. We found out that this statement, although basic, posed challenges. Here it is:     Prove that $\left|\sin x\right|\leq|x|,\;\;\forall \;x\in \Bbb{R}.$   Note: This question is quite different from  because I am considering the whole of $\Bbb{R}.$ It is not a duplicate!


Why isnt $\lim_{x\to 0}\frac{\sin x}{x} = 0$?

$$\lim_{x\to 0}\frac{\sin x}{x}$$  Can't we say this:  $$\lim_{x\to 0}\left[\frac{1}{x}\right]\cdot\lim_{x\to 0}[\sin x]$$  So it would be infinity times 0, which would be 0.  Why is this method wrong?


Exercise from Herstein:Abstract Algebra.   Please do it without group action as I don't know it. In Herstein there is no mention of Group Action as in the answer given          Show that a group of order $108$ has  a normal subgroup of order $9$ or $27$.      Attempt: $108=2^2\times 3^3$. If $n_2$ denotes the number of Sylow $2$ subgroups then $n_2=1+2k| 27\implies n_2=1,3,9,27.$  If $n_3$ denotes the number of Sylow $3$ subgroups then $n_3=1+3k| 8\implies n_3=1,2,4,8.$  If $n_3=1\implies $ the group has a normal subgroup of order $27$ but how to neglect the other choices.  I am confused totally .Please help.