I always used to write functions like this:  var myFunction = function(param) {     console.log(param); }; myFunction('myFunction');   Now I've seen this:  var otherFunction = function whyNameHere(param) {     console.log(param); }; otherFunction('otherFunction');   and I'm wondering what is whyNameHere? When and why should functions be written like this? Also I can call it exactly the same as the myFunction function above.. why should someone write whyNameHere? Also is there a naming for this kind of function?  If anyone wants to play with it,

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


I am trying to put lips on my character, but as you can see, there is an abrupt line between the lip material and the skin material. It looks super fake. How do I smoothen out the transition between kips and skin? I'm using cycles.

I need to make the transition smoother between the 2 different colored objects in my scene, somehow like one of the colors fades into the other one, while still keeping the line between them.


I know how to  of all the commands I have ran in my bash terminal, however, I don't want to delete all the history.   What I want is to delete the history for a specific date range.   How do I do that?

How can I remove command-line history over a specific time period?  Is it possible do so with only one command?


my husband is British and working in rwanda these days. Iam indian and these days on dependent(Resident visa) in Rwanda. My husband and me want to visit his mum so i applied for visitor visa it got refused stating that i had not given any evidence that i will return to rwanda. what document i need to give them

The UK Visas and Immigration Directorate publishes  that provides helpful tips that can result in successful visa applications. Section 2 of this guidance opens is entitled "other documents you may want to provide" (emphasis mine).  Section 2: other documents you may want to provide – all visitors This section provides guidance on the types of documents that you may want to provide to help us consider your application against the Immigration Rules. Previous travel documents/passports, which show previous travel. Financial documents showing that you have sufficient funds available.  These must clearly show that you have access to the funds, such as:  bank statements building society book proof of earnings such as a letter from employer confirming employment details (start date of employment, salary, role, company contact details) where a third party (who is either in the UK or will be legally in the UK at the time of your visit) is providing financial support to you e.g. a business, a friend or a relative, documents to show that they have sufficient resources to support you in addition to themselves and any dependant family should be provided   The first item is "bank statements" and this ties in with the , which says...  evidence that you can support yourself during your trip, eg bank statements or payslips from the last 6 months  (Note 'eg' is a Latin abbreviation meaning "for example"; this appears to be optional rather than a fixed requirement.) Question: How should someone interpret this such that the chances of success are maximized? How many statements should I submit? What are they looking for and what do my bank statements tell about me?


if you exponentiate a normal distribution,  Y=exp{X}   where X is a normally distributed random variable (RV), then Y is log-normally distributed.  What is the distribution if you take the logarithm, instead, of a normal distribution?  In other words, if  Y=ln(X)   what is the distribution of Y?  Is there a closed-form expression, or even an empirical approximation, to that RV?

I have a random variable $X(a) = \log(a)$ where a is normal distributed $\mathcal N(\mu,\sigma^2)$. What can I say about $E(X)$ and $Var(X)$? An approximation would be helpful too.


What are the reasons that FHE is so slow? Is it possible to make the FHE algorithm so fast that it can be used in practice (say, the practical FHE algorithm should be slower no more than 10 times compared to conventional calculations)?  Or there is some fundamental limitation and any FHE implementations will always be millions of times slower than usual calculations?

Why are homomorphic algorithms slower than regular(symmetric and asymmetric) algorithms?  For example RSA in regular asymmetric cryptography uses the same algorithm as in RSA homomorphic (partially HE) cryptography.  but in homomorphic Whereas there isn't decryption time for execution time homomorphic is slow?


Shortly before Starkiller base explodes, Supreme Leader Snoke tells General Hux to retrieve Kylo Ren. Kylo Ren was on the ground dying in the middle of a forest. (Movie logic says that he found Ren, so we could have a sequel.)  How did General Hux find him in time?

At the end of Star Wars: The Force Awakens we see two related events:      Rey defeats Kylo Ren in combat, but there is no clear indication that he died. His wounds appear to be to extremities or other non-vital areas such as his shoulder. This leads me to believe he is still alive, and primed to turn mechanical like his grandfather did four movies prior after being defeated in a lightsaber fight with Obi-Wan. This is speculation, as the movie is not specific here.   Also:      Snoke tells General Hux to grab Kylo Ren and flee the planet so Kylo Ren can complete his training.   However, there is no visual indication about what happens to Kylo Ren after the final events on the planet. We see the Millennium Falcon leaving, but no other ships.  Did Kylo Ren leave the planet with General Hux at the end of the film? Is there any canon answer in the novelization or other sources?


I managed to accidentally rm -r the wrong etc file in Ubuntu 14.0.4 Desktop. I also decided I would set up encryption on my home folder (Another mistake).   Is there any way for me to restore the folder? Currently I have a bootable flash with Linux Mint 10 on it (Ubuntu bootables would not work no matter how many different ways I tried, They all gave me a boot error and moved straight on to the Ubuntu grub2 screens, which I tried to then select the kernel and boot into Ubuntu - This produced the EFI error that I am no longer interested in figuring out)  TL;DR So my main question is: Am I able to copy over a new etc folder to the root directory through Mint and then try and boot? If so which files do I need to be able to boot without a kernel panic? All I want to be able to do is back up my encrypted files and then I will do a clean format.

Is there a command to recover/undelete deleted files by rm?  $ rm -rf /path/to/myfile   How can I recover myfile? If there is such a tool how can I use it?


everyone please i need a help here, i have been stuck with this problem for hours.  I mistakenly deleted my /usr/bin/dpkg  while trying to solve Mongodb problem  that i was facing. After deleting it i ran into this error that has kept me looking for solution for hours now.  Could not exec dpkg!  E: Sub-process /usr/bin/dpkg returned an error code (100)  I literally can't do anything write now because of this error, i can't even, if i run  sudo apt-get upgrade the error will appear and i can't seems to find a solution to it, all the answers i saw online did not work for me.  Please someone should help me out here.  regarding the question about the version of my Linux, here is it.  Distributor ID:    Ubuntu Description:    Ubuntu 19.10 Release:    19.10 Codename:   eoan

By mistake I have removed dpkg from my pc (ubuntu 16.04). When I am running apt commands, it was showing error :  Could not exec dpkg! E: Sub-process /usr/bin/dpkg returned an error code (100)   Can anyone suggest me any solution to this. Thanks in advance !!!


I am frequentist by training and practice, but I'd like to learn more about Bayesian statistics. I know the basics, but I would be at a loss if I had to, for example, replace my normal ANOVA hypothesis testing approach with a Bayesian alternative.  What book would you recommend to learn practical Bayesian approaches? Preferably using R.

Which is the best introductory textbook for Bayesian statistics?  One book per answer, please.


In the table above, I want to center align the third row (/word) and the fifth and sixth row so everything looks neat and clean.  \begin{table}[h] \begin{tabular}{|c|l|} \hline  \textbf{man keys} & \multicolumn{1}{c|}{\textbf{What it does?}} \\ \hline Space & bla bla bla . \\ \hline Ctrl+F &  bla bla bla  \\ \hline Ctrl+B & bla bla bla  \\ \hline /word & bla bla bla \\ \hline q & bla bla bla  \\  \hline n & bla bla bla \\ \hline N & bla bla bla \\ \hline \end{tabular} \caption{\label{tab:table-name} Doing some stuff} \end{table}   I tried using multicolumn{1}{m} but it didn't work.  I also don't want to dramatically change the latex script. Is there something I can include in my table to vertically center align cells on demand?

I can't find a way to vertically center a single line within a table cell.  Take a look at this screenshoot:    I'd like to vertically center the text within the bottom right cell and I just can't find a way to do it. I tried \usepackage{array} but I couldn't figure out how to apply the \centering\arraybackslash, which seems to align things vertically within cells, just to this single cell.  (I'm also not sure why the right border is missing for this cell.)  Here is the LaTeX code that generates this table:  \documentclass{article}  \usepackage[left=1cm,top=1cm,right=1cm,bottom=1cm,nohead,nofoot]{geometry}  \usepackage[pdftex]{hyperref} \usepackage{verbatim} \usepackage{listings} \usepackage{array}  \hypersetup{colorlinks}  \lstset{basicstyle=\ttfamily}  \pagestyle{empty}  % -----------------------------------------------------------------------  \begin{document}  \begin{tabular}{|p{5.5cm}|p{12.2cm}|} \hline \large\textbf{Redirection} & \large\textbf{Description} \\ \hline \verb|> file| & Redirect standard output (stdout) to a file. \\ \hline \verb|1> file| & Same as \verb|> file|. \verb|1| is the default file descriptor for stdout. \\  \hline \verb|2> file| & Redirect standard error (stderr) to a file. \verb|2| is the default file descriptor for stderr. \\ \hline \verb|>> file| & Append stdout to a file. \\ \hline \verb|2>> file| & Append stderr to a file. \\ \hline \verb|&> file| & Redirect stdout and stderr to a file. \\ \hline \verb|>file 2>&1| & Another way to redirect both stdout and stderr to a file. This \textbf{is not} the same as \verb|2>&1 >file|. \textbf{Redirection order matters!} \\ \hline \verb|> /dev/null| & Discard stdout. \\ \hline \verb|2> /dev/null| & Discard stderr. \\ \hline \verb|&> /dev/null| & Discard stdout and stderr. \\ \hline \verb|< file| & Redirect the contents of the file to the stdin. \\ \hline \verb|<< EOL| \\  \verb|foo| \\ \verb|bar| \\ \verb|baz| \\ \verb|EOL| & Redirect a bunch of lines to the stdin. \\ \hline \end{tabular}  \end{document}


I'm trying to store both STDOUT and STDERR from the terminal (and if possible STDIN given by user) in a file for every command.  So i started creating a trap function to execute every command in a edited manner like:  shopt -s extdebug  preexec_invoke_exec () {     [ -n "$COMP_LINE" ] && return  # do nothing if completing     [ "$BASH_COMMAND" = "$PROMPT_COMMAND" ] && return # don't cause a preexec for $PROMPT_COMMAND      eval `history 1 | sed -e "s/^[ ]*[0-9]*[ ]*//"` |& tee ~/recent_output.txt     return 1 # This prevent executing of original command } trap 'preexec_invoke_exec' DEBUG     and saving the above file and executing   source file.sh   This did the work what i wanted but stopped some commands from executing like   cd ..   The reason for this was piping creates a sub-shell and then executes every command in it. So the main shell remains unaffected.  Even the script functionality of bash i.e  script ~/recent_output.txt   worked but only gives output after you do exit in in terminal  So, basically i want to store/get the output of previous command executed in the bash terminal. You can help me with any language (golang,python...).

Is it possible to redirect all of the output of a Bourne shell script to somewhere, but with shell commands inside the script itself? Redirecting the output of a single command is easy, but I want something more like this: #!/bin/sh if [ ! -t 0 ]; then     # redirect all of my output to a file here fi  # rest of script...  Meaning: if the script is run non-interactively (for example, cron), save off the output of everything to a file.  If run interactively from a shell, let the output go to stdout as usual. I want to do this for a script normally run by the FreeBSD periodic utility.  It's part of the daily run, which I don't normally care to see every day in email, so I don't have it sent.  However, if something inside this one particular script fails, that's important to me and I'd like to be able to capture and email the output of this one part of the daily jobs. Update: Joshua's answer is spot-on, but I also wanted to save and restore stdout and stderr around the entire script, which is done like this: # save stdout and stderr to file  # descriptors 3 and 4,  # then redirect them to "foo" exec 3>&1 4>&2 >foo 2>&1  # ...  # restore stdout and stderr exec 1>&3 2>&4


#include "test.h" template<typename T> test<T>::test(const T &elem):data(elem) { }  template<typename T> test<T>::~test() {     delete data; } template<typename T> class test { private:     T data; public:     test(const T &elem);     ~test(); }; #include"test.h" int main() {     test<int> a(2); }   Classes and implementations and main functions are written in different files by me, when i try to compile it ,The compiler will report an error,but i can't find what's wrong.

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


I have a text string (svg-file) where I need to retrieve the complete branch of nested TAGs for a given starting position. The algorithm should return the minimal amount of TAGs with even opening and closings.  <g... <g... </g... <g... </g... </g>    Some sample data:  <g id="shape57-240" v:mID="57" v:groupContext="shape" transform="translate(550.246,-1356.2)">         <title>Entscheidung.54</title>         <desc>Modelcoding</desc>         <v:userDefs>             <v:ud v:nameU="msvThemeColors" v:val="VT0(36):26"/>             <v:ud v:nameU="msvThemeEffects" v:val="VT0(16):26"/>         </v:userDefs>         <v:textBlock v:margins="rect(4,4,4,4)"/>         <v:textRect cx="42.5197" cy="1583.12" width="85.04" height="42.5197"/>         <g id="shadow57-241" v:groupContext="shadow" v:shadowOffsetX="1.44" v:shadowOffsetY="-1.44" v:shadowType="1"                 transform="matrix(1,0,0,1,1.44,1.44)" class="st9">             <path d="M0 1583.12 L21.26 1561.86 L42.52 1561.86 L63.78 1561.86 L85.04 1583.12 L63.78 1604.38 L42.52 1604.38 L21.26                          1604.38 L0 1583.12 Z" class="st10"/>         </g>         <path d="M0 1583.12 L21.26 1561.86 L42.52 1561.86 L63.78 1561.86 L85.04 1583.12 L63.78 1604.38 L42.52 1604.38 L21.26                      1604.38 L0 1583.12 Z" class="st23"/>         <text x="13.52" y="1580.12" class="st12" v:langID="1034"><v:paragraph v:horizAlign="1"/><v:tabList/>Modelcoding<v:newlineChar/></text></g>    Here is the solution I finally came up with. The problems I had yesterday where related to a corrupt SVG structure; therefore I place a breakup in the while loop after 40 iterations.      string ExtractTAG(string s, int offset)     {         string org = s.Substring(offset, s.Length - offset);         s = s.Substring(offset + 1, s.Length - offset - 1);          int shift = 0;         int level = 1;         int n = 0;         int nextClose;         int nextOpen;         int CheckPoint = 0;          while (level != 0 && n < 40)         {             nextClose = s.IndexOf("</g>");             nextOpen = s.IndexOf("<g ");              if (nextClose == -1)             {                 //no next closing point => corrupt file                 return "";             }             if (nextClose < nextOpen || nextOpen == -1)             {                 CheckPoint = nextClose;                 level = level - 1;             }             else if (nextClose > nextOpen)             {                 CheckPoint = nextOpen;                 level = level + 1;             }              shift = shift + CheckPoint;             n = n + 1;             s = s.Substring(CheckPoint + 1, s.Length - CheckPoint - 1);         }         if (n == 40)         {             return "Length could not be determined after 40 iteration - SVG might be courrupt";         }         return org.Substring(0, shift + n + 4);     }

How do I read and parse an XML file in C#?


Whenever I connect my laptop to a charger, google chrome (my default browser) opens automatically with this webpage        and then this webpage starts opening up after every 15 minutes (roughly) continuously till the time laptop is on AC power. The moment it is discharging, the cycle stops and no more webpages open. I tried to monitor the change in processes list in task manager after connecting the charger but no known virus program found. Tried many anti-malware that cleaned the windows in safe mode but the problem is same (occurs only on charging). Whenever I google this particular thing the answer always is a long list of anti-malware programs (same as on superuser). I have tired many but none of them did prove useful so far.  This particular question is for only this particular type of malware (not to be confused with general virus infections and removal questions). Please provide specific answer if anybody has disinfected this particular Trojan only (again not the general virus removal tools)

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


I have a member function template of a class declared in source and header as // c.h class C {     public:     C(){}     template<typename T>      C& operator>>(T& obj); };  and // c.cpp #include <iostream> #include "c.h"  template<typename T> C& C::operator>>(T& obj) {     std::cin >> obj;     return *this; }  The main is in a separate file as: #include <iostream> #include "c.h"  int main() {     C c;     int n;     c >> n;     std::cout << n << std::endl; }  Compiling these results in a link-time error /usr/bin/ld: /tmp/ccY8edlI.o: in function `main': main.cpp:(.text+0x23): undefined reference to `C& C::operator>><int>(int&)' collect2: error: ld returned 1 exit status`  But moving the definition of >> from c.cpp to the file that has main compiles successfully. What's the rule here that causes it to fail in the first case? I looked around and the only related thing I found is a statement on MS docs Local classes are not allowed to have member templates. I'm not sure what local classes are, but it sounds like the opposite of what I have.


Sorry if this sounds dumb, but I can't seem to figure out how to use the variable that I defined in the If statements.  import java.util.Scanner;  public class HelloWorld {     public static void main(String[] args) {         Scanner scanner = new Scanner(System.in);            //Prompt for Enchantment Type         System.out.println("Armor/Tool/Weapon");          //Wait for response         String input1 = scanner.nextLine();          if(input1 == "Armor"){             int type = 0;         }         else if(input1 == "Tool"){             int type = 1;         }         else if(input1 == "Weapon"){             int type = 2;         }         else {             int type = 3;         }          //This is where I need to access the type int         if(type == 1){          }     } }   I can't figure out how to use the type string outside of it's block. I know that I'm supposed to read on scope and stuff, but I'd really like someone to just explain it to me.

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


When using the interrogative pronoun, 'who', what would the possessive form be?  'Who checks X letterbox every day?'.   I feel it ought to be 'his' but some people I know claim it should be 'their', which to me seems to contradict the singular form of the verb 'check'.   'Who checks his letterbox every day?' is what I would say naturally. 'Who checks their letterbox every day?' sounds a bit off to me.  Looking on the internet doesn't really return anything useful, only the use of 'their' as a singular pronoun, which seems to be somewhat popular a topic.   Note, this is specifically regarding the interrogative pronoun; I understand the debate about his/her/their/ones in other circumstances but I want to know whether the same can apply to 'who' or 'whom'.

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


Here is the sentence I'm having a trouble with:     ... a world that seems too big a place for any individual to contribute something unique.   Why does it say "too big a" and not "a too big"?  I apologize if something like this has been asked before but I didn't even know how to search for this.

You're too clever a man to imagine this.   The above sentence was , a man of excellent rhetorical skills.   Since he said it, I doubt it's wrong, grammatically. But, I wonder if there is an explanation for this. Because adjectives always come after the article not before it. e.g. You're a clever man.   How could this be, grammatically?


I often get the result of my questions via a couple of comments (because the other person is too humble to write it as answer?).   In some cases, several comments together make a worthy answer. Thus, I would like to sum up all the comments into the final solution, but feel cheap for getting any reputation for it. I would rather transfer the answer to the poster of all the comments - if he accepts.  Is this possible somehow?    Exemplary post:   Related meta-post:     Update: Making the answer community wiki is a good idea. Since the commentor gets no points and I cannot accept the answer for two days, this is not perfect - but acceptable ;)

Example: I have a two accounts, one main and one smaller. I create a great post on the mini, and want to move it to the main. Thus, my main can be attributed to the great post without merging the mini to the main.  Is it possible to move some posts (Q or A) from one user to another, without merging everything? (Obviously, with proof that both accounts have permitted this action)  If not, can this feature be considered?


I want to create a method, that:   Takes the type of an enum and a String as arguments   The String is the name of one specific enum instance  Returns the enum instance that fits that name.   What I have tried:  In class TestUtil.java:  public static <E extends Enum<E>> E mapToEnum(Enum<E> mappingEnum, String data) {      return mappingEnum.valueOf(E, data); // Not working, needs Class of Enum and String value }   The enum:  public enum TestEnum {     TEST1("A"),     TEST2("B");      private String value;      private TestEnum(String value) {         this.value = value;     } }   How it should work (For example in main method):  TestEnum x = TestUtil.mapToEnum(TestEnum.class, "TEST1"); // TEST1 is the name of the first enum instance   The problem is, that I can't figure out what I need to pass into the mapToEnum method, so that I can get the valueOf from that Enum.

Say I have an enum which is just public enum Blah {     A, B, C, D }  and I would like to find the enum value of a string, for example "A" which would be Blah.A. How would it be possible to do this? Is the  the method I need? If so, how would I use this?


My friend used to have an iPhone and we would talk via iMessage but when he switched to a droid it keeps trying to send him iMessages instead of SMS and the text messages take twice as long to send. How do I stop this from happening?  I deleted him from my contacts, restarted my phone, and even turned iMessaging off and on in my settings and nothing has worked.

How can I disable iMessage for a phone number if the iPhone it's attached to has been destroyed? My sister dropped her iPhone in the bath, so she is now using an older non-Apple phone. Whenever I send her a message, it gets sent as an iMessage (and even says "Delivered"), but her device never receives the message.  The only information I could find was  which states the following:     If you plan on transferring your SIM card or phone number from an iPhone to a device that does not support iMessage, turn off iMessage in Settings > Messages first. If you do not, other iOS devices may continue to try to send a message using iMessage first, instead only using SMS or MMS.   However, since this iPhone was destroyed, we can't get into the settings to unregister her phone number.


I have been using Ubuntu for a few years now, but am now faced with running out of space for the Ubuntu partition on the newest desktop that I built.  Both Windows 10 and Ubuntu 20.04 LTS are on a 500GB NVME drive.  I use GRUB to access the different operating systems. I have made an up-to-date Ubuntu USB drive with Ubuntu 20.04 LTS. I have made a full backup of the Windows 10 partition.  I have also backed up the few files that I don’t want to loose on the Ubuntu partition. As you can see, I only allocated 15GB for Ubuntu and it is currently at 95% and I receive warnings about running out of space.  My question is how do I use Gparted from the Live USB drive to increase the space for Ubuntu? Do I have to increase the device above where I freed up space and move it up to where I can attach it to my Ubuntu partition? Is there an easier way?  I have freed up 97.66GB that is currently unallocated.  Both partitions seem to be working well. Thank you for any input or direction to where this was previously answered.  I did a search and couldn’t find out if I just have to move it up and then merge it, make it smaller, until I climb up to the Ubuntu partition at the top.  I was hoping for an easier way!

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


So there are some mods in a game called osu and when I call the api for any plays I get back a sum of the mod's number (like 72). However, I can't think of any way to convert that back to the original enum names.  I tried this way: (Mods)enabled_mods, but this only turned back the number.       enum Mods      {          None = 0,          NoFail = 1,          Easy = 2,          TouchDevice = 4,          Hidden = 8,          HardRock = 16,          SuddenDeath = 32,          DoubleTime = 64,          Relax = 128,          HalfTime = 256,          Nightcore = 512, // Only set along with DoubleTime. i.e: NC only gives 576          Flashlight = 1024,          Autoplay = 2048,          SpunOut = 4096,          Relax2 = 8192,    // Autopilot          Perfect = 16384, // Only set along with SuddenDeath. i.e: PF only gives 16416            Key4 = 32768,          Key5 = 65536,          Key6 = 131072,          Key7 = 262144,          Key8 = 524288,          FadeIn = 1048576,          Random = 2097152,          Cinema = 4194304,          Target = 8388608,          Key9 = 16777216,          KeyCoop = 33554432,          Key1 = 67108864,          Key3 = 134217728,          Key2 = 268435456,          ScoreV2 = 536870912,          LastMod = 1073741824,          KeyMod = Key1 | Key2 | Key3 | Key4 | Key5 | Key6 | Key7 | Key8 | Key9 | KeyCoop,          FreeModAllowed = NoFail | Easy | Hidden | HardRock | SuddenDeath | Flashlight | FadeIn | Relax | Relax2 | SpunOut | KeyMod,          ScoreIncreaseMods = Hidden | HardRock | DoubleTime | Flashlight | FadeIn      }   I want to get the name of the values that has been summed, like if I have 72 I should get HiddenDoubleTime.

From time to time I see an enum like the following:  [Flags] public enum Options  {     None    = 0,     Option1 = 1,     Option2 = 2,     Option3 = 4,     Option4 = 8 }   I don't understand what exactly the [Flags] attribute does.  Anyone have a good explanation or example they could post?


I've got horizontal colored bands in photos copied to my computer that were not there when I viewed the photos on the camera.  I eventually ruled out everything else and determined that the USB card reader was the problem.  How do the photos get changed during the copy process?  The card reader claimed to be USB 3.0 compatible.  The computer in question has USB 2.0 (Lenovo X220).  The images in question are all JPG.  I got rid of the problem by copying the photos with another reader.  Here's the photo with the colored bands:

I have had my Nikon D40 for a while, and some of the pictures are coming out distorted. Two examples are below:   So my questions are:    How do I fix them after the fact? - i.e. after they have been imported from the camera - if possible How do I prevent future pictures from being distorted like this?   Thanks   and


$f:X \rightarrow Y$ is onto if and only if it has a right inverse: that is, a function $g:Y \rightarrow X$ such that $f \circ g = 1_y$

We have the sets $X,Y$ and $f:X\to Y, \ g: Y\to X $      Prove if $f$ has a right inverse function: $f\circ g=id_Y$ $\iff$ $f$ is onto $Y$ (surjective).   $\Leftarrow \forall y\in Y : \exists x\in X$ then $f(y)=x$ I need to show that $f\circ g(x)=x$ but I don't know how.  I have no clue on to start in the other direction.   BTW, I found below similar question but they're either not quite the same as this one or I didn't understand the answers:


I have the .so file of a complex project written in C++. Is there a way I can use this library with python ? I'm not supposed to make any code changes to the existing C++ files. Is writing C++ wrapper around each file with boost.py the only way? Will the runtime of the code take a hit by doing this ?

What would be the quickest way to construct a Python binding to a C or C++ library?  (I am using Windows if this matters.)


I understand we do not want to go lower than 1 because the problem is no longer convex. But why not use L3 for example? Is there any reason why L2 is so popular but not higher norm?

I am just curious why there are usually only $L_1$ and $L_2$ norms regularization. Are there proofs of why these are better?


I am learning about module patterns, a bit confused about how they behave.  So, I have this simple module,   var testModule = (function() {      //private counter     var counter = 0;     return {         //public methods         incrementCounter: function () {             console.log(counter++);         },         resetCounter: function () {             counter = 0;         }     }; }());   From what I have understood till now(and please correct me if I am wrong), the above function will be invoked immediately(because of the parentheses).   When it runs, it returns an object, which contains only the public methods defined.   So, in the end, after executing the above function our code will look something like this internally (Please, please correct me if I am wrong. this is only my understanding of its behaviour)  testModule_ = {     incrementCounter: function () {         return counter++;      },     resetCounter: function () {         console.log("counter value prior to reset: " + counter);         counter = 0;     } };   The thing which I don't understand is, when we access the public methods as  testModule.incrementCounter() or testModule.resetCounter(), how do they get the value of the counter, as testModule now doesn't have counter?   I can see it gets the value for the first time, as when that anonymous function was self invoked, it did increment counter and reset the values. But what about second time, from where it gets the value of counter?  I hope I am clear.  Thanks in advance.

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I always used the following rule to manage urls:  Options +FollowSymLinks   RewriteEngine On   RewriteCond %{SCRIPT_FILENAME} !-d RewriteCond %{SCRIPT_FILENAME} !-f RewriteRule ^.*$ ./urlredirect.php   With this I could easily check with php which page the user was trying to access.  Now I got a site that requires https on all pages. Here is the basic solution to this:  RewriteEngine On RewriteCond %{HTTPS} off RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}   My problem now is that I cannot get both working simultaneously. I know very little of mod-rewrite and regular expressions.  Any help would be greatly appreciated.

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


I've been trying all day to install 5.1 OTA via ADB. In my struggle, I tried installing TWRP to try to get it to work, but it didn't. I since flashed the stock recovery.  When trying to flash via ADB, this is my output log:  Finding update package... Opening update package... Verifying update package... Installing update... Verifying current system... "System/bin/install-recovery.sh" has unexpected contents. E:Error in /sideload/package.zip (Status 7)  Installation aborted.

I updated to 5.0.1 via OTA sometime ago, and it worked fine. Now I got a notification that 5.0.2 is ready but when Android shuts down to install update it returns error (with no other message. My Nexus 7 is rooted but has the stock recovery.  Is there an easy fix that doesn't require factory reset or installing recovery?


I did a lot of searching and can't get a clear answer: If a resource is beyond 3 tiles but within the 5 tile border, do we still get the resource benefit? Do I have to improve it? I know it can't be worked, but if I can get the resource, and I do improve it, do I get the gold too?  I ask because I have seen resources near each other that I can get only some of them, the others are just outside.  Thanks for your help!

A friend claimed this and I can neither confirm nor refute it so far. Is this true?


I want to animate an object similar to a torus, like lips in the air.  What is the is the best way to do it? I try this way and the result at the top is not satisfactory.

Setting a fill and border is pretty easy in apps like Illustrator and Gravit Designer but in Blender. I've found it to be more tedious as I can't find anything online to solve this problem.  The picture above is a simple 2d mouth with lips. I would like to be able to move the lips and still have a fill but in Blender I needed to add another path for the mouth. Is there anyway I can move my lips path while having it also take the exact same shape (but not material) as my mouth's path?    (454.2 KB)  I work in Blender 2.79 cause 2.8 doesn’t run well on my laptop at all.


I came across this question and I was wondering what ended up happening,real brick or brick veneer?  I want to lay the brick over drywall on one of the walls(13x10feet)in the basement. I just wanted to see if you have done yours without any complications

I don't want to use veneer, I want to use real brick. Is it as easy as using tie-ins to the studs and setting the brick as one would normally?  The existing wall is drywall, So I was thinking of leaving this in place, screwing in the tie-ins and laying up the brick to my desired height.


Is this a valid derivation that the value of $\pi$ is $4\sqrt{\sqrt{5/4}-\sqrt{1/4}}$?   This is a completely different from . It is in no way a duplicate of my last question.    When the circumference (c) of a circle with diameter (d), and the perimeter (4h) of a square are equal, we will call it a squared circle.    Our first squared circle. (Fig. 1)    Our second squared circle, which is π/4 times smaller. (Fig. 2)    Next we stack our two squared circles. (Fig. 3)    Then we can add in our triangle. (Fig. 4)    Our full triangle where the hypotenuse equals the diameter (d) of the previous circle. (Fig. 5)    Then we could use Pythagoras to calculate π.    But first, lets dig a little deeper.  Any generic squared circle. (Fig. 6)    From this we get our red and blue squares. (Fig. 7)    The blue squares link the previous squared circle with the next consecutive squared circle, which is always π/4 times smaller. (Fig. 8)    This can be seen more clearly in the table below, the arrows show this relationship between any two consecutive squared circles.    This repeating pattern goes on ad infinitum, where each consecutive squared circle is always π/4 times smaller. (Fig. 9)    This gives us our angles and our generic triangle. The base (x) of the triangle is equal to the height (h) of the triangle minus the side-lengths of the two blue squares. (Fig. 10)      The side-length (h) divided by the diameter (d) is always π/4.    Then we can replace π/4 in our equation.    And then we use this value in the following triangle.  This gives us the generic triangle. (Fig. 11)    A circle with diameter (d) equal to 1. (Fig. 12)    Using Pythagoras we get the following equation.    From this equation we can calculate π.

When the circumference of a circle (c) and the perimeter of a square (8h) are equal, we call it a squared circle. Radius (r) is equal to one. (Fig. 1)    Next we simplify to the quarter squared circle which gives us our first triangle A. (Fig. 2)    Because a triangle has three sides it can be normalised in three ways, with exceptions. A normalised triangle is simply a triangle with one or more side-lengths equal to one. All sets of normalised triangles have the same angles. See the example below, normalising the 345 triangle. (Fig. 3)    Notice above that the height of triangle 1 is the reciprocal of the hypotenuse of triangle 2, the base of triangle 1 is the reciprocal of the hypotenuse of triangle 3 and the base of triangle 2 is the reciprocal of the height of triangle 3. This is the case for all sets of normalised triangles.  We can use this rule to normalise triangle A. (Fig. 4)    When the perimeter of a square (8h) and the circumference of a circle (c) are equal, the ratio of the radius (r) to an eighth of the perimeter (h) will always be 4/Pi. (Fig. 5)    We can use this rule to create three nested versions of the quarter squared circle. (Fig. 6)    This gives us a second set of triangles D, E and F. (Fig. 7)    Notice that triangles D and A and triangles E and B are identical but triangles F and C are different. Next we interlock two quarter squared circles as shown below. (Fig. 8)    We then add a quarter circle with a radius (1+x). The arrows represent the tangents. (Fig. 9)    This gives us a third set of triangles J, K and L. (Fig. 10)    The set of triangles (A, B and C) and the set of triangles (J, K and L) should be identical, because both sets are normalised. If we compare the two sets we can extrapolate the following:    As shown below, it makes sense that y equals Pi/4, because we would expect the two marked points to be at the same height. The arrows represent the tangents. (Fig. 11)    If y equals Pi/4, it means that the triangle set (D, E and F) is also normalised. By comparing the three sets we can extrapolate the following:    If we do the calculations using the current value of Pi, the equations above fail. This points to the possibility that Pi is incorrect. So the question becomes, is there a value for Pi that satisfies all of the above equations?  Yes, here it is expressed as a fraction:    If we use the above value for Pi, we find that the three sets of triangles listed above, are in fact the same normalised set. (Fig. 12)    Because the circle and the square are both perfectly symmetrical, we should expect Pi to also have perfect symmetry. This symmetry can be expressed by the following equations:    So it seems, the angle (theta1) that squares the circle, perfect symmetry, occurs when its sine is equal to the reciprocal of its tangent.  Please be kind, this has taken over a year of my life so far. Is this a valid proof?


I created my app and now I'm trying to add AdMob Ads but I'm stuck with an instant crash and a problem and I don't know how to fix it.  java.lang.RuntimeException: Unable to start activity ComponentInfo{com.glitchrun.sapphire/com.glitchrun.sapphire.PTPlayer}: java.lang.NullPointerException: Attempt to invoke virtual method void com.google.android.gms.ads.AdView.loadAd(com.google.android.gms.ads.AdRequest) on a null object reference     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2957)     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3032)     at android.app.ActivityThread.-wrap11(Unknown Source:0)     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1696)     at android.os.Handler.dispatchMessage(Handler.java:105)     at android.os.Looper.loop(Looper.java:164)     at android.app.ActivityThread.main(ActivityThread.java:6944)     at java.lang.reflect.Method.invoke(Native Method)     at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:327)     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1374)  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void com.google.android.gms.ads.AdView.loadAd(com.google.android.gms.ads.AdRequest)' on a null object reference     at com.glitchrun.sapphire.PTPlayer.onCreate(PTPlayer.java:68)     at android.app.Activity.performCreate(Activity.java:7183)     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1220)     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2910)   I tried to remove import com.google.android.gms.ads.AdView; but after that ads are not showing in the app. BUT I still have requests in AdMob and matchrate even if ads are not showing. How to solve the problem?  import com.google.android.gms.ads.MobileAds; import com.google.android.gms.ads.AdRequest; import com.google.android.gms.ads.AdView;  AdView mAdView = findViewById(R.id.adView); AdRequest adRequest = new AdRequest.Builder().build(); mAdView.loadAd(adRequest);`

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


I used to think that online exams allow me to perform better in exams in a more relaxed setting, but today after an examination I changed my opinions, because the tutor proctor probably thought I was cheating and he reported the incident to the professor.   Just 20 minutes into the exam somebody was knocking my door (I did not dare to respond at first but the knocks kept getting stronger), so I opened the chatbox in Zoom and asked the tutor to let me leave my seat. Sadly, I may have forgot to close the chatbox, and because I used my mobile phone for Zoom (because my macbook encounters the errors "There is no connected camera" constantly), during the period of my leaving my camera was not opened. When I got back to the seat I hurriedly close the chatbox and continue with the examination. What I did not see is the mesage by the tutor "Why did you close the camera?". So during the period of my leaving my tutor did not see me. But this is not the end of my misfortune (or the consequences of my carelessness)  At the end of the exams, when students were supposed to upload the scripts, I realised I forgot to write down my student ID on the first page of the script, and I hurriedly write down the ID, all while the tutor saw me writing it down. He immediately messaged me in the chatbox telling me he would report it to the professor. What followed was my nervous pleading in the chatbox that I did not cheat and all I was writing down was my student ID.   I feel very dejected after this exam. I am an extremely honest kind of a person when it comes to academic affairs, and I take research and thinking very seriously. The examination was an exam on network models and the difficulty lies in the proof, so there is no way I can cheat in such a short period of time. The exam is even open-book so I am allowed to check the facts I forgot, and I need not memorise any algorithm so there is no need for a computer. But I think my nervous impression and the subtle anger of the tutor already sounded a death knell. I cannot write down in words how catastrophic this feels for me, because I suffered from extreme anxiety in the past and this significantly impacted my grades already. But after recovering from this I chose mathematics as my minor anyway despite its difficulty instead of choosing an easy path to improve my grades. I was improving my grades a lot last semester, but here comes this unexpected incident. I am now thrown into the mode of reminiscence and remorse, as I feel like despite my honesty to my own feelings and thinking, for example in pursuing my dream as a neuroscientist instead of taking the more respected career of medicine, or in choosing a harder minor as opposed to easier junior electives to inflate my grades, these are all just living in my own head, and they carry no value when an incident like this arises. I do not know if I can still stand this impermanence.   But I know very clearly I have to do something to minimise the damage done. What rational actions should I do?   =============Updates 2:54 pm 19 May 2020=============  After settling my mind down I feel much better, and I received the email reply from my professor saying that "There is nothing serious. So don't worry!". So it seems that he does believe in me or he is a professor very tolerant of students' dilemma. On my anxiety-induced Google search of similar incidents, I found due to Covid-19 and the shift to online exams and learning, many more students are facing such difficulties. For future readers who will have similar concerns as mine, please in addition to all the panicking and worrying realise somebody has been through similar problems and be them lucky or unlucky they definitely understand your psychological tension, a fact that should be solacing you too. Also, please think and write a logical defence for yourself, and if needed please collect similar cases and present a stronger case.

This week I was accused of cheating on two online exams in two separate classes. Both professors are claiming the lockdown browser recordings show "evidence" of me cheating. When I asked them what the evidence was and why I was being accused they stated that it is in the video and has been sent to the honor council for review. I did not have any extra papers, cell phone, iPads, etc. There was also a baby monitor in front of me because I have a baby at home and no one else was there to watch. We were allowed scratch paper and I used it heavily to the side of my desk but that is it. I'm assuming my writing/reading what I wrote caused me to be out of frame for too long or I was looking down for too long. Is this enough to convict me of cheating? I am facing failed courses and expulsion. UPDATE Regardless of my innocence. I now believe that my university is not giving me a fair due process. This excerpts below are from the university handbook regarding academic dishonesty and a FL law that applies to all public universities.  The student shall be provided with written notice of the violations against him/her in sufficient detail and in sufficient time to prepare for a hearing or meeting before an appropriate committee, hearing body, or designated University official; The University shall establish a minimum number of days in advance of the hearing or meeting to present the written notice of violations, but in no case will this notice be less than five (5) business days, except in cases of emergency hearings as specified below; The student and his/her advisor may inspect all of the information that will be presented against the student at least three (3) business days before the student disciplinary hearing or meeting, except in cases of emergency hearings where the student may inspect the information at least one (1) business day prior to the hearing.  I did not receive a letter outlining my offenses, I instead received an email stating that my hearing is on Thursday. That is 1 business day from my professors accusing me and 3 business days from notice of my hearing. I still have not been told what I did wrong and I am expected to defend myself.


Why the 20.04.1 is still not available in the update manager ?

I want to use do-release-upgrade to upgrade from 18.04 to 20.04, but I can't do that do-release-upgrade Checking for a new Ubuntu release There is no development version of an LTS available.  It seems that  is used, and it still points to 18.04. Do you know when (or how?) can I upgrade to 20.04?


I know this problem has been addressed a few times on here.  I tried following the directions for setting proper headers, I still run into problems with my emails going into the spam filter in Gmail.   If anyone can please take a look at what I've tried, I'd really appreciate it.  The code below is without the headers added as explained here:   Thanks in advance.  define("WEBMASTER_EMAIL", 'myName@mydomain.com'); if($post) {     $name    = stripslashes($_POST['name']);     $email   = trim($_POST['email']);     $subject = trim($_POST['subject']);     $message = stripslashes($_POST['message']);      $error = '';      // Check name     if(!$name)         $error .= 'Name required! ';      // Check email     if(!$email)         $error .= 'E-mail required! ';      if($email && !ValidateEmail($email))         $error .= 'E-mail address is not valid! ';      // Check message     if(!$message)         $error .= "Please enter your message!";      if(!$error)     {          $mail = mail(WEBMASTER_EMAIL, $subject, $message,             "From: ".$name." <".$email.">\r\n"             ."Reply-To: ".$email."\r\n"             ."X-Mailer: PHP/" . phpversion());          if($mail)             echo 'OK';     }     else         echo '
'.$error.'
'; }

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.


I've an APP with an input text item. It's possible to activate the rich text editor of sharepoint (365) to edit this field? And If i want to do the same thing into a grid?  Thanks!!

I'm using custom grids (Kendo UI Core free version) into an sharepoint 365 APP. I would like to use the Rich text Editor of sharepoint 2013 when I edit some fields. is this possible?


I have a wide table (more than in the MWE if I start putting numbers in there) and use resizebox to fit it. However, in the threeparttable environment it does not let me put the footnotes inside the rescaled box, which is why they exceed the width of the table. Any suggestions how to approach this?     \documentclass[12pt]{article}     \usepackage{authblk}     \renewcommand\Affilfont{\tiny}       \usepackage[a4paper,total={6in, 8in}]{geometry}     \usepackage[parfill]{parskip}     \usepackage{hyphenat}     \usepackage{setspace}     \usepackage{titlesec}      \usepackage[hang,flushmargin]{footmisc}     \usepackage{pdflscape, longtable}     \usepackage[strict]{changepage}     \usepackage{array}     \usepackage{enumitem}     \usepackage{booktabs}     \usepackage[flushleft]{threeparttable}     \usepackage{adjustbox}     \usepackage{xltabular}     \usepackage{enumitem}     \usepackage{graphicx}     \usepackage{caption}     \usepackage{hyperref}      \usepackage{tabularx}     \usepackage{multirow}               \begin{document}          \begin{center}     \begin{table}[ht]     \setlength{\tabcolsep}{12pt}     \def\sym#1{\ifmmode^{#1}\else\(^{#1}\)\fi}     \centering     \begin{threeparttable}     \resizebox{\textwidth}{!}{%     \begin{tabular}{l ccc ccc ccc ccc}     \hline\hline     \addlinespace[1ex]     & \multicolumn{3}{c}{\textbf{OLS}} & \multicolumn{3}{c}{\textbf{PPML}} & \multicolumn{3}{c}{\textbf{Tobit}} & \multicolumn{3}{c}{\textbf{LSTM}}  \\      \addlinespace[1ex]          \cmidrule(r){2-4} \cmidrule(l){5-7} \cmidrule(l){8-10} \cmidrule(l){11-13}     \addlinespace[1ex]     & (1) & (2) & (3) & (1) & (2) & (3) & (1) & (2) & (3) & (1) & (2) & (3) \\     \addlinespace[1ex]     \hline     \addlinespace[1ex]     \textbf{In-sample}  &   &  & &  &  &  &   &  &   & &  &                \\     \addlinespace[0.5ex]     \hspace{2mm} (Pseudo-)$R^{2}$  & &  &  &  &   &    &             &      &            &           &             \\     \addlinespace[0.5ex]     \hspace{2mm}  CPC & &  &  &  &  &  & &  &  &  & &             \\     \addlinespace[0.5ex]     \hspace{2mm}  MAPE & & &  &  &  &      &             &             &      &            &           &             \\     \addlinespace[0.5ex]     \hspace{2mm}  RMSE &  &  &  & & & & & &  &  &             \\     \addlinespace[1ex]          \hline\hline     \end{tabular}     }     \begin{tablenotes}     \setlength\labelsep{0pt}     \item{\scriptsize \textit{Blablaaaaaaaaaaaaaaasd  aaaaaaaaaaaaaaaaaaaaaaaaaa   aaaaaaaaaa bla bala aasfsdiovo  srbOBSFdofb just a long text that is longer than the table}.     \end{tablenotes}     \end{threeparttable}     \caption{Some Table}\label{tab:PredPower}     \end{table}     \end{center}          \end{document}

I have a table that I want to insert on a page, but at least one (perhaps both) of the following conditions are met:   The table is too wide to fit within the text block or page. That is, I'm exceeding some horizontal restriction. The table is too tall to fit within the text block or page. That is, I'm exceeding some vertical restriction.   What are my options to make this table fit? If it doesn't fit, regardless of my attempts, what other options exist?


I've been solving this for days but I still I couldn't solve this. Can I know how to solve $x$ ?

The following is a geometry puzzle from a math school book. Even though it has been a long time since I finished school, I remember this puzzle quite well, and I don't have a nice solution to it.  So here is the puzzle:    The triangle $ABC$ is known to be isosceles, that is, $AC=BC$. The labelled angles are known to be $\alpha=\gamma=20°$, $\beta=30°$. The task is to find the angle labelled "?".  The only solution that I know of is to use the sine formula and cosine formula several times. From this one can obtain a numerical solution. Moreover this number can be algebraically shown to be correct (all sines and cosines are contained in the real subfield of the 36th cyclotomic field). So in this sense I solved the problem, but the solution is kind of a brute force attack (for example, some of the polynomials that show up in the computation have coefficients > 1000000). Since the puzzle originates from a book that deals only with elemetary geometry (and not even trigonometry if I remember correctly) there has to be a more elegant solution.


Context:  We have a generic bloc cipher composed of an encryption function $E_k$ and a decryption function $D_k$ operating on blocs of $n$ bits.  For a key $k$ fixed, we can see $E_k$ as a pseudo-random permutation from $\{0,1\}^n$ to $\{0,1\}^n$ (I am wrong ?). $D_k$ is the inverse permutation.  If we have a plain/ciphertext pair $(m, c)$, a common bruteforce attack consists in enumerating all possibles $k$ and testing if $E_{k}(m) = c$.  Question  1) Considering that $E_k$ is a random permutation, can we have two keys, $k1$ and $k2$ such as $E_{k1}(m) = E_{k2}(m) = c$ ?  2) If the answer is yes (and I think it is), how many $(c,m)$ do we need to uniquely determine the right key ?  3) And do we have the same problem for common bloc ciphers like AES or DES (i.e getting more than one $(c,m)$ to uniquely determine the right key) ?  Thanks for your answers.

I have two very close questions.  Question 1  y = AES-128(x, key). Is it possible that AES-128 will return the same y (encrypted text) for different keys?    I know that each key selects one permutation from the set of (2^128)! possible permutations. We have (2^128) possible keys and it is less than number of possible permutations. But it doesn't mean that there are no two different keys for some pair of text and encrypted text.   Question 2  If we have fixed x,y (both of them have the size of 128 bit) does there exist a key( key size is 128 bit) so that  y = AES-128(x, key) ?  Example. We have 2 bit message and 2 bit key. There are 4 possible messages: msg1 = {0,0}, msg2={0,1}, msg3 = {1,0}, msg4 = {1,1} and there are 4 possible keys. We have 4! = 24 possible permutations of messages. I can select the next permutations  | From\key | key1 | key2 | key3 -------------------------------- | msg1     | msg2 | msg3 | msg4 -------------------------------- | msg2     | msg1 | msg4 | msg3 -------------------------------- | msg3     | msg4 | msg1 | msg2 -------------------------------- | msg4     | msg3 | msg2 | msg1 --------------------------------   Here I have a mapping from a message to every message. e.g. I can get msg4 from msg1 using key3. Has the AES-128 the same property for the mentioned x,y?


There's been a debate on a D&D discord server that's caused me a lot of trouble. Here is the question: if a wizard 2/cleric 2 has a wizard spell prepared from being a cleric, rather than from being a wizard, then should the wizard-cleric not be able to then scribe that spell into their spellbook the same as if they had it prepared from anywhere else?   Edit: This is different to the bard/wizard question due to bards having spells known, and clerics preparing spells just as wizards do.

Can a multi-class Bard/Wizard write spells known from their Bard class, into their wizard spellbook?  e.g. they know the Comprehend Languages as a Bard spell, and want to write it directly into their wizard's spellbook?  And what is the cost? ... i.e. 1 hour and 10 gp because they know it, or 2 hours and 50 gp because they  have to experiment with casting it as a wizard?


If $M,N$ are finitely generated $A$-modules, is $\operatorname{Hom} _A(M,N)$ a finitely generated $A$-module?

Let $R$ be a commutative ring and $M$ and $N$ be two finitely generated $R$-modules. I wanna construct an example s.t. $\operatorname{Hom}_R(M,N)$ is not finitely generated.   It's well-known that if $R$ be a Noetherian ring and $M$ and $N$ be two finitely generated $R$-modules then $\operatorname{Hom}_R(M,N)$ is finitely generated. So in this example $R$ must be a Non-Noetherian ring.


For a doubly stochastic markov process defined by a n by n transition matrix, does the stationary distribution go to p = 1/n for each state?  If so, why?

A transition matrix $P$ is said to be doubly stochastic if the sum   over each column equals one, that is $\sum_i P_{ij}=1\space\forall i$.   If such a chain is irreducible and aperiodic and consists of $M+1$   states $0,1,\dots,M$ show that the limiting probabilities are given by   $$\pi_j=\frac{1}{1+M},j=0,1,\dots,M$$   I have no idea how to prove it but   If a chain is irreducible then all states communicate i.e $$P_{ij}>0\space \text{and}\space P_{ji}>0\space\forall i,j$$ If $d$ denotes the period of any state, if a chain is irreducible aperiodic, then $d(i)=1\forall i$   If $P_{(M+1)\times (M+1)}$ matrix and $\pi$ is the stationary distribution  $$\pi_j=\sum_iP_{ij}\pi_i\space j=0,1,\dots,M+1$$  but how I can get this expression?


How would you prove that 2 elements of the group $G$ are equal, i.e., $a = b$ if we know that $a$, $b$ belong to group $G$ and that $m$, $n$ are relatively prime (integers) and that $a^m = b^m$ and $a^n = b^n$  Thanks!

Let $D$ be an integral domain and let $a^m=b^m$ and $a^n=b^n$ where $m$ and $n$ are relatively prime integers, $a,b \in D$.   How do I show $a=b$?


Now I am standing on the ground and thinking that I exert a force equal to my weight on the ground. So as a reaction the ground also exerts a equal reaction force on me of the same magnitude and opposite direction. Both forces are exerted on different bodies. So why doesn't the ground accelerate downward and me upward? Why am I standing still not going upwards?

I know this question has been asked in other forms, generally regarding the balance of forces.  This time I want to focus on motion.  I've got a laser accelerometer on my desk.  It tells me that I'm accelerating at $9.8~\rm m/s^2$.  For the first experiment I'm travelling in space.  I pick a nearby star and discover that I move about $490$ meters in $10$ seconds from that star.  For the next experiment I'm on the surface of Earth.  I measure the same acceleration with my laser accelerometer.  I pick a spot (the center of the Earth) and discover I don't move at all in $10$ seconds.  How is acceleration without motion possible?


I have Dell Latitude e6430 laptop,and i have issues. I turn it on use it for like 10-30 minutes and it randomly crashes with a black screen and a vertical red line on a side. The only way to turn it off and turn it on again is force shutdown or wait for 10 mins and it shutdowns automatically. Mostly this happen when playing games. I checked CPU temp, it wasn't overheating. There is a picture of a line(the file too large so i. posted a link.) :

My laptop boots up as normal,but using for like 10-15 minutes, screen goes black and there is red vertical line on the right side of the screen. The only thing you can do is restart it and use it again.


Let $\mathcal{B}(\mathbb{R})$ be the Borel-sigma algebra on $\mathbb{R}$, and let $\mathcal{L}$ be the Lebesgue sigma-algebra which is a unique extension of $\mathcal{B}(\mathbb{R})$ with respect to the length measure $m$.   I'm trying to find a counter-example for each for the following:   $\mathcal{L}\neq \mathbb{P}(\mathbb{R})$ $\mathcal{L}\neq \mathcal{B}(\mathbb{R})$   For $2$, I just need to find a null set (has length $0$) that is not a member of $\mathcal{B}(\mathbb{R})$. I thought about the Cantor set because it has measure zero, but it's apparently Borel measurable.

Can anyone explain the concept of a Vitali set? I am not able to understand the construction of the set.


I'm using Blender 2.92 and whenever I go to Texture Paint mode, I'm only seeing the flat texture. How can I create a second window and see the model as well? Apologies for the noob question, but no answers are online.

Sorry for being so simple but i'm finding it really difficult to work out how to split screens and then rejoin them.   so i grab the corner of a screen and drag it creates a new screen then i grab the corner again and sometimes it creates a new one and sometimes it merges them.   I'm a bit confused about the controls.  I looked on the 2.8 manual and I think its a bit out of date as it looks the same as 2.79.  Any help is greatly appreciated


I recently submitted my product design coursework to my teacher, for them to check that everything was okay. And besides from the few spelling mistakes that I'd made, the only other thing I was told to do was to change all of the contractions to being two separate words.  This meant going through and changing all of the "it's"s to "it is", the "we're"s to "we are" and so on. This was because, and I quote, "The exam board see it as more correct to not use things such as contractions."  So is this really the case, is it more correct not to use an apostrophe for omission? Or is this just a miss understanding between my teacher and the exam board?  Personally I'd have though it to be the other way around, as in French it is grammatically incorrect to say "ce est" or "que elle". These should instead be written as "c'est" and "qu'elle" respectively.  Any thought on the matter would be appreciated.

How compelled should I feel to use non-contracted forms (do not rather than don't and so on) when writing in a rather formal text, say an academic paper? In one case I am afraid to seem too stilted, in the other, too casual. Are there good guidelines?  And are there differences in this regard between British and American English?  (In this  there was not much more than "Contractions are more frequent in informal than formal contexts".)


Matrix multiplications is in general non-commutative. But in the special case that $$AB=I_n$$ where $A$, $B$ are $n\times n$ square matrices.  How to prove that $$BA=I_n?$$

If $A$ and $B$ are square matrices such that $AB = I$, where $I$ is the identity matrix, show that $BA = I$.    I do not understand anything more than the following.   Elementary row operations. Linear dependence. Row reduced forms and their relations with the original matrix.   If the entries of the matrix are not from a mathematical structure which supports commutativity, what can we say about this problem?  P.S.: Please avoid using the transpose and/or inverse of a matrix.


I have an HP laptop dual booted with windows 10 and Ubuntu16.04 LTS. WiFi on Windows works just fine but when I switch to Ubuntu, the network which was showing strong connection in Windows shows weak in Ubuntu. Sometimes it also refuses to connect. Can you please help?

Only when I'm closer to the router, it shows any signal, but when I'm just little far from it, it is not showing wifi routers signals.


How does a fan moves air towards you (I mean in 1 direction). Also propeller and fan have different shapes, does it mean they work different?

Why is it that when you drop paper behind a fan, it drops, and is not blown/sucked into the fan, whereas if you drop paper in front of a fan, it is blown away?


Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval.


It's probably a stupid question, but I wonder what the limit of intensity is that sound can have in the air. I suppose that there's a limit, because very high pressures produced by the sound wave would maybe condense the air into liquid form, killing the sound wave, or maybe creating other bizarre effects.

Is there any reason to believe that any measure of loudness (e.g. sound pressure) might have an upper boundary, similar to upper limit (c) of the speed of mass?


The dynamical system $\dot{\vec x}=f(\vec x)$ (R) is called a gradient system if there exists a function $V(\vec x)$ such that $f(\vec x)=-\nabla V(\vec x).$ Show that if (R) is a gradient system then $$\frac{\partial f_i}{\partial x_i}-\frac{\partial f_j}{\partial x_j}=0.$$  Where do I begin with this?

I was reading a solution when I came across this statement.     So $$\frac{\partial f_i}{x_j}=\frac{\partial f_j}{x_i}.$$ Then there exists a differentiable function $g$ on $\mathbb{R}^n$ such that $\frac{\partial g}{\partial x_i}=f_i$.   Why is this true?


I have a 3.18 undergraduate GPA, which isn't great for the schools I want to get into (I'll be applying to top 20 engineering schools for computer engineering). I was pretty blind to this at the time, but I was consumed by a bad relationship during my junior year and beginning of senior year that had a really bad impact on my balance of life and health at the time. It's especially evident in my grades, which are good Freshman and Sophomore year (A's/B's), droop to C's/B's junior year, then rise back up to B's/A's towards the end of senior year. I'd really appreciate some advice on how to extenuate my GPA using my Statement of Purpose!  Some other info:  My GRE score is strong (167 M / 162 V / 4.5 Writing), I still managed to get two letters of rec from professors and a strong one from a VP in my company, and my design work experience in my company is extremely valuable for what I am applying to (computer engineering). The glaring black mark is the 3.18 GPA, which if I don't address it, I don't think I am doing myself any justice with how hard I've worked on the other parts of my application.  What's the best way to exonerate myself while sounding professional and not seeming like I'm whining/making excuses? How directly should I talk about my overall mental health/balance at the time? Has anyone been in a similar situation?  Kind of related question: given my situation, does anyone have any advice on what the balance should be between talking about what I have accomplished (design work) at my company vs. why I am interested in the school's program/what I plan to do with my degree?  Thanks for the help!!

When applying to a PhD program in the US, how does the admissions process work? If an applicant is weak in a particular area, is it possible to offset that by being strong in a different area?  Note that this question originated from this . Please feel free to edit the question to improve it.


I am going to develop a TCP  server application. I am on the "choose server" step. My TCP server is going to have 2000+ clients and one socket to each client.  Is there limit for amount of created sockets depending on the operating system? Which operating system permits more open sockets at a given time?

I am programming a server and it seems like my number of connections is being limited since my bandwidth isn't being saturated even when I've set the number of connections to "unlimited".  How can I increase or eliminate a maximum number of connections that my Ubuntu Linux box can open at a time? Does the OS limit this, or is it the router or the ISP? Or is it something else?


I'm interested in learning how to create simple interactive and dynamic visualizations with JavaScript. For instance, I'd like to make an image of a digital clock that starts running as soon as the user hoovers their mouse over the image. In order to learn about these things, I think it would be useful for me if there'd be a large, open-source online repository of such dynamic images, including the code. However, I haven't been able to find such a website thus far. Therefore, I'd like to ask a question about this on one of the Stack Exchange website. I'm not sure though which one would be most appropriate for such a question -- if any.

I would like to ask for help finding resources regarding a particular programming language. I realize that Stack Exchange is designed to be more of a hunter and less of a gatherer; it is meant to be very specific. If I ask a question that is not intended to objectively elicit "the right answer" then what forum should I post that question to? Is there one at all? In my case I am looking for information to help get started with  and feel that I am having a hard time finding resources. I believe that the SE community could point me in the right direction, but I want to be sure that I ask in the appropriate place.  suggests that I use  to ask for "opinions", but the  states the following:  "You should only ask practical, answerable questions based on actual problems that you face."  Now, I feel that my question will be practical and indeed answerable; it's even based on actual problems that I am facing... But my question will not be specific enough to elicit a single "AHA! This is the answer!" - it won't be meant to do that. When I'm done asking, I hope that my question will have several answers from several different people and that it will be useful as a resource for someone else in the same position as me. Is Programmer's SE the place to do that? Or should I be looking elsewhere? Should I entirely leave the SE family of sites and find forums related to the topic somewhere else?


First of all, let me say that english is not my first language, so please excuse any mistakes that you could meet from here on out.  I read several articles and explanations about luminance and illuminance, I have almost understood what is the difference between them but I'm still a little confused and that's the reason why i'm writing here.  Avoiding the technical definitions, I understood that Illuminance is the amount of light perceived on a surface, while Luminance, then, is how much reflected light is perceived looking at that surface.  The question is: can I consider the light reflected like a form of illuminance?  For example: consider a subject, a female/male portrait on a white background, there are not light sources in this subject but sources of light are behind my back and bring light to my subject. I take a photo of this subject with my camera. What my eyes as well as the sensor of my camera perceive is only light reflected from the subject....uhhmmm...light reflected? I could say that what I catch with my eyes and with my camera is Luminance...or Illuminance?  I mean, yes, light is reflected from the subject but then reflected rays of light become incident rays of light for my eyes and for the sensor of my camera...don't you agree?  Hoping my question is clear, if it's not clear just tell me, I will try to explain myself better.

The more I read about this, the more confused I become. Illuminance, as I understand it,  measured in lux, is the perceived brightness of light on a surface. It's what you'd measure with an incident light sensor. Luminance, then, is how much reflected light you'd perceive looking at that surface. This is what the light meter in a camera measures. Am I correct so far?  In both cases, the word "perceived" is important, because the scales are weighted using a  to map wavelengths to . However, in the case of illuminance, there's only actual perception if your eye happens to be the surface in question.  I can basically grasp this, but then I come across charts saying things like "family living room: 50 lux". Wait, hold on! Does that really mean that the typical lights in a house are that bright, or is it just confused and wrong, or am I confused and wrong?  If you're not taking pictures of light sources directly, why would an incident light meter reading ever be useful in photography? Reflected light recorded on film or by a sensor is usually what makes a photograph. So, if I have an incident light meter, how does that reading relate meaningfully to my camera settings?  Since incident light meters are sold and used, this implies that there must be some useful conversion. But this is where my brain explodes. Google tells me that 1 lumen equals 1 candela, so therefore 1 lumen/m² (i.e. 1 lux) must equal 1 candela/m2 (i.e. 1 nit). But clearly something is missing from this. There's something called a "steradian". Cones are involved. I'd never heard of this before; how does it fit in? I can see how it might be determined when calculating the usefulness of LED home lighting, but for a photo, I'm at a loss.  Some part of my (exploded, from the last paragraph) brain is trying to relate this to the difference between flash metering with TTL and with an incident meter. But how can the incident meter work without knowing the reflectance properties of the objects in the scene? Is this what the "C" in the  is all about? Is it just an average-this-probably-will-work value, or is there more to it than that? And if it is just an average, what knowledge is necessary for compensating for off-averages scenes? (As with the , where the photographer simply judges if the scene should be rendered brighter or darker than the average given by the meter.)  So yeah, so much confusion. In short:   What's the difference? Can one meaningfully convert between the two? When and how are illuminance / incident light measurements useful for photography?     Update: I appreciate Stan's answer, which covers the third point of when and how pretty well. And I think I've basically got the first point figured out, as described above. But I'd appreciate some answers covering the issue of conversion as well, both in the mathematical abstract and as the practical for photography. And I wouldn't mind more why and how, either.


Unreal conditional sentences with Past Perfect, Were and Should may suffer inversion to show more formality. "Past Perfect" and "Were" exist in the original regular Unreal Conditional but how does "Should" work? Where does it come from? From another S.Past verb different from "were"?  Is it correct, for ex? "If he knew it, he would tell me".        INVERSION.....Should he know it, he would tell me.

I am not quite sure whether in the following sentence the construction of the verbs and the rest of wording are correct:     Should the construction of the University Hospital be completed, this would indeed set new standards - both in terms of size ("one of Germany’s largest university hospitals") as well as with a view to the technological advances.


So a few years ago I read a young adult book about a female human who crash landed on a planet and meets some aliens who help get her somewhere, but I forget where. The aliens are described as being reptilian, and I think near the beginning a passing reference is made to one of the alien POV character's relatives regrowing a limb. The POV shifts between the human and the aliens, and they have to find ways to communicate across a language barrier. I think, but I'm not sure, that the human protagonist's name was Hannah, but I know the aliens thought it was funny because in their language, her name meant either "twig" or "little twig". I'm pretty sure that the world the story takes place in is heavily forested or thick swampland, or at least the part the human lands in. The atmosphere is breathable to the human protagonist. I'm pretty sure the story starts from the POV of the aliens, and that they are harvesting some sort of plant. I don't think they have a high tech society, I think it was more of a subsistence agriculture kind of thing. I'm pretty sure the aliens help get the human back with the use of a tool the human had, which may or may not have beeped when pointed in the direction of wherever the human was trying to get to. Sorry a lot of the details are so vague, I can't remember a lot of it.

I read a book sometime between 1999 and 2002, possibly young adult. It starts out with a spaceship containing two astronauts landing on a foreign planet. One, a man, is rendered unconscious; the other, a woman, is the main (human) character. The planet has native life, including an intelligent species. Chapters of the book alternate being narrated by the female astronaut and one of the aliens. The point of the plot is depicting the woman and the alien as they gradually learn to communicate. I believe it ends with the woman and her injured partner leaving the planet after she has successfully learned to communicate with the alien.  At one point the alien is confused by the woman's spacesuit, thinking it is her real skin, and is surprised when she starts "shedding" it.  The alien also consistently refers to fingers as "digits", something that really confused me when I was a kid.


I want to write a conditional expression such as the following.    What is the best way to express such conditional expressions in Latex?

How do I produce a conditional expression with large brackets? For example: X = 0 if a=1, 1 otherwise, with a large left bracket and specifying each condition in a line?


On my computer I can connect to a wireless network and I use USB internet (Dongle). I would like to dedicate my computer to use the USB Dongle only and not the WiFi at all.. this is because I use connectify (Software) to broadcast the WiFi network and connect my PS3 to the internet and when I do it now the computer uses the WiFi network as well sometimes and creates LAG on my PS3.  Please Help ! Windows 8

When I dock my Windows 7 laptop, I want it to prefer the wired ethernet connection over WiFi.  This is a pretty straightforward thing to do on my Mac - I just reorder my network preferences, and it "does the right thing." I just can't figure out how to achieve the same thing on my Win7 laptop.  So, when I'm docked, it connects to WiFi, and then fails to connect to servers on the local wired network. How do I fix this?


I think it may be a problem if we directly use dummy variable for a categorical predictor having hundreds of levels.   I have found one solution from the book  (p.329). The solution is mentioned in classification tree sections. Specifically, the solution orders the levels of the categorical predictor by the number of occurrence of each level in one class, and then treats the predictor as an ordered predictors.   I wonder for models other than classification tree, such as linear regression, what would be proper ways of handling categorical predictors with too many levels.  I found an old post asking similar questions, but no answers have been posted:

What techniques are available for collapsing (or pooling) many categories to a few, for the purpose of using them as an input (predictor) in a statistical model?    Consider a variable like  (discipline chosen by an undergraduate student). It is unordered and categorical, but it can potentially have dozens of distinct levels. Let's say I want to use major as a predictor in a regression model.  Using these levels as-is for modeling leads to all sorts of issues because there are just so many. A lot of statistical precision would be thrown away to use them, and the results are hard to interpret. We're rarely interested in specific majors -- we're much more likely to be interested in broad categories (subgroups) of majors. But it isn't always clear how to divide up the levels into such higher-level categories, or even how many higher-level categories to use.  For typical data I would be happy to use factor analysis, matrix factorization, or a discrete latent modeling technique. But majors are mutually exclusive categories, so I'm hesitant to exploit their covariance for anything.  Furthermore I don't care about the major categories on their own. I care about producing higher-level categories that are coherent with respect to my regression outcome. In the binary outcome case, that suggests to me something like linear discriminant analysis (LDA) to generate higher-level categories that maximize discriminative performance. But LDA is a limited technique and that feels like dirty data dredging to me. Moreover any continuous solution will be hard to interpret.  Meanwhile something based on covariances, like multiple correspondence analysis (MCA), seems suspect to me in this case because of the inherent dependence among mutually exclusive dummy variables -- they're better suited for studying multiple categorical variables, rather than multiple categories of the same variable.  edit: to be clear, this is about collapsing categories (not selecting them), and the categories are predictors or independent variables. In hindsight, this problem seems like an appropriate time to "regularize 'em all and let God sort 'em out". Glad to see this question is interesting to so many people!


This seems like a very simple issue, and though I have a workaround I would like to fix it nicely.  EDIT: I am using a Django system, so the groups variable is actually inherited/retrieved from a DB) I just tried to make a minimal example, but I realised that that was not conducive to solving my issue  I have a class:  class Invite(models.Model, IndexedModelMixin):      def get_associated_groups(self):         return self.groups   But when I call get_associated_groups elsewhere  def get_groups(resource_object):     resource_group_objects = resource_object.get_associated_groups()   where Invite is the resource_object, this error is thrown:  get_associated_groups() missing 1 required positional argument: 'self'  My workaround currently is   resource_group_objects = resource_object.get_associated_groups(resource_object)   Why isn't the self call implicit?

Is there any meaningful distinction between:  class A(object):     foo = 5   # some default value   vs.  class B(object):     def __init__(self, foo=5):         self.foo = foo   If you're creating a lot of instances, is there any difference in performance or space requirements for the two styles? When you read the code, do you consider the meaning of the two styles to be significantly different?


Due to odd circumstances, I need to present long division manually (in math mode). That is, without using a macro. Moreover, I cannot use \multicolumn or \cline. Normally, I would do:  \[ \begin{array}{cccc} & 0. & 7 & 5 \\ \cline{2-4} \multicolumn{1}{c|}{4} & 3. & 0 & 0 \\ & 2. & 8 & \\ \cline{2-3} & & 2 & 0 \\ & & 2 & 0 \\ \cline{3-4} & & & 0 \end{array} \]   but is there a way to obtain similar results without \multicolumn or \cline? I'm also open to options using asymptote.  I'm not looking for a generator as they don't insert a 0 when the divisor does not go into the dividend. I'd like a manual way of doing this that looks half-way decent.

I want to do regular long division in latex. See also:   Is there a latex macro for this ?  Edit: I actually want to use it in mathjax, is this possible ?


All of sudden I noticed two new disks in my Ubuntu 16.04: /var/lib/snapd/snaps/core_5662.snap (deleted)  and /var/lib/snapd/snaps/chromium_506.snap (deleted)  .  What are they and why did they appear?  The first disk appeared several days ago. I noticed the second disk only today and shortly after that my Chromium crashed and all bookmarks and browsing history for the last 3 months disappeared. The new disks do not seem to have any Bookmarks files though.  Disks utility does not show any changes to the original actual disks. It looks as if someone has mounted two additional disks.

I just realized using gnome-disk-utility (3.18.3.1) that my 16.04 installation is featuring several small loop devices.  In detail:   78 MB Loop Device (/var/lib/snapd/sn_ntu-core_352.snap -> /dev/loop0) 76 MB Loop Device (/var/lib/snapd/sn_ntu-core_216.snap -> /dev/loop1) 79 MB Loop Device (/var/lib/snapd/sn_ntu-core_423.snap -> /dev/loop2) 705 KB Loop Device (/var/lib/snapd/snaps/tpad_12.snap -> /dev/loop3) 684 KB Loop Device (/var/lib/snapd/snaps/tpad_11.snap -> /dev/loop5) 705 KB Loop Device (/var/lib/snapd/snaps/tpad_13.snap -> /dev/loop6)   Image showing gnome-disk-utility    My questions are as follows:   What are those loop devices used for? Is that an expected behaviour in 16.04? Can  I remove them? And if so - how (just by unmounting)? Is there any risk in removing the 2 installed snaps mentioned below (tpad and ubuntu-core)   UPDATE  Installed snaps  According to snap list I do have   tpad (1.8.1) ubuntu-core (16.04.1)   installed. I remember I did tinker with snaps for a short time when  I realized this option - but am pretty unsure if  I  installed those 2 snaps - or if they are pre-/auto-installed.  tpad is a Terminal text editor with GUI-like user interface  I  did install manually, as  I don't use it  I removed it now via sudo snap remove tpad. As a result the 2 loop devices pointing to tpad are gone in gnome-disk-utility.  So - at the current point  I am still having 1 snap installed called ubuntu-core and I don't know what it is used for. The summary of this particular snap is   The ubuntu-core OS snap


If in one day I earn 350 reputation (capped at 200), and on the same day I offer a bounty of 100, at the end of the day, have I gained 100 or 200 reputation?  Edit  I Confirm that  address my problem.

This was a question I originally intended to ask before .  According to , paying for a bounty will actually reduce your reputation cap. I searched more recent posts, but the majority of posts that deal with both reputation caps and bounty are about the reputation you earn from the bounty, not that lost from payment. Is this accurate to what actually occurs?  My main concerns draw from the following pool of questions.   Does paying a bounty actually reduce the reputation cap still? After paying a bounty, am I considered to "reach" the reputation cap after getting 200 reputation worth of upvotes, or getting a net daily gain of +200 reputation from upvotes? After paying a bounty, am I considered to "exceed" the reputation cap after getting over 200 reputation from non-bounty sources, or getting a net daily gain of over +200 reputation from non-bounty sources? Can tactical bounty assignment be used to aid in avoiding the criteria for certain cap-related badges?   There were a few other questions I figured, but they could all be derived from the answers to the above questions.


what is the difference between this:  int MyClass::getId() {     return this->id; }   and this:  int MyClass::getId() {     return id; }   in C++?

I am programming in C++ for many years, still I have doubt about one thing. In many places in other people code I see something like:  void Classx::memberfunction() {     this->doSomething(); }   If I need to import/use that code, I simply remove the this-> part, and I have never seen anything broken or having some side-effects.  void Classx::memberfunction() {     doSomething(); }   So, do you know of any reason to use such construct?  EDIT: Please note that I'm talking about member functions here, not variables. I understand it can be used when you want to make a distinction between a member variable and function parameter.  EDIT: apparent duplicate:


Every now and then our Exchange 2013 server (running on Windows 2008R2) will reboot during office hours, typically in the early afternoon (say, somewhere between 15:00 and 16:00) - apparently because the server thinks it wouldn't hurt anybody because nobody is really logged in. The reboots are always related to the server installing new upgrades automatically and users are annoyed because their Outlook makes problems (if they are lucky, it simply reconnects after a few minutes, but if they were in the middle of composing a longer mail the only way to save their work is by copy-pasting all to an empty Word doc, say, and restart Outlook).  The update settings are as follows:   install automatically (recommended) install daily at 06:00   So even if an update process should somehow take a whole hour, the reboot that might be necessary should happen at 07:00 in the morning and not nine to ten hours later, shouldn't it?  I would like to keep the update process as admin-friendly as possible, i.e., without the need to manually install updates off-hours or to manually schedule a reboot.  Q1: Why can it happen that the automatic reboot (always?) happens so many hours after the scheduled update installation time?  Q2: Is there any way to gobally prevent automatic reboots during office hours, i.e., to automatically delay an auto-reboot scheduled for between 08:00 and 18:00 to happen at 23:00 instead?

I have a domain controller with Windows Server 2012 on it. After updates, the server does not reboot immediately. However if I remote into the server I will be presented with a countdown for a reboot. The only options are to restart now or to close the notification. However the countdown still continues and the server eventually reboots without my permission. How can I stop this from occurring?


DB21034E The command was processed as an SQL statement because it was   not a valid Command Line Processor command. During SQL processing it   returned: SQL0601N The name of the object to be created is identical   to the existing name "LOG_CONF_BP" of type "BUFFERPOOL".   SQLSTATE=42710   How to remove pre-existed "LOG_CONF_BP" of type "BUFFERPOOL" in db2 database? Is there any other way to define logging for my stored procedures?


I have web app which contains iframe. In main part client communicates with server by ajax, additionally i added beforeunload = function(){ return "something";} , so when user clicks browser back button alert will appear, when user clicks leave the page, he will lose session and login page will show. In iframe part  i use servlet, so when user clicks browser back button alert won't appear because only iframe page will unload. Now what i want to achieve. While user is manipulating in iframe, when he clicks browser back button then alert should appear and when user click leave page i want to log off whole app. When he clicks don't leave page inside iframe shouldn't reload.  I tried to solve this using two events beforeunload and unload. This is inside iframe:  var confirm = false; var clicked = true; $(window).on('beforeunload', function(evt){     if(confirm){         return "Text";     } else {         clicked = false;     } }); $(window).on('unload',function(evt){     if(clicked){         $(this).off('beforeunload');         window.parent.location = window.parent.location + "/error";     } });   Now when user manipulating in iframe clicks back button browser, alert appears. When clicks leave page is working good, log out. But when clicks don't leave, the page in iframe will back to earlier and i don't why:(. I want to prevent it.

I am writing an application that if the user hits back, it may resend the same information and mess up the flow and integrity of data. How do I disable it for users who are with and without javascript on?


I am currently rather uneducated on the subject, but I was thinking of a general relativity thought experiment. Say I take a charge from infinity and give it velocity to orbit a planet in a circle. Now from the earth's perspective the charge is accelerating thus it should radiate EM waves. But Einstein says there is no experiment you can perform (locally) to determine if you are in free fall in a gravitational field as opposed to floating in free space. But if what I described was the case then there would be an experiment you could perform; you could check for the emission of a photon. Where is the problem?

A charged particle undergoing an acceleration radiates photons.  Let's consider a charge in a freely falling frame of reference.  In such a frame, the local gravitational field is necessarily zero, and the particle does not accelerate or experience any force. Thus, this charge is free in such a frame. But, a free charge does not emit any photons. There seems to be a paradox. Does a freely falling charge in a gravitational field radiate?


I have attached my python code below where I am facing some difficulty in initializing list with some values please take a look at it:- array = [1, 2, 3, 3] value = 6 dp = [[-1] * (value + 1)] * (len(array) + 1)     for i in range(len(array) + 1):     for j in range(value + 1):         if i == 0 and j > 0:             dp[i][j] = 0         elif i >= 0 and j == 0:             dp[i][j] = 1         else:             dp[i][j] = -1   for i in dp:     for j in i:         print(j,end = " ")     print()  The output which I am getting is :- 1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1  The output which I am expecting is:- 1  0  0  0  0  0  0 1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1 1 -1 -1 -1 -1 -1 -1  can you guys please figure out where I am going wrong as I am learning to use python stuffs.

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