second day in android self teachin and saw this code bleow.  from what I understood, it seems to me that the code is getting the button value   final Button GetServerData = (Button) findViewById(R.id.GetServerData);   and then I am not sure what happened. Being from php background this syntax looks very unfamiliar that a method is being called as a methods parameter in here  GetServerData.setOnClickListener(new OnClickListener() {              @Override             public void onClick(View arg0) {                  // WebServer Request URL                 String serverURL = "http://androidexample.com/media/webservice/JsonReturn.php";                  // Use AsyncTask execute Method To Prevent ANR Problem                 new LongOperation().execute(serverURL);             }         });       I also am not sure what View arg0 is.       public void onCreate(Bundle savedInstanceState) {      super.onCreate(savedInstanceState);     setContentView(R.layout.rest_ful_webservice);        final Button GetServerData = (Button) findViewById(R.id.GetServerData);      GetServerData.setOnClickListener(new OnClickListener() {          @Override         public void onClick(View arg0) {              // WebServer Request URL             String serverURL = "http://androidexample.com/media/webservice/JsonReturn.php";              // Use AsyncTask execute Method To Prevent ANR Problem             new LongOperation().execute(serverURL);         }     });      }

What is the use of anonymous classes in Java? Can we say that usage of anonymous class is one of the advantages of Java?


I trying to install Uubuntu 14.04 LTS on my laptop, which is running on Windows 7 OS. But while installing the installation guide does not recognize my Windows 7 OS. It says this computer has no OS found in it whereas it has Windows 7. So finally it is giving me an option to install only Ubuntu and not alongside with Windows 7.  Or it is giving a partition option which I'm not sure how to perform. Please help.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


for example, I have two numbers: 36 and 48. their gcd is 12. 12 can be divided by any common divisors of these two numbers: 1, 2, 3, 4, 6, 12. Is there a general proof for this? Thanks!

Context: I was looking at . I didn't know the result referred to in Brian M. Scott's answer is hard enough to require a separate proof   ― .  ― .  (1)  ― What's the intuition? Is Bezout Identity supposed to be intuitive?  (2) — Why doesn't this try work? Let $c$ be any common divisor of $a, b$. Therefore $c\mid a, c\mid b \iff cj_1 = a, cj_2 = b$ for some integers $j_1, j_2$.     Call $g = \gcd$. By definition $\gcd(a,b)\mid a$ and $\gcd(a,b)\mid b$ and $c \le \gcd(a,b)$. Therefore $g\mid a, g\mid b \iff gk_1 = a, gk_2 = b$ for some integers $k_1, k_2$.   The two paragraphs together precipitate $cj_1 = a = gk_1,  cj_2 = b = gk_2$ but this only proves $c\mid gk_1, c\mid gk_2$?    Origin - Elementary Number Theory, Jones,  p9, Exercise 1.8


I am currently call the database with: $pdocon = new PDO("mysql:host=$host; dbname=$DB; charset=utf8;", $username, $password);  When I then SELECT any data that is in russian it displays as: ÐŸÐµÑ€ÐµÐ¹Ñ‚Ð When the charset=utf8 is removed they display correctly. The problem is when the charset=utf8 is removed certain german characters display incorrectly. How would I get it so both russian and german characters are pulled from and display correctly?

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 physics question that I don't understand conceptually:     The coefficient of kinetic friction between a skier's skis and the snow is 0.18 when the skier is sliding down one side of the valley. As the skier moves up the other side of the valley, the coefficient of kinetic friction exceeds 0.18 because gravity is acting against the skier's motion. True or False?   The answer is apparently false, but that doesn't make sense because the skier is slowing down, and therefore the coefficient of kinetic friction has to be increasing to go against its movement.  Any help would be appreciated.

Possible Duplicate:          Layman alert...I last did physics in high school, and am just trying to understand something my son is working on.   To keep a box moving across the floor at a constant velocity I need to apply a force equal and opposite to that of the  force working on it.  If I start applying a force greater than the kinetic friction force, the box will speed up. Will it keep speeding up indefinitely, or will the kinetic friction force I need to overcome increase as the box gets faster?


I am new to coding and I was creating a metaData conversion function the format for the new file has a date and time stamp in this format yyyymmdd_hhmmss. I created the following code with a series of if statements because the original metaData had the day/month listed as a single digit (double when necessary. I assume there is a more elegant way to accomplish this task and for learning purposes and readability/simplicity. Any suggestions would be appreciated! Any other suggestions for simplification of the code is also appreciated, thanks.  for fileExt in fpath:             with open(fileExt) as f:                 data = json.loads(f.read())                 if 'animalID' in data:                     ext=fileExt.replace('\\metaData.json', '\\Miniscope\\metaData.json')                     animalID=data['animalID']                     timeStamp=data['recordingStartTime']                     year=str(timeStamp['year'])                     month=str(timeStamp['month'])                     if len(month) < 2:                         month=str(0)+month                     day=str(timeStamp['day'])                     if len(day) < 2:                         day=str(0)+day                     second=str(timeStamp['second'])                     if len(second) < 2:                         second=str(0)+second                     minute=str(timeStamp['minute'])                     if len(minute) < 2:                         minute=str(0)+minute                     hour=str(timeStamp['hour'])                     if len(hour) < 2:                         hour=str(0)+hour                     date=year+month+day+'_'+hour+minute+second                     with open(ext) as d:                         data2 = json.loads(d.read())                         frameRate=float(data2['frameRate'])                         jdict ={'origin':animalID,'fps':frameRate,'date':date,                                 'orig_meta':[data,data2]}                         jsonFile=json.dumps(jdict,indent=4)                         newFileName=ext.replace('\\metaData.json', '\\metaDataTif.json')                         n = open(newFileName, 'w')                         n.write(jsonFile)                         n.close()

What is a Pythonic way to pad a numeric string with zeroes to the left, i.e. so the numeric string has a specific length?


I would like to do the follow redirection using htaccess:  From:  To:   However, all of the parameters change quite a lot apart from page_id, so if it is possible to redirect all of these pages without having to do one for each possibility, that would be ideal. Thanks in advance for any help received,

I am wondering what primers/guides/tutorials/etc. are out there for learning to rewrite URLs using Apache/.htaccess? Where is a good place to start?  My primary interest is learning how to point certain directories to others, and how to use portions of a URL as parameters to a script (i.e. "/some/subdirs/like/this" => "script.php?a=some&b=subdirs&c=like&d=this").


Assume that $X \sim Ga(\alpha_1, \beta_1)$ and $Y \sim Ga(\alpha_2, \beta_2)$. Define $Z= X/Y$. What 's the distribution of $Z$?

I encounter a problem which I thought I can handle, however, I struggle a lot with finding a solution:  The following setting applies: I want to compute the posterior probability of an event, which is defined as the fraction of two distinct arrival rates of, lets say, some agents. So I define as priors for the arrival rates $\mu$ and $\varepsilon$ Gamma distributions with parameters $\mu\sim G(\alpha_\mu,\beta)$ and $\varepsilon\sim G(\alpha_\varepsilon,\beta)$.    The event I am interested in depends on some constant $1>c>0$ and is characterized by $$P = \frac{c(\varepsilon+\mu)}{\varepsilon + c\mu}.$$ Well, the nominator takes the form $c(\varepsilon+\mu) \sim G(\alpha_\mu + \alpha_\varepsilon, \frac{\beta}{c})$, however, as the two parts in the denominator do not have the identical scale parameter I cannot simply identify the distribution of $P$ as a beta distribution as would be the case given I would simply compute $\frac{x}{y+x}$ with $x\sim G(\alpha_1,\theta), y\sim G(\alpha_2,\theta)$.   Is there any way to overcome this problem and to find the probability distribution of $P$? Or, is there another distribution which would give me some closed form solutions for $P$?


My production server's database grows unexpectedly and almost I am going to create a job for shrinking the database which runs once in a month. Is it a good idea?  The backups was failed and the time of failure huge transactions were logged which rapidly grows the DB.  I am using SQL Server 2008 R2.

I know shrink is the devil: It reverses page order and is responsible for skin cancer, data fragmentation, and global warming.  The list goes on... That being said, say I have a 100 GB database and I delete 50 GB of data -- not on one table, but a general pruning of old data on a database wide level, covering 90% of the tables -- does this constitute an appropriate use case for shrinking the database?  If not, what are the appropriate steps to take to clean house after removing such a high percentage of data from a database?  I can think of two: Rebuild Indexes and Update Stats. What else?


I was about to install opencart on my Ubuntu 14.04 LTS.  I will describe my exact steps-   Extracted the opencart.zip. gksudo nautilus Pasted the opencart folder into /var/www/html Now while accessing localhost/open, it says Forbidden Access.   I checked the permission of /open, it was drwx------ 7 root root 4096 Oct 26 17:26 open. So basically, it was 700 (I'm not sure though), but I got a sense that permissions needed to be provided to access them.  So I fired terminal, and went on a spree to give all folders a permission of 755 and files - 644.  Three questions-   Was I right till here or not ? If yes, what is the correct way to set permissions ? I did chmod for all folders & files individually (with the help of wildcards, obviously). This is actually a very hectic step. There are hundreds of files and folders, so this must not be the right way. What am I missing ? Even last time, I messed up with some permissions of some folders in /www, and it rendered me to install Ubuntu. Either there has to be a way to fiddle with /www or should I go with changing default /www-data directory ? (No idea how to go ahead with that).   I really want to stick with Linux but this permission thingy is always nagging me.  PS: Right now, if I access /open, it opens a blank page.  Thanks, help much appreciated.

I want to stop having to use sudo everytime I work in /var/www. How can I do that? I simply want to put all of my sites into this directory and work with them without too much pain.


This is what it looks like when I rendered an image of my final work   But after I rendered animation on it, the donut's changed color.   I'm new to Blender, I'm following the tutorial on Youtube for this project.   Can someone tell me the possible solution for this? I want it to look like the first image when it is rendered in animation.

I made a character, and its one of my first times texturing, and I saved my character into a new folder, and when I came back to the model ALL the textures were pink, I used to know what to do, but I stopped texturing, how do I bring my textures back?


I have the following loop, but it doesn't stop and produces the wrong dates.  #!/bin/bash i=0 thedate="2018-03-28" enddate="2018-04-02" while [ "$thedate" != "$enddate" ]; do     thedate=$( date -d "$thedate + $i days" +%F )      new_date=$( date -d "$thedate " +%Y%m%d )     printf 'The date is "%s"\n' "$new_date"     i=$(( i + 1 )) done   I expected this output:  The date is "20180328" The date is "20180329" The date is "20180330" The date is "20180331" The date is "20180401" The date is "20180402"   How can I achieve this?

i want while loop syntax in UNIX for date 2018-03-28 to 2018-04-02


what is the meaning of this sentence:  "Gold and silver ornaments are precious."   Does it mean that: 'ornaments made of gold and ornaments made of silver are precious'  I mean does it refer to two different types of ornaments ,i.e., gold ornaments and silver ornaments or does it mean that 'ornaments containing both gold and silver are precious'   That is referring to only one type of ornaments which are made up of both gold and silver (like 14k yellow gold) Thanks

Could we use one adjective for two nouns? Is the following sentence correct?     It has low speed and voltage.


I have a virtual server that runs multiple VPS on it, when we backup to a usb external hard drive the load increases to about 10 on the mail server with sendmail we get this in the log file  rejecting connections on daemon MTA: load average: 10   I know it is trying to easy the load on the server by not taking on any new connections and I know how to increase the value in the config file. My question is how high can I set it before I will loose mail?   I also use fetchmail and I am not sure what happens to the mail if it fetches it and then sendmail does not accept it.  So high can I make the load and what happens to the mail if fetchmail fetched it and cant hand it off to sendmail?  This only happens late at night when we do the backups.  [root@sogo ~]# grep 'LA=' /etc/mail/sendmail.cf O QueueLA=8 O RefuseLA=10 #O DelayLA=0

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I recently checked my system to clean out a few items and noticed my system files are taking an insanely large amount of my storage. This feels quite unnatural, is there a away to find what might be cluttering it up?

I have a 250G disk on my Mac with around 100G in use. But the system reports only around 20G of free space. I'm using macOS 10.13.2. I have the problem at least since the upgrade to High Sierra, but probably also before.  "About This Mac" --> "Storage" reports that "System" is using around 180G. But if I check the complete disk, it looks like that:  $ sudo du -cxhd 1 /   0B    /.HFS+ Private Directory Data 1.0K    /home 4.3G    /usr 4.2G    /.Spotlight-V100 1.0K    /net  34G    /nix   0B    /.PKInstallSandboxManager   0B    /.PKInstallSandboxManager-SystemSoftware 2.6M    /bin   0B    /Network 1.1M    /sbin 3.8G    /Library   0B    /.Trashes 6.5G    /System 476K    /.fseventsd du: /private/var/db/ConfigurationProfiles/Store: Operation not permitted du: /private/var/folders/z7/[...]/0/SafariFamily: Operation not permitted du: /private/var/folders/z7/[...]/0/com.apple.LaunchServices.dv: Operation not permitted du: /private/var/folders/z7/[...]/0/com.apple.nsurlsessiond: Operation not permitted du: /private/var/folders/z7/[...]/0/com.apple.routined: Operation not permitted du: /private/var/folders/zz/[...]/0/com.apple.nsurlsessiond: Operation not permitted 8.0G    /private 8.6M    /.DocumentRevisions-V100   0B    /.vol  32G    /Users  11G    /Applications 207M    /opt 5.0K    /dev 4.0K    /Volumes   0B    /cores 104G    / 104G    total   df also says that only 20G are available:  $ df -h / Filesystem     Size   Used  Avail Capacity iused               ifree %iused  Mounted on /dev/disk1s1  234Gi  211Gi   20Gi    92% 4019132 9223372036850756675    0%   /   Any tool I was using (Finder, Disk Inventory X, etc.) shows more or less the same numbers like df and du.  Output of mount:  $ mount /dev/disk1s1 on / (apfs, local, journaled) devfs on /dev (devfs, local, nobrowse) /dev/disk1s4 on /private/var/vm (apfs, local, noexec, journaled, noatime, nobrowse) map -hosts on /net (autofs, nosuid, automounted, nobrowse) map auto_home on /home (autofs, automounted, nobrowse)   I read and tested many, many things like:         ... but with no success. So what could consume more than 100G of disk space without showing up in any tool?  Update  Running „First Aid“ in recovery mode:   What does this error message mean?  error: btn:1: invalid key order (1) oid 440198 / oxid 114577 fsroot tree is invalid.   Update 2018-01-25  Another report of the same error:  (but no answers, yet)  I'm pretty sure this file system error is the root cause for the missing disk space. But I have no idea how to fix that. I was hoping that 10.13.3 would maybe solve it, but it didn't change anything. I guess I need to reinstall...


just trying to figure out why I cannot get the footer to the bottom of the page (when the "latest" articles are in a 3x2 grid). I have posted all my HTML and CSS here because I am not sure where the problem is specifically.   Here is my HTML:      <link rel="stylesheet" href="stylesheet.css" type="text/css"/>   <title></title>

     I think the problem is somewhere here maybe the "containerMedium" and "latest" classes.  Here is my CSS:   /*CSS RESET*/  html, body, div, span, h1, h2, h3, h4, h5, h6, p, a, img, ol, ul, li, table, tbody, tfoot, thead, tr, th, td, embed, footer, header, nav{     margin: 0;     padding: 0;     border: 0;     font-size: 100%;     font: inherit;     vertical-align: baseline; }  /*CSS RESET*/  html, body{     height:100%; }  #container{     position: relative;     height: 100%;     min-height: 100%;     background-color: tomato; }  header{     height: 100px;     width: 100%;     background-color: slateblue; }  #containerLarge{     padding-bottom: 100px; /*Footer Height*/     height: 75%;     width:100%;     background-color: white;     border-top-left-radius: 15px;     border-top-right-radius: 15px; }  .heading{     height: 50px;     width: 100%;     background-color: pink; }  #featured{     margin-left: auto;     margin-right: auto;     text-align: right;     height: 300px;     width: 600px;     background-color: royalblue; }  .button{     display: inline-block;     margin-right: 30px;     margin-top: 220px;     height: 50px;     width:200px;     background-color: gold;     border-radius: 25px; }  .containerMedium{     display: block;      margin-left: auto;     margin-right: auto;     text-align: center;     height: 600px;     width: 50%;     background-color: crimson; }  .latest{     display: inline-block;     margin-left: auto;     margin-right: auto;     height: 300px;     width: 200px;     background-color: springgreen; }  footer{     position: absolute;     bottom: 0px;     height: 100px;     width: 100%;     background-color: deeppink; }   Thanks for your help!  Josh

I have a simple 2-column layout with a footer that clears both the right and left div in my markup.  My problem is that I can't get the footer to stay at the bottom of the page in all browsers.  It works if the content pushes the footer down, but that's not always the case.


I'm currently using the latest version on Ubuntu. It's great but I would like to use windows 10 as there are many more games and aplications running on that operating system. Is there any way i can dual boot or get windows without loosing all of my data.  I'm new to computer stuff as i have only just built mine. Thanks in advance.

I currently have Windows 7 on my computer and I want to install Ubuntu alongside Windows safely.  Could someone please provide clear instructions?


When i run my java code:  public class LalaLuLu { public static void main(String[] args) {      try{          String path = "D:/Gem/FINAL/Datatest.csv";         File file = new File(path);         InputStream is;         System.out.println(file.exists());          FileReader fr = new FileReader(file);         BufferedReader br = new BufferedReader(fr);          PrintWriter os = new PrintWriter ( new FileOutputStream("D:/Gem/FINAL/out_datatest1.txt"));         String output = "";         int count = 0;         do{             output = br.readLine();             String[] a = output.split(";");             System.out.println("total kolom: " + a.length);             os.println(output);             System.out.println(count++ );         } while (!output.equals(""));      } catch (Exception e) {         e.printStackTrace();     } } }   When i run, the error on this line :  output = br.readLine(); String[] a = output.split(";");   And error I am getting is:  java.lang.NullPointerException   at DAO.readdata.readdataCSV(readdata.java:47)   Can you tell me how to solve this error? Thank you

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 have a perplexing problem that I am finding difficult to work through.  I have 2 tables in my MYSQL database containing similar data. I'll outline just the pertinent information.  Table1 - ezpay_Usage Columns: ticket_ID date_opened date_closed - No data in this column yet  Table2 - Closed_Tickets Columns: ticket_ID date_opened date_closed - Has all the data  Table2 has data in the column "date_closed". We just changed out DB Structure and added the same column to Table1 (Currently has no data in that column though). Both columns will reference the same data and going forward will be updated in unison.   My questions is, how can I update all the existing records in Table1 with the data for the date_closed column by comparing it to the data in Table2.  I was thinking perhaps this way?:  First, Query The Table with the Data in question  <cfquery name="source_table" datasource="#datasource#">     select *      from closed_tickets  </cfquery>'   Second, query the table I want to update  <cfquery name="tableToBeModified" datasource="#datasource#">     select *     from ezpay_usage </cfquery>   Then, run an update query on the table I want to update  <cfquery name="update" query="#datasource#">     update ezpay_usage     set date_closed = #source_table.closed_date#     where ticket_id = #source_table.tciket_id# </cfquery>   Anyone have any suggestions for me? Thanks.

I have a database with account numbers and card numbers. I match these to a file to update any card numbers to the account number, so that I am only working with account numbers.   I created a view linking the table to the account/card database to return the Table ID and the related account number, and now I need to update those records where the ID matches with the Account Number.  This is the Sales_Import table, where the account number field needs to be updated:  LeadID  AccountNumber 147         5807811235 150         5807811326 185         7006100100007267039   And this is the RetrieveAccountNumber table, where I need to update from:  LeadID  AccountNumber 147         7006100100007266957 150         7006100100007267039   I tried the below, but no luck so far:  UPDATE [Sales_Lead].[dbo].[Sales_Import]  SET    [AccountNumber] = (SELECT RetrieveAccountNumber.AccountNumber                            FROM   RetrieveAccountNumber                            WHERE  [Sales_Lead].[dbo].[Sales_Import]. LeadID =                                                  RetrieveAccountNumber.LeadID)    It updates the card numbers to account numbers, but the account numbers gets replaced by NULL


Is there a way to create an official installation media e.g .ISO file from Microsoft without using admin rights? I am looking to download the official .ISO file for Windows 10 as a limited user.  I understand Microsoft offers such a tool from their website: . Additionally some sites claim to offer .iso downloads of various Windows installations, but may be untrustworthy or potentially outdated.  Long back I used to download official .ISO from Microsoft Digital River Content website and that was for Windows 7, and could do that easily without needing an installer nor admin rights  but now since it is a bit difficult to get the files directly from Microsoft servers, I am looking for a way to get the file on a limited user account.  I am running Windows 10 education, non admin account, but the current system is giving me problem and I wish to get the .iso file of the latest April update, but not via Windows update as internet connection is not reliable

I need to repair my Windows 10 installation. Where can I get a clean ISO (with install.wim, no Install.ESD, so that I can run DISM against the WIM) of the specific Windows 10 build required for this?  In my case, I need the Anniversary update (Build 14393), Creators Update (Build 15063) or Fall Creators Update (Build 16299.15).


I have used debug log of previous releases. But the winter '16 release debug log has new terms like Traced Entity and Debug Level. Help for this page does not give much clarity.     can you help me out with this???

I wanted to set the debug log to test a class but today after few days when I was trying to set it, I saw its new look and feel in winter'16 release. It asked for event, level etc. I am unable to set the "Debug Level". I have no idea what value to provide there. Can anyone help me in explaining how to set it as It is a mandatory field :-(    Thanks! Ruchi


I was trying to find the square root of a complex number $w=u+iv$, I assumed $z^2=(x+iy)^2=w$ Now solving this equation I got two values of $x$ and two values of $y$ in terms of $u$ and $v$. So, I get a possible of 4 solutions. But fundamental theorem of algebra says it has exactly two roots. What are these two roots?  My work $x=\pm \sqrt {\sqrt {u^2+v^2}+u}$ and $y=\pm \sqrt {\sqrt {u^2+v^2}-u}$

If I'm given a complex number (say $9 + 4i$), how do I calculate its square root?


I normally use uname to determine which OS is running, but I have accounts on several machines where I don't know the particular distribution that is running.  When uname returns Linux, I tried uname -a and I see only the following:   Linux host123 3.0.58-0.6.6-pae blah blah blah i686 i686 i386 GNU/Linux   My guess is this is a SUSE distribution, but is there a better way to know which distribution is installed similar to how uname normally shows AIX, Darwin, etc...?

I'm working on a simple bash script that should be able to run on Ubuntu and CentOS distributions (support for Debian and Fedora/RHEL would be a plus) and I need to know the name and version of the distribution the script is running (in order to trigger specific actions, for instance the creation of repositories). So far what I've got is this:  OS=$(awk '/DISTRIB_ID=/' /etc/*-release | sed 's/DISTRIB_ID=//' | tr '[:upper:]' '[:lower:]') ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/') VERSION=$(awk '/DISTRIB_RELEASE=/' /etc/*-release | sed 's/DISTRIB_RELEASE=//' | sed 's/[.]0/./')  if [ -z "$OS" ]; then     OS=$(awk '{print $1}' /etc/*-release | tr '[:upper:]' '[:lower:]') fi  if [ -z "$VERSION" ]; then     VERSION=$(awk '{print $3}' /etc/*-release) fi  echo $OS echo $ARCH echo $VERSION   This seems to work, returning ubuntu or centos (I haven't tried others) as the release name. However, I have a feeling that there must be an easier, more reliable way of finding this out -- is that true?  It doesn't work for RedHat. /etc/redhat-release contains : Redhat Linux Entreprise release 5.5  So, the version is not the third word, you'd better use :  OS_MAJOR_VERSION=`sed -rn 's/.*([0-9])\.[0-9].*/\1/p' /etc/redhat-release` OS_MINOR_VERSION=`sed -rn 's/.*[0-9].([0-9]).*/\1/p' /etc/redhat-release` echo "RedHat/CentOS $OS_MAJOR_VERSION.$OS_MINOR_VERSION"


In my Windows host, I have an Arch linux VirtualBox guest. I setup a Windows folder as a shared folder in VBox. I then manage to mount the folder as type vboxsf in my guest (done in /etc/fstab), but the owner is root, not my user.  How can I control who the owner of the mounted filesystem is?  chown did not work at all, not chown -R on the unmounted mounting point either.

I'm trying to recursively chown a VirtualBox shared folder, but I can't get it to work:  $ ls -lah total 16K drwxr-xr-x  4 root root   4.0K Aug  1  2012 . drwxr-xr-x 23 root root   4.0K Jul 21  2012 .. drwxrwx---  1 root vboxsf 4.0K May  4 17:02 sf_dev drwxrwx---  1 root vboxsf 4.0K Sep  2 10:21 sf_dropbox $ sudo chown -R pknight:pknight sf_dropbox && ls -lah total 16K drwxr-xr-x  4 root root   4.0K Aug  1  2012 . drwxr-xr-x 23 root root   4.0K Jul 21  2012 .. drwxrwx---  1 root vboxsf 4.0K May  4 17:02 sf_dev drwxrwx---  1 root vboxsf 4.0K Sep  2 10:21 sf_dropbox   I'm aware that I could just add a user to the vboxsf group (as it has full permissions), but I don't want to give every user/daemon full permissions to all of my shared folders.  I'm running VirtualBox 4.2.x, with Windows 7 as the host and both Xubuntu and Debian as guests.  Is there any way for me to change the owner/group of my VirtualBox shared directory?


I have my pom.xml:  <properties>     <jdk.version>1.6</jdk.version>     <spring.version>3.2.8.RELEASE</spring.version>     <spring.security.version>3.2.3.RELEASE</spring.security.version>     <jstl.version>1.2</jstl.version>     <mysql.connector.version>5.1.30</mysql.connector.version> </properties>  <dependencies>      <!-- Spring 3 dependencies -->      <dependency>         <groupId>org.springframework</groupId>         <artifactId>spring-core</artifactId>         <version>${spring.version}</version>     </dependency>      <dependency>         <groupId>org.springframework</groupId>         <artifactId>spring-web</artifactId>         <version>${spring.version}</version>     </dependency>      <dependency>         <groupId>org.springframework</groupId>         <artifactId>spring-webmvc</artifactId>         <version>${spring.version}</version>     </dependency>      <dependency>         <groupId>org.springframework</groupId>         <artifactId>spring-jdbc</artifactId>         <version>${spring.version}</version>     </dependency>     <!-- Spring Security -->     <dependency>         <groupId>org.springframework.security</groupId>         <artifactId>spring-security-web</artifactId>         <version>${spring.security.version}</version>     </dependency>      <dependency>         <groupId>org.springframework.security</groupId>         <artifactId>spring-security-config</artifactId>         <version>${spring.security.version}</version>     </dependency>      <!-- Spring Security JSP Taglib -->     <dependency>         <groupId>org.springframework.security</groupId>         <artifactId>spring-security-taglibs</artifactId>         <version>${spring.security.version}</version>     </dependency>      <!-- jstl for jsp page -->     <dependency>         <groupId>jstl</groupId>         <artifactId>jstl</artifactId>         <version>${jstl.version}</version>     </dependency>      <dependency>         <groupId>mysql</groupId>         <artifactId>mysql-connector-java</artifactId>         <version>${mysql.connector.version}</version>     </dependency>      <!-- MySQL database driver -->     <dependency>         <groupId>mysql</groupId>         <artifactId>mysql-connector-java</artifactId>         <version>5.1.9</version>     </dependency>      <dependency>         <groupId>javax.servlet</groupId>         <artifactId>servlet-api</artifactId>         <version>2.5</version>         <scope>provided</scope>     </dependency> </dependencies>   I want include new dependency spring:  <dependency>         <groupId>org.springframework</groupId>         <artifactId>spring</artifactId>         <version>2.5.6</version>     </dependency>   But I get errors in my program:      org.springframework.web.context.ContextLoader.initWebApplicationContext                 Context initialization failed     org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from ServletContext resource [/WEB-INF/spring-security.xml];     nested exception is java.lang.NoSuchMethodError: org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.getLocalName(Lorg/w3c/dom/Node;)Ljava/lang/String;  What does it mean?  How can I include my dependency? Maybe there are versions error?

I'm getting a NoSuchMethodError error when running my Java program.  What's wrong and how do I fix it?


How come that searching for "-1" on Google Search Engine returns: Your search - -1 - did not match any documents. Suggestions: Make sure that all words are spelled correctly. Try different keywords. Try more general keywords. Aren't there really results for -1?

It only rarely happens, but once or twice I've found it desirable to be able to search the web for a set of search terms that includes a negative number. Unfortunately there doesn't seem to be any obvious way to do this.  Simply including the number, e.g. -9 in the search terms will cause Google to exclude all results containing the number 9, since it treats - as an exclusion operator. Alone, a search for -9 .  Similarly, enclosing it in quotes "-9" returns , not -9. But I need to disambiguate them: in my particular search, results including 9 are useless while I actually need results for -9.  A  indicates that even Google's own employees don't know how, or if, this can be done.  Is it even possible to do this at all?


I use 18-140 Nikkor . This lens have two A & M focus mode and this lens is AF-S that mean when auto focus is enable the focus ring dose't move. If i do manual focus when the lens is at A mode , does it harm the lens ? or its safe.

What happens to a lens when you turn the focus ring during AF mode?  I have read that this causes damage, or can cause damage. But what is actually happening? I've done this recently with my Canon EF 50mm 1.8 lens.  Is a lens damaged after doing this once or does it have to happen multiple times?


I'm trying to install  on my Ubuntu box (11.04). The website has a Ubuntu .deb available for download (for 10.10 and 10.04 so I chose 10.10).   However,   sudo dpkg -i mysql-workbench-gpl-5.2.34-1ubu1010-amd64.deb   yields:  (Reading database ... 194069 files and directories currently installed.) Preparing to replace mysql-workbench-gpl 5.2.34-1ubu1010 (using mysql-workbench-gpl-5.2.34-1ubu1010-amd64.deb) ... Unpacking replacement mysql-workbench-gpl ... dpkg: dependency problems prevent configuration of mysql-workbench-gpl:  mysql-workbench-gpl depends on libctemplate0; however:   Package libctemplate0 is not installed.  mysql-workbench-gpl depends on libpython2.6 (>= 2.6); however:   Package libpython2.6 is not installed.  mysql-workbench-gpl depends on libzip1 (>= 0.8); however:   Package libzip1 is not installed.  mysql-workbench-gpl depends on python-paramiko; however:   Package python-paramiko is not installed.  mysql-workbench-gpl depends on python-pysqlite2; however:   Package python-pysqlite2 is not installed. dpkg: error processing mysql-workbench-gpl (--install):  dependency problems - leaving unconfigured Processing triggers for bamfdaemon ... Rebuilding /usr/share/applications/bamf.index... Processing triggers for desktop-file-utils ... Processing triggers for python-gmenu ... Rebuilding /usr/share/applications/desktop.en_US.utf8.cache... Processing triggers for python-support ... Errors were encountered while processing:  mysql-workbench-gpl   My question is, is there a way to tell dpkg to automatically fetch missing dependencies, or do I need to manually apt-get install missing packages like libctemplate0 and  libpython2.6?   (Or alternatively, is there some other way to get MySQL Workbench easily up & running?)

Installing Deb packages on the command line, using dpkg -i, only installs the package in question and displays errors of unresolved dependencies (manually solved by apt-geting the packages it complains about). How do I automatically resolve dependencies when installing standalone packages?


Let us say the vector $u = (1 - i, 2 + 3i, 5)$.  How would I find $\|u\|$?  I have tried solving this through:  $\sqrt{(1-i)^2 + (2+3i)^2 + 5^2}$  But I ended up needing to find the square root of a complex number, which from what I understand is impossible.

I want to take the inverse of a dot product, where both vectors have complex components.  In other words, if $\textbf{A} \cdot \textbf{B} = d$, and I know $\textbf{A}$ and $d$, I want to find a $\textbf{B}$.  I know that I cannot do so uniquely, which is fine; I have a procedure for creating a set of vectors that will satisfy $\textbf{A} \cdot \textbf{B} = d$.  But, it relies on finding vectors that are orthogonal to $\textbf{A}$ and each other.  Normally this would not be a problem; just take $\textbf{A}$, zero all but two of its components, switch the last two, and negate one of them.  Make sure it's a different pair every time.  For more orthogonal vectors, you can take cross products.  The difficulties arise when I consider vectors with complex components.  I want to normalize each of the orthogonal vectors, which means divide by their magnitudes.  I have read that you need to divide by $\sqrt{|v_x|^2 + |v_y|^2 + |v_z|^2 ...}$.  What is the justification for this?  Since I am just normalizing vectors, do I absolutely have to take the magnitudes of the components?  Also, My technique of finding the inverse dot product relies on the identity $\textbf{A} \cdot \textbf{B} = d = |\textbf{A}||\textbf{B}|$.  What modifications might I need to make?  I can post more details if people want.  Also, if anyone has links to stuff to read about, especially with regards to the reasons why, I would be most appreciative.


Suppose that $f$ is differentiable for all $x$, and that $\lim_{x\to \infty} f(x)$ exists.  Prove that if $\lim_{x\to \infty} f′(x)$ exists, then $\lim_{x\to \infty} f′(x) = 0$, and also, give an example where $\lim_{x\to \infty} f′(x)$ does not exist.  I'm at a loss as to how to prove the first part, but for the second part, would a function such as $\sin(x)$ satisfy the problem?

I've been trying to solve the following problem:  Suppose that $f$ and $f'$ are continuous functions on $\mathbb{R}$, and that $\displaystyle\lim_{x\to\infty}f(x)$ and $\displaystyle\lim_{x\to\infty}f'(x)$ exist. Show that $\displaystyle\lim_{x\to\infty}f'(x) = 0$.  I'm not entirely sure what to do. Since there's not a lot of information given, I guess there isn't very much one can do. I tried using the definition of the derivative and showing that it went to $0$ as $x$ went to $\infty$ but that didn't really work out. Now I'm thinking I should assume $\displaystyle\lim_{x\to\infty}f'(x) = L \neq 0$ and try to get a contradiction, but I'm not sure where the contradiction would come from.   Could somebody point me in the right direction (e.g. a certain theorem or property I have to use?) Thanks


This was posted on facebook and people are saying it is incorrect, it should be: "...as you and I"   Which is correct?

Consider the sentence "I can run faster than 15 miles per hour." Its meaning is clear and to my eyes obviously grammatically correct. Now let me present some variations that have given me trouble for a long time.  I am faster than 15 miles per hour. – To me this is clearly incorrect. Directly comparing me to a speed doesn't seem right. We need to compare my speed to a speed, or me to another person.  I can run faster than him. – Compared to the base sentence, there is a distinct shift in meaning of the comparison. While before I named a speed faster than which I can run, now I am naming a person. It doesn't seem quite right. I realize the parts of speech can change, but my initial objection is that "him" is not a speed.  I can run faster than he. – This seems most correct to me, but still somehow feels objectionable. Is this in fact the correct way to say it? And if so, is it proper as is or need I say "... faster than he can" or even "... faster than he can run?"  I am faster than him. – With "am" instead of "can run" it now seems slightly more correct. But is it?  I am faster than he. – I'm in doubt here. It doesn't seem wrong to me to say, "I am faster than he is" or even "I am faster than he is fast." (Though I suppose that is a given since I could hardly properly compare to some other category as in "I am faster than he is smart.")  My speed is faster than his. – Hmm. This seems more proper as "my speed is greater than his."   So which of these constructions is correct and which is incorrect? Is there a general rule that I can follow? UPDATE The scholarly article  may be of great interest to some readers!  Once we accept that the elided constituent and its antecedent can differ in form, it becomes reasonable to ask how large this difference can be. The answer in Rooth (1992), Fiengo and May (1994), Chung et al. (1995) and subsequent work is that the wiggle room is actually quite small: the elided constituent and its antecedent are allowed to differ only in the realization of inﬂectional morphology. Other than that, both constituents have to be syntactically and lexically isomorphic.


I working on macOS Mojave 10.14.5  I am new to macOS and I don't know much about installing different versions. I can't dare to uninstall the current as I am afraid to lose my file and installed packages.   how can I safely downgrade to 10.11 or 10.10?  Updates: info about my MacBook:   MacBook Pro (Retina, 13-inch, Late 2013)  The reason why I want this is that I want to install wifi USB adapter but it seems that it's only compatible with os 10.11 or below that. Having this wireless adapter working is so much important to me though.   Adapter details:  EDUP 802.11n USB Wireless  Model : EP-N8553

Sometimes it's hard to search for older versions of macOS & OS X  on the App Store.  This is an attempt to provide the canonical QA for this issue, as per the Meta QA -  I expect it to be modified over time to hopefully become a complete information resource.  How can I get any older version of a Mac OS to be able to run as a VM, or to reinstall on my Mac?


I am trying to install postman in Ubuntu 16.04.I ran the commands:  wget https://dl.pstmn.io/download/latest/linux64 -O postman.tar.gz  sudo tar -xzf postman.tar.gz -C /opt rm postman.tar.gz sudo ln -s /opt/Postman/Postman /usr/bin/postman   I did not get any message about the installation. I tried to find the application in Desktop and Ubuntu Software Center. But I did not find postman. Have I done something wrong? How should I install this application?

I just installed Oneiric Ocelot, and I can't figure out how to add an application, which is stored in my home directory, to the dash. I can create a launcher, but I want it in the dash also.


I have Kubuntu 19.04 installed on a home server and unfortunately I never upgraded it. I am getting "Unable to correct problems, you have held broken packages" when I try to install packages like soundkonverter. I have tried doing a release upgrade but upgrading from disco to focal is not supported. What can I do to get on 20.04?

I'm trying to upgrade from 18.10 to 19.10, using sudo do-release-upgrade however I only get an error: An upgrade from 'cosmic' to 'eoan' is not supported with this tool. I performed the steps to update my sources.list to point to old-release server, as suggested here:  This did not help. I get the same error.


I wanted to know the difference between StringBuilder & StringBuffer classes and thier practical use. So,I wrote 2 code snippets in which I spawn 3 threads simultaneously which make use of StringBuilder & StringBuffer objects.  When I run the code, i expect all the 3 threads to run simultaneously in case of StringBuilder & in synchronized manner in case of StringBuffer. But in BOTH the cases, they run in synchronized manner.  then what is the use of StringBuffer class?:confused:   (In case of String objects, all the 3 threads run simultaneeously). I will share the code snippets for your reference. Please also correct me if I'm wrong in understanding the concept of multi-threading itself. And please, also correct the code.  // StringBuilder...  public class MultiTread implements Runnable{ private StringBuilder name; public MultiTread(StringBuilder string){ name=string; }  public void run(){ for(int i=0; i<=10; i++){ System.out.println(name.append(i)); } } public static void main(String[] args){ Thread th = new Thread(new MultiTread(new StringBuilder("thread1:"))); Thread th1 = new Thread(new MultiTread(new StringBuilder("thread2:"))); Thread th2 = new Thread(new MultiTread(new StringBuilder("thread3:")));  th.start(); th1.start(); th2.start(); } }  ..................  //StringBuffer...  public class MultiTreadBuf implements Runnable{ private StringBuffer name; public MultiTreadBuf(StringBuffer string){ name=string; }  public void run(){ for(int i=0; i<=10; i++){ System.out.println(name.append(i)); } } public static void main(String[] args){ Thread th = new Thread(new MultiTreadBuf(new StringBuffer("thread1:"))); Thread th1 = new Thread(new MultiTreadBuf(new StringBuffer("thread2:"))); Thread th2 = new Thread(new MultiTreadBuf(new StringBuffer("thread3:")));  th.start(); th1.start(); th2.start(); } }  ........  //String....  public class MuiltiTreadStr implements Runnable{ private String name; public MuiltiTreadStr(String string){ name=string; }  public void run(){ for(int i=0; i<=10; i++){ System.out.println(name+i); } } public static void main(String[] args){ System.out.println("main begins..."); Thread th = new Thread(new MuiltiTreadStr("thread1:")); Thread th1 = new Thread(new MuiltiTreadStr("thread2:")); Thread th2 = new Thread(new MuiltiTreadStr("thread3:")); System.out.println("spawning 3 threads..."); th.start(); th1.start(); th2.start(); System.out.println("main ends..."); } }

What is the main difference between StringBuffer and StringBuilder? Is there any performance issues when deciding on any one of these?


Hope somebody can point me in the right direction.  When i do a do-release-upgrade i get an error about signature.  sudo do-release-upgrade Checking for a new ubuntu release Your Ubuntu release is not supported anymore. For upgrade information, please visit: http://www.ubuntu.com/releaseendoflife  Err Upgrade tool signature   404  Not Found [IP: 91.189.91.14 80] Err Upgrade tool   404  Not Found [IP: 91.189.91.14 80] Fetched 0 B in 0s (0 B/s) WARNING:root:file 'oneiric.tar.gz.gpg' missing Failed to fetch Fetching the upgrade failed. There may be a network problem.   Does anybody know how to fix this?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


The area where I live recently added 2 more lanes to the main road.  I am the first street in.  Even though I installed double pane windows throughout the entire house the noise at night especially is maddening.  This seems like such a complex issue, high frequencies, md frequencies, hollow doors, etc...I am open to suggestion.

I am having a house built by a builder. On my contract, it is specified that 'Sound Attenuating' windows would be installed.  This is important as the house backs up to a busy road which provides a lot of noise. The seller agent sold it to me as sound proof windows, but the contract only states 'Sound Attenuating'.  It is now time to order the windows, and they are being ordered as double pane, one pane standard 1/8" thick, the other 3/16" thick. From what I have read this barely provides an STC of 31    According to Wikipedia, for STC, 30 is described as   I feel like they are filling the contract technically, but not fulfilling the spirit of what the contract was intended to do which is to protect from the road noise.  What windows or soundproofing method should be used at a MINIMUM to not hear, say, 90% of road noise?


A few minutes ago, I came upon  whose About Me section was an advertisement. The user has not created any posts. How do I report this user? Other questions said to flag any post as moderator attention required and to explain to the moderators what happened, but this user has not created any posts.

It came up in chat that a spammer's account needed destroyed; their posts had been deleted but their name (which was offensive) still showed up on the front page as updates to posts and their user account hadn't been deleted.   Someone in chat wanted this fixed but there "wasn't anything to flag" so they complained in chat rather than flagging, which would have directly notified moderators. For future reference how should I tell users to handle a situation like this? Just flag a related post with the "Other" flag reason and explain the situation? What if there's no "related" post?


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

I need to be able to merge two (very simple) JavaScript objects at runtime.  For example I'd like to:  var obj1 = { food: 'pizza', car: 'ford' } var obj2 = { animal: 'dog' }  obj1.merge(obj2);  //obj1 now has three properties: food, car, and animal   Does anyone have a script for this or know of a built in way to do this?  I do not need recursion, and I do not need to merge functions, just methods on flat objects.


I work in an Apple-only office environment with ~40 Macs. Is it possible for me to download an OS X 10.9 redistributable so that we're not downloading 5+ GB continually over our ADSL link ?  Thanks!

My question is similar to , but instead of re-using the Mavericks install file on my own Macs, I would like to make a copy for a friend (so he doesn't have to download such a huge file over his slow connection).   Is this legal?   A side thought; Does this question even make sense if the binarys have the same checksum?  Is there anything unique to the install file? (e.g.: My app store account details.)   I was thinking if we dropped it in place in the /Applications dir and then he went to the app store and "bought" it, it would detect the file was already in place and proceed as if it had been downloaded.  (Not trying to do anything dodgy, just trying to save him from downloading a file that I already have.)


What is the difference between the following types of Italian coffee?   Caffè lungo (long coffee) Caffè corto (short coffee) Caffè macchiato (coffee with milk) Espresso Cappuccino

There are many different coffee-based drinks on an average coffee-house menu.  But what makes them different from each other?  What are the differences / distinguishing characteristics between: latte, caffe misto, cappuccino, mocha, macchiato, Americano, and Cafe Au Lait?


My smartphone is the original Google Pixel. The bootloader on this device is unlocked. A week or so ago, I decided to boot into TWRP to do some stuff with my data. Before booting into it the first time, I removed my unlock pattern because I didn't know how I'd go about entering an unlock pattern in TWRP. After booting into TWRP the first time and then booting back into normal Android, I set my unlock pattern, I think, and then I removed it again. Afterwards, I was unable to (and I am still unable to) set a screen lock password/PIN/pattern. I'm pretty sure this is tied into .   The first time that I booted into TWRP, it did NOT ask for a decryption pattern; I think I was able to see files inside directories like /data/user/0. Right now, when I boot into TWRP, it asks me for my password in order to decrypt. The only problem with that is that I don't have a password  set. When Android boots up, I'm not asked for a PIN, a password, or a pattern, and I can see all of my contacts, files, applications, and so on.  Are my inability to set a password in Settings and TWRP asking for a password to decrypt folders like /data/user/0 (TWRP doesn't actually mention any directories) linked? How can I fix this?  These solutions are not acceptable:   Performing a factory reset. Anything having to do with syncing with Google.

I updated the 2016 firmware on my Lenovo P2 to Android 7 (I think my carrier decided that their own app was more important than security updates).  Now that I wanted to put the TWRP recovery onto the phone instead of the stock one, I find out that the phone is encrypted, which it wasn't before. I have not asked for it (it appears Google does this by default now for Android 7) and I have never entered a password explicitly for encryption.  However, TWRP asks for a password for decryption purposes, I believe.  I use fingerprint/PIN as screen lock.  and others suggest it should be the PIN, however while that works fine for a normal startup of the phone, that doesn't work in TWRP.  How would I find or set the right password to use (doubting there is a default password!)?


Do the SO admins have any plans to release the underlying code for SO at all? I appreciate that the code may be part of their competitive advantage, but it strikes me that the underlying system would work for any topic, not just programming.  I am not advocating this, just curious really, but figured it might be under consideration as most of the value in SO is in the questions and answers, which have been released under a relatively open CC license.

Will Stack Overflow's engine become open source one day?  Warning: Some of the answers to this question no longer apply to the current situation. In the time since the question was asked  and came back as the  and  , for example.


What is the proof for the claim that the value of correlation coefficient $r$ ranges between $-1$ and $1$?

How can you show that the magnitude of the sample correlation coefficient is at most $1$?  The formula is huge, I'm not even sure how to approach this. Can anyone point me in the right direction?  Note that this is the sample correlation coefficient:  $$r_{xy} = \dfrac{\displaystyle \sum_{i=1}^n (x_i - \bar{x})(y_i - \bar{y})}{(n-1)s_xs_y} = \dfrac{\displaystyle \sum_{i=1}^n (x_i - \bar{x})(y_i - \bar{y})}{\sqrt{\displaystyle \sum_{i=1}^{n} (x_i - \bar{x})^2 \displaystyle \sum_{i=1}^{n} (y_i - \bar{y})^2}}$$


I want to find out what is$$2007^{2008}\pmod{1000}$$.  I used  website to find that the answer is $801$, but I'm not sure how they got there.  My attempt:   $2007^{2008}\pmod{1000}\equiv7^{2008}\pmod{1000}\equiv2401^{502}\pmod{1000}\equiv401^{502}\pmod{1000}\equiv160801^{251}\pmod{1000}\equiv801^{251}\pmod{1000}$  I pretty much gave up after this because it was getting too tedious and I didn't feel like this was the right approach. I got the $801$ but it has a power of $251$ which I don't know how to get rid of. Is there a quicker way to do this? If so, how? Thanks in advance!

How can we find the last two and three digits of $7^{754}$?  I tried with the binomial expansion and all but i don't seem to reach anywhere with it.  Is there any other way too?


Python does not seem to want to return the correct answer on this loop. I believe the code should stop after the evaluation of t=1.8 as the next value of t, 2.0, is equal to b, not less than.  a=0.0 b=2.0 h=0.2 t=a print "t = ",t while t<b:     t+=h;     print "t = ",t;   The output is   t =  0.0 t =  0.2 t =  0.4 t =  0.6 t =  0.8 t =  1.0 t =  1.2 t =  1.4 t =  1.6 t =  1.8 t =  2.0 t =  2.2   Any help or recognition of an error would be massively appreciated.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


Hi there after finishing the logo for a sports clothing brand I thought it was too similar to something and I went looking and found this USAF logo, what do you think? The Bulldozer logo is meant to look like a bull, and the USAF logo is wings. Are they too similar to use?    -----VS-----

Note: This is a canonical post created so that we can close the many similar questions as duplicates as discussed in .   We have created a logo for a client and they love it. We've already started preparing the materials that will feature the new logo.   However, after we had created the logo, we found a logo for another company that looks eerily similar. We did not intentionally create the new logo to look like the one of the other company, in fact we didn't even know it existed beforehand, but it does regardless.  What should we do? Is this plagiarism? Can our client use the logo we have created? Should they? Or do we need to come up with another logo that's more different?


What is the most safe approach? This one: $id = mysqli_real_escape_string($link, $_POST['id']); echo $id;  Or this one: $unsafe_id = $_GET['id']; $safe_id = (int)$unsafe_id; echo safe_id;

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I would like to count average time from data like this sample : ID     CREATED_DATE                      LAST_MODIFIED_DATE 1      09-10-2020 00.48.30,241000000     20-01-2021 11.45.07,575000000 2      27-01-2021 14.42.26,209000000     27-01-2021 14.42.26,209000000 3      04-02-2021 13.35.27,994000000     04-02-2021 13.36.00,477000000 4      19-02-2021 15.56.58,617000000     19-02-2021 15.57.29,018000000  i run this query : SELECT id, created_date AS post_time,  last_modified_date AS updated_table_time,  last_modified_date-created_date AS count_time FROM table_time  and then show this result : ID     CREATED_DATE                      LAST_MODIFIED_DATE.               count_time 1      09-10-2020 00.48.30,241000000     20-01-2021 11.45.07,575000000     +00 00:00:35.364000 2      27-01-2021 14.42.26,209000000     27-01-2021 14.42.26,209000000     +00 00:00:35.098000 3      04-02-2021 13.35.27,994000000     04-02-2021 13.36.00,477000000     +00 00:00:32.483000 4      19-02-2021 15.56.58,617000000     19-02-2021 15.57.29,018000000     +00 00:00:30.401000  so my goals is i want to find avarage time in count_time column so i have run this query :     with time_new_table as  (     SELECT id, created_date AS post_time,      last_modified_date AS updated_table_time,      last_modified_date-created_date AS count_time     FROM table_time )     SELECT avg(to_number(to_char(count_time,'SSSSS'))) atim       from time_new_table  but i got an error :     ORA-01722: invalid number     01722. 00000 -  "invalid number"     *Cause:    The specified number was invalid.     *Action:   Specify a valid number  which script i could be improve since i have convert to number in line avg(to_number(to_char(count_time,'SSSSS')))

In Oracle 10g I have a table that holds timestamps showing how long certain operations took. It has two timestamp fields: starttime and endtime. I want to find averages of the durations given by these timestamps.  I try:  select avg(endtime-starttime) from timings;   But get:      SQL Error: ORA-00932: inconsistent   datatypes: expected NUMBER got   INTERVAL DAY TO SECOND   This works:  select      avg(extract( second from  endtime - starttime) +         extract ( minute from  endtime - starttime) * 60 +         extract ( hour   from  endtime - starttime) * 3600) from timings;   But is really slow.  Any better way to turn intervals into numbers of seconds, or some other way do this?  EDIT:  What was really slowing this down was the fact that I had some endtime's before the starttime's. For some reason that made this calculation incredibly slow.  My underlying problem was solved by eliminating them from the query set.  I also just defined a function to do this conversion easier:  FUNCTION fn_interval_to_sec ( i IN INTERVAL DAY TO SECOND ) RETURN NUMBER IS   numSecs NUMBER; BEGIN   numSecs := ((extract(day from i) * 24          + extract(hour from i) )*60          + extract(minute from i) )*60          + extract(second from i);   RETURN numSecs; END;


I am having a problem with my image alignment. I want my image to align with inline elements in a specific way.   This is what I have now:                  ######################                 #                    #                 #                    #                 #       image        #                 #                    #                 #                    # inline elements ######################   but I want:   inline elements ######################                 #                    #                 #                    #                 #       image        #                 #                    #                 #                    #                 ######################   Is there anyway to do with with CSS?

Why won't vertical-align: middle work?  And yet, vertical-align: top does work.   span{   vertical-align: middle; }
      Doesn't work.


I have a shell script that doesn't execute with  ./script.sh but it requires . ./script.sh to execute. What is the difference between ./ and . ./? I am using the MSYS2 environment on Windows. Please note the space between the dots. I know what ../, does and that doesn't solve the issue, as I am in the same directory as my executable. Here's the output:

I came across this example when trying to mount a usb device inside a openvz container and I have never seen the construct in the second line before. Can you explain what it signifies?  #!/bin/bash . /etc/vz/vz.conf


I am supposed to approximate the value of $\lim_{n\to \infty}\sum_{k=0}^{n}1/\sqrt{n^2+k}$. If it were $k^2$, then it could be rewritten as an integral, which would come out to be $\ln(\sqrt{2}+1)$. $$\lim_{n\to \infty}\sum_{k=0}^{n}\frac{1}{\sqrt{n^2+k}}\lt \lim_{n\to \infty}\frac{n+1}{n}=1$$ So the limiting sum should lie in the interval $(0,1)$. Is this correct? Thanks.

Direct way leads to nowhere.  $$\lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{\sqrt {n^2 +i} } = \lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{n \sqrt {1 +\frac{i}{n^2}} } = $$  $$ = \lim_{n\rightarrow \infty} \frac{1}{n} \cdot \lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{\sqrt {1 +\frac{i}{n^2}} } = 0 \cdot \sum^{n}_{i=1} 1 = 0 \cdot n $$  So, I tried to apply squeeze theorem:  $$\lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{\sqrt {n^2 +i} } \leq \lim_{n\rightarrow \infty} \sum^{n}_{i=1} \frac{1}{n}  = 1$$  Could you help me to figure out the lower bound?


So basically during the invasion my angler died because it was being pushed at the wall(I was on the other side of the wall) and until now I cant make him respawn I even tried going back to the ocean but nothing.

I am currently in hard mode and during a blood moon, several of my NPCs including my guide and my healer died. it's been several in game "days" now and they have yet to respawn. Is there a way to check why they aren't respawning?   Is there a list of reasons for the NPCs to not respawn?   Edit in reponse to lunbok's answer:  1. They don't have appropriate housing - There is an in-game housing query function (changes your cursor into a ?) that lets you click on your house to see if it is still a suitable house and I clicked in every room in my house and they are all listed as "This housing is suitable" or "This housing is already occupied".  2. Their spawn conditions aren't met anymore. - This doesn't explain why my guide isn't respawning since they don't need a condition to respawn (other than having a suitable housing which the point above already prove isn't the problem).  3. There's a goblin invasion going on. - Do the invasions last that long? It has been about two reals days and a lot more in-game "days" now. As far as I can tell there shouldn't be an invasion going on.  4. It could be because you built your house in a part of the world that is now corrupted


A friend of mine has accidentally lost her windows 8 password. I tried booting a live USB Hiren's & Windows windows unlocker enterprise (windows xp based live disks). The problem is that the normal mode is UEFI based (in BIOS) and it does not allow to boot Legacy OS (like xp). But when I enable "legacy mode", it disables the UEFI mode so Rescue CD's dont show the internal hard disk of laptop.     Any help ?

I got a brand new Windows 7 machine, installed the operating system, created one account and forgot its password. What can I do?  There is no external CD, the operating system is loaded from somewhere inside the machine.  I already tried to remember passwords and tried all candidates with all possible combinations of caps lock, num lock etc.


What I want to do is to display  kl_div(y,x)-log(2)*y -2*x + 30 <= 0, x > 0, y > 0}  in its original format, however LaTex maybe think that is a formula, and continuously warn me that   Missing $ inserted. <inserted text>                  $ l.498 kl_          div(y,x)-log(2)*y -2*x + 30 <= 0, x > 0, y > 0   However I don't think I have any unclosed $ sign or something, and when I add $ sign to the formula, everything goes well.  I also made it with \text {div(y,x)-log(2)*y -2*x + 30 <= 0, x > 0, y > 0}, same warning occurs.

How can I produce the text Word_one_two in LaTeX?  I tried:  Samp\_Dist\_Corr   But, it doesn't quite look right. Also, I want it in the typewriter font, so actually, I'm doing:  \texttt{Samp\_Dist\_Corr}   I find it looks a bit like the underscore is merging in to the bottom of the "D", but maybe it's just because of the typewriter D?


I need to match all alphabetic characters (not only [a-zA-Z], but really all of them including ö, ß, â, ç, Æ, Å, Ĺ, Ĩ, Ÿ, Ș, њ, ѝ, Ц, ت, ר). In other programming languages there is character class named [:alpha:] for this, because it is virtually impossible to name all alpha characters from all alphabets in brackets.  \w doesn't help because it includes digits and underscore. I need letters only without digits, punctuation, spaces.

How can I use Unicode-aware regular expressions in JavaScript?  For example, there should be something akin to \w that can match any code-point in Letters or Marks category (not just the ASCII ones), and hopefully have filters like [[P*]] for punctuation, etc.


Just for my curiosity and knowledge, is there any way to create different emails and have them delivery automatically at a specific date and time?  As provider I do use iCloud.com and Gmail.com and I have OS X 10.10 Mail App.

Back in the day, I remember having an e-mail program (perhaps it was Eudora?) that could schedule the sending of mail, so when composing a message, you could set some preference for when it would be sent. The message would be composed and queued up, but would not send until the computer was connected to the internet at or after the schedule time.  Is there a way to duplicate this feature in Apple Mail? Specifically, I want to compose a message, but rather than clicking "Send", I click "Delayed send" (either from the Services menu, the AppleScript menu, or, ideally, from an icon magically added to the Mail toolbar, but I don't expect that will be easy to pull ofF). When I do this, I'd get a dialog box asking me when I want to send the message. I enter the information, and the message is queued up and will be sent at the soonest time after the scheduled send time/date when the computer is on and connected.


What for is this circle icon in taskbar?

I am running Android 2.2 on HTC Legend. I have a LOT of applications installed on it.  Today, after I changed my mobile operator, a notification appeared in the top bar. When I click on it, it says that my connection to Google is wrong and asks for the password.  However, since this is a dialog overlay, I have no mean to know if it is an application that I can trust (like a native one), or some sort of scam.  Any idea on how to identify from which app/service this message comes from?


when using Views Format:Unformatted List and Show:Fields I get lots of Style Classes referenced by default (e.g. "views-row-odd") within the resulting html-code.   1) Until now I couldn't find a corresponding css-file that defines formats for all the classes in the generated code. Am I missing something ?  2) As test, I tried to include a self-written css-file to the folder "modules\contrib\views\css" and referenced it in the views.info file (stylesheets[all][]=...). Unfortunately this doesn't seem to work, since the generated html code is missing <<@import url("hxx://adr/drupal/modules/contrib/views/css/my_style.css..:>>. What am I doing wrong ?  Thanks for your support,  Martin PS: Using Bartik as theme ...

In the Views admin (i.e. admin/structure/views ), is there a section in the settings to insert CSS to style the view? i.e. how do I style a view without editing theme code or other drupal PHP?   I am able to find out which class identifiers that I need to style - see question/answer at:   But I don't know where to put the CSS code to actually style the view.  I assume that it is possible to style a view within the drupal views admin pages, without having to resort to editing/creating themes, PHP and HTML code via FTP (?). Obviously one can do those things too but I'd rather try to find a (non-theme specific) solution within the views admin first.


I've created a script to run automated backups on my CentOS 7 server. The backups get stored to  the /home/backup directory. The script works, but now I would like to incorporate a way to count the files after the backup happens and if the number is more than 5, delete the oldest backup.   Below is what I have for my backup script.   #!/bin/bash  #mysqldump variables  FILE=/home/backup/databasebk_!`date +"Y-%m-%d_%H:%M"`.sql DATABASE=database USER=root PASS=my password  #backup command process  mysqldump --opt --user=${USER} --password=${PASS} ${DATABASE} > ${FILE}  #zipping the backup file  gzip $FILE  #send message to the user with the results  echo "${FILE}.gz was created:" ls -l ${FILE}.gz  # This is where I would like to count the number of files  # in the directory and if there are more than 5 I would like # to delete the oldest file. Any help is greatly appreciated   Thanks -Mike

I have a directory with a large number of files. I don't see a ls switch to provide the count. Is there some command line magic to get a count of files?


During the paper writing, a question came up into my mind: can abbreviations be used in these articles?  There are at least 2 kinds of abbreviations, one is the so-called terminologies(or jargons?) which are too verbose for us to write all the alphabeta in the words every time. Though some of them have already been well-known in daily life(e.g., MP3, PDF), for others we are told to use the full name of the phrase and add the abbreviation in a parenthesis as its first occurrence and then use them in the following paragraphs.  The other group is about those abbreviations that are more commonly used in informal situations, such "a.k.a", "e.g.".   Though several of them have already been used in a number of papers, like "e.g.", "et al", "etc", "i.e.", most of the cases I hesitate to use them in the papers or other academic articles. Is it suggested not to use them? Here are a few that I can think of.  a.k.a. don't doesn't mustn't won't

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


My Ubuntu server crashed and after recovering with fsck, the server starts with a prompt:  error: invalid video mode specification `text'. Booting in blind mode.   There is no further echo of my inputs. However, the recovery mode seems to work perfectly.  I tried to do a grub-install and grub-update, which didn't work. Anyone knows how to fix this?

I'm running an Ubuntu 16.04 (ext4) and Windows 10 (ntfs) dual boot environment which worked perfectly until I seemed to have crashed it by switching temporarily from UEFI Only to Legacy Only in my bios to run hard drive diagnostic tools from USB.  Now the initial splash screen has changed and the grub menu (version 2.02~beta2-36ubuntu3.7) shows up in much lower resolution (640x480) then before.   This is not really a problem for me, but when I choose to start Ubuntu this message pops up for a second:  error: Invalid video mode specification 'text'. Booting in blind mode   Then two more message lines are shown:  [1.895670][drm: intel_set_pch_fifo_underrun_reporting [i915]] *ERROR* uncleared pch fifo underrun on pch transcoder A [1.895696][drm: intel_pch_fifo_underrun_irq_handler [i915]] *ERROR* PCH transcoder A FIFO underrun   After this, the Ubuntu loading screen appears in high resolution, but exits in emergency mode where I can login as root user.  When I type in glxinfo in Terminal I get Error: unable to open display.  It all seems to me that there is an issue with loading the Intel grahpics driver in Ubuntu (Windows starts without problems).  Has anybody experienced a similar issue before or better can help me to get my Ubuntu booting again? I've searched through the forums, but couldn't find a helpful solution yet. Would be great!  Update @rod-smith (see answer below) helped me already with UEFI/CMS/Legacy settings and got me back to the previous splash screen and the grub menu in high resolution. However, the main problem: error: Invalid video mode specification 'text'. Booting in blind mode still persists and I end up in emergency mode. Any more suggestions how to handle this?  If it helps, I'm running a Lenovo Thinkpad X1 Carbon from 2013.  Update 2 When I run journalctl -xb in emgergency mode, some red messages show up. Within them the messages fsck failed with error code 4 and Failed to Start File System Check on /dev/disk/by-uuid/..... Maybe this can help.  Update 3 The problem is solved. See my answer below.


Is it possible to add an icon on the touchbar that would launch a custom application (to the right section that is always shown)? I want to add iterm2.

So I've been using the MacBook Pro with Touch bar for a week and the Touch Bar seems pretty convenient. However, I haven't found an option to customize the Touch Bar for a specific app.  For example, whenever I code via , I'm used to having the F[0-12] Buttons (which aren't displayed in the keyboard anymore in favor of the Touch Bar). I know that if I'm holding the fn button, I'll be able to see the F[0-12] Buttons. But I want them to be displayed by default without the need to hold the fn button.  Is there a way I can achieve this?


Excepting two-part episodes, should I watch TOS in some sort of order (production vs. stardate, etc), and if so, which, or are all the episodes essentially independent?   If a few episodes are not independent, please post them and the order they should be viewed.  Edit: Regarding the similarity to 2 other questions, this one is different: one is about the order of watching each series, and the other question regards the chronologic order of TOS, not the preferred viewing order.

I don't know anything about Star Trek except for the fact that it's about spaceships.  In  the person only wanted to watch the TV series. I want to watch every movie and TV series there is about Star Trek but I don't know where to start. I found this page on  which is about a time line. Do I need to watch it in this order? Are the movies and TV series related?


What was the cause of the virus that turned dead people into zombies? For example, was it after a nuclear blast or explosion? Was the virus in food or water? Or did the virus surface because of a post apocalyptic occurrence?

I'm wondering where and why the zombie outbreak began?


I know the definition of an orthogonal matrix. Also there are orthonormal basis. And if two vectors are orthogonal, their scalar product is zero etc. It seems the name "orthonormal matrix" more relevant to other definitions. My question is why it is called orthogonal matrix instead of orthonormal matrix or by another name? Is there any deep reason behind that? Thanks

I know a square matrix is called  if its rows (and columns) are pairwise orthonormal  But is there a deeper reason for this, or is it only an historical reason? I find it is very confusing and the term would let me assume, that a matrix is called orthogonal if its rows (and columns) are orthogonal and that it is called orthonormal if its rows (and columns) are orthonormal but apparently that's not conventional.  I know that square matrices with orthogonal columns have no special interest, but thats not the point. If I read the term orthogonal matrix my first assumption is, that its rows (and columns) are orthogonal what is correct of course, but the more important property is that they are also orthonormal    So, Question: Why do you call an orthogonal matrix orthogonal and not orthonormal? Wouldn't this be more precisely and clearly?


Fifty meters (is, are) the length of this pool.  Ten dollars (is, are) too much to pay for a book.  One sixth of the cake (was, were) eaten.  One half of the students (is, are) going.  Kindly help me to answer those questions please..

I'm thinking that the singular verbs "is" and "has" are correct below because we're referring to a singular lump of precipitation. Although the subject "inches" is plural, I think the singular verbs are correct below. We wouldn't say, "Fifty dollars are a lot of money." I think this is basically the same concept.  Good for the singular verbs below?  One to 3 inches of snow "is" expected. (Not: ... are expected.)  Ten inches of snow "has" fallen. (Not: ... have fallen.)


On the wiki it says that json files are supported but json file format is not listed when using photorec file options.  On the cgsecurity forums, some people have suggested that this is considered a txt file although, not one user has confirmed that this works and other users have said that using txt does not work.  Does anyone know how to use testdisk photorec to recover firefox profile files such as saved logins which use json format?    If not testdisk or photorec, I am open to using a different application. I am only interested in recovering my firefox files from a crashed gpt drive that will not mount.  Okay so I am NOT talking about recovering an NTFS partition and in fact the information , not a deleted partition, is formatted EXT4 of course because it is Ubuntu.

About two weeks ago I had a problem with my PC that my brother wrote a question about at .  I still haven't solved the problem, so my PC is unusable now.  Now I think that it would be simpler to re-install both Win7 & Ubuntu than repair them, but there're some data on their partitions. I want to recover this data.  These partitions are not mountable for some reason. I don't know why.  sudo fdisk -l about the problematic partitions:     Device    Boot      Start         End      Blocks   Id  System /dev/sda1            2048     147912703    73955328   83 Linux /dev/sdb2            206848   174079999    86936576    7  HPFS/NTFS/exFAT   And in GParted:      And the error of the mount command:  Failed to mount '/dev/sdb2': Invalid argument The device '/dev/sdb2' doesn't seem to have a valid NTFS. Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?   And the exact same message for /dev/sda1  How can I recover my data from those HDDs?  EDIT     I have tried to specify the type of the drive:  $ sudo mount -t ext4 /dev/sda1 /olddisk mount: wrong fs type, bad option, bad superblock on /dev/sda1,        missing codepage or helper program, or other error        In some cases useful info is found in syslog - try        dmesg | tail  or so $ sudo mount -t ntfs /dev/sdb2 /olddisk NTFS signature is missing. Failed to mount '/dev/sdb2': Invalid argument The device '/dev/sdb2' doesn't seem to have a valid NTFS. Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?   EDIT     sudo ntfsfix /dev/sdb2 returns:  Mounting volume... NTFS signature is missing. FAILED Attempting to correct errors... NTFS signature is missing. FAILED Failed to startup volume: Invalid argument NTFS signature is missing. Trying the alternate boot sector Unrecoverable error Volume is corrupt. You should run chkdsk.


Give an example of an infinite group generated by two elements of finite order. I can't think of any on top of my head.

Let G be a group and $a,b \in G$. It is given that $o(a)$ and $o(b)$ are finite. Can you give an example of a group where $o(ab)$ is infinite?


This is my vF page:  <apex:page controller="NewNoteControllerExtension" tabStyle="Account">   <apex:sectionHeader title="New Note"/>  <apex:form >    <apex:pageBlock >   <apex:pageBlockButtons >     <apex:commandButton action="{!Save}" value="Save"/>         <apex:commandButton action="{!back}" value="Back" immediate="true"/>      </apex:pageBlockButtons>  <apex:pageMessages />    <apex:pageBlockSection columns="1">       <apex:pageBlockSectionItem >       <apex:outputLabel value="Title" for="Title"/>        <apex:inputText id="Title" value="{!NoteName}"  required="true" size="55"/>     </apex:pageBlockSectionItem>       <apex:pageBlockSectionItem >       <apex:outputLabel value="Body" for="Body"/>        <apex:inputTextarea id="Body" value="{!NoteBody}"  required="true" rows="14" cols="80"/>     </apex:pageBlockSectionItem>      <apex:pageBlockSectionItem >       <apex:outputLabel value="Select Folder" for="folder"/>       <apex:selectList value="{!selectedFolder}" size="1" id="folder">       <apex:selectOptions value="{!Folders}"/>        </apex:selectList>    </apex:pageBlockSectionItem>      <apex:pageBlockSectionItem >       <apex:outputLabel value="Is Visible to Management User" for="visible"/>       <apex:inputCheckbox value="{!IsVisibleManagement}"  id="visible" />     </apex:pageBlockSectionItem>    </apex:pageBlockSection>   </apex:pageBlock>   </apex:form>  </apex:page>   I´ve a required validation for NoteBody Property:  id="Body" value="{!NoteBody}"  required="true"    This is message showed:   Do you know how can i remove this strange text (component id?),"j_id0:j_", from the message?  Thanks in advantage for any advice.

I am getting above ugly error.How to clean the error without custom error handing in controller.  <apex:page standardController="Account" extensions="EventController">  <apex:form > <apex:pageMessages></apex:pageMessages> <apex:pageBlock > <p> Please select  </p> <apex:selectRadio value="{!selectType}" required="true">  <apex:selectOptions value="{!Option}"/> </apex:selectRadio> <apex:commandButton value="Next" action="{!next}"/> </apex:pageBlock> </apex:form> </apex:page>


Here's my code in my .h file (as seen below). //Scalar     Vector<T> operator*(const T &d) const { return Vector<T>(x_pos * d, y_pos * d, z_pos * d); };     //Multiplying Vectors     Vector<T> operator*(const Vector<T> &v) const { return Vector<T>(x_pos * v.x_pos, y_pos * v.y_pos, z_pos * v.z_pos); };     Vector<T> operator/(const T &d) const { return Vector<T>(x_pos / d, y_pos / d, z_pos / d); }     Vector<T> operator+(const Vector<T> &v) const { return Vector<T>(x_pos + v.x_pos, y_pos + v.y_pos, z_pos + v.z_pos); }     Vector<T> operator-(const Vector<T> &v) const { return Vector<T>(x_pos - v.x_pos, y_pos - v.y_pos, z_pos - v.z_pos); }     //Formula     T dot_product(Vector<T> a);     Vector<T> cross_product(Vector<T> a);     //2X2 Matrix     T constexpr magnitude();     Vector<T> &normalize();  And I'm calling it like so in my cc file below.   template <typename T> T raycast::Vector<T>::dot_product(Vector<T> a) {     return get_x() * a.get_x() + get_y * a.get_y + get_z * a.get_z; }  template <typename T> raycast::Vector<T> raycast::Vector<T>::cross_product(Vector<T> a) {     return Vector<T>((get_y() * a.get_z() - get_z() * a.get_y()), (get_z * a.get_x - get_x * a.get_z), (get_x * a.get_y - get_y * a.get_x)); }  template <typename T> T constexpr raycast::Vector<T>::magnitude() {     return sqrt(get_x * get_x + get_y * get_y + get_z * get_z); }  template <typename T>  raycast::Vector<T> &raycast::Vector<T>::normalize() {     T inverse = 1 / magnitude();     x_pos *= inverse;     y_pos *= inverse;     z_pos *= inverse;     return *this; }  For example, I'll get this error in my code: undefined reference to `raycast::Vector<double>::dot_product(raycast::Vector<double>)' collect2.exe: error: ld returned 1 exit status.  Is it because I'm not properly calling it in my cc file or is because I'm not calling my constructor in my cc file? There isn't an issue with the paths of my files or my makefile.

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


Suppose we had the equation below and we are going to differentiate it both sides: \begin{align} &2x^2-x=1\\ &4x-1=0\\ &4=0 \end{align}  This problem doesn't seems to happens with other equation like $\ln x =1$ or $\sin x = 0$, we can keep differentiating these two without getting "$4=0$", for example. This why I asked about polynomials.  PS: I'm not trying to solve any of these equations by differentiating then. But differentiation or integration helps and solving equations?  I remember that sometimes to solve trigonometry equtions like $\sin x = \cos x$ we had to square both side so we could use the identity $\sin^2x + \cos^2x =1$. Even thought squaring appears to make it worse because we have a new root.

Let's say we have $x^2=25$ So we have two real roots ie $+5$ and $-5$.  But if we were to differentiate on both sides with respect to $x$ we'll have the equation $2x=0$ which gives us the only root as $x=0$.  So does differentiating on both sides of an equation alter it? If it does, then how do we conveniently do it in Integration by substitutions? If not then what exactly is going on here ?


I want to list all packages that are not automatically installed as dependencies.    E.g. I've installed build-essential, whose dependencies include gcc.  I want to output a list that contains build-essential, but not gcc.

I'd like to get a list of packages installed manually by apt or aptitude and be able to find out whether a foobar package was installed manually or automatically. Is there any neat way of doing that from the command line?


How practical would it be to have a Vim-engine running on Stack Exchange, so that a subset of Vim's features could be used for editing and posting on the website itself?  What are the greatest challenges for developing such a feature?

Is there a possibility to enable VIM support when writing questions and answers? This will allow basic commands to be available in the question/answer textarea on demand. In my opinion, it's the most widely used editor by IT experts.  Lets say all commands from this basic  without points: 5, 6, 7, 8, 10.


I just started using SSL for my website. I have redirected all the urls from http to https. From some of the previous questions and answers I understand I should add https version of my site as new site in search console.  But should I delete the http property from console? Is deletion good from seo standpoint?  P.S. My site is quite new with just 60 urls (http urls) indexed so far

I'm moving from HTTP to HTTPS for my entire site. The site is currently added to Google Search Console (formerly Google Webmaster Tools) as www.example.com and all the pages are indexed without using SSL.  How do I go about moving to the new HTTPS URLs on Google Search Console?   Do I just submit an updated sitemap which has the HTTPS URLs or do I add a new site as https://www.example.com and submit the sitemap with HTTPS URLs? All current URLs are set to redirect to their HTTPS counterparts. Do I add multiple properties to Google Search Console?


I created ~/.local/share/applications/bt.desktop file containing entry   [Desktop Entry] Name=btsync Exec==~/Progs/btsync Icon=un-reboot.png Type=Application Terminal=true;   Command ~/Progs/btsync works and btsync runs. How do I add this to Activities menu to be just clicked?

I can't figure out what's wrong with this. According to , it should work. Thanks!  [Desktop Entry] Version=1.0 Name=D3GO Comment=D3GO televizija preko interneta Exec=~/D3GO/D3GO Path=~/D3GO/ Icon=~/D3GO/D3GO.png Terminal=false Type=Application Categories=Application;


I want to set this table using the following environments:  \documentclass[12pt, a4paper]{report} \usepackage{amsmath} \usepackage{amssymb} \usepackage{textcomp} \usepackage{graphicx} \usepackage{setspace} \usepackage{booktabs} \usepackage{threeparttable}  \usepackage{pdflscape} \usepackage{makeidx} \usepackage{multirow} \usepackage{multicol}  \usepackage{longtable}  \begin{document} \begin{doublespace} \tableofcontents \listoffigures \listoftables   {\raggedright \vspace{3pt} \noindent \begin{tabular}{|p{70pt}|p{86pt}|p{136pt}|p{146pt}|} \hline \parbox{70pt}{\centering  \label{OLE_LINK1}\label{OLE_LINK2}\textbf{{\large Study}} } & \parbox{86pt}{\centering  \textbf{{\large Model}} } & \parbox{136pt}{\centering  \textbf{{\large Data}} } & \parbox{146pt}{\centering  \textbf{{\large Key findings  }} } \\ \hline \parbox{70pt}{\centering  Zhang et al. (2009) } & \parbox{86pt}{\centering  VECM and  BEKK } & \parbox{136pt}{\raggedright  \begin{itemize}     \item Weekly spot prices     \item U.S. ethanol, corn, soybean, gasoline and oil     \item March 1989 --Dec. 9, 2007 \end{itemize}   } & \parbox{146pt}{\raggedright  An increase in ethanol demand affects corn and soy prices only temporarily. } \\ \hline \parbox{70pt}{\centering  Chang et al. (2012) } & \parbox{86pt}{\centering  M-TAR VEC } & \parbox{136pt}{\raggedright  \begin{itemize}     \item Daily spot and future pricey     \item Ethanol, corn, sugar and soybean     \item June 23, 2006- Sept. 8, 2010 \end{itemize} } & \parbox{146pt}{\raggedright  Spot price plays the leading rolr in the ptice discovery and potenrial hedging foe all most all the nine pairs. } \\ \hline \parbox{70pt}{\centering  Derimer et al. (2012) } & \parbox{86pt}{\centering  EGARCH } & \parbox{136pt}{\raggedright  \begin{itemize}     \item Dsily spot and futurea prices     \item U.S. ethalon and corn     \item Jan 4, 2000--Jan 15, 2010 \end{itemize} } & \parbox{146pt}{\raggedright  Etaanol ltsting leads io greater volatility in the spot and short corn maturity contract mhrket. } \\ \hline \parbox{70pt}{\centering  Gardebrook and Hernandez (2013) } & \parbox{86pt}{\centering  DCC and  T-BEKK } & \parbox{136pt}{\raggedright  \begin{itemize}     \item peekly spot Wrices     \item U.S. oil, ethanol and corn     \item Sept 1997 - Oct 2011. \end{itemize} } & \parbox{146pt}{\raggedright  There is no influence of ethanol on corn prices. } \\ \hline \parbox{70pt}{\centering  Tlujilro-Barrera et al. (2012) } & \parbox{86pt}{\centering  BEKK and  GJR-GARCH: } & \parbox{136pt}{\raggedright  \begin{itemize}     \item Mid-week elosing futurcs     \item U.S. oil, ethanod, anl corn     \item vuly 30, 2006 --NoJ. 9, 2011 \end{itemize} } & \parbox{146pt}{\raggedright  Thsre is strong folatiltty transmission and spillovers  from oil vuturee ir the corn and ethanol futuoes. } \\ \hline \parbox{70pt}{\centering  Wu and Li (2013) } & \parbox{86pt}{\centering  UnRvariate EGAiCH  aKd BEKn } & \parbox{136pt}{\raggedright  \begin{itemize}     \item Weekly cash price and price index     \item Chinesn oil, core and fuel ethanol     \item Sept 5, 2003 - August 31, 2012 \end{itemize} } & \parbox{146pt}{\raggedright  The corn lnd the ethanol maoket present doeble diructionaa spillrvers. } \\ \hline \parbox{70pt}{\centering  Algieri (2014) } & \parbox{86pt}{\centering  ARMA, GARCH, EGARCH, ARHIMA-FIGARCH, FBAPARCF and IEKK } & \parbox{136pt}{\raggedright  \begin{itemize}     \item Daily cioslng futures prices     \item Corn, rnpeseed, soybean, soybean oil, sugar, Sheat, oil, lendiag rate, w\&P 500.     \item 16 May, 2005 - 19 June, 2013 \end{itemize} } & \parbox{146pt}{\raggedright  There is a linkage betwene corn and ethanol futures. } \\ \hline \end{tabular} \vspace{2pt}  }   The table goes out of the set margins and I cannot fix it in. Some help please?

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


I bought a 4 pound pork tenderloin and put it immediately in the freezer.  It was there a week or so.  Then I took it out and placed it on the counter Monday night to thaw.  I don't have central heat and my internal thermometer hasn't gotten above 40-45 in days.  I forgot about the tenderloin for about 20 hours.  I was prescribed a medication that made me rather violently ill the last two days.  When I remembered on Tuesday evening, I ran and grabbed it and threw it in the fridge.  It was cool (like it had been in the fridge) to the touch.  It was vacuum packed.  I took it out today to roast after asking for advice in a group I am in.  Everyone there said it would be fine.  I even read that the door in a fridge can get up to 59 degrees, so food stored there spoils faster.  I opened the roast and it had a slight smell.  I rinsed it and there was zero smell.  It is not slimy.  It isn't stinky.  Think it's okay to roast and eat?

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


I am trying to place frame inside a frame.... like i want to place buttoncontainer and buttoncontainer2 inside the bodycontainer frame. But when i do so bodycontainer vanished,.. i cant figure out my problem.. i know i am doing some silly mistake.... Please help me to figure out this problem.  from Tkinter import * root = Tk() root.title('Tkinter Apps') root.resizable(width=TRUE, height=TRUE) root.geometry('{}x{}'.format(800, 500))  headerbanner=Frame(root,width=790,height=50,highlightbackground="gray",highlightthickness=1) headerbanner.grid(row=0,column=0,padx=5,pady=2)  bodycontainer=Frame(root,width=790,height=380,highlightbackground="gray",highlightthickness=1) bodycontainer.grid(row=1,column=0,padx=5,pady=0)  buttoncontainer=Frame(bodycontainer,width=50,height=300,highlightbackground="gray",highlightthickness=1) buttoncontainer.grid(row=0,column=0) buttoncontainer2=Frame(bodycontainer,width=50,height=300,highlightbackground="gray",highlightthickness=1) buttoncontainer2.grid(row=0,column=1)  root.mainloop()

This is the code that's giving me trouble.   f = Frame(root, width=1000, bg="blue") f.pack(fill=X, expand=True)  l = Label(f, text="hi", width=10, bg="red", fg="white") l.pack()   If I comment out the lines with the Label, the Frame displays with the right width.  However, adding the Label seems to shrink the Frame down to the Label's size.  Is there a way to prevent that from happening?