I'm trying to add a custom javascript file to my article content type forms (add/edit).  I've tried , hook_form_alter and   to no avail. They both seem to pick up the page i'm on, not the form in Drupal's Overlay with the form in it.  Obviously I want the Javascript to fire only when I'm actually on the form. So just putting the Javascript in a onReady function in a sitewide js file won't suffice.  My current setup in template.php:  function zeilschepen_form_alter(&$form, &$form_state, $form_id){   switch ($form_id) {     case 'node-accommodation-form':       $form['#after_build'][] = 'zeilschepen_after_build';       break;      case 'views_exposed_form':       if (isset($form['field_country_value'])) {         $form['field_country_value']['#attributes'] = array('placeholder' => array(t('Land...')));       }       break;   }  }  function zeilschepen_after_build($form, &$form_state) {   $theme_path = drupal_get_path('theme', variable_get('theme_default', NULL));   drupal_add_js ("$theme_path/js/test.js");   return $form; }   And test.js:  (function ($, Drupal, window, document, undefined) {      Drupal.behaviors.test = {         alert('test');     } })(jQuery, Drupal, this, this.document);

I am making a site with a lots of JS, and I am wondering where I should put the JS code. Optimally I would like to keep the JS with each module and not the theme layer. Some content could be exposed as blocks etc.   But I am having some issues with the cache. In my example I need to add JS & CSS to the node edit form. I have used hook_block_view, but it is cached. So if there is an error in the node edit form, the drupal_add_js & drupal_add_css functions are not called. The same seems to be true for hook_node_prepare.  Where would you input the JS & CSS layer? and are there hooks that get's called even if there is an error in the node edit form?


Here is the function: $|\cos x|$ and I need to write the representation of the function as a Fourier series on the interval: $[-\pi, \pi]$  $$ a_0 = -\frac{1}{\pi}\int^{-\frac{\pi}{2}}_{-\pi}\cos x dx -\frac{1}{\pi}\int^{\frac{\pi}{2}}_{-\frac{\pi}{2}} \cos x dx +\frac{1}{\pi} \int^{\pi}_{\frac{\pi}{2}} \cos x dx =  \frac{1}{\pi} + \frac{1}{\pi}=\frac{2}{\pi} \tag{1}\\[6pt]$$  $$ -\frac{1}{\pi}\int^{-\frac{\pi}{2}}_{-\pi}\cos\left(x(2n-1)\right)+\cos (x(2n+1)) dx = \left[x(2n+1) = u; du = 2n+1 \ \ dx = \frac{1}{2n+1}  \right] = \left[ \left. \frac{1}{\pi (2n+1)}\sin(x(2n+1)) + \frac{1}{\pi(2n-1)}\sin(x(2n-1))\right] \right|^{-\frac{\pi}{2}}_{-\pi} = -\frac{1}{\pi(2n+1)}\sin(2n+1) - \frac{1}{\pi(2n-1)}\sin(2n-1)$$  It already looks incorrect, but I don't know where my mistake is. Can someone help?

I'm having trouble figuring out the Fourier series of $|\cos(x)|$ from $-\pi$ to $\pi$.  I understand its an even function, so all the $b_n$s are $0$  $$a_0 = \frac 2 \pi \int_0^\pi |\cos(x)|\,dx = 0$$  $$a_n = \frac 2 \pi \int _0^\pi  |\cos(x)| \cos(nx) \, dx = \frac 2 \pi \int_0^\pi \cos^2(x)\,dx.$$  since for all $j,k$ not equal the integral is zero.  so only $a_1$ remains. is this correct?   How would I evaluate $\sum_{n=1}^\infty (-1)^{n-1} /(4n^2 - 1)\  {}$?


We have currently setup a cron job for our new script as below:  46 22 * * * /gzm_common/diagbat9/global/prod/chgstatus.sh /backups/diagbat9/Demantra/output/SK_ITEM_EXTRACT_MFGPRO_$(date +%m%d%y).txt   It takes the file with .txt as extension as a parameter. When the cron job executed, the file did not get created. This is what we got of the file at 22:46 pm:  22:46    SK_ITEM_EXTRACT_MFGPRO_   and this is a zero byte file, whereas it should contain a lot of data. Shall I try putting the entire filepath and name in double quotes?

I want to create a log file for a cron script that has the current hour in the log file name. This is the command I tried to use:  0 * * * * echo hello >> ~/cron-logs/hourly/test`date "+%d"`.log   Unfortunately I get this message when that runs:  /bin/sh: -c: line 0: unexpected EOF while looking for matching ``' /bin/sh: -c: line 1: syntax error: unexpected end of file   I have tried escaping the date part in various ways, but without much luck. Is it possible to make this happen in-line in a crontab file or do I need to create a shell script to do this?


Is there any way to get the row result in Google just like mysql_fetch_row that returns only the row base on query statement?   I hope there has a formula for this.  Using this formula =Query(IMPORTRANGE("",""),"Select Col1 where Col1='somevalue') i want to get only the counts of row results instead of displaying the data on my sheet.

I just started using Google Spreadsheets.  I have a question concerning "counting" a specific word/item in cells.  Example:    Column A   1. HAT  2. HAT  3. SHOE  4. CANE  5. SHOE  6. HAT  7. -  8. -  9. = A1 to A6 = 3 Hats  10.= A1 to A6 = 2 shoes  11.= A1 to A6 = 1 cane   See what I mean? How do I make it count the specific items in that specific column?


When my Russian friend invites me to Russia, will he have to specify that I (the person coming to visit) will have to stay at his personal residence? Can that be specified as elsewhere (such as an Airbnb location)?  In the scenario where he has to specify his address, am I required to stay at my friends place once I get the private visa? or will I be able to choose a specific place from Airbnb?  I'm from France if that changes anything

I believe there are certain countries which in order to be granted a visa you must submit your intended itinerary. I am pretty sure I've heard Russia is or was formerly such a country.  What do independent travellers do? I've been thinking of hitch-hiking across Russia without a precise plan and a friend of mine has wanted to do a road trip across Russia also without an exact plan.  Is this a no-brainer or is there lots of red tape we would have to deal with? Or is it just official-speak / bureaucracy where they make it look complicated but in practice it turns out to be easy?


Can someone please help me understand what exactly viewDidLoad()does? I know its called when the view controller is first loaded into memory. I addition, I am aware I can treat it as a main(). But I would like to know more about it. What does it reference too? UIView? It loads and treats all the buttons, labels, etc? Having a detailed and well explained overview would help!   In addition, I'm also confused about override. Does it add code to existent viewDidLoad()?  Thank you!    override func viewDidLoad() {      super.viewDidLoad()     // Do any additional setup after loading the view, typically from a nib. }   P.S I am new here, feel free to leave any comments about my question formatting.

When working with views and view controllers in an iPhone app, can anyone explain the difference between loadView and viewDidLoad?    My personal context, is that I build all my views from code, I do not and will not use Interface Builder, should that make any difference.  I've found that often when I add init code to loadView, I end up with an infinite stack trace, so I typically do all my child-view building in viewDidLoad...but it's really unclear to me when each gets executed, and what is the more appropriate place to put init code.  What would be perfect, is a simple diagram of the initialization calls.  Thanks!


I use Ubuntu 18.04.3 on the laptop with two logical volumes. When I select some file on the home volume and press "Del", it goes to Trash. On the mounted volume when I press "Del" it is removed permanently. If I do the right click on the file I also see only "Delete permanently" option.  It did not work like this before, and I am not sure what changed, because I think that I did not install any updates in the time period when the behavior changed.  The folder ".Trash-1000" on the mounted volume still exists.  Any idea how to turn on the "Delete to trash" option again?  UPD: About the size of the file: I am experimenting now with a 5 kb txt file.

I am trying to delete files in Nautilus and every time I try to delete one it always gives me this message:     Cannot move file to trash, do you want to delete immediately?   Then it gives me several questions. All I want is that when I press Delete in the keyboard, it sends it automatically to the trash can. Not to ask me every time.  The problem relates to NTFS partitions, external drives but also include Linux filesystems.  What are the reasons for nautilus beeing not able to move to trash?


How to find infinite sum How to find infinite sum $$1+\dfrac13+\dfrac{1\cdot3}{3\cdot6}+\dfrac{1\cdot3\cdot5}{3\cdot6\cdot9}+\dfrac{1\cdot3\cdot5\cdot7}{3\cdot6\cdot9\cdot12}+\dots? $$   I can see that 3 cancels out after 1/3, but what next? I can't go further.


Why don't we have an option to propose a custom bounty like 23 or 12631 instead of the fixed 100, 200 or 500? Will this damage the ecosystem of Stack Exchange? Or do we have to wait for this? Edit: to clarify this is not about increasing but  about the freedom to choose what bounty you want to set for a specific question, which isn't discussed or answered in the suggested question.

Change the bounty upper limit to 50k, because 500 seems outdated and cheap.  If a newbie gets a good answer in, more power to them.  Think of it like Jeopardy. Remember about the turn of the century when the rules changed and you could win longer than one week. It was a good change.  Think of it like .  I remember seeing reruns in black and white when it was like $5k.  It was a good change.  There are plenty of users with more than 50k. I looked at a bunch of profiles yesterday with a serious amount of bounty. I would spend every night for a couple months or longer on a 50k solution.  Community benefit: Large open source projects could really get some good exposure with a 50k bounty.  500 I'm asking for 3000 on one question right now.  I have the answer working and won't share it till I get 3k for it.  Don't think me bad. I'm still participating; it's just on one question that the community and blogs can't answer yet.  Maybe if this gets to -100 I'll take it down.  As for my bounty score, I have four stars at asp.net which I made in three months four years ago – exactly halfway to five stars. I'm no stranger to how these boards work and how search engines love linkbacks. One of these days I'll start blogging on my website and link answers back to my website just to get a few more up clicks.


I'm trying for quite some time to solve an irritating problem. I'm getting a "hole in the bucket" experience:  sudo apt-get upgrade [sudo] password for olav:  Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  libjpeg8 : Breaks: libjpeg8:i386 (!= 8d-1) but 8c-2ubuntu7 is installed  libjpeg8:i386 : Breaks: libjpeg8 (!= 8c-2ubuntu7) but 8d-1 is installed E: Unmet dependencies. Try using -f.   but if i try using -f, this is what appears on the screen:  sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following package was automatically installed and is no longer required:   libjpeg-turbo8:i386 Use 'apt-get autoremove' to remove it. The following extra packages will be installed:   libjpeg8:i386 The following packages will be upgraded:   libjpeg8:i386 1 upgraded, 0 newly installed, 0 to remove and 519 not upgraded. 1 not fully installed or removed. Need to get 0 B/132 kB of archives. After this operation, 258 kB of additional disk space will be used. Do you want to continue [Y/n]?  (Reading database ... 482927 files and directories currently installed.) Preparing to replace libjpeg8:i386 8c-2ubuntu7 (using .../libjpeg8_8d-1_i386.deb) ... Unpacking replacement libjpeg8:i386 ... dpkg: error processing /var/cache/apt/archives/libjpeg8_8d-1_i386.deb (--unpack):  trying to overwrite '/usr/lib/i386-linux-gnu/libjpeg.so.8', which is also in package libjpeg-turbo8:i386 1.2.1-0ubuntu2 configured to not write apport reports                                       Errors were encountered while processing:  /var/cache/apt/archives/libjpeg8_8d-1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   I tried all kinds of lines like:  sudo apt-get clean sudo apt-get autoclean sudo apt-get dist install sudo apt-get remove   and so on  those commands i found on different sites where i was looking for a solution who can help to fix this?

I just recently bought an arduino and requires gcc-avr/avrdude to compile the software. I installed avr for another microprocessor component a while ago but is obviously an outdated version (gcc version 3.3 20030512 (prerelease)) so I went ahead to update these but it didn't work.   (Please note that before hand I also broke my aptdaemon through an incomplete wine installation (couldn't get passed font installation agreement) but I fixed that via a re-installation then accepting the agreement.)   I am trying to update these by running  but the dependencies it requires cannot be installed due to avr... terminal reports   Reading package lists... Done Building dependency tree        Reading state information... Done build-essential is already the newest version. libncurses5-dev is already the newest version. libncurses5-dev set to manually installed. libusb-0.1-4 is already the newest version. libx11-dev is already the newest version. You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: arduino-core : Depends: gcc-avr but it is not going to be installed avr-libc : Depends: gcc-avr (>= 1:4.3.4) but it is not going to be installed Depends: binutils-avr (>= 2.20) but it is not going to be installed binutils-dev : Depends: binutils (= 2.21.0.20110327-2ubuntu3) but 2.21.0.20110327-2ubuntu2 is to be installed libcwidget-dev : Depends: libcwidget3 (= 0.5.16-3ubuntu2) but it is not going to be installed Depends: libsigc++-2.0-dev but it is not going to be installed Depends: libncursesw5-dev but it is not going to be installed libmpfr-dev : Depends: libgmp3-dev (>= 4.2.dfsg-1) but it is not going to be installed python-dev : Depends: python (= 2.7.1-0ubuntu5.1) but 2.7.1-0ubuntu5 is to be installed Depends: python2.7-dev (>= 2.7.1-1~) but it is not going to be installed tk8.4-dev : Depends: tk8.4 (= 8.4.19-4) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   But running   apt-get -f install   results in   (Reading database ... 163021 files and directories currently installed.) Unpacking binutils-avr (from .../binutils-avr_2.20.1-1ubuntu2_i386.deb) ... dpkg: error processing /var/cache/apt/archives/binutils-avr_2.20.1-1ubuntu2_i386.deb (--unpack): trying to overwrite '/usr/bin/avr-size', which is also in package avr-binutils 2.13.90.030512-2 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Unpacking gcc-avr (from .../gcc-avr_1%3a4.3.5-1_i386.deb) ... dpkg: error processing /var/cache/apt/archives/gcc-avr_1%3a4.3.5-1_i386.deb (--unpack): trying to overwrite '/usr/bin/avr-g++', which is also in package avr-gcc-c++ 3.2.90.20030512-2 dpkg-deb: error: subprocess paste was killed by signal (Broken pipe) Errors were encountered while processing: /var/cache/apt/archives/binutils-avr_2.20.1-1ubuntu2_i386.deb /var/cache/apt/archives/gcc-avr_1%3a4.3.5-1_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)   I have tried running update manager and updating my system via it but all I get is an error message  The following packages have unmet dependencies: arduino-core: Depends: gcc-avr but it is not installed avr-libc: Depends: gcc-avr (>= 1:4.3.4) but it is not installed Depends: binutils-avr (>= 2.20) but it is not installed   which then tells me to try running apt-get -f install which just results the same as last time.  So how can I fix my system, I really need the new avr, please :) BTW, my system is Ubuntu 11.04


I was wondering if there is a way to see why $(1+A)$ invertible, if $A$ is a skew symmetric matrix. and I know that all eigenvalues of $A$ have zero real part and $A$ is unitarily diagonalisable.

Let $A$ be a real skew-symmetric matrix. Prove that $I+A$ is non-singular, where $I$ is the identity matrix.


Whipping cream is hard to find where I live in India. We have a dairy brand named "Amul" which sells cream of butterfat content of 25% and cannot be whipped! Whipping cream has about 35% fat content but its not available here. Can I add butter in it to increase the fat content needed for whipping, while stirring constantly for even distribution of fat?

I want to make some whipped cream for millefeuille but I only have single.  If I added butter to single cream and whipped it, would that add enough butterfat to it to make it suitable for whipping?  Thanks in advance.


I'm looking for a good way to save for college for my daughter. As a parent of a single income home, I am looking for a way to maximize my savings to reach my goals, but without having to go with a pre-paid plan that forces me to contribute a set amount. Some months are better than others so not every month is guaranteed a contribution.  Thanks!

So my wife and I will be having our first child at the end of the year, and I'm trying to devise a strategy for things like putting money away for the little person now, while I have the time and sleep in me to think about such things.  What are some good strategies to use to save money to give to a kid? College is obviously a big thing, but not necessarily the only thing I want to save for. My goal would be to have a respectable college fund to pay for a state college in 2029 and some money for general purposes. (Hopefully a car, trip or downpayment on a home and not beer)  Any ideas? I'm not opposed to 529 plans, but I don't necessarily want to tie all money up in one either. I'm also not concerned about colleges looking at assets in the child's name for financial aid purposes. (We're talking about 2029 or 2030 anyway, so it's unlikely that advice about that today would be valid that far out)


This is for a class and I can't figure out why my code stops running after the first question. It will ask the user the first question, allow user input then say that the operation is complete. What am I doing wrong? Thanks.      import java.util.Scanner;     public class TemperatureConverter {  public static void main(String[] args) {     //Create scanner object       Scanner keyboard = new Scanner(System.in);     //Declare variables       double temperature;       double temp;       String temperatureScale;     //Use scanner to ask for user input       System.out.println("What is the temperature?");       temperature = keyboard.nextDouble();     //Use scanner to ask for user input       System.out.println("Is the temperature Celsius or Fahrenheit?");       temperatureScale = keyboard.nextLine();     //If statement        if (temperatureScale == "Fahrenheit"){          temp = temperature - 32 * 5/9;          System.out.println("The result is " + temp + "degrees Celsius.");          }        else if (temperatureScale == "Celsius"){          temp = temperature * 1.8 + 32.0;          System.out.println("The result is " + temp + "degrees           Fahrenheit.");          }        else{           System.out.println("An incorrect value was input.");          }       } }

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I can think of at least three episodes of Star Trek: The Next Generation in which Picard's mind was taken over, or at least intentionally messed with in order to make him do specific things.   By an energy being in  By Bok, using a "thought maker" in  By the Borg, by assimilating him in    Are there more examples of Picard's mind being taken over?

This includes all occasions when,  at least temporarily, a character or the appearance of a character fooled, attempted to fool, or was intended to fool other characters or the audience.  The key point is v there has to be some notion of trickery or manipulation.   Clarifications:   Multiple manipulations in the same episode count as one.    Counts:   possession, external influence, mental illness simulations, hallucinations (by the perceiver)   Doesn't count:   in-character lying in-universe acting   In the case of borderline or unclear cases,  please ask for clarification to I can improve the question.


Why has '32' been added to the value of v in the output below?  int main() {     float v = 9.999e8;      std::cout << "v --> " << v << std::endl;      std::cout << std::fixed;     std::cout << "v --> " << v << std::endl;      return 0; }   output:  v --> 9.999e+08 v --> 999900032.000000              ^^    Is it an artefact of printing the value, or that 9.999e+08 cannot be accurately represented in a float?   Changing v to a double resolves the issue but I want to understand the actual cause.  strong text

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I have a script test  #! /bin/bash  sleep 60 echo hello   I ran it by setting it executable and ./test, and while it was running the sleep command, I changed it  to   #! /bin/bash  sleep 60 echo hello!!   The output is hello!!. I wonder why not hello?  How can I make it output hello regardless of later change?

I was writing a bash script, and happened to updated the code (saved the script file to disk) while the script was waiting for some input in a while loop. After I returned to the terminal and continued with the previous invocation of the script, bash gave an error about the file syntax:  /home/aularon/bin/script: line 58: unexpected EOF while looking for matching `"' /home/aularon/bin/script: line 67: syntax error: unexpected end of file   So I tried doing the following:  1st: create a script, self-update.sh let's call it:  #!/bin/bash fname=$(mktemp) cat $0 | sed 's/BEFORE\./AFTER!./' > $fname cp $fname $0 rm -f $fname echo 'String: BEFORE.';   What the script does is reading its code, changing the word 'BEFORE' into 'AFTER', then re-write itself with the new code.  2nd Run it:  chmod +x self-update.sh ./self-update.sh   3rd wonder...  aularon@aularon-laptop:~$ ./self-update.sh  String: AFTER!.   Now, I wouldn't have guessed that on the same invocation it would output AFTER!, on the second run for sure, but not on the first one.  So my question is: is it intentional (by design)? or it is because of the way bash runs the script? Line by line or command by command. Is there any good use of such behaviour? Any example of it?    Edit: I tried reformatting the file to put all command in one line, it does not work now:  #!/bin/bash fname=$(mktemp);cat $0 | sed 's/BEFORE\./AFTER!./' > $fname;cp $fname $0;rm -f $fname;echo 'String: BEFORE.';   Output:   aularon@aularon-laptop:~$ ./self-update.sh #First invocation String: BEFORE. aularon@aularon-laptop:~$ ./self-update.sh #Second invocation String: AFTER!.   While when moving the echo string to the next line, separating it from the rewriting (cp) call:  #!/bin/bash fname=$(mktemp);cat $0 | sed 's/BEFORE\./AFTER!./' > $fname;cp $fname $0;rm -f $fname; echo 'String: BEFORE.';   And now it works again:  aularon@aularon-laptop:~$ ./self-update.sh  String: AFTER!.


I am having trouble with using GeoDataFrame.buffer function. That is probably because of my lack of understanding crs. Here is the case: I have events dataset (points longs & lats) and locations dataset (points longs & lats). I want to check which of the events occurred within 2km radius circle from locations. I know how to perform spatial join in geopandas, but the problem is in buffer(distance, resolution) function. When creating both GeoDataFrames I used crs: 'epsg:4326' and in distance parameter use 0.2 (without any good reason). So my question is: How to adjust crs and distance parameter to make it in kilometers? Here is my sample code. The intersection should contain only events with id 1 & 2. However it does contain event 3 which is about 10km far from any of locations. Also it does not contain event with id 4, which is good, because that one is hundreds kilometers from any of locations. events = pd.DataFrame([     {'id': 1,      'longitude': 54.606402,      'latitude': 18.347709},     {'id': 2,      'longitude': 54.604681,      'latitude': 18.346534},     {'id': 3,      'longitude': 54.544322,      'latitude': 18.293896},     {'id': 4,      'longitude': 50.843233,      'latitude': 11.130688} ]) locations = pd.DataFrame([     {'id': 'a',      'longitude': 54.604972,      'latitude': 18.346815},     {'id': 'b',      'longitude': 54.605917,      'latitude': 18.347249} ])  locations_gpd = gpd.GeoDataFrame(locations,                                  geometry=gpd.points_from_xy(locations.longitude, locations.latitude).buffer(0.2, 16),                                  crs={'init': 'epsg:4326'})  events_gpd = gpd.GeoDataFrame(events,                               geometry=gpd.points_from_xy(events.longitude, events.latitude),                               crs={'init': 'epsg:4326'})  intersection = gpd.sjoin(locations_gpd, events_gpd, how='left')


Reading the following  I solved my problem, however my template function is actually being called, within the library so it is being implementation I would have thought this should have defined its type in the shared objects, however I keep getting linker errors. Consider...  I have the following files (common.h, common.cpp, myclass.h and myclass.cpp) defined below:  common.h  namespace myn {     template<class T> T map(T val1, T val2); };   common.cpp  #include "common.h" template<class T> T myn::map(T val1, T val2) {     return val1+val2; }   myclass.h  #include "common.h" class myclass { private:     int val; public:     myclass(int v1, int v2); };   myclass.cpp  #include "myclass.h" myclass::myclass(int v1, int v2) {     this->val = myn::map<int>(v1, v2); }   I compile the library using:  g++ -Wall -fPIC -c common.cpp -o common.o g++ -Wall -fPIC -c myclass.cpp -o myclass.o g++ -shared -Wl,-soname,libmylib.so -o libmylib.so common.o myclass.o   When given main.cpp:  #include "common.h" #include "myclass.h"  int main(int argc, char ** argv) {     myclass * x = 0;      if (argc == 1)         x = new myclass(20, 40);     else         x = new myclass(2343, 435);      delete x;     return 0; }   I compile using:  g++ -Wall -L. main.cpp -o main.out -lmylib   I get the following error:  ./libmylib.so: undefined reference to `int myn::map<int>(int, int)' collect2: error: ld returned 1 exit status   Shouldn't the <int> version of the map function be defined? I know that if i try doing something like myn::map<char>('a', 'b'); It should complain as it has not been defined, but surely in my case <int> template is defined.

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


Let's say a creature with infect attacks and the opponent blocks with a creature that has first strike. How does the combat resolve? Does the blocking creature with first strike still get the -1/-1 counter?

I have two examples of different scenarios that are confusing to me.  First, if I have a 1/1 creature with first strike and deathtouch, and my opponent blocks it with a 2/2 creature, will my creature die? I can see two alternative ways this could play out and I'm not sure which is correct.   My creature deals his first strike damage, immediately killing the opponent's creature before he is able to deal combat damage as a state-based effect. My creature deals his first strike damage, which would normally be lethal due to deathtouch, but state-based effects are not checked, and thus the opposing creature deals his damage and both die.   I'm almost positive in this case that it's the first option above.  What gets trickier is, for example, if a creature has first strike and a triggered ability "Whenever this creature deals combat damage to a creature, return that creature to its owner's hand."  This is not a state-based effect, but rather uses the stack. Similar to above, there are two possibilities.   My creature deals his first strike damage, and his triggered ability is placed on the stack. The stack waits to resolve until after all combat damage is dealt, so the opposing creature still kills mine. My creature deals his first strike damage, and his triggered ability is placed on the stack. Both players now gain priority between first strike and combat damage (which I don't think normally happens, thus my confusion). The stack finishes resolving, and the opponent's creature doesn't have a chance to deal damage.   Can someone clarify this area of the rules?


On basic operator / and // in Python. Why 99/9.9 returns 10.0 and 99//9.9 returns 9.0? / - returns result in float // - returns quotient without reminder in int so why: >>> 99/9.9 10.0 >>> 99//9.9 9.0 >>> 9.9*9.0 89.10000000000001  when >>> 9.9*10.0 99.0


Generally photons are EM waves (2-axis i.e, 2 dimensions); from that we can imagine a photon basically travels in a cyclic wave pattern. If we go into higher dimensions, will they trace a spiral path to travel? Do they have a specific shape? I don't have an idea what photons are actually comprised of.

Consider the question, .  The answers say, "an elementary particle" and not much else. They don't actually answer the question. Moreover, the question is flagged as a duplicate of,  – the answers there don't tell me what a photon is either. Nor do any of the answers to  mentioned in the comments. When I search on , I can't find anything useful. Questions such as,  look promising, but bear no fruit.  say things like, "the photon is an excitation of the photon field." That tells me  nothing. Nor does the , which says:     The photon is the quantum of the electromagnetic four-potential, and therefore the massless bosonic particle associated with the electromagnetic force, commonly also called the 'particle of light'...   I'd say that's less than helpful because it gives the impression that photons are forever popping into existence and flying back and forth exerting force. This same concept is in the  too - but it isn't true. As , "Virtual particles only exist in the mathematics of the model." So, who can tell me what a real photon is, or refer me to some kind of authoritative informative definition that is accepted and trusted by particle physicists? I say all this because I think it's of paramount importance. If we have no clear idea of what a photon actually is, we lack foundation. It's like what :     Photons seem to be one of the foundation ideas of quantum mechanics, so I am concerned that without a clear definition or set of concrete examples, the basis for understanding quantum experiments is a little fuzzy.   I second that, only more so. How can we understand pair production if we don't understand what the photon is? Or the electron? Or the electromagnetic field? Or everything else? It all starts with the photon.   I will give a 400-point bounty to the least-worst answer to the question. One answer will get the bounty, even if I don't like it. And the question is this:    What exactly is a photon?


I developping an admin panel, i have the PDO stuff for my db. Here is my post PHP for update texte in my website:  $text1= $_POST['text1']; $text2= $_POST['text2']; $query = $con->prepare("UPDATE `home` SET text1='$text1', text2='$text2' WHERE id=1;"); $query->execute(); if ($query) {     echo 'good';....}   If i write quotes it's say my sql query is not good. I have tried quote() and prepare() but don't work too. How can i do for use quote in my input ?  PS: In all my query i have specials char like: é à ü ù and other (i'm french)

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I am working in a navigation company, and they have purchased server license for hundreds of computers, but ArcObjects is not installed in any of the system.  So I need a loose copy of ArcObjects SDK for learning purpose.   I am not able to find it on Esri website, there is no download option for Arcobjects SDK. Instead ArcGIS RunTime SDK is available to download.  Is it available on internet freely?

Can anyone can suggest where I can freely download ArcObjects SDKs for ArcGIS?  I am using version 10.2.


I'm new to Stochastic Processes, in general. However, I see that they come in varying forms of complexity. A gaussian process (and gaussian process regression) are quite complicated and can easily fit non-linear trends in data. When I read about Poisson processes, the author starts and stops by deriving the Poisson distribution from the binomial. (But nothing more.) Examples typically include estimating the number of events in a time interval, so it seems to boil down to parameter estimation. I thought anytime "process" came up, there could be an infinite-dimensional problem where you estimate parameter functions, not just scalar parameters. Could anyone elaborate? (My job almost exclusively uses Bayesian methods, so if you have a resource that discusses PP in terms of Bayesian computation, that's not a deal breaker for me.)

A stochastic process is a process that evolves over time, so is it really a fancier way of saying "time series"?


I would appreciate your help.  I have been struggling with this for way too long.  I could easily get around this by creating two separate model classes with a duplicate list of properties, but I'd like to learn how to achieve this with the base class.  So, an IntSensor and ExtSensor are both a Sensor.  From another class I parse a json file with all of the data and that works great.  But, trying to call a method that returns a List<Sensor> baseclass and trying to cast it as either subclass is killing me.  What am I doing wrong... or is there a better way?  Thank you!  PS: this may look like a duplicate question, but I tried the other solutions and they are marked in the `Repository class' as "//seen on other StackOverflow Posts -- fails" in the code.   //Model classes  public class Device {     public string IP { get; set; }        public string Name { get; set; }     public IList<IntSensor> InternalSensors { get; set; }     public IList<ExtSensor> ExternalSensors { get; set; } }  public class Sensor {     public string Name { get; set; }     public string ActualTemp { get; set; }     public string HighTemp { get; set; }     public string LowTemp { get; set; } }  public class IntSensor : Sensor {} public class ExtSensor : Sensor {}   //Business Class -- parsing json   public class ParseJsonData {     public static RoomAlertModel GetRoomAlertModel(JObject jsonTree)     {         RoomAlertModel model = new RoomAlertModel();         model.IP = jsonTree["ip"].ToString();         model.Name = jsonTree["name"].ToString();          return model;     }      public static List<Sensor> GetSensors(JToken jToken)     {         var sensors = new List<Sensor>();          try         {             foreach (var item in jToken)             {                 var s = new Sensor();                 s.Label = item["lab"].ToString();                 s.ActualTemp = item["tf"] != null ? item["tf"].ToString() : "";                 s.HighTemp = item["hf"] != null ? item["hf"].ToString() : "";                 s.LowTemp = item["lf"] != null ? item["lf"].ToString() : "";                  sensors.Add(s);             }         }         catch (Exception)         {         }                      return sensors;     } }   //Repository  public class RoomAlertRepository     {         internal RoomAlertModel Retreive()         {             var filePath = HostingEnvironment.MapPath(@"~/App_Data/RoomAlertsData.json");              var json = File.ReadAllText(filePath);              JObject jsonTree = JObject.Parse(json);             var internalSensorTree = jsonTree["internal_sen"];             var externalSensorTree = jsonTree["sensor"];              var model = ParseJsonData.GetRoomAlertModel(jsonTree);              var baseList = ParseJsonData.GetSensors(internalSensorTree);              //seen on other StackOverflow Posts -- fails             var iSensorsTry1 = baseList.Cast<IntSensor>();             //seen on other StackOverflow Posts -- fails             var iSensorsTry2 = baseList.ConvertAll(instance => (IntSensor)instance);             //seen on other StackOverflow Posts -- fails             var iSensorsTry3 = baseList.OfType<IntSensor>();              model.InternalSensor = iSensorsTry1.ToList();               return model;         }     }

It seems that a List object cannot be stored in a List variable in C#, and can't even be explicitly cast that way.  List<string> sl = new List<string>(); List<object> ol; ol = sl;   results in Cannot implicitly convert type System.Collections.Generic.List<string> to System.Collections.Generic.List<object>  And then...  List<string> sl = new List<string>(); List<object> ol; ol = (List<object>)sl;   results in Cannot convert type System.Collections.Generic.List<string> to System.Collections.Generic.List<object>  Of course, you can do it by pulling everything out of the string list and putting it back in one at a time, but it is a rather convoluted solution.


If all motion is relative, how do we know that the Earth revolves around the sun? Or we are just making the above statement from the frame of reference in which Sun is at the origin?

Trying to observe the night sky for a few weeks, the motion of the Sun and the stars pretty much fits into the Geocentric Theory i.e. All of them move around the Earth.  What then, which particular observation, made us think that it could be the other way around, that all the planets move around the Sun?


I want to replace a line in my file with new line(actually I have to insert some content in the line). The line actually contains AC_CONFIG_FILES([]) I have to replace this line with a new line by adding some makefile arguments based on some list. Then I constructed a new string and did replacement in the file. Is there any efficient way of doing this?  # 'subdirs' is the list which contains makefile arguments rstring = "AC_CONFIG_FILES([Makefile" for t in subdirs:     rstring = rstring+' src/'+t+'/Makefile' rstring += '])' print rstring # 'fname' is the file in which replacement have to be done #  i is used for indexing in 'insert' function # 'rline' is the modified line fname = 'configure.ac' i = 0 with open(fname,'r') as f:       modlines=[]       for line in f.readlines():           if 'AC_CONFIG_FILES' in line:                   modlines.insert(i,rstring+'\n')                   i = i+1                   continue           modlines.insert(i,line)           i = i+1 with open(fname,'w') as out:       for i in range(len(modlines)):           out.write(modlines[i])

I want to loop over the contents of a text file and do a search and replace on some lines and write the result back to the file. I could first load the whole file in memory and then write it back, but that probably is not the best way to do it.  What is the best way to do this, within the following code?  f = open(file) for line in f:     if line.contains('foo'):         newline = line.replace('foo', 'bar')         # how to write this newline back to the file


Preconfiguring packages ... dpkg: error processing /var/cache/apt/archives/gcc-4.8-base_4.8.2-19ubuntu1_amd64.deb  (--unpack):  package architecture (amd64) does not match system (i386)  Errors were encountered while processing:  /var/cache/apt/archives/gcc-4.8-base_4.8.2-19ubuntu1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)

I am trying to install Ubuntu 12.10 and by the way my wireless is not working. So, I'm trying to fix this problem manually. I have installed the 64 bit Ubuntu already. The problem is I cannot install any packages because when I do I get an error. For example if I run the command   sudo dpkg -i wireless-bcm43142-dkms_6.20.55.19-1_amd64.deb   I get this error:   dpkg: error processing wireless-bcm43142-dkms_6.20.55.19-1_amd64.deb (--install: package architecture (amd64) does not match system (i386)    I also get this error if I try to install any other package. My system is a Dell 3421 which has an i5 processor so I don't know why Ubuntu think I have a i386 system. If I run the uname command I get these results:  uname -i  i686  uname -p i686  uname-m i686


I've got a PHP page that sends email from a HTML form. The email sends, but it's being flagged by Hotmail as spam. I've replaced the actual email addresses in the code.  <?php function clean_string($string){   $bad = array("content-type","bcc:","to:","cc:","href");   return str_replace($bad,"",$string); } $name=$_POST['name']; $email=$_POST['email']; $subj=$_POST['subject']; $body=$_POST['body']; $email_subject='Website name - '.$subj; $email_message="
".clean_string($body)."

".$name."
".$email."
"; $headers[] = 'MIME-Version: 1.0'; $headers[] = 'Content-type: text/html; charset=iso-8859-1'; $headers[] = "From:email@email.com"; $headers[] = "Reply-To:".$name."<".$email.">";  $header=implode("\r\n",$headers); if(mail('email@email.com',$email_subject,$email_message,$header)==true){header('location: http://julie-mosaics.dx.am/index.php?page=contact&result=success');} else {header('location: http://julie-mosaics.dx.am/index.php?page=contact&result=fail');} ?>   This is hotmail's error message.  Content analysis details:   (7.1 points, 7.0 required)    pts rule name              description  ---- ---------------------- --------------------------------------------------   0.0 HTML_MESSAGE           BODY: HTML included in message   1.1 MIME_HTML_ONLY         BODY: Message only has text/html MIME parts   0.1 MISSING_MID            Missing Message-Id: header   0.0 FROM_MISSP_DKIM        From misspaced, DKIM dependable   1.4 MISSING_DATE           Missing Date: header   2.5 FREEMAIL_FORGED_REPLYTO Freemail in Reply-To, but not From   2.0 FROM_12LTRDOM          From a 12-letter domain

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.


We have a span text inside a div element with taillwindcss, what's is the best way to align the text vertically with the div ?
    Home

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


claims that we can generalize QFT to include gravity by adding a metric-based factor to the integral. This sounds awfully easy. What is actually missing from the approach?

It is well known that quantum mechanics and (general) relativity do not fit well. I am wondering whether it is possible to make a list of contradictions or problems between them?  E.g. relativity theory uses a space-time continuum, while quantum theory uses discrete states.  I am not merely looking for a solution or rebuttal of such opposites, more for a survey of the field out of interest.


I am having trouble reading my JSON file back to it's respective class. I am using Jackson 2.6.3 API  ObjectMapper objectMapper = new ObjectMapper();  list<Movie>myMovies = objectMapper.readValue(JSONFile,objectMapper.getTypeFactory().constructCollectionType(List.class, Movie.class));   My Movie class  public class Movie {     private List<String> reviews;     /*Some more variables here */      public Movie() { // default constructor      }      public List<String> getReviews(){         return this.reviews;     }     public void setReviews(String review){         this.reviews.add(review);            } }   Error log   com.fasterxml.jackson.databind.JsonMappingException: N/A (through reference chain: java.util.ArrayList[0]->entity.Movie["reviews"])     at com.fasterxml.jackson.databind.deser.SettableBeanProperty._throwAsIOE(SettableBeanProperty.java:564)     at com.fasterxml.jackson.databind.deser.SettableBeanProperty._throwAsIOE(SettableBeanProperty.java:548)     at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:99)     at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:258)     at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:125)     at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:245)     at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:217)     at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:25)     at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:3736)     at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2658)     at entity.Movie.loadMovies(Movie.java:427)     at myPackage.Application.main(Application.java:31) Caused by: java.lang.NullPointerException     at entity.Movie.setReviews(Movie.java:45)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)     at java.lang.reflect.Method.invoke(Unknown Source)     at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:97)     ... 9 more   Sample of my JSON File  [      {         "movieID":1,       "title":"13",       "type":"DIGITAL",       "status":"COMING SOON",       "synopsis":null,       "director":null,       "mRating":"G",       "casts":null,       "showTimes":null,       "reviews":null,    } ]

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


When an anime character is embarrassed, they often draw him/her with a sweat droplet.  Which artist came up with this idea and how did it become so prevalent in anime/manga?

I can kind of handwave or fanwank the origin of things like the exasperated faceplant or the vein popping out when a character is comedic-angry, and even the trope of Japanese flag fans coming out when people want to cheer on their comrades, but how did the sweatdrop come to characterize the feeling of sort of embarrassed contrition?     I can't come up with anything logical just based on speculation. Is this an outgrowth of the  tradition, with the  and  characters?


I will have a connecting flight in Dubai going to UK and vice versa when coming back here in the Philippines. I am wondering if I still need to get a visa when I am only staying in the airport to wait for my next plane for about 4-5 hours only.

Do I need a transit visa for a layover via airports in the UAE, such as Dubai International Airport or Abu Dhabi International Airport? If so, what are the requirements for such a visa? Can I get the transit visa on arrival?


doesn't go in box   goes in box   goes in box   doesn't go in box   the numbers don't go in box      I'm using \begin{enumerate} for the list.

I'm using beamer and want to call out a few items in a list by drawing a box around them, and, ideally, having a small comment appear next to the box, like this:


I've seen people saying use screen.  But when I typed "screen" in the terminal, I got: "Please set a terminal type."  Any idea how I can fix this?

I sometimes have long running processes that I want to kick off before going home, so I create a SSH session to the server to start the process, but then I want to close my laptop and go home and later, after dinner, I want to check on the process that I started before leaving work. How can I do that with SSH? My understanding is that if you break your SSH connection you will also break your login session on the server, therefore killing the long running process.


scponly has been  from Debian packages. I'm using scp to pull backups from a Debian 8 server and for previous Debian servers I've set the login shell to scponly in order to restrict the backup user. What is a good replacement shell for scponly, or what configuration can be made to sshd to provide security equivalent to scponly?

Is there any way to configure a user on a Linux box (Centos 5.2 in this case) so that they can use scp to retrieve files, but can't actually login to the server using SSH?


I was on the App Store, and accidentally started downloading macOS Sierra. I have no desire to download this, so I want to cancel the download, but I can't figure out how.  From what I have searched, you should go to the purchased section of the App Store, and cancel the download, but macOS doesn't show there:    What should I do?  The answers to  do not help me because:   The ~/Library/Application Support/AppStore folder does not exist. Holding the alt key and clicking the 'x' button does nothing. Running defaults write com.apple.appstore ShowDebugMenu -bool true does nothing.

I just got a really large Mac App Store app, (2GB), but Im having some trouble with my diskspace...   Is there a way to completeley cancel the download of the app? I mean not just pause it but cancel it. The icon on the dock kind of stresses me out, and it reappears even if I drag it out.


I understand that they arise due to the pairing of bases of two opposite stands and are sites through which important proteins needed for replication and transcription of DNA interact. But I don't get how the arrangement of bases really generate the grooves.

So I know that the major/minor groove arise from the offset pairing of the two strands in the helix.  All my textbook tells me is that "pitch causes the off-set pairing of DNA and this gives rise to the major and minor grooves."  I'm not too sure what this is saying.  What exactly is pitch and how does it give rise to the grooves?


How to mark a non HTTP/s schema URL as clickable on Stack Exchange sites?  For example, some Chrome setting has the following URL: chrome://settings/syncSetup  Tried several ways to mark it as URL but failed:   chrome://settings/syncSetup chrome://settings/syncSetup   * Any idea how to make those URLs clickable?

Possible Duplicate:          I would like to link to chrome://net-internals/ (a local Google Chrome page for debugging purposes), but it won't let me do that:   When I click the link button, it results in chrome://net-internals/ (notice the http:// prepended to the actual URL). When just pasted, it doesn't show up as a link: chrome://net-internals/   I understand that there are hardly any links of this type, but since this format (foo://bar/) is clearly a link, could such links be parsed as actual links?


DM'ing my first 5e campaign. Had my players fighting Giant Spiders.  Monster manual states that the spiders bite does 1D8 +2 damage.  Character must also make a DC11 save on on failure takes 2D8 poison damage or saves for half.  My question is,  is he considered poisoned or do they just take poison damage?  If they save for half are they still poisoned as well? If he is that would mean even if the character saves he is still at disadvantage for all attacks. Is this correct? I saw a similar question but I did not get a clear answer.

Appendix: POISONED:    A poisoned creature has disadvantage on attack rolls and ability checks.   Would this condition ever be applied to a creature that's stung by giant scorpion's tail-sting attack, or bitten by a poisonous snake (both found in the Monster Manual), or shot with a poisoned arrow? I can see several instances where poison damage is applied to a creature, but very few where the poisoned condition is applied (so far just the magical poison dagger).   Even poison you can purchase only inflicts poison damage and makes no mention of applying the poisoned condition. There seem to be a great many anti-poison measures but little to no poisoning methods.


There are a lot of answers about how to change the language by going into the outline view, marking everything and changing the language. But that's no use if the languages in the Master Slides have not been changed.  How can I change the languages in the Master Slides, without picking one frame after the other and doing it manually?

I want to change the proofing language of all my slides in a Powerpoint. I've tried setting the language via the Language Preferences menu, however this only changes it for new powerpoints.


Is there any difference between declaring a Javascript function like this:  function myName(...)   and like this:  var myName = function(...)   I don't believe so, but...

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


For the past several days, I have been unable to install ANY apps onto my iPad.  When I click "GET" and then "INSTALL", it just says "Waiting..." below the app icon.    This is what it looks like (not from my iPad, from Google):    I've tried the following to attempt to resolve the issue:  (I had no other apps updating/installing)   Restarted the device Turned on and off the device Updated the iOS 8 software to latest version Went to Settings>General>Reset>Reset All Settings Restarted AppStore Synced my device with iTunes Deleted app and tried to reinstall Logged out of Appstore Logged back in to Appstore Turned off/on wifi   In addition to not being able to download apps, I can't download books from iBooks either.  I don't know if this is a software issue, or if it's a network issue.

I tried to download the "Dictionary Free" app from the App Store four days ago, but it's been stuck in "Waiting" ever since. I've tried everything: rebooting the phone, restoring from an iTunes backup, side-loading the app from iTunes, but nothing has worked.  When I turn Airplane Mode on and then off again, I get an alert popup that says "Unable to download application. It will be available for download when you log in to the iTunes Store on your computer".  I've tried what it recommends, but nothing seems to work.


The issue:  Let say I have a PPA for a software (i.e. Blender for example;  ) that contains for some reasons, a Python3.6 version.  What I want to achieve:  Let say I want "a better" Python3.6 package, for example from a python dedicated ppa, in my case;   The question:  How does apt chose which package to install and is there a way I can tell apt to install it from one desired ppa upon the others? I guess it will chose the most up-to-date package (am I wrong?), but what if for some reasons I want to keep a specific older version?  The example with python3.6 is "only" an example here, this may be useful for any packages.  Note about the dupplicate: Even if the answer in the suggested links in the comments are the same, the entry points, i.e. "the question" is note exactly the same and lots of people may come to the answer through this search result instead of the other. So, in my humble opinion and strictly speaking, the answer is somewhat a dupplicate, not the question.

Is there a way to cherry pick packages from a ppa repository you add? That is, to exclude some from updating while including others?  For example, I want just the chromium-browser package from  but not the others. So I don't want my sudo apt-get upgrade to have that ppa's other (besides chromium-browser) packages install over my existing ones, just that one.   I realize this is a license to shoot myself in the foot if I misread dependencies and exclude ones that are needed to ones that I included, but I know for a fact in this case that the other packages are not dependencies for that one.  Is this at all possible? Maybe there is some whitelist/blacklist file or something?


Wikipedia's article on tetration has a  of successive tetrations of $i$ that seems to imply that $^{\infty}i$ converges, and my own experimentation seems to confirm it, but I'm suspicious of purely numerical results like that, and the article itself has no references for this portion of the text. Is the exact value known, or is the figure of approximately $0.4383 + 0.3606i$ quoted in that article the best that can be done?

Find the value of:  $i^{i^{i^{i^{i^{i^{....\infty}}}}}}$  Simply infinite powering by i's and the limiting value.  Thank you for the help.


I am using PHPMAILER and I am fairly new in it.   I have used the following code but for some reason the email is being sent to spam. Please have a look at the code and tell me what I need to fix. (I am new to using email  <?php require 'php-mailer-master/PHPMailerAutoload.php';  $mail = new PHPMailer;  //$mail->SMTPDebug = 3;                               // Enable verbose debug output  $mail->isMail();                                     // Set mailer to use SMTP $mail->Host = 'smtp.gmail.com';  // Specify main and backup SMTP servers $mail->SMTPAuth = true;                               // Enable SMTP authentication $mail->Username = 'kfhcareer@gmail.com.com';                 // SMTP username $mail->Password = 'password12345';                           // SMTP password $mail->SMTPSecure = 'tls';                            // Enable TLS encryption, `ssl` also accepted $mail->Port = 587;                                    // TCP port to connect to  $mail->setFrom('kfhcareer@gmail.com', 'KFH Bahrain'); $mail->addAddress('kfhcareer@gmail.com', 'Joe User');     // Add a recipient  $mail->AddReplyTo( 'mailer@blah.com', 'Contact BLah' );   $mail->isHTML(true);                                  // Set email format to HTML  $mail->Subject = 'KFH house bahrain'; $mail->Body    = 'This is tthe message <b>in bold!</b>';  if(!$mail->send()) {     echo 'Message could not be sent.';     echo 'Mailer Error: ' . $mail->ErrorInfo; } else {     echo 'Message has been sent'; }

This is a tricky one and I've always relied on techniques, such as permission-based emails (i.e. only sending to people you have permission to send to) and not using blatantly spamish terminology.  Of late, some of the emails I send out programmatically have started being shuffled into people's spam folder automatically and I'm wondering what I can do about it.  This is despite the fact that these particular emails are not ones that humans would mark as spam, specifically, they are emails that contain license keys that people have paid good money for, so I don't think they're going to consider them spam  I figure this is a big topic in which I am essentially an ignorant simpleton.


If $X$ is random variable that has two density function $f(x)$ with probability $p$ and $g(x)$ with probability $1-p$, and mean and standard deviation of $f(x)$ and $g(x)$ are $\mu_1$, $\sigma_1$, $u_2$, $\sigma_2$. Define an indicator function  $$ I = \begin{cases} 1, & \text{$X$ follows $f(x)$}; \\ 0, & \text{otherwise} \end{cases} $$  Then what is the mean and variance of $X$?  I have tried that pdf(x)=p I(1)+ (1-p) I(0), so the expectation of X is p*mu1+(1-p)*mu2, but what's the variance.

Say I have two normal distributions A and B with means $\mu_A$ and $\mu_B$ and variances $\sigma_A$ and $\sigma_B$. I want to take a weighted mixture of these two distributions using weights $p$ and $q$ where $0\le p \le 1$ and $q = 1-p$. I know that the mean of this mixture would be $\mu_{AB} = (p\times\mu_A) + (q\times\mu_B)$.  What would the variance be?    A concrete example would be if I knew the parameters for the distribution of male and female height. If I had a room of people that was 60% male, I could produce the expected mean height for the whole room, but what about the variance?


I'm working on a bash script that backs up a configuration file before copying over a new file.  Here's what my snippet looks like:  mv ~/myStuff.conf  ~/myStuff.conf.bak cp ~/new/myStuff.conf ~/myStuff.conf   Every time this script is run, I'd like there the backup to have a unix timestamp in the filename.  I tried this  DATEVAR=date +%s mv ~/myStuff.conf  ~/myStuff.conf.$DATEVAR.bak   But this doesn't work, since the date function doesn't execute and bash sees it as a string, and the resulting file ends up being  myStuff.conf.date+%s.bak   Any ideas on how to get the results of the date function into a variable?

Suppose I have a bash shell script called Myscript.sh that need one argument as input.  But I want the content of the text file called text.txt to be that argument.  I have tried this but it does not work:  cat text.txt | ./Myscript.sh   Is there a way to do this?


I need to simulate the following circuit in LTSpice. I don't know where to ask so you're my only hope.. I made the scheme but I don't know what value to choose for R2 and Cinf in order to have theoretical gain Av=1500. The following constraints are imposed: Vcc=10v; VCM=1.5V; vg it's a sine wave with a frequency of 1Khz and R1=15kOhms. I need to simulate the circuit(transient, AC sweep), choosing an appropriate amplitude for vg in order to minimize output signal distortion(I put 100 uV but idk if it's correct..), and to specify a method for decreasing the voltage gain (without changing R1, R2, VCC or VCM). Implement the change and re-simulate the circuit in order to demonstrate the effect. Here it's the link for the LTSpice .asc scheme:

I need to implement the following circuit in LTSpice but I don't know if my schematic is ok. Also, I don't know what  values for I should use for Cinf and R2.  The following constraints are imposed:   VCC= 10V VCM = 1.5V Vgis a sine wave with a frequency of 1 kHz. Its amplitude will be chosen so as to ensure minimal distortion of the output signal (i.e. v0 should also be a sine wave) R1= 15kΩ.    I need to choose a value for R2 and Cinf in order to have a (theoretical)gain value Av=1500.   How can I compute the theoretical expressions of the DC collector currents of bipolar transistors Q1–Q8, considering VBE≈ 0.6V and the theoretical expression of the small-signal voltage gain Av= vo/vg?   The first picture is the schematic and the second is the LTSpice implementation.  What I found is that:   ICq5=ICq6=ICq7=ICq8=(Vcc - Vbe)/R2 ICq1=ICq2 = [ICq7 / 2 ] * [Beta/(Beta+1)] ICq4=iCq2-current of Q5 ICq3=ICq1-current of Q3-current of Q4  Beta in my case is 182.1 because I'm using a BC847A transistor. A=Vo/Vg = Gm_q2 * Beta_q5 * R1Gm_q2=ICq2 / Vt that is approx 40*ICq2   How can I find the value of R2? This is what I have now, an sine like wave for Vg


I currently reside in the UK as an international student and I am planning to take a trip to Europe, and therefore I am applying for Schengen Visa.  In the last 3-4 months, for my daily expenses I used my foreign debit card and my UK bank account have a few weeks with 0 pound balance and no transactions, however I have recently paid substantial money for tuition and started to use it more frequently. If I put enough money on my UK bank account ( more than minimum requirement by the visa centre), will this be enough to provide evidence for the proof of finance? Since my UK bank account was rarely used, I wonder if visa centre would question my financial sufficiency.  As an alternative, I can request online bank reference and statements from my bank account back at home, but I wonder if visa centre accept financial documents which were not issued at the branch by the manager.  Thank you.

The UK Visas and Immigration Directorate publishes  that provides helpful tips that can result in successful visa applications. Section 2 of this guidance opens is entitled "other documents you may want to provide" (emphasis mine).  Section 2: other documents you may want to provide – all visitors This section provides guidance on the types of documents that you may want to provide to help us consider your application against the Immigration Rules. Previous travel documents/passports, which show previous travel. Financial documents showing that you have sufficient funds available.  These must clearly show that you have access to the funds, such as:  bank statements building society book proof of earnings such as a letter from employer confirming employment details (start date of employment, salary, role, company contact details) where a third party (who is either in the UK or will be legally in the UK at the time of your visit) is providing financial support to you e.g. a business, a friend or a relative, documents to show that they have sufficient resources to support you in addition to themselves and any dependant family should be provided   The first item is "bank statements" and this ties in with the , which says...  evidence that you can support yourself during your trip, eg bank statements or payslips from the last 6 months  (Note 'eg' is a Latin abbreviation meaning "for example"; this appears to be optional rather than a fixed requirement.) Question: How should someone interpret this such that the chances of success are maximized? How many statements should I submit? What are they looking for and what do my bank statements tell about me?


I am trying to figure out why $(X, \mathcal{O}_{indis})$, where $\mathcal{O}_{indis}$ is the indiscrete topology, is connected for every set $X$.  Furthermore, I am trying to understand why $\{ s \} \subset (X, \mathcal{O})$ is connected for any topological space.  Thank you!

My attempt: Take any $C \subseteq X$. We show $C$ is connected. Suppose $C = A \cup B$ where $A$ and $B$ are disjoint, nonempty subsets (Open $\in \mathcal{T}_{indiscrete}$). Since only $X$ and $\varnothing$ live in the indiscrete topology, WLOG we can put $A = X$ and $B = \varnothing$. But this implies $C = X$ which is a contradiction. Hence, $C$ is connected.  Is this solution correct? any feedback? thanks


I am trying to mirror or rotate(180) my layer some thing like  this "-->" to this "<--". Is there any built in plugin or support available to do this job or i have to write code in pyqgis?  I don't know what the exctly term is better to asked either it is invert, filp, rotate or mirror.

I can see the move tool. But coming across versions, i did not see any Rotate tool in Quantum GIS. As a hardcore feature editor myself, i have found it rather difficult. Am i missing something obvious?


Pairing based cryptography schemes such as identity-based encryption or different attribute-based encryption schemes (CP-ABE, KP-ABE etc.) often make use of a hash function defined as  $H_1:\{0,1\}^* \rightarrow \mathbb{G}_1$. Where, $\mathbb{G}_1$ is a multiplicative group of some large prime order $p$. Then, the function $e:\mathbb{G}_1 \times \mathbb{G}_2 \rightarrow \mathbb{G}_T$ is called a bilinear pairing if it has bilinearity, non-degeneracy and computability properties. Here, $\mathbb{G}_2$ and $\mathbb{G}_T$ are also groups. Now, my question is, how such a hash function $H_1$ is constructed?

I've come across a bunch of "strange" hash function notations, such as the following ones and now I don't know how to choose / instantiate them.  Can you please explain me what this notation means and how I can actually instantiate such a hash function?  The notation in question: $$H_1:\mathcal M \rightarrow \mathbb F_p$$ $$H_2:\mathcal M \rightarrow \mathbb Z_n^*$$ $$H_3:\mathcal M \rightarrow \{0,1\}^l$$ $$H_4:\mathcal M_1\times ...\times \mathcal M_k\rightarrow \mathcal S$$  where $\mathcal M\in\{\mathbb F_p,\mathbb Z_n^*,\{0,1\}^*,\mathbb G,...\}$ where $\mathbb G$ is a generic (but there instantiated) group and $\mathcal S\in\{\mathbb F_p,\mathbb Z_n^*,\{0,1\}^l\}$


According to the , users are required to put the text "please delete me" in their profile's "about me" text. But a suspended user can not edit their profile, so they are unable to follow the required process.  Often enough, a suspended user feels so vengeful that they have a burning desire to  by deleting their account, but alas they can not while suspended.  It would be good to support such users to fulfil their desires by providing a rage quit link that appears only for suspended users:    By the way, there is some basis for this question. I had a request for "how to delete my account" from a recently-suspended user.

How can I delete my Stack Exchange account(s)? Also,  What happens to my content? Can I request it be deleted as well? What if I'm suspended, rate-limited, or banned from posting questions or answers? What will happen to my votes? Will other users be impacted? Why wasn't my account deleted immediately after the timer expiring? What will happen to my pending bounties and close, reopen, delete, or undelete votes? I want my account deleted on all Stack Exchange sites. How do I do this? Will my profile on chat be removed once I delete my site account?   For more information, see "" in the .


Sequence $\{a_n\}$ and $\{b_n\}$ satisfy $a_n \to c, b_n \to c $ , and $a_n\lt c \lt b_n $. $f'(c) $ exists. Prove $$\frac{f(a_n)-f(b_n)}{a_n-b_n}\to f'(c)$$ I have a rough idea like this, $$\frac{f(a_n)-f(b_n)}{a_n-b_n}=\frac{f(a_n)-f(c)-(f(b_n)-f(c))}{a_n-b_n}=\frac{f(a_n)-f(c)}{a_n-b_n}-\frac{f(b_n)-f(c)}{a_n-b_n}=\frac{f'(c)\cdot(a_n-c)}{a_n-b_n}-\frac{f'(c)\cdot(b_n-c)}{a_n-b_n}=f'(c)$$ But obviously not strictly. So how to do this thing strictly?

Let $f$ be differentiable at $x=a$.   Prove that if $x_n \to a^+$ and $y_n \to a^-$ then:  $$\lim_{n\to \infty} \frac{f(x_n)-f(y_n)}{x_n-y_n}=f'(a).$$  Every option that I think about seems to my very trivial, so I believe that I am doing something wrong.  Both numerator and denominator approach zero as $n\to\infty$ as the case of the formal definition of derivative, but it isn't guaranteed that the limits are equal (“$\frac{0}{0}$”).   Any direction?


Why when we compute the directional derivative we have to use the unit vector $\vec{\bf{u}}$? I know that using $2\vec{\bf{u}}$ would change the directional derivative as the second point is further apart. But why not use $\frac{\vec{\bf{u}}}{2}$ then? Wouldn't that gradient be "more precise"?

I'm not understanding how to solve this problem.  I think the problem lies in the fact that I don't understand why normalize and the definition of directional derivative... It's in Portuguese. The question would be: Determine the directional derivative of f in P in direction of vector u:


sometimes I feel my server not responding as smoothly as I would expect (i have a Intel(R) Xeon(TM) CPU 2.80GHz Quad Core), given that for example, the 'top' commands reports a low load < 0.5, CPU are almost completely idle ...  I maybe have internet connectivity issues, so I don't really know if it's me or if it's the server itself.  Is there anykind of benchmarking script (or something analogous) I could run and see the actual performance of the server ?

An interesting question.  I have logged into a Linux (most likely SuSE) host.  Is there some way that I can tell programmatically that I am a VM host or not?    Also assume that the vmtools are not installed.


Can you tell me what is the difference between:  I have been rescued  and  I was rescued  I know the first one is in the present perfect tense (so it’s an unstated time in the past and has an importance in the present, is it right?) and the second one, is in the simple past tense but I can’t seem to understand the subtle differences.

can anyone please tell me the between "have been" and "was"? Suppose my friends calls me and I reply the following.  Are they interchangeable in the following context?    Hey, Paul I was/have been busy working all day. I am very tired now. I will go your home and talk to you there.   Note that I am not working at the moment of speaking. I have just finished it.


I would like to apply a PNG  (watermark) to an arbitrary video file using ffmpeg. I would like the video to stay its original size (which I don't know ahead of time), and the PNG to be  relative to the video.  For example, the following command places the overlay in the top left:  ffmpeg.exe -i input.mov -i header.png -filter_complex \     "[0][1] overlay=0:0" output.mkv   And the following command scales the overlay relative to itself (1/5 of the width, height relative):  ffmpeg.exe -i input.mov -i header.png -filter_complex \     "[1] scale=iw/5:-1 [scaled]; \     [0][scaled] overlay=0:0" output.mkv   How could I make the overlay 1/5 of the width of input.mov? (For example, is it possible to store and/or query the width of another filter clause?)  The closest question I've come across is  but that answer uses external Linux/Cygwin commands.  was also helpful while I was figuring ffmpeg out. However, I'm on Windows and invoking ffmpeg via Python, so I'd like to do it all within the filter_complex clause. If that's not possible, I'd like to know for sure so I can stop trying :)

I would like to scale a watermark to 5% of the video width.  I need something like that:  ffmpeg -i 1.mp4 -i logo.png -filter_complex "[1:v] scale=1_MP4_VIDEO_WIDTH*0.05:-1 [logo1]; [0:v][logo1] overlay=0:0" -y -b 1600k -c:v libx264 -profile high -level 4.1 -c:a libfaac -q:a 128k 2.mp4   How can I reference the video width?


Please give me examples of disconnected metric spaces that cannot be isometrically embedded into connected metric spaces.   I have just started to study connected metric spaces and I haven't found out a metric space $X$ which isn't a subspace from another metric space such that $X$ isn't connected.  Every counterexample that I've looked, has been subspaces from a bigger metric space, e.g. $[0, 1]\cup[2, 3]$ which fails to be an interval in $(\mathbb{R}, |\cdot|$).   It might be topological space that isn't connected but for metric spaces? is there any apart from discrete metric spaces?  Thanks in advance

Is every metric space a subspace of some connected metric space? If the space itself is connected then we're done, but if not then I think we can extend our metric space to make it connected.  I'm not sure whether this will work or not, but intuitively I think the answer is yes.


I have to perform a regression. My data set is composed of 12 independent(ration) variables and 1 dependent(interval) variable. After having performed a Normality test(kolmogorov-Smirnov) it resulted the none of the variables were normally distributed. It is common practice to normalise the variables before a regression. My question is: should I normalise also the dependent(interval) variable?  this represents a scale of quality. Would normalising it undermine the result or it's perfectly fine to normalise all the dataset and keep the dependent variable unnormalised?

In some literature, I have read that a regression with multiple explanatory variables, if in different units, needed to be standardized.  (Standardizing consists in subtracting the mean and dividing by the standard deviation.)  In which other cases do I need to standardize my data?  Are there cases in which I should only center my data (i.e., without dividing by standard deviation)?


What does condescending really mean? So far all the dictionaries do not actually give a single good illustration that shows the behaviour of being condescending.

I'm really confused about the meaning of the word 'condescending'. Online dictionaries define it as bossy/disdainful, which fits with...    But I find other usages where being condescending is obviously considered a good thing, perhaps more like being humble, or equal, rather than superior...    (and  of "condescending and friendly" in Google Books)  What's going on? Does this word really have two almost opposite meanings?


Suppose $f : \space [-1,1] \subset \mathbb{R} \rightarrow \mathbb{R}$ is continuous on $[-1,1]$, and differentiable on $(-1,0) \space \cup \space (0,1) $. If $\lim_{x \rightarrow 0} f'(x) = 7$, prove that $f$ is differentiable at $x = 0$ and $f'(x) = 7$. I believe the best method to prove this is by mean value theorem and definition of derivative. I tried to do this but couldn't. Does anyone know how to prove this? There were a few similar questions that did not help either.

I know that if a function is piecewise, then when differentiating it one needs to deal separately with the points of intersection of the pieces, because the derivative may not be defined there.  Also, if a one-sided limit of $f'(x)$ at these "crucial points" is infinite or doesn't exist, it doesn't preclude the limit of the difference quotient from existing and being finite. For example, take $f(x)=x^2\sin\frac1x, f(0)=0$: $f'(x)= 2x\sin\frac1x-\sin\frac1x $ has no limit as $x\to0$ but $\lim\limits_{h\to0}\frac{f(h)-f(0)}{h}=0=f'(0)$.  On the contrary, looking at $f(x)=\sin x +\lvert \sin x\rvert $ on $[0,2\pi]$ one has $f'(x)=2\cos x$ on $(0,\pi) $ and $f'(x)=0$ on $(\pi,2\pi)$ so $\lim\limits_{h\to0^+}f'(\pi+h)\ne\lim\limits_{h\to0^-}f'(\pi+h)$, but they are both finite. And in this case it's easy to find that they agree with the one-sided limits of the difference quotient. Why? Does the finiteness of the former imply that they agree with the latter? Is this also true if the one-sided limits of $f'$ at the crucial points agree with each other?


Today, I used math.log() function to get the logarithm of 4913 to the given base 17. The answer is 3, but when I ran the code below, I got 2.9999999999999996.  1) Is it because math.log(x, b)'s calculation is log(x) / log(b)?  2) Is there any solution to get the correct answer 3?  import math print(math.log(4913,17))

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I'm taking an intro to statistics and currently we are covering what a correlation coefficient is. Unfortunately the material does not explain why correlation coefficient is an indicator of linear relationship, it just says that it is. Can someone give an explanation to why correlation indicates linear relationship as opposed to quadratic or even cubic?

Assume that X depicts a random variable denoting the time it takes someone to sweep the floor today and Y be the time it takes him tomorrow and Z be the time it takes him on the last day of October.   If X, Y and Z are assumed to be independent, it means that the person does not "learn" how to sweep faster through his first day's experience and the result of X is irrelevant to the result of Y and Z.  What does it mean physically when X,Y and Z have a correlation coeffecient of a certain amount (say 0.5).   I understand that $\rho_{XY} = \dfrac{cov(X,Y)}{\sigma_X \sigma_Y} = \dfrac{E[(X-\mu_X)(Y-\mu_Y)]}{\sigma_X \sigma_Y} $


I have a 1TB USB that I got about a month ago. It was working fine for 2 weeks until folders, when made, started getting corrupted automatically. All the other folders are fine except recently made ones. Also, after the 2 weeks programs started saying the drive was full even though it had a lot more data left. (around 982GB?) The drive is formatted as exFAT, fyi. Why has this happened? I think I need to restart the drive (Clears the drive, then resets it me thinks) but I don't know how. Any help? (Info on the USB: It was bought from Amazon for around 10 - 15$. It doesn't have a case but it also hasn't been dropped, broken/deleted any files, etc. This USB should work like a charm but it doesn't.) Edit: Currently copying files from the USB to C:/

Recently, I bought an USB flash drive which has a cool design.  The seller said it is 256GB however, I've already known that capacity would be fake. Anyway, I bought it cause of its cool design and want to use this USB flash drive anyway.  What should I do?  I've tried to find a proper tool(vid 1908 / pid 1320) but couldn't. Can I repair this through Low level format? Or partitioning this through Linux?


In the story Escape! the Brain sends Gregory Powell and Mike Donovan to space. When they get back, everything seems normal, like time has not passed since they went away.  According to the , Powell and Donovan should have returned later in the Earth point of view (e.g. people would be older and waiting for them for years).  Did Isaac Asimov ignore this concept, or maybe the Brain did not send the technicians far away enough to feel the concequences of the concept?

In the Asimov short story "Escape!" (part of the Susan Calvin series), Powell and Donovan are set by US Robotics to test a spaceship with a hyperspatial drive.  They, at one point claim they have been on the ship for 5 days, whereas I believe Dr Calvin requests 48 hrs to speak to the Brain. I can't perfectly tell if these two times are coterminate or not, but if there are they only travelled at a fraction of c, not faster than it as might be claimed.  So do they experience relativistic time dilation? Or are they subject to other 'physics'?


I currently do not have any YAML files in my /etc/netplan directory than I can edit in order to set a static IP for my Ubuntu 18 server. I have tried:  sudo netplan generate   It returns no errors but there is also no new files (or any files for that matter) created under /etc/netplan. Can I use nano to create a file a save it with a .yaml extension and still use  sudo netplan apply   in order to update my Ethernet interface settings?

I changed config from dhcp to static (192.168.0.17), but still getting a dhcp assigned (192.168.0.141) IP. I don't know where else to check... any idea?  ifconfig  ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500         inet 192.168.0.141  netmask 255.255.255.0  broadcast 192.168.0.255         inet6 fe80::20c:29ff:fe87:6981  prefixlen 64  scopeid 0x20<link>         ether 00:0c:29:87:69:81  txqueuelen 1000  (Ethernet)         RX packets 43080139  bytes 55213169928 (55.2 GB)         RX errors 0  dropped 1  overruns 0  frame 0         TX packets 17923871  bytes 1406116280 (1.4 GB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0  lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536         inet 127.0.0.1  netmask 255.0.0.0         inet6 ::1  prefixlen 128  scopeid 0x10<host>         loop  txqueuelen 1000  (Local Loopback)         RX packets 56350  bytes 6166732 (6.1 MB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 56350  bytes 6166732 (6.1 MB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0   nmcli d  DEVICE  TYPE      STATE      CONNECTION ens33   ethernet  unmanaged  -- lo      loopback  unmanaged  --   /etc/network/interfaces  # /etc/network/interfaces -- configuration file for ifup(8), ifdown(8) # Generated by debian-installer.  # The loopback interface auto lo iface lo inet loopback  #The primary network interface auto ens33 iface ens33 inet static address 192.168.0.17 netmask 255.255.255.0 gateway 192.168.0.1 dns-nameservers 192.168.0.1   /etc/NetworkManager/NetworkManager.conf  [main] plugins=ifupdown,keyfile  [ifupdown] managed=false  [device] wifi.scan-rand-mac-address=no   uname -a  Linux server 4.13.0-16-generic #19-Ubuntu SMP Wed Oct 11 18:35:14 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux


I want to add a route permanently.   I've tried  route add -net @ip  netmask mask gw "gw" but every time when I shut down, I have to re-enter the command.  How can I make this route permanently?

I have used Ubuntu since Ubuntu 8.10; today I'm working with Ubuntu 12.04 Server.   I am having difficulty keeping static routes on booting. I would usually put the route commands   /sbin/route add -net <IP>/<MASK> <GW> dev <ethX>   in /etc/rc.local or I would create a file (named routes) inside the directory /etc/network/if-up/, but I notice that on Ubuntu 12.04 it isn't working.    If I type the commands in the shell, they work, but the same commands don't work when they  are in the specified file.   I already tried to change the file name to other names thinking that my file name (routes) could be erroneous in Ubuntu 12.04, but that also did not work.  I notice also that command /sbin/ifconfig works, less the /sbin/route.  What changed in network set-up?  How can I define static routes on Ubuntu 12.04?


In the Pokémon franchise (I'll accept answers from any canon source, whether the anime, manga, games or anything else I can't think of), Poké Balls are used to catch Pokémon. Could you, in theory, use them to catch a human being? Is there any canon example of someone attempting it (I suppose it has probably occurred at some point in the anime for example)? Is there any canonical factor that makes it technically impossible (such as "Humans and Pokémon are fundamentally different", but I think I remember that this isn't true) or is it possible in theory but simply not done in practice?  EDIT : My question is different from the general "How does a Poké Ball work" question because I'm specifically asking whether / why it can not catch humans. The answer to the other question does address this, but in passing, and it does not provide any sources, and links to a page that may have been a good source in the past, but is now devoid of any relevant content (or canon quotes) so it doesn't really answer my question.

Is it ever explained how a Poké Ball works? I know that you throw it a Pokémon, and if it is weak enough, you catch it. But is the process ever explained? Does it work on humans? Do most Pokémon like being held in a Poké Ball?


root@mc:/home/sdtd# apt-get install rpm Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies:  linux-server : Depends: linux-image-server (= 3.2.0.38.46) but 3.2.0.64.76 is to be installed                 Depends: linux-headers-server (= 3.2.0.38.46) but 3.2.0.64.76 is to be installed  rpm : Depends: librpm2 (>= 4.9.0) but it is not going to be installed        Depends: librpmbuild2 (>= 4.9.0) but it is not going to be installed        Depends: librpmio2 (>= 4.9.0) but it is not going to be installed        Depends: librpmsign0 (>= 4.9.0) but it is not going to be installed        Depends: rpm2cpio        Depends: rpm-common (= 4.9.1.1-1ubuntu0.2) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution). root@mc:/home/sdtd#   After apt-get -f install:  root@mc:/home/sdtd# sudo apt-get -f install Reading package lists... Done Building dependency tree Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   linux-headers-3.2.0-31-generic libicu48 linux-headers-3.2.0-30 linux-headers-3.2.0-31 linux-headers-3.2.0-32   linux-headers-3.2.0-33 linux-headers-3.2.0-34 linux-headers-3.2.0-35 linux-headers-3.2.0-36   linux-headers-3.2.0-34-generic linux-headers-3.2.0-32-generic libdumbnet1 linux-headers-3.2.0-35-generic   linux-headers-3.2.0-30-generic linux-headers-3.2.0-33-generic linux-headers-3.2.0-36-generic Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   linux-server The following packages will be upgraded:   linux-server 1 upgraded, 0 newly installed, 0 to remove and 155 not upgraded. 1 not fully installed or removed. Need to get 0 B/1,734 B of archives. After this operation, 1,024 B of additional disk space will be used. Do you want to continue [Y/n]? Y dpkg: dependency problems prevent configuration of linux-server:  linux-server depends on linux-image-server (= 3.2.0.38.46); however:   Version of linux-image-server on system is 3.2.0.64.76.  linux-server depends on linux-headers-server (= 3.2.0.38.46); however:   Version of linux-headers-server on system is 3.2.0.64.76. dpkg: error processing linux-server (--configure):  dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                                                                                Errors were encountered while processing:  linux-server E: Sub-process /usr/bin/dpkg returned an error code (1)

Occasionally, when I'm installing stuff, I get an error like the following:  Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  package1 : Depends: package2 (>= 1.8) but 1.7.5-1ubuntu1 is to be installed E: Unable to correct problems, you have held broken packages.   How can I resolve this?


I have variable that I need to save and load between 2 scenes.  So this is what I'm trying:  First script:  public class s1sc : MonoBehaviour  { public string playername;  public static s1sc Instance;  void Awake ()    {     if (Instance == null)     {         DontDestroyOnLoad(gameObject);         Instance = this;     }     else if (Instance != this)     {         Destroy (gameObject);     }  }   Second script:  public class s2sc : MonoBehaviour  {     public string pn;      void Start ()      {                pn = s1sc.Instance.playername;     } }   And it doesn't work fine. What is the problem??

I'm not entirely sure if I'm doing this right, but I always considered the scene system in Unity as some sort of state management (rather than e.g. a level system) which allows to group the contents (entities, components) into the usual main states of the game (menu, ingame), which can then be invoked or replaced together.  Now I have a very specific concern and I have no clue how to deal with that in Unity, mostly because of it's abstractions from code and other restrictions:  My game features a procedurally generate terrain where as I'd like to tweak the generator before actually launching it. The tweaking is done in some sort of 'pre-game' state (as part of the main menu) where the values are stored in e.g. TerrainData model class. Usually in other engines, I'd to it like this:   Providing an UI within the menu state to tweak the parameters of the game Storing the parameters in a view model (and data model) Instantiate the ingame state (which requires said data model in the .ctor Pass the data model to a generator and start the generation   Now, here are the main problems:   Most types in unity (scenes, monobehaviors) do not allow constructors because they use it for themselves It doesn't seem possible to instantiate scenes manually (there's only e.g. Application.LoadLevel("") which only takes the name of the scene, not a instance reference etc. it doesn't seem possible to pass data between scenes, without reverting to awkward workarounds such as singletons, playerprefs, DontDestroy etc. which are all not really suitable for this case.   So, how can I properly solve this? Is there a better way to manage states rather than scenes? Prefabs maybe?  Backlink to UntityAnswers question:


I have two pc on my home network. One of them is the Raspberry Pi. The Raspberry Pi has static IP. I connect with it, through my another pc, with ssh user@ip. But if I put a long process run I have to leave my pc power on.  How can I put long or short process run on my raspberry (or another machine with Linux) and shutdown the machine with I used to connect the raspberry?

Let's say I launch a bunch of processes from a ssh session. Is it possible to terminate the ssh session while keeping those processes running on the remote machine?


What if I want to convey to someone that you can watch this series from any episode; The series is not in continuation, everything is independent.  is an example for this.  Is there a word for this?

When we have a series of episodes where every single episode depends on and develops from the previous, we may call that a sequel, or maybe a continuum.  Now let us say that we have a collection of fables, episodes or anecdotes that have the same characters, the same milieu, and the same themes; yet, this time, the episodes are NOT interdependent. They don't depend on each other in that you can watch/read 'any' one of them be it (in terms of order) from a beginning, medial, or final season, without having to watch/read the previous to understand, appreciate, and enjoy it (the one you're watching/reading). What do we call the 'episode' in this case?   Examples: a sitcom comedy show, or a show like Dr Who. Or, in literature, the novels of Sherlock Holmes.       Is there a specific term to describe the 'independent episodes' of these works?


I puzzled two high school Pre-calc math teachers today with a little proof (maybe not) I found a couple years ago that infinity is equal to -1:   Let x equal the geometric series: $1 + 2 + 4 + 8 + 16 \ldots$  $x = 1 + 2 + 4 + 8 + 16 \ldots$ Multiply each side by 2:  $2x = 2 + 4 + 8 + 16 + 32 \ldots$ Again from the equation in step 1, move the $1$ term to the left hand of the equation:  $x - 1 = 2 + 4 + 8 + 16 + 32 \ldots$ So the following appears to be true:  $2x = x - 1 \implies x = -1$   This is obviously illogical. The teachers told me the problem has to do with adding the two infinite geometric series, but they weren't positive. I'm currently in Pre-calc, so I have extremely little knowledge on calculus, but a little help with this paradox would be appreciated.


I'm trying to install the flashplayer plugin in the three steps shown on  but get the following message:  Package adobe-flashplugin is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source. E: Package 'adobe-flashplugin' has no installation cadidate.  I'm a total noobie when it comes to Linux, and I didn't bother at all with the DOS when using Windows OS, so what does this exactly mean? Can I install flash from somewhere else?  Jannike

I have had significant problems with watching flash video in 64-bit Ubuntu.  Does anyone know of a good way to get flash running on the platform?


My question is similar to this one, for which no answer has yet been posted.   I am filling one Google Spreadsheet with Zapier which creates new rows of data. I then use ImportRange to take that some data from that sheet into another, where it is processed and generates text that I use to send out emails or SMS.  This 2nd sheet is read by Zapier in order to send the email or SMS.  The problem is that the 2nd sheet does not automatically update when I am not logged in an making changes.  i.e. importrange() is not updating 'when I am not looking'.  I have both sheets set to refresh every minute and Zapier 'reads them' once every 5 mins (writing to the first sheet, only reading from the second").  I have tried any scripts, although I have tried using the Now() function and concatenate() functions in order to amend the data pulled in by importrange() - which did not fix the problem.  The second sheet is a bit complex and takes time to load.

I am using an external application to enter data into a Google Spreadsheet.  This workbook is then referenced by a separate workbook (with the IMPORTRANGE(spreadsheet_key, range_string) function) that manipulates and interprets the data.  My problem is that whenever I personally modify the referenced workbook, the referencing workbook updates just fine, but whenever the external application modifies it, it does not get updated.  I have tried editing the "Spreadsheet settings" so that recalculation is done every minute and on every change.  Furthermore, I have also installed an extension in Google Chrome that auto-refreshes the page every hour.  However, the data does not get re-imported from the referenced workbook.  Even if I copy the formula into a new cell, the data is still not re-imported.  Is there anything that I can do to the referencing workbook to trigger Google Sheets to re-import the data?  Edit: Just to be clear, I currently have one workbook with data entered by an external application in it (call it the "source sheet"), and another workbook with an IMPORTRANGE function in it (call it the "referencing sheet").  The data shown by the IMPORTRANGE function in the "referencing sheet" does not include any data entered by the external application since I last personally edited the "source sheet".  Also, both workbooks are using the new Google Sheets.  Edit: Also, this question is not the same as  because I am using the function given as the solution to that question to import data from a spreadsheet.  The problem is not how to import the data, but rather how to update the source for the data.  My assumption would be that Google would have taken care of this for me, but the data in the "referencing sheet" does not get updated, and the only way I can find to get it to update is to physically go into the "source sheet" and edit it myself.


I am aware that articles are the modifiers, which introduce a noun/noun_phrase in a sentence, and by the rules of English grammar we should use an article before referring to a noun in a sentence.  However, I see that the above rule is not strictly followed. I have seen sentences where though a noun/noun_phrase is used in a sentence but an introductory article is not used.  Eg : Login to desktop and start the paint application [ Desktop is a noun, hence I expect either "Login to a desktop and ...." or "Login to the desktop at the corner and ....."]  So please help me understand, when can an article be omitted ?

Recently, in many new online software I often see that developers omit articles in short sentences, especially on action buttons or tooltips.     For instance: "Add new task" (not "Add a new task"), "Create project" (not "Create a project"), but often in the same software I can see "Make a copy". What are situations it can be justified?