How can I remove duplicate tag that is not used and is only singular of a similar tag?  I don't think that these tags can be used as synonyms. Consider the following example:  question and questions

During the re-tagging of questions, tags sometimes become orphaned from existing questions.  Are these zombie tags ever removed from the ?  What if a tag is misspelled and needs to be removed? How do we get rid of it?


I have some questions with accepted and/or upvoted answers, which I would like to no longer associate with my account.  I know it is impossible to actually delete them. The rationale behind that is that people who've answered your question also invested value, and that the question is now not only your possession, but rather a useful item to the whole online community.  That makes sense. To some extent.  I believe that I should have the right to control my data, though.  It would be great if there was an option to, instead of deleting my question, I could just unlink it from my account.  This is what Disqus does.

The Creative Commons FAQ      Third, if the licensor does not like how the material has been modified or used, CC licenses require that the licensee remove the attribution information upon request [...]  in 4.0, this also applies to the unmodified work.   How do I remove / dissociate my name from a post, in accordance with this clause?  Also, what are the effects of having my post dissociated from my account?  Finally, how will dissociation requests be handled for posts licensed under earlier versions of the license, which do not require dissociation upon request in all cases?


I found this code snippet and have been having trouble fully understanding its implementation. I know it has one method:  Iterator<T> iterator()   which creates a new iterator. But what is the point of this one method.  In this example:  import java.util.Iterator;  public class Range implements Iterable<Integer> {   private int start, end;   public Range(int start, int end) {     this.start = start;     this.end = end;   }    public Iterator<Integer> iterator() {     return new RangeIterator();   } }  public static void main(String[] args) {   Range range = new Range(1, 10);   for(Integer cur : range) {     System.out.println(cur);   } }   The code works correctly, yet iterator() has never been called. I know you need the Iterable interface to use the for each loop, but what is the point of the one method inside the interface? Any help in clearing this confusion would be appreciated.

Consider:  List<String> someList = new ArrayList<String>(); // add "monkey", "donkey", "skeleton key" to someList     for (String item : someList) {     System.out.println(item); }   What would the equivalent for loop look like without using the for each syntax?


It was booting just fine then after restarting the computer it get stuck to that dummy black scree with a little dash at the top left corner. Am stuck in the middle of something here guys help me out

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


I have the following code:  <script type="text/javascript">     $(function () {         $(".wrapper1").scroll(function () {             $(".wrapper2").scrollLeft($(".wrapper1").scrollLeft());         });         $(".wrapper2").scroll(function () {             $(".wrapper1").scrollLeft($(".wrapper2").scrollLeft());         });     }); </script>   But my HTML is dynamic and added later. Is there a way that I can use this code outside of the dynamically added HTML so that it works after the HTML is loaded ?

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 want to parse a file and bracket each line with #ifndef and #endif.  For example, starting with:  #define X 1 #define Y 2 #define Z 3   I want to generate:  #ifndef X #define X 1 #endif #ifndef Y #define Y 2 #endif #ifndef Z #define Z 3 #end if   This awk script works in console, but it doesn't work inside make:  awk '{printf "#ifndef %s\n%s %s %s\n#endif\n", $2, $1, $2, $3}' globals.tmp > globals.h   When run inside of make, it outputs as follows:  awk: cmd. line:1: {printf "#ifndef %s\n%s %s %s\n#endif\n", , , , } awk: cmd. line:1:                                           ^ syntax error awk: cmd. line:1: {printf "#ifndef %s\n%s %s %s\n#endif\n", , , , } awk: cmd. line:1:                                             ^ syntax error awk: cmd. line:1: {printf "#ifndef %s\n%s %s %s\n#endif\n", , , , } awk: cmd. line:1:                                               ^ syntax error awk: cmd. line:1: {printf "#ifndef %s\n%s %s %s\n#endif\n", , , , } awk: cmd. line:1:                                                 ^ syntax error awk: cmd. line:1: {printf "#ifndef %s\n%s %s %s\n#endif\n", , , , } awk: cmd. line:1:                                                  ^ unexpected newline or end of string   So it's obviously not pulling in the fields. I tried playing around with $1, $2, and $3: adding single, double and triple backslashes, changing the quotes, etc., nothing works. I know awk and make can be quirky, wondering if there is some "gotcha" I'm not getting?

To embrace the DRY (Don’t Repeat Yourself) principle, I sometimes need to share pieces of shell commands in a Makefile. So there is a recipe somewhere in that file like:    shell=/bin/bash # … .ONESHELL: run:     # Create bash sub-shell «cmd» var, holding a built-in test as a string     @cmd='[ $$(grep -iE _dev </etc/hosts | wc -l) -eq 0 ]'     # "$$" tells make to escape the dollar sign. So echoing …     @echo "$$cmd"     # gives «[ $(grep -iE _dev </etc/hosts | wc -l) -eq 0 ]» as I expected     # I need this variable to be expanded and interpreted as a real     # built-in square bracket test, so I wrote     @$$cmd && echo "Pass ! do more magical things …" || true   I expected make to escape $ sign $$cmd ⇒ $cmd which would in turn be expanded within bash context into the bracket test unquoted string … right ? But I get an error instead /bin/bash: line 2: [: too many arguments  Does anybody have an idea of why this error is being raised ? Why bash is not given the bracket test I expect ? [ $(grep -iE _dev </etc/hosts | wc -l) -eq 0 ] && echo "Pass!"  Thank you.


How can I change the waiting time of the dual boot menu (starting moment) into my Ubuntu Studio 15.10 installation? Can I?

I have Windows 7 and Ubuntu 12.04 in my system and i saw that the default time for os selection menu is only 10 sec, as i am new to Linux can anyone tell me how to increase this time?


I'm new to both Linux and this website so feel free to point out if I gave to little information.  I have a common problem of not working wifi adapter although wired works fine. I installed driver for rtl8168 which I assume is correct one because after installation my download speed increased up to the level of my second PC which has Windows installed. However, wifi still isn't working. The Realtek website states that driver is working with the kernels up to 4.15 and I'm wonder should I try installing some of the older kernels. I'm asking because once I've already broken everything to the point when both wired and wireless connections weren't working.  For clarity, here is the result of network check with lshw -c network.  *-network    description: Ethernet interface    product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller    vendor: Realtek Semiconductor Co., Ltd.    physical id: 0    bus info: pci@0000:02:00.0    logical name: eno1    version: 15    serial: 10:62:e5:81:df:39    size: 100Mbit/s    capacity: 1Gbit/s    width: 64 bits    clock: 33MHz    capabilities: bus_master cap_list ethernet physical tp 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation    configuration: autonegotiation=on broadcast=yes driver=r8168 driverversion=8.047.05-NAPI duplex=full ip=78.85.166.250 latency=0 link=yes multicast=yes port=twisted pair speed=100Mbit/s    resources: irq:50 ioport:3000(size=256) memory:e0804000-e0804fff memory:e0800000-e0803fff  *-network UNCLAIMED    description: Network controller    product: Realtek Semiconductor Co., Ltd.    vendor: Realtek Semiconductor Co., Ltd.    physical id: 0    bus info: pci@0000:03:00.0    version: 00    width: 64 bits    clock: 33MHz    capabilities: cap_list    configuration: latency=0    resources: ioport:2000(size=256) memory:e0700000-e070ffff   Edit1: wifi controller is internal.  Edit2 (result of lspci -nnk | grep -iA3 net):  02:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 15)     Subsystem: Hewlett-Packard Company RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [103c:84ae]     Kernel driver in use: r8168     Kernel modules: r8168 03:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:d723]     Subsystem: Hewlett-Packard Company Device [103c:8319] 04:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Raven Ridge [Radeon Vega Series / Radeon Vega Mobile Series] [1002:15dd] (rev c4)     Subsystem: Hewlett-Packard Company Vega [Radeon Vega 8 Mobile] [103c:84ae]

How do I install Wi-Fi drivers for Realtek RTL8723DE device in Ubuntu 16.04?  lspci -v | grep -i network 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device d723


I'm supposed to use nodal analysis.  Node A is the left one, node B is the middle one and node C is the right one. The bottom one is my reference node.  So I got these equations:  Node A: \$ -5 + \dfrac{V_a-V_b}{20} + \dfrac{V_a-V_c}{50} = 0 \$  Node B: \$ -\dfrac{V_a-V_b}{20} + \dfrac{V_b-V_c}{30} = 0 \$  Node C: \$ -\dfrac{V_b-V_c}{30} - 0.01V_1 - \dfrac{V_a-V_c}{50} = 0 \$  \$V_b = 0.4V_1\$  I tried solving the system with these equations but I didn't get anywhere.   What am I doing wrong?  The answer is: \$V_1 = 148.15 V\$

Hey guys I cannot wrap my head around this damn circuit and how I'm supposed to solve it using nodal analysis. I chose the bottom node as my reference node and I got to these equations:  Node A is the left one, node B is the middle one, node C is the right one and the reference node is the bottom one.  Node A :        (Va/100)  -4  + (Va-Vb)/50 + (Va-Vc)/20 = 0  Node B :        -(Va - Vb)/50 + 4 - 10 -2 + (Vb-Vc)/40 = 0  Node C:         2 + (Vc/25) -(Vb-Vc)/40 -(Va-Vc)/20 = 0  I am supposed to find Vx.  Are my equations right? How do I find Vx?


I allowed the permission through chmod +x install.sh command and also in properties of the .sh file, but it didn't work and showed following error when run:  Authentication requested [root] for make clean: rm -fr *.mod.c *.mod *.o .*.cmd *.ko *~ rm -fr .tmp_versions rm -fr Module.symvers ; rm -fr Module.markers ; rm -fr modules.order cd core/efuse ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd core ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd hal/rtl8188e/usb ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd hal/rtl8188e ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd hal/OUTSRC/rtl8188e ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko  cd hal/OUTSRC/ ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko  cd hal ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd os_dep/linux ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko cd os_dep ; rm -fr *.mod.c *.mod *.o .*.cmd *.ko Authentication requested [root] for make driver: make ARCH=x86_64 CROSS_COMPILE= -C /lib/modules/5.3.0-46-generic/build  M=/home/swapnil/Desktop/ADNet  wifi/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver  /rtl8188EUS_linux_v4.1.4_6773.20130222  modules make[1]: Entering directory '/usr/src/linux-headers-5.3.0-46-generic' arch/x86/Makefile:147: CONFIG_X86_X32 enabled but no binutils support make[1]: *** No rule to make target  'wifi/Driver/linux/RTL8188EUS_linux_v4.1.4_6773.20130222/driver /rtl8188EUS_linux_v4.1.4_6773.20130222'.  Stop. make[1]: Leaving directory '/usr/src/linux-headers-5.3.0-46-generic' Makefile:678: recipe for target 'modules' failed make: *** [modules] Error 2 ################################################## Compile make driver error: 2 Please check error Mesg   I was running Realtek wi-fi driver auto installation in terminal, but it failed to install. Ubuntu 18.04Lts, and here is lsusb command's output:  Bus 002 Device 003: ID 12d1:108a Huawei Technologies Co., Ltd.  Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 002: ID 0461:4d81 Primax Electronics, Ltd Dell N889  Optical Mouse Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 002: ID 413c:2107 Dell Computer Corp.  Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub   Please look it into matter and suggest me solution to this problem. Thanks in advance.

I'm trying to install wifi drivers for a particular mini wifi card i bought. The output of lsusb is:  0bda:f179 Realtek Semiconductor Corp   I've searched everywhere for drivers, but could not find anything. Any help?  Thanks


The Issues:  Open command line prompt:    Enter the letter a multiple times:    Instead of wrapping to a new line the text entered wraps onto the same line:    Now, start pressing b.  The second time a line wrap is required, it will wrap to a new line:       What causes this behavior?  Using a PS1 like this causes the behavior:   ps1Color="\033[1;35m" export PS1='$(echo -en $ps1Color) Baz $'   Note the reason I want to use echo instead of the color directly is because I want to add the color conditionally based on the exit status of the previous command.  Using the color directly doesn't cause this behavior to occur.    My questions are:    How can I print color codes for use in a PS1 using echo?   If I want to make my PS1 a different color conditionally what is the best way to do this? Why am I seeing this behavior?     Update  To be clear, I really want to do this using echo because I want to change the color conditionally.  This is what I currently have right now:  function setPs1Colors_start () {      local previousExit=$?      local ps1Color="\033[1;35m"     local ps1FailBackground="\e[41m"      echo -en $ps1Color      if [[ previousExit -ne 0 ]]     then         echo -en $ps1FailBackground     fi  }  function setPs1Colors_end () {     local ps1DefaultColor="\033[0m"     echo -en $ps1DefaultColor }  export PS1='$(setPs1Colors_start)[$(date +%b\-%d\ %k:%M)][$(versionControlInfo)\W]\$$(setPs1Colors_end) '

Often when I start looking at history of commands some of the characters from a command displayed aren't erased, for example:  What's happening:  prompt$ some_command prompt$ some_commanother_command   What should have happened:  prompt$ some_command prompt$ another_command   I can't erase those characters and bash ignores them when executing the command. They also disappear when a new prompt is being displayed (after pressing Enter for example).  I asked other people who work on Linux at my workplace and they said that they have that problem sometimes too, but they didn't have an idea on how solve that issue.  I have Ubuntu 11.10 and I'm using guake. Here is my PS1:  \e[0;31m\u \A ${PWD##*/}\e[0;32m$(parse_git_branch)\e[0;31m$\e[m   where parse_git_branch is  parse_git_branch () {     git name-rev HEAD 2> /dev/null | sed 's#HEAD\ \(.*\)# (\1)#' }   As far as I know my colleagues have that problem even with less "fancy" PS1.


I am about to format and manually partition my hard drive for Ubuntu for the first time. I have 16GB of RAM. I am wondering if I should even allocate a swap partition? Should I just make a root partition and a home partition?

I have read , but it was asked in the context of servers not desktops or notebooks.  If a good amount of RAM is installed on a notebook, say 8 GB, do we still need a swap space?


I've 3D tracked a scene and the positional tracking is amazing my model is staying exactly where it should be, but then my camera rotates, and for whatever reason instead of the model rotating it just slides sideways. I've set the y-axis, scale, floor, origin and wall and I have at least 20 trackers. What am I doing wrong?

Whenever I do camera tracking in Blender the reconstruction is always zooming out or not on the axis. I have a great quality camera, but the end results of the camera tracking always has the model sliding. If you have a solution please tell me.


Tried to boot Ubuntu, but this shows up instead:  grub rescue>

I installed Windows 7, which ate Ubuntu's boot file. When starting up the computer, it now goes straight to Windows, without giving me the option of booting Ubuntu.   How can I get Ubuntu back?


I don't like _____ eating.   What will be better to use, them or their. I want to say  their way of eating .But, i want to cut it short, according to context.  Can I use the sentence this way, using 'them or their.

The rule says that we can use a possessive adjective or an object pronoun before a gerund. Is there a rule  that says when to use each or are they interchangeable? Some say that it's wrong to use an object pronoun before a gerund.


Have upgraded from Ubuntu 16.04 - 17.04 and i noticed a lot of changes. Some good, some not so good.  1. Right click on empty space  2. Select: New Document  3. STOP  There is no Text Document option to open, instead i see a list of something that i have installed.  Where it is supposed to say: (Empty Document) I see the folders that i have saved in Templates. But no where to click to actually open an empty document.  However, if i open an already existing text document and right click on it in the menu bar then i can choose New Document and choose where to save it. But not directly in a folder or on the desktop.  P.S I for some unknown reason can not take screenshots of it.

Is there any way to create a text file without using the terminal at all?


I created a user interface to allow people to do simple CRUD operations, I'm using AJAX PHP and JQUERY for that matter. I'm able to delete rows on page load for the first time. But after I hit the reload button which reloads the div which contains the table, I am not able to delete yet another item. My question is, how could I do this? index.php
       <?php          include("dbServer.php");           $sql = "SELECT * FROM product";          $result = $db->query($sql);          if ($mysqli->connect_errno) {           printf("Connect failed: %s\n", $mysqli->connect_error);           exit();         }         // Printing all DataBase Items         echo "

ID	Name
";          while ($row = $result->fetch_object()) {            $id = $row->id;           $name = $row->name;           $description = $row->description;           $price = $row->price;           $picture = $row->picture;            echo "
".$id."	".$name."	".$description."	".$price."	".$picture."	<button data-id='".$id."' class='delete btn btn-light'>DELETE</button>	<button class='update btn btn-light'>UPDATE</button>	";         }          echo "
";          ?>
            <button id="reloader" class="container-fluid btn btn-primary" type="button" name="button">Reload</button>   index.js   $("#reloader").click(function(){     $("#table-reload").load(" #table-reload");   });    $(".delete").click(function(){      var obj = $(this);     console.log($(this));     var deleteId = $(this).data('id');     console.log(deleteId);      $.ajax({       url: "delete.php",       method: "POST",       data: {id: deleteId},       success: function(){         $(obj).closest('tr').fadeOut(1000, function(){           $(this).remove();         });       }     });     return false;    });   delete.php <?php include ("dbServer.php");    $id = 0;   if (isset($_POST['id'])){     $id = mysqli_real_escape_string($db, $_POST['id']);   }    if ($id > 0) {     //Checking if item with id exists in db $checkRecord = mysqli_query($db, "SELECT * FROM product WHERE id=".$id);     $totalRows = mysqli_num_rows($checkRecord);      if ($totalRows > 0){       //Delete record       $query = "DELETE FROM product WHERE id=".$id;        if ($db->query($query) === TRUE){         echo "data deleted";       }       else {         echo "failed to delete";       }     }   }   ?>

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 am considering switching from Ubuntu Linux to Arch Linux. I have a long list of packages that I've installed using apt-get that I would like to install right after I install Arch itself.   Is there any tool to install Ubuntu packages on Arch? If not, can you confirm that I will have problems with finding many of the packages available for Ubuntu also available for Arch?

The problem is simple - I have a .deb package and I want to install it on my Arch Linux. Is this possible? If yes, how?


Trying to find what I think was a short story, probably written 30 or more years ago.  Synopsis, to the best of my recollection:  Organization (military?/government?/corporate?) shows film of an inventor demonstrating successful flight of an "anti-gravity" device.  Film ends with the device totally destroyed and the inventor dying in the disaster.  The film is shown to a group of sceptical scientists who are convinced by its provenance that the film is genuine.  The scientists are then given access to the inventor's home and lab which contain papers, books, articles, etc. relating to a melange of documented levitation occurrences, UFO sightings, paranormal occurrences, etc. - but no details of the inventor's solution except very general miscellaneous piecemeal notes, calculations and drawings.  Because the scientists are convinced that a solution does exist - as demonstrated by the film they have been shown - they work to duplicate the inventor's route to solving "anti-gravity".  They are successful ... but are then told that the original film was a hoax.

This is a short story from the 50s or 60s.  A scientist or inventor has invented either teleportation or a space drive and has disappeared - leaving no documentation or clues except his extensive home library.  The government gathers all types of scientists to attempt to duplicate his research.  Several months later, as they are about to launch the first space drive space ship, the officer in charge reveals that there was no 'disappeared inventor'.  The greatest step toward a new impossible concept is knowing that it has already been done.


In the U.S., we seemingly prefer the former to the latter. However, I was sitting with my friends when one of them stated that he was "disorientated" while we were playing a video game.  My theory, at the time, was that he made the language connection between a "youtube game commentator" and "disoriented", resulting in a mash-up of the two words. Due to the rise of usage in the word "commentator", at least in the U.S., it made plenty of sense.  However, I just did some look-up this morning, out of curiosity, and it seems that the British prefer the latter to the former. It seemed a bit odd to me, so I asked some acquaintances in an , and an interesting proposal was made.  Perhaps "Disoriented" is more of an adjective, where "Disorientated" is more appropriately a verb.  An example would be:   Adjective: He became disoriented in the forest.  Verb: He disorientated himself in the forest.   Thoughts?

What are the origins of the word orientated?  As far as I know, the correct spelling is oriented and orientated is not an alternative spelling but an error that is in common use.  Is it for example more commonly used in a certain country or by a certain people? Is there a reason for people choosing to say or write orientated instead of oriented?


I've been asked to compute the value of an expression in the form of $a^b$ (mod $c$), where $a, c$ are prime and $b$ is extremely large. How would I use modular arithmetic to do so? I'm thinking that Fermat's Theorem might be helpful, but not sure how.

How do I efficiently compute $a^b\bmod c$:  When $b$ is huge, for instance $5^{844325}\bmod 21$? When $b$ is less than $c$ but it would still be a lot of work to multiply $a$ by itself $b$ times, for instance $5^{69}\bmod 101$? When $(a,c)\ne1$, for instance $6^{103}\bmod 14$?  Are there any other tricks for evaluating exponents in modular arithmetic?  This is being asked in an effort to cut down on duplicates, see  and .


Whenever I use Asymptote with Latex, each instance of the environment gets its own new file. This creates a large amount of files. Is there any way to get all of these files placed into another folder by themselves?

I am trying out Asymptote with latexmk and I would like to automate the interaction.  Consider the following latex document test.tex:  \documentclass{minimal} \usepackage{asymptote} \def\asydir{asymptote}  \begin{document}  Testing Asymptote:  \begin{asy} settings.outformat = "pdf"; unitsize(2cm); draw((0,0) -- (1,0)); \end{asy}  \end{document}   In my latexmkrc I have the  for Asymptote integration:  sub asy {return system("asy -o asymptote/ \"$_[0]\"");} add_cus_dep("asy","eps",0,"asy"); add_cus_dep("asy","pdf",0,"asy"); add_cus_dep("asy","tex",0,"asy");   Running latexmk -pdf test.tex generates test.pdf in the current folder and test-1.asy and test-1.pdf in the asymptote folder -- but only if   I manually created the asymptote folder prior to running latexmk. The folder specification in the latex document (\def\asydir{asymptote}) and latexmkrc (-o asymptote/) are identical.   I would like latexmk to read asydir from the main tex file, create the directory if it does not exist and run asy with the read output folder.  Is this possible?


I am a little confused, by what might be a simple topic. I first encountered this today and was a little startled. Suppose you have the following code  let x = {a: 100} let y = {b: x} //Note the x value   Now the interesting part is when you update x  x.a = 200  console.log(x) console.log(y)  > { a: 200 } > { b: { a: 200 } }   It gets updated in both objects. I was under the impression that y would create a brand new object despite using a reference to x. Now my mind is blown by this fact. What is going on here? What is the topic being illuminated here?

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


i am using ubuntu 12.04 lts. i m trying to update but i get an error      Failed to download repository information   Check your Internet connection.   My internet connection is fine.  when i see details of the error an get this      W:Failed to fetch   Unable to find expected entry 'main/source/Sources' in Release file (Wrong sources.list entry or malformed file)   , E:Some index files failed to download. They have been ignored, or old ones used instead.   any help please

When upgrading to Ubuntu 14.04 from Ubuntu 12.04 I am getting the following error:     W:Failed to fetch    Unable to find expected entry 'non-free/source/Sources' in Release   file (Wrong sources.list entry or malformed file) , E:Some index files   failed to download. They have been ignored, or old ones used instead.


UPDATE Found an answer here:   After reading  and doing some research I wrote some code that does the following:   Generate 128 bit Salt using Cryptographically secure pseudorandom number generator Give Password and Salt to PBKDF2 implementation Store the 32 Byte hash as the password   I would also like to include a private key as part of the process, but I'm not sure where it fits.  I've used HMAC (SHA 256) in the past to authenticate a message so I was thinking either:   Append the private key to the salt and pass the 256 bit result through the algorithm of choice ( PBKDF2 , bCrypt , Argon2) Apply a HMAC (SHA 256) password then pass that to the algorithm of choice ( PBKDF2 , bCrypt , Argon2) Something else??   I want to make sure I am using the private key properly in the context of password hashing.  Any suggestions or comments are greatly appreciated.  Thank you

There have been several questions regarding  and .  A "pepper" is sometimes mentioned – an application-specific secret key. The  implies that a adding pepper brings the composition close to a MAC, and that cryptographic MAC function should be used rather than concatenating a pepper together with the salt and password.  My question is: Where applicable, what would be a generally recommendable, sound, well understood way to MAC a user password and a secret key, in the context of password hashing?  I want to MAC the password using a secret key, then feed the output of the MAC to a slow hash function (like bcrypt, scrypt, or PBKDF2).  I want to know what kind of MAC to use. To represent the MAC, I'm using this notation   HMAC-SHA256secretkey(message) and HKDFsalt(password) password is the low-entropy user password key is the high entropy secret key (the "pepper") salt is a per-password random value, optionally reused by the subsequent computationally expensive hash such as bcrypt, PBKDF2, or scrypt    Would any of these constructs be more recommendable? Or is there an even better way? And if so, briefly why?   HMAC-SHA256 key(password) HMAC-SHA256password(key) HKDFpassword(salt)   NB: This question is in relation to the "pepper" section near the end of the accepted answer to . Thus the output of the MAC will be fed to a slow, computationally expensive KDF like bcrypt, PBKDF2, or scrypt.


I am doing the following exercise and I have some part of it Create a new column with a 1 if the country's % Renewable value is at or above the median for all countries in the top 15, and a 0 if the country's % Renewable value is below the median. My code: df = answer_one() print(df) mean = df['#% Renewable'].mean() df['ratio'] = df['#% Renewable'] > mean   I want to know if there is a way to create in one line a ternary operator, something like: If renewable > mean then 0 if renewable < mean then 1.  but not sure how to achieve this on python in one line

If Python does not have a ternary conditional operator, is it possible to simulate one using other language constructs?


We all know that $a^2+b^2=c^2$ in a right-angled triangle, and therefore, that $c<a+b$, so that walking along the red line would be shorter than using the two black lines to get from top left to bottom right in the following graphic:    Now, let's assume that the direct way using the red line is blocked, but instead, we can use the green way in the following picture:    Obviously, the green way isn't any shorter than the black one, it's just $a/2+b/2+a/2+b/2 = a+b$. Now, we can divide the green path again, just like the black path, and get to the purple path. Dividing this one in two halfs again, we get the yellow path:    Now obviously, the yellow path is still as long as the black path from the beginning, it's just $8*a/8+8*b/8=a+b$. But if we do this segmentation again and again, we approximate the red line - without making the way any shorter. Why is this so?

What is wrong with this proof?    Is $\pi=4?$


Okay, so , 6 minutes after I had posted my answer. And he got the accept.  He added a sentence above the code sample, which I neglected to do.  But the fact that he copied the code from my answer is indisputable - it is identical right down to table aliases, whitespace, simplified joins and my trademark semi-colon (I seem to be the only person on earth who adds statement terminators as part of my answers). I realize this is similar to:    But this is not the fastest-gun-in-the-west problem. The code is identical, byte-for-byte, and a full six minutes had elapsed. If he wrote code as meticulously as I do, and took over 6 minutes to do it, and didn't notice the "1 new answer" banner in the meantime... that would be quite a remarkable alignment of the stars.  The fact that he got the accept, meh, whatever. I couldn't care less about the rep. I did flag the answer and challenged the user about his copying skills - which he of course denied. "Coincidence" he suggested, even though .  I do care about plagiarism, littering an answer with useless duplicates, and inadvertently promoting this kind of behavior by letting it stand. I realize my response was not the most mature, but my question is, how should we be dealing with this unacceptable behavior on SO? How do you deal with it when it happens to you?

I  to the question "" which was specific to the question asked.  Another user engaged positively with my answer, as there was a small conversation thread.  That person then  and made what I would say are minor modifications (the comments I left in my original code that pertained to the specific case are still in the places where he made edits to be more specific).  The answer does acknowledge that it is a general case of my specific code.  Ignoring the fact that I'm involved in it, what should one do when seeing this situation?  The only thing I can think of, and I'm not sure that it's necessarily the right solution, is to flag the answer for moderator attention.  Other possible actions, which I believe are wrong, are:   Editing the answer; that would change its intent Voting the answer down; it's a technically correct answer   One could leave a comment, but that can lead to confrontation and escalation (depending on the parties involved) which would be counterproductive.  The only thing I've done, which is not really related, is edit the answer to hyperlink the already existing attribution (but I do this as a regular edit for any answer which explicitly references another).  What's the best approach here, if any?


The problem  I've got a simple question: what's the difference between ejecting  using  (formerly known as ) button (see image below) and  command?    Before you will read rest of this question I encourage you to think if you expect any difference between results of clicking eject button in  and typing  command? If yes, then what's the difference? If no, then read on...    1st try:  eject  When I insert my  to my computer's USB socket,  automatically mounts it, which is reflected both in :    and command line using e.g.  command:  me@host:~$ df -h Filesystem      Size  Used Avail Use% Mounted on (...) /dev/sdf1       3,6G  3,6G     0 100% /media/me/Debian 9.1.0 amd64 1   or  command:  root@host:~# blkid (...) /dev/sdf1: UUID="XXXX-XX-XX-XX-XX-XX-XX" LABEL="Debian 9.1.0 amd64 1" TYPE="iso9660" PTUUID="XXXXXXXX" PTTYPE="dos" PARTUUID="XXXXXXXX-XX" /dev/sdf2: SEC_TYPE="msdos" UUID="XXXX-XXXX" TYPE="vfat" PARTUUID="XXXXXXXX-XX"   When I click eject button marked with a red circle:    and I run those commands once again, there is no sdf string in commands' output (which is probably what I should expect after ejecting /dev/sdf1):  root@host:~# df -h | grep sdf root@host:~# df -ah | grep sdf root@host:~#   Note that I added -a (--all) flag to df command and I got the same (empty) result.  root@host:~# blkid | grep sdf root@host:~#   Note that now I'm unable to remount /dev/sdf1 without reinserting my flash drive:  root@host:~# mkdir -p /mnt/test root@host:~# mount /dev/sdf1 /mnt/test mount: special device /dev/sdf1 does not exist     2nd try:  command  Now repeat the hole procedure with only changing the way I unmount my flash drive. Instead of clicking eject button, I type:  umount /dev/sdf1   Here is the result of :  root@host:~# df -h | grep sdf root@host:~# df -ah | grep sdf root@host:~#    result is probably as expected because it's the same as above... but here comes the :  root@host:~# blkid | grep sdf /dev/sdf1: UUID="XXXX-XX-XX-XX-XX-XX-XX" LABEL="Debian 9.1.0 amd64 1" TYPE="iso9660" PTUUID="XXXXXXXX" PTTYPE="dos" PARTUUID="XXXXXXXX-XX" /dev/sdf2: SEC_TYPE="msdos" UUID="XXXX-XXXX" TYPE="vfat" PARTUUID="XXXXXXXX-XX"   Note that remounting works fine in opposite to the previous try:  root@host:~# df -h | grep sdf root@host:~# mkdir -p /mnt/test root@host:~# ls /mnt/test | wc -l 0 root@host:~# mount /dev/sdf1 /mnt/test mount: /dev/sdf1 is write-protected, mounting read-only root@host:~# ls /mnt/test | wc -l 24     The question  Why is that?  What is the precise, underlying reason of above differences in  output? Does  do something more than  command? It seems to me that  eject button is kind of 'permanent' unmount. Why?

If I put a USB-drive in, it will automount. I can see it with lsblk  NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sdb      8:16   1   7,5G  0 disk  └─sdb1   8:17   1   7,5G  0 part /media/user/usb-drive   If I unmount it with umount  umount /media/user/sdb1   it will still be visible with lsblk, but not mounted any more:  NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT sdb      8:16   1   7,5G  0 disk  └─sdb1   8:17   1   7,5G  0 part   but if I instead eject it by clicking the eject icon in Thunar (xfce file manager), it will disappear from the list in lsblk. Why is that so?


Whenever our 3-month old baby cries, as soon as we cuddle her, she will stop crying.   My worry is:   She will develop a habit out of this and grow too dependent on us cuddling her.   Should we leave her crying for a while to stop her demand cuddling so much?

My husband and i have differing opinions on this. I don't believe in the term 'spoilt'. I would be very happy if my daughter was 'spoilt' in the sense that she expects to be treated with the highest possible respect and love and affection in all her relationships.   Also it would not bother me if she think she is special and unique (that's exactly what I want her to think). Mother's face is a mirror for the baby - through the mother's reactions and attention, the child learns that she is a lovable and valuable human being.   I spend all my time with my baby when she is awake. I play games with her, I smile, and laugh, and I never ever let her cry. I rush to pick her up immediately, even if it's the middle of the night, I force myself to get up, no matter how tired I am (I admit it's hard sometimes, and I do let her cry for 10-20 seconds sometimes, but never more).


Is it correct to say : "What is the John's car's color ?" ? As non native speaker, this sentence seems weird to me. Would I say : "What is the color of the John's car ?"

Is this the proper way to use two possessive nouns in a row?     I am going over to Lauren's parents' house this evening.   or     The store's manager's niece was quite attractive.   What about three?*     The United States Army's general's wife's dog is on the lamb, somebody stop it.   *Three seems both unrealistic, and in the specific example I used you could make a case for adding a fourth United State's Army's but I think that seems even more unrealistic.  Additionally, I would never write this in any sort of setting other than the purpose of knowing what the rules are.  Thanks in advance, I apologize in advance if this is duplicate


I am trying to make a Fragment which is going to show me the News from RSS channel. I am using a RecyclerView with CardView. My program shows the list of news correct, but when i click on one of this news i recieve this error:  java.lang.NullPointerException: Attempt to invoke interface method 'void com.example.myapplication.Model.ItemClickListener.onClick(android.view.View, int, boolean)' on a null object reference at com.example.myapplication.Model.FeedViewHolder.onClick(FeedAdapter.java:38)  My code (FeedAdapter.java): package com.example.myapplication.Model;  import android.content.Context; import android.content.Intent; import android.net.Uri; import android.view.LayoutInflater; import android.view.View; import android.view.ViewGroup; import android.widget.TextView;  import androidx.annotation.NonNull; import androidx.recyclerview.widget.RecyclerView;  import com.example.myapplication.R;  class FeedViewHolder extends RecyclerView.ViewHolder implements View.OnClickListener, View.OnLongClickListener{       public TextView txtTitle, txtPubDate, txtContent;     private ItemClickListener itemClickListener;      public FeedViewHolder(View itemView) {         super(itemView);         txtTitle = (TextView)itemView.findViewById(R.id.txtTitle);         txtPubDate = (TextView)itemView.findViewById(R.id.txtPubDate);         txtContent = (TextView)itemView.findViewById(R.id.txtContent);          itemView.setOnClickListener(this);         itemView.setOnLongClickListener(this);     }      public void setItemClickListener(ItemClickListener itemClickListener) {         this.itemClickListener = itemClickListener;     }      @Override     public void onClick(View v) {         itemClickListener.onClick(v, getBindingAdapterPosition(), false);     }      @Override     public boolean onLongClick(View v) {         itemClickListener.onClick(v, getBindingAdapterPosition(), true);         return true;     } }  public class FeedAdapter extends RecyclerView.Adapter<FeedViewHolder>{      private RSSObject rssObject;     private Context mContext;     private LayoutInflater inflater;      public FeedAdapter(RSSObject rssObject, Context mContext) {         this.rssObject = rssObject;         this.mContext = mContext;         inflater = LayoutInflater.from(mContext);      }      @NonNull     @Override     public FeedViewHolder onCreateViewHolder(@NonNull ViewGroup parent, int viewType) {         View itemView = inflater.inflate(R.layout.row, parent, false);         return new FeedViewHolder(itemView);     }      @Override     public void onBindViewHolder(@NonNull FeedViewHolder holder, int position) {         holder.txtTitle.setText(rssObject.getItems().get(position).getTitle());         holder.txtPubDate.setText(rssObject.getItems().get(position).getPubDate());         holder.txtContent.setText(rssObject.getItems().get(position).getContent());          Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(rssObject.getItems().get(position).getLink()));         browserIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);         mContext.startActivity(browserIntent);     }      @Override     public int getItemCount() {         return rssObject.items.size();     } }  In my dreams, after clicking on a Row object, browser should open the current news page. But i don't know what to do. Thanks!

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?


I'm trying to delete contacts in my People app and when I right click, there isn't an option to delete.  Only pin to start or edit.  Where did it go?  How do I delete these contacts?

I never really bothered to keep my Hotmail contact information up to date, so now that I connected it to Windows 8, suddenly I see all this outdated contact information or people I've long stopped talking to.    I don't see any buttons or options where I can click to delete someone.  So how do I clean up my Windows 8 People app and remove these contacts?


According to Physics, Black Body absorb all incoming light reflect nothing when compared to White body. This phenomenon is called Black-body radiation. So Melanin should turn your skin into white for protect the body from harmful rays in sunnier regions, that is not happening in Biology of Human Beings.   This is why Most of School Uniforms are specifically white on Saturdays (Because of intensity of sunlight is more on that day)  Then How Dark skin protects humans in sunnier climates?   My Question is different from this  because I mentioned physics subject also in my question.

I don't understand why darker skin is advantageous in hotter climates. Wouldn't it absorb more of the heat? I have heard that it reduces the incidence of cancer, but I would think absorbing more radiation would increase the risk?


I want to visit Canada, for which, according to my research, I do not require an electronic passport.  However, most flights have a layover in the USA. I know I need an electronic passport to enter the US, do I also need it for layover?

I heard that you need a biometric passport if you want to enter USA. However, my friend has a biometric passport, but no fingerprints in it. Is this enough? And how long has the passport to be valid? Is it okay if it expires on the day after his return date?


I'm working on a video hosting website and I'm wondering how my embeded code would affect my seo rank  youtube and almost all, major video hosting websites are useing iframe as their embedded code, some of them are using "player" sub domain so, I thought it will be a good practice using player subdomain as things may change in the future.  <iframe width="420" height="315" src="//player.mywebsite.com/embed/Bp222aodrVg" frameborder="0" allowfullscreen></iframe>   In my case player.mywebsite.com is actually an CNAME(alias) for mywebsite.com.   will player.mywebsite.com effect the rank of mywebsite.com?

I made a widget that would ideally live on other sites.  Here is an example:   I guess since the widget would link back to me, it would be an SEO boost for my site.  Is that correct?  Or would it be just an SEO boost for that particular URL?  If it is just an SEO boost for the particular URL, it does me little good since that page does not link to any of my other pages.  Am I thinking about this correctly?  How are these things typically handled so that there is  a benefit to my site's SEO?


I'm currently the main author of a paper. The work was performed when I was working at university X. However, I will start at a new university Y in one month, and the conference I'm presenting the work at is in two months. So, while presenting the paper I will be working at university Y (but the work was performed during my time at university X).  My question is the following, how would you present the author information:  A)     Both universities in the main information.  First name, Lastname (1, 2)    (1) University X  email@university_X.com    (2) University Y  email@university_Y.com   B)    Name and previous affiliation (where the work was completed) as the main information and the current affiliation in a footnote.  First name, Lastname  (Footnote: 'Currently working at University Y, email@university_Y.com')   University X  email@university_X.com     or C)    Name and current affiliation as the main information and the previous affiliation (where the work was completed) in a footnote.  First name, Lastname  (Footnote: 'Work completed at University X, email@university_X.com')   University Y,  email@university_Y.com     Or do you have any other suggestions?

I'm submitting an mathematics article concerning research that was done entirely while I was an undergraduate at University A.  This August I will be a graduate student at University B.  The only funding I received came from NSF through a ten week program at University C at the very beginning of the project, after which I finished the research on my own while attending University A.  On the other hand, while University B has nothing to do with the publication, it is the most up to date institution as far as contact information goes.  Should I put University A or University B as my affiliation (or both)?


I am asking here because I have tried everything I can and it wont fix. I restored to different restore points, returned to factory three times, and ran the auto fix utilities.  It updated Saturday but the updates failed and since then it hangs on checking for updates.

I installed Windows 7 fresh and installed SP1. Now, when I try to check manually for Windows Updates it just hangs on the Checking for updates screen.    I tried running the tools in , but this did not fix the issue either:  No matter what I do it just hangs on the "Checking for updates..." screen and goes no further.


For a particle in an infinite well potential given by:  I am able to successful derive the normalized wavefunction as: $$u_n(x) =\sqrt{2/a}\sin(\frac{n\pi x}{a})$$ where this normalization has the appropriate dimensionality for a one-dimensional wavefunction, but that the sign (or more generally the phase) of the normalization constant is purely conventional, and $-\sqrt{2/a}$ or $\exp(iθ) \sqrt{2/a}$ would serve just as well. The most general solutions will be linear combination of these energy eigenstates with their associated time-dependence:  The expectation value of momentum in an infinite well stationary state is given by:  •Since the eigenfunctions vanish at the boundaries. •Thus, the average value of the momentum vanishes in each eigenstate In the book i am reading for it says this:  The energy eigenstates in this (or any) bound state system can be chosen to be purely real functions (or real with multiplicative complex phases that are independent of position).  As the calculation in above illustrates, this implies that the expectation value $⟨p ̂ > ⟩$, which we know must be real, can be written as a purely real integral time i.  I don't understand this  'can be written as a purely real integral time i.'   The extract from the textbook:  Equation

Every now and then a question comes up about the status of the momentum operator in the infinite square well, and while we have two good answers on the topic  and , I'm generally not satisfied by their level of detail and by how easy (not very) it is to find them when you need them. I therefore posit that it is high time we settle things and build a canonical Q&A thread for this, so, with that in mind:  What's the deal with momentum in the infinite square well?   Is the momentum operator $\hat p=-i\hbar \frac{\mathrm d}{\mathrm dx}$  when restricted to the compact interval of the well? Are there any subtleties in its definition, via its domain or similar, that are not present for the real-line version? Is the momentum operator $\hat p=-i\hbar \frac{\mathrm d}{\mathrm dx}$  in these conditions? If not, why not, and what are the consequences in terms of the things we normally care about when doing one-dimensional QM? If it is not self-adjoint, does it admit a ? If it does, is that extension unique? If the extension is not unique, what are the different possible choices, and what are their differences? Do those differences carry physical meaning / associations / consequences? And what is a self-adjoint extension anyways, and where can I read up about them? What is the spectrum and eigenvectors of the momentum operator and its extensions? How do they differ from each other? Is there such a thing as a momentum representation in this setting? If not, why not? What is the relationship between the momentum operator (and its possible extensions) and the hamiltonian? Do they commute? Do they share a basis? If not, why not? Do these problems have counterparts or explanations in classical mechanics? ()   And, more importantly: what are good, complete and readable references where one can go and get more information about this?


I'm studying statistics using Rice's Mathematical Statistics and Data Analysis. We can find the $r$th moment of a random variable $X$ by taking the moment generating function $M(t)$ of $X$ and taking the derivative $r$ times. Then substituting $t=0$, we arrive at the $r$the moment. Are moment generating functions significant in any way for values $t \neq 0$?

In most basic probability theory courses your told moment generating functions (m.g.f) are useful for calculating the moments of a random variable. In particular the expectation and variance. Now in most courses the examples they provide for expectation and variance can be solved analytically using the definitions.   Are there any real life examples of distributions where finding the expectation and variance is hard to do analytically and so the use of m.g.f's was needed? I'm asking because I feel like I don't get to see exactly why they are important in the basic courses.


A friend of mine and I are planning a visit to the USA this July, where my parents now live. We are planning on making a road trip through parts of the USA (mainly California, but also Nevada and possibly Arizona). My father has agreed to lend us a car to use for this road trip.   Both my friend and I are German citizens and we are both in possession of standard German driving licences. I am 22 and he is 21.   My question is it legal for us to use this car and are there any special prerequisites we need to fulfill in order to be able to use this car?

A common  says that buying a car as a tourist in the US is difficult because of registration and the time it takes to do the paperwork. However I have a friend in NYC who can buy any car I want in his name. After my trip to the States is finished, he would sell it and wire me the money.  So the question is — what documentation (insurance, etc.) is needed for me to drive my friend's car in the US as a tourist?


I am trying to solve question 3.7 (b) from Chapter 15 in Artin's book "Algebra".  The problem is:     Is it true that $\sqrt[3]{5}\in \mathbb Q(\sqrt[3]{2})$?   It is clear by Eisenstein's criterion that both $\sqrt[3]{2}$ and $\sqrt[3]{5}$ have their minimal polynomails of egree $3$ over $\mathbb Q$.  Thus if we assume that $\sqrt[3]{5}\in \mathbb Q(\sqrt[3]{2})$, then we must have $\mathbb Q(\sqrt[3]{5})=\mathbb Q(\sqrt[3]{2})$.  This didn't get me anywhere.  Then I tried the most simple minded approach.  Say $\sqrt[3]{5}=a+b\sqrt[3]{2}+c\sqrt[3]{4}$, for some $a,b,c\in \mathbb Q$.  By cubing and rearranging, it is likely that we will arrive at some absurdity.  But clearly this shouldn't be what the author must have intended.  Can somebody point me towards a slick solution?

Let $p,q,r$ be prime integers with $q\neq r$. Let $\sqrt[p]q$ denote any root of $x^p-q$ and $\sqrt[p]r$ denote any root of $x^p-r$. Please show that $\mathbb{Q}(\sqrt[p]q)\neq\mathbb{Q}(\sqrt[p]r)$.  By Eisenstein we know the two polynomials are irreducible and so they are minimal polynomials and both have degree $p$.


For complex number $z$, how to prove the limit exits by definition  $$\lim_{z\to 0} \frac{\sin z}{z} =1$$  By def I've tried, but I got a difference always greater than 1..

How can one prove the statement $$\lim_{x\to 0}\frac{\sin x}x=1$$ without using the Taylor series of $\sin$, $\cos$ and $\tan$? Best would be a geometrical solution.  This is homework. In my math class, we are about to prove that $\sin$ is continuous. We found out, that proving the above statement is enough for proving the continuity of $\sin$, but I can't find out how. Any help is appreciated.


A lot of my LaTeX documents are informal lists for my own use. I prefer to organize these informally, without using any of the "list" type formatting available to LaTeX.  I have a new line before and after most of my list items (see sample LaTeX source below), but ideally would like to have each items on its own line as opposed to being concatenated together as they are by default.   Currently I need to put a blank newline in the source to ensure the item on the next line will be on it's own line. That's the action I want to eliminate.  Ideally I can put a formatting line at the start of documents and not have to set each list item as an item.  Examples:  by default, this LaTeX code:  \documentclass{report} \begin{document} test1 test2 test3 \end{document}   Will produce a pdf with text like this  test1 test2 test3   I want text instead to be produced like this  test1 test2 test3   Basically, I want newlines in the latexsource to be honored in the document output.  I don't want to use easylist or any special list package.  If any string starts on a newline in the LaTeX source I want it to start on a newline in the output, and it does not by default. That's it.  image:    edit:  I saw werner solution, which works quiet well. Is it possible to start the overlay command, and to end it after a certain section? That would be perfect

I'm searching for inser a new line just push the "enter" button on the keyboard.  Is there a solution?  This is the "boring" way:  \section{mySection}     My really really really long text.\newline     A new text line.   This is instead a shorter and really less boring way:  \section{mySection}     My really really really long text.      A new text line.   And this last solution is that i adopted, but if in a really long text it will create a lots of white space on the latex editor, and this is not really nice for me.  Is there a way to create a new line just with the following code?  \section{mySection}     My really really really long text.     A new text line.


We need to find out the limit of,  lim$_{n \to \infty} \sum _{ k =0}^ n \frac{e^{-n}n^k}{k!}$  One can see that $\frac{e^{-n}n^k}{k!}$ is the cdf of Poisson distribution with parameter $n$.  Please give some hints on how to find out the limit.

There is a probabilistic method to solve it. But I am not familiar with probability. I am trying to compute it by analytic method, such as using L Hospital's rule or Stolz formula, but they are not working.


I am having trouble installing boost library completely it fails/skips several things that seem to be key for me to continue on to compiling a program with it.  Here is what I get when I install boost,  gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.6/release/threading-multi/bzip2.o libs/iostreams/src/bzip2.cpp:20:56: fatal error: bzlib.h: No such file or directory compilation terminated.      "g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC  -DBOOST_ALL_NO_LIB=1 -DBOOST_IOSTREAMS_DYN_LINK=1 -DBOOST_IOSTREAMS_USE_DEPRECATED -DNDEBUG  -I"." -c -o "bin.v2/libs/iostreams/build/gcc-4.6/release/threading-multi/bzip2.o" "libs/iostreams/src/bzip2.cpp"  ...failed gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.6/release/threading-multi/bzip2.o... ...skipped <pbin.v2/libs/iostreams/build/gcc-4.6/release/threading-multi>libboost_iostreams.so.1.50.0 for lack of <pbin.v2/libs/iostreams/build/gcc-4.6/release/threading-multi>bzip2.o... ...skipped <p/usr/local/lib>libboost_iostreams.so.1.50.0 for lack of <pbin.v2/libs/iostreams/build/gcc-4.6/release/threading-multi>libboost_iostreams.so.1.50.0... ...skipped <p/usr/local/lib>libboost_iostreams.so for lack of <p/usr/local/lib>libboost_iostreams.so.1.50.0... gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.6/release/link-static/threading-multi/bzip2.o libs/iostreams/src/bzip2.cpp:20:56: fatal error: bzlib.h: No such file or directory compilation terminated.      "g++"  -ftemplate-depth-128 -O3 -finline-functions -Wno-inline -Wall -pthread  -DBOOST_ALL_NO_LIB=1 -DBOOST_IOSTREAMS_USE_DEPRECATED -DNDEBUG  -I"." -c -o "bin.v2/libs/iostreams/build/gcc-4.6/release/link-static/threading-multi/bzip2.o" "libs/iostreams/src/bzip2.cpp"  ...failed gcc.compile.c++ bin.v2/libs/iostreams/build/gcc-4.6/release/link-static/threading-multi/bzip2.o... ...skipped <pbin.v2/libs/iostreams/build/gcc-4.6/release/link-static/threading-multi>libboost_iostreams.a(clean) for lack of <pbin.v2/libs/iostreams/build/gcc-4.6/release/link-static/threading-multi>bzip2.o... ...skipped <pbin.v2/libs/iostreams/build/gcc-4.6/release/link-static/threading-multi>libboost_iostreams.a for lack of <pbin.v2/libs/iostreams/build/gcc-4.6/release/link-static/threading-multi>bzip2.o... ...skipped <p/usr/local/lib>libboost_iostreams.a for lack of <pbin.v2/libs/iostreams/build/gcc-4.6/release/link-static/threading-multi>libboost_iostreams.a... ...failed updating 2 targets... ...skipped 6 targets...   Ive tried re-installing zlib, and other archive tools like bzip2 but no luck.


a getting this error "IllegalArgumentException: Context must not be null."when i am trying to load images using recylerview and picaso.  *I tried to use recylerview to display bunch of images which i was got done then i tried to use picaso to load the image load .  *I alos tried to use "this" keyword also but this did not work .  Main Activity.  public class MainActivity extends AppCompatActivity { //Dummydata or place holderdata.   final static int[] dummyImages={R.drawable.color_black,R.drawable.color_white,R.drawable.color_brown,R.drawable.color_dusty_yellow,R.drawable.color_mustard_yellow,R.drawable.color_red}; private RecyclerView mRecyclerView; private RecyclerView.Adapter mAdapter; private RecyclerView.LayoutManager mLayoutManager;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);     mRecyclerView = (RecyclerView) findViewById(R.id.my_recycler_view);       // use a linear layout manager     mLayoutManager = new GridLayoutManager(getApplicationContext(),2);     mRecyclerView.setLayoutManager(mLayoutManager);      // specify an adapter (see also next example)     mAdapter = new RecycleAdapter(dummyImages);     mRecyclerView.setAdapter(mAdapter);   }   }  My Adpater  public class RecycleAdapter extends RecyclerView.Adapter<RecycleAdapter.ViewHolder> {  private String[] adumyDataSet; private int[] adumyimage; private Context context;   // Provide a direct reference to each of the views within a data item // Used to cache the views within the item layout for fast access public static class ViewHolder extends RecyclerView.ViewHolder {     // Your holder should contain a member variable     // for any view that will be set as you render a row     public ImageView colorImageView;      // We also create a constructor that accepts the entire item row.     // and does the view lookups to find each subview     public ViewHolder(View itemView) {         // Stores the itemView in a public final member variable that can be used         // to access the context from any ViewHolder instance.         super(itemView);         colorImageView = (ImageView) itemView.findViewById(R.id.colorsBitch);      } }  public RecycleAdapter (int[] dummyDataSet){      adumyimage=dummyDataSet;  }  @Override public RecycleAdapter.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {      View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.item_view,parent,false);     return new ViewHolder(v); }  @Override public void onBindViewHolder(RecycleAdapter.ViewHolder holder, int position) {      Picasso.with(context).load(adumyimage[position]).into(holder.colorImageView);  }  @Override public int getItemCount() {     return adumyimage.length; }   }

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?


Question: How many digits are there in $99^{99}$?   My attempt:  Observe that  $$99^{99} = (100\times 0.99)^{99} = 100^{99}\times 0.99^{99}.$$ Note that $100^{99} = 10^{198}$ has $199$ digits and  $$0.99^{99} = \left(1-\frac{1}{100}\right)^{99} \approx e^{-1} \approx 0.37.$$ Therefore, there are $198$ digits in $99^{99}.$  Is my reasoning above correct?

I know the answer is $198$.  I realise that if $\log _{10}\left( x\right) =y$, the number $x$ has $\lfloor y\rfloor -1$ digits  So I tried $\log ^{\ }_{10}\left( 99^{99}\right) $ = $\log _{10}\left( 100\left( 1-\dfrac {1}{100}\right) \right) $ = $198 + 99\log_{10}\left( 1-\dfrac {1}{100}\right) $ , then I do not know how to proceed. I guess using this method amounts to finding a good approximation to $\log _{10}\left( 99\right)$  I would also be interested to know how one can solve this with the binomial theorem: $\left( 100-1\right) ^{99}$


This is my dilemma. I have a program that can only be launched through terminal. So, right now I am always having to first open the terminal and then do the following ./theGUIScript. It runs but I want to have a link or a executable script or application on the desktop that does the same thing but with double click. So, whenever I want to start this program, I double click on this link or script. I have looked at all the self-help online on this issue, but there seems to be no definitive answer. And whatever I try it doesn't seem to help. When I think I solved this issue, Ubuntu opens the file with gedit or popups a message saying there is a problem with the shortcut or link.

In older versions it was easy to create a launcher on my desktop. All I had to do is right click on my desktop and select the "create launcher" option.  How can I create such launchers now?


I'm writing my dissertation right now and in it I've used a regression model. With one independent variable and 4 dummy variables.   Y = b_0 + b_1STAR1 + b_2STAR2 + b_3STAR3 + b_3STAR4 + b_3 STAR5 + e  Were the beta parameters are OLS estimators and STARi are the dummy variables i.e( value 0 or 1).   Now i know what the 5 assumptions behind OLS. Although how do i prove that they are fulfilled?    Linear in parameters   How do i prove my beta parameters are linear?    Random Sampling   I understand how i can argue this assumption.    Zero Conditional mean   Can this be proven by a scatter plot?   Sample Variation   Whats the difference between Sample variation and Random Sampling?   Homoscedasticity    If I've done a regression in Excel can i just take the variance of all the residuals to see if its a constant?

In linear regression analysis, we analyze outliers, investigate multicollinearity, test heteroscedasticty.   The question is:  Is there any order to apply these? I mean, do we have to analyze outliers very firstly, and then examine multicollinearity? Or reverse?    Is there any rule of thumb about this?


Right now to make a new object out of an existing object I stringify it, then parse it into a new variable. Is there a better way?  eg:  let newObject = JSON.parse(  JSON.stringify(originalObject)  )

What is the most efficient way to clone a JavaScript object? I've seen obj = eval(uneval(o)); being used, but . I've done things like obj = JSON.parse(JSON.stringify(o)); but question the efficiency.  I've also seen recursive copying functions with various flaws.  I'm surprised no canonical solution exists.


My post is a bit vague, but I need a video editor that can do the following:   link different video files with text transitions allow music in the background   I have read some posts and all the ubuntu video editors come with interfaces that are hard to use for a complete beginner to video editing.  Any recommendations?

What video editing software would you recommend on Ubuntu (or Linux in general) and why?  It can be for either beginners or experienced users.  Please only place one piece of software per response and include details to what makes it great!


I want my battery to remain healthy. I used to charge it full then remove the charger after it's done, then put it back on when it goes down to 10% .. However this is becoming hectic and I was wondering if I can keep it plugged in the whole day and probably remove just an hour or so before going to sleep.  What is the best way to charge and discharge my Retina Macbook Pro while keeping the battery healthy ?

My friend told me that I need to disconnect the power cord when the battery is fully charged. Otherwise, I will shorten the life of the battery.  Other people say you should drain it once a month or point out that for long term storage, you should charge it to 50% and then periodically (3 to 6 months) bring it back to 50% and store it again.  I am going to use my laptop at home 90% of the time. So, I plan to have the power cord connected all the time.  I'd prefer to just plugging in my MacBook Pro and letting it be on charge long term and occasionally taking it away from the charger when I'm not at home or my desk.  Are these specific recommendations worth the inconvenience?


I am aware of the command   /usr/lib/update-notifier/apt-check --human-readable   which gives output like  7 packages can be updated. 0 updates are security updates.   but how can I list only the security patches I need to install on my current Ubuntu?  On CentOS we can use  yum check-update --security   Is there an equivalent command in APT?

I need to list (not count or install) all pending security updates on an Ubuntu 14.04 system.  I've read the post  and its accepted answer (apt-show-versions | grep upgradeable | grep security) does indeed give me a list.  However, that command lists 62 pending security updates.  /usr/lib/update-notifier/apt-check tells me that I have 75 pending security updates, but doesn't seem to have a way to list them.  How can I reconcile these two numbers?  Is one of the two commands doing something other than what I want?


I was reading the steps over at  but I don't see the 2nd gen Nexus 7 ever mentioned.  It's also not in the FAQ, and before I follow through with it I just wanted to make sure this is supported on the 2nd gen Nexus as well.  I see no reason it shouldn't work, just wanted to make sure before I give it a go.

Can anyone tell me whether the information at "" still holds for the 2nd generation Nexus 7?  I'm thinking that there may be new compatibility issues, since the hardware/chipset changed.  If the images don't work for Nexus 7 (2013), are there any plans to migrate to and support this device?  Thanks for any help and advice.


I am loving the winter bash and I love that there are things to do on your phone to get a hat. But then you can't see them on the phone. You can't even see a list of earned hats. I am using the android app.

I don't hate hats. Proof:    Yet, the Android app isn't showing them:    Saw  asking for hats in the Android app, and , also saying essentially "it's not worth it".  Fine.  Except, the iFolks got their hats on this year:    That's religion-based discrimination (totally! don't deny it!) and I demand nothing but fairness.  All apps should be born equal.


df -h shows:  df -h Filesystem     Size    Used   Avail Capacity  Mounted on /dev/ada0p2    1.9G    256M    1.5G    14%    / devfs          1.0K    1.0K      0B   100%    /dev /dev/ada0p4    804G     34G    706G     5%    /usr /dev/ada0p5     93G    3.5G     82G     4%    /var   but, du -sh shows:  du -sh /var 3.5G    /var   Why? df is telling me i have no space out of the 93G but when i check the file size of the /var/ directory it amounts to 3.5G?  Can any one explain why this is please?

I've just had a message today from Ubuntu 11.04 that I have only 100 MB left, so I cleaned up some files, and I got 200 MB. Then, after a couple of hours, suddenly I have only 26 MB?! I tried df, du via mount --bind, /forcefsck with reboot - nothing could should what the culprit is - finally I searched big files, realized /var/log/syslog is 100MB+ and /var/log/kern.log is 200MB+ - blanked them with sudo bash -c 'echo > ...' and rebooted, and now I have some spare MB.  But now, I realize I have another problem with df:  $ df -h Filesystem            Size  Used Avail Use% Mounted on /dev/sda5             9,7G  8,8G  385M  96% / none                  963M  696K  962M   1% /dev none                  969M   12K  969M   1% /dev/shm none                  969M  252K  969M   1% /var/run none                  969M     0  969M   0% /var/lock /dev/sda6             9,7G  8,1G  1,1G  89% /media/disk  $ df -h --block-size M Filesystem           1M-blocks      Used Available Use% Mounted on /dev/sda5                9845M     8960M      385M  96% / none                      963M        1M      962M   1% /dev none                      969M        1M      969M   1% /dev/shm none                      969M        1M      969M   1% /var/run none                      969M        0M      969M   0% /var/lock /dev/sda6                9845M     8235M     1110M  89% /media/disk   Note so for /, it says there are 9845M total; and Used 8960M - then remaining would be 9845-8960 = 885 M, however, here I have only 385M Available.  Also, for /media/disk, it says total 9845M, Used 8235M - then remaining would be 9845-8235 = 1610, however, here I have only 1110M Available.  In both cases, there is exactly 500 MB difference.  Where did this difference come from - and can I reclaim it?  Here is also lsof | grep 'deleted' - can't see nothing suspicious here:  $ lsof | grep 'deleted' nautilus  1911 user   21u      REG        8,5   142760     260562 /home/user/.local/share/gvfs-metadata/home (deleted) nautilus  1911 user   22w      REG        8,5    32768     268807 /home/user/.local/share/gvfs-metadata/home-fe882154.log (deleted) python    1919 user    8u      REG        8,5     4096     392258 /tmp/ffiqRK968 (deleted) python    2165 user    5w      REG        8,5        0     132261 /home/user/.[SNIP].lock (deleted) python    2166 user    5w      REG        8,5        0     132261 /home/user/.[SNIP].lock (deleted) python    2185 user   21r      REG        8,5   142760     260562 /home/user/.local/share/gvfs-metadata/home (deleted) python    2185 user   22r      REG        8,5    32768     268807 /home/user/.local/share/gvfs-metadata/home-fe882154.log (deleted) gnome-ter 2279 user   27u      REG        8,5      640     392575 /tmp/vte5KDX2X (deleted) gnome-ter 2279 user   28u      REG        8,5     4936     392605 /tmp/vteKRDX2X (deleted) gnome-ter 2279 user   29u      REG        8,5      648     392947 /tmp/vteMZDX2X (deleted) ubuntuone 2544 user   17u      REG        8,5     4096     392335 /tmp/ffiMErq0V (deleted) bamfdaemo 3235 user   12r      REG        8,5   143868     269077 /home/user/.local/share/gvfs-metadata/root (deleted) bamfdaemo 3235 user   13r      REG        8,5    32768     272310 /home/user/.local/share/gvfs-metadata/root-18092a02.log (deleted) firefox   5291 user   59u      REG        8,5    33288     132262 /var/tmp/etilqs_YdeZiWSd5iQwJ4U (deleted) firefox   5291 user   60w      REG        8,5    32768     132271 /var/tmp/etilqs_MNLXhEaEqoXMm9b (deleted) firefox   5291 user   70u      REG        8,5    34952     132297 /var/tmp/etilqs_yXDdwVeMxmmdpNz (deleted)


Let $(X, \rho)$ be a compact metric space. Prove that $X \times X$ is compact in the product topology.  I am thinking that you need to construct an open cover of $X$, then obtain the finite subcover that follows from the compactness of $X$. Then somehow use the cross product of the open cover to make a finite subcover subcover of $X \times X$.  I am just not sure exactly how notation etc should go.  Thank you!

Prove that if two sets $A$ and $B$ are compact then so is their Cartesian product $A \times B = \{(a,b): a \in A, b\in B\}$.   The hint is to use Bolzano Weiertrass theorem and an argument of sequence to proof the statement.


I'm doing some animation and when I try to render the animation it doesn't show the anything, but it does show it in render-view mode in the 3D Viewport.  I've tried turning sequencing off, nothing.  This is my viewport

A scene I made is not rendering, at all. This grey screen stays the same and nothing changes.  Here are my settings:  [


I  am trying to run the following latex document, my biber has been set up well in Texmaker    but get an error when I compile:    Here is the error I am getting from Texmaker:     ERROR - Cannot find control file 'Chapter 2.bcf'! - Did latex run successfully on your .tex file before you ran biber? INFO - ERRORS: 1   \documentclass[12pt]{report} \usepackage[utf8]{inputenc} \usepackage[backend=biber, citestyle=numeric,  natbib=true, sorting=nyt]{biblatex} \usepackage{csquotes} \usepackage{amsmath} \usepackage[nottoc,numbib]{tocbibind} \usepackage[T1,T2A]{fontenc} %\usepackage[titletoc,toc]{appendix} \usepackage{float} \usepackage{tabulary} %\bibliography{thesis} % or \addbibresource{thesis.bib} \usepackage{array} \newenvironment{conditions}   {\par\vspace{\abovedisplayskip}\noindent\begin{tabular}{>{$}l<{$} @{${}={}$} l}}   {\end{tabular}\par\vspace{\belowdisplayskip}} \makeatletter \def\blx@maxline{77} \makeatother  \newrobustcmd*{\parentexttrack}[1]{%   \begingroup   \blx@blxinit   \blx@setsfcodes   \blx@bibopenparen#1\blx@bibcloseparen   \endgroup}  \AtEveryCite{%   \let\parentext=\parentexttrack%   \let\bibopenparen=\bibopenbracket%   \let\bibcloseparen=\bibclosebracket}  \makeatother \usepackage[usenames,dvipsnames]{color} \usepackage[hyperfootnotes=false]{hyperref} \usepackage{float} \hypersetup{  colorlinks=true,  citecolor=Blue,  linkcolor=Blue,  urlcolor=Red } \hypersetup{  citebordercolor=.1 1 .1,  linkbordercolor=1 0 0,   urlbordercolor=1 0 0, } \renewcommand\nameyeardelim{, } \renewcommand{\baselinestretch}{1.5} \usepackage[margin=1in]{geometry} \usepackage[margin=1in]{geometry}  % set the margins to 1in on all sides \usepackage{graphicx}              % to include figures \usepackage{caption} \usepackage{amsmath}               % great math stuff \usepackage{amsfonts}              % for blackboard bold, etc \usepackage{amsthm}                % better theorem \usepackage[utf8]{inputenc} \usepackage[UKenglish]{babel} \usepackage{comment}  \usepackage[toc,page]{appendix} \usepackage[numbered,framed]{mcode} %\usepackage[titletoc]{appendix} % various theorems, numbered by section \newtheorem{thm}{Theorem}[section] \newtheorem{lem}[thm]{Lemma} \newtheorem{prop}[thm]{Proposition} \newtheorem{cor}[thm]{Corollary} \newtheorem{conj}[thm]{Conjecture} \newtheorem{definition}{Definition}[section] % numbers \newtheorem{exmp}[thm]{Example} % same for example numbers  \DeclareMathOperator{\id}{id}  \newcommand{\bd}[1]{\mathbf{#1}}  % for bolding symbols \newcommand{\RR}{\mathbb{R}}      % for Real numbers \newcommand{\ZZ}{\mathbb{Z}}      % for Integers \newcommand{\col}[1]{\left[\begin{matrix} #1 \end{matrix} \right]} \newcommand{\comb}[2]{\binom{#1^2 + #2^2}{#1+#2}} \renewcommand\appendix{\par   \setcounter{section}{0}   \setcounter{subsection}{0}   \setcounter{figure}{0}   \setcounter{table}{0}   \renewcommand\thesection{Appendix \Alph{section}}   \renewcommand\thefigure{\Alph{section}\arabic{figure}}   \renewcommand\thetable{\Alph{section}\arabic{table}} } \begin{document} \end{document}

I used  to export my auxiliary files into a different directory. Basically i just add -aux-directory=build in Options -> Configure -> Commands and added the build folder into Options -> Configure -> Build -> Build Options -> Additional Search Paths -> Log. This succesfully generates all the auxilliary files in the build folder and it's also possible to generate the pdf. Unfortunately biber has a problem with this setup:  Prozess gestartet: biber.exe "MyFile" INFO - This is Biber 1.7 INFO - Logfile is 'MyFile.blg' ERROR - Cannot find control file 'MyFile.bcf'! - did you pass the "backend=biber" option to BibLaTeX? INFO - ERRORS: 1  I guess i have to specify the correct path for biber somewhere in Texstudio. Does anyone know where i have to update the path?  someone had similar problems. Also i'm not sure if the solution of   applies to my situation.


My group has agreed that we will not use miniatures or tiles to play AD&D 1e. Instead, we will rely upon the "Theater of the Mind" style gameplay. This will be a major change for me as a DM, as I played 4e strictly with miniatures and maps.   I believe that we will still assign the group a "cartographer" (as the DMG suggests) but this will only be used (I assume) to have a general idea of tracking the players' movement over time.  My question is, what general advice do you have to somebody planning to DM 1e with as little intervention of minis, maps, etc. as possible?

I think the title says it all. Let's say you're mastering a game without the benefit of miniatures, maps, or any kind of physical representation of the environment. How would you keep track of details like line-of-sight, ranged attack viability, and all the other small nuances which go with creating a "believable-enough" environment in which your PCs live and thrive?  (I admit that @LoganMacRae, who is my own DM, is an inspiration for this question. He does this with panache, and in my one-off, I feel like I have some mighty big shoes to fill!)


I am implementing a binary search tree in java, writing the methods recursively. I did the insert methods, and now I am stuck on the first traversal method, the in order one. When I call it in my test code, after adding a few elements, (tree.inorderTraversal), I get a null pointer exception at the rescursive in order method, and I don't see why. Could it be something wrong with the insert method?   public void insertInBinaryTree(E newItem) {     BinaryTreeNode<E> node = new BinaryTreeNode<E>(newItem);     if (root == null) {         root = node;     } else {         insert(root, newItem);       } }  // Recursively insert a node containing newItem into a non-empty tree. Used // by insertInBinaryTree private void insert(BinaryTreeNode<E> treeNode, E newItem) {     if (newItem.compareTo(treeNode.getItem()) < 0) {         if (treeNode.getLeftChild() != null) {             insert(treeNode.getLeftChild(), newItem);         }         else {             treeNode.setLeftChild(new BinaryTreeNode<E>(newItem));         }     }     else {         if (treeNode.getRightChild() != null) {             insert(treeNode.getRightChild(), newItem);         }         else {             treeNode.setRightChild(new BinaryTreeNode<E>(newItem));         }     } }  // If the tree is not empty, initiates an inorder traversal. This should // print all items in ascending order. If the tree is empty, just prints // "Tree is empty" public void inorderTraversal() {     System.out.println("\nInorder Traversal");      if (root == null) {         System.out.println("Tree is empty");     } else {             inorder(root);     }   }  // Recursive inorder traversal of a non-empty tree. Used by // inorderTraversal. private void inorder(BinaryTreeNode<E> treeNode) {     inorder(treeNode.getLeftChild());     System.out.print(treeNode.getItem());     inorder(treeNode.getRightChild()); }

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?


i had installed Windows 7 in my laptop and tried to install ubuntu recently. This attempt  damaged OS windows 7 and unable to boot up. I have tried to repair with Win7 DVD and failed. Again I have tried to install Windows 7 with DVD, found no separate partition (earlier there were 3 nos of partition) in hard disk. Expecting all data remains in HDD. I would like to install Win 7 without deleting existing data. Kindly help me to install OS without formatting / loosing the data.

What steps can I take to try to recover lost or inaccessible data from any storage device?  Answers:   This applies to any computer storage device, e.g. internal/external hard drives, USB sticks, flash memory. The most important thing is to STOP using it, any type of I/O can ruin your chances of a recovery.     We have separate questions covering common problems with USB flash drives in greater detail:


I have two sets of count data, one with the application of drug and another without applying the drug. Let's assume the data at condition $1$ are $X_i^1$ and $X_j^1$. Similarly for condition $2$, the data is $X_i^2$ and $X_j^2$. Moreover we assume that the individual count data comes from a poisson distribution. So $X_i^1 \sim \lambda_i^1$, $X_j^1 \sim \lambda_j^1$, $X_i^2 \sim \lambda_i^2$, $X_j^2 \sim \lambda_j^2$. Now I frame my hypothesis as follows,  \begin{align} H_0 : \frac{\lambda_i^1}{\lambda_j^1} &= \frac{\lambda_i^2}{\lambda_j^2}  & H_1 : \frac{\lambda_i^1}{\lambda_j^1} & \neq \frac{\lambda_i^2}{\lambda_j^2} \end{align}  So the intuition is if the ratio of rates does not change across conditions then we accept the null hypothesis, otherwise we reject it. I am searching for a mathematical analysis on this framework, that is, what should be the estimates for $\lambda$ in this situation. Please let me know if there is any paper that explained it.

So, for fun, I am taking some of the data of calls from the call center I work at and trying to do some hypothesis testing on them, specifically the number of calls received in a week, and using a Poisson distribution to fit it. Due to the subject matter of my job, there are two types of weeks, let's call one of them on-weeks where I hypothesize there are more calls, and off-weeks where I hypothesize there are fewer.  I have a theory that the $\lambda$ from on-weeks (let's call it $\lambda_1$) is larger than that of the one from off-weeks (let's call it $\lambda_2$)  So the hypothesis I want to test is $H_0: \lambda_1 > \lambda_2, H_1: \lambda_1 \leq \lambda_2 $  I know how to test for one parameter (say  $H_0: \lambda_1 > 1, H_1: \lambda_1 \leq 1 $) but not so sure how to go about doing 2 given a data set. Let's say I take two week's worth of data from each one $X_1 = 2$ and $X_2 = 3$ for the off-week and $Y_1 = 2$ and $Y_2=6$ for the on-week. Can someone help walk me though this simpler version such that I can apply it to a larger data set? Any help is appreciated, thank you.


In the back-end of my database (phpmyadmin), and in my_table>Operations directory, the setting for my Collation is already utf8_general_ci. If it's already in utf8_general_ci, do I have to change the Collation of each field/column of that table?  Sample code:  <form action="insert.php" method="POST">     <input type="text" name="field1">     <input type="submit"> </form>   insert.php  $stmt = $con->prepare("INSERT INTO table (column1) VALUES (?)"); $stmt->bind_param('s',$_POST["field1"]);   Note:  Special characters like ñ is now inserting properly after the first method above, but when a user inputs ’ (not '), the character will be changed to â€™.  Question:  How can I insert properly special characters without disrupting the other characters?

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.


I'm using the following function in Python 2.7.3 and Kivy 1.8.0 to fade-in a Grid widget:  def __init__(self, **kwargs):      # ...Init parent class here...      self.grid.opacity = 0.0      Clock.schedule_interval(self.show, 1 / 10)  def show(self, value):     if self.grid.opacity == 1.0:         return False     else:         self.grid.opacity += 0.1   show() is executed infinitely, self.grid.opacity == 1.0 always returs False, so the scheduler never removes the function.  I thought, and the documentation says, that opacity is a NumericProperty which defaults to 1.0, but I'm changing its value right before show() is called.  This is what I've tried:  if self.grid.opacity == NumericProperty(1.0):  if float(self.grid.opacity) == 1.0:   It doesn't work. Also, I'm sure self.grid.opacity is 1.0 and type() retrieves float right before I make the comparison.  This works:  if str(self.grid.opacity) == "1.0":   But obviously I don't like this solution.  Any ideas?

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


I know getting a user's registration date should be pretty basic using php, but I was wondering if this was possible directly through mySQL.  I use apache's phpmyadmin and when creating a new column I noticed the type DATE and the default value CURRENT_TIMESTAMP, so I was wondering if it would be possible to add a type of column that automatically set the current date when a new line is created (so when a new user is registered) ?  If this possible and is there any constraints to this ? How can I do this ?  Thanks !

How do you set a default value for a MySQL Datetime column?  In SQL Server it's getdate(). What is the equivalant for MySQL? I'm using MySQL 5.x if that is a factor.


The question might look clear from a viewpoint of a non-physics guy but let me be more specific.  Can we say quantum leaps or waves or maybe the universe itself are completely indeterministic or do the scientists say that because of lack of information?  I am asking this because there are people telling me the you cannot know whether it is indeterministic because you might not have all the information needed to calculate the behaviour of the phenomenon. Also, some people argue that chaos is completely indeterministic.   Which is the case and why?

I'm not sure if this is the right place to ask this question. I realise that this maybe a borderline philosophical question at this point in time, therefore feel free to close this question if you think that this is a duplicate or inappropriate for this forum. Anyway, I'm an electrical engineer and I have some basic knowledge of quantum mechanics. I know that Schrödinger's equation is deterministic. However, quantum mechanics is much deeper than that and I would like to learn more. If this question is not clearly answerable at this point than can anyone point out some recognized sources that try to answer this question. I would appreciate it if the source is scientific and more specifically, is related to quantum theory.


I am physically disabled. I have spinal muscular atrophy, a degenerative neuromuscular disease. I am wheelchair-bound and am nearly quadriplegic. This is not to complain, but rather to provide context. My Ph.D. thesis defense is scheduled for less than two months from now. It has been a long road. I am tired. It has also been literally a long time. It has been 10 years since I got my bachelor's degree and started the Ph.D. program. I only made it this far with the tireless support of my extraordinary advisor and a wonderful department. They never gave up on me. I am currently struggling with guilt, or shame, that it has taken me so long to get to the defense. My advisor, my department, and my family have not made me feel this way. But I still feel bad that it has taken me so long. How do I deal with feelings of guilt, shame, and inadequacy? I believe that all people have value, regardless of their success or failure or their intellectual ability. But somehow I guess I don't believe this applies to me. I am looking for help, support, or anecdotes related to feelings of guilt/shame/inadequacy in academia in particular (especially Ph.D. programs), and not necessarily about life in general.

is a psychological phenomenon wherein an individual is convinced that they do not deserve the success that they have achieved despite (perhaps extensive) empirical evidence to the contrary.  Some people with imposter syndrome doubt their own ability level. For me, this usually manifests in the thought:  I've somehow convinced everyone into believing that I'm actually good at this.  followed by the horrifying notion that eventually I'll be found out and my world will collapse. I believe that the imposter syndrome is not uncommon in academia. I'm interested to know how other people here have experienced and dealt with it.  In particular, I'm looking for actual tactics that someone might use to combat imposter syndrome.   Why I asked this question: Beyond the obvious reason that this is something I have struggled with for many years and only recently gotten a handle on myself, there's also some evidence that merely realizing that other people experience imposter syndrome helps fellow imposters. As a grad student, I've managed to meet a fair number of people who are in their own struggles with imposter syndrome; however, the tactics and self-trickery that have helped me don't always speak to them and perhaps someone else's methods might.


I am trying to insert data from my mother language (Sinhala) into my mysql table. But MySQL displays my chracters as question marks.   This is how I test it:   CREATE DATABASE sinhala_test; USE kindheart;  ALTER DATABASE sinhala_test CHARACTER SET  utf8   COLLATE utf8_general_ci  CREATE TABLE IF NOT EXISTS `category` (   `category_id` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,   `name_si` VARCHAR(100) COLLATE utf8_unicode_ci NOT NULL,   `description_si` TEXT COLLATE utf8_unicode_ci NOT NULL,   `last_update` TIMESTAMP NULL DEFAULT CURRENT_TIMESTAMP,   PRIMARY KEY (`category_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;  INSERT INTO `category` VALUES (1,'පොත් පත් සහ පාසල් උපකරණ','නවතම පොත් පත් අවශ්‍යතා ඇතුළු සියළුම පාසැල් හා අධ්‍යාපන මෙවලම්.',NOW());   This is what can I get from MySQL command line:  mysql> select * from category\G *************************** 1. row ***************************    category_id: 1        name_si: ???? ??? ?? ????? ????? description_si: ???? ??????? ????/ ?????? ?? ?? ???? O/L, A/L ??????? ?????, ???????, ??????? ????? ?????? ???? ??? ????????. ????/???????/???????????/??????/?????? ????/ ????/????/?????? ????? ?????? ?????? ?? ???????? ??????.    last_update: 2018-05-20 11:11:20   Can anybody tell me how can I fix this problem?   NOTE: When inserting from phpMyAdmin its correctly work.


My code is  <$php $database = new mysqli("127.0.0.1", "root", "root", "picture"); $new_album = "CREATE TABLE `נסיון` ("     . "id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,"     . "pic VARCHAR(20) NOT NULL,"     . "des VARCHAR (40) )"; $database->query($new_album); ?>   but if i copy the query as  CREATE TABLE `ש` ( id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY, pic VARCHAR(20) NOT NULL,des VARCHAR (40) )    strait into the phpMyAdmin query segmant, it creates the table with the hebrew currect.  in the head tag, there is a <meta charset="windows-1255"/> which is working when i print or echo anything in hebrew.is there anything else i could change in the page settings to fix this?


For which conditions is the union of two subspaces $W_1 \lor W_2$ also a subspace?  So $W_1$ is a subspace and $W_2$ is a subspace, hence we can choose $u \in W_1$ and $v \in W_2$ and for the union we have $u + v$.  So the vector $(u + v)$ must lie in the intersection of these subspaces?  Thanks for helping me.

I'm having a difficult time understanding this statement. Can someone please explain with a concrete example?


My C language teacher claims that all variables must be defined before any operation. I can somehow recall it's a very old feature of C (no later than 1990) but I can't reproduce it with GCC 7.2.0.  My teacher claims this:  int main(){     int a; /* Valid */     a = 1; /* An operation */     int b; /* Invalid because an operation has already occurred */     return 0; }   I tried compiling with  gcc test.c -std=c89 -Wall -Wextra -pedantic   but it gives no error, not even a warning.  How can I verify (or prove wrong) that statement?

I long thought that in C, all variables had to be declared at the beginning of the function. I know that in C99, the rules are the same as in C++, but what are the variable declaration placement rules for C89/ANSI C?  The following code compiles successfully with gcc -std=c89 and gcc -ansi:  #include <stdio.h> int main() {     int i;     for (i = 0; i < 10; i++) {         char c = (i % 95) + 32;         printf("%i: %c\n", i, c);         char *s;         s = "some string";         puts(s);     }     return 0; }   Shouldn't the declarations of c and s cause an error in C89/ANSI mode?


Is it possible to emulate a linked list in java by nesting a class within a class? I have tried to implement, but the summation function doesn't move passed the first class. This generates a 1 no matter what integer it is given:  public class Example {     static class Item{        boolean b;        double d;        Item nextItem;        Item (boolean b, double d, Item nextItem) {           this.b = b;           this.d = d;           this.nextItem = nextItem;        }     }      static double f(Item item) {        if(item != null)           return (item.b ? item.d : 0.0) + f(item.nextItem);        else           return 0.0;     }      static public void main(String args[]) {        int n = Integer.parseInt(args[0]);        Item firstItem = null;        firstItem = new Item((1%2!= 0), Math.sqrt(1), null);        if(n > 1){           Item nextItem = firstItem.nextItem;           for (int i = 2; i <= n; i++)  {              nextItem = new Item((i%2!=0), Math.sqrt(i), null);              nextItem = nextItem.nextItem;           }        }        double s = f(firstItem);        System.out.println("sum = " + s);    } }

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?


Let $\alpha:[0,1] \to R$ be the . Evaluate $$\int_{0}^{1}xd\alpha $$and $$\int_{0}^{1}x^2d\alpha.$$  I know that the Cantor function is continuous and monotone increasing, how can I evaluate the integral above using the properties of $\alpha$? Can someone help me solve this question?

Calculate the integral $$\int_{[0,1]}x^2d\mu_F$$ where F is the cantor function. Use the following hints about the cantor function:  $F(1-x)=1-F(x)$ $F(\frac x 3)=\frac{F(x)}{2}\quad\forall x\in[0,1]$ $F(0)=0$   I thought that $$\int_{[0,1]}x^2d\mu_F=\int_{[1,0]}(1-x)^2d\mu_{F}=\int_{[0,1]}x^2d\mu_{1-F(x)}$$ but here I'm stuck and I don't know how to continue calculating this integral. Furthermore, how do we use the second and third properties when given the cantor function above?


Sorry for my interruption. I am looking for an answer to this question: Calculating  $$\sum_{k=1}^{2002}r_k$$ in which $r_k$ is the remaining of $2^k$ divided by $2003$. I thought that $2$ was a primitive root of $2003$, but I was wrong, in fact $ord_{2003}(2) = 286$. I hope you can help me on this question.

Sorry for my interruption, I am looking for a solution to this question: Calculate $$\sum_{k=0}^{2001}\left \lfloor \frac{2^k}{2003}\right \rfloor$$ without using computational engines, with $\lfloor x \rfloor$ denoting the largest integer that does not succeed x. I hope you can answer this question. And sorry for my mistakes, English is my second language.