I am using php to develop a news app where the admin will feed in the news item with its descriptions and finally get displayed to users. I am using mysql database.  Everything seems to be working fine but I am not able to escape single quotes as well as display certain currency symbols in my output text. I am using UTF-8 charset. I have used str_replace function but to no avail. I have also tried htmlentities($mystring, ENT_QUOTES | ENT_IGNORE, ‘UTF-8) and this actually ignored (removed) the single quotes and symbols instead of escaping and displaying them as they are. I am also using UTF-8_general_ci in the table column of mysql.  This is my code for retrieving the data :  try{     $pdo = new PDO("mysql:host=$hostname;dbname=$dbname",     $username,$password);     $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);     $pdo->setAttribute(PDO::ATTR_EMULATE_PREPARES,   false);     $stmt = $pdo->prepare("SELECT * FROM feed WHERE news_id = ?");     $stmt->bindParam(1,$myval);     $stmt->execute();     while($myrow = $stmt->fetch()){         $newarray[] = $myrow;     }     $mystring = $newarray[0]['body'];     $mystring = str_replace("'","/'",$mystring);     echo $mystring; } catch(PDOException $e){     echo 'Failed to retriev database item ' . $e->getMessage(); }   Below is an example output:     International Monetary Fund�s (IMF�s) Extended Credit Facility (ECF) programme, the raising of the $3-billion Eurobond at a lower coupon rate, and the positive Fitch rating of Ghana should be enough to demonstrate that, the economy is on track to impact the strength of the Ghana cedi. �In the last couple of weeks, the Bank of Ghana for instance, released a large chunk of dollars to players in the banking industry to meet our requirements. That was unprecedented and we feel that should the speculations stop, the Ghana cedi will stabilise the way we want it�,

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


So we know that our sperm and egg cells get set aside relatively early so that they aren't going through unnecessary cell divisions and causing DNA damage or telomere shortening, but since each new generation starts from one cell each generation has germ cells that have divided more than the previous generation's germ cells.   So, does this have an effect on age?   Is a second generation baby technically older than a first generation baby due to these extra cell divisions, or is telomerase and DNA repair able to keep each generation at the same relative life span?

The question "why do we age" has been asked numerous times. But why are we young? The cells of the adult human being are an age (time>0), but how can old cells create new cells that are younger than themselves?  I.e, how are young people made from the cells of old people?  I realize that senescence, the act of a cell aging, has to do with the shortening of telomerase over time which puts a limit (the Hayflick limit) on the life of an autosomal cell. So in theory, because cells only make direct copies of themselves but the telomerase shortens with every division, each new daughter pair would be as old as the parent and would continue aging. But how come new people start senescence at time t=0?


My camera body has a small marking on one side, indicating the position of the image sensor. (The manual even makes a point of explaining that this mark exists, and what it means.)  What possible reason would I have for knowing this? Why would I care exactly where the sensor is? It's buried deep within the body anyway, so...?

There is a symbol, a circle with a horizontal line passing through it, on the right side of the top-plate LCD of my Pentax K-5:     This symbol also appears on my Pentax K-r on the left side of the viewfinder assembly, only that it is engraved rather than painted on.  The K-5 manual calls this the image plane indicator.  What does this symbol mean, and what is it used for?


Can anyone help? I've got to prove  $$\sum^{n}_{i=1}\binom{n}{i}i=n2^{n-1}$$  using binomial first and then induction.

I was assigned the following problem: find the value of $$\sum_{k=1}^{n} k \binom {n} {k}$$ by using the derivative of $(1+x)^n$, but I'm basically clueless. Can anyone give me a hint?


I recently started having problems with UV mapping. I map the object on the same color yet it has different shades of the color. For example I was mapping a car I'm making for a game and it looked like this.  The interior of that car should all be one gray but it ends up as different shades of gray and some brown even though they are all on the same part of the texture (the texture is only 9 px by 9 px).

I have a problem. I am going to make a minecraft animation in blender. But when I put a minecraft texture on a 3d cube that is 16x16x16 it is very low resolution is there a way to get the texture in a better resolution or is there a way to make blender make the texture better?  I hope you have an answer. Thanks in advance


The following code is supposed to sort the array initialized below.   int[] intArray = { 32, 42, 1, 23, 56, 75, 32, 23 }; int temp = 0;  for (int i = 0; i < intArray.length; i++) {   for (int j = 1; j < intArray.length; j++) {     if (intArray[j - 1] > intArray[j]) {       temp = intArray[j - 1];       intArray[j - 1] = intArray[j];       intArray[j] = temp;     }   } }   What should you type to get the sorted array and where should you type it?   I have tried some options such as System.out.println(temp) between the last two closing brackets and the one before those, but I am not getting all the values printed, and 32 is printing many times instead.  Writing the code System.out.println(j) or System.out.println(i) in the same area doesn't work either. Can you explain why these codes don't work?

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


I'm new to both linear algebra and Matlab, so naturally I'm probably asking an obvious question. If someone could attempt to explain to me in layman's terms how to go about answering this question in Matlab it'd be great, thanks in advance.

I need to create a loop to answer part c of the following linear algebra question. I'm new to Matlab so this is extremely confusing. I'm not sure how to make a loop that "counts" from 0-25 in order to generate a new matrix for each value. If someone could help me out it'd be great.


The  say:     A spell cast with a bonus action is especially swift. You must use a bonus action on your turn to cast the spell, provided that you haven't already taken a bonus action this turn. You can't cast another spell during the same turn, except for a cantrip with a casting time of 1 action.   I assumed the order didn't matter, and an unwritten, but logical deduction, is:     If you cast a spell with an action, you can no longer cast spells or cantrips with a bonus action on that turn.   However, a mate has argued with me, that if you first cast a spell with an Action, then you can cast another with a Bonus Action, since casting as an action does not prevent casting as a bonus, only the other way around.  I think it doesn't make sense, but in fact, the rules have some ambiguity. Does "You can’t cast another spell during the same turn" mean "you can no longer cast another spell", or "you can't have cast and you can no longer cast another spell"?

When casting a spell as a bonus action, you can't cast another spell on the same turn except a 1-action cantrip - can the order be "reversed"? Can you cast a cantrip first as a bonus action, then any other spell? If not, would it be broken to allow it?  I'm thinking a Sorcerer casting a Quickened true strike, then casting a leveled spell requiring a touch attack. Seems like a great use of the cantrip + Metamagic feature, but it seems like it is not allowed.


If $0<a_1< \cdots < a_n$, show that the following equation has exactly $n$ real roots.   $$ \frac{a_1}{a_1-x}+\frac{a_2}{a_2-x}+ \frac{a_3}{a_3-x}+ \cdots + \frac {a_n}{a_n - x} = 2015$$   My working: The LHS easily becomes $$a_1(a_2-x)...(a_n-x)+a_2(a_1-x)(a_3-x)...(a_nx)+.....+a_n(a_1-x)(a_2-x)...(a_{n-1} -x)$$ This shows it has $n$ roots  But what about exactly and real?

Let $0<a_1<a_2<\cdots<a_n$ be real numbers. Show that the equation has exactly $n$ real roots.   $\displaystyle \sum_{i=1}^n \dfrac{a_i} {a_i-x} =2015$  I multiplied out denominators and that was very long, but I don't think descarte's rule will be helpful. Please any help is appreciated.


I had a question about the similarity of question which is suitable for several site created on Area 51.  As they are no longer in beta since a long time, I was expecting to post them on the global meta site of stackexchange. I can understand the site don't exist, but why doing a redirect since it as absolutely nothing to do with .

This seems counterintuitive to the vertical nature of Stack Exchange itself, but I cannot manage to browse to meta.stackexchange.com: I get redirected to meta.stackoverflow.com, instead.  This is also despite the fact that these URLs resolve to separate IP addresses...  ; <<>> DiG 9.7.3-P3 <<>> meta.stackexchange.com meta.stackexchange.com. 3421    IN  A   64.34.80.165  ; <<>> DiG 9.7.3-P3 <<>> meta.stackoverflow.com meta.stackoverflow.com. 684 IN  A   64.34.119.12   Am I being dumb somehow, or is this "the way it is"? If so, why?


I have a customized object including fields: private List<Duration> durations; private Duration single;  When debugging, I evaluate the following expression and the result is java.lang.String which is different from the declared type. Why? durations.get(0).getClass()  As a comparison, the class of single is Duration, same as declared type. If any help, I got the data deserialized from MySQL.

What is the concept of erasure in generics in Java?


We knew Ubuntu 20.04 will set python 3 as default python, but after upgrade from 18.04 to 20.04, I found my default python version is 2.7.18rc1 not python3:

I upgraded from Ubuntu 19.10 to 20.04. Many articles mention that the latest LTS will not support python2. But I still have it. Why is that?  $ python Python 2.7.18rc1 (default, Apr  7 2020, 12:05:55)  [GCC 9.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> print "hello world!" hello world! >>>


I have a question about a problem I'm having installing optifine with forge on minecraft.  Is there a place where I could ask this question?  I asked this on gaming, but I just got downvoted and told it is the wrong place.  The question is here:

On which Stack Exchange site can I ask questions like        When will [some new feature] for [some product] be released?   Where can I download an update for [some product]?   I'm getting errors when accessing the customer portal for [some company] – how can I fix this?   Why was I banned for doing [some action] on [some platform]?   Why is [some company] discontinuing [some product]?   Why is [some company] giving away [some product] for free?   What's the price for [some product]?      or any other product support/customer service questions?  It's not a product related to programming (or I've read  on Meta Stack Overflow) so I know Stack Overflow isn't the right place. Which other site in the network will take these kind of questions?


I am using the documentclass scrartcl and have a table  \documentclass{scrartcl} \usepackage[table,xcdraw]{xcolor}  \begin{table}[] \centering \label{my-label} \begin{tabular}{lll} \cellcolor[HTML]{FE0000} & \cellcolor[HTML]{F8FF00} & \cellcolor[HTML]{32CB00} \\ \cellcolor[HTML]{F8FF00} & \cellcolor[HTML]{32CB00} & \cellcolor[HTML]{FE0000} \\ \cellcolor[HTML]{32CB00} & \cellcolor[HTML]{FE0000} & \cellcolor[HTML]{FCFF2F} \end{tabular} \caption{Feeling irie} \end{table}     How would I set the caption to the left?

I tried to use the floatrow package together with the approach from the accepted answer from () to put my table caption to the right top hand side of my table. However, whatever I tried so far did not work out at all. I use the float package. Not very often but that is why I do not want to or cannot use the sidecap package which looks actually much simpler. I quickly tried the minipage approach which seems to work but not sure if I should use it. Here is my simple table which I used to try to bring the caption to the right top:  \documentclass[10pt,DIV=12,a4paper,numbers=noenddot]{scrreprt}  \usepackage{tabu} \usepackage{booktabs}  \begin{document}  \begin{table}  \begin{tabu} to \textwidth {X[L] X[L]}  \toprule  AAAAAA & BBBBBB \\ AAAAAA & BBBBBB \\ AAAAAA & BBBBBB \\ AAAAAA & BBBBBB \\ AAAAAA & BBBBBB \\  \end{tabu}  \caption{This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption This is the caption}  \end{table}  \end{document}   Can anyone help with this floatrow approach?


I have a big problem it keeps telling me this while I check everything and everything is good here is the code of the page in question. If I'm ever currently training that dates back 7 years so I think some thing doesn't work anymore so can be that the mistake comes from the. include '../lib/includes.php';  if(isset($_POST['name']) && isset($_POST['slug'])){     checkCsrf();     $slug = $_POST['slug'];     if(preg_match('/^[a-z\-0-9]+$/', $slug)){         $name = $db->quote($_POST['name']);         $slug = $db->quote($_POST['slug']);         $category_id = $db->quote($_POST['category_id']);         $content = $db->quote($_POST['content']);         if(isset($_GET['id'])){           $id = $db->quote($_GET['id']);           $db->query("UPDATE works SET name=$name, slug=$slug, content=$content, category_id=$category_id WHERE id=$id");         }else {           $db->query("INSERT INTO works SET name=$name, slug=$slug, content=$content, category_id=$category_id");         }         setFlash("La réalisation a bien été ajouté", 'success');         //header('Location:work.php');         die();     }else {         setFlash("Le slug n'est pas valide", 'danger');     } }  if(isset($_GET['id'])){   $id = $db->quote($_GET['id']);   $select = $db->query("SELECT * FROM works WHERE id=$id");   if($select->rowCount() == 0){     setFlash("Il n'y a pas de réalisation avec cet ID", 'danger');     header('Location:work.php');     die();   }   $_POST = $select->fetch();  }  $select = $db->query('SELECT id, name FROM categories ORDER BY name ASC'); $categories = $select->fetchAll(); $categories_list = array(); foreach($categories as $category){     $categories_list[$category['id']] = $category['name']; }  include '../partials/admin_header.php'; ?>```

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 have to delete the files which are zipped and then stored in .tar format. I Have to untar the files then delete the files which name includes XXX, YYY or ZZZ. There are more than thousand of .tar files and each .tar file contains hundred of .zip files.I need a script which can do this.

Assume i have an gzip compressed tar-ball compressedArchive.tgz (+100 files, totaling +5gb).   What would be the fastest way to remove all entries matching a given filename pattern for example prefix*.jpg and then store the remains in a gzip:ed tar-ball again?  Replacing the old archive or creating a new one is not important, whichever is fastest.


Is it possible to define a group structure on arbitrary set? It is obvious for finite sets and also sets with cardinality |Q| and |R| and also we don't know that is there other cardinality betwen them or not... what can we say a bout sets with other cardinalities?

Is it (and if yes how?) possible to define an an binary operation $*$ for an arbitrary set $M$ such that $(M,*)$ is a group?  If $M$ is finite or countable infinite this is trivial, but is it also possible for any other sets? And if yes how can you construct $*$? If no can you provide a counterexample?


ffmpeg -y -i test.mp4 -i bkg.png -filter_complex "[0:v]drawtext=fontfile=PingFang-SC-Regular.ttf:text='check.....':fontcolor=white:fontsize=36:x=200:y=200:enable='if(gt(t,10),lt(t,20))'[text];[text][1:v]overlay=x=180:y=180:enable='if(gt(t,9.9),lt(t,20))'[out]" -map "[out]" out.mp4  How to put the picture watermark in the front?I'm going to put the text on the picture

i want to add watermark on some videos but problem is because image in some videos its too small and in some videos its too big, (i think it depends on input link resulution)   so all my videos have output '640:360' so how can i make watermark image to be same in all videos not on some videos smaller in some bigger   ffmpeg -i "link" -i "/var/www/logo/logo1.png" -filter_complex 'overlay=10:10' -vcodec h264 -crf 25 -preset superfast -maxrate 600k -bufsize 600k -aspect '640:360' -s '640:360' ....


I have tried to look on ask Ubuntu and all answers say the same thing. I have tried lots of them and still no luck; is Ubuntu 14.04 code specific?  Please help. : )

My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates.  After installing that new version, the partition is nearly full again. So what else can I delete? Are there some other files associated to the old kernel images?  Here is a list of files that are on my /boot partition:  :~$ ls /boot/ abi-2.6.31-21-generic         lost+found abi-2.6.32-25-generic         memtest86+.bin abi-2.6.38-10-generic         memtest86+_multiboot.bin abi-2.6.38-11-generic         System.map-2.6.31-21-generic abi-2.6.38-12-generic         System.map-2.6.32-25-generic abi-2.6.38-8-generic          System.map-2.6.38-10-generic abi-3.0.0-12-generic          System.map-2.6.38-11-generic abi-3.0.0-13-generic          System.map-2.6.38-12-generic abi-3.0.0-14-generic          System.map-2.6.38-8-generic boot                          System.map-3.0.0-12-generic config-2.6.31-21-generic      System.map-3.0.0-13-generic config-2.6.32-25-generic      System.map-3.0.0-14-generic config-2.6.38-10-generic      vmcoreinfo-2.6.31-21-generic config-2.6.38-11-generic      vmcoreinfo-2.6.32-25-generic config-2.6.38-12-generic      vmcoreinfo-2.6.38-10-generic config-2.6.38-8-generic       vmcoreinfo-2.6.38-11-generic config-3.0.0-12-generic       vmcoreinfo-2.6.38-12-generic config-3.0.0-13-generic       vmcoreinfo-2.6.38-8-generic config-3.0.0-14-generic       vmcoreinfo-3.0.0-12-generic extlinux                      vmcoreinfo-3.0.0-13-generic grub                          vmcoreinfo-3.0.0-14-generic initrd.img-2.6.31-21-generic  vmlinuz-2.6.31-21-generic initrd.img-2.6.32-25-generic  vmlinuz-2.6.32-25-generic initrd.img-2.6.38-10-generic  vmlinuz-2.6.38-10-generic initrd.img-2.6.38-11-generic  vmlinuz-2.6.38-11-generic initrd.img-2.6.38-12-generic  vmlinuz-2.6.38-12-generic initrd.img-2.6.38-8-generic   vmlinuz-2.6.38-8-generic initrd.img-3.0.0-12-generic   vmlinuz-3.0.0-12-generic initrd.img-3.0.0-13-generic   vmlinuz-3.0.0-13-generic initrd.img-3.0.0-14-generic   vmlinuz-3.0.0-14-generic   Currently, I'm using the 3.0.0-14-generic kernel.


Do i need a transit visa for a flight that goes from Belgium to Ecuador and has a stop on London? I have a Belgian Residence Permit valid for a year because I'm a student, I have only the Residence Permit card and the visa in my passport is expired.

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


When the data set returns no data, the tablix column headers display, but I also need the detail rows to display with a blank or zero for all fields.  Adding an additional row to the tablix is not an option, as the textbox names on the additional row must be different within SSRS.  I am using this SSRS report as a data source to a PowerPivot model.  I do not want the PowerPivot model to break when it refreshes and no data exists yet.   I would like to avoid adding an empty row to the data set.  I would prefer a solution that can be implemented with in the SSRS report.

We have a SSRS report which shows the result of a dataset in a tablix. If the query in the dataset returns no data, the header of the Tablix gets displayed but not the tablix cells below the header. I know there is a property to NoRowMessage, but in fact it is not what we want. Because when I specify a message, SSRS shows the message instead of the empty tablix.I must show the tablix structure as it is, but with empty cells.   I even set the rule for each cell value of the tablix using IsNothing function, to show blank (""), if the value is null, but it didn't help.  Do you have any idea?  Thanks for your help in advance.


Reciprocal is defined as:  Two expressions or functions so related to another that their product is unity  So if $$\alpha * \beta = 1$$ Then you can say $\beta$ is the reciprocal of $\alpha$ i.e. $\beta = \dfrac{1}{\alpha}$ If $$\alpha + \beta = 1$$ is it possible to say $\beta$ is the _ ? _ of $\alpha$ ? * Edit * This question is in the context of probabilities.  For example if $\alpha$ is the probability of event X occurring and $\beta$ is the probability of event X not occurring.

I'm trying to convert a percentage: The original percentage represents how bad the condition of a asset is (in other words, a high number is bad). I would like to convert the percentage to represent how good the condition of an asset is (in other words, a high number is good). To do this, I can simply subtract the original percentage from 1 to get the desired percentage. Example:  1 - 0.25 = 0.75  My question is: What is this called in mathematics? As far as I can tell, this is not the same thing as .


Sometime I see bounties are set to gain the attention plus adding extra features to the question.  I cannot see the bounty remark after it is awarded or ended. So the answer may not be valid if the extra feature is added to the answer.     So IMHO the bounty remark(user comment on bounty) should be kept as it is the part of question.

Probably not an issue (and hopefully not a duplicate question), but I just noticed that bounty custom message disappears after the bounty has been awarded. Perhaps it could be still accessible as a tooltip on the awarded bounty icon? Also there is no bounty-note/bounty[-custom]-message/bounty-remark tag. What's the actual name for it anyways?


I was formatting my USB memory stick using Ubuntu and chose "Override existing data".   I accidentally knocked the memory stick out of the USB port. When I put it back into my Ubuntu computer it was not visible in the file manager (Nautilus), and it does not appear in my unity dock.  I have already tried rebooting the computer with the memory stick inserted. But no effect.  What can I do to bring my memory stick back to life?

I have a 8 GB pendrive. I used to write raw data into the pendrive (without creating filesystem) using the dd command.    Today, when I inserted the pen drive, the I am unable to write anything on to it.  When I open gparted it is showing the total space on the pen drive as 500 MB. I am unable to create a new partition table or a partition on the pen drive now.   Here is the fdisk -l output.   Disk /dev/sdb: 0 MB, 512000 bytes 255 heads, 63 sectors/track, 0 cylinders, total 1000 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00095df6   What's wrong with the pen drive? How can I recover the lost space?   Device Boot      Start         End      Blocks   Id  System   When I open gnome-disks, it shows the total space as 8 GB but when I try to create a new partition using it, it shows the following error:  Error creating partition on /dev/sdb: Command-line parted --align optimal --script "/dev/sdb" "mkpart primary ext2 1MiB 7969177599b"' exited with non-zero exit status 1: Error: The location 7969177599b is outside of the device /dev/sdb.  (udisks-error-quark, 0)


I found these two different sources, but they do the exact same thing. I was wondering if there is a difference or not but I couldn't figure it out.  Can anyone tell me the difference and when should I use which?  this is the first one:   void function1(int *x) {     *x = 100; }  int main() {     int var1 = 10;      function1(&var1);     cout << var1 << endl; }   and this is the second one:  void function2(int &x) {     x = 100; }  int main() {     int var2 = 10;      function2(var2);     cout << var2 << endl; }

What would be better practice when giving a function the original variable to work with:  unsigned long x = 4;  void func1(unsigned long& val) {      val = 5;             } func1(x);   or:  void func2(unsigned long* val) {      *val = 5; } func2(&x);   IOW: Is there any reason to pick one over another?


Using MAILTO where can i give the subject of the email without using echo Test | mail -s Test xyz@example.com because if i use like this for sender to a one user it is okay if i want to add multiple user mails then for every script i have to add the mail id's which will be not good when comapare to MAILTO command.  Right now i have the script to send the mail to a user and send the STDOUT AND STDERR to logs.txt.   MAILTO="xyz@example.com,abc@example.com,rer@example.com"  25 07 * * * /usr/local/bin/curator --dry-run --config /home/itadmin/.curator/curator.yml /home/itadmin/.curator/snapshot.yml 2>&1 | /usr/bin/tee -a /home/itadmin/.curator/logs.txt   What i want is that in the MAILTO command is it possible to subject to all the users listed in that command like this MAILTO="xyz@example.com,abc@example.com,rer@example.com?subject=Mail Tested"  Thanks

I am running a half dozen different cron jobs from my hosting at Hostmonster.com.  When a cronjob has been executed I receive an email with the output of the script.  The email comes in the format of:  From: Cron Daemon Subject: Cron  /ramdisk/bin/php5 -c /home5/username/scheduled/optimize_mysql.bash   The problem with this is that the subject of the email makes it very hard to read which cronjob the email is pertaining to.  Is there a way to modify the subject of a cronjob email so that it's easier to read?  For example:   From: Cron Daemon Subject: Optimize MySQL Database


In most of the videos I watch, the person in them clicks "Blender Render" and changes it to "Blender Game". 2.8 doesn't have and option like that, and it also is missing a scripting system below the animation time line.

Blender has just purged the entire game engine from 2.8. There is no "Game Engine" mode anymore and there isn't even a logic editor. I tried installing a GitHub Blender release with the game engine mode working but it failed to install because all the game code was gutted. Does this mean that Blender 2.8 is going to lose the game engine, or is the game engine just being redone for better compatibility and whatnot?


About the Mac:  Mac OS Mojave Version 10.14.4 (18E226)  MacBook Air (13-inch, 2017)   I wish to connect two external monitors with following specifications with my Apple device.   one pure HDMI  other VGA (converted to HDMI using a VGA to HDMI Adapter)   My device has one mini-display port. I have bought a (not an apple product) 3-in-1 mini-display port to (DVI, HDMI, VGA) adapter.  I have two options to connect.  1. Connect pure HDMI, VGA based monitors into one 3-in-1 mini-display port adapter. (FAILS!) 2. Connect the pure 3-in-1 Adapter to a splitter (another device that accepts one HDMI input and spilts into 4 HDMI outputs) using HDMI cable and then connect the two monitors using HDMI outputs. (WORKS!)   The second method is able to connect two monitors but my Apple device shows only one device connected in Display Settings and the two external monitors mirror each other but I want a chain display.  Any help?

I have an Early 2015 13" MacBook Air with Intel HD Graphics 6000 1536 MB. I'm trying to figure out what its capabilities are in terms of connecting two external monitors.  First, if I just used the two external monitors and did not use the MacBook Air's built-in monitor, what is the maximum resolution I could run both external monitors at simultaneously? For example, could they both do 1080p resolution, or perhaps higher? And does it matter whether I use the built-in monitor? (I've scoured the internet looking for information about this but haven't found anything so far!)  Second, is there a device I can use just for connecting two external monitors via DVI, HDMI, or DisplayPort to the MacBook Air's Thunderbolt 2 port, other than an expensive general purpose Thunderbolt 2 dock like   ? I should add that I'm not interested in using devices that connect to a USB 3 port and use a DisplayLink driver.


Trying without success to solve the following: what is the sum of $\binom{80}{0}-\binom{80}{1}+\binom{80}{2}-\binom{80}{3}...-\binom{80}{79}+\binom{80}{80}$  any help will be greatly appreciated

Calculate this:  $$\bigl(\begin{smallmatrix} 80 \\0 \end {smallmatrix}\bigr)-\bigl(\begin{smallmatrix} 80 \\1 \end {smallmatrix}\bigr)+\bigl(\begin{smallmatrix} 80 \\2 \end {smallmatrix}\bigr)-\bigl(\begin{smallmatrix} 80 \\3 \end {smallmatrix}\bigr)+...-\bigl(\begin{smallmatrix} 80 \\79 \end {smallmatrix}\bigr)+\bigl(\begin{smallmatrix} 80 \\80 \end {smallmatrix}\bigr)$$  Can I get hints/suggestions for this?  All I know is that: $\bigl(\begin{smallmatrix} 80 \\0 \end {smallmatrix}\bigr)$ and $\bigl(\begin{smallmatrix} 80 \\80 \end {smallmatrix}\bigr)$ must be equal to 1, right?  I know there must be some kind of trick but I just can't find it.  Thanks


I don't know what to do about my generic array. I keep getting this error     Exception in thread "main" java.lang.ClassCastException: [Ljava.lang.Object; cannot be cast to [Ljava.lang.Comparable;   the error is related to this bit of code  T[] a = (T[]) new Object[temp];   My class extends comparable, and I don't know why I keep getting this error. Any hints on how to fix this will be greatly appreciated. Here is the code.   public void balance()  {   int temp = size();   int low = temp -(temp - 1);   T[] a = (T[]) new Object[temp];   reset(INORDER);   for (int i =0;i<temp; i++)  {      a[i]= getNext(INORDER);       root = null;      insertRec( a, 0 ,temp-1);      add((T) a [i]);   } }   I don't have any issues with the rest of the code, but thought it would be helpful to see the whole method. This is part of a much larger class that manipulates Binary search trees, this method is supposed to balance the tree.

Due to the implementation of Java generics, you can't have code like this:   public class GenSet<E> {     private E a[];      public GenSet() {         a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation     } }   How can I implement this while maintaining type safety?  I saw a solution on the Java forums that goes like this:  import java.lang.reflect.Array;  class Stack<T> {     public Stack(Class<T> clazz, int capacity) {         array = (T[])Array.newInstance(clazz, capacity);     }      private final T[] array; }   But I really don't get what's going on.


#!/BIN/BASH # To alert whenever lsof crosses 80%  maxlimit=32000 echo 'Max limit is ' $maxlimit tlimit=$(bc <<< $maxlimit*0.8) echo 'Treshold limit at 80% ' $tlimit a=$(lsof | wc -l) echo 'Current usage ' $a if [ $(bc <<< "$a > $tlimit") -eq 1 ] then         echo 'lsof =' $a 'has exceeded 80% of maximum limit' | /usr/bin/Mail -s "ALERT!!!" "*****@cisco.com" fi     * * * * * bash /root/vasanth/lsef/script.sh   In the above script, the output is to send a mail to the corresponding Mail ID .  When I run it manually it sends the mail.  But, when it is scheduled in cron, the mail is not being sent.  I cant understand what the problem is. How could I debug it?

Shell Type:  >echo $SHELL /bin/ksh   Cronjob :   15 * * * * /bin/ksh /wls_domains/resMGT/logs/bea/wlr3queuetransaction.sh > /wls_domains/resMGT/logs/bea/data/script.log  The script is as below:  ##log files and lookup file "wlr3queue.txt" are in the same path of the script ##/wls_domains/resMGT/logs/bea/wlr3queuetransaction.sh  Script :  #!/bin/ksh  dt=`date +%Y-%m-%d` xy=`date|awk '{print $4}'|awk -F":" '{print $1}'` yz=`expr $xy - 1` if [ $yz -le 9 ] then yz=0$yz fi  if [ $xy -gt 0 ] then  for i in `cat wlr3queue.txt` do  sum=0  count=`gzgrep -i "$dt" admin_resMGT_access.log* | grep "$yz:[0-5][0-9]" | grep "$i" | wc -l`  if [ $count -gt 0 ] then name=`echo $i | cut -d'/' -f3`  gzgrep -i "$dt" admin_resMGT_access.log* | grep "$yz:[0-5][0-9]" | grep "$i" | awk '{print $8}' > consumed_time.txt  for j in `cat consumed_time.txt` do j_ms=`echo "$j * 1000" | bc` echo $j_ms >> consumed_ms_time.txt done  for k in `cat consumed_ms_time.txt` do sum=`echo "$sum + $k" | bc` done  avg=`echo "scale=2; ($sum/$count) "| bc`  min=`cat consumed_ms_time.txt | sort -n | head -1`  max=`cat consumed_ms_time.txt | sort -n | tail -1`  else  avg=0  min=0  max=0  fi ( echo $yz","$count","$avg","$min","$max )>>/wls_domains/resMGT/logs/bea/data/$name$dt.csv   rm -f consumed_ms_time.txt  done  else  echo "script won't execute at this hour" > temp.txt  fi   I have executed the following commands and the script ran successfully.  ./wlr3queuetransaction.sh sh -x wlr3queuetransaction.sh /bin/ksh /wls_domains/resMGT/logs/bea/wlr3queuetransaction.sh  /bin/ksh/ wlr3queuetransaction.sh.   How to debug? What to do?


I use Ubuntu and someone advised me to change permissions to a file with sudo chmod " +x ".  It is not clear to me if +x means to change permissions to something very general as 777 or 775, or something totally different.  I've tried to Google +x unix and +x linux, but I couldn't find data regarding it in a fast search.  Here are the orders I have done (thus I'm stuck in stage 4):   install wget run wget http://files.drush.org/drush.phar run sudo mv drash.phar /usr/local/bin/drush run sudo chmod +x /usr/local/bin/drush test drush

I've never really got how chmod worked up until today. I followed a tutorial that explained a big deal to me.   For example, I've read that you've got three different permission groups:   owner (u) group (g) everyone (o)   Based on these three groups, I now know that:   If the file is owned by the user, the user permissions determine the access. If the group of the file is the same as the user's group, the group permission determine the access. If the user is not the file owner, and is not in the group, then the other permission is used.   I've also learned that you've got the following permissions:   read (r) write (w) execute (x)   I created a directory to test my newly acquired knowledge:  mkdir test   Then I did some tests:  chmod u+rwx test/ # drwx------ chmod g+rx test/ # drwxr-x--- chmod u-x test/ # drw-r-x---   After fooling around for some time I think I finally got the hang of chmod and the way you set permission using this command.    But...  I still have a few questions:   What does the d at the start stand for? What's the name and use of the containing slot and what other values can it hold? How can I set and unset it? What is the value for this d? (As you only have 7=4+2+1 7=4+2+1 7=4+2+1) Why do people sometimes use 0777 instead of 777 to set their permissions?   But as I shouldn't be asking multiple questions, I'll try to ask it in one question.  In UNIX based system such as all Linux distributions, concerning the permissions, what does the first part (d) stand for and what's the use for this part of the permissions?


I am trying to prove that the center of the dihedral group $Z(D_{10})$ is trivial. The only way I've been able to do it so far is to draw the group table, but I am trying to find a more elegant way of proving the result. If I fix an $a \in Z(D_{10})$ and assume $ab = ba$ for all $b \in B$, I am not able to prove that $a = e$ because there isn't a way to, for example, multiply by inverses. If I broke it into cases, I could possibly use the fact that reflections invert themselves.

So I'm trying to prove the center of $D_n$ only has the identity for odd $n$ greater than or equal to 3. I know that since $D_n$ for $n$ greater than 2 is non-Abelian, the flips and the rotations do not commute in general. Additionally, I know that the only other element that can commute with every element (rotation by 180 degrees) is not going to be in an odd dihedral group- I just have a hard time saying why it holds. My question is how do I formalize this, going forward? Edit: My question is different from the other that was pointed out, as I'm proving the center is trivial whereas the other question is an if and only if regarding an element in the center.


The output of echo $$ command displays some number in the standard output like below.  $ echo $$ 14594   What is that number? And also,  $ x=a $ echo $x a   In the above example echo $x parses the variable x and displays the value of x to the standard output.Likewise in this command echo $$, is that the second dollar symbol  represents any variable?

What does the output of the command below mean? (result is positive integer)  echo $$


I'm trying to write "T(n/3)" within an align block, but I'm not getting the behavior I expect. When I enter this:  \documentclass{article} \usepackage[utf8]{inputenc}  \begin{document}  \begin{align}      T(n) = 3T(\frac{n}{3}) + 2n -3  \end{align}  \end{document}   I get this output from Overleaf:    I didn't get this issue when I used aligns and fracs before in the same document. For example, this one worked just as intended:  \begin{align} S &= \frac{1}{2} + &\frac{1}{4} + &\frac{2}{8} +&\frac{3}{16} + &\frac{5}{32} + &\frac{8}{64} + &\frac{13}{128} + \dots\\ \frac{1}{2}S &= &\frac{1}{4} + &\frac{1}{8} + &\frac{2}{16} +&\frac{3}{32} + &\frac{5}{64} + &\frac{8}{128} + \dots\\ S-\frac{1}{2}S &= \frac{1}{2}+ &\frac{0}{4} + &\frac{1}{8} + &\frac{1}{16} +&\frac{2}{32} + &\frac{3}{64} + &\frac{5}{128} + \dots\\ &= \frac{1}{2} + \frac{S}{4}\\ &\implies 4S-2S=2+S\\ &\implies S=2 \end{align}   yielding:

Why blank lines between equation makes error? there are a lot of commands in latex and almost for all of them these blank lines are not important,  but why in this case is important and is there any similar function?


Note the likert scale is  very satisfied 2.satisfied Don't know Unsatisfied 5.very unsatisfied And the ordinal variable is anxiety: 1.normal 2.mild 3.moderate 4.severe

I'd like to test the hypothesis that there is a monotonic relationship between two variables, without assuming a specific model. What is the most robust (i.e. lowest probability of type-II error) way to do this?  I can think of a few options:   use a linear model of untransformed data. It'll be robust enough, even if I don't think the true relationship is linear. look at rank-transformed data, e.g. with Spearman's rank correlation coefficient use some kind of resampling approach, in which the order of the dependent variable is randomly shuffled. I'm not sure what statistic to compare in this approach.   Is there a fairly standard approach to this problem?


I am particularly new to this subject. Can neutrino physics be understood by a 10th grade?

What evidence is there that dark matter isn't one of the known types of neutrinos?  If it were, how would this be measurable?


I see generated Orbs of light being lying on floor, but I can't seem to pick them up when I pass over them, nor is there anything relevant in Destiny keyboard controls. Any ideas how to do this ?  Also, will I be seeing my generated Orbs, esp. when playing single player ?  Thanks!  EDIT: I've seen the "duplicate question", but because none of answers there mentioned that Orbs can only be picked when super-ability meter is low (as mentioned in the only reply to this post), which is what was puzzling me in the first place.

Everytime you kill things with your super the killfeed says:   "[player] Generated # orbs of light"  They don't seem to be in my inventory anywhere or on the ground to pick up, what are they for?


I'm a complete Java noob. This code runs fine with no compiling errors, but when I stepped through the program I discovered that the if statements at the bottom never evaluated to true. What am I missing?  import java.util.Scanner;  public class rps {    public static void main(String args[]) {       Scanner scanner = new Scanner(System.in);        println("Select rock (0), paper (1), or scissors (2)");       String input = scanner.nextLine();        if (Integer.parseInt(input) < 0 || Integer.parseInt(input) > 2) {          input = Long.toString(Math.round(Math.random() * 2));       }        if (input == "0") {          println("You played rock");       } else if (input == "1") {          println("You played paper");       } else if (input == "2") {          println("You played scissors");       }    }     static void println(String a) {       System.out.println(a);    } }

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?


When I comment on an answer to the question, I need to add an image to show more clearly about my resolving.   How can I add an image to a comment?

I needed to reference an image in a , but it's not possible to upload a picture in a comment. So I used the workaround to  and delete the added image and text in the answer, ending up with a stack.imgur.com image link. I did this because the .  Why it's not possible to upload an image in a comment?


I want to remove all files in a directory while leaving just some specified files, that are listed in .csv file. Let's say I have some audio files in a home/wavs/ folder and a list of .wav files I want to keep in home/select_wavs.csv. How could I remove all .wav files except those that are listed in home/select_wavs.csv? home/select_wavs.csv contains a list of the .wav files as follows: LJ049-0052.wav LJ049-0082.wav LJ049-0104.wav LJ050-0084.wav LJ050-0245.wav ...  I have tried using ls wavs | grep -v select_wavs.csv to find a list of the .wav file I want to remove but that does not seem to work...

Assume in folder /photo have many files like   1.jpg 2.jpg 3.jpg 4.jpg 5.jpg 6.jpg 7.jpg 8.jpg 9.jpg 10.jpg   I have a file name nodeletelist.txt in this text file have name of not delete files list like  1.jpg 2.jpg 3.jpg nodeletelist.txt   How to delete files:  4.jpg ... 10.jpg   except files 1.jpg, 2.jpg, 3.jpg and nodeletelist.txt which in nodeletelist.txt?


Just wondering if there is an update to the problem of ubuntu touch not working on toro phones, and if not I am curious if it will ever be supported. I know the mobile phone market progresses at a rapid speed and people are focusing on the edge project.

With the announcement of the Ubuntu Phone OS I'd like to know what phone (and tablet) models are supported at this time.  Note from foss & Oli: We are making this the master question for all future "Will this work on <insert random tablet/phone/device here>?!" questions


Let's say you're a 40 speed, 15 climbing speed creature.  There's an initial ledge at 20 feet, but you're trying to reach the top at 25 feet.   From the Player's Handbook, page 182:     While climbing or swimming, each foot of movement costs 1 extra foot (2 extra feet in difficult terrain), unless a creature has a climbing or swimming speed. At the GM’s option, climbing a slippery vertical surface or one with few handholds requires a successful Strength (Athletics) check. Similarly, gaining any distance in rough water might require a successful Strength (Athletics) check.     However, on page 190:     If you have more than one speed, such as your   walking speed and a flying speed, you can switch back and forth   between your speeds during your move. Whenever you switch, subtract   the distance you've already moved from the new speed. The result   determines how much farther you can move. If the result is 0 or less,   you can’t use the new speed during the current move.      Combined with this information, there may be an odd scenario where a character has moved their maximum climbing speed.  Can they:   Move the 15 feet up the cliff, and cannot reach neither the ledge or the top? Move their normal speed at twice the cost, allowing them to climb up to 20 feet in this turn and reach the ledge? (40/2= 20 feet) Move the 15 feet of climbing speed up the cliff, and are able to spend the rest of their speed (40-15 = 25 left) at the extra foot cost, since they "no longer have a climbing speed", putting them at the very top of the cliff (25/2=10 [rounded down]), 15+10 =25 feet)?

What is the distance a creature or player can travel if they have multiple types of movement?  For example, the  has a 40 ft walking speed, a 40 ft climbing speed, and an 80 ft flying speed. Can it move a total of 160 ft in a round using each of those fully, or is there another way this is calculated?


We've been given a template to work with. I am adding figures with the following code:  \begin{figure}[H]     \begin{center}       \includegraphics[scale=0.7]{Figures/System/reinf-learning.jpg}       \caption{Components of a reinforcement learning agent}       \label{fig:reinf-learning}     \end{center} \end{figure}   However, there is always a new line between after the figure. I'm trying to find something that will allow me to remove this new line. How can this be done? Thanks.  I've tried adding \setlength{\belowcaptionskip}{-10pt} but to no avail.

What is the correct way to center figures and tables (figure, table)?  \begin{center} ... \end{center}   or   \begin{centering} ... \end{centering}


The PCs are demigods and have allies (also demigods) who travel with them constantly. They've become quite important to the PCs' lives though they're not "necessary," plot-wise.  Since the allied Extras are demigods and are also showing up every game session, should I turn them into Wild Cards or leave them as they are?

I've been reading the basic manual on Allies and Extras, and it seems it's intended for such characters to work as non-wild card characters.  I'm playing a Super Powers game with friends, and they will be meeting other "supers" in the way and befriending them, however I'm left wondering if such allies are meant to be crafted as WCs, since there are even edges dedicated to giving the PCs Wild Cards as allies instead of Extras, making me think I might be doing something game breaking.


Python's length of list can be calculated by len(a_list). My question is, why was a_list.len() not implemented? Is there a reason behind it?

I know that python has a len() function that is used to determine the size of a string, but I was wondering why it's not a method of the string object.  Update  Ok, I realized I was embarrassingly mistaken. __len__() is actually a method of a string object. It just seems weird to see object oriented code in Python using the len function on string objects. Furthermore, it's also weird to see __len__ as the name instead of just len.


I'm looking for a way to change the html content of my entire page (even the head) , after an ajax call.  So I can't use :  $("body").html(result)   I have this code :  $.ajax({ url: myURL, type: "POST", success: function (result) {    document.open();    document.write(result);    document.close(); }   But it's reloading the page. I don't want it because the transition is bad (my pages background color is black and there is a white flash during the refresh).  I need something like :  $("html").html(result)   But it doens't works. Is there a way to do it ?

I have an HTML page with a typical structure:  <html>   <head>    <script src="..." ></script>    <style>...</style>   </head>   <body>    content   </body>   <script>     var success_callback = function(data) {       // REPLACE PAGE CONTENT & STRUCTURE WITH "data"     }     ajax(url, params, success_callback);   </script> </html>   Do you think it is possible ?  I've already tried to give the html tag an id and doing $(id).replace(data); with no success.  Don't ask me why, but that is what I need (I'm working with a special "mashup builder" site... it is a long story).  EDIT : I forgot to say that scripts in the received content have to be executed, even external scripts included using <script src="...">.


I guess the title says it all. I've the restriction code long time ago, and when I wanted to do actuall in-app purchase it turned out I cannot recall the password. Worse, now after 10 tries I have to wait 60 minutes before each consecutive tries.  The threads on forums are somehow misleading. Some of them claim the only way is to do fresh install and recover all the stuph manually. Some other people post some not entirely clear solutions involving restore from backup. Closest I got was the iPhoneBackupExtractor tool, which is suppose to read the plain text key code from the iPad backup. It worked to the point of getting hands on com.apple.springboard.plist. Unfortunately the password is not in this file.  Please keep in mind, this is about the "restriction code", not the main lock code. iPad if fully functional and the one feature blocked is in-app purchase.

I added restrictions to my iPad and I forgot the passcode for them, now what? Is there a way to remove it without resetting the device?


This is problem 2 in UChicago's 2019 Math GRE prep worksheet: (link )  Suppose $\alpha, \beta > 0$. Compute $$\int_0^\infty\dfrac{\cos(\alpha x) - \cos(\beta x)}{x}dx.$$  In the answer sheet (pg. 10) it states "rewrite integrand as integral of $\sin(xy)$, exchange order of integration." What does this mean exactly? What is $y$?  When I attempted this problem, I thought it made sense expanding the integrand out in Taylor series. Since $$\cos(\alpha x) - \cos(\beta x) = - (\alpha x)^2/2! + \cdots + (\beta x)^2/2! -\cdots$$ and $$\dfrac{\cos(\alpha x) - \cos(\beta x)}{x} = -\alpha^2x/2! + \cdots +\beta^2x/2!-\cdots.$$ But integrating this produces a messy series, so I don't think it's a viable solution for a GRE problem.

I am practicing calculus section of GRE Math Subject test, and I can't figure out a way to do the following integral: $$\int_0^\infty \frac{\cos (ax) - \cos (bx)}{x}dx.$$  I absolutely have no clue how to do this. Can someone show me the solution explicitly? Thank you.


Let $f: \mathbb{R} \to \mathbb{R}$ be continuous and 1-to-1. Show that for each borel $E$, $f(E)$ is borel.   Since $f$ is continuous it is measurable. So if $M $ is borel, $f^{-1}(M)$ is borel too. However, we are not working with pre-images here. It is clear that $f (f^{-1} M) = M$ due to $f$ being 1-to-1 but I'm sure we can not characterize all borel sets of the domain by $f^{-1}(M)$.  I'm stuck here. Any help will be appreiated

Suppose $f: \mathbb{R} \to \mathbb{R}$ is a continuous function which is 1-1, then does $f$ map Borel sets onto Borel sets?


Questions about hardware like:   If I put Visual Studio on an SSD, does it improve the speed of the software?  Which brand of SSD is better, Samsung or Kingston?

Recently I wondered about a webcam on my laptop; about the driver problem with it and about all stuff related to devices and hardware. I see, that the Stack Exchange network has Q&A about: programming and servers mostly, but what about hardware specifically? Is there or will there be a Stack Website just for hardware? About: HDD, RAM, CPU, motherboards, graphic cards, etc.?  I hope I don't repeat an already asked question, but since there is no distinct answer for it I asked it as I see it.


this is my activity from where I am sending Status  case R.id.buttonMade:                 {                     Bundle bundle = new Bundle();                     Status ="0";                     bundle.putString("Status", Status);                     FragmentAll fragInfo = new FragmentAll();                     fragInfo.setArguments(bundle);                     Log.e(bundle.toString(),bundle.toString());                     startActivity(new Intent(FrontPageActivity.this, OrdersActivity.class));                     break;                 }      This is my Fragment JAVA class   public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)     {         View rootView = inflater.inflate(R.layout.fragment_order_all, container, false);         sh_pref=getContext().getSharedPreferences("start", getContext().MODE_PRIVATE);         uName = sh_pref.getString("username", null);          final Bundle bundle = getArguments();         Status1=bundle.getString("Status");         if(Status1==null)             Toast.makeText(getActivity(),"Null",Toast.LENGTH_LONG).show();      >error is   Java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.os.Bundle.getString(java.lang.String)' on a null object reference   I am able to pass data from activity but unable to get in fragment what the issue  Thank you

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?


Bayes's Theorem states that  $p(H|D) = \frac{p(D|H)}{p(D)}p(H)$  where H is the hypothesis and D is the new data. It can also be written as  $posterior = \frac{likelihood}{evidence} * prior $  p(D) is sometimes called the "marginal likelihood", because it is the likelihood of the data regardless of whether the hypothesis (or anything else) is true or not, and is sometimes referred to as the "normalising constant".  But why is it sometimes called "the evidence"?

In Bayes theorem of a parameter $\theta$ with data $D$, we have:  $$P(\theta|D) = \frac{P(D|\theta)P(\theta)}{P(D)}$$  where I know $P(D)$ as the marginal likelihood. Is it true that the marginal likelihood is referred to as evidence in Bayesian statistics? If not what is commonly refered to as evidence?


my first project in c++   (I use g++ on centos)     from Python and c#, I use to split my program into few files, each class in different file. The most common reason i find, why use .h file, is because you can change the header code in the  .cpp file, without affecting other people that uses that specific header. this feature is meaningless when using version control, where no one see the changes until you submit your code to the main project library. (#ifndef can still be used to prevent multiple main() and such errors) Besides that, I cant find reason why I should use .h files to write classes in different files. I can just use     #include "class1.cpp"  #include "class2.cpp"   I will get the same result as using .h file, without the need to maintain classes in two different files (.h + .cpp) (and without the complexity when using default values) As far as I understand, in both cases, the compiler will include the source code, as if it is one big source file. So.. why should I use .h (and .cpp) files and not just split my program into .cpp file instead ?

Why does C++ have header files and .cpp files?


I have a bacnet application which broadcast a message to all devices connected. When i use the address 10.9.x.255, it works and the device is able to get the response but when i use the global broadcast 255.255.255.255, the packet is not reaching the device it has to reach.  What may be the reason for this? I can use the address 10.9.x.255 but i would like to know the reason behind it.  On a different computer it works with global broadcast address but does not work on a specific computer. both computers running on windows 10.  Thanks in Advance

We're trying to debug some applications performing broadcast.  What is the difference between the broadcast address 255.255.255.255 and as e.g. reported by ifconfig,  Bcast:192.168.1.255


I would like to turn off mouse acceleration to begin training my hand for better accuracy and precision in my mouse movements. How can I do this in Ubuntu 10.10?

I did a few quick google searches, and it looks like the most recent  about this was back in 2012.   How might I go about disabling mouse acceleration in Ubuntu 15.10? I tried installing gpointing-device-settings but there were many errors.  I'm looking for a persistent setting.


I can not see any problem here. I guess that some problem with encoding or end of line could be the reason.  See the image.     The code.  \documentclass[11pt,a4paper]{report} \usepackage[latin1]{inputenc} \usepackage{amsmath} \begin{document}  \[J_{i} = \begin{bmatrix}% x_{i}   & 1         & 0         & \cdots    & 0         & | & 0         & 0         & 0         & \cdots & 0        &  & \cdots      \\% %0      & x_{i}     & 1         & \cdots    & 0         & | & 0         & 0         & 0         & \cdots & 0        &  & \cdots      \\ %\vdots & \vdots    & \vdots    & \ddots    & \vdots    & | & \vdots    & \vdots    & \vdots    & \ddots & \vdots   &  & \cdots      \\ %0      & 0         & 0         & \cdots    & 1         & | & 0         & 0         & 0         & \cdots & 0        &  & \cdots      \\ %0      & 0         & 0         & \cdots    & x_{i}     & | & 0         & 0         & 0         & \cdots & 0        &  & \cdots      \\ %-      & -         & -         & - - -     & -         & - & -         & -         & -         & - - -  & -        &  &             \\ %0      & 0         & 0         & \cdots    & 0         & | & x_{i}     & 1         & 0         & \cdots & 0        &  & \cdots      \\ %0      & 0         & 0         & \cdots    & 0         & | & 0         & x_{i}     & 1         & \cdots & 0        &  & \cdots      \\ %\vdots     & \vdots    & \vdots    & \ddots    & \vdots    & | & \vdots    & \vdots    & \vdots    & \ddots & \vdots   &  & \cdots      \\ %0      & 0         & 0         & \cdots    & 0         & | & 0         & 0         & 0         & \cdots & 1        &  & \cdots      \\ %0      & 0         & 0         & \cdots    & 0         & | & 0         & 0         & 0         & \cdots & x_{i}    &  & \cdots      \\ %-      & -         & -         & - - -     & -         & - & -         & -         & -         & - - -  & -        &  &             \\ %\vdots     & \vdots    & \vdots    & \vdots    & \vdots    &   & \vdots    & \vdots    & \vdots    & \vdots & \vdots   &  & \ddots \end{bmatrix} \] \end{document}

I'm using bmatrix environment from the amsmath package, and I'm trying to do something like this:  \documentclass{article} \usepackage{amsmath}   \begin{document}      \begin{equation}          \begin{bmatrix}              1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11\\          \end{bmatrix}     \end{equation}  \end{document}   However, pdfLaTeX returns an error: "Extra alignment tab has been changed to \cr", and in the output the extra element is moved to the next row. (If I remove one element, then it works perfectly fine). I guess this means that I've hit some hard limit on the number of tab stops in a matrix. Is there a way to change this?  The elements in the matrix are short and could fit perfectly on a single row.


I'm trying to remove the whitespace from the beginning and the end of the input string, replace more than 1 space with just one space and remove all special characters. The snippet (attached herewith) works but I just wanted to ask if there is a way I can make this look slightly less uh... ugly? There must be a better way of writing this, right?     const filterInput = (vals) => {   console.log(vals.replace(/^(\s*)|(\s*)$/g, '').replace(/\s+/g, ' ').replace(/[^\w ]/g, "")); };  filterInput(" squid*^%ward     sponge((bob        ")

How do I trim a string in JavaScript? That is, how do I remove all whitespace from the beginning and the end of the string in JavaScript?


We take full backups of the DB every day (in full recovery mode) and keep them for 10 days. Because of our requirements, we don't want to take incremental or differential backups of the DBs.   Now we are observing that the ldf file size is growing too large. The question, is there any way to handle this scenario?   We don't want the ldf file to increase in size but at the same time we don't want to lose full backups.

This one seems to be a common question in most forums and all over the web, it is asked here in many formats that typically sound like this:  In SQL Server -  What are some reasons the transaction log grows so large? Why is my log file so big? What are some ways to prevent this problem from occurring? What do I do when I get myself on track with the underlying cause and want to put my transaction log file to a healthy size?


So, these files aren't empty...  [ root@localhost ] # ls -l total 248 -rw-r--r--. 1 root root 65536 Jan 12  2010 cert8.db -rw-r--r--. 1 root root 65536 Dec 23  2013 cert8.db.orig -rw-r--r--. 1 root root  9216 Jan 12  2010 cert9.db -rw-r--r--. 1 root root  9216 Dec 23  2013 cert9.db.orig -rw-r--r--. 1 root root 16384 Jan 12  2010 key3.db -rw-r--r--. 1 root root 16384 Dec 23  2013 key3.db.orig -rw-r--r--. 1 root root 11264 Jan 12  2010 key4.db -rw-r--r--. 1 root root 11264 Dec 23  2013 key4.db.orig -rw-r--r--. 1 root root   451 Jul  8 10:10 pkcs11.txt -rw-r--r--. 1 root root   451 Dec 23  2013 pkcs11.txt.orig -rw-r--r--. 1 root root 16384 Jan 12  2010 secmod.db -rw-r--r--. 1 root root 16384 Dec 23  2013 secmod.db.orig   However,  doesn't tell me anything:  [ root@localhost ] # certutil -L -d /etc/pki/nssdb  Certificate Nickname                                         Trust Attributes                                                              SSL,S/MIME,JAR/XPI   [ root@localhost ] # certutil -K -d /etc/pki/nssdb certutil: Checking token "NSS Certificate DB" in slot "NSS User Private Key and Certificate Services" certutil: no keys found   I'm working on setting up  to run under SSL. Should I try to use the /etc/pki/nssdb database, or create my own? I can't really answer that without knowing what's already there...  (And, if you say "roll your own," I still want to know what's in there, and why I see file sizes of 2^14 and 2^16 exactly.)

On Fedora, I'm talking about the list displayed when you go to settings > manage certificates > authorities tab.  I've read that it should be in the NSS shared DB, but this command returns an empty list:  [laurent@localhost nssdb]$ certutil -d sql:$HOME/.pki/nssdb -L


First need to tell you that I am using this code:      .text.ellipsis {   position: relative;   font-size: 14px;   color: black;   font-family: sans-serif;   width: 250px; /* Could be anything you like. */ }  .text-concat {   position: relative;   display: inline-block;   word-wrap: break-word;   overflow: hidden;   max-height: 3.6em; /* (Number of lines you want visible) * (line-height) */   line-height: 1.2em;   text-align:justify; }  .text.ellipsis::after {   content: "...";   position: absolute;   right: -12px;    bottom: 5px; }   because I need to have multy-line ellipse for titles. And this part of code works.  but now I need to center vertically div inside div, and this part of code works partially.... I really tried everything but still cant fix the problem.  you can see here the live example:   Inside the blue div everything is fine, but below inside white div title for some reason sank, or in other words is not centered.  So I hope you can help me to center vertically div inside div, and it needs to work in IE8+  Thank you

How can I horizontally center a
 within another
 using CSS?

Foo foo


What does this symbol mean in logic?    P.S.: up tick would mean contradiction (always-false logic constant), but this is not up-tick (falsum).  Is this synonym for implication (material condition -> ) ?

In a "math structures" class at the community college I'm attending (uses the book Discrete Math by Epp, and is basically a discrete math "light" edition), we've been covering some basic logic.  I've been reading some of the logic questions on here to get used to notation, etc.  However, when I came across the question , I didn't understand what the $\vdash$ symbol means.  It's not in Discrete Math by Epp, nor is it in my mom's old logic book from when she went to college.  Wikipedia's  page says it means "can be derived from" when used in a logic context.  However, that doesn't make any sense in the above question, as there is nothing on the left of the $\vdash$.  So, what does $\vdash$ mean, especially in the context of the question linked above?


OS: ubuntu 14.04 LTS $ uname -a Linux egorov 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux  My goal: To install libass-dev package via apt-get or Software Center Problem description: When I try $ sudo apt-get install libass-dev  I'm getting Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  libass-dev : Depends: libfreetype6-dev but it is not going to be installed               Depends: libfontconfig1-dev but it is not going to be installed E: Unable to correct problems, you have held broken packages.  When I try "Ubuntu Software Center" -> "libass-dev" -> "install" following error appears:  This is not the only package with such problems. MB smth wrong with my app repo. I tried: sudo apt-get autoclean sudo dpkg --configure -a sudo apt-get install -f sudo apt-get -u dist-upgrade  and some similar advices but none of them helped.

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


In all the time The Golden Trio spent fighting Lord Voldemort, why did nobody ever go to the Room of Requirement (once they had discovered it), and say "I need a way to defeat Lord Voldemort permanently"?  Am I the only one to find it suspiciously convenient that Hermione, who was the much-vaunted "Brightest Witch Of Her Age", never once suggested they make use of the Room Of Requirement to learn everything they possibly could about either defeating Lord Voldemort for good, or at the very least learning everything there was to know about Horcruxes and how to destroy them?  If you read the series, you find out that the specific books pertaining to Horcruxes which initially resided within the school library's Restricted Section were removed by Dumbledore around the time Tom Riddle started asking pointed questions about the Horcrux process. Those books remained in Dumbledore's office until Hermione summoned them in Book 6 after his death (which raises another question about warding which I won't get into here).  If the Room had so much potential, and was capable of providing a fully-functional DADA training facility, why not a library to research either a way to defeat the Dark Lord, a way to destroy Horcruxes, or both?  For that matter, if Tom Riddle knew about the Room of Requirement, why not side-step Dumbledore's attempts at blocking him by asking the Room for everything he needed to know about Horcruxes?  And after the all the Time Turners were destroyed during the Big Fight in the Ministry of Magic, why didn't anybody go to the Room of Requirement later on and ask for a room full of them?  It seems to me that this Magic Room probably has infinite (or very nearly) potential powered by the very magic of the Castle itself, and is at least semi-sentient in order to understand, and process requests then produce the expected results, and yet, was probably the most under-used asset available to Harry.  Let's be honest here! If you were in Harry's place, and you knew (as he did before he left the school at the end of Book 6) what you needed to do, wouldn't you go to the Room of Requirement and ask for a room full of Time Turners and books with everything there is to know about finding and destroying Horcruxes?  Bottom Line (or TLDR): Is there a clear reason given for why the Room of Requirement (which doesn't appear to have any limitations) was so under-used?

Can the Room of Requirement provide anything if needed? For example:   James Potter wanted to hide from Voldemort, it would have served as a perfect hiding place. Harry Potter wanted all the Hocruxes, he should have gone straight to the room of requirement where he would have found all the Hocruxes along with the Sword. All the muggle borns of the wizarding community could have taken refuge in the room of requirement. Can someone meet a dead person in the room of Requirement if needed? Would it have been possible for Harry to go in past in order to see Dumbledore for the explanation of many things? Can the room duplicate something? For instance, Harry needed the Elder wand; with Voldemort having it, could he still get it? Someone wishes to be knowledgeable than Dumbledore, would the seeker find his desired wish by finding books and things?   Who created the room of requirement (surely not Salazar)? Was it beyond Dumbledore's magic to create such a place?


I have a database table in which each row has a first_name and last_name column, like so:   id   first_name   last_name |----|------------|-----------| | 1  | ted        | jones     | | 2  | mike       | johnson   | | 3  | ted        | jones     | | 4  | jan        | smith     | | 5  | anna       | white     | | 6  | jan        | smith     | |-----------------------------|   I want to find all records that are duplicates, i.e., the first and last names are identical. Given the data above, I want a result set like:   id   first_name   last_name |----|------------|-----------| | 1  | ted        | jones     | | 3  | ted        | jones     | | 4  | jan        | smith     | | 6  | jan        | smith     | |----|------------|-----------|   (More specifically, I'd like to get a count of such duplicate records, e.g., 2 [or 4, either would suffice] in this case.)  Is there a way to do this via SQL?

The following query will display all Dewey Decimal numbers that have been duplicated in the "book" table:  SELECT dewey_number,   COUNT(dewey_number) AS NumOccurrences FROM book GROUP BY dewey_number HAVING ( COUNT(dewey_number) > 1 )   However, what I'd like to do is have my query display the name of the authors associated with the duplicated entry (the "book" table and "author" table are connected by "author_id").  In other words, the query above would yield the following:  dewey_number | NumOccurrences ------------------------------ 5000         | 2 9090         | 3   What I'd like the results to display is something similar to the following:  author_last_name | dewey_number | NumOccurrences ------------------------------------------------- Smith            | 5000         | 2 Jones            | 5000         | 2 Jackson          | 9090         | 3 Johnson          | 9090         | 3 Jeffers          | 9090         | 3   Any help you can provide is greatly appreciated.  And, in case it comes into play, I'm using a Postgresql DB.  UPDATE: Please note that "author_last_name" is not in the "book" table.


I installed Ubuntu 18.04 (NOT THE INSTALLATION MEDIA) on a USB flash drive and it boots fine on the laptop that I made it on, but it won’t boot on any other computers.   I’m guessing maybe GRUB was installed on the laptop and not to the drive but I’m not sure.   I have semi-important stuff on it so trying to see first if there is any alternative to just erasing and retrying. I did the steps according to a tutorial and it boots fine on the computer it was made on.   If this is important or not, there is an option on my boot options that appeared after I downloaded Ubuntu on the flash drive that is still there whether the USB is plugged in or not. It's called ubuntu. It won't boot if the flash drive isn't plugged in but it's there.

This is the third time I've tried to install Ubuntu Server 14.04.03 64-bit on the same laptop, and each time it caused different problems.  Each time I wrote the same iso image to a USB flash drive by using a different application and OS.   Universal USB Installer (pendrivelinux.com) from Windows WinImage writer from Windows built-in image writer from Linux Mint 17.2    The iso image is the same in all three cases, the USB flash drive is the same, and the laptop is the same. However each time the installation of Ubuntu gave me different installation options. For example, the last time I installed Ubuntu, it didn't show all the packages to choose while installing (Basic Ubuntu server, etc.).


As I understand 0.0.0.0 means all network interfaces of this host (including 127.0.0.1).  Suppose I have three interfaces 192.0.2.40, 203.0.113.150 and 127.0.0.1 on some host (OS linux).  On 192.0.2.40:777, I have ServerA. On 203.0.113.150:777, I have ServerB. How does the OS resolve a request to connect to 0.0.0.0? I mean when the same port (777) is listening on different interfaces what server(ServerA or serverB) and why will be connected when I will do in terminal  of this host telnet 0.0.0.0 777

I understand that 127.0.0.1 points to localhost, and so does 0.0.0.0 (correct me if I'm wrong). So, what's the difference between 127.0.0.1 and 0.0.0.0?


I see here:  that that which is stated in the title is true. However, I tried deriving it myself.  $U = \mathbf{x}^T\mathbf{A}$  $\frac{\partial(\mathbf{x}^T\mathbf{Ax})}{\partial \mathbf{x}} = \frac{\partial U}{\partial\mathbf{x}} \mathbf{x} + U\frac{\partial\mathbf{x}}{\partial\mathbf{x}}$  $\frac{\partial(\mathbf{x}^T\mathbf{Ax})}{\partial \mathbf{x}} = \frac{\partial \mathbf{x}^T\mathbf{A}}{\partial\mathbf{x}} \mathbf{x} + \mathbf{x}^T\mathbf{A}$  $\frac{\partial(\mathbf{x}^T\mathbf{Ax})}{\partial \mathbf{x}} = \mathbf{A}^T\mathbf{x} + \mathbf{x}^T\mathbf{A} = 2\mathbf{x}^T\mathbf{A} \neq x^TA^T+x^TA$  Am I applying product rule correctly?

It's stated that the gradient of:  $$\frac{1}{2}x^TAx - b^Tx +c$$  is   $$\frac{1}{2}A^Tx + \frac{1}{2}Ax - b$$  How do you grind out this equation? Or specifically, how do you get from $x^TAx$ to $A^Tx + Ax$?


QUESTION : Let E be a non-empty subset of R. Let E' be its derived set i.e. the set of all limit points of E. Prove that E' is a closed set.  THANK YOU.

Let $X$ be a Hausdorff space and $A\subset X$.  Define $A'=\{x\in X\mid x\text{ is a limit point of }A\}$.  Prove that $A'$ is closed in $X$.  Relevant information:  (1.) Every neighborhood of a point $x\in A'$ contains a point $y\in A'$ distinct from $x$ (in fact, in a Hausdorff space, every neighborhood of $x$ contains $\infty$-many points of $A$ distinct from $x$)  (2.) In a Hausdorff space, every sequence has a unique limit.  On first glance, it should be an easy proof, but I've made little progress.  I was planning on showing $\overline{A'}=A'$.  Firstly, $A'\subset \overline{A'}$ trivially.  To show $\overline{A'}\subset A'$, proceed by contradiction.  Assume there exists $x\in\overline{A'}$ such that $x\not\in A'$.  This should yield an easy contradiction but I don't see it.  In particular, I'm unsure if the fact that $x\in\overline{A'}$ implies that there actually exists a sequence in $A'$ converging to $x$.  By (2) we know all sequences have unique limits, but do we know that elements in the closure are limits of sequences?  If this is true, it should yield an easy contradiction.  Any help?


a) Give an example of a function from $\Bbb{Z}^+$ to $\Bbb{Z}^+$ that is neither one-to-one nor onto.  b) Let $g:A\to B$ and $f : B \to C$ be functions. Let $f\circ g$ be onto. Are both $f$ and $g$ necessarily onto?  I was thinking for   a)  $f(n) = 1$  I clearly see that this is not one to one, since there is no unique codomain for each input. but im not sure about onto..  Wouldn't all values point to 1 which would make it onto? since the codomain is 1? or would it? im confused if there is no x value in the function.

What would the steps be for someone new trying to learn how to solve this? I feel like I understand the concepts and what they mean but not how to prove it. Thanks


I have file like below.,   23,1:30 - 2:00,10,,,,   23,1:30 - 2:00,600,,,,     23,1:30 - 2:00,600,,,, 23,1:2 - 23:00,321,,,,   Now i need to remove the blank spaces in whole file and replace it with empty.  I have already tried with This regex  for search \ s+ and replace with \n it doesn't work  So i have need search and replacement value for find blank spaces and replace it with empty like below output.  23,1:30 - 2:00,10,,,, 23,1:30 - 2:00,600,,,, 23,1:30 - 2:00,600,,,, 23,1:2 - 23:00,321,,,,   And finally need search and replacement value for ReplaceText processor which perform my requirements.

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I have seen a   tag and its description and the description says     This tag is ambiguous. Consider using other tags instead. Read the tag wiki for more information.     So I think that is because table can be anything,like HTML table, CSS table or database table etc. So it makes ambiguity and only table word doesn't make any specific sense. I would like to say if we are suggesting to don't use this tag, then why should we include that.  And is there any way to restrict for creating such ambiguous tags.

Related questions:     (This led to founding of )   The tag  has become cluttered with all kinds of questions ranging from sql tables (for all DBM systems, HTML tag <table>, outputting content in any language (PHP, C#, LaTeX to name a few) as a table and several plugins of various languages and/or IDEs (like jTable, tablesorters and the kind).  The current count stands at 18,315 questions having this ambiguous tag. A few of possible suggestions for cleaning process:    +  to  |   +  to  |   +  to  |   +  to  |   + other-specific-DBM systems to whatever_DBM_it_is-table  +  to  |    Since I've no idea about other languages and their specific features regarding table, I'd ask the community for their input on this (such as , ,  and ). The other questions are either tagged with arrays or sql and similar tags, and in my opinion, just removing  from such questions would be enough!


Suppose we have a conducting plate and a positive charge adjacent to it (say to the left of it). From what I understand, we can introduce a 'virtual' negative 'mirror' charge on the right and work out the electric field.   I don't understand how this works. Why are we introducing this virtual charge? Surely my calculation now is the electric field due to both charges, which is not what I want. Why could I just not use the positive charge alone?

The  is a well-known and very useful tool for solving problems in electrostatics.  Unfortunately, when I was taught this method, it was presented simply as an algorithm. No real physical justification was given for its usage, and there was a complete absence of rigorous mathematics. The method has always been a little hazy to me since.  If someone could give a rigorous first-principles derivation of this method from Maxwell's equations (perhaps simply Coulomb's law?), it would be most appreciated.


You saw a T-shirt of sh  97, since you don't have cash you borrow sh50 from your dad and sh50 from your Mom. Now you have sh100. You purchase a T-shirt for sh97 and left with sh3.00 change. You return sh1 to your dad and sh1 to your mom and keep the sh1 for yourself. Now you owe your mom Sh49 and your dad sh49. Added together(sh49+sh49=sh98) plus your Sh1=sh99. Where is the missing sh1???

This sounds silly but I saw this and I couldn't figure it out so I thought you could help. The below is what I saw.  You see a top you want to buy for $\$97$, but you don't have any money so you borrow $\$50$ from your mom and $\$50$ from your dad.  You buy the top and have $\$3$ change, you give your mom $\$1$,your dad $\$1$, and keep $\$1$ for yourself.  You now owe your mom $\$49$ and your dad $\$49$.  $\$49 + \$49 = \$98$ and you kept $\$1$.   Where is the missing $\$1$?


Sorry in advance for the wall of text  So basically what I want to do is recreate the Stroke Type Depth from Premiere in illustrator. I realise that I could convert text to a path in illustrator and just manually connect the points but that would take too long and still isn't quite as good as premiere's effect.   This is what premiere outputs with an edge outer stroke above a depth outer stroke, note that the depth stroke also expands to fit the previous edge stroke.      After a while of messing around with illustrator and some googling, this is the closest I could make. I made the depth by using Effects > Transform & Distort > Transform of (-0.1px, 0.1px) with 150 copies to make a 15 px depth effect at 45 degrees down and left and with Effects > Stylize > Round Corners   This is close but it takes a decent bit more steps to do and doesn't accommodate (and align the copies) for the stroke. Also not nearly the biggest issue but with the copies, its not scalable. Also round corners seem to sometimes not work as expected and have artifacts such as random corners not being rounded. But that was probably just a one time thing.     When I first found the depth stroke in premiere I really liked it and I wanted to make something with it in illustrator and was really surprised and confused to not find it. I would expect that if anything illustrator would have more options for transforming paths and text that premiere would have but that doesn't seem to be the case.  So am I missing something or is this not possible in illustrator, at least to the same degree of ease and quality?  Thanks for taking the time reading this and responding, I'm sure it will help other people too!

I'm bit of a newbie in Adobe Illustrator and have been learning the application by trying to follow some tutorials and recreating some cool stuff I come across on the web.   That being said, I'm having trouble replicating the effect found in the following image using the standard 'Extrude & Bevel' options. I've also tried copying + pasting the text in front, back, in place and that came out even more horrendous. 'Extrude & Bevel' gives me a nice approximation but nothing that pops out like in the example.   Any tips on how to fine tune my 'Extrude & Bevel' settings or an entirely different method of achieving a similar effect would be very much appreciated. Thanks for your time and help!  How can I create a 3D effect on my text similar to the one in the following image, using Illustrator's Extrude and Bevel tools?


I have trouble proving the above statement.  Here is my approach.  First, I prove that if $n$ and $k$ are not relatively prime, it implies that $[k]_n$ is not invertible.   If $n$ and $k$ are not relatively prime, there exist $g \neq 1$ such that $nx+ky=g$ for some integers $x$ and $y$. (Bézout's identity)  Multiply the equation by, $n/g$  $(n^2x)/g+(nky)/g=n$  We can simplify this by taking the $(mod \hspace{0.1cm} n)$  $(nky)/g=0(mod \hspace{0.1cm} n)$  I don't understand how to proceed from here!. I sense that it has something to do with $k=0$ is the only solution here.  The converse proof is fairly straightforward (I assume.)  Here is my approach to prove the converse, if $k$ and $n$ are relatively prime then $[k]_n$ is invertible.  Again by the Bézout's identity (if $k$ and $n$ are relatively prime), there exist integers $x$ and $y$ which satisfy $nx+ky=1$. We can simplify this to $k\times(y+nx/k)=1$. It is clear that $(y+nx/k)$ is the inverse of $k$.

I think the following is true:  If $q$ is coprime to $a$ then $a\mid (nq-1)$ for some $n\in\mathbb Z$.  I have started to first reducing $n\in\mathbb Z$ to $n\in\{1,\ldots,a-1\}$ and then considering all the cases $q = ka + j$ for $j=1,2,3,\ldots,a-1$. I stopped at $j=3$ and found that this is kinda messy. Does anyone have an elegant proof for this (maybe using some results from number theory)?  [Note: question has been generalized from prime $q\nmid a$ to $\,q$ coprime to $a$]


As I understand the Bootstrap Method: you have a set of data which is of size $N_{all}$, and then from this set you select sub-samples of size $N_{sub}$.  Is there a rule of thumb for the size of the subset you should choose? For now I simply take the  $N_{all} = N_{sub}$ as for the sub samples repeated values from the original main set may be selected.  Is there a smarter way to choose $N_{sub}$?

Say we have the following sample and we are trying to estimate the variance of the sample mean of the population.  X = [0, -1, 2, 10, -3]   If I take an increasing number of bootstrap (e.g. 100, 1000, 10,000, 100,0000), the bootstrap distribution of the sample mean gets narrower and narrower. In other words, I can make the bootstrap distribution arbitrarily narrow.   Given the above, what's the point of using a different number of bootstrap samples here? And wouldn't this mean that I could make the standard error of the mean arbitrarily small by just taking more and more bootstrap samples? What am I missing?  Please note that I am doing a proper bootstrap sample in the sense that each bootstrap sample has the same exact size as the original sample (input array).


So, whenever I render a image, only the sky shows up.    but, it is supposed to show like this:

I have a model of a building with a sidewalk around it.  Both show up when I switch to rendering mode in both Blender Render and Cycles Render mode.  But:  when I hit F12 for a final proper render, the building shows up -- but the sidewalk doesn't.    I've checked the normals and I thought the normals seemed pointed in the right direction.  I've set the Clipping on the Camera to a high number.  I removed all the materials from the sidewalk and added a new material-- the problem persists.  I've exported the blend as an FBX file and the Sidewalk shows up fine in Unity.  Just in final renders, it doesn't show up.    Here is a blend file: .  I tried to destroy everything unrelated to the issue and label things in a clear way.    Thanks.


Trying to use TikZ to draw a diagram, I used the example below, but I see that I could not start the beginning point from a bit left of the page. I checked  question but it's too long and I don't see a solution for my problem there  \documentclass[11pt,a4paper,twoside,openright]{report}  \usepackage{tikz} \usetikzlibrary{calc,intersections,through,backgrounds}  \begin{document}  \begin{tikzpicture} \coordinate (A) at (-15,0); \coordinate (B) at (-14,1); \draw[black] (A) -- (B); \end{tikzpicture}  \end{document}

Is there a way to remove the indentation at the beginning of a paragraph for a single paragraph.  I know I could do  \setlength{\parindent}{0cm} This is my paragraph.  Blah blah blah. \setlength{\parindent}{default}   Where default is whatever the default indentation is for the document class I am using (part of the problem is that I don't know what this default value is).  I feel as if there should be a better way to accomplish this than by the above method.  I am looking for a solution of the form:  \noindent This is my paragraph.  Blah blah blah.   Is there a way to do this, or will I have to resort to the former method?  If I have to resort to the former method, what is the default indentation value for the amsart document class?


I have the same problem with this topic!   The thing is i did everything that says in answer but  i)I found nothing when i started regedit.exe and searched (F3 or CTRL+F) for BackgroundContainer.dll  ii)I made a full scan with AntiVirus Scanner like Microsoft Security Essentials/ Defender and also i scaned my PC with Malwarebytes' Anti-Malware,but i found nothing.  So this pop up message on start up keep appeared!  any idea?  I know you will say that its a duplicate of this topic but when i did that question the deleted it and said if you have a question post it!Sorry about that.  Thank you!

When I start my desktop it gives me an error about BackgroundContainer.dll.    How to get rid of it?  I found nothing when i started regedit.exe and searched (F3 or CTRL+F) for BackgroundContainer.dll


In R, the logistic regression output gives you predicted probabilities. Is there away of determining the threshold value $\alpha$, such that any $p > \alpha$ is classified as a $1$ and and $p \leq \alpha$ is classified as a $0$? Can the  caret  package do this?

Let's say that I have an object of class glm (corresponding to a logistic regression model) and I'd like to turn the predicted probabilities given by predict.glm using the argument type="response" into binary responses, i.e. $Y=1$ or $Y=0$. What's the quickest & most canonical way to do this in R?   While, again, I'm aware of predict.glm, I don't know where exactly the cutoff value $P(Y_i=1|\hat X_{i})$ lives -- and I guess this is my main stumbling block here.


I have downloaded  and moved it to folder /opt and yet I can't find it in dash or place it in launcher. I have searched for solutions on the net, but I don't quite understand those.

Will Unity allow making custom launcher icons from .desktop files or via menu editing system? (Right now the launcher doesn't give the option to "keep in launcher" on all programs.  For some programs I use, I have to make custom launchers or .desktop files.  For instance, daily blender builds are generally just folders with an executable.  In basic Gnome or KDE, I can make a new menu entry with the menu editing system. Then, I can also add it to Docky either from the menu or by dragging a .desktop file to it. Unity launcher doesn't support drag and drop, so thats not a bug or anything, but when I open a .desktop file, it has unpredictable results. Most time it will not have "keep in launcher". Sometime it will have a pinnable item without the .desktop's icon, and if I pin the item to the launcher, it will not call upon the program again after closing it. I've also gotten it to just work with a .desktop file for celtx.


$\sum_0^n\binom{k-1+i}{k-1} = \binom{n+k}{k}$  I think there are two different ways to prove the above identity: one is algebraic and the other one is combinatoric.  I have seen there's some ways to handle this problem with some sort of lattice like structure.  Any advice for approaching this problem in "combinatoric" way?

Let $n$ be a nonnegative integer, and $k$ a positive integer. Could someone explain to me why the identity $$ \sum_{i=0}^n\binom{i+k-1}{k-1}=\binom{n+k}{k} $$ holds?


If I have PS3 and I have gta online on it and I use same PSN ID on PS4 will I still have same gta online account?  Thank you for answer

I recently just bought a PS4 that I couldn't pass up (Price Wise) and decided to try and transfer my GTA V Online Character.  Stats: All stat bars full $204,000,000 Rank: 149  I've been playing the game since it came out, which was around 2013 I believe. I quit playing the game about 8 months ago because my hard drive in my PS3 died on me so I decided to put the console on the shelf for a while. Like stated above, I just bought me a new PS4 and was looking to try and transfer my character over. I tried calling Rockstar Support about my situation and all they told me was that they don't allow transfers anymore.   So here's my question... Is there absolutely any way that I can transfer my character to my next gen console?


I noticed that any time I'm watching Netflix (iOS, Windows8, OSX), and I plug in headphones, the video feed stops and buffers all the way from 0%. Why?

I've noticed while using Netflix, Xbox Video, and Amazon, when I plug in my headphones the video will buffer as if the audio output change affects the streaming services.   Can anyone explain why this happens?


Got a html page with a frequently changing part. That part is read by a script on the page: <script>   console.log('In HTML');   fetch('changes/changes.html')     .then(data => data.text())     .then(html => document.getElementById('changes').innerHTML = html); </script>  That works fine and makes publishing changes easy. However jQuery actions (in a separate script) on the read part don't work. The events are not triggered. How to fix that? $(function () {   console.log('In script');     $('.change-card > .change-btn-action').on('click', function () {      console.log('Click event');    }); )};  The click event is never triggered. The log order is: In HTML, In script. Thanks for any help! Gerard

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I have looked and cannot find how to show the last # months in a pivot table.  Everything I seem to run across codes months statically.  I'm seeking a solution that shows something similar to the below result:  The columns headers are a unique identifier for the month(year*12+monthnum).  This was the only way I could think of for progressing year and month in a linear manner.   Partnumber 24180   24179   24178   24177   24176   813453     0       2       4       6       3       Is this possible?  Am I thinking too hard?  Each month the columns would naturally shift, and this is where I can't figure out how to dynamically do this.  Any suggestions or assistance is appreciated.  The table holding the data looks like this:  Of course the actual table hold much more historical data for thousands of parts.  PN      Year    Month   Usage   UID 813453  2014    12      0       24180 813453  2014    11      2       24179 813453  2014    10      4       24178 813453  2014    9       6       24177 813453  2014    8       3       24176

My table is like this:  Sitecode    Month  Amount --------    -----  ------ XX          Jan     1000 XX          Jan     3000 XX          Apr     3000 XX          Apr     1000   What I want is, to show the result something like this:  Sitecode    MonthJAN   MonthAPR --------    --------   -------- XX          4000       4000


How do you calculate the commutator $$[b_i^n, (b_j^\dagger)^m]$$ where $b_i$ are annihilators and $b_j^\dagger$ are creators in second quantization. All annihalators should be swapped to the right side.

What are some elegant ways to calculate  $$[\hat{a}^{M},\hat{a}^{\dagger N}]\qquad\text{with} \qquad[\hat{a},\hat{a}^{\dagger}]=1,$$  other than brute force calculation?    (EDIT) I got the same result as Qmechanic. I think Prathyush's suggestion should be equivalent to mine of the correspondence up to a canonical transformation. Here is my calculation:  $\begin{array}{c} \mbox{representation of }\left(\hat{a},\hat{a}^{\dagger}\right)\mbox{ on polynomial space }span\left\{ \frac{x^{n}}{\sqrt{n!}}\right\} _{n\ge0}\\ \hat{a}\left[f\left(x\right)\right]=\frac{d}{dx}f\left(x\right)\;;\;\hat{a}^{\dagger}\left[f\left(x\right)\right]=xf\left(x\right)\;;\;\left[\hat{a},\hat{a}^{\dagger}\right]\left[f\left(x\right)\right]=id\left[f\left(x\right)\right]\\ \left|0\right\rangle \sim 1\;;\;\left|n\right\rangle \sim x^{n}/\sqrt{n!} \end{array}$  $\begin{array}{c} \mbox{calculate the normal ordering }\left[\hat{a}^{M},\hat{a}^{\dagger}{}^{N}\right]\mbox{:}\\ \sim\left[\frac{d^{M}}{dx^{M}},x^{N}\right]=\frac{d^{M}}{dx^{M}}\left(x^{N}\star\right)-x^{N}\frac{d^{M}}{dx^{M}}\left(\star\right)\\ \sim\left\{ \overset{min\left\{ M,N\right\} }{\underset{k=0}{\sum}}\frac{N!}{\left(N-k\right)!}C_{M}^{k}\left(\hat{a}^{\dagger}\right)^{N-k}\left(\hat{a}\right)^{M-k}\right\} -\left(\hat{a}^{\dagger}\right)^{N}\left(\hat{a}\right)^{M}\\ \end{array}$    One comment on 02-12-2012: The representation I was using is actually related to Bergmann representation with the inner product for Hilbert space (polynomials) being:  $$\left\langle f\left(x\right),g\left(x\right)\right\rangle :=\int dxe^{-x^{2}}\overline{f\left(x\right)}g\left(x\right)\,,x\in\mathbb{R}\,,\, f,g\in\mathbb{C}\left[x\right]$$


What download if any should I use on an old Dell dimension B110? I believe it is a 32 bit machine. The old XP software is corrupted and I would like to try a desktop version of Ubuntu or something similar just for online brousing and video streaming. I would be a new/first time user.

Why is there no 32 bit ISO for the new Ubuntu 18.04?


In the universial coefficient theorem for cohomology, we have split exact sequence $0 \to Ext(H_{n-1}(C),G)\to H^n(C;G)\to Hom(H_n(C),G)\to 0$, where $H_n(C)$ are homology groups for a chain complex $C$ and $G$ is a chosen group.  It is said that if $G=F$ is a field, then we have isomophism $H^n(C;F)=Hom(H_n(C),F)$ because $Ext_F$ vanishes since $F$ is a field. I don't know why $Ext_F$ vanishes under this circumstance? Hope someone could help. Thanks!

I've seen the result repeatedly that $\text{Ext}(-,k) =0$ when $k$ is a field. I am yet to see a justification of this however.