I'm having trouble constructing a huffmanTree without using frequencies, the user will enter a character and a binary number directly to the huffmanTree. Based on the user input, if the first input of the binary is 0, it should go left, if else it's 1, it should go to the right. When inserting the second binary code the program should check if that place is a leaf or not. If it's a leaf, insert. If not return a message as that place is taken.  I have came up with an idea that is returning a error..  Exception in thread "main" java.lang.NullPointerException     at ideas.ideas.insert(ideas.java:70)  import java.util.LinkedList; import java.util.Scanner;     class Node {      char data;     int idata;     boolean isCreated = false;     Node leftChild, rightChild;      public Node(char data) {         this.data = data;         leftChild = new Node();         rightChild = new Node();     }      public Node() {     }  }   public class ideas{      Node root = new Node();      public ideas(){          root.isCreated = true;      }      void insert(char data, String bin) {         Node newNode = new Node();         newNode.isCreated=true;          if (!root.isCreated) {             System.out.println("It never enters here, since the root is always empty and is created with the constructor ");             root = newNode;             root.isCreated = true;         } else {             System.out.println("");              Node current = root;             Node parent = current;             int i = 0;              while (i < bin.length()) {                  parent = current;                 if (bin.charAt(i) == '0') {                     System.out.println("Parent leftChild is : "+newNode.isCreated);                     current = current.leftChild;                    // System.out.println("Current left child is : "+current.isCreated);                            if (current.isCreated == false) {                          parent.leftChild = newNode;                         current.isCreated = true;                         // current.idata = 0;                         //return;                         i++;                     }                 } else {                     current = current.rightChild;                       if (current.isCreated == false) {                         parent.rightChild = newNode;                         current.isCreated = true;                         //current.idata = 1;                         //return;                         i++;                     }                 }             }              current.data = data;              System.out.println("the data is "+current.data);         }     }      void preOrder(Node current) {         if (current.isCreated == false) {                   System.out.println(current.data);              preOrder(current.leftChild);             preOrder(current.rightChild);          }      }      public static void main(String[] args) {         System.out.println("Enter a character");         System.out.println("Enter its binary code");         ideas t = new ideas();         t.insert('e', "10101");     //    t.insert('a', "00101");         t.preOrder(t.root);      }  }


How do I switch to a different Google account in Gmail?

Previously it was possible to switch between different accounts easily on Gmail.  Now they suggest me only one account (of my wife) and without any option to re-login with mine.  How can I add in my account and switch to it?


Is it possible to query from external database?

I have an extarnal database that I want to show some data in my wordpress site. What are the necessary steps to achieve this?  edit: I changed config.inc.php according to  but it enabled me to see the hostName of the external server visible by phpmyadmin. With the wordpress root I can enter the external database.   Up to here is good. But I do not have any clue about how to advance. I searched plugin to show the new database but I could not find any. I am new to the wordpress, so pardon me for my beginner questions. I want to show the data in different pages, with the unique string name that is the same as in the external database, ie: page name is the specifier query name.


Convert from shapefile to GPX with selected attributes

I have a points shapefile that originally came from a GPX file (imported using QGIS). The original GPX file contained waypoints only and has disappeared.  The shapefile has many attributes, but only some have data. Below are these attributes with two example data records (some decimal values discarded  to fit onto one row).    TYPE    IDENT    LAT     LONG      Y_PROJ        X_PROJ          COMMENT WAYPOINT    JS    -31.6    22.6    -23610488.1    8084542.7    29-AUG-09 13:56 WAYPOINT    PS    -31.6    22.7    -23610333.7    8084487.4    29-AUG-09 14:01   A client of mine would like to convert the shapefile back into GPX, retaining the IDENT attribute as the label for each waypoint; he wants to use the GPX file in Garmin's Basecamp software. I have exported the shapefile sucessfully from both QGIS and ExpertGPS, but when I open the files in Garmin's Basecamp softare, each waypoint has only a sequential number as label.   When I look at the GPX files in a text editor, all the atrribute information is there. For example:  <wpt lat="-31.695305019999999" lon="22.647454610000000">   <type>WAYPOINT</type>   <extensions>     <ogr:IDENT>JS</ogr:IDENT>     <ogr:LAT>-31.69530502</ogr:LAT>     <ogr:LONG>22.64745461</ogr:LONG>     <ogr:Y_PROJ>-23610488.11619880</ogr:Y_PROJ>     <ogr:X_PROJ>8084542.75904646</ogr:X_PROJ>     <ogr:COMMENT>29-AUG-09 13:56</ogr:COMMENT>     <ogr:DISPLAY></ogr:DISPLAY>     <ogr:SYMBOL></ogr:SYMBOL>     <ogr:UNUSED1></ogr:UNUSED1>     <ogr:DIST>0.00</ogr:DIST>     <ogr:PROX_INDEX></ogr:PROX_INDEX>     <ogr:COLOR></ogr:COLOR>     <ogr:ALTITUDE>1382.49</ogr:ALTITUDE>     <ogr:DEPTH>0.00</ogr:DEPTH>     <ogr:TEMP>0.00</ogr:TEMP>     <ogr:WPT_CLASS></ogr:WPT_CLASS>     <ogr:SUB_CLASS></ogr:SUB_CLASS>     <ogr:ATTRIB></ogr:ATTRIB>     <ogr:LINK></ogr:LINK>     <ogr:STATE></ogr:STATE>     <ogr:COUNTRY></ogr:COUNTRY>     <ogr:CITY></ogr:CITY>     <ogr:ADDRESS></ogr:ADDRESS>     <ogr:FACILITY></ogr:FACILITY>     <ogr:CROSSROAD></ogr:CROSSROAD>     <ogr:UNUSED2></ogr:UNUSED2>     <ogr:ETE></ogr:ETE>     <ogr:DTYPE></ogr:DTYPE>     <ogr:MODEL></ogr:MODEL>     <ogr:FILENAME></ogr:FILENAME>     <ogr:LTIME></ogr:LTIME>   </extensions>     Does anyone know how I could achieve this?  Thanks Hanlie


Achievement icon doesn't display reputation changes

The achievement icon doesn't change color or show a number to inform the user of reputation changes.   I ran instances on two separate devices during the same period of time (the last few hours), one with settings > notifications enabled, one disabled. Neither one displayed any change in the icon, though I had three positive (and zero negative) reputation change events. When actually opening the dialog, events are correctly displayed. The phone with notifications enabled did not receive any android system notifications either (push notifications are enabled and functioning on it).  I was not interacting with the site in any other way during this time, so the notifications would not have been dismissed from outside the app.   Notifications-on device: Samsung Galaxy S3, ATT version Android 4.4.2 Running slimkat 4.4.2.build.4.1.Official  Notifications-off device: HTC One E8, Hong Kong version Android 5.0.2 Stock  Both devices are rooted and running the latest version of the SE app, and are logged in to the same account (this one).


Bank statement or bank guarantees for UK visa

Is that document, that fine for visa application ? Or they need statements?


I know that I'm supposed to search for data in a Wiki but I would like to structure the data in some kind of tree. Is this possible?  Right now I just have pages that do not really belong to anything so to get there I need to search and when doing that I might miss it.  EDIT : Lets clear this up, Im not looking for a Table of Content on one page, Im looking for a Table of Content of all wiki pages. So when I go to the main Wiki page I will find the Table Of Content there, clicking a content link will take me to the proper wiki page.


Can you put named credential username and password in the endpoint

The short- is there any way to use named credential merge fields in the actual named credential callout's endpoint (in the query string)  There is an api that I need to make a callout to in salesforce with an endpoint similar to this:    I didn't want to hard-code the api_id or api_key in my code, so I set up a named credential with the following information:  Name- Test Identity Type:  Named Principal Authentication Protocol: Password Authentication Username    my api_id Password  my_api_key Allow Merge Fields in HTTP Header- checked   Allow Merge Fields in HTTP Body -checked   And here is my code that is saying it is an invalid URI:  Http http = new Http(); HttpRequest req = new HttpRequest(); req.setEndpoint('callout:Test?api_id={!$Credential.Username}&api_key={!$Credential.Password}'); req.setMethod('GET'); HTTPResponse resp = http.send(req);   The api won't let me put the api key or id in the headers; it has to be in the endpoint's query string.  Is this even possible?


How can I start being a useful member of this community?

I understand that the rules are very strict, and should be as such, so how can I start off successfully and become a useful member of the community?  The advice of experienced members would be welcome.  Note: I do not just need faster ways to get reputation points, I want to be a useful community member.


How to get the name of the relationship for inner queries in SOQL?

In Trailhead we have the query to get the Contacts for the Account named "SFDC Computing", with an inner query.   SELECT Name, (SELECT LastName FROM Contacts) FROM Account WHERE Name = 'SFDC Computing'   It works fine for my purposes.  "Contacts" is the name of the relationship, per Trailhead. So, I went to Object Manager and examined the Account object's "Fields and Relationships". There is nothing named "Contacts"!   In general, how do I get the name of the relationship, for use in similar SOQL queries?


What is the cost of Dash, Disengage, and Dodge for a mounted Ranger's Companion?

I'm trying to parse out mounted combat as a ranger with a ranger's companion.  From Controlling a Mount (PHB pg. 198):     You can control a mount only if it has been trained to accept a rider. ... It moves as you direct it and it only has three action options: Dash, Disengage, and Dodge   From Ranger's Companion (PHB pg. 93):     The beast obeys your commands as best as it can. On your turn, you can verbally command the beast where to move (no action required by you). You can use your action to verbally command it to take the Attack, Dash, Disengage, Dodge, or Help action.   Assuming a ranger's companion has been trained to accept a rider, what's the action cost to the ranger of commanding it to Dash, Disengage, or Dodge? I assume it would be free while mounted and cost one action when not mounted.


Reputation score in homepage view is too overwhelming

Just noticed a change in the homepage view, making the reputation of the users both black and bold:        I find it too distracting. Can it please be changed? If the purpose is to make the score stick out, just having it black and not bold is enough:        Can this please be changed?


Do I have to set DataTable to null after using it?

I am new to C# and I am using windows forms.  I have about 50 user controls in my C# project and each user control reads data from local SQL server. The SQL query is located in the user control's constructor as shown in the following code:   public partial class BurgersUC : UserControl {     SqlConnection MyConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["MyConnectionString"].ConnectionString);     SqlCommand MyCommand = new SqlCommand();     DataTable DataTable = new DataTable();     SqlDataAdapter Sql_Data_Adapter = new SqlDataAdapter();     public BurgersUC()      {          InitializeComponent();          try         {               DataTable.Rows.Clear();             DataTable.Columns.Clear();              MyConnection.Open();             MyCommand.CommandText = "SELECT * FROM BurgerTable";             MyCommand.Connection = MyConnection;             Sql_Data_Adapter.SelectCommand = MyCommand;             Sql_Data_Adapter.Fill(DataTable);               button1.Text = Convert.ToString(DataTable.Rows[0]["Burger_Type"]);               .               .               .                button30.Text = Convert.ToString(DataTable.Rows[29]["Burger_Type"]);              // DataTable = null;                MyCommand.Parameters.Clear();             Sql_Data_Adapter.Dispose();             MyConnection.Close();            }          catch (System.Exception excep)         {              MessageBox.Show(excep.Message);          }     }   }   My question is:   in terms of saving some memory do I have to set the DataTable to NULL after using it? Thank you


PHP scripts time out but regular pages are snappy

I'm having a strange issue with nginx and PHP-FPM. I have a server set up to serve downloads for my website. It's not very beasty, it's only a Celeron G530 and 4GB of RAM, because of this, I'm running nginx for its low overhead. The server is typically transfering at 30-40Mbps constantly and the port is 100Mbps.   The problem is, when I'm requesting some PHP scripts from the server over HTTP the request often times out. I know the time limit in nginx is 60 seconds, and I've verified through the logs that it's hitting that time and closing the connection.  I also have  running on the server to monitor things, and while this is still over HTTP, on the same server and under the same conditions, it's very quick and snappy with a page load taking no longer than 150ms.  In my head it makes logical sense that the problem lies with PHP-FPM (as far as I know Munin uses Perl), but how can I check this? What can I do to drill down on the problem and see what the actual bottlenecks are?  If it is PHP-FPM, what can I do to perhaps speed things up? It's not taking up a lot of CPU or RAM, and it's set up to use a socket connection rather than a TCP one with nginx.  Thanks for any help.


Will reputation not lost on downvotes because of lower rep limit be lost later after gains?

Suppose somebody asks a  that is unrelated to the site, and receives multiple downvotes. However, the asker still has a reputation of 1. Downvotes will not take away the reputation, as reputation can never be . However, if they ask another question that is well-received, will they lose the amount of reputation they were supposed to lose for the original ? Or will the original question not have any effect?


I have a server machine, with regular desktop hardware that I have obtained from my company. It is currently running Windows Server 2012 R2. The intention is to use it as a media server, connected to a TV. It works well, but the server OS is very heavy and slow to boot, also not 100% compatible with some of the applications I want to run on it, so I would like to install standard Windows 10 on it. Does anyone know if the server license will work for Windows 10, and which version of Windows 10 (home/pro/enterprise) I could install?


Javascript - Regex how can I include a variable inside an expression

Here is what I have got so far:   var module = 'Tiles'; var data = "/*-Tiles-*/ hello world /*-End-Tiles-*/ jhjhhdhdhshd shgsjs"; var pattern = '/\/\*(-'+ module +'-)\*\/([\s\S]*)\/\*(-End-'+ module +'-)\*\//g';  console.log(pattern); var cssGet = pattern.exec(data); console.log(cssGet[0]);     However when I try to add a variable inside the expression. I Receive an error saying that Uncaught TypeError: undefined is not a function on (var cssGet = pattern.exec(data);).  Any help would be great  Thanks


Help w/Character Sheet: What are ability modifiers and how do I calculate them?

So I was filling out the character sheet and suddenly I saw an "ability modifier". I'm confused, and am asking these questions for clarification:   Where do you put your "Standard Array" number. In score? Abil Mod? Mod + 1/2 Lvl? What is MOD? (As my concern, Abil Mod is the table of chart from -5 to +5) In Fort, Ref, Will, do I put my total of score, abil mod, or mod + 1/2 lvl How many healing surges do I have? It says Ability Modifier, but in the score table, abil mod or mod + 1/2 lvl? Finally. In skill, what do I write in the Abil Mod + 1/2 lvl?   (Yes, you can tell me that I'm confused :p )  Follow up question:   I'm human. I can add +2 to one ability. Where should I put it, will it modify the score and the ability modifier? Since I'm human, my healing surge is 6 + constitution modifier. My Cons abil mod is 1, will it means that I got 7?


Modular Arithmetic: Multiplicative inverse

I want to solve this question using mod arithmetic:  7/3 mod 8.  Somebody told me to do it using multiplicative inverse:  7 (Multiplicative inverse of 3) mod 8  I can't find any example related to the above method. Somebody please guide me.  Zulfi.


Cryptographic hash where the hashing function input is similar to the result

I was wondering if there is a cryptographic hash where the resulting hash is identical to the input for the hash function.  If this is the case, would it be a weakness in the hashing function?


Link from a formula to an external website

I'm implementing a field through a text formula inside my salesforce layout:  HYPERLINK($Setup.Endpoints__c.Server_Url__c + "/pdf/" +  field__c ,"Open Last Pdf")   This link works correctly when clicked on a normal browser as it redirects to an external website. The problem is that when opening through Salesforce1 app on iOs, it doesn't open a new window or a browser, but says:  Navigation started when state=1


Can I get real time image classification in java not in python or android?

I used image classification example  from tensorflow using eclipse with java code, but it detect only images stored in pc and I want to detect real time image from webcam or any detected camera in my pc.   I tried different ways. Could I feed the model with picture from live webcam to detect or only just images stored in path?  I'll show the code with images I want to replace with live webcam images direct to model of predictions:  String[] image_names = new String[]{         "tiger",         "lion",         "airplane",         "eagle };  for (String image_name : image_names) {     String image_path = "images/inception/" + image_name + ".jpg";     BufferedImage img = ResourceUtils.getImage(image_path);     String predicted_label = classifier.predict_image(img);     logger.info("predicted class for {}: {}", image_name, predicted_label); }


I have a BMX forsale, but I would like to know what make the frame is so I can determine how much it is worth. Does anyone recognise this symbol on the frame?  Thanks for your help Jon


I have accidentally updated over 3,000 records in one of my tables hosted on Azure. This was not a transaction and I did not have any back ups for this table.  I've read around and found ApexSQL Log but when I connect I try to connect I see "SQL server Azure is not supported"  I understand that this tool examines logs to reproduce the data, is there a manual technique to do is, or an alternative compatible tool?  I also found this  but after running it on Azure I see 'Invalid object name 'fn_dblog'  Really grateful for you support.  Thanks.


Low undergraduate GPA. Strong research profile. Any chances of getting into the likes of MIT, Caltech, etc?

I am a final year undergraduate student of Mechanical Engineering from Nepal. I plan to do master's in aerospace engineering (propulsion systems, to be specific) at a prestigious university in the US. With virtually zero scope for aerospace engineering research in our country and little to no guidance from experts, I have been involved in many research projects for years and have already got a number of papers published so far. I hope to add at least three more conference papers to my profile before I apply to any graduate school. But the problem is that I am going to have a very low CGPA, anywhere between 2.4 - 2.7. I have heard that many schools don't bother to look at anything else in an application when they see a low GPA and reject it straightaway. Does that mean I have no chances at all? I have been working very hard to offset my low GPA and make my resume look better than those of most other applicants.  MIT, for example, recommends a minimum of 3.2 as a guideline. What does that mean for me? Please respond.


Identify a short story about a wall on a planet at the edge of a tiny universe

I am looking for a story about a tiny universe smaller than our Solar System. It has one star and one planet, and the planet's orbit is on the edge of universe. The planet's single face points to its sun at all times. The world has a very tall wall around its twilight circumference.  A civilization grows on the planet. The ruler of the civilization - curious about what is beyond the wall - commissions for a ladder to be built up the wall. He climbs the ladder and walks towards the darkness beyond the twilight atop the wall. He keeps walking and      comes back to his original location. Anything that goes beyond the wall at the edge of the universe is reflected back on itself.   I think it starts with a quote like this: "Many and strange are the universes that exist like bubbles in the foam along the river of time."


What's the difference between passing by reference vs. passing by value?

What is the difference between    a parameter passed by reference a parameter passed by value?   Could you give me some examples, please?


Why does this bash conditional check work with [[ -n .. ]] but not [ -n .. ]?

I have a script that fails to detect zero length strings,the script uses [ -n $value  ] in a bash conditional expression, i.e.  #!/usr/bin/env bash  value="" if [ -n $value ] then     echo "value is non-zero" fi   result     value is non-zero   If I use [[ -n $value ]] it works, i.e.  #!/usr/bin/env bash  value="" if [[ -n $value ]] then     echo "value is non-zero" fi   using [[ produces no output as expected. From the man page:      [[ expression ]]       Return a status of 0 or 1 depending on the evaluation of the conditional expression expression.  Expressions are composed of the pri‐       maries described below under CONDITIONAL EXPRESSIONS.  Word splitting and pathname expansion are not performed on the  words  between       the  [[  and ]]; tilde expansion, parameter and variable expansion, arithmetic expansion, command substitution, process substitution,       and quote removal are performed.  Conditional operators such as -f must be unquoted to be recognized as primaries.    I can't make out an explanation for the behaviour from this. Why does [[ detect zero length strings but [ doesn't?


How using SET command with a call to CMD.EXE?

I have to create system variable in Windows through calling CMD.Exe. I try : cmd.exe /C maVar=maVal  Saddly, no maVar is created. If i open CMD.Exe and type : maVar=maVal  -> maVar is created. Saddly, i have to do it through calling cmd.exe, not launching cmd.exe. Anyone know what is ly mistake ? Thanks


Terminal.app magically changing color values

Terminal.app does some very odd color shifting that makes it impossible to match colors consistently, and I'm wondering if there is any way to disable it or better control it. The "magic" is what shows purple instead of blue, for example, even when the ansi color for the theme is set to plain blue.  This behavior appears to be tied to setting the background color... setting any background color (with terminfo setab capability) disables the "magic" color shift, while an attribute reset (sgr0) re-enables it.  This is my test (sets the foreground, prints some unicode filled blocks, explicitly sets the background to black, prints again):  b=$'\xE2\x96\x88' && bs=$b$b$b$b$b$b$b$b &&   tput setaf 4 && echo -n "$bs" &&   tput setab 0 && echo "$bs"   With the default theme, it prints purple (magic) then blue (ansi). So, my first attempt was to sample the purple color, and update the preferences to use that purple instead of blue... everything should be consistent now, right?  On the next run, I get a slightly brighter purple and then the purple I entered. At first I thought I just put the color in wrong, but as I kept brightening the color setting to match what Terminal.app was showing without the background set explicitly, the Terminal.app just kept getting brighter too -- all the way up until it was white!  From this, it seems to me that Terminal.app is automatically scaling the the colors displayed on the default background color by some factor, but it leaves colors on any explicitly set background alone; making it impossible for the two colors ever to match (except white and black).  FWIW, the window background is set to fully-opaque black.  Is there any way to get rid of this behavior? I'm thinking that this is maybe bug-report-worthy, but I'm curious if there is just something I'm missing.


grouping a list in individual lists in a base list or completely individual in maya python

i have a dynamic group: for example we have a list with 20 items in it in this time.... i wanna make this list in 4 individual list with 5 items something like this is in my head..  a = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20] z = len(a)/4 b = [] for i in range(z)   and after i don't know what i should do.......  i did something like this but it's completely wrong:  for i in range(len(a)):     for j in range(z):         b.append(a)   this is my codes:  import maya.cmds as cm import random as random myList = cm.ls(sl = True) random.shuffle(myList) b = [myList[i:i+5] for i in range(0, len(myList), 5)] for i in b:     print str(i)+".v"   the result is:  [u'curve13', u'curve26', u'curve5', u'curve40', u'curve17'].v   but i need:  [u'curve13.v', u'curve26.v', u'curve5.v', u'curve40.v', u'curve17.v'].v


How do we know Euclid's sequence always generates a new prime?

How do we know that $(p_1 \cdot \ldots \cdot p_k)+1$ is always prime, for $p_1 = 2$, $p_2 = 3$, $p_3 = 5$, $\ldots$ (i.e., the first $k$ prime numbers)?  Euclid's proof that there is no maximum prime number seems to assume this is true.


I'm trying to install python 3.6.1 on my Ubuntu 14.04 VM. I use the following commands:  sudo add-apt-repository ppa:jonathonf/python-3.6 sudo apt-get update sudo apt-get install python3.6   It installs successfully, however I believe I still have 2.7 installed, because when I run "sudo pip" it gives the following error:  Traceback (most recent call last):   File "/usr/bin/pip", line 9, in <module>     load_entry_point('pip==1.5.4', 'console_scripts', 'pip')()   File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 542, in load_entry_point     return get_distribution(dist).load_entry_point(group, name)   File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2569, in load_entry_point     return ep.load()   File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2229, in load     return self.resolve()   File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2235, in resolve     module = __import__(self.module_name, fromlist=['__name__'], level=0)   File "/usr/lib/python2.7/dist-packages/pip/__init__.py", line 61, in <module>     from pip.vcs import git, mercurial, subversion, bazaar  # noqa EOFError: EOF read where object expected   How do I resolve this?


By "casting foci", I am referring to arcane focus, druidic focus, and holy symbol, because they're all just different fluff for the same thing, just keynamed for class restrictions.  When I say magic item, I mean magic in the sense that it has supernatural properties, not "magic item" as a rarity based loot-drop type item as exemplified by the DMG treasure lists. (That said, the second situation below may be affected by that definition) When I say mundane, I am referring to an absence of magic, not a state of boringness.  These are all listed in adventuring gear, and each type of casting focus gives examples of objects which can be used. The adventuring gear consists of mostly mundane objects, and the examples given sound like mundane objects as well. However, the list also includes magic items, like healing potions... and the foci are indeed being used to generate magical effects in the game without the use of non-monetary spell components. The answer to this question is relevant in these situations:   A character finds some need to improvise a casting focus, so they pick up an object which satisfies the description of an example. (Let's say, a wooden dowel rod for an arcane caster who lost his wand) Does it work? If so, why can't an arcane caster use any phallic object, (most weapons, his finger, or even his actual phallus) as a stand-in for the word "rod"? A character, through whatever circumstances, loses their focus, so they decide to make a new one with downtime. Should they use Craft or Create a Magic Item? If they must use create a magic item, what is a druid doing that is so special when he cuts this sprig of mistletoe over any other sprig of mistletoe?   This is based on me thinking about  I gave a while back, and being dissatisfied with it. (And a friend made some dick jokes about the word "rod" as an example for arcane foci.) I cannot find anything in the core texts which states clearly one way or the other. (Though I've been known to be a poor reader) So, I would like to know,   is there any official source which clearly states whether or not casting foci are magic items?


Why do we see an inverted image in a spoon when kept far from our face with concave side towards our face?

We see a virtual inverted image whereas in case of concave mirror we can see a virtual image which is erect.


I am using overleaf. When using the algorithm2e package, it gives me bold line numbers prefixed with a "-" symbol for each line. I want to have a line number in small fonts without the "-" symbol. An output pdf snapshot is attached with minimal working code. Thank you in advance. \documentclass{ieeeaccess} \usepackage{cite} \usepackage{amsmath,amssymb,amsfonts} \usepackage{algorithmic} \usepackage[ruled,linesnumbered]{algorithm2e} \usepackage{graphicx} \begin{document}      \begin{algorithm}     \DontPrintSemicolon        % enter the algorithm environment     \caption{algorithm}               % give the algorithm a caption     \label{alg1}        %\begin{multicols}{2}                       % and a label for \ref{} commands      %\begin{algorithmic}[1]      \KwIn{         $a=\sum_{i=0}^{n-1} a_i\cdot2^i$,         $b=\sum_{i=0}^{n-1} b_i\cdot2^i$,         $m=\sum_{i=0}^{n-1} m_i\cdot2^i$}     \KwOut {$c = a \times b$ \text{mod} $m$}          $c \leftarrow 0, \quad reg_1 \leftarrow a$\;     $reg \leftarrow 2a$ mod $m \qquad \text {//     \scriptsize Pre-computed value //} $\;     %$N \leftarrow n+2 \quad \quad \quad \text{ //  \scriptsize append two 0's to left of MSB of y //}$\;     $N=      \begin{cases}     n+3,& \text{ if $n \bmod 2 = 0,$ append two $0$ to the left of MSB of $b$} \\     n+2,& \text{ if $n \bmod 2 = 1,$ append single $0$ to the left of MSB of $b$}     \end{cases}     $\;     $N \leftarrow N+1 \qquad  \text{ // \scriptsize append 0 to right of LSB of b //}$\;          \For {$(i=0; i \leq N-2; i \leftarrow i+2)$ }{         \Switch{$(b_{(i+2:i)})$}{             \textbf{when} $ 000 \mid 111 \Longrightarrow v\leftarrow 0$ \;             \textbf{when} $ 001 \mid 010 \mid 101 \mid 110 \Longrightarrow v\leftarrow reg_1$  \;             \textbf{else} $ \Longrightarrow  d\leftarrow reg_2$ \;         }         \tcp {following critical operations are executed concurrently //}         $reg_1 \leftarrow 4\times reg_1 \text{ modulo } m$\;          $reg_2 \leftarrow 4\times reg_2 \text{ modulo } m$\;          $v \leftarrow v \pm d \text{ modulo } m$\;     }     \Return{$v$}\;     %\end{multicols}     \end{algorithm} \end{document}


Websites that archive third party blog contents without owner's consent

I recently published an  by the title "how to install ns2 on fedora 22" on my blog and less than 8 hours later I found it as top result returned by Google when I searched the title of the article, but to my surprise, it was not on my blog, it was on other websites, though it was the same article I had written, and not on one website, but the article was on several websites who all were returned as top results. Interestingly, my own blog was not included in Google's first page of results. When I surfed to one of the websites, I found a link at the end of the article that was similar to my blog but was not the same link, in fact, it didn't exist. There, I also found other articles of mine all copied verbatim over there, not surprisingly wrapped in a lot of advertisements. I found it very unacceptable because they publish contents from many blogs without consent of respective owners, thus, attracting many users to their website through their heavily optimized or tweaked SEO.   What should I do to prevent these websites from stealing my content and how can I deal with such a situation?


Can't join a different stackexchange site

There are a number of Stack Exchange sister sites. I have a hard time signing up with them. I'm presented with three options:   Sign up using Google Sign up using Facebook Sign up using Stack Exchange   I have a Stack Exchange ID, so that's what I want to use.  On filling in my existing name, email, and password (confirmed), I am presented with the puzzling message:     We already have an account with that email address.   If the email is correct, try recovering your account.   Huh? Of course I have an account with that email address. That's what I'm trying to use!  I'm using the right email, the right password. Why do I have to enter any of that? I'm logged into three SE sites right now! Why do I have to type my password twice, and above all, why do I have to "recover my account", which I never lost?  My workaround has been to "recover my account". That means changing my password with all of my existing SE accounts.


How to fix "java.lang.NullPointerException: null"?

It first takes the name of the customer and after it takes the purchase amount of that customer up to ten customer. Then it prints out the name of the customer who purchases most. I have the following code: Store cashier=new Store();                 double[] purchase=new double[10];                  String[] customer=new String[10];                                  for(int i=0;i<10;i++){                 customer[i]=JOptionPane.showInputDialog("Please enter the name of the customer");                 String purchaseString=JOptionPane.showInputDialog("Please enter the buying amount of the customer");                 purchase[i]=Double.parseDouble(purchaseString);                 cashier.addSale(customer[i],purchase[i]);                 }                 JOptionPane.showMessageDialog(null,"The best customer is"+cashier.nameOfBestCustomer());                                                               break;  And this one is the Class: public class Store { private double[] sales; private String[] customerNames; private int counter; private double maxsale; private int index;  public Store() {     double[] sales=new double[10];     String[] customerNames=new String[10];         }     public void addSale(String customerName, double saleAmount) {     counter=0;     sales[counter]=saleAmount;     customerNames[counter]=customerName;     counter=counter+1;      }  public String nameOfBestCustomer(){     maxsale=sales[0];     for(int i=0;i<10;i++){     if(sales[i]>maxsale){     maxsale=sales[i];     index=i;     }     }     return customerNames[index]; }  } However, I get "java.lang.NullPointerException: null" error. Can you please help me? Thank you. Edit: Here is screenshot from my debugger


I'd like to understand what exactly is a dot product; why it get created ? differences with cross product ?  Demo of: cos(a+b) = cosacosb - sinasinb ?  Thanks a lot :)  EDIT: an other topic was given but there's no real explication, just how to calculate or apply formulas


Binomial distribution in exponential form

I am trying to find out if I am doing this right:  I have started with: $f(y)=\binom{n}{y}(\frac{\mu}{n})^y(1-\frac{\mu}{n})^{n-y}$  This is what I get: Result: $exp[ylog(\frac{\mu}{n-\mu}) - nlog(1+e^\theta)+log\binom{n}{y}]$ $\theta=log(\frac{\mu}{n-\mu})$ $b(\theta)=nlog(1+e^\theta)$ $\phi=1$ $a(\phi)=1$ $c(\phi,y)=log(\binom{n}{y})$    However, I found this solution that looks similar but different to mine and values of a and b seem to be different:    So, I noticed they are using $\pi$ instead of $\frac{u}{n}$ so I am not sure if the solutions are equivalent or I made a mistake somewhere along the line.    So I have a couple of questions  Is it possible to have 2 different solutions with different values for a and b and maybe c? Also, in the notes I have $a(\phi)==\phi$ in the examples I have but it might not be true everywhere?


Can I use a one-way ticket to come to the UK? Or do I need to show a return ticket to be able to get in?

I am an American who wants to come to the UK to discern whether or not my boyfriend and I want to continue our dating and possibly marry in the future (not necessarily this trip). If I purchase a one-way ticket, will I be refused entry? I am allowed to stay up to 6 months with just my passport, but wanted to make sure that was, indeed, the case. I already have a place to stay, and I do not plan on working for the time I will be in the UK. I just do not know yet when I will return (within the 6 month period). Suggestions?


How do I get the nc command to end after 2 seconds?

I have to write a maintenance script that iterates over our IPs testing their connectivity to certain services such as nc -sip# mailin-01.mx.aol.com 25.  It has a flag -w ... but it's not what I think it is. That is, I only want this program to run for at max 3 seconds and the places we are connecting to are always up (unless major network problems that the script shouldn't worry about --- not its particular job and would be noticed before the script is run).  I just need it to connect and see if we are getting an error message. This is required before we assign an IP to a user for their web page (this is an alternative to CPanel stuff -- we want our own).


I have a TreeMap and a working by key Comperator:  Map<String, Long> movieReviewsTreeMap = new TreeMap<String, Long>(new MyComperator());  class MyComperator implements Comparator<String>{ @Override public int compare(String s1, String s2) {                 return s1.compareTo(s2);             }         }   I'm trying to modify the Comparator in order to compare TreeMap entries. My goal is to sort TreeMap by value (highest to lowest), and by key in case two values are equal.  Thanks.


I tried my best to find an example of how to post a math equation on Stack Overflow, but nothing worked. I'm familiar with  though. I found some people are saying you just need to add your equation between two doubled $s ( $$ f(x) = 2x $$), but it doesn't work for me. What should I do to make it work?


Why is the asterisk before the variable name, rather than after the type?

Why do most C programmers name variables like this:  int *myVariable;   rather than like this:  int* myVariable;   Both are valid. It seems to me that the asterisk is a part of the type, not a part of the variable name. Can anyone explain this logic?


Why does the Sentinel Feat include this condition?

In D&D 5e, the last part of the Sentinel feat contains this text:  When a creature within 5 feet of you makes an attack against a target other than you (and that target doesn't have this feat), you can use your reaction to make a melee weapon attack against the attacking creature   Thematically, why shouldn't you get the opportunity attack if the target has Sentinel? I can't think of any flavor/narrative reasons why your ally having an ability would prevent you from using your own ability.  If that clause was included strictly to prohibit combos among fellow sentinels, is there an official source that says as much?   EDIT: This is not a duplicate. The linked answer only clarifies that Sentinel says what it says. It does not say why, nor give any sources that describe the reason for this design decision.


What's the Difference Between a Charm, an Enchantment, a Spell, and a Curse?

From a recent question, I know a curse is intended to harm people, and I think a charm is an object with a special power, but I also think I remember the word having a different meaning in Harry Potter.  And I'm not clear if a curse has to be a spell or if it could be an enchantment or charm as well.  So what, exactly is the difference between a spell, an enchantment, a charm, and a curse?


Solving 4 Quadratic Simultaneous Equations

Consider the equations:   $$\begin{cases} ab+c+d=3\\ bc+d+a=5\\ cd+a+b=2\\ da+c+b=6 \end{cases}$$   Where $a,b,c,d \in \mathbb{R}$. How can we find $a,b,c,d$?   The furthest I've got is by adding the first two equations and the last two equations together to get: $ab+bc+c+d+d+a=(b+1)(a+c)+2d=8$ and $(d+1)(a+c)+2b=8$ We can rearrange these (assuming $b,d \neq -1$) to get $$\frac{8-2d}{b+1}=\frac{8-2b}{d+1} \implies -d^{2}+3d+4=-b^{2}+3b+4$$ Which leads us further to $$b^{2}-d^{2}-3(b-d)=0 \implies (b-d)(b+d-3)=0$$ Now since $b=d$ gives us an absurdity (equations 1 and 4 reduce to 3=6), we must have $b+d=3$. This is as far as I can get unfortunately, since trying the same approach with the other pairs doesn't work in the same way.  Help would be much appreciated; the problem is from the BMO1 2004 paper.


Python regular expression 'findall' is not returning all expressions

I want to find all expressions wrapped with "<" and ">" For example, in <2><1>, I want <2> and <1> seperately.  s = re.findall('<.*>', '<2><1>')   gives me only <2><1>, which is different from what I've intended. Can you give me an answer to find all of these expressions ? Thanks much in advance.


How to make a command block work every 30 seconds?

So im trying to make a command block which activates every 30 seconds. The command in the command block is /kill @e[type=minecraft:arrow] so it kills all arrows on the ground every 30 seconds. How can I do that?


Can I travel from San Francisco to Fort Lauderdale with pending Visa U?


Why each section is shown in one page rather than in the same page when I use \onecolumn?

I don't know why each section is shown in one separate page when I use \onecolumn rather that the normal (two columns) format.  \onecolumn \section{Goals}  some text


Can I install Windows 8 and Windows xp sp2 in single pc?

I want to install Windows 8 and Windows xp sp2 in single PC. Is this Possible. DualOperating Systems in single pc.


Can't connect to airpods pro on bluetooth

When I try to connect to bluetooth nothing happens it just stops pairing after a few seconds


After upgrading to ubuntu 16.10 I get this warning in my boot.log file  WARNING: Failed to connect to lvmetad. Falling back to device scanning. Volume group "ubuntu-vg" not found Cannot process volume group ubuntu-vg WARNING: Failed to connect to lvmetad. Falling back to device scanning. Reading all physical volumes.  This may take a while... Found volume group "ubuntu-vg" using metadata type lvm2 WARNING: Failed to connect to lvmetad. Falling back to device scanning. 2 logical volume(s) in volume group "ubuntu-vg" now active /dev/mapper/ubuntu--vg-root: clean, 1180656/30154752 files, 16007858/120604672 blocks   Seems to be an issue that is related to disk encryption. The system startup properly and I do not see any bad behaviour, however do anybody have an idea how to fix


Recursive one liner function to print numbers from N to 1

def recur(n):     print(n)     if n>1:         recur(n-1)   How can this be converted to just line. I can not find a way to use the logic as  recur = lambda x: print(x) if.......  I can not even use   func = lambda x: [print(i) for i in range(x,0,-1)]


I need to free up some space in the /boot partition.  Looking in another [thread][1] I found I should use sudo dpkg --list 'linux-image*' to locate and sudo apt-get remove linux-image-VERSION to remove unused Kernel Images however no matter which one I choose they all say the last one 51 depends on it; it gives the option to force it but I am not 100 % sure about that the right way to go.  $ uname -r 3.13.0-49-generic  $ sudo dpkg --list 'linux-image*' Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name                     Version           Architecture      Description +++-========================-=================-=================-=====================================================  un  linux-image              <none>            <none>            (no description available) un  linux-image-3.0          <none>            <none>            (no description available)     ii  linux-image-3.13.0-32-ge 3.13.0-32.57      i386              Linux kernel image for version 3.13.0 on 32 bit x86 S     ii  linux-image-3.13.0-40-ge 3.13.0-40.69      i386              Linux kernel image for version 3.13.0 on 32 bit x86 S     ii  linux-image-3.13.0-43-ge 3.13.0-43.72      i386              Linux kernel image for version 3.13.0 on 32 bit x86 S     ii  linux-image-3.13.0-44-ge 3.13.0-44.73      i386              Linux kernel image for version 3.13.0 on 32 bit x86 S     ii  linux-image-3.13.0-45-ge 3.13.0-45.74      i386              Linux kernel image for version 3.13.0 on 32 bit x86 S     ii  linux-image-3.13.0-46-ge 3.13.0-46.79      i386              Linux kernel image for version 3.13.0 on 32 bit x86 S     ii  linux-image-3.13.0-48-ge 3.13.0-48.80      i386              Linux kernel image for version 3.13.0 on 32 bit x86 S     ii  linux-image-3.13.0-49-ge 3.13.0-49.81      i386              Linux kernel image for version 3.13.0 on 32 bit x86 S in  linux-image-3.13.0-51-ge <none>            i386              (no description available)     ii  linux-image-extra-3.13.0 3.13.0-32.57      i386              Linux kernel extra modules for version 3.13.0 on 32 b     ii  linux-image-extra-3.13.0 3.13.0-40.69      i386              Linux kernel extra modules for version 3.13.0 on 32 b ii  linux-image-extra-3.13.0 3.13.0-43.72      i386              Linux kernel extra modules for version 3.13.0 on 32 b ii  linux-image-extra-3.13.0 3.13.0-44.73      i386              Linux kernel extra modules for version 3.13.0 on 32 b ii  linux-image-extra-3.13.0 3.13.0-45.74      i386              Linux kernel extra modules for version 3.13.0 on 32 b     ii  linux-image-extra-3.13.0 3.13.0-46.79      i386              Linux kernel extra modules for version 3.13.0 on 32 b     ii  linux-image-extra-3.13.0 3.13.0-48.80      i386              Linux kernel extra modules for version 3.13.0 on 32 b     iF  linux-image-extra-3.13.0 3.13.0-49.83      i386              Linux kernel extra modules for version 3.13.0 on 32 b     iU  linux-image-extra-3.13.0 3.13.0-51.84      i386              Linux kernel extra modules for version 3.13.0 on 32 b     iU  linux-image-generic      3.13.0.51.58      i386              Generic Linux kernel image


How to bit-shift integers past 31 in JavaScript?

In ECMA5 it says that the bitwise operators and shift operators operate on 32-bit ints, so in that case, the max safe integer is 2^31-1, or 2147483647.  However, the max safe integer otherwise is .  For my program, I need to potentially deal with integers between 2^32 and 2^53.  So, my question:  Currently in my code I do something like this:  value |= (byte & 127) << (7 * i);   This doesn't work with i past 4 because it will be over the max shift range of 31.  So is the only alternative doing something like.. this? (still working on it)  value += (byte & 127) * Math.pow(10, i * 7);   Not completely correct but close enough to the point.. basically having to simulate ORing to a bitshift to get around the JavaScript restriction of 31 shift limits.  Is there a better way?


Are there any references to Eru or the Valar in the Lord of the Rings movies?

The closest references to Eru or the Valar in Peter Jackson's Lord of the Rings and The Hobbit movies I can think of are Gandalf's vague description of his resurrection ("I've been sent back... until my task is done.") and his later description of Aman to Pippin ("White shores and beyond, a far green country under a swift sunrise." -- as an aside, he's taunting Pippin here, since Hobbits suffer from the Gift Of Men) and the equally vague information viewers are given about where the elves are going when they leave Middle Earth.  Are there any more direct references I'm missing? Maybe a mention of Aule by a dwarf?


Are the eigenvalues of the sum of two positive definite matrices increased?

Let $A$ and $B$ be two $n \times n$ (symmetric) positive definite matrices, and denote the $k$th smallest eigenvalue of a general $n \times n$ matrix by $\lambda_k(X)$, $k = 1, 2, \ldots, n$ so that $$\lambda_1(X) \leq \lambda_2(X) \leq \cdots \leq \lambda_n(X).$$ I guess the following relation holds: $$\lambda_k(A + B) > \max\{\lambda_k(A), \lambda_k(B)\}, \; k = 1, 2, \ldots, n.$$ This looks intuitive but I have difficulty to prove it, any hints?


I did an "apt-get dist-upgrade" on a 16.04.2 LTS system. I did not see any kernel related packages, so I did not reboot.  To my surprise, I no longer have /sbin/init (as shown by ps -auxw as root) as process ID 1; instead PID 1 is /lib/systemd/systemd --system --deserialize 20.  Is this expected? ...or is this a side-effect of upgrading? ...and if I reboot, would I see /sbin/init return?


I understand that Linux is an open source OS, in other words I have the ability to change whatever I want with the source code of the system. Where is the source code located? For example I would like to add a new event to the mouse which let the user logout when the mouse pointer is moved left then right. Can someone provide me with some lessons or anything that would  me to understand how changes to the Source code happens?


My son just received a "Disney Junior" DVD as a birthday present. It won't play in Ubuntu - in fact, Ubuntu only sees an empty disc! This is on 2 separate computers at home running Ubuntu 13.x and 14.x, respectively. The player is VLC but the built-in media player doesn't see any content either.  I loaded the DVD in a Windows computer and it plays just fine there, using VLC. I tried using handbrake to make a backup of it but Handbrake doesn't see any content.  Is it normal that Ubuntu can't play Disney DVDs? How can I get around this?  I'd like to rip the DVD to my harddisk; that's how we view all our other DVD's. Failing that, I'd at least want to be able to play the DVD on Ubuntu...


He started working for this factory a year ago.   Which sentence has the same meaning?     He has been working for this factory for a year.   or     He has worked for this factory for a year.


How can the PCs make money in an urban adventure?

I'm running Dragon Heist for my players, and I've come to a bit of a roadblock so to speak. In chapter 2, the PCs are meant to open and run their own tavern, however it costs 1000gp+ to even open it, let alone pay to operate it. They're only level 2, and seeing as it's the middle of Waterdeep there aren't exactly dragons' hoards or goblin outposts to plunder. How are they meant to make the money in this situation? The book doesn't really offer any specific ways, and I'd rather not run a session based entirely around crafting and performance rolls.


Trying to install Ubuntu for the first time. Attempting to Dual Boot on a SSD with windows 10 fresh install. I have created a bootable USB from the ubuntu-14.04.3-desktop-amd64.iso and when it boots i am getting stuck on the error "Fixing recursive fault but reboot is needed!" I have rebooted but each time it is the same.  I'm running a new Dell Inspiron 5999 with 8GB Ram.  Edit: I dont get anywhere significant in the installation. It simply boots starts listing various lines and then gives me the error message before i get a chance to really do anything. If I try to shut down I can get to what appears to be a command line but when I type anything it just starts a new line and nothing is returned.   I have tried with a different USB Boot loader to load the iso and have the same problem. I am going to try the latest version and then a 32 bit version to see if it makes any difference as the small bit of infomation I have found suggests trying that.  What else can I try?


How do you download games on a school iPad?

This school iPad is not letting me get games or anything like that so I'm asking how can you transfer games from a mac computer onto a school iPad?


Will an Ubuntu "daily build" version automatically become a fully functional stable version when it's officialy released?

The next Ubuntu stable version will be available within less than 2 months. But I want to install the "daily build" of this next version today. If I just keep doing the basic apt update & apt upgrade, will I have the stable version when the next Ubuntu version is officially released? Or should I format and perform a clean install of the stable version once it's released? Will there be a practical difference between just keep updating and performing a clean install of the officially released stable version?  PS: at the momment, I'm considering to install Ubuntu 2020.04 LTS daily build and update it until the stable version is released.


I'm trying to make a simple blackjack program. Sadly, I'm having problems right off the bat with generating a deck of cards.  #include <iostream> #include <vector>  using namespace std;  int main() {     vector<char> deck;     char suit[] = {'h','d','c','s'};     char card[] = {'2','3','4','5','6','7','8','9','10','J','Q','K','A'};     for (int j=0; j<13; j++) {         for (int i=0; i<4; i++) {             deck.push_back(card[j] suit[i]);         }            }      return 0; }   I know my problem begins with me trying to assign the value '10' to a char. Obviously I couldn't get this to compile but I'm sure when I try to assign the card values to the vector deck I'll also get an error since I used variable type 'char'. Knowing what kind of variable type to use seems to be killing me. Also, would 'deck.push_back(card[j] suit[i]);' be the correct code to combine the card and suit, or do you have to put something between card[j] and suit[i]? I'd appreciate it if any of you could lead me in the right direction. Also as a little side note, this is part of a homework assignment so please don't just give me entire blocks of code. Thanks for your help.


Sequence: Show that $\limsup(s_n.t_n) ≤ \limsup(s_n) · \limsup(t_n)$

Suppose $\{s_n\}$ and $\{t_n\}$ are bounded sequences of nonnegative numbers. Show that as $n\rightarrow \infty$ $$\limsup(s_n.t_n) ≤ \limsup(s_n) · \limsup(t_n)$$  My attempt:  Let $\limsup(s_n)=l$ and $\limsup(t_n)=m$ then $s_n<l+\epsilon$ for $n>N_1$ and $t_n<m+\epsilon$ for $n>N_2$. Also  $\{s_n\}$ and $\{t_n\}$ are bounded sequences, sequence $\{s_n.t_n\}$ is also bounded.  But $$s_nt_n<lm+l\epsilon +m\epsilon +\epsilon^2$$  How to prove that. I have no idea how to prove. Please help.


If someone is my proxy, I am their _____?

Bonus question: If I am a proxy for multiple people, what's the collective noun for that group?


Is it possible to hyphenate the word "repack" (due to a line break)?

I would like to know if the word "repack" exists at least in one of the variants of the English language (i.e. British English, American English and so on), and if yes, if it can be hyphenated at the end of a line.  Personally, I believe that it exists, because I have read it several times in various articles. But I am completely unsure if it can be hyphenated at the end of a line. On one hand, Merriam-Webster does not know that word at all, Wiktionary knows it, but doesn't say anything about hyphenation, and no online hyphenation service I have tried does hyphenate it.  On the other hand, my personal feeling is that it might be possible to hyphenate it like "re-pack" at the end of a line.  Please note that I am not asking how to spell it when using it in normal text flow, i.e. if it is in one line. I am only interested in separating the word at a line end.  To make it absolutely clear, let's take another word as an example: You may hyphenate the word "power" like "pow-er", but not in normal text flow, i.e. if the word fits into the current line, but only at the end of a line, having the string "pow-" at the end of one line and the string "er" at the beginning of the next one. Of course, writing "pow-er" in the normal case, i.e. not at a line break, is wrong.  So, coming back to my actual problem, I would like to know if I can have "re-" at the end of one line and "pack" at the beginning of the next line even if no dictionary and no online hyphenation service does hyphenate that word.  Could anybody explain which rules apply here (of course, before asking, I have read some articles that gave some general guidance and that made me assume that the word in question could be hyphenated at line ends like shown above, so I just don't get why none of the online services hyphenates that word) or give a reference to a source where I can lookup correct line end hyphenations for English words (the word I have asked for is just an example - since I'm currently translating my website from German to English, there are hundreds of such cases, i.e. words whose line end hyphenation seemingly isn't shown at any source I know and which are not hyphenated by online services although I strongly believe they should).  All links I have seen in the comments so far are definitely not duplicates of my question. Without exception, they all deal with the question how you should write the respective word under normal circumstances, i.e. without a line break taking place.


Is it possible to use motherboard video ports for additional monitors when a CPU does not have integrated graphics?

I am adding more monitors to my display configuration, and have depleted all my ports on my graphics card. I have tried to use a HDMI port on my motherboard, however my PC does not detect the new display or send a video output to it through the motherboard video port. My CPU does not have integrated graphics, and I could not find a setting in my BIOS to force a video output  Is it possible to use motherboard video ports with CPU without integrated graphics? If not, why?  I have ruled out problems with the monitor and cables by successfully testing the monitor with the video ports on my graphics card.   My current relevant specs, although this section is intentionally ambiguous to help others with a similar question and different hardware.   Motherboard:  CPU:  @ stock GPU: Nvidia GTX 1050 Ti     A  asked about forwarding GPU rendered graphics, but did not feature a situation that lacked integrated graphics.


Which is more efficient: Return a value vs. Pass by reference?

I am currently studying how to write efficient C++ code, and on the matter of function calls, a question comes to mind. Comparing this pseudocode function:  not-void function-name () {     do-something     return value; } int main () {     ...     arg = function-name();     ... }   with this otherwise-identical pseudocode function:  void function-name (not-void& arg) {     do-something     arg = value; } int main () {     ...     function-name(arg);     ... }   Which version is more efficient, and in what respect (time, memory etc.)? If it depends, then when would the first be more efficient and when would the more efficient be the second?  Edit: For context, this question is limited to hardware platform-independent differences, and for the most part software too. Are there any machine-independent performance difference?  Edit: I don't see how this is a duplicate. The other question is comparing passing by reference (prev. code) to passing by value (below):  not-void function-name (not-void arg)   Which is not the same thing as my question. My focus is not on which is the better way to pass in an argument to a function. My focus is on which is the better way to pass out a result to a variable from the outside scope.


I would like to ask for clarification regarding changing my name from Maria Elena to Melita. The name printed on my US visa is Maria Elena, while in my new passport it is Melita. In my amended birth certificate, on the lower portion it shows an annotation for the name change, which states the change from Maria Elena to Melita. Is there a discrepancy here?


Why is it that $$ab=ba$$ for positive integers $a,b$? Is there an intuitive explanation or we just need to accept it as a given fact?


What does ~/ mean before a directory's name in the terminal?

For example, what would it mean to say:     cd ~/mydirectory


Estimating the most important features in a k-means cluster partition

Is there a way to determine which features / variables of the dataset are the most important / dominant within a k-means cluster solution?


Let $V$ be a vector space and $U,W$ be its subspaces.  Prove that if the union $U\cup W$ is a subspace of $V$, then $W \subseteq U$ or $U \subseteq W$.  I'm not sure where to begin at all really.


List of lists changes reflected across sublists unexpectedly

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


We have a famous partiton identity which states "the number of partitions of $n$ into odd parts equals the number of partitions of $n$ into distinct parts". This is a famous result of Euler on partitions.. I know the proof using generating functions. But how can we prove the number of partitions of $n$ into odd parts equals the number of partitions of $n$ into distinct parts using Ferrers graph


I have quick look but I do not seem to find the answer to the following question. Basically, I get the following output when I run lm():      Call: lm(formula = y ~ as.factor(x1) * x2, data = data)  Residuals:      Min       1Q   Median       3Q      Max  -13.7237  -3.4391   0.8872   3.7576   8.3555   Coefficients:                                Estimate Std. Error t value Pr(>|t| (Intercept)                  8.448e+01  1.646e+00  51.318   <2e-16 *** as.factor(x1)2               5.273e-01  2.967e+00   0.178   0.8597     as.factor(x1)3               2.442e+00  2.542e+00   0.961   0.3416     x2                          -3.259e-05  8.820e-05  -0.369   0.7134     as.factor(x1)2:x2           -2.641e-04  2.636e-04  -1.002   0.3215     as.factor(x1)3:x2           -2.728e-04  1.314e-04  -2.076   0.0434 *  --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Residual standard error: 5.809 on 47 degrees of freedom   (2 observations deleted due to missingness) Multiple R-squared:  0.207, Adjusted R-squared:  0.1227  F-statistic: 2.454 on 5 and 47 DF,  p-value: 0.04683   The question is what is the interpretation of regression coefficients? More specifically what do the estimates of interaction mean? For example, is  -2.728e-04 the interaction term or the effect of x2 on (x1)3?  Thank you very much in advance!


Suppose $S_n$ is the permutation group of order n, and $A_n$ is the alternating group of order n(which preserves parity in permutations). Prove that $A_n$ is the derivative of $S_n$. Note: derivatives in group G is defined like this: G'= <X> (the group generated by set X) Where X={[a,b]| a,b $\in$ G} and [a,b]= $a.b.a^{-1}.b^{-1}$ So the question is to simply prove $A_n=S'_n$


Here, I copied a sentence from a book published by Cambridge Press: ''Nusselt number is the ratio of the actual heat transfer to what it would be if there were conduction but no convection.''  This may be a simple question for you. But I confused about the ''were'' in the subordinate clause and supposed it should be was since conduction is in singular form. Could you please explain this issue? Thanks for your comments.


On many boards I've seen, there are little copper dots used for the purpose of "Copper Thieving". They're small round copper dots connected to nothing and arranged in an array. Supposedly they're for balancing the copper on the boards to improve manufacturability, but no explanation I've heard has convinced me that they're needed or useful. What are they for and do they actually work?  Below is an example with squares.


Ubuntu 20.04 does not wake up properly after lid is closed with Linux Kernel 5.4.0.56 (Report an issue)

Since today Ubuntu 20.04.1 LTS stopped waking up after being suspended by the closing of my laptop's lid, just showing a blank screen. I've tried lots of differents solutions, from modifying some GRUB arguments values to changing lid behavior on systemd's logind.conf file, but none of them seemed to work. Then I remembered that I updated Linux kernel version 5.4.0.56 earlier today, so I checked to see if the same problem ocurred with version 5.4.0.54. And well, it didn't, with version 5.4.0.54 suspension seeming to work properly still, given that the notebook woken up correctly and that I was able to have access to my laptop again after logging in. For that I ask how could I report a Linux Kernel issue to its developers, because I'm quite convinced that this a kernel related issue, given that changing the kernel version used solved this issue.


How do i tell google to ignore my subdomain?

I did a search and i found a link to my site... twice. They are exactly the same except one is www and the other is static. How do i tell google to ignore everything in my static domain?


Need Hints Prove "$((\neg \alpha \to \alpha) \to \alpha) $" Using Axiom 1,2,3 and MP and deduction theorem

$((\neg \alpha \to \alpha) \to \alpha) $  Hi, I am trying to prove this.  Can someone gives me some hints to start the question... My friend told me I might need to use deduction theorem here, but I have no clue to approach it..  Axiom 1: A→(B→A).  Axiom 2: (A→(B→C))→((A→B)→(A→C)).  Axiom 3: (¬B→¬A)→((¬B→A)→B).  To clarify: A, B, C, α, and β are propositions (i.e. assigned True or False). → and ¬ have the standard logical meanings.


In a photo caption, if we use the elliptical 'My kids and me', would 'me' be correct, or would 'I' be correct? It seems as though it could go both ways.   [This is a picture of] 'My kids and me' or 'Me and the kids'.  Or,  'My kids and I' [are in this picture]  Which is the correct choice -- 'me' or 'I' in these elliptical constructions?  Thank you


Domain name help with Active Directory and DNS

I want to install Active directory on my server so that i can have centralized user authetication.  I don't know much about about AD but i am reading stuff.  I am also reading about DNS servers.  Now in every subject they talk about domain name. Now i am confused what domain name they are talking bout.   is there any website domain name i have to type here or what.  If i type any name then it says can't connect to that.  How can i find what domain name i have to type while doing the DNS or AD


Downvoting or Voting to Close without leaving a comment

Since some time I encountered that people quickly are downvoting or voting to close on questions I pose without leaving any comment. Of course I'm adressing them in the hope to resolve the problem however mostly nothing comes back. But since some time this become already way to much. What should I do?


How to divide up utilities when one tenant's rent includes utilities, but others' don't?

This is an extension of my question asked .  Four roommates are living together. Two are co-tenants, who hold the lease, and the other two sublet from the co-tenants and pay rent and utilities to one of the co-tenants. Subtenant A has an agreement that utilities are included in his rent and do not need to be paid separately. Subtenant B is responsible for utilities as normal.  Does subtenant B pay 1/3 of the utilities, or 1/4?


I just started to learn LaTeX, and I have to do some documentation with it.  However, the guy editing the TeX manuscript of the documentation before me didn't pay attention to word wrapping, so long lines aren't wrapped at all at the moment.  What is the best way to do auto-word-wrap (based on the margin, if possible)?  Improve/Edit: I use verbatim, and the word wrap I mean is the output-file


PHP Remove dupllicate array value which is a date

I have an array,  `Array ( [0] => 2019-08-02 [1] => 2019-08-02 [2] => 2019-08-03 )`   I need to remove duplicates from this array.I tried converting strtotime and compared But not getting result.  Please help  Regards, Rekha


Ubuntu for Windows 10: All files are own by root and I cannot change it

so I installed this Windows 10 feature since I miss the terminal/bash available on OS X.  One quirk I noticed is that all the files in my data drive (separate HDD from my OS drive) are owned by root. I tried changing ownership to my user (via chown -R my-user-here:root /mnt/d/my-stuff/*) but nothing happens.  I ran   ls -la   and the ownership hasn't changed.  Any way of fixing this?  Thanks


How do I upgrade a 15.10 Wily Werewolf machine directly to 16.10 Yakkety Yak?

My Ubuntu 15.10 system only reminds me to install Ubuntu 16.04, but I wish to install 16.10 version.  How could I upgrade to 16.10 directly?


Resouce id is showing error and i dont know what wrong i have done  this is main java file  the line myWebView = (WebView) findViewById(R.id.webView); is showing error and if i changed the id to something else app is crashing in emulator and also in physical device  and its not about null pointer the user marked it as a duplicate i would request u to please improve your knowledge(no offence)    package com.piyush.gangatechnicalcampus;  import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.webkit.WebSettings; import android.webkit.WebView; import android.webkit.WebViewClient;   public class MainActivity extends AppCompatActivity {     private WebView myWebView;      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_main);         myWebView = (WebView) findViewById(R.id.webView);         WebSettings webSettings = myWebView.getSettings();         webSettings.setJavaScriptEnabled(true);         myWebView.loadUrl("http://www.easyonlineconverter.com");         myWebView.setWebViewClient(new WebViewClient());     }      @Override     public void onBackPressed() {         if (myWebView.canGoBack()) {             myWebView.goBack();         } else {             super.onBackPressed();         }     } }   here is the activity_main.xml  <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"     xmlns:tools="http://schemas.android.com/tools"     android:id="@+id/activity_main"     android:layout_width="match_parent"     android:layout_height="match_parent"     tools:context="com.piyush.gangatechnicalcampus.MainActivity">      <WebView         android:layout_width="fill_parent"         android:layout_height="fill_parent"         android:layout_alignParentTop="true"         android:layout_alignParentStart="true" >          <WebView             android:layout_width="fill_parent"             android:layout_height="match_parent"             android:layout_alignParentTop="true"             android:layout_alignParentStart="true"             tools:ignore="ObsoleteLayoutParam" />     </WebView> </RelativeLayout>   and this is AndroidMainfest.xml  <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android"     package="com.piyush.gangatechnicalcampus">     <uses-permission android:name="android.permission.INTERNET" ></uses-permission>     <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>     <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"></uses-permission>     <application         android:allowBackup="true"         android:icon="@mipmap/ic_launcher"         android:label="@string/app_name"         android:supportsRtl="true"         android:theme="@style/AppTheme">         <activity android:name=".MainActivity">             <intent-filter>                 <action android:name="android.intent.action.MAIN" />                  <category android:name="android.intent.category.LAUNCHER" />             </intent-filter>         </activity>     </application>      <menu xmlns:android="http://schemas.android.com/apk/res/android"         xmlns:app="http://schemas.android.com/apk/res-auto"         xmlns:tools="http://schemas.android.com/tools" tools:context=".MainActivity">         <item android:id="@+id/action_settings" android:title="@string/action_settings"             android:orderInCategory="100" app:showAsAction="never" />     </menu>  </manifest>


how to press keyboard with Jquery/ Javascript

I am new to development, I wanna know is there method to call/trigger key event using any frontend programs.


Write number with + before it if it is positive

I need to write numbers to the console with their signs. I mean if the number that I want to write is negative, there is no problem because the number will have the minus before it, but if it is positive, it will not appear like "+some_value", it will appear like "some_walue". I want the sign to be allways visible, and I'm wondering if it is a function which do this easyer. Sorry for my english...


Find all functions $f: \mathbb{R} \rightarrow \mathbb {R}$ such that $f(x+y)+f(x-y)=2f(x)\cos y$(*) for any x,y real numbers  my attempts: for $x=y=\frac{2\pi}{3}$ in the (*): $f(\frac{2\pi}{3})+f(0)=f(\frac{\pi}{3})$(1) now for $x=0$ and $y=\frac{\pi}{3}$ in the ( *) then $f(\frac{\pi}{3})+f(-\frac{\pi}{3})=f(0)$(2)  (1)+(2) it results that $f(\frac{2\pi}{3})=-f(\frac{\pi}{3})$  now for $x=y=\frac{\pi}{3}$ in the (*) we have $f(\frac{2\pi}{3})+f(0)=f(\frac{\pi}{3})$ so $f(0)=2f(\frac{\pi}{3})$ and also $f(\frac{\pi}{3})=f(-\frac{\pi}{3})$ i dont know if f is a odd function but i have discovered any points with that property $f(x)=f(-x)$ but i dont know how to prove it in general for any x.I don't have any ideas from here.Also i think that the parity of function $cos$ it's important to solve the functional equation.


Jquery dblClick() doesnt work with dynamically added elemnets

Looking to add some functionality when users double click on a div to pop up a box. I already have the pop-up functionality which works with inline onClick(). But I would like to change this to double click.   I have tried the following which will work if invoked after an element is added.   $(".dz-preview").dblclick(function() {     console.log("inside dbl");     renameFile(this); });   But I cant seem to figure out how to get it to work on dynamically generated elemenets.


ArcMap toolbars always stacking up instead of remaining where placed when opening MXD on multi-monitor configurations?

In ArcMap 9.3, we had issues with our toolbars always stacking up instead of remaining where they were placed.  This was mainly an issue on dual monitor workstations and we would occasionally see the issue on a single monitor workstation.  When we reported the issue to Esri, they said it was a known bug: NIM003161.  I won't have an opportunity to install ArcGIS 10 on a dual monitor workstation for a couple of months and I was wondering what the user experience is when opening saved MXDs on dual (or triple) monitor workstations.    Are toolbars staying put?  I looked up bug #NIM003161 and its status is on-hold and last modified on March 25, 2010 and the version fixed is still blank.  That part worries me a little, but I'm hoping Esri just hasn't gotten around to updating that bug.


Few Problems after installing Ubuntu 12.04

i tried ubuntu last year, all was working fine, there was no lag, and now again i was trying and downloaded official latest lte ubuntu 12.04 there are few problems im facing are,  1. Lagy animations: last year when i installed there wasn’t lag but today i installed again latest version is having lag while animations like minimise,etc..    i even installed latest drivers, my pc config is Intel i5 2310, 8 gb ram ddr3, Ati 6870 1gb ddr5, drivers are installed..   Ubuntu Logo bug(simple text): i installed ubuntu on W7 using Wubi, after install successful, first boot there was logo before login screen, like small UBUNTU with shining etc, i liked it, so, then i updated my Ubuntu it takes hour and after restart i lost that Nice Logo, now there is only a txt written like Ubuntu 12.04 not a pic, these things i dont like about ubuntu... GPU info not correct: i installed my GPU drivers, but when i see Info from settings>Details>Graphics i see there is " VESA: BARTS " written on Drivers and Standard.. there must written Ati 6870 blabla.   These are the problems i am facing, Please help me and give me chance to enjoy Ubuntu xD Thanks in Advance...


Remove width and height from img tag in Drupal output (for certain content type)

I want to remove width and height properties from img tags in certain content type  Currently it show's like this     but I want


What is the difference between "should" and "must"?  e.g. "They should have called the police." Can I use "must" in that sentence or not?  e.g. "You should read his new book." How about this sentence?


Can someone explain the structure of the following sentence?     Not till he got home did he realise that he had lost his mobile.   Why we are doing inversion here ?


When I updated my windows laptop, long ago, from 8.1 to 10 I have since then always 2 operating systems 8.1 and 10 which means Windows 8.1 has its own folder on C drive named as Windows.old.  Now I decided to delete the old windows, so according to many websites it is just about deleting the folder like any other folder with granting the permission to the current user which I tried. However, I couldn't ever delete it as it prompts always permission is needed or access denied even when trying to open explorer with admin permission or even when trying to do the deletion using cmd with admin permission too!  How could I delete the folder then, could you suggest some methods please?  NOTE: I tried also to log-in in safe mode but didn't worked too.


I am working with the OpenLayers plugin. I need to project the satellite data with respect to vector data shapefile I have.  For that Andre Joost suggested to create vector grid with vector data reference system. The new problem is when I change the coordinate system to degree minutes seconds the coordinate system does not changes and it shows only the coordinates in meters itself.   What is the mistake I have made?


I've a command in the ~/.local/bin/ path (lets call it dog). Calling the command with the full path ~/.local/bin/dog works as expected .  When I do which dog I get the expected ~/.local/bin/dog. When I check the $PATH ~/.local/bin is there as it should (actually it is /home/ec2-user/.local/bin)  But if simply type dog I get the following error:  -bash: /usr/local/bin/dog: No such file or directory  The output for type dog is dog is hashed (/usr/local/bin/dog) But for type -a dog is dog is /home/ec2-user/.local/bin/dog  Ideas?


How can I use a file in a command and redirect output to the same file without truncating it?

cat package.yaml > package.yaml   The above will truncate package.yaml, and hence the file will be empty - cat will have empty output.  How can I avoid truncating the file? Is there an alternative to using a temporary file? A variable maybe?


Why are the Degrees of Freedom for multiple regression n - k - 1? For linear regression, why is it n - 2?

I'm reading a textbook and I see this question:    So there are 200 women, and the DF is 196, implying that the equation for DF is $n - k - 1$. There are 3 variables: bp, age, and type so $k == 3$. What's the intuition behind this?  Also, why is the degrees of freedom for linear regression n - 2?


If $A \subseteq C$ and $B \subseteq D$ then $A \times B \subseteq C \times D$

Show that:  if $A \subseteq C\,$ and $\,B \subseteq D,\,$ then $\,A \times B \subseteq C \times D.$    Can anyone help me with this?


Are usb printer cables restricted by the same lengths as all other usb cables?

I want to place a 3D printer far away from a PC in a well ventilated location. The printer needs a PC connected for operating...but fumes are problem.  Moving it after setup just to print isn't an option because it would need to be reinitialized and calibrated...which it needs the PC connection for.  I'm not sure either if the data a printer sends is considered high speed or low speed, which, it sounds like is the factor affecting length restrictions of usb cables in general.  Also I was wondering if the cable length limitations are affected at all by what usb version it is...usb 2 versus 3.  Is 3 considered high speed?  Is 2 regular speed?  If the lengths vary by usb version (2 vs 3), and 3 had longer potential, could I swap the 2.0 cable the printer came with for a 3.0 and would that affect the printers ability to recieve the correct data from the PC?


it is of + noun - What does this OF mean?

Nina: Ky, look at this photo! It's of a dinner my parents went to called 'Dinner in the Sky'. Ky: Cool! The restaurant is so high above the ground!  What does this OF a dinner mean? Can I say 'It's a dinner my ...'? Is there any difference if OF added?


Is there any rules for choosing the two primes that's used in generating RSA keys?

So I want to ask is there any rules for choosing the two primes that's used to generaten in RSA? I mean clearly you can't choose 2 and another super big number, so I want to ask is there any restrictions like those two primes must >=2^(key_length-2) or something like that? (Supposing RSA is also using the first but to identify positive/negative.)  Also is there a restriction that requires n be bigger than a number, or otherwise you can also fill 0s at the beginning of a number and let it matches the bit length.   Or is there anything that though isn't consider as restrictions, but are recommended and been used in most situations?


Command Options on Command Line - Details and Functions?

I can see there are a lot of command line options in Ubuntu.  For example: the -l and -v options in sudo fdisk -l and sudo shred /dev/sdb1 -v .  Does anyone know where I can find all of the options with their functions?  I've used many commands, these make sense, but the commands' options do not. I would like to know about them.


How do I delete Notes.app on my macOS Catalina?

I've tried using chmod to modify permissions but I keep getting back "chmod: Unable to change file mode on Notes.app: Operation not permitted"  Anyone have any ideas?   Excluding it from Alfred search would also be a solution! I don't want to allow myself to use Notes.


Open Source Communities should get "Sponsored" Tags

Currently "sponsored" tags are only available for tags in which a sponsor has ponied up cash for.  Since most open source communities cannot afford or justify the expense of purchasing a "sponsored" tag, I propose that each eligible open source community should receive a free sponsored tag among those relating to their project.  Eligible projects would include, but not be limited to Python, PHP, Java, HTML5, Drupal, etc….  I  regarding the use of Java's BSD licensed Duke mascot since Java is curated by the OpenJDK project and was pointed here to sort out the general case.  I do realize some projects do have corporate sponsors behind them, such as Oracle to Java; however I believe these types of projects have more community momentum and would continue even without the corporate backer. Other projects depend on the corporate backer for momentum, such as IIS, Oracle DB, etc.  However I contest it's very commonplace for products sold by companies to be given gratis to open source communities and projects, as a way of giving back to the FLOSS communities (as it's challenging to find any software that is not based on or influenced by the hard work of the FLOSS movement). I see no difference here -- if Microsoft wants to "sponsor" the IE tag, they can since it's a proprietary for-profit product. But if Apache wants to sponsor the httpd tag, they should receive it gratis since its a free open source project anyone may use.


Evaluate the integral $\int\int _{[0,1]^2} \max \left\{x,y\right\} dx\, dy$

Find the integral   $$\int\int _{[0,1] \times[0,1]} \max \left\{x,y\right\} dx \,dy$$


I don't understand what is within the brackets of some sample code

I have a simple two lines of code but fail to understand what is actually happening.       s = 'We\'re' + 'Here'     print(s[4::2])   The result is just eee. I fail to see how the [4::2] is working to cause the code to print eee.


Confused with the python results after using some function

I have some problem here. Please look at my code and I don't know what's wrong in the code. It is simple but the results are confusing me. I attached the code below.  import numpy as np import matplotlib.pyplot as plt  def S(xc):     N=len(xc)     r=0.0     s=0.0      # calculation quartile     for m in range(0,N-1):         for n in range(m+1,N):             if (xc[m] > xc[n]):                 q=xc[m]                 xc[m]=xc[n]                 xc[n]=q      if (N % 4 < 2):         q=(xc[N-N/4-1] + xc[N-N/4])*0.5-(xc[N/4-1]+xc[N/4])*0.5     else:         q=xc[N-N/4-1]-xc[N/4]      #calculation standard deviation      for m in range(0,N):         r+=xc[m]         s+=xc[m]*xc[m]     r=np.sqrt(s/N-(r/N)*(r/N))      #calculation     if (q<r):         s=q     else:         s=r     hasil=0.9*(s/1.34)*pow(N,-0.2)     return hasil  fc=0.3 fm=0.02 mu=1 Nsim=10   bb=[] for nn in range(0,Nsim):     bb.append((1+(mu*np.cos(2*np.pi*fm*nn)))*np.cos(2*np.pi*fc*nn))  print bb print S(bb) print bb   The code works while I just delete the function of "S" in the main function, however, after the "S" function, the data on variable "bb" was different even though I just print the same variable. I don't understand what happened.  I appreciate your help. Thanks a lot  Alvin


Java regex: select from a set of characters

I am parsing text and need to detect if any string contains any character NOT including A-Z, 0-9, full stop, comma, plus, minus, or any number of spaces.  I tried the regex expression: "[^A-Z0-9][^.][^,][^-][^+][\S+]"  as well as variations on this, which does not work correctly.  Examples of permissible strings:  1 23842U 96021A   15170.20596865  .00000124  00000-0  00000+0 0  9998 2 23842   0.0589 306.1344 0002868 147.0577 292.5546  1.00269795 70198   Invalid string:  1 2%8!2U 96021A   15170.20596865  .00000124  ^00000-0  00000+0 0  9998


Find modulus of $\frac{|z_1-z_2|}{|1-(z_1)(\overline{z_2})|}$

If $z_1$ and $z_2$ are two different complex numbers and $\lvert z_1\rvert=1 $ then find  $$ \frac{\lvert z_1-z_2 \rvert}{\lvert 1-z_1\bar{z_2} \rvert} $$


How to achieve "Open cmd.exe here" in Windows context menu to "Run as Administrator"?

I found a way how to add a context menu, when I right click in a Windows explorer, to open command line in a current directory.  It is sufficient to create two Windows registry entries:  HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt e.g. with value "Open CMD here..." and HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\command with value  "cmd.exe /k cd /d %1"  or simple creating a file cmd.reg and executing it:  Windows Registry Editor Version 5.00  [HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt] @="Open CMD here..."  [HKEY_CLASSES_ROOT\Directory\shell\CommandPrompt\command] @="cmd.exe /k cd /d %1"   But how can I achieve the same thing, which will force cmd.exe to "Run as Administrator"?


Passing the output of a command to another in one line

I want to take a screenshot with import, and save it into a file whose name is current time.  Here is what I've tried:  sunqingyao:~$ date '+screenshot-%y%m%d-%H%M%S.png' screenshot-170716-173336.png # OK  sunqingyao:~$ import screenshot-170716-173336.png sunqingyao:~$ ls -l screenshot-170716-173336.png  -rw-rw-r-- 1 sunqingyao sunqingyao 250556 Jul 16 17:35 screenshot-170716-173336.png # OK  sunqingyao:~$ date '+screenshot-%y%m%d-%H%M%S.png' | import import: missing an image filename `import' @ error/import.c/ImportImageCommand/1293. # Not OK   For some reason, I want this command to be a one-liner.  Background info:  Actually I'm trying to bind a key to screenshot taking with i3. Here is the relevant part of my ~/.config/i3/config:  # Take a screenshot upon pressing $mod+x (select an area) # https://i3wm.org/docs/userguide.html#keybindings bindsym --release $mod+x exec --no-startup-id date '+screenshot-%y%m%d-%H%M%S.png' | import   Seems that I can only bind a key to a command that can fit in only one line, which is why a one-liner is required.


Prove $4^{n} -1$ is divisible by $3$ for all $n\geq1$

I'm doing some homework and cant seem to get my head around this inductive proof.   So far I have got:  Atom case: $4^1 -1 = 3$, so proved for basic case.  Closure:  Assume $4^k - 1$ is divisible by $3$, Show that $4^{k+1} -1$ is divisible by $3$.  So: $4^k-1 = 4^k\cdot4 -1$ but this is where I get stuck, unsure where to go from here.  Any help much appreciated!  Thanks


How can I randomly choose a number from a list of given numbers in Java?  I have only these 5 numbers: 1000, 2000, 3000, 4000, 5000  Now I have to select any one number from this set of numbers randomly.  My code to try this  int ar[] = new int[4]; ar[0] = 1000; ar[1] = 2000; ar[2] = 3000; ar[4] = 4000;  int randomArrayIndex = num.nextInt(ar.length);


I'm trying to draw a Venn diagram for the intersection of {A n B n C} using tikz. Where A: politician, B: lying, C: wicked.   Here's what I have so far but I can't sort the shading out! Any help would be great!  \def\firstcircle{(90:1.75cm) circle (2.5cm)}   \def\secondcircle{(210:1.75cm) circle (2.5cm)}   \def\thirdcircle{(330:1.75cm) circle (2.5cm)}     \begin{tikzpicture}       \begin{scope}     \clip \firstcircle \secondcircle;     \fill[cyan] \thirdcircle;       \end{scope}       \begin{scope}     \clip \thirdcircle \secondcircle;     \fill[cyan] \firstcircle;       \end{scope}       \begin{scope}     \clip \thirdcircle \firstcircle \secondcircle;     \fill[cyan] \secondcircle;       \end{scope}       \draw \firstcircle node[text=black,above] {$Politician$};       \draw \secondcircle node [text=black,below left] {$Lying$};       \draw \thirdcircle node [text=black,below right] {$Wicked$};     \end{tikzpicture}     On a side note, if anyone has any good documents on learning tikz please let me know! Thank you!


I'd like to install java runtime but it just does Reading package lists...   Error! E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/repo.steampowered.com_steam_dists_precise_steam_i18n_Translation-en E: The package lists or status file could not be parsed or opened.


Ubuntu 20.04 cannot install Steam because of broken packages

So, when I installed Ubuntu 20.04 LTS onto my PC firstly I removed Nautilus (Because I prefer to use Nemo) and after this action my system has a lot of broken files that can't be removed (I tried and it's said that I have more and more broken files) and the command sudo apt install -f doesn't work at all. How can I fix it? I cannot install even Steam now also my system is up to date! PS. aptitude doesn't work as well as apt. sudo apt install steam sudo password for lambleeg: Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  steam:i386 : Depends: libgl1-mesa-dri:i386 (>= 17.3) but it is not going to be installed or                        libtxc-dxtn0:i386 but it is not installable               Depends: libgl1-mesa-dri:i386 but it is not going to be installed               Depends: libgl1-mesa-glx:i386 but it is not going to be installed               Depends: libudev1:i386 but  but it is not going to be installed E: Unable to correct problems, you have held broken packages.


How to get remote host DNS address from a super-slim host (docker) without ping or bind-utils?

How do I get a remote host IP address if I don't have ping, and don't have any bind utilities like dig, nslookup, etc?  I need an answer that does not include 'install X' or 'use sidecar container'. I am looking for something that relies on nothing more than bash and the basic shell commands.


As last seen, the Dursleys are forced to move by the ministry of magic, put into protective custody by the ministry. However, the ministry fell only a few weeks later, and there was evidence that it couldn't be trusted, even then. Are they still alive, and if so, how did they survive the purge from the ministry?


Intermediate subfields of $\mathbb{Q}(\sqrt[4]{2}, i)/\mathbb{Q}$

A similar question was asked here but never received an answer: . Forgive me if posting a new question is not the correct way to ask this question.  Set $G = \text{Gal}(\mathbb{Q}(\sqrt[4]{2}, i)/\mathbb{Q})$ and let $\sigma, \tau \in G$ such that $\sigma : \sqrt[4]{2} \mapsto i\sqrt[4]{2}, i \mapsto i$ and $\tau: \sqrt[4]{2} \mapsto \sqrt[4]{2}, i \mapsto -i$.  It is clear to me that $G = \langle \sigma, \tau \mid \sigma^4 = \tau^2 = 1, \sigma\tau = \tau\sigma^{-1} \rangle \cong D_8$.  There are eight non trivial subgroups of $G$, three of which have index $2$ in $G$ and five of which have index $4$ in $G$.  I can easily compute the fixed fields corresponding to six of these subgroups but finding the fixed fields of the remaining two is giving me quite a bit of trouble.  The two subgroups which I am battling with are $\langle \tau\sigma \rangle$ and $\langle \tau\sigma^3 \rangle$ both of which have index four in $G$ so I am looking for fixed fields of degree $4$ over $\mathbb{Q}$. I also know that these two subgroups are contained in $\langle \tau\sigma, \sigma^2 \rangle$ so the fixed fields I am looking for must contain the degree $2$ extension $\mathbb{Q}(i\sqrt{2})$ being that this is the fixed field of $\langle \tau\sigma, \sigma^2 \rangle$.  Any hints of how I may proceed to find these fixed fields?


I'm writing a paper, please can you tell me which sentence is the right?   The Pseudo-code is outlined in Fig 2 and we elaborate it in the following section.  The Pseudo-code is outlined in Fig 2 and we elaborate on it in the following section.


Polish letter disappears when striked out with soul package

I am trying to typeset something in Polish. Unfortunately one letter mysteriously disappears - but only when it is the last in a word. When I add a character ('a' in the example below) right after the missing one, it shows up again. Can someone explain that?  Here is the code:  \documentclass[12pt, a4paper]{article} \usepackage{polski} \usepackage{xltxtra} \setlength\parindent{0pt} \usepackage{soul}  \begin{document} Wnoszę o głosowanie\\ Wnoszęa o głosowanie\\  \st{Wnoszę o głosowanie}\\ \st{Wnoszęa o głosowanie}\\   \end{document}


i usually shot portraits with my 60D and tamron 17-50mm f2.8 using maximum resolution JPEG + RAW @ 5184 x 3456 pixels. after recent photoshoot, i tried to print an 8R using this particular setting and the result were dissapointing in my case (lack of details, seems stretched etc..) i wonder what is the proper way to print a large picture over 16x20" and 20x30"?   thanks


Part of feature belongs to wrong feature

Is there a quick way (without having to create new layers) to make the island circled in the bottom left a part of central america (dark blue) rather than a -part of Central France (yellow)?


How to upgrade Ubuntu release 19.10 to 20.04 LTS?

I would like to upgrade my Ubuntu release 19.10 to 20.04 LTS. How can I do this? I tried the software update and upgrade, but that would just upgrade my packages.


In the Wikipedia article for Freemasonry, it gave a picture regarding the emblem of the Freemasons:    The caption below reads:     The Masonic Square and Compasses.   (Found with or without the letter G)   Just wondering, is "Compasses" correct? Shouldn't it be compass? I looked this up on several dictionaries, and I don't seem to find "compasses" when referring to a tool for drawing circles, only "compass". However, "compasses" makes sense, as it looks something similar to "scissors".  Should it be "compass" or "compasses"?


What makes a DSLR better than a Point & Shoot?

Why should I put up with the inconvenience of lugging around a DSLR?  They look cool, but is there more substance to it?


Hexadecapole potential using point particles?

We can get monopole $1/r$, dipole $1/r^2$, quadrupole $1/r^3$ and octupole $1/r^4$ potential falloff by placing opposite point charges at the corners of a point, line, square and cube, respectively. My book cryptically says "and so on", how does one get a $1/r^5$ and higher potential falloff with a finite number of point-charges in 3 dimensions?


I load a PHP code into a div:  $(".loader").click(function(e) {     event.preventDefault();      $("#content").load($(this).attr("href")); });    in the target code there's some html5 stuff, i.e.:

         Upload

         <input type="file" class="custom-file-input" id="inputFwFile" aria-describedby="inputFwFile">         Choose file

   and in my js file I want to catch some events:  $("#inputFwFile").change(function(e) {     console.log(e.target.files); });   Please note all the jQuery functions are wrapped into $("document").ready(function() ... statement. The code above works if the html snippet is placed into the main page (index.php). Instead, when loaded into its div content doesn't execute the change event anymore.  Perhaps it's because when the dom is ready the specific #intputFwFile doesn't exist yet? Any way to fix?  UPDATE  After reading the comment I tried this:  index.php                                      file

   index.js  $("document").ready(function() {     $(".loader").click(function(e) {         event.preventDefault();          $("#content").load($(this).attr("href"));     });  });   file.php

                 Upload

                 <input type="file" class="custom-file-input" id="inputFwFile" aria-describedby="inputFwFile">                 Choose file

             but still the change function is not executed even if it's in the same file of the requested element and the script runs when the document has loaded.  Why?