How can I expand the variable inside this sed expression?

I have a text file like this:  melon = [2 2 4 5]; apple = [3 6 4 4]; lemon = [1 5 4 8];   And I want to make a function that reads a named variable into a bash array. This is what I came up with - that doesn't work since the variable $FruitToParse doesn't get expanded:  #!/bin/bash set -e set -u  function file_to_array {     local FileToParse=${1}     local FruitToParse=${2}      for i in `cat ${FileToParse} | sed -n -e 's/.*${FruitToParse} = \[\(.*\)\];/\1/p'`); do         echo ${i}     done     }  file_to_array fruits.txt apple


Create a Minecraft Item that Executes a Command

I am using creative mode to tag Minecraft villagers as an adult or child.  Here is the code I am using:  /data merge entity @e[type=villager,limit=1,sort=nearest] {Tags:["child"]}  /data merge entity @e[type=villager,limit=1,sort=nearest] {Tags:["adult"]}  However, I want players in survival mode to be able to add these data tags to villagers. Can I create an item that, when right clicked, will execute one of these commands? I think I may need to use a carrot on a stick (since it can detect a right click) but I am not certain. Ideally, I would like to use two sticks: one called "child age wand" and the other called "adult age wand." How would I do this?


How can I measure voltage up to 120V in an Arduino?

I'm a beginner in electronics world, I've developed things before but not so sofisticated. Now I have to create a prototype and I need to measure voltages up to 120V. I've seen there are sensors that can do this job but they're only capable to measure 5-25V. Is there any way I can transform voltage from 5-120V to 5-25? I need to know when there's a change in voltage. Or any other idea that could help me? I explain: my controller will have storaged the voltage when there's a device plugged-in and it's working, I need to find the way to measure this voltage so I'll be able to storage it dynamicly and compare this storaged value to the actual so I'll know when the device plugged-in is ON or OFF. I appreciate your attention, thanks.


Changing the value of an element in a list of structs

I have a list of structs and I want to change one element. For example :  MyList.Add(new MyStruct("john"); MyList.Add(new MyStruct("peter");   Now I want to change one element:  MyList[1].Name = "bob"   However, whenever I try and do this I get the following error:     Cannot modify the return value of   System.Collections.Generic.List.this[int]‘ because it is not   a variable   If I use a list of classes, the problem doesn't occur.  I guess the answer has to do with structs being a value type.  So, if I have a list of structs should I treat them as read-only? If I need to change elements in a list then I should use classes and not structs?


Cannot wget a direct link - received 403 Forbidden

I have a direct link that I grabbed from Firefox's Download section after downloading the file. I can plug this link into any browser whether I previously logged in to OneDrive Business or not and I get the file.  I can see this in the output: Access+denied.+Before+opening+files+in+this+location%2c+you+must+first+browse+to+the+web+site+and+select+the+option+to+login+automatically. but I don't understand why when I can use the link in private browser sessions with no prior cookies.  For some reason, I am unable to get the file using wget with the same link:  :~$ wget -d "https://[PATH].sharepoint.com/personal/[USER]_[PATH]_com/_layouts/15/download.aspx?SourceUrl=%2Fpersonal%2F[USER]%5F[PATH]%5Fcom%2FDocuments%2FShared%20with%20Everyone%2F[PATH]%2F[PATH]%5F[PATH]%2Etar%2Egz" DEBUG output created by Wget 1.17.1 on linux-gnu.  Reading HSTS entries from /home/[USER]/.wget-hsts URI encoding = ‘UTF-8’ --2017-07-20 16:16:29--  https://[PATH].sharepoint.com/personal/[USER]_[PATH]_com/_layouts/15/download.aspx?SourceUrl=%2Fpersonal%2F[USER]%5F[PATH]%5Fcom%2FDocuments%2FShared%20with%20Everyone%2F[PATH]%2F[PATH]%5F[PATH]%2Etar%2Egz Resolving [PATH].sharepoint.com ([PATH].sharepoint.com)... [IP] Caching [PATH].sharepoint.com => [IP] Connecting to [PATH].sharepoint.com ([PATH].sharepoint.com)|[IP]|:443... connected. Created socket 3. Releasing 0x0000563fdf6db010 (new refcount 1). Initiating SSL handshake. Handshake successful; connected socket 3 to SSL handle 0x0000563fdf6dbff0 certificate:   subject: CN=*.sharepoint.com,OU=Microsoft Corporation,O=Microsoft Corporation,L=Redmond,ST=WA,C=US   issuer:  CN=Microsoft IT SSL SHA2,OU=Microsoft IT,O=Microsoft Corporation,L=Redmond,ST=Washington,C=US X509 certificate successfully verified and matches host [PATH].sharepoint.com  ---request begin--- GET /personal/[USER]_[PATH]_com/_layouts/15/download.aspx?SourceUrl=%2Fpersonal%2F[USER]%5F[PATH]%5Fcom%2FDocuments%2FShared%20with%20Everyone%2F[PATH]%2F[PATH]%5F[PATH]%2Etar%2Egz HTTP/1.1 User-Agent: Wget/1.17.1 (linux-gnu) //Accept: */* Accept-Encoding: identity Host: [PATH].sharepoint.com Connection: Keep-Alive  ---request end--- HTTP request sent, awaiting response...  ---response begin--- HTTP/1.1 403 Forbidden Content-Length: 13 Content-Type: text/plain; charset=utf-8 Server: Microsoft-IIS/10.0 P3P: CP="ALL IND DSP COR ADM CONo CUR CUSo IVAo IVDo PSA PSD TAI TELo OUR SAMo CNT COM INT NAV ONL PHY PRE PUR UNI" X-SharePointHealthScore: 0 X-Forms_Based_Auth_Required: https://[PATH].sharepoint.com/_forms/default.aspx?ReturnUrl=/_layouts/15/error.aspx&Source=%2f_layouts%2f15%2fdownload.aspx%3fSourceUrl%3d%252Fpersonal%252F[USER]%255F[PATH]%255Fcom%252FDocuments%252FShared%2520with%2520Everyone%252F[PATH]%252F[PATH]%255F[PATH]%252Etar%252Egz X-Forms_Based_Auth_Return_Url: https://[PATH].sharepoint.com/_layouts/15/error.aspx X-MSDAVEXT_Error: 917656; Access+denied.+Before+opening+files+in+this+location%2c+you+must+first+browse+to+the+web+site+and+select+the+option+to+login+automatically. SPRequestGuid: [ID] request-id: [ID] Strict-Transport-Security: max-age=31536000 X-FRAME-OPTIONS: SAMEORIGIN SPRequestDuration: 90 SPIisLatency: 3 X-IDCRL_AUTH_PARAMS_V1: IDCRL Type="BPOSIDCRL", EndPoint="/personal/[USER]_[PATH]_com/_vti_bin/idcrl.svc/", RootDomain="sharepoint.com", Policy="MBI" X-Powered-By: ASP.NET MicrosoftSharePointTeamServices: 16.0.0.6712 X-Content-Type-Options: nosniff X-MS-InvokeApp: 1; RequireReadOnly X-MSEdge-Ref: Ref A: [ID] Ref B: [ID] Ref C: 2017-07-20T20:16:28Z Date: Thu, 20 Jul 2017 20:16:27 GMT  ---response end--- 403 Forbidden Registered socket 3 for persistent reuse. Parsed Strict-Transport-Security max-age = 31536000, includeSubDomains = false Updated HSTS host: [PATH].sharepoint.com:443 (max-age: 31536000, includeSubdomains: false) URI content encoding = ‘utf-8’ Skipping 13 bytes of body: [403 FORBIDDEN] done. 2017-07-20 16:16:29 ERROR 403: Forbidden.  Saving HSTS entries to /home/[USER]/.wget-hsts


Array modifier is scaling objects for seemingly no reason

I'm somewhat new to blender (I've been using it for a few months but am still not fully comfortable with it). I'm trying to take a cylinder and duplicate it around an origin in a circular shape. I'm trying to get it to look something like this:    I looked up some tutorials on this, and they said to put an empty at the center of the rotation, and add an array modifier to the cylinder with "Object Offset" set to the empty. I did that, and instead of rotating around, the cylinders are getting scaled (it looks exponential). I'm not sure why this is happening. It's happened before but I wrote it off as some bad modifiers I applied earlier. But this is simply a cylinder and an empty. A screenshot of my setup and results is below:     It's kind of hard to see, but the empty is at the origin of the grid, inside the second smallest cylinder. The really small, thin cylinder is the one to which the modifier has been applied. Thanks!


Pagination custom category page template

I want to display product categories on separated pages. Should be 6 posts of 1 category on a page, and if we have more than 6 postings in this category, - so I want to display a pagination. I googled hours, tried a lot, but nothing was working. I used the blank theme "base" from themify.  The only thing I got to work is this:  <?php global $wp_query; $result = new WP_Query('cat=5'); $args_pagi = array( 'base' => add_query_arg( 'paged', '%#%' ), 'total' => $result->max_num_pages, 'current' => max( 1, get_query_var('paged') ) );  $args = array(         'orderby'        => 'post_date',         'order'            => 'DESC',         'category'        => '5',         'post_type'        => 'post',         'post_status'        => 'publish',         'posts_per_page'    => 6,         'paged'            => $paged,     );  $myposts = new WP_Query( $args ); foreach( $myposts->posts as $post ) : setup_postdata($post); ?>

<a href="<?php the_permalink() ?>"><?php the_title(); ?>

          <a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(array( 120,120 ), array( 'class' => 'recent-thumbs' )); ?>          <?php the_excerpt(); ?>
 <?php endforeach; ?>
 <?php echo paginate_links( $args_pagi);?>
    The problem is, the output was mixed by categories, - shows 5 posts of cat.5 and 1 of cat.7, shows four products of cat.7 on page 2 and two of cat.5. (there are 8 postings of cat.5 in db)  Under  /wp-admin "Reading", the setting is 6 posts per page.  What is wrong?


How to make a potion with the nausea and hunger effect, and be named “Rum” using Command block in MCPE

I’ve been making a role play map for me and my friends, the theme is pirates... so I want Rum. But I can’t figure out how to do it. I’ve googled and googled but all I’ve gotten are thing from Java edition that don’t work on PE (I’ve tried). Please help.   give @p potion 1 8201 {CustomPotionEffects:[{Id:9,Amplifier:5,Duration:1000}],display:{Name:Rum}}  (Just of Nausea effect)  I’ve tried not adding the name part and just rename it with an anvil but it still doesn’t give me the potion


In this function, when it is compared the lenght of the array it is used != operator and when it is comparing all elements of the array it is using !== operator. Why?!  Thx.  var a = [1,2,3]; var b = [2,3,4];  function equalArrays(a,b){           if(a.length != b.length) return false;     for(var i = 0; i < a.length; i++)         if(a[i] ==! b[i]) return false;     return true;   }


I have a right triangle △ABC with its right angle at C, and the altitude drawn to the hypotenuse.  I have code that should draw two right-angle marks at C and at the foot of the altitude.  The similar commands display slightly different right-angle marks.  The one at the foot of the altitude is correct.  The one at C is not perpendicular to side BC.  I have drawn a green line segment to illustrate this.  \documentclass{amsart} \usepackage{amsmath} \usepackage{amsfonts}  \usepackage{tikz} \usetikzlibrary{calc,intersections}  \usepackage{mathtools}  \begin{document}  \begin{tikzpicture}  %A right triangle is drawn. \path (0,0) coordinate (A) ({(1/4)*16},0) coordinate (B) ({(1/4)*12},{(1/4)*(4*sqrt(3))}) coordinate (C); \draw (A) -- (B) -- (C) -- cycle;  %The vertices are labeled. \node[anchor=north, inner sep=0, font=\footnotesize] at ($(A) +(0,-0.15)$){$A$}; \node[anchor=north, inner sep=0, font=\footnotesize] at ($(B) +(0,-0.15)$){$B$}; \node[anchor=south, inner sep=0, font=\footnotesize] at ($(C) +(0,0.15)$){$C$};  %A right-angle mark is drawn at C. \coordinate (U) at ($(C)!5mm!45:(A)$); \draw ($(A)!(U)!(C)$) -- (U) -- ($(B)!(U)!(C)$); \draw[green] let \p1=($(B)-(C)$), \n1={atan(\y1/\x1)} in (U) -- ($(U) +({\n1+180}:0.5)$); \draw[fill=green] ($(A)!(U)!(C)$) circle (1pt);   %The foot of the altitude is labeled F. \coordinate (F) at ({(1/4)*(12)},0); \draw[dashed] (F) -- (C);  %A right-angle mark is drawn at F. \coordinate (V) at ($(F)!3.25mm!-45:(A)$); \draw ($(A)!(V)!(B)$) -- (V) -- ($(C)!(V)!(F)$);  \end{tikzpicture} \end{document}


Why is the wave of a sound in a tube reversed?

Why does the blue wave when it reaches the edge of the open tube not follow its path instead it reverses red?


When requesting a donation, is it better to have a prefilled button or enter their own value?

A non-profit organization is selling tickets to an event. I suggested they add an opportunity to make a tax-deductible donation line along with the ticket purchase, like:     2 Tickets .... $45      Make a donation!      Your tax deductible donation blah blah      Suggested donation       [$10] [$20] [$50]   They liked the idea but insist that the buyer fill in a dollar amount instead of clicking the suggested amounts cause     Its not about what is easy. Its about stewardship of relationships and   this is not the place to make a formal "ask". We're simply offering   the opportunity in case they have the money or the inclination to   donate to us.   I don't understand their point. From a "sales" point of view, I would think being able to just click a button is more enticing while entering a value is just more work on the user's part.


I just want to know why we initialize object of a parent class and instantiate it with the child class instead of directly instantiating child class object.  Sample :  List<String> sampleList=new ArrayList<String>();   And Not   ArrayList<String> sampleList=new ArrayList<String>();


The racist remark is not only a careless utterance, it is also detrimental to the school's reputation.    Is it grammatically correct to use "it is also" after the comma, or do I need to use the structure "not only..., but also..."?


I've got a greek keyboard and enjoy typing the greek letters directly into the mathmode using the unicode-math package. Yet, unfortunately it seems as though there is at least one symbol that does not survive the inclusion of said package, and this symbol is \setminus; it just disappears whenever said package is being included.  I'm using XeLaTeX in order to compile my document.  EDIT: As requested by the commenter:  \documentclass[10pt,a4paper]{article}  \usepackage{amssymb}  \usepackage{fontspec} \usepackage{xunicode} \usepackage{polyglossia} \usepackage{xecyr} \usepackage{unicode-math}  \setdefaultlanguage{english}  \setmainfont{GentiumPlus}  \usepackage{amsmath} \usepackage{amsfonts} \title{Error demonstration}    \begin{document} \begin{equation*} A \setminus B \end{equation*} \end{document}


I am running a Minecraft 1.16.1 server with spigot and bukkit, I wanted to know if items despawn in minecraft servers, if they do, how much time is there, can you change it or stop it. Also if there is a way to find the coords of the last death of a player in a Minecraft server.


Some years ago, someone had shown me the formula (1). I have searched for its origin and for a proof. I wasn't able to get true origin of this formula but I was able to find out an elementary proof for it.  Since then, I'm interested in different approaches to find more formulae as (1).  What other formulas similar to ($1$) are known?  Two days ago, reading the book of Lewin "Polylogarithms and Associated Functions" I was able to find out formula (2).  $\displaystyle \dfrac{1}{3}C=\int_0^1 \dfrac{1}{x}\arctan\left(\dfrac{x(1-x)}{2-x}\right)dx\tag1$   $\displaystyle \dfrac{2}{5}C=\int_0^1 \dfrac{1}{x}\arctan\left(\dfrac{\sqrt{5}x(1-x)}{1+\sqrt{5}-\sqrt{5}x}\right)dx-\int_0^1 \dfrac{1}{x}\arctan\left(\dfrac{x(1-x)}{3+\sqrt{5}-x}\right)dx\tag2$   $C$ being the Catalan's constant.  I have a proof for both of these formulae.  My approach relies on the following identity:  For all real $x>1$,  $\displaystyle \int_0^1 \dfrac{1}{t} \arctan \left (\dfrac{t(1-t)}{\frac{x+1}{2}-t}\right) dt=\int_1^{\frac{\sqrt{x}+1}{\sqrt{x}-1}}\dfrac{\log(t)}{1+t^2}dt$


Why 2 ExecStart are needed in systemd override?

In the docker official doc (), to enable remote/tcp API access you use an override as follows:  /etc/systemd/system/docker.service.d/override.conf:  [Service] ExecStart= ExecStart=/usr/bin/dockerd -H fd:// -H tcp://0.0.0.0:2376   I followed the above and it works.  But why do we need 2 ExecStart? Does the 1st one serve any purpose?


Output of entity_metadata_wrapper does not dump to dsm()/dpm()

Given this code in a theme_preprocess_page($vars)..  $node = node_load($nid); $wrapper = entity_metadata_wrapper('node', $node); dsm($wrapper);   Why doesn't $wrapper produce a debug dump in dsm() or dsp()? I can get data using print_r. Can someone please explain this?


How to illustrate the wizard flow when some steps are optional?

I'm working on a wizard and have an issue about the flow illustration. I wan't to help the user as much as possible and think it would be confusing to make a flow with 6 steps where the last 3 is optional, - therefor i have the issue explained below:       The wizard have to include :   select columns Add filters  Select if you wan't to "View" "Export to Excel" or "Save" the report   If view:  Shows the report in the application  If Export to Excel: Opens an Excel document with the data   If saving:     3.a add name and discribtion      3.b Add excel template     3.c Maybe add subscribtions  How can i present the flow for users when Step 3. determines whether the remaining steps are shown?  How can i make a layout that shows where in the flow users are when you do not know how far they want to go?  Is there another way of doing it?


When I click on a pictures to view them they seem to look perfectly fine on my laptop, like this:    But when I open them in the picture viewer or any other editor the colors are getting distorted:    Is there a way I can recover the images I am pretty sure the problem was the card reader, but I have already deleted the images from CF card and I need to fix the already copied raw images. The image uploaded is JPEG. I have the same images in RAW format which are getting completely distorted because of the colors  My camera is a Canon 7D.


I saw a lot of posts about it all over the internet but i couldn't make it run as i wanted.  I have an input from the user of a path. If the user will type ~/Desktop/ for example i can't use $ans in grep and other commands because of the tilde.   here is an example of my code. the second line is my main problem right now.  read -p "Enter new path or type 'exit':   " ans file=`grep -x $ans ~/.Log`    Appreciate your help.


Pluralization issue on "Resolve 1 issues before posting": "issues" should be "issue"

Typo on "Resolve 1 issues before posting": issues should be issue.


Given the case I made two independent changes in one file: eg. added a new method and changed another method.  I often don't want to commit both changes as one commit, but as two independent commits.  On a git repository I would use the Interactive Mode of  to split the hunk into smaller ones:   git add --patch   What's the easiest way to do this with Subversion? (Maybe even using an Eclipse plug-in)  Update: In , Ryan calls it: “The Tangled Working Copy Problem.”


What is the benefit of an AT-AT walker over a conventional tank?

are used by the Empire in a manner that is tactically identical to how a modern day army would use a tank, in that they are used as shock armour with powerful main guns which will punch through entrenched positions. (No combined arms tactics were used in the Battle of Hoth, but that's a different question altogether)  However, AT-AT walkers have a number of (rather lethal) drawbacks and no advantages that I can see compared to tanks.    They have footpads in place of treads, which greatly increase their ground pressure, and which will cause them to easily sink as compared to treads They have a high center of gravity and can be easily tripped, which was exploited in the Battle of Hoth. (granted that this was canonically presented as an oversight, albeit a rather stupid one, since most martial arts strongly emphasise lowering your CG.) They are slower than a modern main battle tank despite their long legs, which one would normally expect to grant additional mobility (max speed 60km/h on flat terrain, compared to 72km/h on flat terrain for the ). This is exacerbated by the fact that AT-AT walkers are using fusion power cells as compared to diesel engines.   It would seem that it would make far more sense for the Empire to remove the legs and mount the main chassis on treads, which would make the vehicle far more effective. Why then, did they not do this? It clearly was not the case that imperial Engineers lacked imagination, as they did produce .   Possible answers which I find implausible as advantages:  1: AT-AT walkers are tall, and therefore have a surveying advantage over the battlefield / have a better vantage point to fire from  Orbital satellites can provide the observation, and in any case air/orbital support should always be called in, especially if fire support from above is required.


"Your system has run out of application memory." How is that possible?

macOS is regularly popping up a "Force Quit Applications" dialog:       Your system has run out of application memory.      To avoid problems with your computer, quit any applications you are not using.   How is that possible if there are only a few open apps?


How to find application's path from command line?

For example, I have git installed on my system. But I don't remember where I installed it, so which command is fit to find this out?


Multiple errors on dual booting Ubuntu 20.04 with Windows 10

I am a complete beginner and I am trying to dual boot Ubuntu 20.04 with Windows 10. I have already made a bootable USB. When I try to boot from USB and before coming to the Ubuntu installer GUI it boots to a black screen with multiple errors.  I am using an old HP Pavilion G6 laptop with an Intel i3 processor, 4GB RAM and an SSD.


Why can't I overwrite an array (which passed to another function)with a dynamically allocated array?

Here is the code I tried:      void check(char*, int); int main(){     int len;     char* str="stack over flow";     len=strlen(str);     check(str,len);     getch();     return 0; } void check(char* str,int len) {     char* arr;int i=0;     arr=(char*)malloc(sizeof(char)*len);     arr="over flow stack";     while(arr[i]!='')     {         str[i]=arr[i];//here the error is thrown         i++;     }     puts(str); }   when I tried to print back elements of arr into str I'm getting error.


How exactly does constexpr double Point::* coords[3] work?

So I've been looking at some stuff and found this thread  And this is the answer to the question #include <math.h>  struct Point {     double x;     double y;     double z; };  double dist(struct Point *p1, struct Point *p2) {     constexpr double Point::* coords[3] = {&Point::x, &Point::y, &Point::z};      double d2 = 0;     for (int i=0; i<3; i++) {         double d = p1->*coords[i] - p2->*coords[i];         d2 += d * d;     }     return sqrt(d2); }  Now my problem is that I have no idea what constexpr double Point::* coords[3] = {&Point::x, &Point::y, &Point::z};  is supposed to do... I understand that constexpr makes it a constant that is defined at compile time and double is obviously used because the struct contains doubles but the Point::* and the {&Point::x, &Point::y, &Point::z}; confuse me. First of all what is Point::*? I guess the * means it is a some kind of pointer but to what? And what are these addresses {&Point::x, &Point::y, &Point::z} ? What exactly does this entire expression define?


I'm user1 and I created the user.file file, so I'm the owner of this file. I would like to change the owner of this file with the chown command as follows:  $ chown user2 test.file chown: changing ownership of 'test.file': Operation not permitted   If I'm logged in as root the command work perfectly. Why can't I change the ownership when logged in as the file owner?


What quantum mechanical property allows for reflection?

What are the quantum circumstances that manifest reflection?  Also, to what precision does the wave reflect and is that verified or only speculated by model?


how to resize objects with resizing form using mouse

I am new to MFC and I am trying to change the size of my objects with respect to form. For this, I am using single document project and in View.cpp and MainFrm.cpp I have changed form size.    BOOL CMainFrame::PreCreateWindow(CREATESTRUCT& cs) {     if( !CFrameWnd::PreCreateWindow(cs) )         return FALSE;     // TODO: Modify the Window class or styles here by modifying     //  the CREATESTRUCT cs     cs.cx = 400;     cs.cy = 400;     return TRUE; }   and in View.cpp, I have fixed the initial size of screen as given below.  BOOL CDCDrawingView::PreCreateWindow(CREATESTRUCT& cs) {     // TODO: Modify the Window class or styles here by modifying     //  the CREATESTRUCT cs     cs.cx = 400;     //const wchar_t a = cs.cx;     width = cs.cx;     cs.cy = 400;      height = cs.cy;     return CView::PreCreateWindow(cs); }   Here comes the problem, I want to draw the objects and I want to change the size of those objects with respect to size of form by using mouse. The form is able to change its size but I dont know how to update the form coordinates. I have attached the initial form and and form after changing size by mouse. initial form is given below.  and form after changing size by mouse is given below.  could someone please tell me how to change the objects with resizing form? Thanks in advance.


Will a mobile phone charge faster if plugged into a USB 3.0 port

Will a phone(or any device for that matter) charge faster if it is plugged into a USB 3.0 port compared to a USB 2.0 port?  I know to assist charging you can turn features off(with flight mode) or even turn the phone off but if you need the USB 3.0 port for a device like a hard drive that will actually benefit from a faster connection then will the phone be slower on the USB 2 port?


How are Python dictionaries (builtin hashtables) implemented?

I was wondering how is the python dict (dictionary/hashtable) implemented. Particularly, if I write something like  my_dict = {"key": {"key: {"key": "value"}}}   what possibly does the python interpreter do? I want to know the internal working of it.  Does it treat each dictionary as an object (mostly yes)? If so, is the hashing same for same keys across different dictionaries? For e.g.  dict1 = {"key": "value", "k": "v"} dict2 = {"key": [1, 2.], "k": "value"}   How different would the look-up for the keys in these 2 distinct dicts be? Also, how does it decide the size of the buckets? Or is similar to the handling of list size? Hope you get my question. Thanks!  EDIT - No, I am not asking how hash-tables work. I know that part.


The Dutch GVB transportation features and all daypass for the .    I am strongly considering using it for transportation between the Rennaisance Hotel (near Centraal station) and the Rijksmuseum.  Is there an all-day transportation pass the includes both the trips from:   Schiphol to Centraal station and ?   Does said GVB day-pass include transportation between Airport and Central or is there a possible GVB daypass 'upgrade'?  Update: I need transportation from:    Schiphol to Central Station, check into hotel and then  Centraal to Rijksmusem (day visit) Rijks to Centraal  (return to hotel)


I need to acces a file (excel, txt) from onedrive

So until now I was testing the application using a local path to find the file that I try to work with string path = @"A:\Log\OLP_Application_Storage\call.bat"; try {     Process process = new Process();     process.StartInfo.FileName = "call.bat";     process.StartInfo.WorkingDirectory = @"A:\Log\OLP_Application_Storage\call.bat";     process.StartInfo.Arguments = "call.bat";     process.Start(); }  I have a bat file that calls a python script, with this path is working like a charm. The thing is that I try my app to be used by multiple users (the ones that have acces to my onedrive) so I need to use the share link from onedrive, I dont know how to addapt it, only replacing the path with the link it does not work. string path = https://companyname-my.sharepoint.com/:x:/p/userid/ewaaiwjfafjwiajawfiaf"; try {     //string pth;     //pth = "A:\Log\OLP_Application_Storage\call.bat";     Process process = new Process();     process.StartInfo.FileName = "call.bat";     process.StartInfo.WorkingDirectory = "https://companyname-my.sharepoint.com/:x:/p/userid/ewaaiwjfafjwiajawfiaf";     process.StartInfo.Arguments = "call.bat";     process.Start();  }  I tried something like this but is not working. Thank you for your time! Edit: I am not very good at exprimation so it may be confusing. I use a txt file as a list of ids of users, I use an excel file to store some data when a user uses the app, he insert in couple of spaces, he press send and the app saves it inside excel file. I did all the code on local, but now I want to share the app inside the company. To be able to write mutiple users at the same time inside the excel file, it has to be inside Onedrive. So now I have to find out how to get to it for me to use it (The difference should be seen in the 2 codes example). Thank again for the wasted time! It may be a easy problem but I am new to the app production world...


Prove that group of order 203 is abelian.


Is my connection to Stack Exchange encrypted?

I am using the Android SE app. I want to know if my connection to Stack Exchange encrypted? Thanks.


How would I get rid of the date, and the numbers 1 and 2? My latex code is below. I cant post images as Im a new user, sorry!  \documentclass[10pt]{article}   \begin{document}  \title{Banana Cake} \maketitle   \section{Ingredients}  \begin{itemize}   \item The first item   \item The second item   \item The third etc \end{itemize}  \section{Method} \begin{enumerate}   \item The first item   \item The second item   \item The third etc \end{enumerate}    \end{document}


Cyborg with heart in a box, loses his cyborg arm in gunfight; handsome guy that sleeps in green goo

I remember watching a movie or tv-series in the 90's, could be from the 80's too. They're probably on a spaceship, one guy is a cyborg with a human head. He's got his human heart in a box in his cyborg chest. In one scene someone opens this box and the cyborg gasps for air.  In another scene the cyborg is in a gunfight in a warehouse(?), and one of his robotic arms is shot off. He gets a replacement arm that is out of control, erratically moving by itself. In the end they find the arm in the warehouse(?) that was shot off and it is reattached.  Then there's this character: a handsome guy with long hair that I remember stepping out of his sleeping “pod” filled with green goo. I think the pod is a standing circle where the lower part is filled with the goo/slime.


Story where the main character learns to perceive time out of order from the aliens

I read a story several years ago in which aliens come make first contact with Earth, and a bunch of scientists set to work trying to establish communication with them in various fields. The main character is a linguist and her team is working to try to figure out their written language, which doesn't have any sort of linear structure and can be read starting from any place.  It contains some explanation of quantum physics as an analogy for how they view time.  In the end, it turns out that the aliens don't perceive time in a linear fashion, and sort of see the future on equal terms with the past, etc. The main character learns to see time this way by studying their language, and the story is interspersed with her talking about what her child is going to do / is doing / has done.  I think I read it in a science fiction magazine but I'm not sure about this part.


Best way to access ext partion in windows?

What is the most stable and easiest way to get readable access of linux partitions in windows?   All software and drivers I´ve found seem to have been dead/inactive for at least 4 years.  Native access is a plus.  Os: Windows 8.1


What is the radius of convergence of the Taylor series of $\frac{2\tan x}{1+4x^2}$ around $x=0?$  I have to find out $a_n=\frac {f^{(n)}(0)}{n!}$, but the $n-$th  derivative of the given function is not easy to handle. Please help. Thanks,


Formula for coordinates (lat, lon), azimuth and distance.

I would like to know how to find a set of coordinates on a small circle some distance from another point.   For example, lets say A = (39.73, -104.98) #Denver  B = (39.83, -106.06) #point approximately 50 nautical miles away from A along the great circle track to C  C = (40.75, -111.88) #Salt Lake City, approximately 323 nautical miles away from A  How do I get the set of orange coordinates when I don't know the angle but I do know the cross track distance?  For concreteness, lets say the outer points near B have a cross track distance of +- 30 nautical miles and the inner points have a cross track of +- 15nm.  And the points near C have a cross track of +- 25 nm.  Also I have an initial bearing from A to C of -1.34 #radians


I've just installed Ubuntu 20.04 . And I have set up updated software in software updater , and ticked everything without cdrom , and all online account . Just what a new user should do . From an website I've seen what should I do after installing Ubuntu 20.04 . That↓  I had to install media codec . So I open up the terminal and typed sudo apt-get update sudo apt-get upgrade And install Ubuntu restricted extras by sudo apt Install ubuntu-restricted-extras And close terminal . Then when I was going to install gnome tweaks sudo apt install gnome-tweaks Result waiting for cache lock : could not get lock /var/lib/dpkg/lock-frotend I showed that in image .   So I close the terminal . Now I can't install anything . It is always showing that code again and again. Please I beg everyone give me some solution what should I do how do I fix it


Suppose H is a subring of R such that for every $r∈H$ we have $r^2=e$. Prove that $H$ is commutative.

So I know that since H is a subring of $\mathbb{R}$ that H is then by definition:  1) closed under addition  2) closed under multiplication   3) have the same multiplicative identity as $\mathbb{R}$  Am I missing anything? I think I need to only reference fact 2, which states that H is closed under multiplication for this proof.  I tried looking up on the internet how to show that a subring is commutative and did not find anything. Is the answer as simple as saying that since $\mathbb{R}$ is commutative then the subring H, is itself by definition commutative?  Or do I go about it by showing that lets say for example:  Let $r_1, r_2 \in H$ then $r_1 \times r_2 = e = r_1 \times r_2$ which is then commutative?


Convergence of a sequence of integrals defined recursively

Let $g:[0,\frac1{2}]\to \mathbb{R}$ be continuous function. Let us define the sequence $g_n(t)$ as $g_1(t)=g$ and $$g_{n+1}(t)=\int_0^tg_n(s)ds$$ for $n\ge1$. Is it true that $\lim_{n\to\infty}n!g_n(t)=0\forall t\in[0,\frac1{2}]$  I think yes, and may be we have to use the Cauchy formula for repeated integrals. Is there any other way to prove this? Thanks beforehand.


"is" operator behaves unexpectedly with integers

Why does the following behave unexpectedly in Python?  >>> a = 256 >>> b = 256 >>> a is b True           # This is an expected result >>> a = 257 >>> b = 257 >>> a is b False          # What happened here? Why is this False? >>> 257 is 257 True           # Yet the literal numbers compare properly   I am using Python 2.5.2. Trying some different versions of Python, it appears that Python 2.3.3 shows the above behaviour between 99 and 100.  Based on the above, I can hypothesize that Python is internally implemented such that "small" integers are stored in a different way than larger integers and the is operator can tell the difference. Why the leaky abstraction? What is a better way of comparing two arbitrary objects to see whether they are the same when I don't know in advance whether they are numbers or not?


Monday morning mistake: sudo rm -rf --no-preserve-root /

Please note: The answers and comments to this  question contains content from another, similar question that has received a lot of attention from outside media but turned out to be hoax question in some kind of viral marketing scheme. As we don't allow ServerFault to be abused in such a way, the original question has been deleted and the answers merged with this question.      Here's a an entertaining tragedy. This morning I was doing a bit of maintenance on my production server, when I mistakenly executed the following command:  sudo rm -rf --no-preserve-root /mnt/hetznerbackup /  I didn't spot the last space before / and a few seconds later, when warnings was flooding my command line, I realised that I had just hit the self-destruct button. Here's a bit of what burned into my eyes:  rm: cannot remove `/mnt/hetznerbackup': Is a directory rm: cannot remove `/sys/fs/ecryptfs/version': Operation not permitted rm: cannot remove `/sys/fs/ext4/md2/inode_readahead_blks': Operation not permitted rm: cannot remove `/sys/fs/ext4/md2/mb_max_to_scan': Operation not permitted rm: cannot remove `/sys/fs/ext4/md2/delayed_allocation_blocks': Operation not permitted rm: cannot remove `/sys/fs/ext4/md2/max_writeback_mb_bump': Operation not permitted rm: cannot remove `/sys/fs/ext4/md2/mb_stream_req': Operation not permitted rm: cannot remove `/sys/fs/ext4/md2/mb_min_to_scan': Operation not permitted rm: cannot remove `/sys/fs/ext4/md2/mb_stats': Operation not permitted rm: cannot remove `/sys/fs/ext4/md2/trigger_fs_error': Operation not permitted rm: cannot remove `/sys/fs/ext4/md2/session_write_kbytes': Operation not permitted rm: cannot remove `/sys/fs/ext4/md2/lifetime_write_kbytes': Operation not permitted # and so on..   I stopped the task and was relieved when I discovered that the production service was still running. Sadly, the server no longer accept my public key or password for any user via SSH.  How would you move forward from here? I'll swim an ocean of barbed wire to get that SSH-access back.  The server is running Ubuntu-12.04 and hosted at Hetzner.


Why is PhD read as /piːeɪtʃˈdiː/ (from ) and not, for example, like /fˈdiː/ , while diagraph ph is read as /f/ in Latin and Greek words?  Why do we write Ph if not to represent the /f/ sound?  There are questions about writing () but not pronouncing.  EDIT: Thanks for answers. To be clear.  I asked this because of it is not the three letters P.h.D.  Why we read it not as /ɛf diː/?


Election primary vote count is no lower than -1

There are  2 moderators who have a total vote count of less than 0 during the primary phase. But the total vote count sticks at -1 and is no lower than that. Neal, for example, currently stands at +97/-140 which should give a total vote count of -43.  I remember having seen this during the last elections as well, but I assumed it to be just a bug and I didn't find it important enough to report on meta. But right now, after many elections using the same engine, not only on Stack Overflow, this issue seem still to manifest.  Can we please fix it? Or is this working as designed?


How can I find the program I'm hiding in bash

Say I have PATH="home/bob/bin:/usr/bin".  I am writing a bash script /home/bob/bin/foo that will do some munging and then call /usr/bin/foo.  Of course I want to be able to use this script on different systems which have different path structures.  In practice the real foo might be in many different places, so I want to just find it from the PATH.  My new foo script is on my path too, so I can't just call foo, that will result in a recursive call.  Is there an easy way of doing this in a bash script? (Other than looping through elements of PATH and doing the search manually?)


Is there any difference between the two standalone statements below:  She sat on my chair  She would sit on my chair  I emphasise standalone because it is clear to me what a statements such as "I knew that she would sit on my chair" means; it is expressing a future from the perspective of the past.   It is also somewhat easier for me to comprehend the meaning of a statement such as "She would have sat on my chair", which is a modal perfect statement; it is expressing an action (of sitting) that would have been completed just prior to the statement's construction in a hypothetical present.  But I don't get the difference between the simple modal and the simple past, and to me, they seem largely interchangeable. Any thoughts would be greatly appreciated.


Static nested class vs non static error?

I used the following piece of code, which gave me an error at the point indicated:  class LinkedList{     class pair{             Integer petrol;             Integer distance;              public pair (Integer a, Integer b){                     petrol = a;                     distance = b;             }     }      public static void main(String args[]){             pair[] circle = {new pair(4,6), new pair(6,5), new pair(7,3), new pair(4,5)}; // error at first element of array circle!!!!!!!     } }   I then rectified it to this and the error dissapeared!  class LinkedList{     static class pair{ // changed to static!!!         Integer petrol;         Integer distance;          public pair (Integer a, Integer b){             petrol = a;             distance = b;         }     }      public static void main(String args[]){         pair[] circle = {new pair(4,6), new pair(6,5), new pair(7,3), new pair(4,5)}; //error gone!     } }   My question is why did the error even appear in the first place?     ERROR: No enclosing instance of type LinkedList is accessible. Must   qualify the allocation with an enclosing instance of type LinkedList.


Prove that a graph with the same number of edges and vertices contains one cycle

We have a connected graph $G(V,E)$ that has $|E|= n$ edges and $n$ vertices.    Prove that the graph has one cycle in it.   I'm little bit confused here. I tried some ways but failed. Can you direct me?


Objective: given the file, determine whether it is of a given type (XML, JSON, Properties etc) Consider the case of XML - Up until we ran into this issue, the following sample approach worked fine:     try {         saxReader.read(f);     } catch (DocumentException e) {         logger.warn("  - File is not XML: " + e.getMessage());         return false;     }     return true;  As expected, when XML is well formed, the test would pass and method would return true. If something bad happens and file can't be parsed, false will be returned. This breaks however when we deal with a malformed XML (still XML though) file. I'd rather not rely on .xml extension (fails all the time), looking for <?xml version="1.0" encoding="UTF-8"?> string inside the file etc. Is there another way this can be handled? What would you have to see inside the file to "suspect it may be XML though DocumentException was caught". This is needed for parsing purposes.


I am a victim of the Petya ransomware. Is there a solution to decrypt my disk?

My computer got encrypted by the Petya ransomware. After a long search I could not find a solution other than using file recovery software.  This helps a bit, but I am wondering if there is a way to completely restore my disk. I am not going to pay.


I have a List as seen below ,  List<asset> Asset101 = [select Id,OwnerId,quantity,Name,Refresh_Asset_To__c,                             Refresh_Asset_To__r.Id,AccountId                           from asset ] ;   The field Refresh_Asset_To__c is a lookup to the product object, I want to insert a new opportunity with Refresh_Asset_To__c being the opportunity product.  How do I go about retrieving the Id for Refresh_Asset_To__c and looking up the  PriceBookEntry  Id.


How to treat old locked questions containing outdated information?

Suppose an old closed question has an historical lock on it, making impossible to vote/comment/flag on any post.  What should we do if such questions have a high visibility but contains some outdated or wrong information?  indicates that such questions should be unlocked (and potentially removed), but what about cases where most of the information is still accurate and useful?  For instance:    I think this post still deserves a historical lock as the information provided is indeed useful. Only little parts of it are gradually becoming outdated and still being hit every time one queries for cocoa best practices.  What should we do when a historical-locked question provides, say 85% of useful up-to-date information and 15% of outdated one?


Can I travel with cremated remains (father's ashes) from Malaysia to India

we already checked with AirAsia airlines. they need a death certificate and cremation certificate for security purpose. They asked us to check with the customs department of India.  but I'm not sure about India customs  What are the rules and regulations we must follow?


How can I speed up my Aspire ONE D250 manufacturing date 0911 (09 or 11?)?  Details:   Memory: 2.0GB Processor: Intel® Atom™ CPU N270 @ 1.60GHz × 2  Graphics: Intel® 945GME x86/MMX/SSE2 OS Type: 32-bit Disk: 155.3 GB Ubuntu 16.04 LTS   I think it has become gradually slower in the last year. Now I have to wait for websites to load.  I often use several tabs in three separate browsers:  Chromium, Firefox 50.1.0, and Opera 12.16.  Is the computer too old to cope with this workload?


i want to iterate through the has map in java. i am not able to get the keys from my code. it gives me random kind of keys that's not what i want. my keys are of class type.  i have tried many things but i don't know exactly how can i get the keys . i can get the keys when i have the keys of primitive or wrapper classes type but not when i am entering a key from user defined class.


Checkmark on badge page not vertically aligned

The checkmark besides the badge on the Badges page is not vertically aligned to the badge. It appears that this can be fixed by changing vertical-align: top; to vertical-align: middle; in the following line in secondary.css: .badges-page .single-badge-table .single-badge-wrapper .single-badge-badge {     vertical-align: top; }  Current CSS (vertical-align: top;):    Corrected CSS (vertical-align: middle;):     FWIW the checkmark displays correctly on the list of badges page ():


HTML Table row with link not checking checkbox

i have a HTML table echoed in PHP:  echo '
                 <input type="checkbox" name="check'.$counter.'" id="check'.$counter.'" onclick=\'add('.$total.', this);\' />	                 '.$result["invoice_number"].'	                 '.$company.'	                 '.$date.'	                 &pound;'.$result["total"].'	                 &pound;'.$result["total"].'
';   so when you hover over it, it highlights the whole row and wherever you click on the row it opens the link but when i check the checkbox it also opens the link - i want to stop this


Links to tags are not hidden by spoilers:      are issues in spoilers   For a start why? I don't see what purpose being able to see the outline of a tag (it is more visible on other sites) when all other pieces of text are hidden.  It has proved problematic in several cases, especially on Puzzling, where hidden answers are imperative 90% of the time.   Also can this be changed? I don't want to cause a massive fuss, so if this is too big to sort out, then don't worry about it.


I have to show next property of stochastic integration.   Let $X$ be adapted integrand, for which we know that $E[\int_0^T X_s^2 ds] < \infty$. Let $0 \leq s < t \leq T $ and we have some $W \in F_s$ ($F_s$ is $\sigma$-algebra) and we know $E[\int_s^t W^2 X_s^2 ds] < \infty$.  Show that $\int_s^t W X_u dBu = W \int_s^t X_u dBu$.  I think I should start first with simple integrands and then make construction on other, but I am not sure if it is obvious how to make this on simple integrands.  Thanks for help.


Skewness, kurtosis and how many standard deviations values are from the mean

As is well known for the normal distribution, 68% of the probability mass is within one standard deviation of the mean, 95% within two standard deviations and 99.7% within 3 standard deviations.   However, I have some empirical distributions that are leptokurtic and negatively skewed. In such circumstances is there a formula based on their higher-order moments to calculate how much of the probability mass is within so many standard deviations of the mean?   I have a measurement and would like to give some sense of how far it is from the midpoint (mean or some other measure of central tendency).  Can this be done?


Check where am I wrong. Here is how information can be sent faster than light

If I have a very long rigid rod which is of rectangular cross section and small mass. Let it's length be 1 light year and total mass be 1 kg now at one end if I rotate that rod, since the rod is rigid it should rotate as a body about the axis parallel to its length and normal to its cross sectional area. If this event happens instantaneously,  does it mean that the information of rotating the rigid rod has been sent instantaneously  (more than the speed of light)? If the assumption is false what actually happens there?


Historical and contemporary usage of "don't" for the third singular person

The following extract  from M-W Learner's Dictionary comments on the usage of "don't":           is occasionally used in American English speech and in historical writing as a contraction of does not (as in, "He don't know where he is going."), but this use is now considered improper and should be avoided. Remember that in modern speech and writing, don't cannot be used in the third person singular.       actually confirms the historical usage, but this ungrammatical expression appears to be relatively common still nowadays, and not only in spoken language.  Questions:   Was the usage of "don't" for the third singular person considered grammatical/correct in the past? If so,  When and why did the "does" form become considered to be the only correct expression?   Is its current usage still and AmE thing or is it used as nonstandard expression also in other English dialects?


mbstring is missing for phpmyadmin in ubuntu 16.04

When I installed phpmyadmin in Ubuntu 16.04 LTS, it gives me an error mentioned below.     The mbstring extension is missing. Please check your PHP configuration   then I tried to install php-mbstring, it says mbstring is up to date, Can anyone help me to solve this?


Anytime I install a new package i get the following error:  WARNING: The following packages cannot be authenticated!   I can still install the package despite this error, but is there a way to get rid of it?


How do you add those keyboard icons to your post?

In answers to Emacs-related questions, I often see key sequences displayed as a cool keyboard key icon wrapping the keystrokes.  :  How does one generate these?


I'm trying to create an Etch-a-Skecth in in HTML, CSS and javascript. So I created a
 and inside it, there's another one. But when I tried to style it in CSS, I couldn't center it.    * {   margin: 0;   padding: 0;   box-sizing: border-box; }  #bigGrid {   display: grid;   grid-template-columns: repeat(16, auto);   grid-template-rows: auto;   padding: 50px;   width: 80px;   height: 80px;   border: 10px solid crimson; }  .gridElement {    background-color: rgba(255, 255, 255, 0.8);    border: 1px solid rgba(0, 0, 0, 0.8);    padding: 5px;    background-color: rgb(184, 179, 179); }


iOS 7 update failed - stuck on Connect to iTunes

I was downloading iOS 7 to my iPhone 4 and the update was going for almost 1 day. I left it overnight and when I was about to use my phone it is stuck on the 'Connect to iTunes' screen (iTunes logo with a USB cord). My phone is still stuck on that and when I try to fix it with iTunes with my PC (Windows 7) the message always pops up saying that my phone needs to restore. Can you help me with this?


How long does it take to read and learn from a book?

My party has stumbled upon an abandoned library.  They've found some books that they want to read and study.  I've told them if they read and study the books they'll gain a proficiency bonus for the subject and one book will give them the knowledge to create a magic item.    Unfortunately, I'm not sure how long it should take to read and study these books. An hour or day seems too short.  Three to four weeks, reading a couple hours a day, is closer to what I spend in real life (and honestly reading just one book in real life does not give one any kind of proficiency).  Given what they're about to face, it would be best for them to get the bonuses and construct the magic item sooner rather than later, but I want to keep some air of realism too.    Are there any guidelines and, if not, are there tested and successful house rules I could use?  Obviously length, difficulty of the subject, intelligence of the reader, will have some effect on this.  So I'm hoping for something like \$D\div(I+1)\$ days for every 100 pages, where \$D\$ is the difficulty factor (based on language and subject) and \$I\$ is the character’s intelligence bonus.  Or maybe I'm just being too mathematical.    I'm more interested in balancing giving bonuses/knowledge through books, which I think should be somehow related to how long it takes to read a book.


Finding multivariable limits for the function $\frac{3x^2y}{x^2+y^2}$

Could anyone help me with this  Find $$\lim_{(x,y) \to (0,0)} \frac{3x^2y}{x^2+y^2}$$ if this limit exists  I tried using the squeeze theorem, but I could not find a suitable expression for the squeeze theorem as I could not find any number that allow me to squeeze the limit in between and cancel the denominator


Impact of the reputation limit and global time on answer quality

I'm wondering whether the reputation limit in combination with a global clock doesn't create the following effect:  "The quality of the answers is the highest around 00:00 UTC and drops until 23:59 UTC." - idea  The rationale behind it is that each day, at 00:00UTC a new "SE day" begins. So everybody has zero reputation that day. But as time passes, more and more (high reputation) users earn the maximum reputation limit. The result is that some/most of these users don't have an incentive anymore to answer questions (decently; no insult intended at all). So the number of potential answerers (as well as the answerer-quality if reputation is a good measure) drops. Of course the claim not fully holds: people live around the global and most people won't answer questions in the middle of the night, simply to earn some reputation. Still there is probably some effect... Let's assume people work 8 hours everyday (and consult the site occasionally through the day), then the last person that become active on the site the first time that SE day does this at 16:00 UTC, so from that moment, the quality should start dropping significantly. Furthermore it depends on the concentration of IT-minded people on the globe (one expects the quality to drop faster if people in San Francisco, California are at work, since the concentration of programmers is higher in these regions). In other words, the best time to ask a question is around 00:00 UTC (based on probability reasoning, and probably later that day based on actual data). This can create problems, since most programmers don't decide when they want to run into trouble with their work. And furthermore people living in different countries are differently aligned to the global time. A possible solution to the problem - if any - could be that the "SE day" depends on where a user lives. There are probably some issues because users could change their location to tamper with the clock, but perhaps other solutions might work as well. Please note that I don't claim it is the "intention" of answerers to answer less questions. It's more a subconscious process that people tend to put less effort in things where they don't receive (immediate) rewards.


Java scanner and Method set in Array Exception in thread "main" java.lang.NullPointerException at Main.main(Main.java:16)

import java.util.Scanner; public class Main {      public static void main(String[] args) {         Tech[] std=new Tech[5];         int i;         for(i=0;i<5;i++)         {             System.out.println("Enter Name of Student");                 String Name;                 Scanner scanIn = new Scanner(System.in);                Name = scanIn.nextLine();                scanIn.close();              std[i].setName(Name);             System.out.println(std[i].name);         }      }  }      Exception in thread "main" java.lang.NullPointerException     at   Main.main(Main.java:16)


What do silver/gold tools do and how can I get them?

I remember in Wild World, the gold shovel could plant money trees and was acquired by burying a normal shovel for a day.  The other golden tools had special abilities too.  In New Leaf, I have read that there are also silver tools.  What do the silver/gold tools do and how can I get them?


How to play Metal Gear Solid V Ground Zeroes on Windows 10 x64

I can't run Metal Gear Solid V Ground Zeroes on Windows 10 x64.  Error,    Specs,


Wifi not working on Asus Vivobook 15 R504ZA on fresh Ubuntu 19.10 installation

Wi-Fi is not detected on my fresh Ubuntu 19.10 installation on an  installation. The Settings > Wi-Fi page states "No Wi-Fi Adapter Found". The liveboot from a USB stick that I tried out before the installation had the Wi-Fi working fine.  Which driver do I need to install and how do I install it?  The output of the  on my computer is shown here:   Without Wi-Fi, my computer is without internet connection, so I will need to download installation files with another computer and copy files on a USB stick.  Thanks for any help!


I have the following:  \newcommand{\makeWord}[1]{% \newcommand{\#1}{\textrm{#1}}}  \makeWord{AdditiveGroup} \newcommand{\AdditiveGroup}{\textrm{AdditiveGroup}}   Unfortunately, I did not properly define the makeWord macro. How do I fix this?


Range of successes for multivariate hypergeometric distribution

I'm trying to calculate the probability of drawing specific cards in a deck.  I know that I can use multivariate hypergeometric distribution to calculate for a defined success.  I'm wondering how I can do the same for a range of acceptable successes.  For example (if k is the number of successes):   Drawing less than k cards Drawing up to k cards Drawing between k and l cards (also inclusive of k and/or l) Drawing k or more cards Drawing more than k cards   I'd just like to know if there's a formula for this already, or what the process would be to find these values.  Edits after receiving further questions  Let's say we're using a standard 52 card deck of playing cards and they're shuffled.  You're drawing cards off the top of the deck.  Some questions that might be asked are:   What's the chance of drawing 2 or 3 queens in 5 cards? What's the chance of drawing $\le$ 3 queens AND $\ge$ 2 kings in 7 cards?   Because the number of cards is known, the last example translates to 0-3 queens and 2-4 kings.


I want to check that input string is number in ios

I want to check that input string is number, is there any way? Basically strings are recieved from text field so need to check that whether the string in number or not.


I am using ubuntu server 14.04.1 and i want edit filesystem.squashfs after installed squashfs-tools and unsquashfs and edit filesystem and mksquashfs and build iso i get this error  base-installer: info: Using squashfs support for /cdrom/install/filesystem.squashfs anna-install: Installing squashfs-modules anna[21857]: DEBUG: resolver (kernel-image-4.2.0-16-generic-di): package doesn't exist (ignored) anna[21857]: DEBUG: retrieving squashfs-modules-4.2.0-16-generic-di 4.2.0-16.19 kernel: [44.008353] squashfs: version 4.0 (2009/01/31) Phillip Lougher main-menu[3537]: (process:21801): getfattr: .: Operation not supported main-menu[3537]: (process:21801): getfattr: ./bin: Operation not supported main-menu[3537]: (process:21801): getfattr: ./bin/bunzip2: Operation not supported main-menu[3537]: (process:21801): getfattr: ./bin/bzcat: Operation not supported main-menu[3537]: (process:21801): getfattr: ./bin/bzcmp: Operation not supported   i think this error becouse kernel version not equal squashfs-tools  is this right ?  and i want install right package squashfs-tools support kernel ubuntu-server 14.04.1  and sorry if my english is bad


What prevents someone with some funding from creating and selling their own hardware? Let's ignore the legal side of things and assume the only limit is technology.  Could someone create something akin to a 1995-2000 time period processor without specialized equipment? What about slightly earlier, like the "computer pioneers" did?


Vertical alignment of text based on image height

Problem:  Trying to use tabularx to align text to a number of images. I have opened a similar question regarding tabular but decided to open a new specifically for tabularx since the tabular approach generated a number of errors which I could not solve.  Since I have figures I did not know how to make a MWE of them. Instead I will try to explain where the issue is.  Code:  \begin{figure}[tbh] \begin{tabularx}{\textwidth}{cX} \includegraphics[scale=.5]{figure8_1_server.eps} & This is some text that describes the first figure. It will take up as much space as is needed and will remain centred I hope.\\ \includegraphics[width=.5in]{figure8_1_arrow.eps} & \\ \includegraphics[width=1in]{figure8_1_database.eps} & This is some text that  describes the second figure. It will take up as much space as is needed   and will remain centred. As the text gets longer  it centres in the way   that we want. So it seems that this is working. \\  \includegraphics[width=.5in]{figure8_1_arrow.eps} & \\  \includegraphics[scale=.5]{figure8_1_table.eps} & This is some text that describes the first figure. It will take up as much space as is needed and will remain centred I hope.\\  \includegraphics[width=.5in]{figure8_1_arrow.eps} & \\  \includegraphics[scale=.5]{figure8_1_row.eps} & This is some text that describes the first figure. It will take up as much space as is needed and will remain centred I hope.\\  \includegraphics[width=.5in]{figure8_1_arrow.eps} & \\  \includegraphics[scale=.5]{figure8_1_cell.eps} & This is some text that describes the first figure. It will take up as much space as is needed and will remain centred I hope. \end{tabularx} \caption{Syntax för iterationen for och dess delar.} \label{fig:database} \end{figure}   Outputs:    Desired outcome:  To have the text vertically aligned with the photos.


I have a hp aspire one laptop Havnt used in some time and the password I thought it was isnt working. I want to wipe the password or the whole laptop but not sure how. It's running on Linux mint 17


How to check actuation count on an EOS 80D?

Most utilities that I found to check the actuations count haven't been updated in a long time. I also read that the actuations count isn't included in the EXIF data anymore.  So what is the best/easiest way to check the actuations count on a Canon EOS 80D? I have Lightroom and Photoshop available, but I'm willing to install another (free) utility if necessary. I use Windows, Linux is optionally available. Thank you!


PostgreSQL multi-column unique constraint and NULL values

I have a table like the following:  create table my_table (     id   int8 not null,     id_A int8 not null,     id_B int8 not null,     id_C int8 null,     constraint pk_my_table primary key (id),     constraint u_constrainte unique (id_A, id_B, id_C) );   And I want (id_A, id_B, id_C) to be distinct in any situation. So the following two inserts must result in an error:  INSERT INTO my_table VALUES (1, 1, 2, NULL); INSERT INTO my_table VALUES (2, 1, 2, NULL);   But it doesn't behave as expected because according to the documentation, two NULL values are not compared to each other, so both inserts pass without error.  How can I guarantee my unique constraint even if id_C can be NULL in this case? Actually, the real question is: can I guarantee this kind of uniqueness in "pure sql" or do I have to implement it on a higher level (java in my case)?


I would like an efficient algorithm for square root of a positive integer.  Is there a reference that compares various square root algorithms?  Thanks.


Android- Unable to show received location values due to java.lang.NullPointerException

Im trying to create a layout that will show the received location updates in the text view, but i keep getting this error, what am i doing wrong?   Help would be appreciated, thanks in advance!  Here is the error:      E/AndroidRuntime: FATAL EXCEPTION: main                    Process: com.example.defro.app, PID: 7731                    java.lang.NullPointerException: Attempt to invoke virtual >method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null >object reference                         at com.example.defro.app.MainActivity$1.onLocationChanged(MainActivity.java:29)`   Row 29 is:   txtLoc.setText(String.valueOf(iaLocation.getLongitude() + ", " + iaLocation.getLatitude()));  Main_Activity:  public class MainActivity extends AppCompatActivity {  IALocationManager mLocationManager; IALocationListener mLocationListener = new IALocationListener() {     @Override     public void onLocationChanged(IALocation iaLocation) {         TextView txtLoc = (TextView) findViewById(R.id.textView);         txtLoc.setText(String.valueOf(iaLocation.getLongitude() + ", " + iaLocation.getLatitude()));      }      @Override     public void onStatusChanged(String s, int i, Bundle bundle) {      }  }; private final int CODE_PERMISSIONS = 1;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);      mLocationManager = IALocationManager.create(this);       String[] neededPermissions = {             Manifest.permission.CHANGE_WIFI_STATE,             Manifest.permission.ACCESS_WIFI_STATE,             Manifest.permission.ACCESS_COARSE_LOCATION,             Manifest.permission.BLUETOOTH,             Manifest.permission.BLUETOOTH_ADMIN        };     ActivityCompat.requestPermissions(this, neededPermissions, CODE_PERMISSIONS);   } public void onRequestPermissionsResult(int requestCode, String[] permissions, int[] grantResults) {     super.onRequestPermissionsResult(requestCode, permissions, grantResults);      //Handle if any of the permissions are denied, in grantResults }   protected void onResume() {     super.onResume();     mLocationManager.requestLocationUpdates(IALocationRequest.create(), mLocationListener);  }  protected void onPause() {     mLocationManager.removeLocationUpdates(mLocationListener);     super.onPause(); }  protected void onDestroy() {     mLocationManager.destroy();    super.onDestroy(); }   }  content_main.xml:  <TextView     android:layout_width="wrap_content"     android:layout_height="23dp"     android:text="Lat, Long"     app:layout_constraintBottom_toBottomOf="parent"     app:layout_constraintHorizontal_bias="0.051"     app:layout_constraintLeft_toLeftOf="parent"     app:layout_constraintRight_toRightOf="parent"     app:layout_constraintTop_toTopOf="parent"     app:layout_constraintVertical_bias="0.032" />


$\int_{-\infty}^{\infty} x^pf(x)=0$ for all $p\geq 0$, how to prove $f=0$ with the Fourier transform?

I found this as an exercise in Kolmogorov-Fomin, let me state the problem precisely:  Let $S_{\infty}$ be the space of functions on the real line for which there exists a colelction of constants $C_{pq}$ for all $p, q$ such that  $$ |x^pf^{(q)}(x)|\leq C_{pq}. $$ Is it true that if for all $p\geq 0$ $\int_{-\infty}^{\infty} x^pf(x)=0$, then $f=0$?  The exercise follows a section on the Fourier transform of functions of $S_{\infty}$. Now, I guess one should prove this exercise (I am fairly sure it is true) using some properties of the Fourier transform, but I cannot see how.   So my question is, how is this to be proved with the fundamental properties of the Fourier transform in $S_{\infty}$?


What is a willing creature?  Most spells tend to have saving throws, even the cure spells. I know the saving throw is there because they can harm those who have negative energy instead. Generally when a source is a known and trusted person, say the party cleric, no saving throws are made. Yet, I cant find a rule which allows this.   for example always applies unless they take an action to lower it.  The reason why I am asking this is because of that trust factor. I am in an evil game, eventually I plan on posing as a good cleric and helping people. After I have done this for awhile I expect to start using harmful spells, possibly even baleful polymorph. As I have worked to build up the reputation, and they have been accepting spells from me, provided there is no reason to suddenly distrust me, would they be affected by the spell(s) with no saves or not?  There are some other questions which are along the same lines, but are different.  Im not asking about . This  but is much more along my lines.  There is also the possibility that I will be pretending to be known people, using claim identity, so as long as they fail to see past it, would they be willing.  As pointed out in the comments, the question is very similar to . So to tell them apart I will ask for clarification in the answer to it, at what point has the subject/target of a spell final in terms of willing or not? Unless they pass a spellcraft to know what spell(s) I am casting, a cleric who has been healing the town for months should be trusted and someone should just be accepting of a spell.


Installing docker and docker-compose on ubuntu needs many steps.    E.g. for Arch you only need pacman -S docker docker-compose   Why is the apt for docker-compose 'outdated'? (Version 1.24 vs. 1.21) How can I help to change this? Why use Docker another repository which I have to add?    My understanding about apt and how to maintain is a little bit poor. And I can't find something like in the the Arch package list, where you can read the package file. ()


Cannot sign in to third party website with stackexchange openid

I tried providing StackExchange's openid url () as a login method over at ask.libreoffice.org and got an SE server error:  An error occurred on the server This event has been recorded. If you believe you encountered this message in error, please report it.  Well I believe I did encounger this error in error, so am reporting it.


How to uncheck a checkbox in pure JavaScript?

Here is the HTML Code:  <div class="text">    <input value="true" type="checkbox" checked="" name="copyNewAddrToBilling"><label>   I want to change the value to false. Or just uncheck the checkbox. I'd like to do this in pure JavaScript, without the use of external libraries (no jQuery etc)


How can I change the default logo icon to a custom icon by the applications menu in Ubuntu MATE without changing the theme?


I currently have a Windows partition installed on my Mac, for CptS reasons, and since that took up a majority of my storage space, I've been using an external hard drive to save documents and whatnot. I wanted to know if I can download applications from the App Store to my external hard drive. I've read on other forums that it's possible to change the location of the download folder on a Mac, but you have to delete the application if you were to want to update it. I'm not sure if it's possible to assign the download folder to an external hard drive.   Any input would be much appreciated.


Let $V$ be an n-dimensional vector space over $\mathbb{R}$ and $T:V \rightarrow V$ be linear. Call a vector $v \in V$ cyclic if $V$ is spanned by $\{v, \ Tv, \ T^2v,..\}$.  Question:  Show that $v$ is cyclic for $T$ then there is some $k \geq 1$ such that   $$B=\{v, \ Tv,..T^{k-1}v \}$$ is linearly independent in $V$ and that $T^kv$ lies in  the span of $B$.  Thoughts:  If we suppose that no such $k$ exists, then every subset of the form $\{v, \ Tv,..T^{l-1}v \}$ is linearly dependent, or it is linearly dependent with $T^lv$ not lying in it span.  There are in effect then two cases to consider.  Suppose every subset of the form $\{v, \ Tv,..T^{l-1}v \}$ is linearly dependent. Then $T^{l-1}$ can be expressed as a linear combination of $v,...,T^{l-2}v$. Now, $\{v, \ Tv,..T^{l-2}v \}$ is also linearly dependent by assumption and so we can express $T^{l-2}$ as a linear combination of  $v,...,T^{l-3}v$ etc... Continuing in this way, we show that $T^{l-1}v= \lambda v$ for some $\lambda \in \mathbb{R}$. Thus $$B=\{ \mu v \ | \ \mu \ \text{is an eigenvalue of} \ T^mv \ \text{for some} \ m \}$$ This is 'at best' countably infinite, and therefore could not span $V$ even if it were 1-dimensional, wince our base field is $\mathbb{R}$, which is uncountable.  Suppose then that $B$ is linearly independent for some $k$ but that $T^kv$ does not lie in its span. I can't see how to progress this argument.  Note: This question is for second year Undergraduates, and I think there must be some more simple approach; even the first part surprises me if we need to argue using the uncountability of $\mathbb{R}$, so any alternative approaches are also appreciated.


Using multiple keyboards with different keyboard layouts in Windows

I'd like to use multiple keyboards (all USB or one USB and one PS/2) with a different keyboard layout on each. Is this possible in Windows 7 or XP?   I'd prefer to avoid a hardware-based solution if possible.  My specific issue is that I prefer to use a Dvorak layout, but most of my colleagues use QWERTY. I'd quite like it if they could use my computer with a QWERTY layout by using a second keyboard, without affecting the layout of the primary one.


Flash disk capacity turns from 32GB to 4MB

I have a brand new 32GB flash drive that was bought from Hong Kong but manufactured in China.  When I plug it in, it's detected, and when I examine the properties of the drive the size is reported to be 31.2 GB.  Windows forces me to format it but I have not manged to actually do that.  I then I browsed the internet and a forum told me to change the letter to L. After I did that I searched many programs that can help me format it, but when I checked it back, it is 4MB now.  Any idea what's happening with my drive?


How can I add left aligned text to an equation?

I have a document I am trying to copy to learn TeX. Here is what I have encountered: How can I have the "or" in the equation. This is what I have right now:  \[ f = ma; \]  But $a$ is the change in velocity,  \[ f = m \frac{dv}{dt};\] \[ f = m  \frac{d^2y}{dt^2};\]   Edit: Trying out Stefan's answer


I'm going to Japan and planning to bring a drone with me. However, I'm worried that my drone is going to be confiscated at the airport.   Is it OK to bring a drone to Japan?


I have installed Ubuntu on my USB drive according to the instructions here   and the installation went successfully and Ubuntu was running on my mac. After I restarted the mac I couldn't be able to boot Ubuntu again from the Startup Manager, When I press (Option ⌥) key I only found the main hard drive that boots me into macOS.  How can I solve this problem and boot into the USB drive again?


After "run code snippet" winter hat image create duplicate image

After "run code snippet" hat image created a duplicate image. This happens in my Google Chrome browser, but in Firefox it's okay... . Better see the picture:


I have C Visit type for UK visa valid to 28/7/2016. It's a multiple entry. I already visited UK last month participating in a conference. So all my documents that I submitted were for the conference reason. And I showed the officer in LHR the invitation letter from the conference. Now I want to revisit UK with my family as a tourist at first week of next July. So is this visa will be OK to enter UK once again?


Ubuntu 12.04 LTS Got freezing while preparing to install

I've downloaded Via http Ubuntu Desktop ISO and used a Usb stick as per Ubuntu instructions I've done all and got it to the installation point and  then preparing to install when i click continue it takes forever  It's not hanging whole computer i can still work on Firefox without any problem but Ubuntu preparing to install window freeze  Please help on this what can i do ? Why is this freezing ?


Issue in upserting child object with master external id

I have one custom object named Class__c, which has one master relationship with another custom object named Plan__c.  I have Class.csv files which contains classes objects. This csv file also has external id of the parent Plan__c record.  When I import Class__c records using the following relationship:  planClassId=External_Plan_Class_Key__c planId=plan__r\:External_Plan_Key__c   Where External_Plan_Class_Key__c is the external key for Class__c object and External_Plan_Key__c is the external key for Plan__c object.  It is throwing error     required field plan__c is missing.   I was expecting that if load will first match external keys for class if it does not exist it should insert it.  Our business plan always comes in Class.csv files which will always exist in salesforce. We do not plan to support upsert, only update.  Still it is asking for Plan__c missing field.


Sensor for ultralow (to -85°C) freezer monitor

I am planning to build a series of Arduino-controlled temperature-reporting units for a room full of "Ultracold" -80°C freezers. (I ultimately want to convert the signal to a serial stream that will interface with my existing system.)  So far I have only found  and other sensors that are only rated to -55C. In my application they would spend most of their time around -80C. I only need about 0.5 to 1 degree accuracy at those temperatures.  Does anyone know a source for a low-temperature sensor that would be arduino-compatible, reliable, and be able to be placed at the end of a wire (to be passed into the freezer through a small port)?  Small update below.


The intuition behind choosing the number $e = \exp(1)$

What is the intuition behind choosing the number $$e=2.7182818284590452353602874713527 \mbox{(and more ...)}$$ such that $e=e^1$ or let me ask differently: where does this number come from?


Why is there no consistency in the plural forms of words ending on an "f" (e.g. safe, roof, dwarf, etc.)?

The plural form of leaf is leaves, although according to  leafs is also correct. Dwarf can be pluralized as either dwarfs or dwarves. Conversely, the words roof and safe are pluralized as roofs and safes.  Is there any logic underpinning these variations? Is there a historical trend where words that were previously pluralized as -ves are now being increasingly pluralized as -fs?


My download speed in terminal apps(apt-get, wget) is very slow. Although GUI apps such as Firefox and Chrome work fine. I have no idea why this is. Its quite a wierd problem and yes, I've tried turning it off and on again


Prove $F_{n+1} ≤ (\frac74)^n $, where $F_n$ are Fibonacci numbers

Let $F_n$ be the $n$-th Fibonacci number, defined recursively by $F_0 = 0$, $F_1 = 1$ and $F_n = F_{n−1} + F_{n−2}$ for $n ≥ 2$. Prove the following by induction (or strong induction):  $(a)$ For all $n ≥ 0$, $F_{n+1} ≤ \left(\dfrac74\right)^n$. $(b)$ Let $G_n$ be the number of tilings of a $2 × n$ grid using domino pieces (i.e. $2 × 1$ or $1 × 2$ pieces). Then prove $G_n = F_{n+1}$.  For question $(a)$, I've done the proof but the result I kept getting was $$\left(\frac74\right)^{k+1}\left(\frac{11}7\right)≤\left(\frac74\right)^{k+1}$$ which is wrong.


Executing a script directly vs. executing a script via the source command

I saw a question recently where a user wanted to ensure that his script is only executed by using source.  My question is: what's the difference between ./test_script.sh and source test_script.sh? I do know that when source is used the script file doesn't need +x permissions. Are there any other differences? And my second question is: in what kinds of situations is each method appropriate?


Has there been any progress made on granting a developer account for SF and HubExchange Devs? It feels conceptually wrong to me a SF product doesn't allow developers to perfect and develop a wider solution offering without paying +10K license fee per year. Even without CRM the HubExchange market could be a richer portal for consumers and developers if we were allowed a means to test our concept.  I think we'd all be perfectly happy with an account that was blackholed or limited in such a way where we could only send a finite qty of emails to an email address associated to the user.  If there's a forum or avenue where we can assist in raising the value proposition please let us know as I know there are many people looking.


Grep: The asterisk (*) doesn't always work

If I grep a document that contains the following:  ThisExampleString  ...for the expression This*String or *String, nothing is returned. However, This* returns the above line as expected.  Whether the expression is enclosed in quotes makes no difference.  I thought the asterisk indicated any number of unknown characters? Why does it only work if it's at the start of the expression? If this is intended behavior, what do I use instead of the expressions This*String and *String?


Confidence interval for mean of a uniform distribution

I've been trying to compute a 95% confidence interval for the mean of a height sample, which is uniformly distributed. I have calculated the following sample statistics: $$n=10 \quad \quad \bar{x} = 73.55 \quad \quad s = 1.68 \quad \quad s^2 = 2.83.$$ How can I calculate the CI of the mean of a uniform distribution not knowing the limits of the distribution?  I only know the CI for the normal distribution. Thanks in advance.


I'm trying to understand the bias-variance tradeoff, the relationship between the bias of the estimator and the bias of the model, and the relationship between the variance of the estimator and the variance of the model.               I came to these conclusions:                We tend to overfit the data when we neglect the bias of the estimator, that is when we only aim to minimize the bias of the model neglecting the variance of the model (in other words we only aim to minimize the variance of the estimator without considering the bias of the estimator too)       Vice versa, we tend to underfit the data when we neglect the variance of the estimator, that is when we only aim to minimize the variance of the model neglecting the bias of the model (in other words we only aim to minimize the bias of the estimator without considering the variance of the estimator too).   Are my conclusions correct?


Does an Enlarge/Reduce spell on a druid affect the beast form if the druid Wild-Shapes?

If a druid (multiclassed into sorcerer) casts Enlarge on himself so that he becomes a Large humanoid (approximately twelve feet tall), and he then Wild Shapes in a brown bear, is the brown bear form normal size or doubled in all dimensions?


Java reflection vs non reflection performance comparison

So I tried to test the performance of java reflection. I want to add every value of every field in a class into a map.  public static class testClass {     String monday = "Monday";     String tuesday = "Tuesday";     String wednesday = "Wednesday";     String thursday = "Thursday";     String friday = "Friday";     String saturday = "Saturday";     String sunday = "Sunday";     ... getter and setters ... }   public static void main(String args[]) {     noReflection();     reflection(); }  public static void noReflection() {     testClass test = new testClass();     long start = System.nanoTime();     Map myMap = new HashMap<>();     for (int i = 0; i < RUNS; i++) {         List<Integer> myList = new ArrayList<>();         for(myDayz days: myDayz.values()) {             myList.add(days.ordinal());         }         myMap.put(myList.get(0),test.getMonday());         myMap.put(myList.get(1),test.getFriday());         myMap.put(myList.get(2),test.getSaturday());         myMap.put(myList.get(3),test.getSunday());         myMap.put(myList.get(4),test.getThursday());         myMap.put(myList.get(5),test.getTuesday());         myMap.put(myList.get(6),test.getWednesday());          myMap.clear();     }     System.out.printf("no reflection: %,d ns%n", (System.nanoTime() - start)/RUNS); }  public static void reflection() {     testClass as = new testClass();     long start = System.nanoTime();     final String stringClassName = String.class.getName();      Map myMap = new HashMap<>();     for (int i = 0; i < RUNS; i++) {         int enumIndex = 0;         List<Integer> myList = getEnumsAsList(myDayz.class);         for(Field field : as.getClass().getDeclaredFields()) {             field.setAccessible(true);             String fieldTypeName = field.getGenericType().getTypeName();             try {                 Object instance = field.get(as);                 if (instance != null && fieldTypeName.equals(stringClassName)) {                     myMap.put(myList.get(enumIndex),(String) instance);                     enumIndex++;                 }             } catch (IllegalAccessException e) {                 e.printStackTrace();             }         }         myMap.clear();     }     System.out.printf("reflection: %,d ns%n", (System.nanoTime() - start)/RUNS); }  private static <E extends Enum<E>> List<Integer> getEnumsAsList(Class<E> eClass) {     List<Integer> enumOrdinals = new ArrayList<>();     for (E en : EnumSet.allOf(eClass))     {         enumOrdinals.add(en.ordinal());     }     return enumOrdinals; }  private enum myDayz {     MONDAY,     TUESDAY,     WEDNESDAY,     THURSDAY,     FRIDAY,     SATURDAY,     SUNDAY }  Now what suprised me is that the non reflection code is about ~60% faster. I thought it would be ALOT faster. My question is if this is what you can expect or have i done something wrong here?


Is it possible to add a button to an existing panel or node with python?

Is it possible to add a new button to an existing panel or an existing node that runs a custom operator?  How can I do this?


so I'm trying to complete this question for uni and am stuck.  show that  G = (V, E) has no Hamiltonian cycle, where the vertices are V = {a, b, c, d, e, f, g} and the edges are E = {ab, ac, ad, bc, cd, de, dg, df, ef, fg}  i was wondering if there was a simple way to solve this. thank you :)


How could I fix position of figures with KOMA-Script?

As a beginner, I will ask a question from a beginner. And I am a little bit lost with Latex packages documentation since there is, well, a lot of text ! (I prefer figures).  I read in Koma-Script manual this:     But often these floating environments are slightly misunderstood by beginners. They often ask for a fixed position of a table or figure within the text.   I need to write course materials (but not a book) with a lot figures and images and maths formulas. I would like to position the figures in the order and as close as possible from the text that reference them.  Having an image at the top or at the bottom of the page is sometimes not correct for me.  I tried to do this:  \documentclass[fontsize=12,a4paper,twoside,headheight=0.5cm,headsepline]{scrreprt} \usepackage[T1]{fontenc} \usepackage[bottom=2cm,footskip=15mm]{geometry} \usepackage{scrlayer-scrpage} \usepackage[utf8]{inputenc} \usepackage[frenchb]{babel} \usepackage{lipsum} \usepackage{a4} \title{Trying to Latexize my materials}  \KOMAoptions{BCOR=2mm,DIV=22}  \usepackage{eso-pic} \usepackage{graphicx} \usepackage{geometry,color,float}  \AddToShipoutPictureBG{%     \AtPageUpperLeft{         \put(10,-10){%             \raisebox{-\height}{\includegraphics[width=2cm]{example-image-c}}         }     } }  \usepackage{mwe} % for blindtext and example-image-a in example \usepackage{wrapfig} %not KOMA: is it compatible ?  \pagestyle{scrheadings} \cfoot{Le pied de page} \rehead{En haut à droite pair} \rohead{En haut à droite impair} \cehead{centre pair} \cohead{centre impair}   \begin{document} \maketitle \chapter{Starting} \section{My first section} \subsection{a subsection: introduction} This is my first \LaTeX document !   \begin{figure}[th]         \centering         \includegraphics[width=300pt]{example-image-a}         \caption{capt} \end{figure}   \lipsum[2] \subsection{an image in this section} There is an image below I want to comment now.  \begin{wrapfigure}{l}{0.5\textwidth} \centering \includegraphics[width=.98\linewidth]{example-image-a} \caption{A caption} \end{wrapfigure}  \lipsum[4]  \subsection{another image in this section} And another one here  \begin{wrapfigure}{r}{0.5\textwidth} \centering \includegraphics[width=.98\linewidth]{example-image-b} \caption{A caption} \end{wrapfigure}  \lipsum[6] \fbox{\begin{minipage}{0.9\textwidth}      ''text'' \end{minipage}}  \end{document}   But as you can see in document which is  (to download the document follow the link and then click the download button, do not right-click then "Save target as...").  the second A image is misplaced at the bottom (as well as the following text). And I don't want the second A image (left placed) to be so close to the bottom. I don't want neither the 1.1.3 subsubsection to be shifted to the right like this. I would like the paragraph to be wrapped and the the 1.1.3 section to be left justified.  I am less interested in a perfect typographic layout than in a technical documentation layout with, sometimes, more text (I have 30% text, 70% figures/tables/images).  What is a good way to do this using KOMA-script ? Or am I on a wrong path and should I change my way of writing it ?  My target type of document can be found here .


I am running into below error at line tblSoftwareImageTestPlan.SoftwareImageTestPlanID = SoftwareImageTestPlanData.SoftwareImageTestPlanID,how can I fix this error?  public List<SoftwareImageTestPlan>  AddSoftwareImageRecord(IEnumerable<SoftwareImageTestPlan> SoftwareImageTestPlans_WithParticularSoftwareImageID) {     tblSoftwareImageTestPlan SoftwareImageTestPlan = new tblSoftwareImageTestPlan();      foreach (var SoftwareImageTestPlanData in SoftwareImageTestPlans_WithParticularSoftwareImageID)     {         tblSoftwareImageTestPlan.SoftwareImageTestPlanID = SoftwareImageTestPlanData.SoftwareImageTestPlanID;//error at line     }      return null; }   Error:     An object reference is required for the non-static field,method,or property 'tblSoftwareImageTestPlan.SoftwareImageTestPlanID'


A square plate of metal is expanding under the action of heat, and its side is increasing at the uniform rate of 0.1 cm per hour. What is the rate of increase of its area at the moment when the side is 16cm long?


How to make span text in the center background

It's possible moving span text like using margin?  and provide the distance on the border so as not to touch?  i already use background-position but not working.  i want the span text in the center background black    div {  color: white; } span {   border-radius: 20px;  position: fixed;  margin-left: 8px;  margin-top: 8px;  background: black;  height: 34px;  width: max-content;  border-radius: -2px; } <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css" rel="stylesheet"/>
     My Folder


What force accelerates a liquid moving in a narrowing pipe?

Say there is a liquid which behaves like an incompressible fluid and is flowing steadily through a pipe which is moving from a cross section of area $A_1$ to the cross section of area $A_2$, where $A_2$ is less than $A_1$. As per the continuity equation, $v_2>v_1$ and so the liquid seems to be accelerating. What force is causing this acceleration?


$\zeta(-1)=\frac{-1}{12}\nRightarrow \sum_\limits{i=1}^\infty i=\frac{-1}{12}$ so how do we justify its use in string theory?

about my concerns regarding the justification of the claim that $1+2+3+...=\frac{-1}{12}$     Once you have         defined $\zeta(s) =\sum_\limits{n=1}^\infty\frac{1}{n^s}$ where $|s|>1$   defined $\zeta^\prime(s)=...$ by analytic continuation for all $s$         then you can only claim         $\zeta(s)=\zeta^\prime(s)$ where $|s|>1$         Hence, $\zeta(-1)=\frac{-1}{12}\nRightarrow \sum_\limits{i=1}^\infty i=\frac{-1}{12}$   To my surprise, apparently I didn't drop the ball, the community there seems to agree with my objection.  I don't know string theory but I hear $1+2+3+...=\frac{-1}{12}$ is a standard lemma.  Is string theory's use of this "result" actually rigorous? If so, what did the math.stackexchange people miss?


How can I increase the global font size past 20pt?

\documentclass[20pt]{extarticle} \usepackage{lipsum} \begin{document}     \lipsum* \end{document}  I would like to set the font size to something like 30, but it looks like 20 is the highest for extrarticle package, is there anything I can do to set the global font size even higher?


Is the formula for object image size given focal length, etc. independent of sensor size?

I am trying to figure out how big an object of, say, 50cm height at 100m distance and 600mm focal length would appear on a camera's sensor. The ubiquitous formula  object size in image = focal length * object size / object distance   yields  object size in image = 600mm * .5/100 = 3mm   What I am wondering: Are these 3mm entirely independent of sensor size?  E.g., a specific superzoom model has a 1/2.3" sensor (= 4.55mm height according to one source) and a maximum zoom quoted to have a "35mm equivalent focal length of 600mm". Would the object actually cover 3/4.55 = approx. 66% of this sensor's height = 66% of the image, or does the relation between the sensor size and the "35mm equivalent" have to be taken into account somehow?  (My apologies if this has been asked before - I have found many related questions, but not this one.)


Can blender press 1, 2, and 3 to directly enter the point, line, and surface modes respectively

Can blender press 1, 2, and 3 to directly enter the point, line, and surface modes, and press tab to enter only the object mode? It feels a bit troublesome to press a tab and then press 123 every time. 123 in object mode is not very useful.


Repeatedly rolling a six sided die four times and summing the highest three results gives you a distribution with what mean and standard deviation?  I've only taken AP statistics, but I would like to learn how to do this.


How can I disable the Alt+` (backtick) key combination

I was wondering if there was anyway to disable the Alt+` key combination that switches the windows of a program.   I've tried going through CompizConfig and disabling the Switcher there with no luck. I've even disabled every single key combination in dconf-editor in the keybinding category to no avail. Help would be greatly appreciated.


Does multi-platter hard-drive use all of their heads to read simultaneously?

Suppose we have a harddisk with 2 platters with characteristics below:     Rotational rate: 10, 000 RPM   Avg sectors/track: 1000   Surfaces: 4   Sector size: 512 bytes   I was reading "Computer Systems: A Programmer's Perspective 2ed" when I found that it calculates transfer time as if it only uses ONE head to read a sector. If that's the case, why not use 4 heads to write(read) on 4 surfaces? So when I write a 2K bytes file, each head should only need to wait for the platters to rotate just one sector length instead of 4, thus reducing the transfer time by a factor of 4. Or even redesign sector to make each sector on one cylinder but on 4 tracks residing same position respectively on 4 surfaces. Each one of (512/4) bytes. So when the hd needs to read a sector of 512 bytes, we only need the disk to rotate roughly 1/4 compare to original time.  The idea looks like RAID 0.


How to upload PDF file to server with Java/Kotlin?

I get an error like this after successfully selecting a PDF file. Anyone know how to solve it? 2021-06-09 09:02:17.638 7277-7277/team.getherfolg.capstone E/AndroidRuntime: FATAL EXCEPTION: main     Process: team.getherfolg.capstone, PID: 7277     java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=1, result=-1, data=Intent { dat=content://com.android.providers.downloads.documents/document/3964 flg=0x1 }} to activity {team.getherfolg.capstone/team.getherfolg.capstone.ui.pdfpreview.PDFPreviewActivity}: java.lang.NullPointerException         at android.app.ActivityThread.deliverResults(ActivityThread.java:5237)         at android.app.ActivityThread.handleSendResult(ActivityThread.java:5278)         at android.app.servertransaction.ActivityResultItem.execute(ActivityResultItem.java:51)     Caused by: java.lang.NullPointerException         at team.getherfolg.capstone.ui.pdfpreview.PDFPreviewActivity.displayFromFile(PDFPreviewActivity.kt:172)         at team.getherfolg.capstone.ui.pdfpreview.PDFPreviewActivity.onActivityResult(PDFPreviewActivity.kt:150)         at android.app.Activity.dispatchActivityResult(Activity.java:8294)  This is for line code 172 (Starting from pdfView!!) private fun displayFromFile(file: File) {     val uri = Uri.fromFile(File(file.absolutePath))     pdfFileName = getFileName(uri)      pdfView!!.fromFile(file)         .defaultPage(pageNumber)         .onPageChange(this)         .enableAnnotationRendering(true)         .onLoad(this)         .scrollHandle(DefaultScrollHandle(this))         .spacing(10)         .onPageError(this)         .load() }  This is for line code 150 (Starting from displayFromFile(file)) override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {         super.onActivityResult(requestCode, resultCode, data)          if (requestCode == FILE_PICKER_REQUEST_CODE && resultCode == RESULT_OK && data != null) {             val path: String = data.data.toString()             val file = File(path)              displayFromFile(file)              Log.d("Path: ", path)             pdfPath = path             Toast.makeText(this, "Picked file: $path", Toast.LENGTH_LONG).show()         }     }


Recent Green card holder. From US, how to Transfer money from my Indian SB AC to my recently opened checking account in US

Recent US Green card holder not NRI, as came to US just 2 months back.  After coming to US, how can I Transfer money from my own savings bank account in India (No NRE or NRO A/C) to my recently opened checking account in US?


How to display interface in tcpdump output flow?

This seems to be quite a trivial problem, but after some searching I can't stil figure out the answer. One can run tcpdump using "any" as the interface description, ie:   # tcpdump -i any -n host 192.168.0.1   Is there any way to force tcpdump to show on which interface displayed packet was captured?  Update:  As more people confirmed this is probably not possible with vanilla tcpdump, can someone propose a solution to mentioned problem? Perhaps different sniffer?   General issue is as follows: On a system with 50 interfaces determine what is inbound interface for packets coming from specific ip address.


Show records on userInput store PROCEDURE

I want to show records based on user input.   CREATE PROCEDURE [dbo].[ShowRecords]         @recordsToShow int     AS     BEGIN     select top @recordsToShow * from usermaster     END


Enable source code repositories (16.04 LTS)

How do I enable source code repositories in Ubuntu 16.04 LTS?   Note: THIS IS NOT A DUPLICATE, AS THE OTHER QUESTION WAS FOR A DIFFERENT VERSION OF UBUNTU.