Please have patience and if you answer please explain like you would explain a moron. I have 2 routers ,router 1 is ppoe and conected with a nuc server and ddns from noip .Router 2 is conected to router 1 with DHCP.and a raspberry pi webserver also another dns from noip . When I connect wirelessly to router 1 or 2 I can access http://my address.com from raspberry webserver (router 2) without any problems ( when I connect over the web like  4 g ) connection is refused . Raspberry pi also have a ddns from noip. DMZ is activated for Nuc server on router 1. If I stop DMZ on router 1 I can't access anymore Nuc webserver which is conected to router 1. Now, my question is , why I can't access raspberry webserver over the internet? I would like also to take this opportunity to thank you very much for your help.

Please have patience and if you answer please explain like you would explain a moron. This is my setup. I have 2 routers:  Router 1 is  and connected with a  and  from .  Router 2 is connected to Router 1 with  and a  webserver, as well as another DNS from NoIP.   When I connect wirelessly to Router 1 or 2, I can access http://my address.com from Raspberry Pi webserver (Router 2) without any problems. But when I connect over the web (like 4G), the connection is refused. The Raspberry Pi also has a Dynamic DNS from NoIP.  is activated for NUC server on Router 1. If I stop DMZ on Router 1, I can no longer access the NUC webserver, which is connected to Router 1. Now, my question is, why I can't access my Raspberry Pi webserver over the internet? I would also like to take this opportunity to thank you very much for your help.


I'm trying to create a text field in the UI that will allow users to enter a directory path, then press a button to export an fbx file to that path.    The Button creation into the UI works great.  But I can't find information on setting up the text field for users to enter information. I took a try at it, but my setup isn't working for the String text input, only the button works.  What am I doing wrong?  (Page has been update to reflect comments below changes)      import bpy   class WorthGroupToolsSettings(bpy.types.PropertyGroup):     file_path: bpy.types.StringProperty(name="File path",                                  description="Test",                                  default="",                                  maxlen=1024,                                  subtype="FILE_PATH")   class WorthGroup_Panel(bpy.types.Panel):     bl_idname = "WorthGroupTools_PT_Panel"     bl_label = "WorthGroup Tools Panel"     bl_category = "WorthGroup Tools Addon"     bl_space_type = "VIEW_3D"     bl_region_type = "UI"      def draw(self, context):         layout = self.layout         row = layout.row()          worth_group_tools = context.scene.worth_group_tools         row.prop(worth_group_tools, "file_path")          # This creates the button.  Works great!         row.operator('view3d.export_fbx', text="Export Selected")   I modified my page, it should work but I get the following error message from this code:  class WorthGroupToolsSettings(bpy.types.PropertyGroup): file_path: bpy.types.StringProperty(name="File path",                              description="Test",                              default="",                              maxlen=1024,                              subtype="FILE_PATH")   The error message is:  File "C:\Users\WG\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\Blender\WorthGroupTools_panel.py", line 4, in <module> class WorthGroupToolsSettings(bpy.types.PropertyGroup):   File "C:\Users\WG\AppData\Roaming\Blender Foundation\Blender\2.80\scripts\addons\Blender\WorthGroupTools_panel.py", line 9, in WorthGroupToolsSettings     subtype="FILE_PATH") TypeError: bpy_struct.__new__(type): expected a single argument   I also want to note I also have a __init__.py page and a operator page.  This is what the __init__.py page appears as:      import bpy  from . WorthGroupTools_op import WorthGroupTools_Operator from . WorthGroupTools_panel import WorthGroup_PT_Panel from . WorthGroupTools_panel import WorthGroupToolsSettings  bl_info = {     "name": "WorthGroup Tools",     "author": "",     "description": "",     "blender": (2, 80, 0),     "version": (0, 0, 1),     "location": "View3D",     "warning": "",     "category": "Generic" }   classes = (WorthGroupTools_Operator, WorthGroupToolsSettings, WorthGroup_Panel)  # register, unregister = bpy.utils.register_classes_factory(classes)   def register():     for cls in classes:         bpy.utils.register_class(cls)     bpy.types.Scene.worth_group_tools = bpy.props.PointerProperty(type=WorthGroupToolsSettings)   def unregister():     for cls in classes:         bpy.utils.unregister_class(cls)     del bpy.types.Scene.worth_group_tools   if __name__ == "__main__":     register()

So I need to allow the user of my script to choose a directory that contains images, and then run my script on each image. I already have my script made . I looked at  already, but that is about exporting, not importing.  It should look like this:    And should allow the user to choose the directory.  Thanks!


In C# I have a method  public string GetString<T>() where T : class   In the calling function I have only the name of the class which I want to pass to GetString()<T>. E.g. "MyClass". How can I convert "MyClass" to class? I tried it using Types but I couldn't find a conversion.  EDIT: The real example is from a database access class. The client asks for information for a specific hardware component. This component is specified by a string. Based on this string I want to access a table with a known name pattern. Not hard coding table names allows us to add/remove tables from the database without the need to change the C# code.  The function which returns the needed information exists already and needs a class as generic type.  E.g.  string tblName = "HW_" + hwComponentFromClient; string retValue = GetString<GetClassByString(tblName)>();   I need something like a method:  class GetClassByString(string);

What's the best way to call a generic method when the type parameter isn't known at compile time, but instead is obtained dynamically at runtime?  Consider the following sample code - inside the Example() method, what's the most concise way to invoke GenericMethod<T>() using the Type stored in the myType variable?  public class Sample {     public void Example(string typeName)     {         Type myType = FindType(typeName);          // What goes here to call GenericMethod<T>()?         GenericMethod<myType>(); // This doesn't work          // What changes to call StaticMethod<T>()?         Sample.StaticMethod<myType>(); // This also doesn't work     }      public void GenericMethod<T>()     {         // ...     }      public static void StaticMethod<T>()     {         //...     } }


I am having an issue of verifying that the data from a csv file has been stored by a 2D array. When I try to display the array in my main, I get a Null Pointer Exception.  I have tried various youtube videos and looking on stackoverflow.   My add to 2D array code:    public static void addTo2DArray(String[] tmpArray, int minCapacity) {     int row = 0;     int columns = 0;      if ((minCapacity > row)) {         row = (row * 3) / 2 + 1;         String[][] newArray = new String[row][columns];         for (int i = 0; i < crime2DArray.length; i++) {             for (int j = 0; j < crime2DArray[i].length; j++) {                 newArray[i][j] = crime2DArray[i][j];             }         }         crime2DArray = newArray;     }     crime2DArray[minCapacity - 1] = tmpArray;  }   Also my main code to display     public class TestUSCrime {  public static void main(String[] args) {      for (int row = 0; row < crime2DArray.length; row++) {        for ( int column = 0 ; column <crime2DArray[row].length; column++) {            System.out.print(crime2DArray[row][column] + " ");        }          System.out.println();     } }   }  I am expecting to display the csv file in a 2D array but the output I am getting is the Null Pointer Exception that takes me back to line 15 of my main.   Line 15 is:     for (int row = 0; row < crime2DArray.length; row++) {

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I am an Indian Citizen, studying in Hong Kong and hence have a Student Visa in Hong Kong.  My Parents are in Dubai UAE and have a resident visa of UAE, and are planning a trip to Europe. My plan is to go to Dubai on a Tourist Visa and from there all of us travel together. Can i apply for the schengen visa when i am in Dubai on a tourist visa?

I'm a citizen of country A who would like to apply for a Schengen visa at a consulate in country B. When is this possible?


I'm making a scene with the Death Star and a TIE fighter flies by it. But the TIE fighter won't render. What do I do?

Why is the selected object displaying in the 3D view, but not rendering?  In object mode, it shows up:   However, it does not show up in render mode:   Why is this so and what causes it to hide in render mode?


I need help implementing the answer to  by inserting the following into wherever it goes:  ? [= Sender WindowServer] [= Level Warning] [A= Message _CGXGLDisplayContextForDisplayDevice] claim only   I'm not a coder but I can get to Terminal and past in code and press enter.  That's the extent of my ability.  So, if there's something to do before putting this statement in Terminal I would need to know what, where, and how, etc.  Thank you.

I'm getting vast amounts of these messages in my Console:  13/03/2015 16:02:20.924 WindowServer[250]: _CGXGLDisplayContextForDisplayDevice: No matching context for device (0x7fcfcaf18220) - disabling OpenGL   and WindowServer is consistently at around 16%. I'm using DisplayLink. Is there anything I can do about it?


I was wondering how one changes the fonts for desktop icons in Ubuntu 18.04. I have the Macbuntu-O theme running as well.   Do I modify the theme's gnome-shell.css file or the gtk.css file? I have studied the gnome-shell.css file but haven't found something that catches my eye yet. But, in the gtk.css file I found this:  .nautilus-desktop.nautilus-canvas-item, .nemo-desktop.nemo-canvas-item, .caja-desktop {   color: white;   text-shadow: 1px 1px rgba(0, 0, 0, 0.6); }   .nautilus-desktop.nautilus-canvas-item:active, .nemo-desktop.nemo-canvas-item:active, .caja-desktop:active {     color: #252525; }   .nautilus-desktop.nautilus-canvas-item:selected, .nemo-desktop.nemo-canvas-item:selected, .caja-desktop:selected {     color: #ffffff;     text-shadow: none; }   Could I modify the code by placing a line such as "font-weight: bold;" below color for example?  I noticed the fonts change when you apply the relevant shell-theme (e.g. Macbuntu-O) in the Tweaks tool. That makes me think it is somehow linked to the gnome-shell.css file as well, or am I missing something?

How can I increase the icon text size in Ubuntu 18.04? I have tried using gnome-tweaks but I was only able to change font size of window titles and interface items.  Here is a screen shot of three icons from my desktop and I want to change the font size of the text below each icon.


What is the explanation for this unexpected results in Python??!;  from math import * >>>log(1000,10) ## expecting 3.0 2.9999999999999996 >>>1000**(1/3) ## expecting 10.0 9.999999999999998

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


The logical error is that the php doesn't display the desired output for pronunciation. eg. the desired output is \ə-ˈchēv\ but this one \?-?ch?v\ is displayed in the browser.   while($row=mysql_fetch_array($result))     {         $out .= "English word: " .$row['word_en'] . "
";         $out .= "Pronunciation: " .$row['pronunciation'] . "
";         $out .= "Grammar: " .$row['grammar'] . "
";         $out .= "Definition: ".'
'. $row['definition'] . "
";          //iconv("UTF-8", "ISO-8859-1//TRANSLIT", $out), PHP_EOL; //displays error          echo $out;     }

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


I just went above 15 reputation and went to see the upvotes I gave on a couple of topics, and none of them were there, although the message popup says that my votes are remembered and will show up when my reputation rises above 15. So I gave the upvotes again and now they work as expected.  So either it is a bug, or the message should be changed so the voting is forbidden.

Users below 15 reputation can't effectively vote. It says:     Votes cast by those with less than 15 reputation are recorded, but do not change the publicly displayed post score   Does it mean that they will take effect after I reach 15 reputation or because they were cast before, they're recorded but ignored?


I normally work with ubuntu 18.04.2 LTS. I would like to know  if someone has already istalled ubuntu  in a thinkpad 490s . To know if there is any problem with drivers or any other compatibility issues

I have a device on which I would like to install Ubuntu. How do I find out if Ubuntu will work on it?


i saw some videos on youtube, that you're able to replace soldered GPU (very risky though)  i have a macbookpro5,5 and thinking to replace gpu with something new (probably another OEM mobile GPU that i'll get on ebay)  is that possible?

Some laptops have integrated video, while others have dedicated graphics.  Still others have dual graphics that change on demand.  Most laptops have the video components built into the design of the motherboard, but some have a separate video card that can be removed.  How can I identify if a laptop has a card that can be removed?


I am setting up a server (Debian) in Virtualbox, I am customizing the prompt, but I have a problem. When I write in the prompt customization, it is malformed.    This happens when I write in the prompt, this overwrites the prompt or when I do enter or the key (arrow up/arrow down). Why?  My configuration is the follow:  PS1='\033[1;37m\H($(hostname -I | grep -E -o "192.168.[0-9]{1,3}\.[0-9]{1,3}")) [\033[1;31m\u\033[1;37m] <\@> \033[1;34m\w\033[1;37m >> '       Why does it happen? How to can I can solve it?

When I try to colorize the bash prompt like this:  export PS1="\e[0;31m[\u@\h \W]\$ \e[m "   it breaks the carriage return (instead of going to a new line when line is full, it starts in the same line and erases the input text).  If I remove the color sequence it works fine. I use Ubuntu 11.10 and terminal (guake has the same bug too).


How to round a number in a big way in Java? I have to get an answer z = 5.  int x=82; int y=20; int z; z= x/y.

I'm thinking in particular of how to display pagination controls, when using a language such as C# or Java.  If I have x items which I want to display in chunks of y per page, how many pages will be needed?


tl;dr One of my apps stores its data in some weird place that isn't covered by Google backup. And thus it was not restored after the latest system recovery. I've lost all my data for that single app. I want to know the location of those files, to back them up manually and avoid similar situations in the future. Can I check this on an unrooted phone?  My phone . I have recovered my data (on a new device) from Google backup. It turned out that I have recovered everything (system, settings, photos, messages, apps, and app data) for all but one application. Happened for just this particular single app out of fifty in my case, so must be a developer's fault or wrong design decision to store data in some weird place. Want to avoid this in the future and backup data for this particular app manually. But I need to know, where exactly this app is storing its data. Can I learn this on an unrooted phone? Do I have some tools for this? If yes, then how to proceed with this?

Could you list all possible directories where Android apps may store data, providing description what kind of data are stored in each directory?


I need to find the floor nth root of a given number(x). x can be as large as 1e12 and n can be as large as 50. floor(pow(64,1.0/3)) returns 3, please help me with this problem, if not can you please suggest an alternative taking the keeping in mind? Edit: I know its about floating point precision, I am asking what the alternative should be in such situations. Even the following code returns True  double x = pow(64,1.0/3); return x==(int)x;


Given  $n \in \mathbb{Z}$  Is $y^3 + ny + 1$  is  reducible  over $\mathbb{Z}$  for infinitely many $n $?  Yes/NO  My attempt  :  I thinks yes  Every  odd degree  polynomial has atleast one roots   Is its  true ?

For what values of $n$, where $n$ is an integer, the polynomial $x^3+nx+1$ is reducible over $\Bbb Z$. My attempt:  When $n= 0,-2 $, the given polynomial is reducible over $\Bbb Z$ as $x=-1$ and $x=1$ are zeros of the polynomial. But I couldn't find whether there exists any integer $n$ for which the polynomial $x^3+nx+1$ is reducible over $\Bbb Z$. How can we proceed from here? Is the polynomial irreducible over $\Bbb Z$ if $n$ is not in $\{0,-2\}$?


Whilst reading  I found this really nice explanation by Benjamin Peterson. However, I was wondering does there always exist a prime $p$ such that $p\equiv 1$ modulo $n$ for each $n$? I feel like this must follow from some famous result that I do not remember. Thank you so much in advance!

Q: Is every element of $\mathbb Z/p\mathbb Z$ represented by a prime number? More generally, let $m, n \in \mathbb Z$ be coprime. Is there a prime number congruent to $m$ modulo $n$?   the affirmative answer is given by .     A: Yes, in fact there are infinitely many such primes.   I don't want to prove Dirichlet's theorem. Is it obvious that there always exists at least one such prime?


I have a python script that calculates a variety of numbers for me in a loop. For example, in every loop it calculates: Time: Number of events: Number of errors:  I have created a .txt file to keep track of lifelong statistics. I want the script to add to the text file every time it completes a loop. For example, let's say when I first start the script, the text file looks like: Time: 60 Number of events: 10 Number of errors: 5  Now I run the script and in one loop it calculates 30 time, 3 events, and 1 error. I want it to update the text file so that it reads: Time: 90 Number of events: 13 Number of errors: 6  Is this possible?

I'm using Python, and would like to insert a string into a text file without deleting or copying the file. How can I do that?


I was reviewing flags and I found  flagged as not an answer. I disagree with the flag, so I marked the post as having invalid flags.  The outcome is     disputed - a moderator reviewed your flag, but found no evidence to support it   If my understanding is correct, the following things happened   a user flagged the answer (flag 1) I marked it as having invalid flags (flag 2) a moderator reviewed it, and rejected flag 1 this has the effect of marking both flags as disputed   Clearly my flag was helpful, whereas the first one was not.  Now, I know this kind of situation is a   , but I always thought the "monolithic" rejection/acceptance of flags would only cause some discrepancies and I can put up with that (even though it's really confusing).  However it looks like this is not a chance, rather a certainty: whenever I flag a post as having invalid flags and a moderator reviews the flag, it is impossible for my contribution to be marked as helpful.  Is my claim true? If yes, I find it an awful design choice, as it's basically discouraging people from reporting invalid flags.

In my flagging summary under the statistics, there is 1 flag listed as "disputed".  This is the first time I've ever seen a disputed flag in my summary, so I'm just curious, what is a disputed flag? How would you even dispute a flag? Is this the same as voting a flag as invalid?


My project uses logistic regression and I needed to calculate pseudo r squared to understand the explanatory power of each model.  I have been using the formula below to calculate what I thought was equivalent to pseudo R squared by comparing a null model using just the intercept to the full specified model to be measured.  mod1 <- glm(yn~hinctnta+hincfel+uemp5yr+stfeco+gincdif, data=euro,family = "binomial") summary(mod1)  nullmod1 <- glm(yn~1, data=euro, family="binomial") 1-logLik(mod1)/logLik(nullmod1)   I noticed that some of the results were higher than expected. Therefore I sought out additional ways to calculate R2 and used the following function which calculates Hosmer and Lemeshows R squared as well as Nagelkerke and Cox and Snell. Testing 5 different models showed very different (lower) results than those showed by my first attempt using the simple null model.  My question therefore is what is the theoretical difference between the two approaches and is there any validity in just using the first simpler approach to report pseudo r squared?  Function to calculate R squared:  logisticPseudoR2s <- function(LogModel) { dev <- LogModel$deviance nullDev <- LogModel$null.deviance modelN <- length(LogModel$fitted.values) R.l <- 1 - dev / nullDev R.cs <- 1 - exp ( -(nullDev - dev)/ modelN) R.n <- R.cs / ( 1 - (exp (-(nullDev / modelN)))) cat("Pseudo R^2 for logistic regression\n") cat("Hosmer and lemeshow R^2", round(R.l, 3), "\n") cat("Cox and Snell R^2", round(R.cs, 3), "\n") cat("Nagelkerke R^2", round(R.n, 3), "\n") }  logisticPseudoR2s(mod)

I have SPSS output for a logistic regression model. The output reports two measures for the model fit, Cox & Snell and Nagelkerke.  So as a rule of thumb, which of these $R^²$ measures would you report as the model fit?  Or, which of these fit indices is the one that is usually reported in journals?    Some Background: The regression tries to predict the presence or absence of a bird (capercaillie) from some environmental variables (e.g., steepness, vegetation cover, ...). Unfortunately, the bird did not appear very often (35 hits to 468 misses) so the regression performs rather poorly. Cox & Snell is .09, Nagelkerke, .23.    The subject is environmental sciences or ecology.


What is $E|X-Y|$ when $X$, $Y$ are i.i.d and uniform on $[0,1]$?   I want to do something like   $$ E(|X-Y|)=\iint_{x>y}(x-y)\;dxdy+\iint_{y>x}(y-x)\;dxdy=2\iint_{x>y} (x-y)\;dxdy $$  But am not sure how to solve that last double integral or if this setup is right.

Let $X,Y$ be independent $Uniform(0,1)$ random variables. Find $E(|X-Y|^a)$ where $a>0$.  My working:  Define $W=1$ if $X>Y$ and $W=0$ if $X<Y$. We seek $E(|X-Y|^a)=E[E(|X-Y|^a|W)]=E(|X-Y|^a|W=1)P(W=1)+E(|X-Y|^a|W=0)P(W=0)=E((X-Y)^a)P(X>Y)+E((Y-X)^a)P(X<Y)$. Now $P(X<Y)=\dfrac{1}{2}$ and $P(X>Y)=\dfrac{1}{2}$ by symmetry. $E((X-Y)^a)=\int_{0}^{1}\int_{0}^{x}(x-y)^af_{X,Y}(x,y)dydx=\int_{0}^{1}\int_{0}^{x}(x-y)^adydx=\dfrac{1}{(a+1)(a+2)}$. Similarly $E((Y-X)^a)=\dfrac{1}{(a+1)(a+2)}$ by symmetry when $Y>X$. Required expectation=$\dfrac{1}{(a+1)(a+2)}\dfrac{1}{2}+\dfrac{1}{(a+1)(a+2)}\dfrac{1}{2}=\dfrac{1}{(a+1)(a+2)}$  But correct answer is $\dfrac{2}{(a+1)(a+2)}$. Where am I going wrong?


Given is a polynomial $f \in \mathbb Z [X]$, such that $2\nmid f(0)$ and $2\nmid f(1)$. Show:  (I) $f$ has no roots in $\mathbb Z$.  (II) If the leading coefficient of $f$ is odd, $f$ has no roots in $\mathbb Q$.  My idea:  $f=a_nX^n+a_{n-1}X^{n-1}+...+a_1X+a_0 \in \mathbb Z[X]$. I know that the constant term $a_0$ exists, because of $2 \nmid f(0)$.  (I) $2\nmid f(0)$ leads to $2 \nmid a_0$, which means, that $a_0$ is odd. $2\nmid f(1)$ leads to $a_n+...+a_0$ is odd. Now I can conclude, that $a_n+...+a_1$ is even, so $2 \mid a_n+...+a_1$. But now I don't know how to go on.   I thought about assuming, that f has at least one root, i.e. $z$. Than $f$ factors into $f(X)=g(X)\cdot(X-z)$, where $g \in \mathbb Z [X]$ with $\mbox{deg}(g)+1= \mbox{deg}(f)$. Since $a_0$ is odd, $z$ and the constant term of $g$ are also odd.

A polynomial problem from my old algebra textbook:     $f(x)\in\Bbb Z[x]$ with leading coefficient $1$, $\deg f(x)\ge 1$, and both $f(0)$ and $f(1)$ are odd numbers, prove:   $f(x)$ has no root within $\Bbb Q$   Eisenstein's criterion seems to be of little help here because we know virtually nothing about the coefficients. So I tried some other approach. Let $$f(x)=a_0+a_1x+a_2x^2+\cdots+a_{n-1}x^{n-1}+x^n\in \Bbb{Z}[x]$$ What we have known so far is $$f(0)=a_0\text{ is an odd number}$$ and $$f(1)=a_0+a_1+a_2+\cdots+a_{n-1}+1 \text{ is an odd number}$$ from which we can also conclude that $$f(1)-f(0)=a_1+a_2+\cdots+a_{n-1}+1\text{ is an even number}$$ To be honest I don't know how to proceed now. It isn't until just now that I realized "irreduicible" is not equivalent to "has no roots".. So all my previous attempt is fundamentally wrong.. Can anybody help or drop a hint? Best regards!


I have a Canon 60D and a Yongnuo YN560-III flash, everything works fine normally, but when i go in live view mode the flash doesn't fire Why is that?

I had the opportunity to use some professional flashes yesterday and I found out that they didn't fire when I was trying to shoot with the camera in Live View mode.  The flashes were two Elinchrom FX400, one wirelessly synchronized with the camera and the other was activated automatically when the first one fired (With a photocell or something).  Using the camera normally fired both flashes at the same time with no issues, but live view mode deactivated both. Why the LV mode is incompatible? Am I missing something?  By the way, I tried this with two cameras, a Canon 1000D and a 550D.


Reading package lists... Done W: GPG error: http://deb.opera.com stable InRelease: The following signatures were invalid: KEYEXPIRED 1435908620 KEYEXPIRED 1435908620 KEYEXPIRED 1435908620 The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 63F7D4AFF6D61D45 trevor@trevor-Latitude-D620:~$

I added some extra repositories with the Software Sources program. But when I reload the package database, I get an error like the following:     W: GPG error:  trusty InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 8BAF9A6F   I know I can fix it using apt-key in a terminal, according to the official Ubuntu documentation. But I would have liked to do it graphically. Is there a way to do this without using a terminal?


For integers $a,b$ that are relatively prime to one another, we have $a \mid t$ and $b \mid t$. It should follow that $ab \mid t$, but I cannot manage to prove this. Here is as far as I was able to get.  If $a \mid t$ and $b \mid t$, there exist integers $\beta, \alpha$ such that $$a \beta = t, \; b\alpha = t.$$ Hence, $$(a\beta)(b\alpha) = (ab)(\beta \alpha )=t^2,$$ so $ab \mid t^2$.  Why, though, does $ab$ divide $t^2$? Further, how do I even know that $ab \leq t$? Another idea was to use Bezouts identity and assert the existence of integers $x$ and $y$ such that $$ax + by = 1.$$ Multiply through by $\beta \alpha$ and reassociate: $$(a\beta)(x\alpha) = (b\alpha)(y\beta) = \alpha \beta,$$ but this doesn't appear to help me.

Using divisibility theorems, prove that if $\gcd(a,b)=1$ and $a|c$ and $b|c$, then $ab|c$.   This is pretty clear by UPF, but I'm having some trouble proving it using divisibility theorems. I was looking at , and if this could be proven, then the solution would follow immediately.


In CentOS 7 I wanted to start httpd service only in runlevel 3 and 5, in other runlevels such as 2 and 4 the service shouldn't start.   In CentOS 6 we can achieve this by using "chkconfig" command. Looking for similar solution in CentOS 7 environment.

Does systemd still have the concept of runlevels? For example is it pointless to use telinit <number>?


On Earth when two pieces of metal comes into direct contact with each other, nothing amazing happens. In a complete vacuum condition the two metals fused permanently, how and why?

It is my understanding that metals are a crystal lattice of ions, held together by delocalized electrons, which move freely through the lattice (and conduct electricity, heat, etc.).   If two pieces of the same metal are touched together, why don't they bond?   It seems to me the delocalized electrons would move from one metal to the other, and extend the bond, holding the two pieces together. If the electrons don't move freely from one piece to the other, why would this not happen when a current is applied (through the two pieces)?


I got error on the following query  INSERT INTO tableName3 (column1, column2)     SELECT          b.column1,         SUM (a.column2) AS SumColumn2     FROM          tableName1 AS a     JOIN          tableName2 AS b ON a.column1 = b.column2      GROUP BY          b.column2 ON DUPLICATE KEY UPDATE tableName3    SET column2 = SUM (a.column2) AS SumColumn2   The error messages are      Incorrect syntax near the keyword 'ON*'   and      Incorrect syntax near the keyword 'AS'   How to fix it?

The UPSERT operation either updates or inserts a row in a table, depending if the table already has a row that matches the data:  if table t has a row exists that has key X:     update t set mystuff... where mykey=X else     insert into t mystuff...   Since Oracle doesn't have a specific UPSERT statement, what's the best way to do this?


How to change 3prong to 4 prong dryer cord How to wire a 3prong outlet where a 4 prong is currently?

My 2 year old whirlpool dryer has a 3 prong cord. My new house has a 4 prong. The dryer doesn't have a spot for 4 wires. The ground wire coming from the dryer is attached to the dryer itself. A new 4 pronged dryer cord has white, red, black, and green wires. Maybe the green wire hooks to the ground screw with the one coming from the dryer?


I am using algorithm2e when I reference an algorithm it shows ?? which links to the correct algorithm, but it should show something like 1.1.  Any suggestions as to how I can fix this?  Here is an mwe:  \documentclass[12pt, a4paper, oneside, english]{Thesis}  \usepackage[boxed, ruled, ruled, algoruled]{./algorithm2e} \usepackage{babel}  \begin{document}  \ref{alg:Stage1.2} shows the algorithm.  \begin{algorithm}[!htp] \label{alg:Stage1.2}  \caption{Stage1.2} \end{algorithm} \clearpage  \end{document}

\documentclass{article} \usepackage{algorithm}  \begin{document} \setcounter{section}{54} \section{A section with no label} \begin{algorithm} \label{myalg} \caption{An algorithm with the label `myalg'.} \end{algorithm} Reference to myalg: \ref{myalg}. \end{document}   With this code, the reference givens 55 (the section number); if I move the label after the caption command, I get the correct reference (1).  Why should this be the case? I find it confusing: when thinking about an algorithm as an environment, you expect to be able to label it right after you began it. At the very least I would expect some kind of error or "??" to appear, rather than the previous environment or reference-able entity being used.


I am providing video and pdf content to my buyers/readers. And looking for some solution, where I can protect USB to get copied, means :   People should not be able to copy from USB (Copy/SaveAs) People should not be able to write anything in USB People should not be able to print .PDF files. I can restrict one USB stick to work on Max. 2 computers   I find first 3 options with KAKASOFT USB PROTECTION TOOL but 4th option is not available with anyone. Can someone help?

I have customers who want to buy large amount of flash memories but he wants to copyright all files inside it.   The flash will contain files that will be delivered for his customers but they're not allowed to copy or delete any of the files the only allowed permission is to ready the files.   I searched and found many solutions but all have on function it WriteProtect the USB though I can't add files to Drive at all but I can delete or copy any file in the drive.   Is there any way to protect the flash memory so I can't copy data out of it?


The download file will not open because it's not supported. How do I open the ubuntu desktop file and install it?

I have installed Ubuntu 13.04 on my desktop (runs like a charm). Then I used Crouton to install Ubuntu 12. 04 on my chromebook samsung (ARM). It also works quite well.  Here comes my question. Can we have a true Ubuntu (preferably 13.04) on my ARM chromebook?  It seems that the Crouton/Ubuntu is not 100% the real thing.  The best option would be to have the full Ubuntu 13.04 and remove the Chrome OS.


I have a dataset which is having multiple columns where some column has string values with comma seperated  row.names   MOVIE   Year    Released    Genre 1   2   Jilla   2014    10/01/14    Action, Drama, Thriller 2   3   Pursuit of Happyness    2005    16/07/05    Documentary 3   4   The Karate Kid  1984    22/06/84    Action, Drama, Family 4   5   Yes Man 2008    19/12/08    Comedy, Romance 5   6   The Butterfly Effect    2004    23/01/04    Sci-Fi, Thriller 6   7   Unknown 2011    18/02/11    Action, Mystery, Thriller   Now I have dataset which is having String value in a column but that is required for regression analysis. Now I want to deal with this Genre Column which is extremely important for my analysis (regression).  So how can I deal with such column where I have string values.  I thought of finding all unique String values in the column and assign a number to each one of them.  Sci-Fi - 1 Thriller - 2 Comedy - 3  Now if any genre says - Sci-Fi,Comedy  - 13    I will replace as above but I am not sure about this technique.  Is there any more proper mathematical approach I must follow  I am using both R and Pandas for doing the same.

I want to create a predictive model to predict a categorical value (1,0) but the independent variables are also having few string columns (country, location, age) which I feel are important for the prediction and should be included.  Which model should I use, will Linear Regression work? till now I did regressions which only had continuous or discrete value, is there any norm to address values which has columns with string values ?  Below is the similar question been asked before, but unfortunately I didn't get much information    I am in an initial phase of learning and practicing machine learning please spare me if this question breaks the eligibility of valid question.  Please provide some insight, any source of help will be appreciated!!!  Edit: Added partial dataset below       Year     Location      Country 0  2016      chitwan      Nepal    1  2016      siberia      Russia    2  2016    Oba Hills      Nigeria    3  2016     Edumanom      Nigeria   4  2016        Kanha      India    Age                                Injury Survived Time     09                         attack on head     N    11h00   19                            Neck Injury     N    11h00   23                              lower leg     N    04h43   65                             leg injury     N    11h00   NaN                  attacked from behind     N    18h00


I'm trying edit a polygon by changing the length of some lines by code. Found  to calculate based on the bearing.  But I didn't find anything on how to calculate the bearing, before I start research my math notes and code this bearing calculation, any recomendations ?  thanks

I'm building a virtual tour application that uses custom panoramas in conjunction with Google's StreetView service.  With StreetView, you can have 1 to n links at each particular location to move to, and these links are based on compass bearings.  Each panorama has an associated GPS location to six decimal places acquired via .  My issue is when I calculate the compass bearings from each link location, it returns a bearing that is a tiny (as in 0.00001 degree difference) from true north.  Given a map like                         4                        |                        |                        |                        2                        |                        |                        |                        1   where each number is a location and has the following values:  1- 43.682213, -70.450696 2- 43.682194, -70.450769 4- 43.682179, -70.450837   What I'd like is a method to determine programatically that the bearing from 1 to 2 and 2 to 4 is 70 degrees, and 2 to 1 is 250 degrees.  Using the code from  as a starting point, I wrote the following function  //starting lat/long along with converting degrees to radius     var endLat = location.lat();  //for rhumb calc     var endLong = location.lng();      //loop over response, calculate new headings for links and add link to array     for(var i=0; i<data.length; i++){       //this link's lat/long coordinates       var startLat = data[i].lat;       var startLong = data[i].lon;        //get the delta values between start and end coordinates       var dLong = endLong - startLong;        //calculate rhumb bearing to       var dPhi = Math.log(Math.tan(endLat/2+Math.PI/4)/Math.tan(startLat/2+Math.PI/4));       if (Math.abs(dLong) > Math.PI ) dLong = dLong > 0 ? -(2*Math.PI-dLong) : (2*Math.PI+dLong);       var bearing = (toDeg(Math.atan(dLong, dPhi)) + 360) % 360;   Using the above function and substituting  location for position 2 data[0] for position 1 data[1] for position 4   I get the bearings  359.9958174081038 degrees to 4 (should be 70 degrees)   and   0.0038961130024404156 degrees to 1 (should be 250)   Why is this function returning such different values than expected?


I have an Acer with an Nvidia graphics card. I know that to upgrade the drivers I need to disable Secure Boot, but I am unclear about what Secure Boot is and if there are any down sides to disabling it. (Running windows 10 alongside Ubuntu 16.04 on separate partitions)  I've read other posts and people say that it doesn't let them run windows again and this is something that I don't want.  Is it okay for me to disable it for my graphics driver?  Note: Ubuntu works with Secure Boot, this is wholly for the graphics driver.

When installing 16.04, I was asked to turn off "Secure Boot" if I wanted to install 3rd party modules/drivers.  I did not comply.  And when I installed manually the only 3rd party drivers I use (bcmwl-kernel-source), I was asked again (during the installation of the package) to turn off "Secure Boot".  Using bcmwl-kernel-source was perfectly fine with Secure Boot in 15.10. This does not seem to be related to a bug to me.  So this does look like Ubuntu refuse to sign anymore the 3rd party drivers/modules to make it work (??) with "Secure Boot". Or seem to consider 3rd party modules as insecure and breaking "Secure Boot" hence inforcing to disable it to make it clear ?? Am I right ?


I read this some 5 to 10 years ago (in German). It was a series of books, afaik not yet finished. In a future world, science had advanced to basically magic. At some point however, the key holders for a neutral God-Computer start a coup. Suddenly energy for technical stuff for everyone except the key holders is taken away. No personal shields, etc. Society reverts to something more or less medieval. No black powder for example is possible because the energy is absorbed by the computer. There are dragons and elves. In a later book a spaceship to refuel power plants arrives.

I read this book probably 10 or 15 years ago. I remember it starting out with a  young woman (I think) talking to a computer and altering her appearance in a mirror. I believe she was making subtle changes that were up-to-date with what was popular for the time and I believe the book explained that other people had chosen to make less subtle changes and go full-on were-animal.   The book follows her and her father who becomes a leader of a new civilization, when the main computer is hit by terrorists or something. They fall into the dark ages and have to resort to surviving like they did in the middle ages. It was very descriptive at one point as the woman was trying to figure out how they used to handle menstrual cycles without technology. I remember there was bad guy, and I believe he was were-tiger or panther man, but he wanted the girl. He started raiding the small settlements that had arose in the aftermath, and became like a warlord wreaking havok, pillaging, and raping. The girls boyfriend fought the last battle with him and lost his arm.   I'm pretty sure the book was written in the 1950s. I remember thinking that it was strangely accurate and advanced for when it was written. I have been trying to remember this book for the last 10 years because it was open-ended and I believe it was part of a series. I remember this book being one of the best I've ever read. It could make you clench your teeth, laugh and cry all at once. Can anyone help me find it?


The setting is classic DH protocol. Alice computes $A = g^a \bmod p$. Alice then sends $A$ to Bob. Then Bob will send $B = g^b \bmod p$ to Alice.   Are there any requirements for the values $a$ and $b$ besides they should be greater than $1$?

I'm implementing the SRP-6 protocol, which relies on discrete logarithms for it's security (essentially Diffie-Hellman).  The  state:     The private values $a$ and $b$ SHOULD be at least 256-bit random numbers, to give   approximately 128 bits of security against certain methods of calculating discrete   logarithms.   I can't seem to find any info on this – is it still valid advice?  Is the reason for this simply that the best known method for calculating discrete logs of $n$-bit numbers requires $2^{n/2}$ steps?


I'm new, so this is probably just a silly mistake, but when I rendered my Smoke Animation(as I followed in a tutorial), it just rendered 250 pngs and not a video of animation. Just confused.

Yesterday I was working on a simple animation, an animated logo.   Here is an image of the progress:    I already have the animation working and everything is okay with the project, but I can't figure out how I can render the animation and turn it into an AVI format video.  How do I render an animation in Blender?


The functions $s_1=x_1+x_2+\cdots +x_n$, $s_2=\sum_{i<j} x_ix_j$, $\cdots$, $s_n=x_1x_2\cdots x_n$ are elementary symmetric functions in $x_1,x_2,\cdots,x_n$ (or more precisely, elementary symmetric polynomials).  There are other natural symmetric functions in $x_1,x_2,\cdots,x_n$: $$t_1=x_1+\cdots + x_, \hskip5mm t_2=x_1^2+x_2^2+\cdots + x_n^2,  \cdots ,t_n=x_1^n+x_2^n+\cdots+x_n^n.$$ The two sets of symmetric functions are related by some identities, known as .  What are the simple proofs of these Newton identities? How do we prove them with some intuition or motivation?

Assume $F$ is a field of zero characteristic. Denote the elementary symmetric polynomials of $n$ variables by $e_k$, $\quad k=\overline{1,n}$. Let the symbol $\sum ax_1^{i_1}\dots x_n^{i_n}$ denote the sum of all different monomials which can be obtained from $ax_1^{i_1}\dots x_n^{i_n}$ by permuting its variables. For instance, if $n=3$,  $$\sum x_1^2x_2=x_1^2x_2+x_1^2x_3+x_2^2x_1+x_2^2x_3+x_3^2x_1+x_3^2x_2$$  The polynomials $S_k=\sum_{i=1}^n x_i^k$ are called power sum symmetric polynomials. Obviously $S_1=e_1$ and $S_2=e_1^2-2e_2$. In order to prove Newton's identities one can see that for $2<k<n+1$  $$e_iS_{k-i}=\sum x_1^{k-i+1}x_2\dots x_i+\sum x_1^{k-i}x_2\dots x_ix_{i+1}$$  How can we see the above identity?


I had like 303 or so consecutive days in Physics.SE but they reset. To my best knowledge I visited everyday so is there a limit/bug?

I visited Stack Overflow for about 82 days in a row (starting January 21st), including yesterday (April 13th) and today (April 14th).  All times UTC of course (I thought that was clear but I've now added it to my question as a relevant info).  All visits are in a logged-in session of course.  I've just discovered that SO didn't "see" the April 13th visit, so my consecutive days visits were zeroed !!  It's a bug for sure. I have open tabs which my browser's history shows that are from April 13th. More than 20 of them. I saw this one:  , and it's clearly what happened to me. Please help! I'm so close to getting the Fanatic badge...


How do I view the disk usage of all folders in Windows 7? I need to get the same result I would in Linux with the command df -h. I'm mainly interested in seeing which disk and folder is consuming the most storage space. What command can do this?

How can I visualize which folders and files are taking up all of the space on my hard drive?  I'm getting some conflicting reports on the size of hard drive contents. Namely what is and isn't there and what folders are actually using the space.   I need to know which of the files or folders the culprits behind all this hidden bloat. Also there should be a print option to get it on paper.


I wish you a day without a bug. My problem is as I wrote in the title. I can't apt-get update because I can't find the Ubuntu release file. I tried the past solutions in Stackoverflow and it didn't work, and I deleted and redefined the files in /etc/apt/source.list.d but it didn't happen again. I thought of ssh keys and redefined them, but I don't know if it's related. I hope you can help. My ubuntu 18.04

There are now errors when updating and I cannot install most software due to a corrupted  /etc/apt/sources.list   file. Is there a copy I can download to replace it?  The file would be for Ubuntu 12.04 (Final Beta) in the United States.


Let $G:=(\Bbb Z,*)$ where $a*b:=a+(-1)^ab$ for any $a,b\in\Bbb Z$. Show that $G$ is a group.  But, in my solution, $G$ is not a group. Group operation is not associative.  $a$ must be even integer for associative. Am I wrong?  I am new in algebra, i would appreciate it if you help.

I'm reading Beardon's Algebra and Geometry:     Show that $\mathbb{Z}$ with the operation $m*n=m+(-1)^m n$, is a group.   I've been thinking on how I should show associativity, I thought about doing this:  $$(m*n)*p$$  Then assuming:  $$m*n=m+(-1)^m n$$  I have:  $$(m+(-1)^m n)*p$$  Which results in:  $$[m+(-1)^m n]+(-1)^{[m+(-1)^m n]}p$$  Then:  $$m*(n*p)$$  Again, assuming that:  $$n*p=n+(-1)^n p$$  I have:  $$m*(n+(-1)^n p)$$  Then:  $$m+(-1)^m [n+(-1)^n p]$$  And show that:  $$[m+(-1)^m n]+(-1)^{[m+(-1)^m n]}p=m+(-1)^m [n+(-1)^n p]\tag{A} $$  But I've tested it with some values on Mathematica and found that when:  $$m = 1; n = 0; p = -1;$$  The equality does not hold. I'm stuck again. Can you please provide me some hints on how to do it? I'm not looking for a full answer.    When I was testing the equality on Mathematica, I felt that permutations of $m,n,p$ on the set $\{-1,0,1\}$ could be enough to prove it, for example:  $$\begin {array} { c | c | c } m,n,p & m,n,p & m,n,p \\ \hline   -1, -1, -1 & - 1, -1, 0 & - 1, -1, 1  \\   -1, 0, -1 & - 1, 0, 0 & - 1, 0, 1  \\   -1, 1, -1 & - 1, 1, 0 & - 1, 1, 1  \\   0, -1, -1 & 0, -1, 0 & 0, -1, 1  \\   0, 0, -1 & 0, 0, 0 & 0, 0, 1  \\   0, 1, -1 & 0, 1, 0 & 0, 1, 1  \\   1, -1, -1 & 1, -1, 0 & 1, -1, 1  \\   1, 0, -1 & 1, 0, 0 & 1, 0, 1  \\   1, 1, -1 & 1, 1, 0 & 1, 1, 1  \\ \end {array} $$  But I'm not sure if this is true. What do you think?


I am working on the some system calls..  I want to open the file by system call open()  somewhere in my code I used,   static char message[] = "Hello, world";    but it is giving the error  error :- static: command not found  please assist .

I shifted to Ubuntu 10.10 now I am facing problem to have C/C++ compiler. What are the possible ways so that I can use C/C++ compiler using all the libraries (like graphic, math, conio, stdlib, etc) as in Microsoft Windows creating executable file?


Haven't had much luck searching for 'OP' and 'OT' terms in the search box, what does these abbreviations used by users in StackOverflow mean ?

What are the common phrases, words, abbreviations that are used on Stack Overflow, Server Fault, Super User, Meta Stack Overflow, and the other Stack Exchange sites? This is meant to be a very quick overview, not an in-depth tutorial. When considering whether a term ought to be included, please use this test:  New user comes in and posts on day 1. What terminology or jargon are they likely to run into (comments, support, system messages, etc.) that cannot be understood from the context without prior experience with the site (that is, clear only if known). For example: "This is a dupe. Flag a diamond mod to close or migrate to SU." Huh? Can these instruction be made clear from the glossary? Is it clear for those for whom English is a second language?  Please:  Edit the existing answer Insert relevant links to more detailed information on the term/phrase/abbreviation Add only factual information Keep it very, very brief, terse, and to the point Delete your own comments once they become irrelevant (integrated into the glossary) Use the Edit Summary box to note reasons for your edit, not comments  Please avoid:  Opinion Using abbreviations, terms, and phrases inside a description Unverified information Uncommon terms, abbreviations, phrases Long descriptions Unnecessary detail - link to the relevant FAQ instead Citations or examples of usage Inside jokes that are not common on all of the trilogy () Common Internet jargon (that is, , , , etc.) unless usage here differs significantly  Recurring discussion: While the experiment to keep meta-discussion in the comments is going well (that is, deleting them once consensus is reached) it is clear that some discussions will be recurring, and we'll have to keep a record around so people new to the glossary can understand the consensus already reached. Add a new answer if you believe a new issue is likely to come up repeatedly. For instance, discussion about what terms to include, whether the glossary should be broken up to make linking easier, or formatting issues might be best discussed in new answer/comment posts.


There is a similar question on this site, .  But, it's from 2013. And lists just one site - , that gives an estimate. For example: 1.  2.  3.  4.   We're in 2020 now. In the last 7 years, i am sure some improvements must have been made in this regard. At least, i have hope.  I checked itamatrix, google flights and skyscanner.

I have a project that is requiring me to travel to seven different locations and I need to find a travel site that will allow me to book more than six multi-flights in order to accommodate for this need. does anyone know of any sites that will allow me to do this?


I'm a cycling beginner and am trying to purchase spare inner tubes from amazon. The tube sizes are usually given as:  20-622 - 25-630 27x3/4 - 27x1.00 700x20c - 700x25c   How should I understand these? What unit does 25c represent?

I tried getting a good measurement with my caliper, but the flexibility of the tire doesn't help much. Let's say I have a 26"x2.125" tire. I know this fits on an ISO 559mm bead seat diameter rim, and 26" = 660.4mm. 26":  The OD of the tire including the tread? The OD of the tire excluding the tread? When aired up or deflated? Means it fits a 559mm ISO BSD None of the above?  2.125":  Width of tread? Width of sidewall? Inflated or deflated?  Essentially, I'm converting the tire sizes to "height off rim in mm" and drawing them with a wheel in a web application, so I need to know how "tire size" translates to this measurement. I'm somewhat assuming that the fractional sizes can be converted to the same measurement, but I'm aware that they have certain differences - so any help there would be of value as well.  has been helpful, but still leaves me with the questions above.


I have a Ubuntu 16.04.1 installed on my NUC.   After I reboot, I can see .xsession-errors increasing in size rapidly. The below is after 2 minutes.  -rw-------  1 kodi kodi 3466402072 Jan 20 18:49 .xsession-errors -rw-------  1 kodi kodi 6548127878 Jan 20 18:46 .xsession-errors.old   Running a tail -f on the file gives me nothing but continious output of:  extern "Python": function Cryptography_rand_bytes() called, but @ffi.def_extern() was not called in the current subinterpreter.  Returning 0.

~/.cache/upstart/unity7.log is growing to consume the entire disk ~130GB in 7-10 hours.   If I tail the file I get:  xxxxx@xxxx-xxxxxxxx:~/.cache/upstart$ tail -f unity7.log extern "Python": function Cryptography_rand_bytes() called, but @ffi.def_extern() was not called in the current subinterpreter.  Returning 0. extern "Python": function Cryptography_rand_status() called, but @ffi.def_extern() was not called in the current subinterpreter.  Returning 0.   I'm finding some commonality with Kodi.bin (v.17) but I can't tell if that is qualitative or quantitative yet. I'd appreciate any troubleshooting tips or known bugs :)


public static void RunProcess(string FileName, string Arguments, ProcessWindowStyle WindowStyle, bool WaitforExit) {     MessageBox.Show("Runnig the process :- File name- " + FileName.ToString() + "argumetns- " + Arguments.ToString() + "windowStyle- " + WindowStyle.ToString() + "WaitForExit- " + WaitforExit.ToString());     Process MyProcess = new Process();     MyProcess.StartInfo.FileName = FileName;     MyProcess.StartInfo.Arguments = Arguments;     MyProcess.StartInfo.WindowStyle = WindowStyle;     MyProcess.Start();     if (WaitforExit)         MyProcess.WaitForExit(); }   Here Arguments are having some spaces too.!!

When building console applications that take parameters, you can use the arguments passed to Main(string[] args).   In the past I've simply indexed/looped that array and done a few regular expressions to extract the values. However, when the commands get more complicated, the parsing can get pretty ugly.    So I'm interested in:   Libraries that you use Patterns that you use   Assume the commands always adhere to common standards such as .


Very new to the Ubuntu world.  Attempted to upgrade from 18.04 to 20.04 last evening around 9pm -23rd April. The Software Updater - states ' the software on this computer is up to date '  Entered   update-manager -c -d     as requested on Ubuntu site . Terminal states   ' Checking for a new Ubuntu release '  followed by  ' Please install all available updates for your release before upgrading '  I think I am missing something very obvious here . Any help would be greatly appreciated.

I'm following the , but on launching the upgrade tool I get this response:  Checking for a new ubuntu release No new release found   Am I doing something wrong? Is there a workaround?


Let the $n\times n$ matrix $Z$ with $(i,j)$-element defined by $Z_{i,j}=i+j$. How to calculate the eigenvalue of $Z.$?  I have used Matlab to calculate it. I find no matter how bigger n is, there are always two nonzero eigenvalues. But how to get the formula for eigenvalues of $Z$?

Let $A$ be an $n\times n$ matrix, with $A_{ij}=i+j$.  Find the eigenvalues of $A$.  A student that I tutored asked me this question, and beyond working out that there are 2 nonzero eigenvalues $a+\sqrt{b}$ and $a-\sqrt{b}$ and $0$ with multiplicity $n-2$, I'm at a bit of a loss.


I have generated a wordlist.txt of 11 GB by crunch-3.6. When I try to open the file with Vi or gedit, I run into problems because of the file size. How can I view this file?

Is there any text editor, which can edit such file?  I've  tried:   gedit kate nano vim mcedit   without success.


Do the following sentences mean the same thing or are they different?        The king wanted him killed.    The king wanted him to be killed.       Please use examples to explain the differentiations.

Comparing the following two statements:  They want it ready by Monday.  and  They want it to be ready by Monday.  is 'to be' in the latter redundant? Are both correct?


Glass is an amorphous polymorph of silicon dioxide, melted and quenched so that grain boundaries grow uniformly and are small with respect to visible light. Its an oxide not a metal and has a large bandgap so visible light doesnt excite the electronic structure.  Now i can imagine how some gases and solvents are mostly transparent dielectrics, but im having trouble understanding why glass transmits light coherently.  How do the little crystals in glass manage to all polarize the same way if they are arranged randomly and aren't free to move? I read glass molecules do move like a magma but very slowly. Is it just that the negative charge polarizes like in a leyden jar?  If thats the case why doesnt the motion of a gas or a fluid affect the coherent transmission of light?

Once I asked this question from my teacher and he replied "Because it passes light.". "And why does it pass light?" I asked and he said, "Because it is transparent.".  The same question again, Why glass is transparent? Why does light pass through it, while for opaque objects, it does not?


I hope you're doing great. When I using beamer, how can I set the first frame, with the respective navigation bar but without text (only with the rectangle located above).  Best regards

I am using the Berlin theme to create a presentation with beamer. I like the fact that the headline and footline show the navigation, author, etc, but I would like to hide that information on the titleslide, as it is already displayed there, and have it appear again on all following slides.  I, however, do not want to lose the head- and footline themselves (using \setbeamertemplate{headline}{} for example just makes the whole headline disappear).   is somewhat similar to mine, but I tried modifying the code showed there, which did not work for me (see MWE below).  MWE:  \documentclass{beamer}  \title{Title} \author{Jane Doe} \institute{University of Foo} \date{\today}  % Beamer setup \usetheme{Berlin} \usecolortheme{spruce} \setbeamertemplate{navigation symbols}{}  \renewcommand*{\slideentry}[6]{} % hide subsection bullets and remove space  \begin{document}  %\setbeamertemplate{headline}{} \frame{\titlepage}  %\setbeamertemplate{headline}[headline theme] \section{Test} \begin{frame}   Test \end{frame}  \end{document}


For example: Object Mode!Layout!Add!Mesh!Cylinder.  Then, in lower left of the viewport, the dropdown Add Cylinder!Vertices is where you can change the number of vertices on the curve that comprises the cylinder before the creation of the cylinder is finalized. But once the cylinder (or other curved object) is added, where is it possible to come back later and change its number of vertices?

When you first add a cylinder, you have the option to change the number of vertices, etc, but once you do anything else in blender, it seems you no longer can edit those parameters.   Is there a setting anywhere or an add-on that allows these parameters to be edited later on? If not, how easy would such an addon/feature be to create for anyone reading this?


I've searched for other similar questions, but no answer works for my problem.  Here is my jQuery:  $("i[id^='delete']").click(function() {   $(".container.tim-container").load("getreservations.php"); });   And here is the php that generates the updated content:  $count = 0;  echo '
'; echo "
"; echo '
View Reservations
'; echo "
"; echo '
';  foreach ($noDupes as $facilities)   {     echo '
';     echo '
'.$facilities["facility_name"].'
';     echo '
';      foreach ($facilities["dates"] as $dates => $dateValues)     {       echo '
';       echo '
'.$dateValues["date"].'
';       echo '
';        echo '
';       echo '
';       foreach($dateValues["timeslots"] as $timeslots => $timeslotValues)       {         echo '
'.$timeslotValues["start_time"].'
';         echo '
'.$timeslotValues["end_time"].'
';          echo '
';         echo '
'.$timeslotValues["start_time"].':00 - '.$timeslotValues["end_time"].':00
';         echo '
';         $count++;       }       echo '
';       echo '
';     }   }    echo '
';   echo '
';   Even though it is not beautiful php code, it works. The problem is that the .load() function in jQuery only works once. Also, I've tried using .on('click', function(){}) on the  element as well. How can I make it work more than once?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I bought a new watch for my friend and made a surprise gift pack as well. The watch is an expensive one. I am flying from Kolkata to Chennai and my friend will take it from Chennai and will fly to Bangalore next.    Can I take this watch and surprise gift box in my carry-on luggage?    Is extra tax or custom search needed?

I have purchased 15 iPhones in Chennai and I want to bring them to Delhi. Will I have to pay duty for that in Chennai? I have the receipt proving I bought them in Chennai.


I have dual-booted windows 7 and ubuntu 14.04 on my laptop. I can browse files stored in windows partition in ubuntu os but I cannot browse or see ubuntu partition in 'my computer' in windows. Please help how can I access my files of ubuntu partition in windows 7 partition?

I have two questions on ext4:   Is there currently a way to mount an ext4 partition in Windows (XP/Vista/7) to get basic read support? If not, are there any plans to support this someday?


I have the following exercise. If $ abc \equiv b \pmod{m} $ and $ \gcd{(a,m)} = 1 $, then $ ac \equiv 1 \pmod{m} $. My attempt. From $ abc \equiv b \pmod{m} $, by definition, $ abc - b = b ( ac - 1 ) = mh $. Now: if $ b \mid h $, then $ ac - 1 = mk \implies ac \equiv 1 \pmod {m} $; if $ b \mid m $... I don't know what to do... Ideas? Other solutions? Thanks.

I was working on a problem that resulted in the calculation: $20 \equiv 10x \pmod{11}$.  I got the answer $x \equiv 2 \pmod{11}$ with the thought process: Since $10$ is a factor of $20$ I can rewrite $20 \pmod{11}$ as $10x \pmod{11}$ with $x=2$. But isn't this basically the same as using division, which we aren't supposed to do in modular spaces?  If I solve by multiplying $20$ by the multiplicative inverse of $10 \pmod{11}$ which is $10$, I get $200 \pmod{11}$ which simplifies to $2 \pmod{11}$ anyway. Did these numbers just happen to be the same or is my original method valid?


Trying to remember title (and even most content!) of following story:  Something along the lines of a gigantic abandoned spaceship drifting through the galaxy for over a galactic turn, humans had colonised it and run it, and trade passage on the spaceship with other races in return for technology/goods. Think the main plot was over an attempted take over of the ship by another race.  Apologies for vagueness.

Here's what I remember:    Takes place in the future on a giant, bigger-than-a-planet spaceship found and now run by humans Humans are genetically altered and/or are enhanced with nanotechnology and have essentially become immortal and can be healed from almost any wound The surface of the ship is inhabited by former humans who have mutated into a new species, and live their entire lives in a kind of space suit The plot involves the discovery of a small planet within the ship that the protagonist is stranded on along with many others, and they form a civilization and live there for centuries   Anyone know the name of this book?  I can never remember it.


My PC case is heavy, so I will only bring the following: -Motherboard -RAM sticks -Video Card -3 HDDs (Planning to put this on handcarry) -Power Supply -AIO Cooler (water cooler) -Keyboard and Mouse (can go to hand carry too)  New Monitor and case will be bought from destination.  They will all be disassembled and put into boxes (Thinking it could fit into the original Motherboard and PSU boxes).  I'm going to US and I really don't mind it being checked by TSA as long as it won't get broken. :)

On an upcoming trip, I will be taking a desktop computer and monitor as checked luggage (on a United/Continental flight). What should I be aware of when doing this? What needs to be done to properly protect all the components? Are there any airline policies I should be aware of?


I need the word "Chapter" in the picture below to stop at bottom and top of the black square. The size of the letters in "Chapter" needs to be the same size as it is now, but I would like there to be eactra white space between each letter in the word.  \documentclass[oneside,10pt,oldfontcommands,standalone]{memoir}    \usepackage[T1]{fontenc} \usepackage{amsmath} \usepackage{fix-cm}       \makeatletter \newcommand\HUGEr{\@setfontsize\Huge{50}{60}}  \makeatother    \usepackage{tikz} \makechapterstyle{box}{     \renewcommand*{\printchaptername}{}     \renewcommand*{\chapnumfont}{\normalfont\sffamily\HUGEr\bfseries}     \renewcommand*{\printchapternum}{         \flushright         \begin{tikzpicture}         \draw[fill,color=black] (0,0) rectangle (2cm,2cm) node[color=white]  (test) {};         \draw[color=white] (1cm,1cm) node { \chapnumfont\thechapter };         \draw[color=white] (-0.5,0) rectangle (-0.1,2) node[midway,rotate = 90,color=black] () {Chapter};         \end{tikzpicture}     }     \renewcommand*{\chaptitlefont}{\normalfont\sffamily\HUGE\bfseries}     \renewcommand*{\printchaptertitle}[1]{\flushright\chaptitlefont##1} } \chapterstyle{box}  \begin{document} \chapter{Introduction}   \end{document}

I have made a fancy title page using titleformat and tikz, but I now face the following problem. The \chaptertitlename command returns \chaptername or \appendixname. I would like to spread the letters of the text returned by \chaptertitlename to a given length.  For example I would like to be able to call: \mycommand{\chaptertitlename}{3cm} in order to space the letters of \chaptertitlename on a total length of 3cm. How to do that ?  EDIT: This example illustrates a nearly working thing:  \documentclass[11pt]{article} \usepackage{fontspec} \newcommand{\spreadletters}[2]{\makebox[#2][s]{#1}}  \begin{document} \spreadletters{m y w o r d}{3cm} \end{document}   How to convert myword to m y w o r d ?  EDIT 2: Can someone explain me why the first work and not the second one (and how to make it work) ?  \documentclass[11pt]{book} \usepackage{fontspec} \usepackage{seqsplit} \usepackage[explicit]{titlesec}  \newcommand{\spreadletters}[2]{\makebox[#2][s]{\seqsplit{#1}}}  \begin{document} \chapter{First} \spreadletters{myword}{10cm} \linebreak % This is working \spreadletters{\chaptertitlename}{10cm} % This is not working \end{document}


So the question is, how do I defeat the challenge from the dragon? The hell with the devil. I thought I'd have to use Anti Gravity + Jump to get over those 2 lava holes, but when I want to jump this "bat" or what ever is placing mobs on my head, so I can't jump. Any tutorials? Thanks in advance.

Currently as soon as I reach him I get destroyed. I've tried ranged attacks, summoning, teleporting, and using my massive enchanted spoon, but to no avail. What is the tactic for beating the devil?


While I was playing with some redstone tried to make a money system to sell iron. However when I power the command block with a button, the comparator after it stays on.   the command being run is:   /clear @p minecraft:iron_ingot 0 5    and then a comparator leads to:  /scoreboard players add @p Dollars 10   So how do I turn off the comparator?

I made a redstone clock that involves a command block with /testfor and a comparator attached to it. Whenever the /testfor works, the comparator turns on, but completely.(meaning it does not turn off after that) I want it to turn on, have a small delay, then turn off. is there some way that i should change this clock, or should I be doing something different with the comparator?


I have created a minecraft mob spawner that is completely dark with a 23 block drop and no mobs are spawning. I have attached some pictures.

I built this 2 layer mob spawner trappy thing in the air. It's 24x24 but no mobs spawn inside :( No one falls down and I've opened it up several times to check; nothing inside either.  It's a standard thingy with 4 water flows, forcing mobs to the middle and drop down. As said I've opened it and nothing inside  It's dark, 100% sealed with stone.


I am currently having trouble with a NullPointerException when I am attempting to call onConnectionFailed.  I've followed the guidelines for this particular GoogleApi function, and updated its depreciated call.  However, when I try to call it, it gives me a NullPointerException, even though I think I covered all the pointers and initialised them properly.  This is my onConnectionFailed implementation:  public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {     if (connectionResult.hasResolution()) {         try {             connectionResult.startResolutionForResult(this, RESOLVE_CONNECTION_REQUEST_CODE);         } catch (IntentSender.SendIntentException e) {             FailedConnection();         }     } else {         GoogleApiAvailability apiAvailability = GoogleApiAvailability.getInstance();         int StatusCode = apiAvailability.isGooglePlayServicesAvailable(this);         apiAvailability.getErrorDialog(this, StatusCode, PLAY_SERVICES_RESOLUTION_REQUEST).show();     } }   I initially thought this was a problem with global variables and local variables, though I've copied the pointer call down to the local scope and it still gives me a NullPointerException.  This is the logcat, if anyone needs it:  y.phonebelt E/AndroidRuntime: FATAL EXCEPTION: main java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=65537, result=0, data=null} to activity {com.example.denny.phonebelt/com.example.denny.phonebelt.ViewingWindow}: java.lang.NullPointerException      at android.app.ActivityThread.deliverResults(ActivityThread.java:3500)      at android.app.ActivityThread.handleSendResult(ActivityThread.java:3543)      at android.app.ActivityThread.access$1200(ActivityThread.java:159)      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)      at android.os.Handler.dispatchMessage(Handler.java:99)      at android.os.Looper.loop(Looper.java:137)      at android.app.ActivityThread.main(ActivityThread.java:5419)      at java.lang.reflect.Method.invokeNative(Native Method)      at java.lang.reflect.Method.invoke(Method.java:525)      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)      at dalvik.system.NativeStart.main(Native Method) Caused by: java.lang.NullPointerException      at com.example.denny.phonebelt.ViewingWindow.onConnectionFailed(ViewingWindow.java:214)      at com.google.android.gms.internal.zzpp.zza(Unknown Source)      at com.google.android.gms.internal.zzps.onActivityResult(Unknown Source)      at com.google.android.gms.internal.zzra.onActivityResult(Unknown Source)      at android.support.v4.app.FragmentActivity.onActivityResult(FragmentActivity.java:165)      at android.app.Activity.dispatchActivityResult(Activity.java:5563)      at android.app.ActivityThread.deliverResults(ActivityThread.java:3496)      at android.app.ActivityThread.handleSendResult(ActivityThread.java:3543)       at android.app.ActivityThread.access$1200(ActivityThread.java:159)       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)       at android.os.Handler.dispatchMessage(Handler.java:99)       at android.os.Looper.loop(Looper.java:137)       at android.app.ActivityThread.main(ActivityThread.java:5419)       at java.lang.reflect.Method.invokeNative(Native Method)       at java.lang.reflect.Method.invoke(Method.java:525)       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1187)       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003)       at dalvik.system.NativeStart.main(Native Method)

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I'm using Ubuntu 12.04 LTS amd64 and I really need to install libgl1-mesa-glx. First I install with this command  sudo apt-get install libgl1-mesa-glx:i386   Then I got this errors  aungthiha@aungthiha:~$ sudo apt-get install libgl1-mesa-glx:i386 Reading package lists... Done Building dependency tree  Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libgl1-mesa-glx:i386 : Depends: libglapi-mesa:i386 (= 8.0.4-0ubuntu0.7)                         Recommends: libgl1-mesa-dri:i386 (>= 7.2) E: Unable to correct problems, you have held broken packages.   So I tried this.  sudo apt-get install libgl1-mesa-glx-lts-quantal:i386   Similar error Occur  aungthiha@aungthiha:~$ sudo apt-get install libgl1-mesa-glx-lts-quantal:i386 [sudo] password for aungthiha:  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies: libgl1-mesa-glx-lts-quantal:i386 : Depends: libglapi-mesa-lts-quantal:i386 (=   9.0.3-0ubuntu0.4~precise1) but it is not going to be installed                                 Recommends: libgl1-mesa-dri-lts-quantal:i386 (>=  7.2) but it is not going to be installed E: Unable to correct problems, you have held broken packages. aungthiha@aungthiha:~$   how do I solve this. Please, help!

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


I am practising ES6 and I have this code:    const over = (...fns) => (...args) =>   fns.map(fn => fn.apply(null, args));  const minMax = over(Math.min, Math.max);  console.log(minMax(1, 2, 3, 4, 5)); console.log(minMax(1, 2, 5, 4, 3)); console.log(minMax(1, 2, 5, -4, 3));     The goal is to get the minimum and the maximun values between the numbers passed as arguments.  I could understand almost everything, the dynamic is very clear, with one exception, I know that args refers to the parameters coming from minMax(), but I couldn't get how the code recognize it.  My guess is: since we have two functions, over() and minMax(), when called, they are automatically read in this order, that is why the code knows that the first anonymous function refers to over() and the second one to minMax(). But this is just a guess, I don't know if I am right.  What is exactly happening here?

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I'm a biologist, and I have a large dataset that I'm trying to analyze. Here are the variables I'm working with:   levels of 211 different metabolites in 16 different blood samples (predictor variables) how well each of the 16 blood samples performed in a specific test (response variable)   I am trying to figure out which variable(s) are the most important in predicting the performance of a blood sample in the test.  I would like to make these data more manageable by doing a PCA, but I'm new to this sort of analysis. I understand that a PCA will create groups of principal components (it will group metabolites that covary with each other and label each of these groups a principal component), but I'm not sure how to take into account the response variable in this analysis.  Any help would be much appreciated!!! Thank you.  > summary(metabolites_princomp) Importance of components:                           Comp.1     Comp.2      Comp.3      Comp.4 Standard deviation     3.9608225 0.40128486 0.259868774 0.215004349 Proportion of Variance 0.9805072 0.01006435 0.004220736 0.002889179 Cumulative Proportion  0.9805072 0.99057153 0.994792267 0.997681446 [...]

In a dataset of two non-overlapping populations (patients & healthy, total $n=60$) I would like to find (out of $300$ independent variables) significant predictors for a continuous dependent variable. Correlation between predictors is present. I am interested in finding out if any of the predictors are related to the dependent variable "in reality" (rather than predicting the dependent variable as exactly as possible). As I got overwhelmed with the numerous possible approaches, I would like to ask for which approach is most recommended.    From my understanding stepwise inclusion or exclusion of predictors is  E.g. run a linear regression separately for every predictor and correct p-values for multiple comparison using FDR (probably very conservative?) Principal-component regression: difficult to interpret as I won't be able to tell about the predictive power of individual predictors but only about the components.  any other suggestions?


I'm cating a file, and the output is something like this:  Help me my friend Temptation Sorrow True Love Vanilla Sky I was here SOS ...   I'm trying to create directory of all of these lines.  What I have tried is:  mkdir `cat x.txt`   But the result is a mess! For instance, I was here will be split into three directories like I, was, and here. How can I fix this??  Thanks in advance.

I have a text file, "foo.txt", that specifies a directory in each line:  data/bar/foo data/bar/foo/chum data/bar/chum/foo ...   There could be millions of directories and subdirectories What is the quickest way to create all the directories in bulk, using a terminal command ?  By quickest, I mean quickest to create all the directories. Since there are millions of directories there are many write operations.   I am using ubuntu 12.04.  EDIT: Keep in mind, the list may not fit in memory, since there are MILLIONS of lines, each representing a directory.  EDIT: My file has 4.5 million lines, each representing a directory, composed of alphanumeric characters, the path separator "/" , and possibly "../"  When I ran xargs -d '\n' mkdir -p < foo.txt after a while it kept printing errors until i did ctrl + c:  mkdir: cannot create directory `../myData/data/a/m/e/d': No space left on device  But running df -h gives the following output:  Filesystem      Size  Used Avail Use% Mounted on /dev/xvda        48G   20G   28G  42% / devtmpfs        2.0G  4.0K  2.0G   1% /dev none            401M  164K  401M   1% /run none            5.0M     0  5.0M   0% /run/lock none            2.0G     0  2.0G   0% /run/shm   free -m   total       used       free     shared    buffers     cached Mem:          4002       3743        258          0       2870         13 -/+ buffers/cache:        859       3143 Swap:          255         26        229   EDIT: df -i  Filesystem      Inodes   IUsed  IFree IUse% Mounted on /dev/xvda      2872640 1878464 994176   66% / devtmpfs        512053    1388 510665    1% /dev none            512347     775 511572    1% /run none            512347       1 512346    1% /run/lock none            512347       1 512346    1% /run/shm   df -T  Filesystem     Type     1K-blocks     Used Available Use% Mounted on /dev/xvda      ext4      49315312 11447636  37350680  24% / devtmpfs       devtmpfs   2048212        4   2048208   1% /dev none           tmpfs       409880      164    409716   1% /run none           tmpfs         5120        0      5120   0% /run/lock none           tmpfs      2049388        0   2049388   0% /run/shm   EDIT: I increased the number of inodes, and reduced the depth of my directories, and it seemed to work. It took 2m16seconds this time round.


In PHP objects are automatically passed by reference:  $obj1 = new stdClass(); $obj1->foo = 'bar'; $obj2 = $obj1; $obj2->foo = 'OOF'; var_dump($obj1->foo); // OOF   Is there an elegant way to copy that variable and NOT refer to the original variable? I want to store a copy of an object and then modify it without effecting the original. Thanks.

It appears that in PHP objects are passed by reference. Even assignment operators do not appear to be creating a copy of the Object.  Here's a simple, contrived proof:  <?php  class A {     public $b; }   function set_b($obj) { $obj->b = "after"; }  $a = new A(); $a->b = "before"; $c = $a; //i would especially expect this to create a copy.  set_b($a);  print $a->b; //i would expect this to show 'before' print $c->b; //i would ESPECIALLY expect this to show 'before'  ?>   In both print cases I am getting 'after'  So, how do I pass $a to set_b() by value, not by reference?


I was recently studying some book and few blogs and come to note that :  Total error  = Bias^2 +Variance + irreducible error  Also, I know that these are the errors but I have problem understanding, How do we quantify these errors?  What I mean by this is : Give few data points and the predicted and the true value. How do we measure Bias, variance and irreducible error?

My stats professor assigned this problem: "Show that the expected prediction error (EPE) for a squared error loss when $Y=f(X)+\varepsilon$ with estimator $\hat{f}(x)$ assuming $X=x$ is fixed and $\varepsilon~(0,\sigma^2)$ can be written as a combination of the bias and variance. In other words, show that   $$EPE(x) = E[(Y-\hat{f}(x))^2] = \sigma^2 + \text{Bias}^2 + \text{Var}(\hat{f}(x)).$$  I've come up with 3 ways to derive this relationship, but all of them depend on the assumption that $Y=f(X)+\varepsilon$ and $\hat{f}(X)$ are independent, or at least that their covariance is zero. For example, this allows me to use $\text{Var}[Y-\hat{f}(X)] = \text{Var}(Y)+\text{Var}(\hat{f}(X))$. This assumption makes intuitive sense to me because there is no necessary connection between $Y$ and the estimated value $\hat{f}(X)$ (the estimator could be a random number generator, after all). But I'm struggling to justify the independence assumption in a rigorous way. Can somebody nudge me toward understanding?


I ran the following JUnit test case and was able to continuously get good performance results for Stringbuffer than StringBuilder. I'm sure that I'm missing something here but I could not find the reason behind why I get better speed for StringBuffer than StringBuilder.  My test case is,      @Test     public void stringTest(){          String s1 = "s1";         String s2 = "s2";          for(int i=0;i<=100000;i++){             s1 = s1+s2;         }         System.out.println(s1);     }      @Test     public void stringBuilderTest(){          StringBuilder s1 = new StringBuilder("s1");         String s2 = "s2";          for(int i=0;i<=100000;i++){             s1.append(s2);         }         System.out.println(s1);     }       @Test     public void stringBufferTest(){          StringBuffer s1 = new StringBuffer("s1");         String s2 = "s2";          for(int i=0;i<=100000;i++){             s1.append(s2);         }         System.out.println(s1);     }   Please find the JUnit test results,     as you can see in the above results stringBufferTest case has executed sooner than stringBuilderTest case. My question is why is this? I know this is impossible theoretically but how I'm getting this result?    Update  As per the @'s comment I removed the SysOuts and results got changed dramatically.      Then I increase the loop count by 100000 -> 1000000 and was able to get some realistic results which I expected all the time,    Well my new questions are,   Why I get a significant performance improvement when I remove my SysOut? When the load is increased low to high in 1000000 StringBuffer gives the best results over StringBuilder, why is that?

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


My question is related to the statement mentioned below. In first part after auxiliary verb "is" the main verb is present participle which is "increasing" while in the last part the verb is past participle "Used". Does it make sense? and how we can rephrase the sentence.      TOm pricing signal is "increasing" widely and "used" in different ways.

What is a general rule for use of auxiliary verbs in sentence? Should we duplicate it or not? For instance,     It is available for every item and (is) used with . . .


After installing  I tried to restart or reload Apache and I received the following message:  $ sudo /etc/init.d/apache2 reload  * Reloading web server config apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

When I restart my Apache server using the command  sudo /etc/init.d/apache2 restart   I get the following error:  Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName ... waiting apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName   Is the server using 127.0.1.1 instead of 127.0.0.1? What causes this error?


I want to show that the co-countable countable $\sigma$-algebra on $X$ is distinct from $P(X)$ whenever $X$ is uncountable. Can we express every uncountable set as the disjoint union of uncountable subsets? (no big deal if AOC is assumed) Note: A different thread on this website asks the same question but only for real numbers.

Is it true that for any uncountable $S$, there exits two uncountable subsets $S_1,S_2 \subseteq S$ with $S_1 \cap S_2 = \emptyset$?   I can find no counter example, but no proof either.  I am aware of similar questions regarding the partition of uncountable subsets of the real line, and there are many examples of disjoints uncountable subsets of $\mathbb{R}$, say $R_1,R_2$.   It is not clear to me however whether this extends to any uncountable set. For uncountable sets $S$ with $S \succeq_{card} \mathbb{R}$, there exists an injection $f : \mathbb{R} \rightarrow S$ and choosing $S_1,S_2$ with $S_i = \{s\in S~|~ s = f(r_i) $ for some $ r_i \in R_i\}$, works.   But from what I understood of the continuum hypothesis, there might exist an uncountable sets $H$ with $\mathbb{R} \succeq_{card} H$. So using the above argument, one cannot infer that the property holds for every uncountable sets from observing that it holds for $\mathbb{R}$. Is this right? Are there other ways to prove or disprove the assertion?


I have the following code in Javascript:  var controller = { initApp: function(){     var getCartData = $.ajax({ url: '/cart' }),         getCategoryData = $.ajax({ url: '/categories' }),         getSupplierData = $.ajax({ url: '/suppliers'}),         getProdcuts = $.ajax({url: '/products'});      // Main controller logic starts when all data are loaded in     $.when(getCartData, getCategoryData, getSupplierData, getProdcuts     ).done( function( cart, categories, suppliers, products ) {         var model = new Model(cart, categories, suppliers, JSON.parse(products[0]));          console.log(model.products);         console.log(typeof model.products);          for(var i = 0; i<model.products.length; i++){             console.log(model.products[i]);         }          for(product in model.products){             console.log(product);         }      }); }   };  I would like to iterate through model.products. At the end of the code I use two types of for loops. How come only one of them (the first one) is working as expected? The second one prints numbers in the length of the array.

I've been told not to use for...in with arrays in JavaScript. Why not?


Recently installed Ubuntu on a windows machine and I am getting really weak and unstable wifi signal, that previously ran perfectly on Windows, prior to installing ubuntu.   My machine is an HP Envy 15. My Ubuntu version is 14.04 (Unity). The wifi seems to magically disconnect at random times or take a really really long time to load a page, I'm basically getting dial up speeds.  I appreciate any help on resolving this as this is really frustrating. Let me know if I can include any additional information from terminal that may help.  Command:   01:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. RTL8188EE Wireless Network Adapter [10ec:8179] (rev 01)     Subsystem: Hewlett-Packard Company Device [103c:197d]     Kernel driver in use: rtl8188ee

Hey guys I'm having some issue with my rtl8188ee network card. On Windows I get ~30-40 Mb/s whereas on Ubuntu 15.04 I get ~5 Mb/s. However, the issue comes and goes; often after disconnecting and reconnecting my WiFi temporarily jumps to the proper speed, only to recede again shortly.   In search for an answer I came across ; however I was unable to properly compile the driver (here's  I get when running make).  I was wondering if anyone knew how I could manage to compile the driver properly, or if anyone has another way to fix the slow WiFi speeds in Ubuntu 15.04.  In order to give as much information as possible, here are some diagnostic information:  uname --all:  Linux david-Lenovo-H535 3.19.0-21-generic #21-Ubuntu SMP Sun Jun 14 18:31:11 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux   lshw -C network:  *-network                   description: Ethernet interface    product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller    vendor: Realtek Semiconductor Co., Ltd.    physical id: 0    bus info: pci@0000:01:00.0    logical name: eth0    version: 09    serial: c0:3f:d5:72:be:6c    size: 10Mbit/s    capacity: 1Gbit/s    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation    configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168f-1_0.0.5 06/18/12 latency=0 link=no multicast=yes port=MII speed=10Mbit/s    resources: irq:46 ioport:e000(size=256) memory:d0004000-d0004fff memory:d0000000-d0003fff  *-network    description: Wireless interface    product: RTL8188EE Wireless Network Adapter    vendor: Realtek Semiconductor Co., Ltd.    physical id: 0    bus info: pci@0000:04:00.0    logical name: wlan0    version: 01    serial: 28:e3:47:60:76:6f    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless    configuration: broadcast=yes driver=rtl8188ee driverversion=3.19.0-21-generic firmware=N/A ip=10.0.0.14 latency=0 link=yes multicast=yes wireless=IEEE 802.11bgn    resources: irq:48 ioport:d000(size=256) memory:fea00000-fea03fff     Edit  I successfully installed the new driver thanks to @Pilot6 but problem persists. For more information, my download is the only speed affected. Upload is consistent at 10 Mb/s. I really have no clue what to do at this point. I know the hardware is fine because in Windows I don't have any issues with wireless.  Second Edit  Disabling IPv6 worked for a while but speeds dropped back down again. Problem remains intermittent. I don't think this has to do with the wireless repeater I'm using because all other devices work fine. Further, upload speeds have been entirely consistent, so I doubt it has to do with the signal or interference.  Alas, 5 Mb/s is sufficient for my daily routine. I only hope a future update will solve the problem.


For real number functions (if they are differentiable) $f$ and $d$ it holds: $$\frac{\mathbf{d}}{\mathbf{d}t}d(f(t)) = d'(f(t))f'(t).$$  Now let $t$ be a real number but $v$, $f(t)$, and $d(v)$ be vectors. The above formula may not make sense because $d$ is now a function from a vector.  Please help to "save" the formula, that is define how it can be demonstrated a similar formula for vectors.  Maybe it may be described with something like gradient?

Suppose I have a function:  $$ \vec{s} = \vec{f}\left(\vec{\theta}\right)$$  and a derivative:  $$ \vec{v} = \frac{\mathrm{d} \vec{s}}{\mathrm{d} t}$$  How do I apply the chain rule?  For simplicity lets call $\omega = \frac{\mathrm{d} \vec{\theta}}{\mathrm{d} t}$  I think the chain rule should be something along the line of:  $$ \vec{v} = \vec{\omega} \times \nabla_{\theta} \vec{f}\left(\theta\right) $$  but I don't know the exact rule.  I think I may have to use matrices and more complicated derivatives like the Jacobian.


I'm having the same issue detailed in this   that unfortunately hasn't found an answer. I've just joined the community hence was unable to comment or reach out to the original poster so I apologise for the additional question, however are there any ideas on the cause?

I am not seeing any of my custom managed properties in the property dropdown in the webpart properties of my Content Search WebPart in my SharePoint Online tenant.  Here is what I've done: Site columns were created, added to custom content types which were in turn added to a list, content was added to the list, content was crawled.  The managed properties are configured and correctly mapped to their corresponding crawled properties.  The options on the managed properties are: Searchable, Queryable, Retrievable, Safe.  Using the SharePoint Search Query Tool I can query against the site collection and DO SEE these managed properties being returned with data in them so I know they are valid.  Problem is I don't see them in the property drop-down when editing the webpart properties of a Content Search Web Part. Should that list show all managed properties set to 'Retrievable' in the search schema?  I thought it was supposed to.  When I search within the site collection for the managed property from Search Schema it does appear. I have also created a custom display template whereby I want to bring in these custom managed properties, but that is also failing as it doesn't seem to recognize these managed properties (which makes sense since I'm not seeing them in the dropdown of the webpart properties). Since this is SharePoint Online, I have waited a day and then another day to ensure the updates are being propagated out to my site collection, but I still do not see them.  I'm very familiar with doing this in SharePoint 2013, but this is the first time I've ran into problems doing it in SPO. Note: although I don't think this is relevant, this is on a cross-site publishing page.  I would appreciate any ideas you think may be the problem. I'm at a loss what it might be.


Let $u$ be a harmonic function on $\mathbb{R}^2\cong \mathbb{C}$ such that $Ref= u$ where $f$ is an entire function. If $|u(z)|\leq |z|^n$ for any $z\in\mathbb{C}$, then $f$ is a polynomial of degree no greater than $n$. How to prove this? I am quite confused. Thanks.

Let $f(z)$ be an entire function whose real part is bounded by a polynomial in $|z|$. Does it follow that $f(z)$ is a polynomial?  Or, without loss of generality and more suggestively $$(f(z)=\sum_{k=0}^\infty a_k z^k \quad \land \quad \operatorname{Re}(f(z))\leq |z|^n)\quad \forall z\in \mathbb{C} \qquad \Rightarrow \qquad f(z)=\sum_{k=0}^n a_k z^k \quad\forall z\in \mathbb{C}$$


I am writing a doctest for my utility function to generate a sequence of floating point numbers. However I am unable to match some of the intermediate values that are getting generated. Not sure why some values are long decimal.  def frange(initial, final, increment):     """ Return the list of numbers in float format.      >>> frange(0, 0.7, 0.1)     [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7]      """     lst = []     while(final > initial):         lst.append(initial)         initial += increment      return lst     File "foo.py", line 4, in __main__.frange Failed example:     frange(0, 0.7, 0.1) Expected:     [0, 0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7] Got:     [0, 0.1, 0.2, 0.30000000000000004, 0.4, 0.5, 0.6] ********************************************************************** 1 items had failures:    1 of   1 in __main__.frange ***Test Failed*** 1 failures.

Is there a way to step between 0 and 1 by 0.1?   I thought I could do it like the following, but it failed:  for i in range(0, 1, 0.1):     print i   Instead, it says that the step argument cannot be zero, which I did not expect.


I have a table which has following values:  case code id 100   A10  1 100   A11  2 100   A12  3 101   A11  4 102   A10  5   I need to write a query to get the following output:  case code 100  A10, A11, A12 101  A11 102  A10   Any help would be appreciated. Thanks.

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)