Let $x, y \in \mathrm{R^n}$. Show that det$(I - xy^T) = 1 - y^{T}x$.  I test several cases for this problem, and it holds true when $n = 2, 3$, but when it comes to proof, I tried two ways and both failed:   Write $x, y$ explicitly in the form of $a_{ij}, b_{ij}$, and tried to find the relationship between the left and right side. But the left side could not be reduced to a relatively clearer form and turns out to add more complexity. Try to transform $I - xy^T$ into something similar to the right side.    I think the difficulty of this problem lies in the transformation from matrix $(I - xy^T)$ into scalar $1 - y^{T}x$, and I do not have a good way to make such transformation.  This question could be answered with matrix determinant lemma (the proof could be found . Even though this is pretty easy to understand, it lacks the reasoning process, which I find very unsatisfying.

Let be $u,v\in\mathbb{R}^n$, then $\det(I+uv^\intercal)=1+v^\intercal u $ where $I$ denotes the identity matrix of order $n$. How to prove this?   what I did:   let be $A=\{n\in\mathbb{N}: \forall u,v \in \mathbb{R^n}, \det(I+uv^\intercal)\neq1+v^\intercal u  \} $, and suppose $A\neq \varnothing $, then for the well-orderer-principle there exists $n_0\in A$ such $n_0\leq n,\;\forall n\in A$. since $1\notin A,\; n_0\neq 1 \rightarrow n_0-1\in\mathbb{N}\setminus A  $ so: $$\forall u,v\in\mathbb{R^{n_0-1}}: \det(I+uv^\intercal)=1+v^\intercal u $$ Then, let be $u,v\in\mathbb{R}^{n_0}$, so $$\det(I+uv^\intercal)= \displaystyle\sum_{j=1}^{n_0}(-)^{1+j}a_{1j}\det(A_{1j})$$ where $a_{ij}=\begin{cases} u_iv_j+1 & i=j \\ u_iv_j & i\neq j \end{cases}$, and $A_{1j}$ is the  submatrix of $I+uv^\intercal$ that results deleting the i-file and j-column. Then I try to open the term for $j=1$ and try to use the relation for the new matrix of $n_0-1$ order with the determinant because it holds the same form but I have other terms which difficult me the work. Do you know other method?.  Ps. , in page 2 I've found something similar but I don't understand what it means PS. I'm taking a course of numerical analisys


I'm working on a RHEL 6.7 machine. I'd like to make a script which is owned by root BUT could be launched by other users. However I still want the actions inside the script to be launched as root. So I want to set the suid bit on this script. Right now I have the following results:  [root@devmachine BACKUP]# chmod a+s fix_properties.sh [root@devmachine BACKUP]# ls -halt fix_properties.sh -r-sr-s-r-x 1 root root 42 May 12 00:08 fix_properties.sh   This is not good enough since a lambda user would be able to execute it but wouldn't benefit from the root permissions. After some digging I learned that it could be due to the way the FS is mounted. When I check the fstab file I see the following:  /dev/mapper/systemvg-op /opt ext3 defaults,nosuid,nodev 1 2 ... /dev/systemvg/opt_backup /opt/BACKUP ext4 acl,user_xattr 1 2   Does this mean that the nosuid will be also de rigueur on the /opt/BACKUP partition?  As a work-around, I guess I could assign this file to a particular group from which my target user is part of?

How to make a script execute as root, no matter who executes it?  I read about setuid but I'm not sure how to do this.  I'm using Linux, Ubuntu 12.04 LTS.


What is a good adage for saying one thing matches another in quality? For example, I want to say someone rude deserves to be treated accordingly and just as rudely and without respect.

Is there an idiom for someone who gets what he deserved? Like someone receiving punishment for his evil deeds or someone getting awarded for his good deeds?


In vector calculus I understand how div is kind of a measure of how much a point acts as a source or sink of the field lines or a measure of the flux through a closed shape at a point in a sense. The curl is a measure of how much rotation the surrounding vector field causes at a point (Please correct if this is wrong).  Just wanted to know if there was also a geometric meaning for the triple product   ∇ · (∇ × a). I cant seem to reason it out.

I am aware of an intuitive explanation  for $\operatorname{curl} \operatorname{grad} F = 0$ (a block placed on a mountainous frictionless surface will slide to lower ground without spinning), and was wondering if there were a similar explanation for $\operatorname{div} \operatorname{curl} F = 0$.


The word setup (as a noun), I feel, has become an acceptable part of the English language, at least insofar as technical manuals or computer textbooks are concerned. However I find that the word is used very often in verb form like so:     "You can setup the program quite easily ..."   when in fact my understanding is that the actual sentence should be:     "You can set up the program quite easily ..."   I would like to know if setup can be used as a verb. The situation seems be very similar to the word output (as a noun). Output is a purely technical word and its use is restricted solely to technical texts or at least in a technical context within non-technical books. However it is also used in verb form now like so:     "The system will output the signal ..."   I would be very grateful if this question is answered. Thank you

I know that words like login and payoff are properly nouns but I increasingly notice many (not at all uneducated) people use them as verbs:     Will you payoff your credit card this month?   and     Please check this when you login.   To me (a non-native English user), that seems incorrect because separating the core noun from a preposition is what I was taught: Please check this when you log in. (My emphasis)  Is this use proper or not?


The circuit was pulled from a SBC schematic. VBUS_5V is the input power from the micro USB port. Ultimately I am attempting to figure out if there is current limiting between VBUS_5V and VDD_5V.

The Raspberry Pi B+ models have a protection circuit between the USB connector and the 5V net on the board.  They recommend putting a similar protection circuity on a Pi HAT before 'backpowering' the pi through its GPIO header along with a polyfuse.  I understand why this is the recommendation, but I'd like to understand more about how this circuit works.  I did some searching before posting this question and found information on using a MOSFET as a low voltage drop diode, but they all had the gate wired directly to ground without the pair of PNP's and the resistors.  What are they doing for this circuit?  Also, is this primarily using the body diode?  In which case, what's the relevant info on the datasheet that qualifies DMG2305UX for this application?  In the other circuits I found, it appeared low Rdson and Vgsth compatible with the circuit seemed like the relevant characteristics.


When Arya Stark first meets Jaqen H'ghar, he is in a cell described as a dangerous criminal whom Yoren takes from the capital's dungeons and is recruited into the Night's Watch.  Seeing how this character       plays a major role in Arya's journey in Season 5,   was him being captured in Kings Landing unrelated, or       is he there to specifically guide Arya onto a path that is certain to bring her to the Faceless Men for training?   After seeing the events in the Season 5 finale, it just seems like a very convenient coincidence for them to meet in such a way.

Following a recent 9gag post:    Did Jaqen H'ghar end up in that cage because he knew that he would meet and "recruit" Arya, or was it some strange coincidence? Is it described somewhere in the books, or left unexplained?


I have wifi and Bluetooth modules RT3290. Wifi is working fine but Bluetooth is shown as disabled under Bluetooth settings. Can anyone help me fix this?

I have found that there is a large community suffering from the problems with the WiFi-Bluetooth card Ralink RT-3290. It has been a problem since 2012-2013.  None of the solutions I've found is simple, effective and durable.  I managed, with great effort, some results. But when there is a kernel update, the problems return.  Can anyone provide a simple , effective and lasting solution? Is there a project from Ubuntu's developers to attack the problem?


Where $ F_{\mu \nu}= \partial_{\mu} A_{\nu}-\partial_{\nu} A_{\mu}$, $A$ being the four-potential. I'm interested in whether or not it's possible to show from this:  $$ \frac{1}{\epsilon_0 \mu_0} E_{xx} = E_{tt}$$ Lower index meaning partial derivative. Sticking to (1+1) dimensions for simplicity.

Spacetime of special relativity is frequently illustrated with its spatial part reduced to one or two spatial dimension (with light sector or cone, respectively). Taken literally, is it possible for $2+1$ or $1+1$ (flat) spacetime dimensions to accommodate Maxwell's equations and their particular solution - electromagnetic radiation (light)?


I'm reading a theorem about the order of a finite field:  Here is the proof:   At the end, the author said  It follows that $\mathbb{F}$ is a vector space over $\mathbb{F}_{p}$, implying that its size $q$ is equal to $p^{m}$ for some $m>0$.  I do not understand how $\mathbb{F}$ is a vector space over $\mathbb{F}_{p}$ implies that its size $q$ is equal to $p^{m}$. Could you please elaborate on it?

Are there any galois fields which consist of product of two primes, as in $\mathrm{GF}(2\cdot 3) = \mathrm{GF}(6)$?


I want install Ubuntu13.04 from dvd. Is it possible without current windows xp os? If yes Please tell me the procedure in steps. If it is not possible then I will have to first install Ubuntu13.04 & uninstall windows xp professional. In this case  please tell procedure in steps

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


This question comes from seeing that the triangle addition rule for quantum mechanics comes out of groups/representation theory; I thought this was odd as we haven't used any group ideas in QM up to this point. After thinking about it I realised/belive that it comes from the use of a tensor product.  In quantum mechanics if we have 2 systems (2 particles, a particle with spin and orbital wavefunctions etc) why do we join them as a tensor product and not a direct sum or cartesian product or a new 'quantum product'?

Why are states describing composite systems given by tensor products and not Cartesian products? They both belong in spaces of equal dimension, what are the differences between the two?


here is the query i am using:  bilan1 = [select id,valider__c,poste__c,Statut__c,Poste__r.Date_dernier_bilan__c, date_bilan__c, moyenne_du_bilan__c from Bilan_de_positionnement__c where poste__c in: collID and date_bilan__c =:Poste__r.Date_dernier_bilan__c  order by date_bilan__c asc];   i get this error:   Variable does not exist: Poste__r.Date_dernier_bilan__c   when i remove the condition and date_bilan__c =:Poste__r.Date_dernier_bilan__c the error disappears even though the Poste__r.Date_dernier_bilan__cfield is fetched in the query meaning that the variable  Poste__r.Date_dernier_bilan__c does exist, am i messing something ?

I think I may be hitting some sort of SOQL limitation in the WHERE clause. I am trying to return fields from two parent objects, after comparing two date fields on both Objects.  The goal is to have a list of contacts with associated opportunity fields where the opportunity date field is equal to some contact field.     NOTE: We have a custom junction between Opportunity and Contact named "Opportunity_Contact__c" due to the limits on the standard OCR sObj.   Specifically:  SELECT NAME, Con_Custom_Date__c,   (SELECT Opportunity__r.Name FROM Opportunity_Contacts__r     WHERE Contact__r.Con_Custom_Date__c = Opportunity__r.Opp_Custom_Date__c) FROM Contact   This returns a parsing error. However, if I try switching the query to something like:  SELECT NAME, Con_Custom_Date__c,   (SELECT Opportunity__r.Name FROM Opportunity_Contacts__r     WHERE Contact__r.Con_Custom_Date__c = TODAY and Opportunity__r.Opp_Custom_Date__c = TODAY) FROM Contact   This works. So the date fields are working and I am able to use them in the WHERE clause. However, when I compare one field directly to the other, I get a parsing error..  Why would   WHERE Contact__r.Con_Custom_Date__c = TODAY and Opportunity__r.Opp_Custom_Date__c = TODAY   work while   WHERE Contact__r.Con_Custom_Date__c = Opportunity__r.Opp_Custom_Date__c   triggers a parsing error?  Thanks!


work with MSVC and GCC but not Clang. Is there a standard way of reversing the bytes in a number? It seems to me I have two options as of now: either to use a lot of #ifdef statements, or write out the implementation myself.

How do I convert between big-endian and little-endian values in C++? For clarity, I have to translate binary data (double-precision floating point values and 32-bit and 64-bit integers) from one CPU architecture to another.  This doesn't involve networking, so ntoh() and similar functions won't work here.  Note: The answer I accepted applies directly to compilers I'm targeting (which is why I chose it).  However, there are other very good, more portable answers here.


How do I cut a free form object (curve converted to mesh) along the edge?    The goal is to create the smaller (blue outline) object, which looks like it has been sawn off the original one using a defined offset.

With text, you have a really handy control called 'offset', which allows you to easily increase/decrease the size of your letters from their centres not by changing the shape proportionally but by adding/detracting from its outline, which looks like this (border remains uniform):    By contrast, when trying to scale down a mesh object using the 's' it looks like this (borders not uniform):    Is there a similar 'offset' control that allows similar for mesh objects or any other way of achieving the same result? Seems odd that such a useful tool would be exclusive to text.


Reading STM32 examples I've met code that cannot understand.    /**   * @brief  This function writes a data buffer in flash (data are 32-bit aligned).   * @note   After writing data buffer, the flash content is checked.   * @param  FlashAddress: start address for writing data buffer   * @param  Data: pointer on data buffer   * @param  DataLength: length of data buffer (unit is 32-bit word)      * @retval 0: Data successfully written to Flash memory   *         1: Error occurred while writing data in Flash memory   *         2: Written Data in flash memory is different from expected one   */ uint32_t FLASH_If_Write(__IO uint32_t* FlashAddress, uint32_t* Data ,uint16_t DataLength) {   uint32_t i = 0;    for (i = 0; (i < DataLength) && (*FlashAddress <= (USER_FLASH_END_ADDRESS-4)); i++)   {     /* Device voltage range supposed to be [2.7V to 3.6V], the operation will        be done by word */      if (HAL_FLASH_Program(FLASH_TYPEPROGRAM_WORD, *FlashAddress,  *(uint32_t*)(Data+i)) == HAL_OK)     {      /* Check the written value */       if (*(uint32_t*)*FlashAddress != *(uint32_t*)(Data+i))       {         /* Flash content doesn't match SRAM content */         return(2);       }       /* Increment FLASH destination address */       *FlashAddress += 4;     }     else     {       /* Error occurred while writing data in Flash memory */       return (1);     }   }    return (0); }   What is the metter of volatile argument?  And another part. I think volatile has no reason in it.  // Check if valid stack address (RAM address) then jump to user application if( ((*(__IO uint32_t*)MAIN_PROGRAM_START_ADDRESS) & 0x2FFE0000 ) == 0x20000000 ) {     /* Jump to user application */     uint32_t jumpAddress = *(__IO uint32_t*) (MAIN_PROGRAM_START_ADDRESS + 4);     /* Initialize user application's Stack Pointer */     __set_MSP(*(__IO uint32_t*) MAIN_PROGRAM_START_ADDRESS);     ((pFunction)jumpAddress)();     /* do nothing */     while(1); }   ST uses __IO to hide volatile.  #define __IO volatile  // from main uC header, i.e. "stm32f4xx.h"

Why is volatile needed in C? What is it used for? What will it do?


I added content by html() function. The contents have elements like images and links, but I can't use click or any function for the added content using its id.  Example:  $("#container").mouseover (function(){     $("#container").html(''); }); $("#button1").click(function(){     $("#container").html ('any content'): });

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Since start of this summer, I think that Google removed the option of using backspace for returning to previous page or so.   I was wondering, if there exist any chance, of undo-ing this thing? Is there such thing that would help me, such as downgrading Chrome or using any additional add-ons or something such as this for getting this glorious function back?  It's nearly impossible for me to forget this shortcut (as old habits die hard, lol) and keep pressing it and later on using the mouse to go back.

The latest version of Google Chrome has changed the hotkey for 'back' from backspace to alt + backspace.  The new combination doesn't work on my laptop, however I would actually rather stick with the older key anyway.  I've read in other questions that Chrome doesn't allow you to customise shortcuts, however is there any way to either re-enable the original shortcut or to override it back to being just backspace?    I'm running Windows 10.


consecutive sum  Given an integer N, you have to find the number of ways you can express N as sum of consecutive integers. You have to use at least two integers.  For example, N = 15 has three solutions, (1+2+3+4+5), (4+5+6), (7+8).

All the positive numbers can be expressed as a sum of one, two or more consecutive positive integers. For example $9$ can be expressed in three such ways, $2+3+4$, $4+5$ or simply  $9$. In how many ways can a number be expressed as a sum of consecutive numbers?  In how many ways can this work for $65$?  Here, for $9$ answer is $3$, for $10$ answer is $3$, for $11$ answer is $2$.


I am creating a script and when I try to capture a command return, I have an error of command not found, if I use this command on the terminal:  gcloud -q compute snapshots list --format='csv(NAME)'   It works fine.  The script is:  #!/bin/sh CSV_SNAPSHOTS= $(gcloud -q compute snapshots list --format='csv(NAME)') IFS=$'\n'  for i in $CSV_SNAPSHOTS do     echo "$i" done

What is the difference between below variables assignments?   var=23 var =23 var= 23 var = 23   Is there any difference in space around the assignment operator?


I'm trying to make a sign that you can right click and it will clear cacti from your inventory, then give you 18 cookies named "$100 Cookie" with the lore "$100". But when I put it in a command block and power it, the command block says this:     [04:23:51] Data tag parsing failed: Unexpected token '$' at: $100 Cookie\",Lore:[$100]}}\"}}",Text3:"{\"text\":\"iIiIiIi\",\"color\":\"light_purple\",\"strikethrough\":true,\"obfuscated\":true}",Text4:"{\"text\":\"[Sell]\",\"color\":\"dark_purple\",\"bold\":true}"   The command I'm using is:  /give @p sign 1 0 {BlockEntityTag:{Text1:"{\"text\":\"[Sell]\",\"color\":\"dark_purple\",\"bold\":true,\"clickEvent\":{\"action\":\"run_command\",\"value\":\"clear @p[name=rainbowlack,r=3] cactus 0 2304\"}}",Text2:"{\"text\":\"2304 Cacti\",\"color\":\"red\",\"clickEvent\":{\"action\":\"run_command\",\"value\":\"give @p[name=rainbowlack,r=3] minecraft:cookie 18 0 {display:{Name:\"$100 Cookie\",Lore:[$100]}}\"}}",Text3:"{\"text\":\"iIiIiIi\",\"color\":\"light_purple\",\"strikethrough\":true,\"obfuscated\":true}",Text4:"{\"text\":\"[Sell]\",\"color\":\"dark_purple\",\"bold\":true}"},display:{Name:"Custom Sign"}}   What's wrong with this command? I've tried backslashes and stuff. Can you please try to fix the command and test out your potential fix in-game? Thank you!  You'll have to change the [name=rainbowlack,r=3] parts to whatever your username is (example: [name=playerplayer123,r=3]).

I need help with a specific command that I am using in a new game that I am creating inside of Minecraft. The command is:  /give @p sign 1 0 {BlockEntityTag:{Text1:"{"text":" [MF2]","color":"gold","clickEvent": {"action":"run_command","value":"tellraw @a [""{"text":"[MF2]  ","color":"gold"},{"selector":"@p","color":"dark_aqua"},{"text":" is now an admin of the server!","color":"white"}]"}}",Text3:"{"text":"Click to join Admin","color":"dark_aqua","clickEvent": {"action":"run_command","value":"scoreboard teams join admin @p"}}"},display: {Name:"Custom Sign"}}   If I take out the /tellraw command then the command works fine, but I need the command in there to announce to the game that a new admin has joined.  With the tellraw command, the error message is the following:  Data tag parsing failed: Unexpected token 't' at: text":" [MF2]","color":"gold","clickEvent":{"action":"run_command","value":"tellraw @a [""{"text":"[MF2] ","color":"gold"}, {"selector":"@p","color":"dark_aqua"},{"text":" is now an admin  of the server!","color":"white"}]"}}",Text3:"{"text":"Click to join Admin","color":"dark_aqua","clickEvent": {"action":"run_command","value":"scoreboard teams join admin @p"}}"   If anyone knows how to fix this, please let me know.


I want to write an Event listener function that needs to be called when any element in my
 tag gets edited. For example for elements in given ul

hi

hi
        <input id="indeterminate-checkbox" type="checkbox" />     Indeterminate Style
hi

sup

   I want to use element.addEventListener() only once (I cannot just declare contenteditable for ul and add listener for same as that produces undesirable UI changes). Also, if possible I want to declare onchange for all these element at once(like from css).  I want to do this because I am adding elements dynamically and want to remove redundant code.


I'm a bit confused about the usage of "the" in a list. Even after , it's not clear to me which of the following is grammatically correct.  "Is the [object] at the top or bottom?"  "Is the [object] at the top or the bottom?"  Or should "at" be distributed as well? (In which case, it seems clear that "the" should appear twice.)  "Is the [object] at the top or at the bottom?"

I sometimes find myself writing something like this:     XXX is a project I admire and am very interested in.   The "I <verb> and am <something>" feels strange here. It somehow sounds more natural in the third person: "He admires and is very interested in...."  Am I just imagining things – is it OK to use this construction, or should I use something completely different?


I have a dilemma. I can't log in to Ubuntu Forums using my user name. When I try to recover my password. It says my email is not in the system. It says I can contact the administrator. When I click on the link to contact the administrator, it says I have to be logged in.  I believe I was in the midst of setting up and account after signing in with Launchpad. The process never completed, so I don't have a password. I'm pretty sure the user name I'm trying to use does not belong to anyone else.

I would like to contact a forum administrator and I don't want to log to my Ubuntu One account because I'm closing it.  So I can't log to my forum account and I'd like to close it too.  So, what can I do? :)  Thank you for your help.


Formating USB(pendrive) after installing done in Dell laptop.

More specifically, I want to know if when I put the Ubuntu OS on my flash drive if it is permanent or not. As in,can I delete the Ubuntu installation files after I install it on my computer and use it as a regular USB again? I just want to install Ubuntu on a unformatted hard drive and then be able to use my USB like normal again.  Sorry, I know I must sound very redundant. Thank you for the help.


I wanted to make a 4-in-a-row game board in python, where the player can choose the number of rows and columns.  I wrote this:  num_rows = 6 num_cols = 7 temp_board = [] board = [] for i in range (num_cols):   temp_board += " " print ("the temp_board is:\n", temp_board) for i in range(num_rows):   board.append(temp_board)  print("the board is:") for i in range(num_rows):   print (board[i])   The output was  the temp_board is:  [' ', ' ', ' ', ' ', ' ', ' ', ' '] the board is: [' ', ' ', ' ', ' ', ' ', ' ', ' '] [' ', ' ', ' ', ' ', ' ', ' ', ' '] [' ', ' ', ' ', ' ', ' ', ' ', ' '] [' ', ' ', ' ', ' ', ' ', ' ', ' '] [' ', ' ', ' ', ' ', ' ', ' ', ' '] [' ', ' ', ' ', ' ', ' ', ' ', ' ']   Until here it is fine, but when I wanted to change a single space in the board  board[0][0] = "R"   This was the output  ['R', ' ', ' ', ' ', ' ', ' ', ' '] ['R', ' ', ' ', ' ', ' ', ' ', ' '] ['R', ' ', ' ', ' ', ' ', ' ', ' '] ['R', ' ', ' ', ' ', ' ', ' ', ' '] ['R', ' ', ' ', ' ', ' ', ' ', ' '] ['R', ' ', ' ', ' ', ' ', ' ', ' ']   How can I change it, so the R will appear only in the first line in the first column?

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


Let   $$X(n)=\frac{2^n-1}n;n\in\Bbb N; n>1$$   Prove that $X(n)\notin\Bbb N$.   My try: check this for $n=2$. Then $$X(n+1)=\frac{2^n-1}{n+1}+\frac{2^n}{n+1}$$  So if $n+1$ is odd then $\frac{2^n}{n+1}$ can't be integer, if $n+1$ is even $\frac{2^n-1}{n+1}$ can't be integer.  And then I thought proof is over, however, I realized – this doesn't cover cases where sum of remainders of both fractions is equal to 1.

Here is a problem which i have not been able to do for quite sometime.   For $n \geq 2$, show that $n \nmid 2^{n}-1$.   I have thought of proving this in two ways: One by using induction which didn't actually work. Next by Fermat's little theorem we have $2^{p-1} \equiv 1 \ (\text{mod} \ p)$, which actually says that for $p \mid 2^{p}-2$. But i couldn't proceed more than this. Any ideas by which i can actually solve the problem?


EDIT: The cause for the problem described below was that     I'm attempting to add my renamed bibliography as an unnumbered top-level (chapter) entry to the table of contents (TOC) in my document, but so far all of my attempts have been unsuccessful. Below is an MWE for my latest and tidiest attempt, plus the output. Does anyone know what my code is missing? I'm using MiKTeX 2.9, Biblatex 2.8, Biber 1.8, and I've made sure all my other packages are up to date as well. I'm using the pdflatex compiler.    Main document  \documentclass[bibliography=totoc]{scrreprt} \usepackage[backend=biber]{biblatex}  \addbibresource{test.bib}  \begin{document}  \tableofcontents  \chapter{Chapter}  Lorem ipsum dolor sit amet \cite{entry}.  \printbibliography[heading=bibintoc,title=References]  \end{document}     test.bib  @article{entry, author = {John Doe}, journal = {TeX Monthly}, pages = {1----10}, title = {{How do I get this to work?}}, volume = {99}, year = {1234} }     Output        I tried working around the problem by adding the line  \addcontentsline{toc}{chapter}{References}   just after the printbibliography command, but this causes the TOC to reference the bibliography one page early. And besides, it is only a workaround, not a solution.

I'm trying out biblatex for the document I'm compiling, using the biber backend on my miktex distribution. Everything, including biber, should be up to date, assuming the MiKTeX repository currently holds the latest versions of everything.  This is what the biblatex documentation (p. 101) says about how often I have to run biber to update my .bbl file:     Whenever a reference to a work which has not been cited before is   added, this procedure must be repeated. This is also the case if the   last reference to a work which has been cited before is removed   because some citation labels may change in this case.   So if I make changes to my document (which is a very common activity in the process of writing a document), but leave the citations unchanged, I should not have to re-run biber before compiling the changes. However, every time I compile my document, regardless of the compiler or documentclass, the .bbl file is emptied. Consequently, the next time I compile the document without running biber, the bibliography is removed (seeing as the .bbl file contains nothing), and all my citations are broken. For this reason, I have to run biber before every time I compile the document, which largely counters the benefit of externalizing the bibliography in the first place.  How can I make the compilers stop overwriting my .bbl file and make everything behave as described in the biblatex manual?  Upon investigating the contents of the auxiliary files, I found that the .bbl file (after running biber, before compiling) begins with the following lines:  % $ biblatex auxiliary file $ % $ biblatex bbl format version 2.3 $   Does the biblatex version 2.8 still mark the .bbl files as version 2.3? If not, could this be the problem? And if so, why does my 2.8 version of biblatex (partly) behave as version 2.3?  Any help solving this problem would be much appreciated.


Today I tried to look up a question on Stack Overflow. I had two popovers on the page, one inviting me to take a short survey (which didn't even load!) and one inviting me to learn how the review queue works. In addition, the GDPR cookie consent dialog doesn't seem to remember its settings, and reappears periodically. Perhaps it's using the old "only remember the setting properly if it was 'Accept All'" dark pattern? This visual clutter makes the site less usable. Please don't keep going down the road of "every other site spams people with popovers so it's OK for us to do it". It's not. There should be an easy way to turn off all this intrusive rubbish and just show the question, the answers, the answer box, and the linked/related/hot network questions — and this method should be configurable even when logged out (if I'm linked to an SE site I don't normally participate in, I shouldn't have to log in just to have a usable experience). Ideally, every site would be a subdomain of stackexchange.com so people could set one set of overrides in a custom stylesheet, or configure their adblockers once, and the work needed at the SE end would be to continue not using randomly-generated class names and IDs in the CSS. But I don't suppose there's much appetite for moving SO to stackoverflow.stackexchange.com :)

There have been  for a while, but this is ridiculous. It reminds me of , but this time it's network-wide.   The banner must be scrolled past (or dismissed) on every page unless both first-party JavaScript and first-party cookies are enabled. If first-party JavaScript is enabled, and the banner is visible, the rest of the page jumps up and down every so often.  Under certain circumstances (not quite sure what they are, yet – a direct link to an answer, maybe? I'm seeing it ) the entire page jumps up and down a line every few seconds even when the banner is off-screen.   The cookie banner keeps coming back unless both third-party JavaScript  are enabled (and  is solved). The cookie box occludes the “Learn more about Teams” link in the banner (with default Firefox window sizes) and the Job / Teams link in the sidebar.  As it stands,  – a site for hobbyists and researchers, whose audience is not very likely to purchase Teams – is much, much harder to use, for no benefit that I can see. Can you roll back this change, please?


I am trying to implement my own use of bit flags in C/C++. I have three functions: getBool, setBool, and printBools. All of my current code except one part: I can't set bits to false. They set to true just fine, they read back just fine, but I can't set true bits to false. Here is my code:  #include <iostream>  #define uint unsigned int #define BIT1 1 #define BIT2 2 #define BIT3 4 #define BIT4 8 #define TRUE 1 #define true 1 #define FALSE 0 #define false 0  int getBool(uint boolSet, uint bit){     return ((boolSet&bit)==bit); }  void setBool(uint &boolSet, uint bit, short tf){     if(getBool(boolSet, bit)) return;     else if(tf == 1) boolSet += bit;     else if(tf == 0) boolSet -= bit; }  void printBools(uint boolSet, uint j){     uint i = 1, count = 1;     while(count <= j){         std::cout<<"Bool "<<count<<": "<<getBool(boolSet, i)<<std::endl;         i*=2;         count++;     } }  int main(){     uint boolSet = 0;     printBools(boolSet, 4); //make sure bits are false     setBool(boolSet, BIT1, 1); //set bit 1 to true     setBool(boolSet, BIT3, 1); //set bit 3 to true     printBools(boolSet, 4); //check set bits     setBool(boolSet, BIT3, 0); //set bit 3 to false     setBool(boolSet, BIT4, 1); //set bit 4 to true     printBools(boolSet, 4); //check set bits }   Additionally, if you would like to see the output really quickly, here is a link:  Thank you for your help!

How do you set, clear, and toggle a bit?


I posted a question (which is deleted now) on Stack Overflow, but it got closed as off-topic, but nobody answered my comment about the appropriate Stack Exchange site.  Where should I post a question about the copyright/license of a random number generator?

Is it appropriate to ask questions about software licenses/licensing on ? Or is the appropriate place  ? Or is there no appropriate site currently and we should suggest such a site on ?


I am trying to find a way that I can define/initialize some static string arrays in a struct inside a class definition. These string arrays are always to be initialized with string literals. I tried doing the following and it initializes the parameterTypes[] fine and i can access the strings using eg. MethodNaming_bla::parameterTypes[2], but if I pass the parameterTypes as a const char* const * const i get a linker error :( Also if i pass it to a constructor using MethodNaming_bla::parameterTypes.  struct MethodNaming_bla {     static constexpr const char* const parameterTypes[] = { "afd","qwer","zvc" };     static const char* const * const parameterTypes_d = parameterTypes; };   However if i do the same in a function, it works for some reason.  int main(int, char* []) {     static constexpr const char* const parameterTypes[] = { "afd","qwer","zvc" };     static const char* const * const parameterTypes_d = parameterTypes; }   Is there a way where I can define and initialize a string array in a struct from string literals, inline?  Thanks in advance, Martin

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


Hearthstone has a variety of themed game boards. Each board features various interactive components and Easter Eggs. Among other things the Goblins vs. Gnomes board features a teleportation chamber that seems to be controlled by the position of the levers to the left of the chamber. Does the position of the levers effect the items which will be teleported? What items can a player teleport into the chamber?

When playing against slow opponents I spend most of my time clicking the interactive areas of to boards like the catapult, bonfire and farm.  I have multiple times though I had found them all but then found a new place to click.  So what are the places you can click on each board to have something happen?


I am reading some xml files from an ibm queue and when updating to version 9 I started getting exception when trying to convert the xml to csv using the code below at the line (transformer.transform(source, outputTarget);  File stylesheet = new File("src/howto.xsl"); File xmlSource = new File("src/howto.xml");  DocumentBuilderFactory factory1 = DocumentBuilderFactory.newInstance(); DocumentBuilder builder1 = factory1.newDocumentBuilder(); Document document1 = builder1.parse(xmlSource);  StreamSource stylesource = new StreamSource(stylesheet); Transformer transformer = TransformerFactory.newInstance().newTransformer(stylesource); Source source = new DOMSource(document); Result outputTarget = new StreamResult(new File("/temp/howto.csv"));                                 transformer.transform(source, outputTarget);                                 System.out.println("Done.");   used same jdk and ibm libs from the queue server on the client  File stylesheet = new File("src/howto.xsl"); File xmlSource = new File("src/howto.xml");  DocumentBuilderFactory factory1 = DocumentBuilderFactory.newInstance(); DocumentBuilder builder1 = factory1.newDocumentBuilder(); Document document1 = builder1.parse(xmlSource);  StreamSource stylesource = new StreamSource(stylesheet); Transformer transformer = TransformerFactory.newInstance().newTransformer(stylesource); Source source = new DOMSource(document); Result outputTarget = new StreamResult(new File("/temp/howto.csv"));                             transformer.transform(source, outputTarget);                             System.out.println("Done.");   I am able to read the xml file and save it locally, but getting the below exception:     Could not initialize class   com.sun.org.apache.xml.internal.serializer.EncodingsJul 10, 2019   11:24:00 AM MST, ERROR](ItemMasterMQRawMat.java:read():388) - read() -   XPathExpressionException --> java.lang.NoClassDefFoundError: Could not   initialize class com.sun.org.apache.xml.internal.serializer.Encodings

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


I just remembered that I made an old account 2 years and 5 months ago. For some reason, I stopped using that login, and now I have my main account (the one I'm using to post this question). I went through the , and after confirming that I own both accounts, I came to a page stating:     Thank you for confirming ownership of your accounts. The account DJ McMayhem will be removed, and all rep and votes will be transferred to account user2874724 as a result of this merge. Please click OK to confirm.   I don't want to delete DJMcMayhem! That's the one I have been active on, with my correct email and settings and contributions and network profiles! Is there anyway I can merge the old one into my new one?

I accidentally posted a question without being logged in. Is there a way to associate that question with my account?   For more information, visit "" in the .   a.k.a. How can you link a registered account to a cookie-based account? a.k.a. How do I merge an unregistered account with a registered account a.k.a. Merging users a.k.a. How do I associate anonymous questions I’ve asked with my registered account? a.k.a. Is there a way to claim an unregistered user? (in case anyone searches with those terms)


If $(X,d)$ is a metric space, then we have the following equivalent description of the compactness of $X$: $X$ is compact $\Leftrightarrow$ $ \forall f : X \to \mathbb R$, we have $f(X)$ is bounded. The "$ \Rightarrow$" part is obvious, but how can I check the "$\Leftarrow$" part?

Let $X$ be a metric space. Prove that if every continuous function $f: X \rightarrow \mathbb{R}$ is bounded, then $X$ is compact.  This has been asked before, but all the answers I have seen prove the contrapositive. Realistically, this may be the way to go, but is there way to exhibit an unbounded continuous function (under the assumption $X$ is not compact) without appealing to results beyond introductory real analysis (e.g., the solution I've seen involves the Tietze Extension theorem)?  Because we're working with metric spaces, it's clear that the assumption that $X$ is noncompact (towards proving contrapositive) will lead us to extract a sequence of points in the space with no convergent subsequences. But how can we infer the existence of an unbounded continuous on the space knowing only about some sequence of points in this space (without using anything too advanced)?


The title is pretty much self explanatory. Does the speed of light vary depending on what it is traveling through? The speed of light through vacuum is 299792458 meters per second but does it change if it would say travel through air or water? If so why and if not why?

So light travels slower in glass (for example) than in a vacuum. What causes light to slow down? Or: How does it slow down? If light passes through the medium, is it not essentially traveling in the "vacuum" between the atoms?


Got my first script working and very excited about it.  Modifying it to work with functions and running into issues.  Appreciate help with this so I can better understand.  As I understand I can define a function and then I can call it again.  So I created a function below "sh_ap_sum". I'm trying to run that so that it dumps the output of the command to a file.    Then I am calling that function again with "sh_ap_sum(cdp)" and trying to display the output of the file in the terminal window.  Am I completely doing it wrong any hints will be appreciated greatly.  Thank you.  from netmiko import ConnectHandler import sys  def sh_ap_sum(ap_sum):          ipaddr = input('IP:''')         net_connect =  ConnectHandler(ip = ipaddr,port = 22,username = 'admin',password = 'mypassword',device_type = 'cisco_wlc_ssh')         net_connect.find_prompt()         '(Cisco Controller) >'         output = net_connect.send_command('show ap summary')         sys.stdout = open('wlccon.txt', 'w')         net_connect.disconnect()  sh_ap_sum(cdp)          output = net_connect.send_command('show ap cdp ne all')         print(output)

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


I am trying to find the sum  $${100\choose 0}^2-{100\choose 1}^2+{100\choose 2}^2- \dots+ {100\choose 100}^2$$  After the first few examples for small numbers this appears to be  $$\sum_{k=0}^{n}{(-1)^k {n\choose k}^2}=(-1)^\frac{n}{2}{n\choose \frac{n}{2}}$$ for all even $n$s. (For odd $n$ this is obviously $0$ because of the symmetry ${n\choose k}={n\choose{n-k}}$).  I tried to prove it by induction, but it is too messy and I am not sure that's the right direction. What I did is write it in terms of $m=\frac{n}{2}$ so then the induction step will be just $+1$, although that didn't help very much.  Thanks in advance for any help.

I know that the sum of squares of binomial coefficients is just ${2n}\choose{n}$ but what is the closed expression for the sum ${n\choose 0}^2 - {n\choose 1}^2 + {n\choose 2}^2 + \cdots + (-1)^n {n\choose n}^2$?


Thank you for taking the time to help me out. I've got 3 classes which are interacting with eachother: Score, Golfer, and GolferTester. Golfer contains an array of Score objects. My issue is with adding singular Score objects to the array via Golfer.addScore(String, int, double, int, String) when running GolferTester. I have tried to rearrange Golfer.addScore() many times now and am still receiving NullPointerException when executing Golfer.findScore(String).   I think the most important aspect here is that everything runs smoothly so long as I refrain from prematurely ending the Golfer.addScore() for loop with return. But not stopping the loop fills the entire array with nextScore, and renders my method for finding which array slot to fill (by locating null slots), useless after one call. I'll show the code below. Thank you for your assistance!  Golfer.addscore(String newCourse, int newScore, double newCourseRating, int newSlope, String newDate) :   public void addScore(String newCourse, int newScore,   double newCourseRating, int newSlope, String newDate) {   Score nextScore = new Score(newCourse, newDate, newScore,             newCourseRating, newSlope);   for (int i = 0; i < scores.length; i++)   {      if (scores[i] == null)      {         scores[i] = nextScore;         return;      }   } }   Golfer.findScore(String date) :  private int findScore(String date) {   int ans = 0;   for (int i = 0; i < scores.length; i++)   {      String iDate = scores[i].getDate();      if (iDate.equals(date))         ans = i;   }   if (ans == 0)      return -1;   else       return ans; }   Golfer.getScore(String date) :  public Score getScore(String date) {   int a = findScore(date);   return scores[a]; }   class GolferTester :   public class GolferTester {    public static void main (String[] args)    {      Golfer golfer1 = new Golfer("John", "homecourse", 4);      golfer1.addScore("course1", 75, 68.5, 105, "05/03/2017");      System.out.println(golfer1.getScore("05/03/2017"));      } }   As mentioned, simply removing the return aspect from the for loop within Golfer.addScore() makes everything run properly. I've tried workarounds that don't involve using "return" specifically, but to no avail. Thanks again for any input.

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


Say I have a class like this:  public class MyTestClass<T> {      public void DoSomething(object o)     {         Logger.Debug("Non-generic version called.");     }      public void DoSomething(T o)     {         Logger.Debug("Generic version called.");     }      public void DoOtherThing(object o)     {           Logger.Debug("DoOtherThing called.");     } }   If I create an instance with type:MyTestClass<Object>, I can get "DoOtherThing" method use following code:  var t = typeof(MyTestClass<object>); var doOtherThingMethod = t.GetMethod("DoOtherThing");   but there are two method named "DoSomeThing"，how could I call its generic version using reflection?   To describe my question clearly，I give the following example.  public void TestGenericClass() {     var o = new MyTestClass<object>();     var t = o.GetType();      var methodInfos = t.GetMethods();      //GetMethod will throw System.Reflection.AmbiguousMatchException here: Ambiguous matching in method resolution.     var m = t.GetMethod("DoSomething");      //there are two MethodInfo in methods.     var methods = t.GetMethods("DoSomething");      var m1 = methods[0];     var m2 = methods[1];  }   The question is, which one is the method using generic type, m1 or m2?

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


I have seen a mistake in one of a series of seven videos I've uploaded to YouTube. They have been recently posted and don't have "likes", comments etc, so I am perfectly happy to start from scratch.  All I want to do is delete number five in the series and upload a new number 5. How can I do this?

I need to make a small correction in a video I uploaded to YouTube. Googling shows that this is not possible. However, I remember seeing it done before. I posted a comment on a video saying that a certain part of the video was missing. I got a reply back that it was fixed, and when I went to see the video again, it was changed. How was this done?


While changing direct to indirect speech, we generally back shift the tense.  Example -  "I have finished my work."             (Direct speech) He said that he had finished his work.  (Indirect speech)  In this example present perfect tense is back shifted to past perfect tense.     NOTE : There is an exception to this rule : At the time of reporting, if the reported words are still true or still relevant then back shifting is optional. For example: "He said that he has lost his keys." Here present perfect tense is not back shifted because at the time of reporting situation is still relevant. By relevant I mean that the consequence of losing his key can still be seen or heard.    Now my main question(s) is:   Context: Recently an earthquake came in India and Nepal. Thousands of people have lost their lives. Rescue operation is on its way.   Now consider the example which is not an indirect speech: "The President learned that this earthquake has caused destruction all across Nepal and India."   First: tell me, here is it correct to use "has caused" under the context that situation is still relevant, i.e. the aftermath of the earthquake can still be seen?  Second: Here is back shifting optional or obligatory?    Another question:   You see, my intention of asking question is -  In sentence structure of indirect speech like - (He said +........... , He informed +....... , He claimed + .......... ), I am aware that if the situation is still relevant then back shifting of present perfect tense is optional.   But what if the sentence structure is something like - ( He learned + ........... , He noticed +.......... , He found +....... ) here also is back shifting of present perfect tense optional if the situation is still relevant ?  P.S. : My question concerns only present perfect tense.

In news reports, we often read or hear events introduced with the present perfect, and then the past simple like this:     The film star Jim Cooper has died of cancer. He was 68 and lived in Texas.   What's wrong if we use both first and second sentence in past simple?     The film star Jim Cooper died of cancer. He was 68 and lived in Texas.


What's the easiest way to play a sound file (.wav) in Python? By easiest I mean both most platform independent and requiring the least dependencies. pygame is certainly an option, but it seems overkill for just sound.

How can I play audio (it would be like a 1 second sound) from a Python script?  It would be best if it was platform independent, but firstly it needs to work on a Mac.  I know I could just execute the afplay file.mp3 command from within Python, but is it possible to do it in raw Python? I would also be better if it didn't rely on external libraries.


I am really having a problem understanding the proof of this question. Let me write the proof and i will explain my question  Let $p$ be the smallest prime factor of $n$. Assume that $p > n^{\frac{1}{3}}$ Then $p > n^{\frac{1}{3}} \Rightarrow p^{-1} < n^{-\frac{1}{3}} \Rightarrow np^{-1} < nn^{-\frac{1}{3}} \Rightarrow \frac{n}{p} < n^{\frac{2}{3}}$.  Let $m = \frac{n}{p}$, and assume that it is greater than $1$. Notice that $m$ cannot have a prime factor less than $n^{\frac{1}{3}}$. However  $n^{\frac{1}{3}} = \sqrt{n^{\frac{2}{3}}} > \sqrt{m}$  Therefore, $m$ does not have a prime factor less than $\sqrt{m}$. Hence, $m$ is a prime.  I really dont understand this proof and Why does $m$ not have a prime factor less than $n^{\frac{1}{3}}$? If someone can explain to me this proof i would really appreciate it ! thanks

Show that if the smallest prime factor $p$ of the positive integer $n$ exceeds $\sqrt[3]{n}$, then $\frac{n}{p}$ must be prime or 1.  I'm stuck trying to prove this. I tried this using contradiction, but I haven't been able to prove it.  My approach:  Let $p$ be the smallest prime factor of the positive integer $n$.  Let $p > \sqrt[3]{n}$  Then we must show that $\frac{n}{p}$ is either a prime number or 1.  We know that $n = pe$ for some $e \in \mathbb{Z}$.  Thus, $\frac{n}{p} = e$  We also know that $p$ > $\sqrt[3]{n}$, so $p^3 > n$, and $p^2 > \frac{n}{p}$  So, assume $\frac{n}{p} = e$ is not prime nor 1, meaning it's a composite number. Let's try to get a contradiction.  If $\frac{n}{p}$ is composite, then $\exists a,b \neq 1: \frac{n}{p} = ab $  Now, here's where I get stuck. What can I do with this info? $\frac{n}{p} = ab $ and $p^2 > \frac{n}{p}$.


I am a little confused at the moment I am trying to setImageResource to some Images in an ImageView Array. I replicated the error in a simpler project so here is the code. I am sure this must be a silly mistake but I have tried a lot and could not figure out the proper execution.  I can't understand why images is a null object reference since I already initialised it in every way I could think of. I am getting this error in the line mentioned in the code.  java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.ImageView.setImageResource(int)' on a null object reference.  package com.example.test;  import android.media.Image; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.widget.ImageView;  public class MainActivity extends AppCompatActivity { private ImageView image1; private ImageView image2; private ImageView image3; private ImageView image; private ImageView[] images = {image1, image2, image3, image}; @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      image1 =(ImageView) findViewById(R.id.image1);     image2 = (ImageView) findViewById(R.id.image2);     image3 = (ImageView) findViewById(R.id.image3);     image = (ImageView) findViewById(R.id.image);      setImages();  }  public void setImages() {     //This is where I am getting the error     images[0].setImageResource(R.drawable.a);     images[1].setImageResource(R.drawable.b);     images[2].setImageResource(R.drawable.c);     images[3].setImageResource(R.drawable.d); }  }


How to export an image from Photoshop CC with dimensions (15300 x 10500) to one PNG without scaling down?  I have multiple images at 15300 x 10500 pixel and created them at this size. However, I can not export it at this ratio to PNG. No matter which way I try "export as ...", "For Web" or "Fast export", I can not put the scaling to 100%. At "Export as ..." maximum is 78%, at "For Web" it is 53,54%. Different images (at the same original pixel dimensions) give the same maximum.  There is a white background and many areas with the same color, so file size is not an issue. The actual file size on the smaller ratios is <2MB.  If i "export layers" the background layer is at its full size, but if I create a merged layer and try to export that single layer it is scaled down, too.  At Illustrator I don't have trouble exporting to full size.  Any help appreciated!

I have a huge image (1024*256000) which I want to slice horizontally into 100 images of 1024*256.   I'm using Adobe Photoshop CS6. I created the horizontal slices with the Slice tool and the  Divide option.  Save for web allows me to save the images, but only at a 32.03% scale. If I try to change the Percent field to 100%, it gives me the following error:  A value between 0.01 and 32.03 is required. Closest value inserted.   Is there any way around this?


I frequently come across questions that don't actually read like questions, for example, "How to ask a question?" which to me, reads more like a direction than an actual question. I mostly see it when the writer is either from Europe or Asia.   It's something I see often enough that I'm wonder if it is correct in certain contexts. If not, I would appreciate alternative phrasings. My first thought in this example would be something like, "How do you ask a question?" or "How should you ask a question?" But in certain contexts, the use of the second person is inappropriate and I have no idea what to do there.   Any help or insight will be greatly appreciated. Thank you.

This question is inspired by comments on . The original poster wrote:     How to correct this error?   And comments say that it's an incorrect question. Better is     How do I correct this error?   I am not a native English speaker, so the fact that both versions sound natural to me is quite irrelevant. But I would like to ask anyway whether the first version is really bad.  I have seen a lot of questions starting with How to, so if you say that the first version is incorrect, could you please summarize when it is OK to use How to and when it is preferable to say How do I.


I have a local string (file path) which I need to retrieve from a function only once and I'd like to make sure it's never modified again. I cannot use the const keyword because the value of my string is determined at runtime rather than compile time. So I tried using the readonly keyword instead, but Visual Studio is telling me that it is not valid for my item. How can I achieve the level of protection I want, preferably without making another class?  For simplicity and company policy, I've (drastically) shrunk down and renamed my classes and functions, but the concept is the same.  public class myClass {     private void myFunction()     {       readonly string filePath = HelperClass.getFilePath("123");       //do stuff     } }  public static class HelperClass {      public static string getFilePath(string ID)     {         switch(ID)         {              case "123":                  return "C:/123.txt";               case "234":                  return "C:/234.txt";               default:                  throw new Exception(ID + " is not supported");         }     } }   === Edit For PS2Goat ====  public class myClass {     protected SomeObject o;     private virtual readonly string path;              public myClass(someObject o)     {         this.o = o;         path = HelperClass.getFilePath(o.getID());     }      private virtual void myFunction()     {        //do stuff     } }  public class myDerivedClass {     private override virtual readonly string path;              public myDerivedClass(someObject o) : base(o)     {         path = HelperClass.getFilePath(o.getID()); //ID will be different     }      private override void myFunction()     {        //do different stuff     } }      public static class HelperClass {      public static string getFilePath(string ID)     {         switch(ID)         {              case "123":                  return "C:/123.txt";               case "234":                  return "C:/234.txt";               default:                  throw new Exception(ID + " is not supported");         }     } }   See, so this issue I'm having is that if I want to throw an exception, I'd have to catch it in the parent class' constructor for now (until that class is supported) because the parent constructor will be called before the derived constructor. So the wrong ID will be set once before the child constructor (which has the correct ID) is called.

Having a friendly debate with a co-worker about this.  We have some thoughts about this, but wondering what the SO crowd thinks about this?


I am trying to debug my Python program so I apt-get install python3.6-dbg. But when I run python3.6-dbg and I try to do import numpy I get:  >>> import numpy Traceback (most recent call last):   File "/usr/local/lib/python3.6/dist-packages/numpy/core/__init__.py", line 16, in <module>     from . import multiarray ImportError: cannot import name 'multiarray'  During handling of the above exception, another exception occurred:  Traceback (most recent call last):   File "<stdin>", line 1, in <module>   File "/usr/local/lib/python3.6/dist-packages/numpy/__init__.py", line 142, in <module>     from . import add_newdocs   File "/usr/local/lib/python3.6/dist-packages/numpy/add_newdocs.py", line 13, in <module>     from numpy.lib import add_newdoc   File "/usr/local/lib/python3.6/dist-packages/numpy/lib/__init__.py", line 8, in <module>     from .type_check import *   File "/usr/local/lib/python3.6/dist-packages/numpy/lib/type_check.py", line 11, in <module>     import numpy.core.numeric as _nx   File "/usr/local/lib/python3.6/dist-packages/numpy/core/__init__.py", line 26, in <module>     raise ImportError(msg) ImportError:  Importing the multiarray numpy extension module failed.  Most likely you are trying to import a failed build of numpy. If you're working with a numpy git repo, try `git clean -xdf` (removes all files not under version control).  Otherwise reinstall numpy.  Original error was: cannot import name 'multiarray'   If I do that with regular python3.6 it works. numpy was installed through pip3 system-wide before I installed python3.6-dbg.

Python3.4.0  on Ubuntu 14.04.01 LTS. We can use it by typing on Terminal `python3.  I want to use Numpy for Python3.4.0. I run import numpy  but I had anImportError.So sudo apt-get install python-numpy. Then I typed on Terminal:python3`. Then import numpy. I got this error:  >>> import numpy Traceback (most recent call last):   File "<stdin>", line 1, in <module> ImportError: No module named 'numpy' >>>    Nevertheless, Numpy is now working for Python-2.7:  begueradj@begueradj-Bill:~$ python Python 2.7.6 (default, Mar 22 2014, 22:59:38)  [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import numpy >>>    How can I make Numpy work for Python 3.4.0 ?


I have been working with Eclipse for quite some time and recently got several recommendations to use IntelliJ.  As I just saw that questions of the format of "Which IDE is better?" are frowned upon (not without a good reason) - I wanted to know objectively what are the advantages of IntelliJ over Eclipse.  I know what Eclipse does and frankly I'm not missing anything. But this is exactly what I said about Visual Studio 2005 (C#) before starting to work on Eclipse - and now I can't even write a Hello World in VS without getting annoyed ...   I'll narrow the question down to the world of Java SE and Java EE only. No Android, no GUI.   I'm looking for: What does IntelliJ give me that Eclipse lacks? What does Eclipse give me that IntelliJ lacks?  Try to be objective, and please only answer if you had substantial experience with both tools.   Thanks.  Edit: The scope of work I'm looking for is both for working on private projects and as part of a team of several developers working on the same product. But if I have to choose - I'll focus on teams only. JUnit is a crucial part of the work (personally I started working in TDD several months ago - but lets not open that). I'll also be interested to know about ANT/Maven related benefits if there are - although my prime motives are to know if I can benefit from things like: Quicker development (e.g. code generation, templates, auto complete etc.), Easier AUT, simpler Java EE application deployment during development (for UT) etc.

I have heard from people who have switched either way and who swear by the one or the other.  Being a huge Eclipse fan but having not had the time to try out IntelliJ, I am interested in hearing from IntelliJ users who are "ex-Eclipsians" some specific things that you can do with IntelliJ that you can not do with Eclipse.  Note: This is not a subjective question nor at all meant to turn into an IDE holy war. Please downvote any flamebait answers.


I was given a laptop in 2008 that had both XP Professional and Ubuntu. I only ever used XP, so I left Linux alone. Now, I'd like to remove it. I tried going to Disk Management to delete the partition, but it doesn't seem like there is one. I have the C: drive and a volume with no name that's 7.5 GB. At first I thought this might be it, but turns out it's my Active partition. Maybe my friend installed XP and Ubuntu on the same partition?   I also don't see wubi installed, so I don't think that's how he got Ubuntu on there. For what it's worth, it's Ubuntu 7.10, kernel 2.6.22-14-generic.  Any help would be appreciated.

I have installed Ubuntu 11.10 on my Acer netbook as a dual boot with the default Windows XP on said netbook. Now I need only Windows XP and want to completely uninstall Ubuntu 11.10, there is no cd drive in my netbook. Any help would be greatly appreciated.


I am very new to the databases just have basic knowledge about it.  I want to learn sql language and dont know where to start. Please help me to start with it. And what is the difference between sql and PostgreSQL? What are the different languages to maintain databases.  Any help will be appreciated.

I am trying to find some database tutorials,books and similar, since I have started this course in college, and received some material, but it is really hard to manage through all the info on the net. I searched through the questions on the site but didn't find any. Thankfull for all your input.


I need to schedule a shell script execution with crontabs to execute it every 5 hours starting from 01:00 and daily.  sample execution times:  2020-05-29 01:00  2020-05-29 06:00  2020-05-29 11:00   2020-05-29 16:00   2020-05-29 21:00   2020-05-30 02:00   2020-05-30 07:00 .....  please note that the interval is rolled forward per the day.  I have tried the following expression but crontab is giving an error saying "bad hour".  0 1/5 * * * path_to_shell_script   Can anyone suggest a way accomplish this if it is possible with crontabs?

Can I use below code to set cron job for every 5 hours?   0 */5 * * * script.sh   What time my script.sh will be executed?   0000, 0500, 1000, 1500, 2000, 0100, 0600, 1100, 1600, 2100 and so on...    OR   0000, 0500, 1000, 1500, 2000, 0000, 0500, 1000, 1500, 2000 and so on...   If we can not set cron job for every 5 hours with this traditional method, is there any other way to set such job?


I'm talking with someone and I want to know what they think about a specific topic (which was discussed priviously), which of the following should I use:   What are your thoughts on that   or   What are your thoughts on this

Learning and using English I'm always confused about what word to use for referring to things that have been described by me a few sentences earlier: "that" or "this".   Confusion comes from the fact that only the equivalent of "this" is always used in my native language for such referring. But I've noticed that in English for such referring "that" is used as often as "this" (or maybe even more often).  Some examples for illustrating (just tried to google something appropriate to convey my idea better):     We assess local... the demographics of the local population. What are the natural traffic drivers in the area. Things like cinemas and pubs and retail and office and all that type of things and we now put together a bit of a matrix and actually give a weighted score to each of the things we know help our business. That helps us decide in a more scientific fashion.   or:     The problem of Cervantes' origin became after that into a tough matter. Some experts believed that the Cervantes from Alcázar, in the times of the Lepanto Battle, was in the age of a child, more concerned about gathering nests and that type of things than about fighting as a soldier.   and for "this":     I believe lot of people who involved fishery industries in Mexico Gulf are suffering now but as for economic issues, U.S government and other countries will support them and give an utmost response to it. Important thing is that we learn from this mistake and make sure this type of things will never happen in the future and protect nature environment thus we have to take this technology to get energy from water very seriously. I really hope this technology will be available and used for everybody as soon as possible.   Is there a rule describing proper usage of these words in cases like this? (or should I have written "..in cases like that"?)


Hi I am trying to append url from the server and show the link to the user to click it but the 'click' doesn't work. Can you help me fix it?  Thank you!  $("#uurl").append("
"+data[1]+"
")

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


Guys: I'm tearing my hair out on this problem. I have 2 .deb files ready to install, and when I do sudo apt-get install *.deb I get: E: Unable to locate package discord-0.0.14.deb E: Couldn't find any package by glob 'discord-0.0.14.deb' E: Couldn't find any package by regex 'discord-0.0.14.deb' E: Unable to locate package XnViewMP-linux-x64.deb E: Couldn't find any package by glob 'XnViewMP-linux-x64.deb' E: Couldn't find any package by regex 'XnViewMP-linux-x64.deb'  My ls -lah shows: drwxr-xr-x  2 root    root    4.0K Mar 24 08:56 . drwxr-xr-x 10 root    root    4.0K Mar  2 20:57 .. -rwxrwxr-x  1 kcredden kcredden  69M Mar 24 08:54 discord-0.0.14.deb -rwxrwxr-x  1 kcredden kcredden  52M Mar 24 08:52 XnViewMP-linux-x64.deb  There was one fix that said some app wasn't installed, which I did and it fixed it then. But now I've got the same problem, so any help?     NAME="Ubuntu" VERSION="20.04.2 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.2 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=focal UBUNTU_CODENAME=focal

How do I install a .deb file via the command line?


Let $P = \{A \in \mathbb{N} : A \neq \emptyset, |A|<\infty, |A| = 2k, k\in \mathbb{Z}^{+}\}$. Consider $X = \{ A \in P: 1 \in P \}$. Does $X$ have a lower bound in $(P,\subseteq)$.  We can see that $X\subseteq P$, which contains the element $1$ of $P$. By definition, an element $p\in P$ is a lower bound for $X$ iff $\forall x \in X$ we have $p\subseteq x$. Let $p = \{ 1 , a_2, a_3,\cdots,a_{2k}\}$ be the elements of $P$ which contain $1$ and are organized in ascending order, and let $x = \{ 1 , b_2, b_3,\cdots,b_{2m}\}$, where $m\in \mathbb{Z}^+$, and organized in ascending order. By comparing terms, it is not necessarily that $a_{i} = b_{i}$, then, there does not exist a $p\in P: p\subseteq x, \forall x\in X$, so $X$ does not have a lower bound.  I am right or wrong,  Thanks

Let $P=\{A \subseteq \mathbb N: A$ is non-empty, finite and has an even number of elements$\}$. Consider $X=\{A \in P : 1 \in A\}$. Does $X$ have a lower bound in $(P,\subseteq)$? I think that there is a lower bound.


Why electron does not fall into nucleus from orbit of an atom? As accelerated charged particle radiates energy, it should lose energy.

One of the problems with Bohr's theory to describe the hydrogen atom, was that the electron orbiting around the nucleus has an acceleration. Therefore it radiates and loses energy, until it would collapse with the nucleus.  Now Schrödinger describes the electron as a wave function. His theory is able to describe all atoms (in contrast to Bohr's model), but how is the radiation problem solved? I understand that the wave has not an exact position in the time anymore. But the electron still "moves", so it has an acceleration anyway (because of vibrations or so).   Why is in this theory the electron not radiating anymore? And if it is, why doesn't the atom collapse?


I am running Linux Mint 17 on my Laptop. Through the System Info GUI program, I found that the processor is Inter Core i3-2328M. When checking the System Monitor GUI program, it shows four CPUs numbered from 1 to 4. The  say there are only two cores. What is the reason for the mismatch between the specs and the System Monitor?

When I go to the task manager I see 8 processors but I know that I have 4. Why?


While importing a full database on a remote server :  mysql -h foo < dump_file.sql, it returns  ERROR 1153 ... Got a packet bigger than 'max_allowed_packet' bytes. But I don't have admin rights on that server to change my.cnf settings. The limit is 16Mb  I tried to optimize the dump like following, without result :  mysqldump --skip-extended-insert --net_buffer_length=10000 DATABASE_NAME > dump_file.sql   Would it be helpful to use LOAD DATA INFILE Is there any possible syntax to use it without specifying INTO TABLE ... ?  LOAD DATA INFILE dump_file.sql   Or any other way to turn around that issue  ?  EDIT : previous question asks :     Where do I change max_allowed_packet to be able to import the dump? Is   there anything else I should set?   when I merely know where to change max_allowed_packet, but I have not enough rights to do it.  So I specifically asked how to do it with CLI only, and if it would be helpful or not to use LOAD DATA INFILE in my case, which is not at all in the other question. Whatever, duplicated or not, I got an answer who solved the issue.

I'm importing a MySQL dump and getting the following error.  $ mysql foo < foo.sql  ERROR 1153 (08S01) at line 96: Got a packet bigger than 'max_allowed_packet' bytes   Apparently there are attachments in the database, which makes for very large inserts.    This is on my local machine, a Mac with MySQL 5 installed from the MySQL package.  Where do I change max_allowed_packet to be able to import the dump?    Is there anything else I should set?    Just running mysql --max_allowed_packet=32M … resulted in the same error.


I have process explorer on my desktop, ho can I run it ALWAYS as Administrator?   I read , and  in particular, but it doesn't seem to work in this case.   To run as Administrator all my apps as that OP was suggesting, is an overkill for me.  I have Windows 8.1 64 bits.    EDIT: As suggested by @Overmind I tried with a short cut, but it does not work; this is what I have in its Properties:    In Avanzate (read Advanced), I have:    Probably I should have written it before: I have an Home Edition, not a Pro.

The problem is, when I open applications I need to always right click, select run as admin.     When I don't do it getting unexpected application errors. BTW, I turned off UAC.   It's annoying. Is there any way to change behavior of double left-click to act as "Run as administrator" action? I mean to make "Run as administrator" action by default. Thx in advance


I am trying to create a script whereby I have list of numerical test folders and want users to be able to cd into one of them after inputting the folder number.  The script correctly concatenates the input but on running the script it does not actually execute the cd command to the required directory?  It echo's to the screen but then just sits there as if awaiting a further prompt?  Can anyone advise what I am missing please? Script 'chgdir' is as below:  #!/bin/bash # # Script to move to test##dir (using input from user for dir number) echo "Enter test directory number as ## and hit Return"  read dirnum  echo "cd /home/John/test$dirnum""dir"   However on running the script outputs the command to the screen but does not 'cd' and just remains in ~/bin?  cd /home/John/test01dir  John@John-PC ~/bin  P.S I am completely new to bash scripting as you can tell so any help really appreciated.

I'm trying to write a small script to change the current directory to my project directory:  #!/bin/bash cd /home/tree/projects/java   I saved this file as proj, added execute permission with chmod, and copied it to /usr/bin. When I call it by: proj, it does nothing. What am I doing wrong?


According to the formula $λ=h/mv$ for the De Broglie wavelength, as the mass increases, it becomes a greater coefficient to multiply the velocity by, and the larger number in the denominator makes the wavelength so small that it can't be detected for high mass objects. My physics teacher used this reasoning to explain how even large macroscopic objects may have their own wave functions, but are so small we can't really detect them.  However, aren't all larger objects made of smaller ones? Like how molecules are made of atoms, and atoms are made of the elementary particles, and etc. Since this is the case, why can't we apply the λ=h/mv formula to all the particles that make up the atoms and molecules that are inside of say, a baseball, and average find the average of those waves? Since on average, half of those waves should be constructive, and the other half destructive, shouldn't the average of all the waves of the particles that make up the larger object be the true wavelength of the object? This obviously isn't the case though, since a baseball doesn't exhibit wave-like behavior.  What's the flaw in my reasoning? Why don't high-mass objects behave like I expect them to? I tried to read the Wikipedia page on the wave-particle duality, but I still haven't been able to come to a conclusion.

Many introductory quantum mechanics textbooks include simple exercises on computing the de Broglie wavelength of macroscopic objects, often contrasting the results with that of a proton, etc.  For instance, this example, taken from a textbook:     Calculate the de Broglie wavelength for      (a) a proton of kinetic energy 70 MeV      (b) a 100 g bullet moving at 900 m/s   The pedagogical motivation behind these questions is obvious: when the de Broglie wavelength is small compared to the size of an object, the wave behaviour of the object is undetectable.  But what is the validity of the actual approach of applying the formula naively? Of course, a 100g bullet is not a fundamental object of 100g but a lattice of some $10^{23}$ atoms bound by the electromagnetic force. But is the naive answer close to the actual one (i.e. within an order of magnitude or two)? How does one even calculate the de Broglie wavelength for a many body system accurately?


So, when I move (lets use a cube as an example,) I move two of the bottom vertices in said cube, it pushes the two vertices above it, causing the entire model to deform. My question, can I lock the two top vertices in place so there is no "pushing" when I move the bottom two?

My problem is that I sometimes lose the ability to independently translate or otherwise transform any parts of a single mesh. If I try, for example, to just translate several faces, edges, or vertices, then the entire mesh will stretch and displace itself in order to follow the translation. Or, alternatively, if I try to translate just one face then the whole mesh will move as if I'm translating in Object Mode.  I'm not really sure I know how to describe this problem properly. I don't even know how to reliably reproduce it. It seems to happen to any given mesh at random, and it doesn't stop happening to that mesh unless I delete and remake it.  I assume that I must be doing something wrong to cause this to happen. Does anyone have any ideas? Thanks.


I'm new to Blender and I am making that famous doughnut. I seem to have accidentally made the icing layer transparent, meaning that it doesn't show up in Edit Mode and I cannot sculpt in Sculpt Mode. Instead, it ends up altering the doughnut underneath. How do I get my icing back?

I tried to follow the new Blender 2.8 tutorial from Blender Guru.   When entering "Sculpting" with the icing there were suddenly alot of holes in it. Why is this?


How to print the "A" and "D" that looks like the graphs? I tried to use \textit but it does not work?

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


I have a 1990s vertik 2 it's the mountain bike one and I am wondering if I could convert the rim brakes to disc brakes if so what are good budget options

I've got an older, about 1991, model Cannondale SM1000 mountain bike purchased new.  Would it be worth it to convert to disk brakes and if so what would be the process?


If a proper noun (e.g. Google) is converted into a verb (e.g. Let me (G/g)oogle that for you), should it still be capitalized when used as a verb? I recognize that English has no such concept as a "proper verb," but writing a brand name like Google in lower case seems odd to me.

When a proper noun like "Skype" is used as a verb ("Skyping"), should it be capitalized?  My thinking is that it should be capitalized because the root is a proper noun.  Does anyone know of a rule about this question?


We're using a custom preference center. Within the Cloudpage Landingpage I want to add a button to optout. I do understand I need to use the LogUnsubEvent function () to unsubscribe.  I'm just not sure how to generate the needed JobId to pass to the function, when the click does not come from an actual email but from a landingpage button, which doesn't have a jobId?

In Salesforce Marketing Cloud (SFMC), I want to unsubscribe a contact from a single publication list by using a form on a landing page.  I also want to create an Unsub event in SFMC when they submit the form.  There is some sample code from SFMC Help documents  that seems to do that for external sites. Will it work in a SFMC hosted landing page? Do I need to edit the code much?


I have problem with documents generated in LaTeX with Cyrillic symbols. I created the following file: \documentclass{article} \usepackage[utf8]{inputenc} \usepackage[T2A]{fontenc} \begin{document} ЛаТеХ\\LaTeX \end{document}  And when I copy text in Cyrillic alphabet, I obtain some gibberish on the clipboard,  This makes my articles quite hard to quote. So my first question is, can I fix this and have proper copying process? Also if I anyway type certain text and look for it in the document, it is not found in the document, being absolutely clear, that this text is there:  My second question is, can I make the document in such a way, that I can obtain returned the Cyrillic string, that I seek? All this doesn't happen, if the letters are Latin. The Cyrillic letters, however, cause these problems and at this point I cannot use LaTeX due to these restrictions. I will be happy to give further details, when needed. PS: I use "MikTex", pdfLatex+MakeIndex+BibTex.

One frequent aspect of pdflatex output that could be improved is to what extent one can select text output from the generated pdf-file and copy-and-paste it. This is essentially an issue of having the right output encoding. There are at least two important aspects to this:   In the ideal case, Unicode would be the output encoding. Ligature glyphs (such as ﬁ) are ideally de-ligated in the output (here: "fi").   It seems that output encodings are specified through the fontenc package. What is the range of possible output encodings, and most importantly: Is there a way to specify a Unicode output encoding and one that deals with ligatures in the intended way?  (Note: It is important to distinguish output from input encodings. How to use different input encodings in LaTeX has been documented widely. My understanding is that this is best handled by the inputenx package, as it supersedes the inputenc package.)    Quick guide to the solutions: The information in the answers and answer threads is a bit distributed, so here the short summary: one approach is to use \input glyphtounicode together with \pdfgentounicode=1; the other approach is to use cmap/mmap.  Addendum: Sometimes one will need to load the package accsupp and enclose one's macro definition in \BeginAccSupp{method=hex,unicode,ActualText=<codepoint>}[...]\EndAccSupp{} to generate a specific code point. See the caveat about non-BMP code points  and the fix (starting from accsupp version v0.4, 2012/11/18) , which provides the new unichar package option.


in admin panel when I add a widget to the page the javascript doesn't execute. Here is code for my plugin:  class Mosaic extends WP_Widget {     // class constructor     public function __construct() {         $widget_ops = array(          'classname' => 'Mosaic',         'description' => 'Widget provides mosaic jquery.',         );         parent::__construct( 'mosaic', 'mosaic', $widget_ops );       }      // output the widget content on the front-end     public function widget( $args, $instance ) {         echo $args['before_widget'];         echo $args['after_widget'];     }      // output the option form field in admin Widgets screen     public function form( $instance ) {         wp_enqueue_media();     ?>

test1

test12

test122

     <?php     }      // save options     public function update( $new_instance, $old_instance ) {}    }  add_action( 'widgets_init', function(){register_widget( 'Mosaic' );}); function my_enqueue() {     wp_enqueue_script( 'mosaic-js', 'mymosaic.js' ); } add_action( 'admin_enqueue_scripts', 'my_enqueue' ); wp_enqueue_script( 'mosaic-js', '/wp-content/plugins/mosaic/mymosaic.js', array( 'jquery' ), '0.0.1', true );   and javascript is simple, based on Jquery:  jQuery( document ).ready( function( $ ) {         $('.ui-state-default').click(function() {           alert( "Handler click called." );         }); });   If I put it in javascript alert function, it works fine. But everything else, like click doesn't work, could you help me with the issue?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I am trying to compile a basic code in C++ using the Netbeans 11.1 IDE. For this I have installed Cygwin tools that incorporate the compiler, make tool and debugger.  In Netbeans I installed the plugin to be able to develop in C/C++ and testing with C I have no problem.    When writing the following code, I note that the IDE shows two errors:  #include <iostream>  int main(int argc, char** argv) {     std::cout << "Hello world";     return 0; }   1) In the instruction #include the IDE indicates the message "Cannot find include file ". 2) The IDE also marks the std identifier as wrong saying "Unable to resolve identifier std"

What is the difference between g++ and gcc?  Which one of them should be used for general c++ development?


i need this as a Tikz drawing but im no able to do the back and forward arrows (1)&(2) and in total im not sure what im doing at all.:  May somebody show me as an starter how to do Tikz drawings correctly?

What packages do you use and recommend for creating graphics in your LaTeX documents?     As this is a community wiki post, please add your package to the accepted answer (or add a comment, and someone with >100 rep will add it to the CW answer), and include a brief description of what differentiates it from others and how it can be used (GUI drawing tool which generates code, type in raw text, or generates image for inclusion in document).   We'll eventually sort these answers under headings.


I had a flight ticket from Madrid (MAD, Spain) to Miami (MIA, US) to fly in March with AirEuropa. I got an email saying the flight was cancelled 13 days and 21 hours before the flight. Am I eligible to get a cash refund? Am I entitled to further compensation?  The flight was cancelled the day after Donald Trump forbade the entrance of non-residents to the US because of COVID-19.  The answer from an AirEuropa agent is no, I am not. They offer a voucher that has to be spent within 2020, which IMO is very limited.  As I understand the EU rules, I can choose to get a refund unless the carrier can prove the cancellation was because of extraordinary circumstances. I guess COVID-19 is extraordinary, but Trump did not forbid flights to the US, but the entrance of some people, so AirEuropa could have flown that day.

Recently a flight was cancelled and I think I was mistreated. On the day, about 5 of the flights from the airport got cancelled, they claimed it was because of bad weather. I had to wait for two more hours after my estimated departure time only to get information that my flight was cancelled.  However, 5 minutes from the information being anounced, another airlines plane departed from the same airport, and other departures were also succesful.  I did not get any re-routing options and was told I can re-book or refund at their website. They did not have any available flights until after more than a week and therefore I am not able to get home for Easter. I cried all day as I am spending Easter alone now.  Am I eligible for compensation? Shall I challenge the airline that the weather conditions were not to be considered as extreme circumstances?


Note: Not a duplicate, for I need an answer for Windows Vista, 7, 8, 8.1, and 10. The solution for 8 and above does not work for Windows 7 or Vista.  I often talk with naive users who have no idea what's in their system, and less interest, and who use Windows Vista, 7, 8, 8.1, or 10.  Some maintenance processes for the software I support differ if an SSD is installed vs an HDD, i.e., defragmentation. I need a solution which works on every Vista or 7 machine, which means no third party apps, only native Microsoft 'ware.  Asking the naive user to reboot, go into the BIOS, obtain the drive model, and then search for the drive by model and then parse out if SSD or HDD is too complex, so a suggestion of how to discover in Windows if an SSD is installed in lieu of an HDD is desired.   Use of tools already in Windows is required; third party apps are not viable.  Thank you.

I've recently received an assembled PC. I don't know if the disk is an SSD or old HDD (whether SATA or other technologies).  I can't find a way to tell if the disk is SSD or not, apart from the size of the disk. However, now that the sizes of SSDs are getting close to that of HDDs, checking the size is not a good and robust way to distinguish drive type. Is there some other way to determine if the disk is an SSD?


I've read on this site several times that it is better to say $i^2=-1$ as opposed to $i=\sqrt{-1}$.   If we let $i^2=-1$, why doesn't $i=-\sqrt{-1}$? This makes sense since $(-\sqrt{-1})(-\sqrt{-1})=-1$.  Does the property $x^2=4\Rightarrow x=\pm2$ not hold here? If so, could someone please explain?  Note; This question is unique because I'm asking just about the fact that since $i^2=-1$, why isn't $i$ equal to $\pm\sqrt{-1}$. User64786 and Dietrich Burde's comment's reveal that what I am asking about is different than the tagged question. It seems that the answer is a matter of convention, not algebra.  Thank you.

this is something that came up when working with one of my students today and it has been bothering me since.  It is more of a maths question than a pedagogical question so i figured i would ask here instead of MESE.  Why is $\sqrt{-1} = i$ and not $\sqrt{-1}=\pm i$?  With positive numbers the square root function always returns both a positive and negative number, is it different for negative numbers?


After installing  Ubuntu 12.04 LTS , would i be able to update my system to 13.04 without losing my data? And how i will do it? Can Anyone Tell me?

I am currently using Ubuntu 10.04. I know there is a 10.10 release, but can I upgrade directly to 11.04? Could you walk me through the steps please?


I am using the MAPE formula, ABS(actual-forecast)/actual *100, but this raises problems when the actual values are zero. Is it possible to add 1 to the denominator and calculate this way? Would I get accurate percent error data, as long as I am consistent with the formula? Any ideas are appreciated, thank you

How do I calculate relative error when the true value is zero?  Say I have $x_{true} = 0$ and $x_{test}$. If I define relative error as:  $\text{relative error} = \frac{x_{true}-x_{test}}{x_{true}}$  Then the relative error is always undefined. If instead I use the definition:  $\text{relative error} = \frac{x_{true}-x_{test}}{x_{test}}$  Then the relative error is always 100%. Both methods seem useless. Is there another alternative?


The problem is the following:      $$ a_1 = \sqrt6 \ \text{ and } \ a_{n+1}=\sqrt{6 +a_n} \ \\ \ \\ \text{Find} \ \lim_{n\to \infty}a_n $$   I tried dividing $a_{n+1}$ by $a_n$, which is bigger than one. I assume one can use the comparison test to conclude that this limit goes to infinity? But how should I go about finding the limit if I don't have a calculator to see that $\dfrac{a_{n+1}}{a_n}$ = 1,18...  ?

(Fitzpatrick Advanced Calculus 2e, Sec. 2.4 #12)  For $c \gt 0$, consider the quadratic equation $x^2 - x - c = 0, x > 0$.  Define the sequence $\{x_n\}$ recursively by fixing $|x_1| \lt c$ and then, if $n$ is an index for which $x_n$ has been defined, defining  $$x_{n+1} = \sqrt{c+x_n}$$  Prove that the sequence $\{x_n\}$ converges monotonically to the solution of the above equation.  Note: The answers below might assume $x_1 \gt 0$, but they still work, as we have $x_3 \gt 0$.    This is being repurposed in an effort to cut down on duplicates, see here: .  and here: .


Let $a,b,c$ be positive real numbers such that $abc=1$. Prove that $$a^2+b^2+c^2\geq a+b+c$$. Also, state the condition for equality.  My Attempt,  $a,b,c$ are real and positive numbers,  then  $$(a-1)^2+(b-1)^2+(c-1)^2\ge 0$$ $$a^2-2a+1+ b^2-2b+1+c^2-2c+1\ge 0$$ $$a^2+b^2+ c^2-2(a+b+c)+3\ge 0$$.  I have made a start in this way, but I am not sure if this works. Please help me, with any simple and beautiful method.

Let $a, b, c$ be positive real numbers such that $abc = 1$. Prove that   $a^2 + b^2 + c^2 \ge a + b + c$.   I'm supposed to prove this use AM-GM, but can't figure it out. Any hints?


I've just finished watching the last episode of Naruto(220), and when I started watching Shippuden the first episode seemed odd, I have only watched the first 5 minutes of that episode and didn't think it was right, it was naruto and sakura running through some kind of dungeon trying to find Sasuke, they eventually heard an explosion and rushed there, they found Sasuke standing on top of a small crater. That's about as far as I got. My question is, am I on the correct episode or am I missing some episodes? Or perhaps did I start on the wrong one?

I watched all Naruto episodes on Netflix. I want to know if episode 220 leads right into Naruto Shippuden. I only watched a few minutes of episode 1 in Shippuden, but just watching it, I feel like I'm missing more episodes that lead into Shippuden.  Is there anymore Naruto episodes after Episode 220? Like, do they show Pervy Sage actually training Naruto or does his path of training leads into Shippuden?


I would like to use special characters as the german umlaute ä, ö, ü, etc. (also ß) in the source file in plain TeX as I may use them in LaTeX using \usepackage[utf8]{inputenc}. The use of  \input utf8-pl and typesetting with plain TeX leads to the error message "The encTeX extension of TeX is not found“. Is there a way to circumvent this problem? I am using TeXShop Version 3.75 on a MacBook Air with macOS Sierra (Version 10.12.1) and encTeX is apparently part of TeXShop.

I'm using TeX with the plain format.  On my keyboard there is the 'è' character (as well as é, ò, à, ù, ì).  I'd like to make it work so that, when put è in the input file, TeX transforms it into \`e, i.e. the letter e with an accent.  I think I have to change the character code of è and do something like that, but I don't know what to do exactly.  Can you help me?


I have written Longest Common SubSequence in Python using recursion with memoization:  def print2d(table):     print '\n'.join([''.join(['{:4}'.format(item) for item in row]) for row in table])  a="123" b="213"     m = [[-1]*len(b)]*len(a) def lcs(i,j):     print i, j     print2d(m)      if i== -1 or j == -1:         return 0;     if m[i][j] != -1:         return m[i][j]      res = 0     res = max(res, lcs(i, j-1))     res = max(res, lcs(i-1, j))     if a[i] == b[j]:         res = max(res, 1 + lcs(i-1,j-1))     m[i][j]=res     return res  print lcs(len(a)-1,len(b)-1) print2d(m)   All those print statements are there because I didn't get the correct result and decided to take a look at how the algorithm works. What I found surprised me. If you run it yourself you can see the tables printed and they look ok until:  0 -1   -1  -1  -1   -1  -1  -1   -1  -1  -1 -1 0   -1  -1  -1   -1  -1  -1   -1  -1  -1 0 -1    0  -1  -1    0  -1  -1    0  -1  -1 1 1    1  -1  -1    1  -1  -1    1  -1  -1 1 0    1  -1  -1    1  -1  -1    1  -1  -1 0 1    1  -1  -1    1  -1  -1    1  -1  -1   Why all of a sudden on the step 0 -1 the whole first column became 0 ?  So, I quickly created C++ program doing exactly the same thing the same way:  #include <iostream> #include <iomanip> #include <string> #include <cstring> using namespace std; string a = "123",        b = "213"; int mem[1000][1000];  int lcs(int i, int j) {     cout << i << " " << j << "\n";     for(auto i = 0; i < a.length(); i++){         for(auto j = 0; j < b.length(); j++){             cout << setw(4) << right << mem[i][j];         }         cout << "\n";     }     if (i == -1 || j == -1) {         return 0;     }     if (mem[i][j] != -1) {         return mem[i][j];     }     int res = 0;     res = max(res, lcs(i, j - 1));     res = max(res, lcs(i - 1, j));     if (a[i] == b[j]) {         res = max(res, 1 + lcs(i - 1, j - 1));     }     mem[i][j] = res;     return res; } int main(){     memset(mem, -1, sizeof mem );     int r = lcs(a.length()-1, b.length()-1);     cout << r << "\n";     return 0; }   And it works as expected. Corresponding tables look like this:  0 -1   -1  -1  -1   -1  -1  -1   -1  -1  -1 -1 0   -1  -1  -1   -1  -1  -1   -1  -1  -1 0 -1    0  -1  -1   -1  -1  -1   -1  -1  -1 1 1    0  -1  -1    1  -1  -1    1  -1  -1 1 0    0  -1  -1    1  -1  -1    1  -1  -1 0 1    0  -1  -1    1  -1  -1    1  -1  -1   I am puzzled why Python and C++ code that are not that different produce such drastically different results.   Am I missing something about how recursive functions in Python work?  Or is it because in Python I use list of lists and not 2D array as in C++?

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