Dividing polygons into *n* number of groups of equal counts with ArcPy?

One of my tasks for work is to divide parcels into groups. These groups will be used by agents to talk to property owners. The goal is to make the agent's job easy by grouping parcels that are near each other together, as well as divide the parcels into equal numbers so that the work is distributed evenly. The number of agents can fluctuate from a couple to 10+.  Currently I perform this task manually, but would like to automate the process if at all possible. I've explored various ArcGIS tools, but none seem to suit my need. I tried a script (in python) that makes use of near_analysis and selecting of polygons, but it's rather random and takes forever to accomplish a semi-correct result that then takes me longer to fix than if I just did everything manually from the start.  Is there a reliable method to automate this task?  Results example (hopefully without the division we see in yellow):


how do we get complex roots for $x^3 = 8$?

I just asked myself. if you have:  $$x^3 -8 = 0$$ and trying to solve it, you do  $$x^3 = 8$$  well, the first real root will be $2$ because $2^3 = 8$  but it is only the first, what about second and third?


codeigniter mail is going to the spam in company email but working fine with yahoo and google

My codeigniter mail was working fine for few days. but from yesterday onwards the mail is going to spam for company emails. but it is going to inbox in yahoo and gmail accounts. i tried using phpmailer, sendgrid etc. and also tried sending mail from gmail as well but stil these mails are going to spam.   i came to know that email sending to email_id@my_domain.ae is sending emails to spam folder.   is there any modifications that are to be made in the hosting server or something? my company mails are configered in etisalat.  This is the code i am using:             $config = Array(                'protocol' => 'smtp', # 'sendmail',                'smtp_host' => 'ssl://smtp.googlemail.com',                'smtp_port' => 465,                'smtp_user' => '******@gmail.com',                'smtp_pass' => '******',                 'mailtype' => 'html',                'mailpath' => '/usr/sbin/sendmail',                'charset' => 'iso-8859-1'            );            $this->load->library('email', $config);            $this->email->set_newline("\r\n");            $this->email->from($from_email, 'IT Support');            $this->email->to($to_email);            $this->email->subject($subject);            $this->email->message($body)->set_mailtype('html');            $this->email->send();


Find Without primary key Table in SQL Server 2008 R2?

This is my query to find out primary key, foreign key in SQL Server 2008 R2:  select  *  from information_schema.table_constraints where constraint_type = 'PRIMARY KEY'   Know I need to select without primary key table in my database.  Thanks


Do I have a chance to be accepted for a political science master's despite a low CGPA?

I'm studying political science. My CGPA is awful at around 2.95, however, my GPA for the last fall, winter, and summer semester for my 3rd year have been 3.3, 4.0, 3.8 (I did really bad in first and second year). At the best, I am looking at about a 3.1/3.2 CGPA by the time I graduate.  I am wondering how competitive I actually am? Do I even have a chance with such a low CGPA knowing that meeting the requirements does not guarantee acceptance?  In terms of professors, I'm in the DSA of my program and know a couple of professors who would write me a good reference letter. I'm currently doing a independent study research project with a prof as well. And I worked through my entire undergrad: about 4 years of work experience in administrative and retail work.  Do I have a chance or is this a pipe dream? Is it true that grad schools only look at last 2 years?


I selected Eclipse from within USC and clicked the 'Use this source' button. The 'Progress' icon whirls for a few seconds, and then I get a message box:  Failed to download repository information  W:Failed to fetch http://security.ubuntu.com/ubuntu/dists/quantal-security/main/source/Sources  404  Not Found [IP: 2001:67c:1562::17 80]   Why won't it download?


When are is Bayes estimator the same as the maximum likelihood estimator?

Suppose we have the a random variable $X$, which is normally distributed $N(\theta,1)$ and we estimate $\theta$ using the squared error loss function, $L = (\theta, d) = (\theta - d)^2$. To find the Bayes estimator, we find $d$ which minimizes the expected loss and we obtain that the Bayes estimator is the posterior mean. Isn't this the same procedure to also find the maximum likelihood estimator of $\theta$? Wouldn't we also aim to minimize the expected loss in that case? I struggle to see what the difference is between the two concepts, at least in this context.


Prove that every complex number with modulus 1 and is not -1, has this property

I'm currently self-studying "Theory of Functions of a Complex Variable" by A. I. Markushevich and now I've encountered several difficult problems in the book from the start. This is just one of them. Prove that every complex number $z$ where $|z|=1$ but $z\not=-1$ can be represented as $$z=\frac {1+it}{1-it}$$ where $t \in \mathbb{R}$. I've tried writing $$z=e^{i(t+\frac{\pi}{2}-\frac{\pi}{2})}$$ $$=\cos(t+\frac{\pi}{2}-\frac{\pi}{2})+i\sin(t+\frac{\pi}{2}-\frac{\pi}{2})$$ and then reducing by the addition formula but it doesn't seem to go anywhere. If someone would give me a hint to start, not the full answer, I would appreciate it very much.


I recently followed a link from google to this question:  and got presented a 500 error page. That's OK, 500's happen sometimes, but naturally I tried to refresh the page a few times to see if the error would go away - it didn't. That's when I looked at the url and saw I had been redirected to:        More specifically, /error?aspxerrorpath= had been inserted at the root of the path - so subsequent requests would always fail. After I manually removed this from the path, the page loaded fine.  A better behavior would be to render the 500 page at the same path as the request so that a refresh would clear up the issue.  A comment mentioned that this has been asked before. In , this issue was dismissed as it wasn't built into MVC4, but I argue it could be done with a custom middleware as long as the response hasn't been started yet.  Aspnet provides an example .


How to use a variable as part of an array name

I have two arrays:  arrayA=(1 2 3) arrayB=(a b c)   and I want to print out one of them using a command line argument, i.e., without any if else.  I tried a few variations on the syntax with no success. I am wanting to do something like this:  ARG="$1"  echo ${array${ARG}[@]}   but I get a "bad substitution" error. How can I achieve this?


I am getting an ! Undefined control sequence error when compiling the following code:  \documentclass[11pt,table,a5paper]{article} \usepackage{array,ragged2e} \usepackage{graphicx} \usepackage[framemethod=TikZ]{mdframed} \usepackage{lipsum} \usepackage[top=2cm, bottom=2cm, outer=1cm, inner=2.1cm,twoside, headsep=26pt]{geometry} \usepackage{ifthen} \usepackage{wrapfig} \usepackage{comment} \usepackage{parskip} \usepackage{framed}  \usepackage{sidecap} \usepackage{longtable} \begin{document} \begin{longtable}{|p{2.7cm}|p{1.0cm}|p{2.4cm}|p{1.0cm}|p{1.3cm}|p{0.8cm}|}  \hline  \rowcolor{white} \textbf{ \textcolor{white}{A}} &\textbf{ \textcolor{white}{B}} &\textbf{ \textcolor{white}{C}}  &\textbf{ \textcolor{white}{D}} &\textbf{    \textcolor{white}{E}} &\textbf{ \textcolor{white}{P}} \\  \endfirsthead \rowcolor{white} \textbf{ \textcolor{white}{A}} &\textbf{ \textcolor{white}{B}} &\textbf{ \textcolor{white}{C}}  &\textbf{ \textcolor{white}{D}} &\textbf{    \textcolor{white}{E}} &\textbf{ \textcolor{white}{P}} \\   \endhead  \hline  \newcommand{\dsr}{\rule[-3.5cm]{0pt}{4cm}}  \dsr  XXXXXXX  & \dsr  3.38&  \multirow{1}{*}{\parbox{2.5cm}  {\textcolor{black}{XXXXXXX >2,~\\  ~\\  XXXXXXX~\\  ~\\  XXXXXy XXXXX XXXXX XXXXX}}}  &\dsr 2.36\% & \dsr 0.62\% & \dsr 18 \\\cline{1-2} \cline{4-6}  \hline  \end{longtable}}  \end{document}   How to fix this issue?


I am currently trying to compress a directory by using the tar command, however for some reason it doesn't seem to work properly.  I've used this command before on a VPS, so I have experience with using it. I'm trying to transfer files over from my old machine to a new one, yet when I go to compress it, it says this:  tar: Removing leading `/' from member names   The command executed is: tar -czf hub-backup-11-07-17.tar.gz {DIRECTORY} Obviously with {DIRECTORY} replaced with my target file.  Once I've executed the command, the cursor just sits still like in the image, not moving. I've tried leaving it like this until the window times out, but the file is always corrupted. I tried adding -P to the end of the command too. All that did was remove the tar: Removing leading '/' from member names message, but other than that it did the same thing.  Thanks


Floor and ceiling function relation on positive integers

I want to prove that if $a$ and $b$ are positive integers, the following equality is true:  $$\left\lceil \frac{a}{b}\right\rceil = \left\lfloor\frac{a+b-1}{b}\right\rfloor$$  What have I thought about?  Then $a$ = $qb + r$, where $q$ is the quotient and $r$ the remainder  \begin{align} b-1 &\ge r \ge 0 \\ qb + (b-1) &\ge qb+r \ge qb \\ qb + (b-1) &\ge a\ge qb \\ \left\lfloor\frac{a}{b} \right\rfloor +1-\frac1{b} &\ge \frac{a}{b} \ge \left\lfloor\frac{a}{b}\right\rfloor \\ \left\lfloor \frac{a+b}{b} \right\rfloor -\frac1{b} &\ge \frac{a}{b} \ge \left\lfloor\frac{a}{b}\right\rfloor \end{align}


Development DB server with dedicated hardware

I'm planning to move one of my development database servers to its own machine. I'm currently running it on my laptop, which is not very convenient.   DB Servel is PostgreSQL 9.0.1, OS is Gentoo.   There is only one development server attached to the db, so there's not many queries. The problem is the amount of data: I need to store a copy of , which is over 170 Gb at the moment, and increasing.  I'm looking for a solution that doesn't require me to buy expensive hardware, as this is not a production server anyway. I might even be able to reuse some low-end machines I have, with the only exception being their hard drive.  So my question is, what kind of hard drive should I be looking for?  I am currently using a relatively cheap 1.5 Tb external USB drive with a single btrfs partition on it, but I'm not sure that would be fast enough for a db server to find a needle in a 170+ Gb haystack on it.  What tools can I use to measure hdd performance on Linux?  Note that this question is somewhat related to , with the main difference being I'm not building a production server.


Read Shell Script option separated by space

I have this shell script:  for i in "$@" do case $i in     -l=*|--ddloc=*)     DDLOC="${i#*=}"     shift # past argument=value     ;;     *)           # unknown option     ;; esac done   Its working fine as -x=y but i want to be like -x y. What changes will be required here?


Show that the recursive sequence is bounded

$$a_1 = 1$$  $$a_{n+1}=\frac{1}{2} \left(a_n+\frac{2}{a_n}\right) \ge \sqrt{a_n \cdot\frac{2}{a_n}} = \sqrt{2}$$  I don't understand what happens at the $\ge$ step. Are there any middle steps which can help me understand why is that so?


how to copy div content to clipboard as a string format

I'm using ReactJS and when a user clicks a Button I want to copy some div content to clipboard.  I can't see why this code does not result in the data being copied to the clipboard. am giving value from redux store when its true am coping content from div   componentDidUpdate(prevProps, prevState, snapshot) {   console.log("value to copy is-->", this.props.copy);   var copyText = document.getElementById("myInput");    /* Select the text field */    console.log("copyText-->", copyText);   console.log("document-->", document);   /* Copy the text inside the text field */   document.execCommand("copy"); }


Left inverse implies right inverse in a finite ring

Let $R$ be a finite ring with identity $1$, and assume $\exists x,y\in R$ such that $ xy=1$. How can I show it implies $yx=1$?


I've recently started reading the book Designing Data-Intensive Applications. This book has revealed that I have been using indexes incorrectly, in that I didn't realize that even if I have an index on two columns on a single table, my query can only use one of those indexes! For the past 3 years, I've been using indexes as if they are composable, when they are very much not so! (This is a limitation of the B-Tree index - I won't go into the details). One solution to this problem is to use a concatenated index, in which we take all the columns we want to search / filter by, combine the data into one piece of data, and then search on that combined piece of data. This likely works great in practice, but again, the indexes are not composable. If I have a concatenated index (on my persons table) on the first name and last name column, and now I want to search / filter on age as well, I have to create a new index. Are there any general solutions to this composability problem with indexes?


Splitting Existing Partitions in SQL 2014

I have a SQL Server table that contains over 20 billion rows, with 13 billion rows in the last partition.  The table is currently partitioned 6 ways by a "Time" field:  2011 2012 2013 2014 2015 2016/2017/2018   The 2016/2017/2018 partition needs to be split into their own partitions so there is a 2016, 2017, 2018 partition.    How can this be done and in the process avoiding a massive log file growth? The database is in Simple Recovery and currently each partition is in a separate file group on its own set of disks.   CREATE TABLE [dbo].[Log](        [RefNo] [nchar](7) NOT NULL,        [DevID] [nvarchar](7) NOT NULL,        [Time] [datetime] NOT NULL,        [summary] [float] NULL,        [staging] [float] NULL,        [position] [float] NULL,  CONSTRAINT [PK_Log] PRIMARY KEY CLUSTERED  (        [RefNo] ASC,        [DevID] ASC,        [Time] ASC  )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = ON, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 96)  )


how to change behaviour settings in Ubuntu 18.04

How can I change behavior in Ubuntu 18.04.There is no title bar with tabs disappeared in Firefox. There is no title bar for any option only i have is a firefox drop down tab with option to quit.


Is this the right way to compare strings in java?

Scanner scanner= new Scanner(System.in);     System.out.println("Answer the following quiestions:");       System.out.println("1-Which of these letters is not a vowel?");     {         String a = "a-A";         String b = "b-I";         String c = "c-W";//true         String d = "d-O";         System.out.println(a);         System.out.println(b);         System.out.println(c);         System.out.println(d);         String answer1 = scanner.next();         System.out.println(answer1);         System.out.println(c.equals(answer1));        }  When i compare two strings in java It keeps giving me a "False in the output even though it should be "true"


Find functions $f,g : \mathbb R \longrightarrow \mathbb R $ and $a,b,c \in \mathbb R $ such that  $$ \lim_{x \rightarrow a} f(x) = b \quad \text{and} \quad \lim_{y \rightarrow b} g(y) = c \quad \text{but}\quad \lim_{x \rightarrow a} g(f(x)) \neq c$$  I tried to use non continous functions but i didnt manage to get a any useful results.


Wizard minor conjuration ability interpretation

I would like to use Minor Conjuration to summon a flask of oil or alchemist's fire. Assuming  I keep the object within the spells range (10ft), am I allowed to light this conjured substance on fire and will it keep burning?  Although it is on fire it isn't really taking damage, it is being expended/used. Or if you interpret the bottle being shattered as damage then couldn't I just choose to summon a puddle of oil on the ground or above a creatures head? For example if I use this ability to create water or food does eating/drinking it dispel the conjuration? Or if created a torch could I not light the torch since that is the purpose of the object? Since the substance has to stay within 10ft of me and I would have to light it on fire with other means I don't believe that this would be an overpowered concept for a level 2 character.   Is this allowed within the scope of the RAW?


Segmentation error while running PacketTracer

I encounter the following error when I try to run PacketTracer.  $ ./PacketTracer7 ./PacketTracer7: ./libcrypto.so.1.0.0: no version information available (required by ./PacketTracer7) Segmentation error (core dumped)   How do I solve this?


Compare two html codes in Php and highlight the differences in html

currently I am using below code to get the differences between two html code snippet to highlight the differences. <?php    function get_decorated_diff($old, $new){    $from_start = strspn($old ^ $new, "\0");            $from_end = strspn(strrev($old) ^ strrev($new), "\0");     $old_end = strlen($old) - $from_end;    $new_end = strlen($new) - $from_end;     $start = substr($new, 0, $from_start);    $end = substr($new, $new_end);    $new_diff = substr($new, $from_start, $new_end - $from_start);      $old_diff = substr($old, $from_start, $old_end - $from_start);     $new = "$start$new_diff$end";    $old = "$start$old_diff$end";     return array("old"=>$old, "new"=>$new); }  $string_old = "
This is fox

Here I am rabbit

Cheeta
"; $string_new = "
This is fox

Here I am rabbit

goat

Gorilla
"; $diff = get_decorated_diff($string_old, $string_new); echo "

           old data	           new data

           ".$diff['old']."	           ".$diff['new']."

";  ?>  I am Getting the below output:  But I want the output to highlight the All new added text in the new data, currently its highlighting the first matched difference.


Where to book Indian train tickets online?

I've read that trains in India are very busy and its best to book in advance. So where is the best website to book online? I've found the site  and  - both of which seem to have a straight forward website, however I found loads of reviews that basically condemn them (i.e. )  The journeys I need to book for November are:  Delhi - Varanasi Varanasi - Agra Agra - Jodhpur Jodhpur - Jaipur  Is it best to book online? If not what's the best way of booking?


Transform an image with projection EPSG:4326 to EPSG:3857

I have an image with known boundary and projection EPSG:4326 and want to overlay it to openstreetmap using Leaflet.js.   I have tried using function imageoverlay, but the image is not aligned with the basemap.   L.imageOverlay(imgUrl, [[-15, 75], [45, 145]], {opacity: 0.6, autoZIndex: true});   So, I use gdalwarp to transform the image projection to EPSG:3857.  gdal_translate -of Gtiff -a_ullr -15 145 45 75 -a_srs EPSG:4326 test.png out_4326.tiff gdalwarp -s_srs EPSG:4326 -t_srs EPSG:3857 -ts 850 728 out_4326.tiff out_3857.tiff gdal_translate -of png out_3857.tiff final.png   However, the final image looks like distorted. Here is the original image.    Here is the final image


how to punctuate that that in a sentence

Should you use a comma between the two "that that's" in a sentence as in "that that might be a consideration" or not?


Prove that for $x,y$ positive integers, $$\sum_{k=0}^{y-1}(-1)^k\frac{\binom{y-1}{k}}{k+x}=\frac{(x-1)!(y-1)!}{(x+y-1)!}$$  One way is to use the beta-gamma functions relation:  Is there a direct way to calculate the sum?


Can a Wizard prepare spells from other spellbooks?

I was playing as a wizard character in a campaign, and found a spellbook. I was excited at first, but then realized how expensive it would be to copy it into my own. So can I just prepare them straight from the other spellbook?


When I boot my Virtual Machine in Oracle Virtualbox it freezes. I am unable to move the mouse, audio begins looping.  I will include my system log to see if anyone can make sense of this. Even pointing in the right direction would be appreciated.   (literally was working yesterday. and now absolutely nothing.)  Jan 11 09:00:40 thispc org.debian.apt[851]: 09:00:40 AptDaemon.Worker [INFO]: Updating cache Jan 11 09:00:47 thispc AptDaemon.Worker: INFO: Finished transaction /org/debian/apt/transaction/7241eeffd78442b199b06c20d1071535 Jan 11 09:00:47 thispc org.debian.apt[851]: 09:00:47 AptDaemon.Worker [INFO]: Finished transaction /org/debian/apt/transaction/7241eeffd78442b199b06c20d1071535 Jan 11 09:01:23 thispc systemd[1]: Stopping User Manager for UID 108... Jan 11 09:01:23 thispc systemd[1088]: Reached target Shutdown. Jan 11 09:01:23 thispc systemd[1088]: Stopped target Default. Jan 11 09:01:23 thispc systemd[1088]: Stopped target Basic System. Jan 11 09:01:23 thispc systemd[1088]: Stopped target Timers. Jan 11 09:01:23 thispc systemd[1088]: Stopped target Paths. Jan 11 09:01:23 thispc systemd[1088]: Starting Exit the Session... Jan 11 09:01:23 thispc systemd[1088]: Stopped target Sockets. Jan 11 09:01:23 thispc systemd[1088]: Received SIGRTMIN+24 from PID 3387 (kill). Jan 11 09:01:23 thispc systemd[1]: Stopped User Manager for UID 108. Jan 11 09:01:23 thispc systemd[1]: Removed slice User Slice of lightdm. Jan 11 09:03:37 thispc rsyslogd: [origin software="rsyslogd" swVersion="8.16.0" x-pid="868" x-info="http://www.rsyslog.com"] start Jan 11 09:03:37 thispc rsyslogd-2222: command 'KLogPermitNonKernelFacility' is currently not permitted - did you already set it via a RainerScript command (v6+ config)? [v8.16.0 try http://www.rsyslog.com/e/2222 ] Jan 11 09:03:37 thispc rsyslogd: rsyslogd's groupid changed to 108 Jan 11 09:03:37 thispc rsyslogd: rsyslogd's userid changed to 104 Jan 11 09:03:37 thispc systemd-modules-load[259]: Inserted module 'lp' Jan 11 09:03:37 thispc systemd-modules-load[259]: Inserted module 'ppdev' Jan 11 09:03:37 thispc systemd-modules-load[259]: Inserted module 'parport_pc' Jan 11 09:03:37 thispc rsyslogd-2039: Could not open output pipe '/dev/xconsole':: No such file or directory [v8.16.0 try http://www.rsyslog.com/e/2039 ] Jan 11 09:03:37 thispc loadkeys[258]: Loading /etc/console-setup/cached.kmap.gz Jan 11 09:03:37 thispc systemd[1]: Started Set console keymap.


When I turned on my laptop, I received this message "ubuntu: clean, 287617/30875648 files, 13277437/12398240 blocks" and it's not disappearing. I tried the recovery mode and it didn't work.


I remember a TV cartoon series about a group of students in an academy that discovered a factory with a super-computer inside. They entered it in some kind of teleportation tubes and they were transferred into a virtual world where they had to fight creatures.  Does anyone know what this is?


How to install Google input tools in Ubuntu 17.04

How can I install Google input tools in Ubuntu 17.04?


Remembering a novel trilogy where the world hibernated. Girls seek "sun powers"

I am trying to remember a novel from when I was younger. Oh about late 1980s to early 1990s. The book could be older than that. It just seems my Google-fu cannot break the author or title barriers.  The book I remember reading was actually an omnibus. I believe it came out about the same time as The World of Tiers and The Book of Swords. Of the stories in the omnibus, I remember three story parts.   The first story described a world where people hibernated during the winter that would last until the sun came again and lone girls would stay awake. The world itself, other than the hibernation, seemed more fantasy than sci-fi. These girls would take dangerous quests to see if they they had "sun powers". In all of this was a young boy who appeared at the castle and quickly learned things. He was a good person but he was actually a plant for a planet raiding pirate band. In the end the native girl and the pirate plant defeated the pirates leaving behind other clones of the boy who was also a clone of a traveller that was captured by the pirates years ago.  The second story in the omnibus described a daughter of these clones going out from the valley to find her father who had started living with the desert people. She too developed "sun powers" and the father had with him multicolored silks that their colors reflected equal emotions back at the wearer; red equals anger, etc. the silks also seemed to contain memories.  The third story in the omnibus describes the journey of the daughter from the first story going out on a quest to find the origins of these silks. In this she does and discovers creatures that weave silk, emotions, and memory all into each piece of silk. During this journey, she too develops "sun powers".  Could someone identify this book?


Apply scale dependency to point layer for only certain records in QGIS?

At 3.8.2, I have a point layer representing cities and towns.  As I zoom in I need the symbols and labels of smaller towns to appear.  As I zoom out I need them to disappear.  At the same time, the larger city symbols need to display at all scales.  I have successfully set the scale dependency for the labels, via Layer Styling > Labels > Label Options, data-defined override.  The smaller town labels appear and disappear as the mapscale changes, according to mapscale values in the attribute table.  The large city labels are on at all scales.    However, I cannot find a way to set data-defined override scale dependency for the point symbols.  Right now all town and city symbols are on at all scales.  I have searched through Layer Styling > Symbology to set the visibility scale for each point without success.


Spotify has stopped working on the latest Ubuntu today, 15.04

I installed the latest Ubuntu today, 15.04. Spotify has stopped working. How can it be made to work again?  The Unity bar flashes green 4 or 5 times and then stops flashing. There are no error messages. It was installed successfully and played well on 14.10 till the upgrade a few hours ago. It just does not appear on the screen.


Virtualbox only shows 32-bit operating systems

Virtualbox only shows 32-bit VMs even when i use 64-bit CPU  I use 64-bit CPU and i turned virtualisation on. I tried enabling HyperV on and off a couple of times, but it didn't work(HyperV doesn't work either). Everything works fine on Linux.


In classical mechanics the coordinates of a particle are functions of time. That path is a solution of the equations of motion. In principle then it is just a parameter and can be eliminated giving a direct relation between the coordinates E.g. If you do this for a particle subject to uniform downward acceleration you obtain the upside down parabolic relation of x with y. No time.  So is time really necessary?


I can see that wp_nonce_field generates a value in the hidden field.   <input type="hidden" id="message-send" name="message-send" value="cabfd9e42d" />   But wp_verify_nonce isn't using that value as far as I can tell, but I may be wrong.  It looks like it's using a session token for verification.   $expected = substr( wp_hash( $i . '|' . $action . '|' . $uid . '|' . $token, 'nonce'), -12, 10 );  if ( hash_equals( $expected, $nonce ) )    { return 1;  }   Then what's the point of having a value attribute in the hidden field?


Multiple submit buttons on HTML form – designate one button as default

I have a form that has three submit buttons as follows:  <input type="submit" name="COMMAND" value="&lsaquo; Prev"> <input type="submit" name="COMMAND" value="Save"> <input type="reset"  name="NOTHING" value="Reset"> <input type="submit" name="COMMAND" value="Next &rsaquo;"> <input type="button" name="NOTHING" value="Skip &rsaquo;" onclick="location = 'yada-yada.asp';">   The row of buttons is a mix of submit, reset and JavaScript buttons. The order of buttons is subject to change, but in any case the save button remains between prev and next buttons.  The problem here is that when a user hits Enter to submit the form, the post variable "COMMAND" contains "Prev"; normal, as this is the first submit button on the form. I however want the "Next" button to be triggered when the user submits the form via the Enter button. It is kind of like setting it as the default submit button, even though there are other buttons before it.


What is the correct way to collocate something average and a period of time?

I want to translate "average monthly salary" into English, in relation to a specific period which is "from September to April" (non-inclusive).  Will it be correct to just concatenate these two phrases? Or do I have to use a different preposition? Or maybe even change April to March and make it inclusive? (I think I could use "through" in that case, but I doubt I need to go that far, and I'm still not sure if that's the right way to do it.)  Update: if there's a difference between American English and British English in this instance, I need British English.


Check why my hard disk always has no free space

I have Windows 10. Recently I came across a very strange problem: my hard disk is always full. I keep constantly deleting files from it, removing 2-3 GB, but it gets back with 0 Mb free again and again. How could I check (maybe with some utility) where the free space goes? I scanned my computer with antivirus, but nothing was found.


fundamental group of $GL^{+}_n(\mathbb{R})$

I would like to know whether the $GL^{+}_n(\mathbb{R})$ the set of all invertible matrices with positive determinant is simply connected or not? I guess it is not simply connected but that is just a guess only, I do not know how to prove that, i.e how to show that its fundamental group is non-trivial.  Well, I can rigorously prove that this is connected and hense path connected as it is Lie Group. Could any one rigorously tell me how to approach this kind problem and solve them from the basic knowledge of fundamental group or some other way? So basically I need some result or tools by which I can compute fundamental groups of all known classical matrix Lie groups.


Is there any facility to clear inbox message? If I want to delete some of the messages from inbox, then is it possible?


What are examples of irreducible but not prime elements?

I am looking for a ring element which is irreducible but not prime.    So necessarily the ring can't be a PID. My idea was to consider $R=K[x,y]$ and $x+y\in R$.  This is irreducible because in any product $x+y=fg$ only one factor, say f, can have a $x$ in it (otherwise we get $x^2$ in the product). And actually then there can be no $y$ in $g$ either because $x+y$ has no mixed terms. Thus $g$ is just an element from $K$, i.e. a unit.  I got stuck at proving that $x+y$ is not prime. First off, is this even true? If so, how can I see it?


I'm interested in getting the text of \tkzLabelAngle to always position inside the angle. I'm randomly generating these triangles, so I'm hoping there is a general solution that will work for all angles rather than manually positioning each one. There doesn't seem to be any rhyme or reason as to why some labels are outside the triangles as you can see in the image.  I've tried various strategies including defining a pos or size (the latter of which ends up giving me errors), changing the size of the text, drawing the triangles with \tkz* commands, changing the order of the angles (although I verified it was labeling the inside angle with \tkzMarkAngle) e.g. from (B,A,C) to (C,A,B).  So, other than manually defining pos for each of the outliers, is there a better strategy to get the angles in the right position all the time (given that all angles are generated randomly)?  Thanks for any assistance.  \documentclass[12pt,twoside]{article} \usepackage[hmargin=19mm,vmargin=13mm,includeheadfoot,headheight=27.6pt,headsep=4mm]{geometry} \usepackage{fancyhdr} \pagestyle{fancy} \fancyhf{} \renewcommand{\headrulewidth}{0pt} \usepackage[usenames,dvipsnames]{xcolor} \usepackage{tikz} \usepackage{tkz-euclide} \usetkzobj{all} \usetikzlibrary{shadings,calc,positioning} \usepackage[utf8]{inputenc} \usepackage{array} \usepackage{multicol} \begin{document} \fontsize{12pt}{8pt} \bigskip \begin{minipage}[b][7cm][t]{0.05\textwidth} \footnotesize 1. \end{minipage} \begin{minipage}[b][7cm][t]{0.45\textwidth} \begin{tikzpicture}[scale=1] \tkzDefPoint(0,0){A} \tkzDefPoint(15:3.3){B} \tkzDefPoint(127:2.542){C} \draw[thick](A)--(B)--(C)--cycle; \tkzLabelAngle[](C,B,A){\small $29^{\circ}$} \tkzLabelAngle[](B,A,C){\small $112^{\circ}$} \tkzLabelAngle[](A,C,B){\small $39^{\circ}$} \end{tikzpicture} \end{minipage} \begin{minipage}[b][7cm][t]{0.05\textwidth} \footnotesize 2. \end{minipage} \begin{minipage}[b][7cm][t]{0.45\textwidth} \begin{tikzpicture}[scale=1.6] \tkzDefPoint(0,0){A} \tkzDefPoint(177:3.2){B} \tkzDefPoint(205:2.614){C} \draw[thick](A)--(B)--(C)--cycle; \tkzLabelAngle[](C,B,A){\small $54^{\circ}$} \tkzLabelAngle[](B,A,C){\small $28^{\circ}$} \tkzLabelAngle[](A,C,B){\small $98^{\circ}$} \end{tikzpicture} \end{minipage} \begin{minipage}[b][7cm][t]{0.05\textwidth} \footnotesize 3. \end{minipage} \begin{minipage}[b][7cm][t]{0.45\textwidth} \begin{tikzpicture}[scale=1.1] \tkzDefPoint(0,0){A} \tkzDefPoint(9:4.1){B} \tkzDefPoint(74:4.636){C} \draw[thick](A)--(B)--(C)--cycle; \tkzLabelAngle[](C,B,A){\small $63^{\circ}$} \tkzLabelAngle[](B,A,C){\small $65^{\circ}$} \tkzLabelAngle[](A,C,B){\small $52^{\circ}$} \end{tikzpicture} \end{minipage} \begin{minipage}[b][7cm][t]{0.05\textwidth} \footnotesize 4. \end{minipage} \begin{minipage}[b][7cm][t]{0.45\textwidth} \begin{tikzpicture}[scale=0.8] \tkzDefPoint(0,0){A} \tkzDefPoint(109:3.7){B} \tkzDefPoint(209:4.76){C} \draw[thick](A)--(B)--(C)--cycle; \tkzLabelAngle[](C,B,A){\small $46^{\circ}$} \tkzLabelAngle[](B,A,C){\small $100^{\circ}$} \tkzLabelAngle[](A,C,B){\small $34^{\circ}$} \end{tikzpicture} \end{minipage} \begin{minipage}[b][7cm][t]{0.05\textwidth} \footnotesize 5. \end{minipage} \begin{minipage}[b][7cm][t]{0.45\textwidth} \begin{tikzpicture}[scale=0.8] \tkzDefPoint(0,0){A} \tkzDefPoint(290:4){B} \tkzDefPoint(416:3.035){C} \draw[thick](A)--(B)--(C)--cycle; \tkzLabelAngle[](C,B,A){\small $23^{\circ}$} \tkzLabelAngle[](B,A,C){\small $126^{\circ}$} \tkzLabelAngle[](A,C,B){\small $31^{\circ}$} \end{tikzpicture} \end{minipage} \begin{minipage}[b][7cm][t]{0.05\textwidth} \footnotesize 6. \end{minipage} \begin{minipage}[b][7cm][t]{0.45\textwidth} \begin{tikzpicture}[scale=1.1] \tkzDefPoint(0,0){A} \tkzDefPoint(67:4.6){B} \tkzDefPoint(89:3.803){C} \draw[thick](A)--(B)--(C)--cycle; \tkzLabelAngle[](C,B,A){\small $53^{\circ}$} \tkzLabelAngle[](B,A,C){\small $22^{\circ}$} \tkzLabelAngle[](A,C,B){\small $105^{\circ}$} \end{tikzpicture} \end{minipage} \clearpage \end{document}


How to show symbol § when I refer a chapter

I'm writing my thesis and I would like that the reference of the chapters, sections, etc... appears with symbol §, e.g.:  ...as can be seen in §4.1.1  What package or reference/label combination do I need to use? Thanks


Does existence of nonzero linear functional depends on axiom of choice?

Given an arbitrary nonzero vector space $V$, is there a nonzero linear functional on $V$, without assuming axiom of choice? I know that by assuming existence of a basis for $V$, we can consider the dual basis for a subspace of $V^*$, which justifies the existence of nonzero linear functional, but this argument fails without axiom of choice. I guess there may not always be a nonzero linear functional, but my knowledge on axiom of choice and infinite-dimensional vector spaces is lacking. A quick search on Google fails to give an answer.  Note that I am not talking about normed spaces or continuous linear functionals, just plain vector spaces with no additional structure.


Rms value and average value for a periodic wave

Why are we using RMS value over average value for a periodic wave?


Schedule a shutdown that can't be easily cancelled

shutdown -s -t 300 can easily be cancelled later by shutdown -a   Is there a way to schedule a shutdown such that it cannot (easily) be cancelled?


Increase equation resolution in TeX4ht using accessible images or typeset text

When TeX4ht compiles my latex code it generates a png of my equation and includes this in the html file.  Until a better alternative for this comes along I am quite happy with this way of managing/presenting my equations.    This is a collaborative project and I am working with some very anti-latex and anti software people, so I generate html files that they can edit.  By ensuring complete compatibility between the html file and pdf generation everyone remains happy.  I would however prefer to have a higher resolution image that my collaborators can read without getting frustrated with the document quality.    Approaches I have investigated and been unsuccessful with:     An excellent explanation that I apologize for missing during my initial week spent trying to solve this issue here  uses a conversion of eps to svg.     Unfortunately eps are not file extensions that my collaborators can open, nor is it something they are willing or even capable to upgrade software to work with.  So This solution is not my preferred approach unless the final image type is not an eps.    I am sure I am not doing something quite right with the implementation of this as on our work computers I am left only with the eps file, no png or svg are created, and browser/editable integration of the eps is hit or miss.  If memory serves, the mentioned convert program is part of imagemagick which we do have installed, so I am at a loss why the svg or png creation is absent using the custom cfg file mentioned in the solution.  Maybe this should be the question itself which I believe is completely distinct albeit related to the question that this is currently marked as a duplicate for.   It might be neat to use a completely different approach maybe using  which honestly I haven't even been able to figure out how to compile their examples - but I feel it holds promise for the issue I described above if I can figure out what it is supposed to do and how to do it (unless this tool is the best option to solve my problem, this is a question for another day which I will post and edit this question to remove this aspect to prevent duplication).  One aspect of this approach that would interest me, is the appearance that this is not a picture, but formatted text...   Here is my MWE.  \documentclass{report}   \usepackage{amsmath} \begin{document}         \begin{equation}             \text{C~=~}{\frac{a}{b}}         \end{equation} \end{document}


SELinux: How can I use the 8081 port with apache?

I need to use the 8081 port with Apache but Selinux doesn't allow that:  semanage port -l | grep http_port_t http_port_t                    tcp      80, 81, 443, 488, 8008, 8009, 8443, 9000  semanage port -l | grep 8081 transproxy_port_t              tcp      8081   So, if the httpd.conf there is this:  Listen 8081   then I can't start httpd because I get this error:  #systemctl start httpd Job for httpd.service failed because the control process exited with error code.  See "systemctl status httpd.service" and "journalctl -xe" for details.    #systemctl status httpd.service httpd.service - The Apache HTTP Server    Loaded: loaded (/usr/lib/systemd/system/httpd.service; disabled; vendor preset: disabled)    Active: failed (Result: exit-code) since lun 2018-11-05 19:21:31 CET; 36s ago      Docs: man:httpd(8)            man:apachectl(8)   Process: 1953 ExecStop=/bin/kill -WINCH ${MAINPID} (code=exited, status=1/FAILURE)   Process: 1952 ExecStart=/usr/sbin/httpd $OPTIONS -DFOREGROUND (code=exited, status=1/FAILURE)  Main PID: 1952 (code=exited, status=1/FAILURE)  nov 05 19:21:31 localhost.localdomain httpd[1952]: (13)Permission denied: AH00072: make_sock: could not bind to address [::]:8081 nov 05 19:21:31 localhost.localdomain httpd[1952]: (13)Permission denied: AH00072: make_sock: could not bind to address 0.0.0.0:8081 nov 05 19:21:31 localhost.localdomain httpd[1952]: no listening sockets available, shutting down nov 05 19:21:31 localhost.localdomain httpd[1952]: AH00015: Unable to open logs nov 05 19:21:31 localhost.localdomain systemd[1]: httpd.service: main process exited, code=exited, status=1/FAILURE nov 05 19:21:31 localhost.localdomain kill[1953]: kill: cannot find process "" nov 05 19:21:31 localhost.localdomain systemd[1]: httpd.service: control process exited, code=exited status=1 nov 05 19:21:31 localhost.localdomain systemd[1]: Failed to start The Apache HTTP Server. nov 05 19:21:31 localhost.localdomain systemd[1]: Unit httpd.service entered failed state. nov 05 19:21:31 localhost.localdomain systemd[1]: httpd.service failed.   How can I do?


How can I find the inverse of this problem u⊞v:=uv−2(u+v)+6

Let V=(2,∞). For u,v∈V and a∈R define vector addition by u⊞v:=uv−2(u+v)+6 and scalar multiplication by a⊡u:=(u−2)^a+2. It can be shown that (V,⊞,⊡) is a vector space over the scalar field R. Find the following: the sum: 6⊞10=34 the scalar multiple: −3⊡6=2.015625 the additive inverse of 6: ⊟6= the zero vector: 0V=3 the additive inverse of x: ⊟x= As you can see I found the sum and the scalar multiple as well as the zero vector.However, I tried doing the additive inverse of 6 and the additif inverse of x, but I have no idea on how to find the answers.


How to call Lightning Component JS controller call one method from other method without helper      selectOther: function(component, event, helper) {        //Call fetchAddress }, fetchAddress: function(component, event, helper) {        console.log('---fetchAddress'); }


can someone help me: java.net.SocketException: Connection reset

Im having this problem for a while and i can't solve it, i searched for solutions on google for a good time and nothing is working, im a novice on this kind of content so any explanation will help me.


A word for a dumb person who pretends to be smart?

Any word to describe someone who pretends to be sophisticated, smart and know-all but in reality is just so stupid to realize his/her stupidity because he/she always surrounded by likewise stupid people?


Minecraft command block specifiers "[Data value] [Data tag]"?

When using command blocks some commands ask for [Data value] and [Data tag]. I know what Data values are. But what are Data tags? How do translate the Data specifications that I need into "command block language"? And is there a rubric or reference page where I can find all of them so I won't have to bug you all with every specific thing I'm trying to do.


Running Ubuntu 14.04. Recently my sound for Youtube, Spotify, VLC etc. stopped working. However, changing the sound makes a little "bleep" noise and going into the test sound from settings works fine, with or without headphones. So all SFX noises are working fine but sound from a program isn't.  I've checked mute buttons, program sound levels in settings, rebooting, and obviously tried many different programs. The problem may have started after using an HDMI hookup. Any ideas and suggestions would be appreciated, thanks!   Worked it out, using "PulseAudio Volume Control" (sudo apt-get install pavucontrol) and changing the output sources from HDMI to internal analog. Not sure why these weren't showing up in system settings...


why are there only two methods of vector multiplication?

Vector multiplication, there are two types one scalar or dot as $A\cdot B=\vert A \vert \vert B \vert \cos \theta$ and vector or cross $A\times B = \vert A \vert \vert B \vert \sin\theta$ in geometric form and there respective algebric or component form. But what property of vectors makes them work as ways of vector multiplication and other possible ways don't. Basically what is motivation behind the scalar product and vector product how and why they perfectly justify multiplication of vectors.


I need some advice on solving this summation

Suppose we are asked to solve the following summation  $$\sum_{i=1}^{n} (i2^{i-1})$$  Below is my attempt at solving this..  I know that the quotient rule for exponents can help me simplify the summation.  $$\sum_{i=1}^{n} (i2^{i}/2)$$  now i can extract the constant from the summation..  $$ 1/2\sum_{i=1}^{n} (i2^{i})$$  this is where i am stuck.. can anyone give me some advice on what to do next?


How to not show a user in the Ubuntu login screen?

I have created a user called training using the adduser command and user training appears in the login screen. How to not show any particular user in the login screen? I am using Ubuntu 12.04 with the default Unity.


How do I redirect to another webpage using jquery

hello i am trying to redirect to another webapage but its not working:  code which written to redirect:    window.location.replace = "/goal/viewgoal/goalID";   html code:     <button id="submit-new-goal"class="btn btn-sm btn-primary m-l-md redirect">      Continue Save    </button>   complete code:    if (!checkValidation) {   $.ajax({     url: "/goal/createGoal",     type: "POST",     dataType: "json",     data: {       goalSchemaObj,       userID,       selectedTeachers     },     success: function(data) {       console.log("created Goal", data);       $.bootstrapGrowl("
Success!

Goal Created.
", {         type: "success",         delay: 4500,         allow_dismiss: true       });        window.location.replace = "/goal/viewgoal/goalID";     },     error: async err => {       const response = await err;       console.log("creation-cehck", response);       $.bootstrapGrowl("
Error!

something wrong.
", {         type: "danger",         delay: 4500,         allow_dismiss: true       });     }   }); } else {   $.bootstrapGrowl("
warning!

Please Fill all the fields.
", {     type: "warning",     delay: 4500,     allow_dismiss: true   }); }


I need to pass an array inside a routine and then to read its size.  typedef struct {      unsigned char Name[20]; }Sensors_; extern volatile Sensors_ Sensor;   then inside source file  I'm using this method   void Save(){     SaveValue(Sensor.Name) }   void SaveValue(volatile unsigned char Array[]){  printf("%d",sizeof(Array)); }   The real size of my array is 20 characters, but i'm getting in output number 2. Why this is happening? I'm passing my array inside my method, so isn't the size same as my first array?  Also i don't want to pass it  as Sensors_ cause it's a generic method for other names too.


GCC C compiler warning "warning: control reaches..."

i have the following warning when compiling with "gcc -ansi -Wall -pedantic conc.c" what i"m doing wrong , please assist   Thanks,       conc.c: In function ‘main’:   conc.c:8:1: warning: control reaches end of non-void function [-Wreturn-type]   #include <stdio.h> void contract(char s1[], char s2[]); int main() {     char s1[] = "abcd";     char s2[] = "zzzz";     contract(s1,s2); }  void contract(char s1[], char s2[]) {     char temp = 'a';     int i = 0;     while (s1[i] != '\0')     {         temp = s1[i];         i++;     }     if (i != 2)     {         s2[0] = s1[0];         s2[1] = '-';         s2[2] = temp;     }     printf ("\n The first char string is %s \n the shorten one is %s \n",s1,s2); }


Today is the release of Ubuntu 21.04 (Hirsute Hippo). And I can't update to this version. And also I selected ‘Notify me of a new Ubuntu version’ and changed it to ‘For any new version' on the Updates tab on Software & Update, but it's still not working. In addition, in the terminal, I've written: sudo do-release-upgrade -c  And output was: Checking for a new Ubuntu release No new release found.  What should I do?


I have been making a search engine for my website and just got it completed i am using an ajax request to search the database and wanted to know how i can make it safe from any injections?  Search.ajax.php      <?php  $db = new mysqli('localhost', 'root', 'root', 'social'); $search = $_POST['search'];  $query = mysqli_query($db, 'SELECT * FROM users WHERE username LIKE "'.$search.'"');  if (mysqli_num_rows($query) < 1) {     echo "No results found for ".$search.""; }else{     while ($r = mysqli_fetch_assoc($query)) {         $user = $r['username'];         echo '
Go to '.$user.'

';     } }    ?>   I am searching the database for users that have the username of what they put in the search box. i need help making it so no one can search alert(test); if they search this it will show up an alert box here is an example of it.


Has anybody thought about the effects of discretizing time in the way most computers do? In computer programming; collision detection for example, or updating a trajectory of a particle, everything is done by necessity in frames vs continuously. What I've read about quantum time has to do with restricting intervals to some smallest length, which is fundamentally different. In one way the universe would be updated an infinite number of times from time $a$ to time $b$ though time $a$ to $b$ is an extremely small amount... and then what the universe just sort of shuts off? blinks out?   From what I've read the point of quantizing time is to make renormalization possible which has to do with getting rid of infinite quantities, maybe those infinite quantities would get out of the way even easier if we used the other way of quantization (time isn't intervals it's instances in which the universe blinks into existence and calculates a bunch of finite trajectories then blinks out to move everything to those trajectory calculated locations).  As further specification of this concept and it's consequences, you could check out the program and the discussion on the help request tab below it, which inspired this question.


K10D poor focus - manual or auto - with full-frame zoom lens

I'm getting very poor focus particularly at the long end of an 80-320mm tele lens that I am using with my Pentax K10D. The lens was originally bought for my 35mm Pentax SLR (maybe an MZ5 or something, I don't remember, and it's at teh back of a cupboard these days), and worked very well with the film camera. Theoretically the lens is compatible with the K10D, though obviously the different sensor sizes mean that it's not a direct 80-320mm equivalent. The problem has been present since I first bought the camera about 15(?) years ago, but I encountered it a couple of nights ago again and the frustration led me to post this question in case there is a solution. The photo below shows the issue.  The image was shot at the '320mm' end of the tele lens and the settings are shown below.  The image is absolutely pin sharp in the veiw finder, but as you can see the resulting photo is blurred. Not only that, but the 'in-focus' beep and dot are on when the image appears to be in focus. A while after gettng the camera I swapped the focus plate for a 'Katz Eye Optics' split prism partly to see if this led to any improvement and partly because I always loved this type of focus on my dad's old Pentax film cameras. Sadly it made no difference so it seems that the problem was not that the image was out of focus in the VF. I've read about the AF issues on the K10D, but this is when manually focussing and also when ignoring the 'in-focus' beep (I tried ignoring the beep years ago when I first saw the issue - long before I read about the K10D AF issue). I haven't seen the problem with the 28-80mm lens supplied with the K10D, but I have assumed that that is because it has a max focal length of 80mm and the problem only seems to manifest at the long end of the tele lens. Is this problem likely to be lens incompatability, an issue that is only noticeable when shooting subjects like this at a distance, or something inherantly wrong in the body (like the AF / back focus issue)? Edit: I forgot to mention that I also had a Circular Polarizer fitted for this shot as the moon was very very bright that night, but the same blur occurs without when shooting other subjects.


Diophantine Equation: how to find k such as solutions are natural numbers?

I was trying to solve some algorithms when I found out that one could leverage a simple stupid linear Diophantine equation, but I cannot figure out how solve it (I'm pretty sure I would have been able to do that back in high-school but I guess I am getting rusted).  Basically, I ended up on this equation: $ax+by=c$, where $a=3$, $b=5$ and the triplet $\lbrace a, b, c\rbrace \in ℕ$  Which is to say the least the most "basic" Diophantine equation.  Obviously, I am trying to find out the value of $x$ and $y$ according to $c$ that are .   The equation has a solution upon the condition that $c$ is a multiple of $gcd(a,b)=gcd(3,5)=1$   I noticed that there is an obvious solution here, which is the couple: $\lbrace x=2c, y=-c\rbrace$  Supposedly other solutions are of the form: $\lbrace x + kv, y − ku\rbrace$ where $k$ is an arbitrary integer such as: $u=\frac{a}{gcd(a,b)}=\frac{3}{1}=3$ and $v=\frac{b}{gcd(a,b)}=\frac{5}{1}=5$.  Therefore other solutions are more specifically $\lbrace 2c = x + 5k, -c = y − 3k\rbrace$  Equivalent to: $\lbrace x = 2c - 5k, y = -c + 3k\rbrace$  At that point I cannot manage to find the value of $k$ that would make $x$ and / or  $y$ positive.   The replacement strategy seem to lead to nothing.  I am pretty sure it might be really easy but cannot get my head around it.  Any idea?  [Edit]  My point is how to find out $k$. If I'm just replacing $x$ and $y$ with their respective values found above in the former equation, I am going to end up with:  $3(2c+5k) + 5(-c+3k) = c$  $\Rightarrow 6c + 15k -5c + 15k = c$  $\Rightarrow c + 30k = c$  $\Rightarrow 30k = c - c = 0...$  I don't think $k$ is equal to $0$... so I might be wrong.


How to get a unique temporary file path using Swift/Cocoa on OS X? Cocoa does not seem to provide a function for this, only NSTemporaryDirectory() which returns the path of the temporary directory. Using the BSD mktemp function requires a mutable C-string as argument.


Prove that $\lim_{n \rightarrow \infty} \frac{1}{\sqrt{n(n+1)}} + \frac{1}{\sqrt{(n + 1)(n+2)}} + \cdots + \frac{1}{\sqrt{2n(2n + 1)}} = \ln 2$

To be honest, I don't have much ideas on how to prove it. I only had an idea of using inequation $\frac{1}{n + 1} < \ln(1 + 1/n) < \frac{1}{n}$. But for sure it doesn't give us good approximation.


Preventing SQL injection with PDO or MySQLi

I have read the following post, and have some questions:    I see you can choose between PDO and MySQLi. Is there any difference, and how do I choose between them?  In the example code they use :name for PDO queries and ? for MySQLi. What shall I replace those with? Just a PHP variable?  Finally, how do I prepare to begin using PDO on my website? Is there any thing I need to install or add, or can I just begin, and use the same code as provided in the examples?  Thank you


Connecting to host by SSH client in Linux by proxy

I am really struggling with this.     My host (A) is behind a proxy/firewall (PF) and needs to connect to   host H.   The proxy has HTTP/FTP/SOCK proxy configured and I have no issue to configure in web browser, wget etc.  But when I use...   ssh H //to connect my host    I have no success to pass over the proxy. It seems to try to connect directly instead of going via the PF.  I am using Ubuntu 12.10.


Create default home directory for existing user in terminal

How do I do this? I created a user without a home directory and now I want to create one. Not just a folder called new_user, I want the default home directory with all it's folders and hidden files, etc.


I have not yet finished the books, but I have seen the films, and in the final film, I think I saw the trio run past Lavender in the courtyard as someone drank her blood.  Is this correct?    DVK's answer to  states that she died, but what actually happened to Lavender? Is it different in the books?


Problems With Implementing RecyclerView Adapter for Fragment

Basically I'm trying to implement a Recycler View for a Tasks Fragment, and have followed what most people seem to have done that have worked for them but have come up with an issue where the myAdapter.startListening() method prompts this error message:  java.lang.NullPointerException: Attempt to invoke virtual method 'void com.example.student_productivity_and_reflection_app.tasks.TaskAdapter.startListening()' on a null object reference  I'm not sure what went wrong. Here is my Task class: public class Task {     private String title, description;     private Date date;      public Task() {         //Empty constructor needed for firebase     }      public Task(String title, String description, Date date) {         this.title = title;         this.description = description;         this.date = date;     }      public String getTitle() {         return title;     }      public void setTitle(String title) {         this.title = title;     }      public String getDescription() {         return description;     }      public void setDescription(String description) {         this.description = description;     }      public Date getDate() {         return date;     }      public void setDate(Date date) {         this.date = date;     } }   Task Adapter: public class TaskAdapter extends FirestoreRecyclerAdapter <Task, TaskAdapter.TaskHolder>{      public TaskAdapter(@NonNull FirestoreRecyclerOptions<Task> options) {         super(options);     }      @Override     protected void onBindViewHolder(@NonNull TaskHolder holder, int position, @NonNull Task model) {         holder.textViewTitle.setText(model.getTitle());         holder.textViewDescription.setText(model.getDescription());         holder.textViewDate.setText(String.valueOf(model.getDate()));     }      @NonNull     @Override     public TaskHolder onCreateViewHolder(@NonNull ViewGroup viewGroup, int i) {          View v = LayoutInflater.from(viewGroup.getContext()).inflate(R.layout.task_items, viewGroup, false);          return new TaskHolder(v);     }      class TaskHolder extends RecyclerView.ViewHolder {          TextView textViewTitle;         TextView textViewDescription;         TextView textViewDate;          public TaskHolder(@NonNull View itemView) {             super(itemView);              textViewTitle = itemView.findViewById(R.id.task_title);             textViewDescription = itemView.findViewById(R.id.task_description);             textViewDate = itemView.findViewById(R.id.task_date);         }     } }   And TasksFragment: public class TasksFragment extends Fragment{    private FirebaseAuth mAuth = FirebaseAuth.getInstance();   private FirebaseFirestore db = FirebaseFirestore.getInstance();    private TaskAdapter myAdapter;   private FloatingActionButton newTask;   private RecyclerView recyclerView;    @Nullable   @Override   public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {       return inflater.inflate(R.layout.fragment_tasks, container, false);   }      private void fetchTasks(View view){        Query query = db.collection("users").document("coolguy").collection("task").orderBy("date", Query.Direction.DESCENDING);        FirestoreRecyclerOptions<Task> options = new FirestoreRecyclerOptions.Builder<Task>().setQuery(query, Task.class).build();        myAdapter = new TaskAdapter(options);        recyclerView = view.findViewById(R.id.tasksList);       recyclerView.setHasFixedSize(true);        recyclerView.setLayoutManager(new LinearLayoutManager(getContext()));        recyclerView.setAdapter(myAdapter);      }      @Override     public void onStart() {         super.onStart();         myAdapter.startListening();     }      @Override     public void onStop() {         super.onStop();         myAdapter.stopListening();     } }   ( I know the date should be a Date variable with a proper format but I was planning to fix that once the functionality actually worked. )


What is the extension(or generalisation) of the sigmoid function to non-binary classification?

I understand that one of the main points of using the sigmoid function on responses in binary classification is that we can interpret value outputted as the probability that an instance belongs to 1 of the classes say A, and as it's binary classification, 1-(this probability) gives the probability of it belonging to class B. My question is: what if there are more than 2 classes, say n, what is the generalization of the sigmoid function?


I have data:  7456 7456 0 0 0 2 7463 7463 0 0 1 2   I want to add column headers so the output is:  FID IID PAT MAT SEX PHENOTYPE  7456 7456 0 0 0 2 7463 7463 0 0 1 2   I have tried echo -e "FID\tIID\tPAT\tMAT\tSEX\tPHENOTYPE" | cat file1 > file2  But this is copying the original file and not the headers.  sed '1i\FID, IID, PAT, MAT, SEX PHENOTYPE' file1 > file2   has the error  sed: 1: "1i\FID, IID, PAT, MAT,  ...": extra characters after \ at the end of i command   Any advice please?


Prove the Radical of an Ideal is an Ideal

I am given that $R$ is a commutative ring, $A$ is an ideal of $R$, and $N(A)=\{x\in R\,|\,x^n\in A$ for some $n\}$.  I am studying with a group for our comprehensive exam and this problem has us stuck for two reasons.  FIRST - We decided to assume $n\in\mathbb{Z}^+$ even though this restriction was not given. We decided $n\ne 0$ because then $x^0=1$ and we are not guaranteed unity. We also decided $n\notin\mathbb{Z}^-$ because $x^{-1}$ has no meaning if there are no multiplicative inverses. Is this a valid argument?  SECOND - We want to assume $x,\,y\in N(A)$ which means $x^m,\,y^n\in A$ and use the binomial theorem to expand $(x-y)^n$ which we have already proved is valid in a commutative ring and show that each term is in A so $x-y$ is in $N(A)$. The biggest problem is how to approach the $-y$ if we are not guaranteed unity. Does anyone have any suggestions?  Thank you in advance for any insight.


Rogue AI story mentioned by Stephen Hawking on Last Week Tonight

On the seventh episode of Last Week Tonight John Oliver . Here's part of the exchange:     Artificial intelligence could be a real danger in the not-too-distant future. It could design improvements to itself and out-smart us all.      I know you're trying to get people to be cautious there, but why should I not be excited about fighting a robot?       You would lose.       Okay, for a start we don't know that. We don't know that for sure. 'Cause what could a robot do that I couldn't then fight back by simply unplugging him?       There's a story that scientists built an intelligent computer.   The first question they asked it was: "Is there a God?" The computer   replies: "There is now." And a bolt of lightning struck the plug so it   couldn't be turned off.   The story he referenced immediately struck me as familiar. I believe other story components include that the AI was built in an isolated, possibly mountaineous, location and that it killed all but one of the scientists present when it achieved singularity. It managed this by somehow generating energy bursts which prevented its shut-down.


How does sed -e '/./{H;$!d;}' -e 'x;/AAA/!d;' works to print paragraph

Can anyone please explain how does the below sed command works to print a paragraph?  Command:  sed -e '/./{H;$!d;}' -e 'x;/AAA/!d;' file   If possible can anyone explain by breaking this command into pieces so that i can full understand how to modify the command as per different condition.


How do I run a single command at startup using systemd?

I'd like to startup an Apache Spark cluster after boot using the following command:  sudo ./path/to/spark/sbin/start-all.sh   Then run this command when the system prepares to reboot/shutdown:  sudo ./path/to/spark/sbin/stop-all.sh   How can I get started? Is there a basic template I can build on?  I've tried to use an extremely simple (file: /lib/systemd/system/spark.service):  [Unit] Description=Spark service  [Service] ExecStart=sudo ./path/to/spark/sbin/start-all.sh   Which doesn't work.


So, I'm making something where a command block teleports a player a certain amount above the player. If I use the command /tp @p ~ ~1 ~, it teleports me above the command block. Any help would be appreciated! thanks!


I need to show that $\sum (-1)^{n+1} / n$ = $k$ (which is $1 - 1/2 + 1/3 - 1/4+...$) can be expanded to a sum with $ 1 - 1/2 + 1/3 + 1/5 - 1/4 +1/7 + 1/9 - 1/6 + .... $ which is $3k/2$.   How can I start? I know that $k/2$ = $\sum (-1)^{n+1}/2n$ How can I go further so I get $3k/2$?


I mean, of course $e^{e^9}$ is not an integer, but can we prove this? If you're thinking of asking Wolfram|Alpha, be warned: it gives different answers to the questions "is exp(exp(9)) an integer" (WA says "No") and "is exp(exp(9.0)) an integer" (WA says "Yes").


Prove that $(\frac{n+1}{n})^n<n\quad $ for any n=3,4,5... by using induction.  For n=3 is true. and lets assume $(\frac{n+1}{n})^n<n$ is true. we must show that $(\frac{n+2}{n+1})^{n+1}<n+1$ is true. How can I continue?


Show that Q[x] /(x^2-2) is not isomorphic to Q[x] /(x^2-3)

Show that $$Q[x]/(x^2-2)$$ is not isomorphic to $$Q[x]/(x^2-3)$$  I was practicing some exercises in Hungerford's abstract algebra book, I could make them all but this one. I think I have to verify if it is irreducible and thus be able to say if it is isomorphic, but I do not know how. I hope you can help me understand.


How long does it take a magnet to lose its magnetization?

As we all know, a magnet has some magnetization that lets it attract other ferromagnetic materials but I was wondering how long it takes to lose this magnetization? Is it even possible or not?


How do you find the Lie algebra of a Lie group (in practice)?

Given a Lie group, how are you meant to find its Lie algebra?  The Lie algebra of a Lie group is the set of all the left invariant vector fields, but how would you determine them?  My group is the set of all affine maps $x \rightarrow A.x+v$ from $R^n$ to $R^n$ under function composition.


How do I know which software downloads to trust?

When I search for software in the Ubuntu Software Center, how do I know whether or not software is trustworthy to download?  On Windows, I came to be careful about downloading just anything because it might be packaged with adware, or possibly even malicious code.  For example, I found the Metadata Anonymization Tool () in the software centre.


Evaluate the integral $\int_0^\infty \frac{dx}{\sqrt{(x^3+a^3)(x^3+b^3)}}$

This integral looks a lot like an elliptic integral, but with cubes instead of squares: $$I(a,b)=\int_0^\infty \frac{dx}{\sqrt{(x^3+a^3)(x^3+b^3)}}$$ Let's consider $a,b>0$ for now. $$I(a,a)=\int_0^\infty \frac{dx}{x^3+a^3}=\frac{2 \pi}{3 \sqrt{3} a^2}$$ I obtained the general series solution the following way. Choose $a,b$ such that $a \geq b$, then: $$I(a,b)=\frac{1}{a^2} \int_0^\infty \frac{dt}{\sqrt{(t^3+1)(t^3+b^3/a^3)}}=\frac{1}{a^2} I \left(1, \frac{b}{a} \right)$$ $$\frac{b^3}{a^3}=p, \qquad I \left(1, \frac{b}{a} \right)=I_1(p)$$ $$I_1(p)=\int_0^\infty\frac{dt}{\sqrt{(t^3+1)(t^3+p)}}=2 \frac{d}{dp} J(p)$$ $$J(p)=\int_0^\infty\sqrt{\frac{t^3+p}{t^3+1}}dt=\int_0^\infty\sqrt{1+\frac{p-1}{t^3+1}}dt=$$ $$|p-1| \leq 1$$ $$=\sum_{k=0}^\infty \left( \begin{array}( 1/2 \\ ~k \end{array} \right) (p-1)^k \int_0^\infty \frac{dt}{(t^3+1)^k}$$ Now this is the most problematic part. The first integral of this series diverges. However, it's a constant in $p$, so if we differentiate, it formally disappears: $$I_1(p)=2 \sum_{k=1}^\infty \left( \begin{array}( 1/2 \\ ~k \end{array} \right) k (p-1)^{k-1} \int_0^\infty \frac{dt}{(t^3+1)^k}$$ Now, every integral in this series converges. The integtals can be computed using the Beta function, if we substitute: $$t^3=\frac{1}{u}-1$$ Finally, we rewrite: $$I_1(p)=\frac{\Gamma (1/3)}{3 \sqrt{\pi}} \sum_{k=1}^\infty \frac{k^2}{k!^2} \Gamma \left(k- \frac{1}{2}\right) \Gamma \left(k- \frac{1}{3}\right) (1-p)^{k-1}$$ Or, using the Pochhammer symbol:  $$I_1(p)=\frac{2 \pi}{3 \sqrt{3}} \sum_{k=0}^\infty \frac{(k+1)^2}{(k+1)!^2} \left(\frac{1}{2}\right)_k \left(\frac{2}{3}\right)_k (1-p)^k$$  My questions are:  Is the method I used valid (see the 'problematic part')? How to get this series into a Hypergeometric function form? Is there any 'arithmetic-geometric mean'-like transformation (Landen's transformation) for this integral? How to go about finding it?  If the method I used is correct, it can be used for any integral of the form ($m \geq 2$): $$I_m(a,b)=\int_0^\infty \frac{dx}{\sqrt{(x^m+a^m)(x^m+b^m)}}$$


What is the mean of negative sign in PCA?

I used PCA to project 4 dimensions to 2 dimensions. All the values were positive, but PCA gave me negative values.   I wonder if the negative only means correlates negatively with the axis.


Where are the key wardens and where are my Infernal Machines to create a Hellfire Ring/Hellfire Amulet?

In order to obtain a Hellfire Ring or Amulet, one has to work their way through the Uber Boss system of harvesting machines and organs to produce a legendary ring or amulet ().  To create the infernal machine required to open the portals to the Ubers, the keys are drops from mobs nick named Key Wardens.  Where are the various key wardens?  Are there any requirements for making the machines drop? What's the drop rate on different difficulty settings?


Which mosfets can be used for level shifting

I would like to build a 5v circuit that uses an sd card and a 3.3v SPI screen and for the level shifting I would like to use the common mosfet circuit, but all versions I have seen use a BSS138 which comes just in surface mount format.  Are there other alternatives to this mosfet that come in through hole format? like TO-92 format?  I was thinking of using a BS-170, is it ok for my use?  Note: The SPI clock will be 8 MHz   The circuit I'll be using (Source sparkfun's level shifting tutorial)


Is it possible to compute $\int_{-\infty}^\infty {x \sin x\over x^4+1}dx$ without using complex analysis?

$$\int_{-\infty}^\infty {x\sin x\over x^4+1}dx$$   By using things like Feynman's trick (Differentiating under the integral sign) or other high school level calculus concepts? I do not know things like residue theorem.


I have an error in:   for (int i = 0; i <listfiles.length; i ++) {   I do not understand it because, if I already have all the permissions.  public static ArrayList<String> getFilePaths(String directory){     ArrayList<String> pathArray = new ArrayList<>();     File file = new File(directory);     File[] listfiles = file.listFiles();     for(int i = 0; i < listfiles.length; i++){         if(listfiles[i].isFile()){             pathArray.add(listfiles[i].getAbsolutePath());         }     }     return pathArray; }   Permission     Checking if the permits have been obtained.      Error:  java.lang.NullPointerException: Attempt to get length of null array


Transform coordinates EPSG:32628 to EPSG:3857 Openlayers 3

I need to transform the example coordinates to a different projection in Openlayers3, the EPSG:32628 to EPSG:3857. I made a function to do it but the result is exactly the same numbers.  function plsHelp(){     var pt = [459123.1209, 3108334.7701];     var scr = new ol.proj.Projection('EPSG:32628');     var dest = new ol.proj.Projection('EPSG:3857');     var test= ol.proj.transform(pt,scr,dest);     console.log(test); }   What is wrong with the function that is preventing the tranformation of the coordinates from EPSG:32628 to EPSG:3857 in Openlayers 3?


Problem with a Moebius transformation from disk to itself

I need to show that a) every Möbius transformation that maps the disk onto itself can be written as $g(z)=e^{i\theta}\frac{z-z_0}{\bar{z_0}z-1}$, and b) that this function maps the unit disk onto the unit disk. I'm currently trying to make sense of the last part. Taking modules I get the following result: $|z|^2+|z_0|^2<1+|z||z_0|$, and I have been stuck there since. How can I prove this inequality given that $|z|,|z_0|<1$?


JavaScript execution context and closures

I am trying to understand closures in depth. Consider this example from :    var add = (function outerAdd() {   var counter = 0;   return function innerAdd() {     counter += 1;     return counter   } })();  console.log(add()); console.log(add()); console.log(add());  // the counter is now 3     The page says that 'Local variables have short lives. They are created when the function is invoked, and deleted when the function is finished.' This means that counter is deleted after the outer self invoking function outerAdd runs.   But the inner returned function innerAdd is still able to access counter because of the scope chain that was formed when innerAdd was defined (or executed?). So now the question is, does the scope chain copy the variable values when a new execution context is created? Because if the scope chain simply maintained a pointer to counter, it should throw an error as counter got deleted after outerAdd function finished running.   Also, what if counter was an object? How will the 'copying' behaviour work then? As objects are copied by reference in JavaScript.   EDIT: I appreciate all the answers here. But what I am really trying to understand is the inner working of closures, as explained by . So I am looking for an explanation which is something on those lines. Other Stackoverflow answers don't really explain how this happens internally?   Like I don't understand when exactly was counter referred by the scope chain of innerAdd? If it was during execution of innerAdd (i.e. when an execution context was formed for innerAdd), then why was counter not garbage collected at that time? As once outerAdd finished execution, there is nothing referencing counter.


Context and normal menus appear to left instead of the right like they used to

Why are some context menus and menus suddenly screwed up? What I mean is, they've always opened up to the right, but now they're facing the left??? It's really getting on my nerves. I cannot stand it any longer. It's extremely painful to look at:   I have not installed any weird junk on my PC. It's a fresh install of Windows 8.1.


I want to play a file from a folder containing more than one track, but Minecraft doesn't seem to allow one to specify a song from the folder, and only picks a random song out of those listed to be played.    I've tried making a new folder that contains only the sound file I want but it doesn't play anything at all when I try that.  Is there any file I can alter, folder I can create, or really anything I can do to play a specific sound file?


Setting environment variables for latex and bibtex in .bashrc

Possible Duplicate:          I recently started using TeX to write journal articles. I use TeX Live version 2009-10 on a laptop running Ubuntu 10.10 (64-bit). I edit and compile the tex files using vim and vim-latexsuite.   Currently for each journal article I have all associated tex, bib, eps, etc. files in individual folders. I would like to simplify my life a bit and have a dedicated folder containing a "master" bib file - And maybe another folder for my custom style files.   My problem is that can't figure out how I should define the PATH, and other environment variables in my .bashrc file to find the necessary support files (e.g., the .bib file). Which variables do I need to set? PATH? MANPATH? TEXINPUTS? BIBINPUTS?


Don't make URLs and title attributes count towards comment character limits

Background  This feature request is strongly related to , but the underlying intentions – as well as the specific request – are different.  The bug report  only addresses automatically generated links, not links using Markdown syntax.  Motivation  The character limits are in place to prevent users from posting comments that are either too short or too long. But the length of a comment, for most practical purposes, depends on the amount of text that's being displayed.  As it is, the following comments are too long:      This is a comment linking to a lot of , ,  and . Some of the s are rather long.     s don't have to be long to exceed the  on  if the  is used.    To add insult to injury, the following comments are valid:      This is a huge wall of text, possibly from a user rambling about something he should have either said in an answer of his own or kept quiet altogether. Since there are so many words – and you can't use paragraphs in comments – it separates 1) different points 2) in several 3) sequentially numbered 4) but equally obnoxious 5) list items. By now, you probably have lost interest and stopped reading, or you're silently hoping for the audio version narrated by Jeremy Irons, the soothing voice of Scar from The Lion King. Lion King? Hyenas? Wasn't there a song? Must stay focused and finish reading...         The 600 character maximum is too restrictive when posting links (let alone links with title attributes).  @Shog9 suggested in  to simply increase that maximum, but the current maximum already allows almost unbearable walls of text.  Also, the link syntax might only one of the many ways to circumvent the 15 character minimum, but it's probably the most widely known. Users should at least learn proper Unicode to be able to do that!  Request / TL;DR  In comments, when posting links using the [text](URL) or [text](URL "title") syntax, don't make the URL and title count towards the existing character limits (both maximum and minimum).  To prevent potential abuse of this feature, limit the overall count of characters to 1500.


Find all triangles whose area is 1 and length of sides are all rational numbers.

Problem  I am working on a problem to find all triangles whose sides are $a,b,c\in \mathbb{Q}$,and its area $S=1$  My attempt   By using Heron’s fomula,  $$ S=\sqrt{\frac{(a+b+c)(a+b-c)(a-b+c)(-a+b+c)}{16}}\\=1$$  and  $$x+y> z \mbox{, for} \left\{x,y,z\right\}=\left\{a,b,c\right\}.$$  Then,to deal with the complex latter condition, I made the following transformation$$\begin{align} &x=-a+b+c\\ &y=a-b+c\\ &z=a+b-c \end{align}$$so that $x+y+z=a+b+c.$  Now,$$S=1\\ \Leftrightarrow xyz(x+y+z)=16\\ \mbox{which } x,y,z>0  \mbox{ and } x,y,z\in \mathbb{Q}$$ The equation is simple. However, I don’t know how to cope with the condition that $x\, y\,z$ are all positive rational numbers.It seems hard to deform.  I have known that $(\frac{3}{2},\frac{5}{3},\frac{17}{6})$ is a solution to the problem and there are more. But I don’t know how these numbers are calculated. I am puzzled by these figures.


How to upgrade from Ubuntu 14.04 (32-bit) to latest Ubuntu Budgie (64-bit)?

Ubuntu 14.04 (32-bit) is installed on my laptop along with Windows 7. I have barely used Ubuntu, but I'm on it now since Windows is troubling me. I was looking for a Ubuntu flavour that is light-weight, and I found Ubuntu Budgie, which is also pretty sweet looking, hence I opted for that. I'd be highly grateful for exact steps on how I can update to the latest version of Ubuntu Budgie (64-bit version.) Please let me know if I need to update Ubuntu 14.04 as well. Note: When I was trying to update the OS using Software Updater, I would get the error, "Requires installing from untrusted sources." And I'd have two options, "Settings..." [which leads to the Software Updater] and "Close". Related Queries:  Do all the flavours of Ubuntu require the 'original' Ubuntu to be installed, or they are stand-alone operating systems?  I need an operating system which is light-weight and can run most Windows software. Is Ubuntu Budgie a good pick or should I go for something else?   Device specifications:  Memory: 3.9 GiB Processor: Intel Core i3-2350M @ 2.30GHz x 4 Graphics: Gallium 0.4 on NVD9 OS type: 32 bit Disk: 47.3 GB


If $R$ has zero divisors, does $R[x]$ have invertible polynomials of degree greater than $0$?

In my book, it is claimed without proof that if a ring (commutative with identity) $R$ has zero divisors, then $R[x]$ has invertible polynomials of degree greater than $0$. They give the following example in $\mathbb{Z}_4$: $$(1+2x)(1+2x)=1$$ This seems like a pretty lucky example: in this ring we have a zero divisor whose sum with itself is $0$. In general this doesn't seem like an easy question to tackle. First i thought that maybe could find some $a$ such that $a^2 = 0$ and use the factorization $(1+ax)(1-ax)$ but in general such $a$ does not exist: $\mathbb{Z}_6$ is a counterexample. No polynomial of form $(1+ax)$ has a degree $1$ inverse in $\mathbb{Z}_6[x]$ either. Trying out higher degrees seems like a nightmare.


Partitions required for Installing Ubuntu?

I have a Laptop with 1TB hard disk space. I can allocate 100GB for Ubuntu. Currently there is only Windows 7 installed. I am new to Ubuntu & am confused by terms like mount point, root partition, swap partition, etc. The doc over  gives some details, but I dont know what they mean. For installing Ubuntu I have shrunk 100GB from a drive & now that space is unallocated. So what should I do now? In how many partitions should I divide that space & what conventions should be followed. Should I do this in the Ubuntu installer or should I do all this before installing Ubuntu? Please I dont understand the terminologies used on that doc so please tell me in simple language. Thank You.


How can I calculate business hours between two dates? with working time 9Am to 5 Pm

How can I calculate business hours between two dates? For example, we have two dates; 01/01/2010 15:00 and 04/01/2010 12:00 And we have working hours 09:00 to 17:00 in weekdays How can I calculate working hours in Salesforce formula field


I was trying to look for an answer of mine earlier and did a search like this:  user:me SQLite RunInTransaction   The above found nothing. So I changed it to  user:me SQLite   Which found a bunch of things. I dug through the results and saw this snippet for :     From my experience, wrapping as many database calls as possible into a transaction speeds things up quite a bit: using (var db = new SQLiteConnection(dbPath)) { db.RunInTransaction(() => { …    Notice that the snippet contains both "SQLite" and "RunInTransaction". In looking at the post itself I noticed "SQLite" was in the question title and in my answer as code. I also noticed that "RunInTransaction" is only in my answer in code.  I looked at meta and saw , which says I need to prefix any code with code:, so I tried:  user:me SQLite code:RunInTransaction user:me code:SQLite code:RunInTransaction   None of the above returned any results.  I also found  on meta which says I can search for code like this (without the code: prefix):        So I tried:  SQLite RunInTransaction "SQLite RunInTransaction"   The first did not return my answer. The second did not return any results.  So my question:  How do I properly search for , that has both "SQLite" and "RunInTransaction" in the post?


Is second authorship good for an undergraduate student planning for masters admit?

As an undergraduate student, I worked along with my professor and his PHd student on one of the projects that comes under his thesis. We shared the work equally and now I'm being offered 2nd authorship. Does it add value to my resume or will the evaluvators assume my contributions were less.


Is there a way to make the bibliography appear a number of times in a document?

I'm currently creating a short document with a number of projects that are being offered by my school. However, each project has roughly 2-3 citations and are unique to each project.   More to the point, at the end of each project I would like to include a small reference section, is this possible?   Luckily the references will all be from the same .bib file but I'm still not sure where to begin.


I have the usual problem of non-numeric way of citation of Biblatex. Prior to compilation I deleted auxiliary files. When I copied code into Overleaf it compiled correctly. As my IDE I'm using TexStudio. What else could go wrong?  \documentclass{report}   \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{lmodern} \usepackage[ngerman,english]{babel} %\usepackage[style=numeric-comp]{biblatex} %the same problem with that line \usepackage[backend=biber,style=numeric,sortcites,sorting=nty,backref,natbib,hyperref]{biblatex}  \addbibresource{ref.bib} \begin{document} First citation:  \cite{avron2003topological}  Second citation:   \cite{ozawa2019topological}  Third citation:  \cite{latexcompanion}  \printbibliography[title=References]  \end{document}   EDIT: Additionally I get error:  This is BibTeX, Version 0.99d (MiKTeX 2.9.7140 64-bit) The top-level auxiliary file: document.aux I found no \citation commands---while reading file document.aux I found no \bibdata command---while reading file document.aux I found no \bibstyle command---while reading file document.aux


Term for organization being sponsored — "sponsee"?

I have seen a few sponsorship agreements and in one of them the term "sponsee" was used to define the organization being sponsored.  The context was a company who sponsors a local team. The agreement specifies the sponsor's benefits (advertising on the team's shirt, etc) and the sponsor obligations (providing X amount of money, support...).  Is this an actual word? If not, please provide me with alternatives.


What is this type of flexible contact strip called?

The LCD below is from a cheap digital clock which was (obviously) damaged (broken glass).    The electrical connection between the PCB and the display was realized with this pink strip.    Its flexible...    ...and consists of alternating rows of conductive and insulating material between the pink boarders.    [above image was altered in contrast/brightness to highlight the alternating strips]  What is this kind of connector called? Is it only used for displays?   I am pretty impressed that the connection is reliable just from the very slight pressure between the strip and the PCB. Also, its easily removable from the display. There seems to be some conductive layer on the glass, from where the signal goes into the displays internals. This connection seems to be damaged for the three rightmost signals, where the glass is broken.


Why does the Euclidean algorithm for finding GCD work?

I am having trouble understanding why the Euclidean algorithm for finding the GCD of two numbers always works?   I found some resources here (), and here().  But I am a little confused about how they approach it here. I understand that if we have two numbers, a and b, then the greatest common divisor of a and b has to be less than a, and if a divides b, then a will have to be the GCD.   But I am confused about what happens when:  b=a*q+r So now, we are saying that we take a/r, correct? Why should we do this at all?


Let $X,d$ be a metric space .Let $f:X\to \mathbb R$ be a continuous function.Define $G(f)=\{(x,f(x)):x\in X\}$.  Prove that $G(f)$ is homeomorphic to $X$.  My try:  Since $f$ is continuous then $G(f)$ is a closed set. To define a homeomorphism we need a  mapping $g:G(f)\to X$ .Can $g$ be defined as $g((x,f(x))=x$?i.e the projection map.  To check $g$ is a homeomorphism:  Let $U$ be closed in $X$.to show $g^{-1}(U)$ is closed in $G(f)$.Now $g^{-1}(U)=U\times f(U)$ how to show it is closed in $G(f)$??  Next to show that $g$ is a closed map.How to proceed here?  It will be great if someone could check if it is so.


I am just learning Blender. I am going through the .  The first part was good. I was able to follow it. Coming from SketchUp, it is taking some adjustment. But I am getting it.  I am just starting the second video. At the beginning, the instructor selects the top of the mug to extrude it. When he presses the E key and Enter, the red, green blue axis moves to the center of those vertices. That does not happen when I press the E key and Enter.   This is only 1:30 into the video.  How can I get the axis in the middle of this circle of vertices?  The next step is to scale. I need the reference point in the middle of this circle of vertices. I cannot left-click accurately enough to position the axis/reference point.  I am using 2.69. The video uses 2.64.


How to exit OpenSSH control master process without using lsof or fuser?

Is there a more direct way to exit an OpenSSH control master process and delete its socket file than with the help of the programs lsof or fuser and without knowing the destination host (connection details) as suggested by the accepted answer of this ? I thought of something like this along the lines of:  $ ssh -O exit -S ~/.ssh/7eb92b0827f3e8e1e8591fb3d1a5cd1b94b758cb.socket   I'm asking because I'm looking for a scriptable way to exit every open control master connection each time when I log out of my user account. Not doing so causes my sytemd-powered openSUSE computer to wait for a timeout of two minutes until it forcefully terminates the still open control master connection powering off eventually.  Unfortunately OpenSSH's client program ssh requires the destination host and the ControlPath file name pattern in order to deduce the actual file path to the socket file. I on the contrary thought of the more direct method of providing the concrete socket file via the program's -S ctl_path option.  In the global section of my system-wide OpenSSH client config file I configured OpenSSH's connection multiplexing feature as follows:  ControlMaster auto       ControlPath ~/.ssh/%C.socket ControlPersist 30m   Please note that I want to keep the file name pattern for socket files, i.e. hashing the token string %l%h%p%r with the token %C.  Any ideas?


How to I see the number of sessions in the Google Analytics aquisition overview main graph?

Under Acquisition --> Overview, a graph appears around middle of the screen titled "sessions".  It is actually showing the total number of users over a particular time period, I'd like it to show the number of sessions and not users on the blue graph.     How do I change it?


Relationship Between Correlation and Multicollinearity

Suppose I've a model such as   $Y = \beta_0 + \beta_1 X_1 + \beta_2 X_2 + \cdots + \beta_k X_k + \epsilon$.  Now, there's high correlation between $X_1$ & $X_2$ (say over 60% but below 75%). Does that means this model has multicollinearity problem? Is there any relationship between highly correlated variables & multicollinearity? If there's any short literature on this topic?


Is it (too) easy to reverse-engineer a C# .exe?

I am about to begin writing a new Windows application from scratch.  Since it is a Windows application, the power of C#/WPF etc. would do a lot of the heavy lifting of writing it, however, I am concerned about the ease with which C# .exe files can be reverse-engineered.  I am hoping the final application will sell for $10-$30, so we are not talking Autocad or Maya prices, but just how worried should I be that someone could easily create a virtual copy?  I mean $10 is not a fortune, but it is the difference between my being able to carry on developing the application and begging on the streets.  I am wondering if I should use some kind of obfuscation.  Do these really achieve anything?  Do they simply make it harder to get good debug messages out?  Does anyone have any experience of these, and if so can anyone recommend one?  Any advice would be very much appreciated.  Kind wishes ~ Patrick


I have acidently removed some libraries from system and now I does not install or remove any package. Error shown in Software center and in terminal is  installArchives() failed: Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17. Can't exec "locale": No such file or directory a /usr/share/perl5/Debconf/Encoding.pm line 16. Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at/usr/share/perl5/Debconf/Encoding.pm line 17. Can't exec "locale": No such file or directory at/usr/share/perl5/Debconf/Encoding.pm line 16. Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17. dpkg: warning: 'ldconfig' not found in PATH or not executable dpkg: error: 1 expected program not found in PATH or not executable Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin Error in function:    When using apt-get install anyPackage and apt-get install -f anyPackage i get the following error:   Reading package lists... Done  Building dependency tree Reading state information... Done  You might want to run 'apt-get -f install' to correct these.  The following packages have unmet dependencies:  cups : Depends: libc-bin (>= 2.13) E: Unmet dependencies. Try using -f


How can I get, from LaTeX, this a4 flyer? I would like to achieve the background colors with TikZ PGF package. Could you help me?  Thank you!


Explanation of terminal objects using limits

I understand terminal objects, but I falter when trying to achieve them using the approach of diagrams, the category of constant diagrams $\mathcal{C}^{\mathcal{J}}$ and limits.  I have the empty category 0, now I have a diagram $D: \mathcal{J} \to \mathcal{C}$. However this diagrams image should be empty, because there are no objects or morphisms to map. At this point, I'm confused, because I can't get to the universal property $\forall c \in \mathcal{C}. \exists! f: c \to T$ anymore, because I'm missing T. (EDIT: I get that this is how it is supposed to be)  But continuing with the category of constant diagrams, even if I have a constant diagram mapping everything to one object / morphism, there is nothing to map, so the functors image is still empty. So now I'm missing both $T$, and any kind of $c$.  EDIT: It seems to me, have I chosen 1, instead of 0, I would have come up with that is considered the definition of the terminal category. What am I missing?


IllegalArgumentException or NullPointerException for a null parameter?

I have a simple setter method for a property and null is not appropriate for this particular property. I have always been torn in this situation: should I throw an , or a ? From the javadocs, both seem appropriate. Is there some kind of an understood standard?  Or is this just one of those things that you should do whatever you prefer and both are really correct?


Often I see code blocks pasted into questions with no formatting, or terrible formatting.  It's sometimes quite a chore to fix these: you have to either manually space out each line, or paste the code into an IDE, format it there, and paste it back.  Could we have a button/function where you could highlight a code block, and it would turn this:  foreach (var i in stuff) { if (i==1) { Whatever(); } }   into this:  foreach (var i in stuff) {   if (i==1) {     Whatever();   } }   I realise the function would have to work differently based on the language in the code block. Perhaps  it could use the same rules as the prettify code.  Also, it wouldn't be a big deal if it gets the language wrong and breaks the code, since you can always just ctrl+z.


What does it mean that $X$ and $Y$ have same probability distribution?

If anyone says, $X$ and $Y$ have same probability distribution, then what does it mean?   I know if $X$ follows Binomial distribution, the $Y$ also follows Binomial distribution. But for being same probability distribution, do $X$ and $Y$ need to have same parameters too? That is, if $X\sim Binomial(20,0.6)$, then does $Y$ also require to be $Y\sim Binomial(20,0.6)$ for holding the condition that $X$ and $Y$ have same probability distribution ?  Also does "$X$ and $Y$ have same probability distribution" imply that "$X$ and $Y$ are independent"?


How to list all functions in a Python module?

I have a Python module installed on my system and I'd like to be able to see what functions/classes/methods are available in it. I want to call the help function on each one. In Ruby I can do something like ClassName.methods to get a list of all the methods available on that class. Is there something similar in Python? eg. something like: from somemodule import foo print(foo.methods)  # or whatever is the correct method to call


No option to upload image from URL anymore

In the old image uploader (which opened as dialog) there used to be "Upload from web/URL" option. Now in the new uploader embedded inside the editor, such option does not exist:        Can this please be added again? It's very useful when I prefer to not download the picture to my local device first.


Do solutions to the Euler Lagrange equation for physical Lagrangians actually minimize the action? In other words, is it known that for all Lagrangians used in application, that the unique solution to the Euler Lagrange equation subject to initial conditions actually is a global minimum for the action functional? How about local minimum? Are there known counterexamples?


Application Crashes when the user enter's a Letter in the textbox

I created a guessing game application. When the user enters a letter it crashes. I want the textbox to only have integers. I was trying to create a validation so when the user enters a letter it will display a message only integers only. How can I add a validation to the program so where the user can only enter an integer?  I tried using this code but it still crashes:  double input = Convert.ToInt32(txtInput.Text);  if (Double.TryParse(txtInput.Text, out input)) {     txtInput.Text = Convert.ToString(input); } else  {     MessageBox.Show("Please enter a valid number."); }     using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms;  namespace WindowsFormsApplication2 {     public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }          double guess;          private void Form1_Load(object sender, EventArgs e)         {             Random rand = new Random();             guess = rand.Next(1, 101);         }          private void Clickbutton_click(object sender, EventArgs e)         {             double input = Convert.ToInt32(txtInput.Text);              if (Double.TryParse(txtInput.Text, out input))             {                 txtInput.Text = Convert.ToString(input);             }             else             {                 MessageBox.Show("Please enter a valid number.");             }              if (input == guess)             {                 lblMessage.Text = "You Are Corrrect, You Win" + " " +                     " \r\n Random Number was =  " + Convert.ToString(guess);             }             else if (input > guess)             {                 lblMessage.Text = "Number is too High, Try Again";                 txtInput.Clear();             }             else if (input < guess)             {                 lblMessage.Text = "Number is too Low, Try Again";                 txtInput.Clear();             }         }     } }