I got some problems that my result not right (i think it's not UTF-8).  This is input(CSV file)    This is output (in phpmyadmin)    Please Help!   $file_data = $this->upload->data();         $file_path =  'upload/file_csv/'.$file_data['file_name'];         if ($this->csvimport->get_array($file_path)) {             $csv_array = $this->csvimport->get_array($file_path);                  foreach ($csv_array as $row) {                     $insert_data = array(                                                    'firstname'=>$row['tea_name'],                         'lastname'=>$row['tea_surename'],                         'teacher_id'=>$row['teacher_id'],                     );                         $tea_id = $insert_data['teacher_id'];                         $fname = $insert_data['firstname'];                         $lname = $insert_data['lastname'];                          for($i=0;$i<sizeof($insert_data);$i++){                             $sql = "select * from teacher where teacher_id = '$tea_id' ";                                                        $result = $this->db->query($sql)->num_rows();                         }                          if($result>0){                                                           $sql="UPDATE `dvp`.`teacher` SET `firstname` = '$fname', `lastname` = '$lname' WHERE `teacher`.`teacher_id` = '$tea_id'";                             $this->db->query($sql);                         }else{                             $sql="INSERT INTO `dvp`.`teacher` (`teacher_id`, `firstname`, `lastname`) VALUES ('$tea_id', '$fname', '$lname')";                             $this->db->query($sql);                         }                   }

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 dropped my external Seagate 2 TB hard drive on the floor.  It seems to work fine.  But I want to scan for bad sectors just to be safe.  I use this drive for all of my TimeMachine backups.  The  post is about checking your hard drive and has tools you can buy (recommended by the community), or things you can try which I tried and which did not work.  On a Windows machine, you can take any connected drive, run scandisk on it, and detect/repair bad sectors.  Is there a way to do this for my drive on Macintosh (without purchasing third party tools)?  More info:   Disk Utility -> Info says that SMART status is "unsupported". The drive is formatted as HFS

I'm planning on selling a used external HDD on eBay.  Are there any applications for Mac out there (preferably free) that can show me statistics about the usage history for the drive so that I can let potential buyers know the condition more precisely?


In my program I have an html form that takes in a name as user input:  <form action ="view_process.php" role = "form" method = "post">     ....     <input type="text" name="name_in" class="form-control" placeholder="Name here" maxlength = "30">     .... </form>   and then I have php code that puts the user input into a variable  $name_in = trim($_POST['name_in']);   All of this is working, but when I issue the following query to a MySQL database,  $query = "SELECT * FROM students WHERE SID = $id_in AND name = $name_in;";   it only returns the database entry/tuple if the user inputs their name in quotes. What is causing this and how can I fix it? I realize I could write a function to add quotes to the input but I want to understand why this is happening and that does not seem like a good solution. I did some research and tried using addslashes(), stripslashes(), and turning on magic quotes, but nothing fixed it.  EDIT: I don't think this is a duplicate of:  because I am using mysqli and not prepared statements.

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 will be defending my dissertation in this Summer and I'm planning to give a gift to my advisor. I'm not quite sure what would be the best and meaningful gift for a professor receiving from his/her student. Main reason I'm asking this questions is that I'm an international student and not sure what would be most suitable. It's usually a general understanding in my homeland that we give some gifts to the professors that stays for long time. In other words, we avoid giving Champagne, Wine, or something to eat rather a shirt, pen set, etc. Any idea from the american life perspective will be appreciated.

I am nearing the end of my PhD and I would quite like to buy a "thank you" gift for my supervisor (although, she's the socially awkward type who I'm sure will be greatly embarrassed to receive one).  I'm just wondering whether a gift is the done thing? And if so, what sort of gift seems appropriate? I suppose a bottle of wine would be a safe choice?


I'm trying to cite some chapters in a book in a .bib file however when I compile the .tex file, I got some of the chapters without the authors names. I don't know the reason and how to fix this. Any suggestions?  Code:    @inbook{bitam2014bio1,   title={Bio-inspired Routing Protocols for Vehicular Ad-Hoc Networks},   author={Bitam, Salim and Mellouk, Abdelhamid},   chapter = {Vehicular Ad Hoc Networks},   year={2014},   publisher={John Wiley \& Sons}   }    @inbook{bitam2014bio2,   title={Bio-inspired Routing Protocols for Vehicular Ad-Hoc Networks},   author={Bitam, Salim and Mellouk, Abdelhamid},   chapter = {Routing for Vehicular Ad Hoc Networks},   year={2014},   publisher={John Wiley \& Sons}   }    @inbook{bitam2014bio3,   title={Bio-inspired Routing Protocols for Vehicular Ad-Hoc Networks},   author={Bitam, Salim and Mellouk, Abdelhamid},   chapter = {Conventional Routing Protocols for VANETs},   year={2014},   publisher={John Wiley \& Sons}   }    @inbook{bitam2014bio4,   title={Bio-inspired Routing Protocols for Vehicular Ad-Hoc Networks},   author={Bitam, Salim and Mellouk, Abdelhamid},   chapter = {Bio-inspired Routing Protocols for VANETs},   year={2014},   publisher={John Wiley \& Sons}   }   Output:

I am using Jabref and  \IEEEtrans package. I try to cite same author for different source in the reference (twice). It appears twice but only once time appears Author name. I want like this     [1] M. Shapiro, “Tire manufacturing,” 2012.      [2] M. Shapiro, “Thermodynamic properties,” 2012.   Need help  \documentclass[a4paper,12pt]{article} %------------------------------------------------------------------ \usepackage{ragged2e} \usepackage{gensymb} \usepackage{tabto} \usepackage[none]{hyphenat} \usetikzlibrary{calc} \usepackage{soul} \usepackage{datetime} \newdate{date}{23}{09}{2016} \date{\displaydate{date}} \newcommand\HRule{\rule{\textwidth}{1pt}} \usepackage{tabularx} % extra features for tabular environment \usepackage{graphicx} % takes care of graphic including machinery \usepackage[left=3cm,right=1in,top=1in,bottom=1in]{geometry} % decreases margins \usepackage{cite} % takes care of citations %\usepackage{biblatex} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhead{} \fancyfoot{} \fancyfoot[R]{\thepage}  \begin{document} this is \cite{Shapiro1,Shapiro2} \bibliographystyle{IEEEtran} \bibliography{LiteratureReveiw}  \end{document}   @TechReport{Shapiro1,   author      = {Shapiro, M.},   title       = {Development of the enthalpy storage materials, mixture of methyl stearate and methyl palmitate},   institution = {Florida Solar Energy Center},   year        = {1989}, } @TechReport{Shapiro2,   author      = {Shapiro, M.},   title       = {Development of the enthalpy storage materials, mixture of capric acid and lauric acid with fire retardants},   institution = {Florida Solar Energy Center},   year        = {1989}, }


How to prove $$\hat{p}|x\rangle=i\hbar\frac{\partial}{\partial x}|x\rangle,$$ using $$[\hat{x},\hat{p}]=i\hbar~?$$ The question seems to be uncomplete because for any $f(x)$ $$[\hat{x},\hat{p}+f(x)]=i\hbar.$$  However, there is a seemingly right answer:  $$ \hat{Q} = e^{-i \frac{u}{\hbar} \hat{p}},[\hat{x},\hat{Q}]=u \hat{Q} $$ $$ \hat{x}\hat{Q}|x\rangle = (x+u)\hat{Q}|x\rangle $$ $$ \hat{Q}|x\rangle = |x+u\rangle $$ $$ \hat{T} = e^{i \frac{u}{\hbar} \hat{x}},[\hat{p},\hat{T}]=u \hat{T} $$ $$ \hat{p}\hat{T}|p\rangle = (p+u)\hat{T}|p\rangle $$ $$ \hat{T}|p\rangle = |p+u\rangle $$  Therefore  $$ \langle x | p \rangle = e^{i\frac{px}{\hbar}} \langle 0 |_x |0 \rangle_p $$  $$ \delta(p-p') = \langle p | p' \rangle  = 2\pi \hbar |\langle 0 |_x |0 \rangle_p|^2 \delta(p-p') $$ $$ \langle 0 |_x |0 \rangle_p = \sqrt{\frac{1}{2 \pi \hbar}}$$ $$ \hat{p}|x\rangle = \int \hat{p} |p\rangle\langle p |x\rangle= \int \hat{p} |p\rangle e^{-i\frac{px}{\hbar}}\sqrt{\frac{1}{2 \pi \hbar}} = i\hbar\frac{\partial}{\partial x}|x\rangle $$ Which assumption is made here?

How to prove $$\hat{p}|x\rangle=i\hbar\frac{\partial}{\partial x}|x\rangle,$$ using $$[\hat{x},\hat{p}]=i\hbar~?$$ The question seems to be uncomplete because for any $f(x)$ $$[\hat{x},\hat{p}+f(x)]=i\hbar.$$ But that's my homework. Can someone add some appropriate assumptions and prove the question?  Here is a seemingly right answer:  $$ \hat{Q} = e^{-i \frac{u}{\hbar} \hat{p}},[\hat{x},\hat{Q}]=u \hat{Q} $$ $$ \hat{x}\hat{Q}|x\rangle = (x+u)\hat{Q}|x\rangle $$ $$ \hat{Q}|x\rangle = |x+u\rangle $$ $$ \hat{T} = e^{i \frac{u}{\hbar} \hat{x}},[\hat{p},\hat{T}]=u \hat{T} $$ $$ \hat{p}\hat{T}|p\rangle = (p+u)\hat{T}|p\rangle $$ $$ \hat{T}|p\rangle = |p+u\rangle $$  Therefore  $$ \langle x | p \rangle = e^{i\frac{px}{\hbar}} \langle 0 |_x |0 \rangle_p $$  $$ \delta(p-p') = \langle p | p' \rangle  = 2\pi \hbar |\langle 0 |_x |0 \rangle_p|^2 \delta(p-p') $$ $$ \langle 0 |_x |0 \rangle_p = \sqrt{\frac{1}{2 \pi \hbar}}$$ $$ \hat{p}|x\rangle = \int \hat{p} |p\rangle\langle p |x\rangle= \int \hat{p} |p\rangle e^{-i\frac{px}{\hbar}}\sqrt{\frac{1}{2 \pi \hbar}} = i\hbar\frac{\partial}{\partial x}|x\rangle $$ Which assumption is made here?


Instantaneous velocity is defined as the limit of average velocity as the time interval ∆t becomes infinitesimally small. Average velocity is defined as the change in position divided by the time interval during which the displacement occurs.  When the time interval is infinitesimally small, there shouldn't be any considerable change in position. Thus the instantaneous velocity should be 0.

We have the image below displaying the uniform velocity by time-distance graph. At every point velocity is constant but what if distance and time both become zero as at origin in the graph is? The velocity must become undefined as $\frac{0}{0}$ is undefined in mathematics or shall we call it zero? If zero then why?


I've been busy trying to answer this question for several hours now and I've thought of looking for when it is eventually increasing or decreasing, but it doesn't seem to ever be either. It came with the hint that $x_n\geq 0$ and $1\leq x_n^2\leq 3$ for all natural numbers n. I understand that the limit would be $\sqrt{\frac{3}{2}}$, but showing that the sequence is Cauchy is the part I'm struggling with. Please help.

For any $a > 0$, I have to show the sequence $x_{n+1}$ $=$  $ \frac 12$($x_n+ $ $ \frac {a} {x_n}$)  converges to the square root of $a$ for any $x_1>0$.  If I assume the limit exists ( denoted by $x$) then,  $x$ $=$  $ \frac 12$($x+ $ $ \frac {a} {x}$) can be solved to $x^2 = a$  How could I show that it does exist?


My apologies if this has been asked already, I've searched but couldn't find it...  Let $x$ such that for every $y \in N$, $y^x$ is an integer. Does that necessarily mean that $x$ is an integer?

Supposing that a real number $c$ is given, is the following true?  "If $n^c$ is a natural number for every natural number $n$, then $c$ is a non-negative integer."  Though this seems true, I can't prove that. Can anyone help?


I have had to read so many papers, and papers on writing papers, that I noticed how engaging and more pleasant to read a publication is when the author inserts the occasional funny remark.  I'm also writing so many project papers lately (mathematics bachelor) that I am actually developing an enjoyment for writing and attempting to come up with my own style. It's something I'd like to improve and I'd love to write more in the future and as I further my studies.  And so I wondered. How appropriate is it for a student to sometimes be funny in his or her reports? I have stumbled on so many half-assedly written assignments that it makes me think that many students simply don't care about nice writing at all, so I don't have any example to base an opinion on. Thoughts?

I was reading  titled "Optimal Symmetric Rendezvous Search on Three Locations." While talking about the history of search problems, the author mentions the following anecdote in passing.     In 2007 a letter writer to the Guardian newspaper queried, “I lost my wife in the crowd at Glastonbury (a music festival). What is the best strategy for finding her?” A reader replied, “Start talking to an attractive woman. Your wife   will reappear almost immediately.”   While I found it quite amusing to read this, I do not often come across papers with such witticisms. Is there an unwritten rule about the tone of sobriety that is considered appropriate in academic papers? Are jokes or anecdotes fine as long as they do not appear forced?


In  it is shown that slicing is faster than anything in terms of making a copy of an item.   Using:  list1 = ['foo','bar'] copy1 = list1 * 1 list1.pop() print 'list1: ' + list1 print 'copy1: ' + copy1   I get:  list1: ['foo'] copy1: ['foo', 'bar']   Any particular reason to stay away from making copies like this?

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


I just installed Ubuntu 14.04.1 onto a drive with existing partitions. I want to make a link/shortcut to one of my games installed on one of the partitions (/media/emily/ Gaming).  After making a link of the .jar file (FTB.jar) and moving that link to desktop it works. But after restart it says the link is broken and asks me to trash it.  The drive currently says it's mounted.  Any suggestions as to why this is happening?  I'm very new to linux, so a detailed description of what might be happening and suggestions to fix it would be appreciated.   After restart:  $ lsblk NAME    MAJ:MIN  RM  SIZE    RO  TYPE  MOUNTPOINT sda     8:0      0   298.1G  0   disk ├─sda1  8:1      0   28G     0   part  / ├─sda2  8:2      0   1K      0   part ├─sda3  8:3      0   6.5G    0   part  [SWAP] ├─sda4  8:4      0   65.6G   0   part  /home ├─sda5  8:5      0   100G    0   part └─sda6  8:6      0   98G     0   part   sr0     11:0     1   1024M   0   rom  $ cat /etc/fstab # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point>   <type>  <options>       <dump>  <pass> # / was on /dev/sda1 during installation UUID=2fee48ec-8d63-4125-9eca-5b2e1061602d /               ext4    errors=remount-ro 0       1 # /home was on /dev/sda4 during installation UUID=b3804a77-7d80-40a6-8f92-212bed16a151 /home           ext4    defaults        0       2 # swap was on /dev/sda3 during installation UUID=8fff87b8-2128-48ae-bfd4-bc959458f99d none            swap    sw              0       0   After making a link from the gaming partition:  $ mount /dev/sda1 on / type ext4 (rw,errors=remount-ro) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) none on /sys/fs/cgroup type tmpfs (rw) none on /sys/fs/fuse/connections type fusectl (rw) none on /sys/kernel/debug type debugfs (rw) none on /sys/kernel/security type securityfs (rw) udev on /dev type devtmpfs (rw,mode=0755) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620) tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755) none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880) none on /run/shm type tmpfs (rw,nosuid,nodev) none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755) none on /sys/fs/pstore type pstore (rw) /dev/sda4 on /home type ext4 (rw) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev) systemd on /sys/fs/cgroup/systemd type cgroup         (rw,noexec,nosuid,nodev,none,name=systemd) gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=emily) /dev/sda5 on /media/emily/ Gaming type fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)

I'm using ubuntu 14.04 LTS. When I start my pc and click on any bookmark from the file manager it shows this error:   Unable to find the requested file. Please check the spelling and try again. Unhandled error message: Error when getting information for file '/media/angel/DOC/edu': No such file or directory   But when I open DOC drive and again clink on the same bookmark it works properly. Can anybody tell me why is this happening and how to solve this issue?   Edit: Output of lsblk is following: (ubuntu is installed in sda5)  NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda      8:0    0 119.2G  0 disk  ├─sda1   8:1    0  91.3G  0 part  ├─sda2   8:2    0     1K  0 part  ├─sda5   8:5    0  24.1G  0 part / └─sda6   8:6    0   3.8G  0 part [SWAP] sdb      8:16   0 465.8G  0 disk  ├─sdb1   8:17   0  93.2G  0 part  ├─sdb2   8:18   0     1K  0 part  ├─sdb5   8:21   0  93.2G  0 part  ├─sdb6   8:22   0  89.3G  0 part  ├─sdb7   8:23   0  93.2G  0 part  ├─sdb8   8:24   0  93.2G  0 part  └─sdb9   8:25   0   3.8G  0 part  sr0     11:0    1  1024M  0 rom     After opening the disk drive the output of lsblk is bellow:   NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sda      8:0    0 119.2G  0 disk  ├─sda1   8:1    0  91.3G  0 part  ├─sda2   8:2    0     1K  0 part  ├─sda5   8:5    0  24.1G  0 part / └─sda6   8:6    0   3.8G  0 part [SWAP] sdb      8:16   0 465.8G  0 disk  ├─sdb1   8:17   0  93.2G  0 part  ├─sdb2   8:18   0     1K  0 part  ├─sdb5   8:21   0  93.2G  0 part  ├─sdb6   8:22   0  89.3G  0 part /media/angel/DOC ├─sdb7   8:23   0  93.2G  0 part  ├─sdb8   8:24   0  93.2G  0 part  └─sdb9   8:25   0   3.8G  0 part  sr0     11:0    1  1024M  0 rom   The output of sudo blkid gives the following information about sdb6:  /dev/sdb6: LABEL="DOC" UUID="04280A22280A12FA" TYPE="ntfs"


History  enthusiasts  can  bask  in  historical  enclaves scattered  throughout  the  island  while  beach  lovers  can  relax  and  enjoy  sea  sports  along  the  3.2 kilometres stretch of Siloso, Central and Tanjong Beaches.    This sentence is from an article about "Travel in Southeast Asia". The phrase "the 3.2 kilometres stretch of Siloso" is a question to me. I think it should be  "the 3.2- kilometer stretch of Siloso" as I have learn that" When Noun + noun is used in measurements, with a number before the first noun,the number is usually joined to the first noun by a hyphen (-)."  Please give me some advice on it. Thanks in advance.

Could you explain me please, why sometimes the word "mile" is used in singular, sometimes in plural, while in both cases it refers to several and not 1 mile.  Example:     They took part in a 26 mile long swimming race.   After 12 miles he got tired.   Thanks in advance to those who can enlighten me!


Is the uncertainty principle a technical difficulty in measurement or is it an intrinsic concept in quantum mechanics irrelevant of any measurement?  Everyone knows the thought experiment of measuring the position of an electron. One can detect electron's position by hitting it with a photon, due to Compton scattering the collision of the photon with electron will change electron's momentum. This experiment is used to explain uncertainty principle to layman, but it is over simplified, isn't it? It also gives an impression that if there was a better suited experimental method the uncertainty principle becomes irrelevant.   I personally think it is intrinsic as it arises from the non-zero commutator of position and momentum operators irrespective of the measurement process. Am I right?  EDIT: My question is similar to certain extent to  and . The answers there are nice but they focus on explaining basics of quantum mechanics more than they comment on the technical difficulty part. In the answers of question 2 there are statements like "So, it's not a knowledge limit" and "you're sort of correct when you say it's an observational limit" without further comments  To summarize, assume hypothetically we managed to find a way in the future where we can have a look at an electron without disturbing it by measurement or causing its wave function to collapse, would the uncertainty principle still hold in such a case?? Why/Why not?

From what I understand, the  states that there is a fundamental natural limit to how accurately we can measure velocity and momentum at the same time. It's not a limit on equipment but just a natural phenomenon.  However, isn't this just an observational limit? There is a definite velocity and momentum, we just don't know it. As in, we can only know so much about the universe, but the universe still has definite characteristics.  Considering this, how do a wide range of quantum mechanical phenomena work? For example, quantum tunneling - its based on the fact that the position of the object is indefinite. But the position is definite, we just don't know it definitely. Or the famous light slot experiment? The creation of more light slots due to uncertainty of the photon's positions?  What I am basically asking is why is a limit on the observer, affecting the phenomenon he is observing? Isn't that equivalent to saying  because we haven't seen Star X, it doesn't exist? It's limiting the definition of the universe to the limits of our observation!


For example:  ArrayList<Integer> a = new ArrayList<Integer>();  while(a.size() < 50){         a.add(1);         a.add(2);         a.add(9);     }     System.out.println(a);   I would like to remove all the excess 1's, 2's, and 9's, but keep one of each.  Not cleared: [1, 2, 9, 1, 2, 9, 1, 2, 9, 1, 2, 9, 1, 2, 9, 1, 2, 9, 1, 2, 9, 1, 2, 9, 1, 2, 9, 1, 2, 9, 1, 2, 9, 1, 2, 9, 1, 2, 9, 1, 2, 9, 1, 2, 9, 1, 2, 9, 1, 2, 9]  Cleared: [1, 2, 9]  Ideally I would like this to work for any x value that occurs any n number of times in the ArrayList.  My partial solution just returns whether or not a value occurs more than once (true if it occurs more than once, false if it doesn't)  public static boolean occ(ArrayList<Integer> l, int s) {      int n = 0;     boolean t = false;      for (int p : l) {         if (p == s) {             n++;         }     }      if (n > 1) {         t = true;     }      return t; }   Method implementation:  occ(ArrayList, Selected Int Value to be Checked);  If I change to a HashSet or Set, would I be able to implement the ArrayList methods clear() and size()?

I have an ArrayList<String>, and I want to remove repeated strings from it. How can I do this?


What would be the factors that one should consider when deciding at what age to give a child their fist cell phone?  Assume that the phone can (if needed) be somewhat secured, with a curated list of applications.

It seems everybody and his cat has a smartphone today. (I'm guilty too.) My son will probably demand his own phone somewhere between the age of 7 and 12. I know I can't compare to when I was a kid because the world is completely different today. So how can I decide?     When should kids get their own cellphone? What factors are relevant for the decision? Smartphone, or plain cellphone? Why?


Is there some g for which g(x mod 1) is not periodic? If so, please tell me what it is.

I want to know all sets of single-variate functions that fulfill the following qualities: $\forall_{f:R^2 \to R^2} \forall_{g \in CAF} \forall_{h \in CAF} \exists_{k\in CAF} k(x) = f(g(x),h(x))$ where CAF is the set I am wishing to find. I know that the set of constants and the set of piece wise constants each satisfy that equation. Do any others?


I have built two simple triggers, both of which cannot be deployed to production as they fail for a bad test class that has some broken SOQL in it.   My current thoughts are to just delete the bad test class from production so these triggers will pass and deploy. I plan to use Eclipse to do this. Any thoughts or previous experiences?  Thank you for the link on how to delete classes, however I am really interested in the community's experience with bad test classes.   Thanks!

I was recently told (  ):     You cannot delete a class in production directly. You will need delete   the class from your sandbox and then deploy the deletions to your   production org.   When you deploy from sandbox to production, the   missing classes will come up in red and you can choose to deploy these   deletions to Production.   However, I'd like some clarification because finding information on how to do this is like pulling teeth, unfortunately.  Am I supposed to:   Delete the Trigger in Sandbox Make a deployment package in Sandbox Add the Trigger which is going to be listed in RED now Deploy (and that deletes it from Production)?   I am not seeing deleted Triggers in Red in Sandbox.  Are they NOT listed under "Triggers" for deployment, but elsewhere?   Frustrated = true.   Does this ONLY apply to Classes??  UPDATE:  I just tried again, with a CLASS, and it still doesn't show up at all as a Deployable package (red or not) after I delete it in the Sandbox.  UPDATE 2:  I was just able to delete a class, that I know was written via IDE from a third party, in both Sandbox and Production.  So now I'm wondering if it has to do with where it was originally deployed from (if from IDE, IDE can delete it - it from Sandbox, you have to jump through hoops).  :-(


We used to work with a local Apache instance (WAMP) as a development environment, but we installed recently a PRTG server on the same machine, so it listens to the same port, as it is a web-based tool.  We are not able to reach our Apache server anymore as web requests on the server IP keep going to PRTG.  I changed the PRTG listening port to 8080 so that we would have 2 web servers listening to 2 dfferent ports.  It doesn't seems to work well: when I try to reach xxx.xxx.xxx.xxx:80 with a browser (Firefox, Chrome) it instantly changes to xxx.xxx.xxx.xxx:8080, and I get to PRTG home page.  Why does it changes from what I requested ? Should I use a totally different non-standard port ? What solutions do I have ?

This is a  about  the use of a *AMPP's stack.    I recently had a talk with some experienced people and they suggested to me not to use a WAMP stack, and instead install apache, mysql and php separately.  I don't understand why they have suggested this, though, so can anyone tell me?  Is there a particular disadvantage of WAMP, or a particular advantage to installing all of them separately?  Since a WAMP stack itself is composed of apache, mysql and php, then what's the difference between using the WAMP stack and installing them all separately?


I would like to calculate Cohen's d for 2x2 ANOVA interaction (nationality: Germany, France; gender: male, female).   Someone asked similar question earlier (), and got an advise to calculate Cohen's d using (a1 - b1) - (a2 - b2) as a numerator and the square root of the MSE from the ANOVA as a denominator.  Could someone please tell me a reference, where I could find more information how to calculate Cohen's d using this formula? I really cannot find any. What would a1, a2, b1 and b2 be in my case?

I have a significant 2x2 interaction in a between-subjects design.  I would normally report omega-squared as my effect-size measure, but I've been asked to provide Cohen's d instead?  Can Cohen's d be computed for an interaction?  If so, how?


I wish to write the name of pdfTeX's author:    I am not able to figure out how to write the middle name. I triedTh\'{\^{e}}, but it doesn't return the desired output.  It's different from the similar double accent question:  since the answer there (using TIPA) doesn't work here. This is a very specific situation.

As linguistics student, I have to put more than one thing on a character every now and then. For example, I need to type ā̆. I thought I could simply do that by typing \={\u{a}}, but then the macron is placed above an empty space in front of the character.  How can I solve this? Thanks  P.S. I'm using MiKTeX 2.9, running on Windows 8; in case it might be of use.


Is there an easier way to determine if a variable is equal to a range of values, such as:  if x === 5 || 6    rather than something obtuse like:  if x === 5 || x === 6   ?

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


I have a 32bit window server running 2003 that I need to update to linux.  I run a website on it.  Will the newest server version run on a 32 bit machine?

Please help! I have 3 desktops and 1 laptop and bring the laptop everywhere and keep the 3 desktops at home and they all have Ubuntu on them and I would like to access media and any kind of files I have on all of them through or with my laptop when I'm traveling! All 3 desktops and 1 laptop are all 32 bit systems! So how can I install and run Ubuntu Server on 32 bit systems?


Kaggle defines the log loss function as:   $$f(w) = \log \Pr(y_t|y_p) = y_t \log(y_p) + (1 - y_t) \log(1 - y_p)$$  Let $y_t \in {0, 1}$, and $y_p$ is given by the sigmoid function $y_p = \sigma(w \cdot x) \in (0,1)$, where $\sigma$ is defined by  $$\sigma(w \cdot x) = \dfrac{1}{(1+\exp(-w \cdot x)}$$  $w,x \in \mathbb{R}^n$. The objective variable is $w$ so $x$ could be thought of as a weight.   So putting everything together:  $$f(w) = y_t \log\left(\dfrac{1}{(1+\exp(-w \cdot x)}\right) + (1 - y_t) \log\left(1 - \dfrac{1}{(1+\exp(-w \cdot x)}\right)$$  My question is: Is $f(w)$ convex?  I have read up some references but can't see the relationship: . If anyone has a reference, it will be greatly appreciated!!

Where can I find a good proof that CRF based models and logistic regression based models are convex? Is there a general trick to test/prove that a model or objective function is convex?


I am running into some trouble accessing my Raspberry Pi (running Raspbian) from my WAN IP.    TightVNCserver is installed and running on port 5901 on the Raspberry Pi. Port forwarding is enabled on my router/switch from 5900 to 5901 going to the Raspberry Pi’s internal address. If using the internal 192.x.x.x address the Raspberry Pi is accessible. When attempting to access the Raspberry Pi from my external WAN with port 5901 specified I receive “connection refused.” Ran a nmap -sV scan to verify port 5901 is open on the Raspberry Pi. Temporarily disabled my router’s firewall to see if it was blocking anything and got the same results.   Any thoughts?

I have a computer running TightVNC server.  It is on my home network.  The computer it is installed on has a locally static ip address 192.168.1.100.  I am able to connect to this vnc server from my home network fine, but unable to connect from outside my network (using the IP address that I see at ).  I have forwarded port 5900 (and 5800) to ip address 192.168.1.100. But if I use  I am unable to see that port.  I am running Windows 7.   Any suggestions?


The real plane, $R^2$ , is a vector space over $R$. Describe, in geometrical terms, all subspaces of $R^2$.  Can anyone help me with exercise? How can I do that in geometrical terms?

I understand how to manipulate vector spaces and subspaces and how to prove various statements about them, but I still don't fully understand what they represent geometrically.  I just need an intuitive grasp as to what these are. Is a vector space a geometric area that contains all possible vectors of the field $\Bbb F$? For example, if $V$ is a vector space over $\Bbb R^3$ then does that mean $V$ contains all vectors in three-dimensions that are part of $\Bbb R$? But then what is a subspace of $V$? Would that perhaps be a plane? Would it be a vector space in $\Bbb R^2$?


So I have this function that takes a function with no parameters:  public static bool RetryUntilSuccessOrTimeout(Func<bool> task, TimeSpan timeSpan)     {         bool success = false;         int elapsed = 0;         while ((!success) && (elapsed < timeSpan.TotalMilliseconds))         {             Thread.Sleep(1000);             elapsed += 1000;             success = task();         }         return success;     }   And then I have a bunch of functions like:  private static bool OnDeleted(object source, FileSystemEventArgs e){...} private static bool OnChanged(object source, FileSystemEventArgs e){...} private static bool OnCreated(object source, FileSystemEventArgs e){...}   I have a function that takes same aruments as those three. So I have that information provided. Is there a way to pass these function as ones not taking any arguments (because I provide them) so i can pass it into the "task" of RetryUntilSuccessOrTimeout() ?    An encapsulating image of the problem:

Given a method DoSomething that takes a (parameterless) function and handles it in some way. Is there a better way to create the "overloads" for functions with parameters than the snippet below?  public static TResult DoSomething<TResult>(Func<TResult> func) {     //call func() and do something else }  public static TResult DoSomething<T0, TResult>(     Func<T0, TResult> func,     T0 arg0) {     return DoSomething(() => func(arg0)); }  public static TResult DoSomething<T0, T1, TResult>(     Func<T0, T1, TResult> func,     T0 arg0, T1 arg1) {     return DoSomething(arg => func(arg, arg1), arg0); }  public static TResult DoSomething<T0, T1, T2, TResult>(     Func<T0, T1, T2, TResult> func,     T0 arg0, T1 arg1, T2 arg2) {     return DoSomething(arg => func(arg, arg1, arg2), arg0); }


My lens Nikon AF 85mm 1.8 will only focus at 22 otherwise I get a fEE flashing on the top display. Any suggestions? I use a D80.

I have a AF Nikkor 50mm f/1.8. When I have the aperture setting on the lens to 22 I can take photos. But when I change the dial to anything other than 22(lowest f/stop) then I get a flashing fEE message and r09 where the number of exposure left is.  I don't have the manual for this lens but am just wondering if anyone knows what the issue is here.  My camera is a Nikon D70S.


Why doesn't this c++ code work? It is meant to dynamically cast a base class into a derived class. How would I achieve this?      class base {     public:         int x = 0;     };      class a : public base {     public:         char c = 'a';     };      class b : public base {     public:         long int d = 'b';     };      std::vector<base> vec;     for (int i = 0; i < 5; i++) {         b temp;         vec.push_back(temp);     }      for (int i = 0; i < 5; i++) {         b* temp = (b*)&vec[i];         std::cout << temp->d << std::endl;     }

Someone mentioned it in the IRC as the slicing problem.


When submitting a form in a contact page, what do you prefer?  For me it's better to keep the data in the fields, disable the fields, disable the submit button and give a feedback message to the user.

As a user, when I submit a "Contact us" form with [valid] info, should the page response show in the form (clear the form and show some "We have received your message" type of success message, either at the top or bottom of the form, or should they simply be redirected to another page showing the success message?


As mentioned in , when tapping a comment in the Android app, we should have a reply icon, letting us reply to the comment, instead of the auto complete on the site:        However, when I tap a comment I get the "flag" icon instead of reply icon:        What is going on? Can this please be fixed?

When commenting, having an autocomplete when you want to @reply to a user would be wonderful (similar to the one available on the desktop site). Normally when I'm on mobile site, I can copy/paste the username, remove the spaces, and I move on with life. But without copy/paste available within the app, the complex or unicode names are nearly impossible to use @reply.


WoW has had gone through several expansions now. If I start playing as a new subscriber at this time, will I still get to experience the storyline since its first release or will I miss out all the previous storyline?

I'm just starting WoW for the first time...  My question:  Is the storyline and quests that I'm doing the same as what players did when the game started (in 2002 or whatever)?  Or have events happened in the game that have progressed the entire timeline/story of the game for new players?


What is the difference between $GLOBALS['wp_the_query'] and global $wp_query?  Why prefer one over the other?

It's probably more of a PHP question, but I would like to know if there are any differences in using  global $post; echo $post->ID;   when compared to  echo $GLOBALS['post']->ID;   to access the ID of a post in WordPress.  This  on SO suggests that the first method is quicker to process, while the second method is quicker to write.  I also noticed that the first method is often mentioned in the Codex while the second method is mentioned on  page.  Is this only a matter of preference? Or does it come to performance and security too?  Thanks


Determine exactly $\displaystyle\sum_{i=0}^\infty (-1)^i \dfrac{1}{3i+1}$.   From the question it is evident that this sum has an exact value. It is also alternating and since $a_n=\dfrac{1}{3n+1}$ is a positive, decreasing sequence that approaches $0$ as $n\to \infty$ the series converges. I think the Taylor series of $\ln (1+x) = x-\dfrac{x^2}{2}+\dfrac{x^3}{3}-\dots$ might be useful here, but I can't seem to make much progress from that. It seems like the sum can be expressed in terms of $\pi$.

Evaluate : $$\sum_{n=0}^\infty\frac{(-1)^n}{3n+1}$$ I tried using logarithmic functions, but cannot evaluate this please help me


I am trying to get started with GDAL on a windows machine using Python2.7. I have tried commands such as:  gdalinfo RasterFileName.TIF and gdal_translate.py -projwin ulx uly lrx lry -of GTiff input.TIF output.TIF   and they run without producing any results. What am I missing that makes these not to work.  For example, I am doing the gdal_translate as follows:      import os     infile = path+'InFileName.TIF'     outfile = path+'OUTFileName.TIF'     string ='gdal_translate -projwin %.0f %.0f %.0f %.0f -of GTiff %s %s' %(ulx,uly,lrx,lry,infile,outfile)     os.system(string)   Many thanks

Is it possible to use some gdal API to call gdal_translate from Python code? I do not mean simply executing the gdal_translate.exe from the file system, but rather call it somehow in code so I do not need to know the exact directory the gdal_translate executable is in?


I am a Pakistani national, and I am traveling to Jamaica via Canada. I have a valid visa for Jamaica and need to catch my connecting flight from Canada without leaving airport international zone. Do I need visa to get my connection?

I'm passing through Canada, on my way to somewhere else. I'm staying only a short time.   Is there a website, or some other way of find out out if I need a visa?


In the Call of Duty online stats pages you see how far away from each challenge you are. You achieve small parts of each challenge just by playing the game, but when a challenge is within reach your behaviour changes and you concentrate on achieving it.  Can we have a similar set of stats for gaining new badges? The number you have got so far (or number remaining), then a little progress bar for scanning down the list more easily. If you can only get one instance of a badge then you could mark it as completed.   For example:  [125] [=   ] Copy Editor × 655         Edited 500 posts [68]  [=== ] Stellar Question × 889    Question favorited by 100 users   You could add more badges for getting badges. E.g. Get all bronze badges, get all silver badges, getting a bronze badge 5/10/x times.  I bet analysing the data will show how the visitor behaviour has changed and it'll be a good way to increase traffic as well.

I just noticed the Copy Editor badge progress indicator on ,    Can we have this for more badges please?   In particular the badges where it's not clear to the user how they're doing.   Announcer  Archaeologist  Booster Generalist Pundit Sportsmanship Taxonomist Tenacious Unsung Hero   It would also be nice to put it somewhere in stackoverflow.com/badges (tool tip maybe?)


I installed Marshmallow on my Galaxy Note 4 like 2 months ago. Everything was nice and peaceful, and I was happy to be able to select custom permissions per app.   A few days ago, out of the blue, I started getting this very irritating and well known problem, where every time I want to grant an app permissions, I have to get a message that asks me to turn off screen overlays.   The most annoying part, is that it doesn't tell me what overlaying app I have to disable. I just get this generic annoying message, PLUS, there's no master switch for overlays on my Note 4! Am I gonna have to spend the next two years being unable to give any app any permissions? Every time this happens, I spend an hour digging... This is crazy and very impractical!   What are my options here? How can I get rid of this problem once and for all?   PS: My phone is rooted, so please, whatever it takes!   Thanks!

I started receiving the “Screen overlay detected” dialog when trying to change apps settings.  Tried to turn off all "draw over other apps" as it says here - , first without system and then with, but it still doesn't work.  Then, I restored apps to original settings and it just made a bigger mess, dialog continue appearing. Any way to go back to previous settings???  Thanks!


Replace an employee aged > 50 with a younger employee.   I am trying to update an item inside an array I am forEach()ing on. Assigning the current fails while noting the index and replacing the item after forEach() block works. Kindly explain this behaviour?  var youngerEmployee = {   name: {     first: 'B',     last: 'C'   },   age: 25 }  var employees = [   {     name: {       first: 'X',       last: 'Y'     },     age: 45   },   {     name: {       first: 'A',       last: 'B'     },     age: 54   } ];  /* --- Failed approach --- */  employees.forEach(    (employee) => {      if(employee.age > 50) {        employee = youngerEmployee;      }    }  );  console.log(employees);  /* --- Successful approach --- */  var i = -1;  employees.forEach(    (employee, index) => {      if(employee.age > 50) {        i = index;      }    }  );  employees[i] = youngerEmployee;  console.log(employees);

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


Hey I have a simple question, I want to download the following (for a bash script) with wget: https://app.plex.tv/desktop#!/settings/server/[[long string of letters and numbers]]/status/server-dashboard  So ofcourse I typed the following command: wget https://app.plex.tv/desktop#!/settings/server/[[long string of letters and numbers]]/status/server-dashboard  But when I press enter, it downloads "desktop", because it stops at # in the link. AKA it downloads https:///app.plex.tv/desktop. This is probably because # or ! means something for wget, so it 'breaks up' the link. I tried surrounding the complete link with ' and " (e.g. 'https://.....dashboard' and "https://.....dashboard") but both didn't make wget download the whole link. Putting \ before # (e.g. /desktop\ #!/settings) or putting \ before ! (e.g. /desktop#\ !/settings) didn't work. When I view the command (with nano) in my bash script, I can see that the ! in the link is green, while the rest of the link is gray. So it's deffinetely breaking the link. How can I make sure wget downloads the whole link and doesn't stop at '#' or '!'? thanks

Well, I have few directories have name contains hashes (#, eg: #abczxy). Now I can't to execute this cd #foo it will redirect me back to the root directory equal with this command cd  The question is, is this possible to do that or is there any tricks allow me do that?  Thanks.


I'm wondering how to open files in programs such as Notepad and Picture Viewer depending on the extension the file has. I'm using Python 3.3 on Windows.  I've done some research and people have mentioned a module named Image, but when I try and import this module I get an ImportError.  Here's what I have so far:  def openFile():     fileName = listbox_1.get(ACTIVE)     if fileName.endswith(".jpg"):         fileName.open()   I will also have HTML and JSON files that I will need to open in Notepad.

I need to be able to open a document using its default application in Windows and Mac OS. Basically, I want to do the same thing that happens when you double-click on the document icon in Explorer or Finder. What is the best way to do this in Python?


Is it posible to convert a js object to json or is a js object exactly a JSON ? Can someone tell me what a JSON exactly is ?

How can I serialize an object to JSON in JavaScript?


Imagine the following situation:  An array of 4 elements of type uint8_t is given that represent 32 bit integer, byte by byte. The goal is to address the whole array as a 32 bit integer.  int main( void ) {     uint8_t array[4] = { 0, 0, 0, 12 };     uint32_t * ptr = ( uint32_t * )array;     printf("%d", *ptr);     return 0; }   Forget about endianess for now, it is not relevant to the question (I do not think).  Now the C standard says that casting a pointer to a type with more strict alignment is undefined behavior.   Some examples of compliant and non-compliant code are given here:   The code above compiles and gives expected result on latest GCC and IAR compilers I've tried.   The question is whether this code is safe in general?  I imagine the following situation on the architecture where integer type is self-aligned. My logic is that since array will inherit the alignment specification of its most strict type - char it can be placed anywhere in memory. For example:  Memory | Value | integer can start here ....            0x20   |       | yes 0x21   | 0     | no   <- array begins, uint32_t ptr 0x22   | 0     | no 0x23   | 0     | no 0x24   | 12    | yes ....   In this scenario if we dereference a uint32_t pointer we may potentially crash on some architectures.  Did I miss something here? Obviously this code works on major compilers and I would imagine that cases where it fails are very specific, more related to legacy architectures and compilers. Nevertheless, is such code safe and portable as according to C standard?  If I made incorrect assumptions or interpreted something incorrectly, please let me know.

When asking about , people sometimes refer to the strict aliasing rule. What are they talking about?


I'm going to be installing a paver patio over an existing poured slap patio. it is surrounded on two sides by brick wall, and a third side by pressure treat wood ( the side of a house build on concrete tubes ). The fourth side is the down hill side, and I would like to allow it to drain. Since there is something constraining on all sides, do I really have to cement the perimeter pavers down, or can I just install again existing surfaces.

I'm going to be putting pavers over an old slab patio. The current patio has settled and spalled, so I'm looking to pitch the paver patio in such a way that it drains as the original slabs did. In some places that will mean 2" of substrate while 1/2" in others.   It is surrounded on two sides by brick wall, and a third side by pressure treated wood (the side of a house built on concrete tubes). The fourth side is the down hill side. Since there is something constraining on all sides, do I really have to cement the perimeter pavers down, or can I just install again existing surfaces?  I plan on using polymeric sand for the cracks, but what is the best type of substrate to use under the pavers if they are on top of solid concrete? Should I compact the substrate or not?


this is a fairly basic question, but I have spent all day trying to figure it out (including reading other questions on this page), and I could really use some help.  I am trying to run a simple mixed model with one random effect nested under a one fixed effect. In short, I have two study sites with multiple activity measurements (i.e., repeated measures) for individuals at each site. So "activity" is my response, "site" is a fixed effect factor, and "individual" is a random effects factor that is nested under site (i.e., each individual is present at only one site, but I have multiple data points for each individual). I have tried to use the following line of code, but I am not convinced that I am doing it correctly.  result <- lme(activity~site+individual,data=table1,random=~1|individual/site)  Specifically, my questions are as follows:  First, do I need to specify individual both in the second term of the model and in the final term? If I am understanding correctly, the second term specifies the fixed effects, and the final term specifies the random effects, so listing "individual" in both places seems incorrect, but if I don't do that, then I do not get any output for individual.  Second, for nesting terms, my initial impression was that you always started with the higher order terms (e.g., "site/individual" would nest individual within site), but if I do that with these data, I get error messages and NaN values. So, do I list individual/site or site/individual?  Third, since the nesting term is listed as the random term, will that make the model run with both individual and site as random effects? I need to make sure that the model retains site as a fixed effect, while including individual as a random effect.  Thank you for the help   Edit: it was pointed out to me that my question may be a duplicate of a previous question (); however, that question ended up not using a nested design, thus the nesting issues that I am asking about were never resolved. Thanks again.

I just fit a model in lme4, and I'm wondering what the heck I fit...  I have individuals id, and each is measured pass/fail on items that can be described using two factors, f1 and f2. My theory says that id and f2 can interact. So I want to compare these models:  # f2 doesn't matter m1 <- lmer(pass ~ f1 + (1|id), family="binomial")  # f2 is a fixed effect, doesn't interact with individuals m2 <- lmer(pass ~ f1 + f2 + (1|id), family="binomial")  # f2 is a nested random effect, interacting with individuals m3 <- lmer(pass ~ f1 + (1|f2/id), family="binomial")   First, am I right that there's a random effect of each level of f2, and each individual's level of f2 is partially pooled, depending on the number of observations for that individual?  Second, does it make sense to fit f2 as a fixed effect with random individuals nested within each level of f2? How does one write that?  Third, what's this, with f2 and id reversed in the formula? I typed it by accident, but now I want to understand it.  m3weird <- lmer(pass ~ f1 + (1|id/f2), family="binomial")


The Edo were described as a pre-warp civilization. So, wasn't this  a violation of First Contact regulations?  Rimmick brings up the Edo incident in the episode Coming of Age. But his charges were just about how Picard interfered with the government, to rescue Wesley. It seems the Enterprise shouldn't  have made contact at all.

In a first season episode of Star Trek: The Next Generation the Enterprise visits a planet named Rubicun III where () the Edo live.  It is often mentioned in Star Trek that the Prime Directive requires that pre-Warp civilisations be ignored until they discover Warp mechanics. But this planet and civilisation appears to be exempt from that status. Why?


When I'm playing/working on my laptop the keyboard sometimes key-in randomly, so I ask:   How can I disable its on-board keyboard?  System:  Laptop Acer v3 772g OS: Windows 8

I have a HP Compaq Presario C700 laptop with Windows 7 installed on it.  My laptop's keyboard is not working properly; some keys never work and some keys will keep on pressing. I've formatted the OS but it didn't solve my problem.  I bought an external USB keyboard and it works well. As some keys in the built-in keyboard activate themselves, I still couldn't work effectively.  After searching Google I tried the following steps to disable the built-in keyboard:   Disabled keyboard drivers: This didn't work because when the system reboots, the driver gets installed again automatically. Installed irrelevant driver for keyboard: This failed - I couldn't install the driver. After rebooting it installed the correct driver automatically.   Can anyone help explain how I can temporarily uninstall my built-in keyboard? I don't want to remove it manually (removing the hardware cable).


I have two rectangles and want to detect if rectangle intersects with other rectangle in geographic coordinate. My actual code working only with positive geographic coordinate values  if (rect1.MaxLongitude < rect2.MinLongitude || rect2.MaxLongitude < rect1.MinLongitude || rect1.MaxLatitude < rect2.MinLatitude || rect2.MaxLatitude < rect1.MinLatitude) {     return false; } else {     return true; }   How can i achieve detecting in geographic coordinate with negative and positive values (even in one coordinate)?

I am trying to write a C++ program that takes the following inputs from the user to construct rectangles (between 2 and 5): height, width, x-pos, y-pos. All of these rectangles will exist parallel to the x and the y axis, that is all of their edges will have slopes of 0 or infinity.  I've tried to implement what is mentioned in  question but I am not having very much luck.  My current implementation does the following:  // Gets all the vertices for Rectangle 1 and stores them in an array -> arrRect1 // point 1 x: arrRect1[0], point 1 y: arrRect1[1] and so on... // Gets all the vertices for Rectangle 2 and stores them in an array -> arrRect2  // rotated edge of point a, rect 1 int rot_x, rot_y; rot_x = -arrRect1[3]; rot_y = arrRect1[2]; // point on rotated edge int pnt_x, pnt_y; pnt_x = arrRect1[2];  pnt_y = arrRect1[3]; // test point, a from rect 2 int tst_x, tst_y; tst_x = arrRect2[0]; tst_y = arrRect2[1];  int value; value = (rot_x * (tst_x - pnt_x)) + (rot_y * (tst_y - pnt_y)); cout << "Value: " << value;     However I'm not quite sure if (a) I've implemented the algorithm I linked to correctly, or if I did exactly how to interpret this?  Any suggestions?


Everything worked fine and I never had any problems with this code. But somehow I now get a null object when I try to receive a Tab that is not in the first position:     java.lang.NullPointerException: Attempt to invoke virtual method 'android.support.design.widget.TabLayout$Tab android.support.design.widget.TabLayout$Tab.setCustomView(android.view.View)' on a null object reference   tabLayoutSetup is called in onCreateView.   private void tabLayoutSetup(){     // Get the ViewPager and set it's PagerAdapter so that it can display items     Bugger.t(context,"tablayout");     viewPager.setAdapter(pagerAdapter);     // Give the TabLayout the ViewPager     tabLayout.setupWithViewPager(viewPager);      createTabs();  }  //this method is creating all tabs for account's tablayout private void createTabs(){     TabLayout.Tab ShareTab = tabLayout.getTabAt(0);     TabLayout.Tab MarkTab = tabLayout.getTabAt(1);      //***********************************************************************************************************     //inflating template for first tab, Activities.     View TabView = LayoutInflater.from(context).inflate(R.layout.account_tablayout_customtab, null); //template     TextView titel = (TextView) TabView.findViewById(R.id.tab_titel);     //populating first template for 'Activities'     titel.setText(getResources().getString(R.string.SharesTab));     titel.setTextColor(ContextCompat.getColor(context,R.color.tabLayout_active));     ShareTab.setCustomView(TabView);      //**********************************************************************************************************     //inflating template for second tab, Messages.     TabView = LayoutInflater.from(context).inflate(R.layout.account_tablayout_customtab, null); //template     titel = (TextView) TabView.findViewById(R.id.tab_titel);     //populating second template for 'Messages'     titel.setText(getResources().getString(R.string.MarkTab));     MarkTab.setCustomView(TabView);   It's really strange because it worked smoothly before. Receiving the Tab at the position 0 (.getTabAt(0)) is not a problem at all. However, I cannot receive the Tab at the position one.  XML:  <android.support.design.widget.TabLayout             android:id="@+id/account_tabLayout"             android:layout_width="match_parent"             android:layout_height="52dp"             android:layout_marginTop="12dp"             android:visibility="visible"             app:layout_constraintEnd_toEndOf="parent"             app:layout_constraintStart_toStartOf="parent"             app:layout_constraintTop_toBottomOf="@+id/account_bio">           </android.support.design.widget.TabLayout>

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 want to make a bootable Windows installation USB on OSX. However, I run into the problem with isntall.wim file that doesn't fit into FAT32 4GB file limit.  All google results about this problem () describe the solutions that I can use on a Windows system. How can I split the install.wim file if I only have a working OS X system? Is there anything similar to Dism /Split-Image console tool that I can use?

So I am attempting to create a Windows 10 install USB on my MBP running macOS 10.14 Mojave. To create a bootable USB it needs to be formatted into FAT32, not exFAT. The issue is that when copying the .iso to the USB it fails because the file sources/install.wim is 4.4GB. I can't format as exFAT because I cannot boot from that format and I cannot use FAT32 because of the 4.4GB file. I used the command cp -rpv /Volumes/CCCOMA_X64FRE_EN-US_DV9/* /Volumes/WINDOWS10/ after Boot Camp Assistant failed to create the  USB with a "Drive too small" error, even though it was a 16GB drive. When I wasn't paying attention, the cp completed and the installer booted, but failed with a missing: sources/install.wim error because the file can't be copied.  Is there any solution to this problem, or should I just burn a DVD with the installer on it?  EDIT: I forgot to specify that I was creating a USB for a PC, not a Mac. The Mac was just being used to create an install USB.  Heres the file:


Is it possible to use generics something like that in Java 1.7?  class Test<T> {     public <Z extends T & Serializable> void method(Z test) {        ...     } }   I would like my method to accept only objects of generic type  which implements specific interface.

So, I understand that the following doesn't work, but why doesn't it work?  interface Adapter<E> {}  class Adaptulator<I> {     <E, A extends I & Adapter<E>> void add(Class<E> extl, Class<A> intl) {         addAdapterFactory(new AdapterFactory<E, A>(extl, intl));     } }   The add() method gives me a compile error, "Cannot specify any additional bound Adapter<E> when first bound is a type parameter" (in Eclipse), or "Type parameter cannot be followed by other bounds" (in IDEA), take your pick.  Clearly you're just Not Allowed to use the type parameter I there, before the &, and that's that. (And before you ask, it doesn't work if you switch 'em, because there's no guarantee that I isn't a concrete class.) But why not? I've looked through Angelika Langer's FAQ and can't find an answer.  Generally when some generics limitation seems arbitrary, it's because you've created a situation where the type system can't actually enforce correctness. But I don't see what case would break what I'm trying to do here. I'd say maybe it has something to do with method dispatch after type erasure, but there's only one add() method, so it's not like there's any ambiguity...  Can someone demonstrate the problem for me?


For sets $A,B,C$ not equal to $\emptyset$ prove that $$AXB=BXA$$ $$\iff$$ $$A=B$$

I have to resit a calculus exam and for some reason set proofs were never my best friend...  Anyway, on a practice exam I encountered the following proof:  $$A\cap(B\cup C) = (A\cap B)\cup(A\cap C)$$  When I draw a Venn-diagram it seems quite obvious but I couldn't manage to write the proof down properly.  If someone could help me, that'd be great!


Can any on help me out how to get the Data split based on the year , product name and get the column count in a visual force page which is in a PDF format .  With Code i could retrive the data correctly.I need to split the product name based on the year.I get the Total but the subtotal is not getting calculated correctly and  i get the data added in the same  year.  For Example :In the above table i got the data for the Year 2014 with their product names and quarter value displayed.Now when i add the data for the Year 2015 with their product names and in the quarter ,it gets added in the Year 2014 itself.  But Im looking for this type of Table:  ProductName         Year       Q1       Q2   Q3    Q4       Total  BXRC-25e4000-F-04  2014       100     200   300   400       1000                      2015       100                            100    BXRC-25e4000-F-23  2014       200                 200        400                     2015       300                            300  Subtotal ------------         700     200   300   600       1800   Code :  Public Integer subtotalofquantity{get;set;}  Public Integer subtotalofamount{get;set;}  subtotalofquantity=0;  subtotalofamount=0;  for(integer i=0;i<opflist.size();i++){             if(i==3){             subtotalofquantity+= integer.valueOf(opflist[0].gmod__Quantity__c);             subtotalofquantity+= integer.valueOf(opflist[1].gmod__Quantity__c);             subtotalofquantity+= integer.valueOf(opflist[2].gmod__Quantity__c);             subtotalofamount+= integer.valueOf(opflist[0]. gmod__Amount__c);             subtotalofamount+= integer.valueOf(opflist[1]. gmod__Amount__c);             subtotalofamount+= integer.valueOf(opflist[2]. gmod__Amount__c); }   Any help very much appreciated.

Can any on help me out how to get the Data split based on the year and product name in a visual force page which is in a PDF format .  ProductName         Year      Q1       Q2   Q3    Q4       Total BXRC-25e4000-F-04  2014       100     200   300   400       1000    BXRC-25e4000-F-23  2014       200                 200       400 Subtotal ------------         300     200   300   600       1400   With Code i could retrive the data  correctly.I need to split the product name based on the year.But i get the data added in the same table.  For Example :In the above table i got the data for the Year 2014 with their product names and quarter value displayed.Now when i add the data for the Year 2015 with their product names and in the quarter ,it gets added in the Year 2014 itself. But Im looking for this type of Table:  ProductName         Year       Q1       Q2   Q3    Q4       Total  BXRC-25e4000-F-04  2014       100     200   300   400       1000                      2015       100                            100    BXRC-25e4000-F-23  2014       200                 200        400                     2015       300                            300  Subtotal ------------         700     200   300   600       1800   Any help very much appreciated.


In my project I'm trying to get the offset position of the caret in a textarea in pixels. Can this be done?   Before asking here, I have gone through many , especially Tim Down's, but I couldn't find a solution which works in IE8+, Chrome and Firefox. It seems .  Some   which I have found have many issues like not finding the top offset of the caret position.  I am trying to get the offset position of the caret because I want to show an auto-complete suggestion box inside the textarea by positioning it based on the offset position of the caret.  PS: I can't use a contenteditable div because I have written lots of code related to a textarea.

I am using jQuery and trying to find a cross browser way to get the pixel coordinates of the caret in <textarea>s and input boxes such that I can place an absolutely positioned div around this location.  Is there some jQuery plugin? Or JavaScript snippet to do just that?


I have this question from here:   It is the question number 4a. I am also aware that a question was posted on MSE about the exact same exercise over here   But my solution is different from both of them. I reason in such way: once there is a $1$ in the string, there are $2^3$ possibilities for the rest of the string. Now, in both answers, the reasoning goes on counting only the positions of where $1$ can go, yet I reason that it's important to see where the other letters go. As for example: $0123$ and $0132$ are different words and should be taken into account as two separate cases. Thus I reasoned I should count the total number of string not equal to $2^3 * 4$ or $2^3 *3$ but to $2^3 * 4!$.   Am I wrong or correct?

Answer: Ternary strings have symbols 0, 1, and 2. If there is exactly one 1, then there are 3 positions the one can be in and 2*2*2 ways to fill the other 3 blanks with a 0 or a 2. So the answer is 3*2*2*2 = 24.  I don't understand why there can only be 3 positions the one can be in?


How can I print repeating label on every page in first column?  The example below, I would like to repeat \plab on other pages at the same place. It is not header actually.  \documentclass{article} \usepackage{multicol} \usepackage{lipsum} \usepackage{geometry} \usepackage{xcolor}  \geometry{  a4paper,  landscape,  margin=1cm  } \newcommand*{\plab}{ {\LARGE label1} \\ \textcolor{gray}{\rule{\columnwidth}{2pt}} \par }  \begin{document} \begin{multicols*}{3}   \plab  \lipsum[1-20]  \end{multicols*} \end{document}   EDIT: I found very simmilar need and solution on TEX at   But I am not able to make it working in my example, though.

I want to use multicols in my document and also having a small box on each page (upper left) to be drawn automatically. I already tried \AtBeginPage hooks but the box didn't print at proper position... I've defined \header for what I want as a box:    MWE:  \documentclass[10pt,landscape,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[ngerman]{babel} \usepackage[utopia,sfscaled]{mathdesign} %\usepackage[lf,minionint]{MinionPro} %\renewcommand{\sfdefault}{phv} %\usepackage[lf]{MyriadPro} \usepackage{multicol} \usepackage[top=0mm,bottom=0mm,left=0mm,right=0mm]{geometry} %\usepackage{hyperref} \usepackage{lipsum} \usepackage[framemethod=tikz]{mdframed} %\usepackage{fancyhdr} ---> ??? \usepackage{microtype}  \renewcommand{\baselinestretch}{.8} \pagestyle{empty}  \global\mdfdefinestyle{header}{% linecolor=gray,linewidth=1pt,% leftmargin=0mm,rightmargin=0mm,skipbelow=0mm,skipabove=0mm, }  \newcommand{\header}{ \begin{mdframed}[style=header] \footnotesize Some Text Inside\\ Page~\thepage~of~6 \end{mdframed} }  \makeatletter \renewcommand{\section}{\@startsection{section}{1}{0mm}%                                 {.2ex}%                                 {.2ex}%x                                 {\sffamily\bfseries}} \makeatother \setlength{\parindent}{0pt}  \begin{document} \footnotesize \begin{multicols*}{5} \header \lipsum\lipsum\lipsum\lipsum \end{multicols*} \end{document}   Is there a way I could achieve this result having the box automatically at upperleft column for each page and no text will be drawn above the box?


I have two sets of vectors S1 and S2. These sets are subsets of a vector space V, which has both the base and the dimension unknown. Now, I don't know the elements of sets S1 and S2 and I need to prove that if S1 is a subset of S2, then span(S1) is a subspace of span(S2).   I was hoping that I could get some hints, since I am really confused by this question. Thanks

If X and Y are two sets of vectors in a vector space V, and if X $\subset$ Y, then is span X $\subset$ span Y? If so, why is or isn't the span of X a subset of the span of Y?  EDIT:  Thank you for the hints! Here is the proof I came up with; please let me know if it is correct.    The spanning set of X can be written as: Span(X) = {$a_1 x_1 + a_2 x_2 + ... + a_n x_n$} where all $x_i$ are vectors and all $a_i$ are scalars. Since X$\subset$Y then all $x_i$ are also in Y. Thus, Span(x) is a linear combination of vectors from Y So Span(x) $\subset$ Span(Y).


I'm writing recommendation for one of my colleagues and one of the points I'd like to highlight is his "greed/hunger for knowledge".  Something like: X is very greedy for knowledge, taking each opportunity to improve his expertise.  Frankly speaking I doubt that using such phrase is good in official document, thus I'd like to ask you for any suggestion how such expression can be written. (disclaimer - English is not my native language)

Is there a term that means "a person who enjoys learning"? This term might be used to describe someone who:   Is a self-motivated learner. Is curious, wants to understand many things.   I understand the term "philosopher" might be a good fit, in terms of its root words, however, the general population has an inconsistent understanding of this term, so I am looking for a more precise term.


I have the following object being created:  var i = 0; var foo = new Foo(); foo.A = ++i; foo.B = ++i; foo.C = ++i;  Assert(foo.A == 1); Assert(foo.B == 2); Assert(foo.C == 3);   The same object can we written using an object initializer:  var i = 0; var foo = new Foo {     A = ++i,     B = ++i,     C = ++i }  Assert(foo.A == 1); Assert(foo.B == 2); Assert(foo.C == 3);   Is the order that the properties are set guaranteed in the case of the object initializer?

Does the order in which I set properties using the object initializer syntax get executed in the exact same order?  For instance if I do this:  var s = new Person { FirstName = "Micah",                      LastName = "Martin",                      IsLoaded = true                    }   will each property get set in the same order?


I have data in an Excel worksheet called "Data Sheet" in the below format.  F7:  ID1 F8:  Amt1 F9:  Units1 F10: Status1 F11: <blank> F12: ID2 F13: Amt2 F14: Units2 F15: Status2 F16: <blank> F17: ID3 F18: Amt3 F19: Units3 F20: Status3 F21: <blank>        ⋮   I want to obtain the below details in another sheet ("Result Sheet"):  E12:    =Data Sheet'!F7 E13:    =Data Sheet'!F12 E14:    =Data Sheet'!F17                ⋮   How can I make the reference to auto increment by custom multiples instead of the default increment by 1? Here I need the reference cell to be incremented by 5 while dragging the formula.  The answer in the "how to customize autofill in excel2010" thread is referring to the same sheet. But, here my requirement is referring to different work sheet. I tried modifying the  formula in the other thread, but it didn't helped me.

like making a rule or something. I am trying to autofill a function, the first cell is (B14-B2)/B2, the second is (B26-B14)/B14, the third is (B38-B26)/B26, so I wanna to increase number by 12, however, the excel didn't get it and try to fill in (B17-B5)/B5;(B29-B17)/B17;(B41-B29)/B29; how can I let excel autofill function in the way I want it to?


I am having hard time understanding logic of properties , as far as i looked in internet its more logical and safe to use properties instead of public variables. But i want to understand the logic of properties to scratch it on my mind   private int myVar;  public int MyProperty {     get { return myVar; }     set { myVar = value; } } public int myVar;   What are the benefits of using properties instead of public variables ? Why i shouldnt write a public variable in my class and use from instance?

In C#, what makes a field different from a property, and when should a field be used instead of a property?


I tried with the following command:  sudo apt-get install nessus   But It shows:  Reading package lists... Done Building dependency tree        Reading state information... Done Package nessus is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source However the following packages replace it: openvas-client:i386 openvas-client  E: Package 'nessus' has no installation candidate   What to do now?

What does the above Error mean? What is an installation candidate?  I was trying to do  sudo apt-get install munin-memcached     and I get this message:  Reading package lists... Done Building dependency tree        Reading state information... Done Package munin-memcached is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package munin-memcached has no installation candidate   I googled for the problem and someone said to do a apt-get upgrade but it still did not solve my problem.


In other words, how do I know which one to use?  I know when I use strings. I would do      string = "This is a string"   When would I use ' ' or """ """?

According to the documentation, they're pretty much interchangeable.  Is there a stylistic reason to use one over the other?


I tried to install xdman using   sudo add-apt-repository ppa:noobslab/apps  sudo apt-get update sudo apt-get install xdman   but I can't download it; I get this:   E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?   I get the same error if I try to install anything else.  After resolving that, I now get the error  E: unable to locate package xdman

I want to install xdman on Ubuntu 17.10 but it's not installing.  I ran the following commands :  sudo add-apt-repository ppa:noobslab/apps sudo apt-get update sudo apt-get install xdman


Is there a way to add some code in the preamble of a LaTeX document so that certain fields of the .bib file are ignored conditionally? More precisely, I want the url field of my .bib entries to be ignored in the case the entry already has a DOI or a arXiv identifier.

inspired me to make the printing of the Url and the Eprint field conditional, so that it only prints if there's no Doi field. Any pointers would be appreciated,  If I use the code posted below, I would like it to remove what I've striked out with red here,   \documentclass{article}  \usepackage[backend=bibtex, style=authoryear-comp, natbib=true]{biblatex} %for digital version  \bibliography{\jobname} \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @article{Holland1986,     Author = {Paul W. Holland},     Doi = {10.1080/01621459.1986.10478354},     Eprint = {http://www.tandfonline.com/doi/pdf/10.1080/01621459.1986.10478354},     Journal = {Journal of the American Statistical Association},     Keywords = {Applied_Economics},     Number = {396},     Pages = {945-960},     Title = {Statistics and Causal Inference},     Url = {http://www.tandfonline.com/doi/abs/10.1080/01621459.1986.10478354},     Volume = {81},     Year = {1986}} @article{Heckman1990,     Author = {James Heckman},     Issn = {00028282},     Journal = {The American Economic Review},     Keywords = {_MSc},     Number = {2},     Pages = {313-318},     Publisher = {American Economic Association},     Title = {Varieties of Selection Bias},     Url = {http://www.jstor.org/stable/2006591},     Volume = {80},     Year = {1990}}   \end{filecontents}  \begin{document}  \citet{Holland1986} and \citet{Heckman1990} went for a swim.  \printbibliography \end{document}


In writing a phd thesis, if a sentence is copied as it is and given proper references, then will it be considered as plagiarism?

Is it plagiarism if I copy several paragraphs from another's source (let's say a CS paper) into my work and then footnote Source: ..., for example, as background information?


I had a question which is as follows:Number of words of 4 letters formed using the word IITJEE.The book says the answer as coefficient of $x^4$ in  4!$\mathrm{[1+ \frac {x}{1!}+\frac{x^2}{2!}]}^{2}[1+x]^2$.My question is where did this  $\mathrm{[1+ \frac {x}{1!}+\frac{x^2}{2!}]}^{2}$ come from?

How many 6-letter permutations can be formed using only the letters of the word, MISSISSIPPI? I understand the trivial case where there are no repeating letters in the word (for arranging smaller words) but I stumble when this isn't satisfied. I'm wondering if there's a simpler way to computing all the possible permutations, as an alternative to manually calculating all the possible 6-letter combinations and summing the corresponding permutations of each. In addition, is there a method to generalize the result based on any P number of letters in a set with repeating letters, to calculate the number of n-letter permutations?  Sorry if this question (or similar) has been asked before, but if it has, please link me to the relevant page. I also apologize if the explanation is unclear, or if I've incorrectly used any terminology (I'm only a high-school student.) If so, please comment. :-)


Let $G$ be a finite group. If the order of $G$ is even, prove that there is at least one element $a$ in $G$ such that $a\not= e$ and $a=a^{-1}$.   Here's my idea:  Suppose $\{x_1,\cdots,x_n\}$ is all of the elements in $G$ [edit: I meant to add "such that $x\not =x^{-1}$"]  (but without their inverses or the identity $e$). This set has $n$ elements. Now consider the set of the inverses that correspond to each element: $\{x^{-1}_1,\cdots,x^{-1}_n\}$. Since $G$ is a group, there is a one-to-one correspondence between these two subsets. The total order of these groups is $2n$. Consider the identity $e$, which adds 1 to $\left| G \right|$ to give $G=\{e,x_1,\cdots,x_n,x^{-1}_1,\cdots,x^{-1}_n\}$, which yields: $$|G|=2n+1,$$ which is an odd value. But there may be elements that satisfy $y\in G:y=y^{-1}$. In this case, these elements are redundant and so they each add 1 to the order of $G$. Therefore,  $$|G|=[2n_x+1]+n_y$$  The term in brackets is odd, so $|G|$ is even if and only if the number of elements $y$, or $n_y$, is odd. If $n_y$ is odd, it is clear that $\exists y\in G:y\not = e \wedge y= y^{-1}$. Q.E.D.  My questions are:   Is this proof valid? Any recommendations on how I can make this proof shorter and more elegant? (I struggle with wordiness)   Thank you.

I am working on the following problem from group theory:     If $G$ is a group of order $2n$, show that the number of elements of $G$ of order $2$ is odd.   That is, for some integer $k$, there are $2k+1$ elements $a$ such that $a \in G,\;\; a*a = e$, where $e$ is the identity element of $G$.


I have calculated NDVI and SAVI for landsat-8 image. But I am getting higher value of NDVI than SAVI Can you tell me reason for this NDVI=0.46 SAVI=0.34 Specific band pixel values are toa b4- 0.130 toa b5- 0.365 L= 0.5 taken

I have calculated NDVI and SAVI vegetation indices for a landsat-8 image. I am unexpectedly getting higher values for the NDVI than SAVI. What may be causing these unusual results?  NDVI=0.46 SAVI=0.34   Specific band pixel values are:  toa b4- 0.130 toa b5- 0.365 L= 0.5 taken


Often we have questions on this site which ask for a proof of some result without induction.1 It seems that when such a question is posted, it is quite well-understood what is meant by proof avoiding induction.2 But can the meaning of this phrase be precise?        Is it possible to define formally what do "proof without induction" and "proof using induction" mean?      For example, I would suspect that if the claim contains some object defined by induction, then we would expect that the proof uses induction, too. (Perhaps in some non-obvious way.) In the other words, if we want induction-free proof, we should have induction-free formulation of the theorem. (Although I do not claim that this intuition is correct - as you can see from this question, I cannot give even reasonable formalization of this.)  Examples of claims which are typically shown by induction and which involve objects defined by induction could be:3   $\sum_{k=1}^n k = \frac{n(n+1)}2$ (We have several posts about this sum, for example .) If $a_1,\dots,a_n$ are elements of a finite abelian group $G=\{a_1,\dots,a_n\}$ (where $|G|=n$, i.e. no element is listed twice), then $(a_1a_2\dots a_n)^2$ see    Of course, induction can also be used in proofs where inductive (recursive) definitions are not used in the formulation of the result.4        If we have some formalization of the distinction between proofs with/without induction, is it possible to prove about some results that induction cannot be avoided in the proof?   What are some examples of results for which it is proven that any proof will need induction. (For some reasonable meaning of the phrase "need induction".)      Perhaps I could imagine something like this when working with . We could simply omit the induction axiom and ask whether there is a proof using the remaining axioms. (Or whether there is a model in which the claim fails.) However, in this way we restrict ourselves to claims about natural numbers. Moreover, if we want to omit induction axioms, we would have problems already with formulating results which use recursive definitions. (The fact that recursive definitions are possible in Peano Arithmetic is proved using this axiom. Some authors calls this result .)  The question becomes more complicated if we move beyond natural numbers. For example, if we are working in ZFC, then there is not an easy way out by just saying: "Let us omit the axiom about induction."    1You can . Some of the most popular examples (base on the number of views and score) could be   2I do not remember seeing some lengthy argument about whether some proof involves induction or not. Just compare that with the  type of questions. Situation is somewhat similar in that we often intuitively can see whether some answer is correct (or at least reasonable) or not; whether it was the solution intended by the creator of the problem. But such questions almost immediately get the response: "Any number can be an answer. Just take Lagrange interpolation."  3Here $S_n=\sum_{k=1}^n k$ is defined inductively by $S_{n+1}=S_n+(n+1)$. Similarly, we have inductive definition for $a_1a_2\dots a_n$. I think that the well-know proofs use induction in some hidden way. For example, the proof based on $2S_n=(1+\dots+n)+(n+\dots+1)=\underset{\text{$n$-times}}{\underbrace{(n+1)+\dots+(n+1)}}$ used commutativity several times. Similarly in the proof that product of all elements of abelian groups we would use commutativity. If by commutativity we mean that the product of $n$ elements gives the same result when reordered in any way, the formal proof of this fact would be based on induction.  4One example I was able to find quickly:  But I cannot at the moment think of an example where it would be difficult to give a proof without induction.

Proofs that proceed by induction are almost always unsatisfying to me. They do not seem to deepen understanding, I would describe something that is true by induction as being "true by a technicality". Of course, the axiom of induction is required to pin down the Natural numbers and certainly seem to be indispensable in one form or another.   However, I am still interested in the following: Are there any "natural" theorems in mathematics that seem unlikely to fall to any method other than induction for whatever reason? I would not include examples that proceed by breaking down a structure into smaller components that are more easily handled - somehow these proofs satisfy whatever criteria for beauty I have in my mind.   An example of a theorem that does have an inductive proof and a more "superior" proof is Fermat's little theorem. It is perfectly possible to prove it by induction but the proof through group theory seems better - perhaps because it is more easily generalizable. I would like examples where it seems like the "neat" proof is unlikely to exist.  This is probably very philosophical and I do not really have a concrete question but I am sure I am not alone in feeling this way.


The best time to travel is in the autumn.   The best time to travel is in autumn.      Which sentence is correct?

Notice these sentences:   Shops are open late in summer.   Summer is a traditionally viewed as a slow season for games.   At the summer solstice, the days are longest and the nights are shortest.   it's time to start thinking about what 2016's Song of the Summer will be.    In English class, they told us that "the" is used for the things that are known.  One example for this was a phrase like "The man who killed his wife".  So when we are speaking of that man, we know what he did. Somehow we know something more than nothing about him. He's not just every man in the world.     So Now I'm confused about why "the" is not used in the first and second sentences. Can anyone please explain it for me?


Let $0 < a < b$. Let $f > 0$ be continuous and strictly increasing on $[a, b]$. Prove that $\int_a^b f + \int_{f(a)}^{f(b)} f^{-1} = bf(b) - af(a)$ By drawing the graph I can see and prove the theorem holds. Area of Outer rectangle - inner rectangle gives the sum of two integrands. How to prove theoretically?

Suppose $f$ is a continuous, strictly increasing function defined on a closed interval $[a,b]$ such that $f^{-1}$ is the inverse function of $f$. Prove that,   $$\int_{a}^bf(x)dx+\int_{f(a)}^{f(b)}f^{-1}(x)dx=bf(b)-af(a)$$   A high school student or a Calculus first year student will simply, possibly, apply change of variable technique, then integration by parts and he/she will arrive at the answer without giving much thought into the process. A smarter student would probably compare the integrals with areas and conclude that the equality is immediate.  However, I am an undergrad student of Analysis and I would want to solve the problem "carefully". That is, I wouldn't want to forget my definitions, and the conditions of each technique. For example, while applying change of variables technique, I cannot apply it blindly; I must be prudent enough to realize that the criterion to apply it includes continuous differentiability of a function. Simply with $f$ continuous, I cannot apply change of variables technique.  Is there any method to solve this problem rigorously? One may apply the techniques of integration (by parts, change of variables, etc.) only after proper justification.  The reason I am not adding any work of mine is simply that I could not proceed even one line since I am not given $f$ is differentiable. However, this seems to hold for non-differentiable functions also.  I would really want some help. Pictorial proofs and/or area arguments are invalid.


I need to know the name of this font because I like the style of the integral and the sum

Is it possible to identify the font used in a specific document/picture?  Answers to this question should identify:   Possible methods to do this (perhaps one answer per method) and adequately describe how to use it (as opposed to merely stating it); Ways of finding the identified fonts, if possible (free or not); and Any prerequisites associated with the method used, if required (for example, "In order to use method X, your document has to be in format Y").   This question is meant as an FAQ, based on an . Its aim is to facilitate the community with the general procedures involved in font identification. Similar cases are solved on a per-usage basis on 's  tag.


Which code block is better?              foreach (CloudBlockBlob b in allBlobs)             {                 res.Add(b.Name);             }   or          foreach (var listBlobItem in allBlobs)         {             var b = (CloudBlockBlob) listBlobItem;             res.Add(b.Name);         }   I don't know why "foreach (var ...)" is more popular.

After discussion with colleagues regarding the use of the 'var' keyword in C# 3 I wondered what people's opinions were on the appropriate uses of type inference via var?  For example I rather lazily used var in questionable circumstances, e.g.:-  foreach(var item in someList) { // ... } // Type of 'item' not clear. var something = someObject.SomeProperty; // Type of 'something' not clear. var something = someMethod(); // Type of 'something' not clear.   More legitimate uses of var are as follows:-  var l = new List<string>(); // Obvious what l will be. var s = new SomeClass(); // Obvious what s will be.   Interestingly LINQ seems to be a bit of a grey area, e.g.:-  var results = from r in dataContext.SomeTable               select r; // Not *entirely clear* what results will be here.   It's clear what results will be in that it will be a type which implements IEnumerable, however it isn't entirely obvious in the same way a var declaring a new object is.  It's even worse when it comes to LINQ to objects, e.g.:-  var results = from item in someList               where item != 3               select item;   This is no better than the equivilent foreach(var item in someList) { // ... } equivilent.  There is a real concern about type safety here - for example if we were to place the results of that query into an overloaded method that accepted IEnumerable<int> and IEnumerable<double> the caller might inadvertently pass in the wrong type.  var does maintain strong typing but the question is really whether it's dangerous for the type to not be immediately apparent on definition, something which is magnified when overloads mean compiler errors might not be issued when you unintentionally pass the wrong type to a method.


I have 3 files to compile:  main.cc transcoder.hpp transcoder.cc   The g++ commands I'm running are:  g++ -c -Wall -g transcoder.cc transcoder.hpp -I. -lboost_system -pthread g++ -c -Wall -g main.cc -I. -lboost_system -pthread g++ -o main main.o transcoder.o -I. -lboost_system -pthread   After the last line, I get an undefined error reference error for when code in main.cc tries to call a function defined in transcoder.hpp/transcoder.cc. Does anyone know what I'm doing wrong?  Edit to add code snippets:  transcoder.hpp  #include <boost/network/protocol/http/server.hpp>  namespace transcoder {  template<class T> class Transcoder {  public:   void HandleRequest(const typename ::boost::network::http::server<T>::request& request,                      typename ::boost::network::http::server<T>::response* response); };  }  // namespace transcoder   transcoder.cc  namespace transcoder {   using boost::network::http::server;    template<class T>   void Transcoder<T>::HandleRequest(const typename server<T>::request& request,                             typename server<T>::response* response) {     // random implementation  } }  // namespace transcoder   main.cc  const server<Handler>::request request; server<Handler>::response response ::transcoder::Transcoder<Handler> transcoder; transcoder.HandleRequest(request, &response);   Exact error message:  main.o: In function `(anonymous namespace)::Handler::operator()(boost::network::http::basic_request<boost::network::http::tags::http_server> const&, boost::network::http::basic_response<boost::network::http::tags::http_server>&)': /some_dir/main.cc:16: undefined reference to `transcoder::Transcoder<(anonymous namespace)::Handler>::HandleRequest(boost::network::http::basic_request<boost::network::http::tags::http_server> const&, boost::network::http::basic_response<boost::network::http::tags::http_server>*)'

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.)


I am looping through folders, opening a file within the folder with the same name, and doing some manipulation.  I'm using sed to manipulate a line:  sed "1s/Log R Ratio/$SAMPLE.LRR/" $FILE   where $FILE is a file with 1+ spaces in the name.  Example:  NAT062813_Batch A_1_TR27GD1_CytoScanHD_NL_092913/NAT062813_Batch A_1_TR27GD1_CytoScanHD_NL_092913.txt    Is there a way (without going through and renaming things) to use sed with these files? I tried putting quotes around $FILE, but that just printed it out.

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


I am working on finding the asymptotic of $\int_0^\infty\frac{\cos x}{x^a} \, dx$ for $a\to0^+$. And I have reduced the problem on finding the asymptotic of $a\int_0^\infty\frac{\sin x}{x^{a+1}} \,d x$. The result is known to be $a\pi/2$ if $a\to0^+$ and there is my proof. $$a\int_0^\infty\frac{\sin x}{x^{a+1}} \,dx = a\int_0^{\pi/2}\frac{\sin x}{x^{a+1}} \, dx + a\int_{\pi/2}^\infty\frac{\sin x}{x^{a+1}} \, dx$$ On the other hand $a\int_0^{\pi/2}\frac{\sin x}{x^{a+1}}\,dx$ behaves as $a\pi/2$ and $a\int_{\pi/2}^\infty\frac{\sin x}{x^{a+1}} \, dx  = O(1)$. However the problem is that $a\pi/2$ is way smaller that $1$. Any suggestions would be appreciated.

I came across the following exercise on asymptotic behavior of integrals: $$I(a) = \int_0^\infty\frac{\cos x}{x^a} \, dx, \text{ where } a\to0^+.$$ I have tried integrating by parts or replacing $\cos x$ with the first summands of its Taylor series, but I end up with something equal to infinity (independent of $a$ and that is not what we want).  I just thought about the substitution $x \leftrightarrow\frac{1}{1+x^2}$ and I get the  following result:  $$I(a) = \frac{\cos(1/2)}{2^{2-a}} + \int_0^1\frac{2x^3 \cos\left(\frac{1}{1+x^2}\right)}{(1+x^2)^{3-a}} \, dx - \int_0^1 \frac{2x^3\sin\left(\frac{1}{1+x^2}\right)}{(1+x^2)^{2-2a}}\,dx$$ If I could prove that the last summands are $o(I(a))$ then it would be OK, but I think, in general my strategy won't work. Apparently this is supposed to be an easy exercise, but I can't come up with anything right now.


I am trying to understand how to quantify the relationship between variables and their principal components, e.g. PC1, and that lead me to consider the information contained in the loadings of each variable for PC1.  If the variables are normalized prior to running the PCA, it seems fair to me (am I wrong?) to assume that the loading of a variable is at least somewhat representative of the strength of the relationship between said variable and PC1.  But my next question is, how does collinearity of variables impact their loadings? If I recall correctly, in a linear model, if two variables are collinear, then any linear combination of the two in the model would result in pretty much the same thing, as long as the coefficients are only "shifted" between the two variables. Can the same happen for the principal components?  EDIT: It seems this  is pretty similar, but more details are always welcome

I know that in a regression situation, if you have a set of highly correlated variables this is usually "bad" because of the instability in the estimated coefficients (variance goes toward infinity as determinant goes towards zero).  My question is whether this "badness" persists in a PCA situation.  Do the coefficients/loadings/weights/eigenvectors for any particular PC become unstable/arbitrary/non-unique as the covariance matrix becomes singular?  I am particularly interested in the case where only the first principal component is retained, and all others are dismissed as "noise" or "something else" or "unimportant".  I don't think that it does, because you will just be left with a few principal components which have zero, or close to zero variance.  Easy to see this isn't the case in the simple extreme case with 2 variables - suppose they are perfectly correlated.  Then the first PC will be the exact linear relationship, and the second PC will be perpindicular to the first PC, with all PC values equal to zero for all observations (i.e. zero variance).  Wondering if its more general.