Instabug 3 Android Builder crash (NullPointerException)

I recently updated my production Android app from Instabug 2.5.1 to 3.1.1. Since then, I have been getting consistent crash reports on Fabric caused by a NullPointerException in InstabugFeaturesManager for phones ranging from Android 4-6. I haven't seen this issue in testing or been able to reproduce it.  Here is the crash report:  Fatal Exception: java.lang.RuntimeException: Unable to create application com.myapp.main.MyApplication: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6032)    at android.app.ActivityThread.access$1700(ActivityThread.java:218)    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795)    at android.os.Handler.dispatchMessage(Handler.java:102)    at android.os.Looper.loop(Looper.java:145)    at android.app.ActivityThread.main(ActivityThread.java:6934)    at java.lang.reflect.Method.invoke(Method.java)    at java.lang.reflect.Method.invoke(Method.java:372)    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199) Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.Boolean.booleanValue()' on a null object reference    at com.instabug.library.h.a(InstabugFeaturesManager.java:70)    at com.instabug.library.g.b(InstabugDelegate.java:208)    at com.instabug.library.Instabug$Builder.build(Instabug.java:1277)    at com.instabug.library.Instabug$Builder.build(Instabug.java:1372)    at com.myapp.main.MyApplication.onCreate(MyApplication.java:107)    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1035)    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:6029)    at android.app.ActivityThread.access$1700(ActivityThread.java:218)    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1795)    at android.os.Handler.dispatchMessage(Handler.java:102)    at android.os.Looper.loop(Looper.java:145)    at android.app.ActivityThread.main(ActivityThread.java:6934)    at java.lang.reflect.Method.invoke(Method.java)    at java.lang.reflect.Method.invoke(Method.java:372)    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1404)    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)   build.gradle:  compile('com.instabug.library:instabug:3.1.1') {     exclude group: 'com.android.support';     exclude group: 'com.google.android.gms'; }   Note: I'm excluding those libraries because I want to control what version my app is using.  MyApplication#onCreate():  new Instabug.Builder(this, MyConstants.Application.INSTABUG_KEY)             .setInvocationEvent(InstabugInvocationEvent.SHAKE)             .setShakingThreshold(500)             .setCrashReportingState(Feature.State.DISABLED)             .setTrackingUserStepsState(Feature.State.ENABLED)             .setInAppMessagingState(Feature.State.DISABLED)             .setIntroMessageEnabled(false)             .setEmailFieldRequired(true)             .build();  //Crash originates here     I would argue this is not your normal NullPointerException question. For one, I'm not adding anything to the build that could possibly be null and it crashing internally. Additionally, the Instabug library is heavily obfuscated so I can't make sense of why it is crashing internally. I've looked around everywhere, but haven't found a case of anyone else having this issue. Am I missing something here?


Brother MFC-295CN installation help needed

I am a complete NEWBIE to Linux and Ubuntu. So I need step by step help please. I am running Ubuntu 13.04 and I have no clue how to install my printer. I am sick of Windows and want to run Ubuntu only, but right now I have to dual boot with Windows so I have access to my printer. Printer is a Brother MFC-295CN, and I want to install basic way by USB-not network. I have looked at other questions about this but I don't understand how to install packages or use terminal commands. So a step by step help is what I need. Thanks in advance for any help.


I have an old Ubuntu server (13.04), and want to open a port for this online game server style software for a mate. I need a port open, and to tell it that port (I know how to tell the game that port).  For the sake of argument, let the port I want to open be 12345.  How do I do such, with no access to a GUI, only a Bash shell. Both how to open the port, and how to fiddle with the firewall so that port is visible to the world.   Thanks!  EDIT: I can port forward it internally (iptables esque), but I don't know what firewalling software I have installed. Is there an easy way to find that out? Also, how do I port forward the router as well, all from the terminal. Sorry for the earlier lack of detail


A math book I'm studying uses a symbol and I'd like to be able to reproduce it.  I used detexify to search for it, but was unsuccessful. Most likely it is the letter 'a' in some font I'm not familiar with.   Here's a zoomed in image of the symbol:    Here it is in context:


Sometimes checking of arguments in Python is necessary. e.g. I have a function which accepts either the address of other node in the network as the raw string address or class Node which encapsulates the other node's information.  I use type() function as in:      if type(n) == type(Node):         do this     elif type(n) == type(str)         do this   Is this a good way to do this?  Update 1: Python 3 has annotation for function parameters. These can be used for type checks using tool:


How can I create a dynamically sized array of structs?

I know how to create an array of structs but with a predefined size. However is there a way to create a dynamic array of structs such that the array could get bigger?  For example:      typedef struct     {         char *str;     } words;      main()     {         words x[100]; // I do not want to use this, I want to dynamic increase the size of the array as data comes in.     }   Is this possible?    I've researched this: words* array = (words*)malloc(sizeof(words) * 100);  I want to get rid of the 100 and store the data as it comes in. Thus if 76 fields of data comes in, I want to store 76 and not 100. I'm assuming that I don't know how much data is coming into my program. In the struct I defined above I could create the first "index" as:      words* array = (words*)malloc(sizeof(words));   However I want to dynamically add elements to the array after. I hope I described the problem area clearly enough. The major challenge is to dynamically add a second field, at least that is the challenge for the moment.    I've made a little progress however:      typedef struct {         char *str;     } words;      // Allocate first string.     words x = (words) malloc(sizeof(words));     x[0].str = "john";      // Allocate second string.     x=(words*) realloc(x, sizeof(words));     x[1].FirstName = "bob";      // printf second string.     printf("%s", x[1].str); --> This is working, it's printing out bob.      free(x); // Free up memory.      printf("%s", x[1].str); --> Not working since its still printing out BOB even though I freed up memory. What is wrong?   I did some error checking and this is what I found. If after I free up memory for x I add the following:      x=NULL;   then if I try to print x I get an error which is what I want. So is it that the free function is not working, at least on my compiler? I'm using DevC??    Thanks, I understand now due to:     FirstName is a pointer to an array of char which is not being allocated by the malloc, only the pointer is being allocated and after you call free, it doesn't erase the memory, it just marks it as available on the heap to be over written later. – MattSmith   Update  I'm trying to modularize and put the creation of my array of structs in a function but nothing seems to work. I'm trying something very simple and I don't know what else to do. It's along the same lines as before, just another function, loaddata that is loading the data and outside the method I need to do some printing. How can I make it work? My code is as follows:      # include <stdio.h>     # include <stdlib.h>     # include <string.h>     # include <ctype.h>      typedef struct     {         char *str1;         char *str2;     } words;      void LoadData(words *, int *);      main()     {         words *x;         int num;          LoadData(&x, &num);          printf("%s %s", x[0].str1, x[0].str2);         printf("%s %s", x[1].str1, x[1].str2);          getch();     }//      void LoadData(words *x, int * num)     {         x = (words*) malloc(sizeof(words));          x[0].str1 = "johnnie\0";         x[0].str2 = "krapson\0";          x = (words*) realloc(x, sizeof(words)*2);         x[1].str1 = "bob\0";         x[1].str2 = "marley\0";          *num=*num+1;     }//   This simple test code is crashing and I have no idea why. Where is the bug?


I had mongdb installed and evrything was working fine. I wanted to delete the mongodb lock. By mistake the directory /var/lib/mongodb/ got deleted.  So, I uninstalled mongo db and installed again. But now i always keep getting this error:  Error: couldn't connect to server 127.0.0.1:27017 at src/mongo/shell/mongo.js:145 exception: connect fail   The error remains same even if I try to login from terminal or rockmongo or my application. I am using ubuntu12.04 and have latest version of mongo.


Testing symmetry of a distribution around its mean

We can test the symmetry of a distribution around $0$ by Wilcoxon sign rank test, based on its sample.   But if we want to test if a distribution is symmetric around its mean, based on its sample $X_1, \dots, X_n$, is it valid to first normalize $X_i$ by the sample mean as $Y_i := X_i - \bar{X}$, and then apply Wilcoxon sign rank test to $Y_i$'s?  If not, what are some ways?  Thanks and regards!


Using the Postgres information_schema or system catalogs, is it possible to determine what table columns are referenced by the columns in a view?  information_schema.view_column_usage provides information on columns that are used in a view, not necessarily selected as a column.   pg_class and pg_attribute provide some info, but there doesn't seem to be a way to map columns from a view where an alias has been used.  Is is it possible to get the column references of the selected columns in a view?


Let's assume that a journal editor has been allocated a submission, started reviewing it himself, but stopped responding to the managing editor (= you) despite a long time since the authors had sent the submission (a little less than 3 years).  The submission is longer than each of the papers accepted during the last 5 years, but historically, even longer papers were accepted. The authors are aware of the length issue, but they are concerned.  The editor's Web page gets updated (say, new teaching contents appears), so, she/he is presumably still alive, but simply unresponsive.  The journal has no written, formal deadlines in its guidelines.  How long is it acceptable for the managing editor (= you) to wait after the first unanswered message to the editor before replacing the editor? What is typical in the field of computer science?


What do we see if a single ray of white light falls in to our eyes ?  Doesn't it undergo dispersion ?


How can I check if the filename of a LaTeX document contains a string?

I am preparing a LaTeX beamer presentation for students. I am looking for a simple way to create two versions of my presentation.  One version for the Students, which just contains the text of the tasks they get for homework and an other one for me which also contains the solution.  So I have created a macro that is intended to check if the file name contains "student". If it does, the macro outputs nothing, and if it does not, the argument is passed:  \newcommand{\hausaufgabenLoesung}[1]{%     \IfSubStringInString{student}{\jobname}{}{#1}% }   But this does not work as intended. No matter how I name the file, the conditional always goes to the false-expression. I think the \jobname macro returns something which can not be processed by \IfSubStringInString but I have no other idea how I could approach this.  If I replace the \jobname macro in the conditional with a fixed string, it works as intended but this would render it fairly useless.  I used \jobname to avoid including the currfile-package, but with the currfile-macros I get the same behaviour. I am using texlive 2014 pdflatex on Linux and Windows.  Anyone here got a hint for that?  Here is a minimal complete example:  \documentclass[ngerman]{beamer}  \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[ngerman]{babel}  \usepackage{ifthen} \usepackage{substr}  \newcommand{\hausaufgabenLoesung}[1]{%     \IfSubStringInString{student}{\jobname}{}{#1}% }  \begin{document}  \begin{frame}{Title}{Subtitle}     \begin{itemize}         \item \jobname         \item Visible in both files         \hausaufgabenLoesung{\item Solution not in the student file}     \end{itemize} \end{frame}  \end{document}


Blender Python Scripts: How to import always the same file by pressing a UI button?

How to create an import button that loads always the same OBJ file?   I'm creating a connection bridge between Blender and other software. I was able to create a button following the scripts templates. In Blender, there is an import script template but contains a custom import function that prints text into the console.  This script is working but when I introduce the path, (filepath="X:/DoNotMove/Blender/mesh.obj") it stops working.  import bpy  # WIP BLENDER BRIDGE: Alan Mattano 2020 Soaring Stars lab  class CustomImpotPanle(bpy.types.Panel):     """Import Custom Panel for Rhino bridge"""     ui_tabTitle ="Import OBJ"     ui_topHeader = "Blender Bridge"          bl_label = ui_tabTitle     bl_idname = "OBJECT_PT_rhino"     bl_space_type = 'PROPERTIES'     bl_region_type = 'WINDOW'     bl_context = "object"      def draw(self, context):         layout = self.layout             obj = context.object          row = layout.row()                     row.label(text="Bridge", icon='MESH_CYLINDER')                      # IMPORT OBJ (consider using %Temp%)         row = layout.row()                     row.operator("import_scene.obj", text="IMPORT OBJ", filepath="X:/DoNotMove/Blender/mesh.obj")  def register():     bpy.utils.register_class(CustomImpotPanle)      def unregister():     bpy.utils.unregister_class(CustomImpotPanle)  if __name__ == "__main__":     register()   NOTE: By the way, the place for this type of button is not the best solution (but is working). Probably the top windows toolbar is a better solution.


How to share files between two Ubuntu 14.04 computers

I've trying to share files between my two computers by WIFI and SAMBA. I checked share option in folder properties and tried to connect to other computer by smb://ip. But without succes. Could some one hep me how to do this step by step. Maybe I did something wrong...


How can the rest-frame spectrum of redshifted light be determined?

The redshift effect must work on all frequencies, so blue would be shifted down to some lower frequency, and ultra violet would be shifted down also, into the visible area. How would you know what part of the (pre-redshifted) spectrum you were looking at?


I do not understand why I keep getting this error for the output

So below we have the code from the first of my two files, titled Game (keep scrolling down to see the second file + the issue)   public class Game {     private static final int PLAYING=0;     private static final int RED_WINS=1;           private static final int BLACK_WINS=2;         private static final int DRAW=3;             private static final int RED=4;             private static final int BLACK=5;             private static final int EMPTY=6;         private static final int WALL=7;     private static int board[][];  public Game() {       int board[][]={{WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL},                 {WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL},                 {WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL},                 {WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL},                 {WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL},                 {WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL,EMPTY,WALL}};   } public  void draw() {     for(int r= 0; r< board.length; r++)         {              for(int c= 0; c<board[0].length; c++)                 {                     if(board[r][c]==WALL)                     {                         char Wall='|';                         board[r][c]=Wall;                     }                         if(board[r][c]==EMPTY)                     {                         char Empty=' ';                         board[r][c]=Empty;                     }                     if(board[r][c]==BLACK)                     {                         char Black='B';                         board[r][c]=BLACK;                     }                     if(board[r][c]==RED)                     {                         char Red='R';                         board[r][c]=RED;                     }                     System.out.print(board[r][c] + "");                 }                 System.out.print("\n");        } } }      And Below is the code from the second file, MainFile   import java.util.Scanner; public class MainFile {     public static void main(String[]args)     {         Game a=new Game();         a.draw();     } }      When I press compile, the output says Process completed and everything seems fine at first, but when I press run file I get the following runtimerror,could I know what I'm doing wrong and how can I fix it?   Exception in thread "main" java.lang.NullPointerException     at Game.draw(Game.java:28)     at MainFile.main(MainFile.java:7)


How to resolve 'maximum trigger depth exceeded' error in my trigger?

My problem statement is as follows:  1) I have a custom object where due to business requirements I had to add two new fields named 'CSO Work Duration' and 'DA Work Duration'. These fields are calculating the Work duration of a case in the status CSO/DA. This is done via trigger. These fields are critical for the reporting purpose.  2) Now we need values in these fields for the records which are already in production. There are more than 3000+ records as of now. To update these records I thought of creating the trigger which will run only once and calculate these field values and update them in production.  3) Now the issue I am facing in my trigger is that I am receiving the 'maximum trigger depth exceeded' error.  Below is the code for the same:  Note : Updated trigger to fire on Before event.  Trigger  Trigger CaseRecordUpdateTrigger on Case_Status_History__c(Before Update)  {     IF(Trigger.isBefore)     {         IF(Trigger.isUpdate)         {             List<Case_Status_History__c> CSHToBeProcessed1 = New List<Case_Status_History__c>();             boolean callThatMethod1 = false;             For(Case_Status_History__c CSH : Trigger.New)             {                 IF((CSH.New_Status_Value__c == 'Closed') && ((CSH.CSO_Work_Duration__c == 0.00) || (CSH.DA_Work_Duration__c == 0.00)))                 {                     CSHToBeProcessed1.Add(CSH);                     callThatMethod1 = true;                 }                                             }            if(callThatMethod1)             {                CaseRecordUpdateTriggerHelper.UpdateWorkDurationField(CSHToBeProcessed1);            }         }     } }   Trigger Helper Class  Public Class CaseRecordUpdateTriggerHelper {     Public Static Void UpdateWorkDurationField(List<Case_Status_History__c> CSHIds)     {     Set<Id> CaseVal = New Set<Id>();     List<Case_Status_History__c> CSHToUpdate = New List<Case_Status_History__c>();      For(Case_Status_History__c C : CSHIds)     {         CaseVal.add(C.Parent_Case__c);     }      List<Case_Status_History__c> CSHList1 = [Select Id,Name,Parent_Case__c,Status_Value__c,New_Status_Value__c,CSO_Name__c,DA_Name__c,Time_Elapsed__c,CSO_Work_Duration__c,DA_Work_Duration__c,CreatedDate,CreatedById FROM Case_Status_History__c WHERE Isdeleted= False AND New_Status_Value__c = 'Closed' AND Parent_case__c =: CaseVal ORDER BY Name ASC];     List<Case_Status_History__c> CSHList2 = [Select Id,Name,Parent_Case__c,Status_Value__c,New_Status_Value__c,CSO_Name__c,DA_Name__c,Time_Elapsed__c,CSO_Work_Duration__c,DA_Work_Duration__c,CreatedDate,CreatedById FROM Case_Status_History__c WHERE Isdeleted= False AND Status_Value__c =: ('CSO Working , DA Working') AND Parent_case__c =: CaseVal ORDER BY Name ASC];      For(Case_Status_History__c CSH1 : CSHList1)     {         Decimal Sum1 = 0;         Decimal Sum2 = 0;          Case_Status_History__c CSHU = New Case_Status_History__c();         CSHU.Id = CSH1.Id;          For(Case_Status_History__c CSH2 : CSHList2)         {             IF(CSH1.Parent_Case__c == CSH2.Parent_Case__c)             {                 IF(CSH2.Status_Value__c == 'CSO Working')                 {                     System.debug('---1---');                     Sum1 = Sum1 + CSH2.Time_Elapsed__c;                     System.debug('---Sum1---'+Sum1);                 }                  IF(CSH2.Status_Value__c == 'DA Working')                 {                     System.debug('---2---');                     Sum2 = Sum2 + CSH2.Time_Elapsed__c;                     System.debug('---Sum2---'+Sum2);                 }             }         }          CSHU.CSO_Work_Duration__c = Sum1;         CSHU.DA_Work_Duration__c = Sum2;         CSHToUpdate.Add(CSHU);     }     Update CSHToUpdate;     } }   Below is the Snapshot of what I need.    Please help me in resolving the error.  Thanks!


Are Goliaths able to wield large-sized weapons?

With the new Elemental Evil Player's Companion released awhile ago, Goliaths were added to 5e. I'm unfamiliar with 3.5 and previous editions, but I know that they were included and wielding large weapons was a thing you could potentially do. Goliaths in 5e have the same trait as in 3.5e, it seems:  Powerful Build. You count as one size larger when determining your carrying capacity and the weight you can push, drag, or lift.  So, does this mean a Goliath can wield large-sized weapons? The pushing/dragging/lifting capacity for a strong Goliath (say 16 Str) would be nearly 1000 lbs (16 * 60) and the carrying capacity half of that. A heavy weapon weighs between 10-20 lbs, but this IS significant weight to be throwing around in battle, but I am unsure of the weight of a large weapon. My DM and I are unsure of the mechanics if a Goliath could. We talked about doing an extra die roll for damage, which is extremely strong, or treating the Goliath as if he were under the Enlarged Creature spell, which gives a +4 to damage, which seems more balanced in our opinions. Are there rules for wielding large weapons in 5e? Can a Goliath wield large weapons out of the box with no feats?


PyQGIS - Adding layer from PostGis database

I want to add new layer from PostGIS database but this code isn't working... Can someone help me?  uri = QgsDataSourceURI() uri.setConnection("IP address", "5432", "ruian", "user", "pass", QgsDataSourceURI.SSLdisable) uri.setDataSource("public", "okresy.originalnihranice", "MultiPolygon", "", "ogc_fid") layer = QgsVectorLayer(uri.uri(), "okresy", "postgres")  if not layer.isValid():     print "Layer %s did not load" % layer.name()  QgsMapLayerRegistry.instance().addMapLayers([layer])   layer is always empty


Proof of Dobinski's formula for Bell numbers

The Bell number $B(n)$ is defined as $\sum_{k=1}^n S(n,k)$ where $S(n,k)={n\brace k}$ is a Stirling number of the second kind. I would like to learn how to prove the following identity (Dobinski's formula): $$B(n)=\frac{1}{e}\sum_{j=0}^{\infty}\frac{j^n}{j!}.$$


I have a work sheet on proofs but this is the first question and it would really help if I could be shown this one so I can attempt the last ones by myself. Thank you   Let $U, V, W$ be finite-dimensional vector spaces and let $P : U \to V$, and $Q : V \to W$ be linear maps. Prove that $null(Q \circ P) \le null(Q) + null(P)$.  Hint: it may help to consider the restriction of $P$ to $Ker(Q\circ P)$.


time complexity where inner loop only runs at most twice?

I'm new to trying to find the time complexity of a program and im stuck on this code where the inner loop only ever runs at most twice. sum = 0; for(int i = 0; i<n; i++){      for(int j = 1; j<n*n; j*=n) {            sum++;         }     }  From what I've seen so far, nested loops like these are usually O(n^2), but since the inner loop only ever runs at most twice does this mean that the programs time complexity is O(n) or would it still be O(n^2)? Also is the inner loop O(1) or O(n)?


Prove or disprove : Every bounded sequence converges.

I know that all convergent sequences are bounded. I also know that the converse is not true in general and a counter example would be $\{1,-1,1,-1, \ldots\}$  How do I properly disprove this?


sudo su -l does not preserve environment variable

firstly, look at the snippet below:  $ ssh -i ~/.ssh/ubuntu.pem ubuntu@127.0.0.1 ubuntu@kingdom:~$ echo $PATH | tr ':' '\n' | grep sbin /usr/local/sbin /usr/sbin /sbin ubuntu@kingdom:~$ sudo su -l ubuntu ubuntu@kingdom:~$ echo $PATH | tr ':' '\n' | grep sbin ubuntu@kingdom:~$   i have modified /etc/profile, /etc/bash.bashrc, /home/ubuntu/.profile and /home/ubuntu/.bashrc (the ubuntu user has no other profile and bash configuration) to print the PATH in the beginning and the end of the file.  now i can see that the problem occurs on the second login:  $ ssh -i ~/.ssh/ubuntu.pem ubuntu@127.0.0.1 /etc/profile: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games /etc/bash.bashrc: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games /etc/bash.bashrc: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games /etc/profile: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin /home/ubuntu/.profile: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin /home/ubuntu/.bashrc: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin /home/ubuntu/.bashrc: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin /home/ubuntu/.profile: /home/ubuntu/bin:/home/ubuntu/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin  ubuntu@kingdom:~$ sudo su -l ubuntu /etc/profile: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games /etc/bash.bashrc: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games /etc/bash.bashrc: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games /etc/profile: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin /home/ubuntu/.profile: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin /home/ubuntu/.bashrc: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin /home/ubuntu/.bashrc: /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin /home/ubuntu/.profile: /home/ubuntu/bin:/home/ubuntu/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin   it felt like it has something to do with the sudo command. so i even tried to add !reset_env to /etc/sudoers, but it does not seem to solve the problem.  how can i use sudo su -l ubuntu while preserving the environment variables (without any extra arguments to sudo command) that ubuntu user had before the sudo su -l  clarification: i would like to get the same output for echo $PATH | tr ':' '\n' | grep sbin before and after sudo su -l ubuntu. right now, this is not the case:  $ ssh -i ~/.ssh/ubuntu.pem ubuntu@127.0.0.1 ubuntu@kingdom:~$ echo $PATH | tr ':' '\n' | grep sbin /usr/local/sbin /usr/sbin /sbin ubuntu@kingdom:~$ sudo su -l ubuntu ubuntu@kingdom:~$ echo $PATH | tr ':' '\n' | grep sbin ubuntu@kingdom:~$


Adobe Illustrator: How to create a clipping mask

I have this logo I am working on. I have 2 questions:  1) I have a white circle behind the 4. I'd like to use that circle as a clipping mask for the 4 so that the 4 fits perfectly within that white circle. How can I do this?  2) After that, if I wanted to paint the 5 areas in white (between blue and green) each a different color, how can I isolate those areas to paint?  Thanks!


So right now I only have 1 SSD in my computer.  It is 120 GB Samsung SSD.  I boot windows directly from this SSD.  I would like to buy another totally separate SSD and install and boot Ubuntu from this one.  So 1 PC, 2 drives, and boot windows 7 from 1, and boot Ubuntu from other SSD.  Is this possible?  Any help is appreciated.  Thanks


authenticate user without password from email activation link

I have my own activation mail for new users that are added via a plugin in the wp backend by an admin. The user is also added as an author to a post and I want him to activate the post (which will publish it) when he gets the email and clicks the link. Currently, the user receives an email with an activation link, but then has to log in and is not redirected to the activation screen. Is it possibly to authenticate the user by receiving the activation key and post id via the URL? The key is stored in his post as a custom field. I basically want this process to log him in automatically and allow him to access hist post from a front end page.


I have an answer to a question Tiger eats rabbit. What would be the question for this?     Tiger eats who?      Tiger eats whom?   Which is correct among these two sentences?


'My better days is at the last decade' make sense?

Does a sentence like     My better days, at the last decade, have passed by so fast.   make sense?


I've been trying to learn Unity and pretty soon in the tutorials I've found this:  private Rigidbody rb;  void Start () {     rb = GetComponent<Rigidbody>(); }   I'm not knowledgeable with C# syntax so what I really would like to understand is this function<object>() syntax.  Thx


Solving an inequality : $n \geq 3$ , $n^{n} \lt (n!)^{2}$.

I proved this inequality in the following way:   Lemma: $r \in \Bbb N, r \geq 3$. We have $r^r \gt (r+1)^{r-1}$.  Proof: We apply the AM-GM inequality to the $r$ positive integers where there are $r-1$ $(r+1)$'s and one $1$. We obtain $$\frac {1+(r-1)(r+1)}{r} \gt  ((r+1)^{r-1})^{\frac {1}{r}}$$ wherefrom we get (since the $r^{{\rm th}}$ power function is increasing), $r^{r} \gt (r+1)^{r-1}$.   Now, I used mathematical induction to prove the statement. We have from the lemma, $(k!)^{2} \gt k^k \implies (k!)^{2} \gt (k+1)^{k-1}$ and multiplying this inequality by $(k+1)^{2}$, we have $((k+1)!)^{2} \gt (k+1)^{k+1}$ and obviously $(3!)^{2} \gt 3^3$.  Is there any direct proof of the statement that does not use induction and calculus?


List iteration on Android, foreach or indexed

Given a List<T>, which is the preferred way to iterate on Android? Are there any performance differences on a modern day Android device?  for (int i=0; i<list.size(); i++) {     T element = list.get(i);     ... }   or  for (T element : list) {     ... }   Edit: This question is specific to the Android runtime. The other "duplicate" question doesn't address the Android specifics.


I recently created a partition on my HP Pavilon laptop with an Ubuntu version on it. But now when I start the laptop first the HP logo appears and then it boots straight into Windows 10 without showing grub. I am able to press F9 and then boot straight from there into "ubuntu" which leads me to grub from where I can choose either to boot into windows or into Ubuntu. I am also able to boot into grub (and thus into Ubuntu) via "advanced setup options" when I'm on windows. Nevertheless I would like to have grub immediately show up on any startup of the laptop (not booting directely into either operating system).


How to show $(\nabla df)(X,Y)=\nabla^2_{X,Y}f$?

Why $(\nabla df)(X,Y)=\nabla^2_{X,Y}f$ ?  I only know $df(Y)=Y(f)$, I always see $df$ as an element of $T^*M$,and I think $df=f_idx^i,f_i=df(\partial_i)$.  Besides, whether $(\nabla df)(X,Y)=(\nabla_Xdf)(Y)$?  Thanks.


I have large LaTeX project (my thesis) with a main TeX file and many subfiles contained in their own subdirectories. The template is available  at Cambridge University website  Now coming to my question, in WinEdt I can compile the project only when the current document is the main/root document. If I try to run from sub files WinEdt throws an error.  Is there any way (like a flag in LaTeXing for Sublime Text) to tell WinEdt to always start compiling from root TeX file.


How can I contact 'lost and found' to in enquire on a lost laptop in Dubai Airport?

On 16th March 2013, I travelled via Dubai to Dallas. During the security checking at Dubai Airport, I put it in the belt and after that I forgot to to take it back. that I've filled up the online form of Dubai 'lost and found' and got a reference number. but then after there is no response from their side and also tried to call Dubai airport 'lost and found' and Emirates 'lost and found' in Dubai but nobody is picking up the phone. Can anyone please advise how I can get my laptop back.


Where did Hogwarts get money for salaries, food and other purchases?

We know that you can't transfigure food, so you have to grow it or buy it. Ditto money.  I'm sure that aside from some medicinal plants Herbology Professor had there were no farmlands at Hogwarts. So they must have bought food (as well as potions ingredients for Snape etc...). And they needed to pay the teacher salaries.  Where did all that money come from according to canon?  Ministry funding?  Tuition?  Patent money on Dumbledore's inventions?  Philanthropic donations by Malfoys and co?  Other?


How to read http headers of last response?

I am adding a custom HTTP header to a 204 - no content response in PHP:  header("Success: true"); http_response_code(204);   Question is how can I then read this header in JavaScript?  Edit: Should have mentioned this is for the current page not an Ajax request. From what I can establish there is no way to access http headers from within Javascript so it looks like this is not possible.


I'm buying a ticket for another person to travel from Ghana to the US

Are there any issues if I purchase a round trip air travel on my credit card for someone else? They have a valid U.S. passport but live in Ghana. I have been told that I may either have to be present when the board or that they have to purchase the ticket themselves. Is that true?


Metric space is totally bounded iff every sequence has Cauchy subsequence

Prove that a metric space is totally bounded if and only if every sequence has a Cauchy subsequence.    I think I proved the Cauchy subsequence part:  Let $a_{0},a_{1}, a_{2}, a_{3}, a_{4},...\in X$ be a sequence.  For each $k$, let $F \subseteq X$ be a finite $\frac1k$-net.  Given $I \subseteq \Bbb N_{\ge0}$ and $k>1$ you find an infinite $J \subseteq I$ such that: $$\exists p\in F:\forall n\in J: d(x_n,p)<\frac1k$$


I was talking to someone earlier today, and while trying to relate with them, I suddenly found myself trying to decide between "I too" and "me too". I can't quite grasp their differences. As I understand it, "me too" is valid only on its own, in response to someone's statement.  Person 1: I absolutely love that new album Person 2: Me too! Doesn't everyone?  Whereas, "I too" works (I believe) in both that scenario, as well as at (is that wording correct?) the beginning of a response phrase.  Person 3: I too, enjoy the album you mentioned.  Regardless of whether I am right or not, can someone please explain the mechanics behind this?


Windows - Prevent folder from being moved, renamed or deleted

In Windows 8.1, is it possible to set the permissions of the folder to prevent users from renaming, moving or deleting a folder but allowing changes to any of it's contents and if so how?


Black&white live wires, unidentifed breaker

We have 2 wires that were attached to a non functional baseboard heater when we bought our house.We've since removed the heater, but cannot locate the breaker to stop power to the wires. We've gone thru each breaker 1 by 1, and the tester still lights up/beeps. We would like to place an outlet there. Any suggestions on how to proceed on locating which breaker/fuse?


Calculate the years of contract using ampscript

I have a field (Account: Created Date) in dd/MM/YYYY format. I want to have a formula that calculates the number of years that the account has been working with us to date. Can you please advise?


A quick google search will give many helpful  and  regarding constant acceleration relativistic rockets, but my question is somewhat different.  What if jerk is the parameter to be held constant in a relativistic rocket?  Two versions of such a rocket: a simple flyby scenario, with beginning and ending accelerations specified, and a destination scenario, that will involve a flip turn at some point (but unlike the constant acceleration situation, not at halfway!).  Initial velocities (and final for the destination scenario) should be zero.  I have just enough background physics to be interested in this, but my college courses never included the relativistic background to work it out easily for myself.  I have a degree in maths so integrals etc. are fine, but space-time metrics may need some explaining if they come up.   A  offers distance, acceleration, max velocity (max lorentz factor), ship/earth times of journey, fuel/payload ratio.  For constant jerk on a destination journey, I would also like to know when/where the flip would take place.  I want to write such a calculator myself, I just need the equations, or a method of deriving them myself.  (Of course I would not say no if someone pointed an existing one out to me.)  I also have the loftier goal of writing (or finding) a calculator that could give the above factors for any well-defined function of acceleration over time (or distance), if anyone knows of one or has been hoarding one on their hard drives.  [For the curious, there are various reasons why one might want to vary the initial and final accelerations that I can think of some offhand.  For the flyby constant jerk rocket, it could set out to rendezvous with another ship having a different acceleration profile and wants its profile to smoothly match upon arrival, or it could depart with inhabitants temporarily acclimatized to one acceleration but with a preference for a "cruising acceleration" at a different level.  For the destination constant jerk rocket, imagine flying from Earth to a Mars-gravity planet 10 light-years away, and having the entire flight as a slow adjustment period; alternatively, it seems to me that a constant acceleration rocket has to be working its engines a lot more in the beginning (when they have much more fuel mass to accelerate) than at the end; by keeping the engines on at full burn for constant thrust, acceleration will increase linearly throughout the flight.]


A mean value theorem involving two functions

Let $f,g:[a,b] \rightarrow \mathbb{R}$ be continuous in $[a,b]$ and differentiable in $(a,b)$. Prove that there is a point $c \in (a,b)$ such that:   $$[f(b)-f(a)]g'(c) = [g(b)-g(a)]f'(c).$$   I think this is a straightforward application of the mean value theorem to a clever function. Am I right? If so, which function? Thanks :)


Why does Ctrl + V not paste in Bash (Linux shell)?

When I copy something to the clipboard and press Ctrl + V in Bash, nothing happens; However, right clicking and selecting Paste does the job.  Why? Is there any reasonable issue (I'm sure there is) behind this behavior in Linux?


"Wanting" or "want"? (Stative verbs: participial clauses; present continuous usages?)

Lately I have noticed that a lot of people use "wanting" in sentences, or in books, but I don't get it because my English teachers have always said to me that with verbs like "love", "like", "want" etc. we can't write the verb ending "-ing". But how it is possible that it's in book then?   Some examples:      She reached her hand out, wanting to touch him...     Not wanting to talk about it, Clary turned...     Actually, I’ve been wanting to ask you how...     I really want to know where I can use it and where I can't. It really drives me crazy that I don't know it.


I am working on the following problem.  Suppose that $\{a_j\}_{j=1}^{\infty}$ is a sequence with the property that, whenever $\{b_j\}_{j=1}^{\infty} \in \ell^2$, one has $\sum_{j=1}^{\infty}|a_jb_j| < \infty$. Define $T : \ell^2 \to \ell^1$ by $T(b_1, b_2, \dots) = (a_1b_1, a_2b_2, \dots)$. Show that $\{a_j\}_{j=1}^{\infty} \in \ell^2$. a) First under the assumption that $T$ is bounded. b) Then without making the assumption that $T$ is bounded.  I have been able to do a) but not b). If $T$ is continuous, then there is $C > 0$ such that $\|T(x)\|_1 \leq C\|x\|_2$. Let $x_k = (a_1, \dots, a_k, 0, \dots)$ and $x = (a_1, a_2, \dots)$. We have $$\|T(x_k)\|_1 = \|(a_1^2, \dots, a_k^2, 0, \dots)\|_1 = \sum_{n=1}^ka_n^2$$ and $$C\|x_k\|_2 = C\|(a_1, \dots, a_k, 0, \dots)\|_2 = C\left(\sum_{n=1}^ka_n^2\right)^{\frac{1}{2}}$$ so we see that $$\left(\sum_{n=1}^ka_n^2\right)^{\frac{1}{2}} \leq C.$$ Taking the limit as $k$ goes to infinity, we see that $\|x\|_2 \leq C < \infty$ so $x \in \ell^2$.  Any hints for part b), or suggestions for a better proof of part a) which may give some indication of how to approach part b), would be greatly appreciated.


The box used to have just a switch controlling an overhead light. It has 1 white and 1 black (Canadian wiring btw). I got a plug and switch combo and want the plug to always be on, with the switch only controlling the overhead light. How should the wiring look?


I want to install and test 3d acceleration in Ubuntu 12.  I have read these pages:       I think I have installed it correctly, but I don't know how to test it.  I tried to play minecraft in the browser, but I got a black screen. It may be a java problem too, so I need to troubleshoot.  So how can I test my video card and drivers?


Why shouldn't I use the equality operator for objects

I have this book about Java and it is telling me if I use relational operators for objects such as strings it will turn out as false. Even if two strings have the same literal value. I tested this, yet true was printed. Could someone explain why this is?  String y = "Not null"; String x = "Not null";              if(x == y)                 System.out.println("True");


Remonstration Procedure for German Visa in Karachi

I apply for visa to visit airshow in Berlin , I am an airline professional, I submitted invitation from sponsor and airshow ticket and all required documents as property owned my me and marriage certificate. Recently my visa was rejected for following reasons,  The information provided on the purpose and condition of intended stay was not credible Your intention to leave the territory of member states before expirey  Noe I want to apply for remonstration , can someone guide me how to make remonstration email and where to send remonstration email in Karachi, Pakistan.


Why do I have question marks instead of ordinary icons?

Some applications produce question marks for their subwindows in the unity menu instead of ordinary icons. What could cause this behaviour?


OpenSSL returns different SSL certificate to that shown by Chrome

When querying Sparkfun's CDN url using OpenSSL with the following command:  openssl s_client -showcerts -connect dlnmh9ip6v2uc.cloudfront.net:443  The common name returned in the certificate is *.sparkfun.com, which fails to verify, but if you load the host in Chrome, the common name shown is *.cloudfront.net  What is going on here?  This is causing a problem because the environment I am in proxies SSL via Squid SSL_Bump, which generates a certificate signed by my locally trusted CA for the domain. This works for all domains but the above, as the CN does not match as the new cert is generated using OpenSSL.  EDIT - I have verified the same occurs with OpenSSL on a server in a remote data centre that has a direct connection to the internet with no proxies or filtering involved.  EDIT - The issue is due to SNI, as accepted, but to fill out the information as to why it causes a problem with Squid and SSL_Bump:     This project will not support forwarding of SSL Server Name Indication   (SNI) information to the origin server and will make such support a   little more difficult. However, SNI forwarding has its own serious   challenges (beyond the scope of this document) that far outweigh the   added forwarding difficulties.   Taken from:


Is there a word for Words that describe themselves or a word for words that do the opposite

Self Describing Example: sesquipedalian is a sesquipedalian word Opposite Example: quotidian is not a quotidian word (obviously just my opinion)


I have Windows 7. I can resolve hostname via nslookup correctly but other programs fail to resolve hostnames:  C:\>nslookup myserver.mycompany.com Server:  mydns.mycompany.com Address:  192.168.14.10  Non-authoritative answer: Name:    xk11.service.mycompany.com Address:  192.168.35.50 Aliases:  myserver.mycompany.com           myserver.service.mycompany.com   C:\>ping myserver.mycompany.com Ping request could not find host myserver.mycompany.com. Please check the name and try again.  C:\>ping 192.168.35.50  Pinging 192.168.35.50 with 32 bytes of data: Reply from 192.168.35.50: bytes=32 time=134ms TTL=51 Reply from 192.168.35.50: bytes=32 time=91ms TTL=51   What can be the reason?


Using python to do a interpolation on field calculator

I need to increment a row in attribute table:  def func (w,v,pot):  return pot + ((pot+1 - pot)/(v+1 - v))*(w-v)   The "+1" is not the addition of number one to the variable, is the intention to increment + 1 row in that column of that variable. This is because I need to calculate the actual record using records from the next line.  How can I do that? I know this is basic, but I realy don't know python.


Problem black screen with Lubuntu in Virtual Box

I installed a Lubuntu 16.04 LTS (and a v.17) both architectures x86 and 64 bits.   The problem is when I shut down the Virtual Lubuntu (installed) then, sometimes runs ok but one of them, the machine shows how is starting Lubuntu, but only shows an black screen. I can't do anything. I tried several times and I got always the same problem.   It was working fine the same machine I was working since 1 month and I never get this problem...


How can I check if a watermelon is sweet or not when buying?

I buy watermelon from the market, sometimes they are sweet and sometimes they are not. How can I check if a watermelon is sweet or not?


If you or your attorney do not call me by 5:00 p.m. today, then I will go ahead and file a complaint.  Do v. Does  'Do" sounds best, but why?  Which is correct to use:  do or does?


Any way to read bathymetry surveys (*.xyz) into QGIS as a TIN or as raw points?


Is it possible to automate testing involving Two-factor Authentication?

Are there methods for testing 2FA signup or login? I would assume judicious use of dummy phone numbers and/or emails would be involved.


I state a theorem in the main body of a document and prove it in the appendix. I use thmtools's restatable environment to restate the theorem there. However, I now need to have my appendix in a separate pdf file (hence a separate tex document). I'm using xr and xcite to get the cross-references and bibliographical references to play nicely.  But the commands created by restatable are not carried. Is there any way to to the restating of the theorem in the appendix in a separate document?  Here's a MWE:  main document: main.tex  \documentclass{article} \usepackage{thmtools} \newtheorem{theorem}{Theorem}  \begin{document}  \begin{restatable}{theorem}{thmcmd}\label{thmlabel} Here is the statement of the theorem. \end{restatable}  The above is Theorem~\ref{thmlabel}.  In this way I can restate it: \thmcmd*  \end{document}   appendix: appendix.tex  \documentclass{article} \usepackage{xr} \externaldocument{main} \usepackage{thmtools} \newtheorem{theorem}{Theorem}  \begin{document}  I can refer to Theorem~\ref{thmlabel}.  But I cannot restate it like this: % \thmcmd*  \end{document}


Why does my staging site show up in Google even though my robots.txt file shouldn't allow it?

I'm having a lot of trouble with something that should be simple. I don't want my development site indexed by Google. According to Google's instructions, and just about everything else I can find says to block this through robots.txt. I set this up correctly months ago, but my development sites still show up. When I log into Google Webmasters and use their robots.txt tester, it shows my site and every URL I've tested should be completely blocked.   User-agent: * Disallow: /  As an extra measure, I added a simple .htpasswd to the website too, but cached pages still showed up. I went through each and every page and removed it using the Google removal tool - most of them disappeared temporarily but week after week more and more pages pop up as being indexed. I've tried to use Wordpress settings to disallow robots, and I've tried including page-specific code in the header too. This has been going on for quite some time.  Long story short, this is starting to drive me crazy as I feel like I've tried everything I can to stop Google from indexing my site, but they won't. Can anyone think of what I could have done wrong?


I am having a really tough time proving the following language is not regular using the pumping lemma. This whole time I have been working on pumping lemma problems, the variable of the power has been the same on all alphabet characters that make up the string for the language.  $$L = \{0^i1^j | j \ne i\} $$  This is what I tried:  Let $p$ be the pumping length of $L$. Consider $S= 0^p1^j$, $|s| > p$, and $|s| > j$. Thus $s$ must satisfy the pumping lemma. Consider splitting the string:  I am assuming in order to prove this language is not regular via contradiction, we would have to find a case where the $j$ IS equal to $i$, even though they aren't supposed to be.  I am not sure how to proceed from this point of the proof and would appreciate any suggestions.  Many thanks in advance!


Casting Somatic Spells while handless (rules as intended)

This question hasn't popped up in any of my games, whether as DM or player, but I thought of it while coming up with character concepts and wondered how it should be ruled. If a caster does not have hands, can they perform the somatic components of their spells? For example, if a player has the idea to have a caster born without arms who uses somatic components using their "ghost limbs" should they be able to since the restriction that they're not wielding weapons or a shield isn't being infringed? Alternatively, if the above is true, does that mean players couldn't disable an enemy caster they captured by Skywalker-ing their hands so they don't have a free hand to cast the spell with? The Player's handbook describes somatic components as:  Spellcasting gestures might include a forceful gesticulation or an intricate set of gestures. If a spell requires a somatic component, the caster must have free use of at least one hand to perform these gestures.  But I don't know how I'd interpret this. I guess the main question is do somatic component rules emphasize having a (free) hand or do they emphasize not wielding an item/weapon? Are there any official rules for these edge cases or is there a way to interpret the rules on somatic components that answers these questions?


Just upgraded from 13 to 14.04 and the mouse on the touchpad is slow and/or unresponsive when dragging around the screen. No issue whatsoever in 13.


I have a fairly recent iMac, but Blender says I have no supported GPU. Are there any libraries to hoo


Shimano A520 SPD Touring Pedals cant clip out :-(

got a new set of Shimano A520 SPD Touring Pedals and a pair of   shoes  i cant clip out  once in has anyone had this problem before #amature?


How to use template based class with smart pointers?

I get a linking error when I am trying to build and compile a class which uses template class. I am using smart pointer to create an instance of this template class.   I have tried removing the int from main class instead of template T, and it seems to help but doesn't fixes the issue.  My vehicle class -   #ifndef VEHICLE_H #define VEHICLE_H  template <class T>   class Vehicle {  private:      T m_x;     T m_y;  public:       Vehicle(T x, T y);      Vehicle();      ~Vehicle();      T add();  };  #endif   My vehicle.cpp  #include <iostream>  #include "pch.h" #include "Vehicle.h"  template <class T> Vehicle<T>::Vehicle(T x, T y): m_x(x), m_y(y) {     std::cout << "Parameterised constructor called" << std::endl; }  template <class T>  Vehicle<T>::Vehicle() {     std::cout << "Calling default constructor" << std::endl; } template <class T> Vehicle<T>::~Vehicle() {     std::cout << "Calling destructor" << std::endl; }  template <class T>  T Vehicle<T>::add() {     return m_x + m_y; }   Here is my main()  #include <iostream> #include <memory.h>  #include "Vehicle.h"  int main() {     std::cout << "Hello World!\n";       auto vehicle_ptr = std::make_unique<Vehicle<int>>(10,20);     std::cout << vehicle_ptr->add()<<std::endl;       return 0;  }   Linking Error I get, I expect it to compile and build.


Composition of a natural transformations with a functor--whiskering

If $M$ is an endofunctor on a category $\cal K$ and $\eta:Id_{\cal K}\to M$ is a natural transorfmation, what is the difference between $\eta M$ and $M\eta$, and how these two (componentwise) are defined on an object $A$ in $\cal K$ ?


What happened to Mike and Carol's former spouses?

In the Brady Bunch (the TV show, not the film series), the title song establishes that the 6 new step-siblings are from Mike and Carol's former marriages (or partnerships).    What happened to Mike's former wife / partner?  What happened to Carol's former husband / partner?  Were these two others ever mentioned for any amount during any episodes, or if still alive, did they ever make any appearances or claims towards their children?  I have never watched the pilot episode / first episode, so I do not know if that episode explains it.


Common Word including animals and humans?

I'm creating a youtube channel where i will upload interesting videos of animals and humans. But don't know the name. Anyone please let me know common word including animals and humans?


Struggling with a PDE problem. Would like some guidance - not a solution.

I am given a simple river system flowing down a slope where the speed of the flow downstream under the force of gravity builds up until resistive forces $R$ balance the component of gravitational force acting downstream $F$.  $$R=av$$ $$F=bh$$  The speed will eventually adjust to when $av=bh \implies v=\frac{b}{a}h$. We further assume that rain add water and we let seepage into the ground remove water. This will increase the depth of water at any point in the river at the rate $r(h, x, t)$ and the mass conservation law is given by  $$h_t +(hv)_x = r$$  Using Burger's equation and substituting for $v$, I get  $$u_t +uu_x =f$$  where $u=2\frac{b}{a}h$ and $f=2\frac{b}{a}r$. My first question is how the author got $u$ and $f$ values: how he converted the mass conservation equation to Burger's equation.  If $R=av^2$ instead then $v=\sqrt{\frac{b}{a}h}$ and following the same $v$ substitution, I arrive at  $$h_t +(\sqrt{\frac{b}{a}h}\cdot h)_x = r.$$  Is it legal to simply substitute $h$ with $u$ to get  $$u_t + (\sqrt{\frac{b}{a}}u^{\frac{3}{2}})_x=f\;?$$  Again, I'm having trouble identifying the values for $u$ and $f$. Thank you very much for your time and help!


Is there a set whose power set is countably infinite?

Does there exist a set whose power set is countably infinite?  I know for sure that if a set has a finite number of elements, then its power set must have a finite number of elements, and if a set has an infinite number of elements, then its power set must have an infinite number of elements (possibly uncountably many elements). Then, there must not exist something like that (which I stated at first). Am I right? Please someone clarify it.


Good examples/books/resources to learn about applied machine learning (not just ML itself)

I've taken an ML course previously, but now that I am working with ML related projects at my job, I am struggling quite a bit to actually apply it. I'm sure the stuff I'm doing has been researched/dealt with before, but I can't find specific topics.  All the machine learning examples I find online are very simple (e.g. how to use a KMeans model in Python and look at the predictions). I am looking for good resources on how to actually apply these, and maybe code examples of large scale machine learning implementations and model trainings. I want to learn about how to effectively process and create new data that can make the ML algorithms much more effective.


Integer Equation $m ! = \frac{n(n+1)}{2}$

As reported by Christopher M. Tomaszewski in the  ,   $m, n , s > 0$ , $m ! = \frac{n(n+1)}{2} = s$  has only a solution $s \in \{ 1 , 6 , 120 \}$ .   This may be quickly checked by comparing the 2 sequences. A simulation lets think that it is exact.  How to prove it analytically ( and rigorously ) ?  Edit : then it is an official conjecture ! It seems that it is not out of reach for MSE ... I'll work on it too.


Where were Bavarian soldiers of E/R 14 imprisoned on farm in Normandy?

Father entered Bavarian army in WW1 in Germany on August 30, 1914.  He was in E/R 14, taken prisoner and sent to Normandy, France on a farm.   Where was the farm?


Javascript variables keep track to their copies?

I stumbled over a strange thing.  I have a model class where you can get values of attributes via a model.get(attributeName) function.  So I did this in a view:  var mapModel = new Ex.Models.MapModel(model); var view = new Ex.Views.MapView(mapModel);  var d = this.model.get('layerIds'); d.mapLayer = view.getId();  console.log("layerIds", this.model.get('layerIds'));   The attributes layerIds.mapLayer is set to null by default. If I set it to the views id (e.g. 43) I'd expect that the console.log would still return {mapLayer: null} since I create varaible d to copy the value of this.model.get('layerIds') and work with that value independent from the models value.  But if I execute this piece of code the log says:  {mapLayer: 43}   Why is this? Why do Javascript variables keep track of their copied values and update their own value if one of the others changed?  And how can this be stopped?


How do I correct this friend template function link error, implemented in .cpp file?

I would like to implement an Array<T> template class. I defined the class, overloaded operator << () operator function for printing. Thinks seems not hard. However, when implementing subtraction by overloading operator - () for two Array object, there is link error. Both the operator << () and operator - () are declared in array.h, declared as friend in Array class, implemented in Array.cpp, and "declared with specified double type"(I don't really know the correct phrase to describe it..). Here's the code: array.h: #ifndef MY_ARRAY_H #define MY_ARRAY_H  #include <stdio.h> #include <iostream>  template<class T> class Array;  template<class T> std::ostream& operator << (std::ostream& os, const Array<T>& mat);  template<class T> Array<T> operator - (const Array<T>& A, const Array<T>& B);  template<class T> class Array { public:     Array(): len(0), data(NULL) {}     Array(int _len): len(_len), data(new T[len]) {         for (int i=0; i<len; i++) {             data[i] = 0;         }     }     Array(const Array& arr) = delete;     const Array& operator = (const Array&) = delete;     ~Array() {         if (!data) delete[] data;     }  public:     int len;     T* data;  private:     friend std::ostream& operator << <T>(std::ostream& os, const Array<T>& arr);     friend Array<T> operator - <T>(const Array<T>& A, const Array<T>& B); };   #endif // MY_ARRAY  array.cpp: #include "array.h" #include <iostream>  template<class T> std::ostream& operator << (std::ostream& os, const Array<T>& arr) {     for (int i=0; i<arr.len; i++) {         os << arr.data[i] << ", ";     }     os << "\n";     return os; }   // T=double template std::ostream& operator << (std::ostream& os, const Array<double>& arr);     template<class T> Array<T> operator - (const Array<T>& A, const Array<T>& B) {     assert(A.len==B.len && "dimension mismatch(rows)");      Array<T> C(A.rows, A.cols);     for (int i=0; i<C.len; i++) {         C.data[i] = A.data[i] - B.data[i];     }      return C; }  // // T=double Array<double> operator - (const Array<double>& A, const Array<double>& B);  array_test.cpp #include "array.h"   int main() {     Array<double> arr(4);     for (int i=0; i<arr.len; i++) {         arr.data[i] = i;     }          std::cout << arr << std::endl;      Array<double> arr2(4);     for (int i=0; i<arr2.len; i++) {         arr2.data[i] = 1;     }      std::cout << (arr2-arr) << std::endl;      return 0; }  To compile: clang++ array.cpp array_test.cpp  Suffers link error: /usr/bin/ld: /tmp/array_test-c0515e.o: in function `main': array_test.cpp:(.text+0xdc): undefined reference to `Array<double> operator-<double>(Array<double> const&, Array<double> const&)' clang: error: linker command failed with exit code 1 (use -v to see invocation)  How do I change my code, to solve this link error?


Use the result of one regular expression in another - javascript

I am trying to retrieve some pieces of data from a URL using regular expressions in Javascript.    const url = "/node_modules/@company/dl-atoms-control/README.md";     The following RegEx retrieves text preceded by the string "dl-" In this case "atoms":    const molecularTypePlural = url.match(/(?<=dl-)\w+/gm)[0];     I now want to use molecularTypePlural in a second RegEx to retrieve the string preceded by "dl-atoms-" which in this case is "control". I can't hard code this because the molecularTypePlural variable will have different values with different URLs. I have tried the below:    const packageNameRegex = new RegExp(`/(?<=dl-${molecularTypePlural}-)\w+/gm`); const packageName = nodePath.match(packageNameRegex);     However the RegEx doesn't return any results. Logging packageNameRegex reveals that  the RegEx seems to be incorrectly formatted:  "/\/(?<=dl-atoms-)w+\/gm/"   I think it might be a problem with escaping special characters but I'm not 100% sure. Could anyone show me where I'm going wrong. Thanks


I want to transfer a file between two remote servers (R1 and R2) which can't talk to each other. My machine (let's say L) can talk to both R1 and R2. Is there a way to use my local machine as the intermediate host? Here's the situation L ----> R1 L ----> R2 R1 ---x--> R2  I want to send files from R1 to R2 using L. R1 ----> L ----> R2  I found some resources  and , but can't figure out the syntax to use local machine as intermediate host.


Can kinetic energy in atoms result in emission of all types of EM radiation?

I already know the fact that when solid objects heat up, they emit thermal energy which is also known as infrared radiation.  However, if the atoms in that solid were to begin gaining more or less kinetic energy, could the excited electrons then begin emitting radio wave or gamma wave radiation in the far regions of the electromagnetic spectrum?


This is Venkat  I was created a file. Name is '-file1'. So how can we open or find these type of files  Thanks, Venkat.K


How can I change Firefox window.location.hash without creating a page reload?

I'm storing some state information in the URL fragment (hash, whatever you call it).  When I change the window.location.hash in Chrome, and Safari the page doesn't reload - this is the behavior I want.  When I change window.location.hash in Firefox, I get a page reload.  How do I prevent this?  Note: My reason for storing state in the URL is so that userA can send the url to userB and userB will be able so see the same page (loaded by AJAX).    Resolution: For what it's worth, in Firefox (only?) the page will reload if you completely remove the hash including the "#" character.  I ended up just making sure not to delete the entire hash.


OTP Random Pad Renewal Without Extending Message

So I recently learned about the concept of a One Time Pad; and I from what I understand it means that if a XOR key is completely random and equal to or longer than the plaintext, it makes it so that anyone trying to break the encryption would basically only be able to narrow it down to all appropriate possibilities from the selection field.   Is there a way to renew the key over each transmission between clients sharing a key? In other words, if the original key is xxxxxxxxxxxxxxxx and the sent data is made of the first half being a message and the next half being some form of data, can a pre-determined protocol be fed the data to generate a new full-length key? Or is it impossible to do this without compromising the integrity of the randomness of the new key? What would theoretically be required of such a protocol to make it secure?  Thanks in advance!


Can \includegraphics be used to change an image color?

I'm including a number of PDF images in my document using \includegraphics.  I'm wondering if there's a way for LaTeX to adjust their color profile, hopefully the same way it can flip images upside down, resize, and crop, as here:   Let me detail a little more my desired outcome, in case there's another way to achieve this: The images are brightly colored---I'd like to reduce color levels, or possibly render them grayscale, and I'd prefer to not have to do external pre-processing, if this is possible.  I'm using XeTeX.


Correlation non-significant and unique variance significant in the multiple regression analysis

Is it possible to have a IV that is not correlated significantly with the DV but then in the multiple regression analysis this IV explain a significantly % of the unique variance of this DV?  If so, how can we explain it?


Software for the graphic realization of an illustrative book

I was commissioned a job that comes out a bit from the patterns of my job (programmer). I was asked to create a book for a famous interior design company. I first accepted, because it is simply a question of composing a book with illustrative images and simple captions. The question is: which software do you recommend for layout or in any case for realization?  ps. on the stack I joined recently so I apologize in advance if this question can be off-topic.


It'd be neat if users could enable Stack Exchange notifications through  and .


Can I get Minecraft Java AFTER buying Windows 10?

I bought Minecraft for Windows 10, and I also want Java so I can play with mods, but the Minecraft launcher doesn't say that I already have Minecraft, which I do. Is there a way to fix this?


I updated from 18.04 and run Xubuntu specifically. I updated to 19.04 and my wifi works and everything but for some strange reason for a few weeks now, no matter what I do, I cant get rid of this error.  It pops up in the quick black screen that appears before my login prompt shows up.  No matter what I cannot find anything to fix it, my wifi still works but that error appearing drives me up the wall.  iwlwifi 0000:00:0c.0: BIOS contains WGDS but no WRDS   If you want specifics, there's the whole thing from the logs.


Why can't we surpass the speed of light?

Can anyone provide me with a complete mathematical proof about why an observer frame  cannot surpass the vacuum speed of light? I have looked for answers in Quora and FB groups but no one is really convincing. In fact the majority assume that the constancy of vacuum speed of light in all referentials without any proof, other people "only" say that it can be proved using the causality principle but without any proof, which is really frustrating! I hope my curiosity will be satisfied in PhysicsStackexchange, have a nice day!


I'm translating some code from standard C++ to Java.  Several places utilize  std::pair<T1,T2>    more specifically  std::pair<Date,double>   Is there a standard idiomatic way to express a parameterized pair type in Java?  As one example, I'm having to use a custom type  class Observation {    LocalDate date;    double value; }   I have other cases as well where two or three things need to be returned from a function. In other languages, I would likely use pairs, triples, and other tuple entities.  I do not really mind making the needed little classes, but would like to know if I'm somewhere missing out on a Java feature.  Thanks in advance for your comments.  (P.S. I'm pretty sure that this is my first question ever posed on S.O.)


How can you screencast to Roku using Ubuntu?

I am new to Ubuntu and I really want to watch anime from my computer on my TV 😢.


Why there are no article in the "Alert at time of event"

Here is the screenshot from the Apple Calendar event quick preview:   Why it is not a     Alert at THE time of event     or       Alert at time of THE event     or even        Alert at THE time of THE event     I suppose there are definitely no place for "A" article in reason the subject of the question is specific and known - we know what is the time and the event. But why there are no definite article? And is it correct to say "Alert at time of event" in conversation?


Prove that $\max w(2) = T_n(2),$ where $T_n$ is Chebyshev polynomial

Let $P$ be a set of polynomials of the maximal degree $n$ such that $\sup_{|x|\leq 1} w(x) = 1$. Proove that $\max_{w \in P} w(2)=T_n(2)$ where $T_n(x)$ is Chebyshev polynomial. I don't know how to approach this proof. So far I got that obviously $T_n \in P$, so $\max_{w \in P} w(2) \geq T_n(2)$.  Perphaps there is a way to proove that $\max_{w \in P} w(2) \leq T_n(2)$? Which would end the proof. My other idea is to assume that there exists $w \in P$ such that $w(2)>T_n(2)$ and arrive at a contradiction yet I don't know how. Any advice?


How do I make a good quality drawing look like a low quality screenshot from 90's TV in PS?

Yeah hi, I was wondering how I could get my images to look like they were shown on 90's TV or were recorded to a VHS and ripped into a digital file. Examples shown below.        I'd like to utalize this effect for a flyer/gigposter I'm making.


GIF generating website that generates a true-transparent background

Many sites offer gif generation services with the option to create a transparent background behind a gif, however, when placed on a dark background, you can see edges around the animated gif. Ajax-loader.com and chimply.com (as well as many others) do not work as well as I had anticipated.  Does anyone have a suggestion for a place where I can find a true-transparent background loading gif?  Note: I cannot rely on a different color background, the site uses a preloader already and I would much prefer not to have two.


I want to study the convergence of the integral $$\displaystyle\int_{\mathbb{R}^n} (1+|\xi|^2)^{-s} d\xi,$$   where $s \in \mathbb{R}$.   More precisely, I want to prove that the integral converges if $s > \frac{n}{2}$.   I tried using polar coordinates $\xi= r \cos \theta$, with $r >0$ and $\theta \in ]0,2\pi[$. Then we obtain  $$ \displaystyle\int_{\mathbb{R}^n} (1+r^2|\cos(\theta)|^2)^{-s} dr d\theta  $$ but I have no idea to how to continue.


Converting 10.5 mxd to 10.4 without ArcMap 10.5?

Is there any way to convert a 10.5 mxd to 10.4 without having 10.5 on the system?  I know ArcCatalog 10.4 - Data Sources allows me to see the datasets in the 10.5 mxd but then I don't have access to the layout/symbology etc.  All the processes I can find require 10.5 to be installed to use arcpy or save-as in arcmap.


Determining the Actual Server Create Date

I am interested in determining the ages of all 70+ my servers. I would like to create a growth graph showing when servers and databases were added to the environment either/both monthly or annually. I executed the following query using the SSMS multi-query feature with only partial success.  SELECT [name], create_date FROM sys.databases   It's partial success because the master and model databases return with a date of 'April 8, 2003' when I know that I created some of these servers during the past couple years.  I refresh databases from one server to another several times a week, which appears to be causing issues with the database create date.   Is there a simple method to determine the actual create date for both servers and databases?


This has always been one of my most favorite exercises from Group Theory, and I was surprised to see that this hasn't been asked before. To repeat:     Characterize the natural numbers $n$ such that there is a surjective group homomorphism from $S_n$ to $S_{n-1}$.   I have a solution which I will post in a couple days (if someone doesn't recreate it), but I am more interested in seeing how other people would approach this problem. I am very interested in alternate proofs of this characterization.


I'm trying to compile bochs. Here is my configure command:  ./configure --enable-fpu --enable-3dnow --enable-x86-64 --enable-a20-pin --enable-cdrom --enable-debugger --enable-debugger-gui --enable-disasm   Then I enter the "make" command and it compiles for some time. But then comes an error.  /usr/bin/ld: gui/libgui.a(gtk_enh_dbg_osdep.o): undefined reference to symbol 'pthread_create@@GLIBC_2.2.5' //lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line collect2: error: ld returned 1 exit status make: *** [bochs] Error 1   Can anybody help me with this error?  Thank you in advance.


What is the correct address for precise/12.04 restricted, multiverse and universe ppa?

I am running Ubuntu 12.04. When I run sudo apt-get update now I get the following errors at the end:  W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-amd64/Packages  404  Not Found [IP: 91.189.92.201 80] W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/precise/multiverse/binary-amd64/Packages  404  Not Found [IP: 91.189.92.201 80] W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/precise/restricted/binary-i386/Packages  404  Not Found [IP: 91.189.92.201 80] W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/precise/universe/binary-i386/Packages  404  Not Found [IP: 91.189.92.201 80] W: Failed to fetch http://gb.archive.ubuntu.com/ubuntu/dists/precise/multiverse/binary-i386/Packages  404  Not Found [IP: 91.189.92.201 80] E: Some index files failed to download. They have been ignored, or old ones used instead.   I don't know how long this error has been occurring for, but those repositories seem like ones I want and need to have working, so I'd like to fix it. What is the correct address (or an alternate) address to use for these repositories?  Edit  The only entries in my sources.list file which have the host gb.archive.ubuntu.com (The precise-backports entries do not seem to be failing?):  deb http://gb.archive.ubuntu.com/ubuntu/ precise main restricted deb-src http://gb.archive.ubuntu.com/ubuntu/ precise main restricted deb http://gb.archive.ubuntu.com/ubuntu/ precise main restricted deb-src http://gb.archive.ubuntu.com/ubuntu/ precise main restricted deb http://gb.archive.ubuntu.com/ubuntu/ precise main restricted deb-src http://gb.archive.ubuntu.com/ubuntu/ precise main restricted deb http://gb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse deb-src http://gb.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse   When I navigate to  in my browser I can see the following folders:   precise-backports precise-proposed precise-security precise-updates precise -- main -- multiverse -- restricted -- universe   This makes me think the paths changed and so the entries in my sources.list are badly formatted now, I'm not sure how to change them to be correct though.  Edit 2  The question marked as a duplicate explains how to remove 404'ing repositories, but *this question explicitly asks what the correct address for precise/12.04 restricted, multiverse and universe ppa is or how to get it. I am not clear how either is a duplicate of the other.


Images in "display: none" divs not loading onpageload

I am scaling images to fit within a div and I want to center them with letterboxes by using positions, but when I try to get the width of the element with .width() immediately after setting the height, .width() returns 0. For example: $(image).css("height", "100%"); console.log($(image).width());  This echoes 0 to the console, but if I call $(image).width() from the console sometime later, the correct value is given. How can I get the width of the <img> element immediately after I change it's height? Edit: So my code goes something like this: $(window).load(function(){     cSCMH(); });  function cSCMH() {     //Some other code     for(var i = 0; i < $("sc mh im img").length; i++)     {         var image = $("sc mh im img")[i];                  //More code         $(image).css("height", "100%");         console.log($(image).width());     } }  The console still receives 0  Edit 2: Okay so I think I know what the root of the problem is. The images don't appear to load into the page until they are made visible on the screen (I have them in a tab div where the display is set to none onload). Is there any way to force the images to load even though they are not visible?  I have confirmed this is the issue. The images are not loaded until the div's display is set to block. How can I make the images load in onpageload instead?


Can you recommend me a good textbook on group theory? I am interested in particular in tensor representation of a group, e.g. why $ 3 \otimes 3 = 6 \oplus \bar 3$ for $ \rm SU(3) $. Is there any textbook that can explain clearly that?


Show that an operation of elements in a finite group contains each elements exactly once

Finite group $G$ contains elements $g_1,g_2,...,g_n$. Show $g_1g,g_2g,...,g_ng$ contains each element of G exactly once.  I know that by definition $g_ig$ is an element of group $G$. How can I prove by contradiction that $g_ig$ does not equal $g_jg$?


What is the best approach using JDBC for parameterizing an IN clause?

Say that I have a query of the form  SELECT * FROM MYTABLE WHERE MYCOL in (?)   And I want to parameterize the arguments to in.  Is there a straightforward way to do this in Java with JDBC, in a way that could work on multiple databases without modifying the SQL itself?   The closest , I'm wondering if there is something different for Java/JDBC.


Can I fly between Sweden and Germany without an ID card?

I'll be flying from Sweden to Germany, and back, so within the Schengen area. Only problem is that the only form of ID I have is an expired national identity card from Sweden. I am a Swedish citizen.  Will this be a problem? Will I not be allowed to pass through security or board the plane? Would getting a temporary passport help?


What is your simplest explanation of string theory?

How would you explain string theory to non-physicists such as myself? I'm especially interested in how plausible is it and what is needed to successfully prove it?


Calling a function iteratively inside a div from jquery

I have a task for which on every click of the button some text is added or updated in the same div.   I have created a dummy code :  <!DOCTYPE html>
This is a paragraph.

  <button id='btn2'>Set HTML</button>
1

     On one click of button, the text changes from 1 to 11, but nothing happens on second click and henceforth. I want it to keep changing everytime I click the button, i.e. it should change to 111, then next click 1111 and so on.   I am not able to figure out whats wrong or missing in the code


Can't detect wireless networks with an Intel Wireless 5100

I’ve been searching the forums for two days now, but none of the answers seems to work for me. I have an Acer Extensa 5630 which has an Intel wifi 5100. Even when I am right next to my router I cannot detect the wireless network. The weird thing is, that when I create a hotspot from my mobile phone it automatically detects it and connects to it. I think I do have the correct drivers installed.  Here is the ifconfig:     $ ifconfig eth0      Link encap:Ethernet  HWaddr 00:1d:72:db:47:5f             inet addr:192.168.10.2  Bcast:192.168.10.255  Mask:255.255.255.0           inet6 addr: fe80::21d:72ff:fedb:475f/64 Scope:Link           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1           RX packets:8419 errors:0 dropped:0 overruns:0 frame:0           TX packets:8173 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:5402459 (5.4 MB)  TX bytes:953135 (953.1 KB)           Interrupt:16   lo        Link encap:Local Loopback             inet addr:127.0.0.1  Mask:255.0.0.0           inet6 addr: ::1/128 Scope:Host           UP LOOPBACK RUNNING  MTU:65536  Metric:1           RX packets:1377 errors:0 dropped:0 overruns:0 frame:0           TX packets:1377 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:0            RX bytes:193628 (193.6 KB)  TX bytes:193628 (193.6 KB)  wlan0     Link encap:Ethernet  HWaddr 00:21:5d:60:72:9a             UP BROADCAST MULTICAST  MTU:1500  Metric:1           RX packets:0 errors:0 dropped:0 overruns:0 frame:0           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0           collisions:0 txqueuelen:1000            RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)   This is what it looks like when I scan and detect the hotspot from my Android device:  wlan0 scan wlan0     Scan completed :           Cell 01 - Address: 02:1A:11:FD:BB:AC                     Channel:6                     Frequency:2.437 GHz (Channel 6)                     Quality=34/70  Signal level=-76 dBm                       Encryption key:on                     ESSID:"AndroidAP"                     Bit Rates:1 Mb/s; 2 Mb/s; 5.5 Mb/s; 11 Mb/s                     Bit Rates:6 Mb/s; 9 Mb/s; 12 Mb/s; 18 Mb/s; 24 Mb/s                               36 Mb/s; 48 Mb/s; 54 Mb/s                     Mode:Master                     Extra:tsf=00000000021577ce                     Extra: Last beacon: 40ms ago                     IE: Unknown: 0009416E64726F69644150                     IE: Unknown: 010482848B96                     IE: Unknown: 030106                     IE: Unknown: 2A0100                     IE: Unknown: 32080C1218243048606C                     IE: IEEE 802.11i/WPA2 Version 1                         Group Cipher : CCMP                         Pairwise Ciphers (1) : CCMP                         Authentication Suites (1) : PSK                     IE: Unknown: 2D1A2C0103FF00000000000000000000000000000000000000000000                     IE: Unknown: 3D1606000000000000000000000000000000000000000000                     IE: Unknown: DD180050F2020101810003A4000027A4000042435E0062322F00                     IE: Unknown: BF0C20018031FCFFB201FCFFB201                     IE: Unknown: C005000000FCFF


I have a  in play. My opponent casts  on it. In response, I cast  on the Unsummon. Do I sacrifice my Phantasmal Dragon because it was the target of the Unsummon, or does countering the Unsummon make it's targeting invalid?


Writing encrypt - decrypt program using Java

I was asked to write a program that encrypts a file by adding 5 to every byte of it and then write another program to decrypt the file. And here is the program I wrote. But it doesn't work. It encrypted a file successfully but then could not restore it back to the origin. The result of the decryption is just a file with some weird symbols in it.  import java.io.EOFException; import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException;   public class CryptingFile  {     public static void main(String[] args)     {                        if(args.length != 3 || (args[2].compareTo("-en") != 0 && args[2].compareTo("-de") != 0))         {             System.out.println("Usage: sourceFile targetFile -<option>");             System.out.println("<option>: ");             System.out.println("    en :            encrypt");             System.out.println("    de:             decrypt");             System.exit(0);         }          try          {             File fileInput = new File(args[0]);             File fileOutput = new File(args[1]);              FileInputStream input = new FileInputStream(fileInput);             FileOutputStream output = new FileOutputStream(fileOutput);              if(args[2] == "-en")             {                 int value;                  while((value = input.read()) != -1)                     output.write(value + 5);              }             else             {                int value;                 while((value =  input.read()) != -1)                     output.write(value - 5);               }               input.close();             output.close();           }          catch (FileNotFoundException ex)          {             System.out.println("Error " + args[0] + " not found");         } catch (IOException ex)          {             System.out.println("Error reading file");         }       } }   This is a result it should look like:     This is a test file.   But it looks something like this:     J^_i_iWj[ij_b[$


How do I best take pictures of paintings?

I am thinking of purchasing a  for my Nikon D5000 in order to shoot food and paintings.  Regarding paintings I am unsure how this should be done :   Lighting : pro'lly no flash, static lighting from many angles? Composition : should I center on the painting, a rectangular shooting angle? White balance : I should set the white balance prior to the shot using a [that white round thing]? Other aspects that I'm missing?


It seems to me that you don't need to wash vegetables you're going to peel. If toxins are on the surface, peeling solves the problem; if toxins have been absorbed into the flesh of the vegetable, washing won't help.  Is that right, or am I missing something?


If this equation in x has real roots find the value of a and b.

$$ x^2+2(1+a)x+(3a^2+4ab+4b^2+2)=0$$  I tried to make an inequality using the discriminant and I simplified it to get $$a^2+2ab+b^2+\frac{1}{2}≤0$$  But I don't know how to solve this.


Prove the inequality $e^x \geq x^e$ for $x > 0$

Prove that $e^x \ge x^e$ for $x \gt 0$  I applied the natural logarithm to simplify the function and I get $$\frac{x}{\ln x}\ge e$$  How to solve these types of problems?


What does it mean for a particle to have spin of 2?

When I first started to study quantum mechanics, my physics text book told that particles have spin of either 1/2 or -1/2. Then I recently read an article saying that gravitons are expected to be massless and have a spin of 2. What does this mean ?


Were all Unix commands re-written in Linux?

I would like to know which commands were re-written for Linux and which were retained from Unix?


says     It appears that space was created in the Big Bang, 13.8 billion years   ago   This seems a little off to me: can we say something has been created if there was no before it had already been created?     The visualizations often seen of the Universe growing as a bubble into   nothingness are misleading in that respect. There is no reason to   believe there is anything "outside" of the expanding universe into   which the Universe expands.   Neither do I understand this on  either: it assumes that nothingness is something outside what exists. Nothing is not a ham sandwich.  Anyway my actual question is: can space be created and destroyed - or does an expansion or crunch leave the extent "space" itself the same?


In my blog (which is about programming) I often use reserved words from different programming languages.  Like this:     When column is nullable in both tables, this query won't return a match of two NULLs for the reasons described above: no NULLs are equal.   Here, NULL is a programming language keyword.  For numerous reasons, I mark them with <code> tag so they are rendered with a fixed width font, not translated into the foreign languages by Google Translate, can easily be seen on the page etc.  In the example above, which would be the best way to mark the plural?   NULLs NULL s NULL's NULLs NULLS   Option 1 looks ugly on the page (the word and the plural marker are rendered in different colors and fonts)  Option 2 adds a space between the word and the plural marker  Option 3 looks nicest but is not correct  Options 4 and 5 may leave the reader under impression that NULLS is a reserved word (which is not true) and this may be confusing. Also, Google Translate would leave the word as is which would be definitely wrong in other languages.  What would be the least of 5 evils?


Statistical tension between two measurements

If we have two measurements of the same quantity, say, $m_1=a\pm c$ and $m_2=b\pm d$, how many sigma away are these values? In other words, when we say that two measurements are in e.g. $3$ sigma tension, which measurement sigma ($c$,$d$, or combination thereof) do we refer to?


Does GCH imply the power set of every well ordered set is well ordering

In ZF with GCH, can we prove that the power set of every well ordered set can be well ordered?


I tend to think of  when it comes to knowing something. If we look at the history of probability theory it centers on a lack of knowing the exact outcome of certain games/gambling bets. This I have no problem with, as it centers on epistemological considerations of incomplete information.  However, very often I'll hear someone explain Quantum Mechanics or radioactivity in terms of an inherent indeterminism/randomness in nature. This I cannot understand, and I honestly think the people who nonchalantly say "Well the amazing thing is the Universe is inherently random!" really aren't thinking things through.  Where is this indeterministic/random "event" or "interaction" coming from? Does it come from nowhere, like a  in Newtonian dynamics? How is this possible? And why does it seem to follow objective probabilities at the very least? What "fixes" that probabilistic distribution, and why must it be fixed like that instead of being completely random/chaotic (in the sense of completely patternless, not Chaos Theory, which is fully deterministic)?  It seems as if these concerns are never addressed, and in all honesty, true randomness is almost like magic. Someone just has to say "Well something funky happens during the measurement process. Basically a wand is waved and we have a determinate result at the end."  I find that conclusion terribly wanting, and the fact that so many fully deterministic interpretations of QM exist makes it far from something we have to take as settled. If someone can shed some light on these concerns that would be much appreciated. Causal determinism seems like the only way of looking at the world that doesn't suffer from this quasi-mystical "randomness" that no one can seem to adequately explain.


FreeCell: How many cards can be moved at once?

I'm working on a FreeCell implementation and I'm currently stuck determining how many cards the user is allowed to move from tableau to tableau at once. I've seen multiple formulas for this, but no explanation them. (empty_columns is decreased by 1 if we move to an empty column)   2 ^ empty_columns + free_cells 2 ^ empty_columns * (free_cells+1) (empty_columns+1) * (free_cells+1)   What I'd like to know is if one of these is correct or (even better) anyone knows a small algorithm to move cards like the in Microsoft implementation  I'm asking this in this stack because this question is not about the implementation itself, but about the game mechanics.


Unity: Assign GameObject to Class that hasn't been yet instantiated

I'm creating a game where I have an Entity class that contains basic entity info (pos, health,..) and some functions. Enemies and Player later on inherit from this class.   Public class Entity {  public Vector2 position; public float health; ,...   Lets say that I have a function like this inside the Entity class:  public GameObject movingIntoEnemy(Vector2 movingToPoint) {     foreach (GameObject go in GameObject.Find("GameMap").GetComponent<GameMap>().enemyList)     {         if (go.GetComponent<EnemyScript>().enemy.position == movingToPoint)         {             return go;         }     }     return null; }   This function looks for a GameObject called "GameMap" and then cycles through enemies in it's list. If an enemy is found, it returns it's GameObject. Using GameObject.Find() is pretty ineffective, so what would be a better approach to this? I mean, I can't just easily use  public GameObject GameMap;   since the code is in a class, and this class needs to be instantiated first in my player/enemy scripts.  My question is - how do I attach gameObjects to this class before it is even created? What is the appropriate approach to this? I guess that I might pass these GameObjects to the class through it's constructor, but it would make things much more complicated.   Thanks in advance ;)


Elegant way to connect an enum value to a method group

I'm creating a networked application. For this I'm creating a messaging system. What I've got so far (a snippet at least...)  public static byte[] ClassToBytes(GenericMessage Data) {     int Size = Marshal.SizeOf(Data);     byte[] Buffer = new byte[Size];     IntPtr Ptr = Marshal.AllocHGlobal(Size);      Marshal.StructureToPtr(Data, Ptr, true);     Marshal.Copy(Ptr, Buffer, 0, Size);     Marshal.FreeHGlobal(Ptr);      return Buffer; }  public static GenericMessage BytesToClass(byte[] Source, ClassType Type) {     switch (Type) //This is going to be extended     {         case ClassType.GenericMessage:             return BytesToClass<GenericMessage>(Source);             break;         case ClassType.RequestMessage: //RequestMessage is derived from GenericMessage             return BytesToClass<RequestMessage>(Source);             break;         case ClassType.ResponseMessage: //ResponseMessage is derived from GenericMessage             return BytesToClass<ResponseMessage>(Source);             break;         default:             throw new KeyNotFoundException();             break;     } }  public static T BytesToClass<T>(byte[] Source) {     int Size = Marshal.SizeOf(typeof(T));     IntPtr Ptr = Marshal.AllocHGlobal(Size);     Marshal.Copy(Source, 0, Ptr, Size);     T result = (T)Marshal.PtrToStructure(Ptr, typeof(T));     Marshal.FreeHGlobal(Ptr);     return result; }   Essentially what I want to do is:  public static GenericMessage BytesToClass(byte[] Source, ClassType Type) {     return BytesToClass<Type>(Source);   }   Is there such a way with an enum, or maybe a dictionary?  I've tried and searched, but without any result.


Set Outlook 2010 (Exchange) to check email less often

I'd like to have Outlook check my email less often. I know about Send/Receive Groups, but as I understand it, if it's checking email through Exchange, that setting doesn't matter and email checking is instantaneous. To avoid workflow disruption, I'd like it to only show me new emails every 30 or 60 or whatever minutes. Is there a way to do that from the user's end (I am not an admin)? I can do it manually by clicking "work offline," but I'd like to have Outlook do this for me.  thanks, Ben


How do I fix a "Failed to download package files" error?

After I installed Ubuntu , I cannot update any software with the error message "failed to download package files". After having googled, I have tried:   sudo apt-get update sudo apt-get upgrade changed to another sources   But I still got the same error message. And there is no problem with internet connection as i can connect to internet using Firefox in Ubuntu.  Any ideas?


What differences -if any- are there between the complex numbers $\mathbb{C}$ and $\mathbb{R}^2$?  I am taking multi variable analysis now and I was wondering what possible changes there might be from the Analysis of two dimensions vs Complex Analysis.  A short summary of the differences would suffice.


Would you be weightless at the center of the Earth?

If you could travel to the center of the Earth (or any planet), would you be weightless there?


The difference between the different APT upgrade commands

I have seen and used all of these commands to upgrade packages on my system, but why are there different commands for this? Do they all not do the same thing? And if not, then in which situations would it be better to use a specific one of them?  These are the commands I mean:   sudo apt-get upgrade sudo apt-get dist-upgrade sudo apt full-upgrade   I have already looked at this, but it does not answer my question about the command sudo apt full-upgrade:


Validate phone number with javascript and regex

I want to validate phone number with javascript, so far i have regex that looks like this:   /^[0-9\+]{8,13}$/   But it is not what i finally wanna get.  I need get phone number format that is default for my country "Poland". For example few phones formats i need check with regex if user correctly passed them: 321123321, 123-321-123, 123 321 123, 123211212, 12-321-12-12, 12 321 12 12.  Sorry if my question is silly but i have no idea how to understand this regex.


I am trying to output the ps command to a file in /home/username/ps.txt.  I want to create the file on the go, write the output of ps to it and also read the same in a single command. I tried this:  ps > /home/username/ps.txt | less /home/username/ps.txt   It writes to the file after creating it but does not output it. But using less seperately gives proper output.   Could I perform this in a single command?


"Allowing line break at ',' in inline math mode" breaks citations

In answering another question ,  suggested two excellent ways to allow line breaks in inline math mode after ,. One way was to use the \allowbreak command after the comma, and the other way was to globally redefine , so that line breaks are allowed.  I used the second approach, and was really fond of it, until I noted that the command \cite{} no longer works as expected: If I cited more than one reference, it showed [?] instead of the correct citation. Here's an example:  \documentclass{article}  %----------Redefining `,` ------------------% \makeatletter \def\old@comma{,} \catcode`\,=13 \def,{%   \ifmmode%     \old@comma\discretionary{}{}{}%   \else%     \old@comma%   \fi% } \makeatother %-------------------------------------------%  \begin{document}  \cite{A,B}  \begin{thebibliography}{A} \bibitem{A} ABC \bibitem{B} DEF \end{thebibliography}  \end{document}   What is wrong with redefining ,? How to correct it?