I was wondering what the exact rules are concerning hyphens, I know that they should be used to combine words that are used together but I'm not sure why for example "example-based methods" use a hyphen but machine learning does not.   So for what reason do these words have different rules and can this in any way be generalized?

For example, "file system" and "related". Is it "file system-related"? It will appear as if it is a compound of "file" and "system-related", won't it?


Suppose you have some physical quantity $x$ of dimension $l$. We all know that the dimension  of $x^2$, for example, will be $l^2$, and that of $\dfrac{1}{x}$ is $l^{-1}$. However, what will be the dimensions of $ln(x)$ and $e^x$ ?  I think I've never encountered such a case before, wherever I found $ln(x)$ or $e^x$, $x$ had no dimensions. I don't know if we can ever have a case where $x$ possesses a dimension.  Supposing this case exists, I may be able to prove that $ln(x)$ has no dimensions, as $d(ln(x))=\dfrac{dx}{x}$ which is a dimensionless quantity for any $x$, but I can prove nothing for exponentials, and I'm not even sure that this is a valid argument. However, there is a different problem with exponentials:  $e^x.e^y=e^{x+y}$, how can you sum $x$ and $y$ if they have different dimensions ?

I have a unit measure, say, seconds, $s$. Furthermore let's say I have a dimensionful quantity $r$ that is measure in seconds, $s$. What is the unit measure of $e^r$? ($1/r$ is in $Hz$.)  My question is general, how to find the unit measure of a transformation function $y=f(x)$ where $x$ takes some known unit measure. I give above two functions $f(\cdot)=e^\cdot$ and $f(.)=1/\cdot$.


I am flying from Chicago(USA) to New Delhi(INDIA) via London Heathrow Airport(LHR). Actually the route is the following -   Chicago --> London Heathrow --> Munich --> New Delhi.  The layover at LHR and at Munich are of 2 hours each. I am worried if I need to get a transit visa for the flight to Munich. I have browsed through other questions related to this, but I just need an assuring confirmation that I won't need a transit visa.  Edit- I hold an Indian passport and study at the USA with F1 visa.

I am traveling from the US to India via London Heathrow on November 6. I will be at LHR on 7th at 6:20 am and departing at 9:25 pm. I'm an Indian national and have a valid US visa.  Do I need a transit visa to stay airside?  I have been scared that British Airways have stopped a few people from boarding flights (no details just rumors).  Do I need a transit visa to stay landside? I want to do some sightseeing. What are the chances of getting past officials using transit without visa concession?  Real stories will help a lot to calm the butterflies in my stomach.


I am looking to add a wet bar to my bathroom and was looking to tap into my CPVC lines to provide the water.   Currently there are some 1/2" lines running near where I want to go that tap off of a 3/4" trunk.  Some plumbers that I had in were saying that we couldn't use the 1/2" lines as there'd be too many tap offs from the line, which leads to my question - How many connections can you have off of 1/2 and 3/4" CPVC?  I tried doing some googling, but the best I can find talks about what the max pressure for each size is, which doesn't mean much to me.  FWIW, this would be residential, schedule 40 piping.

My basement apartment's hot water pipe runs starting with 3/4" from the heater to the first outlet, the bathtub and the 2nd one, the washer.  From the washer, it goes to the bathroom sink (please don't question this design as I have structural reasons why it doesn't go from the bathtub directly and don't want to spend time explaining as it's not pertinent) and ends in the kitchen sink, which will also be supporting a dishwasher.    My question is, can I run only  1/2" pipe for hot water starting from the washer, will it be enough bandwidth or should I go with 3/4" ?  I know that some people have up to 3 outlets out of a 1/2" copper pipe but I'm not sure how to count the DW as it is a different appliance but using the same valve from the wall inside the counter.  I have run 3/4 to the tub and to the washer and now I'm about to continue on from the washer towards the bath and kitchen sinks and need to make a design decision.


I am trying to find a symbol for "less than, equal to, or greater than" similar to this:    I have not been able to find one. If anyone knows of such a command, please let me know.  Thank you

I know what my symbol or character looks like, but I don't know what the command is or which math alphabet it came from. How do I go about finding this out?


Here is situation :   I have ViewController that have SideMenu that need to import   #import "SideMenu.h"   A I've to call the delegate method of ViewController from sidemenu so I've to import ViewController in sidemenu that lead me to error :  Cannot find protocol declaration for 'onClickCategory'   So I've to import both files to each other. How to handle this situation?  @class not work in both class.

It is to my understanding that one should use a forward-class declaration in the event ClassA needs to include a ClassB header, and ClassB needs to include a ClassA header to avoid any circular inclusions. I also understand that an #import is a simple ifndef so that an include only happens once.  My inquiry is this: When does one use #import and when does one use @class? Sometimes if I use a @class declaration, I see a common compiler warning such as the following:     warning: receiver 'FooController' is a forward class and corresponding @interface may not exist.   Would really love to understand this, versus just removing the @class forward-declaration and throwing an #import in to silence the warnings the compiler is giving me.


I am new on Drupal. I have a csv where I want to upload on a drupal site every week.  I tried to follow this tutorial  but "Data Processor" doesn't show. I have installed all the modules and clear the cache.  Any suggestions?

I've got a Drupal site with an obscene about of content that has been given to me in CSV format. I'm toying with the idea of building a module to let me do this but if there's one already out there that I can use to just get this site out of the way that would be awesome.  My question is: Is there anything out there that allows you to import a CSV file into D7 that will populate the node table and all the custom fields tables as well?  Thanks.


I've tried the determinant of matrices with the form $$\left( \begin{matrix} x&-1&\cdots&-1\\ -1&x&\cdots&-1\\ \vdots&\vdots&\ddots&-1\\ -1&-1&\cdots&x \end{matrix} \right)_{n\times n}$$ i.e. with $x$ in the diagonal and $-1$ everywhere else. I've always get $$(x+1)^n-n(x+1)^{n-1}=(x+1)^{n-1}(x-n+1)$$ for various $n$ and I think it is a correct formula.  I think by induction will be a way but I don't know how. Any variant or counterexample are welcome.

I have the following $n\times n$ matrix:  $$A=\begin{bmatrix} a & b & \ldots & b\\ b & a & \ldots & b\\ \vdots & \vdots & \ddots & \vdots\\ b & b & \ldots & a\end{bmatrix}$$  where $0 < b < a$.  I am interested in the expression for the determinant $\det[A]$ in terms of $a$, $b$ and $n$.  This seems like a trivial problem, as the matrix $A$ has such a nice structure, but my linear algebra skills are pretty rusty and I can't figure it out.  Any help would be appreciated.


My iPad mini turned off and said it has no charge, then after 1 hour of charging I plugged it into a different port and then it turned on with 100% battery. Later, the 100% went down quickly to 20% while plugged in so I turned it off but it said it was out of battery when I tried to turn it back on. I have had it plugged in for the past 5 hours and it hasn't turned on and it can't be recognised in iTunes and can't be put into DFU mode. Any ideas as to what I can do?

I have an iPad Mini that I have had sense the fall.  This morning I woke up and it was working fine.  Now it won't turn on.  I've tried all the regular fixes and nothing is working.  Will the manufacturer warranty cover this?  Should I take it to an Apple store?


I'd like some advice on how I can negotiate a Qualcomm Quick Charger up to a certain voltage. I have a "dumb" appliance which usually uses its own transformer/"wall wart" at 12V 1A. I also have a USB Quick Charge adapter which can supply 12V 2A, so in theory I can create a cable to adapt that USB charger and replace the wall wart. However, the charger won't output 12V unless a charge controller tells it that the device can use the extra voltage. This negotiation is usually performed by a charge controller on a smart phone.  Is there a simple device on the market that can do this? Alternatively, is there a circuit I can put together to accomplish this? Here is a diagram which illustrates the idea. Basically I need to output 12V to a "dumb" device, so an independent charge controller is needed.

I recently bought the Litionite Falcon powerbank that has one of its outs designed for 5/9/12V. The 12V is at 1.5A which I thought would be enough for my 12V/0.8A camera. However, connecting the camera to the charger with a USB to 0.7mm jack doesn't work. Indeed, I can measure only some 5.3V coming through the USB cable which explains why the camera doesn't recognise the power.   How do I get the 12V from the powerbank to charge my camera? Do I need a special USB cable? Do I need one with a step up? Or is it enough to wire the USB differently?


If I apply Cauchy II theorem of limit of sequences to this problem I get limit as $1$ since $$\lim_{n\to\infty} \frac{( {n!})^\frac{1}{n}}{n} = (\frac{1.2.3..n}{n.n..n})^\frac{1}{n}$$ where $a_1 =\frac{1}{n},a_2=\frac{2}{n}$ and so on. Now I can choose $a_n = \frac{n}{n}$ and using Cauchy's II theorem on limits of sequence, the limit of above problem should be 1. Can somebody explain what I am doing wrong here. The textbook I am referring doesn't put any restriction on $<f_n>$ apart from $<f_n>$ being positive. Is Cauchy theorem even applicable in this case ? Edit - I know it can be solved using Riemann Sums.

I am asked to determine if a series converges or not:  $$\displaystyle\sum\limits_{n=1}^{\infty} \frac{(2^n)n!}{(n^n)}$$  So I'm using the $n$th root test and came up with $\lim_{n \to {\infty}}\frac{2}{n}\times(\sqrt[n]{n!})$ I know that the limit of $\frac{2}{n}$ goes to $0$ when $n$ goes to infinity but what about the $(\sqrt[n]{n!})$?


I have two layers: one is a polygon and another one is a line (Road). How can I find in how much road in falls inside each polygon?

I have a line vector layer which has multiple segments within individual polygons in a separate polygon layer. I have spatially joined the attributes so that each line segment now has the same ID as its corresponding polygon.  I need to calculate the lengths of the lines within each polygon according to the polygon ID. Is there an expression I can use to do this? I have already calculated the lengths of the individual segments but I need to get the sum of these according to each unique polygon ID.  I am a novice at complex SQL expressions within QGIS, ideally I would like a new column displaying the info.


I want to make a button and when I press it, it will apply the material I made, that mean the nodes. I try different way to type script but it wasn't work. bpy.ops.node.add_node(type="ShaderNodeTexNoise")  What's wrong with this code?

I have edited a script that creates some nodes, but the only problem is, it always created a new material. I want it to either add the nodes on the existing material, or a pre-defined material. Here is the script base I am using.    Thanks for the help in advance! :D


I've tried formating my memory card using Window's File Explorer, Disk Management & Diskpart and MiniTool partition wizard and  sdcard.org's sd car formater, no one touched my memory card, Should i dispose it?  Or any of you legends can save me 6 $'s?

When I plug in my USB flash drive, it shows up on my computer as write-protected or read-only. I am unable to transfer data to it, nor can I modify or delete any files already stored on it. I also cannot repartition or reformat the drive using Windows Disk Management, DiskPart, GParted, or other tools. The drive does not have a write-protect switch.  Why did this happen and what can I do about it? Is there a way to remove the write protection?  (Note that this can happen with some memory cards, too, as they often use controllers similar to those used in flash drives. In some cases, the system may report that the drive or card was formatted successfully even though it was never actually formatted; the original data reappears when the device is reinserted.)     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


Is there a way to simplify $\det(D + C)$, where $D,C$ are square matrices of matching dimensions, $D$ is diagonal (with different diagonal elements, $D_{ij} = \delta_{ij}d_i$), and $C$ is a constant matrix, that is, all entries $C_{ij}=c$ are equal to the same number?  To be more explicit, assuming $D,C\in\mathbb{R}^{n\times n}$, the matrix $D+C$ has the form:  $$D + C = \left(\begin{array}{ccccc}   d_1 + c & c & c & \cdots & c\\   c & d_2 + c & c & \cdots & c\\   c & c & d_3 + c & \cdots & c\\   \vdots & \vdots & \vdots &  & \vdots\\   c & c & c & \cdots & d_n + c \end{array}\right)$$

I'm having troubles solving the following determinant:  $$\left|   \begin{array}{cccc}     a_1 & x & \ldots & x \\    x & a_2 & \ldots & \vdots \\     \vdots & \ldots & \ddots & x \\     x & \ldots & x & a_n \\   \end{array} \right|$$  I have tried coming up with recurrent formula, but there's always one lingering row and column. I also tried finding values of x for which determinant is 0, hoping I could get a nice polynomial solution, with no luck.  By subtracting first row from every other I get somewhat nicer result, but there's still that one row/column which I can't solve. If all other columns are added to the first one and then I subtract the first row, then the column doesn't depend on x anymore, but I haven't found 1..n much more useful.


I am building a plain IOT web interface in python with a simple HTML form. When a user would submit this form there is no need for a response. I would like to simplify and use a very old technique from the times before ajax:    <form target="hiddeniframe" method="post"> <input type="text" name="somevalue"> <input type=submit> </form>  <iframe name="hiddeniframe" style="display:none;"></iframe>     The POST request would go into the hidden iframe. The user would see the result live from the connected device, so no need to show a response.  I would like to know if there are any security/browser compatibility issues with using this old technique?


This was actually from a personal experience and I was wondering if airlines would react to such an event.   Let's say a relative has died in Poland and I'm in the United Kingdom. I would have to attend the funeral taking place in Poland. This may seem absurd, but would airlines react and perhaps increase the price of the aeroplane tickets, knowing that I will buy the ticket anyway?

Having a global dispersed circle of friend and family, it happened already twice that I needed to travel urgently because of serious personal circumstances. When I had to travel to the deathbed and subsequent funeral of a relative, I even paid twice the price of normal first class ticket for an economy ticket.   When you are confronted with an urgent situation in your family (death or serious illness) how can you find a more economical airfare? I don't mind paying more then normal, but the fares airlines charge you for very short and urgent trips are often outrageous.


I've started programming today and have this issue with Python. It's pretty dumb but I can't figure out how to do it. When I use the print command, it prints whatever I want and then goes to a different line. For example:   print "this should be"; print "on the same line"   Should return:      this should be on the same line   but instead returns:      this should be   on the same line   More precisely I was trying to create a program with if that told me whether a number was a 2 or not  def test2(x):     if x == 2:         print "Yeah bro, that's tottaly a two"     else:         print "Nope, that is not a two. That is a (x)"   But it doesn't recognise the last (x) as the value entered, and rather prints exactly: "(x)" (the letter with the brackets). To make it work I have to write:  print "Nope, that is not a two. That is a"; print (x)   And if e.g. I enter test2(3) that gives:     Nope, that is not a two, that is a   3   So either i need to make Python recognise my (x) inside a print line as the number; or to print two separate things but on the same line.  Thanks in advance and sorry for such a stupid question.  IMPORTANT NOTE: I am using version 2.5.4  Another note: If i put print "Thing" , print "Thing2" it says "Syntax error" on the 2nd print.

I'd like to do it in Python. What I'd like to do in this example in C: #include <stdio.h>  int main() {     int i;     for (i=0; i<10; i++) printf(".");     return 0; }  Output: ..........  In Python: >>> for i in range(10): print('.') . . . . . . . . . . >>> print('.', '.', '.', '.', '.', '.', '.', '.', '.', '.') . . . . . . . . . .  In Python print will add a \n or space, how can I avoid that? Now, it's just an example, don't tell me I can first build a string then print it. I'd like to know how to "append" strings to stdout.


I have this Json  var data = "{"2144":{"quantity":"350"},"2095":{"quantity":"100"}}"   how can i get each value like this order using jquery?  2144 - quantity:350 2095 - quantity:100

Given a string of JSON data, how can I safely turn that string into a JavaScript object?  Obviously I can do this unsafely with something like:  var obj = eval("(" + json + ')');   but that leaves me vulnerable to the JSON string containing other code, which it seems very dangerous to simply eval.


please, can you put the numbering of my expression to the end of a row after the fraction. I tried 2 different ways, but it is stiil not good enough. These equations are the same, so enough change just one of them.  Thanks in advance  First equation:  \begin{fleqn} \begin{equation} \begin{split} t^{\text{same rode}}_{j} = \frac{-(speed_j - speed_0) \pm \sqrt{\left(speed_j - speed_0\right)^2 \pm 2\cdot\left(accel_j - accel_0\right)\cdot \left(r-d^{\text{between 0 and j}}\right)}}{accel_j - accel_0} \end{split} \end{equation} \end{fleqn}   Second equation:  \begin{fleqn}   \begin{equation} \label{eq1}     \begin{split}       \MoveEqLeft\mathrlap{t^{\text{same rode}}_j =}\\        & = \frac{-(speed_j - speed_0) \pm \sqrt{\left(speed_j - speed_0\right)^2 \pm 2\cdot\left(accel_j - accel_0\right)\cdot \left(r-d^{\text{between 0 and j}}\right)}}{accel_j - accel_0}     \end{split}   \end{equation} \end{fleqn}

Hello, please, can you put the numbering of my expression to the end of a row after the fraction. Thanks in advance  \begin{equation} \label{eq1} \begin{split} t_{j,\text{same rode}} = \ & \frac{\pm\sqrt{2\cdot accel_j \cdot d^{connection}_{j} + speed_j^2} - speed_j}{accel_j} = \\          = &  \frac{\sqrt{2\cdot accel_j \cdot d^{connection}_{j} + speed_j^2} - speed_j}{accel_j} = \\         = &  \frac{\sqrt{2\cdot accel_j \cdot \sqrt{\biggr(y_0 \pm r - (y_j \pm d_j^{\text{while waiting 0}})\biggl)^2} + speed_j^2} - speed_j}{accel_j}  \end{split} \end{equation}


When I try to install git along with its suggested packages, I get errors indicating that git-daemon-run and runit failed to install properly. Looking up the error messages leads me to  .  However, this bug thread does not seem to offer very good solutions or workarounds.  Note that I originally ran into this on Ubuntu 15.10, running under VirtualBox. However, I believe 15.04 and 16.04 LTS are also affected.

I am using 15.04.   So I'm working with git and I installed the standard version. I set up the ssh keys and was able to clone one of my repositories to the correct folder. Everything was working great and then I decided it was a good idea to install more packages. I ran sudo apt-get install git-all. I'm looking at error codes now having to deal with upstart.  start: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: Connection refused No apport report written because the error message indicates its a followup error from a previous failure. dpkg: error processing package runit (--configure):  subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of git-daemon-run:  git-daemon-run depends on runit; however:   Package runit is not configured yet.  dpkg: error processing package git-daemon-run (--configure):  dependency problems - leaving unconfigured Errors were encountered while processing:  runit  git-daemon-run E: Sub-process /usr/bin/dpkg returned an error code (1)   This is what happens when I even update/upgrade my system. At this point all I'm looking to do is be able to install software and update my current software. Is there any way I can potentially reverse this issue or at least correct it?   Edit: Thankfully this issue was solved only a day or two after it happened. The accepted answer worked perfectly and took care of my issue


I am trying to serialize bunch of objects. I have designed a smaller sample code to debug the issue, in which I want to save the color of custom link i.e. CustomLink(Color.Blue)  Below is the main class-  public class Factory {     CustomLink customLink = new CustomLink(Color.Blue); // This color is not getting serialized      static Type[] xMLSerializationTypes = { typeof(CustomLink) };     static void Main(string[] args)     {         Factory factory = new Factory();         XmlSerializer serializer = new XmlSerializer(typeof(Factory), xMLSerializationTypes);         TextWriter textWriter = new StreamWriter(@"D:\test.xml");         serializer.Serialize(textWriter, factory);         textWriter.Close();     }      public CustomLink CustomLink     {         set { customLink = value; }         get { return customLink; }     } }   Following are the remaining classes-  public class CustomLink : Link {     public CustomLink() { }     public CustomLink(Color color)     {         GraphicProperty.Color = color;     } } public class Link {     GraphicProperty graphicProperty = new GraphicProperty();     public GraphicProperty GraphicProperty     {         set { graphicProperty = value; }         get { return graphicProperty; }     } } public class GraphicProperty {     Color color;     public GraphicProperty() { }     public Color Color     {         set { color = value; }         get { return color; }     } }   Below is the ouput, which doesnt contain any color information-  <?xml version="1.0" encoding="utf-8"?> <Factory xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">   <CustomLink>     <GraphicProperty>       <Color />     </GraphicProperty>   </CustomLink> </Factory>

System.Drawing.Color objects apparently won't serialize with XmlSerializer. What is the best way to xml serialize colors?


Can you explain the difference between the till and until using some examples? I am confused in this. When should I use till? And, When should I use until?

Till means upto a certain time limit and until means "till not".   Example 1:     I can not go till I finish my homework.   Example 2:     I can not go until I finish my homework.   I cannot differentiate between these two and both seems to me having correct meaning. But as until is "till not". This "not" should have an effect which I am missing. Please help me clearing the confusion.


Experts,  I am trying to learn more about the CONVERT_IMPLCIT and Probe Residual. Can someone explain to me why the following test script cause  Probe Residual?  My understanding is if both join predicate column are of the same datatype and is defined as "NOT NULL" then it should not cause any Residual  Reference and Test script    CREATE TABLE #BuildBigInt (     col1    BIGINT NOT NULL );  CREATE TABLE #ProbeBigInt (     col1    BIGINT NOT NULL ); GO  DECLARE @I INTEGER = 1;  INSERT #BuildBigInt     (col1)  VALUES      (CONVERT(BIGINT, RAND(1) * 9999999));   WHILE @I < 5000 BEGIN     INSERT #BuildBigInt         (col1)     VALUES        (CONVERT(BIGINT, RAND() * 9999999));     SET @I += 1; END;    INSERT #ProbeBigInt         (col1) VALUES      (CONVERT(BIGINT, RAND(2) * 9999999));   WHILE @I < 5000000 BEGIN     INSERT #ProbeBigInt         (col1)      VALUES          (CONVERT(BIGINT, RAND() * 9999999));      SET @I += 1;  END;   --test query  SELECT     COUNT_BIG(*) FROM #BuildBigInt AS bbi JOIN #ProbeBigInt AS pbi ON     pbi.col1 = bbi.col1 OPTION (MAXDOP 1);

Say, we have a query like this:  select a.*,b.* from  a join b on a.col1=b.col1 and len(a.col1)=10   Assuming the above query uses a Hash Join and has a residual, the probe key will be col1 and the residual will be len(a.col1)=10.  But while going through another example, I could see both the probe and the residual to be the same column. Below is an elaboration on what I am trying to say:  Query:  select * from T1 join T2 on T1.a = T2.a    Execution plan, with probe and residual highlighted:         Test data:    create table T1 (a int, b int, x char(200)) create table T2 (a int, b int, x char(200))  set nocount on declare @i int set @i = 0 while @i < 1000   begin       insert T1 values (@i * 2, @i * 5, @i)     set @i = @i + 1   end  declare @i int set @i = 0 while @i < 10000   begin     insert T2 values (@i * 3, @i * 7, @i)     set @i = @i + 1   end   Question:    How can a probe and a residual be the same column? Why can't SQL Server use the probe column only? Why does it have to use the same column as a residual to filter rows again?  References for test data:


This is a question I had from an exercise session.  Exercise: First we do DES in CBC encryption mode using a key $K_1$ and $IV_1 = O^n$. Then we do DES in ECB decryption mode using $K_1$. And then DES in CBC decryption mode with a secret $IV_2$ and key $K_2$.  My solution:  $IV_1$ = $C''_0$ = $O^n$  and $C'_0$ = $IV_2$  I think encryption would be something like this $C_i$ = $D_{K2}$($D_{K1}$($E_{K1}$($P_i$ $\oplus$ $C''_{i-1}$))) $\oplus$ $C'_{i-1}$ with $C'$ and $C''$ be the intermediate solutions (and $C''$ the first) of each encryption/decryption method.  For decryption I have this P = $D_{K1}$($E_{K1}$($E_{K2}$($C_i$ $\oplus$ $C'_{i-1}$)) $\oplus$ $P_{i-1}$)  The question: Is this construction safe against meet-in-the-middle attack?  Wouldn't the first two operations negate themselves because $C_1$ would decrypt into $P_1$?

This is a question I had from an exercise session.  First we do DES in CBC encryption mode using a key $K_1$ and $IV_1 = O^n$. Then we do DES in ECB decryption mode using $K_1$. And then DES in CBC decryption mode with a secret $IV_2$ and key $K_2$.  Is this construction safe against meet-in-the-middle attack?  Wouldn't the first two operations negate themselves because $C_1$ would decrypt into $P_1$?


package my.examples.javaexam;  import accessTest.*;  public class DiffPackageSubClass extends Test {     public static void main(String[] args) {         Test t1 = new Test();         System.out.println(t1.a);         t1.display();      } }  package accessTest;  public class Test {     public int a = 10;     protected int b = 120;     protected void display(){         System.out.println("Hello");     }     int c = 130;     private int d = 999; }   Hello.  I am trying to figure how Access modifier 'Protected' works.  I've created two packages 'my.examples.javaexam' and 'accessTest'  As far as I know, you can use protected variables or methods if the class is in different package but is a sub class.  So I made DiffPackageSubClass class in different package but made it inherit Test Class in accessTest package.  However, when I try to execute the code it gives me an error saying that the t1.display(); can not be excuted as 'display()' has protected access in 'accessTest.Test'  I am unsure where did I go wrong with the code :(  I've been staring at the code for a while but still couldn't figure out why it gives me an error.  please help me to understand this

In Java, are there clear rules on when to use each of access modifiers, namely the default (package private), public, protected and private, while making class and interface and dealing with inheritance?


There exists function $g:\mathbb{R^2}\rightarrow\mathbb{R}$ defined as follows:$$ \begin{pmatrix} x_{1} \\ x_{2}\end{pmatrix} \rightarrow\ \begin{cases}        x_1x_2*ln(x_1^2 +x_2^2),& \begin{pmatrix} x_{1} \\ x_{2}\end{pmatrix}\neq\begin{pmatrix} {0} \\ 0\end{pmatrix} \\       0, & x_1=x_2=0      \end{cases} $$ I want to check the function for continuity but the main part that I'm worried about is its continuity at zero. I checked to see if I could see some divergence by observing the individual limits of as  $(x_1,0)$ and $(0,x_2)$ as $x_1,x_2$ approach zero but both of them end up with a similar expression namely $x_10*ln(x_1+0)$ and $0x_2*ln(0+x_2)$ but beyond this I'm not sure how to confirm its continuity, I would appreciate help.

$\lim\limits_{(x,y) \to (0,0)}\ {xy\log(x^2+y^2)}$  I tried this:  $$xy\log(x^2+y^2)=xy\log(x^2)+xy\log(1+y^2/x^2)$$  $|xy\log(x^2)|=2|x||y||\log|x||$ (because I use $(x,y)\neq(0,0)$) $\le 2|x||y|||x|-1|$ and taking the limit, $\lim_{(x,y) \to (0,0)}\ {xy\log(x^2)}=0$.  Since the other member has two variables in the argument of $\log$, I don't know how to continue. I know the limit of this function is zero because proceeding with other methods I've seen the limit is zero.


Let $P(n)=7\mid n^7+7n^3-n$ for integers $n\ge 1$. Then $P(1)$ is true because $1+7-1=7$ is multiple of $7$. Assume that $P(n)$ is true and $n\in \mathbb{Z}$ and $n\ge 1$. Then $P(n+1)$ is true because; $n^7+7n^3-n=7m$ for some natural number $m$ So, $$(n+1)^7+7(n+1)^3-(n+1)=...$$ I'm stuck here, and I can't continue the proof. Can you help?

I can see that this works for any integer $n$, but I can't figure out why this works, or why the number $42$ has this property.


I was watching an English teaching video, they said:     How often do you go to the Cinema?   And after a while, they said:     How often do you go to work?   Why they didn't use the definite article the before work?

With proper nouns, we don't use the except for river names, newspaper names, etc.  I want to know why we use the with White House. I mean, under which rule can we categorize it? What could other similar examples for that rule be?


============================================================================  Error executing action run on resource 'execute[drupal-make-drush-install]     ============================================================================  Mixlib::ShellOut::ShellCommandFailed    Expected process to exit with [0], but received '2'    ---- Begin output of composer global require drush/drush:dev-master ----    STDOUT:    STDERR: Changed current directory to /root/.composer    ./composer.json has been created    Loading composer repositories with package information    Updating dependencies (including require-dev)    Your requirements could not be resolved to an installable set of packages.   Problem 1    - Installation request for drush/drush dev-master -> satisfiable by drus   /drush[dev-master].        - drush/drush dev-master requires php >=5.5.0 -> your PHP version (5.4.1 ) does not satisfy that requirement.  Installation failed, deleting ./composer.json.    ---- End output of composer global require drush/drush:dev-master ----    Ran composer global require drush/drush:dev-master returned 2  The available php-cli package version for centos is 5.4.16 so which version of drush should I install?

Drush 6 works great of corse on a Drupal 6 website, but will I have all of the Drush 6 features when working on a Drupal 7 website? Should I use Drush 7 when working on a drupal 7 website?  I found this post that says you can switch between the two version easily, is this correct?  switch to drush6 command: composer global require drush/drush:6.*  switch to drush7 command: composer global require drush/drush:dev-master


Let p be a prime and let $a \in \mathbb Z$. Prove that the congruence $x^x \equiv a\pmod p$ is solvable.


Can I return two values from function one intiger and boolean? I tried to do this in this way but its doesnt work.  int fun(int &x, int &c, bool &m){         if(x*c >20){            return x*c;           m= true;             }else{                 return x+c;                 m= false;                 }   fun(x, c, m);     if(m) cout<<"returned true";     else cout<<"returned false";          }

Is there a preferred way to return multiple values from a C++ function?  For example, imagine a function that divides two integers and returns both the quotient and the remainder.  One way I commonly see is to use reference parameters:  void divide(int dividend, int divisor, int& quotient, int& remainder);   A variation is to return one value and pass the other through a reference parameter:  int divide(int dividend, int divisor, int& remainder);   Another way would be to declare a struct to contain all of the results and return that:  struct divide_result {     int quotient;     int remainder; };  divide_result divide(int dividend, int divisor);   Is one of these ways generally preferred, or are there other suggestions?  Edit: In the real-world code, there may be more than two results.  They may also be of different types.


I can search for  on Stackoverflow, but searching for  doesn't give any results.  Likewise for other tags:

SE is really acting up today, sometimes it doesn't show any questions in the questions tab in the sites.  I first noticed the problems when I opened my questions tab, and this shows up:        All I did was change the name of the question, and now meta stackoverflow thinks it's two questions.  Well the thing is, MSO actually created it as a new question!  Why?


I'm new to C++ and wondering when you should use new and when not, e.g. "int x = 5" or "int * x = new int(5)". I know that new reserves memory in the heap and will thus not be deleted when the block ends, but since the variable the adress is saved in will become unaccessible beyond the block I don't see any benefits.  Example:  if(x) {  int * z = new int(5);  // Do something } // At this point the 5 is saved somewhere but since z is unaccessible I can't use it.   Add: This question is not duplicated since the other questions do only explain what is the heap while benefits of it are not described.

I've been using C++ for a short while, and I've been wondering about the new keyword. Simply, should I be using it, or not?  1) With the new keyword...  MyClass* myClass = new MyClass(); myClass->MyField = "Hello world!";   2) Without the new keyword...  MyClass myClass; myClass.MyField = "Hello world!";   From an implementation perspective, they don't seem that different (but I'm sure they are)... However, my primary language is C#, and of course the 1st method is what I'm used to.  The difficulty seems to be that method 1 is harder to use with the std C++ classes.  Which method should I use?  Update 1:  I recently used the new keyword for heap memory (or free store) for a large array which was going out of scope (i.e. being returned from a function). Where before I was using the stack, which caused half of the elements to be corrupt outside of scope, switching to heap usage ensured that the elements were in tact. Yay!  Update 2:  A friend of mine recently told me there's a simple rule for using the new keyword; every time you type new, type delete.  Foobar *foobar = new Foobar(); delete foobar; // TODO: Move this to the right place.   This helps to prevent memory leaks, as you always have to put the delete somewhere (i.e. when you cut and paste it to either a destructor or otherwise).


Hello I was wonder if it is possible to have a custom folder icon that appears in both the desktop and in nautilus.

Some folders in my Home directory have special icons.    I would like to do something like this with a custom icon for a folder.


My commits look like this:  alex@alex-M52AD-M12AD-A-F-K31AD:~/node/project$ git log commit 050e4417634300e724b8e0c29bb8b7a240a9a996 Author: alexcheninfo <alexchen.info@gmail.com> Date:   Fri Feb 12 12:55:38 2016 +0800      Rename documents  commit 637bd5ac976118d7e0fb3bf5f2bab950ce0ebb66 Author: alexcheninfo <alexchen.info@gmail.com> Date:   Fri Feb 12 11:29:01 2016 +0800      Make sidenav a component   I want to change the commit message of Make sidenav a component. I thought of using git -ammend but I think it can only be used to change the message of the last commit?

I wrote the wrong thing in a commit message.  How can I change the message? The commit has not been pushed yet.


So I recently managed to put a few Pokemon into several gyms the other night, and over the past few days, they have returned. However, some have returned with Pokecoins, and some haven't.   So far the only difference I have managed to figure out is the message that accompanies the Pokemon. The ones that return with Pokecoins say     Arcanine has fought hard and returned.    And the ones that don't say     Kingler was knocked out of the Gym.   What is the difference?

The new gym update , including a limit of 50 coins earned per day. How does this limit work? Is each pokemon limited to accruing 50 coins per day? Are all my pokemon limited to a collective 50 per day? My teammates keep feeding my Dragonite and she has been at the gym for almost a week; will she return with 50 coins for each day she was there? Fewer than 50 for the days I had other pokemon in the gym? Or will she accumulate vast sums of coins over the week, but only deliver me 50 (or fewer) when she comes back based on what I have collected from returning pokemon that day?


I know that similar questions have been posted on this site before, but I truly think this case is different so hear me out.  I have some simple Python code that creates a 2D list of characters (i.e. strings of length 1), tries to process the 2D list, and print it out. Here it is:  def printGrid(image):     for row in range(len(image)):         for col in range(len(image[row])):             print(image[row][col], end='')         print()     print()   def invert(image):     for row in range(len(image)):         for col in range(len(image[row])):             if image[row][col] == '.':                 image[row][col] = 'X'             else:                 image[row][col] = '.'   grid = [['.'] * 10] * 10    # 2D square of '.' printGrid(grid) invert(grid) printGrid(grid)   I was expecting the code to print out 1 square of .s and another of Xs, like this:  .......... .......... .......... .......... .......... .......... .......... .......... .......... ..........  XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX XXXXXXXXXX   but instead I got 2 squares of .s, like this:  .......... .......... .......... .......... .......... .......... .......... .......... .......... ..........  .......... .......... .......... .......... .......... .......... .......... .......... .......... ..........   After trying to debug for a while, I found that if I commented out the else block in the invert function, then I get the expected output (you can try running the code for yourself to see). This led me to conclude that both the if block AND the else block are executed. Does anyone know why this may be happening? (I'm using Python 3.6.1 btw)  P.S. I discovered that this bug apparently only appears for certain grid sizes. For example, if the size of grid is 5, 7 or 9, then the output is as expected. But if it's something like 6, 8 or 10, then the output is not as expected (apparently the bug only occurs for even-numbers of size?).

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


I am not sure why but when I get a string from the user, I cannot compare it in an if statement but when I try to print it, it works fine.  Part of my code:           Scanner in = new Scanner(System.in);          while (true) {              String userInput;              int rowInput, colInput;              printBoard(board);              System.out.print("Move: ");               userInput = in.next();               // shift board right on a row              if (userInput == "r") {                  System.out.print("row #: \r");                  rowInput = in.nextInt();                  moveRight(--rowInput, board);              }   Does anyone know why this isn't working as expected?

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


A girl I've never met before sent me a message through Instagram asking if Id like to make 20 grand. Naturally I said "who wouldn't?". She then laid it out for me. She said she manages access accounts at Fidelity investment.  And that all I have to do is give her my mobile banking login info and she will transfer 3 grand into my account from a non-profit investment I then transfer back her cut and the next day another 4 grand. She said I don't need any money on the account. Is this a scam?!

I was on Instagram and saw someone's post about making extra cash.  I inboxed her for details and she said her manager will deposit funds into my account, then I would send them $2000 to split between the both of them.  She stated that I would need to overnight my bankcard to her so her manager can process the deposit.  She didn't ask for anything (neither SSN nor routing or account number) but the bank card only.  I assume that it is a scam.  Can anyone elaborate on this type of scam?  She claim it's not a scam.


I would like to discuss the minimum input of hash function to consider strong (e.g Shack128 (SHA-3)). I have a mechanism based on SHA-3, but the input is just 40-bit, some friends told me 40-bit input consider too weak? please, anyone can help me to know what is the minimum input and what kind of attack I need to consider regarding of the input  (e.g. brute force attack, and what else).   Thanks

To estimate the time for brute-force attack we need to compute keyspace size divided by hash rate, where the hash rate (hash/second) varies depending on the computer's capabilities.  The website  shows the hash rate for different computers.  Can you explain the following two confusing phenomena?   The hash rate decreases as the message size increases. Core i3 has a higher hash rate than Core i7 for SHAKE128.


The obvious way is to just copy and paste. However, the HTML has stylesheets like  .auto-style9 {     background-image: url('http://domainname.com/backgroundTall.png');     background-repeat:no-repeat; }   That is a background image of one of the table. If I see the HTML in Firefox I can see the background image.  If I copy it to Gmail or Outlook, the background is gone.  So how can I do it? Actually, how can I send HTML email in general? How do corporations do that?

Is there any way to add HTML markup signature in Gmail settings? I mean, insert some HTML markup without using rich editor, just inserting HTML?


I don't understand why my reputation decreased from 256 to 241.  I even checked on  but it is not showing what I believe to be the correct result.  What might be the problem?

When I visit the reputation tab of my profile, I see a lot of stuff. I can make out some of it, but not all.   What do all the event types mean? Why do some events show an odd reputation gain or not show any reputation change at all? Why are some events sometimes highlighted in yellow? My reputation suddenly dropped, but I don't see anything. What happened? Why do some events disappear from my reputation history?


I had a problem with Steam a while ago and had to re-install it. When I re-installed I somehow set it to install on my desktop and it cluttered my desktop with all of the files. I moved all of files into one folder and started up Steam, and on starting up it created all of the files again on my desktop after I had just moved them into one folder. I know the default install is C:\Program Files\Steam but mine is set to my desktop, so is there anyway that I can change it back to there without having to re-install?

I use (and have it much bigger) drive D: to store all my user data and games, but I have installed the Steam client on drive C:. When I was installing a first game (Warhammer 40000), I've chosen to place my library folder on drive D: and the game went there.  But now as I've got installed the second game (Portal), I can see that it was put on drive C: despite to the choice I've done previously. When I open Steam - Settings - Downloads + Cloud - Steam library folders, I can see both installation places in the list. Can I merge them into one?  I would even agree to use the default drive C: library (as I've replaced it with a symlink already). When I press to remove one library it says it can only remove empty ones.


I have two tables with the following layout  username | displayname            username| FirstName | surname  ---------|------------            -----------------------------  foo        test                    foo    | andrew    | blah  fa         display      What I'm trying to do is display all of the displayname entries in the left hand table on my page. However, if there is a match on the username in the right hand table, I want the value test to be replaced by andrew. Example out:  username | displayname      ---------|------------        foo        andrew                      fa         display   Everything is a string. Below is my attempt at what I need but I've messed it up as its applying the firstname value to every entry in my first table. _users = UserService.GetAll().ToList(); _updates = UserUpdateService.GetAll().ToList();  foreach (var user in _users) {     foreach (var update in _updates)         if (user.FirstName != "" && user.UserName == update.UserName)         {             update.DisplayName = user.FirstName;         }         else         {             update.DisplayName = user.UserName;         } }  Is there a way to do this with a single LINQ query?

Is there a way to do the following using LINQ?  foreach (var c in collection) {     c.PropertyToSet = value; }   To clarify, I want to iterate through each object in a collection and then update a property on each object.  My use case is I have a bunch of comments on a blog post, and I want to iterate through each comment on a blog post and set the datetime on the blog post to be +10 hours. I could do it in SQL, but I want to keep it in the business layer.


At my new workplace trying to setup C++. Couldn't get VS Code to work so we just installed the Visual Studio 2015 License we had and I'm running into some basic issues I've never had, the main one being that even when I "Start without debugging" the console window still just immediately closes and does not prompt a "Press any key.." message I'm used to seeing. I started off on Visual Studio 2017.  This is a minor issue, but I'm also used to having a basic .cpp file set up every time I start a new project and this does not happen, have to add a .cpp to the source files and type out int main().   The only solution I've found to keep the console up is to wrap everything up in a do-while loop but I'd prefer not to have to create one for every piece of code I write.  #include <iostream> #include <string>  using namespace std;  string tellme; int main() {         cout << "enter some text" << endl;         cin >> tellme;         cout << "Here's the text: " << tellme << endl;         return 0; }   No Error messages.

I'm starting out in Visual C++ and I'd like to know how to keep the console window.  For instance this would be a typical "hello world" application:   int _tmain(int argc, _TCHAR* argv[]) {     cout << "Hello World";     return 0; }   What's the line I'm missing?


I accidentally clicked something and now my website on Islam Stack Exchange looks like the PC version when I use a phone.    I want it like the image above but instead it is like the image below.

At the moment I am using damn slow dialup internet and desperately need a link to switch to mobile site for faster browsing.  There should be a link to switch to mobile site also in desktop web browser.


I am confused why only SOP(sum of product) are used in PLA and PAL and not POS(product of sum)

In my book about circuit design (Fundamentals of Digital Logic with VHDL from Stephen Brown and Zvonko Vranesic), the writers always prefer a sum-of-product for representing and implementing simple circuits.  In Boolean Algebra, this preference is used as well, but I think mostly because writing sum-of-products is just easier and shorter. And maybe easier to understand for readers.  But when implementing using logic gates I would suppose other considerations than these are made as well. Like costs and delays of the gates.  So, is there a specific reason why preferably sum-of-products implementations are made? F.e. are AND-gates cheaper than OR-gates? I read about the transistor realisation of these gates, but I can't recall such a statement.


Having seen various people test powerful emulators on their computers, I have come to surprise hearing about how one CPU can have triple the clock speed but still have worse single-threaded performance; or how one CPU can use 16 threads but one forced to use a single-thread can wipe the floor using 1 thread and tons of rapid context switching, even assuming a multi-threaded app.  Some of the best Intel CPUs can be as underclocked as much as possible and still run very demanding programs perfectly, and some of those Atom CPUs can be overclocked as much as possible and still not run them without chopping/lags, etc. Here's what I've noticed:  A 1.5 GHz Intel i7 5960x can run latest Photoshop and Adobe After Effects, including PS2/GameCube/Wii emulators and games fullspeed; an overclocked Celeron 450 @ 3.3 GHz can barely do the same, and it's technically more than twice as high in clock speed.  Also, a 4 GHz Atom N270 seems to perform worse than a 1 GHz i7 5960x. Why is this?  With these really new and expensive Intel CPUs, clock speed seems to mean very little, as they can be 1.9 GHz and run everything, whereas some 3/4/5+ GHz CPUs of yesteryears can't even.  So fast that even forced to use a single core while another CPU uses multi-core, they can do better.

Why, for example, would a 2.66 GHz dual-core Core i5 be faster than a 2.66 GHz Core 2 Duo, which is also dual-core?  Is this because of newer instructions that can process information in fewer clock cycles? What other architectural changes are involved?     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this question. Feel free to edit the answers to add additional details.


When I search for the term 'ActivityNotFoundException' on SharePoint StackExchange I get no results: .  If I search for 'Microsoft.Workflow.Client.ActivityNotFoundException' I will get 3 results: .  This issue has already been discussed on .  So, to summarize, some users will post "Exception has occurred" while other users will post "System.Exception has occurred". So in order to properly search through SE you always need to search for both variants.

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


Here is an example of where class and static methods have the same behavior. class MyClass:     data = 'stuff'      @classmethod     classModifyData(cls, newData):         cls.data = newData      @staticmethod     staticModifyData(newData);         MyClass.data = newData  And here is the behavior ... myClassInstance = MyClass() print(MyClass.data) #stuff  print(myClassInstance.data) # stuff  MyClass.classModifyData('class method modified stuff') print(MyClass.data) # class method modified stuff  print(myClassInstance.data) # class method modified stuff  MyClass.staticModifyData('static method modified stuff') print(MyClass.data) # static method modified stuff  print(myClassInstance.data) # static method modified stuff  I'm assuming there are more complex usages of @classmethod where you couldn't use @staticmethod but I haven't found one. Any clarity on this would be helpful. Thanks.

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


I am using Jgit api. I am able to create files in git remote location using the cloneRepository method.    Similarly I can add files using the addCommand. The requirement now is to create folders or update an existing folder with files in local and to push, commit the same to remote repository - .  I tried modifying the same code that we use for creating a file, but it is not working.    How can I achieve this? Code used for adding a file:   File file = new File(Trial.localPath + "\\" + fileName); file.createNewFile(); UsernamePasswordCredentialsProvider upc = new UsernamePasswordCredentialsProvider(                     userName, password); git = Git.cloneRepository().setURI(remotePath).setDirectory(puppetDirFile).setCredentialsProvider(upc).call(); git.add().addFilepattern(fileName).call();   git.commit().setMessage("Added "+ fileName).call();  PushCommand pc = git.push(); pc.setCredentialsProvider(upc).setForce(true).setPushAll(); pc.call(); git.getRepository().close();   modified for adding folder :   File file = new File(Trial.localPath+"\\ProjectA");         if (!file.exists()) {             if (file.mkdir()) {                 System.out.println("Directory is created!");             }         } git.add().addFilepattern("projectA").call();     git.commit().setMessage("Added "+ "ProjectA").call();   then rest pushed as the same above code.

How can I add an empty directory (that contains no files) to a Git repository?


I am trying to center only a table in a slide where there is a table and a forest flowchart. I have made a similar question  but don't know why is not working on this slide. Below I provide an image of this problem and then a minimal working example.    Here is a MWE:  \documentclass[aspectratio=169, hyperref={pdfpagelabels=false}]{beamer} %\documentclass[handout, hyperref={pdfpagelabels=false}]{beamer} \usetheme{Madrid}  \let\Tiny=\tiny \usepackage{multimedia} \usepackage{marvosym} %\usepackage[backend=bibtex,style=authoryear]{biblatex} \usecolortheme{whale}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage{amssymb,amsmath,amsthm} \usepackage[spanish,es-tabla]{babel} \usefonttheme{professionalfonts}   \usenavigationsymbolstemplate{}  \setbeamertemplate{footline}[frame number] \setbeamertemplate{frametitle}[default][center] \setbeamersize{text margin left=2em,text margin right=2em}  \addtolength{\columnsep}{2cm}  \usepackage{ragged2e} \usepackage{forest} \usepackage{float} %\setbeamercovered{transparent} \usepackage[flushleft]{threeparttable} \floatstyle{plaintop} \usepackage{url} \usepackage{booktabs} \begin{document} \begin{frame}[shrink=15]{Resultados - Método de solvatación} \begin{itemize} \item Here some text... \end{itemize}  \vspace{0cm}\mbox{}\hfill\scalebox{0.50}{ \begin{forest}   for tree={     rounded corners, draw, align=center, top color=white, bottom color=blue!30,     edge+=->,     l sep'+=10pt,   },     [Solvatación      [Explícito+Implícito        [SS/COSMO, bottom color=green!30]%want this block green        [Packmol/COSMO, bottom color=gray!30]      ] %     [Implícito %       [COSMO] %     ]    ]  \end{forest} }\hspace{-4cm} \vspace{-0.5cm}\centering{ \begin{threeparttable} \caption{Convergence RM1 - DHAP} \begin{tabular}{ccccc}\toprule nºconf & $\Delta G^\circ_{\text{f(SS)}}$ & $\Delta G^\circ_{\text{f(Packmol)}}$ & $\sigma_{\text{SS}}$ & $\sigma_{\text{Packmol}}$ \\  \midrule 5 & -1756.3 & -1758.4 & 1.2 & 3.8 \\   10 & -1754.6 & -1760.8 & 2.9 & 1.3 \\   15 & -1755.7 & -1761.3 & 1.9 & 0.9 \\   20 & -1757.2 & -1761.6 & 0.3 & 0.5 \\   30 & -1757.2 & -1764.2 & 0.3 & -2.0 \\   50 & -1757.5 & -1762.1 & - & - \\  \textbf{MAE} &  &  & 1.3 & 1.7 \\ \bottomrule \end{tabular} \begin{tablenotes} \footnotesize \item {Here some text as a note..} \end{tablenotes} \end{threeparttable}} \centerline{ And short a conclusion like this...} \end{frame} \end{document}   Would you help me please?

The following forest flowchart was made (spanish language):    I want to localize the above flowchart on a small part of beamer's slide:    I know maybe \hspace{} and \vspace{} could help, but also something like "resize" is needed. And I don't know how to do it.  Below I copy a MWE with the necessary code:  \documentclass[12pt,twoside]{beamer} \usepackage[spanish,es-noquoting]{babel} \usepackage[utf8]{inputenc}  \usepackage[T1]{fontenc}  \usepackage{multimedia} \usepackage{forest} \usepackage{float} \usepackage{booktabs} %\setbeamercovered{transparent} \usepackage[flushleft]{threeparttable} \setbeamertemplate{frametitle}[default][center] \setbeamersize{text margin left=2em,text margin right=2em} \begin{document}  \begin{frame}[shrink=25]{Resultados - glioxal} \medbreak \centerline{Una vez establecido el estado de protonación se estimó $\Delta G^\circ_{\text{r}}$.} \vspace{-0.5cm}\centering{ \begin{threeparttable} \caption{Reacción problema}\label{table:reaccion_central} \begin{tabular}{lcc} \toprule              \multicolumn{1}{c}{Compuesto}  & \multicolumn{2}{c}{RM1}                      \\ \midrule                                      & $\Delta G^\circ_{\text{COSMO}}$ & $\Delta G^\circ_{\text{SS-COSMO}}$ \\ \cmidrule(lr){2-3} CC$_{\text{ref}}$                  &      -                   &    -                         \\  cis dihidro-dihidroxi                & 20.6                     & 15.9                        \\  trans dihidro-dihidroxi              & 20.6                      & 15.1                         \\  &  &  \\  H$_{\text{ref}}$                   &    -                      &    -                        \\  glioxal-1ºhidratación                & -1.5                    & -4.0                       \\  glioxal-2ºhidratación                & -1.4                     & -2.9                       \\  glioxal-neta                        & -2.9                     & -6.9                         \\ \bottomrule \end{tabular} \begin{tablenotes} \item {\scriptsize $\text{H}_{\text{ref}}$: 2PG = PEP + H2O y $\text{CC}_{\text{ref}}$:2,3-diMMA = propanoato + pir. Se reemplazó dihidro-dihidroxi- imidazol por dihidro-dihidroxi.}%Resultados con hamiltoniano RM1, aplicando la estrategia isodésmica. Las Referencias son:   \end{tablenotes} \end{threeparttable} }\medbreak  \begin{forest}   for tree={     rounded corners, draw, align=center, top color=white, bottom color=blue!20,     edge+=->,     l sep'+=10pt,   },     [This      [is the forest        [chart I want ]%want this block green if is possible.. :)        [but it is not]      ]      [working        [help!]      ]    ]  \end{forest} \end{frame} \end{document}   Any help?


I was in her housing complex yesterday.  I was at her housing complex yesterday.  I was at college when you called.  I was in college when you called.   In both cases, I'm talking about physically being present there. So, which preposition should I use in both cases?

I am really confused.  Which preposition is correct?     She is in/at the park.   They are in/at the park.   I am in/at the park.   Should I use in or at in these sentences?


So what I think is the way to solve this question is to first count the total number of ways of putting all the balls into boxes such that the restriction isn't satisfied (i.e. the total number of ways of putting the balls into the boxes). Then using the inclusion-exclusion principle for situations where the boxes are empty. I think the number of total ways that you can distribute them would be $4^5$ but I'm unsure how to do the second part of the question.

It is quite easy to calculate the total number of functions from a set $X$ with $m$ elements to a set $Y$ with $n$ elements ($n^{m}$), and also the total number of injective functions ($n^{\underline{m}}$, denoting the falling factorial). But I am thinking about how to calculate the total number of surjective functions $f\colon X \twoheadrightarrow Y $.  The way I thought of doing this is as follows: firstly, since all $n$ elements of the codomain $Y$ need to be mapped to, you choose any $n$ elements from the $m$ elements of the set $X$ to be mapped one-to-one with the $n$ elements of $Y$. This results in $n!$ possible pairings. But the number of ways of choosing $n$ elements from $m$ elements is $\frac{m!}{(m-n)!\,n!}$, so the total number of ways of matching $n$ elements in $X$ to be one-to-one with the $n$ elements of $Y$ is $\frac{m!}{(m-n)!\,n!} \times n! = \frac{m!}{(m-n)!}$.  Now we have 'covered' the codomain $Y$ with $n$ elements from $X$, the remaining unpaired $m-n$ elements from $X$ can be mapped to any of the elements of $Y$, so there are $n^{m-n}$ ways of doing this. Therefore I think that the total number of surjective functions should be $\frac{m!}{(m-n)!} \, n^{m-n}$.  Is this anything like correct or have I made a major mistake here?


My education app does not app me to take screenshot when I play video on it. So can you please tell me , there is any to take out the screenshot.

Some apps don't allow screenshots so how can I still take a screenshot?  It is my phone and I should be able to do whatever I want with it so why is there even a feature to disallow screenshots?  Android 5.0.1


If electrons have no substructure and are considered point particles (according to the Standard Model), then how can they also have intrinsic spin?  It would seem that the fact that they exhibit spin would indicate some further complexity to their structure, even if it may not be readily determined.

I'm currently reading Alonso and Finn's Electromagnetism book.  It explains that the spin contributes to the magnetic moment and is somewhat comparable to a rotation of the particle around its own axis. It says that the spin of a particle is caused by a certain internal structure, which makes sense in the aforementioned analogy.  Right underneath the paragraph with the explanation of spin, it says "The electron has no known internal structure", but since it does have a spin, does that mean that we know the electron has an internal structure but we just don't know what it is?


I'm making a program that counts the number of vowels in a phrase that was assigned by my teacher. To do this I have made a for-loop that in theory should check each character for being a, then e, the i, and so on before moving on to the next character. For some reason though nothing in the for-loop works. The build output states that everything is fine, but the for-statements aren't functioning properly. I know that t actually is the correct letter because I printed what t was but the for loop still won't work. What confuses me is the build output is fine, so it must be a logic error, but I can't find where it is. Here is the code:  for (i = 0; i != phrase.length(); i++) {     String t = phrase.substring(i, i + 1);      if (t == "a") {         count++;         System.out.println(count);     }     if (t == "e") {         count++;     }     if (t == "i") {         count++;     }     if (t == "o") {         count++;     }     if (t == "u") {         count++;     } }  System.out.println(count);   Many thanks to anyone who can help me!

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I'm about to send my laptop (Lenovo U31-70, Lubuntu 16.04) away to be repaired, they could wipe it clean and install Windows 10 on it. I want to backup my entire machine (single physical HDD, LVM), and restore it after the laptop would return. How would you recommend that I to do that?    In the few last days, the F11 and the down key have stopped functioning well. The laptop is still under warranty. I spoke with Lenovo support, and apparently it is possibly due to corrosion of faulty soldering and the representative advised me to send it back for a keyboard replacement.  Originally the OS was Windows 10, I gparted, wiped it clean and installed Lubuntu 16.04. When the laptop returns from being repaired, I think it will be wiped clean and have Windows 10 again.  Ideally, I would take out the HDD and give them the laptop to repair, but the guy said that it isn't possible and would void my warranty.  How would you recommend me to backup my entire system such that once the laptop comes back, I can, with minimal effort, just restore everything to the last state?

I'm too spoiled by Windows utilities that take a digital snapshot of your entire drive, which you can then restore from in the event of a drive crash.  (e.g. like Time Machine for Mac OS X).  Is there a similar way of doing this in Linux?


I saw this pattern today and it confused me a lot:  abstract class A {     // does something      static class B extends A {         // does something as well     } }   Two weird things I found about it:   Static class can be initialised using new A.B(). Static class is not unique in the application (therefore, not really static), as each initialisation creates a new object.   I am still perturbed as to why to use such a pattern? And does static class in this context mean, that you can access it's constructors statically, without needing to create an instance of A, but not really it being a unique in any way in the app?  EDIT:  OK, so I think my understanding of static classes came from C#. I am clear on the staticness of java classes now. But when would you use such a pattern (where inner static class is extending outer abstract one) and why?

What is the main difference between an inner class and a static nested class in Java? Does design / implementation play a role in choosing one of these?


Why do I get different results when printing out z as shown in the following code snippet?  It seems that the compiler cuts in the second "print" all positions after '2'... Thank you for help!   double z = 1.0; z = z + 0.1; z = z + 0.1; System.out.print("z := "+z); System.out.print(" # z:= "+((0.1+0.1)+(1.0)));   Output:  z := 1.2000000000000002 # z:= 1.2

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


Ignoring security reasons, is it possible to do? And how to do it?

Inspired by this ....  I am the sole person using my system with 12.04. Every time I issue a sudo command; the system asks for the user password (which is good in its own way).  However I was thinking; without activating the root account; how can I execute the sudo commands which will not ask for user password to authenticate.  NOTE: I want to execute sudo command without authenticating via password; only when they are executed via terminal. I don't want to remove this extra layer of security from other functions such a while using 'Ubuntu software center' or executing a bash script by drag-drop something.sh file to the terminal.


Let say I got the following :  DECLARE @ExcludedList VARCHAR(MAX)  SET @ExcludedList = 3 + ', ' + 4 + ' ,' + '22'  SELECT * FROM A WHERE Id NOT IN (@ExcludedList)   Error : Conversion failed when converting the varchar value ', ' to data type int.   I understand why the error is there but I don't know how to solve it...

How do I parameterize a query containing an IN clause with a variable number of arguments, like this one?  SELECT * FROM Tags  WHERE Name IN ('ruby','rails','scruffy','rubyonrails') ORDER BY Count DESC   In this query, the number of arguments could be anywhere from 1 to 5.  I would prefer not to use a dedicated stored procedure for this (or XML), but if there is some elegant way specific to , I am open to that.


$S$ is a finite set and $f:S\rightarrow S$ is surjective. Show $f$ is injective.  Proof) Suppose $f$ is not injective. Then $\exists s_1\neq s_2$ with $f(s_1)=f(s_2)$. Then since $S$ is finite, $|f(S)|\leq |S|-1$.($|\cdot|$ denotes the number of elements of a set.) Also, since $f$ is surjective, $f(S)=S$, so $|f(S)|=|S|$. Then $|S|\leq|S|-1$, a contradiction.  I was wondering if this is a correct argument.

Let S be a finite set.Let F be a surjective function from S to S.  How do I prove that it is injective?


I'm new to Blender and I've been trying to get the wireframe shading to work since 2 days and been having this issue shown in the image below:  Whenever I try to go into wireframe shading mode it makes the object transparent. Things I have tried:  Uninstalling and reinstalling Blender. Loading factory settings. Turning on wireframe in overlay drop-down. Selecting wireframe in viewport display under object properties.  Any help regarding this issue is appreciated.

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


In recent days, while I was doing exercises on combinatorics, I thought if a number $m!$ could be a perfect square. I proved to demonstrate it through the prime factorization. My attempt: $$k=m!=p_1^{a_1}\cdot p_2^{a_2}\cdot p_3^{a_3}....\cdot p_n^{a_n}$$ with $a_1,a_2,..,a_n$ that have to be even. Now if there exists a prime number $p_j$ between $\frac {k}{2}<p_j<k$ this prime number in the prime factorization the exponent ($a_j$) relative to the prime number $p_j$ is equal to $1$ ($a_j=1$) because the number $k$ isn't a multiple of $p_j$; for example $12!$ isn't a perfect square because the prime numbers $7$ and $11$ $6<7,11<12$ aren't divisors of $12$.   My question  There exist a prime number $p_j$ between $k$ and $\frac {k}{2}$ and how can I prove if there exist or not exist a number $m!=n^2$?

If $n\geq2$, then $n!$ is not a perfect square. The proof of this follows easily from Chebyshev's theorem, which states that for any positive integer $n$ there exists a prime strictly between $n$ and $2n-2$. A proof can be found .  Two weeks and four days ago, one of my classmates told me that it's possible to prove that $n!$ is never a perfect square for $n\geq2$ without using Chebyshev's theorem. I've been trying since that day to prove it in that manner, but the closest I've gotten is, through the use of the prime number theorem, showing that there exists a natural number $N$ such that if $n\geq N$, $n!$ is not a perfect square. This isn't very close at all. I've tried numerous strategies over the past weeks and am now trying to use the Sylow theorems on $S_n$ to somehow show that $|S_n|$ can't be square (I haven't made any progress).  Was my classmate messing with me, or is there really a way to prove this result without Chebyshev's Theorem? If it is possible, can someone point me in the right direction for a proof?  Thanks!


any advise how do I secure my GET code below to prevent SQL Injection or any hacking activities? http://localhost/hobby.php?hobby=soccer <?php  include "connect.php";   $hobby = (isset($_GET['hobby'])) ? $_GET['hobby'] : ''; $hobby = str_replace("'", "''", $hobby);  $hobby = strip_tags($hobby); $hobby = trim ($hobby);  if ($hobby != '') {          $sql = "SELECT Name, Hobby from myself where Hobby like '%$hobby%'";      $stmt = sqlsrv_query( $conn, $sql );          $result = array();     $row_check = sqlsrv_has_rows( $stmt );       if ($row_check == true) {         while ($row = sqlsrv_fetch_array( $stmt, SQLSRV_FETCH_ASSOC)) {             $result['Response'][] = array(         'Name' => $row['Name'],         'Hobby' => $row['Hobby']             );         }     }      sqlsrv_free_stmt( $stmt);     sqlsrv_close( $conn); ?>

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


I added a row to a document with a cat heredocument  cat <<-'DEFINE' >> ./wp-config.php define( 'DISALLOW_FILE_EDIT', true ); DEFINE   I later wanted to remove it and did:  sed -i "s/define( 'DISALLOW_FILE_EDIT', true );//g" ./wp-config.php   After removing it, I noticed an extra empty line where the code was - This is indeed the natural thing to happen - sed just deleted the code, not the whole row.  My question is, can I use sed to actually remove the whole row, and not just the code inside it?

I have a file with a list of emails in it and each line has an email in it. I want to remove lines that contain the string example.com or test.com.  I tried this:   sed -i 's/example\.com//ig' file.txt    But it will remove only the string example.com, how can I remove the entire line?


I wish to de-noise my render using the compositor but I found half-way that I have no environment or emission layer selected. As rendering takes time, I wish to render only that two in order to be able to combine the passes again later on after I adjusted the noise of my indirect passes.  Question is, how to render only some given passes without rendering the combined pass?   EDIT  Or does it work if I just remove the tick from the combined option?

I'm experimenting with the values for the mist in my scene (Cycles), however each time I want to test the new values I can't find a way to only render the mist pass. This results in the whole scene being rendered again which takes a lot of time and makes experimenting with the values a real drag.  So the question is, can I render only the mist pass and then use it with the original render in the compositor?


I am currently on Ubuntu 14.04 (new to Ubuntu, migrated recently).  'apt-get install' works fine, and my connection is working fine as well. But when I run apt-get update, this is what happens  100% [InRelease gpgv 3,627 B] [Connecting to security.ubuntu.com   (91.189.91.13)Splitting up /var/lib/apt/lists/partial /in.archive.ubuntu.com_ubuntu_dists_trustyIgn  http://in.archive.ubuntu.com trusty InRelease                                E: GPG error: http://in.archive.ubuntu.com trusty InRelease:  Clearsigned file isn't valid, got 'NODATA'  (does the network require authentication?)   An exhaustive search online did not result in any clear solution. What I have tried till now:  wget https://dl.dropbox.com/u/8850924/fixpackage chmod +x ./fixpackage sudo./fixpackage   For the lazy, this is what fixpackage contains:  sudo cp -arf /var/lib/dpkg /var/lib/dpkg.backup sudo cp /var/lib/dpkg/status-old /var/lib/dpkg/status sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available sudo rm -rf /var/lib/dpkg/updates/* sudo rm -rf /var/lib/apt/lists sudo mkdir /var/lib/apt/lists sudo mkdir /var/lib/apt/lists/partial sudo apt-get clean sudo apt-get update sudo dpkg --clear-avail sudo dpkg --configure -a sudo apt-get install -f sudo apt-get update sudo apt-get dist-upgrade   Output:  100% [InRelease gpgv 3,627 B] [Waiting for headers]Splitting up /var/lib /apt/lists/partial/security.ubuntu.com_ubuntu_dists_trusty- security_InRelease into data Ign http://security.ubuntu.com trusty- security InRelease  E: GPG error: http://security.ubuntu.com trusty-security InRelease:  Clearsigned file isn't valid, got 'NODATA' (does the network require  authentication?)  Setting up google-chrome-stable (43.0.2357.124-1) ... Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. 100% [InRelease gpgv 3,627 B]Splitting up /var/lib/apt/lists/partial /in.archive.Ign http://in.archive.ubuntu.com trusty InReleasea and  signature failed E: GPG error: http://in.archive.ubuntu.com trusty InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require  authentication?) Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   I have also tried this solution  sudo apt-get clean sudo mv /var/lib/apt/lists /var/lib/apt/lists.broke sudo mkdir -p /var/lib/apt/lists/partial sudo apt-get update   Both the solutions didn't work for me.  Let me know if any more details are required.

I can use my mobile broadband to access Internet with Firefox but when I want to install any package from terminal or make 'apt-get update' command I got the following error:  got 'NODATA' (does the network require authentication?)   apt-get update output:  Get:1 extras.ubuntu.com trusty InRelease [213 B] 98% [1 InRelease gpgv 213 B] [Connecting to archive.ubuntu.com] Splitting up /var/lib/apt/lists/partial/extras.ubuntu.com_ubuntu_dists_trusty_InRelease into data Ign extras.ubuntu.com trusty InRelease E: GPG error: extras.ubuntu.com trusty InRelease: Clearsigned file isn't valid, got 'NODATA' (does the network require authentication?)    output of `cat /var/lib/apt/lists/partial/extras.ubuntu.com_ubuntu_dists_trusty_InRelease  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>404</title> <meta http-equiv="Cache-Control" content="no-cache"/> </head> <body> <p> Not Found </p> </body> </html>   output of wget:  wget -O - http://extras.ubuntu.com/ubuntu/dists/trusty/InRelease  --2014-06-01 09:23:35--  http://extras.ubuntu.com/ubuntu/dists/trusty/InRelease Resolving extras.ubuntu.com (extras.ubuntu.com)... 91.189.92.152 Connecting to extras.ubuntu.com (extras.ubuntu.com)|91.189.92.152|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 213 [text/html] Saving to: ‘STDOUT’   0% [                                       ] 0           --.-K/s              <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>404</title> <meta http-equiv="Cache-Control" content="no-cache"/> </head> <body> <p> Not Found  </p> </body> </html>


I wrote an answer that I then deleted upon review that the answer was subjective and may not be technically accurate.  I would like to undelete that answer to make it unsubjective and technically valid, but now I cannot find it.  How can I locate the question containing a comment I wrote and deleted?  EDIT: I meant to refer to answer instead of comment.

I would really like to see all of my questions and answers on the profile page, even if some of them were deleted, and I don't have enough rep to see them on the site. (Note that some questions are  after 30 days or 1 year, and the author might be oblivious about what happened.)   , the "deleted recent [questions/answers]" links in one's own user profile now list all respective posts that were deleted in the past 60 days, rather than just those that were originally posted in the last 60 days. , users with the "access to moderator tools" privilege (10k+ on designed sites, 2k+ on beta and non-designed sites) can use the search operator deleted:1 to see all their own deleted posts. , deleted questions and answers that were posted in the past 60 days, can be seen using the "deleted recent questions" and "deleted recent answers" links on the questions and answers tabs (at the bottom of the tab) in your user profile. For older posts: as of 2013-04-23 you can  if you already have a link to them, but they still aren't linked from the user profiles (not even just for you). Nor do you see inbox notifications for comments on them if you come back a few hours later. You have to have thought to bookmark your question, or you have to go digging for it in your browser history.


Let ${X_1},...,{X_n}$ be a random sample from uniform distribution   $U\left[ {0,\theta } \right]$. Find the MLE of $\theta $.   I wrote the likelihood function of this distribution, that being a uniform one has $f\left( x \right) = {1 \over {b - a}} = {1 \over \theta }$ as $$l\left( \theta  \right) = \prod\limits_{i = 1}^n {{1 \over \theta }} $$  which has an equivalent loglikelihood function  $$\log \left( l \right) = \sum\limits_{i = 1}^n {\left[ {\log \left( {{\theta ^{ - 1}}} \right)} \right]}  =  - n\log \left( \theta  \right)$$  Now if I want to find the MLE, I'll set its first derivative to zero: $$\eqalign{   & {\partial  \over {\partial \theta }}\left( { - n\log \theta } \right) = 0  \cr    & {{ - n} \over \theta } = 0 \cr} $$  And that's where things stopped making sense for me, for I can't solve for $\theta $ like I normally can (for other distributions). Checking a bunch of different threads in this community, apparently writing $\theta  = {X_{(n)}}$, that is, the highest observation from the sample, is enough as an answer.   However, I can't stop thinking about the fact that no ${X_{(n)}}$ on the planet would make the first derivative be equal to zero, so how can that be a valid estimator?

There is a classic problem:  Suppose that $X_1,\ldots,X_n$ form an i.i.d. sample from a uniform distribution on the interval $(0,\theta)$, where $\theta>0$ is unknown. I would like to find the MLE of $\theta$.  The pdf of each observation will have the form: $$ f(x\mid\theta) =  \begin{cases} 1/\theta\quad&\text{for }\, 0\leq x\leq \theta\\ 0 &\text{otherwise}. \end{cases} $$ The likelihood function therefore has the form: $$ L(\theta) = \begin{cases} 1/\theta^n \quad&\text{for }\; 0\leq x_i \leq \theta\;\; \text{for all }i,\\ 0 &\text{otherwise}. \end{cases} $$ The general solution is usually that the MLE of theta must be a value of $\theta$ for which $\theta \geq x_i$ and which maximizes $1/\theta^n$ among all such values.   The reasoning is that since $1/\theta^n$ is a decreasing function of $\theta$, the estimate will be the smallest possible value of $\theta$ such that $\theta\geq x_i$.  Therefore, the mle of $\theta$, $\hat{\theta}$, is $\max(X_1,\ldots,X_n)$.  Here, I do not understand why we cannot just differentiate the likelihood function with respect to theta and then set it equal to $0$?  Thanks!


I wanted to compile  on my ubuntu machine, but while compiling, I did not have right libpng version, so the compilation aborted with error: error: invalid use of incomplete typedef ‘png_struct’ {aka ‘struct png_struct_def’}   179 |     *width = (int)png_ptr->width;  So I install the ritgh pnglib version: $ wget https://downloads.sourceforge.net/project/libpng/libpng16/older-releases/1.2.21/libpng-1.2.21.tar.gz -O libpng.tar.gz $ tar -xvf libpng.tar.gz $ cd libpng-1.2.21 $ sudo bash configure --prefix=/usr/local/libpng $ sudo make install  which contain the definition for struct png_struct. But now the library is in /usr/local/libpng. So the compilation of the mosaic do not see it (and thus do not have the struct definition and aborts). the library dir is: $/usr/local/libpng$ tree . . ├── bin │   ├── libpng12-config │   └── libpng-config -> libpng12-config ├── include │   ├── libpng12 │   │   ├── pngconf.h │   │   └── png.h │   ├── pngconf.h -> libpng12/pngconf.h │   └── png.h -> libpng12/png.h ├── lib │   ├── libpng12.a │   ├── libpng12.la │   ├── libpng12.so -> libpng12.so.0.59.0 │   ├── libpng12.so.0 -> libpng12.so.0.59.0 │   ├── libpng12.so.0.59.0 │   ├── libpng.a -> libpng12.a │   ├── libpng.la -> libpng12.la │   ├── libpng.so -> libpng12.so │   ├── libpng.so.3 -> libpng.so.3.59.0 │   ├── libpng.so.3.59.0 │   └── pkgconfig │       ├── libpng12.pc │       └── libpng.pc -> libpng12.pc └── share     └── man         ├── man3         │   ├── libpng.3         │   └── libpngpf.3         └── man5             └── png.5  9 directories, 21 files  The question is simple, what directory (e.g. include or lib) should I move elsewhere (e.g. /src/include) in order to make to compilation of mosaic successful (by getting the proper definition it needs)?

For  I need to install libpng12-0 package on the Ubuntu 19.10 system.  I know that it is available .  So I have decided to download this package manually and install it by hand.  On previous Ubuntu versions (such as 18.04 LTS) this trick ends with success, but here on 19.10 it fails in very strange way:   wget http://mirrors.kernel.org/ubuntu/pool/main/libp/libpng/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb sudo apt-get install ./libpng12-0_1.2.54-1ubuntu1.1_amd64.deb  0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0 B/116 kB of archives. After this operation, 285 kB of additional disk space will be used. Get:1 /home/user/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb libpng12-0 amd64 1.2.54-1ubuntu1.1 [116 kB] Selecting previously unselected package libpng12-0:amd64. (Reading database ... 212864 files and directories currently installed.) Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1.1_amd64.deb ... Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1.1) ...  dpkg: error processing archive /home/user/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb (--unpack):  unable to install new version of '/lib/x86_64-linux-gnu/libpng12.so.0': No such file or directory No apport report written because the error message indicates an issue on the local system                                                                                Errors were encountered while processing:  /home/user/libpng12-0_1.2.54-1ubuntu1.1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   What is wrong here? How can I get libpng12-0 installed on Ubuntu 19.10 system?    Note: the same happens on 19.04, but it is near EOL.


I want to add information to each column of a histogram. every node near coord is probably the best approach. It works well with bar plots but not with the histogram:  \documentclass{article}  \usepackage{pgfplots} \pgfplotsset{compat=newest} \usetikzlibrary{pgfplots.statistics}  \begin{document}  \begin{tikzpicture} \begin{axis}[ ybar interval, xticklabel=\pgfmathprintnumber\tick--\pgfmathprintnumber\nexttick, % Code to generate labels nodes near coords={ \pgfmathprintnumber{\pgfkeysvalueof{/data point/y}} }, every node near coord/.style={ anchor=south,xshift=9mm, }, % ] \addplot+[hist={bins=3}] table[row sep=\\,y index=0] { data\\ 1\\ 2\\ 1\\ 5\\ 4\\ 10\\ 7\\ 10\\ 9\\ 8\\ 9\\ 9\\ }; \end{axis} \end{tikzpicture}  \end{document}   I used every node near coord/.style to shift the labels.  The problem is that I have four labels for three columns/bars:    I addition I would like to center the labels. A workaround will be a manual adjustment (every node near coord/.style) just like in the shown example.  Update  Maybe clipping is a possibility. Is there a way to clip the labels (in this case the 7 in the right) away?  Like this:


I have a problem that I'm not able to fix. I'm getting black borders, some king of margin. The display doesn't use the full space in the monitor. I have a total of four monitors in my house and three TVs. I only get this problem with one monitor.  Note that I don't have this problem with my Mac Mini with the exact same monitor... only with my Macbook Air. I tried to plug the monitor with TB->DVI and with TB->HDMI. Same problem. I tried to switch cable. Same problem. I have a DIAMOND USB 2.0 DVI ADAPTER, and when I use it, I don't get any black border.  I have no "overscan" setting in the System Preferences.  My monitor is a I-INC iH282. There is no settings in the menu to adjust overscan or something like that.  Any idea why it does that? I spent my two last evening trying to find a solution on Google.  Thanks in advance!

I have been using a 24" monitor with my macbook pro early 2011 connected via a mini display port to DVI adaptor.  I recently received an HP Z30i 30" monitor.  When I connect to it with an mini display port to display port adaptor, although it displays at the monitors native 2560x1600 resolution, the mac is scaling the desktop display down so as to leave a 1cm or so black border around the desktop.  The mac reports using a resolution of 2560x1600 and the display reports this also.   This makes the display blurry as single pixels become sub pixels.   The display looks like the same effect as having "under scan" turned on when using an HDMI cable at 1080p.  I thought that maybe there was a hardware or display problem, but when I boot off a previous system partition from a different hard-drive using the same OS (10.8.5) release, the monitor set up works perfectly.  This proves the OS release, display and the hardware, so I'm thinking that there must be a preferences problem with my current setup.  Perhaps the under scan setting is somehow being applied to this display when it's not using HDMI?  I've tried deleting /Library/Preferences/com.apple.windowserver.plist, ~/Library/Preferences/ByHost/com.apple.windowserver.HostNumber.plist and rebooting but no results.   The scaling is applied before the login screen and logging in as a different user has the same problem.  Any ideas?  It's driving me nuts, I've got this nice 30" screen and I can't use it!


I have a Windows 10 machine that doesn't have Internet access. So I downloaded the .NET 3.5 Framework from here:   I copied the installer to the Windows 10 machine, and attempted to install. I get the following dialog, which appears to be telling me I need .NET Framework 3.5 to install .NET Framework 3.5:    What else do I need to install this? The installer I have is 330MB, so I assume it's the full package and not the web installer.

When I try to install .net 3.5 I get the follwing message:     The following feature couldn't be installed:      .NET Framework 3.5   (includes .NET 2.0 and 3.0)      Error code: 0x800F081F   I tried with a standalone package and through Windows Features.  Update: Internet connection is fine.


Consider you are given n different dice. Each dice can have up to m sides with [1;m] eyes on the side.  What is the probability for a given set of different dice and an integer x, that the sum of all eyes after throwing each dice once is greater than or equal to x.  Example:  x = 6  2 dice, two D6.  P(X >= x) = 0.5  I assume there is no closed form formula to compute this?

Assume the dice are numbered from $1$ to $k$. My hunch is that this will form a normal distribution with a median at $n\cdot\frac{k}{2}$. However, I have no idea as to    turn this fact into an answer (I have a minimal knowledge of stats, but I know that I am missing the standard distribution) and this is probably the wrong approach   How can I approach and solve this problem? (Aside, this is not for a class, stats or other, so any and all approaches welcome).  *Edit: * I want to find the number of ways that the sum of the numbers that are rolled has a particular value, if $n$ dice are rolled, and each has $k$ sides, numbered $1$ to $k$.


I know that   in Java threads as it allows us to extend some other class if it is required. But if this is the case, does extends Thread also have its own advantages over implements Runnable and if so, what are these advantages?

From what time I've spent with threads in Java, I've found these two ways to write threads:  With implements Runnable:  public class MyRunnable implements Runnable {     public void run() {         //Code     } } //Started with a "new Thread(new MyRunnable()).start()" call   Or, with extends Thread:  public class MyThread extends Thread {     public MyThread() {         super("MyThread");     }     public void run() {         //Code     } } //Started with a "new MyThread().start()" call   Is there any significant difference in these two blocks of code ?


Running a .jar file in a command line works fine, but i am not able to run any .jar file by double clicking on my Windows 7 (64). It seems nothing happens after the double click  I set the path JRE path in my regedit HKEY_CLASSES_ROOT with JRE path but still its not running.  Any Solutions for this?

I have a JAR file named helloworld.jar. In order to run it, I'm executing the following command in a command-line window:  java -jar helloworld.jar   This works fine, but how do I execute it with double-click instead? Do I need to install any software?


I installed GIMP to make a Christmas card and now everytime I try to open LibreOffice, GIMP opens instead. I can right clip on the file and use the "choose program" to select LibreOffice, but this is a major nuisance. I just want LO to open my document files and spreadsheets, not GIMP.  I don't need GIMP anymore, and so want to unistall it. I have googled for guidance, but it keeps referring to the Software Center, which I cannot find in my Ubunutu 18.04, so  Where is the Software Center?, and   How do I best remove GIMP? (with or without the Software Center)  Please be aware that I am a beginner at Ubuntu (converted from Windows)  Thanks  Edit: Apology. I have Ubuntu-Mate 18.04. Does that explain why I cannot find the Software Center?

Seeing there are various ways to install on Ubuntu. What are the various ways to uninstall items?  Which ways always work? How can I be sure something was uninstalled?


Given the recurrence relation for the Fibonacci numbers, $F_{n+1}=F_{n}+F_{n-1}$ with $F_0=1$ and $F_1=1$ it's obvious that $F_n$ is a positive integer for all $n$. Suppose instead we were given $$F_n=\frac{1}{\sqrt{5}} \left(\frac{1+\sqrt{5}}{2}\right)^n-\frac{1}{\sqrt{5}} \left(\frac{1-\sqrt{5}}{2}\right)^n$$ Without spotting that $F_{n+1}=F_{n}+F_{n-1}$, how might one show that $F_n$ is an integer for all $n$?

How to prove that formula for Fibonacci numbers are always integers, for all $n$:  $$ F_n = \frac{\varphi^n - \psi^n}{\sqrt{5}} $$ where, $\varphi = \frac{1 + \sqrt{5}}{2}$ and $\psi = \frac{1 - \sqrt{5}}{2}$.  I know how to prove that $F_n$ is rational, but what about integer?


I'm using zarchiver as a file managing app on my rooted phone... I cant delete some specific app folders in /system/app              even though I remounted it as rewritable.... in rewritable it will show delete option but when you choose it it wont actually delete it.... context: I want to delete some APK folder of some bloat wares like google or You tube app

I'm working on Samsung Galaxy On7, Android 6.0.1-Marshmallow.  My internal memory is 8 GB, due to which I have disabled several inbuilt apps which I do not need at all.  The problem is that, these disabled apps are still taking up space, even though they are disabled and replaced by their factory versions.  Is there any way I can completely free up the space the Google apps are using up (like Facebook and its Manager, which are taking up almost no space):  (Click the image to enlarge it)     Please note that I do not want to root my phone. I had previously rooted my other phone with kingo root, but could never unroot it.


I'm learning c via a guide book and i am enjoying it. However, there is one question that i am stuck.  The question is:   "Write a program that when writing number "x" and number "y", the program shows how much % of x is in y."  "The answer should be 64 % when x = 54 and y = 84"  Obviously, 54 / 84 = 0.64...  * 100, which is about 64 %. However, when I run my program it shows 84.689699. I tested without the "*100" but nothing. It shows 0.84689699...  Is my program wrong or is it a problem of the compiler or something? I am a beginner and it would be very helpful if someone tells me what is wrong.  PS: I use atom.io and gcc-compiler   #include <stdio.h>  int main(void) {   double vx;   double vy;    printf("Enter the 1st number : "); scanf("%f" , &vx);   printf("Enter the 2nd number : "); scanf("%f" , &vy);    printf("\a\n\nx is %f of y" , vx / vy * 100);   return 0; }

Why is it that scanf() needs the l in "%lf" when reading a double, when printf() can use "%f" regardless of whether its argument is a double or a float?  Example code:  double d; scanf("%lf", &d); printf("%f", d);


Doing my first backup and restore of someone else's sql server database. I have already done a successful backup and restore of one of the databases, but the other two are locked behind Transparent Data Encryption.   Is there a simple way of finding the certificates' files and just copy/pasting them to the new server's filepath and then restore? What's the proper direction for restoration from backup here?  If I do:  select * FROM [master].[sys].[certificates]   I get a bunch of rows that have ## before them. Are these significant? There's only one cert from that output that doesnt have ## and I'm not sure if that applied to a db that I'm not interested in...

There seems to be a lot of information on backing up and restoring TDE databases, but it's generally all the same information, and there seems to be some contradiction about certain points.  I have some specific questions I hope someone can answer.   Do I have to backup the Database Master Key and restore it?  Or is it enough to recreate it with the same password?   Similarly to #1, do I need to backup and restore the Service Master Key? If I've backed up the TDE encryption certificate and cert key, can I restore it to a different database that has a different DMK (and SMK) without losing data? If #3 is yes, then what is the purpose of backing up the DMK and SMK if you can just generate new ones when restoring the Cert?