How do I remove a grub Partition from my hard drive?

I started using a system that has sat dormant for about a year, so unfortunately some of the setup details are a little hazy. Grub is loaded with 1 instance of Ubuntu 14 inside the grub loader. This instance can only see about 4GB of the much larger (~200+GB) drive. I think this means the entirety of the grub partition is only 4GB.  There is a second instance of Ubuntu, this time Ubuntu 16 on the PC. When it boots up it does not go through the Grub dialogue. It also has access to much more of the hard drive (Don't have the exact number, but well over 150GB).  When the computer boots up I arbitrarily get grub->14 or 16. It used to be I mostly got 16 which was fine, it has all the work I do. Occasionally it would boot grub->14 which has no work and is basically a blank install on a small drive. I would reboot and again end up at 16. Not ideal but I'm lazy, don't reboot much, and it was workable. However recently 16 did an updated, needed a reboot and now it's only booting grub-14.  Based on the behavior above I believe 16 and grub are logical siblings when grub should be a logical parent of ANY operating system on the machine.  I'm looking for options to dig myself out of this hole. A complete reinstall is an option but not preferred. I don't have a problem blowing away the grub->14 partition as it was a failure. I am interested in what if any are my options in getting 16 inside a grub control after the fact.  Edit1: There is a comment suggesting a grub update and a duplicate flag indicating the same. I ran grub update grub 2 update both with reboots. No difference in behavior. Is there a configuration file that needs a new entry? If so do I need to indicate the location of the missing OS? How would I find out such a thing?  Edit2: I ran lsblk and sudo parted -l to get the following. Apologies for the screenshot. The 14 install doesn't have the right network card drivers for connectivity to copy/paste.     Edit 3:pvdisplay produces the following    Eldergeek asked the following in the comments:     Just so I'm clear, you installed Ubuntu 14.04 on one drive and 16.04 on the other within hours of each other?    No, originally I installed 2 copies of 14.04. I think my plan was to put the bootable details on the faster of the two drives. I mixed them up and did a second install on the otber drive, That was recently upgraded to 16.04 shortly before I lost all access to that install. If I prioritize that drive I get a grub rescue prompt. I believe this is a new development, not positive though.      The intention is to boot the 16.04 Ubuntu and provide additional space for that.    Yes     The 14.04 Ubuntu is unimportant   Yes


Flexbox Wont Align Divs To Center Of Screen

This is my first time using stack overflow so bear with me. The problem I'm having is when I try to align my divs to the center of the screen, it won't work for some reason. I researched everywhere to try and find a solution but it doesn't work. Does anyone know what the problem is?   body{     margin: 0;     background-image: linear-gradient(to top, rgba(14, 245, 26, 0.829), rgb(0, 102, 255));     background-attachment: fixed; }  .container{     display: flex;     align-items: center;     justify-content: center;     text-align: center; } <!DOCTYPE html>               <title>Super Cool Calculator</title>         <link href="style.css" type="text/css" rel="stylesheet">

The Great Calculator

By Antdog0101

               Here is the result of when I save my code:


How can we find the following limit. $$\lim_{x\to\infty}(x-\ln\cosh x)$$ where $$\cosh t=\frac{e^t+e^{-t}}{2}.$$   I thought about it alot but didn't get any start


So here is a picture:    Here i have 3 verts. I want to align them in diagonal, centering on middle vertex.  There is a solution tho - creating an edge and setting it as a custom transform orientation, but it seems to be overcomplicated. What if i need to do this on multiple vertex groups?  May be there is another way to straighten verts in a line, that is not aligned with axes?  UPD: actually above situation can be solved by scaling along normal Z axis.  But what if i have this:    Here i want verts to be aligned in a line between first and last verts. But transforming by normal orientation does not help here.  UPD: tried making an edge between these two verts, but its orientation appeared unsuitable for scaling (like on image).  UPD: used lower face as transform orientation, but result was not as expected. And what if i have no suitable faces, oriented appropriately?    Please advice, what am i doing wrong here?


Is it possible to obtain high-level enchantments in MCBE?

I am playing on a Creative world in MCBE, and mess around with everything. I got the idea to obtain a Looting 32 sword using commands, but it errors out and says that the max level is 3. I tried using these methods, but all have failed: /give @s diamond_sword 1 0 {ench:[{id:21,lvl:32}]} /enchant @s looting 32  Is there any way to obtain a high level enchantment using commands, without editing the game code?


How to only substitute lines that match several patterns in sed?

$ echo -e 'CH12\nCH23au' | sed '/^CH/s=^=<b>=' <b>CH12 <b>CH23au   I know I can match lines starting with CH by ^CH but how can I match multiple patterns?   Example:  Input:  CH12 CH23au   Output:  CH12 <b>CH23au   How to only put <b> where there is ^CH and au in the line?


I am writing the definition of quantities for  and am not sure what to actually call k$,$ or its units. This is what I have so far  $$\frac{dT}{dt}=-k(T-T_s)$$  Where $\frac{dT}{dt}$ is the rate of cooling measured in degrees Celsius per second $\left[°C\cdot{}s^{-1}\right]$  $T$ is the temperature of the object measured in degrees Celsius $\left[°C\right]$  $T_s$ is the ambient temperature of the objects surrounding measured in degrees Celsius $\left[°C\right]$  $k$ is a constant and has no units? I don't think that's a good enough description


Regular expression for distinguishing similar shortcodes

I have text like: "some text [prefix_tag1][prefix_tag2] some text" I need get this two shortcodes by preg_match php function.  $text = "some text [prefix_tag1][prefix_tag2] some text"; preg_match('/\[prefix_.+\]/', $text , $matches); print_r($mathes);   the result: Array(0 => [prefix_tag1][prefix_tag1])  The result i want to see: Array(0 => [prefix_tag1], 1 => [prefix_tag1])


How to create a composite Primary Key on a Table

I have created a  table, i have inserted some data as well. I have 1 primary key on the table which is incremented by auto-generated number. I have user_id and semester_course_id columns both are foreign_keys. I want to add composite key on 2 Columns user_id and semester_course_id .  So that 1 Student_id can register to 1 Course only. Semester_Course_id and student_id will  repeat in the table, but together they have to appear one time only.  Kindly tell me how to add composite primary key.     Thanks


I have previously tried asking questions as simply as possible but they have been blocked like in the following link    So owning up to my mistake I tried posting a detailed question but table tags are not available in here to format my sample dat ; so I went for images and alas it tells me that I need atleast a reputation of 10 to post images!   Please somebody help me to post my question.


I've just begun reading C. Pethick and H. Smith's textbook "Bose-Einstein condensation in dilute gases" (Cam. Uni. Press). In the Introduction, they contrast the density of atoms at the centre of a BEC cloud to other phases of matter. To quote from the text (pg 1, 2nd ed.):     The particle density at the centre of a Bose-Einstein condensed atomic cloud is typically 10^13–10^15 cm^−3. By contrast, the density of molecules in air at room temperature and atmospheric pressure is about 10^19 cm−3.   This has puzzled me, as instinctively I think the density of the BEC should be higher because the atoms are macroscopically occupying the ground state and would have a smaller separation between atoms than a 'warm' classical gas.   Why is the density of a BEC lower than normal phases, despite the large degree of occupation?   Answers on this thread state it is because of the large positional uncertainty of the atoms in the BEC: . But as far as I can see, this will only ensure the density of the BEC is uniform.  As a beginner to the subject, I would greatly appreciate if someone can help me to resolve my conceptual difficulty.


I see the 8th level wizard spell Trap the Soul in the PHB's spell lists on page 211, but it's not in the spell definitions. How does Trap the Soul work in 5E?


$G$ simple group and there exists a subgroup of index $n$. Show that: $|G|$ divides $n!/2$

Let $G$ be a simple group and there exists a subgroup $H$ of index $n \in \mathbb{N}_{\ge 3}$. Show that: $|G|$ divides $n!/2.$ I saw a similar question .   There was written: "The proof is really simple. Let $X$ be the set of left cosets of $H$. Consider $\phi: G \to \text{Sym}(X)$ given by $\phi(x)(aH)=(xa)H$. Then $\phi$ is a homomorphism. Consider now $K=\ker \phi$. Then $K$ is a normal subgroup of $G$ contained in $H$. Finally, $G/K$ is isomorphic to a subgroup of $\text{Sym}(X)$, which has order $n!$, where $n=[G:H]$. Thus, $[G:K]$ is finite and divides $n!$."  In fact, I don't understand the last sentence. "Thus, $[G:K]$ is finite and divides $n!$." Also did I understand it right that $ker(\phi)=H$?  Can you also give me an advice how to proof it for $n \ge 3$. (maybe induction)  Thank you for taking your time.


Does bash have a color command, as seen in MS-Windows CMD?

There is a command in Microsoft's cmd, called color. I know that, in bash, there are special characters that allows you, during the echos, to change the text colors. As well I do know that in ubuntu you can edit the parameters of the terminal setting a "style" going inside the config, editing it and applying it with mouse under the menus.  What I ask is, if there exists under debian, ubuntu and centOS something very simple like:  color 1b   so that the console turns from:     to


My bash script only opens editor, why doesn't it run?

I created a script to dd sdb to sdc on my older computer with Ubuntu 13. It ran when I clicked on it – asked if I wanted to run in terminal or edit it. On a newer computer, with Ubuntu 14, I created the same script on my desktop and made it executable, but when I click on it, the file simply opens in an editor with no opportunity to execute it. So I copied the 'Simple Bash Example' script from "" and made it executable. Same result; click on it and the file simply opens in an editor with no opportunity to execute it.  (I have not tried reverting to Ubuntu 13.)  What am I doing wrong?


How can I prevent mysql database from sql injection

I am using custom code for my website. Some delete all records from mysql database regularly after every week or 10 days. The deletion of records will also delete all the updates in db which has been made in this time frame. Kindly someone guide me how do I solve that issue.  I am using PHP and MySQL.  Thanks


I want to change the grub2 menu color to black and white, also if it's related I wanted to change the purple color that appear between transitions when the PC boot.  I'm using Ubuntu 15.04.


I'm truing to upgrade my packages because Ubuntu Software Center doesn't work. It just chashes when I'm trying to execute it. In terminal I wrote:  sudo apt-get update   And here is an answer:  E: Malformed line 57 in source list /etc/apt/sources.list(dist parse) E: The list of sources could not be read.   So what should I do to solve this? And why this error occurred?


Should the verb be singular or plural in this sentence?

One thousand old refrigerators floating in the ocean (isn't/aren't) an issue. Is the subject here "One thousand old refrigerators" or is it the whole phrase "One-thousand old refrigerators floating in the ocean", that is what is confusing me... should I use isn't or aren't here? The word "floating" here is a present participle right? Thank you.


How can I access a static variable from a static function?

I have these data members static because Array will be an abstract class that will have have multiple classes that will inherit it. I want to be able to load data from a text file into my primaryCollections array. Keep getting an error when I try to compile my code:  /usr/bin/ld: Array.o: warning: relocation against `_ZN5Array17primaryCollectionE' in read-only section `.text' /usr/bin/ld: Array.o: in function `Array::loadData(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)': Array.cc:(.text+0x240): undefined reference to `Array::primaryCollection' /usr/bin/ld: warning: creating DT_TEXTREL in a PIE collect2: error: ld returned 1 exit status make: *** [Makefile:6: p1] Error 1   Array.cc: //loads data from text file into a list of record objects void Array::loadData(string f){    int year, employed, graduates;   string province, degree, gender;    ifstream file(f, ios::in);    if (!file) {     cout << "Error: could not open file" << endl;     exit(1);   }    while ( file >> year >> province >> degree >> gender>> employed>> graduates ) {      Record *record = new Record(year,province,degree,gender,employed,graduates);     primaryCollection.push_back(record);    }     }  Array.h: class Array {       public:      static void loadData(string);         private:     string name;     static vector<Record*> primaryCollection;      };


Copying a sublist into a main list as objects instead of lists

child = [] parent = [1, 3, 5, 7, 9] index = 2 child.append(parent[:index])   When I have this code run, instead of returning me a child list of  child = [1, 3]   I get a child list of:  child = [[1, 3]]   Is there a single line method of copying a few objects of a list into another list without making it into a nested list?


Interesting story: onset of a blurred point in a field of vision which gradually enlarges such that it forms an arc in the right side of the field of vision and then after a while that blurred arc fades away.  Afterwards, the visual disturbance will go away, vision will clear, but then a severe headache (usually unilateral) gradually comes up.   No other symptoms.  What can cause a visual disturbance followed by a headache?


I want to to remove all color codes which look like '@n', '@R' etc, from a moderately large size collection of text files.  So in a file called 'remove_cc', I wrote the following:  sed -ie 's/@r//g' $1 sed -ie 's/@g//g' $1 sed -ie 's/@y//g' $1 sed -ie 's/@b//g' $1 sed -ie 's/@m//g' $1 sed -ie 's/@c//g' $1 sed -ie 's/@n//g' $1 sed -ie 's/@R//g' $1 sed -ie 's/@G//g' $1 sed -ie 's/@Y//g' $1 sed -ie 's/@B//g' $1 sed -ie 's/@M//g' $1 sed -ie 's/@C//g' $1 sed -ie 's/@N//g' $1 sed -ie 's/@W//g' $1 sed -ie 's/@K//g' $1   Anyways, the script works fantastically if I use it like: ./remove_cc file.txt  But if I type ./remove_cc *.txt in a folder with many txt files that I want to run the script on, it fails to do anything.  ./remove_cc * is equally ineffective.  Is there a way to fix this so it works?


After moving to the U.S., how much tax do I have to pay for my income in the U.S.?

I moved to the U.S. on 8th Oct. I will be having total income of around $11,500 in these 3 months.   Currently the tax is being deducted from my income which includes state tax/federal tax/SSN tax/Medicare tax.  Will all the tax be refunded to me?   And as I have also stayed more than 181 days in India during the year, do I need to pay tax on this income in India?   Any help will be greatly appreciated.


hello second question xD  as i said earlier i have a netbook and was looking thru persistent live usb making and all guides seem to need that i boot from live cd but my netbook doesn't have an optical drive :/ so here's my question(sorry if it has been asked before) can i make a persistent ubuntu live usb using my netbook? what i'm trying to achieve here is getting a 32gb usb drive and have my own portable computer here (ubuntu takes about 2gb so 30gb left for all my other files "music,video,documents,additional packages,etc." can i do that? as far as i could find the maximum persistent storage i could have is 4gb which is a real waste for a 32gb drive :/ thanks for all the help :) best regards, Raif Felemban (aka ubunoob) :P


What does this notification icon that looks like an arrow with a plus sign mean?

I'm running stock Android 4.4 on my Nexus 4, and I keep seeing this weird icon that looks like a gray tag or arrow with a plus sign in it.    I don't know any app that does this, and there's never a matching notification when I pull the notification bar down. What does this mean?


What is the correct core update workflow?

I want to use composer to manage Drupal 8 dependencies, but I'm not sure what is the right core update workflow. At the moment I'm using drush to update core to latest beta release, but I also have some dependencies in my composer.json file, so after the update I'm using composer install to install all the contrib vendor dependencies. It appears that running composer install overrides some files in the core directory, although I've just updated core to latest version.  I've also tried to manually edit the composer.json file and replace the "drupal/core" line with the specific beta release, e.g. "drupal/core": "~8.0-beta14",, but it still overrides files in the core directory.  What is the right workflow?


What's the difference between `mkdir -p` and `install -d`?

What is the difference in what is being performed by mkdir -p and install -d, in terms of what changes the two commands are doing to the system?


I am a systems administrator and for many years I worked with *nix servers. My main experience programming is with Perl and shell scripting, but in my new job I've been told to learn Java and well... I'm not even interested in it. But what I am interested in is in game development, so while I don't have any interest in Java, I was wondering if I could use it to develop games?  I was wondering whether this is viable and if so, what approach should I take?


Why do we still not have a Software Development Recommendations SE?

Time can be saved by answering things like,      "I have X and want to get Y. What are some development tool/libraries/framework options that can achieve this that you'd recommend?"   These kinds of questions have value, and currently lack an appropriate home. I did some checks in meta for this before asking, but I'm assuming over the years I'm not the only one whose asked something similar to this, so I apologize if my queries were left wanting.


Where can I get a "useful" C++ binary search algorithm?

I need a binary search algorithm that is compatible with the C++ STL containers, something like std::binary_search in the standard library's <algorithm> header, but I need it to return the iterator that points at the result, not a simple boolean telling me if the element exists.  (On a side note, what the hell was the standard committee thinking when they defined the API for binary_search?!)  My main concern here is that I need the speed of a binary search, so although I can find the data with other algorithms, as mentioned below, I want to take advantage of the fact that my data is sorted to get the benefits of a binary search, not a linear search.  so far lower_bound and upper_bound fail if the datum is missing:  //lousy pseudo code vector(1,2,3,4,6,7,8,9,0) //notice no 5 iter = lower_bound_or_upper_bound(start,end,5) iter != 5 && iter !=end //not returning end as usual, instead it'll return 4 or 6   Note: I'm also fine using an algorithm that doesn't belong to the std namespace as long as its compatible with containers. Like, say, boost::binary_search.


In java, I use the   variable = something == 1 ? 1 : 0   function all the time. Is there an equivalent function in python?


How to install Wine 1.9 on Ubuntu 15.10?

I am not really a fan of stable branches and have moved to Wine 1.7 as soon as it spawned from Wine 1.6 and have been using it for years without a problem.  So, now, as Wine 1.8 stable has been released and Wine 1.9 created as a successor to Wine 1.7 I would really like to install it (Wine 1.9).  However I can't find any PPA with it. The  seems to provide some related packages like "wine-gecko1.9" but not wine1.9 itself. The  provides wine-devel packages but I don't really understand what are they  meant for as installing them does not actually install wine.  So how do I install Wine 1.9?  PS: Of course I can always build it from sources and install it to /opt but I'd prefer a more tidy PPA way.


Often my laptop gets super slow because of regular windows 10 updates. It's very annoying. Is there a way to prevent automatic updates in Windows 10?


What variables best determine bicycle fit for an individual without riding it?

Trying to decide a bicycle purchase, not sure how to choose the best fit bike for my body type.  Should I measure my leg length, torso length, arm length, body build, does my gender make a difference?


changed primary email in google account. how to log in?

I added gmail to my google account. Now when i try to log into stack exchange using google it prompts me to create a new account instead of using the existing.   The google account is still the same but google changed the primary email adress.  How can i log in again?


What is the maximum total displacement needed for sorting a list?

I imagined a system of $n$ "things" that are ordered: each "thing" has a specific place. Also, the $n$th thing is the last thing in the system, meaning that there is always a "thing" to which number $1$ is assigned. Given such a system, we can "mess it up" — put things in wrong order. Now we must put them back. Like so (an example):    We see that in this case, we have a system $n = 5$. If all the "things" are in their spots, then the output of the function I wanted to deduce (but failed) is $0$. But if they are not, my "function" adds $1$ to its output for each place a misplaced "thing" must travel to get to its original location. In the above case, the output of function in order to "clean up the mess" is $8$.  The question is: for some system $n$ (where $n \in \mathbb{N}$), what is the maximum of the function $f$?  I already found $f_{\text{max}}$ for $n = 1$ ($f_{\text{max}}(1) = 0$), $n = 2$ ($f_{\text{max}}(2) = 2$) and $n = 3$ ($f_{\text{max}}(3) = 4$). But it is quite clear that this problem needs a different approach; bruteforce won't do any good. So, my main interest is to know what a formula for $f_{\text{max}}(n)$.  I am very eager to see the answer. I tackled a few hard problems, but this one (and the strange thing is that I made it up myself) is one tough cookie, at least for me.


I am using 12.04 LTS. Is there a way to properly disable that feedback sound when you are adjusting the volume? I would like to adjust the volume on my system without producing those "pops".  Unfortunately  did not produce any answers that are useful for my situation, since disabling all notification sounds impacts the use of many applications.


how can i fetch http://ppa.launchpad.net/webupd8team/java/ubuntu for wine

I have been trying to download the grovy main repository for wine and I keep on getting a 404 error on http://ppa.launchpad.net/webupd8team/java/ubuntu. I have been told it is not supported anymore but I can't seem to get wine without it. how can I fix this problem


I have a very simple script to trap signals:  #!/bin/bash                                                                      unlink SigTermRecieved unlink SigIntRecieved #trap " touch SigTermRecieved ; exit " SIGTERM                                   trap " touch SigIntRecieved ; exit " SIGINT echo "pid is $$" while true do     sleep 60m done exit   BEHAVIOR                                                                        with both trap lines commented:   SIGTERM sent: terminates program. ? SIGINT sent from another terminal window is IGNORED!   CTRL C terminates program.                                                     with SIGTERM trap uncommented: ? SIGTERM sent: program does not terminate and SIGTERM trap is not executed. ? SIGINT sent from another terminal window is IGNORED!   CTRL C terminates program.                                                     with SIGINT trap uncommented:   SIGTERM sent: terminates program. ? SIGINT from another terminal window is IGNORED!   CTRL C executes trap code and terminates program.                              The behaviors preceded by ? are unexpected or wrong. I'm not too concerned about the SIGINT behaviors. I tried those to see if any traps would work.  So, I removed the snooze function and just have:  sleep 60m & wait $!   Now, kill -TERM -pid kills both processes and executes the trap for SIGTERM.  In my application, I'm waiting for SIGTERM from system shutdown, so I can clean up some details. I don't know whether system shutdown uses pid or -pid, both work for me, and the system will eventually kill all the processes. A few dangling sleep processes while I'm testing is no big deal.  That fifo solution is quite complicated and I don't understand it.  Thanks for the help.


My question is about the current accepted theory of Gravity.  First of all, let me start by saying that I am not a physicist, and that my mathematical understanding of Special/General Relativity (SR and GR) is extremely limited at best (so please try not to make fun of my thoughts/views).  I do agree that the presence of Mass (matter) in the universe does warp (curve) space, but I have a very hard time accepting that it also does the same to “Time”.    Let me try to explain to the best of my abilities:  I see time as just a necessary tool, a reference scale, like the ticking of a clock or the swinging of a pendulum, etc.  There really is no “time” per se, there is only movement and space, so when time appears to be affected, it is really just a change (warp, curve) in distances of the space of the measuring/reference tool.  I do feel the passing of time (due to memories, sunrise, sunsets, getting old, etc.) but it is really an illusion.  Because of this view, I can see how the path of an object that already has movement (momentum and energy) through space can be curved from its straight trajectory by the influence of a large mass encountered in the vicinity of the travel (ex: small asteroid passing by close to earth).    However, if there is no motion whatsoever (let us pretend that both objects appear instantaneously and are absolutely motionless with respect to each other in space), I just can’t see how they would start moving towards each other (ex: the asteroid begins moving towards earth).  From what I have read, SR/GR state that the static objects are always moving in time when stationary, and that is what causes the objects to begin to move, and to “accelerate” towards each other (the asteroid obviously accelerating towards the earth due to its much smaller size).  And then, once the asteroid lands on earth’s soil, and remains there on top of the surface, motionless, that it is “time” again (time passing by) what keeps it under the earth’s gravity force, per say.    So, since I do not think that time exists as described in the beginning of my question, it makes it very hard for me to even begin to understand this.  It feels that there has to be something else at play, involving only space and its characteristics, plus motion.  Sometimes I would like to think that it is the constant expansion of space which would cause the initial movement of the objects, and the subsequent acceleration.  Has anyone ever tried to find some kind of relationship between the rate of expansion of the Universe and the acceleration of gravity on earth?


I use mainly Firefox, but sometimes Chrome, which is why I erase my bookmarks on Chrome sometimes and import them from FF.  How can I reload all bookmarked favicons in Chrome? On Firefox there used to be a tool (that does no longer work). On Chrome I didn't find anything like that at all.  EDIT: This is not a duplicate. I found the linked thread before I asked this question, but the dude there has the problem that his favicons won't refresh because of cache related issues. I don't want to refresh them, I just want to initially load them. The tips he got were some commands that clear his cache and make the browser being able to reload a favicon. This is not the case for me. The problem is that I have a lot of subfolders within my bookmarks and opening every single folder (because "open all bookmarks" isn't recursive) is kind of annying.


The Standard Model of elementary particles is a gauge theory with gauge group $SU(3)\times SU(2)\times U(1)$, which is really a successful theory.   We might be able to quantize gravity similarly. Gravity might be treated as a force, instead of spacetime curve as in general relativity. I know little about gauged gravity theory. What is the current status? Who are working on it? Is it really worthwhile to pursue now?


I'm having a problem with titlesec's explicit option. Here's an MWE:  \documentclass{book} \usepackage[explicit]{titlesec}  \titleformat{\chapter}[block]{} {#1}{0pt}{}  \begin{document}  \tableofcontents \chapter{hi there}  \end{document}   In this example code, we redefine the \chapter command. In my real example, I use the explicit option because I need to pass the title of the chapter to a complicated Tikz code. However, as it's written, the \chapter* of \tableofcontents doesn't display any heading at all.    The question is: how do you work titlesec when the explicit option is on, to allow the printing of starred chapters?


Should players get a surprise attack by interrupting a villain's speech?

Just before confrontations with the "boss" of a dungeon or adventure, I often like to ham it up a bit and let the BBEG-of-the-week gloat a bit about how brilliant their plan is, or what a thorn in the side the PCs have been, or about how the PCs will never win, etc. Usually this is pretty brief, but it sets the tone of the encounter, and generally allows the players a window to say anything they wanted to say before we start the final combat. It also gives the players a chance to ask questions in case they missed something about the plot and they'd like it cleared up in-game.  Usually this goes just fine, and the players seem to generally like it, but sometimes a player who doesn't quite fit the narrative-focused mindset of the rest of the party gets a little restless and throws the first punch. Again, usually this doesn't happen, but occasionally it does.  If a player decides to do this in a given speech, how should I respond? I've defaulted to making everyone roll initiative when a player says they attack in a situation like this. After all, I don't really want to reward the players for attacking in the middle of dialogue, since I (and most of the players) find the dialogue to be really fun, and it mostly exists for the players' benefit, anyway. Besides, when the villain finally attacks, they don't get a surprise round -- their attack just means everyone has to roll initiative.  On the other hand, I feel like the player who threw the first punch might feel a little cheated in not getting a free shot off. They might be trying to have a cool moment of emulating Han Solo, blasting the enemy when they're caught off-guard gloating. Since I make them roll initiative, though, I rob them of this moment and Greedo might get the first shot off, anyway.  So, in this situation, should the player who fires first get a surprise round, or am I handling it correctly in making everyone roll initiative?  5e is the relevant edition, here. Quoting the rules is nice, but I'll take a well-reasoned argument for one way of playing or the other over a strictly RAW answer.


Footer relative is not always at the bottom of the page

I am building a website with a relative footer (first picture) but as you can see the footer is not placed at the bottom when there is not enough content on the page.  I could resolve it with position absolute but then the content of the page is hidden behind the footer (picture 2).  My question   How can I put the footer on the bottom of the page but still push it down when there is more content added to the page.       Thank you for the help.


How can I get Google Sheets to treat my form-submitted strings as plain text and preserve leading zeros?

I have Google Forms where users enter information, some of which contains leading zeros (e.g. zip codes, ID numbers).   However, when this data is saved to the Google Sheet, it doesn't treat it as plain text and strips the zero. The form fields are text fields with no validation.   I have tried to format the range of cells containing these values as plain text, but it seems Sheets does not set the formatting as plain text unless there is already text in a cell. So I can format a column as plain text, submit the form, and the leading zero will still be stripped.   I tried writing an apps script to deal with this but there's no good way for me to deploy it to the users who would need it.   How can I get around this without having to instruct users to prepend a single quote to their form entry? This is such a small thing, but I can't find a good simple solution to what it seems must be a common problem. If I can't get this to work I may have to drop Google Forms/Sheets altogether.


Null pointer exception error while parsing JSON string

JSON String is like this:  {     "products": [{         "Variants": [{             "SellPrice": "18.00",             "VariantID": "1",             "VariantName": "50 GM",             "InCart": "0",             "MRP": "19.00",             "VariantImagePath": null         }],         "SubCategoryID": "44",         "ProductImagePath": "/images/patanjali/1819.png",         "SubCategoryName": "Bathing Soap",         "BrandName": "Patanjali",         "ProductID": "1",         "BrandID": "112",         "ProductName": "Body Cleanser - Lemon Honey Kanti"     }, {         "Variants": [{             "SellPrice": "24.00",             "VariantID": "47",             "VariantName": "75 GM",             "InCart": "0",             "MRP": "25.00",             "VariantImagePath": null         }],         "SubCategoryID": "44",         "ProductImagePath": "/images/patanjali/1817.png",         "SubCategoryName": "Bathing Soap",         "BrandName": "Patanjali",         "ProductID": "2",         "BrandID": "112",         "ProductName": "Body Cleanser - Mogra"     }] }    And this logic for parsing the string.  try {     JSONObject jsonRootObject = new JSONObject(jsonStr);     //Get the instance of JSONArray that contains JSONObjects     JSONArray jsonArray = jsonRootObject.optJSONArray("products");     //Iterate the jsonArray and print the info of JSONObjects     //utility.displayToast(jsonArray.length() + " ");     for (int i = 0; i < jsonArray.length(); ++i) {         JSONObject jsonObject = jsonArray.getJSONObject(i);         int id = Integer.parseInt(jsonObject.optString("ProductID").toString());         String name = jsonObject.optString("ProductName").toString();         String imagePath = Utility.BASEURL + jsonObject.optString("ProductImagePath").toString();          int brandId = Integer.parseInt(jsonObject.optString("BrandID").toString());         String brandName = jsonObject.optString("BrandName").toString();          Brand b = new Brand(brandId, brandName, null);          JSONArray variantArray = jsonRootObject.optJSONArray("Variants");         ArrayList <ProductVariant> productVariant = new ArrayList<>();         for (int j = 0; j < variantArray.length(); ++j){             JSONObject variantObject = variantArray.getJSONObject(j);             int variantId = Integer.parseInt(variantObject.optString("VariantID").toString());             String variantName = variantObject.optString("VariantName");             Double variantMRP = Double.parseDouble(variantObject.optString("MRP").toString());             Double variantSellPrice = Double.parseDouble(variantObject.optString("SellPrice").toString());             Variant variant = new Variant(variantId, variantName);             ProductVariant pVariant = new ProductVariant(0, variantSellPrice, variantMRP, variant);             productVariant.add(pVariant);         }          Product p = new Product(id, name, imagePath, b, null, productVariant);         products.add(p);         } } catch (JSONException e) {     e.printStackTrace(); }   Code is giving NUllpointer exception error in this line  for (int j = 0; j < variantArray.length(); ++j){  Can anybody help me on this?


What are JSON Files and why are they so useful in python

So I'm just wondering what JSON files are, as I lack some knowledge of python files. Please could you also tell me why these are very useful in python, as nearly every python book has them. Thanks. Edit: I have realized that this are other answers for this problem on stackoverflow which I didn't realize about when I made this quote. Sorry. I cannot delete this post anymore, since answers are already flowing in.


Rep "prize money" when badges are awarded

Introduction I would like to propose that whenever a badge is awarded an additional rep reward is also given (bear with me this isn't just an attempt to get more rep for my badges). Context of rep In almost all cases rep is given for subject level knowledge, well researched questions receive upvotes and accurate answers receive upvotes; both requiring subject level knowledge. The only way to gain rep without having subject level knowledge is editing and that’s a slow process at +2 a time. However; rep opens up increasingly more tools. First convenience tools like comments and posting images then voting and then increasing levels of moderator tools. Context of badges Badges on the other hand are awarded for a wide variety of reasons, some subject level like Great-Answer but many are for correctly using the abilities you already have such as Deputy for raising 80 helpful flags or Steward for reviewing. Badges are shiny and fun to collect but (apart from a few specific ones for moderator elections) have no other effect. Conclusion I believe that someone having previously been awarded the Marshal badge for raising 500 helpful flags is a good indication that they'll do a good job of close/reopen voting. Rep with badges would support this.  Considerations The main purpose of stack exchange is and always should be answering questions. For these reasons some restrictions should probably be placed on this.  Bronze badges should probably get 0 because they are too easy to get. Perhaps a limit should be set on badge based rep (similar to edit based rep) or a ratio limit of badge rep to normal rep (probably too complicated) Perhaps a minimum rep should be required before you start getting badge based rep to avoid people having high rep without ever having posted a well received question/answer (although this can already be achieved with editing) Its also probably excessive to additionally reward badges that result from rep-generating activities, such as Great Answer Easily gamable badges certainly shouldn't generate rep


The images linked below show what I want to do and what I get. I'm completely new to Tikz. What am I doing wrong?        \text{det}\left[\begin{array}{ccc}                 a_{11}\tikzmark{a11} & a_{12}\tikzmark{a12} & a_{13}\tikzmark{a13} \\                 a_{21} & a_{22}\tikzmark{a22} & a_{23}\tikzmark{a23} \\                 a_{31} & a_{32} & a_{33}\tikzmark{a33} \\        \end{array}\right]        \begin{array}{cc}                 a_{11} & a_{12} \\                 a_{21}\tikzmark{a21} & a_{22} \\                 a_{31}\tikzmark{a31} & a_{32}\tikzmark{a31} \\        \end{array} =(a_{11}a_{22}a_{33}+a_{12}a_{23}a_{31}+a_{13}a_{21}a_{32}) - (a_{13}a_{22}a_{31}+a_{11}a_{23}a_{32}+a_{12}a_{21}a_{33}).        \end{equation}         \begin{tikzpicture}[overlay, remember picture]             \draw [-] ({pic cs:a11}) to ({pic cs:a22});             \draw [-] ({pic cs:a22}) to ({pic cs:a33});             \draw [-] ({pic cs:a12}) to ({pic cs:a23});        \end{tikzpicture}


Correlation between discrete and continuous variables

I am using a scale which consists of discrete values 0 (normal), 1 (mild), 2 (moderate), 3 (severe). I have used this scale for 200 patients.   I am going to find the correlation of this scale with some continuous variables, these variables also measured for 200 patients.   I don't think I can use multivariate or multiple regression because the dependent variable is discrete and the independent variables continuous. Can you please suggest a method to find this correlation?


Getting Image from URL returns NullPointerException (Java)

I'm trying to set JButton ImageIcon with an image taken from a URL. This is the code I have:          try{             URL imageFile=new URL(picturePath);             carPic=ImageIO.read(imageFile);             picturePane.setIcon(new ImageIcon(carPic));//this line gives the exception         }catch(IOException e){             e.printStackTrace();         }   Where "picturePath" is the image URL.  The URLs I plan to use are just the normal ones obtained with "copy image address" and read as such: ""   Do I have to do something to the URLs to get them to work right, or is there some other problem with the code itself?


Why does the Monotone Convergence Theorem require increasing sequence.

The monotone convergence theorem in my text requires $f_n$ to be a non-negative, increasing, pointwise convergence sequence.   Why does $f_n$ have to be a decreasing sequence? Is there an example of when the sequence is decreasing it the theorem is not true?


Convert string datetime to timestamp and vice verse in python

I have a date stored as a string:-   16/07/2014 13:00:00  I want to convert this into timestamp.  Also from timestamp to this format again.  Please suggest the best possible way to do this in python.


This page has an error. You might just need to refresh it. Action failed [Cannot read property 'setParams' of undefined] Failing descriptor:

<aura:component >     Test </aura:component>     ({     createRecord : function (component, event, helper) {     var navEvt = $A.get("e.force:navigateToSObject");     navEvt.setParams({       "recordId": "0017F00000VA26WQAT",       "slideDevName": "detail"     });     navEvt.fire(); } })


Ability to pick a primary tag of a question

Referenced question:   It has tags: symlink, vagrant, 'virtualbox,chef`  As the title mentions, it's about symlink mainly, other tags are just assocation with the context of the question.  If you see the view of the question, the question appears as if this is a virtualbox question.    I am not sure of the algorithm it uses to pick a tag to show in the page, but I think there should be a way to pick primary tag, it could be as simple as respecting the order by which it was added in the question.


My Software Center won't open - Ubuntu 16.04

When I try to reinstall or remove Software Center, it says  E: Malformed line 7 in source list /etc/apt/sources.list (type) E: The List of sources could not be read.   Please help.


The tangent space $T_{(x,x)}(\triangle)$ is the diagonal of $T_x(X) \times T_x(X).$ - Is this proof legit?

If $\triangle$ is the diagonal of $X \times X$, show that its tangent space $T_{(x,x)}(\triangle)$ is the diagonal of $T_x(X) \times T_x(X).$ Is the following proof legit?    $T_{(x,x)} \Delta \subseteq \Delta \subseteq T_x X \times T_x X$   All tangent vectors at the point $(x,x)$ in $\Delta$ are described by velocity vectors of curves passing through $(x,x)$. Suppose $c(t)$ is a curve through $(x,x)$ such that $c(0) = (x,x)$, then the velocity vector is given by $c'(0)$. Any $c(t)$ that lies in the diagonal looks like $c(t) = (\gamma(t), \gamma(t))$, where $\gamma(t)$ is a curve in $X$ through the point $x$ i.e., $\gamma(0) = x$ and $\gamma'(0) = v \in T_x X$. Then $c'(t) = (\gamma'(t), \gamma'(t))$ and $c'(0) = (v,v) \in \Delta \subseteq T_x X \times T_x X$.    $T_x X \times T_x X \subseteq \Delta \subseteq T_{(x,x)} \Delta$   All tangent vectors at the point $x$ in $X$ are described by velocity vectors of curves passing through $x$. Suppose $r(t)$ is a curve through $x$ such that $r(0) = x$, then the velocity vector is given by $r'(0)$. Any element that lies in $T_x \times T_x$ looks like $(r^\prime(t), r^\prime(t))$, which is element in $T_{x,x}(\Delta)$.  Thanks.  This question intends to fill in the answer for the question  And I do realize this is a very popular question, here's another identical problem again with partial solution: .


Is it safe to call a stored procedure from PDO without preparing when I have absolute control over the IN parameter?

Like in a foreach loop below: foreach ($boos as $boo) {   ...   $return_values = $pdo->query("CALL my_stored_procedure('$boo')")->fetchColumn();   ... }


When and why is $\frac{d}{dt}\delta q^{i}=\delta \frac{dq^{i}}{dt}$ true?

Apparently my question is different from .  I hadn't noticed because the answer given in the comments to this question was satisfactory for my immediate purposes.  My question pertains to time-independent variation, whereas the other question pertains to time-dependent variations.   By time-independent variation I mean an active variation of the generalized position coordinates which does not change with time for a given configuration point.  That is, one that may be written without an explicit time argument.  Position as a function of time $\left\{q\right\}=\left\{q^{i}\left[t\right]\right\}$ is assumed to be some sufficiently smooth trajectory in configuration space representing the actual physical system being modeled.  At the point in the discussion where the question occurred to me, the only variations considered are active rigid transformations.  These are assumed "infinitesimal" in the case of rotations.  No further definitions for $\delta{q^i}$ and $\delta{\dot{q}^i}$ were given.  See: The Theoretical Minimum: What You Need to Know to Start Doing Physics, by Susskind and Harbovsky.  Apparently, in the case of time-independent variations, $\delta{\dot{q}^i}$ has to be given independently of $\delta{q^i},$ or be defined using the chain-rule, treating the argument $\left\{q\right\}$ in $\delta q^{i}=f^{i}\left[\left\{q\right\}\right]\varepsilon$ as a function of time.    In the case where $\delta{q^i}$ and $\dot{\delta{q^i}}$ are given independently the commutativity has to be part of the definition.  Following Susskind, a variation of the form   $$\delta q^{i}=f^{i}\left[\left\{q\right\}\right]\varepsilon,$$  such that the consequent variation of the Lagrangian is $\delta{L}=0,$ is said to be a symmetry. Using Einstein summation, the variation of the Lagrangian may be written  $$\delta{L}=\delta L=\frac{\partial L}{\partial q^{i}}\delta{q^{i}}+\frac{\partial L}{\partial\dot{q}^{i}}\delta\dot{q}^{i}.$$  Assuming the trajectory of the configuration point has a stationary action integral, and therefore satisfies the Euler-Lagrange differential equation, we may write  $$\delta L=\dot{p_{i}}\delta q^{i}+p_{i}\delta\dot{q}^{i}.$$  If we can justify its application in this context, the basic calculus rule for the derivative of the product gives   $$\delta L=\frac{d}{dt}\left[p_{i}\delta q^{i}\right].$$ Apparently, this applicability depends upon the validity of   $$\frac{d}{dt}\delta q^{i}=\delta \frac{dq^{i}}{dt}.$$  Within the context of discussing the rectilinear motion of a single particle and  variations which are purely translational or purely rotational, the equation  $$\delta \dot{q}^{i}=f^{i}\left[\left\{\dot{q}\right\}\right]\varepsilon$$  was asserted to follow from the corresponding variation of the position coordinates.  The claim is fairly obvious for those circumstances.  But it is less obvious for more general variations such as those applied to a path when seeking a stationary action integral.  I believe the product rule is applicable to all "well-behaved" variations, but I'm having difficulty formulating a satisfactory argument (informal or formal proof) of that fact.  I am assuming that the operators $f^i$ are point functions of the coordinate system and are time-independent.  I believe they will always be affine transformations.  So, my question is: in the context of time-independent variations of the configuration of a system, when and why is it true that  $$\frac{d}{dt}\delta q^{i}=\delta \frac{dq^{i}}{dt}?$$


List only regular files (but not directories) in current directory

I can use ls -ld */ to list all the directory entries in the current directory. Is there a similarly easy way to just list all the regular files in the current directory? I know I can use find  find . -maxdepth 1 -type f   or stat  stat -c "%F %n" * | grep "regular file" | cut -d' ' -f 3-   but these do not strike me as being overly elegant. Is there a nice short way to list only the regular files (I don't care about devices, pipes, etc.) but not the sub-directories of the current directory? Listing symbolic links as well would be a plus, but is not a necessity.


MY question is how to prove $|X-Y|\le|X|+|Y|$.  My textbook proves another version of triangular inequality, which is   $|A|-|B|\le|A-B|$ by substituting X=A-B and Y=B into $|X+Y|\le|X|+|Y|$,   but it leaves the above version as an exercise, and I can't solve it.   Thank you in advance. :)


How can we prove that a number is a prime with some limits?

A simple python program implemented a simple fact that the number is prime if no numbers within it's square root including the square root and excluding 1 divide it. Empirically analyzing it for some 50 numbers I found it true and the remaining numbers that were not divided by any numbers as mentioned were prime numbers. But such observation didn't fully satisfy me? How can we prove this using more properties and theories that have already been verified(in an abstract way that is)?


Change GRUB Keyboard Layout from English to German

I am facing a problem with grub. After a fresh install of Ubuntu 17.10 Grub is using the English keyboard layout instead of a German one. This applies to the Grub console and to the LUKS password prompt that opens directly after the boot manager. Since I am using full disk encryption with a rather strong passphrase, I have to adapt it to the US keyboard layout.  I have tried  solution but it did not work. The layout remains English without any errors or messages. Moreover, I can't use the keyboard in the bootmanager at all. So I reverted the changes suggested in the solution.  I never faced this problem before.


How to render a PNG-file on the screen with SDL?

I'm coding a 2D platformer in using C++ and SDL2. I've started by coding the GUI, however I'm unsure how to get the menu buttons onto the screen and in the right positions.   How do I load the PNG menu buttons onto the screen in a way that I can adjust them to get them in the right spots?


How do I perform an IF...THEN in an SQL SELECT?

How do I perform an IF...THEN in an SQL SELECT statement?  For example:  SELECT IF(Obsolete = 'N' OR InStock = 'Y' ? 1 : 0) AS Saleable, * FROM Product


If I inherit from a base class and want to pass something from the constructor of the inherited class to the constructor of the base class, how do I do that?  For example, if I inherit from the Exception class I want to do something like this:  class MyExceptionClass : Exception {      public MyExceptionClass(string message, string extraInfo)      {          //This is where it's all falling apart          base(message);      } }   Basically what I want is to be able to pass the string message to the base Exception class.


Does a term exist for the class of words in English that have no exact synonyms (duodecimal, petrichor, labrador, to cite a few random examples)?  This would be that class of words for which a thesaurus could provide only a circumlocution.


I want to understand the way this circuit works. The following are diagrams of the transmitter and receiver of a wireless iPod charging circuit. I have added a link to the instructable that describes this project. From what I have understood, the transmitter takes the DC input voltage,and turns it into an oscillating signal that can be transferred to the receiver circuit through the inductor. The recieving circuit then rectifies, filters and regulates this signal to give DC output?  Is that how this is working?  Also, are the resistors in the receiver circuit put there for the female USB? Why? Also when I bought the diodes for the transmitter circuit, I could only get 1 UF4007 and the other is a 1N4001. Will that affect the functioning of the circuit?  Thank you for your time!   This is the transmitter circuit.   This is the receiver circuit.


I ran into a cool trick for . This is actually a recurrent relation which states that:  If $D(N)$ denotes the last non zero digit of factorial, then   $$D(N)=4D\left(\left\lfloor{\frac N5}\right\rfloor\right)\cdot D(\mbox{Units digit of $N$})  \qquad \mbox{(If tens digit of $N$ is odd)}$$ $$D(N)=6D\left(\left\lfloor{\frac N5}\right\rfloor\right)\cdot D(\mbox{Units digit of $N$})  \qquad \mbox{(If tens digit of $N$ is even)}$$  Where $\left\lfloor\cdots\right\rfloor$ is greatest integer function.  I was wondering, if anybody could explain why this works?


Why is light affected by gravity even though it is massless?


Let $X,Y,Z$ be subspaces of $V$ so that $X$ is a subspace of $Y$. Prove that $Y\cap (X+Z)=X+(Y\cap Z)$  I know that I need to prove that $Y\cap (X+Z)\subseteq X+(Y\cap Z)$ and $X+(Y\cap Z)\subseteq Y\cap (X+Z)$ but I´m having a hard time.  Can you lend me a hand please? I would really appreciate it


Latest update to Thunderbird 60.2.1 on 18.04 - Lightning calendar missing

After completing an Ubuntu automatic software update (15 Oct 2018) that included Thunderbird 60.2.1 the Lightning calendar is now missing.  When I click on Thunderbird's Add-On tab to see if there's an update for Lightning I'm told that all the versions of Lightning available there are not compatible with the updated Thunderbird release. All my calendar data is no longer available to me - HELP!!


Is it possible to split the data plug of a SATA connection?  I have 2 hard drives and an optical drive I want to use simultaneously, but my computer only has 2 SATA connections.  I can power the extra hard drive from another PSU I have, so power isn't an issue.  The question is if its possible to split the data connection.


Use of the special power "Diplomat" against another player not yet entered the game in Smallworld

If you're playing a race with the special power "Diplomat" during the first round, are you allowed to declare peace with a player that has not yet entered the game?


How to have google index a login protected url?

For example, my site: http://abcde.foobar.com is protected by a "single sign on" login page hosted at http://sso.foobar.com, so when a user visits "abcde", they get redirected to the "sso" login page always, and they have to login to access "abcde".  It seems Google does not know about my "abcde" site at all, how do I make google know about my "abcde" site? Because a lot of my users are trying to search for "abcde" in google and the site doesn't come up. (my "abcde" url is very obsecure and not a word, so google should put my site on top if it had known about it)


How to prevent mail from our website going into spam mail of users?

I work for an educational services company based in India. We've around one million students enrolled as users. We're frequently facing the problem of our bulk mailers regarding upcoming exams, new product launches and promotions going into spam mail folders of the students. Is the problem in the headlines? Or where else? what can we do to reduce this number?   This is killing us, we cannot have an impossibly large precentage of mails not being opened..Please help.


Realtime Transfer (Stream) the Audio to "another mobile" device "directly" without any in-between components?

How to do if I want to play some (any) sounds on one device, and then want another device to hear the same thing at the same time?  And what i also mean is to be able to connect "directly" (via BlueTooth or WiFi) by not using any in-between Server or any such components. Or, should i say point-to-point? P2P? (Lets say without Internet)


Using ipad pro and apple pencil as a graphics tablet

I have an iPad Pro + Pencil and was wondering if there is any chance to use it as a graphics tablet with blender? I mean drawing on my Ipad and see on my pc monitor. Thanks.


How to cover Apexpages.currentPage().getParameters().get('Id'); in test class and assign id value to a child object

How can I cover these two lines in test class? I was able to cover first line but not the second. I need to create and assign the id to the child object. Id oppid = Apexpages.currentPage().getParameters().get('Id'); solist = [ select Order_Number__c from requested_item__c where quote_number__c=: oppid  and awarded__c=true order by Order_Number__c ASC];


Unusual extra 2 bytes being written with a 2 byte char array in a binary file

I was writing a generator for an old assignment that made a binary tree in-order and printed it to a binary file where then I could check that the nodes were written correctly using od in bash. I noticed that when the 2 char array carrying the values for the nodes was written it ended up taking 4 bytes in comparison to the expected 2 at most. Not only that but without fail every time the third node is written that extra 2 bytes is negative filled with 0xFFFF. When I remove the char array from the Node struct and all related code to it, whatever those extra bytes were disappeared completely. I was able to complete the assignment fine by ignoring that part of the file when read back but I'm still stumped why it was ever written in the first place. I will include my code and the output from 'od -x' after running it on the output file from making a tree with 10 nodes.       int32_t loc;      char value[2];      int32_t left;      int32_t right;  }Node;  char getRandUpper() {     return (char)('A' + (rand() % 26)); }  int main(int argc, char* argv[]) {     srand((unsigned int)time(NULL));      int numOfNodes = atoi(argv[2]);     char* fileName = argv[1];      FILE* filePtr = fopen(fileName, "wb");      Node biTree[numOfNodes];      for(int i = 0; i < numOfNodes; i++) {         biTree[i].loc = i;         if((i * 2) >= numOfNodes) {             biTree[i].left = -1;             biTree[i].right = -1;         } else {             biTree[i].left = (2 * i) + 1;             biTree[i].right = (2 * i) + 2;         }         for(int j = 0; j < 2; j ++) {             biTree[i].value[j] = getRandUpper();             printf("%c", biTree[i].value[j]);             printf("size of char array: %ld bytes\n", sizeof(biTree[i].value));         }     }      fwrite(biTree, sizeof(Node), numOfNodes, filePtr);      fclose(filePtr);     return 0; }   Here is the output from od:  0000020 0001 0000 484f 0000 0003 0000 0004 0000 0000040 0002 0000 4652 ffff 0005 0000 0006 0000 0000060 0003 0000 4657 0000 0007 0000 0008 0000 0000100 0004 0000 4557 0000 0009 0000 000a 0000 0000120 0005 0000 4152 0000 ffff ffff ffff ffff 0000140 0006 0000 4a41 0000 ffff ffff ffff ffff 0000160 0007 0000 414a 0000 ffff ffff ffff ffff 0000200 0008 0000 4c41 0000 ffff ffff ffff ffff 0000220 0009 0000 504e 0000 ffff ffff ffff ffff 0000240   Anything to demystify this for myself would be appreciated. It's probably just my stupidity but who knows.


Can Two Different Polynomials Agree on an open interval?

Question: For a high degree polynomial $P_1$ , can we have another polynomial $P_2$ that is a part of $P_1$ (or they agree on open interval)?    TBN: This question is partially answered in : however I need to know if it is true for all polynomials of any degree.


best appraoch to modify a site collection url inside sharepoint 2013

I have a site collection (of type enterprise KB) under the following URL http//servername/customer/questions where the customer is a wildcard managed path. now I want to change the site collection URL to be http://servername/customer/generalquestions.   so I am not sure how to change the site collection URL. I read that I can backup the current site collection, remove it,create a new site collection under the desired URL (customer/GeneralQuestion), restore the backup file on the new url.. but I am not sure if there is a more straightforward approach  to follow? using power shell or UI to accomplish this ?  Thanks


Does she have a car ? Or does she has a car ?   What is the difference between these two questions ?   What do they mean ?


python how to create a string that is 4 characters long from a number

How to input a number from 0 to 1000 and have python return a string that is always 4 characters long. for example: input 10 python should return 0010


I use the following code to send an email from my Gmail account. But the following error is occurred. Unable to connect to the remote server what's wrong with my code?         string from = "xxxx@gmail.com";         string to = TxtTo.Text;         string cc = "yyyy@gmail.com";         string subject = TxtSubject.Text;         string body = EdtContext.Content;         MailMessage EMail = new MailMessage();         MailAddress Sender = new MailAddress(from);         EMail.From = Sender;         EMail.To.Add(to);         EMail.CC.Add(cc);         EMail.Body = body;         EMail.IsBodyHtml = true;         EMail.Subject = subject;         EMail.BodyEncoding = Encoding.UTF8;         SmtpClient Local = new SmtpClient("smtp.gmail.com");//--- smtp          Local.Port = 465;          Local.EnableSsl = true;          Local.UseDefaultCredentials = false;                    Local.Credentials = new System.Net.NetworkCredential("xxxx@gmail.com", "*****");//------ email user and pass in sobhan mail         Local.Send(EMail);  *************** **Port 587 solved problem**


Recovery of quick cast and arcane attunements

My Elven Duskblade is defending a cave with his guardsmen party against undead. We will probably get no rest all night. How would recovery of attunements and quick cast work? I know I won't recover spells without rest but haven't found any rules on recovery of SLA's or class abilities.


Retaining all fishnet grid squares within boundary of polygon from another feature class?

I have created a fishnet grid (3km x 3km) over a vector polygon.   I now want to clip the fishnet over the vector polygon retaining all grid squares within the boundary of the polygon.   Therefore I want all squares that would typically be clipped into partial squares to remain as whole squares.   Does anybody know how to do this?


Cutting out white (low contrast) objects from white background

I need to figure out the most efficient way to make quick cutouts of white products and a white background. I usually make a copy of the blue channel, level it out and paint over the rest, but it's a pain when I have to cut 40 pics with predominant white cloth.   P.S. My eyes hurt, plz hlp  UPDATE  I am not the photographer and i cant request the photos be made on a green screen.


My official name is Md. Tipu Sultan. Can I use only Tipu Sultan for publishing scientific articles or would there be any problem? I already have published a articles as Tipu Sultan.


When I try to use terminal, I put in a command and then it asks for my password.  I type my password and nothing comes up on the screen.  Help?


What resolution should a large format artwork for print be?

For wall-sized graphics and large banners (e.g. 3m × 5m), what is an acceptable PPI for print? As I understand it 300 ppi is the typical for 'small' artworks (esp. for clean text resolution). However, for small artworks, the audience usually engages at a much closer distance. Therefore, in the interests of keeping a bitmap file down to a reasonable size, can you get away with a much-reduced PPI for a large format/banner print?


I have tried everything and I gave it 256 (yes 256) fish and it still won't tame! It's just running around in my house. If anyone can help me please do so.


What prevents people from manipulating data to write better papers?

Many papers use nonstandard data sets, which means the authors could have manipulated the data behind the scenes to make their paper look more impressive.  It seems that this could be done very easily: for example, one could cherry pick the items of the data set to make it seem like an algorithm has 90%+ accuracy while in reality it's about 60%.  What prevents people from doing this?  Is there something I'm missing?


Need help installing a Portuguese dictionary in TexMaker

I've all ready tried to install this file pt_BR.dic in the TeXmaker, but when I went to pull the file through the TeXmaker configuration, it simply doesn't worked. I use Ubuntu 12.04 LTS. Is there any alternative form of installation for a Portuguese dictionary?


Is it possible to mark the same tag as "Interesting" and "Ignored"?

Can you mark the same tag as both interesting and ignored? If you can, what is the resulting appearance of a question with that tag?


How to set up beamer to grey out past items but hide future items?

I know about beamer's  feature \setbeamercovered{invisible} and \setbeamercovered{transparent} to hide or grey out upcoming item's . But is there some way to have past items greyed (transparent) and future items hidden (invisible), so that only the current item is black/highlighted? And the best would be if on or 1 slide after the last all the item's could be visible highlighted. Something like this:   [grey] past 1 [grey] past 2 current [hidden] future 1 [hidden] future 2 [hidden] future 3   Is there any easy way of doing this?


Can running `yes > /dev/null` harm a Mac?

I recently ran yes > /dev/null for a 3 minutes to drain my Mac's battery. During that time, the temperature rose to 72 °C and fans spun up to 4000 RPM. I immediately quit the process.   Should I fear that has this damaged hardware or the logic board?


why initializing a variable in switch case give me error while compilation

I am writing one sample c++ program , but while initializing the variable inside the switch case it gives me compilation error.  if i am declaring it like int x; its not giving the error, same is happening when i am doing it inside a case block also.  #include <iostream>  using namespace std;  int main() {     int x=3;    switch(x)    {        int y=10;        case 2:           cout<< "c++";    } }   this gives me error like error: jump to case label [-fpermissive]  can anybody clarify my doubts


How to have a popup calendar in a date view exposed filter?

I am setting up a view, with the Authored on filter exposed. When selecting the box, there isn't any popup calendar.  Doesn't Drupal 8 come with a calendar popup in core? How can I turn this on for exposed filters with date?


I'm running Ubuntu Server 12.04, and I want to enable SSL connections to MySQL.  I've generated the following keys/certs files with OpenSSL:   ca-cert.pem server-cert.pem server-key.pem   I stored these at /etc/mysql, then added added the following lines to /etc/mysql/my.cnf:  ssl-ca=/etc/mysql/ca-cert.pem ssl-cert=/etc/mysql/server-cert.pem ssl-key=/etc/mysql/server-key.pem   Next, I restarted the server with sudo service restart mysql.  However, this doesn't seem to enable SSL. Within a mysql session:  mysql> show variables like '%ssl%'; +---------------+----------------------------+ | Variable_name | Value                      | +---------------+----------------------------+ | have_openssl  | DISABLED                   | | have_ssl      | DISABLED                   | | ssl_ca        | /etc/mysql/ca-cert.pem     | | ssl_capath    |                            | | ssl_cert      | /etc/mysql/server-cert.pem | | ssl_cipher    |                            | | ssl_key       | /etc/mysql/server-key.pem  | +---------------+----------------------------+   Any ideas what I'm missing? Thanks


Show that the sequence defined as $x_{n+1}=\frac{1}{2}(x_n+x_{n-1})$ is convergent

Show that the sequence $(x_n)$ defined as $x_{n+1}=\frac{1}{2}(x_n+x_{n-1}), x_0=2, x_1=7$ is convergent. My attempt is to show that $(x_n)$ is Cauchy. So, i would like to have a feedback on my proof, please. There also might be a problem in a limit calculation... I have also one question in the end of the proof. First of all we got $\forall p\ge2$ that: $|x_p-x_{p-1}|=|\frac{1}{2}x_{p-1}-\frac{1}{2}x_{p-3}|=...=(\frac{1}{2})^{p-1}|x_2-x_0|=5(\frac{1}{2})^{p-1}$ Then, by definition of a Cauchy sequence, we have to show that $\forall \varepsilon>0 \ \exists N \ \forall m,n\ge N$: $|x_m-x_n|<\varepsilon$. But, $|x_m-x_n|\le|x_m-x_{m-1}|+|x_{m-1}-x_{m-2}|+...+|x_{n+1}-x_n|\le 5\sum_{k=n}^{m-1}(\frac{1}{2})^k=5(\frac{1}{2^{n-1}}-\frac{1}{2^{m-1}})\le 5\frac{1}{2^{n-1}}$ and so $(x_n)$ is a Cauchy sequence. To calculate it's limit we can consider the following: $x_n=(x_n-x_{n-1})+(x_{n-1}-x_{n-2})+...+(x_1-x_0)+x_0 =5\underbrace{\sum_{k=0}^{n-1}(\frac{1}{2})^k}_{\text{geometric series}}+2=5\Big(\frac{1-(1/2)^n}{1-1/2}\Big)+2$ So $\lim_{n \to \infty}x_n=12$... (Which might be false...) Now i have some questions: (i) First of all, my limit is clearly false as if i check first 5 values it is clear that the sequence might converge to $\sim5,3$. So, I would like to understand where i commited an error. (ii) Then, if my proof is correct, i doubt if it holds for real... If we take $m=n-1$ and $\varepsilon=1$, we have a counter example, probably. So, in $|x_p-x_{p-1}|\le5\Big(\frac{1}{2}\Big)^{p-1}$, the value $5$ makes me doubting... If possible, i would like an elaborate answer and feedback for these questions and this proof, please.


How to convert many triangles to one mesh?

I wrote an algorithm to randomly generate terrain and I am trying to load and edit my results with blender.  The problem is that when I load my terrain in blender, the individual triangles are not linked together.     You can see when I shrink/flatten a subset the the faces, the rest don't follow and deform as a single mesh.  I tried deleting the faces and edges and using F to create faces from the points, but it does not give usable results.    How can I go about solving this problem?


Is there a natural sounding text-to-speech package?

This question was asked here, four years ago:   However, text-to-speech is something that's still improving and evolving fast, and all of the answers yield software that sounds tinny or unnatural. I know that no TTS will be perfect, but I'm positive there must be better solutions now in 2015.  The size of the package doesn't matter; it doesn't have to be lightweight, it can be bloated for all I care; I only care about the end result. It only has to be free and available for Ubuntu.


How to change property 'string' in object with class Drupal\Core\StringTranslation\TranslatableMarkup in my hook?

The property 'string' is protected as I can see here   but I need to change word "- Any -" in my exposed filter form to my string "All terms"?  I cannot do this cause I do not know how to use this class and how to change output.  This hook says: cannot get value of protected property.  function MYtheme_form_alter(&$form, \Drupal\Core\Form\FormStateInterface $form_state, $form_id) {   if ( ( $form['#attributes']['class'][0] == 'views-exposed-form' ) &&          ( $form['#info']['filter-field_color_target_id']['operator'] == 'field_color_target_id_op' ) )   {       dpm($form['color']['#options']['All']->string);       //$form['color']['#options']['All']->string = t('All terms');   } }


I have a canon 700D camera, and an 18-55mm lens.  I would like to buy another lens, but I am confused.   I like to photograph celebrations, marriage parties, and casual family functions  Please suggest one lens for me.  Antony Manoj.


i can`t understand why NullPointerException happen

package Sound;      import javax.swing.*;      public class practice_1 {         JFrame frame;         public static void main(String[] args)          {             practice_1 gogo=new practice_1();              gogo.go();         }         public void go()         {             frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);              JButton button =new JButton("click me");             frame.getContentPane().add(button);              frame.setSize(300,300);             frame.setVisible(true);         }     }   this is error code  Exception in thread "main" java.lang.NullPointerException     at Sound.practice_1.go(practice_1.java:16)     at Sound.practice_1.main(practice_1.java:12)   i can`t understand why NUllPointerException happen. what i know about  NUllPointerException is that when i use nullpointer object it happen   NUllPointerException. is that right?


I have collected temperature readings for 4 locations on a beach in Cornwall UK using data loggers. The loggers recorded temperature every 15 mins accurate to .1 of a degree (Celsius). The loggers collected data for 10 days with a one day break to calibrate the sensors. In total I used 30 sensors with 6-7 sensors in each position.  I have now downloaded the data and have produced time-series for temperature over the 10 day period. Visual inspection of the time-series shows how the temperature changes with tides and night and day. I want to investigate whether the time-series differ significantly from one another. Please could someone point me in the direction of a technique to do this in SPSS?


Is it possible to delete an array from an object?  For example, lets say i have an object called response and within it and array called items:  var response = { success: false, items:[] };   How do i delete 'items' from the response object?  thanks


Can you choose to delay rolling your initiative?

This is a follow-up to , specifically to .  I understand the concern of wreaking havoc on the duration of spells and other effects by delaying your turn at will in the initiative order, hence why it's not possible to "change your place" once you are engaged in an encounter.  However, in a game I played yesterday, something happened that made me think: my character was sleeping at the start of an encounter (a night ambush), and so the DM only made me roll initiative when another character woke mine up.  What I'm wondering is whether it's possible for a creature to willingly delay entering an encounter that they can see, in order to roll initiative later than the other involved creatures, thus not changing its initiative position, just being added later. Is such a thing possible per RAW?  Technically speaking, it's not that different from seeing a fight between two distant NPCs and choosing not to get involved right away, but instead picking the right moment to do so (and rolling initiative at that point). But contrary to  (where the character just arrives later and rolls initiative right when he sees the encounter), I specifically want to know whether you can see an encounter but choose not to roll initiative just yet, essentially delaying your participation in the encounter until a later time.


Image field: Force at least/exactly two images per field

I can easily set the maximum number of elements per field, but is there an easy way to specify the minimum value? For now, I have an Image field, and I want at least two images.


How to read ubuntu installed on the hard drive from the USB device (no recover GRUB)

I had Windows 7 and Ubuntu on my hard drive working without any problems, but after installing a program called "Acronis True Image" and using its "try and decide" function, I lost GRUB.   How do I recover the Ubuntu installed on my hard drive? Do I use my USB device or CD?  Edit: Ok, thanks for your answers, but I think I was not very clear ... happens every time I run the application "Try and decide" from "Acronis True Image" I lose the GRUB, what I want is to boot the ubuntu operating system on my computer from my USB Device whenever I need it without having to restore the GRUB increasingly


Monoids as a category and product structures

I'm currently going through  and I'm struggling to answer the question posed on page 26 (directly before Lecture 9).  Question:  Characterize what it means for a monoid, regarded as a category, to have products. Can a finite monoid have products? I'm using Definition 3 for products, on the bottom of page 22. Suppose $(M, \times)$ is the monoid that defines the single-object category, I tend to call the object $\cdot$. A product structure will be the $4$-tuple $(\cdot, \pi_1, \pi_2, <-,->)$ where $\pi_1, \pi_2 \in M$ and for every $f_1,f_2 \in M$ I have some element $<f_1,f_2> \in M$ so that $\pi_i \times <f_1,f_2> = f_i$. I don't see how I could pick such $\pi_i$ unless $M=\{e\}$, in which case $\pi_i=<-,->=e.$ What other $M$ could this work for?  Any help would be greatly appreciated.


Problem in Rick Miranda: finding genus of a projective curve

I have just started learning Riemann surfaces and I am using the book by Rick Miranda: Algebraic curves and Riemann Surfaces. #F in section 1.3 asks to determine the genus of the curve in $\mathbb{P}^3$ defined by the two equations $x_0x_3=2x_1x_2$ and $x_0^2 + x_1^2 +x_2^2 +x_3^2 = 0$.  #G also has a similar question in which he asks to determine the genus of the twisted cubic.  Please explain how to approach this type of question.


"Some" and "Any"; countables and uncountable

I'm doing my English homework and my book says these sentences are correct:  1) Do you have any wine?  2) Can I have some water, please?  My questions are:   These sentences are structured differently.  Does a difference between "wine" and "water" cause the sentences to be structured differently? Why do we not use the word "some" in sentence #1?


I know and I have proved more than once that the set of irrational numbers ($\mathbb{I}$) is uncountable, but now I'm given to solve this problem:   Show that $|\mathbb{I}|=|\mathbb{R}|$,  How can I do that?  Do I need to assume the Continuum Hypothesis in order to that statement to be true?  Thanks


For the delivery I've been advised to print the full output of my program to a txt file. Also I need to print the execution time using the command "time" that I have implemented in my execution script.  #!/bin/bash time ./blur-effect 4k.png 4k_out16.png 16 15 &>> Output.txt    The problem I'm having is that the program output is going correctly to the txt file, but the execution time is being showed in the terminal but it must be printed also in the txt file.


Induction and convergence of an inequality: $\frac{1\cdot3\cdot5\cdots(2n-1)}{2\cdot4\cdot6\cdots(2n)}\leq \frac{1}{\sqrt{2n+1}}$

Problem statement: Prove that $\frac{1*3*5*...*(2n-1)}{2*4*6*...(2n)}\leq \frac{1}{\sqrt{2n+1}}$ and that there exists a limit when $n \to \infty $. , $n\in \mathbb{N}$   My progress  LHS is equivalent to $\frac{(2n-1)!}{(2n)!}=\frac{(2n-1)(2n-2)(2n-3)\cdot ....}{(2n)(2n-1)(2n-2)\cdot ....}=\frac{1}{2n}$ So we can rewrite our inequality as:  $\frac{1}{2n}\leq \frac{1}{\sqrt{2n+1}}$ Let's use induction:  For $n=1$ it is obviously true. Assume $n=k$ is correct and show that $n=k+1$ holds.  $\frac{1}{2k+2}\leq \frac{1}{\sqrt{2k+3}}\Leftrightarrow 2k+2\geq\sqrt{2k+3}\Leftrightarrow 4(k+\frac{3}{4})^2-\frac{5}{4}$ after squaring and completing the square. And this does not hold for all $n$  About convergence: Is it not enough to check that $\lim_{n \to \infty}\frac{1}{2n}=\infty$ and conclude that it does not converge?


Why did I not get Snaphat for the question linked?

The  reads:     answer within 30 minutes of the question being asked, scoring 3 and getting accepted   Over at Chemistry, I  this . The question’s timestamp reads 2016-12-19 23:41:47Z, while my answer’s reads 2016-12-20 00:04:41Z. Assuming I did my maths correctly, that means the answer was posted 22:54 min after the question, i.e. within the 30 minute limit. It also has a score of +3 at the time of writing this, and was accepted.  Going by my understanding of the quotation above, I should have gotten Snaphat, which I do not have as of now.  For reference,  is the answer timeline and  is a link to the rep tab of my profile. The latter shows when the three upvotes and the accepting occured.


When I try to install I get this error:  dpkg: unrecoverable fatal error, aborting:  files list file for package `fonts-tlwg-kinnari' contains empty filename E: Sub-process /usr/bin/dpkg returned an error code (2)   And the installation is aborted.  I'm using Ubuntu 14.04


According to introductory texts on PDEs linear equations up to second order can be classified into three types:   ellyptic parabolic hyperbolic   Obviously, this corresponds to the three types of conic sections. But what is the intuition of this classification? How are conic sections and PDEs related?  To clarify: I do understand why classification makes sense. But why do we specifically use these three terms (e.g ellyptic, parabolic, hyperbolic).


I wanted to see which driver was associated with some of the network interfaces listed by ip link. My first thought was to find the network interfaces in /dev and look at the device major and minor numbers to determine the associated driver. However, network interfaces don't appear under /dev.  I'm have a feeling I'm misunderstanding something fundamental about the Linux network stack (perhaps because multiple kernel modules can be involved because of netfilter/iptables/tc), so please address this if so. My naive questions are:   How do you determine which driver performs I/O for a particular network interface? Why don't Linux network interfaces appear in /dev?


When would a persistent route not be an active route?


Are Index Funds really as good as "experts" claim?

I use the quotations because generally the people touting these the most (John Bogle) are also ones selling the index funds. Being biased doesn't mean they're wrong, but it does mean they may not be telling the whole truth.   I understand the idea that index funds are better than managed accounts. Lower fees, probably better returns, etc. etc., but generally when this topic is discussed those are the only two options considered as if they were the only investment options out there. I also agree that they probably make a lot more sense as "fire and forget" type investments for people to invest as passively as at all possible.   But are investment funds really all that much better than just buying stocks for long term investing? Index fund fees may be incredibly low, but they're still yearly fees. Whereas with a stock you can (in theory) purchase a significant ownership stake in a company for $5 and it will cost you another $5 to divest. (Oversimplification, I know.)  Also major index funds may represent a more diverse investment, also in theory, but take for instance the S&P500 where 50 companies make up about half the market cap.  Why would it not make more sense to invest in a handful of these heavyweights instead of also having to carry the weight of the other 450 (some of which are mostly just baggage)?  Even Warren Buffet has been touting the index fund for a while now, but I haven't heard that Berkshire Hathaway has major holdings in an S&P500 index fund. So it seems like there's more to the story.   Where do you think the tipping point really is here?  Edit: had to be away from the computer most of the day. Don't mean to insinuate at all that index funds are bad. Just questioning whether they're the right call for someone willing to be active enough to check their investments a few times a year.   Edit2: Just because it seems like some people may still be misunderstanding me... the comparison that this entire question revolves around is long-term, mostly passive invesments in companies rather than almost all the eggs in the index fund basket. This may be a better way to think about it rather than my question of picking stocks... ie: "[PickaCompany] has historically done pretty well, their business models seems pretty good, people like their product, I expect them to continue making profit for a while, they have a large customer base and a good share of the market in their industry, they seem like a good investment." Oversimplification by far, but it's generally these things that put companies in index funds and at the top.


How do I determine the shutter count on a EOS 60D body?

I'm selling a 60D body, and I want to check the reported shutter-release count. But I can't find it on the menu anywhere. Does someone know how to find it?  Note that the next assigned filename is not it. It notes the largest numbered file on the card and jumps ahead to that, so the numbers continued from my previous camera body.


Is it wrong to ask the same question elsewhere?

I just posted a question to  and afterward realized that it might not be answered very quickly due to how specific it was. So I also posted it on the   I plan to update both the SU and Ubuntu posts with the final answer I end up using, but I can't help but feel users from both places might not like that I've posted to both.  So my question is: Is it frowned upon to post the same question elsewhere and link to it?


Is there an effective tool to convert C# code to Java code?


Homology of manifolds using submanifolds

Motivation I have learned algebraic topology. In simplical homology, we define $C_k(X)$ as an abelian group freely generated by $k$-dimensional skeleton $X^{(k)}$, and boundary operator $\partial_k$ actually takes the $k-1$ dimensional faces.  So can we do the same on topological (or smooth) manifold? Let $M$ be an $m$-dimensional manifold. $D_k(M)$ consists of $k$-dimensional submanifolds and $\partial_k$ takes their boundary.  Does this concept exist? Is there any reference about this? Any advice is helpful. Thank you.


I am working with the article class.  I have four authors. Unfortunately, they are just a tiny bit too wide to fit on one line. (I'm talking less than a quarter inch from the margins I had set.) How can I do one of the two following things:   Decrease the space between the authors, just a little bit Make the page temporarily wider around the title   I've tried \newgeometry/\restoregeometry, but that clears the page at the commands. I've tried changepage's adjustwidth, but that makes latex output one extra page at the beginning.


Examine whether $\sum_{n=1}^\infty{\sin^2\left(\frac{1}{n}\right)}$ converges or not

I have the series $\sum_{n=1}^\infty{\sin^2\left(\frac{1}{n}\right)}$ and I'm trying to examine whether it converges or not.  My Attempts:   I first tried finding whether it diverges by checking if $\lim_{n\to\infty}{\sin^2\left(\frac{1}{n}\right)} \ne 0$.   $$ \lim_{n\to\infty}{\sin^2\left(\frac{1}{n}\right)}= \lim_{n\to\infty}{\sin\left(\frac{1}{n}\right)}\cdot\lim_{n\to\infty}{\sin\left(\frac{1}{n}\right)}=0 $$   Since I didn't get a confirmation from the first try, I then tried the d'Alembert's Criterion which didn't get me very far.   $$ \frac{a_{n+1}}{a_n}= \frac{\sin^2\left(\frac{1}{n+1}\right)}{\sin^2\left(\frac{1}{n}\right)}= \frac{    -\dfrac{2\cos\left(\frac{1}{n}\right)\sin\left(\frac{1}{n}\right)}{n^2} }{    -\dfrac{2\cos\left(\frac{1}{n+1}\right)\sin\left(\frac{1}{n+1}\right)}{\left(n+1\right)^2} }= \frac{    \cos\left(\frac{1}{n}\right)\sin\left(\frac{1}{n}\right)\left(n+1\right)^2 }{    \cos\left(\frac{1}{n+1}\right)\sin\left(\frac{1}{n+1}\right)n^2 }=\ ... $$   Finally, I tried Cauchy's Criterion, but I didn't get any conclusive result either.   $$ \sqrt[n]{a_n}= \sqrt[n]{\sin^2\left(\frac{1}{n}\right)}= \sin^{\frac{2}{n}}\left(\frac{1}{n}\right)=\ ... $$  Question:  I've been thinking for while of using the Comparison Test, but I'm not sure which series to compare mine to. How can I examine whether the series converges or not?


Why do unicorn-related posts have so many upvotes?

Why are there so many upvotes and reputation for any unicorn-related post? I just cannot understand it.


Track multiple domains using Web & Mobile Analytics Marketing Cloud

I want to track my custom links that is present in my website in to Marketing cloud. like how many times someone click on my facebook page link  from website like that how we can do that? Please Help me


non-static variable .. cannot be referenced from a static context

I have initialized an array      String s = sc.nextLine();     String[] Question = s.split(" ");   then I have this while-loop calling a method/function      while (y != x) {         analyzer anlz = new analyzer();         anlz.find(Question[y]);         y = y + 1;     }   but anlz.find(Question[y]) keeps getting a wrong mark saying that non-static variable Question cannot be referenced from a static context  and this is the function/method find(String[] q)      public String find(String[] q) throws IOException {     //content here     }   i don't know how to fix this. can someone please help me?


Given $a = \begin{bmatrix} 1 & 2 & 3 & 4\end{bmatrix}^\top$ and $b = \begin{bmatrix} k_1 & k_2 & k_3 & k_4\end{bmatrix}^\top$, find $\det(I + a b^\top)$.


How to clean high bounty without losing skill progress?

SPOILER INCOMING! Prepare yourself for spoilers... After Dark Brotherhood quest for killing the REAL emperor, I killed Maro; then my bounty become 3,500 septims and (I don't know how) 1,000 bounty in Whiterun. Now, I can't get my stuff in Breezehome and transport to Markareth and can't enter Solitude. How can I clean this high bounty without losing my skills?


Where to make suggestions for popular services?

Suppose I have a query, complaint (with possible improvements) or suggestion (pertaining to bugs or design and features) for an popular service or software, ranging from Microsoft Excel to Facebook Chat. Where can I ask such questions? Is there a site on the network dedicated to such questions? (I couldn't find any.) If not, shall I just ask on Stack Overflow, or should I go to Area 51 and wait till such a site is made?


I am a bit financially strapped and received a Gateway GT5056 tower. The tower has an AMD dual core 64-bit processor in it. Will Ubuntu 12.04 run on this machine? I will not have any other application other than LibreOffice installed.


I am trying to change a blockdata as an entity (ArmorStand, but at his x y and z) it doesn't work! Any solutions?  /execute @e ~ ~ ~ detect ~ ~ ~ minecraft:dropper 0 {Items:[0:{Slot:4b,id:"minecraft:stone",Count:1b,Damage:0s}],id:"Dropper"} /blockdata ~ ~ ~ {......}


In this figure out of the two heteroduplexes formed one is considered to be non-recombinant product(left) and the other recombinant product(right). My question is despite the exchange of middle DNA segment why is the right heteroduplex considered a non-recombinant product or patch. I've been reading two books:    By Nancy Lynn Craig, Rachel Green, Orna Cohen-Fix, Carol Greider, Gisela Storz, Cynthia   By Burton E. Tropp   both had the same illustration and descrpition.


Unnecessary pronouns: "The President he issued..."

Is it now considered acceptable to follow a proper noun ... or any noun ... with a pronoun? E.g.      The President he issued a new executive order.


Unable to match currency symbols using python regex

l_test_word = 'in €' print(l_test_word)  if re.match(pattern=r'[£$€]+', string=l_test_word):      print("Match") else:      print("No Match")   I am trying to match if a string contains curency symbols. The code snippet above when runs returning "No Match". Unable to figure out why? I am using python 2.7.13.  Thanks.


I travelled on a visit visa to the USA but then have been rejected 5 times

I was first denied the B1/B2 visa. On my second attempt, I was given the visa for 3 months with an annotation “CPA EXAM - Maryland.” I took the exam and, out of two parts, I passed one part. But, in the same interview, the officer had told me you have to attempt all four parts and I am giving you one chance.  I returned within the stipulated time. Since then, I have reapplied five more times for a visa (on average once a month) and I have not been given the visa.  One more thing: after coming back, I told the officer that I would like to stay for 5 months as I want to pass my remaining exams during the stay. Also, the officer misunderstood my results and he recorded as if I had failed the two parts.  In my last interrview, the visa officer told me to "try to change your circustances and apply after a long time.  What should I do?


I am currently trying to do a completely unattended Ubuntu install with , following AskUbuntu .   Everything works fine on VirtualBox (I am simulating a DVD) but when I try to burn my ISO on a USB stick and boot it on a computer ( with  Intel CPU), it doesn't boot !  I'd like to add : I have no problem with my bootable key when using a standard ubuntu installation. On the discussion I linked above, best answers says to "burn it on a DVD". Is there a difference between a burn DVD and a bootable USB key ?  Thanks in advance.


Can I still use meat left out in the trunk

I accidentally left meat in the trunk of my car, it's so cold outside it froze, can I still use it?


I'm pretty new at moodle and would like to get the last enrolments of the system somehow by sql. Means, I don't want to get who is enrolled in a certain course, but what are the last 20 enrolments over the whole system. I want to create social bubbles which pops up on the start pages showing "User X has enrolled to course y 3 min. ago. Book the course here (link)" If someone visits the custom enrolment page, the bubble should just show the information of the last 20 users how enrolled to the course. I can add the bubble by javascript that calles a php file, that is not the problem, but to find the right sql is not that easy. I could use the API funcktions like core_course_get_courses,  core_enrol_get_enrolled_users or core_user_get_users but API is slower than a SQL that just has e.g. 20 datasets as a result. THank you for your help Uli


Send me a picture of hers vs Send me a picture of her? Send me a picture of him vs send me a picure of his?

What exactly is happening? Hers and His sound correct; but why?


Windows Batch recursive delete old files

I'm looking for a function in batch that recursive delets all files/folders older than X Days from a given path.  Is there a Fast and easy snippet that could be placed in a batch function?


I would like to know how to calculate:  $$\frac{d}{dt}\det \big(A_1(t), A_2(t), \ldots, A_n (t) \big).$$


Understanding the Basic Context of Trusted Hosts

I got the trusted host settings error.      The trusted_host_patterns setting is not configured in settings.php. This can lead to security vulnerabilities. It is highly recommended that you configure this. See Protecting against HTTP HOST Header attacks for more information.    I read the  but I'm not understanding some of the basic context.   Are the "trusted hosts" me and other administrators who want to be able to administer the site remotely?  If so, would I add my PC's domain to the trusted host list?


How to set up a Wi-Fi hot-spot on Ubuntu 17.04?

I recently upgraded from Ubuntu 16.10 to 17.04. In Ubuntu 16.10, I could setup a WiFi hot-spot to give Internet access to my Android phone using the trick mentioned in this article . I can connect to WiFi now using the fix mentioned in answer to this question: .   But when I click on "Connect to Hidden WiFi Network" and choose to start the hot-spot setup, I see this notification and it doesn't start.    How should I resolve this?


Proving center of group is the identity subgroup

Prove that the center of $S_n$ is the identity subgroup for $n>2$.    Would I have to use the definition of center of a group first or do I have to make sure it satisfies the axioms to be a subgroup? I am not too sure what the proof wants me to show. I am not sure how to go about solving it.


The SVD stands for Singular Value Decomposition. After decomposing a data matrix $\mathbf X$ using SVD, it results in three matrices, two matrices with the singular vectors $\mathbf U$ and $\mathbf V$, and one singular value matrix whose diagonal elements are the singular values. But I want to know why those values are named as singular values. Is there any connection between a singular matrix and these singular values?


When searching for "model mommy" there are 0 results.  I think the search should have found  result, at least.    I was able to find some posts by the same search without quotes, but also had to sort through some irrelevant results just because they contained one of the words.


Getting an error while installing vs code in ubuntu 20.04

I am getting an error while installing vs code editor in ubuntu 20.04. I am installing through an ubuntu software application Here is the screenshot of the error Please, anyone, help me with this issue.


Why do we ignore squares of infinitesimal quantities in differential calculus , doesn’t that cause error when we require very accurate measurements.?


How to use the generalized binomial theorem to produce the power series of $(1-x)^{1/2}$

I am trying to see how to get from $\sqrt{1-x}$ to the power series $\displaystyle\sum_{m=0}^\infty\frac{-1}{2m-1}\,{2m \choose m}\,\frac{x^m}{4^m}$, ideally using the generalized binomial theorem.  I see that the Taylor expansion evaluated at $0$ is,  $f(x)=(1-x)^{1/2}$; $f(0)=1$; and the first coefficient of the power series is $1$.  $f^1(x)= - \frac{1}{2}(1-x)^{-1/2}$; $f^1(0)=-1/2$; and the second coefficient, $-\frac{x}{2}$.  $f^2(x) = -\frac{1}{4}(1-x)^{-3/2}$; $f^2(0)=-1/4$; and the third coefficient, $-\frac{x^2}{8}$.  $f^3(x)=-\frac{3}{8}(1-x)^{-5/2}$; $f^3(0)=-3/8$; and the fourth coefficient, $-\frac{3\cdot x^3}{8\cdot3!}=-\frac{x^3}{16}$.  It is also likely that ${2m\choose m}=\frac{2m!}{m!m!}$ may be part of the derivation, but I don't see a straightforward link.


Every time I try to connect it says invalid name. Could you give me some tips to help fix that? I have tried restarting my game but that didn't work. I also tried a different server but that also did not work. Does anyone know what my problem is?


What is the purpose of the -9 option in the kill command?

Is there a difference between   kill -9 212121   and  kill 212121


I searched now for a few hours to find a solution to my beginner Java problem but I cannot seem to do it.  I am trying to check a directory for filenames that I would like to test against a list. If the Filename exists I would like to do something. The problem is that the filename is never found, even when the file clearly exists. I am using java.io.File to get the directory filenames.  My problem is that the file is called "test1_1.txt" and the method returns "test1_1.txt" in a println statement but Java tells me they are not the same. Hence I never can actually make Java tell me which files do already exist.  System.out.println(listOfFiles[i].getName()); is showing me "test1_1.txt"  but:  public static void main(String[] args){          File folder = new File(C:\\Users\\M\\Desktop\\coding\\);         File[] listOfFiles = folder.listFiles();      for (int i = 0; i < listOfFiles.length; i++){          if (listOfFiles[i].getName() == "test1_1.txt"){             System.out.println("found");         }     }}   never says "found"  Im grateful for any help.