Is it just better to stick with Stack Overflow over other QA Sites?

I recently found out it is inappropriate to  (I asked before doing it). After that, another question came to mind:  Since Stack Overflow seems to have a bigger community and you can ask questions on all sorts of topics related to technology (especially systems and programming), isn't it just better to stick to that one QA Site than spread your involvement with the other great QA Sites that Stack Exchange offers?  PS: I am new to the community, and this is a legitimate question.


I installed the  module and would like to customize the sitemap.  For example, I would like to exclude some nodes that have a certain term reference field. I would also like to be able to create separate sitemaps for each content type.  Is there a way to do that?  Otherwise I could probably generate the xml sitemaps with  module.


Does the flight time when booking a holiday online show the time you arrive in that country and its time zone?

I was wondering whether the time shown is the time I would be arriving in France so its time zone etc.  I know France is an hour ahead so not sure if I'm right in my assumption... It would be useful to know as I plan on traveling to the States and other European countries soon as well.


If time is relative, then how is the age of the universe calculated?

I am very new to the world of relativity, so the answer may be trivial, but to me measuring the age of the universe seems an impossibility due to there being no fixed frame of reference from which to measure it. I feel as though I understand the basic concept of how time dilates with velocity, and also with gravity, although I have no concept of how, or if the two are linked. Any help would be much appreciated, as I haven't found a well-explained answer anywhere.


Can I virtualize existing Android device?

Is there any way to convert existing Android device into virtual machine?  I'm going to do factory reset and pretty sure that some valuable passwords etc. will be lost after it. That's why it would be great to have old data saved in virtual machine on PC so that later these forgotten info can be accessed.


Installing Windows 7 on a MacBook Air, Early 2015

The issue: I have an issue with an MacBook Air that I need to install Windows 7 on. The problem is that this MacBook model  So I thought that I should instead install Windows without Boot Camp on the Mac hard drive. The problem is that when I boot the Windows 7 installation disk by pressing "Alt" at start up and choosing "EFI Boot" the loading screen freezes at "Windows is loading files..." just before it should start up. Also, the second before it freezes some tiny colorful lines appear in the upper right corner of the screen. The DVD that I am installing from is working good on other PCs and on an older MacBook Air.  I need to run Windows 7 on this one and visualization nor an another Windows version is not an option in this case.  What else that I have tried: I have tried with installing Windows 10 and then using the setup.exe file on the DVD to install Windows 7 but it freezes at a black screen in the first restart of the installation process. Also, I have tried with starting the installation DVD from  but that gives the same result as with the original Apple boot loader, where you press "Alt" at start up. Contacting Apple support does not give any assistance on how to install Windows 7 as it is not supported any more and they do not know any technical reason to why it isn't possible.  An internet search for the issue probably gave more information then they provided in an hour on the phone. In addition I have tried to boot the installer from both a external USB DVD reader and an USB flash drive.  My questions is: Is there any technical reason to why Apple choose to not support Windows 7? Is it possible to install Windows 7 in an another way? Any other ideas or suggestions (that is not running a PC instead or using visualization or an another Windows version)?  EDIT: Found  answer that says it is possible to do but it is also the only answer that I found which says that it is possible.


Find a formula for the nth Fibonacci Number

So I'm being asked to find a formula for the nth fibonacci number.    I know the answer is $$x_{n}=\frac{(1+5^{1/2})^{n} -(1-5^{1/2})^n}{\sqrt{5}2^n}$$  However I don't really know how to get there.  It seems so complicated and I need some help.


How do I install pip with Python 3.8.0a3 on Ubuntu 19.04

$ sudo apt install python3.8 [...] python3.8 is already the newest version (3.8.0~a3-2).  $ sudo apt install python3.8-pip Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package python3.8-pip E: Couldn't find any package by glob 'python3.8-pip' E: Couldn't find any package by regex 'python3.8-pip'  $ python3.8 -m pip /usr/bin/python3.8: No module named pip


Deleting duplicate rows with condition(Using SQL and LINQ)

I have a table with 5 columnsID,CPT4,CPT4Mod,ItemCharge,Eff_Date.   Deletion Condition:  When rows exists with duplicate CPT4and CPT4Mod field values but different ItemCharge and Eff_Date values, exclude all but the most recent Eff_Date records.  I need a query which can achieve this in two scenarios.   When CPT4Mod is given by the user. When  CPT4Mod is not given by the user.   Later I need to achieve the same using LINQ.


Using C# 8 e ASP.NET Core I have the following:    Context context = new Context();    Post post1 = new Post {     Enabled = true,     Title = "Some title"   };    Post post2 = post1;   post2.Enabled = false;    context.Posts.Add(post1);   context.Posts.Add(post2);   On context, which is an EF DBContext, I get only one post (post2);  Maybe I am wrong but I think I should Copy / Clone post1 to define post2.  Am I right? How to do this?


Rigorous proof for if $\operatorname{Corr}(X,Y) =1$ then $X = a Y + b$ with $a>0$

I know that if $X = a Y + b$ and $a>0$ then $\operatorname{Corr}=1$. it can be proved easily using the fact that $Cov(X,Y) = E(XY)-E(X)E(Y)$ and $\sigma^2_X =Var(X) = a^2 Var(Y) = a^2 \sigma^2_Y$ and $E(X) = a E(Y) + b$, and substituting $X = a Y + b$ in the covariance formula, and also the definition of correlation that $\operatorname{Corr}(X,Y) = \frac{\operatorname{Cov}(X,Y)}{\sigma_X \sigma_Y}$  But as I know, it is an "if and only if" relation (biconditional) and so we have that if $\operatorname{Corr}(X,Y) =1$ then $X = a Y + b$ with $a>0$. I can understand this intuitively but I don't know how to rigorously prove this.


Insert a space after a command: {}, vs \ , vs \space

I'm used to insert a space after a command by using the {}, e.g. \mycommand{} some other text, in order to circumvent the space-gobbling of commands.  I'm wondering if it's best or what are the specific drawbacks or differences between the following:  \mycommand{} some text  \mycommand\ some text  \mycommand\space some text   is it a matter of habit or do the spaces and mechanics differ?  Thanks


Is it possible to edit the Facebook lookback video?

Can you edit the Facebook "looking  back" video, swapping some pictures?   Trying to change some photos, does anyone get a prompt to do that anywhere?


Photos of people on an ad supported website

Can I take candid photos of people in publuc without their knowledge and post them on an ad supported blog or website?


Can you make a single roll multiple times?

I'm playing a 5e D&D homebrew campaign and we are all new to D&D, we don't know all the rules.  So I'm wondering: can you make a multiple rolls for one task? For example: I'm trying to spot something unusual on a ring and I get a low roll, then my DM says I didn't notice anything unusual then I say I try again then I get a higher roll and my DM says I saw that I saw. That seem a little odd, also when you fail a check and another player in the party tries to do that it doesn't seem realistic.


Converting from grades to gpa (with decimal)

I have this code:  int[][] stuGrades = {{97, 64, 75, 100, 21}}; //extract from data file  String[][] HWdata; // original data file for (int g = 0; g < stuGrades.length; g++) {     for (int p = 0; p < stuGrades[0].length; p++) {         int tempScores = stuGrades[g][p];         if (tempScores <= 100 && tempScores > 98.1) {             stuGpa[g][p] = 4.0;         }         else if (tempScores <= 98 && tempScores > 96.1) {             stuGpa[g][p] = 3.9;         }     } }   My goal is to convert the grades array {97, 64, 75, 100, 21} to a new GPA array, which will convert the score to 4.0, 3.9 or something else. I got this error:     Exception in thread "main" java.lang.NullPointerException at homework7.main.    How can I resolve this issue?


In a CNN is not it better to apply the activation function after the pooling layer rather than after the convolutional layer?

Also convolutional-pooling layers need an activation function to introduce non-linearities in order to learn complex features. Applying an activation function (typically one the ReLu families is used) after the pooling layer or between the convolutional layer and the pooling layer does not change the result since these functions are increasing. However I was thinking since the pooling layer compress the information and the output will be of lower dimensions, applying the activation functions after the pooling layer should save some computations. Is that so? Is activation functions in practice applied after or before pooling layer?


How to add a word at the first of every lines?

File1:  Data will be inserted on Thursday   Messages has been sent at 6pm   Office hours is from 9am to 6pm   All the employees are present     Output what I want:  DMS Data will be inserted on Thursday   DMS Messages has been sent at 6pm   DMS Office hours is from 9am to 6pm   DMS All the employees are present     -or-  Output what I want:  Data will be inserted on Thursday DMS Messages has been sent at 6pm DMS Office hours is from 9am to 6pm DMS All the employees are present DMS   I want to add the word DMS in every lines of my file. It may be added at the first or at the end of the line.


What were Saruman's most despicable deeds, and which is the worst?

"If that was so, it was a shameful deed; but not his (Saruman's) worst." Unfinished Tales - Part III, The Third Age: The Disaster of the Gladden Fields  Saruman, in his 'fall from grace', did a lot of despicable stuff. In this quote, it seems to imply that one of his deeds were known as his worst. I do know that Saruman was not originally evil, but upon being seduced by the One Ring he did many shameful deeds. What are the most despicable of these deeds that he performed?


How to divide a list in equal size of a certain number and get the average of values in Python?

I have a list of 248 values that looks like this: lst = [10.0, 7.4, 8.2, 8.8, 7.4,.... ] I want to get the average of every 8 value. Such as it will be divided to 31 sub lists and will have the average of every list. This is what I have for now but I have to write this 31 times if I use this method. Can someone point me to an easier and more efficient way? num1 = 0 for i in range (8):     num += float(lst[i]) print(num1/8)   num2 = 0  for i in range (8, 16):     num += float(lst[i]) print(num2/8)


Let $f(x) = 2x + \cos{x}$.    Calculate $f^{-1}(1)$; Supposing that $f^{-1}$ is differentiable, show that $(f^{-1})^{\prime}(1) = \dfrac{1}{2}$.   Thanks for the help :]


Why is the image for the new SE blog misaligned when the message one-boxes?

I would've gone for some freehand if there already weren't outlined with the help of the SE chat UI. As you can see, the image is misaligned, and thus  the realm of the next message.  So, why does it happen? Is a fix coming or have we found a way to surprise people in other SE chatrooms?


How do you convert a custom-item /give command into a villager trade? (in general)

I know this is similar to many other questions out there, but I just wanted to ask not only how to convert a custom-made item into a villager trade, but also if there is a general way to convert said items into trades simply by tweaking parts of the command. When I say "custom-made item", I am referring to items that have a custom name, custom lore, and optionally also custom enchants, HideFlags, the Unbreakable tag, and modifiers. I am only focusing on items that have these things, nothing else. Additionally, I will only be focusing on vanilla singleplayer 1.14. This is an example item showing what a custom item will have.  /give @p minecraft:coarse_dirt{display:{Name:'{"text":"Example name","color":"gold","bold":true,"italic":true}',Lore:['{"text":"Example lore","color":"dark_aqua","bold":false,"italic":true,"underlined":true}','{"text":"This item has the Unbreakable tag and a custom modifier.","color":"aqua"}']},Unbreakable:1b,Enchantments:[{id:"minecraft:protection",lvl:10s}],AttributeModifiers:[{AttributeName:"generic.maxHealth",Name:"generic.maxHealth",Amount:0.01,Operation:1,UUIDLeast:961281,UUIDMost:716413,Slot:"mainhand"}]} 1 Essentially, I have made a /give command that gives me a villager spawn egg who has a custom name, custom lore, the Unbreakable tag, and an enchantment / HideFlag for enchants to make the item have a "glow effect". This villager then also has one trade, where it trades a "custom item" for a different "custom item". After making it in MCStacker and testing it in a creative vanilla 1.14 world, you can see that the command is 100% working.    The only things that I have specified otherwise for this trader are its profession, what biome variant it is, and its level. Pastebin link to command:  I made this in MCStacker, so you can see what the command has by copying the command from the Pastebin, then go to , Import > paste the command in > hit Import again. How could I make this /give command into a tradable item in a trader? I've tried pasting everything after "/give @p" into a trade command, but it wasn't working. Do I need to add "tag:" or something else to make it work? Or will I have to completely remake the villager spawn egg as a trade instead for it to work in a trader?


Subject-verb agreement with metric units of measurement

About 500 cm3 of the Herschelite was hydrated at 80% RH. About 500 cm3 of the Herschelite were hydrated at 80% RH.   Could someone advise me about which of the two sentences have the correct verb agreement and why? Also, what is the subject of the sentence--is it "500 cm3" or "Herschelite"?


Why are some nouns countable and others uncountable?

I'm having trouble articulating what it is I'm looking for, so I'll start with an example.      Candy is delicious.       Candies are delicious.      Vegetables are delicious.      Fruit is delicious.   So, I guess, when referring to a general category or group of things, are there any rules for which ones become plural, which remain singular, and which can be expressed either way?  I was trying to explain to a student why you'd say "prepositions are challenging to learn", and not, "preposition is challenging to learn", and I've come up short.  Any insight would be welcome!


I'm really confused.  In M theory/String theory, the fundamental objects are M/D branes. However, branes by defintion are just solitons. Solitons are just waves that maintain there shape.  So if a brane is a soliton wave, then what is it a wave of? Would it be the excitation of a field?


I have two repositories: Xenial (Ubuntu 16.04) and Focal (Ubuntu 20.04). Those are totally in conflict

I don't know how to delete all Xenial repositories. I have added in the links of this question two images of what my terminal shows


How to make Stored Queries for WFS 2.0.0 in Geoserver

I am a new user of Geoserver. I have created a WFS and also could connect it with the QGIS WFS  2.0.0 Client plugin available now. But as like the default WFS link in that plugin I am not able to make a query in my service. Also the metadata is not coming for my service. Can anyone help me in this regards?  What do I actually have to do to make the stored queries and also to get metadata? Where to start doing that?


I'm Creating some nodes through python script. The problem is that all the nodes are overlapping each over. I just wanna programatically re position those nodes. How to do this?   imgtx1 = nodes.new('ShaderNodeTexImage')  imgtx2 = nodes.new('ShaderNodeTexImage')   Just consider these 2 nodes as of now. Thanks in advance!


The following MWE:  \documentclass{article}  \usepackage{tikz}     \usetikzlibrary{%         decorations.pathreplacing,         calligraphy     }  \begin{document}  \thispagestyle{empty}  \tikz \draw[                 ultra thick,                 decorate,                 decoration={                     calligraphic brace,                     amplitude=1.5mm                 }             ](0,0) -- (4in,0);%  \end{document}   generates the following warnings:  ************************************************* * LaTeX warning: "kernel/invalid-variant" *  * Variant form 'nnV' invalid for base form '\spath_get:nnN'. ************************************************* ************************************************* * LaTeX warning: "kernel/invalid-variant" *  * Variant form 'VnV' invalid for base form '\spath_get:nnN'. *************************************************   This happens when the tikzlibrary calligraphy is loaded. I realize that these are just LaTeX 3 warnings (the code produces output as expected), but I would like to make sure that this is not the prelude to something more serious in the future. (MacTeX 2017, updated this morning.)


Word/phrase/etc. to refer to that one action of constantly pointing out other people’s mistake/(so-called) flaws to their face

I’m looking for a word/phrase/etc. to refer to that action/activity of constantly pointing out certain mistake/(so-called) flaw to the person having that flaw/doing the mentioned mistake. For example, I’m fat and I feel perfectly fine with being fat. But somehow my friend constantly tell me “Look at you, so fat” or “How about dieting?” or “You eat a lot, no wonder you’re fat.” Or I can’t use computer and I don’t mind not being able to operate it but my co-worker constantly tells me “You can’t use a computer” or “How sad, you don’t know how to use a computer.” and it happens every time we meet. Like they constantly slap the fact that I’m fat/I can’t use a computer to my face. However, I don’t think “to slap sth. to someone’s face” is the one I’m looking for. Edit: I think I’ve found it: “to rub something in someone’s face.” But please correct me if you think it’s not the one.


Is there any way to stop a window's title bar merging with the panel when maximised?

I'm working on a desktop machine with plenty of screen real-estate, so I don't need my windows' title bars to merge with the global menu bar when the windows are maximised. Moreover, I'm working on a dual-screen set-up, so the fact that a window is maximised doesn't mean that it's the only window visible.  Before Unity I'd switch to a maximised window by clicking on its title bar, or close the window, even though it isn't focused, by clicking on its close button; I can no longer do this because the title bar is missing and the global menu bar is empty on that screen. This isn't a huge problem - I can click on some of the window's chrome to focus it - but it's unintuitive and it's forcing me to relearn my mousing behaviour.  I'd like to turn-off the merging of title and global menu bars, but how?  EDIT:  I simply want the title bar of the window NOT to merge with the top panel whenever I maximize a Window. The global menu should stay in the top panel as far as I am concerned. Current it maximizes like this     I want it to maximize like this (In that screeny the unmaximized Window has been resized to take rest of the space)


Generate 4-digit number without random class

I am trying to generate a random 4-digit number using the Java Math.random method. The number must always be 4 digits, i.e., allow for results such as 0001, or 0023, or 0123 to be possible. However, the traditional Math.random method formula below only allows numbers less than 1000 to be 1, 23, or 123.   int i = (int)(Math.random()*10000);    Is there a way to do this using math.random and/or loops? Thank you, in advance, for any suggestions.   I tried researching how to ensure the 4-digit number always has 4 digits, but all results seem to suggest using Random class, or min/max.  I DO NOT want to use this random class or max/min code as I have not yet studied it yet.


My textbook says:     Frobenius norm defined on $\mathbb{R}^{m,n}$ by a formula: $$\|A\|_F=\sqrt{\sum_{i=1}^n\sum_{j=1}^m|a_{i,j}|^2}$$   when $n>1, \ m>1$ is not induced by any vector's $p$-norm.   But there is no proof. I searched over the Internet and didn't find one. Is it very hard to prove? I would be very grateful for help.


After seeing the results obtained with LuxRender , I was curious to try and reproduce beautiful caustics in Cycles such as these:    I created a scene and added some lights, following the advice given  to create the materials, and also trying out other materials.  I find it hard to find much documentation on caustics within Cycles; some people advise to use Sun Lamps, some other recommend emitter planes. Sometimes large emitter planes seem to work, sometimes people recommend smaller emitter planes. Besides from this confusion, in my various tests, the light that goes through the objects and hits the ground plane is usually very diffuse, of an evenly brightness, and doesn't have many sharp areas.  Here's an example of what I get the closest I get being the shape on the left):    Moreover, in the example given above, caustics appear on two sides of the object, probably due to the light bouncing inside the object and being projected out on both sides.  How should I set up materials and lights for sharp and realistic caustics, in Cycles?  File:


Is there any way to find out the motherboard for my dell e6420 without opening the machine?  I want to find out the maximum and type of ram.


The question is to find $\lim\limits_{n\to\infty} \cos \frac{x}{2} \cdot \cos \frac{x}{2^2} \cdot \cos \frac{x}{2^3}\cdot\cdot\cdot \cos \frac{x}{2^n}$.  I first thought of several facts: 1). $-1 \leq \cos(a) \leq 1$ (From this I know the sequence is also bounded by -1 and 1) 2). $\cos(0) = 1$ (This is what the items in the sequence tend to, as n becomes bigger) 3). When $x=0$, the limit is 1.    Then I failed to think more and the above do not get me anywhere close to finding the limit...    Can anybody teach me how to find the limit of this sequence? Thanks a lot.


How exactly does potential difference remain the same across the branches in a parallel connection of capacitors?

I understand how charges  get distributed across the branches in parallel connection of capacitors and how they remain the same in series connection. But I am not able to get an intuition in the equivalence of potential difference across branches in parallel connection.I understand the explanation using  Kirchhoff's voltage law but is there a more fundamental explanation to it?


Turkey transit visa for a stateless person?

I am a stateless person but I am a resident of Uzbekistan. I am going to visit Bulgaria on the 16th of August this year. Unfortunately there is no direct flight to Bulgaria so I have to fly through Istanbul. In this connection do I need a Turkey transit visa if I only stay in Turkish International Airports for not more than 3 hours waiting for my next connecting flight? If so, how long will consider my deal? And how can I speed up the process of getting transit visa? Can I get the visa in the airport? How much will it cost?


What does greater than and ampersand mean in a bash statement?

For example, if I have a statement: /home/1/test.sh > /home/1/test.log 2>&1  What does the last part of this do effectively? Thanks.


What is the difference between \\, \par, and blank line

Checking today , they talk about the difference between \\, \par, and even a new line. And that people does not know the difference. And indeed, I don't know it.  Can you enlight me? And explain the main differences and good uses practices of each (if relevant?.   Related to this one is , but in there there is not an in depth differentiation (which I will like to know), and don't talk about \par or even blank lines.


I know I can check this using congruence, which is how I should be approaching this problem.  There are so many ways I can go about the problem, but I keep getting stuck on the $11^{106}$ term.  To reduce the exponent I have tried many things: I know $11^{106}\equiv -2^{106}\pmod {13}$ Which I can then make into $-2^{106}\equiv 4^{53}\pmod {13}$, but because 106 only has factors of 1, 2, 53 and 106 I have no idea how to reduce to make the number feasible to work with.  Obviously doing without calculator, any help is appreciated.


Is there any way to tell Google to display the updated title instead of displaying the old blog title in search results?

As a matter of optimization, a few weeks ago I modified the way the titles of my blog posts are displayed (I made a change also in the title of the blog). Then I used the Google Webmaster Tools to re-index the old pages and update titles. Immediately I could update the titles and posts appear correctly on Google.  The problem is that now the titles of posts began to appear incorrectly in the search, using the old blog title. Some posts continue to display the updated title, but many recent posts show the old title.  I've tried re-index the pages with Google Webmaster Tools, but the titles remain unchanged in the search results.  Is there any way to "force" Google to display the correct titles?


What is a complete list of the usual assumptions for linear regression?

What are the usual assumptions for linear regression?   Do they include:   a linear relationship between the independent and dependent variable independent errors normal distribution of errors homoscedasticity   Are there any others?


How to install a font in texlive 2017 (mac)?

I'm running texlive 2017 on Mac OSX Sierra.  Could anyone tell me how to install a font? It was bought commercially some time ago, and is not available on the CTAN server so can't be installed using getnonfreefonts. I have .tfm, .pfb, .enc files and a .map file.


Winter maintenance before putting bike in winter storage?

What kind of maintenance should I do before putting my bike into storage for the winter?  Are there any special considerations for storing it?  Does temperature matter?  If it's hanging on the wall from the rim all winter long, will that affect the shape of my rims?  Any other winter storage advice would be nice to hear.


This is a coding question.Here we have to find the $k$-th value in which we get $888$ as the last three numbers for a cube of a number. For example, if $k=1$ the first value with last three numbers as $888$ is $192 ^3$.Then if $k=2$ the second value with last three numbers as $888$ is $442 ^3$. After checking the solution for the problem they arrived at this formula   answer = $192+(k-1)250$.   My question is how did you arrive at this formula and how do you tackle math problems where you need to find n last digits.I know cyclicity is one of the methods but that is used to find the last digit.In this case i have to find the last three digits.


Planet Colonization book with benevolent AI

I am looking for the name of this series.   It starts with an intelligent ship and a crew of engineers that get a planet ready for colonization. After all of the engineers die the ship remains in space and watches the humans that were seeded on the planet. The humans on the planet know nothing of technology and come up with their own religions and customs similar to medieval times on Earth.   The book starts out as scifi but kind of descends into a fantasy series sprinkled with scifi.


Why is $[0, 1] \cap \mathbb{Q}$ not compact in $\mathbb{Q}$?

Statement: $[a, b] \cap \mathbb{Q}$ in $\mathbb{Q}$ is not compact. Thus the interior of all compact subsets of $\mathbb{Q}$ is $\emptyset$.   I am trying to understand the first sentence. I read that a closed subspace of a compact space is compact, so for example, consider the unit interval $[0, 1]$ which is a compact space. Take a closed subspace $[0, 1] \cap \mathbb{Q}$ of $[0, 1]$. This set is closed since it just consists of all the rational numbers in between $0$ and $1$, including $0$ and $1$. So it is a closed subspace of a compact space. But why isn't this compact?


I bought a bag of brown rice from a store. After having opened and used for a while, I found there were moths flying in the house. At the same time, I found worms in the rice. I suspect that the moths are from the worms(rice-size, white body, dark head). I guess but am not sure if they are called rice moths. There were also many little sand-like things in the rice bag, are they the eggs of the rice moths?  Will eating this infested rice pose a health risk?


How to generate random positive and negative numbers in Java

I am trying to generate random integers over the range (-32768, 32767) of the primitive data type short. The java Random object only generates positive numbers. How would I go about randomly creating numbers on that interval? Thanks.


I will be travelling to China this April (more specifically, I will be going to Chengdu).  As I would need to keep myself updated all the time, and I would need to access facebook and other websites that China blocks, I am planning to buy a VPN package in conjunction with a China SIM card with 3G coverage.  Do you guys have any experience on this? Any VPN and China SIM card that you can recommend?


Tracking down where disk space has gone on Linux?

When administering Linux systems I often find myself struggling to track down the culprit after a partition goes full. I normally use du / | sort -nr but on a large filesystem this takes a long time before any results are returned.  Also, this is usually successful in highlighting the worst offender but I've often found myself resorting to du without the sort in more subtle cases and then had to trawl through the output.  I'd prefer a command line solution which relies on standard Linux commands since I have to administer quite a few systems and installing new software is a hassle (especially when out of disk space!)


In my HTMl file, I am trying to populate a span text zone with some voice-recognized text. I am struggling with one thing here:  Auto-scroll on the span zone:     Javascript code:  var final_span = document.getElementById("final_span"); finalDiv.innerHTML += '&nbsp' + data + '
'; finalDiv.scrollTop = finalDiv.scrollHeight;    The data inside the JavaScript keeps increasing, but when it exceeds the span limit, a scroll bar on the right appears because of the CSS code I wrote:   overflow-y: scroll; I would like to build it as auto-scroll until the bottom when text exceeds.  Thanks for your time.


Letter of recommendation from Post-Doc or Professor

I was guided by a Post-Doc for my undergraduate thesis, but the one responsible for all and offering the thesis was a Professor, who I only talked to when discussing the thesis, agreeing to it, and the explanation of the grade in the end. Who of both would be the one to ask for a letter of recommendation? More general, should you always ask the person with who one was mostly in contact during work, or the person responsible for it all, if they are not the same person?


Making pen and ink corrections on a UK visa form?

After printing out a UK visa form, can you cross out planned arrival date with a pen and write a new one?


Program received signal SIGSEGV, Segmentation fault - Pointers' Issues

I am trying to copy a character pointer's value to new character pointer. It is giving me Segmentation Fault at line number 8. But i have already initialized my another pointer where i want to copy first pointer's value. Why this error is occurring even if it is (second pointer) not non-allocated memory ?  #include<stdio.h>  int main(){     char *source = "Hey You Boy!";     char *target = '\0';      while(*source != '\0'){         *target = *source;         source++;         target++;     }     *target = '\0';      printf("In Target ->");      while(*target != '\0'){         printf("%c",  *target);         target++;     }     return 0; }


My first transformer causing safe fuse to go out

I found a fairly big, old transformer. I unwinded all the coils and winded them again. My primary coil has 20 turns, and the secondary coil has 200 turns. I didn't use any tools while doing this, so it isn't precisely woud.  Now, when connecting this transformer directly into the power outlet, the power fuse goes out. I have 3 theories for why this is happening:   Maybe I shouldn't connect the transformer directly into the outlet - do I need to put something "in between" the transformer and the power outlet? Maybe I am connecting the transformer in a wrong way? Currently I connect it by putting first primary coil wire into first hole in my power outlet, and second primary coil wire into second outlet hole. Is it possible that there is something wrong with the wires? I put isolation tape all over the primary coil so that those two won't touch.    What is wrong with my transformer?


It's hard to understand the difference between uniformly continuous function and continuous function.  So if A is a uniformly continuous function on X  and if B is a continuous function on X,  the only difference is that we can find one common delta value >0 that applied to epilson-delta conditions for all x values on X in A   while there is no such common delta value in B?


Conditional expectation equals random variable almost sure

Let $X$ be in $\mathfrak{L}^1(\Omega,\mathfrak{F},P)$ and $\mathfrak{G}\subset \mathfrak{F}$.  Prove that if $X$ and $E(X|\mathfrak{G})$ have same distribution, then they are equal almost surely.  I know what I have to show, that $X$ is $\mathfrak{G}$ measurable, but I don't know how...


An outside site seems to have crawled, scraped, and translated Stack Exchange questions; what to do?

I was curious how often I'd used a couple of idiosyncratic terms in my answers, so I googled them together and was surprised to see them on an external site, having survived a translation into Spanish.      The site appears to have translated portions of arqade.se and rpg.se. As someone who only speaks one language; that is, an American, I have no idea if their attribution or operation is in keeping with Stack Exchange fair-use guidelines. I was hoping someone more conversant could take a look around.


In Django generic views, there's slug_field, and slug_url_kwarg. In this context, what is the definition of slug?  I choose the more persuasive explanation within items of 3 dictionaries.  In Cambridge dictionary:     A piece of metal used instead of a coin for putting in machines   In MW:      A disk for insertion in a slot machine; especially :one used illegally instead of a coin   In Oxford:     A part of a URL which identifies a particular page on a website in a form readable by users.   They don't seem to make sense.


Don't close the flag dialog when I'm in the middle of typing something in a textbox

Sometimes when in the middle of writing a custom moderator flag, I click outside the flag dialog, for example because I want to get a link to one of the answers. This closes the flag dialog and forces me to write my message all over again, which is rather annoying. Therefore, I propose that clicking outside the flag dialog don't close it when I'm in the middle of typing something in a textbox (a custom moderator flag, a custom close reason, etc.).


I recently bought an HP laptop. I'm pleased with it, save for one thing.  All the F1-12 keys are inverted. I mean the following:  All the F-keys have a symbol on it. Normally you would press Fn + your to use it. On this laptop, it's reversed. The symbol is what you get when you press the button normally and you have to press Fn + F-key to get the usual action.  So, if I want to refresh a webpage, instead of just F5, I have to do Fn + F5  I want to change this to regular behavior. Anybody know how I can do this?  Running Win7 Home premium, 64-bit.


For some reason, after I install Ubuntu 16.04 on my desktop and laptop, after a while I'm getting a message and I can't do anything anymore. I searched online about my problem, I asked some other "Ubuntu" guys, but nobody could help me at all.   I have dual boot with Windows 10, and openSUSE 42.1 and Fedora 24-1.2 are working just fine. Everything based on Ubuntu 16.04 doesn't work for me.   Today, after 2 months of using openSUSE 42.1 without a problem, I tried Ubuntu again. But this time I tried 16.04.1 and I got the same message.  I attached here the message I'm getting, maybe someone can help me with my problem.    Thank you in advance!    @roema  Thank you for taking the time to answer me.   I tried to find one of those options in Bios, but apparently there's no "secure chip" or "secure boot" anywhere in there. The BIOS version was 2.15 (now is upgraded to 2.29), Aptio Setup Utility version is 2.10.1208 and here is the system that has the above problem.    Thank you again for your suggestions.  P.S. I upgraded the BIOS, but I still can't find any of those two options. Is there any way I can resolve this problem?


had in result clause of second conditional

I read this sentence today:  If I were five years old again, I would sleep in every Saturday while I still had the chance!  I am confused why is had used in the last part. When the first part is referring to a hypothetical present/future then how can the last part be in past tense.


I am trying to extract out the content within the tags using regex expression in java listed below. I have been trying to get the paragraph context within the tags but can't get it out.     Some text without tags here...    <question1>    Paragraph 1...     Paragraph 2...     </question1>      Some text without tags here...    <question2>     Paragraph 1...     Paragraph 2...    </question2>      Some text without tags here...   The above tags and contents are stored in a string variable: stringToSearch. The following are my codes.   Pattern p = Pattern.compile("<question1>(.*)</question1>"); Matcher a = p.matcher(stringToSearch);                         System.out.print("\n Matching pattern..."); //                          Search the patterns in string                             if (a.find()) {                                 String codeGroup = a.group(1);                                 System.out.format("'%s'\n", codeGroup);                             }       However i am unable to get the tags which i suspect is due to the new lines that may appear within the Paragraphs. Reason for reg expression and not xml parser is due to the environment that i may have to use |question| |/question| or [[question]] [[/question]] special symbols.


How can I make a peer-to-peer multiplayer game?

How can I make a p2p multiplayer game? I would like to have a server-less multiplayer game. But then, how all the clients know each other?  Why the p2p-protocol is so famous in file transfer but not in multiplayer games?


I have got an mp3 file, let's say it is 25 minutes long. I understand that any software is capable of extracting the first 20 minutes of the file as a new MP3 file. However, I would like to find a solution that would do this "loss-lessly", i.e., keep the original MP3 blocks and just use the first 4/5 of the blocks and modify the header accordingly. This way, no quality loss is imposed by the extraction process. I'm cutting the file in a space where couple seconds of silence happen, so cutting between blocks should be possible.  (A good analogy would be to take a cut-out of a JPG file at the boundaries of the blocks simply by taking only the blocks inside the cutout. One can decode the file, cut it and encode it again, but with a quality loss.)  (As far as I know, by default, software would decode the file into a waveform, extract the demanded part and encode it again using the MP3 algorithm. This is not what I want, since the 2nd compression unnecessarily reduces the quality.)  (I prefer a linux solution, but I can access windows as well.)


Can't start Mac in recovery mode - only get folder with question mark instead

I can't start my MacBook Pro 2017 using controlR, controloptionR, or shiftcontroloptionR.   For all combinations I only get the folder with a question mark shown.  What can it mean and how can I fix it?


Are you unofficially a PhD holder after passing viva voce for PhD?

In my university, after passing a viva voce examination, it will take more than 3 months before the university issues an official letter/transcript/certificate to certify that one is officially a PhD holder. Of course, after PhD viva, it will take some time to perform correction as stipulated by examiners. It can be major/minor correction. After a PhD candidate passes viva exam, is she/he unofficially a PhD holder? Considering that one has yet to successfully correct one's thesis as instructed by examiners during viva exam.


I am unable to install mssql-tools  sudo apt-get install mssql-tools   It gives the error:  E: unable to locate   How can I fix this?


Why don't the satiltes fall into the earth?

Still, I don't understand how come the satellites won't fall into earth. I know the general explanation to this question is that the satellite's horizontal velocity is too fast that makes the gravity impossible to pull it to the earth.  This, for me, sounds like the gravitational force need to take a few moments to sense the existence of this object and then pull it downward, just right at the moment the earth notice the object and begin to pull it for its position, it had already moved to another place.   Well, I think since the vertical velocity id independent of horizontal velocity, therefore, no matter how fast the horizontal speed is, it will not prevent the gravity to pull it straight down to the earth, isn't it?   can someone point out what's wrong with my understanding here?


Sequence which converges pointwise but not uniformly?

it might be simple but I don't find a sequence $f_n: [0,1] \rightarrow \mathbb{R}, n \in \mathbb{N}$ that converges pointwise but not uniformly.  First I thought it could be $f_n(x) = \frac{x}{n}$ but it is not right, is it?  Thanks for help!


I installed linux ubuntu last month and everything got messed up . When I first tried it , everything works fine. It's fast and convenient so I decided to install it permanently but after permanently installing it , my computer hangs frequently and then one day, when I turned on my pc, the computer isn't logging in . Then there is this . . . GRUB Rescue > No Partition . Can I install windows again ? if yes then how ?


What is the best way to combine tikz pictures and beamer overlays

I am currently working on a conference presentation and I am using the very nice tikz and pgfplotspackages in combination with beamer.  To stress out some content in my figures, I use beamer's overlay system.  When I use some small tikzpictures everything is integrated inside the document using some \input commands. However, for large pgfplots figures (you see me coming), I have quite long compilation times.  My current solution is to precompile my big pictures separately using multiple tikzpictures and to call some \includegraphics with overlay options.  Beamer code  \documentclass{beamer} \begin{document} \begin{frame} \includegraphics<1>[page=1]{image} \includegraphics<2>[page=2]{image} \includegraphics<3->[page=3]{image} \end{frame} \end{document}   where image is built using   \documentclass[tikz]{standalone} \begin{document} \begin{tikzpicture}     \begin{axis}[]     % Plot to be displayed on overlay 1         \addplot[domain=0:1,samples=100]{x};      \end{axis} \end{tikzpicture} \begin{tikzpicture}     \begin{axis}[]         % Plots to be displayed on overlay 2         \addplot[domain=0:1,samples=100]{x};          \addplot[domain=0:1,samples=100]{x^2};      \end{axis} \end{tikzpicture} % And so on \end{document}   I know there are some externalization ways to do this, but I was wondering what the opinion of the community was on this matter.  Sorry in advance, if this is a double.  EDIT related to standalone beamer option   Using standalone with the beamer option seems to produce an nteresting result (thanks samcarter). However, the output has the size of a beamer frame, instead of fitting the pgfplots axis. See the MWE below.  \documentclass[beamer]{standalone} \usepackage{pgfplots} \begin{document} \begin{standaloneframe} \begin{tikzpicture} \begin{axis}[] \only<1>{\addplot[domain=0:1, samples=100]{x};} \addplot[domain=0:1, samples=100]{x^2}; \addplot[domain=0:1, samples=100]{x^3}; \only<4>{\addplot[domain=0:1, samples=100]{x^4}}; \end{axis} \end{tikzpicture} \end{standaloneframe} \end{document}


I'm new to Linux. I got the "Unix And Linux System Administration Handbook" It speaks of several verisons of linux and unix, and the commands for viewing linux man pages and not specific to ubuntu.   How do I view the manpages?


Binding the meta key (a.k.a. super key / Windows key) to left click

How can I bind the meta key (a.k.a.  / Windows key) to a left click? Hitting the meta key should trigger a left click, and pressing down on it should allow me to drag and drop (just like it would do when holding down left click).  I tried using System Preferences -> Shortcuts and Gestures:    but I cannot set "meta" alone as being a shortcut.  I use Kubuntu 14.10 Plasma 4.   (On Windows 7 SP1 x64 Ultimate I can achieve that using the program .)


How do I install the latest version of Chromium in Ubuntu 13.10?

Previously , however all of the answers are wrong -- including the chosen one. So, let's try it again. (I've specified the Ubuntu version number at the top to indicate the newness of this one). I'm coming at this as someone who has just installed Ubuntu and truly wants the latest version of Chromium. Currently, the most recent version of Chromium is Version 30. PPAs that don't work and should not be suggested:  ppa:a-v-shkop/chromium As of writing, this PPA only supports  and . It hasn't been updated in three months.   As of writing, this PPA only supports . This PPA is so outdated  that I've submitted a .   As of writing, this PPA only supports . It hasn't been updated in 11 months.


JsonMappingException: (was NullPointerException) through reference chain: Request["requestId"]

I am getting this null pointer exception on the id of the newly created object that I'm putting into  the DB, even though it should be auto generated.  @Entity @Table(name = "REQUEST") @EntityListeners(DatabaseListener.class) @JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "requestId", scope = Request.class) public class Request implements Serializable {      private static final long serialVersionUID = 1L;      @Id     @GeneratedValue(strategy = GenerationType.AUTO)     @Column(name = "REQUEST_ID", nullable = false)     private Long requestId;      @Column(name = "REQUEST_NAME")     private String name;      @Column(name = "CATEGORY")     private String category;      @Column(name = "REQUEST_MESSAGE")     private String requestMessage;      @Column(name = "CREATED_ON")     private Date createdOn;      @ManyToOne     private User createdBy;      @ManyToOne     private User assignedTo;      @ManyToOne     private Status status;      @OneToMany(mappedBy = "request", fetch = FetchType.EAGER)     private List<Response> replies;   The endpoint that I am calling...  @RequestMapping(value = "/requests/addRequest", method = RequestMethod.POST) public ResponseEntity<Request> addRequest(@RequestBody final Request request) {     if(request.getStatus() == null){         request.setStatus(request.getAssignedTo() == null ? statusRepo.findByType(StatusType.UNASSIGNED) : statusRepo.findByType(StatusType.ASSIGNED));     }      final Request saved = requestRepo.save(request);      return new ResponseEntity<>(saved, HttpStatus.CREATED); }   I can add more of the other classes if needed as well. But I can not figure out why requestId would be null. I'm calling that enpoint from an app and passing it a Request object, so obviously there it is null but it shouldn't be null when it's going into the DB. Right?   org.springframework.http.converter.HttpMessageNotReadableException: Could not read document: (was java.lang.NullPointerException) (through reference chain: Request["requestId"]); nested exception is com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain: Request["requestId"]) ... Caused by: com.fasterxml.jackson.databind.JsonMappingException: (was java.lang.NullPointerException) (through reference chain:Request["requestId"]) ... Caused by: java.lang.NullPointerException: null     at com.fasterxml.jackson.annotation.ObjectIdGenerator$IdKey.<init>(ObjectIdGenerator.java:125) ~[jackson-annotations-2.4.0.jar:2.4.0]   Edit: To be clear, I know what a null pointer exception is, I understand that the requestId is null and that is causing a problem, so I don't think this is a duplicate question. What I don't understand is why it is null. It should be auto generated, but as Jason pointed out, I may have to determine the id application side first.


I am using TeXstudio. When I click compile I am receiving an error message that reads 'File 'enumitem.sty' not found. \usepackage.' I am not sure what has happened because everything worked fine last week. It appears to not be loading the package and I don't know why. I would be very appreciative of any assistance, please.


Are unwilling Changeling PCs from "Eberron: Rising from the Last War" now immune to the Polymorph spell?

In the original question , it was decided that because Changelings didn't have the Shapeshifter trait (though the answer should have said Shapechanger), the  spell would still work on them. Now, with the release of Eberron: Rising from the Last War, Changelings have the following trait:  Shapechanger. As an action, you can change your appearance and your voice. You determine the specifics of the changes, including your coloration, hair length, and sex. You can also adjust your height and weight, but not so much that your size changes. You can make yourself appear as a member of another race, though none of your game statistics change. You can't duplicate the appearance of a creature you've never seen, and you must adopt a form that has the same basic arrangement of limbs that you have. Your clothing and equipment aren't changed by this trait. You stay in this new form until you use an action to revert to your true form or until you die.  And with Polymorph's description:  This spell transforms a creature that you can see within range into a new form. An unwilling creature must make a Wisdom saving throw to avoid the effect. The spell has no effect on a shapechanger or a creature with 0 hit points.  With Changelings actually having this trait, do they automatically pass Polymorph's saving throw and remain unaffected? This only pertaining to unwilling Changelings, of course.


I don't care if I mess up the system (which is likely if I do things like this), or the potential security issues that this could imply. Note, that I don't just want to "", but run my GUI from bottom-up as root. I don't want to type my password for anything but just for login and have total control over it.  Of course, I want any application running as root, like Firefox, LibreOffice, etc. without having to mess up with the terminal. So, how do I do this?     This question tries to address users that do not like the current permission system with root being separated from normal users. I do not endorse such behaviors, but if a user wants to, for whatever reason, this question should fit their corncerns.   Not advisable for new users


Prove that the Interior of the Boundary is Empty

Suppose X is a Metric Space  Let S $\subset X$  Prove that if S is Closed then, the Interior of the Boundary of S is Empty  Totally stuck on how to solve this.


Expanded usercard not truncated correctly

When I expand my usercard on Super User, I see the following:    The last link at the bottom is a link to my Google+ profile. The plain-text for which is:  • google+: [Oliver Salzburg](https://plus.google.com/+OliverSalzburg)   The google+: part is replaced by ellipsis in the usercard, but the link is still rendered.


How to calculate $|\operatorname {SL}_2(\mathbb Z/N\mathbb Z)|$?

the answer should be $$|\operatorname {SL}_2(\mathbb Z/N\mathbb Z)|=N^{3}\prod_{p|N}(1-{1 /p^2})$$ But first how to prove $$|\operatorname {SL}_2(\mathbb Z/p^e\mathbb Z)|=p^{3e}(1-{1 /p^2})$$


Good reference on "abstract" polynomials

I'm looking for a thorough reference on "abstract" polynomials, that is, polynomials over an arbitrary field. Something similiar to a chapter in Lang's "Algebra" called "polynomials" but more beginner-friendly.  More like undergraduate abstract algebra book which studies these topics in detail:division algorithm, greatest common divisor, relatively prime and irreducible polynomials.  I don't think it's a copy of another question, because my question concerns "abstract" polynomials over arbitrary fields or ring, not rational, real or complex ones.


Distribution of the sum of two independent normal variables

Given the two variables $A\sim \text{N}(\mu, \phi^2)$ and $B\sim \text{N}(\xi, \omega^2)$ with $\mu, \xi \in R$ and $\phi^2, \omega^2 > 0$ how do I prove that $C := A + B\sim \text{N}(\mu + \xi, \phi^2 + \omega^2)$ ?


Is traveling to Canada/US with desktop PC as carry-on possible?

I'll be moving to Canada in a couple of months and I'm taking my $2,000+ PC with me. Obviously I don't want it to get damaged, specially since I'm an electrical engineer and I work with the thing. It's not overly big, and at worst I can disassemble it and carry only the components as carry-on and the case checked-in.  Has anyone done this before?    I've traveled with laboratory/engineering equipment before (looks like a PC) as carry-on with no problems, but I've never traveled with a whole PC.    Anyone know the regulations or practices regarding this?  UPDATE: For anyone facing a similar problem, I did travel to Canada with a disassembled PC as carry on without running into trouble. Just make sure everything is easy to open, and in it's original box (or as close as possible).


Curve- and Array Modifier won't align with the curve

I am a bit desparate with one problem. I am having a bezier curve, which I want to add some meshes to with the array modifier, in combination with the array modifier. Problem is, no matter which axis I use, or where I put the origin of either the curve, or the arrayed object, it is far from aligned with each other. In the picture I put in the origin of both is at the very beginning of the bezier curve, I also had both in the mass center of the curve, with similar result. Also, I tried  to copy the curve and tried it with the other curve, with no success.  Thanks for the attention and I look forward to hear some fresh thoughts to this matter.


Combinatorial proof of $\sum_{k=0}^n k \cdot k! = (n+1)! -1$

Is there a nice combinatorial proof of the following identity?  (That is, by showing that both sides count the same thing.) $$\sum_{k=0}^n k \cdot k! = (n+1)! -1 $$ I was searching Wikipedia for nice identities to assign to my students for a homework on combinatorial proof, and thought this one looked innocent enough, but then realized I couldn't solve it myself.  Perhaps we should take the set of permutations of $n+1$ letters and partition it in some clever way (maybe the $-1$ suggests that the identity should be set aside), but I can't see what that might be.  Of course it is very easy to prove by induction; that's not what I'm looking for.


I installed a new hard drive on my computer this summer and I'm trying to install MiKTeX on it now. There were no problems when I was using my old hard drive. My OS is Windows 8.1. I'm trying to compile the following very basic file with pdfLaTeX:  \documentclass{article} \begin{document}   hi   \end{document}   Here's the first error I get:  Sorry, but "MiKTeX Configuration Utility" did not succeed.     The log file hopefully contains the information to get MiKTeX going again:   C:/Users/Tyler/AppData/Local/MiKTeX/2.9/miktex/log/initexmf.log  You may want to visit the MiKTeX project page (http://miktex.org), if you need help.   With the following errors in the log:  2015-09-03 22:23:51,625-0400 INFO  initexmf - starting: MiKTeX Configuration Utility 2.9.5700 (MiKTeX 2.9 64-bit)    2015-09-03 22:23:51,631-0400 FATAL initexmf - Windows API error 32: The process cannot access the file because it is being used by another process. 2015-09-03 22:23:51,631-0400 FATAL initexmf - Info: C:\Users\Tyler\AppData\Local\MiKTeX\2.9\miktex/data/le\1e0c0e04cb3be262fbb8e6e7ace14b67.fndb 2015-09-03 22:23:51,631-0400 FATAL initexmf - Source: Libraries\MiKTeX\Core\win\winFile.cpp 2015-09-03 22:23:51,631-0400 FATAL initexmf - Line: 520   The second error:  Sorry, but C:\Program Files\MiKTeX 2.9\miktex\bin\x64\miktex-pdftex.exe did not succeed. The log file hopefully contains the information to get MiKTeX going again:   C:/Users/Tyler/AppData/Local/MiKTeX/2.9/miktex/log/miktex-pdftex.log  You may want to visit the MiKTeX project page (http://miktex.org), if you need help.   with the following errors in the log:  2015-09-03 22:16:18,715-0400 INFO  miktex-pdftex - running 'initexmf --quiet --update-fndb' to refresh the file name database 2015-09-03 22:16:18,746-0400 FATAL miktex-pdftex - The operation failed for some reason. 2015-09-03 22:16:18,746-0400 FATAL miktex-pdftex - Info: C:\Program Files\MiKTeX 2.9\miktex\bin\x64\initexmf.exe 2015-09-03 22:16:18,746-0400 FATAL miktex-pdftex - Source: Libraries\MiKTeX\Core\Process.cpp 2015-09-03 22:16:18,746-0400 FATAL miktex-pdftex - Line: 290   Things I've tried:   Uninstalling and reinstalling MiKTeX Downloading all packages whose name starts with miktex (which is a solution that worked for someone else in a different thread) Having nothing open but TeXworks when trying to compile Looking for processes that may be related to MiKTeX in the task manager (I didn't find any)   How can I stop these errors? I apologize if my formatting is bad; this is my first stackexchange question. Thank you for your help.


Fetched 111 kB in 2s (41.4 kB/s) Reading package lists... Done W: http://extras.ubuntu.com/ubuntu/dists/precise/Release.gpg: Signature by key C47415DFF48C09645B78609416126D3A3E5C1192 uses weak digest algorithm (SHA1) W: http://archive.canonical.com/ubuntu/dists/precise/Release.gpg: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)  root@chikki:/home/dharani#    While updating using sudo apt-get update, I can see some warnings as shown above (6 warnings). I have searched a lot but could not find the solution.   I have also downloaded the Release.gpg file and it contains some binary data. Please help me in getting rid of this warning.


how I can make this flat? I want one flat surface at the bottom of this car. Any help? Thanks


public class Node {    int value;   List<Node> childNodes;    Node(int x) {     value = x;   } }   Above is the definition of the tree node and we have a tree.  Node root = new Node(0); Node n1 = new Node(1); root.childNodes.add(n1);  Line 1   This is how I construct the initial tree structure in main, however, I got a nunllpointerexception in line 1. Anybody knows the reason?


Currently I'm running 18.04. I remember there was an update this morning, and I thought everything was fine when I shut it off. I turned it on this evening, and for some reason everything's got a padlock on it now.  I tried rebooting, but nothing was happening so I forced shutdown. When I tried again, it went back to the black screen that says:  /dev/sda4 contains a file system with errors, check forced. Inodes that were part of a corrupted orphan linked list found.  /dev/sda4: UNEXPECTED INCONSISTENCY: RUN fsck MANUALLY.          (i.e., without -a or -p options) fsck exited with status code 4 The root filesystem on /dev/sda4 requires a manual fsck  BusyBox v1.27.2 (Ubuntu 1:1.27.2-2ubuntu3.2) built-in shell (ash) Enter 'help' for a list of built-in commands.  (initramfs)   Looking around online, some posts said it might have been related to an update.   I tried running fsck as suggested in the black screen, but it's no good. Everything still goes back to read-only after about a minute. I don't want to run fsck again because I tried fixing an external drive with a similar error with a similar method, and it made the problem worse.  They also said my hard drive might be failing. I'm using an ASUS X445LF and it's been my only computer for about three years.  UPDATE: Running from a live USB then attempting a fix using fsck works, but only for a short while. Almost by the next reboot, files are changed back to read-only again.


How does drupal 8 handles redirect respose?

Iam using a RedirectResponse in drupal 8 in my custom module when a user is logging in,  $user = User::load(\Drupal::currentUser()->id()); $userRoles = $user->getRoles();   if(in_array('admin',$userRoles)){    $response = new RedirectResponse('/home');    $response->send();   }   later i was trying to change the url but even after removing the code the redirection occurs.


If a polynomial takes integer values at every integer, does it have integer coefficients?

Let $f \in \mathbf R[x]$  and for every $k \in \mathbf Z$, $f(k)\in \mathbf Z$. Does this imply that $f \in \mathbf Z[x]$?   I tried to find a counter example, but my intuition tells me it's true and I don't know how to prove the statement either.


Connecting a 12V DC power adapter to Arduino

I'm working on a school project and I am a total beginner on this arduino stuff. So, I bought this led strip at  and used  to connect it and controll it with my Arduino. The thing is that I want to power up the led strip using another power source, so I bought 8x 1,5V AA batteries to power it up.     The idea is to upload the code to the Arduino and unplug the computer and use the Arduino to control my led strip. I was thinking of just using the power adapter which comes with the led strip from IKEA, it's an 12V DC power. It says on the arduino that 7-15V is okay for input voltage.   So is this okay? will I fry my arduino board? Note that I followed all the instructions on this tutorial above and it works perfectly, I just want to use it without my computer.


Show $ \langle f(t), f'(t) \rangle = 0$ for all $t \in \mathbb{R}$.

I'm having trouble getting started on proving/disproving the following:  If $f:\mathbb{R} \rightarrow \mathbb{R}^n$ and $|f(t)| = 1$ for all $t \in \mathbb{R}$, then the scalar product $ \langle f(t), f'(t) \rangle = 0$ for all $t \in \mathbb{R}$.  Any help would be appreciated.


Returning a calculation correct to 2 decimal places

I would like the result of this to return correct to 2 decimal places. ie price = 4.35 ie weightGrams = 233  public double pricePerHundredGrams() {    return (price * 100) / weightGrams;  }    I would like the calculation to return as 1.86 not 1.86695279....


app is not running.showing run app again and again

i am a beginner .i am trying to play sound track using buttons in code but when i am running the app,app is not running.it is showing open app again and again an d when i opens it it shows close app.in log cat it is showing runtime exception saying FATAL EXCEPTION: main/java.lang.RuntimeException: Unable to start activity ComponentInfo{com.devlopers.colourplay/com.devlopers.colourplay.MainActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int android.media.SoundPool.load(android.content.Context, int, int)' on if anyone know please help me out


Issue with case-insensitive regex pattern for re.sub()

I am doing a dictionary manipulation using regex in Python.I want to remove 1dc.com or 1DC.com or 1dc.COM or 1DC.COM from a dictionary item.  Example Dictionary -  {'system_name': 'a1pvdb092', 'fdc_inv_sa_team': 'X2AIX_GBS'} {'system_name': 'W00000001.1DC.com', 'fdc_inv_sa_team': 'LAA.BRAZIL.AAA.WINDOWS\n'} {'system_name': 'a10000048', 'fdc_inv_sa_team': 'X2AIX_NSS'} {'system_name': 'a10000049', 'fdc_inv_sa_team': 'X2AIX_NSS'}   Expected Output -  ['a1pvdb092'] ['W00000001'] ['a10000048'] ['a10000049']   Script -  import re from opswareConnect import data  for row in data:     arg1 = [row["system_name"],]     arg1 = re.sub('[.1DC.com]\\b', '', str(arg1))     print arg1   Output from the script -  ['a1pvdb092'] ['WBPVAP001Dco'] ['a10000048'] ['a10000049']


Order of general linear group of $2 \times 2$ matrices over $\mathbb{Z}_3$

From problem 2.3.25 in Topics in Algebra, 2$\varepsilon$ by I. N. Herstein:     Let $G$ be the group of all $2 \times 2$ matrices $\left(\begin{array}{c c}a & b \\ c & d\end{array}\right)$ where $ad-bc \ne 0$ and $a,b,c,d$ are integers modulo 3, relative to matrix multiplication. Show that $o(G) = 48$.   I know that $o(G) \le 3^4 = 81$, since $a,b,c,d$ can each take one of 3 values (mod 3). I attempted to tighten this bound by finding the number of matrices such that $ad=bc$ (mod 3):   Suppose $ad=bc=0$ (mod 3). Then ($a = 0$ or $d = 0$) and ($b = 0$ or $c = 0$), leading to 36 possible values for $(a,b,c,d)$. Suppose $ad=bc=1$ (mod 3). Then ($a=d=1$ or $a=d=2$) and ($b=c=1$ or $b=c=2$), leading to 4 possible values for $(a,b,c,d)$. Suppose $ad=bc=2$ (mod 3). Then ($(a,d)=(1,2)$ or $(a,d)=(2,1)$) and ($(b,c)=(1,2)$ or $(b,c)=(2,1)$), leading to 4 possible values for $(a,b,c,d)$.   So, there are in total $36+4+4 = 44$ such $\left(\begin{array}{c c}a & b \\ c & d\end{array}\right)$ where $ad-bc=0$ (mod 3). That means there are at most $81-44 = 37$ such $\left(\begin{array}{c c}a & b \\ c & d\end{array}\right)$ where $ad-bc\ne 0$, i.e., $o(G) \le 37$. However, this contradicts the problem. Where did I go wrong? Can someone set me on the right path?


I have an ArrayList in my Method. It contains a special class of Circles. Within ColoredCircle there is a variable of type Point2D.Double p1. I have to transform these coordinates on a different coordinate system. When I do that the method is altering my ArrayList, filling it with the transformed coordinates. Why? I didn't even touch my ArrayList in my transformation method.      public ArrayList<ColoredCircle> algorithm(final ArrayList<ColoredCircle> circleList) {           ColoredCircle a = circleList.get(0);         ColoredCircle b = circleList.get(1);         ColoredCircle c = circleList.get(2);          for (ColoredCircle cr : circleList) {             System.out.println("algo"+ cr.getPoint().getX()+" "+cr.getPoint().getY());         }          Point2D.Double circleCoordinateC1 = this.transorm_coordinates_circle(b.center, a.getPoint());          for (ColoredCircle cr : circleList) {             System.out.println("algo2"+ cr.getPoint().getX()+" "+cr.getPoint().getY());         }   Transormation Method:      public Point2D.Double transorm_coordinates_circle(Point2D.Double circle_center, Point2D.Double point) {          double x = point.getX() - circle_center.getX();         double y = (point.getY() - circle_center.getY()) * -1;         point.setLocation(x, y);          System.out.println("Point "+point.getX()+" "+point.getY());          return point;     }


Adding reject reason when choosing to reject suggested edit

Sometimes rejecting a suggested edit is not obvious and having reason will help both the people who need to cast the second vote and the people viewing the suggested edit history later, as well as the person suggesting the edit. Better help him/her learn than just rejecting without saying why.  So, having the ability to add some short optional comment while rejecting will be great idea in my opinion.


How do I control the upload/download bandwidth per user?

How to control bandwidth upload and download per user or each ip/mac? i tried squid3.0stable25 with delay_pools but its not work. is it really possible to control bandwidth for each host by squid? my isp have 400 more host but they are using open bw. i want to limit there upload and download how to do it? i also try htb but setup failed or not working and didn't get perfect example. please help!!


I don't know why is this tearing kind of maze thingy on rendered view on AMD renderer why isn't the view clearer my GPU is AMD RX 580 the view is fine on cycles render I don't know what am I missing cuz I'm new to blender any help would be appreciated


In case of a charged particle which is travelling at a uniform velocity, the electric field due to it at a given point doesn't change instantaneously . The reason for this delay in change of electric field , physically , can be explained as the time the electric field needs to propagate to that point, or, let's say, the change in electric field takes some time to propagate .  I would like to know what exactly does it mean by a propagating electric field, and how exactly does it propagate  ? What can we put forth as a reason to explain this propagation at a speed equal to the speed of EM radiations ? (I hope the coming up answers would comprise an important part explaining this physically. ) I guess we can derive the speed of EM radiation from Maxwell's equation ; can we show that this propagation too has the same speed ?


I have a Yoga 2 11( model 20428) and Win8.1 takes about 2 of my 4gb of RAM to run.  How much RAM will Ubuntu use to run.  This is a secondary laptop, for movie watching, school work, websurfing and etc.   nothing too hardcore.


Tikz: shading region bounded by several curves

I know that my effort below can be improved upon considerably.  In particular, there must be a way of shading the region in a single scope, as opposed to subdividing as I have done (thus necessitating a hidden gray boundary).  Neither am I fond of sample points, but this is where my research has led me.  Your constructive criticism is appreciated.    \documentclass{article} \usepackage{tikz} \begin{document}  \begin{tikzpicture} %graph \draw[draw=gray!50!white,fill=gray!50!white]      plot[smooth,samples=100,domain=0:1] (\x,{0}) --      plot[smooth,samples=100,domain=1:0] (\x,{1}); \draw[fill=gray!50!white] plot[smooth,samples=100,domain=1:2.71828] (\x,{ln(\x)}) --      plot[smooth,samples=100,domain=2.71828:1] (\x,{1}); \draw[domain=0:4] plot (\x,{1}); \draw[samples=100,domain=.25:4] plot (\x,{ln(\x)}) node[above left]{$y=\ln x$}; %coordinate grid \draw (-.5,0)--(4.5,0) node[right]{$x$}; \draw (0,-1.5)--(0,2.5) node[above]{$y$}; \foreach \x in {1,2,3,4}     \draw (\x,2pt)--(\x,-2pt) node[below] {$\x$}; \foreach \y/\ytext in {1,2}     \draw (2pt,\y)--(-2pt,\y) node[left] {$\y$};     %labels  \node at (.75,.5) {$\mathcal{D}$}; \end{tikzpicture}  \end{document}


How to add a new line after the "test message1" using sed?

Actually I have a file called test1.txt.  In that file I have the following five lines:   'test message1'  'test message2'  'test message3'  'test message4'  'test message5'   Now I want to add a new line 'testing testing' into test1.txt file, after the 'test message1' line. How to do that?


What is the limit $ \underset{n\to\infty}{\lim} \frac {{n!}^{1/n}}{n} $

What is the following limit equal to and how do I prove it?     $$ \underset{n\to\infty}{\lim} \frac {{n!}^{1/n}}{n}. $$     I've been trying for a while and I can't seem to get it.


Is there a simple, constructive, 1-1 mapping between the reals and the irrationals?  I know that the Cantor–Bernstein–Schroeder theorem implies the existence of a 1-1 mapping between the reals and the irrationals, but the proofs of this theorem are nonconstructive.  I wondered if a simple (not involving an infinite set of mappings) constructive (so the mapping is straightforwardly specified) mapping existed.  I have considered things like mapping the rationals to the rationals plus a fixed irrational, but then I could not figure out how to prevent an infinite (possible uncountably infinite) regression.


get absolute path into a shell script variable

I have inherited a shell script (#!/usr/bin/sh and I am not allowed to change the shell; i.e I can't, for instance, use a bash solution)).  It references a file in a relative path e.g DIR=$PWD/../SOME_DIR.  When I echo $DIR the output is something like /home/user/scripts/../SOME_DIR.  How can I get the absolute path name (no ..) into a variable (to be used in a  later echo)? I.e /home/user/SOME_DIR  It has been a few decades since my last shell script, and Google is not my friend today


Is the semicolon correct in this sentence?     Being taught and raised in a society; where art and design is an awful career option, I still manage myself pursuing my inner desire anyway.


Overnight train luggage safety concerns in Europe

I've heard that in some overnight trains, rooms don't lock (no door); instead its just a curtain. This means thieves can get in and out easily. Is this true? If so, how do my friends and I keep ourselves and our belongings safe? (Even if we secured it with some sort of lock and cable, if we were sleeping, I would imagine that thieves could just open everything up.)


I know literally nothing about linux/ubuntu, but I have linux activated and I downloaded it through steam. When I click on it to open it it gives me the message: You are missing the following 32-bit libraries, and Steam may not run: libc.so.6 Could someone help?


Android - Collections.sort - java.lang.NullPointerException

I have this function:  final ArrayList<Addressable> tempStoreList = new ArrayList<>(); tempStoreList.addAll(addressables);      Collections.sort(tempStoreList, new Comparator<Addressable>() {         @Override         public int compare(Addressable o1, Addressable o2) {              double distanceToO1 = 0;             double distanceToO2 = 0;              if (o1.getAddress() == null) {                 return (o2.getAddress() == null) ? 0 : -1;             }             if (o2.getAddress() == null) {                 return 0;             }              if (userLocation != null && o1.getAddress() != null && o2.getAddress() != null) {                 distanceToO1 = GlobalUtilities.distance(userLocation, o1.getAddress().getLocation(), "K");                 distanceToO2 = GlobalUtilities.distance(userLocation, o2.getAddress().getLocation(), "K");             }              if (distanceToO1 < distanceToO2) {                 return -1;             } else if (distanceToO1 > distanceToO2) {                 return 1;             } else {                 return 0;             }          }     });   For some reason, I keep getting a NPE on:  if (o2.getAddress() == null) {     return 0; }   Which to me means that null was somehow placed in the array. Anyone ever encounter this before?


When and how did "momentarily" come to mean "in a moment", rather than "for a moment"?

"Momentarily" used to mean "for a moment" only, and not "in a moment". Thus, newscasters could be divided into two clear groups: those who would say "we'll be back momentarily," and those who would not.  This restriction made sense to me, because having both definitions would promote ambiguity if a unique interpretation could not always be derived from the context. But in recent years it seems "momentarily" is regularly, maybe even more often, used to mean "in a moment" by newscasters of every caliber, and in fact this is even shown to be the definition when looked up in most dictionaries.  When did this word's meaning change? How did it come about?


Let a < b. Investigate whether there exists a function $f : [a,b]\rightarrow R$ that is continuous and that takes exactly twice each of its values.


How to give different groups different permissions on a specific folder?

I have two groups "Group1" and "Group2"  I have also folder "Folder"  I want to give Group1 read and write permission , while Group2 only read .  Any suggestion ?


How does the key schedule of Rijndael looks for keysizes other than 128 bit?

It said  that:     [....] Rijndael can be specified with block and key sizes in any multiple of 32 bits, with a minimum of 128 bits. The blocksize has a maximum of 256 bits, but the keysize has no theoretical maximum.   How would the key schedule look for these other key sizes, like a 136-bit key?


How do I score points on Stack Overflow?

I consider myself a good programmer and want to answer questions on Stack Overflow.  But, all valid answers are posted within five minutes of questions being posted. I admire the enthusiasm of the strong Stack Overflow community.  But I am wondering, how do I score points when valid answers are already posted?


Are continuous self-bijections of connected spaces homeomorphisms?

I hope this doesn't turn out to be a silly question.  There are lots of nice examples of continuous bijections $X\to Y$ between topological spaces that are not homeomorphisms.  But in the examples I know, either $X$ and $Y$ are not homeomorphic to one another, or they are (homeomorphic) disconnected spaces.    My Question: Is there a connected topological space $X$ and a continuous bijection $X\to X$ that is not a homeomorphism?    For the record, my example of a continuous bijection $X\to X$ that is not a homeomorphism is the following.  Roughly, the idea is to find an ordered family of topologies $\tau_i$ ( $i\in \mathbb Z$) on a set $S$ and use the shift map to create a continuous bijection from $\coprod_{i\in \mathbb Z} (S, \tau_i)$ to itself.  Let $S = \mathbb{Z} \coprod \mathbb Z$.  The topology $\tau_i$ is as follows: if $i<0$, then the left-hand copy of $\mathbb Z$ is topologized as the disjoint union of the discrete topology on $[-n, n]$ and the indiscrete topology on its complement, while the right-hand copy of $\mathbb Z$ is indiscrete.  The space $(S, \tau_0)$ is then indiscrete.  For $i>0$, the left-hand copy of $\mathbb Z$ is indiscrete, while the right-hand copy is the disjoint union of the indiscrete topology on $[-n, n]$ with the discrete topology on its complement.  Now the map $\coprod_{i\in \mathbb Z} (S, \tau_i)\to \coprod_{i\in \mathbb Z} (S, \tau_i)$ sending $(S, \tau_i) \to (S, \tau_{i+1})$ by the identity map of $S$ is a continuous bijection, but not a homeomorphism.


Interpret the multi linear regression graph

Residual fitted normal Q scale location residual leverage graph.    Not able to interpret what it means.


Normalizable wavefunction that does not vanish at infinity

I was recently reading Griffiths' Introduction to Quantum Mechanics, and I stuck upon a following sentence:     but $\Psi$ must go to zero as $x$ goes to $\pm\infty$ - otherwise the wave function would not be normalizable.   The author also added a footer: "A good mathematician can supply you with pathological counterexamples, but they do not arise in physics (...)".  Can anybody give such a counterexample?


Files lens and xdg-open only open nautilus but not the correct applicatiion

since some days my Files lens opens only nautilus but not the correct application which is associated with the file extension.  For example, if I choose a PDF file, Nautilus is openend, pointing to the directory there the file is (and the file is selected) but Adobe Reader is not opened.  Then I do the same in the terminal with   xdg-open sample.pdf   only Nautilus is opened too.  xdg-mime shows me this info:  $ xdg-mime query default application/pdf acroread.desktop   The /usr/share/applications/acroread.desktop file:  [Desktop Entry] Name=Adobe Reader 9 MimeType=application/pdf;application/vnd.fdf;application/vnd.adobe.pdx;application/vnd.adobe.xdp+xml;application/vnd.adobe.xfdf; Exec=acroread  Type=Application GenericName=PDF Viewer Terminal=false Icon=AdobeReader9 Caption=PDF Viewer X-KDE-StartupNotify=false Categories=Application;Office;Viewer;X-Red-Hat-Base; InitialPreference=9   The same with other file types like images, music files and office documents.  Then I doubleclick the file in Nautilus everything is ok and the correct applications are opened.  I assume this behaviour has something to do with Thunar which I've installed some days ago but deinstalled after these problems.  Any suggestions?


How can I typeset the hollow forward and backward slashes (in mathmode) as used in the attached image? They need to be used alongside normal forward and backward slashes.


Is there Python Class instance have an attribute to get the class name?

I have below Python code:  class Shape(object):      def draw(self):         raise NotImplementedError   class Triangle(Shape):      def draw(self):         print("draw triangle")  class Square(Shape):      def draw(self):         print("draw square")  t = Triangle()   I want to get the instance t's class's name(string).   How can I get it?


How to get rid of unnatural green glare from grass?

In a blender cycles project I am working on, I made a scene that includes grass, and it all renders fine, but there is a rather serious green tint in the shadows under the deck. The lighting is a flattened sphere with the normals turned inward and a sky texture node applied to it. The grass has a simple dark-green hair texture node. Farther out, I have a flat plane that is also green, with a noise texture and color ramp to generate a sort of clumpy grass look.   I definitely don't think I would see a green tint in real life, but I don't think a camera would have it either. I thought it was kind of interesting that it had such a sunrise/early morning feel to it when the sky texture has the sun straight overhead.    Light Sphere nodes:    Sky Texture - Preetham, Turbidity 2.2, Vector from Texture Coordinate: Object Vector Emission texture - Strength: 1, Color from Sky texture   Grass nodes:   Hair BSDF - Color: Dark green, both roughness set to 1.0.   Grass plane nodes:   Diffuse BSDF - Color: varied dark green, roughness: .358


locate command finds a file's path, but the file does not exist in that path

I have written:  locate Origin90SR2DVD.iso   And I received the path where that file is located:  /home/david/Origin90SR2DVD.iso   Then I have written:   cd /home/david   I have run:   ls -lrth   And I cannot find the Origin90SR2DVD.iso file.  Why the file is not in that path?


When does a plural end in 'es' instead of 'i'?

Take, for example, 'ignoramuses' instead of 'ignoramae', or 'cacti' over 'cactuses'?   In which cases does the plural end in 'es' instead of 'ae'? Can it be either one for any given case? Why?


concatenate lines based on first char of next line

I am looking for away contact lines based on the next line. So far the only way I see is to create a shell script that will read line by line and will do something along these lines:  while read line     if $line does not start with "," and $curr_line is empty          store line in curr_line     if $line does not start with "," and $curr_line is not empty         flush $curr_line to file         store $line in $curr_line     if $line starts with "," append to $curr_file, flush to file empty curr_line done < file   So I am trying to understand if could be achieved with sed or even grep with redirection. the rules of the file are simple.  There is at max one and only one line starting with "," that needs to be appended to the previous line.  ex:  line0 line1 line2 ,line3 line4 line5 ,line6 line7 ,line8 line9 line10 line11   The result file would be  line0 line1 line2,line3 line4 line5,line6 line7,line8 line9 line10 line11


Interactive Web Mapping for a Non Programmer?

I'm looking to map something similar to this:    Does anyone know, first off, how this was put together? From what I've researched so far, it seems this type of interactive, mouse-over web mapping involves SVG (?), HTML (?), or JavaScript (?) (or a combination of all three)? It doesn't seem wise to try to master all three of those before embarking on an interactive web mapping project. What I'd like to do is hone in on exactly what I need to know and do to make something like the above Geography of Jobs.  Anyone have a recommendation for precisely what type of code to learn, resources to help one write that code, etc., for interactive web mapping?  PS, I use ArcMap 10.3 to create my vectors.  PSS, I know very little about coding, but am very very open to learning.


How many different ways of putting circles on $OX$.

I can draw $n$ circles on a straight line $OX$. I can either draw two circles some distance from each other (can't touch each other), or I can draw a circle inside another circle. Two arrangements of circles are the same iff there exists a bijection $f$ such that for given circles $C_1',...,C_n'$ and $C_1,...,C_n$:  1.If $C_i$ is inside $C_j$, then $C_i'$ is inside $C_j'$.   2.If $C_i$ is before $C_j$ (meaning it's center has smaller coordinate x then $C_j$), then $C_i'$ is before $C_j'$.  For example:    $1$ and $2$ are the same, but $3$ and $4$ are not.  Here's my solution:  We can clearly create a bijection between the arrangements of circles and strings of $0$ and $1$ of length n.  Given an arrangement of the circles we go from left to right an when we meet an outline of a circle we put $0$ when it's not inside another circle and $1$ when it is. Meaning $1$ and $2$ in the above picture is $010$, $3$ is $000$ and $4$ is $011$. We can create an arrangements of circles from the string similarly.   Therefore the number of different arrangements of $n$ circles is $2^{n-1}$ (since the first circle is outside, so it's $0$ by default.   Correct?


Computing exponential object $A^{A}$ in category of irreflexive graphs

On p.333 of Conceptual Mathematics 2nd ed. we are asked to compute the exponential object $A^{A}$ in the category of irreflexive graphs, where $A$ is the graph of a single arrow s -> t.  (For context there is a graph $D$ that is the graph of a single dot *.  The book suggests using the properties of exponentials and graphs. For example to find the number of dots in $A^{A}$, find the number of maps $D \rightarrow A^{A}$, which is equivalent to the number of maps $A \times D \rightarrow A$. This is the same as the number of maps from the dots of $A$ to $A$, of which there are 4.  Similarly we can find the number of arrows by counting the maps of $A \rightarrow A^{A}$ which is the same as counting the maps of $A \times A \rightarrow A$ which there are 4, which are..  (s, s) and (t, t) must be mapped to s and t respectively, but (s, t) and (t, s) can be mapped to either s or t, hence 4.  So I know there are 4 dots and 4 arrows.. but I don't know how to map the arrows onto the dots.  Context: In the category of graphs an object is two sets $X$ (the edges of the graph) and $P$ (the nodes of the graph) equipped with two arrows $s, t: X \rightarrow P$ which correspond to the source and target of the edge. An arrow between two graphs is two arrows $f: X \rightarrow X'$ and $g: P \rightarrow P'$ which preserves source and target:  $$ g \circ s = s' \circ f $$ $$ g \circ t = t' \circ f $$


Why can't I add something to PATH permanently?

I am trying to add ruby binaries to my path with this :   $ PATH=$PATH:/home/ehsan/.gem/ruby/2.3.0/bin   This works fine in that terminal session and I get :   $ rails -v Rails 5.0.0   But after I close that terminal session and open new one and I enter rails :  $ rails -v rails : command not found   Any ideas?


How to fix an StackOverflow Error of a Binary Tree implementation?

This is an example of a Binary Tree implementation . This code works ok. But can I create the root as single one-time node in add method.   Instead of  public void add(int value) {  root = addRecursive(root, value); }   i do   public void add(int value) {  if (root == null) {   root= new Node(value);     } // then i add left- and right-leafs recursively if (value < root.value) {    root.left = addRecursive(root, value);         } else if (value > root.value) {   root.right= addRecursive(root, value);   } }   And if I add 3 or less nodes - that's all right   bt.add(2); bt.add(1); bt.add(3);   but if I add more then 3 nodes I get StackOverflow Error because of recursive function  private Node addRecursive(Node current, int value) {        if (current == null) {        return new Node(value);   }      if (value < current.value) {   current.left = addRecursive(current.left, value);        } else if (value > current.value) {     current.right = addRecursive(current.right, value);         }     return current; }


Assign value to an individual cell in a two dimensional python array

Let's say I have the following empty two dimensional array in Python:  q = [[None]*5]*4   I want to assign a value of 5 to the first row in the first column of q. Instinctively, I do the following:  q[0][0] = 5   However, this produces:   [[5, None, None, None, None],    [5, None, None, None, None],    [5, None, None, None, None],    [5, None, None, None, None]]   The first element of every array is being initialized to 5, where I thought only the first element of the first array would get the update. I have two questions:   Why is Python initializing the first value of every array and not just the first one? Is there a better way to accomplish what I'm trying to do?


Add directory slug to the post (but not custom post type) permalink structure

I'm having an issue trying to set up the default posts post type to use the permalink structure of /news/%postname%/ - I've tried editing the permalinks but it throws out my other custom post types.  I've currently got two other custom post types; 'careers' and 'case-studies' which use /careers/%postname% and /case-studies/%postname%  When adding "/news/" into the permalink settings it adds that to the custom post types as well, which I don't want. To help explain, it makes the two custom post types change to /news/careers/%postname% etc.   Is there a way I can change the slug or permalink structure of the default "posts" post type or another way around this issue please?  I've tried various solutions and had a good look around for similar issues but they aren't quite the same.


Why is the definition $\text{Work}= \text{Force}\cdot\text{Displacement}$ useful to describe the physical world?  Edit: Added another question as suggested by probably_someone, I think that this topic must also be covered to fully understand work


Null-Pointer in recursively search function after return

I have a class that uses an internal binary tree as a data structure. I have a weird problem. I'm recursively looking for a specific node. If the node is found I want the code to return the reference to it. The problem: After return it's always null! But why?  private HeapNode getHeapNode(double key) {     //ELEMENT IS NOT AVAILABLE HERE, NULL-Pointer, ALWAYS     return getHeapNodeRec(key, rootHeapNode); }  private HeapNode getHeapNodeRec(double key, HeapNode curr) {     if (curr == null) {         return null;     }     if (curr.getKey() == key) {         //ELEMENT IS AVAILABLE HERE, I can access its data!         return curr;     }     else {         getHeapNodeRec(key, curr.getLeft());         getHeapNodeRec(key, curr.getRight());     }     return null; }


Installation of GDAL 1.10 in Windows 8 and Ubuntu 12.04

Is there an easy way to install GDAL/OGR 1.10 in Windows 8 and Ubuntu 12.04.


Are commas necessary between coordinate adjectives?

to reach a mutually-agreed long-term comprehensive solution that would ensure Iranˈs nuclear program will be exclusively peaceful.   As I see, in the noun phrase a mutually-agreed long-term comprehensive solution, all the three adjectives describing the head noun are coordinate. Then, shouldn't there be commas between them making it look like a mutually-agreed, long-term,/and comprehensive solution? Is putting a comma between coordinate adjectives a must? If so, what has happened here?


data.stackexchange getting response not as Text or HTML but like from API

Not sure if this is the right place to ask Is there a way to 'query' data.stackexchange.com on a premade custom query in such a way that I would get a response not as text or html table, but just raw data (JSON) like you would get from API.. Basically I have created this static jsfiddle  and ATM it is using static data that I have transformed manually... I now want to make automatic feed from this query  Chances are someone before me needed to run and extract something more complicated then basic select by id... If there is a way it would be much more convenient to get this data as JSON instead of having to hack-extract it from page.... Is there a way to query a custom query data.stackexchange as API?


Make community less hostile for beginners

Honestly,  How many times do I see the true value of coming to stackoverflow only to ask a beginner question or something I am new at and literally get run off the site by rude and hostile users.    There needs to be a beginners section for popular topics based on the users rep score and those with higher rep scores get more points for answering a beginners question or by simply putting a link to the right direction.  The section could even have a library of common responses that higher rep individuals have access to and get more points for addressing the noobs.  Something to that effect.


"Put on the spot", origins of the phrase

I was recently asked by my partner about the phrase "on the spot", with the meaning of suddenly being placed in a difficult or awkward situation. Both of us assumed that the origins of the phrase comes from theatre, relating to the spot light. Is this true or are the origins of the phrase different?


I have this:  local v="${name-$tag}"  # default is name, tag is backup   except it doesn't work if name is empty. So the long-way to do this would be:  local v="$name";  if [[ -z "$v" ]]; then    v = "$tag" fi   is there a shorthand way to do this?


I am using the following conditional statement within a Makefile:  mytarget:     if [ -z "${TAG1}" | -z "${TAG2}" | -z "${TAG3}" ]         then         echo "Need to set all tag names images         exit 1     fi   but then ...  $ make mytarget TAG1=latest TAG2=latest TAG3=latest if [ -z "latest" | -z "latest" | -z "latest" ] /bin/bash: -c: line 1: syntax error: unexpected end of file Makefile:36: recipe for target 'env' failed make: *** [env] Error 1


Who Handles Collision in a Component Based Entity System

I kind of stucking at my current plattformer protoype for learning the component based entity system pattern.   I have CollisionComponent and a CollisionSystem. The CollisionSystem checks every frame all entities with CollisionComponents for intersection. Then it marks inside the CollisionComponent the entities which are colliding with this entity. So if an entity A collides with Entity B then they both have a the other as a reference inside their CollisionComponent as data.   This works absolutely fine and I can tell which entity is colliding with something/someone.  Now I have the problem how to use this information properly. I have a MovementSystem and it moves entities with a MovementComponent based on the velocity and the acceleration.   Who is now responsible for NOT moving a entity or do something else on a collision. Should the MovementSystem check if the entity has a CollisionComponent and if there is one, should the MovementSystem handle the NOT movement?  Let's say I have this situation. I have an entity (player) with a MovementComponent and a velocity to the right (because the player presses the right arrow) and the usual downwards velocity due of gravity influences. The player entity collides with another entity. A GroundComponent entity. Now which system should put entity A (the player) upwards so that he does not colliding with the ground anymore? The MovementSystem? At the same time, the player entity collides with another entity, an enemy. Which system should now handle the damage, or the knockback or whatever that enemy does to a player unit?  I really like the CBES but it really does not get into my mind how everything glues together.   I want to threat the components as pure data, so no logic in there (besides of ScriptComponents, but this is another type of problem)  Now my question is, which system handles which cases and how to treat passes of system (e.g. Movement pass one then the other systems then movement pass 2 and so on? How many systems do I really need and should a system only handle one type of problem? MovementSystem -> pure movement no matter what. CollisionSystem -> pure collision registration no matter what, DamageSystem -> damage handling based on component data


$\mathbb Q$ is not finitely generated $\mathbb Z$-algebra

I proved that $\mathbb Q$ is not finitely generated as $\mathbb Z$-module using Nakayama Lemma. Now I want to prove the following:     $\mathbb Q$ is not finitely generated as $\mathbb Z$- algebra.   I don't want to use the result that: A field which is finitely generated $\mathbb Z$-algebra is finite.  Any help will be appreciated. Many thanks.


I want to test if an element with a specific class name exists or not. Here's my code:

1

A Head Full Of Dreams

03:44

Coldplay

   JS  $('.track').dblclick(function() {     var $prev;     $prev = $(this).parent('div').find('.status-active');     if ($prev != null) {         //This will always be true     } }   And the picture below is the screenshot of the console   I'm confused by the layers of the object. It means that even if I did't get the object with the class that I want, I still get the object with the parent element. So the object is not null, and the result will always be true?  I have found the solution to fix the mistake is that I need to use the lengthproperty.  if($prev.length){     //This works! }   Just want to clarify the idea that when can I test the result using null value? I'll be appreciate if you give me some advice!!


What does `. /path/command` do? (Space after dot, absolute path)

From  we learn that in order for Bash to perform auto-completion one must perform . /etc/etc/bash_completion.d/foobar (note the space after .) in order for Bash completion to work.  $ /etc/bash_completion.d/ssh bash: /etc/bash_completion.d/ssh: Permission denied $ . /etc/bash_completion.d/ssh $ ls -l /etc/bash_completion.d | grep ssh -rw-r--r-- 1 root root   297 Jan 28 18:04 ssh   Is . a shortcut for the source command? If not, then what is it? It is impossible to google for, man source returns nothing, and apropos source and info source give so much irrelevant information that I cannot tell if what I'm looking for is in there. How might I even begin to RTFM to find the answer to this question myself?