I've passed values and tested. Why doesn't this work? Exception in thread "main" java.lang.NullPointerException

So, I can't really get my head around what is going on here. I started by allowing a command line input. I then select the values I want and pass them via instantiation (i think I used that correctly), to be received in the constructor of my second class (MyDate).  They are received and I use:      this.day = day; etc.  To set them to my class variables to be used across all methods of the class.  I then have my get methods for day, week, month. They return day, week, month.  So, then I call on my print method, and that was tricky because from what I understand, I had to instantiate the MyCalendarOne class in order to reference a non static method from a static context. So, that done, I referenced the method.  Within that method, I have some print statements and they call upon the methods in the MyDate class via the following code:  System.out.println(myDate.getDay()); System.out.println(myDate.getMonth()); System.out.println(myDate.getYear());   I just don't understand why the values haven't been passed and I am getting the nullpointer error. Which from what I understand is that I'm trying to print 'null'.  Pretty stumped on this one.  I firstly made sure my command line input and parsing was correct. It was.   I actually don't really know what else to try. I had worked through all the other errors but ugh. I'm stumped.  class MyCalendarOne { private MyDate myDate; private enum Day {MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY,  SATURDAY, SUNDAY};  public static void main(String[] args) {     String dateInput = args[0];      int day = Integer.parseInt(dateInput.substring(0,2));      int month = Integer.parseInt(dateInput.substring(3,5));      int year = Integer.parseInt(dateInput.substring(6,10));      MyDate myDate = new MyDate(day, month, year);      MyCalendarOne calendar = new MyCalendarOne();      calendar.printCalendar();   }  /*public MyDate myDate() {     return; }  public Day dayOfWeek() {      return; }  public int weekOfMonth() {     return; } */  public void printCalendar() {     System.out.println(myDate.getDay());     System.out.println(myDate.getMonth());     System.out.println(myDate.getYear());  } }  class MyDate { private int day; private int month; private int year;  public MyDate(int day, int month, int year) {     this.day = day;     this.month = month;     this.year = year; }  public int getDay() {      return day; }  public int getMonth() {     return month; }  public int getYear() {     return year; }  public boolean isDateValid() {     return true; } }   I simply expected it to print out the day, month, and year. However, I got this error back:  java MyCalendarOne 01/01/2011 Exception in thread "main" java.lang.NullPointerException     at MyCalendarOne.printCalendar(MyCalendarOne.java:45)     at MyCalendarOne.main(MyCalendarOne.java:22)


How can I SSH into "Bash on Ubuntu on Windows 10"?

I have Windows 10 Anniversary Edition with "Bash on Ubuntu on Windows" installed and working. I'd like to be able to SSH into this Ubuntu instance, but although I have openssh-server installed and configured (and listening on port 2200), when I try to ssh to "localhost:2200", it tells me "Server unexpectedly closed network connection".  Has anyone been able to successfully accomplish this?


Blender Cycles Bake Not Looking Like Object in Rendered View

I have a couch in Blender that looks like this in rendered view.    I baked it with a combined texture and this is what it came out to be.    This is what it looks like added to the mesh.    Why does the view with the baked image not look exactly like the rendered view?  Does it have something to do with my mesh and faces?  This is my mesh.    This has never happened to me before as I baked a couple things before this which came out perfectly.


Is this a global variable issue in python 2.7

I'm trying to understand global variables in python. But I don't know why _instance_name doesn't fail if I don't declared as global but when I try to do the same thing with _instance_counter this fail       #Module global declaration     _instance_counter = 0     _instance_name = "Employee module"      class Employe:         _internal_counter = 0          def __init__(self):                  global _instance_counter#If I comment this line fails.                           _instance_counter +=1 #count each instance                   #why if I use _instance_name without global statement doesn't fail             print("\t**Instance of %s #%i has initialized**"%(_instance_name,_instance_counter))          def __del__(self):             print("-The class %s has deleted"%_instance_name)          def count(self):             self._internal_counter+=1             print("count method has %i time(s) called "%self._internal_counter)          def getTotalInstance(self):                              print("\t  %i instance of %s has been created"%(_instance_counter,__name__))       empl = Employe()     empl.count()     empl.count()     empl.count()       empl = Employe()     empl = Employe()     empl = Employe()      empl.getTotalInstance()


I have got a SQL table with a property 'Stock' and datatype float. According to several posts the equivalent type in C# is double.  So I have got a input which is a string and I convert it to a double value like this:  var number = Convert.ToDouble(numberAsString, CultureInfo.CurrentCulture.NumberFormat);   I have the follwing code to add the number on top of the stock:  result.Bestand += number;   Somehow (this is really strange to me) if I add "0,1" exactly three times, the value changes to  15,299999999999999. I don't know why though.  Remember: I am using commas instead of decimal points.


In which fraction of the recent papers is significant incompetence of review(s) observed in natural sciences? In my searching, I've only come across ... is anyone familiar with any others?


rownum=5 returns no data but table has 10 rows

I have  a table emp (ename,eid,did,sal,sex) where column did is foreign key with another table dept (did,dname).  I want to get the  nth sal of the company along with person's details . I am executing following query(my table  has 10 rows)       SELECT rownum,vi.* FROM    (SELECT * FROM emp ORDER BY sal desc) vi    WHERE ROWNUM >5;   when I execute rownum>5 or rownum=5 get "no data" but if i execute rownum<5 then i get 4 rows displayed.  .I want the data when I do rownum=n


The number $2^{3^n}+1$ is divisible by $3^{n+1}$ and not divisible by $3^{n+2}$.

Prove that for every $n\in \mathbb N$, $2^{3^n}+1$ is divisible by $3^{n+1}$ and not divisible by $3^{n+2}$.   I was able to prove that $2^{3^n}+1$ is divisible by $3^{n+1}$ using induction. First, I check whether the statement is true for $n=1$. The statement holds since: $$2^{3^1}+1=9$$ $$3^{1+1}=9$$ Second, I assume that the statement is true for every $n\in \mathbb N$. Finally, I take that $n=n+1$. From that, the original expression becomes $(2^{3^n})^3+1$, which is a sum of cubes, and the same as: $$(2^{3^n}+1)((2^{3^n})^2-2^{3^n}+1)$$ As I assumed that $2^{3^n}+1$ is divisible by $3^{n+1}$, and one of the factors is $2^{3^n}+1$, the entire expression must be divisible by $3^{n+1}$, and so the statement is true for every $n\in \mathbb N$.  Now, I don't know how to prove that $2^{3^n}+1$ isn't divisible by $3^{n+2}$. Please explain how I can do so step-by-step, without using complicated terms.


Why do I sometimes need to put c++ template function definitions in header file?

So I was getting a linking error in my c++ project and a stackoverflow post mentioned that template methods need to also be defined in the header instead of the source file.  The code for that specific method is (after combinging the declaration / definition):  struct Timer {   template <typename T>   const long getDuration() const;  };  template <typename T> const long Timer::getDuration() const {    long time = static_cast<long>(std::chrono::duration_cast<T>(end - start).count());    return time > 0 ? time : 1L; }   Now the explaination was that for templates, the compiler needed the definition in order to be able to process it but that does not seem to be the case all the time.  For example, this is code that to me looks similar as the code above however I can place the declaration in the header file and the definition in source file:  // Enity.hpp class Entity {   public:     template <typename T>     bool hasComponent() const; }  // Entity.cpp template <typename T> bool Entity::hasComponent() const {   return componentBitSet[getComponentTypeId<T>()]; }   I am still relatively new to modern c++ so I am trying to understand why in the first example I need the declaration and definition in the same file and in the second, they can be split out.


Does connecting slower Powerline adaptor to 1gbit powerline slow the network down

I have 1gbit Powerline network. If I plug in 200mbit PL adapter, will it degrade speed between devices connected to my old 1Gbit adapters?


Do URL sortneres make an impact on search engine rankings?

Can anyone explain me what does the following mean (from ):  The best URL shorteners will use a 301 redirect to pass along their Google page rank to the destination web address. This helps the redirected web address advance in  search rankings.    I was going through the advantages of shortened url, when I came across this.


What is the noun for someone who receives a referral?

When a referrer (noun) gives a referral (noun) to another person, what is the term (noun) used for the recipient of the referral? "The referred" may work, but am I missing another term? "Referred" indicates past-tense, but I intend to use the term in future and present tense as well.


How to call SharePoint Rest Service with CAML and Lookup column

I am trying to query sharepoint list which is having Lookup columns.  So to do so I am using below JavaScript function  function getDataWithCaml(oDataUrl, caml) {     var requestData = {         "query":                {                     "__metadata": { "type": "SP.CamlQuery" },                     "ViewXml": caml                }     };     jQuery.ajax({         url: oDataUrl,         method: "POST",         data: JSON.stringify(requestData),         headers: {             "X-RequestDigest": $("#__REQUESTDIGEST").val(),             "Accept": "application/json; odata=verbose",             "Content-Type": "application/json; odata=verbose"         },         success: function (data, object) {             getDataWithCaml_Success(data, object);         },         error: getDataWithCaml_error     }); }   And after doing some google I found out that I have to use $expand parameter to do so.  So this is how I am calling this function.  var oDataUrl = "http://URL/_api/Web/Lists(guid'LISTGUID')/GetItems?$select=LOOKUPLIST/LOOKUPLISTFIELDNAME&$expand=LOOKUPLISTFIELDNAME" var caml = "CAMLQUERY"   When I run this i am getting below error.  The $expand query is not valid for field 'LookupListFieldName'.


I want to create a program in Java/Spring that listens always a directory. If a particular called for example "example.txt" is created in this directory then the program reads it and do some stuff and then continues listening. If this txt file is not created then nothing happens and it continues listening. Any idea about how can I create this listener part? Thank you so much for your help


My machine is windows machine. I have Ubuntu hosted in virtual box. I used apt-get to install opencv-python. Now when I try to import cv2, I get an error message: Import Error: No module named cv2. I have python 2.7 and 3.5, but I have changed the interpreter from python 2.7 to 3.5 in my Pycharm IDE. I am on Ubuntu 16.04 LTS.  When I try to use pip to install opencv, I get an error message: Permission denied. How do I install opencv using python 3.5 64bit without running into these nasty errors?


How to calculate all possible combinations of brackets order?

Hey I would like to find out a formula on calculating the maximum possible combinations of brackets order.  First of all there a few rules:  - Brackets have to be valid (Every bracket has a closing bracket)  - n % 2 == 0 (n = Brackets, only pairs)  - The order is sensitive, e.g.: a,b and b,a equals 2 combinations  What is a valid combination ?  Lets say n is our variable for the brackets count:  n = 2: () - Only 1 combination possible  n = 4 () (), (()) - Only 2 combinations possible  n = 6 ((())), () () (), (()()), (())(), ()(()) - 5 possible combinations  Now any ideas how to calculate the combinations number when I only have n = ?  Greetings


I've been noticing in conversations that people often use past or present or future progressive where I would normally use past, present or future simple. I know some rules about interrupted actions that are always described by progressive tenses. But today during listening some podcast, the lecturer said      Initially I was planning to make this podcast...   So my question is why to use progressive tense here? Could we use simple here? I suppose there is some difference in meaning, but have no idea where to start digging.


Why is Coulomb's law is an inverse square law?

I read about  Coulomb's law it says the force of attraction or repulsion between two charges is inversely  proportional to the square of the distance between them.  So generally if I say then  Coulomb's law is inverse square law. But I really want to know why this electrostatic force depends on square of the distance, and not the cube nor the fourth power. Why only the square of the distance?  Is there any connection with dimensions? Or does it depend on the reference frame?  Why does it depend on inverse of the square of the distance?


Insert cover as a png on entire page of a document

I am using a template on overleaf () and I wrote the entire document. I had created a png file, with the same size of a page, to put on the cover, but I can't. The picture is inserted within the page a yet consider the margin, so the image stand dislocated from the upper left corner. I had created a .pdf with the image but the same problem appears. For those examples I used changepage, pdfpages packages and I wrote within the environment titlepage. I couldn't find any other question that assembles with this one. I want to put a png file into the first page of the document ignoring margins and other things that this template automatically puts on the page.


Looking for a function that can retrieve the title of a file in *right-click file*>properties>details>title

I am trying to find an a function that can find the title. I have tried os.stat(file) but it only returns the details on the general tab, and I can't find any other attribute in os.stat that can retrieve the stuff on details. For example my code:  import os os.chdir('C:\\PythonScripts') statinfo = os.stat('01 of CDImage01.mp3') print(statinfo)   I am planning to make a program that can swap the title and the file name.


Show that $(\mathbb{R},d)$ is not complete , where $d(x,y) =|\arctan(x) - \arctan(y)|$.

Let us define a metric $d$ on the set of real numbers $\mathbb{R}$ as $d(x,y) =|\arctan(x) - \arctan(y)|$. It is routine that $(\mathbb{R},d)$ is a metric space. I also claim that it not a complete metric space. Let's consider the following sequence   $$(x_n) = (1,2,3,...).$$  The sequence is a Cauchy sequence, but it is not a convergent sequence. I want to prove this claim formally.  Can you help me to write the proof formally?


`chmod` is not changing permissions of a file in /media/username/New Volume

I am trying to debug my Android code using Android Studio on an Ubuntu machine, but Android Studio is stopping on adb initialize with error  Cannot run program "/media/aghed/New Volume/all programs/sdk2/sdk2/platform-tools/adb": error=13, Permission denied   I have tried:  sudo chmod 777 adb    on ~/sdk2/platform-tools/   but the permissions are still:  ls -l adb -rw------- 1 aghed aghed 2357745 تشرين 27 14:54 adb   It is not changing???  by the way I am running Ubuntu alongside Windows, not sure if it is relevant...


Suppose, a question can have two different answers in two sites, is it allowed?  Why is cross posting always discouraged?   Is it for saving the Stack Exchange system memory?  Or, to avoid Google returns multiple results for the same topic?


Python ? (conditional/ternary) operator for assignments

C and many other languages have a  operator.  This allows you to make very terse choices between two values based on the truth of a condition, which makes expressions, including assignments, very concise. I miss this because I find that my code has lots of conditional assignments that take four lines in Python: if condition:     var = something else:     var = something_else  Whereas in C it'd be: var = condition ? something : something_else;  Once or twice in a file is fine, but if you have lots of conditional assignments, the number of lines explode, and worst of all the eye is drawn to them. I like the terseness of the conditional operator, because it keeps things I deem un-strategic from distracting me when skimming the code. So, in Python, is there a trick you can use to get the assignment onto a single line to approximate the advantages of the conditional operator as I outlined them?


Log error out whole record details in log file

I am performing inset operation on some records and, here I want to log the error out record details in log file. Basically i want to find out error out records from -  list<Database.SaveResult> resultSet object. Kindly find the below code for more details on this requirement. list<Database.SaveResult> resultSet = Database.Insert(ListObject,false); for (Database.SaveResult sr : resultSet) { for(Database.Error err : sr.getErrors()) { System.debug(err.getFields()); } }  In the log currently getting empty round braces only. I am expecting all the field values which got error out. I can see this behavior in the data loader tools error and success file where I can find the whole record in error file and the error message at the end.


A functional property leads to an unexpected result.

This is problem 9 from Shilov's Elementary Real and Complex Analysis. The Hints given seem a bit off the wall and I am curious to see what the community comes up with sans those suggestions.  [ f(x) is monotonic on (-inf, inf) and satisfies the functional property\  f(x +y) = f(x) + f(y). Show that f(x) = ax for a constant, real a.]


twitter status updates from command line (via cURL)

Based on some samples:   I'm trying to update my twitter status from command line (via cURL), but always get error.  Any idea what I'm doing wrong?  curl -u <anonymized> -d status="#curl test" -d source="cURL" https://twitter.com/statuses/update.xml Enter host password for user '<anonymized>': <?xml version="1.0" encoding="UTF-8"?> <errors>   <error code="34">Sorry, that page does not exist</error> </errors>   Or possibly, do you have an alternative solution for this (maybe not over cURL)?


Finding a closed formula for $1\cdot2\cdot3\cdots k +\dots + n(n+1)(n+2)\cdots(k+n-1)$

Considering the following formulae:  (i) $1+2+3+..+n = n(n+1)/2$  (ii) $1\cdot2+2\cdot3+3\cdot4+...+n(n+1) = n(n+1)(n+2)/3$  (iii) $1\cdot2\cdot3+2\cdot3\cdot4+...+n(n+1)(n+2) = n(n+1)(n+2)(n+3)/4$  Find and prove a 'closed formula' for the sum  $1\cdot2\cdot3\cdot...\cdot k + 2\cdot3\cdot4\cdot...\cdot(k+1) + ... + n(n+1)(n+2)\cdot...\cdot (k+n-1)$  generalizing the formulae above.  I have attempted to 'put' the first 3 formulae together but I am getting nowhere and wondered where to even start to finding a closed formula.


Run a bash script stored on a screen on my server from a local machine remotely

I did this: ssh -f user@host "screen -dm -S screenName"  Now I want to add a bash script command to this line so that the command is executed then the screen detaches. edit: so I want to do so ssh -f user@host "screen -dm -S screenName bash bashing.sh"  bashing.sh: #!/bin/bash echo "testing it";  but actually nothing happens when I run the command over ssh. Even when I just from the server run this command only screen -dm -S screenName bash bashing.sh. edit 1: I tried everything so far in the answers and comments and even in the suggested question as duplicate but nothing works for me, so any help would be still very appreciated. Sincerely


Blocking IP addresses of obvious hack attempts

I have a simple Apache webserver setup and basic IP tables (ufw) for a development server.  In my logs I see lines like this:  [Fri May 16 10:10:36.258369 2014] [:error] [pid 15926] [client 69.147.158.130:8396] script '/var/www/html/wp-login.php' not found or unable to stat   I am not running WordPress at all, and I realize this is a very minor attempt at a hack (there are much more sophisticated attacks against Apache out there).  However I would like to automatically block this IP address (temporarily) without installing an IDS/IPS such as Snort.  I am just looking for a simple way to block an address that tries to connect to wp-admin or wp-login.  Is there an Apache module that would handle something like this?


I live in a town where fresh or whole milk is not readily available. I was wondering if I could make cheese from UHT Milk. If so, what kind of cheese and what method I should use? Or rather, Should I?


Is it required to use choice principles to prove that any linearly independent set can be extended to a basis?

Let $V$ be a vector space. In order to show that any linearly independent set in $V$ can be extended to form a basis, or equivalently, any basis of a subspace of $V$ can be extended to a basis of $V$, is it required to use choice principles (i.e. Axiom of Choice or weaker forms of Choice). If so, what is the weakest choice principle that can prove this statement?


Necessary and sufficient number of comparisons by every element to fully sort a set of n elements?

Given $n$ distinct elements.  Is there a sorting algorithm which ensures that every element is compared atmost $\lg n$ time?  Or is there a higher lower bound?


Alright, root@localhost was not connectable with PHP, so I deleted it and created a new root account.  All was fine until I was about to grant privileges when I realized, that none of the other accounts had grant privileges.  How to get access back to root privileges on the DB?


I got a sentence like the below on VOA site. what does "quick walk away" means? Does it means "near" or "close"?      One of Lou Malnati’s downtown locations is a quick walk away from another Chicago institution


How do I install Ubuntu on a second hard drive?

I am going to be buying a second hard drive for my desktop here pretty soon, because my current hard drive is a piece of junk running windows 7. What I want to know is how to install Ubuntu on the second drive. I am looking for a non complicated answer as I am not familiar with the Ubuntu lingo. I am so sick of Windows.. I used Ubuntu before but it didn't work properly. When I installed it, it said I didn't have enough space... Even though I had 600GB to use. Anyway if anyone can help me out it would be much appreciated. Thanks


How to write the Test class for the Apex Trigger

trigger populateContactEmail on Case (before insert , before update){ Set<Id> setConIds = new Set<Id>();  for(Case  obj : trigger.new){     if(obj.Secondary_Contact__c != null)         setConIds.add(obj.Secondary_Contact__c); }  Map<Id , Contact> mapCon = new Map<Id , Contact>([Select Id, Email from Contact where id in: setConIds]); for(Case obj : trigger.new) {     if(obj.Secondary_Contact__c != null)     {         //Protecting against bad Ids         if ( mapCon.containsKey(obj.Secondary_Contact__c)) {             Contact c = mapCon.get(obj.Secondary_Contact__c);             obj.Secondary_Contact_Email__c = c.Email;         }     } }   }


Meaning of 'do' in questions like 'do you want...'

If take question 'Do you want to eat?' as example, I don't understand meaning of 'do' because:   to do something in my understanding is to take some actions, to want something is not an action, it is not something, that you 'do'.   And in form of simple statement this question will be 'I want to eat', not 'I do want to eat' (right?).   What meaning of 'do' in this question?


LocalDateTime start = LocalDateTime.of(2018, 9, 2, 14, 17, 25, 135);     LocalDateTime end = LocalDateTime.of(2018, 9, 2, 14, 19, 59, 965);     Duration duration = Duration.between(start, end);   I need to get result in this format : 2:34.830.  Minutes and nanoseconds  - no problem :      System.out.println(duration.toMinutes());     System.out.println(duration.toNanos());   but how can I gain seconds - 34 seconds from this example?


The default Splash screens are cool, but I'd like to add some of my own work to remind me of how awesome I am (no, not really).    Is it possible to customize/change the splash screen?


on('click', function() doesn't work on new content

HTML

sky

sea

   JS    $(".item").on('click', function(){     $('.marked').removeClass('marked');     $(this).addClass('marked'); });   This works but now the the content of #story is replaced using ajax procedure:  ...     success: function(data) {     $('#story').html(data); }   And the new content is:
earth

venus
    And here on('click', function() doesn't work. Classes are not removed/added.


Suppose that $f$ is one-to-one and continuous on [$a,b$]. Prove that $f$ is either strictly increasing or strictly decreasing on [$a,b$].


I installed openssh-server,it will start ssh server on boot automatic.But I don't want that.How to forbid ssh server to autostart on boot?


Can we detect the existence of outliers using Min and Max?

Suppose, I have a data set with eight features in my hand.  Data are normally distributed.  I have juxtaposed their mins and maxes row by row.               f1        f2           f3        f4       f5      f6       f7          f8  min       0.0000    0.0000         0         0         0   -0.0000   -0.0000    -0.0000  max       0.0000    0.0001    0.0003    0.0038    0.0038    1.4530    0.0193     0.0002   Can we tell anything about the existence of outliers from these information?


For an Indian citizen, will a UK Tier 2 short term ICT visa be sufficient to travel to the Republic of Ireland and fly back to UK?

Having Indian citizenship, will a UK Tier 2 short term visa be sufficient to travel to the Republic of Ireland (Not Northern Ireland")? I have spent a few weeks in UK and my visa allows me to spend another month here. Also I am planning to return to UK before the visa expires.


Receiver and transmitter with the same antenna

I want to build a simple transceiver (half duplex) for 433.92 MHz ASK modulation. I have found a transmitter chip and a receiver chip that I want to use. I want to use the same antenna for RX and TX but I am unsure of how to approach this (The receiver can handle the full output power of the transmitter). I do not want to buy a ready-made circuit for this, I'm doing this mostly to learn.   The antenna is 50 ohms but the receiver and transmitter both have their own impedances and need some matching network. If I used separate antennas this would be simple (say a PI attenuator).   But I’m unsure of how this would work with having both RX and TX on the same antenna. My very naïve approach to this would be to use a splitter/combiner after the matching networks and accept the -3 dB loss from this. This way every side sees 50 ohms.  But this feels very wrong and any input here would be much appreciated!


I have an Asus laptop that I got over the summer which came with Windows 8. I installed Ubuntu so I could dual-boot, but something happened (I cannot say what it was, for I really don't know) and I have not been able to boot into Ubuntu since. Because of this, I deleted the Ubuntu partition, and then tried booting from my Windows 8 recovery USB. When I tried this, I followed instructions that said I would have to use the command prompt to write in bootrec.exe /fixmbr. Doing this was supposed to delete the rest of Ubuntu that was left on my computer after I deleted the partition.   However, I restarted my computer after entering that into the command prompt, and the bootloader brought up the option to boot into Ubuntu. Still!  Now, I don't know if this matters or not, but I want to get rid of Ubuntu and replace it with a version that isn't missing components or what have you, so that way I can use it again. Because, as we know, Windows 8 is the worst!  I tried looking through old answers to see if there was something that could help me, but so far, everything I've read has been the same thing. Is there anyone out there that might be able to help me? I just want to eliminate the old, broken version, and reinstall a new, working version.


Is it possible to somehow mark a System.Array as immutable.  When put behind a public-get/private-set they can't be added to, since it requires re-allocation and re-assignment, but a consumer can still set any subscript they wish:  public class Immy {     public string[] { get; private set; } }   I thought the readonly keyword might do the trick, but no such luck.


What file systems does Apple use in iPhones?

HFS  WWDC 2012 Session 709, ￼What’s New in the File System, presented by Deric Horn included the following observation: .  In the iOS Developer Library,  contains references to HFS.   Do iPhones use HFS Plus?  Journaled or not journaled?  I'd like an authoritative reference. Thanks.     Types of HFS Plus  iOS and iPhone aside for a moment … Apple's  lists four HFS filesystem types for creation purposes:   HFS+ HFS+J (JHFS+) HFSX JHFS+X     Postscript  Beyond  … as Apple sometimes distinguishes between JHFS+X (journaled, case sensitive) and HFSX, so:    extra kudos to anyone who can verify     … I do have fileXray, but I don't foresee myself making an ssh connection to my first generation iPhone ;-)


How can I make programs open in the foreground? Nautilus will open in the background, Remmina (the remote desktop program) also opens in the background. I have to click on the icon in the Launcher for it to come to the foreground. I would think any program that is invoked by any means would come to front, as it opens. It seems if one program invokes another, it will be in the background. If I click on any icons in the Launcher though, it will actually open in the foreground.


What do you call a pair of words which would be meaningless without one of them?

I am referring to a set of words that wouldn't make sense if one word or the other was omitted. Like barbershop quartet, or Cyber Security. What do you exactly call this set of words?


Understanding the trial division primality test

I'm reading an algorithms book and I came across a code example for a primality test. The problem is that I couldn't understand the condition for the :  public static boolean isPrime( int N ) {         if (N < 2) return false;         for ( int i = 2; i * i < N; i++ ) {             if ( N % i == 0 )                 return false;         }          return true; }   If we multiply i by itself we would miss a lot of numbers to check. So if we want to check if n=10 is prime or not, then we would quickly end the loop by i=3. I know that the idea is finish the loop as early as possible, but how do we guarantee that by using that condition we are actually checking all possible divisors and the rest that we omitted are never going to be divisors?  This condition seems quite common and popular but I really wasn't able to understand it or find an interpretation. I understood the condition i < n/2 but not that one. I hope I'm not stupid!


How to reply to one user among two having same names?

Suppose there are two users that have commented on an answer. Both have the same user name, and I want to reply to one of them. How can I do this?  It appears that, under the current system, there is no way for me to do this. Specifically, from , I see that:     4. Matching is performed in reverse chronological order, so if five people named John are participating, @john will match the most recent John   So, consider this a request to add this feature using an -n suffix or something similar; e.g. @john-2 could be used to reply to the second John from the top.  Update Thanks to  for nice answer of @name(userid) based auto-complete suggestion which has no loophole. It involves no counting from top & has no consequences when a comment is deleted. But, I think @name(userid) should be used directly in comment as all form inputs at SE are text (nothing embedded).  Now, I'm trying to finalize it based on it: The system should allow optional @name(userid) format for reply. Provided userid with this format, system should ignore name. And, in the situation of duplicate name based confusion, system should demand this format as mandatory to submit comment.  How to get userid? In case of duplicate name based confusion, system should append (userid) in hypertext to their profile. It'd work for mobile version too. On full version, for easy fill-up, a hover reply icon would be fine (like hover vote up icon). Upon clicking it, system should fill @name(userid) in comment text box.  From reply reader side: Multiple Johns could be confused even if they didn't come from notification (because nobody remembers his/her own userid). So, highlight the background of comments which are replied to them.


Preview search not highlighting instances of the word

I am using OSX Catalina. However, for quite some time, do not remember from which OSX, Preview stopped highlighting instances of a searched for word.  As suggested in the answer to the post , if I choose `Table of Contents' in View, the sections of pages where the searched for word appears are displayed in the sidebar but the word is not highlighted. Also, in the top right corner of the Preview window, below the search box, there are two arrows to go forward/backward through the search results. These arrows remain greyed out and do not work. These issues are rather irksome. Is there any way out?


I want to install Ubuntu instead of Win10 64bit. I have 2 hard drives, the first one is M2 128 Giga for OS, and the another one is hdd 750 Giga for storing source files and videos. Will it let me choose which one is used for the operating system or it will choose automatically? I am afraid of loosing the videos and data stored in hdd. And another question. Will I be able to see the videos and data on hdd and benefit from them?


Edit crontab file in /etc as root user and add a line, Newbie challenged with syntax

I set up my CRM on-premise. Within CRM set up sync to Google Calendar.  A manual test run within the CRM demonstrates that sync is working. The CRM implementation guidelines state the following: For Unix/Linux systems, as a root user, edit the crontab file in /etc, and add an extra line at the end The documentation provides a sample and explanation below: */5 * * * * <username> cd </srv/www/vhosts/1crm>; </usr/bin/php> scheduler.php  where <username> is the username that the web server runs as (usually defaults to 'apache' or ‘wwwrun’), and where </srv/www/vhosts/1crm> is the path to your 1CRM directory, and where </usr/bin/php> is the path to your php executable file. I figure how to edit as root or enter crontab e -u root in Konsole of Kubuntu. I modify the above as follows: */5 * * * * www-data cd /var/www/1crm; /usr/bin/php7.4 scheduler.php  And gained no result, so what am I missing? Did I get the user wrong or should it be just PHP, or is it picking up the right scheduler.php (presumably the one in the crm directory).  How do I test a cron job, for that matter?  Right now, I am going in the crm and checking if calendar new test calendar items got sync, from google calendar to the crm calendar.


Update default python3 version from 3.2.3 to 3.3.x version in Ubuntu 12.04

I would like to upgrade my python3 version from 3.2.3 to 3.3.x version. I am using Ubuntu 12.04   Referred this . Is it the same procedure to upgrade the python version?  If so, then what must be run instead of sudo apt-get build-dep python3.4?  I have a doubt in the procedure because it is updating in same version line 3.4.x. Please refer and say so as to avoid further problems.  Edit 1: Also referred this link  but did not help me.


"Usual" functions vs function variables in JavaScript

Is there any difference between   function MyFunc() {     // code... }   and  var MyFunc = function() {     // code... };   in JavaScript?


Installing Autodesk Maya on Ubuntu is possible, but can be a bit challenging.  Assuming that one already has the required specs and a solid graphics card driver installed, how can it be done?


Entanglement, superposition, and propositional logic

From what I am understanding, there is entanglement in a system if there is a correlation between elements of that system. For an example that I found, If you have only two cards and know that one is red and one is black, if they are both face down and you choose one, by knowing the color of the card just chosen, you know the color of the other card. Hence these cards are 'entangled' (please correct me if I am wrong).  Now this 'correlation/entanglement' seems to be relevent only in respect to some 'reference' knowledge, that is, it is only because we know there is a correlation between cards that we can judge that the other card has to be a particular color. So this comes down, at least in part, to knowledge about the system.  So If I have a logical system, say B = Black and R = Red where upon measurement I have B XOR R where XOR is Exclusive OR, then could I say that B and R are logically entangled over XOR? I say XOR and not OR as we can not not pick (measure) both B and R simultaneously  Furthermore, if I have an equal chance of picking either B or R before measurement would it be correct to say that B and R are in a superposition? That is, the valuation of B and the valuation of R (measuring B to be true [picked] or R to be true [picked]) are in a superposition?


How to get a complete list of all applications installed?

Using OSX 10.8.4., I am having a hard time finding a complete list of all software applications installed on my Mac.  Of course, the Launchpad only shows the list of those that have an app shortcut created, excluding those that do not.  I also tried holding down the Option key while in the Apple Menu to change About This Mac to System Information, then Software-->Installations but that still was not a complete list.  How do I get a complete list of all applications installed?


guys! I am having a problem with for cycle.So i have a for() that goes through every value of third column from database(which is supposed to be in date format).I want to change the background color of an item from listview if the month of the added date is the same as the current month.The problem is there - if i use the code like this:  public void setItemRed(View view){      for(int i = 0 ; i <= myDB.getLastID() ; i++){         String date = myDB.getcol3(i);         String day = date.substring(0 , 2);         String month = date.substring(3 , 5);         String currentDate = currentDate();         String currentMonth = currentDate.substring(3 , 5);          listView.getChildAt(i).setBackgroundColor(Color.RED);     }  }    Everything works and every item gets red background.But when i add if :  public void setItemRed(View view){      for(int i = 0 ; i <= myDB.getLastID() ; i++){         String date = myDB.getcol3(i);         String day = date.substring(0 , 2);         String month = date.substring(3 , 5);         String currentDate = currentDate();         String currentMonth = currentDate.substring(3 , 5);        if(date.length() == 10){            if(month == currentMonth) {                listView.getChildAt(i).setBackgroundColor(Color.RED);            }        }     }  }   It does not work.Thank you in advance!


Problem with copying a single item of an ArrayList

I'm new at Java and I came across a problem I couldn't find a solution to, so maybe somebody can help me out. When I write this code: ArrayList<String> Liste = new ArrayList<>(); String Name;  Liste.add("Harry"); Name = Liste.get(0); Name = "Dieter";  System.out.print(Liste.get(0)); System.out.print(Name);  The output is, as expected: Harry Dieter  However, if I change the type to a custom object: ArrayList<Names_Class> Liste = new ArrayList<>(); Names_Class Name;  Liste.add(new Names_Class()); Liste.get(0).First_Name = "Harry"; Name = Liste.get(0); Name.First_Name = "Dieter";  System.out.print(Liste.get(0)); System.out.print(Name);  The output becomes: Dieter Dieter  So it seems Java only copies a references or something. Could somebody explain what happens here, and how I can get a complete copy of a single item out of an ArrayList?


Either quadratic or interaction term is significant in isolation, but neither are together

As part of an assignment, I had to fit a model with two predictor variables. I then had to draw a plot of the models' residuals against one of the included predictors and make changes based on that. The plot showed a curvilinear trend and so I included a quadratic term for that predictor. The new model showed the quadratic term to be significant. All good so far.  However, the data suggest that an interaction makes sense, too. Adding an interaction term to the original model also 'fixed' the curvilinear trend and was also significant when added to the model (without the quadratic term). The problem is, when both the quadratic and the interaction term are added to the model, one of them is not significant.  Which term (the quadratic or the interaction) should I include in the model and why?


nullpointerexecption when trying to execute delete method of databasehelper

I'm new to android and i m creating application contact application I m trying to delete a row from table but its giving me nullpointerexception as shown in log below  this indicates that delete method is getting null value but through bundle i m getting the correct value and i m passing the same val in deketecontact method.  com.example.ViewRecord public class ViewRecord extends Activity { int val; SQLiteDatabase sdb; databaseHelper dbh; //=new databaseHelper(getBaseContext(), "stud", null, 1); @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_view_record);     Bundle b = getIntent().getExtras();     if(b!=null){         String n=b.getString("pname").toUpperCase(Locale.ENGLISH);         TextView t= (TextView) findViewById(R.id.tv1);         t.setText("WELCOME "+ n);         val = b.getInt("pid");      }     Button del= (Button) findViewById(R.id.button1);     del.setOnClickListener(new OnClickListener() {          public void onClick(View v) {             // TODO Auto-generated method stub             AlertDialog.Builder builder = new AlertDialog.Builder(ViewRecord.this);             builder.setMessage(R.string.deleteContact)            .setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {                public void onClick(DialogInterface dialog, int id) {                   dbh.deleteContact(val);                   Toast.makeText(getApplicationContext(), "Deleted Successfully",                   Toast.LENGTH_SHORT).show();                         Intent intent = new Intent(getApplicationContext(),AddRecord.class);                   startActivity(intent);                }             })            .setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {                public void onClick(DialogInterface dialog, int id) {                   // User cancelled the dialog                }             });             AlertDialog d = builder.create();             d.setTitle("Are you sure");             d.show();            }     }); }  }    //and this is delete method in databasehelper.class   public Integer deleteContact (Integer id)    {       Log.d("val1", ""+id);       SQLiteDatabase db = this.getWritableDatabase();      // db.delete("studrec", "id=", null);       return db.delete("studrec",        "id = ? ",new String[] { Integer.toString(id) });    }   log file      01-10 19:19:00.680: E/AndroidRuntime(10261): FATAL EXCEPTION: main 01-10 19:19:00.680: E/AndroidRuntime(10261): Process: com.assign6, PID: 10261 01-10 19:19:00.680: E/AndroidRuntime(10261): java.lang.NullPointerException: Attempt to invoke                                   virtual method 'java.lang.Integer com.assign6.databaseHelper.deleteContact(java.lang.Integer)' on a null object reference 01-10 19:19:00.680: E/AndroidRuntime(10261):    at com.assign6.ViewRecord$1.onClick(ViewRecord.java:66) 01-10 19:19:00.680: E/AndroidRuntime(10261):    at android.view.View.performClick(View.java:4756) 01-10 19:19:00.680: E/AndroidRuntime(10261):    at android.view.View$PerformClick.run(View.java:19749) 01-10 19:19:00.680: E/AndroidRuntime(10261):    at android.os.Handler.handleCallback(Handler.java:739) 01-10 19:19:00.680: E/AndroidRuntime(10261):    at android.os.Handler.dispatchMessage(Handler.java:95) 01-10 19:19:00.680: E/AndroidRuntime(10261):    at android.os.Looper.loop(Looper.java:135) 01-10 19:19:00.680: E/AndroidRuntime(10261):    at android.app.ActivityThread.main(ActivityThread.java:5221) 01-10 19:19:00.680: E/AndroidRuntime(10261):    at java.lang.reflect.Method.invoke(Native Method) 01-10 19:19:00.680: E/AndroidRuntime(10261):    at java.lang.reflect.Method.invoke(Method.java:372) 01-10 19:19:00.680: E/AndroidRuntime(10261):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899) 01-10 19:19:00.680: E/AndroidRuntime(10261):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)


I'm creating a simple level-up system and I'm looking to base the stats gain on curves so I can tweak them easier, I know it's a math function, but I have no idea what to search for.    I need to create this curve and get the value every x increment.    the engine I'm using is Ren'py and the language python. if you can tell me the terms to search for, I might be able to find something on the topic.


I am self student of lie groups and I am trying to understand Haar measure. But in books they do not explain how we get the Haar measure. The $SO(3)$ Haar measure is given by $\mathrm{d} g=\frac{1}{8 \pi^{2}} \sin \theta \mathrm{d} \phi_{1} \mathrm{~d} \phi_{2} \mathrm{~d} \theta$ How can we proof it?


Dedekind domain with a finite number of prime ideals is principal

I am reading a proof of this result that uses the Chinese Remainder Theorem on (the finite number of) prime ideals $P_i$. In order to apply CRT we should assume that the prime ideals are coprime, i.e. the ring is equal to $P_h + P_k$ for $h \neq k$, but I can't see it. How does it follow?


i want to wire two lights with the power coming in the first light go to the second light and then to a switch

I have two lights with the power to the first light and passing through to a second light then to a switch. how is this wired?


Proficiency bonuses and multiclassing: highest, add all together, or what?

When you multiclass, do you only use the highest proficiency bonus of any of the classes you have, do you add together all the proficiency bonuses from any classes you might have levels in or do you use the proficiency bonus that corresponds to your character level from your original class? (For example, a level 13 character starts as a fighter so they use the fighter 13 proficiency bonus.)


Prevent specific window from being minimized

I wrote a .NET app that does some automation on a google page using the Chrome Selenium Driver. My app works perfect if I have the Chrome window visible or in the background, but fails if I minimize it. I get a QpenQA.Selenium.ElementNotVisibleException error.  So, all I need is a way for me to start the Google Chrome browser without a minimize box and, if it's possible, almost out of view of the screen. I've solved the out of the bounds of the screen problem by setting :      cdriver.Manage().Window.Position = new Point(-2000,0);   So the user doesn't see the window now. The problem is that he can still minimize it by clicking on the taskbar icon. Is there a way to prevent minimizing on a specific window or block it from appearing in the taskbar?


The set of all rational points in the plane is a countable set

From Kolmogorov's Introductory Real Analysis. I am doing some self-study and would like some feedback on whether my proof is correct. I am using that the set of rational numbers is countable as given, and I am invoking the following Theorem which is proved in the book. Theorem 2. The union of a finite or countable number of countable sets $A_1, A_2, \ldots$ is itself countable. Claim. The set of all rational points in the plane (points with rational coordinates) is countable.  Proof. Since $\mathbb{Q}$ is a countable set, we can write $\mathbb{Q} = \{q_1, q_2, q_3, \ldots\}$. If we fix $q_1$ we can define the following set: $$ Q_1 = \{(q_1, q)\;|\; q\in\mathbb{Q}\}, $$ which are all the rational points in the plane with $q_1$ in the $x$ position. We can create a one-to-one correspondence with $\mathbb{Q}$ by simply setting $p\leftrightarrow (q_1, p)$ for each $p\in\mathbb{Q}$, which shows that $Q_1$ is countable. We can now define the following union which includes all rational points in the plane: $$ \mathcal{Q} = \bigcup_{n=1}^\infty Q_n, $$ which is a countable union of countable sets. By Theorem 2, $\mathcal{Q}$ is a countable set. ■


NullPointerException in main parsing string to double

I'm attempting to parse a String into a double with Double.parseDouble();, however I'm getting the following error:   Exception in thread "main"  35.5 java.lang.NullPointerException     at Caluclator/userInput.Calculation.addMinus(Calculation.java:57)     at Caluclator/userInput.Calculation.parse(Calculation.java:28)     at Caluclator/userInput.Input.main(Input.java:12)   I cant find where I'm going wrong.  package userInput;  public class Calculation {     public Double answer;      public  Calculation() {         }      //Splitting string for      public static Double parse(String input) {         String[] operator = new String[20];         String[] delimiter = input.split("\\+|-");         Integer counter = 0;          //this searches to see if there is an operator         for(Integer i = 0; i < input.length(); i++) {             char c = input.charAt(i);             if(c == '+'||c == '-'){                 operator[counter] = Character.toString(c);                 counter++;             }          }         delimiter = multDiv(delimiter);         for(String element: delimiter) {             System.out.println(element);         }         return addMinus(delimiter,operator,counter);//ERROR     }       //Multiplies the numbers     public static String[] multDiv (String[] delimiter) {         for(Integer y = 0; y < delimiter.length ; y++) {//iterates through elements in delimiter              for(Integer i = 0; i < delimiter[y].length(); i++) {//iterates through chars in element string                 if(delimiter[y].charAt(i) == '*') {                     String[] nums = delimiter[y].split("\\*");                     delimiter[y]= String.valueOf(Double.parseDouble(nums[0])*Double.parseDouble(nums[1]));                 }                 else if(delimiter[y].charAt(i) == '/') {                     String[] nums = delimiter[y].split("/");                     delimiter[y] =String.valueOf(Double.parseDouble(nums[0])/Double.parseDouble(nums[1]));                 }              }         }     return delimiter;     }  /////*****SEARCHES FOR ADDS OR SUBTRACTS THE NUMBERS *****////     public static Double addMinus(String[] numbers, String[] symbols, Integer counter) {         double answ = Double.parseDouble(numbers[0]);             Integer x = 1;              for(Integer i = 0; i < symbols.length; i++) {                 if(symbols[i].contentEquals("-")) {//ERROR                     double num = Double.parseDouble(numbers[x]);                     answ = answ - num;                     System.out.println(" "+answ);                 }                 else if(symbols[i].contentEquals("+")) {                     double num = Double.parseDouble(numbers[x]);                     answ = answ + num ;                     System.out.println(" "+answ);                 }                 x++;             }             System.out.println(answ);     return answ;     }


How to extract part of item in a list using slice?

I have the following list: item = [['01jan.jpg', 'Cluny', 'Tres Riches Heures', 'January'],         ['02feb.jpg', 'Cluny', 'Tres Riches Heures', 'February']]  and want to extract the first entry and change the .jpg to .png: x = item[0][0]    print(x)  # gives '01jan.jpg' y = slice(x[:-4]) print(y)  # gives 'slice(None, '01jan', None)'  and I can't get the middle term out because slice object is not iterable. How do I get '01jan' as a variable?  Other items have varying names but all have the same .jpg so I want to slice off the back of the first item.


Proving inequality $|\sin(n\theta) |\le n\sin\theta$

I was trying to prove following inequality:  $$|\sin n\theta| \leq n\sin \theta \ \text{for all n=1,2,3... and } \  0<\theta<π $$  I succeeded in proving this via induction but I didn't get "feel" over the proof. Are there other proof for this inequality?


How can I safely convert a byte array into a string and back?

I don't really care about encoding and stuff, as long as I get back the exact same byte array.  So to sum up: How do I convert a byte array into a string, and then that string back into the same byte array I started with?


Where to host my django application that uses a redis server, postgres database and websockets with least worry?

I made a small web application for a customer and everything is working now on a VPS. Stack:  nginx to route traffic and serve static files gunicorn to run several django workers that serve http daphne workers to serve websockets redis in a docker container to broadcast messages over channels (for chat-like functions) postgres database apscheduler because I need to be able to schedule "events" on the fly for any date (and be able to delete/reschedule them)  There is a lot of stuff going on on my VPS and I am very beginner in server management. Consequently, I am worried about stability and security. Today, for example, I found out a crypto miner has been using my server for the last 3 months.. Is there any service where I can just deploy this webapp and not worry about the server details? Or is it better to hire somebody for first setup and maintain myself? I would really love to just make it and give it to the customer.. To some extent I am willing to change my stack if it makes my worries go away :) Charlee


return false/web development javascript/jquery

I have some code examples like this  ---------------------- First example -----------------  var rightFunction=function() {         if (options.currentPage < options.numberOfPages) {             options.currentPage += 1;             ajaxConnection();         }         return false;     };      $('#newsContainer #rightSlider').click(rightFunction);     $('#rightSliderHigh').click(rightFunction);   ---------------------- Second example-------------------   $('#rightSliderPagination').click(function(){         if (parseInt(_pagina_last_link.html()) >= options.numberOfPages) {             return false;         }         _first_page_num = parseInt(_pagina_first_link.html());         paginationGenerator(_first_page_num + options.centerNumber - 1);         $('#slider-inner').slider("option", "value", _first_page_num + options.centerNumber - 1);         return false;     });   ------------------------Third example ----------------------  $(".download").click(function(){         if($(this).attr('goToPage')=='true') {             var url=$(this).attr('href');             document.location.href=url;             return false;         }          var _this = $(this);         var thistext = $("#bg-download-box").html();         var _whattoshow = $(this).parent().find(".what-to-show").html();          if (_whattoshow){             $("#bg-download-box form").html(_whattoshow);         }          else{             $("#bg-download-box").html("

");         }           if ($(".reccomend-box").length != 0){         $("#rightColumn").css("z-index",99999);         }          $("#bg-download-box").show();         var whattocopy = $("#bg-download-box");         $(whattocopy).insertAfter(_this);         $("ul#songs-list").css("z-index","99999");           $("ul#songs-list li.b-a-r").removeClass("emph");          $(this).parent().parent().parent().addClass("emph");         return false;     });     Why is return false is used at end of these functions. Please, somebody could explain the purpose of return false.


Can capital ships make accurate micro-jumps through Hyperspace without aiming for a gravity well?

For a large portion of The Last Jedi,       the First Order fleet is chasing the remnants of the Resistance fleet through space, but they are unable to catch up until the Resistance ships run out of fuel.   I've seen a number of suggestions for how the First Order might have better handled this situation, including the idea that they perform a micro-jump through Hyperspace to close the distance or get ahead of the Resistance.  However, this might not be technically possible. Every example of a micro-jump I can think of relies on taking advantage of an existing gravity well -- a planet, or an interdictor -- to "force" the early drop from Hyperspace.   Is there any precedent in canon of a capital ship performing a targeted micro-jump through Hyperspace without the use of a gravity well to assist?


I found a lot of mods that make thinks lighter, and add mark and recall, and a basement I like. They are all on Steam, and what I want to know is if I can have too many? Will they all work together? Or should I just leave them alone?


SEO effects of a concise URL path vs a longer one with more keywords

My sister wants to launch a celebrity website, which will have information such as age, height, weight etc. Suppose the website is example.com:   www.example.com/demi-lavato → This sounds crisp and short www.example.com/demi-lavato-age-weight-height-affairs-etc →  this is the alternative   Which one is better? Does one of the above give more SEO mileage than the other?


I have this type of data set:  Time          State 22:54:14.716    5 22:54:14.716    5 22:54:14.716    5 22:54:14.716    5 22:54:14.729    4 22:54:14.919    1 22:54:14.919    1 22:54:15.128    5   I would like to plot a graph with pgfplots but the package can not read properly the time format.


Equivalence relation for 𝑥, 𝑦 ∈ Z, 𝑥𝑅𝑦 if and only if 5|(𝑥 − 𝑦).

We define a relation 𝑅 on the integers as follows: For all integers 𝑥, 𝑦 ∈ Z, 𝑥𝑅𝑦 if and only if 5|(𝑥 − 𝑦).   How do I prove that 𝑅 is an equivalence relation. How do I give a description of the equivalence class [2] and find at least 3 members of this equivalence class?


How do I disable retina mode/HiDPI on macOS Mojave on the built-in display of a MacBook Pro (15-inch, 2017)?

I want to test non-retina/non-HiDPI mode on macOS Mojave on the built-in display of a MacBook Pro (15-inch, 2017). I found articles that suggest enabling the option sudo defaults write /Library/Preferences/com.apple.windowserver.plist DisplayResolutionEnabled -bool true, restarting the computer, opening System Preferences, selecting Displays, and holding down the option ⌥ key when selecting Scaled should show a list of all available resolutions, including non-HiDPI resolutions; however, I just see the following:


Object with emission shows up in Viewport but not when rendered

In an animation I did where the camera flys around a fishing shack, there is a ball in the sky with white emission that shows up on in the Viewport but doesn't when rendered. Initially I thought it had to do with a cube in front of a spot off to the side of the frame, put there to create a light stream, that blocks the view of the "moon". But, when I turned it off, it still cannot be seen.    The camera has a view of 2000m, which I believe is sufficient. Interestingly, when I had Concierge Render crank out the whole film, this is what this frame looked like (before I made alterations to render settings.


Can the variables for a regression be replaced?

Does it play a role which of both variables X, Y is determined on the other one?  I think in case of a straight linear curve it should provide the same results(?) but what about a quadratic curve: y(x) = x² ?  Will y(x=?)=10=x² be the same like y=x² with x=3,162..?


I'm having some problems with orthographic view which I don't know how to solve. Regardless of what mode I'm in (object or edit), I can see through my meshes as if x-ray was on. Rotating my view also causes strange artifacts on my meshes, like in the picture below, and they sometimes disappear entirely until I rotate the view again.  It makes it very hard to work with my meshes in orthographic view, and perspective view does not always satisfy my needs. Is there a way to fix this?


I am struggling to decide the correct tense / verb usage where one wishes to express some past plan for the then future:      We agreed that, when xyz happens, we would do abc.     We agreed that, when xyz happened, we would do abc.  Something else?   According to , the second form is correct because one must use  with clauses that begin with time expressions (such as "when").  This assessment is somewhat supported by , which suggests that the past tense must be used since xyz has already occurred and is now in the past.  However, to my mind, the second form doesn't quite convey the same contingency that abc would not be done until xyz happened; whereas the use of the present tense in the first form better conveys that contingency.  Are grammatical constructs of this sort known by some formal name?  What do authorities on English (especially British English) have to say on the matter (citations would be most welcome)?


I have big document in LaTeX (approx. 1000 pages, tens used packages, math, hundreds references \bibitem + \cite, cross-references \label + \ref, indices \index, tables and TikZ figures). The document is built from hundreds LaTeX files (using standalone and \input). TikZ figures are also in separate files with \tikzexternalenable (whenever it is possible), some of them have more than 1000 rows. When compiled by PdfLaTeX the TikZ figures are not recompiled (corresponding files *.dpth, *.log, *. md5 and *.pdf are unchanged with old date).  The document reached some limit because after adding new TikZ figure the compilation PdfLaTeX finish after the 2nd run with error:   the 1st processing by PdfLaTeX finish with "Process exited normally" the 2nd processing by PdfLaTeX finish with error "TeX capacity exceeded, sorry [main memory size=123000000]" – every time in some TikZ file (which is not recompiled so I do not understand why problem is inside it)   In LOG file the location of error is described as follows (e.g.):    ! TeX capacity exceeded, sorry [main memory size=123000000].  ...755) (1.6,0.149253036) (1.64,0.                                                   14630663108) (1.68,0.14334... l.1661 \end{tikzpicture}    Summary in LOG file (problem is in "words of memory" record):  Here is how much of TeX's memory you used:   65319 strings out of 493340 1540999 string characters out of 3139331 123000001 words of memory out of 123000000 60823 multiletter control sequences out of 15000+200000 63320 words of font info for 190 fonts, out of 3000000 for 9000 1166 hyphenation exceptions out of 8191 114i,44n,128p,25560b,8155s stack positions out of 5000i,500n,10000p,200000b,50000s !  ==> Fatal error occurred, no output PDF file produced!     There are no syntax errors, because when I remove SOME TikZ figure then compilation is successful (I tried it with removing various figures, not with certain one).  Can somebody help me to find way for working with such big documents ?  Environment:   Windows 10 TexStudio 2.12.6 MiKTeX 2.9 PdfLaTeX command: pdflatex -synctex=1 -interaction=nonstopmode --shell-escape --enable-write18 --extra-mem-bot=120000000 ?me   Minimal Working Example is not attached, because problem occurs only with Maximal Working Example ...  Added 23.1.2018: This question was marked as an exact duplicate of an existing question - my problem is in compilation of big document with TikZ externalization in pdflatex if all (for me) known memory settings are on maximum  - not "How to expand TeX's “main memory size”?"  In my case:   externalize: it was used = no success (and still I do not understand why PDFLaTeX processes those TikZ files with big consumption of memmory while it does not create any new PDF external file for graphics ...) change "extra_mem_bot": it was set to maximal (possible in my PC) value 130000000 = no success add "extra_mem_top": I tried it with value 10000000 = no success add some setting to texmf.cnf: it is in TeXLive, not in TexStudio = so no success to add "save_size" or "main_memory" add some setting to pdftex.ini: this workaround is so suspicious that I had not enough courage to try it (especially after warnings "DO NOT EDIT THIS FILE DIRECTLY") use luatex: maybe, I will try, but it is run for longer distance   I have converted all my files from Win1250 to UTF8 I have changed several packages (for Unicode using) still I am not able to compile original document (e.g. luaLaTeX stops compilation after 100 errors = which in my case are undefined references typically defined in the second/third run)


Why does fstrim trim all of the free space on my mdraid mirror after a reboot?

I have a server with 2 SSDs:  Model Family:     Intel 520 Series SSDs Device Model:     INTEL SSDSC2BW240A3F Firmware Version: 400i User Capacity:    240,057,409,536 bytes [240 GB] Sector Size:      512 bytes logical/physical   On them I have 3 mdraid mirror devices (md0,1,2) formatted with EXT4 filesystem. I'm using mbr (not gpt) partition table. All 3 filesystems are mounted with discard mount option.   /dev/md0 on / type ext4 (rw,discard,errors=remount-ro) /dev/md2 on /vservers type ext4 (rw,discard) /dev/md1 on /var type ext4 (rw,discard)   The PROBLEM is that whenever I reboot the server, fstrim -v /any_mountpoint says it needed to trim ALL of the unused space. Once I do the full fstrim of the filesystems, everything works as expected until the next reboot. Running fstrim after a reboot again trims the whole filesystem.  Could somebody explain to me what I'm doing wrong? I thought ext4 remembered the already trimmed parts of filesystem (on my desktop with 1 ssd, it does). This is on Ubuntu 14.04 with 3.13.0-23-generic kernel.


Is there any other way to do a clean install withot formatting /home?

I think my Ubuntu is a bit broken from messing around with it.  Unfortunately during installation, I did not make a separate partition for /home. Now I need to re-install but want to keep my music and films.  Any ideas...


What does it mean to take the gradient of a vector field? $\nabla \vec{v}(x,y,z)$? I only understand what it means to take the grad of a scalar field.


How to append a dictionary to a list correctly in Python

I want to generate a list that contains several dictionaries, but I encountered a weird problem:  for i in xrange(0, len(merchant_id_list)):         for j in xrange(count, count + int(product_list_size[i])):             unit_price = get_unit_price_by_id(merchant_id_list[i], product_id_list[j])              product['id'] = product_id_list[j]             product['quantity'] = quantity_list[j]             product['price'] = unit_price             product_id.append(product)          print i         print merchant_id_list[i]         compound_data['id'] = merchant_id_list[i]         compound_data['product_id'] = product_id         merchant.append(compound_data)         print merchant          count += int(product_list_size[i])   I want to get the list looks like this:  [                 {                     "id":1,                     "product_id":[                         {                             "id":1,                             "quantity": 3,                             "price": 11                         },                         {                             "id":2,                             "quantity": 2,                             "price": 12                         }                     ]                  },                 {                     "id":2,                     "product_id":[                         {                             "id":16,                             "quantity": 2,                             "price": 22.22                         }                     ]   But finally it looks like this:  [                 {                     "id":2,                     "product_id":[                         {                             "id":16,                             "quantity": 2,                             "price": 22.22                         },                 {                     "id":2,                     "product_id":[                         {                             "id":16,                             "quantity": 2,                             "price": 22.22                         }                     ]   It looks that the last element override all previous dictionary. I've print the variable 'i' and 'merchant_id_list' and it is OK.  How to fix it? Thanks


I press F12 to render the camera view, but I just get a pixelish version of the render.    Can somebody tell me how to change that? I have already changed the object's "Render" Resolution to 100%.  Well, I have something to report now: When I use the middle mouse button to scroll out a little, the render appears a little smaller (seemingly at 100%), and it looks the way I expected. However, I wonder why that is that the render appears at like 125% for me instead of 100%.


I want to install a visual basic 6 in Ubuntu 14 step by step

We have developed an application in Visual Basic 6 as a front end. This application requires to capture automation values from machinery to system.  It captures the data using serial port.   So here I would like to know first, will Ubuntu supports installing vb6 in it?  If that's the case, what is the process to install and execute an application that need to be installed on Ubuntu.


How to tighten a circular saw without a spindle / arbor lock?

I have an older Black & Decker Sawcat #987. It does not appear to have any way of locking the spindle that I can find.  How are you supposed to tighten down the blade bolt if you can't hold the spindle from turning? It gets semi-tight and then the spindle just turns. The blade is still free to rotate at this point. I don't think there is enough friction to run the motor to snug it up that way.  I am aware of methods to loosen the bolt without a lock (hold the blade with block of wood, sharply applied torque, etc.) but these don't seem to apply when tightening.  (I feel like I may be missing something obvious because this seems like a ridiculous problem!)  Thanks


How can I bring a player back to immersion and away from the distraction he brings to the table?

Currently, one of my players brings his 3DS to the table. He picked up a new game, and insists that he's "just grinding," and that he's paying attention (and to his credit, for the most part he is), but he then complains that his character doesn't have enough screen time. To his credit, his character has only been given scrap plot points up until the most recent session, during which I was figuring out how something important in his backstory would tie into the plot. My current hopes are that one of the following occurs in regards to the distraction.   He finishes the particular game and no longer brings it to the gaming table. I've provided enough plot threads for his character (who, comparatively, is removed from the other characters) after the recent session that he might be engaged and willing to dig into the same overarching story with the other players, which is now connected to their goals.   However, I don't think that this will change anytime soon. I may be wrong, but I would like to be prepared as to handle this. This isn't the first time this has happened, but it is the first time it has been intrusive. The other players aren't happy with this, acknowledging the issues stated. The primary issue we have is that it keeps him from listening to and engaging other players' important character moments, something they do diligently for his character. How can I bring him back to immersion and away from his distraction?


I connect with my work PC using SSH. It was working fine until recently but now suddenly connection gets lost with error "write failed: Broken pipe " error on terminal. I saw similar question somewhere and it was suggested to add "ServerAliveInterval 120" line in ssh_config file. it doesn't work and I am facing same error again.


Word for a parent whose children have all died

I know there have been other questions asked that are similar, but I want to know about the specific case where a person has had a child or children, but all have passed on.  Is there an accepted word or term for a person in this situation?


error LNK2019: unresolved external symbol "public: __thiscall destructor

I get this error:   Error   1   error LNK2019: unresolved external symbol "public: __thiscall emath::VecN<float,3>::~VecN<float,3>(void)" (??1?$VecN@M$02@emath@@QAE@XZ) referenced in function _main   C:\Users\RobertBerglund\documents\visual studio 2013\Projects\testEnv\testEnv\Source.obj    testEnv   I don't know why, I declared the class destructor in the header emath.h:  template <typename T, const int n>     class   VecN     {     public: ... //destructor         ~VecN(); ... };   And then I defined it in emath.cpp:  template <typename T, const int n> VecN<T, n>::~VecN() {     delete _data; }   It is also maybe worth to mention that the declaration in the header is between:  namespace emath { ... }   And before the class definitions in the cpp file I have:  using namespace emath;   Also _data is an array/pointer of type T  After the class declaration I define the folowing type to use in my code:  typedef VecN<float, 3> vec3;   In main() I have:  ... vec3 vec(4.0f); ...     cout << "vector test:";     for (int i = 0; i < 3; i++)         cout << vec[0] << vec[1] << vec[2] << endl; ...   Please let me know if I need to post more parts of my code, thanks in advance !


Can a smaller sensor's "crop factor" be used to calculate the exact increase in depth of field?

If APS-C and similar crop-sensor digital cameras have a focal length multiplying effect such that a 50mm lens has an apparent focal length closer to the field of view of an 80mm on a full frame camera, and yet at the same time the depth of field for the smaller sensor camera is more like the depth of field a 50mm lens would produce on a full frame camera (using the same aperture), then this would seem to suggest the concept of an "aperture dividing effect."  In other words, a 50mm f/1.8 lens on an APS-C camera would act more like a 80mm f/2.8 (approx. 1.8 * 1.6x) lens in 35mm equivalent — for depth of field, not considering exposure.  Can someone with a better understanding of the physics involved clarify this for me.  I've never seen this concept explicitly mentioned anywhere, so I am a bit suspect of it.


How to remove a fragment / hash URL from Google search results?

My old site used to write the URLs without !.  Eg: www.example.com/#/products  But it has been more than 6 months since I changed it to include ! in the URL like so:  www.example.com/#!/products   But unfortunately Google search results still show my old URL schema.  There is no way I could enter in the Google Removal Tool (via their Webmaster Tools) to remove www.example.com/#/products since Google will complain about an invalid URL.  All I want is to remove www.example.com/#/products and Google to show the one with /#!/products in the results instead.


Playstation Plus for PS4 on multiple Console accounts?

When paying for a Playstation Plus subscription, for online gaming with the PS4, is the subscription tied to one account on the console, or the console itself?  To provide some scope, I'm assuming multiple accounts can be made on the PS4 just as you could on the PS3... I'm wondering whether each account needs it's own subscription.  I have looked through the  and one section reads:  One PlayStation Plus membership allows all local accounts on the subscriber’s ‘Primary PS4’ to use online multiplayer through their Sony Entertainment Network accounts.  I was hoping for some clarification. Are the said "local accounts", all accounts on the console?


How to figure out if two matrices are similar matrices!!!

How do you show that two matrices are similar? I know that if they are similar, then B=(v^-1)AV, but how do you find V^-1 and V? For example, the matrices {[1,2]T, [3,2]T} and {[0,4]T, [2,2]T}, how would you find the P and P^-1 (if they are similar)? Or would you have to show they are similar in a different way?  Thank you!


I am using SQL Server 2012 and was wondering how to profile stored procedures  For instance can profiler capture each individual SQL statement in a stored procedure, what it is, and how long it takes to run etc?  I am trying to diagnose merge replication stored procedures, and this must be captured a part of a full run of the merge agent. It doesn't seem possible to grab the stored procedure with performance issues and run it again because at that point it is not slow.


How can I save a image from stream to my Android device's folder in Xamarin.Forms?

I'm capturing screenshot from a XAML element using the  plugin and it returns me a Stream.    public ICommand CaptureCommand => new Command<VisualElement>(OnCapture);     async void OnCapture(VisualElement element)    {        var stream = await element.CaptureImageAsync();    }    How can I save the image I have captured using the Stream I got to a folder on my Android device as a png file?


K means minimize Sum of SSEs of clusters

I am talking about K-means clustering problem.  Theoretically, my understanding is :     If there are K clusters, the K-means algorithm outputs K centroids/means such that it minimizes total sum of SSE (Sum squared error) of all clusters.    Now, I was trying to understand how each iteration works. I referred 'an example' section at  .   This suggests the following procedure for finding the k means:  Make initial guesses for the means m1, m2, ..., mk  Until there are no changes in any mean  Use the estimated means to classify the samples into clusters.  **(we can use a minimum-distance classifier to separate them. That is, we can say that x is in cluster i if || x - mi ||  is the minimum of all the k distances)**      For i from 1 to k     Replace mi with the mean of all of the samples for cluster i     end_for  end_until   I don't see, at any point, this iteration dealing with SUM of SSEs. It just considers each clusters independently.  So, can I say the above iteration process doesn't totally encapsulate the details of K-means algorithm. It is a sub-optimal approach which can work in some cases and NOT in some other cases?


Search Column name in Linked Server (Oracle) from Microsoft SQL Server

I need to retrieve Table Names from Linked Oracle Database which is on Linked Server with Microsoft SQL Server.  e.g. I can get table names in SQL Server using:  SELECT TABLE_NAME, COLUMN_NAME  FROM INFORMATION_SCHEMA.COLUMNS  WHERE COLUMN_NAME LIKE '%TELEPHONE%'   but, I need Oracle Code.  I am using Microsoft SQL Server with a linked server to Oracle.


Which sentence is correct:  Why don't you try to give up candy if you want to lose some weight? Why don't you try giving up candy if you want to lose some weight?


I know that $0^0$ is one of the seven common indeterminate forms of limits, and I found on wikipedia two very simple examples in which one limit equates to 1, and the other to 0. I also saw here:   that you can define $0^0$ as 1 if you'd like.  Even so, I was curious, so I did some work and seemingly demonstrated that $0^0$ always equals 1.  My Work:  $$y=\lim_{x\rightarrow0^+}{(x^x)}$$  $$\ln{y} = \lim_{x\rightarrow0^+}{(x\ln{x})} $$  $$\ln{y}= \lim_{x\rightarrow0^+}{\frac{\ln{x}}{x^{-1}}} = -\frac{∞}{∞} $$  $\implies$ Use L'Hôpital's Rule  $$\ln{y}=\lim_{x\rightarrow0^+}\frac{x^{-1}}{-x^{-2}} $$ $$\ln{y}=\lim_{x\rightarrow0^+} -x = 0$$ $$y = e^{0} = 1$$  What is wrong with this work? Does it have something to do with using $x^x$ rather than $f(x)^{g(x)}$? Or does it have something to do with using operations inside limits? If not, why is $0^0$ considered indeterminate at all?


Activity Tab For Stack Exchange users is sometimes empty

For some users, the activity tab is empty ("no activity found") if "all" is selected, even though the tabs other than "all" are non-empty.  Also, the "all" tab is loading much slower than usual for the users with an empty "all" tab. As of now:  - Empty  - Empty  - Working normally


I am trying to code a find and replace Java program

this is the loop im executing for(int i=0;i<str.length;i++){     if (str[i]==strFind) {         str[i]=strReplace;         count++;     } }  The problem is that if the last word of the sentence has a period in some test cases and it doesn't have a period in some.And if i replace the word in the given manner. I cannot retain the period. Is there a simpler solution for this? Also, can replace all take a sting variable(strReplace-user input)?


How to print a result depends on String value?

I am very new to Java and would ask you for help. I have this: public class Person {  String name; String gender;  public static void main(String[] args) {     Person person = new Person();     person.name("Max");     person.gender = "male";          Person person2 = new Person();     person2.name = "Lea";     person2.gender = "female"; }  What should be the correct syntax for the following method? Should I convert String to boolean? if (String = male) {     System.out.println("You are man!") } else{     System.out.println("You are woman!")      Thank you!


Non-hidden directory doesn't show in Explorer, but the program that made it can access it

I'm using  to backup my mailboxes. The process just dumps the contents of your mailbox into .eml files on your disk. Anyway, the first mailbox I backed up shows up as I expect. However, the next one doesn't show in Explorer and, if I enter it in the address bar, it tells me that it doesn't exist.  However, IMAPSize is insisting that the files are there. (A lot of disk writing was being performed during the operation.) Moreover, the directory does appear in the Windows directory dialog and - as I have GNU tools installed - it shows in ls (but not in the native dir). I can't cd into the directory, but ls does seem to be able to access it (and, indeed, the directories and files I expect appear to be there).    Also note that the timestamp and filesize of backup.db are different in the dir and ls -l output.  In short: What is going on here and how do I fix it!?


Is conditional expectation with respect to two sigma algebra exchangeable?

$(\Omega, \mathcal{F}, P)$ is a probability space. $X$ is a r.v. defined on it, and $\mathcal{G}_1, \mathcal{G}_2$ are two $\sigma$-algebra, can we claim the following: $$ \mathbb{E}\{\mathbb{E}[X|\mathcal{G}_1]|\mathcal{G}_2\}=\mathbb{E}\{\mathbb{E}[X|\mathcal{G}_2]|\mathcal{G}_1\}=\mathbb{E}[X|\mathcal{G}_1\cap\mathcal{G}_2]. $$ If this is not true, why the following is true: $X_1,X_2,\ldots,X_n$ are independent r.v. on the same probability space, $Z=f(X_1,X_2,\ldots,X_n)$ is another r.v. And we have: $$ \mathbb{E}\{\mathbb{E}[Z|X_1,\ldots,X_{i-1},X_{i+1},\ldots,X_n]|X_1,\ldots,X_i\}=\mathbb{E}[Z|X_1,\ldots,X_{i-1}]. $$


I have a fresh installation of Ubuntu 18.10. Using the disc management tools in Windows I was able to shrink the volume and give myself 200G for Ubuntu.   I am trying to mount the Windows partition so that I can place my music (abt 240G) and my photos (abt 400G) on the Windows partition and have full access to all the files. So far, even when using the examples below, "Permissions" says I have full access, yet I cannot change anything on that partition.  Using the examples in:    I have edited my /etc/fstab:       # Example:     # Windows Partition - targetted for /media/win7     # UUID=UUIDOFPARTITION  /media/win7    ntfs-3g     defaults,locale=en_US.utf8,windows_names,umask=7000,uid=1000,gid=1000,user  0   0     #     # first solution:     # UUID=82B86F5AB86F4C2B /Windows ntfs-3g defaults,local=en_US.utf8,windows_names,umask=7000,uid=1000,gid=1000,user 0 0     # The above did not work.      #     # second solution:     # Example:     # UUID=0123456789ABCDEF    /mnt    ntfs-3g    rw,exec,async,auto,user,locale=en_US.utf8,windows_names,umask=7007,gid=654    0    0     #      # My next solution:     # UUID=82B86F5AB86F4C2B /Windows ntfs-3g rw,exec,async,auto,user,locale=en_US.utf8,windows_names,umask=7007,gid=1001, 0 0     UUID=82B86F5AB86F4C2B /Windows ntfs-3g rw,exec,async,auto,user,locale=en_US.utf8,windows_names,umask=7007,uid=1000,gid=1001, 0 0   This did not result in being able to read and write to the NTFS partition on the single hard drive. I tried with and without the uid=1000. I created the group and added myself to 'ntfs-access' with gid="1001" (quotes removed).


I have a very simple request here to implement, if it doesn't already exist, a way to filter questions by number of answers. This would allow you to look for questions with no answers at all (not just questions that have no accepted or upvoted answers, like the unanswered questions tab).


I have a string that is a date, like this @"dd/mm/yyyy" and I want to split this string in 3 small strings with day, month and year. I've succeeded on doing it with the day using this code:  self.dayLabel.text = [string substringToIndex:2];   but how do I get the middle values, like the month?


Creating random points in QGIS with values from Attribute Table

I'm trying to create a visual map in QGIS 2.4 of the approximate distribution of journey origin points using a shapefile of UK postcode sectors, layer joined to a table with a column giving the number of journey origins in each sector. Using the Vector > Research Tools > Random Points menu tool, I can select the Input boundary layer and click the 'Use value from input field' radio button, but the pull-down menu to select the required field does not seem to work. If I then specify the Output Shapefile name and target location , I get an error message - "Errors: The following features IDs couldn't be calculated due to conversion error: 335, 335". To confirm, QGIS does display random points if I specify the density or a specific number of points using the first two 'Stratified Sampling' Designs for individual polygs.


As someone new to programing (C++) , I came across pointer which gave me a headache doing it as I never seen the point of using it. I tried to look at other answer on stack overflow but it was a bit confusing.It would be great if someone could explain why we use pointers and in a way to make it easier to understand.


for two non zero complex polynomial $p(z),q(z)$ we have $p(z)\overline{q(z)}$ is analytic if and only if ?? CSIR - June $2013$

Question is :  for two non zero complex polynomial $p(z),q(z)$ we have $p(z)\overline{q(z)}$ is analytic if and only if    $p(z)$ is Constant $p(z)q(z)$ is Constant $q(z)$ is Constant  $\overline{p(z)}q(z)$ is Constant   I could easily eliminate first case.   Put $p(z)=1$ and $q(z)=z$ then we would have $p(z)\overline{q(z)}=\bar{z}$ which is not analytic though $p(z)$ is constant.   I could see third case is almost true .   Suppose $q(z)$ is constant then I will be left with only polynomial case so $p(z)\overline{q(z)}$ is analytic. Now, suppose $q(z)$ is not constant then I would have a contradiction which is already considered $q(z)=z$   I could not go any further on second and fourth cases.  Please help me to see this in more detail.  Thank you.


Am I being charged taxes on my grocery purchases at Walmart?

Today, I only bought groceries at Walmart and noticed that there is no tax on groceries in California (Google tells me that this is perhaps true for whole of the US?)  So far I have always paid tax at Walmart for my grocery purchases, but that also included items like crackers, shampoo etc  Did Walmart charge me then only for the items that were not groceries, or if your cart has groceries + non-grocery items, you get charged tax on all of them?  Or is this a policy that varies by store, or cashiers' knowledge/discretion, etc?  Would people recommend for me to break down a single mixed purchase into two: one only having groceries and the other with the rest, or is this being paranoid?  My grocery purchases, every two weeks, amount to around $100+.  I pay 8.25% tax, so that is enough to get me free gas if I can figure this out!


Old 1E player now getting back into 5E.  What are HIT DICE?  I understand hit points and a 3rd level player has rolled 3 times for HP ( I do like the MAX at first level and then roll option)  but what are Hit dice and why do they matter?


Is it safe to leave butter at room temperature? If so, for how long is it safe to keep it out?


check if page is served securely over https

I am creating a chrome extension that exposes extra APIs to websites. Before these APIs can be used by websites, I want to show a warning if the website was served over HTTP and not HTTPS. This is because these APIs reduce the web sandbox and could be more dangerous if the JavaScript source from the website is not verified to have come from the correct party.  Is there a reliable method I can use to check if a website was served over HTTPS? Maybe a chrome extension API (for example inside a content script)?  Checking location.protocol seems to be potentially inaccurate in case of problems with the certificate:


How do I dismiss the new cookie popup that appears on the site?

Lately I've been seeing this cookie popup that blocks a lot of the screen.  When I try to do the "manage cookies" thing, all it shows me are several categories, with a green oval containing a black circle to the right of each.  Clicking on that oval makes it disappear.  Clicking on the same spot again makes it reappear.  But I see no indication as to which state is off or on. So how can I make this popup go away, never to bother me again?  Or failing that, could you at least provide some indication as to what those buttons do?  Like maybe simple text saying "Off" or "On"?


ProcessStartInfo hanging on "WaitForExit"? Why?

I have the following code: info = new System.Diagnostics.ProcessStartInfo("TheProgram.exe", String.Join(" ", args)); info.CreateNoWindow = true; info.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden; info.RedirectStandardOutput = true; info.UseShellExecute = false; System.Diagnostics.Process p = System.Diagnostics.Process.Start(info); p.WaitForExit(); Console.WriteLine(p.StandardOutput.ReadToEnd()); //need the StandardOutput contents  I know that the output from the process I am starting is around 7MB long. Running it in the Windows console works fine. Unfortunately programmatically this hangs indefinitely at WaitForExit. Note also this code does NOT hang for smaller outputs (like 3KB). Is it possible that the internal StandardOutput in ProcessStartInfo can't buffer 7MB? If so, what should I do instead? If not, what am I doing wrong?


Apt-get could not open lock - permanently

After running apt-get update I receive the following errors:  E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/ E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?   I tried what is written :  rm /var/lib/apt/lists/lock   In this case I'm able to run apt-get upgrade successfully. But after a reboot the issue is return.  I searched for the problem. But I didn't find a solution. A tried what is written , but I have no output for ps -aux | grep 'apt-get'.  I use Ubuntu 16.10.


$L^1$ convergence gives a pointwise convergent subsequence

I have been reading Terry Tao's notes on Real Analysis and there's a part he just says, but does not really explain, so I am wondering if someone here would. The notes are  and my particular question is from Section 4, Corollary 3. It goes as follows,  Let $f_n \rightarrow f$ in $L^1$ then there exists a sub sequence $(f_{n_j}) \subset (f_n)$ such that $f_{n_j} \rightarrow f$ pointwise a.e. Moreover $(f_{n_j})$ converges almost uniformly to $f$.  The proof he gives is simply that since $\|f_n-f\|_1 \rightarrow 0$ as $n \rightarrow \infty$ we can pick a sub sequence such that $\|f_{n_j}-f\|_1<2^{-j}$ which is enough to show pointwise a.e and almost uniform convergence. But what allows you to pick such a sub sequence is it maybe some Cauchy property or is it some weird construction? Then how do you go from that to pointwise a.e and even almost uniform convergence. I am assuming that for almost uniform, you do something similar to Egorov's theorem without the assumption the domain of $f$ has finite measure. Also I am aware that if you get almost uniform, you immediately have pointwise a.e, but I'd like to see how to get to both. Thank you.


Why do I need the x permission to cd into a directory?

ls -la prints the following:  drwxrwxrw- 2 www-data www-data 4096 Aug 12 11:04 files   My username does not belong to www-data. When trying to cd into files I get a "permission denied" though the "read" permission for others is set.   Why do I need the "execute" permission?


Whenever I get a game on the E-Shop, it lets me know that said game takes a certain amount of blocks.  Sometimes it'll let me know I need to make room for more blocks to download some games.  How much memory is in a block?


i have this query  SELECT a.album_id parent, a2.album_id child FROM album a LEFT JOIN album a2 ON a2.parent_album_id = a.album_id WHERE a.album_id = 76   Basically, it returns parent and children values, like so:  parent      child -------------------- 76          64 76          106   I want to use those values,  the parent and all of the children (76, 64, 106), to delete from another table like so  DELETE a, ai FROM album a LEFT JOIN album_image ai ON ai.album_id = a.album_id WHERE a.album_id IN (76,64,106)   Executing the above query, works perfectly! But, i need the query to be dynamic. I've try this with no success:  DELETE a, ai FROM album a LEFT JOIN album_image ai ON ai.album_id = a.album_id WHERE a.album_id IN (     SELECT a.album_id parent, a2.album_id child     FROM album a     LEFT JOIN album a2 ON a2.parent_album_id = a.album_id     WHERE a.album_id = 76 )   I get it why it won't work, because the subquery in the where clause returns 2 values. And so i've try CONCAT_GROUP and CONCAT_WS with no success!  What is my solution? Thanks


how to convert java class encoding to utf-8

i'm working on a java project and i have a package that contains many clasees (more than 100 files) some files are not saved with utf-8 and this cause some problem in the compilation proccess..  my question is : there is a way to change the encoding for theses all classes to utf-8 at once , somethink like bach script.. ? i'm using windows.  Thanks in advance


Preferred way to report the same bug in multiple apps?

A little ago, I found  in the review queue. The asker is reporting a bug he found in the android SE app.  The suggested edit proposed to add a second tag to the question to indicate that the bug seem to be present on the IOS app too. I approved the edit and added that info to the question.  Soon after, an user on the Tavern chat room made me notice that this way the staff can't actually mark the bug as fixed until both app are fixed. I am left now wondering... what is the preferred way to handle this situation? Have two copy of the question, each one referencing to one app?   I am especially interested in any info that can provide indication about the staff preferences, ie - finding the posting pattern that is simpler for them to manage.


How to correctly format (and align) a LaTeX proof?

I'm new to LaTeX and I'm trying to figure out how to correctly format a proof. Can someone show me a basic template for how to do this?   The part I am having the most trouble with is creating new columns and customizing alignment... for instance, how do I add a right-aligned annotation (i.e. by distributive property) to a line of this sample proof? Should I use eqnarray* or is there a better option?  \begin{proof}   Let $t,u \in \mathbb{R}$ where $t=xy$ and $u=zw$. So,   \begin{eqnarray*}     4xyzw &=& 2\cdot2tu \\     &\le& 2\cdot(t^2+u^2) \\     &=& 2\cdot((xy)^2+(zw)^2) \\     &=& 2\cdot(x^2y^2+z^2w^2) \\     &=& 2x^2y^2+2z^2w^2 \\     &\le& ((x^2)^2+(y^2)^2)+((z^2)^2)+(w^2)^2) \\     &=& x^4+y^4+z^4+w^4   \end{eqnarray*} \end{proof}


Proof by Induction $\sum_{i=0}^{k-1} 2^i = 2^k-1$

Prove mathematical induction $$\sum_{i=0}^{k-1} 2^i = 2^k-1$$


How can I split a table over two columns?

Apologies if this has already been asked, but I can't seem to find an answer to my exact query.  I am working on a two column document using the book document class. I am using the tabular environment to create a table, however I've noticed that LaTeX is not willing to split the table over two columns.  I don't wish to break the table by ending the tabular environment and starting a new one (as suggested by one post of here), as the document is a work in progress, and I would prefer LaTeX to automatically break the tables as it sees fit.  Would the supertabular environment help with this? I have also read about longtable and longtabu, and are now trying to work out which is best suited.  The tables don't have headers or captions, and are all the same width.  I am still getting to grips with LaTeX after a break of 20 years, so any help is appreciated.  I have tried the longtable option but gives an error of 'not in 1-column mode'.


I want my figures to be captioned Figure x.n for the nth figure in chapter x. The below MWE gives correct figure numbers in the captions, but \ref gives the chapter numbers instead of x.y:  \documentclass{scrbook}  \usepackage{chngcntr}  \counterwithin{figure}{chapter}  \newcommand{\myfig}[3] {     \begin{figure}[ht]         \label{#1}         \centering         %\input{figures/#2}         \caption{#3}     \end{figure} }  \begin{document}  \chapter{Chapter One}  \myfig{figone}{foo}{This is the first figure.} \myfig{figtwo}{foo}{This is the second figure.}  \chapter{Chapter Two}  \myfig{figthree}{foo}{This is the third figure.}  \chapter{Chapter Three}  See figures \ref{figtwo} and \ref{figone} and \ref{figthree}.  \end{document}   I expected Chapter Three to contain     See figures 1.2 and 1.1 and 2.1.   Instead it contains     See figures 1 and 1 and 2.   How do I reference figures to get x.n numbering?