I have the following version of locate: $ locate --version mlocate 0.26 Copyright (C) 2007 Red Hat, Inc. All rights reserved. This software is distributed under the GPL v.2.  This program is provided with NO WARRANTY, to the extent permitted by law.  I am trying to find all files (not directories) that have some specific basename, e.g. python, so I've tried the following: $ xargs -a <(locate -b '\python') -I{} file {} | sed -E '/directory|symbolic/d;s/:.*$//g'  This prints exactly the expected output. However, I wonder if there is an efficient way to achieve that instead?

A search with locate finds paths in the filesystem. Often, you know a priori you are interested in either files only, or directories only. A 'locate' search often returns many results. It would be useful to include only one of the types in the result, because it helps shorten the output.  But there is a more interesting argument to leave out either files or directories: because the list of result paths can be ambiguous - not only in theory.    The example below is a real world case, and not unusual:  $ locate --regex --basename "xfce4-keyboard-overlay$" /usr/local/bin/xfce4-keyboard-overlay /usr/local/share/xfce4-keyboard-overlay   Ok, we found something! But... files, or directories?    $ file /usr/local/bin/xfce4-keyboard-overlay  /usr/local/bin/xfce4-keyboard-overlay:   bash script   So that is a file...  $ file /usr/local/share/xfce4-keyboard-overlay /usr/local/share/xfce4-keyboard-overlay: directory   while the second is not.    This ambiguity is making long lists of paths hard to read, so it would be really nice to filter directories out, for example using a comman line option for locate.  Does something like this exist? Even if the filter for directories is separate from locate?  At least, one could use a script to iterate all the file names to check - which may be slow.


I've just downloaded a file called "Yousician.tar.gz". I understand it's a compacted file and it contains other files and folders. I can extract the contents with no problems. I wonder, though, how I can run the software. I really have no experience with Ubuntu 14.04 LTS (which is the one installed in my PC) or any other version of it.  Can anyone help, please?

I have downloaded tar.gz files. But I don't know how to install it. How do I install this kind of file?


I have a HP pavilion g6 1301tx laptop. It came up with 2GB of DDR3 ram, windows 7 pro (64 bit), 1 GB ATI graphic card and motherboard - hp 1670 serial number- pcela212c1bo7I. Few months back I installed Windows 10 (32 bit) . Now I want to increase ram by 2 GB , total of 4 GB so I installed a 2 GB DDR3 ram to the other slot and  checked system properties of my computer it says 2.5 GB usable out of 4 GB, now I don't understand why rest of the 1.5 GB is not usable what should i do to get 4 GB ram?

I am having windows 10 pro 64 bit OS,With 4 Gb RAM. But in memory section its showing 2.66 GB usable. Why? doing some research(Googling) I found that 32 bit machine can't utilize the full RAM. But though I am having 64 bit machine, still why its showing 2.66 GB usable? I tried a tweak through MSConfig → Boot → Advanced option → unchecking but nothing is working.  ------------------ System Information ------------------        Time of this report: 6/3/2016, 08:39:50          Operating System: Windows 10 Pro 64-bit (10.0, Build 10586) (10586.th2_release.160104-1513)                  Language: English (Regional Setting: English)       System Manufacturer: LENOVO              System Model: 20351                      BIOS: InsydeH2O Version 03.73.069ACN28WW                 Processor: Intel(R) Core(TM) i3-4030U CPU @ 1.90GHz (4 CPUs), ~1.9GHz                    Memory: 4096MB RAM       Available OS Memory: 2722MB RAM                 Page File: 3268MB used, 1885MB available               Windows Dir: C:\WINDOWS           DirectX Version: 12       DX Setup Parameters: Not found          User DPI Setting: Using System DPI        System DPI Setting: 96 DPI (100 percent)           DWM DPI Scaling: Disabled                  Miracast: Available, with HDCP Microsoft Graphics Hybrid: Not Supported            DxDiag Version: 10.00.10586.0000 64bit Unicode   --------------- Display Devices ---------------           Card name: Intel(R) HD Graphics Family        Manufacturer: Intel Corporation           Chip type: Intel(R) HD Graphics Family            DAC type: Internal         Device Type: Full Device          Device Key: Enum\PCI\VEN_8086&DEV_0A16&SUBSYS_380C17AA&REV_0B      Display Memory: 1473 MB    Dedicated Memory: 112 MB       Shared Memory: 1361 MB        Current Mode: 1366 x 768 (32 bit) (60Hz)


I use uTorrent to download files, and would like to do so with some level of encryption. I have signed up to  to use their VPN service, and have connected to it using the Network and Sharing center.  However when i connect to the VPN all my network traffic, web browsing and uTorrent, is routed through the VPN. Is is possible to set it up so that the uTorrent traffic is sent through the VPN, but all other traffic such as web browsing is not?

I connect to my company VPN for email, intranet, fileshare etc, but when I'm working I also like to listen to Spotify which is blocked through the company network, so I have to disconnect to the VPN to use it. Is there anything I can do which will enable me to remain connected to the VPN but bypass it for Spotify? I use the Cisco VPN client.


Last night I decided to dual boot my computer. I set up partitions and got everything set up how it should, It was roughly 3 am at the time I did this and I wasnt thinking clearly, but I said to delete the current operating system and install Ubuntu, Idgaf about windows, I could care less if I ever touch it again. I just want the files that I had on Windows back, I had some projects that I had been working on for months and they're gone now. I checked my drive partitions and There is 3, one huge one mounted on / and then 2 smaller ones that are around 3Gb, If there is ANY way to recover my old files, PLEASE tell me. I need these old files back.

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


How come we write drought and draught but pronounce [draut] and [dra: ft] or write enough and though but pronounce [i’naf] and [đou]?

There are cough, tough, bough, through, and though (and "hiccough", if you're not from the U.S.); each of which has a different pronunciation for the ending "-ough".  Why is this?  Edit for clarification: I'm trying to figure out why cough is spelled with an "-ough", if it's pronounced with an "-off".  And then tough, pronounced "tuff".  Why is that not spelled "tuff"?  Bough, through, and though should be spelled "bow", "thrue" (or "thru"), and "thoe".  Where did "-ough" come from?  And then hiccough.  Since that derives from cough, it should be pronounced "hickoff", but it isn't.


I've tried to install wine in ubuntu 12.10 through terminal. I write this script to install wine: sudo apt-get install wine but its is showing this error:  The following packages have unmet dependencies:  wine : Depends: wine1.4 but it is not going to be installed E: Unable to correct problems, you have held broken packages. void@Void:~$ apt-get update E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied) E: Unable to lock directory /var/lib/apt/lists/ E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?   please tell me some solution for this problem or tell me some alternative to install wine in my system.

Every time I try to install "WINE" VIA the Software Center on Ubuntu 12.10, I get this error:  The following packages have unmet dependencies:  wine1.4: PreDepends: dpkg (>= 1.15.7.2~) but 1.16.7ubuntu6 is to be installed          Depends: libc6 (>= 2.14) but 2.15-0ubuntu20 is to be installed          Depends: wine1.4-amd64 (= 1.4.1-0ubuntu1) but 1.4.1-0ubuntu1 is to be installed          Depends: wine1.4-i386 (= 1.4.1-0ubuntu1) but it is not going to be installed   When I try installing it VIA the terminal, this is what I get:  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  wine1.4 : Depends: wine1.4-i386 (= 1.4.1-0ubuntu1) but it is not installable            Recommends: gnome-exe-thumbnailer but it is not going to be installed or                        kde-runtime but it is not going to be installed            Recommends: ttf-droid            Recommends: ttf-mscorefonts-installer but it is not going to be installed            Recommends: ttf-umefont but it is not going to be installed            Recommends: ttf-unfonts-core but it is not going to be installed            Recommends: winbind but it is not going to be installed            Recommends: winetricks but it is not going to be installed E: Unable to correct problems, you have held broken packages.   how do I fix this?


I have a long text that exceeds the column margins  It's not an English word. it's this hexadecimal number  172CB875A0C7A7868CBCB9AEF80F97392560559ADF1D107FBD3EBFE56802D1990DDF842E15E308D7441041CE93F65971D2F71C4A442DA9440000000000000460  How to fit it the column?

I have to include relatively small genomic sequences in a Latex document (still, they are words of around 600-900 As Ts Gs and Cs) but I cannot find a way to force line wrapping after a certain number of characters.  I saw a massive amount of similar topics on the matter, most of them citing listings and discretionaries, but all of the suggested solutions rely on either the small size of the long words to manually add "invisible breakpoints", or the fact that within the words, some special characters (dots, underscores) or patterns, can be defined as breakable areas.  Unfortunately, the sequences I work on are too long to edit manually, and there's no special pattern that can be used within a discretionary, and none of these solutions would help if I want to stick to the standard 50 bases per line.  I'm really at loss of ideas, so if you would have any lead, please share!  Here is an example of sequence that I need to include:  CTCCTTGGGCTGTTATTCCGTAAAAGTATTTGTGGAAGATACGGCTGTCATACATGATATGTTTTTTGTTTATAACAATAGTTCTTTCTTTGATTTCACCATAGGTTGCCTCAAATTGCTCTTTTGTTGCTTGTCCAGCTGTTAAGACTAAATGTTTTGACCCCTCATTTATAAGACCGATTGCGTTGAATGGTAAGACATTCTGTTGTGCTGATTGTAATTCTGAATAGCTACGGATTTTTATGAAGATATAGTTTTTTAATATTGGTATTTCATTCCAGACATACTTCTGTATAAAGGATTTATTAAACGGTGTTGTTTTGATTGCTCTATAATACTTATCTTGTTGTCCTCTTAATTTTACCCAAGGTCTTTCAAACTCTTGGGAGTTAATGATTATAAGCATATTGTAAAGCTGTCCAGCTAATCCGAAGAATACTGGAAGCCAGTGGGTAAAGCTTGTCTGTTTTGGTAAAGCTGTTTGAACGTCTGACAAGAACAAGTCCAGACCTTCATATTTGTGGATTTTTTGAAACTTCATATTTTGATATGAACCGTCTACAATATCACTATATTTTACTGGTTGCCCAGTTTTTTGATTAATGTATCCAGGTCTTTAATATCTACTACTAAAACCACCGTAACCATAGTCCACGTTAGAGATATAGAGAGGTTTCGCATAAATGTGAACCCAGATTGCTTGTTGTTGTCTTTCATAACTCATTTGAAGACCAGTTTTAATGCGTTCTTTAATTGCTTGATACGTT


Why does some, many year old, questions with no apparent activity suddenly appear with recent activity. I've seen questions many years old that have no edits or comments of recent dates, but with 'Active 2 days ago' (or similar).  I've searched for an answer to avoid making a duplicate, but cannot seem to find what I'm looking for. I've seen advice on how to make an old question active, bumping it with an edit of the original question, but not how to bump 'invisibly'.  Since I'm new to StackExchange sites, much is new to me and I may have overlooked some very basic functionality. I apologize if so.  EDIT: I cannot see how this 'Duplicate' answers my question. It does have an "...etc" in it - which, by the way makes me wonder if the real answer is in the "...etc" part. But that leaves the actual question unanswered; How can a question (post) that has no edit/comment or anything visible that affects the post, make itself 'Active' again. From the possibly duplicate post;      Active means that it has a change: an edit, an answer, an edit to an   answer, bumped by Community♦ etc...   So what is the change when you cannot see it? What lies in the "...etc"? A possible definitive answer might be the comment from Jenayah, in which case a useful bump technique would be to comment on ones question and then delete it.

In any post there are three attributes:   Asked  Viewed Active   What is the meaning of the active in a post?


I am trying to download torrents and when I select a torrent it asks for a application and there isn't one in the default and upon searching /bin I find none.   I do some searching and see that I can tell Firefox what app to use for magnet links, magnet doesn’t even show up in the list of things I can associate a default application with.

Every time I download a torrent file (.torrent), Firefox thinks I should open it with a text editor. How can I get it to open with Transmission? In Edit -> Preferences -> Applications, there's no setting for torrent files, and no apparent way to add a new filetype.


I have pretty much every single hard mode weapon, but I have killed a bunch of diabolists, and haven't got one! Is there a way to increase the drop chance?

Some items in Terraria drop only very rarely from certain enemies. It's a pain having to farm so many enemies to try to get these rare items. Is there any way to make them drop more often?


I host two websites that are accessable from the Internet by podcast.example.com. They are one-to-one NAT on an internal network. On the internal network, I would like to have the hosts type podcast.example.com into there browser and the request go to 192.168.168.240 instead of the public IP. I have 30-50 hosts on the network so going to everyone and modifying the host file is not really an option.

I have web site being hosted on my computer, so that mysite.com is served from one of my machines. However, even though everyone else can access this site normally, if I type its name (or, indeed, any subdomain such as x.mysite.com), I can't get the site to show. Now, if I edit the hosts file to redirect mysite.com to 192.168.1.5, everything is fine.  However, this is not a viable solution because then I need to edit the hosts file on every machine on the network. So, my question: is there an easier way?


I have a large Raster with High resolution DEM of a large area, and I need to split it into smaller squares of 500mx500m, so that I can run other raster functions on it.  Basically I'm looking for the GDAL version of what I had asked here:   How Do I Split a Raster into parts using GDAL?

I have a raster (USGS DEM actually) and I need to split it up into smaller chunks like the image below shows. That was accomplished in ArcGIS 10.0 using the Split Raster tool. I would like a FOSS method to do this. I've looked at GDAL, thinking surely it would do it (somehow with gdal_translate), but can't find anything. Ultimately, I'd like to be able to take the raster and say how large (4KM by 4KM chunks) I would like it split up into.


I am tring to read a file which has lines like so:  438782    Abaca bunchy top virus    NC_010314    Musa Sp.   So the lines contain information seperated by tabs. I am tring to read this file and do something with every line after splitting them. It keeps throwing a NullPointerException error though. This always happens on the line where I try to split. In the code below I left everything unrelated to this issue out.  BufferedReader br = new BufferedReader(new FileReader(filename)); String nextLine = br.readLine(); String[] line; while (nextLine != null) {     nextLine = br.readLine();     line = nextLine.split("\t"); //Error line     //Do something with line }

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


Assuming either $|z|=1$ or $|w|=1$ and $\bar z w$ $\neq 1$, prove that  |$\frac{z-w}{1-\bar zw}$| $=1$  Any hint? I don't have a clue

Let's suppose that $|z|<1$ and $|w|=1$. Show that the modulus of $\displaystyle \frac{z-w}{1-\bar{z}w}$ is always $1$. Some hint.


Failed to open a session for the virtual machine Windows10.      The virtual machine 'Windows10' has terminated unexpectedly during   startup with exit code 1 (0x1).      Result Code: NS_ERROR_FAILURE (0x80004005) Component: MachineWrap   Interface: IMachine {5047460a-265d-4538-b23e-ddba5fb84976}   and the second one is like this     Kernel driver not installed (rc=-1908)      The VirtualBox Linux kernel driver is either not loaded or not set up   correctly. Please try setting it up again by executing      '/sbin/vboxconfig'      as root.      If your system has EFI Secure Boot enabled you may also need to sign   the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before   you can load them. Please see your Linux system's documentation for   more information.      where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The   support driver is not installed. On linux, open returned ENOENT.

I tried to use my Virtual Box and this is the error I received - (I just updated to the new Ubuntu also) and I am VERY new at this Linux OS.     Kernel driver not installed (rc=-1908)      The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or   there is a permission problem with /dev/vboxdrv. Please reinstall the   kernel module by executing      '/etc/init.d/vboxdrv setup'      as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS   package first. This package keeps track of Linux kernel changes and   recompiles the vboxdrv kernel module if necessary.


Evaluate $\displaystyle \int^{\pi/2}_0 \frac 1 {1+\tan^\sqrt2x}dx$.   I tried many different methods but all failed, and I start suspecting that I can't do it in normal way (i.e. find the indefinite integral first, then substitute that bounds). I have no idea what I should do. Please give some idea!!

Evaluate the integral $$\int_0^{\pi/2} \frac{1}{1+\tan^\alpha{x}}\,\mathrm{d}x$$


As the question title says, is the product of spheres $S^2 \times S^2$ diffeomorphic to the set of oriented $2$ dimensional vector subspaces of $\mathbb{R}^2$?

$G_2(\mathbb{R}^4)$ is the Grassmannian manifold of two-dimensional subspaces of $\mathbb{R}^4$. I would like a detailed proof. Can it be done explicitly? I mean, showing the map and checking its differentiability using charts?


I'm curious about the grammar in the vulgar idiom "".  Why is there a don't instead of doesn't? The latter strikes me as the correct grammatical form, but I'm not sure.

I'd like to know how the sentence "That don't impress me much" sounds to a native English speaker.  The phrase is the title of a song by Shania Twain, and to my eyes it contains a clear error. It is obviously intended, and I want to know what was the effect that the author wanted to obtain.  Other examples that come to mind:   “She's got a ticket to ride, but she don't care” — The Beatles “My love don't cost a thing” — Jennifer Lopez “It don't matter” — Akon “She don't care about me” — heard in the Lost series “It Don't Mean a Thing” — a jazz album title “The Sun Don't Lie” — another album title


I'm using Django and Mysql in order to, for instance, display some news articles. These articles are in English and German. I would like to know what database organization is more efficient:  1 table made of the following fields:  Articles   English_title  (char field) English_body  (char field) German_title  (char field) German_body  (char field) Picture  (file field)   or  2 tables made of the following fields:  English articles   English_title  (char field) English_body  (char field) Picture       (file field)   German articles   German_title (char field) German_body  (char field)   It'll display English articles on a template and German ones in another one.

I'm developing a multilanguage software. As far as the application code goes, localizability is not an issue. We can use language specific resources and have all kinds of tools that work well with them.  But what is the best approach in defining a multilanguage database schema? Let's say we have a lot of tables (100 or more), and each table can have multiple columns that can be localized (most of nvarchar columns should be localizable). For instance one of the tables might hold product information:  CREATE TABLE T_PRODUCT (   NAME        NVARCHAR(50),   DESCRIPTION NTEXT,   PRICE       NUMBER(18, 2) )   I can think of three approaches to support multilingual text in NAME and DESCRIPTION columns:   Separate column for each language  When we add a new language to the system, we must create additional columns to store the translated text, like this:  CREATE TABLE T_PRODUCT (   NAME_EN        NVARCHAR(50),   NAME_DE        NVARCHAR(50),   NAME_SP        NVARCHAR(50),   DESCRIPTION_EN NTEXT,   DESCRIPTION_DE NTEXT,   DESCRIPTION_SP NTEXT,   PRICE          NUMBER(18,2) )  Translation table with columns for each language  Instead of storing translated text, only a foreign key to the translations table is stored. The translations table contains a column for each language.  CREATE TABLE T_PRODUCT (   NAME_FK        int,   DESCRIPTION_FK int,   PRICE          NUMBER(18, 2) )  CREATE TABLE T_TRANSLATION (   TRANSLATION_ID,   TEXT_EN NTEXT,   TEXT_DE NTEXT,   TEXT_SP NTEXT )  Translation tables with rows for each language  Instead of storing translated text, only a foreign key to the translations table is stored. The translations table contains only a key, and a separate table contains a row for each translation to a language.  CREATE TABLE T_PRODUCT (   NAME_FK        int,   DESCRIPTION_FK int,   PRICE          NUMBER(18, 2) )  CREATE TABLE T_TRANSLATION (   TRANSLATION_ID )  CREATE TABLE T_TRANSLATION_ENTRY (   TRANSLATION_FK,   LANGUAGE_FK,   TRANSLATED_TEXT NTEXT )  CREATE TABLE T_TRANSLATION_LANGUAGE (   LANGUAGE_ID,   LANGUAGE_CODE CHAR(2) )    There are pros and cons to each solution, and I would like to know what are your experiences with these approaches, what do you recommend and how would you go about designing a multilanguage database schema.


I am having a problem with referencing a variable from another header file.  public:     static const long Infinite = -1L;     Timer(){}     Timer(const std::function<void(void)> &f) : funct(f) {}     Timer(const std::function<void(void)> &f, const unsigned long &i, const long &repeat = Timer::Infinite) : funct(f), interval(std::chrono::milliseconds(i)), CallNumber(repeat) {}   when I try to use 'Infinite' in the other header file as follows  Timer MailTimer(TimerSendMail, 2000*60, Timer::Infinite);   I found error saying "undefined reference to `Timer::Infinite'|"

Can anyone explain why following code won't compile? At least on g++ 4.2.4.  And more interesting, why it will compile when I cast MEMBER to int?  #include <vector>  class Foo {   public:       static const int MEMBER = 1;   };  int main(){       vector<int> v;       v.push_back( Foo::MEMBER );       // undefined reference to `Foo::MEMBER'     v.push_back( (int) Foo::MEMBER ); // OK       return 0; }


I need to evaluate the limit $$ \lim_{x\to-\infty} \left(1+\frac{1}{x}\right)^{x^2}$$  I can substitute in $x := -x$ to show that this is the same as $$ \lim_{x\to\infty} \left(1-\frac{1}{x}\right)^{x^2}$$  However, I don't know where to proceed from here. I can rewrite the limit as  $$ \lim_{x\to\infty} \left(\left(1-\frac{1}{x}\right)^x\right)^x $$  but this does not help as Algebra of Limits Product only applies to finitely many limits. I also tried substituting $x := 1/x$ to get  $$ \lim_{x\to0^+} (1-x)^{\frac{1}{x^2}} $$ but this does not help me either. I expect intuitively the answer to be $\infty$ as the larger exponent means the limit is "growing faster" than $\lim\limits_{x\to\infty} (1+\frac{1}{x})^{x} = e$ but I do not know how to show this.

How can I compute the limit $\lim_{n\rightarrow\infty}\left(1+\frac{1}{n}\right)^{n^2}$? Of course $\lim_{n\rightarrow\infty}\left(1+\frac{1}{n}\right)^{n} = e$, and then $\left(1+\frac{1}{n}\right)^{n^2} = \left(\left(1+\frac{1}{n}\right)^n\right)^n$. Since the term inside converges to $e$, the whole thing is $e^n$, and can I conclude that the limit is infinity as $n\rightarrow\infty$?


Is it true that if $n_1, \dots, n_m \in \mathbf{Z}$ are distinct, then $\mathbf{Z}[x]/((x-n_1)\dots(x-n_m)) \cong \mathbf{Z}^m$?  I think the answer is yes, but I'm not sure my argument is correct.    Let $f(x) = (x-n_1)\dots(x-n_m)$ and let $R = \mathbf{Z}[x]/(f(x))$.  Since $f(x)$ is monic and the degree of $f(x)$ is $m \geq 1$, $R$ is free over $\mathbf{Z}$ of rank $m$ with basis $\left\{\bar{1}, \bar{x}, \dots, \bar{x}^{m-1}\right\}$.  Thus $R \cong \mathbf{Z}^n$.    Is this a correct solution?  What if $n_1, \dots, n_m$ aren't necessarily distinct.  Is it still true then?  It seems so.

I have to show that the ring $\mathbb{Z}[X]/(X^2-1)$ is not isomorphic with $\mathbb{Z}\times \mathbb{Z}$.    I know that $(\mathbb{Z}\times\mathbb{Z})^*=\{(\pm1,\pm1)\}$, so I thought I should be looking for elements which have inverses in $\mathbb{Z}[X]/(X^2-1)$ and hopefully find more or less than 4. But I didnt succeed, so I need hints. Thanks.


Suppose I have a python script script.py from time import sleep for i in range(3):     print(i)     sleep(1) print('done')  which I want to run on a remote server via an ssh command e.g. ssh me@server "python script.py"  If I do the above verbatim, I get the whole output 0 1 2 done three seconds after I started the script. Instead, I would like to see the output immediately as it is generated by the script, i.e. 0 -one second later- 1 -one second later- 2 -one second later- done. I've seen similar questions regarding viewing the log file, but is there an easy way to do this (e.g. without intermediate logging to a file on the server)?

When trying to write the stdout from a Python script to a text file (python script.py > log), the text file is created when the command is started, but the actual content isn't written until the Python script finishes. For example:  script.py:  import time for i in range(10):     print('bla')     time.sleep(5)   prints to stdout every 5 seconds when called with python script.py, but when I call python script.py > log, the size of the log file stays zero until the script finishes. Is it possible to directly write to the log file, such that you can follow the progress of the script (e.g. using tail)?   EDIT It turns out that python -u script.py does the trick, I didn't know about the buffering of stdout.


Is it possible to create categories to define custom additional methods for existing iOS classes and controls in Delphi/FMX (like in Xcode, without subclassing?  For example, i want to change the appearance of UILabel, especialy the text alignment of them, within a UIAlertContoller class. In Xcode I would simply create a neu category for UILabel with a new method:  @interface UILabel (TextAppearance) @property (nonatomic, assign) NSTextAlignment appearanceAlignment UI_APPEARANCE_SELECTOR; @end  @ implementation UILabel (TextAppearance)  -(void)setAppearanceAlignment(NSTextAlignment)alignment {     [self setTextAlignment:alignment]; }  -(NSTextAlignment)appearanceAlignment {     return self.textAlignment; }  @end   How can I do the same with Delphi/FMX?

Delphi (and probably a lot of other languages) has class helpers. These provide a way to add extra methods to an existing class. Without making a subclass.  So, what are good uses for class helpers?


I try to understand what magic trick I need to prove that  $$\lim_{x\rightarrow \infty} \left(\frac{a^{1/x}+b^{1/x}}{2}\right)^x = \sqrt{ab}.$$  If I evaluate directly, I get indetermination $1^{\infty}$, but i tried with the usual hint and i can't do that. Any suggestions? Thanks a lot.

Let $a$ and $b$ be positive reals. Show that $$\lim\limits_{n\to\infty} \left(\frac{a^{\frac{1}{n}}+b^{\frac{1}{n}}}{2}\right)^n =\sqrt{ab}$$


I am trying to create a white box centered, both horizontally and vertically, within a div with a background image.  I have managed to center it horizontally as seen below in the "center"-class, but not vertically. I have tried to set "bottom" for the "filter-box"-class to the desired value and tried to use line-height and vertical align - all without the box even moving.    .image-container {   background: url('stubbe.jpg') no-repeat fixed;   height: 40em;   -webkit-background-size: cover;   -moz-background-size: cover;   -o-background-size: cover;   background-size: cover;   line-height: 20em; }  .filter-box {   background-color: white;   width: 500px;   height: 100px;   vertical-align: middle; }  .center {   margin: auto;   width: 50%; } html

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

testing...


If $m^*(E)=0$ show that $m^*(E^2)=0$ where $E^2=\{x^2:x\in E\};E\subseteq \Bbb R$.   EDITS(Please  don't close this): I did not get a satisfactory answer.So I posted my approach. Here is my approach:  Since $m^*(E)=0\implies \exists $ a sequence of intervals $\{I_n\}$ such that $E\subset \cup I_n$ and $\sum l(I_n)<\epsilon $ for all $\epsilon>0$.  Now since $E\subset \cup I_n\implies E^2\subset \cup I_n^2$ because let $x^2\in E^2\implies x\in E\implies x\in I_n$ for at least one $n\in \Bbb N\implies x^2\in I_n^2\subset \cup I_n^2$.  Also $l(I_n)<\sum l(I_n)<\epsilon\forall n\in \Bbb N\implies l(I_n^2)<\epsilon^2\implies \sum l(I_n^2)<\epsilon^2\implies m^*(E^2)=0$.  Please help me to check whether it is correct or not .If not where are the loopholes in the proof.Please point them.

Currently I'm just working through measure theory just to see if its something I would like to take.  Unfortunately I am stuck on this problem from Carothers.     If $m^*(E)=0$, then $m^*(E^2)=0$.   Where $m^*$ denotes outer measure and $$E^2=\{x^2:x\in E\}.$$  I toyed with the idea that $I_k < 1 \Rightarrow I^2_k < I_k$.  However I am at a loss as to how to set up a chain of inequalities (which is what I am assuming I need).


I recently came across a surname in a podcast, called Barleyfoot. In the podcast, his family was referred to as the Barleyfeet. Is this correct? Or should it be Barleyfoots? What about other possible names ending in words like goose, man, cactus etc. whose original words' plurals don't just add an 's' at the end? I'd like to say that a surname is a Proper noun, but if multiple people in a family have it, is it a Proper noun/ Collective noun?  Edit: The question mentioned as similar, does not cite any references for the answers given. Got answer with reference here

When pluralizing family (last) names that also happen to be common English words, does the pluralization follow the same rules as the common word?  For example, "the Smith family" can be pluralized as "the Smiths", but what if the family name is "Wolf" or "Fish"?  Would the correct pluralization be "the Wolfs" or "the Wolves"?


Within this component our css is only applied to the div within the card but not to any div in the  (title). Is there a feasible reason or is it just a bug?  (In our real problem we are trying to manipulate the card header but can't access it. Not like demonstrated here, nor with using css classes.)  HTML:  <template>     <lightning-card title="test">
test
     </lightning-card> </template>   CSS:  div {     background-color: green; }   Feel free to try it yourself, in this

How can I change the colors of lightning-button?  I tried doing this in my css:  .my-button {     background-color: #14a6bc;     color: #ffffff; }   and applying that class to my <lightning-button> and removing the variant but I still get the base colors? I am trying to use these examples:


I'm trying to solve conway game of life but I think I'm stuck. I'm counting the surrounding cells which I think I'm getting it correctly. However, when I assign those numbers to a temp_board and when I print temp_board, the values are all wrong.   I put it into the temp_board to evolve to the next generation. I know this is not the best code but I'm trying to iterate so I'm trying to solve it in the simplest way first.   class Solution(object):     def gameOfLife(self, board):         """         :type board: List[List[int]]         :rtype: void Do not return anything, modify board in-place instead.         """         m = len(board)         n = len(board[0]) if m else 0          temp_board = [[0] * n] * m          def count_cell(i, j):           list_of_tuples = [(i-1, j-1), (i-1, j), (i-1, j+1),               (i, j-1), (i, j), (i, j+1),               (i+1, j-1), (i+1, j), (i+1, j+1)]            count = 0           for l in list_of_tuples:             x, y = l             if x >= 0 and y >= 0 and x < m and y < n:               if x is not i or y is not j:                 if board[x][y] == 1:                   count += 1            return count          for i in range(m):           for j in range(n):             cell = board[i][j]             count = count_cell(i, j)             temp_board[i][j] = count             #print('(%s, %s) has %s' % (i, j, count))         print(temp_board)  """             if cell == 1:               if count < 2:                 temp_board[i][j] = 0               elif count is 3 or count is 2:                 temp_board[i][j] = 1               elif count > 3:                 temp_board[i][j] = 0             else:               if count == 3:                 temp_board[i][j] = 1         """  board = [[0,0,0,0,0],     [0,0,1,0,0],     [0,0,1,0,0],     [0,0,1,0,0],     [0,0,0,0,0]]  Solution().gameOfLife(board)   This is the result  ➜  game-of-life git:(master) ✗ python main.py 0 1 1 1 0 0 2 1 2 0 0 3 2 3 0 0 2 1 2 0 0 1 1 1 0 [[0, 1, 1, 1, 0], [0, 1, 1, 1, 0], [0, 1, 1, 1, 0], [0, 1, 1, 1, 0], [0, 1, 1, 1, 0]]   The weird thing is when I print each cell count, it's all correct. But when I print the temp_board, it's all wrong. I'm sure I miss something obvious.

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I wrote my classloader:  package ru.sberbank.school.homework8;  import ru.sberbank.school.homework8.plugin.Plugin;  import java.io.File; import java.io.FileInputStream; import java.io.IOException;  public class PluginManager extends ClassLoader { private final String pluginRootDirectory;  public PluginManager(String pluginRootDirectory) {     this.pluginRootDirectory = pluginRootDirectory; }  public Plugin load(String pluginName, String pluginClassName) {     String name = pluginName + "." + pluginClassName;     try {         Class clazz;         try {             clazz = super.findSystemClass(name);         } catch (ClassNotFoundException e) {             String fileName = pluginRootDirectory + "\\" + pluginName + "\\" + pluginClassName + ".class";             try (FileInputStream fin = new FileInputStream(fileName)) {                 byte[] buffer = new byte[(int) (new File(fileName).length())];                 fin.read(buffer);                 clazz = defineClass(name, buffer, 0, buffer.length);             }         }         return (Plugin)clazz.newInstance();      } catch (IOException | InstantiationException | IllegalAccessException ignored) {         return null;     } }   }  When I run it:  package ru.sberbank.school.homework8;  import ru.sberbank.school.homework8.plugin.Plugin;  public class PluginManagerTest {     public static void main(String[] args) {         String pluginRootDirectory = "D:\\sbt\\target\\classes\\ru\\sberbank\\school\\homework8";         PluginManager pluginManager = new PluginManager(pluginRootDirectory);         Plugin plugin = pluginManager.load("plugin", "PluginImpl");         if (plugin != null) {             plugin.doUseful();         }     } }      Exception in thread "main" java.lang.NoClassDefFoundError:   plugin/PluginImpl (wrong name:   ru/sberbank/school/homework8/plugin/PluginImpl)   at   java.lang.ClassLoader.defineClass1(Native Method)   I get NoClassDefFoundError. Why??? How can I fix it???  Help me, please!   package ru.sberbank.school.homework8.plugin;  public class PluginImpl implements Plugin {     @Override     public void doUseful() {         System.out.println("My plugin!");     } }

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


The more upvotes a comment has the more red the number gets. But at a specific point the number of upvotes of a comment stops being red.   That is unfair. I vote for more red! No matter how many upvotes.

High voted comments are in black text and look boring and unremarkable, while comments with a few votes have the red "hot" color on them. (I have no idea what is with the blue 25 :P)  Could this be changed so that highly voted comments actually look highly voted?


I have spent 2+ years working on a project in computational neuroscience that has interest for clinicians and now I am starting to write the paper text. I want to submit it to one of neurology-related journals (and clinicians who I work with, support this). However as far as I understand, it does not make sense to include too much technical info / too much extra statistics in the journal for neurologists. I have developed a pretty elaborate data analysis pipeline than can do many things, so I want also to publish other less-bold-sounding outcomes of my project in a journal for computational neuroscience or in a journal for biomed data analysis. I have seen many people doing something along these lines (though not among my immediate colleagues), but for me it is the first time. What worries is that I don't understand very well how to organize the second paper: should I include the main result, that I report in the neurological paper, in the second one, or just briefly mention it, citing the submitted paper / preprint? So to summarize, I have two somewhat related questions:  is there somewhere any informal guideline on how to organize the second paper in relation to the first one? I could either present the second part of the research as a "methods" paper (emphasizing the code I wrote, it can indeed be used by other people) or as a "new approach" paper (emphasizing the new approach that gives interesting results). I think both are important. How do I choose? Or should I write 3 papers instead of two?

In computer systems, it's relatively common to have a large problem which is broken up into multiple sub-problems, each of which is substantial in its own right and is in the realm of different subsets of students. Suppose there's two parts, A and B. Suppose that properly presenting B requires explanations and background which A establishes (concepts, principles, etc.), and preferably would reproduce some figures for clarity. However, A has been written but not yet accepted/published. How should the authors of B proceed? Ideally the figures would be reproduced from the drafts and clearly cited as copies, but it seems weird as the original is yet unpublished. This also creates the worry that reviewers for a later submission of A would complain that these contributions are not novel as B's earlier publication have already presented them.


$\int_0^\frac{\pi}{2} \frac{\cos^{9999}(x)}{\cos^{9999}(x)+sin^{9999}(x)} dx$  Using desmos the value of definte integral is around $\frac{\pi}{4}$ but I don't know where to start.

Possible Duplicate:          How can we integrate $$\int_0^\frac{\pi}2\frac{\sin^nx}{\sin^nx+\cos^nx}\,\mathrm dx , \,\,\,\,\,\,\,\,\, n\in N \quad?$$ Thanks for any hint.


help me please i so confused with this install!! i have 2 os and want to have 3 but Ubuntu on a USB?  i have windows 7 windows 8 and want to install Ubuntu to a USB please help?

If you are hurrying to reply, System → Administration → StartUp Disk Creator -- no, that's not what I'm talking about.   I want to try Ubuntu 11.04's Unity without touching my existing Ubuntu install.  To do this, I need to install the nVidia drivers first (sigh).  To do this, I need changes to persist a reboot.  To do this, I need to really install Ubuntu on a USB key.  How do you do that?    What I tried   I tried to make a USB key from , then boot from it, then choose "Install Ubuntu." The installer refused to install to the installation media itself. I tried, from my installed copy of Ubuntu:  sudo kvm /dev/sdb --cdrom .cache/testdrive/iso/ubuntu_natty-desktop-i386.iso   ...but the installer didn't detect the disk properly.


The information given by Windows 10 is that this picture was taken somewhere in Montenegro. Can someone please give the exact location?

Windows 10 has an extensive collection of lock screen photos, many of which have  here on Travel.SE.  Is there a website which lists the location of all of these photos? I imagine Microsoft has purchased an official license, so they should have a record about the photographer and the place where the photo was taken.


Duplicate, maybe. ()     While the HNQ list creates a lot of cross-site traffic (which is wanted), it also causes issues on those sites sometimes, in particular on sites like  where the 'hotness' of some questions strongly distorts the "voting = quality" paradigm.  However, I'm not about fixing HNQ here. Instead, I'm wondering if there is a good method to find out (via query or otherwise) if a question has in the past ever been placed on the HNQ list. ( See also:  )  And if not, I would like to propose this as a general feature request. The information whether or not a question has been on HNQ is a valueable meta-info which ideally should be captured in the database.  It would allow   easy flagging of such questons in some site design (i.e. an addtional icon) easy filtering for/against such questions in the search query notification and user statistics ( see:  ) interesting analysis of the impact of HNQ in various contexts

I've had at least one question featured as a "hot network question" and during that time it got thousands of views in the course of a few days. But if you look at that question now you won't have any way of knowing that that's where the bulk of its view count came from.  Is there a way to find out if an arbitrary question has been a "hot network question" or not?


I am trying to prove the following claim  There does not exist an integer $r\geq1 $ and a symmetric matrix $ A \in M_r(\Bbb R) $ Such that for all $ n \in \Bbb N $ we have  $$ 2^{\sqrt n} \leq |\operatorname{tr}( A^n)| \leq 2020\cdot2^{\sqrt n} $$ Please give me some idea how to start this problem?

Does there exist a symmetric matrix $A$  such that $2^{\sqrt{n}}\le |\operatorname{Tr}(A^n)|\le2020 \cdot2^{\sqrt{n}}$ for all $n$? I think no. The trace of $A^n$ equals $\sum\limits_{i=1}^n\lambda_i^n$ where $\lambda_i$ are the eigenvalues of $A$. Now, if the absolute value of trace of $A$ is bounded below by $2$, then I think the trace of $A^n$ will grow infinitely. Am I right? Thanks beforehand.


My kids and I each have a paid Minecraft PE on our devices. I have a 2nd generation Kindle Fire and my kids each have a Samsung Galaxy Tab 10. In the past I've been able to join in their worlds. They have never been able to join in any world I've created on my Kindle Fire. After some research, we found out that the 2nd generation Kindle has the program 'Kindle FreeTime', which apparently causes some conflict. But, I have always been able to join THEIR worlds created on the Samsung's. Since the update (v0.11.1), I have not been able to join any of their worlds. We are all on the same wi-fi. We all have a paid version of the Pocket Edition. We all have our settings to accept Multi-player. When I go to join one of their worlds, my 2nd generation Kindle Fire displays 'Invalid Name'.  Any help would be most appreciated. It's the one video game I actually enjoy playing with the kids. ;) Thanks in advance! :)

I am having trouble getting onto a server in Minecraft PE on iOS. When I tap on the person's server it just says invalid name:    I have tried turning off and restarting the iPad, going to home screen and logging back into the server but I have had no luck and no change. Is there a reason why this is so?


This following produces an empty array:  $args2 = array(     'posts_per_page' => -1,     'paged'          => 0,     'orderby'        => 'post_date',     'order'          => 'DESC',     'post_type'      => array( 'carellcars', 'ccf', 'attachment' ),     'post_status'    => array( 'publish', 'inherit' ) );  $posts_array2 = get_posts($args2);    Changing the post_type and post_status to a single string (only one post_type, one post_status) produces results. Is my syntax wrong? Or how can I query multiple post types and post states at once?

I am building a custom WordPress function/plugin that uses get_posts.  The following code returns an empy array.  I have included wp-load.php in my script.  Is there something else I am missing?    $args = array(     "posts_per_page"   => -1,     "paged"            => 0,     "orderby"          => "post_date",     "order"            => "DESC",     "post_type"        => "carellcars, ccf, attachment",     "post_status"      => "publish, inherit",     "post_author"       => "2"  );  $posts_array = get_posts($args);   print_r($posts_array);  die;   If I use arrays for post_type and _status the array is not populated, but if I use single values for post_type and _status the array is populated?  Not populated:  $args2 = array(     'posts_per_page'   => -1,     'paged'            => 0,     'orderby'          => 'post_date',     'order'            => 'DESC',     'post_type' => array('carellcars', 'ccf', 'attachment'),     'post_status'      => array('publish', 'inherit') );   Populated:  $args2 = array(     'posts_per_page'   => -1,     'paged'            => 0,     'orderby'          => 'post_date',     'order'            => 'DESC',     'post_type' =>  'carellcars',     'post_status'      => 'publish' );   Update, removing "ccf" post type produces results, but I do have a ccf post_type and would like to include them.  Any ideas?      'post_type' => array('carellcars', 'attachment'),     'post_status'      => array('publish', 'inherit')


Let $X,Y,Z$ be i.i.d $U(0,1)$ random variables. Then $P(X>Y+Z)$  Saw this  but I am not sure how to utilize it here. If it was $2$D random variable question I would've easily calculated. $P(X>Y)$ which is inside red outlined shape.  Which is $\dfrac{1}{2}$ but its $3$D now and I am not sure how to setup limits of integration. Since there joint density is unity. $P(X>Y+Z)=\int_{0}^{1}\int_{?}^{?}\int_{y+z}^{1}1 dxdydz$ Also what other way I can use to solve this ?

I'm trying to follow a line in a derivation for $P(Z>X+Y)$ where $X,Y,Z$ are independent continuous random variables distributed uniformly on $(0,1)$.  I've already derived the pdf of $X+Y$ using the convolution theorem, but there's a line in the answer that says:  $P(Z>X+Y) = \mathbb{E}[\ P(Z>X+Y\ |\  X+Y )\  ]$ where $\mathbb{E}$ is the expectation.  I'm not familiar with this result. Could anyone give a pointer to a similar result if one exists?  Thanks.


I rebooted into Ubuntu from W10, and i saw folders like 'Music', 'Documents' etc. on my Desktop.   I deleted them from desktop; but they also got deleted in Home folder.So they don't behave like shortcuts or copies.  I tried this command: sudo dpkg-reconfigure nautilus and nothing happened.   Ubuntu 17.10  Edit:   dogus@DogusUbuntu:~$ cd Desktop   When I write cd Desktop, it yields:     bash: cd: Desktop: No such file or directory   and  dogus@DogusUbuntu:~$  ls   Yields home folders such as 'Documents', 'Downloads', etc.

Recently, I installed Ubuntu 12.04. For some reason, i backed-up my home directory contents to another directory(say bkp dir). Precisely, I moved Documents, Pictures, Downloads, etc.. to bkp directory. Now, Deleted all my original home directory contents. I restored all the bkp directory content back to home. I find them all on my Desktop. I believe some kinda chain is broken. I don't find respective home directories icons on them. How do i restore it? Also, I don't find them in my places options.   The desktop looks like this:    Running ls -lh ~ ~/Desktop shows this:  nuthan@nuthan-desktop:~$ ls -lh ~ ~/Desktop /home/nuthan: total 2.8M drwxr-x--- 11 nuthan nuthan 4.0K May 28 20:05 android-sdk-linux drwxrwxr-x  4 nuthan nuthan 4.0K May 25 13:36 android-sdks drwxrwxr-x  2 nuthan nuthan 4.0K May 18 17:30 convert -rw-rw-r--  1 nuthan nuthan    0 May 30 09:07 dependancies~ drwxr-xr-x  2 nuthan nuthan 4.0K Jun  6 14:16 Desktop drwxrwxrwx  6 nuthan nuthan 4.0K Jun  6 12:06 Documents drwxr-xr-x 28 nuthan nuthan  12K Jun  6 13:52 Downloads drwxrwxr-x  2 nuthan nuthan 4.0K Mar  6 13:23 examples -rw-r--r--  1 nuthan nuthan 8.3K May 11 16:19 examples.desktop drwxrwxr-x  4 nuthan nuthan 4.0K May 18 19:04 github -rw-rw-r--  1 nuthan nuthan    0 May 28 18:40 linux~ drwxr-xr-x  2 nuthan nuthan 4.0K May 11 16:46 Music drwxrwxr-x  2 nuthan nuthan 4.0K May 30 08:48 node-code drwxrwxr-x  4 nuthan nuthan 4.0K May 30 08:40 node_modules drwxr-xr-x  7 nuthan nuthan 4.0K May 25 13:55 noduino drwxrwxr-x  2 nuthan nuthan 4.0K May 30 11:58 nuthan drwxrwxrwx  3 nuthan nuthan 4.0K May 24 11:13 Pictures drwxrwxr-x  6 nuthan nuthan 4.0K Mar  6 13:23 public drwxr-xr-x  2 nuthan nuthan 4.0K May 25 11:44 Public drwxrwxr-x  2 nuthan nuthan 4.0K May 29 18:50 python -rw-rw-r--  1 nuthan nuthan 983K Jun  6 14:16 Screenshot from 2012-06-06 14:16:37.png -rw-rw-r--  1 nuthan nuthan 980K Jun  6 14:20 Screenshot from 2012-06-06 14:20:24.png -rw-rw-r--  1 nuthan nuthan 731K Jun  6 14:22 Screenshot from 2012-06-06 14:22:06.png drwxrwxr-x  3 nuthan nuthan 4.0K May 31 18:17 sketchbook drwxrwxr-x  2 nuthan nuthan 4.0K Jun  6 13:05 sql -rw-rw-r--  1 nuthan nuthan  201 May 28 22:08 sql~ drwxr-xr-x  2 nuthan nuthan 4.0K May 11 16:46 Templates -rw-rw-r--  1 nuthan nuthan 5.1K Jun  4 12:29 test~ drwxrwxr-x  3 nuthan nuthan 4.0K May 14 11:09 Titanium_Studio drwxrwxr-x  4 nuthan nuthan 4.0K May 14 21:00 Titanium Studio Workspace drwxrwxr-x  4 nuthan nuthan 4.0K Jun  1 18:29 TPM_Trak drwxrwxr-x  2 nuthan nuthan 4.0K May 24 17:30 Ubuntu One drwxr-xr-x  2 nuthan nuthan 4.0K May 11 16:46 Videos drwxrwxr-x  6 nuthan nuthan 4.0K May 31 15:10 workspace drwxrwxr-x  3 nuthan nuthan 4.0K May 14 11:57 Zend  /home/nuthan/Desktop: total 20K -rw-rw-r-- 1 nuthan nuthan  441 May 30 09:07 dependancies -rw-rw-r-- 1 nuthan nuthan 1.6K May 28 18:40 linux -rw-rw-r-- 1 nuthan nuthan  470 May 28 22:16 sql -rw-rw-r-- 1 nuthan nuthan 5.1K Jun  4 19:34 test nuthan@nuthan-desktop:~$


I want to get the difference between days, but there is time and other information attached with this date format. 2021-04-05T19:12:33.000Z How do we eliminate all the other time and just get the year, month, day fields to find the difference between days? AKA How do you convert 2021-04-05T19:12:33.000Z to just the year, month day and no seconds? 2021-04-05T00:00:00.000Z or just get 2021-04-05? Or any other format to get the difference between 2 days and not considering the timestamps? I'm thinking of extracting the year, month and day from the string and set it as fields. Then pass it into const year = ("2021-04-05T19:12:33.000Z").substring(0,4) const month .. etc  new Date('05/04/2021') manually, but is there a better way to extract month, day, year from 2021-04-05T19:12:33.000Z ? Then find the days difference? Thank you!

How do I get the number of days between two dates in JavaScript? For example, given two dates in input boxes:  <input id="first" value="1/1/2000"/> <input id="second" value="1/1/2001"/>  <script>   alert(datediff("day", first, second)); // what goes here? </script>


Let $f: [0,2] \rightarrow \mathbb{R}_{+}^{\ast}$ be a continuous function such that $\int_ {0}^{1} f(t) dt = \int_ {1}^{2}  f(t) dt = 1$. Prove that there is a function $g: [0,1] \rightarrow [1,2]$ of class $C^{1}$, such that $\int_{x}^{g(x)} f(t) dt=1$. Can anybody help me? Can I conclude that the function is periodic? or symmetrical in the range $[0,1]$ and $[1,2]$. What can I get out of it?

Let $f : [0, 2] → \mathbb{R}$ be a continuous, positive function and  $$\int_{0}^1 f(x)\,dx = \int_{1}^2 f(x)\,dx= 1$$ For each $x \in [0, 1]$, prove that there exists a unique function $g(x) \in [1, 2]$ such that $$\int_{x}^{g(x)} f(t)\,dt = 1$$ and $g \in C^1$. Well, I think in $g(x) = x +1$, but I'm not sure. Any hint is appreciated.  Thank you.


I have recently dual booted my windows with ubuntu 20.04. And with that I have got firefox pre-installed but when I go to the app store, I see another firefox. I don't understand the difference between the two. Is one better than the other or are they the same?

If there is no difference between two Chromium options I see while installing, other than their developers, then why do their sizes differ? One is 212Mb and the other 224Kb. There's a similar case with VLC.


I just built a new PC, and I'm looking to dual boot Windows and Ubuntu. I have a 256gb SSD, which I would rather be dedicated to Windows. I also have a 2tb hard drive, which is where I'd like to put Ubuntu. I'd like Ubuntu to take about 256gb on the HDD, with about 1.75tb of shared storage for both Ubuntu and Windows. How would I go about doing this?

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I want to get a list of days List<string> from a given year in the following format: dd.MM.yyyy  public List<string> GetDays(int year) {     List<string> lst = new List<string>();      foreach-day-in-year // TO DO iterate days from given year     {        string day="";         // TO DO  iterate all days         lst.Add(day);     }             return lst; }

Given a start date of 1/1/2009 and an end date of 12/31/2009, how can I iterate through each date and retrieve a DateTime value using c#?  Thanks!


I enter this command in PuTTY:  sudo ln -s /usr/share/phpmyadmin/ /var/www/phpmyadmin   But it returns:  sudo: unable to resolve host mysite.com   Any suggestions on how I can fix this?

When I run sudo the terminal is stuck for a few seconds and then outputs an error message. My terminal looks like this:  ubuntu@(none):~$ sudo true sudo: unable to resolve host (none)   What can I do to solve it?


I'm at a conference and using the local Wi-Fi network. The internet connection is working, but any attempt at installing packages using Apt results in the installation halting at 0% [Waiting for headers]. On a different Wi-Fi network, the installation proceeds successfully (the hotel Wi-Fi). Why might it be stopping? Assuming I have no control over the Wi-Fi network, how can this be addressed?

On googling this error it seems that a lot of people are having this issue.  apt-get upgrade hangs at 0% [waiting for headers] apt-get install apache2 hangs at 0% [waiting for headers]. Some apt-get commands are working, but only certain packages.  Any ideas? I don't think this is an issue with slow repos because I've had it up for a long while and it hasn't budged from 0%. I have edited sources.list but I removed the lines I added when this issue presented itself and it hasn't made a difference.  Any clues would be really useful.


Visiting  shows that there have never been any questions asked, where have they gone?

SE is really acting up today, sometimes it doesn't show any questions in the questions tab in the sites.  I first noticed the problems when I opened my questions tab, and this shows up:        All I did was change the name of the question, and now meta stackoverflow thinks it's two questions.  Well the thing is, MSO actually created it as a new question!  Why?


I am confused by the behavior of a python list. If someone can please shed light on why python is behaving this way I would greatly appreciate it.   list = [[]]*5 list[0].append(10) list[1].append(20) list.append(30)   I believe the output should be:  [ [10], [20], [], [], [], 30 ]   but I am getting an output of:  [ [10, 20], [10, 20], [10, 20], [10, 20], [10, 20], 30 ]   Would this be because the nested lists are just a copy of the initial list? If so what is there a way to do this so that it doesn't just make copies of the initial list?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I am aware of this , which mine was listed as a duplicate of, but it does not fully answer my question. It did however help me progress a little further so thanks, I couldn't find it before. The online calculator on the above answer also disagrees (though marginally) with the  calculator so I think that further backs up my reasoning for not using a black box.  So I'll re-explain my problem and hope that this gets opened to answers:  I have two Pearson correlation coefficients which I would like to compare. Each comes from 2 sets of 40 genetically identical lines and are correlations between male and female trait values.  I have managed to do $z$-transformations on my correlation coefficients in R using the function atanh() and replicated that with a home-made function RtoZ <- function (r) 0.5*log((1+r)/(1-r)).   The problem is what to do next: how do I actually test, in R,  whether the two correlations are different?

Following on from my earlier posts, as far as I can understand, if I have three correlation coefficients, I will have to test them in pairs to see if there is a significant difference among them.   This means that I would have to use Fishers transformation to work out the z score of r and then the p value of z (which the recommended calculators in the earlier posts do, thankfully) and then ascertain if the p value is higher or lower than my alpha value (0.05) for each pair.  i.e. If 21 to 30 years olds is Age Group 1, 31 to 40 years is Age Group 2, and 41 to 50 years is Age Group 2, my comparison of the correlations between their shopping habits and weight loss would be:   Group 1 vs. Group 2 Group 1 vs. Group 3 Group 2 vs. Group 3   Instead of doing three separate calculations, is there a way to do all these calculations in a single step?


I previously used a modem/router that Verizon mailed to us when we signed up as our sole internet hub, but I've been experiencing strange/intermittent/slow internet speeds (almost always around 1.0/0.35Mbps) whenever more than a couple of devices were connected. I'm paying for FiOS Quantum (50/35Mbps). Every device is connected wirelessly, except for one IP phone. It turns out that the household I'm in has a total of 23 wireless devices, of which around 10-14 of them are constantly on the network. It seems that one router could not practically handle all those connections  So I re-created my network to the following :  basically, I have 2 routers (primary:A , secondary:B). Router A is the original FiOS router, while B is just an old router I found laying around. Router B's DHCP is disabled, and both routers operate on different wireless settings.  My question is, with this setup, if I direct half of the devices to Router A, and the other half to Router B, and if the users on router B each start heavily streaming from YouTube/Netflix/etc., will that affect the speed of the users on Router A?      Edit: Sorry, what I meant in my question was, when I only had 1 router, I would experience issues if there were too many concurrent connections. What would happen now if there are too many users on Router B? Would connections on Router A still be okay?  Edit2: Thanks for the answers, but after hearing them, I've dug around and found  and , which my question may be a duplicate of. Feel free to close this question if needed.

Here in the UK, everytime you sign up to an ISP they will provide you with a router to connect at home. These are usually cheap netgear home routers (the one I'm using is a DGN-1000SP) with a basic GUI firmware. With 3 people in the flat, we usually have around 6 devices (3 PC's and 3 mobile devices) but sometimes up to 10 as more devices/guests come into play.  However, I've noticed that the network slows down massively when the number of devices get to 8 or so. Logging into my router's GUI I notice that the list of attached devices keep changing; sometimes there are as little as 3 devices connected and sometimes all 6 are shown.  Is this because the router cannot handle all the simultaneous requests (hardware fault) or because the internet connection is too slow? The connection is ADSL with 5Mbps down and 1Mbps up.  What are some ways I could fix this? Will establishing another access point with my spare router, wired to the original access point but broadcasting a different wireless channel and throwing traffic to this router help if the problem is to do with hardware?


I know it sounds ridiculous, but hear me out. We know that good hashing algorithms would generate hashes that are pretty much unique. If, in the future, we create a perfect (or just really near perfect) algorithm, could those hashes be used to represent larger chunks of data in a totally unique way? If they truly were unique and determined entirely by the file, could a powerful enough machine work backwards and reconstruct the file?  Now, this is a bit of a stretch from what we currently know, but I'd think it might be possible. Quantum computers can perform many different tasks at once, and we know that they pose a significant threat to modern forms of encryption because of this ability. While that isn't exactly the same thing as guessing every possible file that could've produced a particular hash, but I'd imagine there might be a way to make the process more efficient.  Maybe you get a hash that's a couple kilobytes long, allowing for billions of different input types. Combine that with a computer capable of generating and testing every possible input simultaneously and you'd be able to send tons of information in a couple kilobytes of transmission.  I'm not asking if it's possible to do with our current technology, as I'm fairly sure it isn't. I just want to know if the process of hashing a file could (in theory) support it.

I've been looking through the literature because I want to see if anyone has implemented this idea I have. I know data compression algorithms work by removing redundancy in data. I was wondering though if this scheme I have would work.   Ordinarily the idea of a hashing function $H$ is designed so that $H(x)$ (where $x$ is the message) is easy to compute in the forward direction, but difficult to compute in the reverse direction (computing $H^{-1}(x)$ is intractable). But I also notice another thing about $H$. In practice the length of $H(x)$ is can be as large as 512 bits (I'm referring to the SHA-512 hash). This means that $H$ can map $2^{512} \approx 1.34 \times 10^{154}$ hashes to theoretically an infinite number of pieces of data. It's just that in practice the message space of all possible messages are not necessarily messages that have any meaning to humans. The number of total human readable messages may be on the order of say $2^{520}$ (meaning the total number of unique messages in the entire history of mankind).  So now let us suppose we have a hashing function $h$ which is easy to compute in both directions. We could compress our large data file $D$ into a short hash $h(D)$ that maps to $D$ and several other unintelligible "messages." So now to transmit $D$ all we have to do is to transmit $h(D)$ (which is short) and then the receiver would reverse $h(D)$ until they find a possible intelligent message and they could reconstruct $D$. If such a thing could work it would be possible to compress large amounts of data into short messages.  Does anyone know if such a thing has been done before?


So I've been trying to wrap my head around GR for a bit now, but one thing that keeps me down is the idea that while earth bends spacetime around us, the earth is also accelerating towards us at $9.8\text{ m/s}^2$, which is why objects accelerate towards it at that rate. However, I haven't been able to source this claim, it comes up independently in the information I am consuming. One claim by "ScienceClic English" claims that the geological forces of the earth itself is expanding the earth at a rate of $9.8\text{ m/s}^2$ while the curvature of spacetime keeps earth the same size. You can imagine my difficulties sourcing this as all results on "expanding earth" in any variation returns debunking of the expanding earth theory itself. The other claims do not go into any detail, they merely claim that the earth is accelerating "up" at $9.8\text{ m/s}^2$. What is the deal with this? I feel a force acting upon me, so already there's the natural intuition towards gravity existing. Yet we know gravity isn't a real force, I am just experiencing the curvature of spacetime, but what else? What governs the law that things fall towards the earth at $9.8\text{ m/s}^2$ on earth?

I know this question has been asked in other forms, generally regarding the balance of forces.  This time I want to focus on motion.  I've got a laser accelerometer on my desk.  It tells me that I'm accelerating at $9.8~\rm m/s^2$.  For the first experiment I'm travelling in space.  I pick a nearby star and discover that I move about $490$ meters in $10$ seconds from that star.  For the next experiment I'm on the surface of Earth.  I measure the same acceleration with my laser accelerometer.  I pick a spot (the center of the Earth) and discover I don't move at all in $10$ seconds.  How is acceleration without motion possible?


I am looking to track the internet usage on linux, how can I do this? I would like to come back in x amount of time and be able to see how much data has been used.

A big German ISP (Telekom) recently decided to volume limit their DSL internet connection to 75GB per month.  Now I would like to know how much I download / upload. I use Linux Mint 14 Nadia and I have a D-LINK DI-524 router.  How can I get the amount of data I upload / download per month?


Every  infinite Hausdorff space  has  a countably  infinite discrete  subspace.  Now  I  know $R$  under  usual  topology  has $Z$  and under  "lower  limit  topology"  also  has $Z$  as such. So goes  on for  $R^{n}$ as  long  as  $n$  is  finite it  will  be  $Z^{n}$ .But  what  about general  Hausdorff  Spaces?  Please  some  hints.   I  need  to  know what  such  discrete  subspaces  might  look  like  for $R^{inf}$ since $Z^{\inf}$  or $N^{\inf}$ are  not  countable.

I want to show that any infinite Hausdorff space contains an infinite discrete subspace.  I am motivated by the role of $\mathbb N$ in $\mathbb R$. We know that if a Hausdorff space is finite, then it is a discrete space, but an infinite subspace of a Hausdorff space is obviously not necessarily discrete.


Let $a$ and $b$ be positive integers such that $ab + 1$ divides $a^{2} + b^{2}$. Show that   $$ \frac {a^{2} + b^{2}}{ab + 1} $$   is the square of an integer.   It's Olympiad question, any help?

Let $a,b$ be positive integers.  When $$k = \frac{a^2 + b^2}{ab+1}$$ is an integer, it is a square.    Proof 1: (Ngô Bảo Châu): Rearrange to get $a^2-akb+b^2-k=0$, as a quadratic in $a$ this has two values: $a$ and $kb - a = (b^2-k)/a$. (The second root is determined in two different ways from the expansion $(x-r_1)(x-r_2) = x^2 - (r_1 + r_2)x + r_1 r_2$.)  Now suppose we have $a,b$ such that $k$ is an integer but not a square, by the investigation about roots we have that the second root is a nonzero integer since $k,b,a$ are integers and $k \not = b^2$, futhermore it is positive which is easily seen from its defining equation.  WLOG assume $a \ge b$ so that the second root is strictly smaller than $a$. This leads to a decent, replacing $a$ with the second root.    Proof 2 (Don Zagier): Apply reduction theory (specifically, Sätze 1 and 2 of Section 13 of my book on quadratic fields) to the quadratic form $x^2 + kxy + y^2$, which is the unique reduced quadratic form in its equivalence class.    Note that Proof 2 is pretty much the same as Proof 1 when written out in explicit detail, but I could not read Zagier's book because I cannot read German.  I would like to know more approaches to this and other alternative proofs of this result if possible! Thanks in advance.  I would also be interested in related problems (especially easier ones of a similar nature) and texts which cover the reduction theory in English.


I want to install Active directory on my server so that i can have centralized user authetication.  I don't know much about about AD but i am reading stuff.  I am also reading about DNS servers.  Now in every subject they talk about domain name. Now i am confused what domain name they are talking bout.   is there any website domain name i have to type here or what.  If i type any name then it says can't connect to that.  How can i find what domain name i have to type while doing the DNS or AD

This is a  about Active Directory domain naming.   After experimenting with Windows domains and domain controllers in a virtual environment, I've realized that having an active directory domain named identically to a DNS domain is bad idea (Meaning that having example.com as an Active Directory name is no good when we have the example.com domain name registered for use as our website).   , but I'm still not sure about what other rules there are around naming Active Directory domains.  Are there any best practices on what an Active Directory name should or shouldn't be?


My final goal is to understand the group $\mathbb{Z}_3^*/(\mathbb{Z}_3^*)^3$. However, I am having a hard time understanding how exactly an element in $(\mathbb{Z}_3^*)^3$ looks like. In this case $\mathbb{Z}_3$ is the ring of 3-adic numbers. I'm quite lost in this and any hint, help or reference for this will be helpful. Thanks!

From what I understand about the group of units of the 3-adic integers, it consists all $a$ that can be expressed as a = $\sum_{i=0}^\infty a_i 3^i$ where $a_0 \neq 0$. How can we recognize which 3-adic integers are the cubes of units? I was also told that cubes of units of 3-adic integers form a group. What does this group look like?


I am writing a simple program to get to grips with using the Scanner in Java. The program has a stored value for user_1 and asks the user to provide  the String variable username which is then checked against user_1 using the == operator, however even when username matches user_1 it still evaluates to false. I'm sure I must be missing something simple, any help would be appreciated. I even added the line printing both variable just to double check they are the same!!  import java.util.Scanner;  public class HelloWorld {  public static void main(String[] args) {      String user_1 = ("lucasRHCP");      Scanner input = new Scanner(System.in);     System.out.println("Enter your username: ");     String username = input.nextLine();      System.out.println(user_1 + " " + username);      if (username == user_1){         System.out.println("True");     }     else {         System.out.println("False");     } }    }

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?


Sometimes I encode categorical features as binary values - one feature per possible category value indicating whether that feature name matches the original category value (i.e. one-of-K scheme).  Now these values are linearly dependent, since obviously their total sum is 1.  Does this linear dependence matter for linear SVM, kernel SVM, logistic regression, etc.? Where does it matter so that I need to remove one of the features? Does it cause problems for normal linear regression? For which methods does it not make a difference?

My understanding is that in machine learning it can be a problem if your dataset has highly correlated features, as they effectively encode the same information.  Recently someone pointed out that when you do one-hot encoding on a categorical variable you end up with correlated features, so you should drop one of them as a "reference".  For example, encoding gender as two variables, is_male and is_female, produces two features which are perfectly negatively correlated, so they suggested just using one of them, effectively setting the baseline to say male, and then seeing if the is_female column is important in the predictive algorithm.  That made sense to me but I haven't found anything online to suggest this may be the case, so is this wrong or am I missing something?  Possible (unanswered) duplicate:


I have recently bought HP Omen 15-dc1052nr and installed Ubuntu 18.04 alongside already installed windows 10. But after installing ubuntu when I go to settings -> Wi-Fi, it shows No Wi-Fi Adapter found. I have searched internet alot and even follow this answer too  but I am unable to use Wi-Fi on my device.   Information regarding my system can be seen by visiting this link

My wifi card is an Intel® Wireless-AX200 (802.11/a/b/g/n/ac/ax), Bluetooth® 5, and bluetooth is working. I've tried following various guides, however these drivers are apparently yet to make it into the kernel.  Their product brief states linux is supported:    And yet their driver page has no listing for them:    sudo lshw -c network => mark@m-blade-2019:~$ sudo lshw -c network   *-network UNCLAIMED               description: Network controller        product: Intel Corporation        vendor: Intel Corporation        physical id: 0        bus info: pci@0000:02:00.0        version: 1a        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix cap_list        configuration: latency=0        resources: memory:cf300000-cf303fff   *-network        description: Ethernet interface        physical id: 2        logical name: enx0050b6b47e72        serial: 00:50:b6:b4:7e:72        capabilities: ethernet physical        configuration: broadcast=yes driver=cdc_ncm driverversion=22-Aug-2005 firmware=CDC NCM ip=192.168.1.17 link=yes multicast=yes   I'm running kernel version Linux 5.0.0-13-generic, any help is greatly appreciated.  EDIT: results of lspci -nnk | grep 00280 -A3:  mark@m-blade-2019:~$ lspci -nnk | grep 0280 -A3 02:00.0 Network controller [0280]: Intel Corporation Device [8086:2723] (rev 1a)     Subsystem: Intel Corporation Device [8086:0084]     Kernel modules: wl, iwlwifi 03:00.0 Non-Volatile memory controller [0108]: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981 [144d:a808] mark@m-blade-2019:~$


How does the Sorting Hat prevent one house from being way bigger or smaller than the others?    Related:

Not a year goes by where we don't see at least one person Sorted into each House, and it's usually a fairly even distribution.  The Sorting Hat doesn't get a chance to study the mind of each child before Sorting, so it can't Sort them relative to each other (top X in smarts go to Ravenclaw, 4 bravest to Gryffindor, etc)  What would happen if a Sorting occurred where all the witches/wizards were extremely intelligent?  Would they all get Sorted to Ravenclaw?  What if they were all extremely brave?  What if none of them were particularly smart or courageous, but they all wanted power?  We see that there's a fairly small number of beds per room in each dorm, would the Hat stop Sorting people into a House if it knew the House had no more beds?  If so, could Harry Potter have ended up in Hufflepuff if his last name had been 'Zimmers'?


R linear model function lm looks like have a bug. with no intercept term.    I want to know this is really a bug or my mistake on something...  library(dplyr)  rm(list=ls())  m2 <-    lm(data=iris, Sepal.Length ~ Sepal.Width + Species - 1)  res2 <-   iris %>%   mutate(real = Sepal.Length) %>%   mutate(pred = predict(m2, ., type='response')) %>%   mutate(error = real - pred) %>%   mutate(error.sq = error^2) %>%   mutate(sse = sum(error.sq)) %>%   mutate(sst = sum((real - mean(real))^2)) %>%   mutate(r.sq = 1-sse/sst) %>%   mutate(idx = 1:n())  m2 %>% .$coef   Sepal.Width     Speciessetosa Speciesversicolor  Speciesvirginica      0.8035609         2.2513932         3.7101363         4.1982099   m2 %>% summary %>% .$r.square [1] 0.9946393  res2$r.sq %>% unique [1] 0.7259066   without intercept linear model result shows different r-square value with manual calculation.    m1 <-    lm(data=iris, Sepal.Length ~ Sepal.Width + Species)  res1 <-   iris %>%   mutate(real = Sepal.Length) %>%   mutate(pred = predict(m1, ., type='response')) %>%   mutate(error = real - pred) %>%   mutate(error.sq = error^2) %>%   mutate(sse = sum(error.sq)) %>%   mutate(sst = sum((real - mean(real))^2)) %>%   mutate(r.sq = 1-sse/sst) %>%   mutate(idx = 1:n())  m1 %>% .$coef   (Intercept)       Sepal.Width Speciesversicolor  Speciesvirginica      2.2513932         0.8035609         1.4587431         1.9468166   m1 %>% summary %>% .$r.square [1] 0.7259066  res1$r.sq %>% unique [1] 0.7259066   in contrast, with intercept linear model result looks ok

I did a toy experiment with linear regression, but getting different results for $R^2$, could any one help me?  library(ggplot2) fit=lm(price~carat+depth+table+x+y+z-1,data=diamonds) summary(fit) sse=crossprod(diamonds$price-fit$fitted.values) sst=crossprod(diamonds$price-mean(diamonds$price)) 1-sse/sst


I'm playing the Brawl format (a 60-card singleton format), and I really want one specific card in my starting hand.  I'm willing to take two mulligans (leaving me with a starting hand of 5 cards after putting 2 on the bottom of my library).  What are the odds of drawing the card in my opening hand within 2 mulligans?

In Magic, at the start of the game, you draw 7 cards. How would you calculate the likelihood of drawing a specific card in your opening hand?  For example, let's say I have a 60 card deck, and I'm running 4 . What is the percent chance that I will have at least one Bird in my opening hand?


One Page 7, of Document   The author says,     In the case of Camellia, the maximum diferential/linear probabilities of s-boxes are $2^{-6}$.   Since Camellia S-boxes are made up from Affine-Inverse-Affine Transformation in $GF(2^8)$ which has Linear Approximation Probability of $2^{-4}$, then why authors wrote it $2^{-6}$.  Does Camellia S-boxes have Linear Approximation probability of $2^{-6}$ or $2^{-4}$?  any body calculated it?

In this article, (para 2. Differential and linear cryptanalysis, page 3), it says      The maximum bias of a linear approximation through one S-box is $2^{-4}$   , which gives a linear probability of $2^{-6}$   what does this mean? isn't the linear approximation probability $2^{-4}$?


Why is the canonical link function used so frequently with GLMs? What makes it "natural"?  Is there any reason to think that, $Q(\theta _i)$ (where $Q$ is the canonical link function, and $\theta _i$ is the parameter of interest) is better described by a linear combination of predictor variables than some other function of $\theta_i$.  That is, is there any reason to believe that:  $$Q(\theta _i) = \sum_j \beta _j x_{ij}$$  is superior to:  $$f(\theta _i) = \sum_j \beta _j x_{ij}$$ where $Q \neq f$  If not, is there anything else that makes $Q$ better than $f$? The text book I am using just mentions what a canonical link function is, and makes use of it (pretty much exclusively), but does not explain what distinguishes it from any arbitrary link function.

What's the difference between terms 'link function' and 'canonical link function'? Also, are there any (theoretical) advantages of using one over the other?  For example, a binary response variable can be modeled using many link functions such as logit, probit, etc. But, logit here is considered the "canonical" link function.


i dont understand this error message from the "make" function.     qemu-1.7.0-rc1/pixman; autoreconf -v --install)      /bin/sh: 1: autoreconf: not found make: *   [/home/alex/Desktop/qemu-1.7.0-rc1/pixman/configure] Error 127   how would i get this to work? do i install pixman or autoreconfig?

I was ./configure'd the qemu-1.4.0 and during make it cause:  (cd /home/amin/Simulate/qemu-1.4.0/pixman; autoreconf -v --install) /bin/sh: 1: autoreconf: not found make: *** [/home/amin/Simulate/qemu-1.4.0/pixman/configure] Error 127   Now, I can't find how to pass this error.  Thanks.


When I am in my camera view, I can see my scene objects fine. But when I go to the user perspective and zoom in on those objects, they disappear. How can I fix this?

Zooming in to inspect texture details in 3D view clips some closer faces like shown in the image. It's not the camera view so changing camera settings doesn't help.   Where can the distance to the clipping plane be adjusted?


Prove by induction that for $n\geq1$, $(a_1+a_2+...+a_n)/n \geq (a_1*a_2*...*a_n)^{1/n}.$ I proved the base case, not sure how to do the inductive step. The values of the sequence are greater than or equal to zero.

I am trying to prove AM-GM with the following steps:    Prove that AM-GM holds for two variables Prove that if AM-GM holds for $k$ variables then it holds for $2k$ variables Prove that if AM-GM holds for $k$ variables then it holds for $k-1$ variables   If I prove all of these, I will have proved AM-GM. I have proved (1) and (2), but I am still struggling with (3).   Proof for (1)  By the Trivial Inequality, we know that the first statement is true. Therefore \begin{align} (a-b)^2 \ge 0 \implies\\ a^2-2ab+b^2 \ge 0 \implies \\ a^2+2ab+b^2 \ge 4ab  \implies\\ a+b \ge 2\sqrt{ab}  \implies\\ \frac{a+b}{2} \ge \sqrt{ab}\hspace{3mm}\blacksquare\\ \end{align}  Proof for (2)  Let our numbers be $a_1, a_2, a_3, \ldots, a_{2k}$. Denote $$x = \frac{\displaystyle\sum_{i=1}^{k}a_i}{k}, y = \frac{\displaystyle\sum_{i=k+1}^{2k}a_i}{k}$$  We know that by AM-GM for 2 variables, that $$\frac{x+y}{2}\ge \sqrt{xy}$$ By our definition of $x, y$ this means that $$\frac{x+y}{2} = \frac{\frac{\displaystyle\sum_{i=1}^{2k}a_i}{k}}{2}=\frac{a_1+a_2+a_3+\ldots+a_{2k}}{2k}$$ Again by definition, $$\sqrt{xy} = \sqrt{\left(\frac{x_1+x_2+\ldots+x_k}{k}\right)\left(\frac{x_{k+1}+x_{k+2}+\ldots+x_{2k}}{k}\right)}$$ By AM-GM for $k$ variables, $$\sqrt{\left(\frac{x_1+x_2+\ldots+x_k}{k}\right)\left(\frac{x_{k+1}+x_{k+2}+\ldots+x_{2k}}{k}\right)} \ge \sqrt{\sqrt[k]{x_1x_2\ldots x_k}\sqrt[k]{x_{k+1}x_{k+2}\ldots x_{2k}}}$$ This is simply equal to $$\sqrt[2k]{x_1x_2x_3\ldots x_{2k}}\hspace{3mm}\blacksquare$$  However, I have no idea how to proceed on (3). I tried using the definition of AM and GM but did not come up with anything useful. Feel free to point out any errors or flaws on my proofs for (1) and (2).


I've started learning LaTeX recently from  and I'm using  to compile the LaTeX code.  I'm having a simple document with 3 sections         Contents   Abstract   Introduction      \documentclass{article}  \begin{document} \tableofcontents  \begin{abstract} Abstract goes here... ... \end{abstract}  \section*{Introduction} This is introduction \end{document}   Which looks like this    How can I made these three sections(Contents, Abstract, Introduction) appear in separate pages in my document.

I have the following title page in LaTeX: \documentclass{article}  \title{Appendix A: User Manual}  \author{ John Smith\\University XYZ\\Albert Square\\Walford\\NC1 8AE }  \begin{document} \maketitle \end{document}  What is the proper way to add a new page, say, for the contents page and start editing that new page?


I made a weapon model in blender, I can't remember exactly when or how I ended up with these edges because I made the model a few days ago, however I came back to the model to use it as something to learn how to UV map with. That's when I noticed these edges on this face, the face is not meant to be separated like this, on the other side it appears normal but on the side with the bolt two edges appear, when I try to dissolve them nothing happens, if I completely delete them the whole face disappears.    In wire frame view in case it helps:    If I fully delete one edge it makes the faces invisible but the other edge stays, as shown here:    Alright so, started messing around with the model trying to figure out what went wrong, it appears that the un-dissolvable lines appear after putting a hole in the model using the Boolean difference modifier, no idea why or how to avoid this but thought this might help in finding a way to get rid of the edges.  SOLUTION: Othoap Proto suggested that while in edit mode I select the faces that are separated by the two edges and then press "P/Seperate", by selection. The edges that where an issue then disappeared, all I had to do then was rejoin the two objects (Select the objects and press CTRl+J.) This worked for me and hopefully will for anyone else with the same issue.

So, I'm working on a control station that has buttons. It is a one-mesh creation, that means, I don't want to create buttons and things like that separated from the main mesh, but as you can see, I have problems. I would like to make the highlighted parts to be one with the main part around them. I've tried everything, and I have this problem on multiple creations. Any idea?  Update: I've added another example of the problem. I want them to be one face, instead of two. (2nd picture)


If you watch Episode 2, you know Obi-Wan is asking his friend from the inn about the dart, and got told it's from Kamino. Then he acts like he knows nothing about Kamino or Kaminoans.  But how can he not know anything about them when there is a Kaminoan Jedi in Episode 1 in the council?    How can there be a Kaminoan council member if no one really knows anything about Kamino?

From  I read the following:     ...right before the start of the Clone Wars, the Jedi High Council had hardly changed. Only Yaddle and Yarael Poof were no longer present, replaced by Shaak Ti and Coleman Trebor.   I recall seeing and reading about these members of the Jedi Council when The Phantom Menace came out, but I never noticed that they did not appear in later films, or that their seats on the Council had been taken by other Jedi. Unfortunately, I cannot find any further information as to what happened to them. Is there any in-universe information (whether Canon, or Legends, or Hidalgo-tweet) about where these Jedi went?


How would I execute python dictionary key/values as commands in a linux kernel? For example:      keys = {             "echo" : "hello",             "touch" : "nothing"             }   and I wanted to run the first key/value pair to run in the shell "echo hello".  I've tried using the json module, but don't know where to go from there.  Thanks.

How do you call an external command (as if I'd typed it at the Unix shell or Windows command prompt) from within a Python script?


The following is stated in (among others) the articles    - Shinsei Ryu, Andreas Schnyder, Akira Furusaki, Andreas Ludwig  - Ching-Kai Chiu, Jeffrey C.Y. Teo, Andreas P. Schnyder, Shinsei Ryu   The three discrete symmetries Time reversal symmetry ($T$), Particle-hole symmetry ($C$) and Chiral symmetry ($S$) all commute (are real symmetries) of the full second quantized Hamiltonian, $$\hat{H}=\sum_{A,B}\Psi_A^\dagger \mathcal{H}_{AB}\Psi_B. $$ That is, $$[\hat{T},\hat{H}]=[\hat{C},\hat{H}]=[\hat{S},\hat{H}]=0.\;\;\;\;\;\;\; (1)$$ They go on to claim that, $\hat{C}$ and $\hat{S}$ are not real symmetries in the "classical" sense of the first quantized Hamiltonian $\mathcal{H}$. In fact, the first quantized Hamiltonians obey,  $$[T,\mathcal{H}]=\{C,\mathcal{H}\}=\{S,\mathcal{H}\}=0. \;\;\;\;\;\; (2)$$ How can I prove that imposing Eq. (1) implies Eq. (2)?

$PHP^{-1}=-H$ (particle-hole symmetry) and   $\Gamma H \Gamma^{-1}=-H$ (chiral symmetry)   I understand why we get the negative signs but im just a bit confused as to why such equalities mean $H$ is particle hole and chiral symmetric.   When we say $H$ is symmetric under some operation, like time reversal,  don't we usually mean that $H$ is invariant under the said transformation?  $THT^{-1}=H$ if $H$  is time reversal symmetric.  On the contrary, we say $H$ is symmetric under particle hole and chiral operations when $H$ picks up a negative sign. This seems to contradict our usual convention of what we mean by $H$ being symmetric(invariant).


Is there a good mind map to summarize all the important concepts in statistics in a useful manner so that a beginner can decide which topics he has covered, which he needs to cover in short term, which he needs to cover in long term and which he can just ignore for sure or at least replace it with some blackbox software for all practical purposes?  For example, machine learning has a very nice mind map by Jason Brownlee.    The mind map does not need to go into too much detail and include low-level topics. Just high-level topics like hypothesis testing, ANOVA, regression, experiment design etc. should suffice. But it should not miss any topic of mathematical statistics covered in both undergrad and grad level courses.

In mathematics, there are branches such as algebra, analysis, topology, etc. In machine learning there is supervised, unsupervised, and reinforcement learning. Within each of these branches, there are finer branches that further divide the methods.   I am having trouble drawing a parallel with statistics. What would be the main branches of statistics (and sub-branches)? A perfect partition is likely not possible, but anything is better than a big blank map.   Visual examples:


Within the Activity section of the (new) user profile pages is a Next tag badge: section. Within this one used to have both "progress bar" and numeric indicators.  Now only plain progress bars without xxx/200 numbers remain.  Is this change intentional or accidental, and if intentional how was this decision made?

Something changed recently, and since a picture is worth a thousand words:    Until not very long ago, the "score" and "answers" labels were followed by numbers indicating the values of the progress bars underneath. So "score" might have "90/100" in this example. I'm not seeing that now for any of the badge progress indicators, so it looks like a recently introduced bug.


I’m of the understanding that the canon Star Wars movies are set in the relative past (18th and 19th century in our time). Yet looking up the biographies of characters like Padmé Amidala, Obi-Wan Kenobi, Anakin Skywalker etc their species is listed as ‘human’.  If they are indeed, human beings as you and I, how did they manage to end up in the far reaches of space hundreds of years ago, when we don’t have to technology to travel long distances in space even today?

Kind of brought to my attention by .  The poster mentions non-humans, which implies that there are humans in the Star Wars universe.  However, since it happened "A long time ago, in a galaxy far far away", how could there be any humans in the Star Wars universe?  Are there "humans" in Star Wars there just because it was easier to make the movies that way?  Other shows such as Star Trek are about the future of humans, so it's easy to understand the existence of humans in those storylines.  However for Star Wars it just doesn't make sense.  It also seems odd that they'd go around creating all these different species and then just leave the main characters as humans. I guess another possibility is that the humans in star Wars eventually populated Earth, but then what happened to all the technology?


Parallel words joined at a single letter forming a second word. I cannot seem to find a clear answer to this scrabble question. Say player one plays, "scrabble" as their first word. Is it valid for player two to then play, "hello," parallel to "scrabble" but starting with the "h" in "hello" next to the "e" in "scrabble" to make the second word, "he." Here is an example:        HELLO SCRABBLE

I won a game by getting lots of points doing it ;) but was contested and I could see their point.   Here are two examples:  PLACES      OTHER   or      BRILLIANT SCORE   I can see from the official rules something similar is allowed:   PASTE BIT   The difference here is that BIT, PI and AT are created. So there is more than one parallel word created.  But are the examples I give only one parallel word is created, is this ok?


I am trying to pass a text value from a settings form to another form. What I am trying to do is pass a string value form a textbox on the settings form to the main form. The main form has a GunaUI2 Button (Which I am trying to control) I was trying to use public Form1 frmMain = new Form1(); to import my main form to my settings form. Then I would try to change the text of the GunaUI2 Button with this code: frmMain.btn_1.Text = textBox1.Text; Any help would be greatly appreciated, Thanks EB

How do I pass a value from a child back to the parent form? I have a string that I would like to pass back to the parent.  I launched the child using:  FormOptions formOptions = new FormOptions(); formOptions.ShowDialog();


A few years ago there was a story about the Large Hadron Collider where a possible tachyon  was supposedly observed. It was later shown it didn't occur yet the incident made me think. If a large experiment using extreme amounts of energy trying to duplicate some processes or events of the 'distant' past , would the intense amount of energy  in this 'early' Universe experiment create a situation where the speed of light was different?? If a particle was observed emanating from this experiment and it seemed superluminal could this be due to a different speed of light measurement due to this phenomenon.

I was quite surprised to read this all over the news today:     Elusive, nearly massive subatomic particles called neutrinos appear to travel just faster than light, a team of physicists in Europe reports. If so, the observation would wreck Einstein's theory of special relativity, which demands that nothing can travel faster than light.   —  Apparently a CERN/Gran Sasso team measured a faster-than-light speed for neutrinos.   Is this even remotely possible? If so, would it be a real violation of Lorentz invariance or an "" effect?   The ; a webcast is/was planned .  News conference video


I was reading about black holes and I've found part saying that black hole is a point and anther saying that black hole can rotate. However the points are dimensionless, so they can't rotate - How can black hole rotate then? Can non rotating black hole start rotating? I rather don't know too much about physic so even basic explanation would be great to me.

I guess nobody really knows the true nature of black holes, however, based on everything I know about black holes, there is a "singularity" at their center, which has finite mass but is infinitely small and thus infinitely dense.  So a black hole is really just a point mass that dramatically warps the space-time around it so that an event horizon is achieved.  What doesn't make sense to me is how a true mathematical "point" can rotate, or at least how it is even possible to determine if a point is rotating (or if it should even make a difference about whether or not it is rotating, for the same reason it would be impossible to tell if a perfect, featureless sphere were rotating (I know it would have higher rotational energy but lets assume you can't measure that because a true "point" can't attain rotational energy since it has no radius)).  The only conceptual solution I have to describe a rotating black hole would be to compare it to a rotating whirlpool, where the surface of the water is the fabric of space-time... but this is different because there is no "singularity" in a whirlpool that causes the water around it to rotate, whirlpools form from flow of water around a point (put into motion perhaps by some kid swirling water in a 2-liter bottle... it's due to an external cause), but the only thing that could cause rotation around a black hole would be the singularity itself, which doesn't make sense because, once again, how can we know if a true point is actually rotating?  Aside from everything I've said, here is what I am actually asking:  Why/how do some black holes rotate... what is the mechanism of their rotation (is analogous to a spinning point or a 3-d whirlpool, or something different)?


I thought that even if for the question writer, it's the most impolite thing to delete own question with other's elaborated answers. Since the question has posted, every participants are able to improve the question via comments, edits, and answers, but who decides to delete one is the writer.  What I want to say is, I think that after someone has posted a question and be helped by others, the question is no longer owned by its original writer.  Why the writer can freely delete her own post?

What circumstances can cause a question or answer to be deleted, and what does that actually mean?    How can a post be deleted? When can't I delete my own post? Can I still see my post even after it's deleted? Can I see a list of my deleted posts? How can I undelete one of my posts? What does deletion mean for a post? How do votes to delete work? What are the criteria for deletion? What else should I know about deleted posts? If I flag my question with a request to delete it, what will happen?       For more information, see the articles about  and  in the .