I noted there are some similar questions for my problem on this list, but none of them solve my issue. So I post it here again: Hi, I try to compile LaTeX thesis use the following steps: $ git clone https://gitlab.kwant-project.org/jbweston/thesis.git thesis.git $ cd thesis.git $ make [...] ! Package mathspec Error: `amsmath' must be loaded earlier than `mathspec'.  See the mathspec package documentation for explanation. Type  H <return>  for immediate help.  ...                                               l.54 \RequirePackage{amsmath}  ? No pages of output. Transcript written on build/thesis.log. make: *** [Makefile:14: thesis.pdf] Error 1  Any hints for solving this issue? Regards

See the following mwe:  \documentclass{article} \usepackage{amsmath} \usepackage{mathspec} \usepackage{unicode-math}  \begin{document} \begin{equation*}   1 + 2 = 3  \end{equation*} \end{document}   Run the above code with xelatex will meet the following error:  ! Package mathspec Error: `amsmath' must be loaded earlier than `mathspec'.  See the mathspec package documentation for explanation. Type  H <return>  for immediate help.  ...                                                l.54 \RequirePackage{amsmath}  ?    $ xelatex --version XeTeX 3.14159265-2.6-0.999991 (TeX Live 2019)  Regards


In Mac I use purge to free up some memory. What is equivalent to it in Linux(Ubuntu Server)? apt-get install purge gave me nothing. If you are no familiar with Mac's purge here is it's man page:  purge(8)                  BSD System Manager's Manual                 purge(8)  NAME      purge -- force disk cache to be purged (flushed and emptied)  SYNOPSIS      purge  DESCRIPTION      Purge can be used to approximate initial boot conditions with a cold disk      buffer cache for performance analysis. It does not affect anonymous mem-      ory that has been allocated through malloc, vm_allocate, etc.  SEE ALSO      sync(8), malloc(3)                                September 20, 2005

Prior to doing some benchmarking work how would one free up the memory (RAM) that the Linux Kernel is consuming for its buffers and cache?    Note that this is mostly useful for benchmarking. Emptying the buffers and cache reduces performance! If you're here because you thought that freeing buffers and cache was a positive thing, go and read . The short story: free memory is unused memory is wasted memory.


I am trying to find the average time complexity for the Fibonacci series using mathematical approach.  The best case is O(1), while the worst case is O(2^n). The Average case can be found by dividing the sum of times of all cases by the number of cases.  So, I believe that the average case can be found like this(using the sum of geometric series):    Thus, it should be still O(2^n) . Can you please tell me if my calculations and approach are correct?  The sample code for the Fibonacci() is shown below.  def Fibonacci(n):      if n==1:          return 0     elif n==2:          return 1     else:          return Fibonacci(n-1)+Fibonacci(n-2)

I understand Big-O notation, but I don't know how to calculate it for many functions. In particular, I've been trying to figure out the computational complexity of the naive version of the Fibonacci sequence:  int Fibonacci(int n) {     if (n <= 1)         return n;     else         return Fibonacci(n - 1) + Fibonacci(n - 2); }   What is the computational complexity of the Fibonacci sequence and how is it calculated?


I know that Ubuntu is secure, but I'm worried about my passwords when I login to my yahoo email, or my facebook. Do I need an antivirus on Ubuntu to be password protected when navigating over the internet?

I thought that there was no need to scan for viruses either in Ubuntu or any Linux distros until I found virus scanner packages clamtk and klamav in Ubuntu software center yesterday.  This leads to the following questions:   How do viruses differ between Linux and Windows? How do the strategies for protection differ between Linux and Windows? Should a virus scanner package be installed on my system? If so, which would be a better option?


Let's say I have a string like this:  $css = '.class {     color: red; }  /* Start Comment */ .replace {     content: "me"; } /* End Comment */';   How can I remove everything inside the comment, including the comment itself?  I want this result:  .class {     color: red; }   I've tried something like this, but it doesn't do it:  $css = preg_replace( '#(/* Start Comment */).*?(/* End Comment */)#', '', $css );   I've also tried this:   Am I missing something ridiculously obvious here?  Really appreciate any feedback - regex is something I need to study further.

For example, this regex  (.*)<FooBar>   will match:  abcde<FooBar>   But how do I get it to match across multiple lines?  abcde fghij<FooBar>


I want to install a new version of Ubuntu without deleting my old apps and without changing my system settings. How can I do that?

Question is about Ubuntu release process. Are migrations from n to n+1 releases expected?  Assuming we have server with installed Ubuntu 14.04 LTS. Will it be smoothly upgradable to Ubuntu 16.04 LTS via apt-get upgrade ?  Assumptions:   scope is software therefore we assume that given hardware is supported on both releases (upgrading from and to) that's why, always before upgrade you are asked to make backup to be able to revert in case of failure


This might sound little lame,   Anybody please explain(if possible with example)  what is a good photograph ? How we can decide a photo which is good ? for an example if you are in a Deciding panel how you would decide or elect a photo as winner of a photography contest ?  What are the technical aspects that we need to consider ?   Not considering taste here   How actually judges judge theses photos.  Thanks in advance.

I don't know if this is a stupid question, this just came across my mind.  Imagine a photo of a dog yawning.  Someone could say that is a very good photo as it is taken just at the right moment, from a perfect angle (eg. level with the dog) and it has a shallow depth of field focusing on its face.  Someone else might dislike it because unfortunately the dog is ugly.  So from that example I could say people look at the following elements when judging a photo (but I could be wrong):   The timing (if it's taken at the right moment) The angle it's taken from (composition?) DOF (composition?) The subject (eg. whether the dog is pretty)   I am interested to know what experts think the elements you look at when judging whether a photo is a good photo.  Thanks in advance for your comments.


I am very new to Blender add-on development and having some trouble getting mine to actually show up and or enable    I want it to show-up here:    import os import bpy bl_info = {     "name" : "CudaParticals",     "author" : "Max Oltersdorf",     "description" : "Enables the use of NIVIDA CUDA for Large realistic Particle Simulations",     "blender" : (2, 80, 0),     "version" : (0, 0, 1),     "location" : "Properties", # This is a new tab in the "properties section"     "warning" : "IN EARLY DEVELOPMENT",     "category" : "SYSTEM"     #"wiki_url": "'https://github.com/OltersdorfTechnology/CudaParticals/wiki'",     #"tracker_url": "https://github.com/OltersdorfTechnology/CudaParticals/issues",     "support": "Testing", } from bpy.types import (     Operator,     Panel,     PropertyGroup, ) from bpy.props import (     BoolProperty,     EnumProperty,     Pointe # Define the interface class CudaParticlePanel(bpy.types.Panel):     bl_idname = "CudaParticle_Panel"     bl_label = "CudaParticle"     bl_category = "SYSTEM"     bl_space_type = 'PROPERTIES'     bl_region_type = 'WINDOW'    # bl_context = "CudaParticle"      def draw(self, context):             layout = self.layout          #scene = context.scene          layout.label(text= "CudaParticals Properties:")          #row = layout.row()         #row.operator("view3d.print_text", text = "Print text", icon='WORLD_DATA')         global custom_icons         self.layout.label(text="CudaParticle", # end define interface icon_value=custom_icons["custom_icon"].icon_id) # global variable to store icons in custom_icons = None classes = (     CudaParticlePanel, ) def register():     global custom_icons     custom_icons = bpy.utils.previews.new()     script_path = bpy.context.space_data.text.filepath     icons_dir = os.path.join(os.path.dirname(script_path), "Icons")     custom_icons.load("Tool_Icon", os.path.join(icons_dir, "Tool_Icon.png"), 'IMAGE')     from bpy.utils import register_class     for cls in classes:         register_class(cls) def unregister():     global custom_icons     bpy.utils.previews.remove(custom_icons)     from bpy.utils import unregister_class     for cls in classes:         unregister_class(cls)

I'm trying to add a new panel to show up in the particles section of the Properties Editor.   class CudaParticlePanel(bpy.types.Panel):     bl_idname = "CudaParticle_Panel"     bl_label = "CudaParticle"     bl_category = "SYSTEM"     bl_space_type = 'PROPERTIES'     bl_region_type = 'WINDOW'     bl_context = "PARTICLES"      def draw(self, context):             layout = self.layout         layout.label(text= "CudaParticals Properties:")         self.layout.label(text="CudaParticle")   I don't get any errors or warnings when running the code but my panel does not show up. Can anyone please explain different locations of the UI and how to put a panel there?


I'm using the Field Calculator in ArcMap and I need to create a unique ID for every storm drain in my county. An ID Should look something like this: 16-I-003  The first number is the municipal number which is in the column/field titled "Munic"  The letter is using the letter in the column/field titled "Point"  The last number is simply just 1 to however many drains there are in a municipality.  So far I have:  rec=0 def autoIncrement() pStart=1 pInterval=1  if(rec==0):   rec=pStart  else:   rec=rec+pInterval return "16-I-" '{0:03}'.format(rec)   So you can see that I have manually been typing in the municipal number, the letter, and the hyphens. But I would like to pull the first number and letter from the fields: Munic and Point so I don't have to manually type them in each time it changes.  I was hoping I could just put !Munic! and !Point! in my return statement before the .format(rec) or somehow work it in there.    I'm a beginner when it comes to python and ArcMap, so please dumb things down a little. The simpler the better!

So I'm relatively new to ArcGIS and ArcCatalog.  I have created a field name of PROJECTID in a feature class in a Personal Geodatabase.  The data type is TEXT.  This will be a ten digit ID.  The first five characters will be a acronym.  The sixth character will be a digit that represents the type of feature.  It will be a number.  The last four characters will be numbers that should be incremented starting at 0001.    Example:     WATER-1-0001  Screen shot of the field:   So my question is how can I do this in ArcCatalog.  I've seen some Python code that will autoincrement like the following:  rec=[OBJECTID] def autoIncrement(a):   global rec   return "water" + str(a) + "-" +  format(rec, '04d')   Again I'm a newbie when it comes to ArcGIS . Now I am getting an error NameError name 'OBJECTID' is not defined.


I am concerned on this interesting question     Given matrix $A$, does the Jordan cardinal form have the most zeros, in other word, it has the least nonvanishing indices, among the equivalent class of similarity.    I can prove this argument for diagonalizable matrices and nilpotent matrices as follow. Now fix $n$, the size of $A$.    If $A$ is diagonalizable, then its Jordan cardinal form is nothing but diagonal matrix. Thus the gross number of zeros is $n^2-r(A)$. If a matrix $B$ has more indices vanishing, more than $r(A)$ columns will be complete zero.  If $A$ is nilpotent, then the total number of nonvanishing indices of cardinal form is no more than $n-1$. Assume $B$ has less indices without vanishing, we claim that by change the order of rows and columns, $B$ is in the form of $\left(\begin{matrix}B_1 & \\ & B_2\end{matrix}\right)$, and then we can use induction on $B_1$ and $B_2$. Now, we are going to illustrate this claim. Otherwise, we can find some indices $(1,i)$ or $(i,1)$ with $i\neq 1$ nonvanishing. By change of order, we can assume $i=2$. Then, we can find some indices $(k,j)$ or $(j,k)$ with $k\in \{1,2\}$ and $j\notin \{1,2\}$, and similarly, we can assume $j=3$. Just proceeding this process, finally, we will find that $B$ cannot have nonzero indices less than $n-1$.    It seems to be subtle when dealing with general case. Even for the matrix similar to a single Jordan block, I cannot figure out a proof.   Denote $\# A$ to be the number of nonvanishing indices. A nearly trivial observation may be useful  $$\# (A+B)\leq (\# A)+(\#B)\qquad \#(AB)\leq (\# A)\cdot (\# B)$$

The Jordan and Frobenius normal forms of a linear map $A:\Bbb R^n \rightarrow \Bbb R^n$ seem to be maximally simple representations of $A$ in the sense that one of them contains as few nonzero entries as possible. But how do you prove that?   More precise, show that for every $A:\Bbb R^n \rightarrow \Bbb R^n$ and every Basis $B$ of $\Bbb R^n$, the transformation matrix $_B A _B$ has at least as many nonzero entries as the Jordan normal form or the Frobenius normal form of $A$ or, otherwise, give a counterexample.


Our instance has some triggers that fire before insert and before update on accounts, contacts, and leads.   In a test class, if I am creating test records will the insertion of new account records cause a DML to run and therefore error when trying to make a subsequent callout (You have uncommitted work pending) even if I am using @TestSetup to create those records?   The batch class calls another class which actually performs the callout (just an http request that returns a string)     Global Class FocusDomainBatch implements Database.Batchable<sObject>, Database.allowsCallouts {     global Database.querylocator start(Database.BatchableContext BC)     {         String query = 'Select id,name, First_user_sign_up_date__c, Total_Users__c, New_Users_In_Last_Month__c, Avg_Fvrt_Pro_Per_User__c, Users_with_zero_fvrts__c, Users_with_2_or_less_fvrts__c, Average_daily_queries__c, Average_monthly_queries__c, Total_current_month_queries__c, Total_Queries__c from Focus_Domain_Stats__c';         return Database.getQueryLocator(query);         }      global void execute(Database.BatchableContext BC, List<sObject> scope)     {         try         {            List <Focus_Domain_Stats__c> allDomains = scope;                      List <string> web = new List <string>();             for(Focus_Domain_Stats__c c : allDomains)            {                system.debug('FocusDomainBatch:execute for ' + c.Name);                web.add(c.name);            }              FocusAPI fi = new FocusAPI();//actually performs the callout            String Token = fi.getToken();//failing here            String stm = String.valueof(Date.today().toStartOfMonth())+' 00:00:00.000Z';            stm = stm.replace(' ', 'T');            List <String> dm = new List<String>();   Test Class:   @IsTest  Public Class TestFocusDomainBatch2 {     @testSetup static void setupTestData(){          //Setup Data          Lead ld = new Lead();         ld.lastName = 'kitagawa';         ld.email = 'justin.kitagawa@test.com';         ld.company = 'test';         ld.website = 'test.com';         ld.focus_user__c = TRUE;         ld.Focus_Sign_Up_Date__c = date.today();         insert ld;           Focus_Domain_Stats__c ds = new Focus_Domain_Stats__c();          ds.name = 'test.com';         insert ds;           Lead ld2 = new Lead();         ld2.lastName = 'kitagawa';         ld2.email = 'justin.kitagawa@test.com';         ld2.company = 'test';         ld2.website = 'test.com';         ld2.focus_user__c = TRUE;         ld2.Focus_Sign_Up_Date__c = date.today();         insert ld2;           Account acc = new Account();          acc.name = 'test';          acc.website = 'test.com';         acc.Focus_Domain_Stats__c = ds.id;         insert acc;          Contact ctc = new Contact();         ctc.lastName = 'kitagawa';         ctc.email = 'justin.kitagawa@test.com';         ctc.account = acc;         ctc.accountid = acc.id;         ctc.Focus_Sign_Up_Date__c = date.today();         insert ctc;           Contact ctc2 = new Contact();         ctc2.lastName = 'kitagawa2';         ctc2.email = 'justin.kitagawa2@test.com';         ctc2.account = acc;         ctc2.accountid = acc.id;         ctc2.Focus_Sign_Up_Date__c = date.today();         insert ctc2;          Focus_Product__c fp = new Focus_Product__c();          fp.Contact__c = ctc.id;          fp.Lead__c = ld.id;          fp.name = 'test product';         insert fp;     }      Static testMethod void TestFocusDomainBatch ()     {                     Test.StartTest();             //set mock                   Test.setMock(HttpCalloutMock.class, new MockHttpResponseGenerator1());              Database.executeBatch(new FocusDomainBatch());             Test.StopTest();            } }

I'm trying to write test code for a Batchable class that AllowsCallouts.  I've written a lot of other test code that uses HttpCalloutMock classes, and planned to do so for this class as well.  And, per best practices, I'm setting up my test data before calling Test.startTest().  Even so, I get a CalloutException:     System.CalloutException: You have uncommitted work pending. Please commit or rollback before calling out   This somewhat makes sense, because my start() method passes a SOQL query to Database.getQueryLocator() and my execute() method makes the web callouts.  I'm guessing that when my test method calls test.stopTest(), both start() and execute() run in the same context.  In regular batch operation, they happen in separate contexts so there isn't any uncommitted work.  I intend to work around this by calling the methods directly, possibly even calling start() before Test.startTest(), and then using the returned Database.QueryLocator to get the list of records I'll pass into execute().  I don't like the fact that I'm not testing the batch size used by the static method that kicks off the batch with Database.executeBatch(), so I'll probably have that use a constant that I can reference from my test code to ensure it's using the same batch size.  Salesforce kind of addresses this in the "Asynchronous Apex and Mock Callouts" section of the , but they don't make reference to Batchable classes with Callouts.  They only talk about making callouts and testing Batchable classes in the same test method.  So, my question is whether there is a better way to write this test.  I'm also throwing this out so others searching the site can learn about possible workarounds.


How many algebraic operations can be defined on a set S with n elements and how many of them are comutative.  Ok so I know that a algebraic operation is a law (let's say *) such that $*:S\times S \rightarrow S$. So for each pair of the cartesian product associate a element from S. I was thinking like this: Let $A = \{i \in \mathbb{N}|1\leq i \leq |S \times S|\}$, and let $A' = \{\overline{a_1a_2...a_n}\|n = A \ and\ a_i \in A, \forall i = \overline{1,n}\}$. So the cardinal of A' is the answare.

I am trying to solve following problem but not able to find any way to proceed.  Let $S$ be a set having $n$ elements. Can we count about number of binary operations that can be defined on a set? Can we also count number of commutative binary operations defined on  $S$?  Thanks for the help and suggestions


I have some figures like this:  I want to use one caption for each pair like the figure. Note: I can not use the subfigure and subcaption package. Best

I want to delete (a) and (b) from the subfigure and put the only one (a) in the middle of the subfigure like this. could anyone help me? thank you I want something like this:


Suppose $f$, $g$, $h$ are functions from the set of positive real numbers into itself satisfying $f(x)g(y)=h(\sqrt{x^2+y^2})$ for all $x$, $y\in (0,\infty)$.  Show that the functions  $g(x)/h(x)$, $h(x)/f(x)$ are constant.  I've already shown $f(x)/g(x)$ constant by showing the derivative of $f(x)/g(x)$ to be zero. But I'm not getting how to proceed for $g(x)/h(x)$ and $h(x)/f(x)$. I've already tried by applying the definition of derivative for the latter, but of no use.  Are there some special properties for the functions with open intervals as domain and codomain? Please help me solve this. Any suggestions are heartily welcome. Thank you(:>)

Suppose $f,g,h$ are functions from the set of positive real numbers into itself satisfying $f(x)g(y)=h(\sqrt{x^2+y^2})$ for all $x,y\in (0,\infty)$.   Show that the functions  $f(x)/g(x), g(x)/h(x),h(x)/f(x)$ are constant.  I guess this is equivalent to prove that their derivatives are zero.  $\left(\frac{f(x)}{g(x)}\right)'=\frac{g(x)f'(x)-f(x)g'(x)}{\left(g(x)^2\right)}=0$ if and only if $g(x)f'(x)-f(x)g'(x)=0$ i.e., $g(x)f'(x)=f(x)g'(x)$.  For similar reasons, we must have $g(x)h'(x)=h(x)g'(x)$ and $h(x)f'(x)=f(x)h'(x)$ for all $x$...  I was trying to consider $f(x)g(x)=h(x\sqrt{2})$ which would imply $f(x)g'(x)+g(x)f'(x)=\sqrt{2}h'(x\sqrt{2})$.  I am lost from here...  Help me to solve this...  I was thinking of taking the step from first principles..  We have $$\left(\frac{f(x)}{g(x)}\right)'=\lim_{t\rightarrow 0}\frac{1}{t}\left(\frac{f(x+t)}{g(x+t)}-\frac{f(x)}{g(x)}\right)=\lim_{t\rightarrow 0}\frac{1}{t}\left(\frac{f(x+t)g(x)-g(x+t)f(x)}{g(x+t)g(t)}\right)=\lim_{t\rightarrow 0}\frac{1}{t}\left(\frac{h(\sqrt{(x+t)^2+x^2}-h(\sqrt{(x+t)^2+x^2}}{g(x+t)g(t)}\right)=0$$  So, $f(x)/g(x)$ is constant function..


The question I posted earlier wasn't clear and I was myself un-aware of the exact problem so I didn't get any responses. After a while I was able to figure out the problem (but still looking for a solution) so I edited the question (it's almost a different question now) and I think the updated question makes much more sense for someone who could answer it.  This is the question:    But, I'm not sure whether updating a question is able to attract people's attention again. So, is it better to post a new one (and may be delete the old one?)

What do you do when you want to ask a question, but find an exact duplicate that doesn't actually have a useful answer? This has happened to me multiple times in the past, so I figure it probably happens to others as well and is therefore worthy of discussion.  To give a recent example: I wanted to find an answer of mine that I'd deleted on SO, so I searched meta to see if this was possible. I found that someone had , but it doesn't have any (real/useful) answers. Now, in this case the real "answer" is probably just "you can't", but it's also entirely possible that things have changed since the question was asked.  So, how do I go about getting an answer to my question?  A few obvious options are (with associated problems):   Bump the old question by editing it (or its tags)   not possible for low rep users creates revision noise  Bump the old question by adding an answer   creates unnecessary noise  Just ask the duplicate question   more noise duplicate will probably just be closed anyway     been [status-planned] since July, so may never actually be possible your question may not be so burning that you want to create a bounty (especially for a low rep user), but that doesn't mean the question has no value    & of course I'm sure someone will close this as a duplicate of an old, stale, unanswered question just for the beautiful irony (I did search, but didn't find anything).


In  to   , it is established that Star Wars     humans are not related to us at all, though they are anatomically identical   And we clearly have encountered dozens of  of various sorts.  Are there any canonically established animals or insects in the Star Wars galaxy which are "anatomically identical" (as far as we can tell) to Earth animals?    Fine print: For the purpose of this question, I'm going to assume that a random background extra probably doesn't count unless there's a substantial reason to believe its appearance was intentional.   It would have to be referred to by an Earth name (like "human") and also look identical to an Earth animal, as far as we can reasonably tell.   In the case of an offhand mention of an animal without depiction, I would assume it might be an alien analog.

When I was a young teen, I really got into reading the few Star Wars novels that existed at that time.  After I exhausted the then current run of books (there were only about 5 or 6 of them), I decided to read the novelizations of the original trilogy.  I no longer own those novels so I can't look up the reference, but I recall that during the beginning of A New Hope, when Luke and Obi-Wan rode into Mos Eisley on Luke's land speeder, Lucas mentioned something of there being a "dog barking".  This always struck me as odd because this was a reference to an animal from Earth in a universe where clearly most creatures were completely unique.  After noticing the reference to a dog I then noticed on my next viewing of ESB that there was a snake on Dagobah.  This has made me curious for years.  What other Earth-based creatures have made their way into the "official" Star Wars universe and where do they appear?


I'm unsurprisingly confused:  If I exercise ISOs in Jan 2017 and sell them in Feb 2018, how is income reported for AMT purposes and profit reported for cap gain purposes -- are BOTH reported on my 2017 return, even if the shares were sold in 2018 (but before April 15)?  Or, must I report for AMT purposes in 2017, and on my 2018 return, will I report some kind of adjustment due to the fact that the shares were sold at a different FMV than when they were exercised?

So I have some ISO stock options (yeah) and three kids in college (boo) so I'm trying figure out the best tax strategy. I was hoping someone help me through the following scenario  Strike Price: $10, 2014 exercise price: $20, 2015 price: $25, 2016 price $30   Lets' assume that all of this happens 2+ years after the grant date and that my "normal" tax bill is right on the brink of the AMT threshold, that the AMT tax rate is 28% and the long term capital gains tax is 15%.   Now I want to run the following scenario  2014: exercise 1000 options 2015: exercise 1000 options, sell the previous years' option after "one year and one day" 2016: sell the 2015 options after "one year and a day"    Tax wise that would look like this  2014: AMT on $10000 of bargain element so $2800 AMT 2015: AMT on $15000 bargain element $4200, long term gain tax on $15000 = $2250 2016: long term gain tax on $20000 = $3000    What's the overall tax liability in each year? I can't figure out how the AMT carries forward when the options are finally sold.   Any good pointers to modeling software, spreadsheets or decent papers would also be appreciated.


I have been looking for vulnerabilities in Windows 8 and Windows 7, and would like to report them to Microsoft.   Some are extremely important including one that compromises the user's key store without asking for the admin's password.   How can I report these vulnerabilities to Microsoft?

I have come across an issue that I feel is a  in Windows 7. What is the official process for submitting an issue to Microsoft from a consumers perspective as an end user of Windows?


I have Windows 8 installed on my Lenovo E4325 Laptop... I want to install Ubuntu as a dual boot... Please anyone let me know do i need to install any additional drivers or are the drivers comes with the OS after installing the Ubuntu version...If Yes, How?

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I'm facing a quite new situation. I'm not an expert about charset, but as far as I know, all the chain should use the same encoding system.  If I put accents directly in the html code, they'll look fine. However, when I fetch data from my mysql database, all of them will be displayed like this : �, no matter if I echo them in the body or using scripts.  On the page, I have set this :  <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr"> <head> <?php header('Content-Type:text/html; charset=UTF-8'); ?> <?xml version="1.0" encoding="UTF-8"?> <meta charset="UTF-8"> <meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>   Regarding the database : the server uses UTF-8 Unicode (utf8) utf8_general_ci The table utf8_general_ci The fields utf8_general_ci  I'm running out of ideas.

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'm learning my way into some more advanced programming with PHP.  I've seen that calling an non-existent method produces "call to undefined method" error.  PHP being quite flexible is there a technique that allows to intercept this error ? If so, how is this usually done ?  Edit: To clarify, I want to actually do something when the error occurs like send a reply back, not necessarily prevent it. Forget to mention that this is in the context of a class. Of course, methods only apply in the context of a class ;)

I can use set_error_handler() to catch most PHP errors, but it doesn't work for fatal (E_ERROR) errors, such as calling a function that doesn't exist. Is there another way to catch these errors?  I am trying to call mail() for all errors and am running PHP 5.2.3.


I have a requirement in which I have to invoke a private method of an abstract class.   Let's say the abstract class looks like below:-  public abstract class Base {      protected abstract String getName();      private String getHi(String v) {         return "Hi " + v;     } }   Can some let me know is there a way I can call getHi (may be via Reflection or some other means) so that I can test it out? I am using Junit 4.12 and Java 8  I have gone through this  but here the methods are not private in the abstract class.  I have also gone through this  even this one does not talk about private method in abstract class.   I am not asking here whether we should test the private method or not or what is the best strategy for testing private methods. There are lot of resources available in the web regarding this. I am just trying to ask how should we invoke a private method of an abstract class in java.

How do I unit test (using xUnit) a class that has internal private methods, fields or nested classes? Or a function that is made private by having  (static in C/C++) or is in a private () namespace?  It seems bad to change the access modifier for a method or function just to be able to run a test.


I am trying to run this command: sudo apt-get update && apt-get upgrade  but I keep getting these errors E: Could not open lock file /var/lib/dpkg/lock-frontend - open (13: Permission denied) E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), are you root?  I read in another answer that by using sudo these errors will be solved. But in my case I'm already using sudo. How to solve these errors?

I get this error whenever I try to install programs using the terminal:  home@ubuntu:~$ apt-get install myunity E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?   Also I'm unable to install updates using the terminal.


In Google Sheets, when referring to another worksheet in a formula, is there a way to insert the text value of a cell as the name of the sheet to be referenced? It is essentially a data collation table for school information, and I have separate worksheets for each class group, which auto-fills back to a common sheet in the document. I have already done this all successfully, however when creating new classes I currently have to redo all of the formulas. For ease of use, I want to have a string value in a cell on the common worksheet, use this to reference the correct sheet on the fly, and therefore need only create the new sheet and change the value in the aforementioned cell to match - thus not having to re-code all the formulas!  Let me know if I can clarify this any further.

Google says in their web help how to reference data from another sheet, but what happens if what I need is to make the reference depending on my fields on the current sheet?  Let's say I have a sheet named 'Sheet1' and a sheet named 'Sheet2'. And on my current sheet (results) I have a column where I'll place the name of each sheet:  On Cell A1 value is: Sheet1 On Cell A2 value is: Sheet2 and so.  I want to have Cell B1 to get some data from the sheet quoted in A1 (i.e.Sheet1): =Sheet1!$AC$1  I want to have Cell B2 to get some data from the sheet quoted in A2 (i.e.Sheet2): =Sheet2!$AC$1  ...and so on (for that, I need to copy down the formula with reference to column A content, to say, the corresponding sheet)  In summary: the formula should include reference to a VARIABLE sheet. I've tried with both =concatenate() and also with =indirect() but no success...  Is it possible?


Using common bash tools as part of a shell script, I want to repeatedly insert a newline char ('\n') into a long string at intervals of every N chars.  For example, given this string, how would I insert a newline char every 20 chars?  head -n 50 /dev/urandom | tr -dc A-Za-z0-9   Example of the results I am trying to achieve:  ZL1WEV72TTO0S83LP2I2 MTQ8DEIU3GSSYJOI9CFE 6GEPWUPCBBHLWNA4M28D P2DHDI1L2JQIZJL0ACFV UDYEK7HN7HQY4E2U6VFC RH68ZZJGMSSC5YLHO0KZ 94LMELDIN1BAXQKTNSMH 0DXLM7B5966UEFGZENLZ 4917Y741L2WRTG5ACFGQ GRVDVT3CYOLYKNT2ZYUJ EAVN1EY4O161VTW1P3OY Q17T24S7S9BDG1RMKGBX WOZSI4D35U81P68NF5SB HH7AOYHV2TWQP27A40QC QW5N4JDK5001EAQXF41N FKH3Q5GOQZ54HZG2FFZS Q89KGMQZ46YBW3GVROYH AIBOU8NFM39RYP1XBLQM YLG8SSIW6J6XG6UJEKXO   A use-case is to quickly make a set of random passwords or ID's of a fixed length. The way I did the above example is:  for i in {1..30}; do head /dev/random | tr -dc A-Z0-9 | head -c 20 ; echo ''; done   However, for learning purposes, I want to do it a different way. I want to start with an arbitrarily long string and insert newlines, thus breaking one string into multiple small strings of fixed char length.

I've got a long line that I want to insert a space every 4 characters, on a single lone line of solid text to make it easier to read, what's the simplest way to do this? also I should be able to input the line from a pipe. e.g.  echo "foobarbazblargblurg" | <some command here>   gives  foob arba zbla rgbl urg


What is the difference between classical spin and quantum spin?

I often hear about subatomic particles having a property called "spin" but also that it doesn't actually relate to spinning about an axis like you would think. Which particles have spin? What does spin mean if not an actual spinning motion?


I am in the process of setting up mass email service.  My question is: what are the best practices to achieve maximum deliver-ability.   More precisely - what should I do/know to prevent spam filters from blocking the emails (the emails are not spam).  for example- how can I tell if my IP address is blacklisted somewhere and how can I prevent it from becoming blacklisted. Is amazon web services a suitable platform due to dynamic IP addresses, what are the restrictions on the from address, can it be different from the mail server domain.... you get it....

This is a  about how to handle email sent from your server being misclassified as spam.  For additional information you may find these similar questions helpful:                    Sometimes I want to send newsletters to my customers. The problem is, that some of the emails get caught as spam messages. Mostly by Outlook at the client (even in my own Outlook 2007).  Now I want to know what should be done to create "good" emails. I know about reverse lookup etc., but (for example), what about a unsubscribe link with an unique ID?  Does that increase a spam rating?


I want to edit (retag) a question with an edit pending. Normally, I would just review/accept/improve the pending edit, but I've already hit my review limit for the next couple of hours. Is there any way to still get around the pending edit, or do I just have to wait until somebody else reviews the edit?

I have faced this problem earlier. But today I got to face this problem twice in a span of couple of minutes.. I have unfortunately finished my daily quota of reviewing Suggested Edits. But I want to further edit a post for which an edit has already been suggested by another user having less than 2000 Reputation.  I come across a post and it says that an edit has already been suggested which is pending for Review:   I click on edit (1) and a pop-up of Suggested Edit appears:    However, the problem is this Suggested Edit doesn't thoroughly deal with the post. It just fixes some capitalization and nothing else — no grammar fixes, no sentence restructuring to make it more clear, no code formatting, no dividing it into lists, etc. — in short, perfect candidate to be rejected. (The image for the suggested-edit I have uploaded didn't have those problems - however, there were those problems in the edits that I encountered earlier.) The problem before me is that I am helpless. I can't approve, reject or improve the edit since I have already gone past my daily quota of Reviewing them. Neither can I make the edits to the post since this suggested edit is pending review. I am completely helpless!! Whats the opinion of the community in this matter?  Should we (those with more than 2000 Rep) be able to edit them? Don't count it in our Review Progress obviously - not sure what should be done with the suggested edit already proposed.  Or, Let it be, someone else would come and edit them and other Reviewers would deal with the Suggested Edit appropriately.  Or, Something else.    Note: This might not be much of a problem for Stack Overflow since the Review Queue is very busy here. However, this is a bit of a problem for smaller sites. So, treat it as a question posted at Meta.SE and not so much at Meta.SO.  Dirty Hack: Ah... found a dirty hack to work around this situation. However, this shouldn't be used unless absolutely necessary. Credit goes to  in . To edit a post enter this link in your browser: http://${site_url}/posts/${post_id}/edit. So, to edit this particular post one would enter: http://meta.stackoverflow.com/posts/171129/edit. I repeat, the hack shouldn't be used unless necessary.


a few days ago I ran into a  issue after downloading some updates. Since then I've been searching for information and trying countless procedures to solve it, to no avail.  Here's some info which I hope will be useful:   My computer: a 2008 Packard Bell PC, Intel Core 2 Quad CPU 2.4 GHz processor, 4 GB of RAM, Geforce 9300 GE graphics card. Kernel version: 3.13.0-46-generic Ubuntu version: 14.04.2 LTS   At a very high level here's what I've tried so far:    uninstalling then reinstalling Vidia drivers, installing X Updates PPA, installing Gnome interface (which I actually can't even access)   Please advise, your help will be greatly appreciated.  March 01st Update:  Hello, here are today's results:   compizconfig-* worked, thanks very much The 1st solution of thread 17381 didn't restore the GUI but displayed  compizconfig - Info: Backend : ini compizconfig - Info: Integration : true compizconfig - Info: Profile : default Segmentation fault (core dumped)  the 2nd solution of thread 17381 returned (I'm just quoting what I think can help, ie the error messages):   Glib-warning **: In call to g-spawn-sync(), exit status of a child process was request but ECHILD was received by waitpid(). Most likely the process is ignoring SIGCHLD, or some other thread is invoking waitpid() with a non positive first argument; either behavior can break applications that use g_spawn_sync either directly or indirectly.  dconf-WARNING **: failed to commit changes to dconf: Error spawning command line  'bus-launch --autolaunch=dfa6290d0169f2653223ea790000000000c --binary-syntax-- close-  stderr': Child process killed by signal 43 (...) Info: Unity is fully supported by your hardware Info: Starting plugin: openg1    I didn't try creating a script as suggested in thread 457016 as I know I'll make a mess of it, especially through CLI. It seems like we're doing good progress but there's still a few hurdles on the way :)  March 01st Update #2:  I tried running startx and I could see the desktop and the files that are located there, however I have no wallpaper (but a blue background) and no taskbar and vertical iconbar. I can open the text files but not the pictures.

When I login, nothing happens.   I am presented with my desktop wallpaper.    No Dash, no Launcher, nothing.


If a stick of unit length is broken randomly at two points, to make 3 pieces of stick. What is the expected value of the largest stick.   Is there an elegant solution to this problem?  Thanks.

This post is related to a previous SE post  concerning average length of a smallest segment.  A rope of 1m is divided into three pieces by two random points. Find the average length of the largest segment. My answer is 11/18.  Here is how I do it:  Here we have two independent random variables $X,Y$, both uniform on $[0,1]$. Let  $A=\min (X,Y), B=\max (X,Y)$ and $C=\max (A, 1-B, B-A)$. First we want to find the probability density function $f_C(a)$ of $C$. Let $F_C(a)$ be the cumulative distribution function. Then $$ F_C(a) = P(C\le a)=P(A\le a, 1-B\le a, B-A\le a).$$  By rewriting this probability as area in the unit square, I get $$F_C(a)=\left\{\begin{array}{ll} (3a-1)^2 & \frac{1}{3}\le a\le \frac{1}{2}\\ 1-3(1-a)^2 & \frac{1}{2}\le a\le 1\end{array}\right.$$ from which it follows that  $$f_C(a)=\left\{\begin{array}{ll} 6(3a-1) & \frac{1}{3}\le a\le \frac{1}{2}\\ 6(1-a) & \frac{1}{2}\le a\le 1\end{array}\right.$$ Therefore the expected value of $C$ is $$\int_{1/3} ^{1/2}6a(3a-1) da+\int_{1/2} ^{1}6a(1-a) da= \frac{11}{18}.$$  My questions are:  (A) Is there a "clever" way to figure out this number 11/18?  (B) What is the answer if the rope is divided into $n>3$ segments?


I need this symbols used by Boole and Peirce, any ideas?

Is there a symbol that looks like the element sign $\in $ but instead of being curved, looks more like a less than sign $< $? I have trawled through hundreds of symbols and tried detexify.


im trying to display an li via ajax, but the problem is when i clicked the link the container is not popping up. But when i tried to just display it simple html it's working. Can someone help me to find what's the cause of this why it's not working?  here's the output when i tried to run on a simple html. It worked.    the div.

   ajax script  $(document).ready(function() {   loadnotif();   $("#notificationLink").click(function() {     $("#notificationContainer").fadeToggle(300);     $("#notification_count").fadeOut("slow");     return false;   });    //Document Click hiding the popup    $(document).click(function() {     $("#notificationContainer").hide();   }); });  function loadnotif() {   $.ajax({     url: 'getrecords.php',     method: 'POST',     data: {       "loadnotif": 1     },     success: function(data) {       $('#notificationsss').html(data);     }   }); }   getrecords.php   if(isset($_POST['loadnotif'])){            $output = '

                                                   1

Notifications

Rommel Deauna Uploaded a Lecture on
Computer Security

November 12, 2016 5:06PM

See All

';            echo $output;     }

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.


First of all I only mean books, not the movies please.  To begin with, here is  - it doesn't reflect Draco's case though. I do not ask what he wears under his robes, I ask if he can be seen walking around dressed like a Muggle somewhere in the books.  So here is what I found on Draco wearing school robes:     He pulled the robes over his head and threw them onto the floor at Madam Malkin's feet... And with that, the pair of them strode out of the shop..   So apparently he was trying his new robes on some causal closes. It would do with a jeans a t-shirt I think, but trying on robes on top of other robes doesn't make much sense. Was Draco doing his shopping on the Diagon Alley in Muggle clothing?!  And later on the train:     To his relief, Malfoy seemed to decide that he had imagined the noise; he pulled on his robes like the others...   He pulled his robes on what? There was Pancy in the compartment and seemed like they changed all together. So were they in Muggle clothes, wearing their robes on those as Ron and Harry apparently do? Or did they have to change their common robes to the school ones?  Now I was thinking - do Pure-blood families arrive to the train station in their wizarding clothes? It seems against the Statute of Wizarding Secrecy, does it mean every year all Pure-bloods have to wear Muggle clothes to take their children to the station? Say, Lucius Malfoy?  We see at the and of The Order of the Phoenix that a whole bunch of adults waiting for Harry at the platform are dressed in Muggle clothing:     There was Mad-Eye Moody, looking quite as sinister with his bowler hat pulled low over his magical eye as he would have done without it, his gnarled hands clutching a long staff, his body wrapped in a voluminous travelling cloak. Tonks stood just behind him, her bright bubble-gum-pink hair gleaming in the sunlight filtering through the dirty glass of the station ceiling, wearing heavily patched jeans and a bright purple T-shirt bearing the legend The Weird Sisters. Next to Tonks was Lupin, his face pale, his hair greying, a long and threadbare overcoat covering a shabby jumper and trousers. At the front of the group stood Mr and Mrs Weasley, dressed in their Muggle best, and Fred and George, who were both wearing brand-new jackets in some lurid green, scaly material.   Though it could be they did it only this time because they intended to talk to the Dursleys. Or not? When Harry first meets the Weasleys on the platform he never notices their clothes, only their talk about Muggles and their owl.     Harry swung round. The speaker was a plump woman who was talking to four boys, all with flaming red hair. each of them was pushing a trunk like Harry's in front of him - and they had an owl. Heart hammering, Harry pushed his cart after them.   Does it mean all wizards obliged to dress as a Muggle when going to the platform and the Malfoys every year appear there in Muggle clothes?   Or Muggle wear is not a big deal for the new generation and Draco does occasionally wear Muggle clothing (like, in Diagon Alley) without considering it to be beneath him?

In the movies, they wore ties and really nice shirts, but I don't think that's how it was in the books?    What do wizards and witches wear under their robes?


I want to create the shortcuts:    Super: Run dmenu  Super← Left arrow: Move current window to the left   I have both of them working, however when I depress  Super it opens dmenu right away. When I then press ← Left arrow, it moves the window.  Instead, I want pressing  Super and ← Left arrow without releasing  Super to move the window. dmenu should only start when  Super is pressed and released on it's own.  Is this possible? I know that it works well in gnome-shell and cinnamon, so there has to be a way.

I want to have my super key start dmenu. I have set it as a keyboard shortcut in my rc.xml as follows:  <keybind key="0xffeb">       <action name="Execute">         <command>dmenu_run</command>       </action> </keybind>   I tried specifying it in the key attribute as W, W-, and 0xffeb, but none of these worked. W responds to pressing the letter w, and the others appear to do nothing.  I want the shortcut to trigger when the super key is pressed and released on it's own. Is this possible?    This is  from super user as per the . I've read this question: , but I didn't see any useful information in it.


Consider a simple model: Y = A + B + A*B  Is it possible that coefficient for A*B is significant while that for A or B or both of them is insignificant? Either yes or no, can you tell what's the reason behind it?

I am using linear mixed models to identify important factors, and it turns out that:   A: significant  B: not significant A×B: significant   Does it mean that because A×B shows that the effect of A depends on the effect of B, only the effect of A is not actually significant?  I have read many sources, and they seem to suggest that if the effect of A×B is significant, then we cannot interpret that the effect of A is significant on our dependent variable. Am I understanding right?


I have 700 reputation in StackOverflow right now. Once I've reached 500 rep I've got an opportunity to review first posts and do the triage. But now for some reason I can't do that. The inscription "There are no review queues available to you" is standing for several days.  I didn't get any message like "you were banned" or smth. And I didn't do anything wrong - there's only 1 bad flag (which was a mistake), I do not downvote every post, etc.  What can be a reason of that?

When I am review-banned, the direct effect is that when I click the review icon in the top-bar, I get this:        This doesn’t tell me anything about what's going on, just that all review queues have miraculously become unavailable to me. It doesn't show that it's because I've been banned, or why I've been banned, whether it's for failing audits or whether there is a custom message supplied by a moderator. Only when I new-tab-click that button, it takes me to /review, or when I manually navigate there, I get :        This is confusing for review-banned users who use the dropdown in their standard workflow (). I only performed the above test to reproduce the experience of a confused review-banned user on a site I moderate.  Please replace the dropdown message with something more informative in case of a review ban.


If I cast Silent Image on a boat, does it move with the boat or do I have to use an action to make it move with the boat?  The situation is this, my party is floating down a large river and I want to be able to use the Silent Image spell on the canoe to make it look like a large tree floating down the river to anyone from the tree line.   My assumption is that because I've placed the illusion on the floor of the canoe, it will just stick with the boat and I do not need to use an action to move it because the illusion is not moving but rather the canoe is moving and the illusion is just place on the canoe.   Of course, the illusion isn't perfect because part of the tree looks like someone started carving the bottom of a boat out of it, and well the tree has oddly positioned branches that obscure much of the part of the tree (where the ores might be seen while the party paddles.), but it's a tree non the less, especially to the passive observer.

Recently it has come up at our table on the topic of centering a spell with an extended length, like sickening radiance, on a creature or something else that move. My table & I are unfamiliar with the ruling of centering spells on specific points.  If a caster casts a spell that centers on a point, and the spell continues for a period of time longer than 1 round, and makes the point a creature or something else that can move, would the spell move with that creature or object?


In my neighbourhood there are:   11 wifi signals on channel 1 2 wifi signals on channel 4 (including mine at the mo) 8 on channel 6 6 on channel 11   According to the  Mine on channel 4 will suffer interference from channel 1 and channel 6, so a total of 20 other networks(!).  So would I be better to join channel 11, even though my network is then in direct competition with the 6 others?  I suppose the question is: what's worse: direct interference (meaning that on the same channel) from 6 or fringe interference from many more networks?

I understand that 2.4GHz Wi-Fi channels overlap, and that the most popular non-overlapping set of channels in the US is 1, 6, and 11. Generally, my signal strength on channels 1, 6, and 11 are much stronger than my neighbors' on the same channel.  However, these channels usually have 4 or 5 APs already using them.  In this scenario, is it better to use 3, 4, 8, or 9?  Or is it better to use the crowded channels 1, 6, and 11? As a secondary question, does it even matter that my signal strength is much higher than theirs? Related:


Basically, I have this function that finds the last non-blank cell in a range while skipping columns I don't want it to search. The value is returned, but I want it to return the cell address (for something else I am trying to make work). Here is my formula:     =IF(ISERROR(INDEX({M5,N5,O5,P5,R5,S5,T5,U5,W5,X5,Y5,Z5,AA5,AC5,AD5,AE5,AF5,AH5,AI5,AJ5,AK5,AM5,AN5,AO5,AP5,AQ5,AS5,AT5,AU5,AV5,AX5,AY5,AZ5,BA5,BB5,BD5,BE5,BF5,BG5,BI5,BJ5,BK5,BL5,BN5,BO5,BP5,BQ5,BR5,BT5,BU5,BV5,BW5,BX5},MAX(({M5,N5,O5,P5,R5,S5,T5,U5,W5,X5,Y5,Z5,AA5,AC5,AD5,AE5,AF5,AH5,AI5,AJ5,AK5,AM5,AN5,AO5,AP5,AQ5,AS5,AT5,AU5,AV5,AX5,AY5,AZ5,BA5,BB5,BD5,BE5,BF5,BG5,BI5,BJ5,BK5,BL5,BN5,BO5,BP5,BQ5,BR5,BT5,BU5,BV5,BW5,BX5}<>"")*COLUMN(A5:BA5)))),"Error", (INDEX({M5,N5,O5,P5,R5,S5,T5,U5,W5,X5,Y5,Z5,AA5,AC5,AD5,AE5,AF5,AH5,AI5,AJ5,AK5,AM5,AN5,AO5,AP5,AQ5,AS5,AT5,AU5,AV5,AX5,AY5,AZ5,BA5,BB5,BD5,BE5,BF5,BG5,BI5,BJ5,BK5,BL5,BN5,BO5,BP5,BQ5,BR5,BT5,BU5,BV5,BW5,BX5},MAX(({M5,N5,O5,P5,R5,S5,T5,U5,W5,X5,Y5,Z5,AA5,AC5,AD5,AE5,AF5,AH5,AI5,AJ5,AK5,AM5,AN5,AO5,AP5,AQ5,AS5,AT5,AU5,AV5,AX5,AY5,AZ5,BA5,BB5,BD5,BE5,BF5,BG5,BI5,BJ5,BK5,BL5,BN5,BO5,BP5,BQ5,BR5,BT5,BU5,BV5,BW5,BX5}<>"")*COLUMN(A5:BA5)))))

Basically, I need to do what the title says on my spreadsheet here. So for row 3, I need to find the address of the last non-blank cell in that row, while skipping the grayed out columns (with the header "Total").


I want to be able to calculate the confidence interval from the estimated coefficient and respective standard errors.  I have a linear regression model which can be summarized (in R):  summary(fit1)  Call: lm(formula = bwt ~ height + weight + parity, data = data)  Residuals:     Min      1Q  Median      3Q     Max  -66.913 -10.624   0.991  10.979  55.621   Coefficients:             Estimate Std. Error t value Pr(>|t|)     (Intercept) 31.19217   13.56879   2.299   0.0217 *   height       1.24964    0.23083   5.414 7.48e-08 *** weight       0.06781    0.02823   2.402   0.0164 *   parity1     -1.83309    1.19838  -1.530   0.1264     --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 17.9 on 1170 degrees of freedom Multiple R-squared:  0.04898,   Adjusted R-squared:  0.04654  F-statistic: 20.08 on 3 and 1170 DF,  p-value: 1.071e-12   With this model I can calculate the respective confidence intervals:  > confint(fit1)                   2.5 %     97.5 % (Intercept)  4.57029503 57.8140351 height       0.79676227  1.7025207 weight       0.01243198  0.1231932 parity1     -4.18429933  0.5181151   I would expect the intervals of the predictor height to be given by  $$ 1.24964 \pm (1.96*0.23083) = [0.7972132,1.702067] $$  where 1.24964 is the estimated value for the coefficient and 0.23083 is the standard error for this coefficient. The numbers are close but not quite the same.  What am I doing wrong?

Let's have some linear model, for example just simple ANOVA:  # data generation set.seed(1.234)                       Ng <- c(41, 37, 42)                     data <- rnorm(sum(Ng), mean = rep(c(-1, 0, 1), Ng), sd = 1)       fact <- as.factor(rep(LETTERS[1:3], Ng))   m1 = lm(data ~ 0 + fact) summary(m1)   Result is as follows:  Call: lm(formula = data ~ 0 + fact)  Residuals:      Min       1Q   Median       3Q      Max  -2.30047 -0.60414 -0.04078  0.54316  2.25323   Coefficients:       Estimate Std. Error t value Pr(>|t|)     factA  -0.9142     0.1388  -6.588 1.34e-09 *** factB   0.1484     0.1461   1.016    0.312     factC   1.0990     0.1371   8.015 9.25e-13 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1   Residual standard error: 0.8886 on 117 degrees of freedom Multiple R-squared: 0.4816,     Adjusted R-squared: 0.4683  F-statistic: 36.23 on 3 and 117 DF,  p-value: < 2.2e-16    Now I try two different methods to estimate confidence interval of these parameters  c = coef(summary(m1))  # 1st method: CI limits from SE, assuming normal distribution cbind(low = c[,1] - qnorm(p = 0.975) * c[,2],      high = c[,1] + qnorm(p = 0.975) * c[,2])  # 2nd method confint(m1)   Questions:   What is the distribution of estimated linear regression coefficients? Normal or $t$? Why do both methods yield different results? Assuming normal distribution and correct SE, I'd expect both methods to have the same result.   Thank you very much!  data ~ 0 + fact  EDIT after an answer:  The answer is exact, this will give exactly the same result as confint(m1)!  # 3rd method cbind(low = c[,1] - qt(p = 0.975, df = sum(Ng) - 3) * c[,2],      high = c[,1] + qt(p = 0.975, df = sum(Ng) - 3) * c[,2])


Added a trigger which in turn calls a method in class but is failing. My error is:     Apex trigger MyTrigger caused an unexpected exception, contact your administrator: MyTrigger: execution of AfterInsert caused by: System.QueryException: unexpected token: 'TJ000000dsWeuMAE': ()   My trigger code:  trigger MyTrigger on Task (after delete, after insert, after undelete,  after update) {      MyClass c = new MyClass();      for (Task t : System.Trigger.new) {         if (Trigger.isUpdate)         {             c.UpdateTask(t);         }         else if (Trigger.isDelete)         {             c.DeleteTask(t);         }         else         {             c.AddTask(t);         }     } }   My class code:  global with sharing class MyClass {      Interaction_Summary__c intSum;      private string query;     private string filterClause;     private string filterClause1;     private string filterClause2;      global MyClass()     {                if(!Test.isRunningTest())         {             filterClause1 = MyCustomSetting__c.getValues('MyProperty').Filter_Clause_1__c;             if (filterClause1 != null && filterClause1 != '')             {                 filterClause2 = MyCustomSetting__c.getValues('MyProperty').Filter_Clause_2__c;             }             else             {                 filterClause1 = '';                 filterClause2 = '';             }         }     }      global void AddTask(Task t)     {            if (t != null)         {             intSum = new Interaction_Summary__c();             PopulateInteractionSummary(intSum, t);             if (filterPass(t))             {                 Schema.SObjectField upsertField = Interaction_Summary__c.Related_To_Id__c;                 Database.upsert(t, upsertField, false);             }             else             {                 DeleteTask(t);             }         }     }      global void UpdateTask(Task t)     {         //add code     }      global void DeleteTask(Task t)     {         //add code     }      global boolean FilterPass(Task t)     {            string taskID = t.Id;         filterClause = filterClause1 + ' ' + filterClause2;         if(filterClause != null || filterClause != '')         {             query = 'Select Id from Task where id = ' + taskID + ' '  +  filterClause;         }         else         {             query = 'Select Id from Task where id = ' + taskID;         }         Task thisTask = Database.query(query);         if (thisTask != null)         {             return true;         }         return false;     }      global void PopulateInteractionSummary(Interaction_Summary__c intSum, Task t)     {         intSum.Related_To_Id__c = t.Id;         intSum.IS_Subject__c = t.Subject;         intSum.Type__c = 'Task';         intSum.Related_To_Name__c = t.What.Name;     } }   Please help this salesforce newbie pinpoint the issue. Thanks in advance

Declared a string and assigned SOQL value as shown below. While running I am getting an error.   String country = 'United States'; String accountQuery = 'SELECT Id,BillingPostalCode,County_Name__c '+      'FROM Account WHERE zipCodeLen__c =9 AND AND BillingCountry = '+ Country;   System.QueryException: unexpected token: 'AND'  System.QueryException: expecting a colon, found 'United'


I encountered this question in my homework:  $$a_1=x, b_1=y, \\  a_{n+1} =\frac{a_n+b_n}{2}, b_{n+1}= \sqrt{a_nb_n}, n\in \mathbb{N}$$  Given $x,y$ positive constants. I have to prove that they both converge to the same limit $L$.  I know that in order to prove that a sequence converges, it has to be (for example) Monotonically increasing and that $|a_n|<K$  I'm having difficulties proving with induction that either of the sequences is monotonic... how do I do so when the first sequence depends on the other? I know that by using the average inequality I get that $a_{n+1} > b_{n+1}$. How do I continue from here?  Thank you for your time and help!

I am given this problem: let $a\ge0$,$b\ge0$, and the sequences $a_n$ and $b_n$ are defined in this way: $a_0:=a$, $b_0:=b$ and $a_{n+1}:= \sqrt{a_nb_n}$ and $b_{n+1}:=\frac{1}{2}(a_n+b_n)$ for all $n\in\Bbb{N}$    To prove is that both sequences converge and that they have the same limit. I don't know how to show this. I have spent 2 hours on this, no sign of success


This question is not a duplicate of  (which I was aware of and referred to it below) in its current state. That post received a  over 10 years ago and a lot has changed since then. All details are mentioned below.  It has always bugged me that the deleted:1 operator has the following two restrictions combined:  It can only be used to find one's own deleted posts. It's only available for users with 10k rep or higher.  I can see how allowing users to find deleted posts from other people could be problematic, but the second restriction doesn't really make much sense (at least to me) as long as the first one is enforced. I get that it might make   but I believe that it should be revisited. If the reason behind this restriction is to avoid complaints from users about their deleted posts, there are two counterarguments to that:  Experience  that it's unlikely to have a major effect:  Jeff's concern with allowing people to see their own deleted content was that "it would lead to unbelievable amounts of whining." As we've relaxed the restrictions, that hasn't happened. Jeff was right to be worried, but as it turns out he was wrong about how people would respond. That's a real encouragement.   Users can already (more easily) see their recently deleted posts anyway. And it's more likely for someone to complain about a post that was recently deleted than whine about an old post.   Some benefits of removing this restriction:  It will enable experienced users to search for their deleted posts on sites where they don't have 10k rep yet without  that might not work for all posts. Enable post-banned users to find their own deleted posts without wasting the time of moderators (anyone can guide them to using the deleted:1 operator rather than having to wait for a moderator).

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


Based on wikipedia (), a distribution is symmetric about $x_0$ if and only if it is a distribution whose pdf(or pmf) $f(\cdot)$ satisfies $f(x_0+x)=f(x_0-x)$ for any $x\in \mathbb{R}$.    Can we also define symmetry about $x_0$ using cdf?  That is, we say a distribution is symmetric about $x_0$ if and only if $F(x_0+x)=1-F(x_0-x)$ for any $x\in\mathbb{R}$. It seems that this definition is also okay, right?

What's the definition of a symmetric distribution? Someone told me that a random variable $X$ came from a symmetric distribution if and only if $X$ and $-X$ has the same distribution. But I think this definition is partly true. Because I can present a counterexample $X\sim N(\mu,\sigma^{2})$ and $\mu\neq0$.  Obviously, it has a symmetric distribution, but $X$ and $-X$ have different distribution! Am I right? Do you guys ever think about this question? What's the exact definition of symmetric distribution?


Which articles should I use in sample sentence below?  I prepared a/the guide about component installation. Please, check it by a/the link http://... on a/the page 15.

I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize?   The standard rule you always hear:     “If a person knows which item you are talking about then use "the"   . . . doesn’t clear things up for me, as I have no idea whether or not they know.


I'm using bootstrap, and so am working with their row and column classes. I have a row, with two child rows. I'd like to be able to set a height, or max height, of the parent row and have the child rows fill up the available space. The child rows I want to fill up the space such that the top child row just grows to be whatever height based on its contents, so nothing special, but the bottom child row fills up whatever available remaining vertical space exists within the parent row.  I'm trying to make a collapsible header area above a content area, below it, that expands to take up the available space as the header expands and collapses.  I have a jsfiddle here which shows my rows and columns, but the bottom child row, which I have set to height 100%, expands outside the bounds of the parent row. I figure the height is being set to 100% of the parent, and not 100% of the available space which is what I am after.  Any idea how to just make the bottom row take up 100% of remaining space?    Edit:  I will also try to include the markup here so you don't have to leave the site. I'm not sure how to use the code examples that you can run here, though.    #parent {   height: 300px; } <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet"/>

           I'd like this to be able to be whatever height based on the content

           I want this to just take up the remaining height of the parent row

I am working on a web application where I want the content to fill the height of the entire screen.  The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom.  I have a header div and a content div. At the moment I am using a table for the layout like so:  CSS and HTML    #page {     height: 100%; width: 100% }  #tdcontent {     height: 100%; }  #content {     overflow: auto; /* or overflow: hidden; */ }

...

...

     The entire height of the page is filled, and no scrolling is required.  For anything inside the content div, setting top: 0; will put it right underneath the header. Sometimes the content will be a real table, with its height set to 100%. Putting header inside content will not allow this to work.  Is there a way to achieve the same effect without using the table?  Update:  Elements inside the content div will have heights set to percentages as well. So something at 100% inside the div will fill it to the bottom. As will two elements at 50%.  Update 2:  For instance, if the header takes up 20% of the screen's height, a table specified at 50% inside #content would take up 40% of the screen space. So far, wrapping the entire thing in a table is the only thing that works.


I'm starting out with learning Python 3.7, and wrote this very simple practice program for finding the square root of a number. # User enters a number x = int(input("Enter a number, any number: "))  # Start with a random guess (g) of 4 g = 4  # Check if g*g = x # If not, redefine g as avg of g and x, square, then recheck  while g*g != x:     g = (g + x/g)/2  # When g*g = x, print g  else:     print(g)  For some numbers, the program works just fine. For others, however, the program simply doesn't resolve. So, for example, if I run this program (in Spyder) and enter 56, it returns a value of 7.483314773547883. If I enter 66, the console doesn't return an output. It simply idles until I interrupt or reset it. I also tried changing the while condition to: while g*g not in range(int(x - 0.1), int(x + 0.1)):  But this threw up the same problem. I'd appreciate any advice on what the issue might be here.

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


I am a college student graduating this upcoming year. I have a decent amount currently invested in a taxable brokerage account.  For the 2019 year I would be in the 0% long term gains bracket and 12% marginal income bracket (which I believe is used for short term gains). Next year I anticipate moving into the 15% long term gains bracket.  Since the market is up, before the year is out I was thinking of trying to realize these gains (I have a mixture of both short term and long term gains currently) by selling and just rebuying the same positions. Since both tax rates are lower than long term gains will be next year I was thinking of doing this for both.  Is this a smart idea or am I missing something? Are there any other considerations I should be aware of?

My current income would place me in the 0% long-term capital gains bracket currently, while I anticipate them to be 15% within my working years that commence in 2018.   My stocks (an index fund) have appreciated about 50% since I bought them (most of these should be capital gains).   Wash sale rules would probably prevent me from investing in the stocks for 30 days, which means I'm expected to lose out on <1% growth.    If I anticipate liquidating the stocks before retirement (in my working years), shouldn't I go ahead and do a sell-rebuy in order to make the next cost basis larger (which reduces the next long-term capital gains on the next sale)?


I'm a beginner in Android programming, fairly well experienced in Java. I'm using Android Studio with KitKate and Lollipop Emus and HW, developing for Froyo. I want to know what's presently the best accepted and easiest to implement way of including a database with my Android App.  I've looked at ActiveAndroid, but I followed their documentation exactly and found I was far from the only person to struggle with it's implementation - even the best programmers I know told me I was flogging a dead horse.  A very commonly posted link is this:   It's 6 years old, and I'd rather follow today's best practises.  TIA,  TH  [Edit]  I've explained that this question is with regards as to whether the ReignDesign post is still acceptable, and, or, if there are any other better resources or libraries one can use that make this very common task as easy as it should be.

If your application requires a database and it comes with built in data, what is the best way to ship that application? Should I:   Precreate the SQLite database and include it in the .apk? Include the SQL commands with the application and have it create the database and insert the data on first use?   The drawbacks I see are:   Possible SQLite version mismatches might cause problems and I currently don't know where the database should go and how to access it. It may take a really long time to create and populate the database on the device.   Any suggestions? Pointers to the documentation regarding any issues would be greatly appreciated.


Let's say I have got a bunch of items in a folder on my Finder. And I want to make a non-continuous selection. I can do that using my trackpad and CMD + click as in this answer:   But I don't want to use my trackpad (I am way faster using my keyboard). On Windows, you would hold down the Ctrl key, navigate using the Arrow keys and select the desired items/files using Space bar  This is also unanswered on Apple Discussions:   Mind that  doesn't answer as it has two continuous items albeit on different lines.

I want to select non-consecutive items on a list, without using a mouse/trackpad - there should be no clicks involved.  In Windows and Linux (at least Ubuntu) an item can be selected using Space/ button, which, in combination with arrows and Ctrl key allows me to select multiple items in any environment (file manager, IDE etc.) - e.g.  Enter a directory -> hold Ctrl -> down arrow twice -> press Space -> down arrow twice -> press Space.  Now I should have items 1, 3 and 5 selected. Is there a way to do the same thing in OS X?  PS. Sorry for such a verbose description, but so far every answer I encountered advices using Command + Click, and this is something I don't want to do.


i'm building some program. apache guacamole (VNC tool) makes log in console. (it can be tweak for make log in file, but i won't) so, my program reads log in console and determine which user(id) accessed(connected) or leave(disconnected).  but it gives me "java lang nullpointer exception at line 19". so here is my code.  import java.util.*; import java.lang.*; import java.io.*;  class id {     public static void main (String[] args) throws java.lang.Exception     {     String connect    = "connect";     String disconnect = "disconnect";     String id;     int strindex, endindex; //mark start, end index      while(true){          String phrase = System.console().readLine();         if(phrase.equals(""))             continue;          if(phrase.contains(disconnect)){             if( (strindex=phrase.indexOf("- User ")) > -1 )             strindex = strindex + 8;                 endindex = phrase.indexOf('"', strindex);         id = phrase.substring(strindex, endindex);          System.out.println(id);         System.out.println("disco\n");         //dockerfile_logout+pause;         }//islogout          else if(phrase.contains(connect)){             if( (strindex=phrase.indexOf("- User ")) > -1 )             strindex = strindex + 8;                 endindex = phrase.indexOf('"', strindex);         id = phrase.substring(strindex, endindex);          System.out.println(id);         System.out.println("connected\n");         //dockerfile_login+start!        }//islogin      }//while }   }

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?


What is wrong with my code? I get this error every time I run my code. Trying to download a .txt file, and then display the text in the toast. That is all I want!                                                                : FATAL EXCEPTION: main    Process: nnsoft.nsomuhtest, PID: 18706                                                                   java.lang.NullPointerException: Attempt to invoke virtual method 'android.content.res.Resources android.content.Context.getResources()' on a null object reference                                                                       at android.widget.Toast.<init>(Toast.java:138)                                                                       at android.widget.Toast.makeText(Toast.java:385)   code:   @Override     protected void onPostExecute(String unused) {         StringBuilder text = new StringBuilder();         try {             BufferedReader br = new BufferedReader(new FileReader(AnnouncementsDirectory));             String line;             while ((line = br.readLine()) != null) {                 text.append(line);                 text.append('\n');             }             br.close();             Toast.makeText(context, text, Toast.LENGTH_LONG).show();         } catch (IOException e) {             Toast.makeText(context, "error reading ver file", Toast.LENGTH_LONG).show();         }     }


Example: The soccer team lost the match because the strikers failed to score on a regular basis. However, the coach took the blame for the failure.  In the above example what word can be used to describe the coach who takes the blame for the team's failure?  I searched for the correct word but couldn't find an appropriate one. A word that I found was Fall Guy. But it seems, a fall guy would be one who is falsely accused  for something that has gone wrong.

Although the word martyr somewhat applies, it includes a nobility not necessarily present.  An idiom describing this, in a voluntary situation, would be drawing the short straw, thereby acquiring some unpleasant or dangerous duty. An idiom for an involuntary situation would be getting thrown under the bus.  Context  Friend: I knew someone would eventually need to refactor this code. I didn't think it would be me.  Me: You're our... uh, what's the word?


Does anyone know if I can connect two 4k monitors running at 60Hz to my MBP 13" early 2015, 3.1 GHz Intel Core i7, 16 GB 1867 MHz DDR3, Intel Iris Graphics 6100 1536 MB). Specifically, I am interested in the DELL P2415Q.  My understanding is that I can connect 2 monitors with res 3840 x 2160 via the two thunderbolt ports, but only one can run at 60Hz, the other must run at 30Hz.  Any help is appreciated!  Thanks!

How do I find out the number, type, resolution & refresh rate of additional monitors I can attach to my MacBook or MacBook Pro?  This is an attempt at a canonical QA, as per the Meta QA -   to try prevent the myriad "same but different" questions we get on every possible combination of computers, cable & monitors There are perfectly good resources out there that Ask Different should not have to duplicate the efforts of.


The book Javascript: The definitive guide states the following in it's 6th edition, in the chapter      4.13.3 The delete Operator   var a = [1,2,3]; // Start with an array delete a[2]; // Delete the last element of the array a.length // => 2: array only has two elements now   But when i tried the above snippet in Firefox and in chrome, the array's length was still 3.  Is this a wrong information from the book or is the implementation of javascript in the browsers differ from a javascript spec?  Note: I tried splice and it removed the element. My doubt is that is there a spec in ecmascript specifications that says delete should remove the element and the browsers decided not to implement according to that  script. or is the book wrong..?

What is the difference between using  on the array element as opposed to using ?   For example:  myArray = ['a', 'b', 'c', 'd'];  delete myArray[1]; //  or myArray.splice (1, 1);   Why even have the splice method if I can delete array elements like I can with objects?


I work at a library where we have just recently setup 5 kiosk's based on linuxmint.  The hardware is identical.  I actually used DD to make an image after I set the first one up.  My Problem is, I now need to apply more updates to these machines.  I'm making several updates to things like grub, and other system configuration.  As well as a specific users .gconf folder.  Apply such updates as removing keybinding's.  Updating power the power settings. I have ssh access to all of the boxes.  What would be the best way to update these?  I first apply the changes to our experimental machine.  How would you recommend then pushing these updates out to all the other kiosks?    Just discovered   This looks promising. Any other ideas?  Can this be ran as a daemon or will I have to goto each kiosk, login as root, and run puppet?  Running scp and rsync to transfer .gconf and other changes has failed for me.  I have no root user, obviously because of the way ubuntu runs.  So no way to get it to escalate to root for the transfer of modified files.  At least that I know of.

Beside our internal IT infrastructure, we've got around 500 Linux machines hosting our services for the on-line world. They are grouped in a bunch of clusters like Database A-n, Product A-n, NFS, Backoffice and so on. Furthermore, they are administered by an external provider, according to our specifications and requirements.  However, we face a lot of trouble during (web-) software development, roll-out and deploy - especially because the dev- and staging-environments have almost nothing in common with the live systems (I spare out the nasty details..).  Thus, I've tried to create virtual machines, copied the various live-systems as exactly as possible and prepared them to connect to e.g. the development-databases instead of the "real" ones transparently for developers (they aren't root). This works pretty well, but...  I was wondering how one could administer those systems remotely and in bulk? Is there some software family I'm not aware of? Or, at least, some techniques or principles one should be familiar with?  We would provide every developer with a bunch of images to be run locally (VirtualBox). The QA dept. would get virtual clusters (XEN or Hyper-V). If I need to provide an additional server-module, re-route a new database connection or just want to update everything provided by the package manager... how could I possibly do that without being forced to log on to every system and/or ask my colleagues to download and run some fixture-script?  I believe there are plenty of solutions. Well, somehow I'm too stupid to enter the correct keywords into the search engines... Or isn't this issue as trivial as it sounds?  For the record:   Almost all systems are running Debian GNU/Linux 6.x "squeeze" No developer is forced to use a particular OS at his/her workstation The budget is limited, of course, but not too small to buy proprietary software A solution that would involve our aforementioned provider is preferred


I try to smooth my model. I have tried with Surb surf and Smooth in Modifier but nothing.    Thank you so much  The ears are completed circle in Edit mode.   When I redered the ears are....  Why?  Many thanks

Is there a way that when something is subdivided, it can be constrained from making the zig-zag flower petal pointed edges?


When I launch Steam through Wine, no text is shown, just buttons. I am running Wine version 1.6. How do I fix this?

Hello fellow dwellers of askubuntu, as the title says I'm having difficulties with getting Steam to run properly. I think I have the solution but I am pretty incompetent with Ubuntu (just started using it the other day) so a step by step process would be unbelievably appreciated! Here are the links to what I think possible solutions are:  [1]   [2]   I've tried googling how to preform the solutions such as changing the alias/script for steam (no idea what that is) to -no-dwrite or launching with wine Steam.exe -no-dwrite. The dwrite seems to be the issue in all this but I can't for the life of me figure out how to do anything about it.  Any useful input is what I'm hoping for but for the brave soul who feels like typing a bit more, perhaps a step-by-step list of instructions starting from downloading Steam off the official website, would be my saving grace.  If there is any more info you guys need let me know and I'll of course be happy to oblige!


How can I set Hibernation in Ubuntu 18.04 LTS (laptop)?  When I open the Power option > When the Power Button is pressed, I just see the following options:   Suspend Power OFF Nothing   But does not show Hibernate.

How should I successfully hibernate Ubuntu 16.04?  I've tried almost every solution on the web but non of them was actually helpful. I found my problem almost completely similar to


I have changed my Ubuntu One password and now my Ubuntu One windows client fails to sync. Is there any way to get the windows client to work again?

Recently I started getting a File sync error on all 3 of my PCs running Ubuntu One.  One is running Ubuntu, the other 2 are running Windows 8.  Looking at the list of clients on the web, none of them were there anymore.    I found this article:      On how to fix the issue for my Ubuntu PC and it worked perfectly.  Now I am looking for a similar fix for Windows but haven't found one yet.  I've tried un-installing Ubuntu One and re-installing it, but it must still be holding the keys somewhere because it never asked me to login again.    Does anyone know where I can clear these keys to get my files syncing on Windows again?


If $0 < a \le b \le c \le d$ and $abcd = 1$ prove that $$a+b^2+c^3+d^4 \ge \frac{1}{a}+\frac{1}{b^2}+\frac{1}{c^3}+\frac{1}{d^4}$$   I first thought of multiplying both sides with $\big(\frac{1}{a}+\frac{1}{b^2}+\frac{1}{c^3}+\frac{1}{d^4}\big)$  Then by applying C-S inequality in the LHS the inequality would be $$16 \ge \Big(\frac{1}{a}+\frac{1}{b^2}+\frac{1}{c^3}+\frac{1}{d^4}\Big)^2$$  But if $(a,b,c,d)=(\frac14,1,1,4)$ the inequality does not hold true.

let $0<a\le b\le c\le d$, and such $abcd=1$,show that   $$a+b^2+c^3+d^4\ge \dfrac{1}{a}+\dfrac{1}{b^2}+\dfrac{1}{c^3}+\dfrac{1}{d^4}$$   it seems harder than


I want to install Ubuntu 14.04.4 in UEFI mode alongside windows 8, which is already in UEFI mode.   My partition scheme is GPT. Ubuntu is on /dev/sda5. Legacy bootloader on /dev/sda. Windows on /dev/sda4.   UEFI bootloader in EFI partition  How would I go about doing this?

I recently have upgraded my PC, my new Motherboard (ASUS M5A99X EVO) uses UEFi instead of the regular MBR option.  I have a Ubuntu 11.10 installation that I did when I had my previous hardware (MSI MS 7267) , Ubuntu alone boots fine, and so does Windows 7, however Windows 7 is using UEFI (GPT) boot whereas Ubuntu is using MBR.  I have my OSs in separate drives, so that GRUB2 wont' get replaced by the Windows Bootloader and viceversa, as I said both OSs boot fine on their own, but to do that I have to disconnect one drive in this case the Ubuntu drive as it prevents Windows from loading.  Now my question is, How can I change/convert Ubuntu's drive so that instead of using MBR it uses GPT and allow Windows to boot?.   Preferably without reinstalling the whole system or lose any data.  And if I were to wipe the drive, How can I install Ubuntu in GPT, UEFI, whatever it is mode?.  I have used gdisk to convert from MBR to GPT, but now Ubuntu can't boot seems like grub just doesn't start.  I have re installed the OS, and the drive is GPT now by default however grup-pc is still being used instead of grub-efi.  How can i make Ubuntu boot from EFI?.


I need to add these modules because my usb keyboard is not working when I try to type my encrypted password. usbcore uhci_hcd ehci_hcd usbhid  I guess I need to add these to /etc/initramfs-tools/modules, but where exactly do i add them. Here is the modules file: # List of modules that you want to include in your initramfs. # They will be loaded at boot time in the order below. # # Syntax:  module_name [args ...] # # You must run update-initramfs(8) to effect this change. # # Examples: # # raid1 # sd_mod  Where am I supposed to add it here, and am I doing the right thing (is it safe)?

is anything else supposed to be here? I am using Ubuntu gnome and my keyboard is unresponsive for encryption password. Do I need any more modules, and if so where do I add them.  # List of modules that you want to include in your initramfs. # They will be loaded at boot time in the order below. # # Syntax:  module_name [args ...] # # You must run update-initramfs(8) to effect this change. # # Examples: # # raid1 # sd_mod


Find conditions on positive integers   $a, b, c$    so that $\sqrt{a}+\sqrt{b}+\sqrt{c}$ is irrational.    My solution: if $ab$ is not the square of an integer, then the expression is irrational. I find it interesting that $c$ does not come into this at all.  My solution is modeled (i.e., copied with modifications) from dexter04's solution to  .  Suppose $\sqrt{a}+\sqrt{b}+\sqrt{c} = r$ where $r$ is rational.  Then,  $(\sqrt{a}+\sqrt{b})^2  = (r-\sqrt{c})^2  \implies a+b+2\sqrt{ab}  = c+r^2-2r\sqrt{c}$.  So, $a+b-c-r^2+2\sqrt{ab} =-2r\sqrt{c}$. Let $a+b-c-r^2 = k$,  which will be a rational number.  So, $(k+2\sqrt{ab})^2 = k^2+ 4ab+4k\sqrt{ab} = 4cr^2$ or $4k\sqrt{ab} = 4cr^2-k^2- 4ab$.  If $ab$ is not a square of an integer, then the LHS is irrational  while the RHS is rational.  Hence, we have a contradiction.

How do I prove that $1$,$\sqrt{2},\sqrt{3}$ and $\sqrt{6}$ are linearly independent over $\mathbb{Q}$? $\mathbb{Q}$ is the rational field.  I want to know the detail about the proof. Thanks in advance.  Actually I know any two of them and three of them are linearly independent.


Have a business card file created in AI. Printer is asking for crop marks and we are looking to have 1/4" rounded corners for the cards. How do I create crop marks or setup bleed for this? or is the setup for the 1/4" rounded corners the printers responsibility and I simply supply standard crop marks?  Thanks!

So basically, I've made a set of playing cards for a client and he said the printer wants to add 3mm bleed lines to the cards like  .. However these don't look like bleed lines to me?(the pink line) Aren't bleeds on the outside of the image not inner? I'm guessing they're trim lines.. I've been looking for tutorials everywhere on how to add them with no luck.


I am struggling to find a correct way to query the following scenario. Consider the below table as example, where I want the row with index_no 124 for that dvpc and pid value of the columns. Please suggest.  Index_No    dvpc     pid     rate 123         123      30      0.01 124         123      30      0.02

Table:   UserId, Value, Date.   I want to get the UserId, Value for the max(Date) for each UserId. That is, the Value for each UserId that has the latest date. Is there a way to do this simply in SQL? (Preferably Oracle)  Update: Apologies for any ambiguity: I need to get ALL the UserIds. But for each UserId, only that row where that user has the latest date.


I made this plane 17in x 6in but when I measure it blender says its length is 1in and when I try to extrude/scale it to a certain length it uses a ratio of it's current size instead of length in inches, does anyone know how I can fix this? Thanks

I just found out about the Mesh Display : Length feature in the "N" panel (thanks to ) that allows one to measure the length of a face or vertice.  But my first encounter with this tool gives me complex feelings of love and hate, see how, as I was trying to measure the aspect ratio of this TV screen, I am getting WIDTH = 20.33 and HEIGHT = 37.57.  These values seem awfully wrong, since my betrusted eyes tell me the height should be shorter than the width.    I have tried measuring the single vertices as well, to identical results.


I'm trying to create a simple 'double click' executable to open a large number of specific folders and applications for a user uncomfortable with using the terminal.  The script is simple enough and works as expected when running through the terminal with the following command:  python3 /home/xxxx/Desktop/setup.py   When I double click the file, it opens in the text editor.  I have added executable permission with:  sudo chmod +x /home/xxxx/Desktop/setup.py   ...and I've given ample permission with:  sudo chmod 755 /home/xxxx/Desktop/setup.py   ...and it has what I think is the appropriate shebang at the top of the file:  #!/usr/bin/env python3   I would expect to see a pop up which asks something like "Do you want to run this as an executable?" but this pop up doesn't appear.  I tried "open with another application" but I found no way to actually open with the terminal or python directly from there.  Getting desperate, I tried to just create a desktop short cut:  lxshortcut -o /home/xxxx/Desktop/setup.py   ...but even this didn't work. The .Desktop file created would only open as a text file.  I'm using Ubuntu 18.04 LTS.  Thanks in advance for any help/ideas.  Extra Info:  the script doesn't need to be executable from another computer  python3 is installed

How can I make a bash script executable by double clicking just like .exe files in Windows? I tried , but there are two consequences:   the terminal twinkles, disappears, and nothing is done. you must specify to run in terminal in order to work.   I have a script that installs tomcat on an offline PC, including all dependencies of tomcat in the script. I need to make the script work on double clicking like windows since most who use the script will not be familiar with Ubuntu.  Forget the above explanation. I want to make a script that can be run by double-clicking on it, without using the terminal. Anybody knows how?


I am trying to calculate $R^2$ (variance explained) for a set of data using GLMM's, and . Here's some dummy data.   set.seed(7127) # Number sampled n = 10000 # Average height m = 180   leg     = rnorm(n, 75, 5) torso   = rnorm(n, 75, 5) head    = rnorm(n, 30, 1)  df = data.frame(1:n, sample(leg, n, replace = T), sample(torso, n, replace = T), sample(head, n, replace = T)) df$height = rowSums(df[,2:4]) colnames(df) = c("person", "leg", "torso", "head", "height")   This is height data for 1000 people, measured as three components of height (leg, torso, and head) which sum to give total height. I want to have an $R^2$ value for each of the three components, where $R^2$ is how much of the variance in height is explained by leg length, torso length, and head length individually.  To do this I have made 3 models where each component is modelled as a fixed effect, with a random effect (randomly assigned the group 1 or 2, these could be analogous to sex [male or female]), as well as a random effects only model (order in code is null, leg, torso, head).  mod0 = lmer(df$height ~ 1  + (1|df$random)) mod0  modL = lmer(df$height ~ df$leg   + (1|df$random)) modL   modT = lmer(df$height ~ df$torso     + (1|df$random)) modT  modH = lmer(df$height ~ df$head  + (1|df$random)) modH   Following the protocol of  I have tried to calculate Marginal and Conditional $R^2$ values for each component of height (order in code is leg, torso, head).  # Marginal R squares VarFixedL = var(fixef(modL)[2]*getME(modL,"X")[,2]) R2M_L = VarFixedL / (VarFixedL + VarCorr(modL)$df[1] + attr(VarCorr(modL),"sc")^2) R2M_L  VarFixedT = var(fixef(modT)[2]*getME(modT,"X")[,2]) R2M_T = VarFixedT / (VarFixedT + VarCorr(modT)$df[1] + attr(VarCorr(modT),"sc")^2) R2M_T  VarFixedH = var(fixef(modH)[2]*getME(modH,"X")[,2]) R2M_H = VarFixedH / (VarFixedH + VarCorr(modH)$df[1] + attr(VarCorr(modH),"sc")^2) R2M_H  # Conditional R squares R2C_L = (VarFixedL + VarCorr(modL)$df[1]) / (VarFixedL + VarCorr(modL)$df[1] + attr(VarCorr(modL),"sc")^2) R2C_L  R2C_T = (VarFixedT + VarCorr(modT)$df[1]) / (VarFixedT + VarCorr(modT)$df[1] + attr(VarCorr(modT),"sc")^2) R2C_T  R2C_H = (VarFixedH + VarCorr(modH)$df[1]) / (VarFixedH + VarCorr(modH)$df[1] + attr(VarCorr(modH),"sc")^2) R2C_H   The results suggest that the variance in height is largely explained by leg and torso length (~49% each). (Edit: I have tested this on the sample data provided by the Nakagawa & Schielzeth paper and reproduced their results, but would appreciate feedback on whether this is correct).  > R2M_L [1] 0.4869814 > R2M_T [1] 0.4909379 > R2M_H [1] 0.02097508  > R2C_L [1] 0.4871594 > R2C_T [1] 0.4909379 > R2C_H [1] 0.02097508   Here the two types of $R^2$ are (virtually) identical. If I introduce variance as a result of the random group (e.g. df$height = ifelse(df$random == "2", df$height, df$height+rnorm(n, 10, 1))) I get differences between the two types, could someone explain the difference between the Marginal and Conditional $R^2$. Why would one be better or, when would one be more appropriate, than the other? Why do they react differently to the addition of random or unmeasured variance components?

I have a mixed model with three random effects and many fixed effects.  I set aside some of my data to validate my final model and now I would like to compute the $R^2$ on the validation set, in R.    I found some code for a mixed model with one random effect but not for a model with more than one random. Does anyone know a package or some code to compute $R^2$ for mixed models with more than one random effect?  If this isn't possible, does anyone have a good suggestion for comparing model fits?


In The Force Awakens we see that stormtroopers are given designations, and that Finn's is FN-2187. I'm not so interested in the numbers given, as I assume they are just to distinguish between troopers (although Finn's numerical designation had an ).  Why are they prefixed with FN specifically? Out of universe,  I can understand it means we can rename FN-2187 as Finn. But what does it mean in in-universe ?  Nb. I understand you'll need some other designation so as not to be limited to 9,999 troops. I'm more interested in specifically why the letters FN.

There are several Stormtroopers with designations in the form "FN-####" in The Force Awakens, including      FN-2187, AKA Finn and FN-2003, the Stormtrooper who put his bloody hand on Finn's helmet.   There are also other First Order Stormtroopers whose designations start with "FN" appearing in various canon books.  Has it been clarified in canon what "FN" means or stands for?