I've found this  and clicked to flag it. When I was choosing which flag to apply, I've realized that the flag option "very low quality" was missing.    Since it is a question with a negative score, why can't I see this flag option?  (which type of flag this question should receive is not related with my question)     Additional notes:   The question does not have answers. The question is open, so it is not a race condition when the question is closed just after you click on it, like happened in this meta question:  This related meta question did not help me too:

Is the disputed flag handled any differently in the new triage review queue. I marked  as very low quality, after choosing unsalvageable and this was disputed. From what I have read, if a question is edited, this puts the flag in dispute, but this question was not edited. I have no complaint, I just want to understand what is going on, as the triage queue seems like a really good initiative, so I want to help as positively as I can.


What is the right SE site to ask this question of mine?    I asked this on Stack Overflow, but seeing that there has been no response (comment or answer) for more than 2 days, which is unusual in my experience with SE, I surmise that it might be because I've posted it on the wrong site.

There seems to be more than a few computer science/programming Stack Exchange networks (is that the correct term?). Stack Overflow, being the first, has by far the most users, questions, and answers.  What is the reasoning for creating the others, and are there clear guidelines for which kinds of questions should be posted? I can see a large amount of potential overflow, many cases of people not getting a good answer to their question, because the person who has the answer isn't browsing that particular network at the moment.  I understand that they were probably created for organizational purposes, but wouldn't it almost make more sense to just have them as categories under Stack Overflow, keep them separated but still connected, instead of making people have to create multiple 'account's, one for each network?  I am sure there was a very good reason to break them up, but as someone that is new to SE, it can be somewhat intimidating to decide which one to post in to ensure you get a good answer. For example, if I am a computer science student, my first instinct might to be to post in the computer science network, until I see that it literally has 1% of the users as the Stack Overflow network, which still seems to be for programming/computer science related questions.  So my second instinct would then to be to post it into the Stack Overflow site on the basis that I have a significantly higher chance of my question being seen and getting a good answer. Then I notice that there is also a 'programmers' network, and I don't even begin to know where that fits in. I, and I am assuming most people, will probably just post on Stack Overflow to be safe.  My question is, other than the short little description blurb of each one, is there a clear cut set of guidelines which what each network is intended for, what kinds of questions should go to each one, and is anything being done to encourage people to post in these newer, smaller (more specialized?) networks as opposed to just posting in big daddy Stack Overflow?  Now again, this is for computer science/programming/"why isn't this code doing what I want?" related questions, I am not saying that if I had a question about Linux or WordPress or something I would have the same confusion.


I need to find the number of pairs of integers (a,b) that satisfy the diophantine equation $a^3-117b^3 = 5$.  I know that I need to use modulo arithmetic somehow, I just don't know exactly how. I think it has something to do with $mod$ $9$, but to be honest I don't really know. Anything that could help me would be much appreciated.

Solve the equation $x^3 + 117y^3 = 5$ over the integers.   I have tried solving this. It is clear that one of $x$ or $y$ must be negative. $117$ seemed a strange number. So I found out that $117 = 125 - 8 = 5^3 - 2^3$. I don't know if this is useful but still I'm adding it. So the equation becomes:  $$x^3 + (5y)^3 - (2y)^3 = 5$$  I don't know how to proceed further. I need some hints. Any help would be appreciated.


I am newer to python. how do i form the single list to nested list using python. Any one please help me.  content = ['a', 29, 'male', 'cs', 'cs', 'b', 29, 'male', 'cs','cs']   into:  content = [['a', 29, 'male', 'cs', 'cs'],             ['b', 29, 'male', 'cs', 'cs']]

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I have a weird LyX problem: Bold not showing in the screenfonts in LyX! Does anybody know how to fix that?

This is a bit strange but LyX installed on my system which has now MacOS Mojave has stopped showing boldface letters. It was working perfectly on MacOS Sierra. Initially, I had LyX 2.3.0, I tried upgrading it to 2.3.1 but that didn't work either. I tried searching it on Google but found no relevant information. Does anyone have any idea of what's going on?


I am frustrated because this is literally exercise 3 from my textbook and I still can not get it. I already failed my first midterm. I am wondering why I am bad with discrete mathematics, but love calculus?  Anyway, how do I solve this? I have tried looking for the same problem but to no avail.  Please help thanks.

I just need to check the reasoning in my proof is correct, I think it is valid although I'm not totally convinced because I can't follow the logic; does proving that $x$ is an integer prove that $ac|bd$?  Theorem: Let $a$, $b$, $c$, $d$ be integers. If $a|b$ and $c|d$, then $ac|bd$.  Proof: $aj=b$ and $ck=d$ for integers $j$, $k$. Then, $ac|bd$ implies $acx=ajck$ and thus $x=jk$ for some $x$. Since the product $jk$ is an integer, $x$ is an integer and thus $acx=ajck$ and thus $ac|bd$.


It is clear for $p=3$ ($x=0$, $y=1$ and $x=0$, $y=-1$) .  Let  $x_0^2+3y_0^2=p$  , $\qquad $ $(x_0,y_0) \in \mathbb{Z^2}$ .   Reduction modulo 3 gives $$x_0^2 \equiv p  \pmod 3$$  it follows that $p \equiv 1\pmod 3$ .   Now I can use the fact that the class number of $\mathbb{Q[\sqrt-3}]$ is 1 , but I do not know how to make use of it .

Let $p$ be prime and $(\frac{-3}p)=1$, where $(\frac{-3}p)$ is Legendre symbol. Prove that $p$ is of the form $p=a^2+3b^2$.   My progress:  $(\frac{-3}p)=1 \Rightarrow$ $(\frac{-3}p)=(\frac{-1}p)(\frac{3}p)=(-1)^{\frac{p-1}2}(-1)^{\lfloor\frac{p+1}6\rfloor}=1 \Rightarrow$ $\frac{p-1}2+\lfloor\frac{p+1}6\rfloor=2k$  I'm stuck here. This is probably not the way to prove that.  Also tried this way:  $(\frac{-3}p)=1$, thus $-3\equiv x^2\pmod{p} \Rightarrow$ $p|x^2+3 \Rightarrow$ $x^2+3=p\cdot k$ stuck here too.  Any help would be appreciated.


On my website (hobby project, not commercial) I have to manage around 8 different translations, that are provided by volunteers. I manage these translations in Google Sheets. These sheets are saved as CSV and read out by PHP whenever it encounters a string in need of translation. So far, it works flawless! :D [ me happy ]  To update these sheets, I have written a PHP routine that collects all the strings-to-be-translated and puts them in a CSV. I then import this CSV into Google Sheets again.  This works beautifully, except for a couple of characters per language. For example, in portuguese, the 'à' displays as the notorious lozenge-with-a-question-mark symbol,     Also chinese goes fine(!), except for one character:     I know there are many questions and answers on this subject here at Stackoverflow. After reading these questions, I discovered that my files were intitially written out as "Western MAC OS encoding". Now I added some BOM characters, and indeed, TextWrangler recognizes it as 'UTF 8', but warns me that the file is corrupt. Indeed, the suspicious characters also don't display well in TextWrangler either.  I also see references to a function called 'iconv', but that doesn't seem to have no influence.  I have the feeling I mis a crucial step. Would you people mind having a look at a piece of code and help me futher?         // Write the translations to a CSV file    $fp = fopen("languages/gsheet_$language.csv", 'w');   fwrite($f, pack("CCC",0xef,0xbb,0xbf));       write_csv($fp, array('key','translation','notes'));    foreach($rows as $cols){     array_walk($cols, "convert");     write_csv($fp,$cols);   }   fclose($fp);      }   function write_csv($fp,$row){   foreach($row as $key => $value){     $row[$key] = "\"$value\"";   }   fwrite($fp,implode(",",$row));   fwrite($fp,"\n"); }   The post  is very informative, but has a strong focus on the database. However, I found the origin of the problem to be in the fgetcsv function:

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I have a lot of images which have white borders around them. I would like to crop those borders all at once, preferably from command line. I believe that it can be done with ImageMagick, but I couldn't find suitable command.  I know that it can be done with Windows program named Irfanview with "Auto crop borders" option, but I am looking for Ubuntu-based and preferably command line based solution.

I need to crop images often - photos, printscreens, etc., and loading gimp for such a simple task takes way too long. Can you recommend a faster alternative?


I want to set up my PC with a new Windows 10 installation and have a couple of standard accounts and an admin account. I would like to install my programs (not Windows Store apps, which I don't use) so that they can be used from any account. I could install separate copies of each program on each account but that duplication of space is what I want to avoid. I want to end up with the situation where I nearly always use my PC from a standard account for security and have the ability to run most applications from that account, the other standard account and the admin account. Some examples of the applications I mean are LibreOffice, any browser, a VPN client, Visual Studio, EverNote, Ccleaner, WhatsApp desktop. But also whatever programs I install in future, in general. I know questions like this have been asked before but I haven't found a solution yet.

I have several accounts on my home PC. I want to install a program for all user accounts, not just the one I used to perform the installation. How do I go about doing this?  I installed a program from an admin account, but it doesn't show up in the other local accounts.  I was not able to find any documentation on how to do this.  I have Windows 8.1, if that matters.


I cannot navigate on desktop files by keyboard arrows in Ubuntu 20.04.

In Ubuntu 20.04, on the desktop, there is a number of actions I wish I could do, such as, by order of importance :  use keyboard shortcuts such as select all, copy / paste. use drag & drop with icons deactivate the "mouse over" highlight, and restrict the clicking area to only the icon, not the surrounding square  To put it simply, I'd like to have the exact same features as offered by the desktop of Ubuntu 18.04 (probably related to a specific version of GNOME, and not Ubuntu itself). Am I missing something obvious here? I actually see no reason why those actions are removed or deactivated on the desktop, since they all work in any Nautilus window.


I am trying to write some bash script to replace a command I quite often use. Here is the code from my file test.sh  #!/bin/bash echo -e "\n"  i=0 args[i++]=$0 for arg in $@ ; do   args[i++]=$arg done  where="." what="-type f" gcase= str=  while getopts "d:f:F:ih" opt ; do   case $opt in     h)       echo -e "This is the help of this search function."       echo -e "\t $0 [-d <dir>] [-f|-F <pattern>] [-i] string"       echo -e "This will output the result of"       echo -e "\t find dir -[i]name pattern -exec grep --color -Hn[i] string {} \;"       echo -e "Default is"       echo -e "\t find . -type f -exec grep --color -Hn string {} \;\n"       exit 0       ;;     d)       OPTIND=$(($OPTIND-1))       where=       tmp=${args[$OPTIND]}       while [[ $OPTIND -lt $# ]] && [[ "${tmp:0:1}" != "-" ]] ; do         where="$where"" $tmp"         OPTIND=$(($OPTIND+1))         tmp=${args[$OPTIND]}       done       ;;     F)       what="-iname "       what="$what""\"$OPTARG\""       ;;     f)       what="-name "       what="$what""\"$OPTARG\""       ;;     i)       gcase="-i"       ;;     \?)       echo "Invalide option, use option -h for help." >&2       exit 0       ;;   esac done  str=${args[$OPTIND]}  command="find $where $what -exec grep --color -Hn $gcase \"$str\" {} \;" echo "$command" $command   Now, from my terminal, I do ./test.sh -d auto-avoid -F "TEST*" "main" and I get  find  auto-avoid -iname "TEST*" -exec grep --color -Hn  "main" {} \; find: missing argument to `-exec'   (auto-avoid is a directory with a small c++ program I wrote for fun.)  Then, in my terminal I copy-paste the command find  auto-avoid -iname "TEST*" -exec grep --color -Hn  "main" {} \; and I get  auto-avoid/test.cpp:26:int main(int argc, char **argv)   which is the expected result.  The question is: what did I miss?  For now I wrote it as an independent script to test it, but the goal is to have it as a function in my .bash_aliases.  I have found some similar topic but nothing that could help me. If you find that this is a duplicated question, I will gladly take the solution. I am pretty sure some people will tel me to use grep -r, but I would at least want to understand why my script does not work. This is a minimal "not"-working example, I will exclude some directory from my find later.

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


How to make the figure logo centered in the background, its a circle \documentclass[aspectratio=169,xcolor=table]{beamer}  \usepackage{tikz}      \newsavebox\mybox     \savebox\mybox{% \setstretch{1.0}         \tikz[opacity=0.1]\node[align=center]{%                     \includegraphics[width=7cm]{logo} \\            };     }      \usebackgroundtemplate{     \usebox\mybox}  \begin{document}  \begin{frame}    \end{frame}    \end{document}

I'm trying to use an image as a background for Beamer presentation according to  post.  However, I do not want the image spanning the entire background. Thus, I'm doing something like:  \usebackgroundtemplate{% \centering \hspace{4.5cm} \includegraphics[width=1.5in]{image.jpeg} }   The \hspace command works, but \vspace does not work. Basically, I'm trying to get the image to be at the center of the page. Any ideas on how this can be done?


Not able to match regex '\x00'  I have tried using the regular expressions \x[0-9][0-9], \x*, \x0* but nothing seems to work.  However it works when i use \x00 directly but not with regex. I need the regex to be working as the numbers may vary.  re.findall(r'\ \x[0-9][0-9]','abc\x00pqr') # Intentional space between \&\ as i was not able to post without it   This code doesn't match anything. The same problem even after compiling the pattern.

I have a string that contains both double-quotes and backslashes that I want to set to a variable in Python. However, whenever I try to set it, the quotes or slashes are either removed or escaped. Here's an example:  >>> foo = 'baz "\"' >>> foo 'baz ""'   So instead of baz "\" like I want I'm getting baz "". If I then try to escape the backslash, it doesn't help either:  >>> foo = 'baz "\\"' >>> foo 'baz "\\"'   Which now matches what I put in but wasn't what I originally wanted. How do you get around this problem?


how can I edit the text in a windows form element if the code that is editing the text 'belongs' to a seperate thread from the one that contains the windows form? I get the exception:     Cross-thread operation not valid: Control 'textBox1' accessed from a thread other than the thread it was created on.   Thank you.

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


I install sayonara in ubuntu 20.04 lts and it's show like Ign:7 http://ppa.launchpad.net/lucioc/sayonara/ubuntu focal InRelease Err:8 http://ppa.launchpad.net/lucioc/sayonara/ubuntu focal Release   404  Not Found [IP: 2001:67c:1560:8008::15 80] Reading package lists... Done E: The repository 'http://ppa.launchpad.net/lucioc/sayonara/ubuntu focal Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.  what can i do? I'm new to Ubuntu

When updating, I get the following error message:   W: The repository 'http://ppa.launchpad.net/mc3man/trusty-media/ubuntu xenial Release' does not have a Release file.   Here, I find another statement on this error:   This recommends removing certain PPAs; and, I'm not sure if I should do that since it might mean not getting the updates that I need.    Is this what I should do?


I have searched a lot now and not found a real solution that helps me with this:  I am creating a custom page template for an archive page. This (static) page will show all my blog posts ordered by year & months. I figured that this is already a long list of about 500 posts, so I decided that I would want a "paginated" archive page with 75 posts each. But i cannot figure out, how to use the -shortcode in my php template. I inserted as show below, and it only works 50%. It "ends" the current page, but does not add the links for the following pages.
 <?php     $all_posts = get_posts(array(         'posts_per_page' => -1 // to show all posts     ));      // this variable will contain all the posts in a associative array     // with three levels, for every year, month and posts.      $ordered_posts = array();     $post_count = 0;      foreach ($all_posts as $single) {         $year  = mysql2date('Y', $single->post_date);         $month = mysql2date('F', $single->post_date);          // specifies the position of the current post         $ordered_posts[$year][$month][] = $single;      }      // iterates the years     foreach ($ordered_posts as $year => $months) { ?>
<?php echo $year ?>

         <?php foreach ($months as $month => $posts ) { // iterates the moths ?>

<?php printf("%s " . $year . " (%d)", $month, count($months[$month]));?>

                 <?php if ( ! has_category( is_category( pinboard_get_option( 'portfolio_cat' ) ) ) ):                 foreach ($posts as $single ) { // iterates the posts ?>
                         <a href="<?php echo get_permalink($single->ID); ?>" class="article"><?php echo get_the_title($single->ID); ?> - <?php $categories = get_the_category($single->ID);                         $separator = ' ';                         $output = '';                         if($categories){                             foreach($categories as $category) {                                     $output .= 'term_id ).'" title="' . esc_attr( sprintf( __( "View all posts in %s" ), $category->name ) ) . '" class="category">'.$category->cat_name.''.$separator.'['.$post_count.']';                                 }                                 echo trim($output, $separator);                             }                             $post_count++;                             /*                             if ( $post_count > 75 ):                                 return '';                             endif;                             // Kinda works: ends "page" but does not add pagination                             */                             ?>
                 <?php }                 endif; // ends foreach $posts ?>

         <?php } // ends foreach for $months ?>
      <?php } // ends foreach for $ordered_posts ?>

 <?php wp_link_pages( array( 'before' => '
' . __( 'Pages:', 'pinboard' ), 'after' => '
' ) ); ?>

I have added a custom/secondary query to a template file/custom page template; how can I make WordPress use my custom query for pagination, instead of using the main query loop's pagination?  Addendum  I have modified the main loop query via . Why isn't pagination working, and how do I fix it?


So I am doing some linear log functions of the form $Y_t=\beta_0 + \beta_1*log(t) + X_t$ where $X_t$ is white noise  I have been using R to do the least squares estimations and that easy enough to code in R but I have been looking for the equations/derivatioins of OLS estimators for $\hat\beta_0$ and  $\hat\beta_1$ but I cannot seem to find them on the internet.  I was hoping to find some resources on this and figured statsexchange could point me in the right direction...any help would be appreciated!

I usually hear about "ordinary least squares".  Is that the most widely used algorithm used for linear regression?  Are there reasons to use a different one?


I have to create n number of files. N is random but it will be in this range 1<=n<=7. When I run this program it gives NullPointException. file_num is number of files to be created. If I remove null from the first line it tells me to initialize the array.  PrintWriter[] writer=null; for(int j=0;j<file_num;j++) {     System.out.println("J is "+j);     writer[j] =new PrintWriter(new File("file"+(j+1)+".csv")); }

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


I am new in ubuntu. I want to ask you. Can I somehow disable the launch panel and move these icons to the top taskbar?  And other one: Can I disable somehow touchpad? It doesn't disable while typing.. :(  Thank you.

I'm used to GNOME Classic and personally don't want to change to anything else, but it seems there is no more GNOME Classic in the Oneiric release. After apt-get installed gnome-session and all, though there comes back the GNOME Classic option in the session listbox, however, after logged in, it seems not the expected one.  There is no System menu in the top bar, and I couldn't customize panels at all. I want to change the appearance(theme), but I can't find Appearance menu at all. And much more differences to my previous experience of GNOME classic shell.    There are multiple valid answers for this question spanning over several versions of Ubuntu. For your convenience an index of each below:    and up      &


I have a binary dummy with only a very small number of values for this dummy set to "1" (say 7 out of 120).  When I run the regression the F-test using robust standard errors, the f-test does not show in Stata.  I need to report why this happens. If I remove the robust option, the f-test shows.

I am trying to compute a regression.  I have a continuous dependent variable (investment in millions of dollars) One continuous independent variables Five dichotomous indicators (1 / 0) Four interactions. Robust standard errors are being used.  N=569.  Is there any particular reason why the F-Test is not being worked out in Stata?  Stata help says:     Your estimation results show an F or chi2 model statistic reported to   be missing.  Stata has done that so as to not be misleading, not   because there is something necessarily wrong with your model   The problem seems to be related to the interactive dummy variables, because when I remove them the F test is calculated.  The regression output is the following  Linear regression                                        Number of obs =  580                                                          F(  9,   569) =  .                                                          Prob > F      =  .                                                          R-squared     =  0.2336                                                          Root MSE      =  1.2608                                             Robust lninv                         Coef.       Std. Err.  t      P>t    [95% Conf. Interval]  age                           0.1392668   0.0363307  3.83   0.000    .0679081  0.2106255 1.idicatorone                 0.4070426   0.2380546  1.71   0.088   -.0605304  0.8746155 1.indicatortwo                1.085003    0.1235029  8.79   0.000    .8424262  1.327581 1.indicatorthree              -0.4390229  0.1781991  -2.46  0.014   -.7890312 -0.0890145 1.fincrisis                   0.4526393   0.1376538  3.29   0.001    .1822677  0.7230108 1.bubble                      1.657902    0.1088199  15.24  0.000    1.444165  1.87164 indicatorone#indicatortwo                                                          1 1                       0.0810565   0.2113363  0.38   0.701   -.3340379  0.496151  bubble#indicatorthree                                                             1 1                       -0.8225963  0.2688304  -3.06  0.002   -1.350617 -0.2945752 fincrisis#indicatorthree                                                           1 1                       -0.1068982  0.2141135  -0.5   0.618   -.5274474  0.313651  indicatorthree#c.age                                                          1                             -0.0103719  0.0450553  -0.23  0.818   -.0988669  0.0781231  _cons                        0.0378515   0.1878819  0.2    0.840   -.3311753  0.4068783


I will be visiting New York for about 10 days. I have an iPhone 4S (unlocked).  What are my options to have a sim card, preferably with data?   I probably won't use voice that much, but want to be able to make a call if needed.

My daughter is going to spend the next school year (August 2011 to June 2012) in Memphis, TN as an exchange student from Switzerland. She'd very much like to use her iPhone during her stay in the United States.  What are her options for getting prepaid talk, text and data services without also having to buy a new phone? I realize that she'll be limited to AT&T and T-Mobile because of the GSM network.  As far as I've read, T-Mobile SIM cards only work on T-Mobile branded phones, so is AT&T her only option there?


My laptop, a Toshiba Qosmio G30, has a nVidia  GeForce Go 7600 graphics card and it's suppose to support 3D . I am running unity 2d now . The graphic driver is --VESA: G73 Board - toshg73m-- by Ubuntu. When I run /usr/lib/nux/unity_support_test -p I got this list:  Not software rendered: no  Not blacklisted: yes  GLX fbconfig: yes  GLX texture from pixmap: yes  GL npot or rect textures:  yes GL vertex program: yes  GL fragment program: yes  GL vertex buffer object: yes  GL framebuffer object: yes  GL version is 1.4+: yes Unity 3D supported: no   The card is not blacklisted but a similar one with GT is!  Do you think that there is a chance the laptop can run the unity 3d? Maybe I could change the resolution of the screen to a higher one too! I tried all the nvidia drivers provided but none works (except 96 in ubuntu 12.04 ). I get a black screen or terminal screen.  Best Wishes to All

Unity won't run on my new Ubuntu 11.04 install (with a Nvidia GeForce GO 7400). Ubuntu classic desktop works though, I tried all different drivers provided in the repositories.   Doing System → Administration → Additional Drivers gives me a warning :      This driver is activated but not currently in use.   I even tried the Nvidia driver from the official Homepage.  After some googling, I found the tool /usr/lib/nux/unity_support_test -p which tells me that my card is blacklisted. The other tests show a green yes.  Is this a bug? Or is my card too old which would be pretty surprising for me :P ?  Thanks.


When an object is squeezed to its Schwarzschild radius it becomes a black hole (made by density) and its mass does not change (its gravity doesn’t change), but if its mass doesn’t change (its gravity doesn’t change) how does light not escape the black hole? The question is not why a black hole is black, or why light does not escape black holes in general. The question is why light does not escape a Schwarzschild black hole with a small mass (which, presumably, means the gravitational pull does not change either).

In  (ignoring Hawking radiation), why is a  black? Why nothing, not even light, can escape from inside a black hole? To make the question simpler, say, why is a  black hole black?


I write a thesis and according to my university rules, the style of the references should be as in the below image:    I tried many styles, but could not find the right style as in the above image, how can I build a custom style or modify an existing style to meet the previous style?  Edit I use natbib with these options  \usepackage[numbers,square,authoryear,sort&compress]{natbib} \usepackage[nottoc]{tocbibind}    and the current style is abbrvnat  the required style is:   For papers:  last name first name middle name,"title of paper", journal name, volume , pages, year. For thesis or dissertations:  last name first name middle name,"title of thesis or dissertation", type of the thesis (i.e. M.Sc or Ph.D.), department , university name, year. For books:  last name first name middle name,"title of book (underline)", edition, publisher, year.   the first and middle names written in abbreviation. the year written between parentheses. if there is an URL then it would be embed in journal name, publisher or in university name.    this is a simple of the .bib file,   @Book{harnoy,   title     = {Bearing design in machinery},   publisher = {Marcel Dekker},   year      = {2003},   author    = {Harnoy, Avraham},   place     = {New York}, }  @PhdThesis{Qiu,   author = {Zhi Ling Qiu},   title  = {A theoritical and Experimental Study on the Caharacteristics of Journal Bearings},   school = {Department of Mechanical Engineering University of Wollongong},   year   = {1995},   type   = {Doctor of Philosophy thesis}, }  @article{yang,   doi = {10.1177/1350650111431526},   url = {http://dx.doi.org/10.1177/1350650111431526},   year  = {2012},   month = {jan},   publisher = {{SAGE} Publications},   volume = {226},   number = {4},   pages = {328--339},   author = {W. Weimin and Y. Lihua and W. Tiejun and Y. Lie},   title = {Nonlinear dynamic coefficients prediction of journal bearings using partial derivative method},   journal = {Proceedings of the Institution of Mechanical Engineers,  Part  J: Journal of Engineering Tribology} }

My advisor wants me to cause all titles for papers, books, and articles in " for my thesis in my bibliography.  I am using natbib and the plainnat bibliography style and am unsure how to do this. I am NOT asking how to do  or displaying a quote in the title, I want to make the title show " around it with capitalization being saved. I could go through and manually modify the .bib file I suppose...  Here is a working example:  \begin{filecontents}{mybib.bib}                  @Article{Hart, author = {P.E. Hart, N.J. Nilsson, B. Raphael}, title = {Correction to a Formal Basis for the Heuristic Determination of Minimum Cost Paths }, journal = {SIGART Newsletter 37}, year = {1972}, pages = {28-29} }        @Article{Hart2, author = {P.E. Hart, N.J. Nilsson, B. Raphael}, title = { {``Correction to a Formal Basis for the Heuristic Determination of Minimum Cost Paths''}  }, journal = {SIGART Newsletter 37}, year = {1972}, pages = {28-29} } \end{filecontents}    \documentclass{report} \usepackage[numbers,square]{natbib} \begin{document} \bibliographystyle{plainnat}      I don't want it to look like this reference \cite{Hart}      I want it to look like this \cite{Hart2}  \bibliography{mybib}   \end{document}   Is there a way to easily do this? I can always hack this by doing what I did for the second reference if not.  From reading  nothing stands out to me as doing this?


I am working with a dataset (900 observations) and have the following normal QQ plot in R:    Seeing that the QQ-plot little bit strange, what could I infer about the underlying distribution? It seems to me that a distribution has too many pikes at 2, is that right? Also, what other conclusions can we draw from the data?

I am working with a small dataset (21 observations) and have the following normal QQ plot in R:     Seeing that the plot does not support normality, what could I infer about the underlying distribution? It seems to me that a distribution more skewed to the right would be a better fit, is that right? Also, what other conclusions can we draw from the data?


Why is the work done by friction zero when body is rolling? Does it mean no energy is dissipated by friction.

I have read various answers , on PSE and elsewhere , and most of them explain that the point of contact of the rolling object undergoes 0 instantaneous displacement in the direction of friction, I agree , but then there is a feeling that the friction does provide a torque , so how can it do 0 work . ( The pure rolling here is under a constant external force on the object so friction does act ).


When i run the script:  #!/bin/bash DRUPAL_ROOT=$(drush status root --format=list) if [ -z $DRUPAL_ROOT ] then   echo -e "Not exists Drupal core" else   echo $DRUPAL_ROOT   cd $DRUPAL_ROOT fi   Output:  # /right/drupal/root   But no change to path  If i run commands in terminal:  # DRUPAL_ROOT=$(drush status root --format=list) # cd $DRUPAL_ROOT   Change OK  Any idea? Thanks.

I'd like to write a bash scipt that would change to target directory and list the contents of new directory, all in one step. It would replace the two commands I constantly use consecutively:   cd ./some_directory ls -al   After executing the script, my current directory would change, and ls -al would show the dir list.   cdl ./some_directory   Is this possible?


I am new to Linux so i have some concerns regarding live cd . If i can log in the system with the live cd and get root access then any on can do the same , so my question is how to stop anyone using live cd to get access to my system , if that is possible .

Recently one of my friends came over to my place, within 15 minutes he hacked my account using a Live CD and reset the password in front of me. I was baffled to see such a thing. Please guide me to prevent such a future attempt using a Live CD.


Hi having problems with updating ubuntu 14.01  sudo apt-get update   Gives me the following.     E: Typen »!DOCTYPE« er ukendt på linje 1 i kildelisten /etc/apt/sources.list.d/playonlinux.list   E: Listen med kilder kunne ikke læses.   Translated:  E: Type >>!DOCTYPE<< is unknown on line 1 in sourcelist /etc/apt/sources.listd/playonlinux.list E: list with sources couldn't be read.  After the >> in the code this symbol (<), without the () but if I write it in, the block disappears in here... (hope it makes sense)  I'm aware that it maybe would help to delete playonlinux, but my software-center won't open and I don't know any other way of deleting the program..  sudo rm playonlinux   doesn't work, don't know if I'm using the code correct..  Kind regards - The rook

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.


Right now, I have a Player.cs class that handles button pushes, movement speed, damage, Update() etc. At the moment, all of the logic for button presses triggering an ability, and the logic surrounding that ability lives in my player.class. I'd like to take that logic and put it into an Abilities.cs class. All I want in my player at most would be:  public override void Update() {     if (button.pushed == "berserkKey")     {        ability.berserk();     } }   ... where for example berserk is a stacking buff but none of that logic is in my player class anymore.  For additional context, I plan to implement a Classes.cs class which will hold the info on classes (warrior/archer/etc) which will know exactly what the class and therefor player can use. The code above will likely abstract out even more when that is the case.  The problem is that my Player class already inherits from another class. How do I go about designing my Classes and Abilities classes in a way that my player can use them in the example above?  I'm also open to a completely different way if my initial thought here isn't ideal.

I'm building a mod for Terraria that will add classes and their corresponding abilities to the game. You're a warrior? Push your ability key and you'll use your berserk ability.   I'm trying to make my player code as simple as possible. I'd like to set the player's in-game "class" by doing something like this at the top of the player class so the rest of the methods in it can access it later:  //Set class WarriorClass playerClass == new WarriorClass(playerReference, level)   Herein lies the first issue. I get an error at playerReference that says:  Error   CS0236  A field initializer cannot reference the non-static field, method, or property 'ModPlayer.playerReference'  MyMod   Ok, so I looked that up and set the initialization in the WarriorClass instead:  public Player playerReference = new Player();   And I have this now in my player code:  //Set class      WarriorClass playerClass = new WarriorClass(level);   Here's the beauty of it. In the gamepad input method within my player code all I ever have to do is:      //On key presses     public override void ProcessTriggers(TriggersSet triggersSet)     {         if (MyMod.ability1Key.JustPressed)         {              playerClass.UseAbility(MyMod.ability1Key);         }   Now that the ability1 key was pressed, let the WarriorClass handle what to do:      public void UseAbility(ModHotKey key)     {             //Ability 1             if (key.JustPressed == MyMod.ability1Key)             {                 //Start berserking                 if (player.HasBuff(ModContent.BuffType<BerserkBuff>()) == false )                 {                     //Lose 10% of your life                     lifeLost = player.statLifeMax2 / 10;                     player.statLife = player.statLife - (int)lifeLost;                      //Berserk and add damage over in the Buff code                     player.AddBuff(ModContent.BuffType<BerserkBuff>(), 600, false);                 }   This is all great!!! I can add any amount of classes I want and this player code never changes. Except If I want to add if/then logic to select a class in say, Update() then it breaks the following reference in my gamepad input code:  playerClass.UseAbility(MyMod.ability1Key);   Of course it won't have a reference unless I hard code it at the top of the player file, but I don't know what class a player will be until they pick one.  Am I doing this fundamentally in a bad way or am I missing something else in terms of OO programming? I don't want to have to initialize every class for the character at the top of the file like this:  WarriorClass warriorClass = new WarriorClass(level); ArcherClass archerClass = new ArcherClass(level); ...   ... just to do this in the gamepad input method:  if (classChoice == "Warrior") {      warriorClass.UseAbility(MyMod.ability1Key); } else if (classChoice == "Archer") {      archerClass.UseAbility(MyMod.ability1Key); }


My computer stopped working. I replaced the motherboard and processor (had an Intel i3, got an AMD Ryzen) and installed Ubuntu 18.04.03 on the disk where I had had the system before. The system boots and I can use quite a few programs. But, for example, I downloaded google-chrome and installed it, but the executable will not execute.   When I installed google chrome, the executable ended up in /opt/google/chrome. Here is the 'ls -l'  -rwxr-xr-x 1 root root      1873 oct  9 04:59 google-chrome    When I try to run it as root, I get  root@garey-machine:/opt/google/chrome# ./google-chrome -su: ./google-chrome: Permission denied   Is this a problem with the executables being Intel code? Is it a problem with some security system I am not aware of? Any help?

Ubuntu noob here. I recently got a VPS running Ubuntu, and decided to install Chromium, my preferred browser, on it. After installation completed, I got a message stating that I cannot open Chromium with root privileges. How would I go about opening Chromium?


If A is an invertible complex matrix with minimal polynomial $(t-\lambda_1)^{c_1}...(t-\lambda_k)^{c_k}$, is it true that the min poly of A^n is $(t-\lambda_1^n)^{c_1}...(t-\lambda_k^n)^{c_k}$? I think this is true by considering Jordan blocks, but is there a less high-tech way to see this (e.g. just by considering generalised eigenspace decomposition)?

I am wondering, given the minimal polynomial of $A$, what can we say about the minimal polynomial of $A^n$?  I know that if we were looking at the roots of the characteristic polynomial ie eigenvalues then the roots of the characteristic polynomial of $A^n$ would be $nth$ powers of the eigenvalues so again these are roots of the minimal polynomial also.


Anyone have an idea how to get Microsoft SQL Server Edition (Express, Standard, Enterprise, Developer) without access to the database or registry?  I got the version like this:  $SQLFP = (Get-WmiObject -Class Win32_Service -ErrorAction Stop | Where-Object { $PSItem.Name -eq 'MSSQLSERVER' } | Select-Object -ExpandProperty PathName).Split('"')[1] $SQLVer = ([System.Diagnostics.FileVersionInfo]::GetVersionInfo($SQLFP).ProductVersion).Split('.')[0]  Switch ($SQLVer) {     "10" { "Version: Microsoft SQL Server 2008/R2" }     "11" { "Version: Microsoft SQL Server 2012" }     "12" { "Version: Microsoft SQL Server 2014" }     "13" { "Version: Microsoft SQL Server 2016" }     "14" { "Version: Microsoft SQL Server 2017" }     Default { "Unsupported version." } }   I found plenty of ways to determine the Edition, Patch Levels, Service Packs and stuff from Registry and via SSMS, but unfortunately I have access to neither of them. I do have permission to access the file system.

How do find out which edition is installed without having the management studio installed?  I have a server that functions as a license manager for another software.  Upon investigation of a high RAM usage alert, I found that the sqlservr.exe process is taking up almost 2 GB of RAM.  I looked through the program menu and found that the configuration manager was installed, otherwise, it is pretty bare bones.  I clicked on properties of the EXE file and found 10.50.1600.1, but there is no place that I've found that states whether it is Express, Dev, STN, ENT, etc.  If I had to guess, this is an express edition, but I wanted to know if there is an obvious tell-tale sign.  Update: @Bob - The file tells me what I know, not the edition.  @valo - I get the following error when I run that command and I did verify named pipes was enabled:     HResult 0x35, Level 16, State 1   Named Pipes Provider: Could not open a connection to SQL Server [53].   Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or instance->specific error has occurred while establishing a connection to SQL Server. Server is not >found or not accessible. Check if instance name is correct and if SQL Server is configured >to allow remote connections. For more information see SQL Server Books Online..   Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired.   @thomas - I noticed the Stock Keeping Unit Name before I asked the question, but that seemed too easy, I guess my initial suspicion was correct.


When my ubuntu 13.10 boots the screen goes black and has no response. I used to run on gnome fallback and would like to switch back to it but I can't get to the login screen due to the automatic login. My only access to terminal is the root shell prompt and I've tried to turn off the autologin in GDM from there but it restricts me to read-only. Any help is much appreciated.

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I made a very serious mistake. I was editing the crontab file of my remote server, I was as the root user and it turns out that I wrote crontab -r instead of crontab -e and without previous notice it was simply deleted.  I was looking for information and it turns out that files deleted with the crontab -r command are not stored somewhere like the recycle bin or something similar. I am very worried because there are scheduled backups and all the scripts that my hosting placed. I already communicate with them and I must wait for a response from a specialized person in a period of 24 to 48 hours, but I am very concerned. Will it be possible to recover that file?

I entered crontab -r instead of crontab -e and all my cron jobs have been removed.   What is the best way (or is there one) to recover those jobs?


I'm trying to build a FM transmitter, but without sucess. The current schematic I'm using is this one:  The alternating current at the (+) of the op amp is the P2 output of my phone. V3 and V4 are 2 switching power supplies connected into the AC outlet. I am trying to calculate the inductor with this site:  The wire I'm using to build the inductor is from an UTP cable. The multimeter that I have is very simple, and I can't measure the inductance of the coil. I'm trying to tune this on the radio of my other phone, and can't get it to work. I'm building this on a breadboard. I would appreciate it if someone could help me.

I've been trying to get this simple FM transmitter to work over the past few days and I could use some help in a few areas.      First iteration was on a breadboard with all parts included.  The exception being I didn't have a 0.1uH coil handy but I had another coil rated at 0.7uH (using my LCR meter).  I also didn't have a C4 value of 4.7pF but I had a 10pF value.  I figured I could just tune it later.  I hooked a scope up to it and got no oscillation.  I tried connecting the probe to the gate and the collector separately and together.  Still no oscillation.  Second iteration.  I removed the audio component of the circuit.  Essentially everything to the left of C2.  I had gotten that working no problem anyway so I figured I would concentrate on the oscillator.  This time I tried different values for the inductor ranging from 20uH to 1mH and different fixed values for the variable cap (10pf, 20pf, 30pf).  These were all ceramic caps. No love.  Third iteration. I tested the transistor to make sure that wasn't the issue.  Seems fine.  PN2222A variety. (Also tried 2N3904 and BC547). I then modeled this up on a piece of perf board.  I even found a SMD inductor of 0.1uH so now I thought I would be good.  Tested all the pieces on the meter before installation. Still nothing. I'm not seeing anything on the spectrum analyzer either.  Questions:   Do you think my benchtop power supply is causing a problem?  All the various versions of this type of FM transmitter circuit on YouTube and the Internet all seem to use a battery.  Any chance the 60Hz main power is messing with things?  I've put .1uF and higher caps on the power rails. I have a 200Mhz SIGLENT SDS1202X-E scope.  I've built and tested other oscillators up to a few MHz before with no issues.  Any thoughts on that being the issue?  I would expect to see something on the scope right? Any chance the probe is dampening the oscillations?     I know there are a lot better FM transmitter circuits out there I was just experimenting with this (and others like it) and couldn't get any to work.


Find the $\sum _\limits{n=0}^{\infty }\:\left(\left(n+2\right)/2^n\right)$   My Try: The answer is $6$ as $=\sum _\limits{n=0}^{\infty \:}\frac{n}{2^n}+\sum _\limits{n=0}^{\infty \:}\frac{2}{2^n}$,  I stuck at first part $\sum _\limits{n=0}^{\infty \:}\frac{n}{2^n}$. how it calculate $2$.  Can you please explain it?

How can I evaluate $$\sum_{n=1}^\infty\frac{2n}{3^{n+1}}$$? I know the answer thanks to , but I'm more concerned with how I can derive that answer. It cites tests to prove that it is convergent, but my class has never learned these before. So I feel that there must be a simpler method.  In general, how can I evaluate $$\sum_{n=0}^\infty (n+1)x^n?$$


I have a data as: q    w    e    e    r    r t     23     21    1      Whenever we find blank line change it to new column. Output q,e,23     w,r,21 e,r,1 ,t,  I have tried but neither with sed nor I am able to change the row. Please let me know how can we achieve this.

I have a file containing lists on Solaris:  List A hi hello hw r u  List B Hi Yes  List C Hello   I need to transpose the lists as shown below:  List A    List B    List C hi        Hi        Hello hello     Yes hw r u   How can I do this on Solaris?


I saw a question recently where a user wanted to ensure that his script is only executed by using source.  My question is: what's the difference between ./test_script.sh and source test_script.sh? I do know that when source is used the script file doesn't need +x permissions. Are there any other differences? And my second question is: in what kinds of situations is each method appropriate?

What's the difference between executing a script like this:  ./test.sh  and executing a script like this:  . test.sh?  I tried a simple, two-line script to see if I could find if there was a difference:  #!/bin/bash ls   But both . test.sh and ./test.sh returned the same information.


I want to align the elements of an eqnarrray between 2 columns. \usepackage{multicol} \usepackage{color,amsmath} \begin{document}      \begin{multicols}{2}         \begin{eqnarray*}         f'(x)&=&\frac{d}{dx}\left[\frac{5x^2}{x}\right]\\         f'(x)&=&\frac{\dfrac{d}{dx}8x}{\dfrac{d}{dx}8x}\\         f'(x)&=&\frac{\dfrac{d}{dx}9x^2}{\dfrac{d}{dx}x^2}\\         f'(x)&=&\frac{d}{dx}\left[\frac{x-5}{x^2-25}\right]         \end{eqnarray*}                  \color{red}\begin{eqnarray*}         f'(x)&=&5\\         f'(x)&=&1\\                  f'(x)&=&9\\         f'(x)&=&-\frac{1}{(x+5)^2}         \end{eqnarray*}     \end{multicols}  In context, the elements of the first column are examples and the elements of the second one are the answers of those examples. But they´re not vertically aligned

The following code does not align the contents of the two columns do not align properly; in particular, the content of the left column is a bit lower on the page than the content of the right column.   \documentclass [11pt]{article} \usepackage{amsmath} \usepackage{multicol}  \begin{document} \noindent So why do the two colums not align vertically? \begin{multicols}{2} \begin{align*} & \text{\underline{function} } f_a(x): \\ & \quad \text{\underline{begin}} \\ & \quad \quad i \leftarrow 1; \\ & \quad \quad \text{\underline{while}} (g(i) \neq x) \text{ \underline{do} }         i \leftarrow i +1; \\ & \quad \quad f_a \leftarrow 0; \\ & \quad \text{\underline{end}} \end{align*} \begin{align*} & \text{\underline{function} } f_a(x): \\ & \quad \text{\underline{begin}} \\ & \quad \quad i \leftarrow 1; \\ & \quad \quad \text{\underline{while}} (g(i) \neq x) \text{ \underline{do} }     i \leftarrow i +1; \\ & \quad \quad f_a \leftarrow 0; \\ & \quad \text{\underline{end}} \end{align*} \end{multicols} \end{document}   Why? And how can I fix this?  Note: I tried using \Columnbreak, to no avail. Curiously, if I add a blank line between the two align* environments, the content of the right column is a bit lower than the one on the left...


Residual fitted normal Q scale location residual leverage graph.    Not able to interpret what it means.

I had a question about interpreting the graphs generated by plot(lm) in R.  I was wondering if you guys could tell me how to interpret the scale-location and leverage-residual plots?  Any comments would be appreciated.  Assume basic knowledge of statistics, regression and econometrics.


On Language and Usage sites, proper punctuation is sometimes important. Consider the following source:  “*bla*”, *bla*! *bla*… (*bla*), [*bla*], *bla*/*bla* and |*bla*|!   In question and answer posts, almost all bla-s properly italicize:     “bla”, bla! bla… (bla), [bla], bla/bla and |bla|!   Only the one found after a slash is not rendered as one might expect, but it doesn't matter much as the slash should be avoided anyway.  However in comments (and on the chat), this same source yields something completely different:     “*bla*”, bla! bla*… (*bla), [bla], bla*/*bla and |*bla*|!   Please make it consistent! To learn markdown's bloody edge cases is a pain, having to learn them twice is painfully stupid.  “*italics in asymmetric quotes*” (or „*kursiv in Anführungszeichen*”, *ellipsis*…, etc.) is a common combination. It works in posts but not in comments.

If I enter the following mark-down source:  “*blah*”   into a question or answer, then it works, but in a comment it doesn’t. The asterisks remain literal and don’t turn into italics.


Let $F_n = 2^{2^n}+1$ be the $n$th Fermat number for $n \geq 2$ and $p$ a prime factor of $F_n$.  How can I show that that $2^{(p-1)/2} \equiv 1 \:\mathrm{mod}\:p$?

I've stumbled upon this congruence very similar to Fermat's Little Theorem, but I can't seem to wrap my head around how to solve it. It goes like this:     i) Suppose $p$ is prime, $(a,p)=1$ and the congruence $x^2 \equiv a \pmod p$ has a solution $x$. Prove that $a^{(p-1)/2}\equiv 1 \pmod p$.   And the same question but with an additional condition:     ii) Suppose $p$ is prime, $p \equiv 3  \pmod 4$, $(a,p) = 1$ and the congruence $x^2 \equiv a \pmod p$ does not have a solution $x$. Prove that $a^{(p-1)/2}\equiv -1 \pmod p$.   For i: Since $x^2 \equiv a \pmod p$ has a solution, we know that $p \mid x^2 - a$, hence $kp=x^2-a$ for some integer $k$, or $a = x^2-kp$. Now this doesn't really help me much!  For ii: Similarly stumped.


I want to go into a log file and see what happens when my Wi-fi drops, then take it elsewhere? Where can I find this?

A previous poster on the regular forums (  ) said /var/log/daemon.log, but I don't seem to have such a file. Do I need to enable logging?


iPhone 4s with iOS 7.  Like in LOST MODE where the Location Services is automatically turned on eventhough it was OFF before you lost your iPhone, it will give it's location once the device connects to the internet - (already clarified, thank you so much!). Now the question is, Is it also the same when you restore/wiped the iPhone? Will it automatically enable the Location Services after being restored (as long as they will connect it online)?

I lost my iPhone and while it was turned on I could lock it and put in 'Lost mode' through  Apple 'Find My iPhone' service.  Unfortunately almost one month it's not found and until now I had hope to find it.  If somebody found it and recovered or re-installed iOS on that phone, can it be detected after turning on in my iCloud service anyway? or I lost it forever?


I am using a Nikon d5500 with Nikor 18-55 br lens. I was able to get some great photos outside during one set of shots. I noticed since then, when I use the zoom magnifying feature on the lcd, all of my photos are not sharp and blurred when I review. Ive taken them into photoshop and at 100% 300 dpi at roughly 10x14" they aren't sharp. I've tried different setting and am reading about user error but is there a way to test the camera with a still shot? I am using vr on and af on the lens, also tried different settings raw, raw +jpg, large, and fine settings.

I use a Canon EOS Rebel T3i (600D) with the kit lens. I have experimented a lot with different settings and modes, but I feel like I have wasted many good shots that could have looked amazing, if only they were a little bit sharper.  I use auto-focus on most of my pictures and make sure to choose the right focus point, but all of my photos are still a little bit out of focus. When I zoom in, I can see that the pixels are not very crisp or well-aligned.  I am not sure if this issue is caused by my equipment or skills.


I can't see any button for starting a bounty on the mobile application of Stack Exchange. Could someone please help me on where to find this feature ?  If it's impossible, could this feature be implemented?

(There is an  from , but none for Android, so here goes)    I was happy to see  and wanted to award a bounty. But the SE app for Android doesn't provide a button for adding bounties. Can you please give me a button to add bounty to a post using the app?   Please add this button, using the browser to add the bounty reduces the happiness.


I have a Noctua NF-F12 computer fan (specs: ). I also have a Samsung USB Wall Adapter (Originally for charging my tablet). The USB Wall Adapter says it can output 5V 2.0A.  My computer fan, according to the specs, runs at 12V 0.05A. How do I go about powering this? Some have said to purchase a 5V to 12V step up module with a USB connection, then solder the fan wires onto that, and plug the USB end into the wall adapter or would it work if I plugged it into a computer's USB port?   I've also seen DC wall adapters for sale. I saw a 12V DC Wall Adapter, and it says it can output 12V 100mA. However, most of them supply 500 mA, 1A, or 2A. My fan says it only needs 50 mA (0.05A). What happens if I solder the fan wires to this DC Wall Adapter? It is 12V but isn't it too much current? Will this burn out the fan?  Edit: With all that said, is it best to just purchase a DC power supply and splice the fan wires, or can I go with a 5V to 12V step-up module with a USB connection and use any of my USB wall chargers instead?  Thank you in advance.

Power supplies are available in a wide range of voltage and current ratings.  If I have a device that has specific voltage and current ratings, how do those relate to the power ratings I need to specify?  What if I don't know the device's specs, but am replacing a previous power supply with particular ratings?  Is it OK to go lower voltage, or should it always be higher?  What about current?  I don't want a 10 A supply to damage my 1 A device.


NOTE : Yes! there are number of related questions to this.But I have unique approach which is not mentioned in any other post and I want to know if it is fast.  So all other questions have accepted answer as below  SELECT * FROM catalogue order by RAND() LIMIT 5   But I heard it is too slow for large table.So I want to know if below approach is faster than above code.  //I know my row count.500k <?php $rand = rand(1,499990) $limit = "$rand , ",$rand+10;   and my query wil be   SELECT * FROM catalogue  LIMIT $limit   where $limit will be like 1,10 , 450,460 etc...

What is a fast way to select a random row from a large mysql table?  I'm working in php, but I'm interested in any solution even if it's in another language.


I'm fairly new to Java programming so this might be a noob question, but I have developed a movie ticket reservation program for a coursework of mine and one of the requirements for it is to allow the user to print out a receipt for the purchase. I have succeeded in getting to print the output to the .txt file but the problem is that all the information prints in a single line but I want them to print in different lines. Can someone please help me out with this?   private void printReceiptActionPerformed(java.awt.event.ActionEvent evt) {                                                  try {         // TODO add your handling code here:         showMessageDialog(this, "Your receipt is printing!");          //print receipt to a text file called Receipt         FileWriter fw = new FileWriter("Receipt.txt");         PrintWriter pw = new PrintWriter(fw);          //calculation of prices         float adultPrice = (float) (countA * 9.00);         float studentPrice = (float) (countSt * 8.00);         float seniorPrice = (float) (countSe * 7.00);         float childPrice = (float) (countC * 5.00);          //total price for tickets         float totalPrice = adultPrice + studentPrice + seniorPrice + childPrice;          try {             String queryString = "SELECT title, movietheatre FROM movies WHERE movieid = " + movieID;             ResultSet results = myStatement.executeQuery(queryString);              NumberFormat formatter = NumberFormat.getCurrencyInstance();              StringBuilder strBuilder = new StringBuilder();             while (results.next()) {                 strBuilder.append("\t Cinema Ticket Receipt");                 strBuilder.append("\n");                 strBuilder.append("Movie Title : ").append(results.getString(1));                 strBuilder.append("\n");                 strBuilder.append("Time : ").append(time);                 strBuilder.append("\n");                 strBuilder.append("Date : ").append(date);                 strBuilder.append("\n");                 strBuilder.append("Movie Hall : ").append(results.getString(2));                 strBuilder.append("\n");                 strBuilder.append("\n");                 strBuilder.append("Adult ticket price : ").append(formatter.format(adultPrice));                 strBuilder.append("\n");                 strBuilder.append("Student ticket price : ").append(formatter.format(studentPrice));                 strBuilder.append("\n");                 strBuilder.append("Seniors ticket price : ").append(formatter.format(seniorPrice));                 strBuilder.append("\n");                 strBuilder.append("Children ticket price : ").append(formatter.format(childPrice));                 strBuilder.append("\n");                 strBuilder.append("\n");                 strBuilder.append("Total price : £").append(formatter.format(totalPrice));                 strBuilder.append("\n");             }                                          results.close();             //String formatStr = strBuilder.toString();             //out.write(String.format(formatStr));               pw.print(strBuilder.toString());             pw.close();         } catch (SQLException sqle) {             out.println(sqle);         }     } catch (FileNotFoundException ex) {         ex.printStackTrace();     } catch (IOException ex) {         Logger.getLogger(Receipt.class.getName()).log(Level.SEVERE, null, ex);     }     showMessageDialog(this, "Receipt printing complete."); }

How do I get a platform-dependent newline in Java? I can’t use "\n" everywhere.


when i apply material on an object can't see them on render mode on evee. The object becomes transparent also transparent in rendered image but it is working on cycles

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


I'm using POSTER add-on (Firefox) to create a node.(REST service). I couldn't able to create node having select/checkbox item. Getting following error in response.  ["An illegal choice has been detected. Please contact the site administrator"]  How to resolve this? I'm able to create node if post data doesn't contains select/checkbox data. My problem is exactly related to the following link. But I couldn't find solution.    If I replace 'und' to 'en' in json format, the node is being created but with null values.  I've found following messages under Recent log messages.  Warning: htmlspecialchars() expects parameter 1 to be string, array given in check_plain() Warning: Illegal offset type in isset or empty in list_field_validate()  Illegal choice in LABEL element.  Here 'LABEL' is the label(name) of the filed

I'm using Drupal 7 + Services 3 to create nodes with POST and JSON. Everything works fine, except field types of select - entity reference select or plain text.  The entity reference uses the autocomplete widget, while the text select is a plain radio button.  This is the format I'm using:  "field_urgency": {     "und": [  {  "value": 1    }   ] }


I've got Spivak and Courant books on calculus for a good price. Which one would you buy to learn calculus deeply and enjoy learning it? What are the ups and downs for each one?

I am currently studying Introduction to Calculus and Analysis by Richard Courant and Fritz John. I would like to compare Courant's book with Apostol's and Spivak's in terms of difficulty of the problems provided. After reading that book, should I go for one of the two above or should I study something else like Rudin? My focus is on being rigorous and also adept at problem solving.


I'd like to apply thickness to my plot, similarly to what's shown in the image on the right.    \documentclass[border=5mm]{standalone}    \usepackage{pgfplots} \pgfplotsset{compat=1.13} \usepgfplotslibrary{colorbrewer}  \begin{document} \begin{tikzpicture}[yscale=1] \begin{axis}[ domain=-180:180, samples=50, colormap/PiYG, colorbar, colorbar style={     title=Color key,     ylabel=Z-value,     ytick={-1,-0.75,...,1},     yticklabel style={         text width=2.5em,         align=right,         /pgf/number format/.cd,             fixed,             fixed zerofill         }     } ] \addplot3 [surf] { cos(x)*cos(y) / 5}; \end{axis} \end{tikzpicture} \end{document}


I just got a Sony VAIO (Fit 13). All my current and previous laptops have Fn key that's to the left of Ctrl key. I remember seeing a Sony utility on a VAIO Z that allows you to switch the Fn and the Ctrl key, but I couldn't find it anymore. I've also tried SharpKey but it doesn't recognize the Fn key. Is there a way to switch these two keys on a Sony VAIO?

Our computers have been upgraded to HP EliteBook 8570p machines and while they're very nice machines, they are also very large -- so large that the left Ctrl key is too far away, making Ctrl+V really difficult to do with one hand.  I'm sure there are ways to re-map the keys so that their signal is swapped. But add the factor of corporate security, is there still a reasonably simple approach to this?  I'm sure you'd like more information before you can answer -- I'll try to add updates based on comments and answers.


I typed into the terminal this:     ip link set eth0 address   XX:XX:XX:XX:XX:XX   the XX for my numbers and so on.  But it says permission denied.  Source:


Let $H$ be a Hilbert space and $V$ is a dense linear subspace of $H$. Can we find an orthonormal basis of $H$ such that all elements are in $V$?

Let H be a separable complex Hilbert space. Let A be a dense sub-space of H. Is it possible to find a complete orthonormal system for H that is contained in A?


The back wheel on my grandson's 12 inch Spiderman bike is spinning nothing seems to be wrong the chain is not off and the training wheels are on right what could be the problem

My daughter has sparkle and glitz 12 inch bike with stabilizers (training wheels). Since we purchased the bike every now and again the back wheel keeps spinning when she is pedaling. This seems to happen more when there is a bit of an incline.  Any suggestions what problem could be?


I am reading some preliminary material to develop a good background in order to study PDE and I came across the following fact  The dual space of $L^p$ is $L^q$ where $q$ is the Holder's Conjugate of $p$, so in other words $\frac{1}{p}+\frac{1}{q}=1$. Can someone please explain to me how to prove this fact or indicate where can I read something about this that is understandable from somehow who doesn't have much knowledge of functional analysis.  I know the definition of dual space and I was reading on wikipedia that there is a natural isomorphism from the space of linear functionals of $L^p$ to $L^q$, but I can't really reason on why so, and the intuition behind this.

Rudin asked (Real Complex Analysis, First edition, Chapter 6, Problem 4):  Suppose $1\le p\le \infty$, and $q$ is the exponent conjugate to $p$. Suppose $u$ is a $\sigma$-finite measure and $g$ is a measurable function such that $fg\in L^{1}(\mu)$ for every $f\in L^{p}(\mu)$. Prove that then $g\in L^{q}(\mu)$.   I am being troubled with the fact that $|g|_{q}$ might be unbounded if we select wierd enough $f$. Holder inequality only gives us $$|fg|_{1}\le |f|_{p}|g|_{q}\leftrightarrow |g|_{q}\ge \frac{|fg|_{1}}{|f|_{p}}$$All  the constructions I know proving $g\in L^{q}$ starts by assuming $f\rightarrow fg$ is a bounded linear operator，so I cannot use circular reasoning at here.   It suffice to prove the statement for finite measure spaces and simple functions. So emulating Rudin we can assume $|g|=\alpha g$, where $|\alpha|=1$ and $\alpha$ is measurable. Let $E_{n}=x:|g(x)|\le n$ and let $f=\chi_{E_{n}}\alpha g^{q-1}$. Then we have $$\int_{E_{n}}|g|^{q}d\mu=\int_{X}|fg|d\mu\le K_{n}$$ for some $K_{n}<\infty$. But this constant obviously shift with the $n$ I choose, hence probably does not have a finite upper bound (for example $K_{n}=n$). And I got stuck.   In problem 6, Rudin now ask:  Suppose $1<p<\infty$, and prove that $L^{q}(\mu)$ is the dual space of $L^{p}(\mu)$ even if $\mu$ is not $\sigma$-finite.   I keep thinking about it but do not know what is the best way to prove it.


I have a problem when using the texture of paint on rendering cycles . I do the mapping texture and works properly . But when I restart the blender , the UV map and texture disappears and the material becomes black . So I have to paint the texture again. Does anyone know how to fix this ?

In the middle of touching up a new texture, I pressed save and suddenly my textures all turned black on the model and UV texture - just vanished.  I tried reopening the file in another instance of Blender, I tried to CtrlZ too and it just did this weird patchy thing on my texture.   How do I recover it and what did I do wrong?


The following question was posted on a social networking site. There was a disagreement as to the correct answer. Please provide an answer to help resolve the disagreement.     There are three closed boxes. One has a large pile of gold in it and the other two are empty. You get to choose a box. After choosing, one of the boxes you did not choose, one without gold, is taken away. Now you have the option to stay with your original choice or switch to the other remaining box. Do you stay or switch?   To be clear, you would favor the box of gold.

From Wikipedia :     Suppose you're on a game show, and   you're given the choice of three   doors: Behind one door is a car;   behind the others, goats. You pick a   door, say No. 1, and the host, who   knows what's behind the doors, opens   another door, say No. 3, which has a   goat. He then says to you, "Do you   want to pick door No. 2?" Is it to   your advantage to switch your choice?   The answer is, of course, yes - but it's incredibly un-inituitive. What misunderstanding do most people have about probability that leads to us scratching our heads -- or better put; what general rule can we take away from this puzzle to better train our intuition in the future?


I do not know how to explain what is happening, I imported a model that I had saved some time ago. But it is with the mesh in a very strange way.  I already checked play for a new project, normals, remove doubles, decimate, merge vertex loose, but nothing solves!

I have recently started using blender and one of the models I'm working on has dark shadows along edges. I started this model from scratch. I can't remember them being there when I first started the model, but I had trouble joining areas together and think I've pressed something I shouldn't have. However, there are so many options I'm not sure what I did.  Here is an image of what I mean   The one on the left has the shadow. As a test I started a new model, which is on the right in the image, and as you can see it doesn't have any shadows.  Also, occluded vertices partially show through the model. Occlusion doesn't work properly.   In orthogonal view small darkened triangles appear along the the edges.    I don't really want to start the model again from scratch so any ideas on how to remove this shadow would be great. Thanks.


I just installed Ubuntu 14.04 via a USB drive over my Windows 7, and I cannot boot into it without installing the USB. Even with USB installed, it wants me to reinstall Ubuntu every time, even though when I do that it says Ubuntu is installed and asks if I would like to install over it.  I put everything on to the USB with a program in Windows (I believe it was called Universal USB Installer). when I try to boot without a USB, it brings me to a list of boot options, but no matter which I choose, the screen says the following:  Intel UNDI, PXE-2.1 (build 883) Copyright (C) 1997-2000 Intel Corporation  This Product is covered by one or more of the following patents: US5,307,459, US5,434,072, US5,732,094, US6,570,884, US6,115,776 and US6,327,625  Realtek PCIe GBE Family Controller Series v2.35 (06/14/10) PXE-E61: Media test failure, check cable  PXE-M0F: Exiting PXE ROM

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


In chat, I can read events by sending a POST request to this URL:  http://chat.meta.stackexchange.com/chats/roomID/events   However, there seems to be a Same Origin Policy, preventing CORS. Could it be changed to allow it from everywhere?  Access-Control-Allow-Origin: *   This would make many things easier for us.

I was working on a userscript today, which had a goal of displaying chat pings immediately at the main site. This would allow me to respond more quicker-like to chat pings.  However, I was met by this fearsome warrior:     Can we please set some decent header things? I want to be able to do this really bad.


I know that this is a duplicate question, but I have read the other posts and tried the answers but none of them work. I have tried more heat, less heat, medium heat and even holding the iron to the same spot for two full minutes and it still wouldn’t stick. My solder has resin and plates on the pcb are starting to turn black. I have tried multiple different types and brands of solder. If it helps I think the contacts on the board are made of copper. EDIT: Many people have asked for clarification, so I will try to answer them as best as I can. The solder does stick to the iron and does melt, but will not stick to the pcb. I will include pictures of the me trying to solder and of the solder I am using. The temperatures I have used include: 300C 350C 390C 250C and 200C Excuse me for bad quality, my phone wouldn’t focus.

I am trying to make an LCD  from my Arduino and am having problems trying to got the solder to stick to the Freetronics  PCB. I have cleaned it as best I can.   I am using a decent Proxxon soldering bolt with solder that has worked good for me in the past. How can I get it to stick?  It won't bond to the PCB, only the wires.


I'm using Debian stable and when I use sudo apt-get update, I get this message at the end:  The AppStream system cache was updated, but some errors were detected, which might lead to missing metadata. Refer to the verbose log for more information. Reading package lists... Done E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi' E: Sub-process returned an error code   I don't know what that means and I want to fix it.

I had a problem with debian testing today when I was running an apt update with following return:  E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/cache/app-info -a -e /usr/bin/appstreamcli; then appstreamcli refresh-cache > /dev/null; fi' E: Sub-process returned an error code


How can i implement the static method get_class_name() to get the expected results.  I need to get the correct class name without instantiating. (I know this can be done with an instance). Python version is 2.6.  class base_class():     @staticmethod     def get_class_name():         return <??>  class sub_classA(base_class):     pass  class sub_classB(base_class):     pass  print sub_classA.get_class_name() # should print 'sub_classA' print sub_classB.get_class_name() # should print 'sub_classB' print base_class.get_class_name() # should print 'base_class'

What is the difference between a function decorated with  and one decorated with ?


I installed Windows 10 on my computer, followed by an installation of Ubuntu 20.04.1. However, now I'm unable to boot into my Windows 10 even though it appeared on grub menu. When I selected windows 10 on grub menu, it just shows black screen for a few second and then returned to grub menu.  What can I do to fix this?

I installed Windows on my computer, followed by an installation of Ubuntu. However, now I'm unable to boot into my Windows install.  What can I do to fix this?


My application for a standard visit visa to the United Kingdom has been refused stating that the documents I have provided do not demostrate what my finacial circumstances are and how I support myself on a daily basis. As a non working student I am financially supported by my family and in most of the cases I use my sister’s bank account (who is also a non working student in Vienna). Due to the fact that we live together, we found it more convenient to use her account for common expenses, such as rent, electricity, and food expenses etc., as well as some of my personal expenses like insurance and telefone bills. Therefore my question would be if in addition to my bank balance of the last 6 months (which is used rarely) I also provide the bank balance of my sister would it be an accurate reflection of my finacial circumstances? Otherwise how could she state that she has taken this responsibility? Moreover which supporting documents would be appropriate for me to add to the application in order to prove my intention of leaving the United Kingdom at the end of my visit and that I am able to maintain and accomodate myself there? Would it also be an advantage to include my parents’ bank statements as well? In addition to this I am planning of visiting my boyfriend there, and I would be grateful if you could provide me with some information regarding the invitation letter, such as what it should consist of and whether it is necessary or not?

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


I think turned the television on sounds better. I usually hear 'turned the television on' but I see 'turned on the television' in other references. Which is correct?

I thought of this question right after I posted a tweet about a service upgrading me to a free student account since I am in college. I said "That really helps a broke college student out." I actually paused for a second while I was writing that to decide if I should say     That really helps out a broke college student.   or     That really helps a broke college student out.   Are there any prescriptive rules about splitting phrasal verbs like this? I know this breaks the "don't put a preposition at the end of a sentence" rule, but that "rule" has an exception for phrasal verbs.  To clarify:   Is there any rule that says phrasal verbs can't be split, even if it is just an imposed, prescriptive rule? Does splitting a phrasal verb to put a preposition at the end of a sentence fall under the phrasal verb exception to the prepositions at the end of a sentence rule?


I want to include the source code of my latex generated pdf file in the pdf file itself as printed text. Is there any way to do this?

Several times now I have inadvertently lost the .tex file that generated a PDF file with pdflatex. Given what I know of the internal structure of PDF files, it should be possible to embed a text file containing the original LaTeX file into the PDF file so that it can be extracted later.   I am aware of no technology for doing this, but perhaps you are. Does anybody have something like this?


While calculating angular acceleration in a problem, about which point should we calculate the torque and why?

It is true that under equilibrium condition, no matter what pivot point one choose, the resulting net torque will always be zero. I wonder if this principle apply to non-equilibrium scenarios as well, namely, the net torque of the system being the same regardless of choice of pivot point? For example, if we put a sphere on a inclined smooth ramp, we would expect the sphere to slip down the ramp without rolling. However, if we choose the point of contact between the sphere and the surface of the ramp as the pivot point, we will have a torque due to gravity. Apparently this contradicts our assumption. What's the mistake here?


Hi   Look at the bellow question. It was asked just 2 mins before and was closed immediately. I think the user was not given enough time to edit his/her question.

Possible Duplicate:          Given a question that is not clear at first, which satisfies the criterion for being "not a real question":      "It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot   be reasonably answered in its current form."   should that question be closed immediately, or should the OP get a chance to improve the quality of his question.  My modus operandi is this: When I encounter a question which is "not a real question", I respond via a comment - I might ask one or more counter-questions (about the issue), I might comment that I don't understand the question. So, I let the OP know that his question should be improved. I then give the OP say 15 minutes to respond (and in most cases the OP does respond). However, if the OP doesn't respond, then I consider voting for "not a real question".  Is this how SO should work?   I have witnessed in the past several questions for which I saw potential, being closed immediately, and I wonder if that is appropriate.   Edit: Of course, questions that are duplicates should be closed immediately, and off-topic questions should also be moved / closed immediately. In this question I am specifically referring to those questions which "have potential" (which could be corrected / improved)..


I have a update.sh file which has below command.  shyaml get-value  platform < ~/mcp_version/latest-versions.yaml   I am able to run the command through terminal, also the command runs from script.   Below is the content of script  echo "The platform is $now" echo "PATH is '$PATH'" platform = $(shyaml get-value  platform < ~/mcp_version/latest-versions.yaml) echo "The platform is $platform" shyaml get-value  platform < ~/mcp_version/latest-versions.yaml   But when I try to assign the output of the command to a variable then it gives error. as   ./update.sh: line 12: platform: command not found   Below is the output when I run my script.  bash-4.2$ ./update.sh  The platform is Fri Jul 12 11:57:25 IST 2019 PATH is '/usr/lib64/qt-3.3/bin:/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/usr/bin/:/usr/bin/shyaml' ./update.sh: line 12: platform: command not found The platform is  19.06.00bash-4.2$

I want to assign the result of an expression (i.e., the output from a command) to a variable and then manipulate it – for example, concatenate it with a string, then echo it.  Here's what I've got: #!/bin/bash cd ~/Desktop; thefile= ls -t -U | grep -m 1 "Screen Shot"; echo "Most recent screenshot is: "$thefile;  But that outputs: Screen Shot 2011-07-03 at 1.55.43 PM.png Most recent screenshot is:   So, it looks like that isn't getting assigned to $thefile, and is being printed as it's executed. What am I missing?


Wolfram Alpha says this limit is $e/2$, which I believe plotting the sequence, however I'm struggling to prove this. I've tried to apply l'Hopital or Cesaro-Stolz to no luck. I suspect I need to cleverly manipulate the binomial expansion, but I just make a mess. Thanks.

A problem I saw recently is to compute $$\lim_{n\to\infty} n^2 \left(\left(1+\dfrac{1}{n+1}\right)^{n+1}-\left(1+\dfrac{1}{n}\right)^n\right)$$   I thought it would be fun to give this a go but it completely stumped me. I am not aware of any of the standard techniques used to compute $\infty\times (e-e)$ - type limits, bar possibly L'Hôpital's Rule. But I doubt that would be a good idea here, at best it would be ugly. I would appreciate solutions using any methods, the more elegant the better of course. Though I welcome any relevant hints as well if full solutions are discouraged.


When I try to copy a value stored in a list of list to another list of list, Spyder in Anaconda mistakenly assign the value to all lists of the first dimension.  Please see the code below.  I tried to print the value A[0][2] and self.image[2][0] before doing the assignment, they show the correct answer of 0 and 1. But when completing the task of assignment, the address of A[0][2] seems to be read in correctly as A[i][2] for all i.  class BImage(object):      def __init__(self, image):         self.image = image         self.d1 = len(image)         self.d2 = len(image[0]) if len(image) > 0 else 0      # with a strange bug     def transp_image(self):         A = [[0]*self.d1] * self.d2         for i in range(self.d2):             for j in range(self.d1):                 # error:                 # when i == 0, j == 2, self.image[2][0] == 1                 # assign the value 1 to A[][2], instead of just A[0][2]                 A[i][j] = self.image[j][i]          self.image = A         k = self.d2         self.d2 = self.d1         self.d1 = k

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


This was a short story I read in the early 2000's.  The main character is a woman and it starts off talking about her life and her husband/boyfriend who ends up passing away.  She ends up taking a new pill that stops people's aging completely.  The entire world no longer ages and as centuries go by, they no longer need their physical bodies and can choose to leave their bodies behind and explore the universe as a type of energy.  The woman chooses that path and the story is really about the experience of living "forever" and transcending into a purely mental/energy state.  If anyone has any leads I would very much appreciate it.  I read this story over ten years ago and have never forgotten it.

I believe she loses a loved one and decides to take a pill to make her better. She eventually embraces technology and becomes a interplanetary (and possibly inter-galaxy) traveler. She travels using beacons of some sort. Eventually returning to earth (Washington state area, maybe Oregon. ). Wow - I know that's vague. Thanks for any help. I did try and search.


I am training 3 different models, with varying parameters like learning_rate, regularization_strength. But number of epochs is same for all. For a fixed no. of epoch, model 2 has the highest validation loss value. But the accuracy of it is highest in test set. How can it be possible ? Or I have some bug ?

I am looking at learning curves (, which is based on ) and trying to play with regularization to prevent overfitting. This model uses L2 regularization and dropout.  What is interesting is that by looking at the accuracy graph I cannot really tell which model is the best. On the other hand the loss graph shows some differences. See pictures below.  Here are my question:    should we always look at the loss curves to check for overfitting? the accuracy graph is not very precise because accuracy is discrete and a lot of information gets lost when we compute it?


I have an array which is 1 -> 160. I want to split this into 10 arrays that are split every sixteen numbers. This is what I have so far:  amplitude=[] for i in range (0,160):     amplitude.append(i+1)  print(amplitude)   #split arrays up into a line for each sample traceno=10                  #number of traces in file samplesno=16               #number of samples in each trace. This wont change.  amplitude_split=np.zeros((traceno,samplesno) ,dtype=np.int)    #fill in the arrays with amplitude/sample numbers for i in range(len(amplitude)):                  for j in range(traceno):                         for k in range(samplesno):                       amplitude_split[j,k]=amplitude[i]    print(amplitude_split[1,:])   As an output I only get [160 160 160 160 160 160 160 160 160 160 160 160 160 160 160 160] Where I require something along the lines of:  [1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16]  [17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32] etc...

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


Help me please I need to create banner 18" wide by 360" high. Illustartor can create max 227,54 in. Its my firs so big banner. Help me please.  Here GUIDELINES: 18" wide by 360" high. Keep artwork text at least 1" away from the left and right edges, and 10" away from the top and the bottom.

For wall-sized graphics and large banners (e.g. 3m × 5m), what is an acceptable PPI for print? As I understand it 300 ppi is the typical for 'small' artworks (esp. for clean text resolution). However, for small artworks, the audience usually engages at a much closer distance. Therefore, in the interests of keeping a bitmap file down to a reasonable size, can you get away with a much-reduced PPI for a large format/banner print?