I want to check whether a patient object already exists in an ArrayList queue using the unique ID nhsNumber.  But when I add a patient to the queue who I know already exists in the queue, the following code does not detect it.  Any idea why this is?  public boolean checkIfInQueue(Patient p) {     // set nhsNumber equal to the nhsNumberLabel on the page     String nhsNumber = nhsNumberLabel.getText();     System.out.println("Checking if " + nhsNumber + " already in the queue");      // create boolean to state whether a person is in the queue or not (defaults to false)     boolean isInQueue = false;      for (int i = 0; i < Queue.queue.size(); i++) {       if (Queue.queue.size() == 0) {         System.out.println("Queue is empty");         isInQueue = false;         break;       } else if (Queue.queue.get(i).getNhsNumber() == p.getNhsNumber()) {         System.out.println(p.getFirstName() + " is already in the queue (checkIfInQueue() method)");         isInQueue = true;         break;       } else {         System.out.println(p.getFirstName() + " is not is the queue (checkIfInQueue() method)");         isInQueue = false;       }     }      return isInQueue;   }   thanks, K

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


My question gets cloned or duplicated on a different Q&A Site (not a different SE Site).  Question: No Microphone on CM12.1 Here's the , while here's the . It copied the exact same thing of my question / post, as well as the tags and the formattings; but it did not copy the edit / update and the comments (I can see no button there, to add a comment).  Thankfully, I searched / looked up my Question's Title. Upon looking at the site, it appears that they are also duplicating many other questions on SE (separated by  categories, located at the side / sidebar). Its welcome message says: (located at the upper part of the sidebar)  Welcome to Resdi Community, where you can ask questions and receive answers from other members of the community.  But, I did not post that on their "community", and I am not a member of their community.  I only post questions on Stack Exchange. I don't know if this is proper / right / legal, but they gave a credit to me.  They had put this:  asked Dec 29, 2016 in Android by Lloyd Dominic  But, what they don't give credit is that "This question came from Stack Exchange", or "This question is a copy of a question on Stack Exchange", or something similar to that ... Like I said, is this proper / right / legal?

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


I know that Number of  subsets of a set $S$ of size n ,  is given by the binomial sum      $\sum_{k=0} ^n \binom{n}{k}=2^n$ ,  n=1,2,3,..   elements    how we could conclude of prove this formula ? how to prove that this gives the number of subsets . where did this formula come from ?   PS:- i know how to prove $\sum_{k=0} ^n \binom{n}{k}=2^n$

Please help with this question. Show that for a finite set $A$ of cardinality $n$, the cardinality of $P(A)$ is $2^n$, where $P(A)$ is the power set of $A$. Thank you in advance for any help that is given.


Is the Trump travel ban only limited to citizens/nationals of the seven countries or even to people born in those countries? I was born in Libya, relocated to India when I was 4. We now live in HKG, but hold an Indian Passport. Am planning to visit family in the first week of March on a visitor visa issued 8 years ago. This is my first trip to the US. Am I likely to encounter trouble at the immigration desk?

Always been British and left Yemen as a young child many decades ago. But I was born there and it says so in my passport. Can I travel to the USA?  Same question applies to children born in any of the 7 countries banned by Trump.


Whats the use of mysqli_real_escape_string if the user inputs   /  \  '   in the input field ?  Are they really harmful ?  And if they are , what's the harm they do ?

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


I am trying to prove the parts of each component of the inverse matrix in the attached image. I have tried using differentials and then solving for the other components. (I'd like to solve it this way). Trying to solve for example, $\frac{d\theta}{dx}$ (in the bottom left of the inverse matrix [attached below]) $$x = r cos(\theta)$$ –> $$dx = cos(\theta)dr - rsin(\theta)d\theta$$Then observing that we are holding $r = constant$, thus $dr = 0$. I get that $\frac{d\theta}{dx} = \frac{- 1}{r sin(\theta)}$, which is close. I put this in a partial calculator and made $\theta$ a function of x and r, $\theta = cos^{-1}\left(\frac{x}{r}\right) = \cos^{-1}\left(\frac{x}{\sqrt{x^2 +y^2}}\right)$. Taking the $\frac{\partial \theta}{\partial x}$ I get the right answer due to r being a function of x and y. If I use the $cos^{-1}\left(\frac{x}{r}\right)$ and take the partial I get what I stated above ($\frac{d\theta}{dx} = \frac{- 1}{r sin(\theta)}$). Also I tried to replace dr in $dx = cos(\theta)dr - rsin(\theta)d\theta$ by using $r^2=x^2+y^2$ by replacing dr with $rdr = xdx + ydy$ where I assumed dy to be constant. Which yielded me the wrong answer. I'd like to improve my logical thinking so any advice on what I did would be great as well. Thank you! Summary: I am trying to prove using differentials (not partials) that $\frac{d\theta}{dx} = \frac{-sin(\theta)}{r}$

Given that $x =r\cos \theta$ and $y = r\sin\theta$, determine $\frac{\partial r}{\partial x}$ and $\frac{\partial \theta}{\partial x}$   Attempt:  I thought I'd calculate $\frac{\partial x}{\partial r}$, treat it as a fraction and say $\frac{\partial r}{\partial x} = 1/\frac{\partial x}{\partial r}$, however that doesn't work.  Then I thought I'd set $r = \frac{x}{\cos \theta}$ and differentiate about $x$, but this path leads to the same result above.  I'm not sure how $y = r\sin \theta$ comes into play here.  Official Answer:  $$ \frac{\partial r}{\partial x} = \cos \theta, \quad \frac{\partial \theta}{\partial x} = \frac{- \sin\theta }{r}$$


How to derive the equation in my question?

What is $V_{\alpha\beta}$?  And what is a symmetric,  potential energy matrix?  And why is there a linearized equation like this?


Trivial question but I am confused with the notation  If $p_{n-1}$ is a polynomial of degree $n-1$, is it   $\in$ the differentiability class  C^n$?   Obviously if $p_n$ is a polynomial of degree $n$, then it is in $C^n$   as it is continuous as well as having its first $n$ derivatives continuous.

Are polynomials infinitely many times differentiable?  If so, does it only mean that at some point we reach 0 and then we keep on getting 0?  Thank you!


I want to search for an regular expression with the function re-search-forward  When I tried using the examples from the page here:   specifically the regular expression \w\{20,\} used to search for a word with 20 letters or more, I get an error.   Here I am placing my cursor after the closing parenthesis in my Lisp buffer and pressing C-x C-e for evaluating it.   However, when I use the Regexp I-search via,  C-M-s it highlights the correct word as expected.   Why is this?

I've been playing around with emacs lisp, and I wanted to write a little function to do a regular expression search and replace.  I had a heck of a time getting the regular expression to work correctly because I didn't realize that all the special characters need to be double escaped when writing lisp code (but not when using query-replace-regexp interactively!).    So for example, using query-replace-regexp interactively you can use   ^\(.*\)[\t]-.*$   but when writing elisp code you need to double escape everything like so:   ^\\(.*\\)[\t]-.*$     I finally found a reference to this in a Steve Yegge , but I was wondering if anyone knew why this is?


After install 16.04, my wifi stopped working.  It recognizes it in Network Connections window, including my SSID and password.  It just wont connect.  Any suggestions?  *-network                       description: Ethernet interface        product: RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0        bus info: pci@0000:01:00.0        logical name: enp1s0        version: 05        serial: 08:9e:01:4c:37:0e        size: 100Mbit/s        capacity: 100Mbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=full firmware=rtl_nic/rtl8105e-1.fw ip=192.168.0.110 latency=0 link=yes multicast=yes port=MII speed=100Mbit/s        resources: irq:28 ioport:2000(size=256) memory:90004000-90004fff memory:90000000-90003fff   *-network UNCLAIMED        description: Network controller        product: BCM4313 802.11bgn Wireless Network Adapter        vendor: Broadcom Corporation        physical id: 0        bus info: pci@0000:02:00.0        version: 01        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list        configuration: latency=0        resources: memory:90100000-90103fff

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


I have a WD MyCloud 2TB NAS  running BusyBox Linux v1.20.2 and as I am getting a lot of sync errors I would like to flush the BusyBox and replace it with Ubuntu and install NextCloud on it.  Edit 1  Busybox is rather limited with the choice of commands to view hardware info so here is my humble try to get some hardware info to ask if Ubuntu is compliant with this.  The built-in processor:   root@XXXXX root # cat /proc/cpuinfo processor       : 0 model name      : ARMv7 Processor rev 1 (v7l) BogoMIPS        : 1594.16 Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls CPU implementer : 0x41 CPU architecture: 7 CPU variant     : 0x4 CPU part        : 0xc09 CPU revision    : 1  processor       : 1 model name      : ARMv7 Processor rev 1 (v7l) BogoMIPS        : 1594.16 Features        : swp half thumb fastmult vfp edsp neon vfpv3 tls CPU implementer : 0x41 CPU architecture: 7 CPU variant     : 0x4 CPU part        : 0xc09 CPU revision    : 1  Hardware        : Marvell Armada 375 (Device Tree) Revision        : 0000 Serial          : 0000000000000000   Memory    root@XXXXX root # cat /proc/meminfo MemTotal:         514528 kB MemFree:          106240 kB Buffers:           39040 kB Cached:           175168 kB SwapCached:            0 kB Active:           117600 kB Inactive:         160960 kB Active(anon):      57376 kB Inactive(anon):    24768 kB Active(file):      60224 kB Inactive(file):   136192 kB Unevictable:        6464 kB Mlocked:            6464 kB HighTotal:             0 kB HighFree:              0 kB LowTotal:         514528 kB LowFree:          106240 kB SwapTotal:       2097056 kB SwapFree:        2097056 kB Dirty:                 0 kB Writeback:             0 kB AnonPages:         70720 kB Mapped:            52864 kB Shmem:             15616 kB Slab:              37280 kB SReclaimable:      13728 kB SUnreclaim:        23552 kB KernelStack:        1672 kB PageTables:        13312 kB NFS_Unstable:          0 kB Bounce:                0 kB WritebackTmp:          0 kB CommitLimit:     2354304 kB Committed_AS:     392480 kB VmallocTotal:     515072 kB VmallocUsed:        7712 kB VmallocChunk:     490496 kB   Disk Partitions    root@XXXXX root # df Filesystem           1K-blocks      Used Available Use% Mounted on %root%                   55529     33808     18854  64% / /dev/ram0                55529     33808     18854  64% / mdev                    257248        32    257216   0% /dev /dev/sda3               999576    211756    761116  22% /boot /dev/sda7               999576      1684    971188   0% /usr/local/config /dev/loop0              102144    102144         0 100% /usr/local/modules tmpfs                     1024         0      1024   0% /mnt tmpfs                    40960      8320     32640  20% /var/log tmpfs                   102400      1728    100672   2% /tmp /dev/sda4               951192      2384    932424   0% /mnt/HD_a4 /dev/sda2            1914463512   4762048 1890233996   0% /mnt/HD/HD_a2   Linux/Kernel Info   root@XXXXX root # cat /proc/version Linux version 3.10.39 (kman@kmachine) (gcc version 4.6.4 (Linaro GCC branch-4.6.4. Marvell GCC Dev 201310-2126.3d181f66 64K MAXPAGESIZE ALIGN) ) #1 SMP Sun Aug 2 12:24:50 CST 2015 2014T20p4 Build-git3e9fe59   Can Ubuntu 16.04 lts server or Ubuntu Core run on this architecture?  Edit 2  If Ubuntu supports the ARMADA 375, how can this be installed on this headless NAS?

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


Having played with WSL over several releases, I find that I'm getting various strange errors and inconsistencies.  I would like to reset the WSL environment back to defaults - what is the best way?

Related:   When installing a WSL distribution outside of the Microsoft Store (for example on a restricted network, see linked), many of the standard means of interacting with that distribution are not available.  In my example, when I go through Settings > Apps and Features, the distro is not shown in the list and the management features are not available.  If I get my manually installed linux instance into a bad state, what is the correct way to reset it and bring it back to a fresh install?  Edit:  Examples of a 'bad state' encountered thus far include a BSOD during an 'apt-get update', leading to an unrecoverable state.  Also, performing multiple configuration changes to troubleshoot a problem, removing or disabling services and installing other packages without keeping close track of what was changed, with a desire to "start fresh" to test if the solution arrived at does in fact work on its own..


I have a dual monitor setup. 2nd monitor has a VGA connection. Resolution 1366x768 not found in display settings or randr. How do I add resolution 1366x768 to output.  I have tried this:  VGA-0 connected primary 1024x768+0+190 (normal left inverted right x axis y axis) 0mm x 0mm    1024x768       60.0*     800x600        60.3     56.2      848x480        60.0      640x480        59.9     Did  xrandr -s 1366x768:  Size 1366x768 not found in available modes   And xrandr --output vga-0 --mode 1366x768:  warning: output vga-0 not found; ignoring

I installed Ubuntu and the resolution of the desktop is so big that it only shows about 50% of the screen, but is shows up normal while using command line.   What should I type in the command line to change the desktop screen resolution?


i like to set timer for calculating execution time in c# for particular process in my execution. how can i do this

I need to find a bottleneck and need to accurately as possible measure time.  Is the following code snippet the best way to measure the performance?  DateTime startTime = DateTime.Now;  // Some execution process  DateTime endTime = DateTime.Now; TimeSpan totalTimeTaken = endTime.Subtract(startTime);


I have the following table:  chr [1:1000] "10/16" "1/5" "6/16" "2/5" "7/11" "6/6" "5/5" "2/5" "14/16" "3/5" "5/5" "7/14" "9/9" "8/9" "7/9" "4/9" "5/5" "1/5" "6/9" "14/16" ...   I want to save this as csv, but when I open csv file the format automatically changes to "date", so I get Oct-2016, 1-May, June-2016 and so on...  How can I export the table "as is"

Does anyone happen to know if there is a token I can add to my csv for a certain field so Excel doesn't try to convert it to a date?  I'm trying to write a .csv file from my application and one of the values happens to look enough like a date that Excel is automatically converting it from text to a date.  I've tried putting all of my text fields (including the one that looks like a date) within double quotes, but that has no effect.


Just out of curiosity I would like to ask. By searching through the web I could not find an answer yet.  Can "most of which" be used in the beginning of a sentence? Here is an example of a sentence for which I would like to know whether I can make two out of it.     Numerous articles were published on the topic of "Self-Assmebled Monolayers", most of which indicate that isocyanide binds through its terminal carbon atom.

"All of them, that is, but Storm."  Is the above line a sentence fragment, and if so, why?  Thanks.


Running ldd on an executable gives the output displayed below.  How can the output be parsed for the library names in the first column and their existence tested on another computer, giving output similar to ldd's output shown below, eg via a remote SSH command, or with the output copied to the target computer and tested there?       linux-gate.so.1 =>  (0xb7728000)     libpthread.so.0 => /lib/i386-linux-gnu/libpthread.so.0 (0xb76f9000)     libdl.so.2 => /lib/i386-linux-gnu/libdl.so.2 (0xb76f4000)     libX11.so.6 => /usr/lib/i386-linux-gnu/libX11.so.6 (0xb75bf000)     libgdk_pixbuf-2.0.so.0 => /usr/lib/i386-linux-gnu/libgdk_pixbuf-2.0.so.0 (0xb759e000)     libgtk-x11-2.0.so.0 => /usr/lib/i386-linux-gnu/libgtk-x11-2.0.so.0 (0xb7136000)     libgdk-x11-2.0.so.0 => /usr/lib/i386-linux-gnu/libgdk-x11-2.0.so.0 (0xb7087000)     libgobject-2.0.so.0 => /usr/lib/i386-linux-gnu/libgobject-2.0.so.0 (0xb7038000)    In a more general manner given a list with some filenames which are in a given column or can be extracted via a regular expression how can their existence be checked for and the output formatted as list with their paths if they exist or some other text stating if they don't exist?

There is an executable I want to install on a computer that I can't recompile that wasn't built as a package, and I want to download the libraries it requires to run them.  Below is part of the output from running ldd on it  libpango-1.0.so.0 => /usr/lib/i386-linux-gnu/libpango-1.0.so.0 (0xb702f000) libcairo.so.2 => /usr/lib/i386-linux-gnu/libcairo.so.2 (0xb6f64000) libatk-1.0.so.0 => /usr/lib/i386-linux-gnu/libatk-1.0.so.0 (0xb6f43000) libsqlite3.so.0 => /usr/lib/i386-linux-gnu/libsqlite3.so.0 (0xb6e9e000) libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xb6cf4000) /lib/ld-linux.so.2 (0xb786e000) libxcb.so.1 => /usr/lib/i386-linux-gnu/libxcb.so.1 (0xb6cd3000) libgio-2.0.so.0 => /usr/lib/i386-linux-gnu/libgio-2.0.so.0 (0xb6b7c000) libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xb6b4f000)   Is there a tool that can use this information to select which packages should be downloaded or better yet extract only the libraries listed and their dependencies, in order to minimize the disk usage? The system is running on a headless VM and the program will be displayed via VNC.  Although I suspect that a full blown graphics desktop will supply most of the libraries needed I want to download only the required libraries, their dependencies and just enough of the X Windows package to support it.


I would like to install openbable on Ubuntu, but I am having problems.  The Ubuntu version I'm running apparently does not have any package for this application.  How can I install it? I'm new to Ubuntu.

When I try to install any package through the command line, I get an error.   $ sudo apt-get install <package> Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package <package>   Can anyone help me on this?


I read big sections of a file as "blobs" of data to char arrays. I know how these blobs are structured, and have created classes for the different structures. Then I want to cast the read char arrays to arrays of appropriate class objects.  This has worked well for certain cases, but I have gotten to a case where alignment / padding of the class members is an issue.  Here is a minimal example, but instead of getting data from a file, I define the data in data_i1, data_d1 and data_i2, then cast it to c_data.  c_data represents the data read from the file and contains data_i1, data_d1 and data_i2 twice.  Without alignment being a problem, if I cast c_data to and array of Data, I should get the initial data in Data[0] and Data[1].  #include <iostream>  class Data { public:     int     i1[2];     double  d1[3];     int     i2[3]; };   int main() {     //Setting some data for the example:     int     data_i1[2] = {  1,   100};          //2 * 4 =  8 bytes     double  data_d1[3] = {0.1, 100.2, 200.3 };  //3 * 8 = 24 bytes     int     data_i2[3] = {  2,   200, 305   };  //3 * 4 = 12 bytes                                                 //total = 44 bytes      //As arrays the data is 44 bytes, but size of Data is 48 bytes:     printf("sizeof(data_i1) = %d\n",    sizeof(data_i1));     printf("sizeof(data_d1) = %d\n",    sizeof(data_d1));     printf("sizeof(data_i2) = %d\n",    sizeof(data_i1));     printf("total size      = %d\n\n",  sizeof(data_i1) + sizeof(data_d1) + sizeof(data_i2));     printf("sizeof(Data)    = %d\n",    sizeof(Data));       //This can hold the above that of 44 bytes, twice:     char c_data[88];      //Copying the data from the arrays to a char array     //In reality the data is read from a binary file to the char array     memcpy(c_data +  0, data_i1,  8);     memcpy(c_data +  8, data_d1, 24);     memcpy(c_data + 32, data_i2, 12); //c_data contains data_i1, data_d1, data_i2     memcpy(c_data + 44,  c_data, 44); //c_data contains data_i1, data_d1, data_i2 repeated twice      //Casting the char array to a Data array:     Data* data = (Data*)c_data;      //The first Data object in the Data array gets the correct values:     Data data1 = data[0];     //The second Data object gets bad data:     Data data2 = data[1];      printf("data1 : [%4d, %4d] [%4.1f, %4.1f, %4.1f] [%4d, %4d, %4d]\n", data1.i1[0], data1.i1[1], data1.d1[0], data1.d1[1], data1.d1[2], data1.i2[0], data1.i2[1], data1.i2[2]);     printf("data2 : [%4d, %4d] [%4.1f, %4.1f, %4.1f] [%4d, %4d, %4d]\n", data2.i1[0], data2.i1[1], data2.d1[0], data2.d1[1], data2.d1[2], data2.i2[0], data2.i2[1], data2.i2[2]);      return 0; }   The code output is:  sizeof(data_i1) = 8 sizeof(data_d1) = 24 sizeof(data_i2) = 8 total size      = 44  sizeof(Data)    = 48 data1 : [   1,  100] [ 0.1, 100.2, 200.3] [   2,  200,  305] data2 : [ 100, -1717986918] [-92559653364574087271962722384372548731666605007261414794985472.0, -0.0,  0.0] [-390597128,  100, -858993460]   How should I correctly handle this? Can I somehow disable this padding/alignment (if that is the right term)? Is it possible to create a member function to the class to specify how the casting is done?

Why does the sizeof operator return a size larger for a structure than the total sizes of the structure's members?


Bash script blcheck from github format issues with emailing output  Console output displays correct, but when sent to email via mailx will on go as attachment, not to body.     33%%  dnsbl.inps.de                                     ✓     50%%  xbl.spamhaus.org                                  ✓     Output to file or email example: 16%%  dnsbl-3.uceprotect.net  ^MESC(BESC[m  16%%  dnsbl-.uceprotect.net      ✓ESC(BESC[m     Advise pls on how can I correct the format in file & email ?   CMD that's not sending to eamil body:  sh blcheck -v xx.xx.xx.xx | mail -s "server-blcheckdate" user@email.exampel  script:      After assistance of @john1024 & @cas & previous post  below cmd resolved issue.    CMD: ./blcheck-l -v xx.xx.xx.xx | perl -pe 's/\e([^[]]|[.*?[a-zA-Z]|].*?\a)//g' | col -b | mail -s "blcheck-l -v `date`" email@address   darko-poljak has submitted a pull request on github with a new option to make output friendly for non interactive use.

I can use the "script" command to record an interactive session at the command line.  However, this includes all control characters and colour codes.  I can remove control characters (like backspace) with "col -b", but I can't find a simple way to remove the colour codes.  Note that I want to use the command line in the normal way, so don't want to disable colours there - I just want to remove them from the script output.  Also, I know can play around and try find a regexp to fix things up, but I am hoping there is a simpler (and more reliable - what if there's a code I don't know about when I develop the regexp?) solution.  To show the problem:   spl62 tmp: script Script started, file is typescript spl62 lepl: ls add-licence.sed  build-example.sh  commit-test         push-docs.sh add-licence.sh   build.sh          delete-licence.sed  setup.py asn              build-test.sh     delete-licence.sh   src build-doc.sh     clean             doc-src             test.ini spl62 lepl: exit Script done, file is typescript spl62 tmp: cat -v typescript Script started on Thu 09 Jun 2011 09:47:27 AM CLT spl62 lepl: ls^M ^[[0m^[[00madd-licence.sed^[[0m  ^[[00;32mbuild-example.sh^[[0m  ^[[00mcommit-test^[[0m         ^[[00;32mpush-docs.sh^[[0m^M ^[[00;32madd-licence.sh^[[0m   ^[[00;32mbuild.sh^[[0m          ^[[00mdelete-licence.sed^[[0m  ^[[00msetup.py^[[0m^M ^[[01;34masn^[[0m              ^[[00;32mbuild-test.sh^[[0m     ^[[00;32mdelete-licence.sh^[[0m   ^[[01;34msrc^[[0m^M ^[[00;32mbuild-doc.sh^[[0m     ^[[00;32mclean^[[0m             ^[[01;34mdoc-src^[[0m             ^[[00mtest.ini^[[0m^M spl62 lepl: exit^M  Script done on Thu 09 Jun 2011 09:47:29 AM CLT spl62 tmp: col -b < typescript  Script started on Thu 09 Jun 2011 09:47:27 AM CLT spl62 lepl: ls 0m00madd-licence.sed0m  00;32mbuild-example.sh0m  00mcommit-test0m         00;32mpush-docs.sh0m 00;32madd-licence.sh0m   00;32mbuild.sh0m          00mdelete-licence.sed0m  00msetup.py0m 01;34masn0m              00;32mbuild-test.sh0m     00;32mdelete-licence.sh0m   01;34msrc0m 00;32mbuild-doc.sh0m     00;32mclean0m             01;34mdoc-src0m             00mtest.ini0m spl62 lepl: exit  Script done on Thu 09 Jun 2011 09:47:29 AM CLT


First of all, I'd like to say that the new roll out of the SE app for Android is great. Love the rich formatting and editing features. The problem I have been having is that every time I try to suggest edits to someone's questions, I am prompted "the user is not allowed to suggest edits" even though I am in the desktop/web versions of SE. Why is this? update: I was able to suggest edit on the title and/or tags of qurstions, just not the body. How come?

I edited a question, on Stack overflow and when submitting preview, got red bar telling me my account isn't allowed to make suggested edits.  On the Sandbox android question it works fine, but that is editing an answer to my question.   The message I receive is:     Account is not allowed to suggest edits   Are the rules for suggested edits different for Android app?


I am trying to make my logo center using the following codes..  It is in the header-container.

  .logo {} .header-container {} .header {       margin:0 auto;      padding:0px;      text-align:center;      position:relative;      z-index:10; } .header .logo {      display:block;      text-decoration:none !important;  } .header .logo strong {      position:relative;      top:-999em;      left:-999em;      width:0;      height:0;      font-size:0;      line-height:0;      text-indent:-999em;      overflow:hidden;  } .header h1.logo, .header h2.logo {      margin:0;  }   This is the result I am getting.. As you can see it is a little towards the right   Anyone know how could I fix this?

How can I horizontally center a
 within another
 using CSS?

Foo foo


I've tried lots of things, but it just wouldn't work.  I'm going to properties and then to permissions but the executable check box isn't there. All there is in the permissions tab is:  general emblems permissions owner: name access: ethier (none,read only,write only,read and write) group: name access: ethier (none,read only,write only,read and write) others: etheir (none,read only,write only,read and write)   How to install Minecraft?

How to correctly install Minecraft, including setting any needed packages or apps to install it and to troubleshoot the most common problems that Ubuntu users face when trying to use Minecraft.  I am trying to install and run Minecraft without first having to install the Oracle version of Java. I want to use the OpenJDK version that comes with Ubuntu and as a last resort, use the Oracle one.  I also want to know a list of problems related to Minecraft in Ubuntu and the possible solutions to them.  A step by step guide on how to install Minecraft would also help.


Given file 1...  2/26a- 6 23/26a- 20z 23/26A-18   and file 2...  2/26a-6 23/26a- 20Z 23/26A-18 25/2a -18 22/34B-19   How can I search file 2 for the contents of file 1 ? Here the output should be:  2/26a-6 23/26a- 20Z 23/26A-18   (So not an exact match, but there is some shared content). Matching should be case-insensitive.


Now this doesn't have anything to do with my graphics card. This only happens in Minecraft. I use Windows 7, the problem starts and stops randomly. It only affects in game, not the menu, only the part where you actually run around.   I played around with the options, but nothing seemed to fix it. The colors turn from creepily shaded red and blue grey, and colors that look like an acid trip. The shading freaks out and teleports to different sides of blocks in a pattern that looks almost like the biggest QR code in the universe. If I dig down one block, its red and blue. This isn't caused by the 3D anaglyph; I always have it off.

I have updated my drivers, updated java, restarted my computer and downloaded the game several times. When I try to play the game everything is duplicated in opaque red and blue. Does anyone else have this problem?


A few years ago I used to be using a little script found  in order to reset every "Stretch to" constraints of an armature, in pose mode, even on unselected/offlayered bones  :  import bpy     for b in bpy.context.active_object.pose.bones:         for c in b.constraints:              if c.type == "STRETCH_TO":                 c.rest_length = 0   It has been very useful, especially when you drastically edit the bones positions of an already finished rig (i.e. when you reuse the same rig for similar but different models).  I would like a very similar script, but with "set inverse" for CHILD_OF constraint. But I barely know Blender's API and every try haven't got anything working nor going the right direction.  My last attempt looked like that:  import bpy      for b in bpy.context.active_object.pose.bones:         for c in b.constraints:              if c.type == "CHILD_OF":                 context_py = bpy.context.copy()                 context_py["constraint"] = constraint                 bpy.ops.constraint.childof_set_inverse(context_py, constraint="Child Of")   And got this error:  Traceback (most recent call last):   File "\Text", line 7, in <module> NameError: name 'constraint' is not defined   I also got this proposition from another guy:  import bpy  for b in bpy.context.active_object.pose.bones:     for c in b.constraints:          if c.type == "CHILD_OF" and c.target is not None:             c.inverse_matrix = c.target.matrix_world.inverted()   With this one, no errors returned, it executes properly but simply doesn’t affects the rig.  If someone could help me, that would be kind.  Edit:  is one of the tracks if followed, but hasn't worked for me. Also, it looks like it's for object mode and for active selection only, while I'm going for pose mode and effect on the whole armature.  EDIT 2: SOLUTION  A big thank to Konybravo for :  import bpy  ob = bpy.context.active_object  # Take a copy of current layers  org_layers = ob.data.layers[:]  # Show all layers for i in range(len(org_layers)):     ob.data.layers[i] = True  for b in ob.pose.bones:     for c in b.constraints:          if c.type == "CHILD_OF":             context_py = bpy.context.copy()             context_py["constraint"] = c             ob.data.bones.active = b.bone             bpy.ops.constraint.childof_set_inverse(context_py, constraint="Child Of", owner='BONE')  # Reset back to orginal layer state     for i in range(len(org_layers)):     ob.data.layers[i] = org_layers[i]   Working straight away, even on bones hidden in a layer. Yay \o/ And thank y'all for helping me those days.

When I try to use the "set inverse" operator in python there comes an error that it missed a context called "constraint". But I did it exactly like in the Info Panel.  bpy.ops.constraint.childof_set_inverse(constraint="Child Of", owner='BONE')   The Name of the constraint is correct and the also the owner


so i want to get the file extension from the img so if i upload a image i can use mutiple file exts but when i use this code to get the file ext it does not work  $sql = "SELECT * FROM users"; $result = mysqli_query($conn, $sql); if (mysqli_num_rows($result) > 0) {     while ($row = mysqli_fetch_assoc($result)) {         $id = $row['user_id'];         $sql = "SELECT * FROM users WHERE user_id='$id'";         $result = mysqli_query($conn, $sql);         while ($rowImg = mysqli_fetch_assoc($result)) {             if ($rowImg['status'] == 0) {                 $filename = "../assets/IMGS/profile/Avatar".$id.".*";                 $fileinfo = glob($filename);                 $fileext = explode(".", $fileinfo[0]);                 $fileactualext = $fileext[1];                  echo "";             } else {                 echo '';             }         }     } }

This is a question you can read everywhere on the web with various answers:  $ext = end(explode('.', $filename)); $ext = substr(strrchr($filename, '.'), 1); $ext = substr($filename, strrpos($filename, '.') + 1); $ext = preg_replace('/^.*\.([^.]+)$/D', '$1', $filename);  $exts = split("[/\\.]", $filename); $n    = count($exts)-1; $ext  = $exts[$n];   etc.  However, there is always "the best way" and it should be on Stack Overflow.


I want to know list of all users founded in my system. I need non-system users.  I know that the file /etc/passwd contains all users    root:x:0:0:root:/root:/bin/bash daemon:x:1:1:daemon:/usr/sbin:/bin/sh bin:x:2:2:bin:/bin:/bin/sh sys:x:3:3:sys:/dev:/bin/sh sync:x:4:65534:sync:/bin:/bin/sync games:x:5:60:games:/usr/games:/bin/sh man:x:6:12:man:/var/cache/man:/bin/sh lp:x:7:7:lp:/var/spool/lpd:/bin/sh mail:x:8:8:mail:/var/mail:/bin/sh news:x:9:9:news:/var/spool/news:/bin/sh uucp:x:10:10:uucp:/var/spool/uucp:/bin/sh proxy:x:13:13:proxy:/bin:/bin/sh www-data:x:33:33:www-data:/var/www:/bin/sh backup:x:34:34:backup:/var/backups:/bin/sh list:x:38:38:Mailing List Manager:/var/list:/bin/sh irc:x:39:39:ircd:/var/run/ircd:/bin/sh gnats:x:41:41:Gnats Bug-Reporting System (admin):/var/lib/gnats:/bin/sh nobody:x:65534:65534:nobody:/nonexistent:/bin/sh libuuid:x:100:101::/var/lib/libuuid:/bin/sh syslog:x:101:103::/home/syslog:/bin/false messagebus:x:102:104::/var/run/dbus:/bin/false colord:x:103:108:colord colour management daemon,,,:/var/lib/colord:/bin/false lightdm:x:104:111:Light Display Manager:/var/lib/lightdm:/bin/false whoopsie:x:105:114::/nonexistent:/bin/false avahi-autoipd:x:106:117:Avahi autoip daemon,,,:/var/lib/avahi-autoipd:/bin/false avahi:x:107:118:Avahi mDNS daemon,,,:/var/run/avahi-daemon:/bin/false usbmux:x:108:46:usbmux daemon,,,:/home/usbmux:/bin/false kernoops:x:109:65534:Kernel Oops Tracking Daemon,,,:/:/bin/false pulse:x:110:119:PulseAudio daemon,,,:/var/run/pulse:/bin/false rtkit:x:111:122:RealtimeKit,,,:/proc:/bin/false saned:x:112:123::/home/saned:/bin/false speech-dispatcher:x:113:29:Speech Dispatcher,,,:/var/run/speech-dispatcher:/bin/sh hplip:x:114:7:HPLIP system user,,,:/var/run/hplip:/bin/false user1:x:1000:1000:user1,,,:/home/user1:/bin/bash user2:x:1001:1001:user2,,,:/home/user2:/bin/bash user3:x:1002:1002:user3,,,:/home/user3:/bin/bash user4:x:1003:1003:user4,,,:/home/user4:/bin/bash xrdp:x:115:126::/var/run/xrdp:/bin/false lxc-dnsmasq:x:116:128:LXC dnsmasq,,,:/var/lib/lxc:/bin/false clamav:x:117:129::/var/lib/clamav:/bin/false dhcpd:x:118:132::/var/run:/bin/false liquidsoap:x:119:133::/usr/share/liquidsoap:/bin/false sshd:x:120:65534::/var/run/sshd:/usr/sbin/nologin   But as you can see the file may come to be very big as you install more services and I can't just open and search for non-system users that easily.  So i need a simple command to list those users. Thanks

We all know that we have system users and service users. I am looking for a way to separate them as system users and service user list.  Is there any way ?


In Pokemon Go, when you press on the map, you create a pulsating blue circle for a brief moment:    Does this have a purpose? Does it perhaps help you "look closer" at a particular spot on the map for potential Pokemon?

When I tap the map (by map I mean the map the character walks on - the ground), it glows a bit.     What happens when I click the map? Is it just an visual effect or does it cause anything else?


I have a piece of jQuery that loops through each  element in a given div( #container) and does a javascript alert each time a span is clicked. This works fine if the <span>'s are static.  However, if I use a piece of code like:  $(someLink).click(function(){    $("#container").html( <new html with new spans> ) });   The jQuery code doesn't fire off. Oddly enough though  My question is : Is there a reason my Click events don't work for dynamically created items? I assume I will have to add something into my document ready or heartbeat-script (which is fired every 100 miliseconds) to hook up the events??

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've discovered that there are many Stack Exchange sites: , ,  and perhaps others.  What are the differences between these sites, and what is  mainly about?  Where can I find a list of all the Stack sites?

Stack Overflow, Stack Exchange, Area 51: What's the difference in a nutshell? I've read the faq's and they all seem to be the same to me - Just Q & A on a variety of topics.  What's the difference in a nutshell? If I have a software engineering question, which site is best for me to use?


How do I clip a shapefile with a raster file with gdalwarp?    Input: a shapefile Cutter: a raster file Output: a cut shapefile    I can only find the answer of cutting the raster file by a shapefile but not vice versa.

I need to clip a vector layer to the extent of a raster. It has to be very precise that's why I would not want to draw a polygon myself (and clip the two polygons). There seem to be some ways to clip a raster to a polygon but I have difficulties to find a solution to clip a polygon to a raster. I already tried to create a polygon out of my raster several times in ArcGIS and R, so I could clip the result. But every time it crashes because the raster is to big. There must be a simple way to solve this, and somehow I can just not see it at the moment.  How can I do this using GDAL?


Currently, US citizens are somewhat banned from going to Iran. Even while US citizens are not banned, it is still a generally dangerous place to go as a US citizen. Switzerland, however, does have good consular relations with Iran and their citizens are not banned.  This leads to my question: if (theoretically of course) a US and Swiss dual-citizen who is of no persian descent wants to travel to a country such as Iran strictly as a tourist, can he/she go with that Swiss passport legally, and can he/she remain safe in that country? Would Iran be able to figure out that you are a US citizen?

I am a dual Dutch-American citizen that is planning to visit Iran in the upcoming week. I have both a Dutch and an American passport.  According to the , "British, Canadian and American citizens are required to be escorted by a government approved guide at all times. Independent travel for these citizens has been banned due to the closure of Iranian foreign missions in these countries."  However, I asked an Iranian friend who said that I should have no problem as long as I enter on my Dutch passport, and this seems consistent with what I have read .   As Iran has a visa-on-arrival program for Dutch citizens, I assume that I can just show up at the airport in Tehran, show my Dutch passport, get a visa, and walk out of the airport and into Tehran.  Is this correct?  [edit 11/08/16] I've contacted the embassies of both countries and posted my answer below. My flight is tomorrow morning and I land in Tehran around 1am Thursday. I'll let everyone know what happens.


I'm trying to bevel edges on a rectangular shape so that it matches the shape of the object behind it(more roundish), but when i do so I end up with a spape shat is proportional to the sides of the rectangle. I tried all the settings on the bevel menu without any luck, what am I doing wrong?

I was trying to model a desk and came across a problem, I can't seem to solve. I wanted to create a simple bevel. I used Mesh > Edges > Bevel on a selected edge and got this result   Why is it not symmetrical? How can I make it symmetrical?  For reference, what I actually wanted:


why the result is false? could someone please explain?  public class StringTest1 {     public static void main(String[] args) {     String a="a";     String b=a+"b";     String c="ab";     System.out.println(b==c);     } }

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


I'm not sure if I explained right in the Title, but what I want is to make the birds stop casting a reflection on the surface of the water (the birds are a image)? Thanks

I am creating a logo for a friend (not getting paid), and I want to figure out a way to get rid of one object's reflection against another without removing the other object's reflectivity. If you look at the image, the "e" in Jewel shows up against the diamond and I don't want it to. Can I place the Jewel on a different layer with an alpha layer background in order to insert it into the image without the diamond having a reflection of it, and then use the compositor to overlay one on top of the other?  How would I go about this? I've looked up tutorials online on how to use the compositor, and they all involve an "image" node and a "compositor" node, but I can't seem to find these under the "add node" button, and I've been searching for a while.


In an article that gives general work advice, I've seen the following sentence  Don’t take your complaint to your boss when she’s running between meetings ...  There is no context that states the gender of the boss, the author however has chosen to use she to refer to boss. Is the author here implicating that boss is feminine? Or does this have to do with the gender of the word boss?

There are some questions on gender-neutral pronouns both  and on .  User Christine Letts :     In academia, there is currently a   movement toward using the feminine   pronoun at all times.   I wonder why that is. I came across several examples on papers I read, but the only one I can remember at the moment is a book: Seth Godin's . While some might not be comfortable labeling it as part of academia, it suits my point perfectly. Every time he refers to a person, he uses the feminine pronoun.  User Senseful  the following, potentially identifying affirmative action as the precursor for this trend.     I remember reading somewhere that it   was recommended to use the opposite of   what most people stereotype the   profession as. So, for example, when   talking about a chiropractor, you   would use "her", and when talking   about a secretary, you would use   "his".   So, where do you think this trend comes from?


I have read about SVD, and understand it as being similar to what PCA does. For recommendation, let's say I have a matrix where rows are users and columns are items, and the entry $(i,j)$ in matrix is rating given by user $i$ to item $j$, say 1-5 (discrete). Naturally, lots of entries are missing.  How to apply SVD in this case, since the matrix has missing data?  Imputing with either 0s or the global average seems to make no sense to me. So how do we proceed with SVD? Also, what are some modifications we could make to make SVD work better?

I'm a bit confused with how the SVD is used in collaborative filtering. Suppose I have a social graph, and I build an adjacency matrix from the edges, then take an SVD (let's forget about regularization, learning rates, sparsity optimizations, etc), how do I use this SVD to improve my recommendations?  Suppose my social graph corresponded to instagram, and I was tasked with the responsibility of recommending users in the service, based only on the social graph.  I would first build an adjacency matrix $\mathbf A$ $(m\times m)$, take the SVD, $\mathbf A = \mathbf{U s V}$, choose the first $k$ eigenvalues, then what?  I would presumably create a new set of matrices: \begin{align} \mathbf U_{new} &\sim m\times k  \\ \mathbf s_{new} &\sim k\times k  \\ \mathbf V_{new} &\sim k\times m \end{align} then what does one do?  I've looked on the web, and most links focus on calculating the SVD, but no one tells you what to do with it. So what should I do?


Hello better programmers than me. Not a huge deal, but I am curious about this function, and more importantly the result it gives sometimes. So I defined a recursive power function for a homework assignment that is to include negative exponents. For positive values and 0, it works fine, but when I enter some negative values, the answer is really strange. Here is the function:   public static double Power(int base, int exp){     if (exp == 0)         return 1.0;     else if(exp >=1)         return base * Power(base, exp - 1);     else          return (1.0/base) * Power(base, exp + 1);             }   So for a call Power(5, -1) the function returns 0.2, like it should. But for say Power(5, -2) the function returns 0.04000000000000001 instead of just 0.04. Again, this isn't a huge deal since it's for homework and not "real life", but just curious as to why this happened. I assume it has something to do with how computer memory or a double value is stored but really have no idea. Thanks all!  PS, this is coded in Java using Netbeans if that makes a difference.

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


I'm trying to install htop on my server (ubuntu 14.04). Here is the command:  sudo apt-get install htop   But it throws:  Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package htop   Noted that it throws E: Unable to locate package .... for everything I would like to install (like phpmyadmin). What's the problem and how can I fix it?

When I try to install any package through the command line, I get an error.   $ sudo apt-get install <package> Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package <package>   Can anyone help me on this?


If we have a piecewise function defined as  $f(x) = \begin{cases} 1,  & \text{0 $\le$ $x$ $\le$ 1} \\ 0, & \text{otherwise} \end{cases}$  Explain how the convolution of $f$ with itself for $n$ times i.e. $(f*f*f.......*f)$ $n$ times might begin to look like bell curve of the central limit theorem. I have no idea how to proceed. Any help would be appreicated.

Function $\phi (x)$ is defined as: $$\phi(x) = \begin{cases} 1 & \text{ if } 0 \leq x \leq 1\\0 & \text{otherwise} \end{cases} $$ How do I find the convolution of $\phi(x)$ with itself? I tried to take the Fourier transform of $\phi(x)$ and square it, then take the inverse Fourier transform. However, in the latter step I couldn't figure out what the limits on the integral are (I think it would be integral in all space, but I'm not sure). More importantly, I don't know how to do that integral for the inverse Fourier step. Thank you!


There is that mesh where we can see there are faces on the edges with zero area.    I guess there should be a function to remove faces with zero area or merge vertices/edge with distance threshold (like in Maya).

I run into this issue all the time and it's really frustrating to fix especially on high poly meshes. Either there's no face joining some edges ("zero-area hole"?) or there is a zero-area face. Either way it messes with the normals making ugly black spots all over the mesh. Here's an example:    To fix the normals I'd quite like to either...   split the upper face, as the dashed line shows, or merge the two lower faces by dissolving the edge, as the cross shows.   How can I do this automatically to the entire mesh?  Manual methods aren't acceptable as there's a lot of this kind of geometry. I'd prefer to change the mesh as little as possible, or at least not lose any information by collapsing huge areas.    Sometimes is's hard to actually select the face and I resort to selecting an adjacent one, growing the selection with Ctrl Numpad+ and deselecting the others. Once selected, others can be selected with Select->Select Similar->Area. Adjusting the threshold is often necessary to avoid numerical inaccuracies. It also helps if the model is not too small, so maybe scale it up first.  Below is an example of a zero-area hole, although I've moved the vertex up so you can see it.    You can get the zero-area faces back with Mesh->Clean up->Fill Holes.    Even if I do manage to manage to get rid of the zero-area face, leaving a quad as shown below, I've found triangulating it splits the wrong way and just gives a zero-area face again (this really seems like a bug in blender's triangulation).


I want to check if a given command exists in bash and I care only about the native commands of the bash and not the scripts written by the user. When I refer to native commands I mean all those commands that are generally available to a user.   There are two commands  command -v type   that can be used to check if the command exists. But it also returns a true for user written scripts whereas I want to restrict myself just to the inbuilt commands.  Note: I am not just trying to distinguish between a bash builtin and other commands because  type -t touch  gives file as the type, but this is a command available to the user by default. But if the user writes a script and then tries to run it then I would like to filter that.  Any help is appreciated.

When looking for the path to an executable or checking what would happen if you enter a command name in a Unix shell, there's a plethora of different utilities (which, type, command, whence, where, whereis, whatis, hash, etc).  We often hear that which should be avoided. Why? What should we use instead?


Looking for an intuitive explanation, thanks.

Ridge regression coefficient estimate $\hat{\beta}^R$ are the values that minimize the   $$ \text{RSS} + \lambda \sum_{j=1}^p\beta_j^2. $$  My questions are:   If $\lambda = 0$, then we see that the expression above reduces to the usual RSS. What if $\lambda \to \infty$?  I do not understand the textbook explanation of the behaviour of the coefficients. To aid in understanding the concept behind a particular term, why is the term called RIDGE Regression? (Why ridge?) And what could have been wrong with the usual/common regression that there is a need to introduce a new concept called ridge regression?    Your insights would be great.


What is fire? Is it a wave or is it matter?   Where does fire come from?   Does everything burn with fire?  (for example: water and some metals don't burn).

Is  a ?  If not, what is it then?  If yes why, don't we teach kids this basic example?    UPDATE: I probably meant a regular commonplace fire of the usual temperature. That should simplify the answer.


I have found plenty of questions that almost answer my question, for example this  but they all lack one detail.  I want to do something like this  var clipText = "aaabccc"; var replaceStr = "abc"; var withStr = "def"; clipText = clipText.replace(/replaceStr/g, withStr);   That is, use two variables as arguments to replace but replace seems to interpret the variable names literally rather than using their assigned value. I also want to replace all occurrences, hence the g after replaceStr.  What gives?

I would like to create a String.replaceAll() method in JavaScript and I'm thinking that using a regex would be most terse way to do it.  However, I can't figure out how to pass a variable in to a regex.  I can do this already which will replace all the instances of "B" with "A".  "ABABAB".replace(/B/g, "A");   But I want to do something like this:  String.prototype.replaceAll = function(replaceThis, withThis) {     this.replace(/replaceThis/g, withThis); };   But obviously this will only replace the text "replaceThis"...so how do I pass this variable in to my regex string?


If I let r be a positive number, I have to show that there exists a positive number, u, such that |x| < u implies that |(sin(x))/x - 1| < r. Now I've gone about this two different ways, but hit dead ends both times.  My first approach was to use the triangle inequality and the fact that -1 <= sin(x) <= 1. |(sin(x))/x - 1| <= |(sin(x))/x| + 1 = |sin(x)|/|x| + 1 <= 1/|x| + 1. I knew that if I could show that 1/|x| + 1 < r, that would mean |(sin(x))/x - 1| < r. However, the issue is that if 1/|x| + 1 < r, than 1 < r. But I need prove it with r being any positive number.  My second approach was to split it into left-hand and right-hand limits and use the squeeze theorem. I knew that if I show that each limit was 1, then the entire limit was 1. I decided to start with the left-hand limit. For x<0, 1/x <= sin(x)/x <= -1/x. However, since the limit as x approaches 0 from the left of 1/x = -oo and the limit as x approaches 0 from the left of -1/x is oo, the squeeze theorem really can't be applied.  What is it that I'm doing wrong?

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.


I did google this topic and all results are talking about <<EOF. But I saw scripts using <<-EOF, but I can not find anywehre by googling. Thus, What is different between <<-EOF and <<EOF in bash script? Thanks a lot.

I'd like to know what the minus (-) and the EOC in the command below means. I know some languages like Perl allows you to chose any combination of character (not bound to EOF) but is that the case here? And the minus is a complete mystery for me. Thanks in advance!  ftp -v -n $SERVER  >> $LOG_FILE <<-EOC             user $USERNAME $PWD             binary             cd $DIR1             mkdir $dir_lock             get $FILE             bye EOC


-ANSWER to this example is 'var pattern = /(\\n)|(\\r)|(\\t)/g;'  -ANSWER to question is, you can put each pattern in parentheses, separate with a pipe symbol and assign the global identifier at the end of the regex.   TA DA!   :)  TRY THIS LINK FOR A HELPFUL REGEX TOOL:    I thought that simple questions like how do you combine regexes would get a simple answer - i don't believe there's a straight answer on the tutorial.  But i recommend reading the manual.  I've read a few suggested answers most seem to focus on the pipe OR operator, but i want to combine regexes. Shamefully newbie at regexes. Anyway, I want to remove special characters from tab, space and return. Here's what I have:              var pattern1 = /(\\n)/g;             var pattern2 = /(\\t)/g;             var pattern3 = /(\\r)/g;              $heading = $heading.replace(pattern1, "");             $heading = $heading.replace(pattern2, "");             $heading = $heading.replace(pattern3, "");   This works, however it is repeating and I can't find any info on how to create one regex pattern that will look for all and remove them.

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


I have a function, which takes a function and string as arguments, I want to call this function with the string argument and return the result.  Something like this:  public static String mainFunc(Callable func, String s) {     return func.call(s); // Error }  mainFunc(SomeObject::instanceMethod, s)   But as you can see it is not working. Please note that I don't necessarily need to use Callable, it can be any other interface.

If I have two variables:  Object obj; String methodName = "getName";   Without knowing the class of obj, how can I call the method identified by methodName on it?  The method being called has no parameters, and a String return value. It's a getter for a Java bean.


'one and one is two' is correct as you know. I wonder there should be whether 'am' or 'is' between 'he and I' and 'a monster.' 'he and I am a monster' or 'he and I is a monster?' I mean a group of him and me is a monster. For example, after you or I, verb 'am' is correct. I think 'he and I am a monster' is correct as 'or' and 'but'.

"My wife and I am" = one family, a singular number. Therefore satisfies  the use of "am" for both number and proximity issues.


I have intel core(TM) i3-4010 4gb ram laptop  i run pubg and it but it lags would increasing my ram from 4gb to 8gb help?

I have a Toshiba Satellite L855-S5240.  The current specs are:     Intel® Core™ i5-2450M Processor2.5 GHz, (3.1 GHz with Turbo Boost   Technology 2.0), 3MB L3 Cache      Mobile Intel® HM76 Express Chipset      Mobile Intel®HD graphics with shared graphics memory      Configured with 6GB DDR3 1333MHz (max 16GB) 2 main memory slots. Both   memory slots occupied   I have ordered a 8GB stick and intend to replace the current 2GB stick.. bringing me to 12GB total.  This is the stick:   Will I notice a benefit? Particularly working with virtual machines and overall system performance?


I found a relation that $ab=b^2a$. However, I have no idea how to show that $H$ is not finitely generated. I keep encountering some kind of a word problem. Could anyone please help me?

I'm solving this question in Hungerford's book:     8. Let $G$ be the multiplicative group generated by the real matrices $a=\begin{pmatrix}2&0\\0&1\end{pmatrix}$ and $b=\begin{pmatrix}1&1\\0&1\end{pmatrix}$. If $H$ is the set of all matrices in $G$ whose (main) diagonal entries are $1$, then $H$ is a subgroup that is not finitely generated.   I've already proved that $H$ is a subgroup of $G$ and every element of $H$ is of the form:   $$         \begin{pmatrix}          1 & x \\         0 & 1 \\         \end{pmatrix} $$  I thought this question really weird, $H$ is a subgroup of a group generated by $a$ and $b$ but $H$ itself can't be generated by $a$ or $b$, how can be possible?  My question is how to show $H$ is infinitely generated? I didn't find any good candidates to generate $H$.  Thanks in advance


Let $\phi: G\to GL_n(\mathbb C)$ be an irreducible representation of a finite group $G$. Let $\chi: G\to \mathbb C$ be the character of $G$. Prove that:  $$\displaystyle \sum_{g\in G}{\chi(g)}=0 $$  I know that if $e$ is the identity then $\chi(e)=n$, if $g\in G$ then $\chi(g^{-1})=\overline{\chi(g)}$. Thus if $g=g^{-1}$ then $\chi(g)=\chi(g^{-1})=\overline{\chi(g)}$ then $\chi(g)\in \mathbb R$. If $g \ne g^{-1}$ then $\chi(g)+\chi(g^{-1})=2Re(\chi(g))$. Thus we can conclude at least that the sum: $$\displaystyle \sum_{g\in G}{\chi(g)}=n+\sum_{g\ne g^{-1}}{\chi(g)}+\sum_{g=g^{-1}}{\chi(g)} \in \mathbb R  $$  But I don't know how to prove that it's in fact $0$.  Thanks!

If $\chi$ is a nontrivial irreducible character of $G$ (a finite group), define $S_{\chi}:= \sum_{x \in G} \chi(x)$. In terms of conjugacy classes $\mathcal{C}$, this is $\sum_{\mathcal{C}} |\mathcal{C}| \chi(\mathcal{C})$. Is there a nice condition that guarantees $S_{\chi}=0$?  I've noticed that this occurs, for instance, with $S_5$. I'd love a description of this phenomenon and a proof, if possible.


The players were exploring Castle Ravenloft.  A trap separated the human paladin from the rest of the party and placed him in a deep pit with no light source.  In looking for a way out, he accidently released and then began to fight a wight.  This was initially quite bad as he was attacking with disadvantage, while the wight (with darkvision) was attacking twice with advantage.  The paladin remedied this by casting , hitting the wight, and making it glow. Branding Smite, emphasis mine:  The next time you hit a creature with a weapon attack before this spell ends, the weapon gleams with astral radiance as you strike. The attack deals an extra 2d6 radiant damage to the target, which becomes visible if it is invisible, and the target sheds dim light in a 5-foot radius and can’t become invisible until the spell ends.  After two more hits and some Divine Smite, the wight was dead.  The paladin wanted to hack off a piece of the glowing wight corpse and use it as a light source to help him climb out of the pit (spell duration is Concentration - 1 minute, the paladin needed three rounds to climb out of the pit).  I hesitated, because when the wight ceased to be undead and became just dead, it was transformed from a creature into an object and was thus no longer a valid target of the spell. Ultimately I ruled that one thing is a valid target for casting the spell itself, another is the persistent effects of the spell, and that the corpse would go on glowing for the duration.  However, I would like to know RAW for this and whether all the effects of the spell would cease when the wight was killed. Related: .  Superficially this might appear like a duplicate of my question.  However, the question there is about the dominate person spell when the target is no longer a Humanoid because of polymorph.  Obviously dominate person cannot continue to work if the target is no longer a Humanoid to dominate, but a dead wight could still continue to be a source of light.  I feel like that question is a different situation than Branding Smite where the 2d6 radiant damage is the spell itself and the light produced is a persistent effect of the spell.  Maybe the answer is not different, but I believe the question is different enough that it stands on its own. Also, although not a reason to say that this is not a duplicate, I am unsatisfied with the accepted answer to that question being based on a Crawford tweet. It has been suggested that this question is a duplicate of   I do not consider this a duplicate of that question for two reasons.  First, Fly requires a willing target which is an added complication that I don't want to address (and which is not adequately addressed in the answers to that question) and second, because independent of the question of whether effects carry over to an invalid target, it is nonsensical for an object to have a flying movement since it has no way to use movement.  In that sense it is equivalent to the dominate person question.  However, there is no inherent contradiction to an object being able cast light (and in fact other objects in the game do cast light, whereas I don't know of any objects that move). If this question is to be marked as a duplicate, I would prefer that it be marked as a duplicate of   In that case, as in my question, there is not the complication of the original spell requiring a willing target.  Further, there is no inherent contradiction in a creature instead of an object dealing heat damage when it is touched, as there are creatures in the game that deal damage when touched, such as an Azer.

The  spell states:     You touch a willing creature. The target gains a flying speed of 60 feet for the duration. When the spell ends, the target falls if it is still aloft, unless it can stop the fall.   Since the spell does not say that it ends if the creature dies, would the spell continue to hold the deceased creature aloft for the duration of the spell, as long as the caster maintains concentration?


I would like using Java to get data from Windows about CPU, RAM, HDD, Network and list of processes(services). How I can get these system values values without using third-party libraries or JNI?  Is there something similar to /proc in Windows where I can get all necessary values and use them?

I'm currently building a Java app that could end up being run on many different platforms, but primarily variants of Solaris, Linux and Windows.  Has anyone been able to successfully extract information such as the current disk space used, CPU utilisation and memory used in the underlying OS? What about just what the Java app itself is consuming?  Preferrably I'd like to get this information without using JNI.


I've got a problem with the finish of the answer of the following problem: .  How is that $(\mathbb{Z}^{n-1}\oplus\mathbb{Z})/(2,\dots,2)\mathbb{Z}$ with $n$ twos is equal to $\mathbb{Z}^{n-1}\oplus\mathbb{Z}_2$?   $\mathbb{Z}^{n-1}\oplus\mathbb{Z}=\mathbb{Z}^n$,since $n$ is finite and we have finite sequences, right? Or am I wrong?  Thanks in advance!

I am trying to show the isomorphism  $$\mathbb Z^n/\langle (a,...,a) \rangle \cong \mathbb Z^{n-1} \oplus \mathbb Z/\langle a \rangle.$$  I've tried to define $\psi:\mathbb Z^n \to \mathbb Z^{n-1} \oplus \mathbb Z/\langle a \rangle$ an epimorphism with $\ker(\psi)=\langle (a,...,a) \rangle$ so to apply the first isomorphism theorem, but I couldn't come up with an appropiate morphism. Any hints or suggestions would be greatly appreciated.


I am running Ubuntu 19.10. The gcc binary installed is  > ls -laht /usr/bin | grep gcc ... lrwxrwxrwx  1 root root       12 Apr  8 17:38 x86_64-linux-gnu-gcc-ranlib -> gcc-ranlib-9 lrwxrwxrwx  1 root root        8 Apr  8 17:38 x86_64-linux-gnu-gcc-ar -> gcc-ar-9 lrwxrwxrwx  1 root root        8 Apr  8 17:38 x86_64-linux-gnu-gcc-nm -> gcc-nm-9 lrwxrwxrwx  1 root root        5 Apr  8 17:38 x86_64-linux-gnu-gcc -> gcc-9 lrwxrwxrwx  1 root root        5 Apr  8 17:38 gcc -> gcc-9 lrwxrwxrwx  1 root root       22 Apr  8 17:38 gcc-9 -> x86_64-linux-gnu-gcc-9 lrwxrwxrwx  1 root root        8 Apr  8 17:38 gcc-ar -> gcc-ar-9 lrwxrwxrwx  1 root root       25 Apr  8 17:38 gcc-ar-9 -> x86_64-linux-gnu-gcc-ar-9 lrwxrwxrwx  1 root root        8 Apr  8 17:38 gcc-nm -> gcc-nm-9 lrwxrwxrwx  1 root root       25 Apr  8 17:38 gcc-nm-9 -> x86_64-linux-gnu-gcc-nm-9 lrwxrwxrwx  1 root root       12 Apr  8 17:38 gcc-ranlib -> gcc-ranlib-9 lrwxrwxrwx  1 root root       29 Apr  8 17:38 gcc-ranlib-9 -> x86_64-linux-gnu-gcc-ranlib-9 -rwxr-xr-x  1 root root     1.2M Oct 10  2019 x86_64-linux-gnu-gcc-9 -rwxr-xr-x  1 root root      35K Oct 10  2019 x86_64-linux-gnu-gcc-ar-9 -rwxr-xr-x  1 root root      35K Oct 10  2019 x86_64-linux-gnu-gcc-nm-9 -rwxr-xr-x  1 root root      35K Oct 10  2019 x86_64-linux-gnu-gcc-ranlib-9 -rwxr-xr-x  1 root root      454 Apr 11  2011 c99-gcc -rwxr-xr-x  1 root root      428 May  7  2006 c89-gcc ...   I want to install gcc-8 for some specific uses only. I can install gcc by running  sudo apt update && sudo apt install gcc-8   but I am worried that it will mess up everything in my /usr/bin directory, as well as other dependencies on gcc-9.  What is the safest way to install gcc-8 without having to build it myself?

I have gcc 7.3.0 on Ubuntu 18.04. But I am working on a project where I need gcc less than version 6. When I tried to install gcc 5.4 using sudo apt install gcc-5.4, I got this error:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package gcc-5.4 E: Couldn't find any package by glob 'gcc-5.4' E: Couldn't find any package by regex 'gcc-5.4'     What is the appropriate way to install gcc 5.4?


we know that the simple form of the metric in the special relativity is like this: $ds^2 = dr^2 - (cdt)^2$ that in this metric $dr^2 = dx^2 + dy^2 + dz^2 .$ I want to ask why we minus the time sentence? I know the mathematical reasons but I wanna know what happens in nature and reality by minus of the time sentence.

I apologize if this is a naïve question. I'm a mathematician with, essentially, no upper-level physics knowledge.  From the little I've read, it seems that spacetime is Lorentzian. Unfortunately, the need for a metric that isn't positive-definite escapes my understanding. Could someone explain the reasoning?


I've a MySQL 5.7 brand-new installation (via Oracle official RPM) on CentOS 6.5.  Via phpmyadmin, I see this strange "Any@%" account I didn't create, with only USAGE as GLOBAL PRIVILEGES and Grant: No    Is this legit? I understand that this "account" cannot really use the DB, but I'm missing the point for it to exist! Was it created by the RPM? does it exists by default?

I have configured my MySQL Database to require passwords on all users, even root from the machine itself.  Now I discovered that there are empty Users in my Database  Reproduce: mysql -u root -p and then use mysql; & select * from user;  It gives me 2 entries, one with "localhost" and user <empty> and one with the machine's hostname and <empty>.  Now I tried to access the account with mysql -u ' ' (yes it's correct, leave a space between the ' things) and I log in without a password. The user can "only" see information_schema and test, the two databases created by default. He does not has access to mysql or any other custom created databases.  I already changed the Password of this user to something I won't tell you  mysql -u root -p use mysql; UPDATE mysql.user SET Password=PASSWORD('thisisasecretpassword') WHERE USER='root'; FLUSH PRIVILEGES;   Now my Questions:   Is any MySQL Server vulnerable for an attack with this entry? Could an attacker break out of this account or the two default databases? Should I password-protect those Users or can I delete them? Are They required for some MySQL-internal things?


So I built a nether portal from my house and went to the nether. When I entered back I spawned in an entirely new portal about 300 blocks from my house in an inconvenient location. How can I fix this?

On our minecraft server, I've built a Nether portal in my basement. Which connected two-way (tested) to a location in the Nether.    This nether portal took me to an area in the nether which was a small cave. I dug upwards and surfaced close to a Nether Fortress. After clearing the fortress of Blaze spawners, I decided to 'move in'. So I went back to the portal, dismantled it, and reactivated in in a location in the Fortress.    The fortress would be within the same 128m radius I would assume as it's really close to the original place. Literally some steps to the surface, then a ladder up the nearest Nether Fortress bridge support.  Now, taking this portal back to my original doesn't work, I spawn deep underground in an Abandoned Mine Shaft.  I read somewhere that my Nether portal has found a 'better match' and this could be remedied by disabling the 'wrong' portal in the mine shaft.  However, upon multiple attempts, a new nether portal is dynamically created in the same area. See screenie for example. You'll see two 'stacked' portals on the left (from my different attempts at disabling) and then the current active one on the right.    My question is, how can I make sure these portals go to the correct place. Is it a matter of returning the portal to it's original location or am I stuck for returning to the basement?


I have done some research and I found out that in Java, primitive data types are passed by value and Object and Arrays are kind of passed by refernce.  I am not quite sure if I understand exactly, when the variable is passed as refernce and when is it passed as value.  For example if I pass an object to a click listener It is probably passed by reference, right? But what happens if, I then save the value of that parameter in instance variable inside click listener? Is the data beeing copied?  I have example code below (with some more questions in comments):  //some big class with lots of arrays public class InfoClass{     private ArrayList<SomeObject> array1; //huge array     private ArrayList<SomeObject> array2; //huge array      //methods... }  //listview menuitem click listener which is applied to all items public class ListviewItemClickListener implements View.OnClickListener{      private InfoClass _info; //is this a copy of an object or a reference?     private MyArrayAdapter _adapter;      public ListviewItemClickListener(InfoClass info, MyArrayAdapter adapter){         _info = info;         _adapter = adapter;     }      @Override     public void onClick(View view) {         //do something with info class..         _adapter.notifyDataSetChanged(); //update adapter     } }  //also: //what about this, is this inefficient? private class SomeClass{     public String printValueAndObjectType(Object value, Class type){         return  value.toString()+" "+type.getName();     }     //example call: printValueAndObjectType("value", String.class);     //is the String.class beeing copied? }

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


"Any' or 'every': Which one should I use in the following sentences?  1- I am against everyone/anyone who hates people based on their skin colour and religion.  2- He loves me more than anyone else/everyone else does.

What is the difference between "anyone" and "everyone" in the following context?  For example,     Anyone is welcome to do such and such.   and     Everyone is welcome to do such and such.   mean exactly the same thing to me. But since I am not a native speaker, I guess there might be some subtle differences. Can anyone explain?


Two years ago, my answer was selected.  Today, I get a -15 with no comment, and no indication of a user action.  I don't know who did what.  This is very discouraging.

What does it mean to accept an answer? How do I accept an answer, and what are the rules? Can I accept my own self-answer? What are the reputation benefits? Which answer should I accept? Should I upvote the accepted answer? What should I do if none of the answers are suitable?      For more information, see "" in the .


Here is the problem:     A ladder 15 metres high is propped up against a high wall. The bottom of the ladder slides away from the wall at a rate of $1\ {m/s}$. How fast is the top of the ladder sliding down the wall when in it is $12\ m$ off the ground?   From this I can state the few things:  \begin{equation} \text{Let}\ y(t) = \text{Height of wall at time}\: t \\ \text{Let}\ x(t) = \text{Distance between bottom of ladder and bottom of wall} \\ \text{We know}\ x'(t) = 1 \\ \text{We need to find}\ y'(t)\ \text{when}\ y(t) = 12 \end{equation}  In order to find this, we need to get $y'(t)$ in terms of $x'(t)$ and $y(t)$.  My first thought is that these form a right triangle, so I call upon Pythagoras:  $$(y(t))^2 + (x(t))^2 = 15^2$$  Then implicitly differentiate with respect to $t$:  \begin{align} & \frac{d}{dt}\bigg[(y(t))^2 + (x(t))^2\bigg] = \frac{d}{dt}\big[15^2\big] \\ \leadsto\quad & 2y'y + 2x'x = 0 \\ \leadsto\quad & y' = -{{x}\over{y}}x' \end{align}  But here is where I reach a dead end. We have $y'$ in terms of $y$ and $x'$, but there's also a $x$ in there - the bottom of the triangle - that we don't know.   How do I approach this?  Thanks in advance!

A $5$m ladder is leaning against a wall. If the bottom of the ladder is pulled along the ground away from the wall at a constant rate of $0.4$m/s, how fast will the top of the ladder be moving down the wall when its bottom is $3$m away from the wall.   Is my solution wrong? How come I can't get the correct answer?  x=horizontal axis , y=vertical axis Area=XY/2, when X=3,  A=6m^2, dx/dt=0.4m/s  Y=2A/X  dy/dx=-2A/x^2.....A=6,x=3      =-12/9  dy/dt=dy/dx * dx/dt      =-12/9 * 0.4      =-0.533333


I have SQL Server 2012 database which I need to use. But I can't install SQL Server 2012 on my PC.   I use SQL Server 2005 only.  How can I change the database SQL Server 2012 To SQL Server 2005 OR 2008   Or help with installing SQL Server 2012

When trying to restore a backup to a SQL Server Express 2008 database I got the following error:  Restore failed for Server '...\SQLEXPRESS'.  (Microsoft.SqlServer.SmoExtended) System.Data.SqlClient.SqlError: The database was backed up on a server running version 10.50.1600.  That version is incompatible with this server, which is running version 10.00.2531.  Either restore the database on a server that supports the backup, or use a backup  that is compatible with this server. (Microsoft.SqlServer.Smo)   Is there a way to get a backup which is compatible with the older (in my case 10.00.2531) version from the newer (in my case 10.50.1600) version of SQL Server Express?


I need to combine multiple columns into a single column, so:  one     four    seven two     five    eight three   six     nine   Becomes:  one two three four five six seven eight nine

I want to concatenate/combine columns A, B and C into column D as displayed.  The number of filled entries in A, B and C will vary over time, so absolute cell addresses cannot be used.  What formula could I put into D1 to fill the column as illustrated?


All this mess started when I was installing Steam. When I downloaded Steam, it was showing "Missing 32-bit Libraries" so I have taken help from . That video suggested these commands: sudo apt install libc6-i386 sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install libgl1-mesa-dri:i386 libgl1-mesa-glx:i386 libc6:i386  When I run the last command I encounter E: Unable to correct problems, you have held broken packages  What could be the problem?

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


I'm fairly (but not completely) new to the revised command block functionalities and functions themselves but I think I've got a pretty competent understanding to get me by.  Basically, I'm trying to create a "hose" mechanic where, when the player holds shift with a specific item (I can do that bit easy enough), it summons falling blocks in front of the player with a set "forward" motion that is relative to the player's facing direction. I've tried doing a ray-casting technique but I want the "water" coming from the hose to have a natural looking falling animation which ray-casting doesn't do.

Since we can use ^ ^ ^ for relative coordinates with 1.13 like  /execute as Asaf31214 run summon lightning_bolt ^ ^ ^10   (Summons a lightning at 10 blocks from me to the direction I look. By the way, first part is how many blocks to left, second is up and third is how far from you, if you see this function for first time. It is just like cylindrical coordinates at science.)  I tried to write a command that throws a TNT out of me to the direction i want. It was supposed to be:  /summon tnt ^ ^1 ^10 //1 block up and 10 block forward// {Fuse:50,Motion[^0,^1,^10]}    if I don't use ^ it will throw the TNT to constant x direction. But it gives an error if I use it with new ^ coordinate system.  Can you explain me how to do this? I guess this coordinate system isn't fully useful yet since it is brand new, and this can be impossible for now.


I'm using the titling package to allow me to have multiple \maketitle tags in a document.   I also want to have headers telling me which "section" (as given by the title) I am in.   However, the header changes before the chapter changes, see page 2 of the minimal example below.   \documentclass{article} \usepackage[pagestyles]{titlesec}  \usepackage{titling} \usepackage{lipsum}  %% header \makeatletter \newpagestyle{main}{ \sethead[\@title][][] % even {}{}{\textsl{\@title} % odd \setfoot[\thepage][][] % even {}{}{\thepage} % odd }} \pagestyle{main}  \renewcommand{\@maketitle}{\flushleft\LARGE\bfseries \@title \par} \makeatother  \begin{document}  \title{First Title} \maketitle  \lipsum   \title{Second Title} \maketitle   \end{document}

I want more than one title for each topic in one document, I don't want to just combine two or three pdfs. And I want to show different headers starting from each title page. There's one problem I cannot solve.  I just used  \documentclass[a4paper,12pt]{article} \usepackage[utf8]{inputenc} \usepackage{fancyhdr} \usepackage{titling} \pagestyle{fancy} \setlength{\parindent}{0pt} \setlength{\parskip}{8pt} \setlength{\topmargin}{-0.5cm} \setlength{\droptitle}{-1.5in} \fancyhead{} \lhead{Personal Statement} \rhead{name} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0pt} \title{Personal Statement} \author{name} \date{Oct 25 2013} \begin{document} \maketitle  a lot of contents here \title{Previous Projects and Future Plans} \author{} \date{} \fancyhead{} \lhead{Previous Projects and Future Plans} \rhead{name} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0pt} \maketitle a lot of contents here \end{document}   The titles can be displayed correctly, but headers cannot. The last page under the first title displayed the second header, I don't know why because my \lhead{} and \rhead{} are after the second \title. Hope someone can help.  I'm also wondering if it's formal to use \tile and \maketitle several times in one document? If not, is there any better way to do so? And could anybody tell me the scope of the typesetting macros at the beginning (\setlength, \lhead and so on)? I'm not sure how to limit their scope if they're meant to be applied to the whole contents of the document. Thanks a lot.


What is the maximum order of any element in $A_{10}$?     My attempt: I tried this problem. But I am not sure about the answer. My answer is 21 because 10 can be written as 7+3. $A_{10}$ can have two disjoint cycle of length 7 and 3. Lcm of 7 and 3 is 21 which is the maximum order of an element of $A_{10}$. Is it correct? If not please guide me.

I'm trying to solve this exercise here:     What's the maximum order of any element in $A_{10}$?   Here are my thoughts:  One way of doing this seems to be by writing down all possible elements in $S_{10}$ (I mean just per order, not actually every element) and then looking at those that are in $A_{10}$.   This seems a lot of work but for completeness I will post this here. So, (some) possible orders for elements in $S_{10}$ are:  $$  \begin{matrix} \text{ disjoint cycles } & \text{ order} \\ (1)(1)(1)(1)(1)(1)(1)(1)(1)(1)  & 1\\ (1)(1)(1)(1)(1)(1)(1)(1)(2) & 2\\ (1)(1)(1)(1)(1)(1)(1)(3) & 3\\ (1)(1)(1)(1)(1)(1)(4) & 4\\ (1)(1)(1)(1)(1)(5) & 5\\ \dots & \\ (10) & 10 \\ (7)(2)(1) & 14\\ (5)(3)(2) & 30\\ (5)(3)(1)(1) & 15 \\ \end{matrix} $$  where $(k)$ denotes a cycle of length $k$.  So these are not all orders but I think I got the interesting ones. For example, I think $30$ is the highest possible order in $S_{10}$.   Also, I think $15$ is the highest order in $A_{10}$.  But my problem is I don't know how to prove it.     How can I prove that $15$ is the highest order in $A_{10}$?   And my other question is:     Is there a failsafe way to find elements of highest order? By that I mean one that makes sure I'm not missing any elements?   It seems kind of tricky: these are such large groups but they don't seem to contain any elements of large orders. Or do they? Maybe I'm missing something?


I need to know how to swap between languages in Ubuntu 14.04.3 using  command line .

I recently upgraded to Ubuntu 13.10, with the new keyboard handling system. The little "switch keyboard" option does not let me set it to Alt+Shift. How can I get this keyboard binding, as I have absolutely no interest in using the Mac-esque Super+Space combo?


I want to compare certain numbers I have in a list with values from another list by creating a range. Like this: r = np.arange(0, 20, 2)  Now, r is an array that looks like this: array([ 0,  2,  4,  6,  8, 10, 12, 14, 16, 18])  Now, I would like to use a for loop starting with the first two elements of r, and create a range, such that for the first iteration the 1st and 2nd elements are considered, then for the second iteration, the 2nd and 3rd elements are considered. So it looks like this for each iteration: range(0,2) range(2,4) range(4,6) range(6,8)  and so on. Is there a function to loop through in this way? I don't want to iterate over non-overlapping chunks, i.e. range(0,2) range(4,6) # This is not what I want range(6,8)  and so on.

I have a Python script which takes as input a list of integers, which I need to work with four integers at a time.  Unfortunately, I don't have control of the input, or I'd have it passed in as a list of four-element tuples.  Currently, I'm iterating over it this way: for i in range(0, len(ints), 4):     # dummy op for example code     foo += ints[i] * ints[i + 1] + ints[i + 2] * ints[i + 3]  It looks a lot like "C-think", though, which makes me suspect there's a more pythonic way of dealing with this situation.  The list is discarded after iterating, so it needn't be preserved.  Perhaps something like this would be better? while ints:     foo += ints[0] * ints[1] + ints[2] * ints[3]     ints[0:4] = []  Still doesn't quite "feel" right, though.  :-/ Related question:


Does anyone know if we can import Illustrator pattern swatches into an InDesign library or swatch pattern library?

I have a very reach swatch library in adobe-illustrator like food colors and.... But in adobe-indesign I don't have many colors. Why? Can I import them to indesign?


My wife and I have a "shared" email address, like thesmiths@example.com which we both use from Gmail when we both want to get replies or for signing up for certain websites.  When an email is received at that address, it gets forwarded to both of our personal Gmail accounts.  The problem is that when either one of us "sends as" that address, the other does not see the sent message. So we have to cc or bcc each other (and she usually forgets.)  Is there any automagic way to have those sent emails appear in both of our Gmail accounts?  I've tried filters but I don't think they work on outgoing messages. Basically we want a filter that would automatically forward emails from that address to the other person.  I know this can be done with standalone mail clients, but neither of us uses those. I want this to work by using Gmail webmail interface exclusively.

My wife and I have a "shared" email address, like thesmiths@example.com which we both use from Gmail when we both want to get replies or for signing up for certain websites.  When an email is received at that address, it gets forwarded to both of our personal Gmail accounts.  The problem is that when either one of us "sends as" that address, the other does not see the sent message. So we have to cc or bcc each other (and she usually forgets.)  Is there any automagic way to have those sent emails appear in BOTH of our Gmail accounts?  I've tried filters but I don't think they work on outgoing messages. Basically we want a filter that would automatically forward emails from that address to the other person.  I know this can be done with standalone mail clients, but neither of us uses those.


Can someone explain me what is escape velocity? why cant a bird with enough energy (super bird) fly into space?

Isn't G a continuous function and although you leave the immediate vicinity of the earth with an escape velocity won't it always exert a force, however small it may be. Won't that force eventually pull the object back to the earth (assuming the absence of other objects)


Generally speaking, and not specifying any particular recipe, why does my cake have a small dome on top, while the chef's recipe looks like this:     The dome on top looks like a mountain, with a good looking shape and shiny syrup glaze.  A local chef said that I should add a line of butter on top of the cake batter, so it will help explode in the middle and allow for even cooking.  But I still can't get the mountain shape.  My cake looks good but not as the original:    Is it an oven problem ?

I made several cakes in my life. I know the difference between different leavening agents. I know that low temperature tends to make flatter cakes, but I never could get this kind of shape. If I use a super hot oven I burn the surface and I don't get this shape, there must be something else. Does anyone have experience doing this? Does anyone have a recipe from any modern pastry chef showing this kind of cake? Maybe gluten content in the flour could help?  Thank you


I formatted my heading using the fncychap package. However, once applied it changes the format of my bibliography ToC entry from chapter to section (check the outline of the left image).  Compiling the file without the package shows the bibliography formatted as a chapter.   (My original preamble contains a lot more packages but I assume that these ones are the important ones.)  Is there a simple solution to this?    Minimal Code:   \documentclass{scrreprt}  \usepackage[titles]{tocloft} \usepackage{apacite}  \usepackage[Glenn]{fncychap}  \usepackage{hyperref}         \begin{document}  \tableofcontents \begingroup \let\clearpage\relax \chapter{chapter 1}  This is a test reference \cite{R_mgcv}  \phantomsection \bibliographystyle{apacite}  \renewcommand\bibname{Bibliography}  \bibliography{Biblio} \endgroup \end{document}

Latex shows bibliography by default as a section. I want it to appear as a chapter.   My code is:   \documentclass{book} \usepackage{xgreek} \usepackage{apacite} % .... \bibliographystyle{apacite}  \addcontentsline{toc}{chapter}{Βιβλιογραφία} \bibliography{PhDthesis}    And the result looks like this:  Βιβλιογραφία                              153       References . . . . .  . . . . . . . 153   Any ideas? Thanks in advance


All the places that I've seen an answer to this question simply state that it's because there is a stronger gravitational pull on the near side of the moon, facing the earth. But I'm wondering how this gravitational pull actually manages to shift the centre of gravity of the moon, and how does it tie into the idea that the centre of gravity is where a body's weight is evenly distributed?

My book says:     For most of the small objects, both are same. But for mammoth ones, they are really different ones. And in a gravity-less environment, COG is absent; COM still exists.   Ok, what's the big deal when things are small and big? How these two :  & ?


There are two meta sites that contains content related to the main Stack Overflow site:  and   If I have a question about Stack Overflow (privileges, bans, suggestions) which meta site is more adequate to ask it on and why?  Maybe more general question is what is difference between those two meta sites (except of that  is also for other Stack Exchange sites)? I had a look on  are on-topic on Meta Stack Exchange and  are on Meta Stack Overflow. But the second one shows info about the main Stack Overflow site, not just meta.

How do per-site metas, such as Meta Writers Stack Exchange or Meta Stack Overflow differ from the general Meta Stack Exchange?  Where should I go to ask my question?


I'm just a little confused with regards to price change. So for every buyer there must be a seller. How does price actually change? I hear it's because there are more buy orders than sell orders or vice versa. But if there's a buyer for every seller how does price gravitate in one direction?

Say a security has been trading at under $20.10, and there are limit orders selling at $20.10 and $20.21. Then Simon issues a limit order to buy at $20.21. According to , Simon would end up buying shares at $20.10.  Why does the exchange favor the buyer here?  I.e., why does the transaction execute at the seller's limit of $20.10 instead of the buyer's limit of $20.21?  (I.e., why don't Inara/River get to sell at $20.21 / above their limit, but Simon gets to buy at $20.10 / below his limit?)  Is the example flawed?  If it makes a difference, I'm mainly curious about NASDAQ and NYSE.  I tried Googling for specs (e.g. ), but couldn't find anything.  Only found that some  implementation executes the average of the buy/ask.  Just curious how the system works.


I've been trying to master the croissant for the last 3 months, and right now I really want to have the honeycomb view inside of it. Unfortunately, this was the maximum that I have reached:  How to come to this point?  PS: Right now doing a recipe that I make a dough (flour, water, sugar, salt, yeast), put in the fridge. After 1h, laminate the dough, chill, laminate again. Let it overnight before final stretch and croissant shape. Let it rise for 2 hours before going to oven.

I've been practicing baking croissants for a couple months now. I'm getting the hang of it (I feel) but I'm missing a crucial step that I cannot master and can't put my finger on how to fix it. I'll share my process below and I'd appreciate advice on the process. I like being an 'exact' (nearly science) cooker, so to understand my process, ingredients and temperatures. Please feel invited to be critical!  Ingredients:   - 300g flour (10.7g protein / 100g),   - 150g french butter  - 150ml/g water  - 10g sugar, 8g salt, 8g dried yeast  Step 1: I mix the dough and kneed it for about 5 minutes. The result:    Step 2 I roll the dough to a (near) rectangle with a thickness as shown by my finger.    Step 3 I place the slab in the fridge for about 40 minutes, after which it emerges quite hard, but still sufficiently foldable. Three-quarters or two-thirds of the slab is coated with the butter (all 150g of the butter)    Step 4: Starting of lamination I fold the dough as such, followed by rolling it out to a thickness of 1 cm again, and then another fold as also shown below:        Step 5 I let the dough rest for 40 minutes in the fridge, and then perform another double fold, followed by 40 minutes, and another fold.  Step 6 I let the dough rest in the fridge overnight, using a partially wet towel, or other semi-air tight cover  Step 7 In the morning (+8 hours), the dough is taken from the fridge and feel fluffy and soft, as expected with a risen dough. I roll it out to a final thickness of 1 cm as shown:  Step 8 I cut triangles using a regular kitchen knife and add the little cut at the long end to start rolling (shown in front):    Step 9 This is what they look like after rolling. I let them rise for another 30 minutes before entering the oven, pre-heated to 230 degrees C, or 450 Fahrenheit. There's also eggwash on top for a nice brown tan.    Step 10 After 20 minutes, they emerge as such:      Examining The taste is great, really. But I'm not content with the structure. It's too bready and I feel croissants should have a web-like structure with very thin layers within.  In particular with the result, I wonder what has happened. What I observe is:   The oven tray is quite wet after the croissants emerge from the oven. Is it the butter that ran out? Why? Even though the top of the croissant has great flaky-ness, the inside feels more like a regular bread but with butter infused into it.