How to calculate rank from multiple parameters ?  Parameters are bandwidth, delay, success ratio, these parameters values are used to determine the trustworthiness of a peer while accessing a service from a peer?.  My aim is to get the best peer, by using any ranking method ... which method can I use?

I have four numeric variables. All of them are measures of soil quality. Higher the variable, higher the quality. The range for all of them is different:  Var1 from 1 to 10  Var2 from 1000 to 2000  Var3 from 150 to 300  Var4 from 0 to 5  I need to combine four variables into single soil quality score which will successfully rank order.  My idea is very simple. Standardize all four variables, sum them up and whatever you get is the score which should rank-order. Do you see any problem with applying this approach. Is there any other (better) approach that you would recommend?  Thanks  Edit:  Thanks guys. A lot of discussion went into "domain expertise"... Agriculture stuff... Whereas I expected more stats-talk. In terms of technique that I will be using... It will probably be simple z-score summation + logistic regression as an experiment. Because vast majority of samples has poor quality 90% I'm going to combine 3 quality categories into one and basically have binary problem (somequality vs no-quality). I kill two birds with one stone. I increase my sample in terms of event rate and I make a use of experts by getting them to clasify my samples. Expert classified samples will then be used to fit log-reg model to maximize level of concordance / discordance with the experts.... How does that sound to you?


I'm setting up 5.6 Percona Mysql, in order to enable GTID should I have to enable log_slave_update on both Master and Slave ?  If I should enable log_slave_update, then I'm counting this to CONS for having GTID.  Also if you can let me know any other issues in having GTID enabled?

I've read the  saying log_slave_updates is required.  It makes sense for a general promotion situation.    But is that really still required for something you're intending to be a read only slave that will never get promoted?


What is the cost personally of my Trip please

My question is 1 -Why it's my low to calculate what I spend each month and not on my salary 2- how much you need for a holiday in Uk knowing that my brother who will host me  3- to get an estimate how many meters per day are needed


I made this minimal working example of a larger piece of code I have.  The problem is, that sizeof prints for the first call 16, which is the correct size, and for the 2nd call only 8. The wierd thing is, it always prints 8, independent of the size of the struct, whether there's only one value or 10 values in it.  struct test_struct {     int32_t val1;     int32_t val2;     int32_t val3;     int32_t val4; };  unsigned char * StructToChar(test_struct structy) {     unsigned char returnval[sizeof(structy)];     memcpy(returnval, &structy, sizeof(structy));     return returnval; }  int main() {     test_struct sendstruct = {};     unsigned char *test_array = StructToChar(sendstruct);      unsigned char returnval[sizeof(sendstruct)];     memcpy(returnval, &sendstruct, sizeof(sendstruct));      printf("%d\n", sizeof(returnval));     printf("%d\n", sizeof(test_array));     return 0; }

First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?


In MATLAB, I can create an array and assign values to it dynamically without mentioning the size of the array while its creation.  I'm new to MATLAB, the following show how I create an array and assign values to it in MATLAB.  >> a=[] a =       []  >> a(2,2) = 55 a =       0   0      0   55   We can write a function in Python to do this but I want to know that is there any equivalent procedure to MATLAB functionality of assigning values to array dynamically in Python or in Numpy?

I can't figure out how to use an array or matrix in the way that I would normally use a list. I want to create an empty array (or matrix) and then add one column (or row) to it at a time.  At the moment the only way I can find to do this is like:  mat = None for col in columns:     if mat is None:         mat = col     else:         mat = hstack((mat, col))   Whereas if it were a list, I'd do something like this:  list = [] for item in data:     list.append(item)   Is there a way to use that kind of notation for  arrays or matrices?


I've just started using LaTeX and am using the Listings package to include external source code. I would like though to only include certain parts of the source code. I know that certain parts of the file can be included by specifying  [firstline=5, lastline=165]   etc. However the files in question might be modified often, and it would be very inconvenient to have to change the line numbers every time. Is it possible to somehow include parts of the file between some sort of delimeter? E.g.  public class HelloWord {      public static void main(String[] args) {         //{Listings:Hello World}             System.out.println("Hello World");         //{/Listings:Hello World}     }  }   And then somehow only include the line  System.out.println("Hello World");   in the LaTeX document.  Even better, would it be possible to have multiple such pairs of delimiters within a file, and then include different pieces of the file in different parts of the document? e.g.  \lstinputlisting[section='Hello World']{Code.java} ... \lstinputlisting[section='Geometry']{Code.java}   I am fine to switch to a different package if needed. Thank you for any assistance!

I am attempting to document my MATLAB programming code in LaTeX. For  this, I use the mcode package, which defines the MATLAB lstlisting  environment. With the commands  \newcommand{\mfileMain}{main.m} \newcommand{\mfileMainFirstNumber}{\mfileMainFirstLine} \newcommand{\mfileMainFirstLine}{26} \newcommand{\mfileMainLastLine}{33} \lstinputlisting[firstnumber=\mfileMainFirstNumber,                  firstline=\mfileMainFirstLine,                  lastline=\mfileMainLastLine]{\mfileMain}   I set the firstnumber, firstline and lastline parameters and use  them to import a piece of MATLAB code into the LaTeX document with  \lstinputlisting. However, when I add some code before the  \mfileMainFirstLine, in this case 26, the code is shifted and the  documentation is ruined. To fix this, I would have to update the line  numbers.  I am trying to fix this issue by adding 'tracers' to my MATLAB  program. I use the commands  filename=['lstinputlisting_line_numbers_' mfilename '.txt']; fileID=fopen(filename,'w');   to create a text file in which I store the line numbers for which the  code is documented using the command  dbstack_eval=dbstack;fprintf(fileID,[num2str(dbstack_eval.line+1) '\n']);   . This results in a text file lstinputlisting_line_numbers_.txt with  content for instance like  53 62 75 91   in case I want to document four parts of the MATLAB program main.m.  What I want to do from here is simply use this line number data in the  \lstinputlisting commands. Perhaps it is possible to store the line  numbers in the \newcommands{}{}, or perhaps there is a better, more  elegant way of doing it. In this way, the line numbers would update  automatically in case I add new lines of code. Consequently, my LaTeX  document would still be okay, saving me a lot of time not having to  update the line numbers myself.  A minimum working example could look like the following. The LaTeX file  main.tex would have the content  \documentclass[a4paper]{article} \usepackage[framed,numbered]{mcode}  % Data for the 'lstinputlisting' environments. \newcommand{\mfileMain}{main.m} \newcommand{\mfileMainFirstNumberA}{\mfileMainFirstLineA} \newcommand{\mfileMainFirstLineA}{WHAT SHOULD I PUT HERE?} \newcommand{\mfileMainLastLineA}{WHAT SHOULD I PUT HERE?} \newcommand{\mfileMainFirstNumberB}{\mfileMainFirstLineB} \newcommand{\mfileMainFirstLineB}{WHAT SHOULD I PUT HERE?} \newcommand{\mfileMainLastLineB}{WHAT SHOULD I PUT HERE?}  \begin{document}     In the code     \lstinputlisting[firstnumber=\mfileMainFirstNumberA,                      firstline=\mfileMainFirstLineA,                      lastline=\mfileMainLastLineA]{\mfileMain}     we calculate the ....       And in the code     \lstinputlisting[firstnumber=\mfileMainFirstNumberB,                      firstline=\mfileMainFirstLineB,                      lastline=\mfileMainLastLineB]{\mfileMain}     we calculate the..... \end{document}   . The MATLAB file main.m would have the content  %% Line number output.  filename=['lstinputlisting_line_numbers_' mfilename '.txt']; fileID=fopen(filename,'w');  dbstack_eval=dbstack;fprintf(fileID,[num2str(dbstack_eval.line+1) '\n']);     %% Input to be specified by user.  alpha=10; % PDE parameter. x_s=0; % Starting coordinate. x_e=1; % End coordinate. N_n=1e2+1; % (N)umber of (n)odes. N_ip=2; % (N)umber of (i)ntegration (p)oints.  dbstack_eval=dbstack;fprintf(fileID,[num2str(dbstack_eval.line+1) '\n']);     fclose(fileID); % Close the file 'fileID'.


A few days ago I uploaded a pre-print to arXiv. Today I got an email from  a service called PubSure offering to evaluate the manuscript with AI (?) and give me a score on how "publishable" (?) it is. In their own words:     PubSURE is a super cool AI-powered solution that evaluates research manuscripts and provides a score to indicate their submission readiness.   I signed up to check it out (although my pre-print is already accepted for publication) and they ask you to upload the article (Doc and Docx files) to evaluate it (which I did not do).  I'm getting scam vibes from this one (but I could be wrong!). Anybody heard from this service before (perhaps even used it)?

Some commercial services sell certificates to manuscript authors.  Frequently these certificates are marketed to authors in developing countries where English is not widely spoken.  These services claim that the certificate indicates that the manuscript meets a certain standard of quality.  Often the certificate states that the manuscript is written in correct English.  The certificate may be accompanied by editing services.  Should I pay for a certificate and send the certificate to a journal?  This is a general question is inspired by  to avoid talking about a specific service.


I'm writing a bash script and in it I'm doing something like the following:  #!/bin/sh read -p "Enter target directory: " target_dir cp some/file.txt $target_dir/exists/for/sure/   When I run this shell script I see and input:  ./my_script.sh Enter target directory: ~/my_dir   But I get the error/output:  cp: directory ~/my_dir/exists/for/sure/ does not exist   And, as I'm trying to make obvious: That directory 100% exists. i.e. I can run the following without receiving any error:  cd ~/my_dir/exists/for/sure/   What's going on here?

I saw a lot of posts about it all over the internet but i couldn't make it run as i wanted.  I have an input from the user of a path. If the user will type ~/Desktop/ for example i can't use $ans in grep and other commands because of the tilde.   here is an example of my code. the second line is my main problem right now.  read -p "Enter new path or type 'exit':   " ans file=`grep -x $ans ~/.Log`    Appreciate your help.


If a,b,c are positive real numbers and xabc/(a+b+c)<=(a+b)^2+(a+b+4c)^2. Find the maximum value of x for which it always holds true. I tried it by using A.M>=G.M but I am not able to get the answer please help me out.

Find biggest constans k such that  $(a+b)^2 + (a+b+4c)^2\ge \frac{kabc}{a+b+c}$ is true for any $a,b,c \in\mathbb{R}$  Could you check up my solution? I'm not sure it's ok -  $(a+b)^2 + (a+b+4c)^2 \ge 0$  and   $0\ge \frac{kabc}{a+b+c}$  so  $0 \ge k$


I am coding c++ in visual studio 2015. I have files called superpixel.h and superpixel.cpp. I wanted to use templates for some of the functions but I read that I cant define templates in cpp files. I don't want to define the templates in the header file because it will just make my code messy with definitions in header and cpp files.  Is there a work around to this ? Do I have to switch all my cpp files to hpp ?

I have some template code that I would prefer to have stored in a CPP file instead of inline in the header.  I know this can be done as long as you know which template types will be used.  For example:  .h file  class foo { public:     template <typename T>     void do(const T& t); };   .cpp file  template <typename T> void foo::do(const T& t) {     // Do something with t }  template void foo::do<int>(const int&); template void foo::do<std::string>(const std::string&);   Note the last two lines - the foo::do template function is only used with ints and std::strings, so those definitions mean the app will link.  My question is - is this a nasty hack or will this work with other compilers/linkers? I am only using this code with VS2008 at the moment but will be wanting to port to other environments.


I recently go through this website and i found designing issue with edited user check 178 of yannis its collision with pankaj      Is this a issue i have 1024 resolution

Possible Duplicate:          Mr. Jon Skeet has been caught causing this bug.    The last digit of his bronze badge is hidden.  Edit: My system specifications  Browser: Version 22.0.1229.79 m OS: Windows 7 Ultimate 32 bit Screen Resolution: 1280 x 800


In the new qgis3 version it is still possible to add your own processing scripts to the processing toolbox. As I understand the discussion between the qgis3 developers (qgis3 is a very good work!!) the  way of passing input and output parameters has changed because the former way is not that pythonic, which is true. In qgis2.x input and output parameters were defined at the top of the script with a double # (comment) like:  ##parameter1=file ##result=output raster python code...   I've searched several hours in different forums, lists and so on, with no success how to start here and define input and output parameters...does anybody know where to get a documentation or example?

A simple script created within the QGIS 2.18 processing toolbox:  ##example=string print example   Upon running would produce and input box in a window with a run button:   Once executed would produce the expected print in the python console  When testing the same code in QGIS-3.0, changing the print to python 3's print(), I get an error where the input section is seemingly ignored as a comment:   Does the processing framework no longer accept inputs in this way?


I have to output an employee's name and dept in the view like Welcome 'employee' to 'dept'. I am using string.Format(). I was playing around with String.Format and string.Format() and saw the following. Can someone please explain why string.Format() doesn't work or what am i missing in the code? I was reading online and saw that string.Format() and String.Format() give the same result.  Doesn't work-  <div>   <div> Welcome </div>     <div>        @if(employee != null)        {            @string.Format("{0} at {1}", employee.name, emp.dept)        }     </div> </div>   Error- Unexpected "string" keyword after "@" character.  Once inside code, you do not need to prefix constructs like "string" with "@".  Works:  <div>   <div> Welcome </div>    <div>      @if(employee != null)      {         @(string.Format("{0} to {1}", employee.name, emp.dept))      }    </div> </div>   Works  <div>    <div> Welcome </div>      <div>         @if(employee != null)         {             @String.Format("{0} at {1}", employee.name, emp.dept)         }    </div> </div>

Possible Duplicate:          I understand that the @ symbol can be used before a string literal to change how the compiler parses the string.  But what does it mean when a variable name is prefixed with the @ symbol?


I realize that this is something of an edge case, and not really a huge problem, but it's a bug, nonetheless.  When a notification about a bounty shows up in the notifications inbox, and the title of the  has single quotation marks, the quotation marks break ( example below )    .....I don't recall seeing this on other notifications for this bounty (the three day and one day warning), but here it is at bounty's end.

Although  and  both have , HTML entities still appear in "expiring soon" notifications:


nohup grunt server:debug >grunt.out 2>&1 <&- &   I have a nohup command that ends with <&- . What does this direction do? Can some explain with pointers. I did search google for examples, but could not find one which explained about <&- and is this really required?

I looking into writing my own init.d scripts to control several services running on my Linux server. I came across an example online which contained:  nohup $EXEC_SCRIPT 0<&- &> $LOG_FILE & echo $! > $PID_FILE   From what I understand:   nohup Catches the hangup signal  $EXEC_SCRIPT is a variable containing the command to be run  0<&- &> Not come across this before $LOG_FILE similar to $EXEC_SCRIPT but contains the log file path & starts logging to $LOG_FILE in the background? $! is the PID of the most last background command > writes the result of $! to the $PID_FILE   I can work through it with this knowledge but the 0<&- &> is completely throwing me off. I don't like to include things that I don't at least partially understand first.


String s1 = "testing"; String s2 = new String("testing");  System.out.println((s1.toString() == s2.toString()) ? "True":"False");  System.out.println(("another" == "another") ? "True":"False");   Output:   False  True  I know we should not use == to compare strings in Java because it will compare the references to these objects, not the strings itself and hence outputs would be unexpected. But if we compare both strings it should output true. Why is this happening? On the other hand, you can see that the second statement outputs true as excepted.

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


I've been building up villages on my server, and I'd really like to not have to watch for zombie sieges. I'd like to set up a command block to detect when it is almost midnight, and then skip midnight. The old methods I've found on here aren't working as the /stats command has been removed.  Anyone know how I can do this? I'm running 1.15.2

I have made an iron golem farm in 1.15.2 which only works if the villagers can sleep once in a while, but I have lit all of the caves in my area and I can't stand it being night. I am looking for a command block system that automatically sets the time to day when I would be able to sleep.  I found a solution, but it seems it was made before the 1.13 update.  To clarify, the sun must move during the day (so /gamerule doDaylightCycle false isn't a valid answer), or otherwise my iron golem farm will break.  I would like a system that does this:  if time=x set time 1000


I would like to get some help with finding the derivative of the next function: $F: GL(n,\mathbb{R}) \mapsto GL(n,R) $ , defined by $F(A)=A^{-1} $. One can try find the derivative of the known formula for finding inverse of a metrix by $A^{-1}=\frac{1}{det(A)} adj(A) $ I tried to be sophisticated , using the inverse function formula, but the inverse of the given function, as I see it, is just the same function. Is that right?

In a scientific paper, I've seen the following $$\frac{\delta K^{-1}}{\delta p} = -K^{-1}\frac{\delta K}{\delta p}K^{-1}$$ where $K$ is a $n \times n$ matrix that depends on $p$. In my calculations I would have done the following $$\frac{\delta K^{-1}}{\delta p} = -K^{-2}\frac{\delta K}{\delta p}=-K^{-T}K^{-1}\frac{\delta K}{\delta p}$$ Is my calculation wrong? Note: I think $K$ is symmetric.


When display hidden file and directory in terminal using ls -la it show two directory i.e. . and .. and when list the content of dot(.) directory it contain all file and directories that is in it's parent directory,are it create clone of that file, if yes then there is duplicate files ?  And while running a script we have use that dot directory if we are in directory where it reside like  ./script   but not when we run it from another directory like  /Document/myscript/script  why?

when we specify the file path some times we specify like ./filename and some time ../filename what is difference between these two?


Is there a way to run a command for a specific amount of time and then kill it?  Example 1 :  I would like to play a song in cvlc for 1 minute and then stop. (song is longer than 1 min).  Example 2 :   I would like to run the command cmatrix for 30 seconds and then stop it.

If and How is it possible to, in Terminal, to get an application to run for 30 seconds, before being force closed, and echoing the logs of that process?


I left fully cooked lasagna out on the counter all night. My house is 72 degrees Fahrenheit (22 degrees Celsius). Is it safe to reheat and eat?

If I left food out of the refrigerator for some period of time, is it still safe? If I left it out too long, can I salvage it by cooking it more?


Which of the following two sentences is correct?     I have had the pleasure of meeting him.      I had the pleasure of meeting him.   If both are correct, what are the exact scenarios to use them appropriately?

If I seem tired, can I say: "I haven't slept last night"? If not, why have I been told that we use present perfect for actions that have present effects?


I was wondering whether there is an explanation why Qui-Gon's body does not vanish right away after he is killed by Darth Maul!? Obi-Wan's and Yoda's bodies vanish right away, while Qui-Gon's is burned at a funeral.

Some Jedi disappear when they die:   In Star Wars Episode IV: A New Hope       At the end of his duel with Vader on the first Death Star, Obi-Wan Kenobi let down his guard and concentrated for a moment, disappearing entirely just as Vader's lightsaber passed through his empty robe.   In Star Wars Episode VI: Return of the Jedi      When Luke returned to Dagobah in the Return of the Jedi, Yoda also disappears when he peacefully dies.  In Star Wars Episode VIII: The Last Jedi      When Luke is exhausted after “being” on Crait he looks into the Horizon and disappears.    And others don't:   Star Wars Episode I: The Phantom Menace      When Qui-Gon Jinn's dies after his duel with Darth Maul, he doesn't  disappear and is cremated.  Star Wars Episode VI: Return of the Jedi      When Vader/Anakin Skywalker dies on the second Death Star, he does not disappear and he is cremated by Luke.      Also, they all became a "ghost" after their death.


I'm planning to play a Sun Soul Aarakocra monk. With the flight of the Aarakocra I can essentially hit someone, fly up and repeat. Let's say I fly up 50 feet and decide to drop to the ground. Does the 50 feet drop count against my movement or no? Is there any rules that specify that so I can justify it to my DM.

If you willingly fall on your turn does it cost movement?  As a DM I'm thinking about how to handle things such as creatures who are immune to being prone, diving into the water from a height, or a flying creature diving off a cliff and taking a fall before taking flight. There are many circumstances where you can fall without taking damage or being knocked prone afterward, and I'm not sure how to determine movement following the dive.  For example, my character walks up to a ledge above a 10 foot drop to the ground below. After taking 5 feet of movement to step off the ledge, I allow myself to fall. When I hit the ground have I used 15 feet of movement or just 5?


I have been creating odd-named files every once in a while, e.g.  $ls -rthl $-rw-r--r--  1 shamil hep  290 Aug 13 11:58 -rf   And interestingly it is impossible to remove this file with  rm -f -rf   I know I need to escape the special symbols like "-", so the issue is clear. And I used to know the solution, but have since forgotten.  How do I properly delete it?  I have tried things like this  rm -f \-rf   but to no avail.

Ok, I have a bunch of files starting with a dash, -. Which is not so good... and I want to rename them. In my particular case I would just like to put a character in front of them.  I found the following line that should work, but because of it dash it doesn't:  for file in -N*.ext; do mv $file x$file; done   If I put an echo in front of the mv I get a bunch of  mv -N1.ext x-f1.ext mv -N2.ext x-f2.ext   Which is correct, except of course it will think the first filename is options. So when I remove the echo and run it I just get a bunch of  mv: illegal option -- N   I have tried to change it to  for file in -N*.ext; do mv "$file" "x$file"; done   but the quotes are just ignored it seems. Tried to use single quotes, but then the variable wasn't expanded... What do I do here?  Update: I have now also tried to quote the quotes. Like this:  for file in -N*.ext; do mv '"'$file'"' '"'x$file'"'; done   And when I echo that, it looks correct, but when I actually run it I just get  mv: rename "-N1.ext" to "x-n1.ext":: No such file or directory   I have just no clue how to do this now... sigh


I have witnessed first hand the beautiful math typesetting LaTeX can produce and also the enormous effort that goes into writing formulae in LateX. So I was wondering that an image processing software that can convert photographs of hand written formulae on paper to LateX would be a tremendous time saver for the  LateX community.   What do you all think? Since I am  relatively new to LateX (couple of years), I wanted your feedback on how useful such a tool will be in your research or design projects.  Thanks.

I type fast enough that for most things it's not a pain, but I have a few big stacks of old course notes I'd like in LaTeX which I'm dreading having to go through. So, I'm just wondering what the best solution for handwriting -> LaTeX is so far, if any.


Given the set of natural numbers $\mathbb N=\{1,2,3, ... \}$. I am interested in partioning $\mathbb N$ into disjoint sets of $K$ elements whose union is $\mathbb N$.     What is the cardinality of this set? Is it equal to the cardinalty of $\mathbb R$?

What is the number of different partitions of the set N of integers? My reasoning thus far goes as follows: the number must be at least as big as ω because any given integer can be matched with any other integer in a single partition cell. The number must be greater than ω (the first infinite cardinal), because diagonalization kicks in as soon as you try to enumerate the set. But it can be no bigger than ω(2), because each partition is a collection of subsets of N and thus a subset of P(N) (the power set of N). Hence, the set of all partitions is a subset of P(P(N)). Therefore, given the continuum hypothesis, the number I am looking is either the first or the second uncountable ordinal. Any ideas?


I have never connected my MacBook to external monitors. I know I can use the HDMI port, but I was wondering about the Thunderbolt 1.0 port (I have 2 ports).  I am using a Mid 2012 15" retina MacBook Pro. Here are the monitors I am considering buying (2 units):      I know I can't run these at full 4k with my laptop.   What do I need to use these monitors until I am able to upgrade the MacBook? These monitors don't have Thunderbolt 1.0 ports.

How do I find out the number, type, resolution & refresh rate of additional monitors I can attach to my MacBook or MacBook Pro?  This is an attempt at a canonical QA, as per the Meta QA -   to try prevent the myriad "same but different" questions we get on every possible combination of computers, cable & monitors There are perfectly good resources out there that Ask Different should not have to duplicate the efforts of.


Suppose that $f$ is analytic on a domain $D$, which contains a simple closed curve $\gamma$ and the inside of $\gamma$. If $|f|$ is constant on $\gamma$, then I want to prove that either $f$ is constant or $f$ has a zero inside $\gamma$  if $f$ is not constant, then the max/min modulus principle applies ... meaning $|f|$ can not have any local max/min on D  I don't really know what to do next

Suppose that $f$ is analytic on a domain $D$, which contains a simple closed curve $\gamma$ and the inside of $\gamma$. If $|f|$ is constant on $\gamma$, then I want to prove that either $f$ is constant or $f$ has a zero inside $\gamma$  Here is my take: if $f$ is constant, i dont see a reason why $|f|$ wouldnt be constant :)  if $f$ is not constant, then the max/min modulus principle applies ... meaning $|f|$ can not have any local max/min on D now i am lost at this point ...


I have strange question. How Can I change or set a sql char set in wordpress. In wp_config.php I have:  define('DB_CHARSET', 'utf8'); define('DB_COLLATE', 'utf8');   In my plugin I have this:  global $wpdb, $charset_collate; require_once ABSPATH . 'wp-admin/includes/upgrade.php';  if ($wpdb->get_var("SHOW TABLES LIKE '" . $ow_odczyty . "'") != $ow_odczyty) {         $query_one = "CREATE TABLE " . $ow_odczyty . " (                 id mediumint(9) NOT NULL AUTO_INCREMENT,                 data datetime DEFAULT '0000-00-00' NOT NULL,                 stan int NOT NULL,                 UNIQUE KEY id (id)                 ) $charset_collate;";          $wpdb->query($query_one);         add_option("ow_db_version", $ow_db_version);   What it's wrong. When this plugin create above script I have latin1_swedish_ci and I don't know why. Sorry for my English.   Best regards!

Is there an easy way of getting the charset and collation of the DB tables in WordPress without resorting to SQL queries?


I've never really got how chmod worked up until today. I followed a tutorial that explained a big deal to me.   For example, I've read that you've got three different permission groups:   owner (u) group (g) everyone (o)   Based on these three groups, I now know that:   If the file is owned by the user, the user permissions determine the access. If the group of the file is the same as the user's group, the group permission determine the access. If the user is not the file owner, and is not in the group, then the other permission is used.   I've also learned that you've got the following permissions:   read (r) write (w) execute (x)   I created a directory to test my newly acquired knowledge:  mkdir test   Then I did some tests:  chmod u+rwx test/ # drwx------ chmod g+rx test/ # drwxr-x--- chmod u-x test/ # drw-r-x---   After fooling around for some time I think I finally got the hang of chmod and the way you set permission using this command.    But...  I still have a few questions:   What does the d at the start stand for? What's the name and use of the containing slot and what other values can it hold? How can I set and unset it? What is the value for this d? (As you only have 7=4+2+1 7=4+2+1 7=4+2+1) Why do people sometimes use 0777 instead of 777 to set their permissions?   But as I shouldn't be asking multiple questions, I'll try to ask it in one question.  In UNIX based system such as all Linux distributions, concerning the permissions, what does the first part (d) stand for and what's the use for this part of the permissions?

In Linux, what does the d mean in the first position of drwxr-xr-x?  And what are all of the possible letters that could be there, and what do they mean?  I'm trying to learn more about the Linux file permissions system, and I'd like to see a list of the character meanings for the first slot.


After the file system warning me about low disk space, when I try to log in it's showing me the message on the screen dev/sda clean XXXXXX/XXXXX files XXXXX/XXXXX blocks hence I cannot access my GUI. The problem is not related with graphics or anything, it's just a low disk space problem. Do you recommend Gparted with LIVE USB to extend the partition? If so show me the steps.

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


Does Time machine backup apps data and OS configuration or just apps and files?  Coming from Windows with a 3rd party full disk image backup(Note :I mean a disk clone, not the Windows' default backup an restore and functionality) , I would expect to be able to use time machine to restore the mac as it was in the moment I made a time machine backup.  I am honestly not aware how apps store data on MacOS though

Does Time Machine backup system files, kernel files and other OS-related files?   I have corrupted system drivers and files and I want to do a fresh install of OS X but I also want to back up my applications, files and folders.   I wonder if I should go with Time Machine or manually backing up each file.


I am going to be using Ubuntu for the first time. How do I install it to hp 3130 cpu? My unit has no OS so I don't really know how to get around it. I was just wondering what if USB stick/drive is not yet recognized, what do I do?

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


I have recently noticed that I press CTRL + C more than once, even if I know that the file has been copied to the clipboard. But I press CTRL + X or CTRL + V only once.   Why do I do this? Is this only a problem for me, or is anybody else is facing it too?

I've noticed that most people when using a real or a virtual calculator, they hit the Clear button multiple times when clearing the screen (even though hitting it once is enough), so I started wondering: is there a flaw in the calculator's design that compels most people to do that?  What makes them trust the button less than the other buttons? Is there some sort of feedback mechanism that's missing? Even if it's just a habit, how does one end up developing it?


I am new to Linux. On my Desktop, I have created the following script called trimmomatic  #!/bin/bash java -jar /home/aishah/software_library/Trimmomatic-0.36/trimmomatic-0.36.jar   When I open a terminal and do    $ cd Desktop   followed by    $ bash trimmomatic   the script works.  However, the script does not work if I run it starting from directories other than Desktop. For example, when I open a terminal and directly do   $ bash trimmomatic   it says   bash: trimmomatic: No such file or directory   What can I do to be able to run the script from any directory?  Please give me detailed instructions of all commands to type and where to type.

I'd like to know if there is a way to run  program/shell script without typing full path:  /opt/idea/bin/idea.sh


I created this php for administrators to search for users and allow administrators to edit their details when they click the button. When the user is not using the search function, the "Update" button will work. After the user types the search function, it will display all relevant fields according to the user input, but after the user uses the search function, the "Update" button will no longer work. Thank you.  <?php include '_base.php'; $p->title = 'List of Users';   $nameorid = $p->get('nameorid');  $stm = $db->prepare('SELECT * FROM user WHERE id LIKE ? OR `name` LIKE ? OR email LIKE ?'); $stm->execute(["%$nameorid%","%$nameorid%","%$nameorid%"]); $arr = $stm->fetchAll();  // output ----------------------------------------------------------------------------------------- include '_head.php'; ?>
List Of Users
  <?= $h->label('User ID / Name / Email ') ?> <?= $h->text('nameorid', null, 50, 'autofocus') ?>

<?= count($arr) ?> record(s)

             Id	             Name	             Gender	             Group

         <?php             foreach ($arr as $s) {                 echo "
                         $s->id	                         $s->name	                         $s->email	                         $s->role	                                                  <button id='normalBtn' data-get='/updateUser.php?id=$s->id&role=$s->role'>Update</button>
                 ";             }         ?>

     <?php include '_footer.php';

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 have an extarnal database that I want to show some data in my wordpress site. What are the necessary steps to achieve this?  edit: I changed config.inc.php according to  but it enabled me to see the hostName of the external server visible by phpmyadmin. With the wordpress root I can enter the external database.   Up to here is good. But I do not have any clue about how to advance. I searched plugin to show the new database but I could not find any. I am new to the wordpress, so pardon me for my beginner questions. I want to show the data in different pages, with the unique string name that is the same as in the external database, ie: page name is the specifier query name.

I want to connect wpdb to another database. How do I create the instance and pass it the database name/username/password?  Thanks


Would be nice to be able to follow a question with a single click. Right now I use a workaround solution that takes a few clicks (if I can remember the way to do it at all)

What does bookmarking a question mean? How do you bookmark a question? Do users get updates on their bookmarked questions? Are my bookmarks publicly visible? How do you see your own bookmarks? How do you see other users' bookmarks? How do you see which users have bookmarked a particular question? What impact does the bookmark system have on the voting system? Can I "un-bookmark" a question? Can I search within my bookmarks?


What is the difference between the following sentences?     It has been developed   vs   It is being developed      It has been held   vs.   It is being held    Which tense is "is being" used here and when do we use it? Is there any difference between "It is being held" and "It is helding"?

What is the difference between following sentence constructions?     It has been developed   vs.   It is being developed      It has been held   vs.   It is being held   is being: what is the grammar used here and when is it used?


I'm making a Minecraft Steve Rig that supports 1.8 skins (2 layers) and when I try to texture the second layer, the area of the 2nd layer's UV texture that is clear (has no texture) comes out black. How do I get it so that the Clear part of the texture comes out clear so you can see the first layer?

After converting to nodes in order to render using Cycles I've no idea where to enable the z-transparency. I guess the image textures alpha channel needs to be pluged somewhere but I've no idea which node would be suitable.   The question is how could I correctly setup the nodes to have the same effect as when using z-transparency in BI?      The materials original settings for BI are:    Which renders like:    I had no luck with DarenWs suggestion:


I want to be able to build URL query strings by just adding the key and value to some helper class and have it return this as a URL query. I know this can be done, like so:  var queryBuilder= HttpUtility.ParseQueryString("http://baseurl.com/?"); queryBuilder.Add("Key", "Value"); string url =  queryBuilder.ToString();   Which is exactly the behaviour I'm after. However, this class exists in the famously large System.Web and I'd rather not bring that whole library in for this. Is there an alternative somewhere?

I would like to parse a string such as p1=6&p2=7&p3=8 into a NameValueCollection.  What is the most elegant way of doing this when you don't have access to the Page.Request object?


I have a shapefile, imported in PostgreSQL using PostGIS when this shapefile is published in GeoServer it didn't show any layer.   I had used EPSG:4326..

I was wondering if there is such a thing as an shapefile PRJ to PostGIS SRID lookup table?  Something that can translate the most standard shapefile PRJ definitions into the likely SRID.  When using PostGIS and pgAdminIII, if you use the postgisgui to import your shapefiles, the SRID is left as "-1".  It seems like the tool should be able to parse the Esri PRJ and determine the correct (or at least a couple of options) that are the likely SRID, rather than just leave the default.  Or does the importer have the capability to reproject on the fly if you choose another SRID?  It may seem lazy on my part, but to me it seems curious that this function hasn't already been put in place.  Does anyone know if this concept is in the works, or good reason's why it has been left out?


I am inserting posts programmatically using wp_insert_post. A typical call would look like this:  $news_item = array (     'post_title' => $titleField,     'post_content' => $retrieve_result['content'],     'post_status' => 'pending',     'post_author' => $user->ID,     'post_type' => 'post',     'post_date_gmt' => $post_date_gmt );  $post_id =  wp_insert_post( $news_item );   My question is about the parameter post_date_gmt, is this a correct use? Should I use post_date instead? What value is displayed on the screen? I need explanation of both. Documentation does not offer much.  Thanks.

Why do we have 2 date fields in the wp_posts? What's the purpose of the post_date_gmt? When does storing the greenwich time get handy?


Anyone remember the story about the re-discovery of manual arithmetic enabling unmanned robot planes to be re-manned?  I believe it was a short story published in Astounding.

short story - possibly called "Arms Race" - about rediscovery of manual arithmetic.   The hero rediscovers manual calculation - e.g., how to do long division with pencil and paper - in a world where everyone has ben using calculators for aeons. Brought before the president to demonstrate this, the great line in the story is the president, after using his calculator to check the hero's answer, says, "My God -- he's right." A great national project to exploit this advance over the enemy is obviously necessary...


Let $X$  be a topological space. For any $A \subseteq X$, consider two possible conditions on $A$:  1) $A$ is open in $X$;  2) $A \cap K$ is open in $K$, for each compact set $K \subseteq X$.   Then $(1)$ implies $(2)$. but, necessarily $(2)$ doesn't imply $(1)$. Give an example of $A$ such that $A$ satisfies in $(2)$ but $A$ is not open in $X$.

Let $X$ denote a topological space. For any $A \subseteq X$, consider two possible conditions on $A$.   $A$ is closed $A \cap K$ is closed, for all compact $K \subseteq X$.   If $X$ is Hausdorff, then clearly (1) implies (2). If $X$ is metrizable, then the converse holds; see .     Questions.         What are some Hausdorff topological spaces in which (2) does not   imply (1)?   For Hausdorff topological spaces: what weaker conditions than metrizability are known to imply that (2) implies (1)? Are there any interesting characterizations of those Hausdorff spaces in which (2) implies (1)?


I’m talking about widely held beliefs that are perceived to be rooted in science or what is falsely believed to be rooted in science, but are perhaps overgeneralized or taken out of context to the point they are pseudoscientific.   Things like:  Birds/rabbits will reject their young if they smell that a human touched them.   The human body isn’t designed to drink cow’s milk and it’s bad for you   “Chinese restaurant syndrome” due to MSG  Boiling water in the microwave is somehow worse or more dangerous than using a kettle.   Gluten is bad for you, widespread belief in gluten sensitivity   Cellphones can cause cancer due to radiation they emit.   Swimming right after you eat can be dangerous   Any amount of chocolate or grapes/raisins are ‘poisonous’ to dogs

It isn't any of the words on this  and I believe it started with the letter 'e' (though please offer your word even if it doesn't).  Example sentence: Because he researched what he had heard from his friends, he was able to refute many of their _________________.  Factoid seems to be the closest one, but the word I am looking for only refers to a belief that is false.


Hello, I tried to use SAGA (Ordinary Kriging) via SEXTANTE in QGis. The Sextante log tells me the following problem. Does anyone have a solution for my problem? By the way I'm usually a SAGA user but I wanted to change to QGis.   Grid: [not set] Variance: [not set] Points: HERBST_Nuptake_Fert120 Attribute: NUPTAKE Create Variance Grid: yes Target Grid: user defined Variogram Model: Spherical Model Block Kriging: yes Block Size: 100.000000 Logarithmic Transformation: yes Nugget: 0.000000 Sill: 10.000000 Range: 100.000000 Linear Regression: 1.000000 Exponential Regression: 0.100000 Power Function - A: 1.000000 Power Function - B: 0.500000 Maximum Search Radius (map units): 1000.000000 Min./Max. Number of m_Points: [4.000000] - [20.000000]  error: executing module [Ordinary Kriging]  C:\Programme\Quantum GIS Lisboa>saga_cmd io_gdal 1 -GRIDS "C:\Dokumente und Einstellungen\user\sextante\tempdata\test.tif.sgrd" -FORMAT 1 -TYPE 0 -FILE "C:\Dokumente und Einstellungen\user\sextante\tempdata\test.tif"    ##   #####  ###  ##  # ## ##  #### #  ##### ##    #  #   ##  ##### #    library path:   D:\Programme\SAGA_Beta\saga_208\modules library name:   io_gdal module name :   GDAL: Export Raster author      :   O.Conrad (c) 2007    go...  Load grid: C:\Dokumente und Einstellungen\user\sextante\tempdata\test.tif.sgrd...  failed  error: Grid file could not be opened.

I'm trying to learn how to apply the kriging analysis in QGIS using the SEXTANTE plug-in and SAGA tools.  It appears that I have my SEXTANTE and SAGA folders configured properly according to the user guide.  I've never used a kriging function before and I can't find a good resource from SAGA explaining the different input parameters.  Does anyone have experience using the ordinary kriging tool in SAGA that can provide advice or a reference?  I'm currently getting the following error message in QGIS:    An error has occured while executing Python code:  Traceback (most recent call last):    File "C:/Documents and Settings/PS/.qgis/python/plugins\sextante\gui\ParametersDialog.py", line 137, in accept if self.setParamValues():    File "C:/Documents and Settings/PS/.qgis/python/plugins\sextante\gui\ParametersDialog.py", line 91, in setParamValue if not self.setParamValue(param, self.paramTable.valueItems[param.name]):    File "C:/Documents and Settings/PS/.qgis/python/plugins\sextante\gui\ParametersDialog.py", line 129, in setParamValue return param.setValue(widget.getValue())    File "C:/Documents and Settings/PS/.qgis/python/plugins\sextante\parameters\ParameterExtent.py", line 11, in setValue if value is None: NameError: global name 'value' is not defined


Of course if the search is via GET it's easy to bookmark, but what if the search is via POST ? Can I bookmark it so I don't need to type in the search paramaters?

I would like to save as a Firefox bookmark a page which is not accessible using GET. The only way to retrieve the page is to send some POST data.  For example, I would like to bookmark a , which only allows POST for entering parcel numbers.  Does anyone know a Firefox extension, or some other technique, which would allow me to do this?


How did R-square get its name? I understand how its calculated and interpreted, but I do not understand the r and square part of it.

I sometimes encounter symbols in statistics whose symbol carries a "squared". In other areas, like for example mechanics, you give the quantity you are interested in a normal letter and then define your formulas so that you can rearrange them until the quantity you are interested in stands as a normal letter at the left-hand side of the formula. An example is the position $x$ after moving for a time $t$ and a velocity $v$:  $$x = vt$$  However in statistics, sometimes squared quantities are on the left-hand side, because that's what's used for further interpretation of results:   The variance $\sigma^2_X$ of a random variable $X$ with expectation value $E[X]=µ$:  $$\sigma^2_X = E[(X-µ)^2] $$  Here, a squared entity stands on the left-hand side of the formula. The Coefficient of determination $R^2$, which is even only called "R squared" all  the time  by statisticians. Why do you not give him a "normal" letter if it's  used so often? The heritability is a measure which is employed in genetics when the amount of variation which comes from the environment vs. the amount of variation which comes from genetics shall be put in a ratio. A quantitative trait $P$ (e.g. growth height) is modelled like this in dependence of genotype effect $G$ and environment effect $E$ (all random variables):  $$P = G + E$$  Broad-sense Heritability $H^2$ is defined $H^2 = \operatorname{Var}(G)/\operatorname{Var}(P)$   No-one is ever interested in $H$, only $H^2$.   What is the sense of this convention? What does it tell to statisticians? Or are there several unrelated causes?


I have noticed lately since I have been reviewing more regularly on Stackoverflow, that there are a lot of people who don't properly review posts. A lot of people simply click "Approve" just to move along when the edit may be false.  Recently, I answered a question which was edited by an anonymous user (which I think should not be allowed). He made an addition and basically said my answer was crap. I don't mind if someone thinks my answer isn't correct or could be improved, but I don't see how anonymous user can even be allowed to edit, never mind write something like that. I looked at the review stats and was glad to find the majority of people declined it, however 1 users for some odd reason approved it.  So I have 2 suggestions:   Anonymous users should not be allowed to edit a post. Either increase the rep needed to review suggested edits or set a small time limit before any actions can be take on the edit, so people actually read the changes that have been made, rather than taking the first action that they see.   Update:  If removing anonymous edits is a bit too much, then why not add recaptcha to them? It might prevent some of the spam edits.

A worryingly high number of bad suggested edits get accepted. For example:             (These are just examples of a few common patterns. The  exists too.)  What can we do to educate reviewers to do a better job?  This is an open question, not a feature request, because I don't have a good answer. Some possibilities:   Provide a way to notify the reviewers (“hey, check that proposed tag wikis aren't plagiarised”). Make the workflow for approval as long as the workflow for rejection, so that people don't blindly approve just because it's less work. (I don't know if some reviewers tend to do that.)


I have made this linear regression model:  mtcars_lm <- lm(mpg ~ drat + hp, mtcars)   Using the effects package, I can predict values of mpg for every value of hp between 70 and 150, plus get a confidence interval for each value of mpg:  library(effects) as.data.frame(effect("hp", mtcars_lm, xlevels = list(hp=seq(70, 150, 10))))     hp      fit        se    lower    upper 1  70 24.06201 0.9066002 22.20781 25.91622 2  80 23.54415 0.8355302 21.83530 25.25300 3  90 23.02628 0.7691351 21.45322 24.59934 4 100 22.50841 0.7087300 21.05890 23.95793 5 110 21.99055 0.6559716 20.64894 23.33216 6 120 21.47268 0.6128381 20.21929 22.72608 7 130 20.95481 0.5814753 19.76556 22.14407 8 140 20.43695 0.5638509 19.28374 21.59015 9 150 19.91908 0.5612604 18.77118 21.06699   And I can plot the result:  plot(effect("hp", mtcars_lm, xlevels = list(hp=seq(70, 150, 10))))     My question is: what is the maths behind the calculation of the standard error and confidence interval for every value of mpg?

Let's take the following example:  set.seed(342) x1 <- runif(100) x2 <- runif(100) y <- x1+x2 + 2*x1*x2 + rnorm(100) fit <- lm(y~x1*x2)   This creates a model of y based on x1 and x2, using a OLS regression.  If we wish to predict y for a given x_vec we could simply use the formula we get from the summary(fit).  However, what if we want to predict the lower and upper predictions of y? (for a given confidence level).  How then would we build the formula?


I have taken some photos of my paintings so I would like to make a catalog of them.  Edited.  It is for both, digital and printing distribution.  I'd want to promote my art by making a catalog of them.  I never used some application for design but I want to get started with one.  Thanks for helping!

There is some open-source software, similar to Adobe InDesign? It would be awesome if it do exist...  I know all the others like Inkscape, Gimp, etc... but for InDesign i have none.  Could you give me one direction?


I have several HTML input fields on a page. I would like to update the page based on what value is in the label. If the user types in the field and the value changes, I would like the page to change accordingly, without the user having to click some sort of "calculate" or "submit" button.   Is AJAX required here? Or is there a way to do this purely using some DOM manipulation + javascript state changes?

In my experience, input type="text" onchange event usually occurs only after you leave (blur) the control.  Is there a way to force browser to trigger onchange every time textfield content changes? If not, what is the most elegant way to track this “manually”?  Using onkey* events is not reliable, since you can right-click the field and choose Paste, and this will change the field without any keyboard input.  Is setTimeout the only way?.. Ugly :-)


Suppose there exist a surjection from set A to set B and there also exist a surjection from set B to set A . Does that imply there should exist a bijection from set A to set B?

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


Amy: You look human.      Doctor: No, you look time lord.  We came first.      (from Series 5, episode 2, The Beast Below   Is there an in-universe explanation for why time lords and humans look exactly the same?

Whenever someone asks The Doctor, "But, you look human?", he replies, "You look Gallifreyan."  Has this ever been mentioned in the canon why this resemblance between two different races exist? Do they share the same origin or, is the human race an accidental by-product of an ancient cloning experiment, or something?


Show that if $(a_k)_{k \in \mathbb{N}}, (b_k)_{k \in \mathbb{N}}$ are bounded, then $\lim \sup(a_k + b_k) \leq \lim \sup(a_k)+\lim \sup (b_k)$  I'm not quite sure how to prove this.  I want to try this comparing cases.  Assume that $a_k \geq 0 \forall k \in \mathbb{N}, b_k \geq 0 \forall k \in \mathbb{N}$  $\Rightarrow \sup (\bigcup_{i=k}^\infty \{a_k + b_k \}) = \sup (\bigcup_{i=k}^\infty \{a_k \}) + \sup (\bigcup_{i=k}^\infty \{a_k \})$   The same is true if both sequences are negative for all k.  If one of the sequences is negative for all indices and the other is positive, then the inequality would be real.  Would that be sufficient for a proof, or does the fact that e.g. all terms are positive in both sequences not imply the equality of the sup terms?

I am stuck with the following problem.     Prove that $$\limsup_{n \to \infty} (a_n+b_n) \le \limsup_{n \to \infty} a_n + \limsup_{n \to \infty} b_n$$   I was thinking of using the triangle inequality saying $$|a_n + b_n| \le |a_n| + |b_n|$$ but the problem is not about absolute values of the sequence.  Intuitively it's clear that this is true because $a_n$ and $b_n$ can "reduce each others magnitude" if they have opposite signs, but I cannot express that algebraically...  Can someone help me out ?


I would like to make Google ignore a div containing functional buttons and action titles, which I've seem come up in search engine results.  Now I know about <!-- googleoff: index --> tags, however, I can't use them because all pages are compressed (comments, whitespaces removed) before they're output.  Is there any alternative? Perhaps there is a Microdata solution to show that the div does not contain information about an entity (product in this case, button are "Add to Cart", etc.).

What approach should I take to make the website Google-friendly, .  The problem is that when a specific content is being requested (eg. ) user is taken to the page using scrollbar, though the surrounding content is still being loaded. How to tell Google that for this URL  only the #36 entry should be crawled.  Is there a tag or other way to select the surrounding content as irrelevant for the URL?


How do I add codecs for  MP3 url streams ? I am running ubuntu 12.04 with the standard firefox from 12.04

I just installed Ubuntu desktop 13.04 in my computer, dual boot with windows 7.  How to install mp3 plugin? Because I want to listen to music and watch movie, but the player requires plugin? How to solve this problem?


I compile everything correctly. It is shown a document as I wanted it.  But then, on the bottom of the page, it is written: errors: 0, warnings: 0, bad boxes: 31. What are those Bad Boxes?? That appearance hits my nerve because of a word bad, and I see nothing bad in my document, it compiled correctly, what can be bad?? Are bad boxes something I should worry about?? Is it possible to somehow reduce their number or even to erase them??  Please, help.

Often, TeX outputs underfull hbox and vbox warnings when running and in the generated log file. What are these and how can I get rid of them?


I know that $|\mathbb{R}| = 2^{|\mathbb{N}|}$, but is there a set $S$ such that $|\mathbb{N}| = 2^{|S|}$?

I don't even know where to begin on this one.  Let $A$ be a countable set. In other words, $|A| = |\mathbb{N}|$. I'm trying to prove that there doesn't exist an $x$ such that $\mathcal{P}x = A$.   Maybe a proof by contradiction? Suppose there was a set $x$ whose power set was countable ...


i've made a little fire animation using the particle system that i'm happy with, but i'm really struggling to output it correctly as a 4second .Mov with alpha/transparency enabled so i can import it into another NLE.  I'm making sure that i'm using a codec with RGBA enabled (I've tried them all now) in a Quicktime container.   Whatever I do, the fire looks fine...but the background stays black/non-transparent.  I then discovered the film/transparent checkbox in the render tab. This fixes the transparency, but now all the Orange colour/glow has gone from the fire, & i'm left with something that looks like grey smoke (see screen grab)  I'm new to Blender, but if someone could talk me through what I need to check/uncheck to make this render correctly, I'd very much appreciate it.  Thanks

I'm creating a simple fireball sprite for my game and I want to render a fire animation.  I would like to get the upper images with transparent background, but when is set the transparency on under Render -> Film one of my frames will look like lower pictures.  You can see the difference of these two images.


I calculated my inductance value and current rating but I can't decide which inductance I have use. for example 10uH, max 800mA my inductance values but there is other variables.in this topic I have some questions .What type of inductance should be? Multilayer,Wirewound or Molded.what Material - Core of inductance shoul be?Ferrite or Powdered Iron? how can i choose inductance? for example i want to use step down or step up converter or LC filter? what kind of situtaion i should think? If anyone has information about this topic i will glad. By the way i am so sorry for my english.

What is the idea of choosing inductor & capacitor value for buck DCDC convertors (no specific part number, in general)?  I've tried random one with low resistance, and it kinda works, but want to know idea behind calculation of optimal value (based on freq, and max current).


I framed a new question just now. What is the Remainder when the number $20^{20}$ is divided by $2020$  My try:  $$\frac{20^{20}}{2020}=\frac{20^{19}}{101}$$  Now Consider: $$20^{18}=(400)^9=(404-4)^9=101k-2^{18}$$  Now i was trying to find Remainder without calculator or by manual division.

How do I efficiently compute $a^b\bmod c$:  When $b$ is huge, for instance $5^{844325}\bmod 21$? When $b$ is less than $c$ but it would still be a lot of work to multiply $a$ by itself $b$ times, for instance $5^{69}\bmod 101$? When $(a,c)\ne1$, for instance $6^{103}\bmod 14$?  Are there any other tricks for evaluating exponents in modular arithmetic?  This is being asked in an effort to cut down on duplicates, see  and .


For some java homework we were told to create a program that makes collages, with one of the methods being that the one of the "fragments"(images) of the collage will be scaled by width and height. The pre-written class "fragment" already has a method to scale the image:  public void scaleFragment(int newWidth, int newHeight) {     width = newWidth;     height = newHeight; }   So in the main class I call up this method by doing this:  public void makeTiles(int tileWidth, int tileHeight) {   for (Fragment sm:collage){     Fragment.scaleFragment(tileWidth, tileHeight);   } }   When I try to run this however, I come up with this error: "non-static method scaleFragment (int,int) cannot be referencd from a static context"  After reading up on this website I found that you needed to crate an instance of the class?so I did this:   Fragment fragment = new Fragment();   for (Fragment sm:collage){     Fragment.scaleFragment(tileWidth, tileHeight);   }   This however comes up with the error "constuctor error in class fragment cannot be applied to given types"  The main class has declaces the arraylist collage like this:    Fragment fragment = new Fragment();   for (Fragment sm:collage){     Fragment.scaleFragment(tileWidth, tileHeight);   }   can anyone help me solve this problem? Thanks in advance.

The very common beginner mistake is when you try to use a class property "statically" without making an instance of that class. It leaves you with the mentioned error message:     You can either make the non static method static or make an instance of that class to use its properties.   Why? I am not asking for solutions. I would be grateful to know what is the reason behind it. The very core reason!  private java.util.List<String> someMethod(){     /* Some Code */     return someList;             }  public static void main(String[] strArgs){                // The following statement causes the error. You know why..     java.util.List<String> someList = someMethod();          }


I am trying to program a $n$-body problem simulation. To calculate the position and velocity after a time-step I want to split it in multiple 2 body problems. Now I am stuck, trying to find the velocity and position of two bodies (ignoring all the others) after one time-step with given mass, start position and velocity.  I am able to calculate the force between the two, but I am unable to solve the differential equation $$ \ddot{\vec{r_{12}}(t)} = G M \frac{\vec{r_{12}(t)}}{|\vec{r_{12}(t)}|^3} \\ M := m_1 + m_2 \\ \vec{r_{12}(t)} := \vec{r_1}(t) - \vec{r_2}(t) $$  to calculate the position relative to each other. What is $\vec{r}(t)$ and how can I calculate it? And is there another and maybe faster way to get the positions and velocities?  Edit: As @Sofia pointed out, this was not clear: $\vec{r_1}$ and $\vec{r_2}$ are the location vectors of the two masses.

Two particles with initial positions and velocities $r_1,v_1$ and $r_2,v_2$ are interacting by the inverse square law (with G=1), so that  $$ {d^2r_1\over dt^2} = - { m_2(r_1-r_2)\over |r_1-r_2|^3} $$ $$ {d^2r_2\over dt^2} = - { m_1(r_2-r_1)\over |r_1-r_2|^3} $$  (the inverse square law along the line of separation). What is the complete solution of these differential equations? What is the position of the two objects as a function of time?  After reading a lot on Wikipedia, I've come to the definition of center of mass and relative coordinates:   $$R(t) ~=~ \frac{m_1 r_1 + m_2 r_2}{m_1+m_2}$$  $$\ddot{r}(t) r(t)^2 ~=~ (m_1+m_2)G$$  Where $R$ is the center of mass, and $r$ is the displacement between the particles... Is this correct? How do I proceed to solve the differential equation?


Let $U$ be a $n\times n$ matrix with complex entries satisfy $$ U^*U=I $$ where the star denotes the conjugate transpose. Can we then deduce that $$ UU^*=I $$ ?

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


I'm installing GTA V right now, can I close the launcher and resume later? The launcher keeps asking me if I close all downloads will be canceled.

I am downloading Fortnite; I want to exit the launcher, but I dont want to lose the progress on my download. If I exit the launcher, will the download fail? Currently, it is paused. Is it possible for me to shutdown my PC and then resume the download later?


Can it truly be called a stable state? Fire is stable while it has fuel but isn't it really just a transition point for solid to gas?

A friend stated that stars are hot balls of gas, however we know that technically stars are plasma. Is his statement entirely incorrect? Can a plasma be considered a form of gas or should be referred to as a distinct form of matter?


Okay so I made a model for a friend to teach them how to use blender but the textures aren't appearing as their model is hot pink/blank. I sent the model and textured files inside a zip file but it's still not working. Does anyone know how to fix this?  I'm still learning myself but any and all advice would be greatly appreciated and due to copyright reasons I cannot upload the model.

When you are using a reference picture in blender, do you have to keep it? Do the pictures have to stay in your computer? I sometimes delete my reference images, because I'm on my mother's computer and any file I download has to go away. When opening my blender file the pictures are gone. How can I get my reference images to stay in my blender file even if the original file is deleted?


$$i^3=iii=\sqrt{-1}\sqrt{-1}\sqrt{-1}=\sqrt{(-1)(-1)(-1)}=\sqrt{-1}=i $$  Please take a look at the equation above. What am I doing wrong to understand $i^3 = i$, not $-i$?

I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &= i \\\\\ \frac1{\sqrt{-1}} &= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &= \frac1i \\\\  \sqrt{\frac1{-1}} &= \frac1i \\\\  \sqrt{\frac{-1}1} &= \frac1i \\\\  \sqrt{-1} &= \frac1i \\\\  i &= \frac1i \\\\  i^2 &= 1 \\\\  -1 &= 1 \quad !!? \end{align}


We have fully refundable "Top Executive" tickets but they are refusing to give refunds. Only credit vouchers. Unacceptable. Has anyone been successful in getting refund rather than a voucher which has very limited date for when it can be used.  What recourse is there?

My international conference in Europe this May has been canceled due to the COVID-19. I have a ticket, purchased from TAP air Portugal, from Toronto, Canada to Lisbon. Because it is a non-refundable fare, they don't want to give a refund.  They won't allow me to reschedule later than May 31 of this year. This won't be useful for me.  What options do I have? I'd prefer to get a full refund.  (I am a US citizen if it matters)  Note: They offered to refund just the taxes, which is about 10% of the value. That's not horrible, but I'd rather have the whole thing returned.


I have noticed something and i am quite confused about. There were questions that were asked about two years ago and got upvotes but if such type of questions are asked now, they get lots of down votes. For Example, i say a question that was asked two years ago. The question was      What is the syntax for a for-loop in SQL?   This question got 10 upvotes but the day someone recently asked      What is the syntax for SELECT statement in SQL?   The question got about 10 downvotes.  Why is this happening?

When reviewing whether or not to reopen a question, I came across .  What surprised me is that, IMO, if someone asked that today, they would be all but crucified (endless downvotes, and most likely closed within minutes).    It's not like the post has a few upvotes and downvotes; it has 21 upvotes and 0 downvotes.  So, are all questions equal, but some are more equal than others?  Or were the rules just different in 2010?    I don't really think that it just slipped through the cracks, because there are 0 downvotes...


I trying to load the driver for the Lexmark printer which was downloaded form their site. I get to a point where Ubuntu 12.04 asks for the root administrator password. I don't recall putting one in upon installation. If I did how can I retrieve it again? BUT if I didn't then what would it be?

I installed  (Precise Pangolin), 64 bit. Nowhere was I asked to set password for root.  I just installed  software. It was installed under the /root folder by default. Now I try do something on that folder. I tried with su to switch to root, but I don't know its password.   Should I always use sudo or get the default root password, if any?  How do I create a  for software installed inside the /root directory?


Could you please help me to adjust the file upload function in this form.  I don't know any of PHP or how to work with DB, however thanks to some of the tutorials I found on the net, managed to make my form half-working. For now all the info except file uploading are working and being recorded to DB.  HTML:  <input id="firstname" type="text" placeholder="First name *" name="firstname" required> <input id="lastname" type="text" placeholder="Last name *" name="lastname" required> <input id="tel" type="tel" placeholder="Telephone nr *" name="tel" required> <input id="email" type="email" placeholder="Email *" name="email" required> <input id="file" type="file" name="file"> <input id="submit" type="submit" value="Submit">
Success!

Fail!
   PROCESSOR:  $connection = mysql_connect("localhost", "root", ""); // Establishing Connection with Server.. $db = mysql_select_db("reg", $connection);  // Selecting Database  // Fetching Values from URL  $first_name=$_POST['firstname']; $last_name=$_POST['lastname']; $tel=$_POST['tel']; $email=$_POST['email']; $file=$_POST['file'];  // Insert query $query = mysql_query("INSERT INTO vart(firstname, lastname, tel, email, file) values ('$first_name', '$last_name', '$tel', '$email', '$file')");  mysql_close($connection); // Connection Closed   .JS:  $(document).ready(function(){ $("#submit").click(function(){ var name = $("#firstname").val(); var lastName = $("#lastname").val(); var tel = $("#tel").val(); var email = $("#email").val(); var file = $("#file").val();  // Returns successful data submission message when the entered information is stored in database.  var dataString = 'firstname='+ name + '&lastname='+ lastName + '&tel='+ tel + '&email='+ email + '&file='+ file; if(name=='' || lastName=='' || tel=='' || email=='') { document.getElementById("no").style.display ='block'; document.getElementById("yes").style.display ='none'; } else { // AJAX Code To Submit Form. $.ajax({ type: "POST", url: "process.php", data: dataString, cache: false, success: function(result){ document.getElementById("yes").style.display ='block'; document.getElementById("no").style.display ='none'; } }); } return false; }); });   Somehow foggy I understand that my form lacking some of these attributes:  enctype="multipart/form-data" $_FILES['file']['name']

I would like to upload a file asynchronously with jQuery.     $(document).ready(function () {     $("#uploadbutton").click(function () {         var filename = $("#file").val();          $.ajax({             type: "POST",             url: "addFile.do",             enctype: 'multipart/form-data',             data: {                 file: filename             },             success: function () {                 alert("Data Uploaded: ");             }         });     }); });  File <input type="file" id="file" name="file" size="10"/> <input id="uploadbutton" type="button" value="Upload"/>     Instead of the file being uploaded, I am only getting the filename. What can I do to fix this problem?


I powerwashed my device, so that it would be 'brand new,' but now I don't have sudo access. I am using a Toshiba Chromebook 1, which is a linux device. What is the default root password?

I just powerwashed (that's a factory reset on chromebooks) my computer so that it would be be 'brand new,' however now I don't have sudo access anymore. I used to not need a password to use sudo, however now a password is required and I have no idea what it is. I tried my login password, however that didn't work. Any advice?


Solve the integral $I$ = $\int_0^{\infty} \frac{\sin x}{x} dx$

Confirm that $\int_{0}^{\infty}t^{-1}\sin t dt=\pi/2$.  The guide book I am using gives the following help:  Consider $\int_{\gamma}z^{-1}e^{iz}dz$, where for $0<s<r<\infty$ the contour of integration is described by $\gamma=[s,r]+\gamma_r+[-r,-s]-\gamma_s$, with $\gamma_r(t)=re^{it}$ and $\gamma_s(t)=se^{it}$ on $[0,\pi]$. Recall Exercise IV$.4.20.$  Exercise IV$.4.20.$ For $r$ with $0<r<\infty$ let $I(r)=\int_{\gamma_r}z^{-1}e^{iz}dz$ with $\gamma_r(t)=re^{it}$ on $[0,\pi]$. Show that $I(r)\rightarrow 0$ as $r\rightarrow \infty$ and also that $I(r)\rightarrow \pi i$ as $r\rightarrow 0$  Using the hint, I know that $\int_{\gamma}z^{-1}e^{iz}dz=0$ for the Cauchy theorem, with which $\int_{[s,r]}z^{-1}e^{iz}dz+\int_{\gamma_r}z^{-1}e^{iz}dz+\int_{[-r,-s]}z^{-1}e^{iz}dz-\int_{\gamma_s}z^{-1}e^{iz}dz=0$, but I do not know what else to do here, could someone help me please? Thank you very much.


So I'm writing a book and I managed to put the chapter name on the even pages header and the section name on the odd pages header, and I also could make the chapter name lowercase and my problem now is with the section name, it is all upper case. As shown in the pictures. I want it also to be lowecase. Any solutions!!   Here's my preamble: \documentclass[12pt, twoside]{book}  \usepackage[ paperwidth=15cm, paperheight=22cm]{geometry}  \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \fancyhead[LE]{\leftmark} \fancyhead[RO]{\rightmark} \fancyhead[LO, RE]{\thepage}  \renewcommand{\chaptermark}[1]{% \markboth{\chaptername \ \thechapter.\ #1}{}}

In the following standard \documentclass{book} all headers are in upper case.   How can I modify the code below to make lower case headers?  The even pages show the chapter number and name, and the odd pages show the section number and name. The first page of a chapter has no header, only the page number in the footer. The other pages show the page numbers on the headers: odd pages on the right and even pages on the left, as shown.      It was created with  \documentclass{book} \usepackage{lipsum}  \begin{document}  \title{Standard \LaTeX{} Book} \author{The Author} \date{The Date} \maketitle \tableofcontents  \chapter{Test Chapter One} \section{Test Section One} \lipsum[1-6] \section{Test Section Two} \lipsum[1-6] \section{Test Section Three} \lipsum[1-6]  \chapter{Test Chapter Two} \section{Test Section One} \lipsum[1-6] \section{Test Section Two} \lipsum[1-6]  \end{document}   Remark: the question   is not sufficiently similar to this one to help me to find a possible solution by my own.


I am trying to run query in Magento 2 Db and getting the error:  Column 'product_id' in order clause is ambiguous,  The query is: SELECT `main_table`.* FROM `wishlist_item` AS `main_table`  INNER JOIN `cataloginventory_stock_status` AS `stockItem`    ON stockItem.product_id =  main_table.product_id AND stockItem.stock_status = 1  INNER JOIN `catalog_category_product_index_store1` AS `cat_index`    ON cat_index.product_id = main_table.product_id AND cat_index.category_id = '2'   AND cat_index.visibility IN (3, 2, 4)  WHERE (`wishlist_id` = '1') AND (`main_table`.`store_id` IN('1'))  ORDER BY find_in_set(product_id,'1,2,3'), name ASC  LIMIT 12  How to fix this?

Error '1052' Field is ambiguous. I understand the error that is happening, and I've looked at several places for the fix and then applied the inner join function in attempt to fix it. It's still not working, and it gives me the same error.  EventNo is a primary key in the eventrequest table and a foreign key in the Eventplan table. I'm trying to list the event number, event date, and count of the event plans while only including event requests in the result if the event request has more than one related event plan with a work date in December 2013. This is my code.  SELECT EventNo, DateAuth, COUNT(PlanNo) FROM eventplan INNER JOIN eventrequest ON eventplan.eventNo = Eventrequest.EventNo WHERE COUNT(PlanNo) > 1 BETWEEN '2013-12-01' AND '2013-12-31';


Before submitting my paper to one of ACM's conferences, I uploaded the earlier version of the paper on arXiv. The paper has now been accepted and published in ACM proceedings. I plan to update the arXiv version of the paper with the final version of the paper that has been published in ACM proceedings. I wanted to ask if:  1) Am I allowed to do this? 2) Do I have to make any changes to the format of the draft. i.e the paper contains a copyright block from ACM now.   When granting licence to ACM, I did NOT opt for open-access. Also the paper was published in 2018.

I'm a little confused. The  states:     ACM authors hold the right to post copies of their own peer-reviewed accepted ACM works on any non-commercial repository or aggregation that does not duplicate ACM tables of contents, i.e., whose patterns of links do not substantially duplicate an ACM-copyrighted volume or issue. Non-commercial repositories are here understood as repositories owned by non-profit organizations that do not charge a fee for accessing deposited articles and that do not sell advertising or otherwise profit from serving articles.   However, the  site states:     Can I publish the published version of my publication on arXiv?       No. An ACM author cannot grant arXiv.org or any other publisher rights to distribute their works that have been published by ACM.   SHERPA/Romeo shows ACM as being a "Green Publisher", which would support the case that I can upload to ArXiv.   states that I can upload pre- or postprints under certain circumstances, but does not explicitly mention Arxiv, positively or negatively.  So, what is it? Can I submit a paper I published with an ACM Conference (ACM WiSec, if that makes a difference) to ArXiv or not? As I understand it, ArXiv is a non-profit, so it would fit the terms of the publishing policy. Or is this related to the rights you have to grant ArXiv upon submission?  If I can only publish a specific version of the paper, which one?


How can I fix Malformed entry 51 in list file /etc/apt/sources.list (URI parse)

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


I've been running Ubuntu for some time. Last night I installed the updates that automatically download periodically and shut down. This morning the machine will only boot to the command prompt. I've tried all the "fixes" I can find on-line without success. The startx command brings up a message "API mismatch: the NVIDIA kernel module has version 304.88 but this NVIDIA driver component has version 173.14.35.".. How do I make sure both are the same? What else can I do to get this machine to boot the GUI again?

My laptop computer has a Nvidia video card and runs Ubuntu 12.04 LTS 64-bit. During an upgrade yesterday it seemed as a new Nvidia driver version 304 (if I remember correct) was installed. After upgrade and reboot, I opened the Additional Driver tool and found that the Nvidia driver version 304 was in use. So far so good.  However, the Additional Driver tool also reported that there existed a Nvidia driver version 319 and that this driver version was recommended. I then selected to change to this recommended driver, the driver was downloaded and installed, I rebooted the system and ended up with a black screen and a command shell.  How to change proprietary Nvidia video driver using the command line and revert back to the previous version that worked on my system?  (A second question: How can it be that a video driver that apparently does not work was recommended?)


I'm trying to make some loop cuts in the mesh I'm using to create a house in order to add interior walls to the house.  Every time I try to make a loop cut, it starts rotated across the faces of my mesh rather than straight across the mesh.  Is there any way to keep loop cuts from doing this?

I was watching a tutorial video  and at the 18:00 mark he creates a loop cut, then appears to press 'S' (scale) and mashes a few other keys that aren't displayed and the loop cut suddenly becomes completely horizontal and no longer follows the contours of the mesh.  What is happening here and how can I accomplish this, or something similar?


Is it possible to give a wrapped function the arg and kwargs names of the function it is wrapping? I need to do this because decorators that are applied later use the arg names of the underlying function.  def wrapper(func):     def wrapped(<func args and kwargs names and values>):         return func(*args, **kwargs)   So if the func been passed in was foo(x,y=3), the returned wrapped function would have the signature wrapped(x, y=3) instead of the usual wrapped(*args, **kwargs).  --Edit--  Just found that this is a duplicate of  . Thanks for the answers anyway

Suppose I have written a decorator that does something very generic. For example, it might convert all arguments to a specific type, perform logging, implement memoization, etc.  Here is an example:  def args_as_ints(f):     def g(*args, **kwargs):         args = [int(x) for x in args]         kwargs = dict((k, int(v)) for k, v in kwargs.items())         return f(*args, **kwargs)     return g  @args_as_ints def funny_function(x, y, z=3):     """Computes x*y + 2*z"""     return x*y + 2*z  >>> funny_function("3", 4.0, z="5") 22   Everything well so far. There is one problem, however. The decorated function does not retain the documentation of the original function:  >>> help(funny_function) Help on function g in module __main__:  g(*args, **kwargs)   Fortunately, there is a workaround:  def args_as_ints(f):     def g(*args, **kwargs):         args = [int(x) for x in args]         kwargs = dict((k, int(v)) for k, v in kwargs.items())         return f(*args, **kwargs)     g.__name__ = f.__name__     g.__doc__ = f.__doc__     return g  @args_as_ints def funny_function(x, y, z=3):     """Computes x*y + 2*z"""     return x*y + 2*z   This time, the function name and documentation are correct:  >>> help(funny_function) Help on function funny_function in module __main__:  funny_function(*args, **kwargs)     Computes x*y + 2*z   But there is still a problem: the function signature is wrong. The information "*args, **kwargs" is next to useless.  What to do? I can think of two simple but flawed workarounds:  1 -- Include the correct signature in the docstring:  def funny_function(x, y, z=3):     """funny_function(x, y, z=3) -- computes x*y + 2*z"""     return x*y + 2*z   This is bad because of the duplication. The signature will still not be shown properly in automatically generated documentation. It's easy to update the function and forget about changing the docstring, or to make a typo. [And yes, I'm aware of the fact that the docstring already duplicates the function body. Please ignore this; funny_function is just a random example.]  2 -- Not use a decorator, or use a special-purpose decorator for every specific signature:  def funny_functions_decorator(f):     def g(x, y, z=3):         return f(int(x), int(y), z=int(z))     g.__name__ = f.__name__     g.__doc__ = f.__doc__     return g   This works fine for a set of functions that have identical signature, but it's useless in general. As I said in the beginning, I want to be able to use decorators entirely generically.  I'm looking for a solution that is fully general, and automatic.  So the question is: is there a way to edit the decorated function signature after it has been created?  Otherwise, can I write a decorator that extracts the function signature and uses that information instead of "*kwargs, **kwargs" when constructing the decorated function? How do I extract that information? How should I construct the decorated function -- with exec?  Any other approaches?


I have submitted my sitemap which contains web pages and images. 78 web pages and 59 images are submitted. The web pages are indexed (71 out of 78), but images are not indexed. Why does that happen. Should I do anything additional for the images to be indexed.  Screen shot of search console> sitemap attached :     Working on magento 2  sitemap url :

This is a general, community wiki  question and answer pair intended to address any questions   concerning the reasons a site or specific site contents do not appear   in search engine results.      If your question was closed as a duplicate of this question and you   feel that the information provided here does not provide a sufficient   answer, please open a discussion on .   My site (or specific pages on my site) is not appearing in search engine results.  Why isn't my content indexed and what can I do about it?


I've had a doubt about when I use if and whether. I saw an phrase using whether and now I'm thinking when really use it.  The phrase:   I don't know "whether" it was the burden of having to raise a large family, or his natural confidence in dealing with people, but my dad became an immediate success in his newfound profession.  Can I replace whether for if? However,  when I use whether?

Could someone please help me with these sentences? I need to know  Which one doesn’t sound natural? Which one is formal and which one is not?   A - I don’t know whether this word fits in the sentence. B - I don’t know if this word fits in the sentence.   C - I don’t know whether or not this word fits in the sentence. D - I don’t know if or not this word fits in the sentence.   E - I don’t know whether this word fits in the sentence or not. F - I don’t know if this word fits in the sentence or not.  For me only D doesn't work and sounds not idiomatic. Meanwhile for me all of these sentences can be used in both written and spoken languages. Do you confirm me?


Stack Overflow is currently doing a  to avoid use of moderator attention flags in the case where a standard flag would do. In that thread they say it's fine to use a mod attention flag if you want to clarify the reason you're flagging; for example, you might be flagging "not an answer", but want to explain why the answer isn't an answer. This use is also covered in .  However, whether or not a post is obviously not an answer is subjective, and you can end up in the weird case where you think a post isn't an answer, you use a mod flag to explain why, and it gets rejected because the post was too obviously not an answer to warrant that flag -- you should have used the standard flag instead.  My opinions on that practice aside, it seems like it could be avoided if it were possible to provide a description for the standard flags and not just mod attention flags:    Ideally the extra description would appear in the review queue.

I'm an elected diamond moderator on one site, and a user of several others. I think it would be extremely helpful for our flagging process if users had the option to enter freeform text explaining their flag on types of flags other than the "in need of moderator attention" flag.  An example of when this is relevant: Sometimes posts have had rude/abusive flags, but the rude/abusive part might be difficult to notice, or it might be a single word or sentence buried somewhere in the middle of the post. Users have to choose between "flag it as rude with no explanation" or "flag it as misc and explain what's going on". Often they'll pick the first because of course it seems like what they should do (e.g. they know the system has special handling attached to rude/abusive flags) but it means they can't explain what's going on to us, so we have to reach out directly in private to find out.  Sometimes it also helps to be able to explain why a comment is no longer needed, because past experience tells me the "no longer needed" flag on its own might be declined on a particular site -- so I pick the custom reason instead of "no longer needed" just so I can provide explanation.  I'd prefer users be able to understand they can pick the appropriate reason and be able to attach any explanation they deem necessary to further direct moderators to the issue. If not for all kinds of flags, then at least for spam or rude/abusive flags.


I have downloaded Ubuntu and put it to DVD and it boots on my laptop running xp but it will not let me install Ubuntu over the xp. What have I or am I doing wrong. Laptop is Sony Vaio 32 bit 1gig ram.

Ubuntu 12.04 won't come with the Windows Installer (Wubi) pre-added. But is there any way to install 12.04 using Wubi?


I am not able to login into apple developer forum every time it takes me to create a new user account page and the displays the error, I have successfully validated with multiple user name as below screen shot -  when i try to hit submit it gives me below error -  I have already reported it to apple using bug reporter with id 27240362  but there is no response from their side. I am hoping to get some help here.

Every time I attempt to log on to the apple developer forums it tells me I need to create a new user account (even though I already have one), and when I try to sign up it gives me an error:   Anyone else have this issue and/or know how to fix it? Thanks!


SubjectID       StudentName ----------      ------------- 1               Mary 1               John 1               Sam   SubjectID       StudentName ----------      ------------- 1               Mary, John, Sam   Hi, i'm using SQL Server 2014. I would like to know if it's possible to use the STUFF() function to insert the result into one column. The examples i see online are all retrieving. I tried to do it based on the documentation by it doesn't seems to be correct.   Query   @"INSERT INTO ApplicationOtherInfo                          (ApplicationId, AppOptionCode                          ) values                          (@applicationId, @appCode                          )";  SELECT STUFF((SELECT ',' + AppOptionCode               FROM ApplicationOtherInfo                ORDER BY AppOptionCode               FOR XML PATH('')), 1, 1, '')

How do I get:  id       Name       Value 1          A          4 1          B          8 2          C          9   to  id          Column 1          A:4, B:8 2          C:9


Dominos of size $2 × 1$ can be placed on a $m × n$ board so as to cover two squares exactly. Two players alternate placing dominos. The first one who is unable to place a domino is the loser.  I can show that if $n$ and $m$ are even, then player 2 can secure winning by replicating any movement from player 1 with respect to the center of the board. Moreover, I can show that if one is even and one is odd, then the roles reverse and player 1 can secure a win by blocking the center in the first move (if the board is $4×5$, he places his first domino covering (2,3),(3,3)) and then he replicates any move by player 2.  The question I face is: who wins when $m=1$? I have tried and showed that:   1 is L, 2 is W, 3 is W, 4 is W, 5 is L, 6 is W, 7 is W, 8 is W, 9 is L. Here W means a winning position: if when you are going to play there are 2 contiguous spaces on the board, you win (or 3,4,6,7,8,...). A partition of the board into two non-contiguous sets of size ($x,1$) is W if and only if $x$ is W. A partition of the board into two non-contiguous sets of size ($x,x$) is L for the second player can copy the moves of the first one. The partition ($x,2$) is W for any $x$ that is L.   I have the feeling that the losing positions are 1,5,9, and so on; in general you will lose if $n-1$ can be divided by 4. Can anybody prove it?

Consider a $1$ by $n$ tiled rectangle. You want to play a game with one opponent in which you place $1$ by $2$ "dominoes" on this rectangle. The player who places the last domino wins.  Which player can guarantee a win in the game and when (the one who goes first or the one who goes second)?  So far, I have determined that for $n$ is even, the player who goes first can guarantee a victory by implementing a mirror strategy. However, the player who goes first will not always win when $n$ is odd. Any ideas?


I know that inside a class, $this is used to refer to the current object and self is used to refer to the current class. For example:  class My_Class {      function start1() {         $var = self::hello();          echo $var;     }      function start2() {          $var = $this->hello();          echo $var;     }      function hello() {         return 'Hello';     } }  $obj = new My_Class; $obj->start1(); // Hello $obj->start2(); // Hello   In my example, both $this->hello() and self::hello() appear to do the exact same thing. Can anyone give an example of when I should use $this and when I should use self?

In PHP 5, what is the difference between using self and $this?  When is each appropriate?


At the start of Order of the Phoenix Harry loses his wand and is surrounded by total darkness.     The star-strewn indigo sky was suddenly pitch black and lightless - the stars, the moon, the misty street lamps at either end of the alley had vanished. The distant rumble of cars and the whisper of trees had gone. The balmy evening was suddenly piercingly, bitingly cold. They were surrounded by total, impenetrable, silent darkness, as though some giant hand had dropped a thick, icy mantle over the entire alleyway, blinding them.   (Order of the Phoenix, Chapter 1, Dudley Demented).   He searches around for the wand aimlessly in the dark. He has no idea where it is. Yet he is able to cast a spell.     ...he scrambled to his hands and kness, feeling around frantically in the blackness...   Harry muttered frantically, his hands flying over the ground like spiders. "Where's - wand - come on - lumos!"   He said the spell automatically, desperate for light to help him in his search - and to his disbelieving relief, light flared inches from his right hand - the wand-tip had ignited. Harry snatched it up, scrambled to his feet and turned around.   (Order of the Phoenix, Chapter 1, Dudley Demented).   Now we know that wizards are capable of doing magic spontaneously and without intending to do so, especially before they start at Hogwarts. This magic is clearly not in that category. Harry knew the spell he wanted to cast but wasn't holding his wand, wasn't exactly concentrating and spoke more out of hope than expectation. I've not come across another example of wands working at a distance (hands-free, if you like) before.  Is this example unique within the Harry Potter canon? Do we see anyone else using wands in this manner?    Edit. To clarify, I'm looking for examples where all the criteria below apply.   A witch/wizard uses a wand to do magic. They aren't touching said wand whilst performing the spell.   I am not asking in any way, shape or form about wandless magic.  I hope that clears things up!

I was wondering how come Harry was able to do Lumos without touching his wand in OotP. I remember that he tried to do magic without his wand before (or afterwards), and he couldn't.  Sorry if this is a repeat question. I couldn't find the answer anywhere.