breaking road segments based on another shapefile in QGIS

I am using QGIS 2.18 and have a road celterline and a grid shapefile which I am using to create an atlas book.  What I want to do is break each road at the edge of each grid that it crosses but I have been unable to find a way to do that.


I am building a todo app. When I add a todo and then click on the todo item below, its text should be crossed (line-through) but its not happening.  HTML:  <!DOCTYPE html>       <meta charset="UTF-8">     <link href="style.css" type="text/css" rel="stylesheet">     <title>Todo</title>

Todo

                     <input class="data" placeholder="Enter data">                      </input>

                         Add

               CSS:  body{     margin:0;     padding:0; } .container{     width:600px;     margin:0 auto;     color:#000; } .header{     background:#dddddd;     height:200px; } .header h1{     color:#FFF;     font-size:50px;     text-align: center;     margin-top:0px; } .add{     height:50px;     background:#FFF;     border-left:1px solid #dddddd; } .text,.submit{     display:inline-block;     float:left; } .text{     width:70%;     height:100%; } .submit{     width:30%;     background:green;     height:100%;     font-size: 30px; } .data{     font-size: 30px;     /* margin-top: 10px; */     /* padding: 10px 0; */     padding-left: 10px;     width:100%;     border: none;     padding-top: 8px;     padding-bottom: 8px; } .submit-text{     /* margin-top: 10px; */     padding: 10px 0;     text-align: center;     color:#FFF; } .todorow{     width:100%;     height:50px;     font-size: 30px;     padding-top:10px;     background:#000000;     color:#FFF; } .todoitem{     width:95%;     float:left;     display:inline-block; } .todoremove{     width:5%;     float:left;     display:inline-block; } .strike{     text-decoration: line-through; }   JS:  console.log("loads");  $(document).ready(function(){     $(".submit").click(function(){        // if (document.getElementsByClassName("data")[0].innerHTML >0)         //{              var value = "

"+$('.data').val()+"

X

";             $(".container").append(value);         //}     });     $(".todoitem").on("click", "#__internal", function(){         $(".todoitem").addClass("strike");         alert("done");         console.log("done");     });     console.log("loads"); });


How to measure exactly the size of filesystem

I need to measure the exact size of some installation.  For example, I need to know the disk usage of apt install vim.  My idea is to install a clean Ubuntu first, then I measure the size of its filesystem (x KB); After that, I do apt install pkgname and measure the size of its filesystem (y KB) again.  So the disk usage of apt install pkgname = y - xKB.  However, there are some virtual directories, such as /proc, so I don't know how to measure the exact size of the filesystem. Also, when we do apt install pkgname, a deb file will be downloaded in /var/cache/apt/archives/, so I don't know how to measure exactly the disk usage for pkgname.


How to place images at an exact position

\begin{figure}[t]\vspace{-1cm} \centering \includegraphics[scale=0.30]{squarew1} \caption{Simulation for $T_1$} \includegraphics[scale=0.3]{squarew2} \caption{Simulation for $T_2$} \includegraphics[scale=0.3]{squarew3} \caption{Simulation for $T_3$} \end{figure}  \section*{Citation} \begin{itemize} \item Decade (log scale). (2021, March 02). Retrieved from \href{https://en.wikipedia.org/wiki/Decade_(log_scale)}{the link} \item Zhang, Q. (2013). Frequency Response of ideal low pass filter. Researchgate.Net. \href{https://www.researchgate.net/figure/Frequency-Response-of-ideal-low-pass-filter_fig5_259436922}{the link} \item Alonso, G. (2020). LTspice: Generating Triangular \& Sawtooth Waveforms. Https://Www.Analog.Com/. \href{https://www.analog.com/en/technical-articles/ltspice-generating-triangular-sawtooth-waveforms.html}{the link} \end{itemize} \end{document}  In the pdf figures appear after citation which I cannot fix.


How to prove that $\mathbb{Z}[X]/g\mathbb{Z}[X]$ is not a field?

How to prove that $\mathbb{Z}[X]/g\mathbb{Z}[X]$ is not a field, where $g$ is a non constant polynomial in $\mathbb{Z}[X]$?   (The key is to show that $f : \mathbb{Z}[X]/g\mathbb{Z}[X] \to \mathbb{Z}/p\mathbb{Z}$ is not injective.)  edit 1: Now I'm trying to find the characteristic of the given ring. Consider the map: $g: \mathbb{Z} \to \mathbb{Z}[X]/g\mathbb{Z}[X]$, where $m \mapsto 1 + 1 + \cdots + 1 $ (m times). Since the $\ker f$ is an ideal of $\mathbb{Z}$, it has to be of the form $n\mathbb{Z}$, where $n$ is the characteristic. So I guess the characteristic is $0$...no?  edit 2: Thank you for all the replies below! I looked through the answer but it's a little advanced for me... I figured it out eventually using some more basic ideas and I'll put it here when I get some time...Thanks again!  edit 3:  My solution:  Step 1: Prove there is a $a \in \mathbb{Z}$ such that $g(a) \neq 0, \pm 1$ and let $p$ be a prime number that divides $g(a)$.  Suppose $g(X) = \sum_{i = 1}^na_iX^i$, then $g(X) = 0$ has at most $n$ integer solutions, $p(X) = g(X) -1 = 0$ has at most $n$ integer solutions, and so is $q(X) = g(X)+1 = 0$. There are at most $3n$ integers that satisfy $g(a) = 0,\pm1$, but $\mathbb{Z}$ is infinite, so there has to be a $a \in \mathbb{Z}$ such that $g(a) \neq 0, \pm 1$.  Step 2: Prove that there is a unique well-defined surjective morphism of rings $f: \mathbb{Z}[X] \to \mathbb{Z}/p\mathbb{Z}$ sending $X$ to $a$ mod $p$ and that it yields a homomorphism of rings $\phi: \mathbb{Z}[X]/g\mathbb{Z}[X] \to \mathbb{Z}/p\mathbb{Z}$.  Observe that $g\mathbb{Z}[X]$ is in the kernel, so the map factor through $\mathbb{Z}[X]/g\mathbb{Z}[X]$.  Step 3: Show that the resulting map is not injective.  Note that the map $\phi$ is injective if and only if $\ker f = g\mathbb{Z}[X]$, but actually $g\mathbb{Z}[X] \subset \ker f$. Alternatively, according to my prof, if the map was injective, $\mathbb{Z}[X]/g\mathbb{Z}[X]$ would identify with a subring of $\mathbb{Z}/p\mathbb{Z}$ so it would have characteristic $p$, contradiction!  Step 4: We use that if $g: K \to A$ where $K$ is a field, then $g$ is either injective or the zero map. Since the above map is not a zero map and we proved that it's not injective, $\mathbb{Z}[X]/g\mathbb{Z}[X]$ can't be a field.


What is the possessive form of Bliss as a proper noun?

My daughter is named Bliss. We want to know how to label things like "Bliss's Toy Box" or would it be "Blisses Toy Box" or "Bliss' Toy Box" as you can tell I'm quite confused... Help please :)


Unicode character prints in IDLE but not Shell - Python

I'm creating a text-based blackjack game in Python 3, and one feature I've added is 'ASCII-art' illustrations of cards. This involves a string containing UTF characters which depict a single card:  "╔═════════╗", "║%s%s       ║" % (value, space), "║         ║", "║         ║", "║         ║", "║    %s    ║" % (suit), "║         ║", "║         ║", "║         ║", "║       %s%s║" % (space,value), "╚═════════╝"   The outline of the card uses Unicode characters, as does the suit variable, which can take one of four characters; ♦ (\u2666), ♣ (\u2663), ♠ (\u2660), ♥ (\u2665).   When I run my program inside the python IDLE, the output is fine.     ╔═════════╗   ╔═════════╗          ║4        ║   ║10       ║          ║         ║   ║         ║    __      _  _        ║         ║   ║         ║   /_ |    | || |       ║         ║   ║         ║    | |    | || |_      ║    ♥    ║   ║    ♣    ║    | |    |__   _|     ║         ║   ║         ║    | |       | |       ║         ║   ║         ║    |_|       |_|       ║         ║   ║         ║          ║        4║   ║       10║          ╚═════════╝   ╚═════════╝         When I run it from file explorer and so in Shell (only trying to print Four of Hearts), I get the error;  File "C:\Python34\lib\encodings\cp850.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_map)[0] UnicodeEncodeError: 'charmap' codec can't encode character '\u2665' in position 8: character maps to (undefined)   I've tried using the Unicode code points in different ways but none seem to work. I looked into my Python's encodings folder which was referenced in the error, and found there was no appearance of codes for my selected characters. Yes, I have put that UTF-8 declaration at the top of my code.  I'm confused because the characters are able to show up in the IDLE but not the Shell.  What is causing this, and how do I fix it so that the characters display without error?  Python 3.4.2, Windows 64-bit


I am writing a cover letter and CV using moderncv. Everything works fine so far, but the text in the cover letter is not justified. I think it is good that it is not hyphenated, but it would look much nicer if the text was justified.  Here is a minimal example:  \documentclass{moderncv} \moderncvstyle{classic}  \usepackage{lipsum} % just for dummy text  \firstname{John} \familyname{Doe}  \begin{document} \recipient{Prof.\ Dr.\ Foo Bar}{} \opening{Dear Professor Dr.\ Bar,} \closing{Yours sincerely,} \enclosure[Attached]{curriculum vit\ae}  \makelettertitle \lipsum[1] \makeletterclosing  \clearpage  \makecvtitle  \section{Education} \cventry{2009--present}{PhD Student}{here}{and}{there}{} \end{document}


How do I quarantine the Jungle from the evil biomes pre hardmode (entering hardmode)?

I'm in a Medium, Classic, Crimson World. I have the jungle biome on the left side of the world near the ocean whilst the crimson biome is on the right side near the other ocean. I've been researching ways on containing the evil biomes and from what I've read, the best way is to dig two hellevators (3 block wide with uncorruptable blocks on either side of the hellevators) on either side of the Jungle. My question is, do I need to put a hellevator on the left side of the Jungle even though the crimson biome is on the right?


Photon energy depends on frequency (and/or amplitude)?

I know there are already some similar questions like  but I can't get my head around it since the answers there seem not to fit very precisely to the question: What is the amplitude of a single photon? I know the energy of a photons depends strictly on its frequency and light is described by electromagnetic waves. Are (single) photons also seen as electromagnetic waves? If so, what does it amplitude then tell? Thank you!


Sum $\cos x + \cos 2x + \cdots + \cos (n-1)x.$

Find the sum of the series $$\cos x + \cos 2x + \cdots + \cos (n-1)x.$$ You must calculate the sum of this series only by multiplying through by $2\sin\left(\frac{x}{2}\right)$.  Now I've heard of finding the sum of a trig series by finding real and imaginary parts etc., but I have no idea how to do it this way.


$\left\lfloor(\sqrt[3]{28}-3)^{-n}\right\rfloor$ is not divisible by 6

let $n$ be a positive integer. Prove that the following expression:  $$\left\lfloor(\sqrt[3]{28}-3)^{-n}\right\rfloor$$  is not divisible by 6.  $\lfloor x\rfloor$ is the greatest integer less than or equal to $x$.


I have read almost every other post about size_t on SO but still i cant get why it should be used. Also i would like to know more about it.  I already know that it is unsigned,it cannot be negative,it is used to represent size of the object.


How to generate create table script without primary and foreign key in Oracle

I have lots of schemas and tables. I want to generate create script of all of my tables. I am using below statement and it is working pretty well.  SELECT DBMS_METADATA.GET_DDL('TABLE','table_name','schema') FROM DUAL   But because this statement also generates all primary and foreign key scripts that belong to table when I try to insert my tables to another location I am getting "ORA-00942: table or view does not exist" error because I didn't create key's reference tables yet.  You can say that, previousl  So, is there any way to not include primary and foreign keys in create table scripts


How can I comment to questions when I don't have enough reputation?

I came across a question for which I have the correct answer. But since the question is a duplicate and the answer only requires a link to that question, the best way to provide the link would be in comments. Since I don't have enough reputation to flag it as a duplicate nor to comment, what can I do?


Is the collection of all functions between two sets a set?

Can we say "the set of all functions between two sets" as easily as we could say "the set of all real numbers", for example?


How and why have some words changed to a complete opposite?

One example that comes to mind is terrific which originally denoted something quite terrorising while now it has positive connotations... How and why did these changes occur?


My dryer heating element broke in two: Can I just wrap the ends together?

I have a Whirlpool Estate dryer that recently quit drying. I narrowed the problem down to the heating element, then removed the element assembly and found a clean break in the coil at one end. A replacement element is 50 bucks online, which isn't a problem, but I wonder: Can I fix the element myself?  I don't have a lot of tools, but I do have a wrench and some 18 gauge aluminum wire. I thought maybe I could scrape the soot off of the element near the break, then wrap the ends together with the wire. I'm not much of a handyman and I'm certainly not an electrician. But I'd like to fix something for a change, rather than just throwing it away. Can the element be salvaged?  Edit: Thanks for the informative answers, guys. I ordered a .


What should the data structure of a flexible ability system look like?

Hi guys I am currently working on a turn-based RPG that will require me to create numerous abilities with little overlap. I've been looking to other games to see how their ability and combat system is design and has run into issues regarding the data structure.  For the purpose of this question let's look at Pokemon RED & BLUE's ability system. Here are a few things that abilities can do:   Target User or Target Enemy or Both (i.e. Self Destruct) Has an Accuracy Value Has 1-2 Element value Has PP Value Is either a Special or Normal attack type (determines which stat is used to calculate the damage value.) Increase / Decrease a primary Stat for the battle (ATK, DEF, SATK, SDEF, SPD, LUK) Increase / Decrease overall Accuracy of the target by X% for Y turns (or the entire combat.) Increase / Decrease overall Evasion of the target by X% for Y turns (or the entire combat.) Deal Damage to Target for X amount (Where X can be based on calculated from the ability's base damage value, or using the damage taken that turn i.e. Counter) Heal the Target for X amount (Where X can be based on calculated from the ability's base power OR based on damage dealt by the ability, i.e. Absorb) Skips X Turn (i.e. Dig) Critical chance * X for this attack. Has X% chance to apply Status Effect Y (Y being: Burn, Confuse, Sleep, Poison, etc) 1 Hit KO Target Cannot be hit for X turn (i.e. Dig) Hits X times (Taking the ability's Accuracy value into account each time.) Forces the attack to happen first Forces the attack to happen last   I believe there may be many more. Now, Pokemon abilities can manifest a combination of any number of the above properties, usually no more than 3-4. For example: - Counter = Skip 1 turn and deals damage to the enemy equal to 2x the damage received that turn as long as it's a Normal or Fighting move. - Dig = Skip 1 turn, cannot be attacked that turn, deal damage next turn. - Absorb = Deals damage, at the same time heal the user for 1/2 the damage dealt. - Self Destruct = Kills self and deal huge damage to the enemy. - Comet Punch = Hits the enemy 2-5 times (each time the hit chance is 85%)  As you can see, this gets quite complex. The examples cited above are just a few of the abilities that the game have and with those capabilities, it's possible to create quite a varied set of abilities that do not overlap.  The problem I am facing is 2 folds:   How would I design the data structure that would allow me to keep adding new abilities like this into the Database after the system has already been written? How would the combat system actually handle the data once it's pulled out?   I assume that it will have to involve some form of scripting... and unstructured data structure like NoSQL so some abilities can have some things and some do not (like skipping turns.) However, how is this normally done? Do I store each ability as a blob somehow and handle them differently in code? That also means that the code MUST be able to handle ALL possible combinations (which will make the combat system extremely complex and time consuming to build?) Or did Pokemon just hard coded all the abilities (which seems quite impractical?)  Here's what we currently have for our ability data structure: (in JSON)  {     "name"     : "Ability Name",     "accuracy" : 0.85,     "base"     : 50,     "type"     : 0,              // (0 = normal, 1 = special)     "target"   : 0,              // (0 = self, 1 = enemy, 2 = both)     "PP"       : 30,     "element1" : 1,              // (0 - 16, for each element)     "element2" : 2,     "blob"     : { ... } }   This will allow for something like the above, but the code would still have to handle all the possible combination of the blob. Would my understanding be correct here?  Any insight would be extremely appreciated.  P.S. - If this question need to be reworded somehow to make it clearer, please let me know... it's an extremely complex problem so I did as best I could, but would appreciate feedback. Thanks!


Definition of geodesic not as critical point of length $L_\gamma$ [*]

Context of this question: This question follows from a post  and discusses on something different. Using calculation of variation we can find critical points of a function of a vaiable curve $\gamma$ with its end points fixed at $a,b$ and therefore defining geodesic on a manifold. (The rest of the paragraph is unnecessary reading for the question; it's mainly for the purpose of arranging my several posts on a topic.) Along the geodesic, exponential maps on a manifold project a tangent vector at a point $p$ (locally approximately linearly) to another point, as discussed here  (a related but different concept of exponential maps of Lie group is discussed here ). Geodesics have as such properties like the 'closed curve' {$\exp_p(v),\forall v$ of the same norm and belonging to $T_pM$} is perpendicular to all the geodesics passing through $p$, and is the shortest curve connecting $a,b$ (i.e. it's also a critical point for length). So we can say the 'closed curve' is very much resembles a circle, and a geodesic a radius or a straight line (We can perhaps even say that with geodesic and exponential maps we 'maps' projective geometry on to a manifold, similar to what we do when, with homeomorphism in definition of a manifold, we 'map' Euclidean space to a manifold). With the fact that geodesics is the shortest curve, we can define a metric (a measure of distance, NOT Riemannian metric which is an inner product and 2-tensor, as discussed here: ) on a manifold. The metric is homeomorphic to the original metric of the manifold, as discussed here . My question is as follows: A critical point of 'energy' (as Spivak calls it) $E(\gamma)=\int_a^b \langle \frac{d\gamma}{dt},\frac{d\gamma}{dt}\rangle dt$--where $\frac{d\gamma}{dt}$ is tangent vector along $\gamma$ at the point of $\gamma(t)$--is called geodesic. (I guess he uses the name 'energy' for in physics square of velocity is proportional to energy.) Why we define critical point for energy, instead of critical point for length $L(\gamma)=\int_a^b\sqrt{\langle \frac{d\gamma}{dt},\frac{d\gamma}{dt}\rangle} dt$, to be geodesic?


Suppose $X_i\in\mathcal{L}^2$ with expectation $0$ such that $\sum_{i=1}^\infty \mathbb{E}[X_i^2]/i^2<\infty$ and suppose they are pairwise non correlated. Does then the SLLN still hold?


Let $n \geq 4$. How many labeled trees are there with $n$ vertices where vertex with label 1 has degree 3?

So I'm a beginner to graph theory and really unsure how to approach this. I was thinking by counting Prufer codes, in which case you would want the second element in the Prufer code to be 3. So, it would be the number of Prufer codes where one of the labels are fixed at 3, so $n^{(n-1)-2}$ labeled trees?


Using the $\epsilon-\delta$ definition of the limit, evaluate, $\lim\limits_{x\to a}f(x)=x^2$

Using the $\epsilon-\delta$ definition of the limit, evaluate $$\lim\limits_ {x\to a}f(x)=x^2$$  I am stuck on $|x−a||x+a|<\epsilon$ and can't eliminate $|x+a|$.


Allow me to scroll popup code blocks from anywhere in the code view in the android app

Steps to reproduce:   Find a question/answer with a code block that, when expanded needs to be scrolled horizontally, but doesn't fill the popup vertically. Try and scroll by dragging the area below the code text, but within the code block popup. Be sad that it doesn't scroll horizontally.   I'd like it to be draggable by dragging anywhere within the popup, not just where the popup text is.    Here is a nice code block to test:  public foo() {     return "Very long string! Very long string! Very long string! Very long string! Very long string! Very long string! Very long string! Very long string! Very long string! "; }


Let $G$ be a nonabelian group. Let $a \in G$ have order $4$ and let $b \in G$ have order $3$. Then the order of the element $ab$ in $G$ :  A. is $6$.  B. is $12$  C. is of the form $12k, k \geq 2$  D. need not be finite'     Attempt: I think the correct option should be $D.$ need not be finite. Since, $G$ is non abelian, A,B,C  shouldn't be true. I just am not able to find a suitable example for D.   Am I correct in my inference?   Thank you for your help in this regard.


Why when().thenReturn always returns NullPointerExeption?

I´ve got a Method that should read in Input 4 times and do this in an Array. Fine that works. I refactored all for making a Unit test with mock objects. Now the method when().thenReturn always ends in a NullPointerExeption . Source Code is from 3 different classes below :  import java.util.Scanner;  public class SystemClass {     Scanner valueIn = new Scanner(System.in);      public String getInput(){         return valueIn.nextLine();     } }   This the extracted ScannerClass  import java.util.Arrays;  public class GuessRefactor {     private SystemClass systemObj;      public String[] guess(SystemClass systemObj){         int k = 1;         String[] guess = new String[4];         for(int i = 0; i < 4;i++){             k = 1;             while(k==1) {                 System.out.println("now the " + (i + 1) + "color ");                 guess[i] = systemObj.getInput();                 if(guess[i].equals("red")||guess[i].equals("blue")||guess[i].equals("yellow")||guess[i].equals("green")||guess[i].equals("purple")||guess[i].equals("brown")){                     k = 0;                 }             }         }         return guess;     }      public static void main(String[] args) {         System.out.println(Arrays.toString(new GuessRefactor().guess(new SystemClass())));     } }   This the guessing ( Its for Mastermind )  import org.junit.Assert; import org.junit.jupiter.api.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.mockito.Mockito; import org.mockito.runners.MockitoJUnitRunner;  import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.when;  @RunWith(MockitoJUnitRunner.class) class TestClass {     @Mock     SystemClass a;      @Test     public void test() {         String b = "rot";         GuessRefactor guessRefactor = new GuessRefactor();         //Mockito.when(a.getInput()).thenReturn(b);         Mockito.when(a.getInput()).thenReturn(b);         String[] expectedOutput = {"red", "red", "red", "red",};         String[] output = guessRefactor.guess(a);         Assert.assertArrayEquals(expectedOutput, output);     } }   This is the TestClass.  Pls Help me!!!


Where is the list of launcher-locked .desktop entries?

Where does Unity (under 16.04) keep its list of desktop files for the Launcher. Not "where are .desktop files found?" but where are just the ones that Unity has right now in my launcher. One of them is placeholder "?" for an appimage executable, and I want to tweak that entry to point to an appropriate icon. The app doesn't have an existing .desktop entry yet in /usr/share/application or my .local stash, so I want to tweak the placeholder that Unity created for it rather than hand-roll one.


Photoshop CS6 - How to stop Round Shape merging colors with background

This seems like a simple issue and I found dozens of answers around this site and the web, but none of those has fixed my issue.  I'm trying to add a shape with rounded corners. I want the colors to be solid but they are blending with the background. I'm going to be making 100s of images, so I didn't want to have to copy & paste to a new layer and try and crop the off-color parts (like some of the solutions call for).   Any simple solution will be very much appreciated. If I have to use Illustrator I could, but I would prefer not to.


$$\sqrt[4]{161-72 \sqrt{5}}$$  I tried to solve this as follows:  the resultant will be in the form of $a+b\sqrt{5}$ since 5 is a prime and has no other factors other than 1 and itself. Taking this expression to the 4th power gives $a^4+4 \sqrt{5} a^3 b+30 a^2 b^2+20 \sqrt{5} a b^3+25 b^4$. The integer parts of this must be equal to $161$ and the coeffecients of the roots must add to $-72$. You thus get the simultaneous system:  $$a^4+30 a^2 b^2+25 b^4=161$$ $$4 a^3 b+20 a b^3=-72$$  In an attempt to solve this, I first tried to factor stuff and rewrite it as:  $$\left(a^2+5 b^2\right)^2+10 (a b)^2=161$$ $$4 a b \left(a^2+5 b^2\right)=-72$$  Then letting $p = a^2 + 5b^2$ and $q = ab$ you get  $$4 p q=-72$$ $$p^2+10 q^2=161$$  However, solving this yields messy roots. Am I going on the right path?


How can I simulate a normal distribution from means and 95% confidence limits?

Well, I have these values: $\mathrm{Mean}=5.77$; $95\%\mathrm{CL}=5.30-6.11$  How can I simulate a normal distribution using these parameters? I do not have standard deviations.  How can I obtain random values (for example, 1000 of them) that fit to these parameters? (like using the rnorm function when having Standard deviations except $95\%CLs$)


Why ubuntu doesn't use https as default for apt update?

If we do an apt update or apt-get update it uses http for fetching updates. We can change the source to secure https by editing the url of  sources.list /etc/apt/sources.list but most cases this doesn't work. Why doesn't ubuntu force https for apt update?


Lead Conversion Trigger Order of Execution

I've got a project where I'm looking to tweak the standard lead conversion process.   Triggers and lead conversion has always been funky in past projects so I was hoping to start the design off by reviewing the order of execution, but after a long google search I'm coming up empty handed.   Anyone out there know the specific trigger order for lead conversion?    Edit: I'm not asking about trigger execution order for any object, but all the objects created in the lead conversion process.  I'd think it would be something like this:        Lead Before Update Triggers (isConverted = false, convertedAccountId = null, convertContactId = null, convertedOpportunityId = null)         Account Before Insert Triggers (not fired if merged with existing account)   Account After Insert Triggers (not fired if merged with existing account)   Contact Before Insert Triggers (not fired if merged with existing contact)   Contact After Insert Triggers (not fired if merged with existing contact)   Opportunity Before Insert Triggers (not fired if no opportunity) (OpportunityContactRoles null)   Opportunity After Insert Triggers (not fired if no opportunity) (OpportunityContactRoles = convertedContactId)   Lead After Update Triggers (isConverted = true, convertedAccountId = XXX, convertedContactId = XXX, convertedOpportunityId = XXX)


Buying a used XBox- how can you tell what the HDD size is by looking?

I'm buying a Xbox 360 console off of Craigslist and the seller doesn't know the HDD size. How do we tell?


How to prove that $S^{2n+1}/S^1$ is homeomorphic to $\mathbb CP^n$ under a given identification

We represent an element $(x_1,y_1,...,x_n,y_n,x_{n+1},y_{n+1})\in S^{2n+1}$ as an element $(z_1,...,z_{n+1})\in \mathbb C^{n+1}$ where $z_k = x_k+iy_k$. Now I'm considering the action of $S^1$ on $S^{2n+1}$ as $e^{iθ}·(z_1,...,z_{n+1}) = (e^{iθ}z_1,...,e^{iθ}z_{n+1})$. Under this action we identify any two elements as $(z_1,...,z_{n+1}) ∼ e^{iθ} ·(z_1,...,z_{n+1})\forall (z_1,...,z_{n+1})\in S^{2n+1}\subseteq \mathbb C^{n+1}$ and $e^{iθ}\in S^1$. For the resulting quotient space $S^{2n+1}/S^1$, I'm trying to prove that $S^{2n+1}/S^1$ is homeomorphic to $\mathbb CP^n$. How do I prove this? Any solution will be highly appreciated.


Installing Ubuntu in a not certified device

I want to try installing Ubuntu on a 4 year old Dell laptop but it is not listed on the certified devices. Is it okay to try to install it? or not recommended if not included from the list? What are the possible consequences that I will encounter? Please give me some advise. Thank you!


Is there a name in English for the process of turning ingredients of a dish into liquid through boiling them long enough?  Usually this happens as cook's errors, but at times it's the desired effect (e.g. you may create an excellent, smooth, creamy sauce by simmering the ingredients for a long time).  Judging by what Google Images show, it seems that "" usually means burnt or nearing burnt fried/grilled food, which is definitely not the same thing.


Boot error > no such device: grub rescue

After an installation of Ubuntu 12.04, erasing an old partition with Ubuntu 10.10, I can't get grub to load. I can't access my Windows 7 partition either  I get the message:  > error: no such device: 58ABF29C...   grub rescue>   I suppose my master boot record got erased/corrupted. How can I check and fix this?


Delete duplicate records based on two columns in MySql

I want to delete the extra duplicate record  i.e. in the image shown there are two records with corporate_id = 5 and category_id = 19, how to delete any one row which is duplicate (here corporate_sed_id is the primary key)


Why can Shell builtins not be run with capital letters but other commands can?

Why is this?  When I do this   CD ~/Desktop   It doesn't take me to the Desktop. But this:  echo "foo bar" | GREP bar   gives me:  bar


How can you prove the existence of an integer for ab congruent to 1 (mod p).

With a prime number p and a not equal to 0, how can I prove that there exists an integer b such that ab is congruent to 1 (mod p)?  What I have done so far is I know that the GCD(p,a) is either 1 if p does not divide a or it is p if p does divide a. I am able to take GCD(p,a) = 1 to the end by using the fact that ab + pk = 1 and manipulating that to show that ab is congruent to 1 (mod p), but am stuck on how to move forward if the GCD(p,a) = p and p divides a.


Comma needed after "hour" in a 2-hour 15-minute traffic delay

Do you feel these are correct with the hyphens and absence of commas?  a 2-hour 15-minute traffic delay (Instead of: a 2-hour, 15-minute traffic delay)  a 7-pound 11-ounce newborn (Instead of: a 7-pound, 11-ounce newborn)  a 6-foot 8-inch basketball player (Instead of: a 6-foot, 8-inch basketball player)  a 2-year 5-month 17-day project (Look OK without commas?)  The project lasted 2 years 5 months 17 days. (Good without commas?)  If "and" is used, is it OK to forgo the commas as well?  The project lasted 2 years 5 months and 17 days.  Do all examples above look to be correctly punctuated without the commas? I don't think the commas aid readability in the slightest. Do you agree?  Thank you.


Intel Optane Memory support for Ubuntu and Windows 10 dual boot on Dell i7

Does Ubuntu 17.10.1 with Linux 4.13 kernel support the Intel Optane Memory for the purpose of dual booting with Windows 10?   states that Linux is not supported and only Windows 10 64-bit is.


when define function in the class how to get the arguments?

I want send argument to the function in the class but i got below error How Should i define a function can use the argument?      class Tistory:         def __init__(self, m_client_id, m_redirect_uri, m_user_id, m_password, m_blogname):             self.m_client_id = m_client_id             self.m_redirect_uri = m_redirect_uri             self.m_user_id = m_user_id             self.m_password = m_password             self.m_blogname = m_blogname      def wrtiePost(m_title, m_content, m_category, m_tag):         params = {             'blogName' : self.m_blogname,             'title' : m_title,             'content' : m_content,             'tag' : m_tag,             'category' : m_category,             'visibility' : '0',             #'published' : '',             #'slogan' : '',             #'acceptComment' : '1',             #'password' : '',             'access_token' : self.getAccessToken(),             'output' : 'json'         }         ....  if __name__== "__main__":     tistory = Tistory(g_client_id,g_redirect_uri,g_user_id,g_password, g_blogname)     #tistory.getAccessToken()     tistory.writePost(m_title="test",m_content="test",m_category="test", m_tag="test")   when I call the function in the class why i get below error?  Traceback (most recent call last):   File "/Users/chullee/github/tistory/class/tistory.py", line 113, in <module>     tistory.writePost(m_title="test",m_content="test",m_category="test", m_tag="test") TypeError: writePost() got an unexpected keyword argument 'm_title'


I am ashamed to ask that but it is making me crazy. I try to push an array into another array as follow: var person = {"bla":"46","bla2":"46","bla3":"46"}; var test = {"bla4":"46","bla5":"46"}; person.push(test);  Well it is not working and I don't see why. Can someone see what I am doing wrong and maybe have the good way to proceed ? thanks


In my opinion, providing us with an active user page that shows the list of recent active users is useful as we can monitor the active users without visiting each user profile.  The list can be arranged in a grid of m rows by n columns and accompanied by labels representing the their reputations (and other info that you think they are important) and activities  such as "seen 2 minutes ago".  The following figure illustrates my idea. I am sorry. There is a typo in the following figure, Active must be changed to active to make it parallel to the other existing labels.     I think it is not too difficult to implement this. By adding a new action method and editing the view, done!  Of course it is not urgently requested feature. If it is useful, it can be put in the development to-do list so it can be implemented together with other useful requests at once.  Any responses are welcome! Regardless of how difficult it is, could you explain whether or not there are negative effects of this request? Down voting without informative comments looks barbaric. :-)  Edit:  If it is about user privacy, why is there a "seen 2 minutes ago" in the user profile page? I don't think there is a difference if we implement this feature.


How do I switch the default accounts in Google Drive?

How do I take the default off of my secondary Google Drive account, so my primary account shows up first in Google Drive?


Symbol for set of all polynomials of certain degree

The symbol I am looking for is something like a curvy P, where P_n(F) represents the set of all polynomials with coefficients in F and degree equal to or less than n.  Any suggestions?


If you look at this  you'll see UNet is deprecated and will be removed in the future.  I'm developing a mobile multiplayer game, i've red official advise about it but they say "You can publish it with 2018.4 (LTS)" and I can't use 2018.4 version because in my project i use LWRP which is not in the 2018.X versions.  I've found the alpha version of the new system right    My questions are:  1- Should i use the alpha version of the new system? And can i publish my game with it?  2- Should i wait for the new system came out? (I can't wait for months)  3- Should i try to use other third party systems like Photon?  Or is there any way to publish my game with nice multiplayer system?  Note: I can't pay for multiplayer matchmaking system. Because of that i want to make Hosting multiplayer game.


Can secret URLs be used to protect files?

I would like to know if I can offer private downloads in my website (only available to certain users) by placing all the files in a /download folder and make sure it doesn't show the index of all the files with the .htaccess option: Options -Indexes.  That way, only users with the complete address of the file would be able to download a certain file.  Is there any problem with this method?


An integral domain $A$ is exactly the intersection of the localisations of $A$ at each maximal ideal

This result appears to be ubiquitous as an algebra exercise. How do you prove this result?     Let $A$ be an integral domain with field of fractions $K$, and let $A_{\mathfrak{m}}$ denote the localisation of $A$ at a maximal ideal $\mathfrak{m}$ considered as a subring of $K$. Prove that $$A = \bigcap_{\mathfrak{m}} A_{\mathfrak{m}}\,,$$ where the intersection is taken over all maximal ideals $\mathfrak{m}$ of $A$.


converging sequence of a sum and an integral

prove that the sequence converges  $$a_n = \sum_{k=1}^n \frac1k \ -\ \int_1^n\frac{dx}x$$  Attempt:  I dont even know where to start here. the integral gives you -ln(n)


I have been trying to delete my account for a few days but nothing is happening. I went to  and clicked the button where it said it would take 24 hours.   However 7248 hours have passed at least and still nothing.  There was a notice saying that it was due to be deleted in 60 minutes which counted down but at the end nothing happened.  Is there anything else I need to do?


I have a html context that has usernames, mails and passwords in plain text format. There are two line breaks between information groups.  nickname mail@example.com pass   nickname2 mail2@example.com pass2   I want to get all mails with a comma seperator and set them to a big string variable.  I tried many regexes but could not resolve the problem. Any suggestion to find the true regex will be appreciated.


I need to create a function for sending newsletters everyday from crontab. I've found two ways of doing this on the internet :  First - file placed in the django project folder:  #! /usr/bin/env python import sys import os  from django.core.management import setup_environ import settings setup_environ(settings)  from django.core.mail import send_mail from project.newsletter.models import Newsletter, Address  def main(argv=None):     if argv is None:         argv = sys.argv      newsletters = Newsletter.objects.filter(sent=False)     message = 'Your newsletter.'      adr = Address.objects.all()     for a in adr:         for n in newsletters:             send_mail('System report',message, a ,['user@example.com'])  if __name__ == '__main__':     main()   I'm not sure if it will work and I'm not sure how to run it. Let's say it's called run.py, so should I call it in cron with 0 0 * * * python /path/to/project/run.py  ?  Second solution - create my send function anywhere (just like a normal django function), and then create a run.py script :  import sys import os  os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'  module_name = sys.argv[1] function_name = ' '.join(sys.argv[2:])  exec('import %s' % module_name) exec('%s.%s' % (module_name, function_name))   And then in cron call : 0 0 * * * python /path/to/project/run.py newsletter.views daily_job()  Which method will work, or which is better ?


How to install Oracle 18C XE version in ubuntu?

I need to install Oracle 18C XE version in ubuntu. Can you guys give me a guide for this installation?


If a motherboard's specifications say it supports DDR3 SDRAM sticks, would I be correct to assume it is also compatible with DDR2 RAM? Am I wrong, or does it depend on the motherboard?


see this picture given below, they are not given terminal row spacing then how to design land pattern for this dip package,and if they didn't given in datasheet how to take terminal row spacing from given values. thanks for your help


Why is x^(a/b) equivalent to the bth root of x raised to the a power?

I was wondering if someone can tell me what the logic behind converting fractional exponents to radicals is?  For example, the exponent 1/2 is a square root, 1/3 is a cube root, and 2/3 is the cube root of x squared and so on.  Can someone explain this in a very easy way for me?  Thanks :P


JS OOP: methods on prototype vs methods in constructor function

Let me put first two examples.   Example 1:  function Gallery() {     this.a = "I am 'A'";      this.trace = function() {         console.log(this.a);     } }   Example 2:  function Gallery() {     this.a = "I am 'A'"; }  Gallery.prototype.trace = function () {     console.log(this.a); }   Obviously, both things do the same. My question is: is there any drawback to using the method definition in the constructor function over the prototype one? What exactly is the difference anyway?  Is the prototype more memory friendly? I assume that if I define the method inside the constructor function, every single Gallery instance will have its 'own instance' of the method so will consume more memory while the prototype defines only one function that's shared across all the Gallery instances. Is this correct?  Thanks a lot!


How does cores/logical cores handle the threads

I have this whining question on my head, which stuck me for days.  Correct me if I'm wrong: My aspect on computer architecture and organisation is that,   In early day computers, there was a single processor on a single chip. And with evaluation there were multi-chip processors, with each chip having a single processor.  Then in modern days there are multiprocessors. With each processor chip called a socket, this socket contained multiple processors. They are called cores.   Core: An individual processing unit on a processor chip. A core may be equivalent in functionality to a CPU on a single - CPU system.     Now I will briefly lay my understanding on Hyper Threading Technology.    For each physical core that is actually present in the socket, the operating system addresses two virtual (logical) cores and shares the workload whenever possible. These cores have multiple levels of large memory caches . And the logical processors sharing the execution units of each of core.   Now my question is what is a thread?   As a programmer when I create two threads and I run my program, how does the threads divide in to cores.  I want to know that on which logical processors that these threads run on.   I gave myself an answer for that,     These threads must be run on two separate logical processors that belongs to two physical cores, because if we divide these threads to the two logical processors of one physical core, concurrency is not achieved. As one logical processor is run at a given time in one physical core.   If my answer for my problem is wrong please help me out. I really appreciate it.


USB keyboard does not work for Ubuntu boot menu

I wanted to perform a memory test on one of my desktop machines, but encountered a very strange problem: I can use the (usual) USB keyboard (tried Cherry Evolution Stream as well as an older one from Logitech) to open the BIOS (by pressing Del) and changing it, but not in the Ubuntu boot menu (where to select the language and keyboard type for pre-10.* Ubuntu versions). After Ubuntu booted, the keyboard is usable. I've also tried to use a different USB port, but without success.  Is this a known mainboard, BIOS or Ubuntu problem?


Infinite series sum can't find the geometric series: $\sum_{i=0}^\infty (2^i +4^i)/6^i $

$$\sum_{i=0}^\infty \frac{2^i +4^i}{6^i} $$  I'm not able to get a geometric series out of this. If I can the geometric series, the infinite summation from there is easy


Quickly add text to existing pdf files / fill forms

I am sure I am not the only person to have had the following problem: one has a pdf document (usually some kind of a form that one needs to fill out over and over again) in a pdf file, which is not a form in the PDF sense. One wants to be able to fill the form quickly, and some fields are always the same. A solution is to use package  to include the form into .tex document and add some text with absolute positioning. Then each time one needs to fill the form, all it takes is a quick change of some text. This works, but the process of finding the correct absolute positions is slow even if one uses the binary search. Is there a tool to help with this? Or a better solution perhaps?  (I know of , but it is unstable for me.)


LaTeX table sentences not going to the next line automatically and font sizes not the same as the rest of the document

I have been trying to tabulate some data using latex but every time i put in a large sentence it doesn't go the next line automatically, but instead ti just extends the table as wide as the sentence is, in addition to that the font sizes in my table isn't the same as the rest of my document.  Here is my LaTeX table code:      \begin{table}[] \centering \caption{Input parameters for the rational method formula, Equation \ref{discharge}.} \label{imput} \begin{adjustbox}{width=1\textwidth} \begin{tabular}{|l|l|l} \cline{1-2} \textbf{Input Parameters} & \textbf{Description}  \\ \cline{1-2} Coefficient of runoff & The coefficient of runoff accounts for the hydraulic behavior of the runoff as it flows over different types of surfaces in the drainage area. The coefficient for different surfaces can be obtained from Table \ref{c}   \\ \cline{1-2} Rainfall Intensity & This parameter represents the amount of rainfall per a specified time. This can be obtained from rainfall intensity vs duration curves. However, In South Africa the rainfall intensity can be obtained from the software discussed in Topic [REF A CHAPTER]   \\ \cline{1-2} \multirow{3}{*}{Time of Concentration} & This parameter represents the amount of time it would take the runoff from any point to get to a drainage outlet. Moreover, this parameter can go further in-detail as to consider the time of surface flow and time of flow in the drainage structure.  \\ \cline{2-2} & The key factors that can affect this system is that the slope of the land and characteristics of the surface that the runoff will be flowing over.  \\ \cline{2-2} & It is recommended that Equation \ref{tcs} should be used for the estimation of surface flow time. Moreover, Equation \ref{tcd} can be used to obtain the drainage flow time. \\ \cline{1-2} \end{tabular} \end{adjustbox} \end{table}


Mac OS X Darwin: how to reset admin password?

Today I bought an ibook G4 from a garage sale. The people who sold it to me didn't know the password for the 2 accounts on it. Apparently it was the guys late father's laptop. Any suggestions on how to get into the laptop and set a new admin account and password?


So I am dual-booting a Windows 7 laptop and I started Ubuntu with around 30 GB for small projects. Now that I am starting to use Ubuntu more than Windows, I am starting to run out of room. I have seen some tutorials on making partitions larger but I had to manually partition mine because of some weird error (I forgot what it was I did this a couple weeks ago). So I got GParted and it seems to work great (haven't really messed with it yet) but I want to know what partition do I mess with to make the space for Ubuntu larger. (Manually doing this in the first place was stressful enough so I don't want to guess).


Red dot indicator appears even when I'm banned from reviewing

I am seeing the red dot indicator for SO's review queues even though I've been temporarily banned from them. Can we remove the indicator?


How to get the translated term name by tid?

I'm looking for a working method to get the translated term name by tid.  The following code returns the original term name but not the translation.  global $language;  $lang_name = $language->language; // en  $term_id = 788;  $term = i18n_taxonomy_term_get_translation($term_id, $lang_name);     Most examples provided in "" seem not work for Drupal 7.


oracle 11g: increasing buffer cache with AMM

On a 2-node RAC we have enabled Automatic Memory Management. The advisor views indicate that increasing the buffer cache by 4G will halve the physical reads, and we have 4G to give. How must we do this? By increasing memory_target and letting Oracle grab more memory for the buffer cache? Or by explicitly setting a value for db_cache_size (which now is zero)?


How to compute $\sum_{k = 1}^{\infty} \frac{1}{k^2-\frac{1}{16}}$?

How do I compute $\sum_{k = 1}^{\infty} \frac{1}{k^2-\frac{1}{16}}$ ?  Mathematica says the sum converges and it somewhat looks like the Basel problem, but so far I do not know how to approach it.


How to install Haskell Platform for Ubuntu 13.04? I get the following error when I type sudo apt-get install haskell-platform:   E: Unable to locate package haskell-platform error


Tool (Simplify Polygon) parameter is not visible anymore

I am having a strange problem in ArcGIS Toolbox.  I am trying to use the  tool from ArcToolbox. When I open the tool, there is no possibility to input Simplification Tolerance. Please see the attached image.  I can run the tool as a batch and from the Python window without any problem.  I am using ArcGIS 10(Editor) with Service Pack 5 on Windows 7 64Bit (English) and Windows Server 2008 64Bit (German). On both machines, I have the same problem. Any ideas?    I have reinstalled the software but the problem remains.


Show that $(x-1)^2$ is a factor of $x^n -nx +n-1$   By factor theorem we know that $(x-a)$ is a factor of $f(x)$ if $f(a)=0$.   In this case, $f(x)=x^n -nx +n-1 \implies f(1)=0$  Hence we conclude that $(x-1)$ is a factor. From hereon, how can I say that $(x-1)^2$ is a factor?    Can we approach the problem without calculus approach? This problem was taken from a book of pre-calculus algebra.


How to convert multiple  tag to a single  tag in php


Three correlated uniformly-distributed random variables

I wish to generate three uniformly-distributions with specified correlations. How do I go about doing that?   For example, , a comment provides a quick method to generate pairs of random numbers which are uniformly distributed with specified correlation. I want to extend that to three uniform distributions.   I have read that copulas are the way to go about doing this, but I am unclear how. I have looked at this  and while it seems to be asking the same question that I am, I did not find the answers helpful. Any help is appreciated.


Why do our limbs and other body parts get numb/feelingless and then they start to tickle?

Why do our limbs (legs, arms) get numb/feelingless when they are under prolonged pressure or when one has crossed his/her leg while sitting for a long period?  After we move it to a more relaxed or natural position numbness goes away and we get the really strange and hard to bear tickles. Why does the numbness go away by doing this and why do why get these odd tickles?


Show if $\frac{x}{y}$, with $x, y$ coprime integers, is a root of $f(T)$, then $x$ divides $a_i$ and $y$ divides $a_n$

Let $f(T)=\sum_{i=0}^n{}a_iT^i\in\mathbb{Q}[T]$ be a polynomial of degree $n\geq 1$ with all coefficients $a_i$ integers. Show that if $\frac{x}{y}$, with $x, y$ coprime integers, is a root of $f(T)$, then $x$ divides $a_i$ and $y$ divides $a_n$. What I've done so far $f(\frac{x}{y})=0$ with $\gcd(x,y)=1$, then $x/a_1$ and $y/a_n$. $f(\frac{x}{y})=\sum_{i=0}^{n}a_i(\frac{x}{y})^i=a_i\frac{x^0}{y^0}+a_i\frac{x^1}{y^1}+\dots+a_{n-1}\frac{x^{n-1}}{y^{n-1}}+a_{n}\frac{x^n}{y^n}=0$ With $1=dx+by$, and $d,b \in \mathbb{R}$, $y=\frac{1-dx}{b}$. Thus, $$f\left(\frac{x}{y}\right)=f\left(\frac{x}{(1-dx)/y}\right)=f\left(\frac{bx}{1-dx}\right)=\sum_{i=0}^{n} a_i\left(\frac{bx}{1-dx}\right)^i=$$ $$=a_i\frac{bx^0}{(1-dx)^0}+a_i\frac{bx^1}{(1-dx)^1}+... +a_{n-1}\frac{bx^{n-1}}{(1-dx)^{n-1}}+a_{n}\frac{bx^n}{(1-dx)^n}=0$$ I'm not sure how to prove that $x$ divides $a_i$ and $y$ divides $a_n$. Thanks for reading this.


Why doesn't wobbly windows in Gnome work?

I have Ubuntu 13.04 with Gnome 3.8.  I installed compiz, CCSM. I tried to activate Wobbly Windows, but it doesn't work. It was working properly on Ubuntu 10.10 with Gnome.  Why it isn't working now?


I am a beginner and I write article in slovak language. There is a rule to not leave single-letter words or preposition at the end of line (for example a, i, na, pre etc.) but to move them to the next one.   I know that I can use "~", but in this article there are a lot of single letters and prepositions, so I cannot use it every time. Can somebody help me, please? :(   Thank´s.


Load balancing & NAT-ing multiple ISP connections on Linux

I have two internet connections from two different ISPs and I need to balance the traffic originating to and from my network between the two ISPs. I am using Debian GNU/Linux.  My set-up is like this -  eth0 (192.168.0.0/24) -- Local network  eth1 (192.168.1.0/24) -- ISP #1  eth2 (192.168.2.0/24) -- ISP #2  My local network is connected to this server via eth0 and the box is the DHCP server cum Gateway for all the machines in the LAN.  The server needs to do load-balancing between the two ISPs and also needs to do NAT-ing.  I have followed the routing instructions on  but I still need instructions to do the NAT-ing properly.  Any help will be appreciated.   PS - I know about pFsense but I need to use Linux.


As requested, I am asking the  here.   Is there a way to find a load on my web application server without a load / stress testing?  I have deployed my application in the Apache Tomcat server. As per as I know, each web server have some limitations on serving a request, beyond which, performance degrades. e.g. If a server can handle 800 requests happily, concurrently, the more requests landing on the server will get delayed response, or may be dropped.  I am looking for some alerting mechanism by which I will get to know that the load on my web server has crossed the threshold limit, and accordingly I will able to take the required actions like e.g. adding one more node behind load balancer to distribute the load.


Do all chromosomes in one human body contains same genome?

As I understand it, each nucleus of a cell contains multiple chromosomes. Each chromosome has multiple DNAs. Each DNA contains some specific gene sequences. That sequence is called Genome.  My question, do all chromosomes in cells in a human body contain same types of genomes (i.e. gene sequences)?


Shells (at least what I know) have really bad command editing capabilities.  For example:    I can't point the cursor to any point of the command. I can't select and backspace/delete/replace text in the command.   Currently these are so distracting, I use gedit to edit commands before pasting them to the terminal.  Is there any solution that's good for these?


I am looking for the title of a 1950s science fiction movie, involving an astronomer trying to decode some extraterrestrial signal, where the juvenile (male) character asks 'how about pi?' which all the adults interpret as a foolish 'how about pie?' question.


I have a checkbox inside jquery datatable which is created dynamically with the code below.  $('#SettingsDatatable').dataTable({ "order": [], "dom": "Bfrtip", "buttons": ["copy", "csv", "excel", "pdf", "print"], "columnDefs": [{    "targets": 0,    "render": function (data, type, full, meta) {    return '<input type="checkbox" ' + (data == 'True' ? 'checked' : '') + ' /> &nbsp;&nbsp;&nbsp;  ';   }}   Now I want to select this checkbox with code below.   $('#SettingsDatatable input[type="checkbox"]').on('click', function (event) {                 alert("Hello in"); });   But its not getting selected.  Update  $('#SettingsDatatable').on('click', 'input[type="checkbox"]', function (event) {       event.preventDefault();      event.stopPropagation();       return false; });


Relationship between $\operatorname{ord}(ab), \operatorname{ord}(a)$, and $\operatorname{ord}(b)$

Another homework problem from my Group Theory class.  Let $a,b$ be elements of a group, $G$.  Let $\operatorname{ord}(a)=m$ and $\operatorname{ord}(b)=n$. Let $a$ and $b$ commute. Prove: If $m$ and $n$ are relatively prime, then the $\operatorname{ord}(ab)=mn$.  So I am having trouble starting off on this problem.  Here is what I believe I know:  $a^m=e$ and $b^n=e$ [as defined by the order of the elements] which leads $a^m=b^n$  $\operatorname{ord}(ab)=mn=\operatorname{ord}(ba)=nm$ as defined by commuting.  $\gcd(m,n)=1$ as defined by $m,n$ being relatively prime.    I don't know how to start this proof. Do I want to to go the route of $a^mb^n=e$?  Then $(ab)^{mn}=e$?   Any tips to start this would be greatly appreciated!!!


Finding an area of a propeller using double integration? Attempted, please help! :(

The boundary of the internal hole is given by $r = a + b\cos(4α)$ where $a > b >0$. The external boundary of the propeller is given by $r = c + d\cos(3α)$ where $c - d > a + b$ and $d > 0$.  1/Calculate the total area of the propeller as shown by the shaded region  2/calculate the average temperature of the propeller, given by $T (r, α) = C/r$, where $C$ is a constant.   3/Evaluate the average temperature numerically for a=3, b=1, c=12, d=5 and C=250 where distance is in cm and temperature is Celsius    I got an idea but don't know if it's right and when I ask my friend none of them know how to :( Are you suppose to integrate $r = c + d\cos(3α)$ then minus the hole $r = a + b\cos(4α)$ ?  $${1\over2}\int_0^{2\pi}\int_0^{p+q\cos(n\phi)} r^2\>dr\ d\phi\>,\qquad {1\over2}\int_0^{2\pi}\int_0^{p+q\cos(n\phi)}{C\over r}\> r^2\>dr\ d\phi\ .$$ since the area of the propeller in polar coordinate is: $${\rm d(area)}={1\over2} r^2{\rm d}(r,\phi)\ .$$  If someone help me solve it, it would make my day because I have no idea how to do it! :( I'll thank you if you could solve it! Pretty please.


Rationals can be the set of continuity of a function?

Most of the functions that I have seen have their discontinuities on rationals and continuities on irrationals!  I am wondering if there is any exampe of some function whose continuities are rationals? Or is other words      The set of continuities of a function $f:\mathbb{R}\to\mathbb{R}$ can be $\mathbb{Q}$?


Are there truths that the scientific method cannot explore, but maybe alternative methods can? Does the scientific method subsume all possible valid ways to obtain true knowledge? Or are there alternative methods to explore truths that lie beyond the space of truths reachable by the scientific method due to its methodological constraints?


What new features in java 7 is going to be implemented? And what are they doing now?


Fastest way to iterate an Array in Java: loop variable vs enhanced for statement

In Java, is it faster to iterate through an array the old-fashioned way,  for (int i = 0; i < a.length; i++)     f(a[i]);   Or using the more concise form,  for (Foo foo : a)     f(foo);   For an ArrayList, is the answer the same?  Of course for the vast bulk of application code, the answer is it makes no discernible difference so the more concise form should be used for readability. However the context I'm looking at is heavy duty technical computation, with operations that must be performed billions of times, so even a tiny speed difference could end up being significant.


Chicken Pasta Left on Counter 2+ hours...safe?

I took a Cajun Chicken Pasta casserole out of the oven, and after eating, divided the leftovers up and put them in tupperware containers and left them on the counter to cool. Unfortunately, I got distracted and forgot to put the containers in the freezer. From the time they were taken out of the oven to the time I finally stuck them in the freezer was probably 2 1/2 or 3 hours. I keep my house between 70-75 degrees. Should I be concerned about eating them?  EDIT: As stated, I don't feel this is a duplicate question as I'm so close to the "danger zone" in regard to length of time left on the counter.


My cheesecake is runny, how do i fix it?

I made a no bake cheesecake without gelatin. And instead of the parchment paper, I used aluminium foil to cover the container. Now, the dish has been in the freezer for two days and the cake is still runny. How can I insure that the cake is not runny?


I am using this script to show all images in a directory and to display image size, etc. I've been trying different ways (and yes, I also used Google) to sort them by date but none worked for me.  <?php     $dir = 'uploads/';     $files = glob("$dir*.*");     for($i=count($files)-1; $i >= 0; $i--):         $image = $files[$i];         $size = getimagesize($image);         $image_height = $size[0];         $file_size_byte = filesize($image);         $file_size_kilobyte = ($file_size_byte/1024);         $file_size_kilobyte_rounded = round($file_size_kilobyte,1);      ?>          <div class="fileDiv" onclick="showImage('<?php echo $image; ?>','<?php echo $image_height; ?>');">
<img class="fileImg lazy" data-original="<?php echo $image; ?>">

<?php echo $image; ?>

<?php echo date ("F d Y H:i", filemtime($image)); ?>

<?php echo $file_size_kilobyte_rounded; ?> KB

      <?php endfor;   ?>   How do I have to modify this script to sort the files by date and the last modified image to be displayed on top? Could someone please help me how to do this? Thanks so much!


Ubuntu 12.04 Missing Close, Minimize and Maximize Button after Update and Upgrade

I just do update and upgrade, but I miss close, minimize and maximize button along with top border title bar after that.   I did metacity --replace and unity --reset, It didn't work for me.   Also, I set in the gconf-editor default metacity>general to close, minimize, maximize:  and it didn't work.   The last, I unchecked windows decoration in Compiz, and it didn't work too.  Any help will be highly appreciated, and I attach a screenshot of a window without the title bar as one example of my problem.


FO- Definability of (Q,<) in (Q,+,x,1,0)

i know that exist polynomials formulas in the case of Integers and the Real which define their orders, my question is if such a formula exist in case of Rationals.


I am a self-employed I.T. I was wondering if there was a way to download Spotify to Ubuntu Linux. I have the newest update.  Thanks, Hunter


What counts as a "wired" controller when connecting it to my laptop?

I'm trying to connect my 360 controller to my laptop but it won't connect. I have it plugged into the USB slot using the cable that came with a charge kit, and I have the "Xbox 360 controller for Windows" software installed already. So far all that's happened is the controller turns on then proceeds to turn on/connect to my Xbox which is in the basement, two floors below me...  Does this charger cable only charge the controller (it does turn on, so that parts working) or also create a wired connection from the controller to the laptop?


Evaluate $\int \frac{\sec^{2}{x}}{(\sec{x} + \tan{x})^{5/2}} \ \mathrm dx$

I am unable to solve the following integral: $$\int \frac{\sec^{2}{x}}{(\sec{x} + \tan{x})^{5/2}} \ \mathrm dx.$$   Tried putting $t=\tan{x}$ so that numerator has $\sec^{2}{x}$ but that doesn't help.


I got the following text:  Code = ABCD123 | Points = 30 Code = ABCD333 | Points = 44   At the end, I want to removing anything except the Code, output:  ABCD123 ABCD333   I actually tried it with Code = | P.+  But I don't know how to get "|" removed. Currently, I have just ÀBCD333 | left as an example.  I'm struggling there.


Given a set $M$ of all $n\times n$ real matrices with the usual norm topology. Then, is the set of all symmetric positive definite matrices in $M$ connected?   Also, is the set of all invertible matrices in $M$ compact?  All I can infer so far is that the set $M$ is probably not compact as, if $M$ is positive definite then so is $cM$ for positive scalars $c$ and as $c\rightarrow \infty$, there is no limit.   Thank You.


How to prove the set $S$ is closed under the binary operation $a*b=a+b+kab$?

Let $k$ be any nonzero real number and let $S$ be all real numbers except ${-1\over k}$. Let $a,b \in S$. Define * on S by $a*b=a+b+kab$. Prove that $S$ is closed under *.  All I can think to do is set $a*b$ equal to ${-1\over k}$, but I don't know where to go from there. Is that the extent of the proof?


In Interstellar, how could you build a space colony without bringing the Blight with you?

In Interstellar, there is a Blight destroying all the world's crops.  If Plan A involves launching a space colony, presumably full of crops, etc., how could they avoid bringing the Blight with them?     At the end of the film we see that they've actually created space colonies.  How did they manage to launch and populate them without bringing the Blight with them?


Can I play/practice Fortnite's Battle Royale locally?

Is it possible to be play Battle Royale in some sort of local environment?  I'm not too great at some aspects of the game and would like to practice in my own time and pace and not worry about a sniper bullet or the storm, similarly to how you can play CS:GO or Overwatch on any map, by yourself, with all sorts of various settings changed. Has anything like that been implemented (yet) ?  I haven't bought Save the World, just the f2p game.


Calculate distance between 2 GPS coordinates

How do I calculate distance between two GPS coordinates (using latitude and longitude)?


How to check Logistic model assumptions in R?

I am using glmrob with family = "binomial" in a regression model with a dichotomous dependent variable. How do I test whether the logistic model assumptions are met? What are the assumptions I should be testing for and what methods/packages do you suggest I can make use of in R to do the same?


Do I need to apply for a UK transit visa when I have a visitor visa?

I am a Chinese passport holder currently living in the Netherlands with a Dutch residence permit.  I will fly from Amsterdam to London, and immediately transit from there to Hong Kong.  Lugguage would be checked through directly to Hong Kong.  According to the website, I need to apply for a UK direct transit visa.  However, I am currently holding a UK visitor visa, valid for 6 months and for multiple entry. Do I still need to apply for a separate transit visa to get on board in Amsterdam?


Only one letter is missing in the first name

My mother name is Firdous Bano and mistakenly typed Fidous Bano while I made online booking with Saudi Airlines. Rest of the information is correct. While this be a problem?


String s1 = "abc"; String s2 = "abc"; String s3 = new String("abc"); String s4 = new String("abc");   if (s1 == s2) is giving true  while (s3 == s4) is giving false.   Can somebody give a detailed explanation onto what is String pool, heap, how many objects are created in each line and how many objects created in total.  Why s3==s4 is giving false?  A detailed explanation will be much appreciated.


If $0 \rightarrow M' \rightarrow M \xrightarrow[]{f} M'' \rightarrow 0$ is exact then $M$ is Noetherian iff $M',M''$ are.   For an infinite chain $M_i$ in $M$ we have chains $M'_i = M_i \cap M'$ and $ M''_i = f(M_i)$ in $M',M''$, respectively.   If both $M', M''$ are Noetherian then eventually both induced chains will halt; then w.l.o.g. $M'_i, M''_i$ are constant. If $x_i \in M_i \setminus M_{i-1}$ intersects $M'$ then $M'_i \supsetneq M'_{i-1}$, a contradiction...  That's as far as I've gotten. It's not explained in detail in Atiyah-MacDonald.


$$\frac{1}{n+1}< \log(1+ 1/n)$$  Any ideas? I tried estimating the difference between $1/n$ and the logarithm and comparing with $1/n-1/(n+1)$ but I miserably failed.


Java: NullPointerException when calling a method

I'm currently writing a little game using an 2D Array (Array of Arrays). In one of my classes which is handling the movement and placement of enemy units, there is a method that calls upon a method called "getPos" this is the Array in which the position of all enemies are stored, however I'm encountering a NullPointerException and can't for the life of me spot why it's snagging there.  Below is the code the exception is flagged, I managed to pin the error on the line   "gridPos[0][0].getType()":  public class Movement extends ArrayControl {  public Movement(Display display) {     super(display); }  private static ArrayControl arrayControl = new ArrayControl(display);  public static void addEnemyShip(){     EnemyBehaviour[][] gridPos = display.getGridPos();     gridPos[0][0] = new Ship();     arrayControl.updatePosition(gridPos[0][0].getType(), 0, 0); }   And this is the segment that handles the actual passing of gridPos:  public EnemyBehaviour[][] getGridPos() {     return gridPos; }   And this is the getType() method in the super class of Ship()  public String getType() {     return type; }


Can I change the search engine used by Start Search in Windows 10?

While Cortana is not available in my region, I can see the integrated web searchs in Windows 10's start search being super useful if they weren't Bing results.  I'd really like to be able to change the search engine used to DuckDuckGo, is there a way I can do that?


How to generate a series correlated to a given one, with given mean and standard deviation

I'm trying to generate a series Y that is correlated to series X. I know the data from X, I know the mean and the standard deviation of series Y, and I know the Pearson coefficient between X and Y (0.9). Example: X=[44.69,43.98,43.96,43.02,44.37,43.96,42.74,41.99,43.26,43.17] Pearson=0.9 mean_Y=20 Standard_deviation_Y=4.5 Can you help me somehow in getting the desired series Y? It would be great to have the solution ready to be used in Python. Thank you in advance for your time and help!


Complement of a prime ideal is a subset closed under multiplication, containing 1

Let $R$ be a commutative ring and let $I$ be a prime ideal of $R$. Prove that $S = R \setminus I$ is a multiplicative closed subset containing $1$.  Please can anyone help me out here?


Is an external light meter necessary for photographers?

I was wondering if a light meter () is necessary when you are about to take a picture. I'm going to buy a Canon EOS and the webpage says that the camera has an embedded light sensor to . So, is there any reason to use a photometer?


How to get number of affected rows in sqlalchemy?

I have one question concerning Python and the sqlalchemy module. What is the equivalent for cursor.rowcount in the sqlalchemy Python?


Returning Null Pointer Exception BUT expected MovieListException?

So I am running a JUnit Test, which gets the rating of the movie(Hashmap:  HashMap<String, Rating> movieList))  BUT if there is no rating against a movie throw MovieListException.   JUNIT expected vs actual   Learning about Throwing exceptions so I don't know what I am doing wrong?   In the Rating class I check whether object value is null, then throw MovieListException In MovieList class this line is getting error of null: Integer value = movieList.get(string).getRating(); EVEN though I am catching and returning the e object (Which I assume it need to RETURN? BASED on JUNIT TEST?)      ISSUE: I am getting a null pointer instead of my MovieListException   The test class      /* Test 5: Can't get a rating for an unrated movie      */     @Test(expected = MovieListException.class)     public void nonexistentRating() throws MovieListException {         String result = movies.getRating("The Ghost in the Invisible Bikini");      }   MovieList class   public class MovieList { private HashMap<String, Rating> movieList = new HashMap<String, Rating>();  public void addMovie(String string) {     // TODO Auto-generated method stub     movieList.put(string, new Rating(RatingType.NONE, null)); }    public String getRating(String string) throws MovieListException {     // TODO Auto-generated method stub     String ratingString = "";      try {         Integer value = movieList.get(string).getRating();          if(value != null && value > 0) {             for(int i = 0; i < value; i++) {                 ratingString += "*";             }              return ratingString;         }                        } catch(MovieListException e) {         System.out.print(e.getMessage());         return e.getMessage();     }       return "No rating"; }  public void setRating(String string, Rating rating) {     // TODO Auto-generated method stub     movieList.replace(string,  rating); }  package movieListQuestion;   Rating class  public class Rating {   private Integer ratingValue; private RatingType typeValue;  public Rating(RatingType type, Integer rating) {     this.ratingValue = rating;     this.typeValue = type; }     public Integer getRating() throws MovieListException {     if(this.ratingValue == null) {         throw new MovieListException("No rating");     }     return this.ratingValue; }   }  Exception class      package movieListQuestion;  /* A trivial exception class for the Movie List program.  */ @SuppressWarnings("serial") public class MovieListException extends Exception {      public MovieListException() {         super();     }      public MovieListException(String message) {         super(message);     }  }   UPDATED getRating method from MovieList class  public String getRating(String string) throws MovieListException {         // TODO Auto-generated method stub         String ratingString = "";              Integer value = movieList.get(string).getRating();              if (!movieList.containsKey(string)) {                throw new MovieListException("Movie not found");             }              if(value != null && value > 0) {                 for(int i = 0; i < value; i++) {                     ratingString += "*";                 }                  return ratingString;             }                              return "No rating";     }


Why do starships 'fall' when they blow up?

From A New Hope to Revenge of the Sith to The Last Jedi, we see starships blown up in battles in space. The larger ships, like Star Destroyers and Dreadnoghts, don't just blow up, however. They partially explode and fall. Larger structures, like the Death Star, explode. Smaller ships, like X-Wings and TIE Fighters, explode. While we can assume that certain weapons will affect smaller ships differently than their larger counterparts, this disharmony is a bit confusing.  What causes larger ships to 'fall' when blown up in the Star Wars universe?


What are the main differences between PGP (Pretty Good Privacy) and GPG (GNU Privacy Guard) in relationship with security in Ubuntu and Launchpad?


How to insert multiple records and get the identity value?

I'm inserting multiple records into a table A from another table B. Is there a way to get the identity value of table A record and update table b record with out doing a cursor?  Create Table A (id int identity, Fname nvarchar(50), Lname nvarchar(50))  Create Table B (Fname nvarchar(50), Lname nvarchar(50), NewId int)  Insert into A(fname, lname) SELECT fname, lname FROM B   I'm using MS SQL Server 2005.


Installing extension packs to a virtual machine

I am using a windows 7 laptop and I am running Ubuntu 16.04 LTS inside the oracle VM virtualbox(v 5.1.12). I am trying to install an extension pack so that I can access the USB port from the virtual machine. I downloaded the suitable pack(5.1.12) from  but on trying to open it in Ubuntu, I am getting an error saying archive type is not supported. What should I do?


It is well known that if we have two groups/rings/vector spaces (over same field), then we can embed them in a common corresponding object. It is natural to consider for fields.   However, if we take two fields of different characteristics, then we can not embed both in a common field. With this remark, I will shorten my problem in a simple case.  Question: If $F$ is a field, and $E_1,E_2$ are any two extensions of $F$, then does there always exists a field $E$ which is extension of both $E_1$ and $E_2$?


iMessage shows error message: "Not Delivered"

I updated to Yosemite a while back, but yesterday iMessage started sending the error message "Not Delivered". I can send messages to non-Apple devices (SMS?) just fine, but not to Apple clients (Apple server?). No problem at all with iPad Air or iPhone 5S, both iOS 8.1.3. Any suggestions would be greatly appreciated!  -Macbook Pro Retina (late 2013) -iPhone 5S -iPad Air


pgAdmin3 shp2pgsql tools: missing, how to obtain

We currently have installations of postgreSQL DBs of 9.3 and 9.4. On our clients in the folder C:\Program Files\PostgreSQL[9.3/9.4]\bin I cannot find the shp2pgsql tools.  I thought these older versions had the tool bundled with the with the PostgreSQL client software.  Where can we obtain these shapefile import/export tools (is it possible these additional "tools" were not installed when the base client software was installed). If its a separate product that must be installed in addition to the base client software would QGIS be able to import a shapefile into our postgreSQL database lacking that standalone tool? Our QGIS version is v2.18.11  Our pgAdmin3 version is 1.18.1 - yes this old and we are unable to upgrade at this time! NOTE: We cannot upgrade


/var/log/syslog constantly logging errors, growing at 1 MB/s

It seems to be the same three errors repeated:  $ tail -n15 /var/log/syslog Apr  5 23:32:01 detoo kernel: [ 6042.078785] ACPI Error: [PGRT] Namespace lookup failure, AE_NOT_FOUND (20150619/psargs-359) Apr  5 23:32:01 detoo kernel: [ 6042.078787] ACPI Error: Method parse/execution failed [\_GPE._L6F] (Node ffff8808554d42d0), AE_NOT_FOUND (20150619/psparse-536) Apr  5 23:32:01 detoo kernel: [ 6042.078788] ACPI Exception: AE_NOT_FOUND, while evaluating GPE method [_L6F] (20150619/evgpe-592)   I noticed something was wrong when I was getting low disk space warnings. I've flashed to the latest UEFI available, I've tried enabling/disabling the C states in my UEFI.  I'm running Linux Mint 17.3 Cinnamon 64-bit with kernel 4.2.0-34-generic. I have a skylake processor and z170 motherboard.  I'm quite new to linux and am at a lost as what I should do next.  EDIT: I have the same problem when booting from a USB with Ubuntu 16.04, and nearly identical error logs being constantly spammed:  Apr  6 01:01:48 ubuntu kernel: [  152.594053] ACPI Exception: AE_NOT_FOUND, while evaluating GPE method [_L6F] (20150930/evgpe-592) Apr  6 01:01:48 ubuntu kernel: [  152.594994] ACPI Error: [PGRT] Namespace lookup failure, AE_NOT_FOUND (20150930/psargs-359) Apr  6 01:01:48 ubuntu kernel: [  152.594996] ACPI Error: Method parse/execution failed [\_GPE._L6F] (Node ffff8808554e02d0), AE_NOT_FOUND (20150930/psparse-542)


Size of a struct with float and uint8_t in C

let say I have a program like this,  typedef struct {     float hello; } tData;  int main() {     printf("%d", sizeof(tData)); }   The value is 4, as the float is 4 bytes. It showed as expected.  However, when I add a new variable,  typedef struct {     uint8_t bool1:1;     float hello; } tData;  int main() {     printf("%d", sizeof(tData)); }   I thought that it should display 5, but I got 8. May I know why?


Could you frame a question for this answer?

I have a statement which I want to use as an answer. The statement runs as follows:  Barack Obama is the 44th president of the United States of America.   Here the emphasis lies on the number 44.  What would be the question for the above statement? Please help.


Aragorn's Direct Relation to Elros and his unknown choice to become an elf

I've been pondering this from time to time. If Aragorn is directly related to Elros, Why couldn't he have choice to become Elven like Elrond? Because he is descended from Lúthien he could have chosen, yes, or am I wrong here?  Their story in some ways, at least through the film, seems a lot like the ancient story, and there is history about Arwen being most fair and a lot of talk of her having Lúthien's bearing.  Most that was said about her was also said about Arwen. To some, Lúthien returned.  There has been information emerging about how Arwen and Aragorn meet in Mandos and get permission or are awarded to live eternally in Valinor.  I for one can see this happening, since this is one of those rare moments where such things do happen.  Now onto the lineage.  If he was related to Elros:   Did the choice end with that line?   Doesn't Aragorn have relations to more ancient heritage?  I mean, if he can be distantly but directly related to Arwen, couldn't he have this same option?   Or are most Numenoreans just simply this?


Evaluate: $$S=1+ \frac{1}{2+ \dfrac{1}{4+ \dfrac{1}{8+ \dfrac{1}{16 +\cdots} }} }$$ What have I done, so far? Nothing, couldn't think of a way to solve it. But I know it is around 1.46. I want to solve it myself, so hint on how to solve will be sufficent.


How are Muggle-borns and possibly half-bloods not missed at public school?

Wouldn't the British Parliament wonder where the Muggle-borns students who were supposed to attend their school have gone to?  Or at least, question their parents about their children's whereabouts? And when the child returns home to the Muggle world in the summer, question the children themselves?  Wouldn't they or shouldn't they have been able to intercept at least one letter of invitation and acceptance to a Wizarding School like Hogwarts from like, an owl?  Or better yet, why didn't this guard report to the public that Harry and Ron attempted to go through a platform before flying the Ford Anglia and were witnessed by no less than seven muggles (Chamber of Secrets), and possibly questioned both of them at the end of the second year?  Or even better, question everybody else that seems to enter and/or leave Platform 9 3/4 for whatever levels of intents and purposes?


Best way to represent a fraction in Java?

I'm trying to work with  in Java.   I want to implement arithmetic functions.  For this, I will first require a way to normalize the functions.  I know I can't add 1/6 and 1/2 until I have a common denominator. I will have to add 1/6 and 3/6.  A naive approach would have me add 2/12 and 6/12 and then reduce.  How can I achieve a common denominator with the least performance penalty?  What algorithm is best for this?    Version 8 (thanks to ):     Improvements include:         the equals() method is now consistent with the compareTo() method      final class Fraction extends Number {     private int numerator;     private int denominator;      public Fraction(int numerator, int denominator) {         if(denominator == 0) {             throw new IllegalArgumentException("denominator is zero");         }         if(denominator < 0) {             numerator *= -1;             denominator *= -1;         }         this.numerator = numerator;         this.denominator = denominator;     }      public Fraction(int numerator) {         this.numerator = numerator;         this.denominator = 1;     }      public int getNumerator() {         return this.numerator;     }      public int getDenominator() {         return this.denominator;     }      public byte byteValue() {         return (byte) this.doubleValue();     }      public double doubleValue() {         return ((double) numerator)/((double) denominator);     }      public float floatValue() {         return (float) this.doubleValue();     }      public int intValue() {         return (int) this.doubleValue();     }      public long longValue() {         return (long) this.doubleValue();     }      public short shortValue() {         return (short) this.doubleValue();     }      public boolean equals(Fraction frac) {         return this.compareTo(frac) == 0;     }      public int compareTo(Fraction frac) {         long t = this.getNumerator() * frac.getDenominator();         long f = frac.getNumerator() * this.getDenominator();         int result = 0;         if(t>f) {             result = 1;         }         else if(f>t) {             result = -1;         }         return result;     } }     I have removed all previous versions.  My thanks to:


Is there a file explorer for ubuntu with a windows style interface?

I'm fairly new to Linux and just want to be able to see the disk usage and mounted drives in the same way that I can when I open 'My Computer' in Windows. Is there a file explorer for Ubuntu with this kind of interface?


$L$ is a Lie algebra. If any finite dimensional repersentation of $L$ is completely reducible, then $L$ is semisimple.  I have already proved that $L$ is reductive, i.e. $\text{Rad}(L)=Z(L)$, by considering the adjoint representation. However, I stucked here and did not know what to do.


From :      ‘We all believe, up at the Lodge, Rachael, that he will be freed from suspicion, sooner or later.’    ‘The better I know it to be so believed there, my dear,’ said Rachael, ‘and the kinder I feel it that you come away from there, purposely to comfort me, and keep me company, and be seen wi’ me when I am not yet free from all suspicion myself, the more grieved I am that I should ever have spoken those mistrusting words to the young lady. And yet I— ’   We usually use should have to say that something was not done, despite being desirable. But in this example, the mistrusting words were indeed spoken (earlier in the book). How would one explain the use of the should have construction then?   Would the following be fully equivalent to the above quote:     ‘We all believe, up at the Lodge, Rachael, that he will be freed from suspicion, sooner or later.’    ‘The better I know it to be so believed there, my dear,’ said Rachael, ‘and the kinder I feel it that you come away from there, purposely to comfort me, and keep me company, and be seen wi’ me when I am not yet free from all suspicion myself, the more grieved I am that I have spoken those mistrusting words to the young lady. And yet I— ’


How to check if version name String(found) > String specified for version name in Android

In my application I want to check the version number from the server and when this versionName > myVersionName show a dialog.  verionName is from the server comes as "version": "1.0.0.1" , and myVersionName is like 1.0.0.2.   I want that when  1.0.0.1 > 1.0.0.2 show a dialog.  But this verionNames are Strings. how can I check this in String?  Please help me


Over last year we have tried to deploy antivirus software on production linux servers.  In most cases after a few weeks under month end loads applications start running slow, or do not work as it should.  I have always questioned to reason for having antivirus on linux, but it just seems a be must have item on auditors list.  It is my understanding that the amount of linux malware is little in comparison to windows, which brings me to my question why linux servers are required to have anti virus in terms of SOX?    We have tried 2 different anti virus products and both deployments where rolled back on critical servers.  Should we just put a compensating factor in place and forget about anti virus on linux altogether


Callout Mock Responses & multiple HTTP Status Code values

I'm trying to unit test the behavior of some code which performs callouts and its logic is dependent on the HTTP status code of the response - 200 vs 401.  The pattern being exercised is familiar:   Make callout Response is (unauthorized) HTTP 401 Logic checks Status value on the response if (status == 200) { /* yay! */ } if (status == 401) { /* make request for auth /* }   retry original callout with newly acquired authorization yay!    I am attempting to test the code's "try, auth, retry" behavior using the MultiStaticResourceCalloutMock but it appears that only a single status code can be set for all requests that the mock provider can respond to using the .setStatusCode(int) method. Is this accurate?  Is there a mechanism for using a single MultiStaticResourceCalloutMock and having it respond with different status codes per URL in the test context?  Is the only solution here to use a Dispatcher such as what Andrew Fawcett documents here in this answer?   Is there another method/mechanism that allows for different status codes to be returned by the mock provider on the HTTPResponse?    Some  showing the one-time usage pattern of the .setStatusCode(200) method and the multimock class.  @isTest private class CalloutMultiStaticClassTest {     @isTest static void testCalloutWithMultipleStaticResources() {         // Use MultiStaticResourceCalloutMock to         // specify fake response for a certain endpoint and          // include response body in a static resource.             MultiStaticResourceCalloutMock multimock = new MultiStaticResourceCalloutMock();         multimock.setStaticResource(             'http://api.salesforce.com/foo/bar', 'mockResponse');         multimock.setStaticResource(             'http://api.salesforce.com/foo/sfdc', 'mockResponse2');         multimock.setStatusCode(200);         multimock.setHeader('Content-Type', 'application/json');          // Set the mock callout mode         Test.setMock(HttpCalloutMock.class, multimock);          // Call the method for the first endpoint         HTTPResponse res = CalloutMultiStaticClass.getInfoFromExternalService(             'http://api.salesforce.com/foo/bar');         // Verify response received          System.assertEquals('{"hah":"fooled you"}', res.getBody());          // Call the method for the second endpoint         HTTPResponse res2 = CalloutMultiStaticClass.getInfoFromExternalService(             'http://api.salesforce.com/foo/sfdc');         // Verify response received          System.assertEquals('{"hah":"fooled you twice"}', res2.getBody());     } }


I have about 2000 rows to be inserted at a time. Which is Optimized method Multiinsert or insert into .. SEelec colum1, column2 from table . In case if Multi-insert, I will SELECT generate multiple statments in my application. So in short, which is Optimized? INSERT INTO table_name(column_list) SELECT     select_list  FROM     another_table WHERE    condition;  OR INSERT INTO table(c1,c2,...) VALUES     (v11,v12,...),    (v21,v22,...),     ...    (vnn,vn2,...);


There is a well-defined algorithm (taught in calculus) which, given a function, gives you that function's derivative. Why is there no such thing for integration?


I came to Singapore as a tourist 5th of November. As I am holding a Polish passport I got a visa for 90 days. I left Singapore 4th of February and I went to Bali. I decided to return to Singapore 7th of February. I was going to Singapore with my friend (Singaporean) who declared to pay my accommodation in Singapore for 60 days. I didn't have a return ticket to my country, because I wasn't sure if i will get a visa for 30 or 60 days.   They stopped me at the airport and said that I cannot get in to Singapore. They took pictures of me and fingerprints, but I didn't find any stamp in my passport just paper information with the reason: 'being ineligible for the issue of a pass under current immigration policies'.   My question is: can I come back to Singapore or am I blacklisted? They didn't want to tell me anything at the airport. Where should I try to explain this situation?


Where can I find free elevation data for Europe?   The available resolutions and terms of use are important details that I also seek.


Make Mac to treat my iPhone like a regular wifi router. I want it to constantly stay connected to my iPhone (XS)

There is a difference how the Mac sees Hotspots and regular Wifi routers, it disconnects from HotSPOT as soon as it goes to sleep and needs to be reconnected after waking up. I have the same iCloud on my Mac and iPhone and I can connect via "iCloud instant HotSpot" but, I also want it to stay connected all the time.


Subgroup of the quotient group of the commutator G'.

Let G be a group and let G' be its commutator. Prove there is a one-to-one correspondence between the set of normal subgroups of G whose quotient is abelian and the set of all subgroup of G/G'.   I tried to use the fact that the commutator is a subgroup of any normal subgroup whose quotient is abelian but I can't seem to realize what correspondence I should be looking at. I would appreciate your help.   The allegedly duplicated question does not talk about the correspondence aforementioned nor does it help me in any way getting what I need to do understood.


When I was reading an English web site on the Internet (BBC's 6 Minutes English), I came across this sentence:     At the weekends, me and my sisters didn't go to cybercafes or the cinema or hang around the park smoking cigarettes like other teenagers.   I've never seen "me" used as the subject and placed at the beginning of a sentence, so I was surprised to see this. I think of course "I and my sisters didn't go" is better, but is "me and my sisters didn't go" accepted as a colloquial expression by English-speaking people?


Is the initial sound in the word RHS a vowel sound?

In order to specify whether a or an, I need to know whether the articulation is with [ar] like vowel sound or [r] like consonant sound. So is RHS a vowel or a consonant sounding in the initial? So a RHS or an RHS?


I'm trying to see if for several cases changing the ring in a tensor product affects the result or doesn't. Now I'm trying to prove  $\mathbb{C}\bigotimes_\mathbb{R}\mathbb{C}\simeq \mathbb{C}\bigotimes_{\mathbb{C}}\mathbb{C}$ if it's true, or to show why it isn't.  I've been unable to find an isomporphism between those two, but I don't know how would I proceed in order to show that there is no possible function that could define one.


Using the SD card as Adopted Storage encrypts it. How can it be decrypted?


Concatenate sting from different tables in sql server 2017 below versions

I have two tables User_details and Level_details. User_details table: ID     Name 1       A 2       B 3       C 4       D 5       E  Level_details table: trns_id    Lvl   usr_id 66          1      1 66          1      5 77          1      2 77          2      3 66          2      4 66          2      3  I am expecting the result like: trns_id   Lvl    name 66         1     A, E 66         2     D, C 77         1     B 77         2     C  Please suggest the query that should work in lower version of SQL server(below SQl 17).


See this example code:  \documentclass{article}  \usepackage{pgfplots} \pgfplotsset{compat=1.10} \begin{document}   \begin{tikzpicture}     \begin{axis}[                  xmin=-0.1,                  xmax=1.1,                  ymin=-1.1,                  ymax=1.1,                  domain=0:1,                  samples=30                 ]       \addplot[blue] {sqrt(x)};       \addplot[purple] {-sqrt(x)};     \end{axis}   \end{tikzpicture} \end{document}   The result appears acceptable far from zero, but near zero it's too much undersampled:    Increasing samples value makes the plot nice, but it considerably slows down processing. As a workaround I could just plot the inverse in a parametric plot (i.e. (y^2,y)), but in my actual code it'd require quite a bit of additional work.  Is there a way to provide a custom sampling function or specify different density of samples in different parts of the domain?


Limit of Multivariate Probability Density Function as one or more or all variables approach positive or negative infinity

Could someone point out a good source or provide justification as to whether the limit of a multivariate probability density function, as one or more or all variables tends to positive or negative infinity, goes to zero.  $$\lim_{x_{1}\to\pm\infty}f(x_{1},x_{2},...,x_{n})=0$$  $$\lim_{x_{1},x_{2}\to\pm\infty}f(x_{1},x_{2},...,x_{n})=0$$  $$\lim_{x_{1},x_{2},...,x_{n}\to\pm\infty}f(x_{1},x_{2},...,x_{n})=0$$  I have found this related question for the univariate case:


Is the set $\{f = \cos(nx) : n=1, ... ,\infty \}$ closed?

I guess the set $\{f = \cos(nx) : n=1, ... ,\infty\}$ is closed in $\ C([0,1])$ under the sup norm. Therefore, I am trying to show its limit function is of the form $\cos(nx)$. However, I have difficulty proving that for $\cos(n_ix)$ to converge, $\ n_i$ must be constant after some term. At first, I tried to prove c $\leq$ $\mid cos(nx)-cos(mx)\mid$ for some positive c and distinct m and n.  Is my guess wrong?


How do I backup and restore SMS Messages?


How to break out of recursive setTimeouts in javaScript

I am having trouble breaking out of a recursive setTimeout() and I do not know what I am doing wrong.   timer.start = function() {   //do something here   recursive(); //call the recursive once to start it up   function recursive() {     setTimeout1 = setTimeout {       function() {         //do something         recursive();//call recursive after a delay       }, delay}   } }   How would I stop that once the "pause" button has been hit?  I have tried this:  clearTimeout(setTimeout1); <br /> setTimeout1 = null;   This does not work all the time.


Can I have a sex toy in checked-in luggage traveling to Singapore?

I will be moving to Singapore and since the country has very strict rules I wonder if it is possible to take one sex toy with me in checked-in luggage?    I want to respect all local rules and avoid any issues (it is a pink vibrator - not very realistic design packed in its original metal case). I can not find any official information regarding this online. If any of you knows about any official website where I can read more I will be thankful. Singaporean Airlines don't provide any information.


Can I, as a reviewer, tell authors to get a native English speaker to proofread their paper?

I am reviewing a paper for possible publication in a respected journal. The English in the paper is very poor. The authors are clearly not native English speakers. I want to write something to the effect of the following in my review.   I advise the authors to find a native English speaker to proofread the manuscript.    My question: Is this appropriate in a review?  On one hand, I think it is good, constructive advice. The paper would be significantly clearer if someone spent a few hours helping them fix it up. I can try to help them through reviewer comments, but it would be much easier if someone could help them in person. The authors are located in a western English-speaking country, so they should be able to find someone.  On the other hand, I don't want to be "the mean reviewer." I understand that English can be difficult to master for immigrants. Perhaps there is a more diplomatic way of saying this.


Here is my attached pdf file shot. When I compile my LyX document these figures go out of the window. Actually these are 10 sub figures whereas only 5 are visible in the pdf file after compiling. Please help where am I doing wrong