Advice/literature on combining items with different response scales into composite scales?

Let's say I have some self-report items measured on a 5-point Likert scale (Strongly Disagree to Strongly Agree) and other items measured on a 4-point Likert scale (Never, Rarely, Sometimes, Often). Can anyone point me to literature (or practical advice) on combining these items into a composite scale? Let's assume for the sake of argument that we have some empirical evidence that items should be combined.  Some ideas:  1. Sum raw scores  Pro: Easy  Con: Max responses on the 5-point scale (originally 4's) drive up the total scale score more than max responses on the 4-point scale (originally 3's).  2. Rescale and sum  Put all of the items on a 0-1 scale and sum. So the 4-point items (0,1,2,3) would be multiplied by (4/3)/4 and the 5-point items (0,1,2,3,4) would be multiplied by 1/4, resulting in possible values of (0,.33,.66,1) and (0,.25,.50,.75,1), respectively. This way max responses on the 5-point scale (originally 4's) would not drive up the total scale score more than max responses on the 4-point scale (originally 3's).   Pro: Items would have equal weighting. (could be a con, depending on your perspective).  Con: Ignores differences in variability between items on different metrics?   3. Standardize and sum  A related approach would be to standardize all of the items (z score) and then sum.  Pro: Addresses differences in variability between items on different metrics  Con: Total scale score becomes less interpretable and sample-specific. The latter makes it hard to benchmark as a measure to be used in other settings/other samples.  4. PCA or other data reduction   4a. EFA to get factor loadings. Multiply scaled items by factor loadings.  4b. PCA to get score of first principal component.  Pro: Items weighted by influence.  Con: Same as #2. EFA-derived scores could vary a lot depending on rotation/extraction choices. Some would not advise on ordinal data.    Overall: I like #2 because it seems easier to compare results across different samples. Thoughts? Alternative ideas or concerns about the ideas presented?


Are hints rather than full answers for educating beginners allowed?

Sometimes I see beginners in a subject (it is apparent in the question) asking for solving some issue. My natural instinct is to guide them to resolving the problem themselves rather that just giving the answer. I think it is better education to learn how to solve the problem in general than get a quick answer.  However I do not think this is really correct for Stack Exchange. What is the best way to proceed for such examples?


Can you link external USB hard drives in a RAID-style system?

I have a load of old external USB hard drives lying around - as I'm sure an increasing number of others do also.  Is there any way I can utilize these to act in some kind of RAID-type system?  Seems a waste to have all that storage lying around in uneven and relatively small chunks.  I'm using Windows Vista Ultimate 64 bit.


Help with the following problem would be appreciated:  Let $p(z)$ be a polynomial over $\mathbb{C}$ with at least two distinct roots. Prove that no connected component of the set $\{z \in \mathbb{C} : |p(z)|=1\}$ is a circle.


If H is a subset of G, prove that H is also a subgroup.

$G$ is a group, and $H$ is a nonempty subset of $G$. We know that, for any two values $a$ and $b$ in $H$, $ab^{-1}$ is also in $H$. Given this, how do we know that $H$ is also a subgroup of $G$? More specifically, I need help proving that, for every $a$ in $H$, $a^{-1}$ is also in $H$. Thank you.


Change the classname in each Tag that depends on the href value

I need to change the class of each href item depending on its value. I have this code.

%file_display_name%

       Download

    In getting the href item on class download-link, I used this javascript code.  function myFunction() {   var anchors = document.querySelectorAll('a.download-link');   for (var i = 0; i < anchors.length; i++) {     var url = anchors[i].href;     var splitfile = url.split('.').pop();     if(splitfile=='pdf'){        //class="file" would be class="pdf-file"    }else if(splitfile=="docx"){        //class="file" would be class="docx-file"    }else{       //other file format...    }  } }   on Inspect Element, Something this kind of output.  Element 1 ---

             //Changed into pdf-file
Sample PDF 1

     Download

   Element 2 ---

             //Changed into docx-file
Sample docx 1

     Download

   How to achieve this kind of output? Changing the classes that depends on the values on href. Any Idea?


Over the past week we have been a victim of two seperate ddos attacks varying in scale.  The last one was very large and very hard to mitigate.  We are looking at solutions from veriSign and Akamai but the prices are so steep.  I found a company called BlockDOS.net and their prices are much more reasonable but I've never heard of them and can't find much information about them.  Before I trust our e-commerce website to a comapny like this I typically like to have more info.  Does anyone have experience with BlockDOS.net or can anyone recommend another provider?  Thanks


I found a silly tag.  It's called   The description is WRONG TAG! Use [javascript] instead!.  So why does this tag still exist?  Can tags be deleted?  Will this tag ever be deleted?  I think it's useless, and just taking up space.  We don't need it.  So why do we want it?  Do we want it, or just no mods have seen it (can mods delete tags)?  I think the person who made this tag was just creating spam.  Even if you mistype , it's easily accessible in the  page.  Mods or the admins or someone should be able to see who makes these tags, because for the people who are trusted who can make tags might make more mistakes like this, and probably be restricted from tag creating for maybe a day?  Does anyone agree?  [EDIT]  I just realized from the answers that tags do indeed get deleted if they don't have any questions within 24 hours.  Thanks for the information!  I will read more (for those interested, it has a question at  - thanks DoorknobOfSnow).  [EDIT TO THE EDIT]  I just again realized that there are many zombie tags, such as .  But they will all be deleted as shown in the answer to .  PS.  If everyone is wondering why those tag links are broken (not yet), it's probably because they are now deleted (because they are zombie tags).


Why is there a voting limit restriction on Meta?

Nearly every day recently, I'll use up all my post and comment votes here on . Why do we have the voting limit here?


Is the weighted sum of two normal distribution PDF's also a normal distribution?

Given a distribution with PDF equal to a*N1 + (1-a)*N2, where N1 and N2 are the PDF's of normal distributions with some mean and variance, is the sum distribution also a normal distribution? The total probability is equal to 1 clearly, but is it normal?


Who deals with a flag when you flag a moderator?

Is it possible that, when you flag a moderator's actions, they can action the flag themselves? Or does it get escalated even higher to staff? I suppose the question then is, who would deal with the staff's flags?


How could it possible to factorise $x^8-1$ in product of irreducibles in the rings $(\mathbb{Z}/2\mathbb{Z})[x]$ and $(\mathbb{Z}/3\mathbb{Z})[x]$?

How could it possible to factorize $x^8-1$ in product of irreducibles in the rings $(\mathbb{Z}/2\mathbb{Z})[x]$ and $(\mathbb{Z}/3\mathbb{Z})[x]$?  I'm having a hard time starting the problem. Could anyone help me at this point?


Title is removed/cleared/erased when starting editing

First time this happens to me.  When I try to edit , the title part is immediately erased:   And when I click cancel, the title becomes invisible:     Actually, the revision history is incomplete:   It shows that the question was asked after the comments:   That's highly likely a result of an edition of the history by a moderator.    Google Chrome 62.0.3202.94 (Official Build) (64-bit) on macOS 10.13.2 (17C88).


How do i summon custom villagers that sell custom prefilled chests

I was making a trading system on my minecraft server (e.x. 64 iron blocks = good armor) and i couldnt figure out how to make the villagers sell custom prefilled chests if you want to do it for me i would love it! Prefilled chest give command:  /give @p chest{display:{Name:"\"Iron Rank\""},BlockEntityTag:{Items:[{Slot:0,id:iron_helmet,Count:1,tag:{Enchantments:[{id:protection,lvl:4},{id:respiration,lvl:3},{id:aqua_affinity,lvl:1},{id:thorns,lvl:3},{id:unbreaking,lvl:3},{id:mending,lvl:1}]}},{Slot:1,id:iron_chestplate,Count:1,tag:{Enchantments:[{id:protection,lvl:4},{id:thorns,lvl:3},{id:unbreaking,lvl:3},{id:mending,lvl:1}]}},{Slot:2,id:iron_leggings,Count:1,tag:{Enchantments:[{id:protection,lvl:4},{id:thorns,lvl:3},{id:unbreaking,lvl:3},{id:mending,lvl:1}]}},{Slot:3,id:iron_boots,Count:1,tag:{Enchantments:[{id:protection,lvl:4},{id:feather_falling,lvl:3},{id:thorns,lvl:3},{id:depth_strider,lvl:3},{id:unbreaking,lvl:3},{id:mending,lvl:1}]}},{Slot:4,id:iron_sword,Count:1,tag:{Enchantments:[{id:sharpness,lvl:5},{id:knockback,lvl:2},{id:fire_aspect,lvl:2},{id:looting,lvl:3},{id:sweeping,lvl:3},{id:unbreaking,lvl:3},{id:mending,lvl:1}]}},{Slot:5,id:iron_pickaxe,Count:1,tag:{Enchantments:[{id:efficiency,lvl:5},{id:unbreaking,lvl:3},{id:fortune,lvl:3},{id:mending,lvl:1}]}},{Slot:6,id:iron_pickaxe,Count:1,tag:{Enchantments:[{id:efficiency,lvl:5},{id:silk_touch,lvl:1},{id:unbreaking,lvl:3},{id:mending,lvl:1}]}},{Slot:7,id:iron_axe,Count:1,tag:{Enchantments:[{id:sharpness,lvl:5},{id:efficiency,lvl:5},{id:unbreaking,lvl:3},{id:fortune,lvl:3},{id:mending,lvl:1}]}},{Slot:8,id:iron_shovel,Count:1,tag:{Enchantments:[{id:efficiency,lvl:5},{id:unbreaking,lvl:3},{id:fortune,lvl:3},{id:mending,lvl:1}]}},{Slot:9,id:iron_shovel,Count:1,tag:{Enchantments:[{id:efficiency,lvl:5},{id:silk_touch,lvl:1},{id:unbreaking,lvl:3},{id:mending,lvl:1}]}},{Slot:10,id:iron_hoe,Count:1,tag:{Enchantments:[{id:unbreaking,lvl:3},{id:mending,lvl:1}]}}]}} 1 sorry if its long but this is the command so if you could please put this into a villager trade i would love it!


How do you predict the weather for great photo opportunities?

the other day i was driving from work (on west side highway in nyc) and the weather was stunning! red skies with orange sun with few sparse clouds!   i really really wished i had my big camera, and planned a good location, because that was the day to take a great photo.     any way to have predicted this? seems like a few-times-a-year occurrence.


Cant hide mouse cursor on embedded Debian

I am working on a Debian-based Dragon Board (410C) system. The system will produce a touch screen that triggers some functions of a car. I am trying to hide the mouse cursor in my application. Connected to my device with SSH and tried lots of stuff. But cursor is always there. I think that maybe a graphical mouse cursor image (not an actual cursor) by the interface may cause the fail.  I tried such of ways to hide the cursor as installing application 'unclutter' and running it at startup file (.myxinitrc) with the command 'unclutter -idle 0.1 -root' and ended up with a working command, but no visual changes at all, this command hides the mouse cursor on a Debian-based Ubuntu system, I also tried to write option '.myxinit – -nocursor' when I am calling my xinitrc file at the startup.  when I enter the command  unclutter -idle 0 -root   it gives an error like “unclutter could not open display”. If I change the command like  unclutter -idle 0 -root -display :0   it runs the command (it moves to the next line and idles until I press ^c) but still nothing changes. When I run the same command on my Ubuntu, it hides the cursor.  The system runs my service called “mycarui” at startup. Not a linux interface or anything. It has only guided access to my service as default.


What do you call someone who refuses to acknowledge their wrongdoing?

There is a person in my current daily life who never admits his wrongs. He is always quick to blame others first and always believes that he is not wrong. Even when he is proven wrong, he still believes he shouldn't be sorry and isn't wrong.   Is there a single-word adjective to describe this behavior? If not, a better way to describe this person would also make do.   While stubborn and irresponsible fit, I feel like they don't tell the whole story. By this, I mean if I were to say to others that he is very stubborn and irresponsible, it is not implicitly implied that he blames others and never acknowledges his own fault.  Edit: I believe my question is different because the person will also never acknowledge their wrongdoing. On top of blaming others, even after it has been proven to be their fault, they will not admit wrong doing. So aside from blaming others, they refuse to acknowledge the possibility that they have committed a mistake.


The HTML5 clipboard is awesome, but I am looking for a way to make it safe.  The user is pasting text/html into my webpage. This allows them to paste images, tables, etc.  I am looking for a way to remove all scripts from the pasted content, before I add it to the page.  I need to remove <script> elements, as well as other ways of executing scripts like  <img src="x" onerror="alert('Hacked!')">   (and any others)  I do not want to remove style elements, or any other sorts of elements. (They are actually pasting into an iframe, so styles won't affect anything else.)


Here are two examples of the exact same regex pattern matching in Python and R  Python:  In[1]: import re In[2]: reg = re.compile("oa") In[3]: files = [".vim", ".jupyter", "Downloads", "Documents", ".bashrc", "R", "Python"] In[4]: [x for x in files if reg.match(x)] Out[4]: []   R:  > files <- c(".vim", ".jupyter", "Downloads", "Documents", ".bashrc", "R", "Python") > grep("oa", files, value = TRUE) [1] "Downloads"   Why doesn't the Python regex return anything?


In Star Trek TNG, why don't they always go at warp 9?

I have noticed that the Enterprise very often travels at speeds like warp 2, 3, 5, and so on.  This is especially true in the early seasons.  It almost seems that the warp speed they choose to travel at is a measure of the "importance" of whatever is going on.  Is there an in universe reason why don't always travel at, say, warp 8 or 9?  It seems that they could cut their travel times down significantly.  I understand that there are limits to the engine.  And that travelling at the higher ends of the warp 9 scale approaches those limits.  But surely there are high speeds that are not near the limits.


How to call a no-const function within a const override function in C++

There's a class below  class A {     public:         string& getStr()         {           // Do a lot of work to get str           return str         }         const string& getStr() const; };   Can I call the first function within the second function? I want to do this, because the second function have a lot of code in common with the first one. It cannot be like this:  const string& A::getStr() const {     // Wrong     A temp;     return temp.getStr(); }   because there is added a new temp and the inner status between *this and temp is different (*this != temp).  Can it be called like I described?


If we allow that the energy to allow quantum tunnelling through a potential barrier has been borrowed by the Heisenberg energy-time uncertainty relation, from the vacuum energy. How is the borrowed energy paid back?


GPA weightage for changing fields in higher studies

Currently pursuing my 3rd year of  BTech in electronics and communication engineering, I plan on pursuing an Integrated PhD / PhD in Astronomy and Astrophysics due to my deep interest and passion for th field. I have relevant research experience in the same, good GRE scores and LORs. My question is that due to the change in my study field, how much weightage will my engineering GPA have on my application? If it is average, will it be a drawback? Thanks for your help.


What does it mean for something to hold "up to isomorphism"?

For example, to say that there are 2 such groups up to isomorphism such that the order of G is equal to $p^2$?


Inserting Record in Oracle Database using JAVA

I am trying to dynamically add,delete and update records into a table  but i am getting following error.  java.lang.NullPointerException in preparedStatment object  i have tried this  try {         String sql = "INSERT INTO " + LoginFrame.userName + "." + TableInfo.tableName + "(" + txtIdName.getText() + "," + txtName.getText() + ") VALUES(?,?)";         JOptionPane.showMessageDialog(null, sql);          pst = (OraclePreparedStatement)con.prepareStatement(sql);          pst.setInt(1, Integer.parseInt(txtIdValue.getText()));         pst.setString(2, txtValue.getText());         pst.executeUpdate();      } catch (Exception ex) {         JOptionPane.showMessageDialog(null, ex);         System.out.println(ex);     }


How can I animate the position of a Bézier curve segment as shown in the images below?


Does macOS phone home to Apple's servers before running an app for the first time?

I'm running macOS Catalina 10.15.4 on a 2018 MacBook Pro 15", which has the T2 chip (if anything else is relevant, let me know and I'll update the question.)  I'm a developer and I'm in the process of writing and debugging a C command-line utility that's supposed to take a few miliseconds to run and exit.  My internet connection went down while I was coding (WiFi was still connected, but my ISP was down), and afterwards I noticed that, after compiling the app, the first time I ran it, it took a few seconds to run rather than the expected fraction of a second.  I turned off WiFi (so there was no active network connection), compiled my app again, and ran it -- this time it ran as quick as I would expect.  Turn on WiFi, compile and run again, first run of the app takes longer than expected.  Maybe I'm paranoid, but it sure sounds like macOS is trying to ask Apple's servers for blessing to run my app. Is this the case, or could there be another explanation? If it's indeed the case, can anyone link to an article explaining what's going on under the hood?  UPDATE: as requested, here are timings for an average of three runs of the following command, under different conditions:  touch file.c && make && time ./file && time ./file  The first measurement is the average time for running file for the first time after compilation (the third command in the chain). The second measurement is the average time for running file for the second time after compilation (the fourth command in the chain).  WiFi on, with internet: 347 ms/3 ms.  WiFi on, without internet: 5024 ms/3 ms.  All network connections offline: 24 ms/2 ms.


Install Ubuntu desktop on Ubuntu server 16.04

I have been having problems trying to install ubuntu-desktop on my VPS Ubuntu server 16.04  This is what I did:  sudo apt-get update sudo apt-get upgrade sudo apt-get install ubuntu-desktop   Then, I added a password to the root account. I read that I had to do that to access the Ubuntu desktop. I did this:  sudo passwd root  sudo passwd -u root   When I restart the Ubuntu server, I get the field to enter the password only. the option for username does not appear. I get this, but it says that the password I entered is incorrect. But it is correct.


Is it possible to always show hidden/dotfiles in Open/Save dialogs?

It is possible to show so-called dotfiles/directories like .git or files/directories that have the Hidden attribute in the Finder by running   defaults write com.apple.Finder AppleShowAllFiles 1   from the command line (then running killall Finder to restart it). However, this only works in Finder, not in applications' Open/Save dialogs. In those, one can use the ⌘⇧. keyboard shortcut to show these files, but you have to use it each time you open a new dialog as the settings aren't saved.   Does anyone know of any kind of way to make this setting permanent? It could involve a Terminal command, editing a .plist or other file on an application by application basis, anything.  was asked a while ago with no satisfactory answers, so I'd like to see if there have been any changes in Mountain Lion, or if anyone knows an answer that just missed the first question. I'm currently running 10.8.4, if it makes any difference.


"Doing the same thing over and over and expecting different outcomes is the definition of insanity" - ( Albert Einstein,) and quantum mechanics

The above quote is often attributed to Einstein, though according to  it does not originate from him. My question is: isn't the quote completely untrue, as quantum mechanics & nuclear decay completely disprove it, as in both there are examples where doing the same action can lead to completely different outcomes.


Counterexample for a non-measurable function?

I am struggling to solve an exercise in my measure theory book and any help for solving it would be appreciated:  Let $(\Omega,\mathcal{A},\mu)$ be a measure space and let $f:\Omega  \to \mathbb{R}$ be measurable. Find a function $g:\Omega  \to \mathbb{R}$ which is equal to $f$ almost everywhere but is not measurable.


I have a table that looks like this (oversimplified case of the actual case to make my point)  CREATE TABLE sales (    id int,    currency VARCHAR(5),    price int    shop_id int );   Now I need to make a query that will give me something like this table, grouping by shops yet giving sum of sales per currency My problem is when I make currency column non aggregate it fails because my query becomes non standard. When I add currency to group by then each currency creates new row, something I don't want. I have run out of option and would appreciate any help or pointer to the right direction.  I use MySQL but would appreciate if I would get the solution that works with more databases (PostGreSQL being at the top of the list after MySQL)  Query that works with undesired results  SELECT   shop_id,           (CASE WHEN currency= "GBP" THEN SUM(price) ELSE 0 END) AS POUND,           (CASE WHEN currency= "USD" THEN SUM(price) ELSE 0 END) AS USDOLLAR GROUP BY shop_id, currency   The data that should be produced by the query  shop_id     |   POUND   |   USDOLLAR     -----------------------------------------     1       |   400     |   300 -----------------------------------------     2       |   250     |   100 -----------------------------------------     3       |   400     |   100 -----------------------------------------


how to add number of days into a given date in the format mm/dd/yyyy?

How to add number of days into a given date in the format mm/dd/yyyy .  If my date is 9/12/2007, I want to add 30 days into the date and the result should be 10/12/2007.  I have many frequencies like Weekly, monthly, Every 2 weeks, Twice a month, Every 4 weeks, Once in 2 months, Every 3 months, Every 6 months, Every 3 months, Annually, etc.   If we  select the different frequencies from the list, the result should vary based on the frequency. Can anyone help me on this ?


I am writing a document which describes the user interface of a software application. I want to use the actual icons as part of the description text (as in "Press XXX", where XXX is replaced by an actual icon).  How can I scale the icons so that they fits nicely within the text, without hardcoding a size? I can \includegraphics[heigth=something] but I would like this "something" to automatically adapt to changes in line height, font size, etc.  Is there a way to do this?


Why will Beamer Equation Killing Document

I am a totally new to beamer and I just can't seem to figure out why beamer won't let me include equations.  I run the following code and it does not work. I try to include {equation*} but it still does not work.  Any help would be appreciated  \documentclass{beamer} %%%%%%% \begin{document} %%%%%%% \begin{frame} \frametitle{Modified CAPM }  \begin{equation}% \begin{split} R-Rf& =\alpha_1EU+\alpha_2US+\beta_1MktRf+\beta_2EUFund*MktRf+\epsilon \end{split} \end{equation}  \end{frame} \end{document}   Also it does not work when I update the code to simply:  \documentclass{beamer}  \begin{document} \begin{frame} R-Rf=\alpha_1EU+\alpha_2US+\beta_1MktRf+\beta_2EUFund*MktRf+\epsilon \end{frame} \end{document}


How to execute consecutive commands from history?

Suppose I want to execute a sequence of four commands that I have executed before. If the first one is 432 in the command-history, then I could do:  $ !432; !433; !434; !435   I'm curious, is there a more efficient way to accomplish this?


When to use "music" & when to use "musical"?

In ,      [only before noun] connected with music; containing music      the musical director of the show      musical talent/ability/skill      musical styles/tastes      a musical production/entertainment      musical instruments      : the art of writing or playing music      to study music      a career in music      music lessons      the music business/industry   so, we got "music industry" but "musical production" & I heard people said "musical life"  Ok, The beautiful girl= the girl is beautiful  The musical life= the life is musical  My question is: why not "musical industry" or "music production" or "music life"?


SELECT * FROM workers ORDER BY salary DESC LIMIT 2;  I have this SQL statement to get the salary of the two best paid workers but I'm getting a SQL command was not ended correctly. EDITED: SELECT  worker_id, last_name, job_id, salary     FROM (SELECT w.*,                 rank() over (ORDER BY w.salary desc) rnk           FROM worker w          )    WHERE rnk <= 5;


Should I add references to a conference poster

I read the "" article by Thomas C. Erren and Philip E. Bourne. It gives me the general idea of how to prepare a poster.  However, I wonder whether I should add references to the poster as many parts have strong (advanced) knowledge acquired from other works? If yes, where is recommended for references in a portrait A0 poster. Thanks.


I have a process builder that is being invoked by another process builder, and for some reason I cant use any scheduled actions with the sub process. Why wouldn't my subprocess be able to use scheduled actions? Thanks!


Is there an archive of old Ubuntu files such as rootfs-ubuntu-12.10-0.8.0.tar.lzma?

goo.im and rabids.org are dead. However is there some other source for old files from 2012?  I also posted a related question elsewhere:   (tagged as nvdia due to tf700t having a tegra)


Netbeans or Eclipse on macOS Sierra - Java problems

I want to install Eclipse or Netbeans on macOS Sierra. When I try to run Eclipse, I get an warning that Java 6 is needed. I downloaded the latest version of Eclipse to be sure.     So I tried Netbeans:    While at the same time the System settings report that Java 8 is installed and up to date.    How can I get either Eclipse or Netbeans working on macOS Sierra?


Conditional statement in a function for PS1 are not re-evaluated

I'm using a function to dynamically generate output for PS1. There are a couple statements that check if node and package.json exist, and if git and .git folder exist to display node version or the git branch. If none exist it just outputs the User$.  The problem is when user goes into another folder where none of the conditions are met the prompt is not updating. It's like conditions are cached or smth  function displayPS1() {   MESSAGE="";   GRAY_BACK="\[\e[100;97m\]";   GREEN_BACK="\[\e[100;42m\]";   GREEN_FORE="\[\e[32;1m\]";   CYAN_BACK="\[\e[100;46m\]";   CYAN_FORE="\[\e[36;1m\]";   RESET="\[\e[0m\]";    if hash node 2>/dev/null && [ -e package.json ]; then     NODE='$(node -v | sed "s/\(v[0-9]*\)\(\.[0-9]*\.[0-9]*\)/\1/g")';     MESSAGE="${GRAY_BACK} node ${GREEN_BACK} $NODE ${RESET} User${GREEN_FORE}$ ${RESET}";   elif hash git 2>/dev/null && [ -d .git ]; then     BRANCH='$(cat .git/HEAD | sed "s/ref:[[:space:]]refs\/heads\///")';     MESSAGE="${GRAY_BACK} git ${CYAN_BACK} $BRANCH ${RESET} User${CYAN_FORE}$ ${RESET}";   else     MESSAGE="User${CYAN_FORE}$ ${RESET}";   fi    echo "$MESSAGE"; } export PS1=$(displayPS1);


How do I get a list of all the available keyboard layouts in X.org?

I know these layouts have two-letter codes like us for the US layout. I need a list of all the layouts available and also to pair the two-letter codes to the proper names of the layout to get the not so trivial ones.


How can I integrate this:  $$\int_1^3 \frac{\ln(x)}{\ln(x)+\ln(4-x)}dx ?$$ I tried making a substitution $t=4-x$  but it doesn't help.  Are there any tricks to solve this integral easier?


Suspicious comma suggested by comma grammar checking software

I was using a grammar correction software to review an article. The software suggests to insert a comma in the following text:  In each part, the warping function creates feature maps of the input data and the wavelet filters extract higher frequency information from the input and propagate it forward.  The comma is suggested between and and data in data and the wavelet. I was not sure why it is suggested, if it is a correct one, and what type of comma it is.


If $m^x$ an integer for all naturals $m$ then $x$ and integer

I have seen this result somewhere: If $x$ is a positive real number such that $m^x$ is an integer for all natural numbers $m$, then $x$ is an integer.   It is quite interesting and I have some thoughts on it, but I have not yet solved it. By the way, is this famous?


Added Auto-Number field in Managed Package - How to generate values for existing records in upgraded orgs?

I have a managed app installed in multiple orgs. This app contains CustomObject__c. All org where my app is installed have many records of that type.  Now I push upgraded this app and added a new Auto-Number field for CustomObject__c. The records that already existed before upgrade didn't get assigned a value for this Auto-Number fields.  Is there anything I can do about this?


C# CS0120 "An object reference is required for the non-static field, method, or property"

class Program {     int[] arrayOne = new int[3];     int[] arrayTwo = new int[5];     int[] arrayThree = new int[7];     int sumOne = 0;     int sumTwo = 0;     int sumThree = 0;      static void Main()     {          //call method to generate numbers         generateRandomNumbers();          //call method to get sums of arrays         sumOne = getSum(arrayOne);         sumTwo = getSum(arrayTwo);         sumThree = getSum(arrayThree);          //call method to show numbers in each array and their sum         showNumbers(arrayOne);         showNumbers(arrayTwo);         showNumbers(arrayThree);          ReadKey();     }      private static void generateRandomNumbers()     {         Random random = new Random();         //load in values for arrayOne         for (int i = 0; i < arrayOne.Length; i++)             arrayOne[i] = random.Next(1, 99);          //arrayTwo         for (int j = 0; j < arrayTwo.Length; j++)             arrayTwo[j] = random.Next(1, 99);          //arrayThree         for (int k = 0; k < arrayThree.Length; k++)             arrayThree[k] = random.Next(1, 99);     }      private static int getSum(int[] array)     {         int total = 0;          for (int x = 0; x < array.Length; x++)             total += array[x];          return total;     }      private static void showNumbers(int[] array)     {         for (int m = 0; m < array.Length; m++)             Write("{0, 5}", array[m]);          switch (array.Length)         {             case 3:                 Write(" = {0}", sumOne);                 break;             case 5:                 Write(" = {0}", sumTwo);                 break;             case 7:                 Write(" = {0}", sumThree);                 break;         }         WriteLine();      } }   Basically, the error occurs everywhere that I use arrayOne, arrayTwo, arrayThree, and sumOne, sumTwo, sumThree. Removing 'static'from the Main and generateRandomNumbers methods removes all of the errors, but then of course it can't compile without the static Main method.  In my C# course, we are learning methods and arrays at the moment and the goal of this program is to put random numbers into three arrays and then display each number and the sum of the array.  I have searched around and the answers mostly go along the lines of "create an instance" but I'm not sure how to go about doing that. Any help would be much appreciated!


What off-topic flag to use for completely off-topic questions?

What off-topic flag should I use on SO for a question that has nothing to do with programming, software, and is not suitable for any other SE site?  The reworked flag system confuses me; I don't see any off-topic flag that fits a completely off-topic question.


What is the difference between Exploratory Factor Analysis and Principal Components Analysis (PCA)?

I know what you're thinking, this is a duplicate of "", but it isn't really.  That other question deals with Confirmatory Factor Analysis.   Either way, I would like to know what the difference is :)  Thanks!


I'm a complete beginner at LaTeX but would now like to write a mathematical article with MLA style referencing. The set of references I'm using are for this article only and nothing else, so I don't need to be able to use the same references for several documents. Also, I have no experience with bibtex or biblatex, nor have I ever used the citation system that comes with LaTeX. What is the most direct way to achieve this?


For each $\beta \in(0,1)$, give a sequence $\{a_j\}\subset(0,1)$ with $\prod (1-\alpha_j) = \beta $

Suppose $\{\alpha_j\} \subset (0,1)$. Give a sequence ${\alpha_j}$ such that $\prod (1-\alpha_j) = \beta $, where $\beta \in (0,1)$   I was able to prove part a. That is the infinite product of $(1-a_j)$ is positive iff $\sum \alpha_j < \infty $.  However, I have no idea how to exhibit a sequence ${a_j}$ so that the infinite product of $1-\alpha_j$ is some $\beta$ that is in $(0,1)$. Would I need to construct a specific sequence or a more general case?  Any help would be much appreciated as I am really stuck and don't have much of an idea even where to begin.


Can someone explain to me the concept of atmosphere opacity?

On this diagram, why is the  shaped as it is?  If we are able to see lights due to low atmospheric opacity, why can't we see radio waves, when the atmospheric opacity is so low for these kinds of waves?  What does the author mean by "observable"?


How would you prove that this limit exists at the origin

Consider $$\lim_{(x,y)\to(0,0)} \frac{xy}{|x|+|y|}$$  I tried the following technique but couldn't work it out   define $p=(x,y)$ we end up with the following inequalities :  $$|p|^2=x^2+y^2\\ |x|≤|p| \\ |y|≤ |p|$$  But couldn't use them at all couldn't find a boundary. What should I do? What would you recommend?


Can cell addresses (vs. cell contents) be used as operands in Excel formulae?

Consider the following scenario illustrating the data I have vs. the data I want. Very simply, I have a single column that represents Field 1, Contents of Field 1,...etc. and is more appropriately formatted as pairs of rows across columns.          I've been experimenting with the TRANSPOSE function, but that one's new to me and I'm not sure it's the right direction. At first glance, it doesn't seem to accomodate my needs. But I could be wrong...  While it would be relatively simple to set up an 'every other row' formula, I also have to account for situations where I may have a foo repeating with a single bar or vice versa, and that's where I'm stuck. What I need is a "next unused cell" function, or something that can add X rows or Y columns to a particular cell.     I can envision a formula that can manipulate the cell label and solve my problem:  =($A1+2rows) or some kind of =$(A+3)$(4+2) that would return cell D6.   Is something like that possible?


Stop iPhone from sending iMessages to OS X

I recently got an iMac and I set up that my photos and music from my iMac get downloaded to my iPhone.   But now my messages on my iPhone are getting sent to my iMac. I went on my iPhone and clicked Settings > Messages > Send and Recieve but it doesn't show an email that is set up to my Mac. I also can't find preferences for messages on my Mac. How do I stop iMessages from my Phone going to my Mac?


How does a wavefunction collapse into one state? More specifically, what conditions cause a wavefunction for a quantum particle to collapse?    Does this have to do with density matrices?    Please try to give a mathematical explanation that is simple and concise...


I have searched Python dictionary but nothing came out.  what is the mean of *\ in the below code?      def __init__(self, input_dim=(1, 28, 28),                   conv_param={'filter_num':30, 'filter_size':5, 'pad':0, 'stride':1},                  hidden_size=100, output_size=10, weight_init_std=0.01):         filter_num = conv_param['filter_num']         filter_size = conv_param['filter_size']         filter_pad = conv_param['pad']         filter_stride = conv_param['stride']         input_size = input_dim[1]         conv_output_size = (input_size - filter_size + 2*filter_pad) / filter_stride + 1         pool_output_size = int(filter_num * (conv_output_size/2) * (conv_output_size/2))          #weight initialize         self.params = {}         self.params['W1'] = weight_init_std * \                             np.random.randn(filter_num, input_dim[0], 5, 5)  #and so on   in  self.params['W1'] = weight_init_std * \                             np.random.randn(filter_num, input_dim[0], 5, 5)   ?


What can I do when getting 'Invalid session' error in Minecraft?

Today, out of the blue, I got an error saying:  Invalid session (try restarting your game and launcher).  Usually, I can just restart the game and the error will go away, but today I've been getting the error multiple times, even after logging out of the launcher, signing out and back in, and even reinstalling Minecraft, but nothing works. What is causing this? How can I fix it?


In C#, int and Int32 are the same thing, but I've read a number of times that int is preferred over Int32 with no reason given. Is there a reason, and should I care?


What does the prefix `\??\` mean in a Windows path?

In Windows Task Manager, when displaying the Details view, there is a process conhost.exe, whose Command line is shown as \??\C:\Windows\system32\conhost.exe 0x4. What does the prefix \??\ mean? I am aware of the prefix \\?\, which allows longer paths and special characters, but I assume this is something distinct.


Character with byte sequence 0xe2 0x80 0xa6 in encoding utf8 has no equivalent in encoding latin1

I am importing a CSV file into a PostgreSQL table through the PostgreSQL import functionality, but I get this error:  character with byte sequence 0xe2 0x80 0xa6 in encoding utf8 has no equivalent in encoding latin1   Please help me out with this...


How to combine bold and "code sample" in Markdown?

How can I make a word in a code sample bold? I only see asterisks around the expected bold text.  sample **sample** sample


Entering PhD with bad masters grades and no thesis

I am a foreign national who came to the US to pursue my Master and now working at a robotics startup company. I had pretty good grades and awards from my bachelor's degree. But, after coming to the US, because of not eating well and having financial issues, I could not concentrate well on my master's degree and ended up getting just passing grade which is 3.0 out of 4.0. I did not do any thesis in my master. I really thought that this was the end and I would not pursue a PhD or come near academics at all in my life.   Lately, after working at my company, I feel like learning and knowing more about it. I am doing some online courses and learning constantly. But, I would like to pursue a PhD in the near future. My problems are, I don’t really have good connections with anyone to write me recommendation letters and I didn’t do a thesis in my master and moreover, I had just passing GPA and no research papers with my name. I don’t know how to revive myself from this situation. Please help. Thanks!


java.awt.HeadlessException - Applet not displayed

I am using Tomcat 5.5.23, JDK 1.5 on HP Unix. We have an application which when invoked form tomcat starts an applet. It was working fine till JDK 1.4. But now we have moved to JDK 1.5 and the applet does not start. The exception thrown is - java.awt.HeadlessException:  No X11 DISPLAY variable was set, but this program performed an operation which requires it.  I then added JAVA_OPTS="-Djava.awt.headless=true" to catalina.sh file. But still I get the same Headless exception, but this time without the X11 Display message.  Any help would be appreciated.


While loop with scanner expression continuing despite false evaluation

very new to java and wondering why this while statement won't end even when the input from the scanner is "N" thus evaluating the expression to false.  import java.util.*;  public class addSongs {      public static void main (String[]args){          Scanner songAdd = new Scanner(System.in);         Scanner addContinue = new Scanner(System.in);         String ceaseAdd = new String();         ceaseAdd = "Y";          while(ceaseAdd != "N")             System.out.println("Enter track title");             String newSong = songAdd.nextLine();             MP3_catalogue.title.add(newSong);             System.out.println("Enter artist name");             String newArtist = songAdd.nextLine();             MP3_catalogue.artist.add(newArtist);             System.out.println("Enter duration");             String newDuration = songAdd.nextLine();             MP3_catalogue.duration.add(newDuration);             System.out.println("Would you like to add another song? Y/N");             ceaseAdd = addContinue.nextLine().toUpperCase();     }  }


Working on a simple todo app that allows the users to sort the tasks by hand. It's fairly simply to implement the model based on a LinkedList in Java.   Yet if I want to persist the sorted tasks in a relational database I would have to add a new column that provides an index by which I can sort the tasks.   The problem would be that every time a user changes the sorting (take for example that she puts the fourth task at the second position) I would have to update every task to fix the indexes in the database. That seems quite nasty to me. Is there a more elegant way to solve this problem?


Prove that $$\lim_{x→0} \frac{\sin^{-1}x-\tan^{-1}x}{x^3}=\frac{1}{2}$$   $$ \lim_{x→0} \frac{\sin^{-1}x-\tan^{-1}x}{x^3}=\lim_{x→0} \frac{\tan^{-1}\frac{x}{\sqrt{1-x^2}}-\tan^{-1}x}{x^3} \\ =\lim_{x→0} \frac{\tan^{-1}\bigg[\frac{\frac{x}{\sqrt{1-x^2}}-x}{1+\frac{x^2}{\sqrt{1-x^2}}}\bigg]}{x^3} =\lim_{x→0} \frac{\tan^{-1}\bigg[\frac{x(1-\sqrt{1-x^2})}{\sqrt{1-x^2}+x^2}\bigg]}{x^3}\\ \text{since, }\frac{x^2}{\sqrt{1-x^2}}>-1 $$  I think I am getting stuck here, do not really see how to proceed further with the steps.  Note: I don't want to use L'Hospital's rule as I 'd like to solve it without using the derivatives of $\sin^{-1}x$ and $\tan^{-1}x$.


A simple question about cross-validation

I want to use SVM using 10-fold cross-validation (CV). My code is as follows:  svm.model <- svm(train.d, y=train.l,                  type='C-classification',                  cross=kfold,                  kernel=kernel)   I know that in k-fold CV, k different models are trained. Which of those k models is the final svm.model? Is it the trained model with maximum accuracy?


Closed for expression for geometric and arithmetico-geometric series

Can you help me prove this two sigmas: $$\sum_{k=2}^n 2^{1-k} = 2^{-n}(2^n - 2) $$ and this $$\sum_{k=2}^n k2^{1-k} = 3-2^{1-n}(n+2) $$ Is there any common way to solve this kind of tasks? Thank you very much for help.


bashrc PS1 : user prompt won't clear entire text

user prompt:  user - / :   up/down keys to locate historical commands.   user - / : historical command   clear the "historical command" :  user - / :hist   No matter how many times I hit BackSpace.. unable to delete "hist" part.  technically it is not even there. but on the screen it simply wont clear out until I hit "enter"  user - / :hist user - / :   what causes it ?   The problem is probably due to the colors I used here. but how can It be corrected ?  PS1="\[\033[38;5;190m\]\u - \W : \e[m"


i just found out we can defining and instantiate class at once like this  #include <iostream>  using namespace std;  class PLAYERS { public:     int value3;     PLAYERS(int value3)     {         this->value3 = value3;     } }play1(2), play2(3), play3(7);  int main() {     play1.value3 = 2;     PLAYERS play4();     cout << "Hello world!" << endl << play1.value3;     return 0; }   what is it called? when i delete the argument on instantiation of play1, play2, play3 like play4. it will compile error but the play4 is fine. how it can be?


Is it fair to assume that if an \include command does not add a blank page both before and after, it is because the chapter starts on a page with an odd page number ?  EDIT: I thought I was having trouble with \include. I had the impression from for example  that \include would add a page both before and after. I had one \include statement in my document and there was indeed a blank page both before and after the chapter. When I added more \include statements I didn't see the same behavior and thought something was wrong until I noticed chapters start on odd page numbers which lead to my assumption above.


Hardware requirements for a modern GIS workstation

I need an advice on what hardware configuration would be most efficient for a modern GIS professional. Should I go for out-of-the-box HP/DELL workstations or should I assemble different parts?  Note: 1). Softwares I will mostly use- ArcGIS, QGIS, ENVI, Erdas, Photomodeller & AutoCAD.       2). Extensive 3D modelling, point cloud processing, TIN generation etc. will be frequent.       3). Extensive geoprocessing needed.       4). Long hours of CPU/GPU usage.


Help with mounting a external hard drive in /home

I just moved to ubuntu. I have a 250GB SSD in which i installed the OS. I have my efi partition and my / partition in the SSD while installing. I want to add an extra HDD as my /home now. How do I do that? Also, I code using python and I need to install various python packages. How to install all of the in my HDD ???


Proof Verification: Let $D=\{ \frac{1}{n} \mid n\in\mathbb{N} \} \cup\{0\} \subset \mathbb{E}^1$. Prove that $D$ is compact.

Let $D=\{ \frac{1}{n} \mid n\in\mathbb{N} \} \cup\{0\} \subset \mathbb{E}^1$. Prove that $D$ is compact.      Proof: It is clear that $D$ is bounded above by $1$ and bounded below by $0$. We need to show that the set $D$ is closed, or it   contains all of its limit points. The only limit point of the set $D$   is $0$. But since $D$ includes $0$, $D$ must be closed. Hence, $D$ is compact because it is closed and bounded.  $\blacksquare$   I claimed that $0$ is the only limit point of the set $D$ but is this okay? I stated it allegedly without giving much reasoning but I thought it was very obvious from looking at the set.   Can $D$ be its own open cover? If so, can I just give an example of finite subcover of $D$ to show that it is compact? For example, since $(2,0) \cup (0,2)$ covers $D$, $D$ is compact.


Testing schedulable apex class that sends an email

I am relatively new to Salesforce development (I'm an intern) and I am currently struggling with achieving 75% code coverage when testing a class that regularly sends out an email. I have included the code below. Anywhere there is an 'X' is a place holder for information I would rather keep private. The class is very simple: Send a very simple email (a link to a survey) everyday at the same time to a list of people that is queried for by checking all active users in the org. Any tips on how to test this would be greatly appreciated. public class SendSurveyEmail implements Schedulable { public void execute(System.SchedulableContext sc){     sendEmail(); }  public void sendEmail(){     Messaging.SingleEmailMessage message = new Messaging.SingleEmailMessage();     message.setUseSignature(false);      message.setBccSender(false);      message.setSaveAsActivity(false);           EmailTemplate emailTemplate = [Select Id,Subject,Description,HtmlValue,DeveloperName,Body from EmailTemplate where name = 'X'];     message.setTemplateId(emailTemplate.Id);          User[] allUsers = [SELECT Id, Email FROM User WHERE isActive=:true];     String[] toEmails = new List<String>();     for(Integer i = 0; i < allUsers.size(); i++){         String email = allUsers[i].Email;         if (email.contains('X')){             toEmails.add(email);                 }     }     message.setToAddresses(toEmails);          String surveyLink = 'X';     message.setPlainTextBody(surveyLink);      }  }


Can I use a 5V 1A usb adapter to power a 5V 500mA lamp?  The lamp describes 5V 500mA as max. rated power input


"for students who" or "for students whom"?

Which of the following example sentences is correct? (one uses who and the other uses whom)     This has caused a problem for students who, up until recently, were in good shape.   or     This has caused a problem for students whom, up until recently, were in good shape.   I am aware I should use whom when it's the object of the preposition, but I'm confused about how to analyze the grammar of these sentences.


Let $\gamma : [0,1]\rightarrow\mathbb R^2$ be a continuous curve whose image has positive Lebesgue measure. Must $\gamma$ have self-intersections? Intuitively this seems like it should be true, but I could not find a proof. An equivalent question is whether there is a positive measure subset of $\mathbb R^2$ which is homeomorphic to $[0,1]$.   Note that it is shown here  that $\gamma$ must in fact have lots of intersections if the image of $\gamma$ is a rectangle. But, here I am not making any topological assumptions on the image of $\gamma$. The answer to the linked question does not work in this generality.


Difference between deep copy and shallow copy

I am not able to get understand what is difference between deep copy and shallow copy. Please make me understand with the simple example. Thanks


Denied croatia impact on my travel to spain

Hello there currently i will be visiting spain they issued  me multiple entry 90 days however i am afraid that they might turned me down at the border will it most likely to happen and will i be at the schengen information  system? Because on last years trip i was not allowed to travel to croatia  due to single entrance schengen visa  however the croatian  border  guard  did not stamp my passpored with a cancellation stamp nor asking me to sign any letter related for the purpose of refusal entry he just asked me to go back to ljubjana to apply a croatian visa or travel within the schengen area as a replacement thank you.My question is only will i face problem due to my pass of being denied entry at croatia and will i be at the sis system ? Thank you


I am work on lyx and i got problem when i generated pdf?!  The error mg:  ! Package xcolor Error: Undefined color `tcbcol@back'.   The code of local layout:  Style Stop Category              MainText Margin                Static LatexType             Environment LatexName             stopp NextNoIndent          1 LeftMargin            MMM RightMargin           MMM ParIndent             MM ParSkip               0 ItemSep               0 TopSep                0.5 BottomSep             0.5 ParSep                0 Align                 Block AlignPossible         Block, Left, Right, Center Preamble \usepackage{tcolorbox} \usepackage{bclogo} \tcbuselibrary{skins,breakable} \usepackage{xcolor} \newtcolorbox{stoppi}[1][]{enhanced,   before skip=2mm,after skip=3mm,   boxrule=0.4pt,left=5mm,right=10mm,top=1mm,bottom=1mm,   colback=LightSkyBlue!0,   colframe=blue!20!black,   sharp corners,rounded corners=southwest,arc is angular,arc=3mm,   underlay={%     \path[fill=tcbcol@back!80!black] ([yshift=3mm]interior.south west)--++(0.2,-0.1)--++(0.1,-0.2);     \path[draw=tcbcol@frame,shorten <=-0.05mm,shorten >=-0.05mm] ([yshift=3mm]interior.south west)--++(0.2,-0.1)--++(0.1,-0.2);     \path[fill=MidnightBlue!10,draw=none] (interior.south east) rectangle node[white]{\Huge\bfseries\bcstop} ([xshift=-10mm]interior.north east);     },   drop fuzzy shadow,#1} \newenvironment{stopp} {\begin{stoppi}} {\end{stoppi}} EndPreamble End   Please what's the problem in this code, Regards


MWE:  \documentclass{minimal} \usepackage{commath, tikz} \begin{document} \begin{tikzpicture} \node {$:$}; \end{tikzpicture} \end{document}   When I compile this, pdfTeX enters an infinite loop. Why?


Mean Time to Failure (MTTF): When disk manufacturers post this, how should you interpret their numbers?

Mean Time to Failure (MTTF) is usually given in terms of hours, and by doing some calculations, it seems that a disk should fail only after a good number of years have gone by.  It seems that disks need repair more often than that. Does anyone know why this is so?  I figured that there is something fishy about this metric. Am interpreting something wrong here?


At the end of Oceans Eight there is shown an inscription that says      Danny Ocean (1963-2018).   Is the character Danny Ocean dead? Did I miss out on any information given during the movie?


I’m using Ubuntu Server 18.04.3 LTS (GNU/Linux 4.15.0-58-generic x86_64) to run a headless server for our home network.  During a recent maintenance session I noticed that I could upgrade to a 20.04 version of Ubuntu Server after updating the existing system.  When I ran the command to update the system I encountered an error, see code... I’m only somewhat proficient at the terminal, and wondered if anyone could help me to understand the right commands/process to correct these errors? Thanks… 2 packages can be upgraded. Run 'apt list --upgradable' to see them. lk@lkserver:~$ apt list --upgradable Listing... Done shim/xenial-updates 15+1552672080.a4a1fbe-0ubuntu2 amd64 [upgradable from: 15+1533136590.3beb971-0ubuntu1] wireless-regdb/xenial-updates,xenial-updates,xenial-security,xenial-security 2020.11.20-0ubuntu1~16.04.2 all [upgradable from: 2018.05.09-0ubuntu1~18.04.1] lk@lkserver:~$ sudo apt upgrade Reading package lists... Done Building dependency tree  Reading state information... Done Calculating upgrade... Done The following packages have been kept back: shim The following packages will be upgraded: wireless-regdb 1 upgraded, 0 newly installed, 0 to remove and 1 not upgraded. 6 not fully installed or removed. Need to get 0 B/10.6 kB of archives. After this operation, 1,024 B of additional disk space will be used. Do you want to continue? [Y/n] y (Reading database ... 106889 files and directories currently installed.) Preparing to unpack .../wireless-regdb_2020.11.20-0ubuntu1~16.04.2_all.deb ... Unpacking wireless-regdb (2020.11.20-0ubuntu1~16.04.2) over (2018.05.09-0ubuntu1 ~18.04.1) ... dpkg: error processing archive /var/cache/apt/archives/wireless-regdb_2020.11.20 -0ubuntu1~16.04.2_all.deb (--unpack): trying to overwrite '/lib/crda/pubkeys/sforshee.key.pub.pem', which is also in package crda 3.18-1build1 Errors were encountered while processing: /var/cache/apt/archives/wireless-regdb_2020.11.20-0ubuntu1~16.04.2_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)


Find the left cosets of subroups of $S_3$

So I am struggling to understand the definition of a coset. If I have the following symmetric group $S_3=\{1, \sigma, \sigma\tau, \sigma\tau^2, \tau, \tau^2\}$, where $\sigma$=$\left(\begin{array}{ccc}1 & 2 & 3 \\ 1 & 3 & 2\end{array}\right)$ and $\tau$=$\left(\begin{array}{ccc}1 & 2 & 3 \\ 2 & 3 & 1 \end{array}\right)$.  I am given the subgroups $H=${$1,\sigma$} and $K=${$1,\tau,\tau^2$} How would I find all the left cosets of these subgroups? Thanks


What causes Nova's Triple Tap to go on a short cooldown?

This isn't about the level 20 ultimate talent.  There is a brief "arming phase" where Nova locks onto her target before shooting three bullets.  When something happens to her target during that phase (allied Devouring Maw, Divine Shield, etc.), sometimes Triple Tap is placed on the full 100 second cooldown, other times it is placed on a much shorter 10 second cooldown.  What triggers this 10 second cooldown?   Is this a timing issue?  I believe if she is interrupted after the shots start going out, Triple Tap is always put on the full cooldown.  Maybe I'm just seeing the ability get blocked right as the first shot goes out? Is this ability-specific?  Does stunning Nova have a different effect than a Devouring Maw or Void Prison on her target?  And is that different from a Divine Shield/Sanctification on the target? Is this determined by whether the line to the target was interrupted by an ally or an enemy hero?  For example, is there a difference between an allied Void Prison and an enemy Void Prison on the target?


Runtime error when deleting a dynamically allocated object

I have an abstract class named Company, a typedef typedef Company* CompanyP; and the following map:  map<string, CompanyP> companies;   When I add companies into the program it's using the insert and make_pair functions, like this:  companies.insert(make_pair(companyName, new Stock(...)));   (Stock's base class is Company)  So as far as I understand the second part of the pair is holding a pointer to this object that i allocated using new, so I should be able to delete it in later part of the code.  So why when I get to the following code in a different function called  removeCompany, I get a runtime error? (compList is an array of strings and holds the keys to all existing functions) :  // Delete the company and than delete the pointer from the map cout << companies.find(compList[cmd - 1])->first << endl; delete companies.find(compList[cmd-1])->second; cout << "The company \"" << compList[cmd-1] << "\" has been removed." << endl; companies.erase(compList[cmd - 1]);   I know that the key is correct using the first line with the cout command because it rightfully shows that the find function indeed finds the correct pair, but when the debugger gets to the delete command I get a runtime error _BLOCK_TYPE_IS_VALID(pHead->nBlockUse).  I've looked into other questions but they were all examples of using the wrong pointers. Here i'm using a base class pointer that points on a derived class, could this be the problem?


Proving that $a^{25}$ mod 65 = $a$ mod 65

I think that I got the answer, but am not quite sure whether or not it is correct.   Prove that $a^{25}$ mod 65 = $a$ mod 65 given that $a \in \mathbb{Z}$  I started off by using the Chinese Remainder Theorem (65 = 5 $\cdot$ 13 and gcd(5, 13) = 1) in order to get the following two equations:   $a^{25}$ mod 5 = $a$ mod 5  and  $a^{25}$ mod 13 = $a$ mod 13  After that, I used the theorem that states that:  $a^e \equiv a^{e \textrm{ mod } \phi(n)} \textrm{ mod } n$ if gcd(a, n) = 1  $\phi(5) = 4$ and $\phi(13) = 12$  Applying said theorem to the two equations above:  $a^{25 \textrm{ mod } 4}$ mod 5 = $a^1$ mod 5 = $a$ mod 5  and  $a^{25 \textrm{ mod } 12}$ mod 13 = $a^1$ mod 13 = $a$ mod 13  I know that the theorem states that gcd(a, n) = 1 which isn't necessarily the case, that's why I wasn't sure whether my solution was correct.


Doing an SNES Mode 7 (affine transform) effect in pygame

Is there such a thing as a short answer on how to do a Mode 7 / mario kart type effect in pygame?  I have googled extensively, all the docs I can come up with are dozens of pages in other languages (asm, c) with lots of strange-looking equations and such.  Ideally, I would like to find something explained more in English than in mathematical terms.  I can use PIL or pygame to manipulate the image/texture, or whatever else is necessary.  I would really like to achieve a mode 7 effect in pygame, but I seem close to my wit's end. Help would be greatly appreciated. Any and all resources or explanations you can provide would be fantastic, even if they're not as simple as I'd like them to be.  If I can figure it out, I'll write a definitive how to do mode 7 for newbies page.  edit: mode 7 doc:


How to reset the angle of rotated view without a numpad?

I somehow rotated my view a few degrees to the side and I don't know how to reset it.    How can I reset the view?  Note: I don't have a number pad.


What are the characteristics of the magnetic field surrounding a human brain?

The human brain is said to produce a magnetic field resulting from the action potentials released inside the brain. What's the nature of such a field in terms of size and strength, and what is the potential for manipulation of brain functions by interfering with it by means of electromagnetic radiation?


JavaScript function to take 2 objects and return the merged output of both objects

I'm learning javascript and have fiddled with this for ages and can't get the desired output   I've searched stack overflow and can not for the life of me adapt any other answer to do what I need it to do, keep getting undefined  var fruit = {apple:"red",graps:"purple"} var vegetable = {cucamber:"green",lettuce:"green"}  var all_food = myFunction(fruit,vegetable);   want to return   {apple:"red",graps:"purple",cucamber:"green",lettuce:"green"}


Locating a file without knowing its name, only its content?

I have a hard drive filled with files, and I need to find a specific file without knowing its name. All I know is that the file contains a list of email addresses. Is there any way I can locate it?


Click event doesn't get triggered from second page onward

I have a issue with click event. I am using jPList plugin and I have a click function for each result set. The first page click function is working correctly, but when I select second or third page and click the button it doesn't get fired.   HTML

     first result

     click me

     second result

     thrid result
   <button class="hitme">     click me   </button>

     fourth result

     fifth result
   <button class="hitme">     click me   </button>

     sixth result

   jQuery  $('document').ready(function() {  $('#demo').jplist({ itemsBox: '.list', itemPath: '.list-item', panelPath: '.jplist-panel' });  $('.hitme').on('click', function() {  alert('clicked'); })  });   Can anyone help me with this please.   See the


Have a excel file abc.xlsx. how to password protect it using command line interface.


Is auto-sync really the biggest battery killer?

I have been digging the archives for eternity to find that Location Services and Auto-sync (assuming we ignored other factors such as Bluetooth etc -- because my focus is mainly about auto sync) are extremely battery hungry.  Although, i manually toggle the switches (GPS, BT etc) based on requirement. I have paid enough heed to notice the battery gain and drain caused by auto sync enabled and disabled.  I have read somewhere people claiming innocence of autosync. Basically, Their idea is  that it doesn't constantly push all the data from server to my phone and vice-versa. instead, there is a thread meant to ask the server if there's something new (and events are created based on the responses).  So, shed some light on:  1) is auto sync really causing  the depression to my battery?  2) what does auto sync really do (perhaps a geeky explanation please) ?  3) how many minutes/hours am i actually gaining or losing while leaving it ON or OFF ?


Check if it's the front page in the template

Im trying to show content when I'm on the front page of my Drupal 8 test website, but the content shows on every page:  {% if front_page %}        {% if logo %}                            {% endif %}
TESTTESTTESTESTAET

test</h1      {{ page.header }}    {% endif %}   Why doesn't this work and how can I make this work?


I want to use jQuery to parse RSS feeds. Can this be done with the base jQuery library out of the box or will I need to use a plugin?


\begin{table}[h] \centering \caption{Modelling steps} \vspace{1mm} \label{tab:steps} \begin{tabular}{lll} \hline \rowcolor[HTML]{34CDF9}  \textbf{Step}           & \textbf{Description}                                                   & \textbf{Addressed in} \\ \hline Problem formulation     & Identifying the problem  or research question to be investigated       &                       \\ System Decomposition    & Deciding system composition, its internal structure and the boundaries &                       \\ Concept Formlisation    & Generalising system description to make it interpretable by a computer &                       \\ Model Formalisation     & Agent narrative                                                        &                       \\ Software Implementation & Implementing the model in a programming language                       &                       \\ Model verification      & Translation of conceptual model to computational model                 &                       \\ Experimentation         & Performing the planned experiments or scenarios                        &                       \\ Data analysis           & Exploring, Interpreting and Visualising the data obtained from model   &                       \\ Model validation        & Accurate representation of real-world system                           &                       \\ \hline \end{tabular} \end{table}


Types of artwork to include in portfolio?

I am currently employed as a Graphic designer in an IT company and want to switch to a company that is more focused on brand or design.   I plan to make a new portfolio. What types of work are relevant to the following topics 1. design, 2. brand or 3. marketing?


How can we quickly familiarize ourselves with the Forgotten Realms?

Follow-up to my question  which was based on the wrong premise that there is a single world for the entirety of DnD. Thanks to that question I was able to boil my issue down to the Forgotten Realms - as that is what my limited experience covers (mostly the Sword Cost as seen in the Baldur's Gate video game series) and because it seems to be the longest-standing and still supported "default" world.  The core issue, though, remains the same:   Apart from me no-one at our table has the slightest idea of the Forgotten Realms. And I'm not meaning having full insights into every aspect of the magical, theological, ecclesiastical, interplanary and mundane goings on - but even just a general "feel" to it, that would be necessary to create believable characters acting in front of this backdrop. Our other players have raised some concerns that this lack of knowhow makes it quite difficult for them to get interested in the system and invested in new characters and a new campaign.   How can our playgroup quickly get a "feel" for the Forgotten Realms in order to kickstart a new campaign?  All of us have years and years of RPG experience, but--alas--limited time. Thus: bonus points for solutions that don't ask us to read 500 page novels. ;)


how to fix ioctl permissions denied error?

I searched in lots of websites/forums but did not find a solution for this problem, and this site is last chance, this is problem: This problem have several other users too. my phone is Galaxy S7 Edge , exynos, Oreo 8.0 (Stock ROM), rooted with magisk latest version. root works well in other applications. In pentesting applications like csploit, Network Spoofer, WifiKill and others  root works well(grants permission)  but when start using options of app(for example, arp spoofing, network sniffer, MITM, etc) drops same error: [ERROR] Unable to retrieve local hardware address libnet ( ioctl: Permission denied ) what to do? Can this issue fixed? or exactly which permission is it?  Also one interesting thing, when I installed old version of WifiKill app it worked - killed wifi connection.


Missing font on some error and dupehammer info popups

Some popups like the dupehammer explanation popup or the validation error ones on the  do not have the right fonts - the browser has to fall back to a default and quite ugly font instead.  Interestingly, this does not happen for validation popups on posting a question - those remain fine.  Tested with both Firefox and Microsoft Edge.


Word cannot access documents or desktop; Freezes on exit

On my Windows 10 computer when I try to open or save a document in Word 2016 I get the following error:     Windows cannot access \\SERVER1\RedirectedFolders\<username>\Desktop      You do not have permission to access \\SERVER1\RedirectedFolders\<username>\Desktop. Contact your network administrator to request access.   And it's true; in the Save or Open dialog box I cannot navigate to my Desktop or Documents folders. Also when I close Word 2016 without saving the document it locks up and shows "not responding" in the taskbar.  In the Options > Save screen I notice that my Default local file location and Server drafts location fields are empty, which isn't the case on another Windows 10 computer I use:    If I try to make any changes in this screen when I click OK I get the error:     The server drafts location you entered for offline editing is not valid or you do not have permission to access that location. Specify a location on your local computer.   If I click any of the Browse... buttons, for example to set the Default local file location, I get the same error as above that "Windows cannot access \\SERVER1\RedirectedFolders\<username>\Desktop" (it's always the Desktop folder mentioned).  I'm not having this problem in other programs. I can access my Desktop and Document folders just fine through File Explorer and other programs.  Why can't I access these folders in Word?  How do I fix it?    Notes:   My Desktop and Document folders are redirected to one of our on-premise servers. They're also configured to be Available Offline. I'm running Word as part of Office 2016 Professional Plus. It's an MSI-based installation. I've tried a repair installation of Office, as well as uninstalling/reinstalling Office. I confirmed I have Full Control permissions to the Desktop and other redirected folders. Interestingly, this doesn't happen to another user account logged in to my computer (their folders are redirected too, but not available offline). Something else I found is that I cannot open the Signatures dialog in Outlook's Options > Mail screen. I click, but nothing happens.


I just fix , but now I have another one  $\text{Let }f:[0,1]\to \Bbb R\text{ be a continuous function}$ Evaluate the function $$\lim_{n\to \infty}n\int_{0}^{1}x^nf(x)\,dx$$  My idea is to do just like what I've done in , only to multiply $n$ in the integral, becomes $$ \begin{align} 0\le n\int_{0}^{1}x^n\,|f(x)|\,dx & \le n\int_{0}^{1}x^n|f(x)-p(x)|\,dx+n\int_{0}^{1}x^n|p(x)|\,dx\\ & \le n\int_{0}^{1}x^n|f(x)-p(x)|\,dx+n\int_{0}^{1}x^n\sum_{i=0}^{m}\lvert a_ix^i\rvert\,dx \end{align} $$ and $$n\int_{0}^{1}x^np(x)\,dx=\frac{na_0}{n+1}+\frac{na_1}{n+2}+\frac{na_2}{n+3}+\cdots+\frac{na_m}{n+m+1}  \to p(1)$$ as $n\to\infty$.  But I stuck because first, I'm doing $|f(x)|$ not $f(x)$  and second, I just know it's upper bound, and I can't use pinching because the lower bound is $0$  I want to compute its lower bound but how?


What is wrong with the followig proof that $\mathbb{Z}$ is isomorphic to $\mathbb{Z} \times \mathbb{Z}$

Since   $ G =( \prod_{1}^{\infty} \mathbb{Z} )\times  \mathbb{Z}  \times \mathbb{Z}  \cong (\prod_{1}^{\infty} \mathbb{Z}) \times \mathbb{Z}  $,   by taking quotients we get  $\mathbb{Z \times Z} \cong G/ \prod_{1}^{\infty} \mathbb{Z} \cong \mathbb{Z}$.  Therefore   $\mathbb{Z} \cong \mathbb{Z \times Z}$.  But $\mathbb{Z}$ is indecomposable!  What's wrong with above proof?


Co-signing & dying: What if a loan co-signer dies? Is estate of co-signer liable?

A grim and tragic question perhaps, but I'm curious:  What happens when a person that co-signed on a loan dies? Is the co-signer's estate potentially liable until the loan is paid off, the same as if the co-signer had borrowed the money themselves?  Or, does the responsibility for the loan die with the co-signer?  Does the bank/lender take on that risk?


Was "book" to "beek" as "foot" is to "feet"?

"Foot" is a curious word in English because it is pluralized in an unusual way; the "oo" in the word is changed to "ee".  Did this once use to be a standard way of pluralizing things in English (or a language that contributed to English), which would mean that the plural of "book" was "beek" instead of "books"?  Or, is "feet" just a one-off?


Can I get back into Australia on a tourist visa if I have an unpaid fine?

I am from Canada, and I have been in Australia for 2 years on a working visa. I have received a fine ($110) for disturbing the peace (public nuisance). If I leave the country, can I get back in on a later date, on a tourist visa, if I haven't paid this fine?  If this is true, and I cannot get a tourist visa with an existing fine, can I pay it from outside Australia, and then apply for my tourist visa, hassle free?


I have some C++ code on a Linux machine whose purpose is to run some code as an arbitrary user.  #include <sys/capability.h> #include <unistd.h>  void doAsUser(uid_t uid) {     if (CAP_IS_SUPPORTED(CAP_SETUID)) {         cout << "Do we have CAP_SETUID? " << cap_get_bound(CAP_SETUID) << endl;     } else {         cout << "CAP_SETUID not supported!" << endl;     }      uid_t ruid, euid, suid;     getresuid(&ruid, &euid, &suid);     cout << "UIDs: " << ruid << " " << euid << " " << suid << endl;      // assume credentials of user     status = seteuid(uid);     if (status < 0) {         cerr << "FATAL ERROR: Couldn't set uid: " <<  strerror(errno) << endl;         exit(1);     }      // do stuff here...      // re-assume credentials of program     status = seteuid(my_uid);     if (status < 0) {         cerr << "FATAL ERROR: Couldn't reset uid: " <<  strerror(errno) << endl;         exit(1);     } }   However, without fail, you get the following output when this function is run:  $ sudo ./program   ...  Do we have CAP_SETUID? 1 UIDs: 0 0 0 FATAL ERROR: Couldn't set uid: Operation not permitted   What's going on here? I thought things running as root (you know, with UID 0 and CAP_SETUID) could assume effective UIDs of any other user.  EDIT:  does not adequately answer my problem, because, as it states, "In order to perform the call to seteuid even though the EUID at the time is not 0, the SUID must be 0". My SUID is 0, my CAP_SETUID is 1, and I have no other security framework in place.


Blender Material Preview Transparent Objects Bug (2.91)

Hello! I am getting this error in Material Preview mode. Does anyone know?


I have written the following code and when I try to run it, I get the following warnings:   warning: variable 'money' is uninitialized when used here [-Wuninitialized] GetData (money, product); note: initialize the variable 'money' to silence this warning int product, money, change; warning: variable 'product' is uninitialized when used here [-Wuninitialized] GetData (money, product); note: initialize the variable 'product' to silence this warning int product, money, change; warning: variable 'change' is uninitialized when used here [-Wuninitialized] CalculateChange (money, product, change); note: initialize the variable 'change' to silence this warning int product, money, change;   I have also typed an arrow to the relevant line. I have been trying to figure out how to fix this problem for an hour now. If you could please help, it would be much appreciated.   #include <stdio.h> #include <ctype.h>  void GetData (int money, int product) {   // Asks user how much was the product and how much they paid the cashier. //   printf("\nHow much was the product?\n");   scanf("%d", &product);    if((product < 5) || (product > 95) || (product %5 != 0))    printf("\nInvalid number!\nNumber has to be a multiple of 5 and cannot be less than 5 or    more than 95.\n");    else printf("How much did you give to the cashier? \n");   scanf("%d", &money);    if (money < product)   printf("You did not give enough money to the cashier!");    return; }  void CalculateChange (int money, int product, int change) {   // Calculates the amount of change needed. //   int fifty = 0;   int twenty = 0;   int ten = 0;   int five = 0;    change = (money - product);    fifty += change / 50;   change %= 50;    twenty += change / 20;   change %= 20;    ten += change / 10;   change %= 10;    five += change / 5;   change %= 5;    return; }  void PrintResults (int fifty, int twenty, int ten, int five) {   // Prints the amount of coins needed. //   printf("\nThe number of fifty cents: %d", fifty);   printf("\nThe number of twenty cents: %d", twenty);   printf("\nThe number of ten cents: %d", ten);   printf("\nThe number of five cents: %d", five);  return; }  int main () {   int product, money, change; <------   int fifty = 0;   int twenty = 0;   int ten = 0;   int five = 0;   char response;  do {    GetData (money, product); <-------    CalculateChange (money, product, change);    PrintResults (fifty, twenty, ten, five);    printf("\nWould like to quit the program? Enter y or n\n");   scanf("%c", &response );   response = tolower (response);   printf("--------------------------------------------------------------------------");  } while (response != 'y');   printf("\nQuitting program...\n");    return (0); }


Let $F$ be a finite field and $i$ an integer. Calculate the sum of all the elements of $F$, each raised to the $i$th power.                                                            My approach so far:  Let $F=(0,1,\alpha,\alpha^2,...,\alpha^{p^n-1})$, where $p$ is a prime number and let $\sigma=1+\sum_{k=1}^{p^n-1}(α^k)^i$ be the desired sum.  Since $F$ is a ring, each element has an additive inverse. Thus, the trivial case of $i=1$ results in $\sigma=1+[\alpha+(-\alpha)+\alpha^2+(-\alpha^2)+\cdots+\alpha^{p^n-1}+(-\alpha^{p^n-1})]=1$.   We can also calculate the trivial case of $i=0$, where $\sigma=1+p^n-1=p^n$   In the general case, let $i=t (\text{mod } p^n)$. Then: $i=t+mp^n$, where $t,m$ are integers. We take into account the fact that the order of the multiplicative group of the finite field is $p^n$, so each element raised to the $p^n$ equals $1$. Thus $σ=1+α^t+α^{2t}+\cdots+α^{t(p^n-1)}$. This is the sum of a geometric progression, plus $1$. Thus, $σ=1+α(α^{p^n-1})/α-1$ = $ 1$+($α^{p^n}-α$)/${\alpha-1}$. But according to Lagrange's theorem, for every $\alpha\in F$, the polynomial $x^{p^n}-x$ is zero. It follows that $\sigma=1$.  An important question is raised: Is it true that the characteristic of the finite field is $p$ if its order is $p^n$? If so, the case for $i=0$ leads to $σ=0≠1$ and all cases have been considered?


What is the rank of matrix $pq^T +qp^T$?

Let $p$ and $q$ be linearly independent vectors. How can I prove that the matrix  $$pq^T +qp^T$$  always has rank $2$? I've tried several experiments, but still cannot prove it.


After trying to upgrade from 17.04 to 18.0 this message appears:  E: The repository 'http://ppa.launchpad.net/jonathonf/vlc/ubuntu zesty Release' does not have a Release file. W: Updating from such a repository can't be done securely, and is therefore disabled by default. W: See apt-secure(8) manpage for repository creation and user configuration details. W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list.d/videolan-ubuntu-master-daily-zesty.list:2 and /etc/apt/sources.list.d/videolan-ubuntu-master-daily-zesty.list:3 E: The repository 'http://ppa.launchpad.net/videolan/stable-daily/ubuntu zesty Release' does not have a Release file. W: Updating from such a repository can't be done securely, and is therefore disabled by default. W: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://archive.ubuntu.com/ubuntu zesty Release' does not have a Release file. W: Updating from such a repository can't be done securely, and is therefore disabled by default. W: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://archive.ubuntu.com/ubuntu zesty-updates Release' does not have a Release file.    W: Updating from such a repository can't be done securely, and is therefore disabled by default. W: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://archive.ubuntu.com/ubuntu zesty-backports Release' does not have a Release file.   W: Updating from such a repository can't be done securely, and is therefore disabled by default. W: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://archive.ubuntu.com/ubuntu zesty-security Release' does not have a Release file. W: Updating from such a repository can't be done securely, and is therefore disabled by default. W: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://archive.ubuntu.com/ubuntu zesty-proposed Release' does not have a Release file.  I have a netbook eMachines E350, Intel Atom processor, and 2GB RAM memory. Is it necessary to download the 18.04 ISO image?


Direct Product of Group: Isomorphic Subgroups

Show that a Direct product of groups, $G \times H$, contains subgroups isomorphic to both $G$ and $H$.  This seems like a simple questions but I can't wrap my head around it. I've already proved that $G \times H$ is a group


Instructions in downvoted answer are unhelpful, encourages counter-productive behaviour

Say I'm a user posting a question and get this error:     It looks like your post is mostly code; please add some more details   And then I find .   Being lazy I use the heavily downvoted suggestion which says to copy and include a paragraph from somewhere/something else that has no relation to the question at all. Which creates unnecessary noise.  Note: .  Wouldn't it make sense to delete that unhelpful answer?


I was trying to speed up my tiny laptop by switching off OpenGL using Compiz.  I guess there were also whole bunch of related plugins got disabled in the process.  Then I lost the entire GUI desktop interface.  Could someone please tell me how to get everything back through command line?  Thanks.


Is it good or bad style to ask for help?

I wonder whether I should end a question on SO with a polite phrase asking or thanking in advance for help, such as:   “Any help is apreciated.” “Thanks in advance for any help.” “Any advice on how to tackle this?”   Or should I let that be and just type in my question? Is there consensus on this topic or a policy I did’t find yet?  When editing ugly questions (bad markup, or typos), should I add or remove such a phrase at the end?


I found this phrase in the Clean Code book:     Pragmatic Dave Thomas and Andy Hunt said this a different way.   Is this phrase correct? From what I know, one should write:     Pragmatic Dave Thomas and Andy Hunt said this in a different way.


I use this code (extract) to run an INSERT query to a MYSQL DB:          try{             $s = $pdo->prepare("INSERT INTO crediti SET                 nota = '$nota',                 scad_nota = '$data_nota',                 chiusa = '$nota_chiusa'             ");             $s->execute();         }         catch (PDOException $e){             $error .= 'Errore nel caricare il credito: '.$e->getMessage();             $table .= ''.$error.'	';             //aggiungo una riga in errore al conteggio             $g = $g + 1;             continue;         }   $nota takes some text that can contains single quote like for example:      ceduto a Valentini nell'ottobre 2010   that as you can see contains a single quote between nell and ottobre (sorry for italian but the meaning is not in scope actually). How should I handle $nota to be able to insert it in the db? With my actual code it breaks for the reason of that single quote:     You have an error in your SQL syntax; check the manual that   corresponds to your MySQL server version for the right syntax to use   near 'ottobre..   I have read a lot on SO and googling around. I have read  question and as far as I understand my code shouldn't have any problem. Any help?


How likely is it you are actually a philosophical zombie?

A philosophical zombie is someone who strongly insists behaviorally they are conscious even though they don't actually have any conscious experiences at all. How likely is it that you, the reader, are actually a philosophical zombie?


"Washroom", "restroom", "bathroom", "lavatory", "toilet" or "toilet room"

I've always been confused by the terms washroom, restroom, bathroom, lavatory, toilet and toilet room. My impression is that Canadians would rather say washroom while Americans would probably say bathroom or Saint John's in the same situation.  I guess the difference here is not only in different kinds of English, but also in whether one is referring to a room in their house or in some public place.  Which do you usually use? Please specify the difference if you use more than two from those six with different meanings, and also where you are from (i.e. what type of English you speak).


How to input Traditional Chinese in pdfLaTeX

I'm trying to write Chinese using pdfLaTeX. But currently I can only write Simplified Chinese Characters, If I try writing Traditional Chinese then the text wont show up.  This is what I have:  \documentclass{article} \usepackage{CJKutf8} \begin{document} \begin{CJK*}{UTF8}{gbsn} 文章内容。 \clearpage\end{CJK*} \end{document}   What would I need to do to get Traditional Chinese?


The google calculator say that $0^0=1$. I'm confused. It's well-known $0^0$ is undefined.


How do I grep the lines based on '.' (dot)?

Suppose I've file with the following contents:  123 251 7.8 951   Now I want to grep the lines having . I've tried:  $ cat file | grep . 123 251 7.8 951     $ cat file | grep '.' 123 251 7.8 951   But it isn't working as expected. So, How do I grep string based on .?  Additional Info:  $ grep --version | line grep (GNU grep) 2.16


What server control panels are available for Ubuntu Server?

As a dedicated Ubuntu server or as a VPS, I am looking for a web control panel, something like cPanel which is something like a web administrator for a server.  I have not used any on Linux since I do everything through the terminal, but still want to know what I can use in the case I have to recommend Ubuntu Server with such an application installed.


What's up with G. M. Hopkins's use of accented characters?

Here are a some extracts from G. M. Hopkins     I say móre: the just man justices;   Keeps grace: thát keeps all his goings graces;    Or this     And áll trádes, their gear and tackle and trim.   Or this     Yet both droop deadly sómetimes in their cells   ...   For a rainbow footing it nor he for his bónes rísen.   Why does he have acute accents on some of the vowels?


How to calculate the future expenditure of education :

Suppose the following:   if a child's age is 2 years today and  he/she will go to college at the age of 15 years  for 2 years(duration of education) and  for which Cost incurred P.A. as on today (Rs.) 100000, Expected rate of return (%) 12  Expected Inflation rate (%) 6,   how can we calculate the future expenditure of education of child.  And for help the answer is: Amount required at start of College (Rs.) :4,39,383  To meet this Goal you must Invest (Rs.) :  - 1,00,695 Lumpsum amount OR  - 1,228 Monthly SIP  Can anyone help me to get the formula to calculate the future amount with right logic.


I need to allow special characters including ' in MySQL. I have a "bio" text field which allows user data and I am using the POST method. My PHP is included:      $uid = $_POST["UID"];     $bio = $_POST["bio"];      $update_query = "UPDATE `User` SET bio = '$bio' WHERE uid = '$uid';";     $conn->query( $update_query );     $conn->close()   All the users are verified so there should be no danger in allowing them to use special characters. How can I update my code?


Subscribe downvoters to posts they downvoted

It's really frustrating when you post a new question, and a person down votes it and then they close the tab. The OP can add a comment such as "Why down vote?", the post would still be down voted even though the OP fixed the issue making the down vote invalid. Then it would still be -1, unless someone up votes the post (but then this gets tricky: the up voter just wanted to fix the -1, not necessarily up vote it and give rep). So a solution: subscribe the down voter to the question, no?  That'd mean he would get notifications when OP's post is edited or new comments on the question or comment.


Suppose $E\subseteq\mathbb{R}$ is closed and $K\subseteq\mathbb{R}$ is compact. Show that every open cover of $E\cap K$ has a finite subcover

Since K is compact, any subset of K, for example, $E\cap K\subseteq K$ must also be compact. I want to illustrate this point using open covers only. (Showing that every open cover has a finite subcover) Let $U$ be an open cover of $E\cap K$ Consider $U\cup (\mathbb{R}\backslash E)$ We can see that $U\cup (\mathbb{R}\backslash E)$ covers all of K (since E and K are complements in $\mathbb{R}$) Now, I know what I have to do next is to use the open cover of K,  $U\cup (\mathbb{R}\backslash E)$, as well as the fact that $E\cap K$ is compact to construct an arbitrary open cover and its finite subcover. But I'm not sure of my work. Tell me what you think.  $U$ is an open cover of $E\cap K$ Pick $n \in \mathbb{N}$ $U_n = \cup^{n}_{i=1}Ui$ is a finite subcover of $U$ Thus, every open cover of $E\cap K$ has a finite subcover  This seems too obvious to me to be true, however. Plus it fails to use the complement that I constructed


Beamer Presentation: Figure has no number?

I am giving a presentation and therefore I am using the  class. I have included some figures and it works, but there is no number after "Figure".  My code:  \documentclass{beamer}  \usepackage{graphicx} \usepackage[latin1]{inputenc} \usepackage[T1]{fontenc} \usepackage[english]{babel} \usepackage{listings} \usepackage{xcolor} \usepackage{eso-pic} \usepackage{mathrsfs} \usepackage{url} \usepackage{amssymb} \usepackage{amsmath} \usepackage{multirow} \usepackage{hyperref} \usepackage{booktabs} \usepackage{wallpaper} \usepackage{bbm} \usepackage{cooltooltips} \usepackage{eso-pic} \usepackage{everyshi} \usepackage{calc} \usepackage{graphicx} \usepackage{ifthen} \usepackage{graphicx} \usepackage{wrapfig} \usepackage{animate} \usepackage[singlespacing]{setspace} \usepackage[absolute,overlay]{textpos} \usepackage{enumerate} \usepackage{hyperref} \newenvironment{changemargin}[2]{%   \begin{list}{}{%     \setlength{\topsep}{0pt}%     \setlength{\leftmargin}{#1}%     \setlength{\rightmargin}{#2}%     \setlength{\listparindent}{\parindent}%     \setlength{\itemindent}{\parindent}%     \setlength{\parsep}{\parskip}%   }%   \item[]}{\end{list}}  \setbeamercolor{frametitle}{fg=red,bg=white}  \hypersetup{pdfpagemode=FullScreen} \renewcommand*{\UrlFont}{\normalfont}  \usetheme{Goettingen} \useinnertheme{circles} \beamertemplatenavigationsymbolsempty  \setbeamerfont{page number in head/foot}{size=\large} \setbeamertemplate{footline}[frame number]   %%% \begin{document}  \frame[plain]{ \titlepage }  \setbeamertemplate{background canvas}[default]  \frame{ \frametitle{}  \begin{figure} \begin{center} \includegraphics[scale=0.2]{varweakness} \caption{VaR as a quantile} \end{center} \end{figure}  }   \end{document}   Which gives the following frame with the figure:    (I am not sure what is causing the problem, therefore I did not delete any package.)  How can I get a number, e.g. Figure 1:?


When is the center of the quotient equals 1?

I want to prove or disprove this statement: If $H = Z(G),$ then $Z(G/H) = 1.$ I have seen an example here  that shows that in some cases that is correct. I want to know if this statement is correct in general or not. and if it is correct how can I prove it? Could anyone help me with that, please?


Getting The Method That A Method Was Called From?

Is it possible to determine the calling method name "Eat Pizza" in PostError? I guess I could pass "EatPizza" as one of the arguments, but that would require changes each time the method name changes (unnecessary maintenance).  But then, I wasn't even able to find the method name "EatPizza" in the context of "EatPizza" (using stacktrace, getframe, getmethod).  public void EatPizza(Pizza p){     if(p==null){ //A arbitrary made up error         Utilities.PostError();     }     else{         p.Slices -= 1;     } }  ...  public void PostError(){     //Basically posting to database the name of the method     //Tried this, didn't work: (new StackTrace(true)).GetFrame(5).GetMethod().Name     //Is it possible to determine the calling method name "Eat Pizza" in this context? }   When I try different values (0 to StackTrace.FrameCount-1) in StackTrace.GetFrame, I get the following values, when I just want "EatPizza":  .ctor ThreadStart Main _nExecuteAssembly RunUsersAssemblyDebugInZone


Convergence implies boundness of a sequence but an example confuses me!

given the following sequence $$ p_{n} = \frac{1}{n-1} $$ I am tempted to say that for n=1 the sequence assumes an infinite (and thus unbounded) value but still the sequence converges to zero as n increases. I am of course wrong because this contradicts theorem 3.2c of Baby Rudin which states that "if a sequence is convergent in a metric space then it's bounded". What am I missing? Maybe 1/0 is not a mathematical defined value? I would be greatly thankful for an answer. Erma


How vulnerable are my investments to broker bankruptcy? Portability of investments and transfer costs?

Let's assume I use a broker like Ameritrade or Schwab etc. to buy Mutual funds, ETFs, stocks etc.  Now, let's assume that some point down the line the broker company goes bankrupt or shuts down due to other reasons.   What exactly happens to my investments. I assume those are safe (or not entirely?! eeks!)? But how do the instruments get transferred to a new broker etc.   In other words, how portable are my investments? Are there significant transfer costs?   Just like there's federal deposit insurance is there any equivalent for brokerage firms? In today's world where most of the data is stored in electronic format how would I even access the details of my portfolio if my broker suddenly shut down?  Are there any similar cases or precedent?  Note: I am not talking about the stock target itself going bankrupt. Just the broker going bankrupt.  i.e. Also NOT seeking protection against market influenced value decline. That I understand.  To rephrase: To what extent is a broker failure affecting me? e.g. Say I use a broker to buy a house or a car via a broker. Then the broker bankruptcy hardly affects my asset. What I want to know is how similar or different is this situation when it comes to investments?


Close current tab firefox using terminal

I have firefox already running on my system, and now in minimised state. What I want is to close the current tab running in firefox. How can I do this by simply using commands in terminal?


A set is compact if and only if every continuous function is bounded on the set?

I was asked to prove the following statement:     Let $K \subseteq R^n$. show that $K$ is compact (meaning closed and bounded) if and only if every continuous function is bounded on $K$.   What I did:  Suppose $K$ is not bounded, and so, it is not compact. Then the function $\sum |x_i|$ is a continuous unbounded function on $K$. Via contrapositive, this shows that if every function is bounded, then $K$ is also bounded.  What I need help with:  Assume $K$ is not closed. I need to find a continuous and unbounded function on $K$.  that will prove that if every continuous function is bounded on $K$, then $K$ is compact.  after that, i still need to show that if $K$ is compact then every continuous function $f: K \to \mathbb R$ is bounded.  Would someone point me in the right direction?   Clarification: it's not homework. I am preparing for an exam.


Fan-In/Fan-Out - Circuit - Explain why this circuit does not work

Problem: Explain why this circuit does not work for Fan-In=1 and Fan-Out=3 for all logic gates(including the complex logic gate).  Firstly, I would say the Inverter Gate is fine because it does not violate the Fan-Out=3. But I don't know what the problem is in the case of Fan-In=1.  Secondly, I would say that because x is routed to the 3 inputs of the complex logic that the Fan-In=3 thus it would overload the inverter thus making the gate not work properly.  Am I right? Hope somebody can give me a lead and or help me.


How can I set the compression level for this command?  tar --lzma -cf files/compressed/lzma/archive.lzma -C files/original/ .   With --bzip I just use:  BZIP2=-9 tar --bzip2 -cf files/compressed/bzip2//archive.tar.bz2 -C files/original/ .   but with the --lzma option LZMA=-9 doesn't work.  Is this enviroment variable name incorrect? Where can I get the correct variable name?


apt-get update error in ubuntu utopic 14.10

help!!I installed Ubuntu 14.04 and then upgraded to 14.10 but when I perform sudo apt-get update in the terminal this error occurs.  how to fix this kind of error?  I already changed the default URI in the source.list to other site/mirror but always the same error.  W: Failed to fetch http://ppa.launchpad.net/gwibber-daily/ppa/ubuntu/dists/utopic/main/binary-amd64/Packages  404  Not Found W: Failed to fetch http://ppa.launchpad.net/gwibber-daily/ppa/ubuntu/dists/utopic/main/binary-i386/Packages  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead. ryanjoseph@Satellite-L635:~$


Two of the most well known entangled states are the GHZ-state $|\psi\rangle = 1/\sqrt{2}\left( |0\rangle^{\otimes n} + |1\rangle^{\otimes n}\right)$ and the $W_n$-state, with $W_3 = 1/\sqrt{3}\left(|100\rangle + |010\rangle + |001\rangle\right)$.   Constructing the GHZ-state is simple for arbitrary $n$. However, implementing the $W_n$-state is more difficult. For $n=2$ it is easy, and for $n=4$ we can use  H q[0,3] X q[0,3] Toffoli q[0],q[3],q[1] X q[0,3] Toffoli q[0],q[3],q[2] CNOT q[2],q[0] CNOT q[2],q[3]   Even for $n=3$ we have implementations, see  for instance. However, I have not found an algorithm that, given an $n$, outputs the circuit for constructing the $W_n$-state.   Does such an algorithm, defined by single- and two-qubit gates, exist? And if so, what is it?


What's a phrase for when: to do A, you first need to B, but to do B you first need to do C, etc?

Say you need to change a light bulb, but to do that you need to get a ladder, but to get the ladder you need to get into the tool shed, but to get into the tool shed you need to find the key, etc. This kind of quest where you are being presented a new task at each step before you can even start the previous one. I feel sure there's a phrase that represents this but I can't remember it.  Edit: I think I'm thinking of a story where an adventurer is seeking an object A, so they ask person 1, who is willing to give it but only if they receive object B. So the adventurer goes to person 2, who will only give up object B for object C, etc.