I have a laptop, which comes with an SMPS charger. The laptop charger is a very common type. I know there are some earthing issues in my home. I need to fix that. But SMPS isolate mains from the supply, but when I touch the body of the laptop, it shocks. Another day, I was charging my phone through USB from the laptop and plugged the laptop charger. I own a metal earphone, and that shocked me. I know there's some problem in my home earthing part, but still aren't SMPS meant to be isolated from mains. Then why I'm getting that shock. Why does electricity want to flow through my body if it's floating? Someone, please explain the incident, with reasoning and possible ways to avoid it.


I know the moment of inertia of a filled sphere is $(2/5) Mr^2$. How do you show the moment of inertia of a hollow sphere is $(2/3) Mr^2$?


How should I refer to a friend who is a girl but not a girlfriend?

When I'm talking about my friend, who is a girl, but not a girlfriend, what word or phrase should I use? If the gender was unimportant, it would not be a problem. But if I want to note that the friend is female, not male, how should I say that, to avoid ambiguity?


How do I fix monitor detection in Windows 7?

I'm using Windows 7 + Windows Media Center for my HTPC. It works great except from one annoying issue. Whenever I turn off my TV while listening to music, the music stops for a second or while Windows 7 tries to figure out what monitor is attached. After that second it settles down on a default 800x640. While not a big deal, it is annoying as I don't want to have the TV on while playing music.  Is there anyway to fix the monitor/disable monitor auto-detection on Windows 7 so it would not start recalibrating everything when I turn off my TV?


I have created my latex code with a "main" tex file, in which I am calling many other sub-files using the below command. \subfile{"Path1"} \subfile{"Path2"} \subfile{"Path3"}  In each subfile, I have written my text and presenting tables and figures. I have stored each table and figure in a separate file in order to keep my subfiles organized. Thus, I am calling the tables and figures using a code like below: \input{"FigPath1"} \input{"TabPath1"}  Some of the figures are created using pgfplots. Although I am asking latex to put the figures exactly where I want (each figure file has a structure like below,) they appear 5 or 6 pages after where they have to appear. What is the problem in your opinion? \begin{figure}[!htbp]     \centering     \subfloat[Constraints]{         \begin{tikzpicture}[scale=0.75, transform shape]               % Some codes here         \end{tikzpicture}     }      \subfloat[Variables]{         \begin{tikzpicture}[scale=0.75, transform shape]               % Some codes here         \end{tikzpicture}     } \end{figure}  Hopefully, my explanations make sense! Thanks in advance.


CentOS no network interface after installation in VirtualBox

I have Ubuntu 12.10 on which I installed virtual box on which I setup Centos 6.4 i386. On Ubuntu I have: 3.5.0-17-generic kernel running.  On virtual box I install Centos 6.4 and everything works fine, however when I boot into VM machine, there is only on loopback interface. Nothing else. I tried to manually add ifcfg-eth0 file but nothing happens. On VM settings I have added NAT and HostOnly interfaces but whenever I boot into Centos there is just lo interface. What should I do?


Problems with enumerate and itemize in beamer

I'm trying to create lists for my presentation in beamer. Itemize environments are compiled, but the bullet points are not shown. Enumerate environments cannot be compiled however. Even if I try something as simple as  \begin{frame} \begin{enumerate} \item Test \end{enumerate} \end{frame}   I get the error message: ! TeX capacity exceeded, sorry [grouping levels=255].  Any help would be greatly appreciated!


Universe expanding - Interstellar space, Intergalactic space or Intersupercluster space?

When we say that the universe is expanding, the space between everything is not. The space between atoms, the space between my house and school, and the space between Earth and Sun remains the same, due to the four fundamental forces of nature.  However, when does the gravitational force becomes comparatively small, to see the expansion in space? Is it between the stars - interstellar? Is it between the galaxies - intergalactic? Is it between the superclusters - intersupercluster? Or something greater that I'm not aware of?


does $f(n) \neq O(g(n))$ implies $g(n)=O(f(n))$

Im pretty sure it doesn't, but how can I be sure?  Was thinking by using   $$f(x) = \sin(x) + 2$$ and $$g(x) = \cos(x) + 2$$  Thanks!`


In a few months I'm going to be taking control of a group and running through a campaign of my own creation.  The campaign we're running right now only has 3 PCs and the DM, so a fairly small group.  However, we have a lot of people interested, and some old players returning for my campaign.  This will bring the player count up to a whopping 9 players. Also, for the majority of the campaign the group will have at least 1 NPC companion that will be as powerful, if not moreso than the party (for story reasons)  I've never played in groups this large, and I'm expecting that there will be a few problems with this.  Combat is a fairly large portion of this campaign and in addition to a very cluttered board, I can't think of how I can possibly balance combat for 10 players.  My solo encounters have been modified enough that I think they will work, I still don't know how I should run the more common encounters.    As it stands I am considering splitting the party up for the majority of the campaign.  I have a very diverse group of players so I'm thinking that while some are out on a combat mission, some of the others will be in town solving problems there, maybe helping the police solve a crime or shutting down a local gang.    I just want to know if this plan is viable and any alternatives that you have.  Also any other advice on running large groups would be appreciated.


Using wget over ssh with a terminated session

I have a RaspberryPi. I want to download a big file with wget but the problem is that once I log into the Pi and use wget to download the file, it will abort the download when I close the session.  How can I force wget to continue the download after the session is terminated?


Give an example of a series $\sum a_n$ such that $\sum a_n$ is convergent but $\sum a_{3n}$ is divergent.  Here an example by zhw. is given as $$\frac 1 2 + \frac 1 2 - \frac 2 2 + \frac 1   3 + \frac 1 3 − \frac 2 3 + \frac 1 4 + \frac 1 4 − \frac 2 4 + \frac 1 5 + \frac 1 5 − \frac 2 5+\cdots.$$   But I need a better result with functional expression.


Prove that at least one side length of a rectangle is an integer

A rectangle is divided into smaller rectangles of random sizes each having at least one side of integer length. Prove that larger rectangle has at least one side of integral length.  I don't know how to approach this problem and where to start from.


When I run:  tex algorithms.dtx   for example, I get this message.    ! Undefined control sequence. l.34 \documentclass                    {ltxdoc} ?   Help?


cannot get value when I click the auto select

code is very simple:    <form method="get" action="/category" role="form">
         Category         <input id="categoryName" class="form-control" placeholder="category name" name="categoryName">
     <button type="submit" class="btn btn-default" onclick="return checkInput()">add</button> </form>     Problem is after I click the input, then chrome shows a select list which has input history below it. When I choose one of them and submit, I cannot get the value. I am a new student in web,  anyone can help?  detail is like this picture:


Total number of 'reviews today' is wrong

Very funny: on the stats page for 'suggested edits', it says there is 1 user with 1 review so far today. However, the counter for 'reviews today' says there are 11. Similar issues exist in other review queues of other Stack Exchange sites, e.g. for first posts. . Checkout these stats to see it at work.  I would not be surprised if the counter has not been reset last night at the start of a new day ... smells like a bug (or yet another undocumented feature ...).


Lagrange theorem demonstrations in GAP with cosets and cardinalities?

The goal of this question is to introduce basic group theory concepts with GAP: examples about alternating groups, cyclic groups and demonstrate the Lagrange theorem $[G:H]=\frac{\#G}{\# H}$. Example.  I was surprised to find out that the number of elements in  is 12, not 4,  which is equivalent to Elements(AlternatingGroup(4)) in GAP.  I would be extremely delighted to find GAP commands such as  command to print cosets ( CosetTable(AlternatingGroup(4)) firing error) and  command to find subgroups of A4.   which I want to use for more accessible demonstration for the Lagrange theorem in group theory. So How to demonstrate Lagrange theorem with different introductory groups in GAP?


Error when I move a class into a different package

I have two classes: public class Hello {     public static void main (String[] args)     {         Animal dog=new Animal();         dog.bark();     } }  and public class Animal  {     void bark()     {         System.out.println("Woof");     } }  When I put these 2 class in a same package, it compiles successfully. But when I create a new package called "samples" and put the class Animal into the new package, I modified my code into import samples.Animal;  public class Hello {     public static void main (String[] args)     {         Animal dog=new Animal();         dog.bark();     } }  and package samples; public class Animal  {     void bark()     {         System.out.println("Woof");     } }  and it shows error: Exception in thread "main" java.lang.Error: Unresolved compilation problem:  The method bark() from the type Animal is not visible at Hello.main(Hello.java:8)


How can I make a fake name when I use command blocks?

I'm trying to make a mini game but I want it so that when you press a button over a command block it will say "BOB welcome", so 'bob' instead of the @a or @p sign and then followed by the message. All I know is that I need to use /tellraw.


Compute an object's inertia around an arbitrary axis, using its known values for the x, y and z axes

I need to input inertia data into a bio-mechanical simulation program. I can find inertia data for parts of the human body, around the normal axes.  I know the parallel axis theorem, so I can compute the inertia for the body parts in different locations.  But if the body part is angled to the normal axes, can you then compute the inertia, using its known inertia around the x, y and z axes?  Let's say that a human arm and hand has the following inertia values (around its center of gravity) $$I_x = I_y = 0.3\ kg \cdot m^2$$ $$I_z = 0.02\ kg\cdot m^2$$  This would be the values if the arm is hanging down. But let's say I angle the arm outwards ("abduct" it) by 30°, can I then use $I_x,\ I_y$ and $I_z$ to find the new values? (As the angle increases, the $I_y$ value would gradually fall and reach the old $I_z$ value at 90°. Is there maybe a trigonometric relation for this??) OK,  I am not a physicist, I only do bio-mechanics occasionally :)  Edit 19/7: Just to clarify: What I wish to find out is how angling of the body parts affects their inertia. To use a diver that is somersaulting forward as an example : If the diver keeps the arms straight down the body, the values given above would be correct. But the diver can reduce his/her inertia by angling the arms outwards. (You sometimes see divers do that in the pike position.) I wish to compute the inertia for different angles, all for rotation forward. I wish to start with just the body part alone. (After that you can apply the parallel axes theorem.)  I wonder if there could exist a simple trigonometric relationship since one can divide the mass into point mass elements? I can't prove this is the correct answer but I plotted $0.3\cos(\alpha) + 0.02\sin(\alpha)$. It would show how the moment of inertia of the arm, for rotation forward (like in somersaulting), would decrease, as the arm is abducted (by $\alpha^{\circ}$). (In this example the arm alone is "somersaulting".) Intuitively it looks "OK".    (The other alternative is that this can't be computed. You must make a new measurement. But in the case of the arm (looking a little like a rod), I think at least a reasonable estimate could be computed from the x, y and z values.  But what leads me to believe that it is computable, is that you can input $I_x,\ I_y$ and $I_z$ to computer programs and they can compute rotations along oblique axes.)


Display the actual number of questions on the tag page

On the main tag page a tag can have a number to the right or not. If there is no number to the right then this means that there are either 1 or 0 questions tagged with this tag or that it is a synonym; this is confusing and sometimes annoying.  Can it be changed to remove those tags that have 0 questions, and which are not synonyms, and place a number by the tags that have one? Like this (poor) mock-up:        This leaves a clear delineation between tags with questions, tags without questions and synonyms.  I'm guessing that the ones with 0 questions attached might still be around because they haven't been "deleted" yet. If it's difficult/unwanted to remove these can we have a x 1 by the tags that do have questions and a method of identifying synonyms so people can differentiate between the three possibilities.


What are the basics needed to learn quantum computing?

I was very inspired by Michio Kaku's  on the possibilities of quantum computing and also listening to Talia Gershon's  on it.   As I come from a business & analytics background, what materials can I begin exploring to prepare to learn more about the field of quantum computing? Eg. what would I need to study to understand Peter Shor's algorithm,  on physics, etc.


Why do we still need to hack the Sidebar? Usecases - Workarounds - Alternatives

Since it seems to me, that a lot of people still need sidebar workarounds, I would be interested to learn about the use-cases, experienced challenges and (most important) possible strategies to avoid them by using different approaches. This is related to the methods discussed here:   In my experience there are a few extremely important and constantly repeating patterns, which to my knowledge are still very hard to be solved using more official techniques. I will also contribute my own top-N use-cases, which are mostly related to UX and UI concerns. You are very welcome to add your own scenarios as answers and add comments on how you would avoid a workaround. My dream would be to team-elaborate strong and repeatable solution-patterns for the most common use-cases.  Finally I would be interested in the experiences of all of you who participate in the Aura pilot, which hopefully could make this kind of workarounds obsolete.


Difference between block size and cluster size

I've got a question concerning the block size and cluster size. Regarding to what I have read about that I assume the following:   The block size is the physical size of a block, mostly 512 bytes. There is no way to change this. The cluster size is the minimal size of a block that is read and writable by the OS. If I create a new filesystem e.g. ext3, I can specify this minimal block size with the switch -b. Almost all programs like dumpe2fs, mke2fs use block size as an name for cluster size.   If I have got the following output:  $ stat test File: `test' Size: 13            Blocks: 4          IO Block: 2048   regular file Device: 700h/1792d  Inode: 15          Links: 1   Is it correct that the size is the actual space in bytes, blocks are the physically used blocks (512 bytes for each) and IO block relates to the block size specified when creating the FS?


What nutrients can humans absorb in the mouth?

For instance, I realise being able to absorb simple sugars in the mouth is pivotal in the rapid action of oral glucose gel. Thus I was wondering what nutrients in general can be absorbed directly within the mouth, and at what speed?


How do I make make different versions of my document with command line compile flags?

I've found a number of answers online, and plainly none of them have seemed to be able to execute any conditional code.  answer looked particularly promising.  One thing I noticed is that in the command line help, xetex (and similarly pdflatex) claim that the COMMANDS part of      xetex [OPTION]... [TEXNAME[.tex]]   [COMMANDS]   is latex code that will be processed after the file TEXNAME.tex. Now it occurs to me that this would cause any conditionals which rely on the value of the flags set in COMMANDS to fail, due to the processor not finding the flag value until the end of the file, at which point it is too late. How do I get a command line argument to be interpretted as xetex/latex code which is to be inserted into the document at some point before the \begin{document} element?  The specific problem that I have, is that I want a document that may contain hyperlinks to different parts of the document, but only if I flag it as an electronic copy upon compilation.


While revising an existing blender file, I realized it was getting way too big as it approached 1GB.  This didn't look right since the objects were relatively simple.  I copied/pasted all the objects to a new file which is under 300MB.  Why the difference?


I never learnt QFT and I apologize for my (probably) elementary question. Somebody told me that in QFT a particle is viewed as an irregularity in the field.  On the other hand, in an  in Wikipedia I see the sentence "A QFT treats particles as excited states of an underlying physical field, so these are called field quanta."  Which one of the true is a better description? The 1st description hints that the particle is a localized phenomenon inside a field that maybe occupies a big region in space. The 2nd description speaks of an "underlying" field. So, is there a field and in addition there is a particle? If it is, then what is the occupation number of that "underlying" field?  None of these approaches is clear to me, I know the approach in QM, and none of them resembles the QM.  The motivation behind my question is a certain similarity that I find between the above descriptions and the Bohm interpretation of QM, (i.e. the background field - in Bohm's interpretation there is a background quantum potential - and a particle floating in it.)  In all, is a particle treated in QFT as a localized phenomenon inside a field occupying a wider volume? I would appreciate a simple and direct answer.


Is there a software in Ubuntu that can analyse the cross references (theorems, lemmas, equations, etc.) in a tex project?

There are some software to analyse the cross references among codes (Java or C++). I used to use a software for code analysis under Windows many years before. But I can't remember the name. On linux, an example might be LXR Cross Referencer.   Is there a similar tool that can analyse the latex files to find out the cross references of theorems, lemmas, propositions and equations?


Site oneboxes are often white, invisible

Oneboxing of site links is often not visible, especially on beta sites:        Many sites, like Ask Ubuntu and Sharepoint also have predominantly white logos in oneboxes.  These images should have a background colour, so that they are visible.   chat.stackoverflow.com has a slightly off-white background, so the white content is still slightly visible. chat.stackexchange has a pure-white background, white content is gone. the one-box for http://stackexchange.com is pure white, and looks like:        at least on chat.stackoverflow the white is visible:


Nested If Statement - Not Receiving Expected Output Java

This a  simple program that asks the user for two questions. Based on the user's input, we will display a guess of what the object is. Similar to the game "20 Questions". No matter what input I give the program, it always returns the value of myGuess as "paper clip"  I have tried commenting out the inside of each if/else statement and having the output set to 1,2,3 but it still gets to 3 ( the block of the paper clip). This leaves me to think that my comparison of strings has a bug either in the assignment of the user input or conditional logic... Here is the code:  import java.util.Scanner;  public class JavaTraining {     public static void main(String[] args) {        Scanner keyboard = new Scanner(System.in);       String input1,input2;       String myGuess;        System.out.println("TWO QUESTIONS!");        System.out.println("Think of an object, and I'll try to guess it.\r\n");        System.out.println("Question 1) Is it an animal, vegetable, or mineral?");       input1 = keyboard.nextLine();        System.out.println("\r\nQuestion 2) Is it bigger than a breadbox?");       input2 = keyboard.nextLine();        if (input1 == "animal"){            if (input2 == "yes"){               myGuess = "moose";           }           else{               myGuess = "squirrel";           }       }       else if (input1 == "vegetable"){           if (input2 == "yes"){               myGuess = "watermelon";           }           else{               myGuess = "carrot";           }        }       else{           if (input2 == "yes"){               myGuess = "Camaro";           }           else{               myGuess = "paper clip";           }        }        System.out.println("\r\nMy guess is that you are think of a "+myGuess+".\r\nI would"               +" ask you if I'm right, but I don't actually care."+input1+input2);       }   }


I've noticed a distressing tendency for questions that seem basic or overly short to be immediately closed and downvoted into oblivion.  Case in point:   Within a minute of being asked, this question received 12 downvotes and was closed as "not a real question".  That particular question is a very real, non-trivial question, but it had somewhat poor grammar and looked a little like a much simpler question.  Can we try to be a little more accepting?


Review of my question ban on Stack Overflow

I was auto-banned from posting new questions in Stack Overflow. I have earnestly tried to improve my questions. Please review them once more. The questions are listed below:


Which ordinal indicator, if any, should be used on symbolic math variables?

Consider:   “the n-th root of x” “the a-th derivative of b”   and even more troublesome:   “the ϑ-th something…” (thetath?)   Is there a rule for which ordinal indicator to use on a name, or symbolic variable?  I have seen “n-th” used in various places, but I cannot say the same for other variable names (x, y, ϑ…)  Is “-th” the preferred indicator for unknown quantities? Is it even acceptable to use one, or should the sentence be rephrased into “the something of order ϑ” whenever possible?    NB. This question was never about the typesetting choice of “n-th” vs. “nth,” or even nth, but about the use of an ordinal indicator on symbolic variables: short names that are used to represent unknown quantities.


jdbc mssql connection causes EXCEPTION_ACCESS_VIOLATION

I'm trying to connect to a Microsoft SQL Server database with a class that looks like this   import java.sql.*;  public class ssh_test_db {     public void dbConnect(String db_connect_string)     {         try {             Connection conn = DriverManager.getConnection(db_connect_string);             System.out.println("connected");             Statement statement = conn.createStatement();             String queryString = "select * from sysobjects where type='u'";             ResultSet rs = statement.executeQuery(queryString);             while (rs.next()) {                 System.out.println(rs.getString(1));             }         } catch (Exception e) {             e.printStackTrace();         }     }      public static void main(String[] args)     {         ssh_test_db connServer = new ssh_test_db();         connServer.dbConnect("jdbc:sqlserver://server:port;database=test;integratedSecurity=true");     } }   I keep getting errors like this:     Connected to the target VM, address: '127.0.0.1:54506', transport: 'socket'      A fatal error has been detected by the Java Runtime Environment:      EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x00000000513498f7, pid=23488, tid=22732      JRE version: Java(TM) SE Runtime Environment (10.0.1+10) (build 10.0.1+10)    Java VM: Java HotSpot(TM) 64-Bit Server VM (10.0.1+10, mixed mode, tiered, compressed oops, g1 gc, windows-amd64)    Problematic frame:    V  [jvm.dll+0x3b98f7]      No core dump will be written. Minidumps are not enabled by default on client versions of Windows   I don't know what to look for as a cause for this error.


Fantasy book with young female protagonist, magic, matter manipulation, tasteless chocolate sandwiches and room with aquarium walls

I'm trying to identify a book I read in the mid-2000's in English, which I'm fairly sure was the first in a trilogy. I remember very little of the overall story-arc, but a few scenes stand out:   The main character was a young girl who somehow ended up in a world that wasn't her own When she first came to this new world she was in a massive room that at one point had enormous aquariums for walls, filled with colourful fish In this world you could create matter somehow, or reshape things, and she was told if she was hungry to visualise food and it would appear - she visualised a chocolate sandwich, and while it looked perfect, it tasted like nothing because she hadn't thought of the taste when she called it into being  There's a witch in the story, who has spiders in/around her mouth? And at one point the girl is terrified she's turning into the witch (her teeth are falling out and she's finding spiders in her mouth), but ultimately she realises it was her fear of turning into the witch that was causing this, as she was unconsciously transforming herself due to her fear, which only exacerbated the issue.    I've done a bunch of key-word searches in google but am finding it very difficult to track down.


I found a pile of these resistors, and I didn't know how to decode them using 4-band logic.  How do you know if it's to be read:  Brown(1), Black(0), Black(0), Black(0), Red(2) = 100Ohm  or:  Red(2), Black(0), Black(0), Black(0), Brown(1) = 200Ohm  Now before you get carried away, I hooked up a multimeter and I know that it is a 200Ohm resistor.  My question is, how would I be able to guarantee it is a 200Ohm resistor and not a 100Ohm resistor, using only the bands?  While looking for a picture to put with this post, it appears "grouping" plays a role on some 5-band resistors, but in this case there appears to be no grouping, but the red band is slightly thicker than the brown band. Is there a standard, or is this some form of tribal knowledge?


Dictionary for TeXstudio: “No dictionary Available”

I have trouble spell checking my document in TeXstudio. When I press spellcheck, I get the error No dictionary Available. Am I supposed to install a dictionary separately? How? Any suggestion?


How to restore Windows boot loader after removing Ubuntu

I am just about to install Ubuntu alongside Windows, just need to make sure I know how to remove it later.  I know from past the major problem was when I removed Ubuntu, I either still got into the GRUB booting menu, or I couldn't boot at all, and had to format HDD and start over. Now I found an article practically saying the Windows loader should be back upon deleting Linux partition, so I want to make sure:  If I have Windows and Ubuntu dualboot, and I want to get back to Windows booting quickly itself without choosing from any booting menu, is it enough to just delete the Ubuntu partition? Will the Windows loader override GRUB?  Thanks!


Synaptic package manager not launching in Ubuntu 17.10

In Ubuntu 17.04, Synaptic Package Manager worked fine. But after upgrading to Ubuntu 17.10, it is not working. I removed it and installed it again, with no success. How do I solve this issue?


Can I print the Print Date or Save Date in Google Documents?

I've created a word processing document that will be used by many people (a style sheet for writers), and will also be updated periodically. I suspect that well have some who print the document out for reference. Is it possible in Google Documents to put field codes in the footer that indicate the print date or the save date? If not, maybe we could name the document "[document title] version [x]" and have that print in the footer?


I'm currently in the process of writing on my PhD-thesis. According to my uni's theses formatting guidelines, font size should be 13 pt. The thesis document class is set to report, which only takes 10pt, 11pt and 12pt as input.   Now, I found , which seems to address my problem. I added the two suggested commands: \fontsize{13}{\baselineskip} and \selectfont, but there's no change in the font size in my document. What am I doing wrong?   If it help, I've added my document layout below. The added lines are at the beginning of %Styles.   \documentclass[12pt,twoside, openright]{report}  %Packages \usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry} %\usepackage[utf8]{inputenc} \usepackage{graphicx} %\usepackage{anyfontsize} \usepackage[T1]{fontenc} \usepackage{libertine} \usepackage{sectsty} \usepackage{caption} \usepackage{subcaption} \usepackage{fancyhdr} \usepackage[backend=biber, style=apa]{biblatex} \usepackage[english]{babel} \usepackage{xcolor} \usepackage{pdfpages} \usepackage{setspace}  %Paths \graphicspath{ {images/} } \addbibresource{references.bib}  %Styles  %Added lines \fontsize{13}{\baselineskip}  \selectfont  %Existing style commands \allsectionsfont{\sffamily} \onehalfspacing  \pagestyle{fancy} \fancyhead{} \fancyhead[RO,LE]{Thesis title} \fancyfoot{} \fancyfoot[LE,RO]{\thepage} \fancyfoot[LO,CE]{Chapter \thechapter} \fancyfoot[CO,RE]{Author} \renewcommand{\headrulewidth}{0.4pt} \renewcommand{\footrulewidth}{0.4pt} \raggedbottom  %Thesis information \title{Thesis Title} \author{Author Name} \date{\today}  %Document start \begin{document}


In C#, in a switch statement non constant values are not allowed in a case label. If you need to support non constant values then you have to use an if statement.  My question is rather simple: Is switch internally implemented in such a way that restricting to constant values allows some kind of optimization that otherwise couldn't be done? What I'm basically asking is if these two code snippets would perform exactly the same:  switch (myEnumVariable) {      case MyEnum.Value1:         ....         break;      case MyEnum.Value2:         .....       ....      default:         .... }  if (myEnumVariable == MyEnum.Type1) {     .... } else if (myEnumVariable == MyEnum.Type2) {     .... } ... else {     .... }   Or does the switch statement have an advantage due to it's restriction. If not, why have the restriction?


standardised random variable least square regression $X$ against $Y$, $Y$ against $X$

Let $X$ and $Y$ be mean 0 and variance 1 random variables such that we choose $\alpha$ and $\beta$ to minimise  $$\mathbb{E}(X-\beta Y)^2$$  and   $$\mathbb{E}(Y-\alpha X)^2$$  after not so difficult derivation, I arrive at $\alpha = \mathbb{E}(XY)/\mathbb{E}X^2$ and $\beta = \mathbb{E}(XY)/\mathbb{E}Y^2$, so $\alpha = \beta$.   This seems very strange, because if $y=mx$ is regression line, then surely $x = \frac{1}{m }y$.


Show that $f_n(x)=n^2x^n(1−x)$ converges pointwise to $0$ using epsilon argument from definition

Let $f_n:[0,1]\to\Bbb R$ be defined by $f_n(x)=n^2x^n(1−x)$.  Show that $f_n(x)$ converges pointwise to $0$ using an epsilon argument from the definition of pointwise convergence.  I've got the following so far:  Let $\epsilon>0$. Then $N >$_______ implies:  $|n^2x^n(1-x)-0|=|n^2x^n(1-x)|\leq n^2x^n(1-x)$...  And I have no idea where to go from here, because I don't see how I can isolate the $n$ so that I can make the expression less than epsilon.   Thank you in advance!  Edit: I'm aware there's been a question posted about this before but the answers given have been expressed in terms of limits/theorems/tests/rules but I'd like to do it purely with an epsilon argument from the definition.


Looking for Ludwig Schermer, DOB 27 Dec 1917

Ludwig was from Kaiserslautern, GE and said he was in the German Army. He was old enough for WWII, but not completely sure about when he served. He immigrated to USA in March 1957.


How to evaluate the sum $\frac{1}{\sqrt{n}}+\frac{1}{\sqrt{2n}}+\cdots+\frac{1}{\sqrt{n^2}}$ when $n$ grows?

I need help with the following limit $$\lim_{n\to\infty}\sum_{k=1}^n \frac{1}{\sqrt{kn}}$$  Thanks.


Avoid hyperlinked TOC if hyperref is used

I'm using the hyperref package because I have a link in my document, but do not want to have the TOC as links. How can this be done?


Fallout from apparent dos attack - httpd trying to contact attacker

I have a server running multiple web hosts (all internally managed) which was the subject of what looked like a dos attack last night. I blocked the attacking IP in IPTABLES for both input and output chains.  That seemed to solve the problem and I went home.  This morning the server died again - this time it seems from netstat that it was sending multiple SYN's to the attacking IP.  Obviously they were dropped by IPTABLES OUTPUT chain, but there were so many in the stack that it failed.    I am worried that the server is sending syn's to the attacker. Presumably it's trying to establish a new outbound connection to the attacker IP on port 80, but why?  Does this mean the server is compromised?  How can I find what is causing this?  I have tried netstat -p but it just shows the owner of the outgoing attempts as httpd.  There are some big sites in the web directory so my attempt at grep'ing for the attacker IP in all the web files would take days.    What to do?  Many thanks in advance....


According to the , Reflect's ability is:     With lightning-quick swipes of his sword, Genji reflects an oncoming   projectile and sends it rebounding towards his opponent.   It's not exactly clear what this means. Does this mean that reflect can only reflect non-hitscan projectiles? Or can he also deflect hitscan projectiles such as S76's Pulse Rifle bullets or Widowmaker's shots? Can he also reflect Ultimates such as Roadhog's Whole Hog or Hanzo's Dragonstrike?


Vertical size of post "window" too short

It appears the calculation of the vertical space used for a post is incorrect in some situations.  Here's one example:        You can see the bottom of the post is cut off.  I can "scroll" the post by selecting a word and then extending the selection downwards, as in:        But then of course the top is cut off.  I suspect this has to do with math formatting.   App Version: 1.5.3.5 Device: iPad mini 2G (Wi-Fi) OS Version: Version 9.3.4 (Build 13G35)


How to remove selected commit log entries from a Git repository while keeping their changes?

I would like to remove selected commit log entries from a linear commit tree, so that the entries do not show in the commit log.  My commit tree looks something like:  R--A--B--C--D--E--HEAD   I would like to remove the B and C entries so that they do not show in the commit log, but changes from A to D should be preserved. Maybe by introducing a single commit, so that B and C become BC and the tree looks like.  R--A--BC--D--E--HEAD   Or, ideally, after A comes D directly. D' representing changes from A to B, B to C and C to D.  R--A--D'--E--HEAD   Is this possible? if yes, how?  This is a fairly new project so has no branches as of now, hence no merges as well.


Testing normality of variables for large set of observations

I have hundreds of variables each has more than 100000 observations. My aim is to determine which variables ara normally distributed. Usual tests like Shapiro-Wilk tests are likely to reject normality of distribution even the distribution is really normal. Since I have hundreds of variables, I can't use graphs to decide normality. How can I do such a mulpitle test using R? I will be very glad for any help. Thanks a lot.


Does it matter in which space the Stones are placed?

In Avengers: Infinity War      Thanos gathers the Infinity Stones one at a time.   I realize the MCU and comics are different but in the comics is it important which Stone goes in which slot and the order they are placed there?


A polynomial can not have infinite number of constant values

This is my hypothesis and I am not sure if this is a valid one. I need a proof for this. My point is that infinite number of minimas are needed if this is valid, but I am lack of knowledge to prove it.   Any one has a proof ?   Hypotehis:  I want to show that a non-constant polynomial $P(x)$ where $x \in \mathbb{N}$ can not have infinite number of the same constant values in its range.   i.e. for some infinite set of distinct $x_i$  values, where $i \in \mathbb{N}$ and $c$ is a constant, $P(x_i) \ne c $


Subsets of a set containing an empty set.

First of all, is A ={φ} a set? If yes, then what are its subsets?  Note: • φ represents an empty set.  • A must have two distinct subsets,       (∵ n(A)=1, thus 2¹= 2)  My approach: According to me, if it has two subsets then they should be φ and φ. If it's so then they aren't distinct at all.


Do you need to take the Hide action when you are Invisible, make no noise and leave no traces?

The Situation: Lets say you are under the effect of Invisibility.  An invisible creature is impossible to see without the aid of magic or a special sense. For the purpose of hiding, the creature is heavily obscured. The creature's location can be detected by any noise it makes or any tracks it leaves.  And you are wearing the Boots of Elvenkind  While you wear these boots, your steps make no sound, regardless of the surface you are moving across. You also have advantage on Dexterity (Stealth) checks that rely on moving silently.  Now your groups ranger or druid casts Pass Without Trace on you.  [...] can’t be tracked except by magical means. A creature that receives this bonus leaves behind no tracks or other traces of its passage.  My Question(s): I know that when you are Invisible and you did not hide, you are still detectable because of the noise and the track you leave behind. But the Boots of Elvenkind and Pass Without Trace take care of that. So:  Are you still required to take the hide action in this situation if you don't want enemies to know your location/presence? If so, why? What gives away your location? If not and you are under the effect of greater Invisibility do you get the benefits of "Unseen Attackers and Targets" for every attack you make when you move between attacks? (You would give away your location, but are not detectable, so completely hidden again when you move)


RSA incorrectly translates for small keys

I've been learning about RSA and wrote my own implementation. I don't pretend to have intuitive understanding of RSA or that I understand why it works, but I believe to have some basic understanding of how it works, and believe that my implementation is valid. Due to time penalty of key generation, I set extremely low key size and had it encrypt and decrypt random numbers to check that it works. Here are randomly chosen parameters:  public: (326142389, 498429991) private: (402424365, 498429991)) original message: 2256094460  final result: 262374496   Decrypting and encrypting failed to provide the original message. I wasn't sure what went wrong so I wanted to gather a couple more results. I had it print out a dozen more attempt results. Half of them successfully translated the message. This had me even more confused, so I ran some more tests. Here's the probability for translation failure (based on a sample of 100000). Left side shows the range from which the primes were generated, the right one the percentage of times translation failed (decrypt(encrypt(message)) != message)        Primes range | Failure chance (%) -------------------+-------------------              10-99 | 100.00            100-999 | 100.00          1000-9999 |  99.36        10000-99999 |  46.75      100000-999999 |   0.00    1000000-9999999 |   0.00  10000000-99999999 |   0.00   While all these primes and keys are much much smaller than what I intend to use for real, I am wondering why this is happening. Is it a fault in my code which only reveals itself for tiny keys or is it inherent within the actual RSA algorithm?


How do I disable updating a form in Windows Forms?

During a complicated update I might prefer to display all the changes at once. I know there is a method that allows me to do this, but what is it?


Short story where a travelling psychic dispels a toxic aura from manufactured goods

I'm not sure where or when I read this.  Probably 1980s or 1990s, but it might have been a magazine or an anthology. The story is set on a post-technological (fallen) world where technological advancement is blocked by an unexplained invisible aura that might be called "shadow."  The aura, which makes people sick, will grow on anything made, but the more artificial it is, the faster the aura grows and the stronger it becomes.  If I'm recalling the back story properly, a colony starship landed, but before they could accomplish anything the entire ship was enveloped, and the colonists had to flee with essentially the clothes on their back.  Generations later, there is a society existing at approximately mediaeval level; they haven't lost all knowledge, but can't use anything more advanced than simple hand-worked metal tools. The protagonist is one of a special guild who fight these auras.  Because he is specially sensitive, he sees the auras as a dark haze around objects, and can easily identify them and tell how strong they are.  He travels from town to town, destroying the auras on people's tools so they can keep using them.  He does this by a psychic effort, fighting the aura into submission; it is very draining and he can only do so much in a day.  I remember a mention of how fighting the aura means taking some of the darkness into yourself, which affects his mental state and maybe his health. In one town he becomes alarmed when he finds they have far too much metal for one of his guild to keep the auras under control.  He is introduced to someone who claims to have a new way to fight them, which I recall as "mindlight."  Instead of dominating the dark aura, this person creates a brightness that drives it away.  When this is demonstrated, the protagonist is temporarily blinded; his connection to the aura has made him sensitive to the brightness too. I'm not sure where the story went after that; I recall one more scene but it may have been from a sequel. In this scene an enemy has managed to create a large number of swords and is threatening to conquer a town.  The swords are stored in a tent in barrels so the people who drive away the auras can keep them clear, and the protagonist's side sneaks in and dumps a huge amount of powdered metal all over everything.  Because of mindlight they can manufacture it, but the other side with the traditional way of dealing with auras is overwhelmed.  (The resulting aura was bigger than the tent and visibly expanding as they snuck away.)


lifetime of local variable inside an Action in c#

Lifetime of local variable declared inside a method is limited to the execution of that method. But in the following code sample lifetime of local variable index preserved after the execution of method .  class Program {     static Action action;     static void Main(string[] args)     {         setAction();         for (int i = 0; i < 5; i++)         {              action();         }                     Console.ReadLine();     }      static void setAction()     {         var index = 5;         action = () => {             index++;             Console.WriteLine("Value in index is {0}",index);         };     } }   The output of the program is this  Value in index is 6 Value in index is 7 Value in index is 8 Value in index is 9 Value in index is 10   I can not understand how the values in variable index is preserved.


I'm making a chat-mockup for with html, css and AngularJS for a school assignment that looks a bit like this (very basics)  HTML

User

Content

     <input type="text" class="chat-msg-text-input" />     <button data-ng-click="addMessage()">Send</button>
   CSS  .chat-box {     border: 1px solid black;     padding: 10px;     height: 200px;     overflow: auto; } .chat-msg-user {     border-bottom: 1px solid red; } .chat-msg {     border: 1px solid red; }   Angular  $scope.addMessage = function(){     $scope.tempMessage.id = $scope.chat[0].chatmessages.length;     $scope.tempMessage.user = $scope.user.name;     $scope.tempMessage.sendDate = $scope.dateToString(new Date()).split('-')[0];     $scope.tempMessage.sendTime = $scope.dateToString(new Date()).split('-')[1];      $scope.chat[0].chatmessages.push($scope.tempMessage);      $scope.tempMessage = {};  };     As seen in the Fiddle I have a set height for the .chat-box and when the message overflow it the scrollbar appears (I'm not using JQuery, just for demo purposes).  Right now the .chat-msg is appended to the bottom of the .chat-box as I want it to, but you have to scroll down manually to see the latest messages. What I want is that it automatically scrolls down to the latest messages.  How do I do this? May it be with html, css or AngularJS  EDIT  Got it working using somae AngularJS in combination with the answer to .  Made a AngularJS function containing the answer which is called after ng-repeat ends.  /EDIT


What is the Fundamental Theorem of Trigonometry?

Historically the fundamental theorem of trigonometry has been:     In a unit circle an arc of length $2x$ stands on a chord of length $2 sin (x)$.   Sadly, I rarely if ever see mention of anything "being" the fundamental theorem of trigonometry.


What is the term for young adult male/female (aged 18 to 25)?

When writing a book and referring to a female and male aged 18–25, what term would be most appropriate? Boy and girl seem too young, whereas man and woman seem too old.  Example sentence:     A boy/man emerged from the shadows.   Edit: I think the word I am looking for is similar to 'guy' but less American and colloquial. Any thoughts?


How deliberately cause gap lock deadlock in MySQL?

I need to find a way how to prove gap lock with insertion only using two separate transactions.  I have tried this example to simulate the gap lock deadlock but it doesn't show any deadlock :    Please help how to deliberately cause a deadlock using insertion only with unique values from different transactions.  Thanks in advance.


How does grid search suffers from the curse of dimensionality while the random search doesn't?

Someone told me grid search suffers greatly from the curse of dimensionality while the random search algorithm doesn't. Does this mean that it is computationally more costly to tune the parameters with the grid search algorithm than the random search algorithm if the data is high-dimensional? why do people exactly mean when they say the grid search suffers from the curse of dimensionality?


I'm trying to use elsarticle-num-ident.bst, an exact copy of  C:\Program Files (x86)\MiKTeX 2.9\bibtex\bst\elsarticle\elsarticle-num.bst    but every time I run LyX, I get the bibtex error  I couldn't open style file elsarticle-num-ident.bst   This is despite reconfiguring LyX and restarting, and despite running MixTex's Settings/Options' "Refresh FNDB" as Administrator.  It also doesn't work if I put the .bst file in the same folder as the .lyx file.  How should I help lyx/bibtex/Mixtex find the .bst file?  Once I get the identical copy to work, I plan to edit it to not print URLs, as suggested .  Related questions:


How can a user convert/migrate his own question?

How can I convert/migrate my own question from one Stack Exchange site to another?


Changing the IP address of our SharePoint Servers. What are the Risks

We are going to change the IP address of our SharePoint Servers can any one point out the RISK and IMPACT


How is it possible for light to be a wave and a particle?

I have always been interested in Physics, and lots of people say that light is a particle and a wave.  How is it possible? How can a photon (a light particle) be a wave as well, when its a particle?  I have tried looking this up, but I do not really understand the answers, as they are quite complicated to me. If you could answer this, please could you explain it in quite a simple way!


A tensor of rank $3$ satisfies $T_{ijk}=T_{jik}$ and   $T_{ijk}=-T_{ikj}$. Show that $T_{ijk}=0$   I really don't know what we can use to show this. All I am able to do is rearrange the dummy indices to get a few more equations but they're of no use.  Any help is appreciated.  Thanks


Efficiently updating database using SQLAlchemy ORM

I'm starting a new application and looking at using an ORM -- in particular, SQLAlchemy.  Say I've got a column 'foo' in my database and I want to increment it.  In straight sqlite, this is easy:  db = sqlite3.connect('mydata.sqlitedb') cur = db.cursor() cur.execute('update table stuff set foo = foo + 1')   I figured out the SQLAlchemy SQL-builder equivalent:  engine = sqlalchemy.create_engine('sqlite:///mydata.sqlitedb') md = sqlalchemy.MetaData(engine) table = sqlalchemy.Table('stuff', md, autoload=True) upd = table.update(values={table.c.foo:table.c.foo+1}) engine.execute(upd)   This is slightly slower, but there's not much in it.  Here's my best guess for a SQLAlchemy ORM approach:  # snip definition of Stuff class made using declarative_base # snip creation of session object for c in session.query(Stuff):     c.foo = c.foo + 1 session.flush() session.commit()   This does the right thing, but it takes just under fifty times as long as the other two approaches.  I presume that's because it has to bring all the data into memory before it can work with it.  Is there any way to generate the efficient SQL using SQLAlchemy's ORM?  Or using any other python ORM?  Or should I just go back to writing the SQL by hand?


"I want to tell my friend" vs. "I want to tell TO my friend"

I am not sure about the adding of the preposition in the following case:      "I want to tell my friend that I appreciate her."      "I want to tell TO my friend that I apreciate her."   Which one is correct?


I wanted to set some handler for all the unexpected exceptions that I might not have caught inside my code. In Program.Main() I used the following code:  AppDomain.CurrentDomain.UnhandledException     += new UnhandledExceptionEventHandler(ErrorHandler.HandleException);   But it didn't work as I expected. When I started the application in debugging mode and threw an exception it did call the handler, but afterwards the exception helper in Visual Studio popped up as if the exception occurred without any handling. I tried Application.Exit() inside the handler but it didn't work as well.  What I would like to achieve is that the exception is handled with my handler and then the application closes nicely. Is there any other way to do it or am I using the code above in the wrong way?


Is there a word to describe something that is only capable of doing one thing?

Something like a one-trick pony. In a limitation type of context. Unique ability, but it is the only ability capable of being done, so it is unique to itself.


Windows 8 - Possible to create a system image?

In Windows 7 you could create a system image that you restore later on in the Backup and Restore options:    However Backup and Restore options have changed in Windows 8. They look like this now:    Is it still possible to create a system image so that I can restore it later on or has this  feature been removed?


How do I save the output of last executed command in terminal after normally executing a command?

I have an incremental build command for my project that will output something if I do a clean build, and output something else (less) if I do an incremental build. Say, I forgot to do this: mycommand.sh > myfile.txt  or this mycommand.sh >> myfile.txt  for saving the output to a file. How can I save this if I already run a clean build mycommand.sh and the output is printed on terminal window (without using copy paste)?


Creating singleton class but getting undefined reference

I have written small program but getting undefined reference error. I'm not getting what I'm doing wrong  #include <iostream>  using namespace std; class A() { private:      static A *m_object;     A()     {         m_object = NULL;     }  public:      static A* getSingleton();      int returnVar()     {         return 45;     }  }; A* A::getSingleton() {     if(A::m_object == NULL)     {        A::m_object = new A();     }     return m_object; } int main() {     cout<<"Hello World";     A *a = A::getSingleton();     cout<<"Address of a"<<&a<<endl;     cout<<"return a"<<a->returnVar()<<endl;     A *b = A::getSingleton();     cout<<"Address of a"<<&b<<endl;     return 0; }   error  /home/main.o: In function `A::getSingleton()': main.cpp:(.text+0x3): undefined reference to `A::m_object' main.cpp:(.text+0x21): undefined reference to `A::m_object' /home/main.o: In function `main': main.cpp:(.text.startup+0x16): undefined reference to `A::m_object' main.cpp:(.text.startup+0x7e): undefined reference to `A::m_object' main.cpp:(.text.startup+0xcb): undefined reference to `A::m_object' /home/main..o:main.cpp:(.text.startup+0xde): more undefined references to `A::m_object' follow collect2: error: ld returned 1 exit status


How can I make an object show up on different layers without having to copy it? E.g. I have an object animated and I want it to show up on multiple layers.


How to capitalize all words in a string excluding some hardcoded cases? For example: words to exclude: "de", "la" input: "DEGAS-URB.JARDÍN DE LAS AVENIDAS" output: "Degas-Urb.Jardín de las Avenidas"


(Euclidean Norm)  Proof that $\|X\|_2\leq \sqrt{n}\|X\|_\infty$, if $x \in \mathbb{R^n}$.   With that, proof $\|X\|_\infty \to 0 \implies \|X\|_2\to 0$  I'm stuck:  $\|X\|_2= \sqrt{x^2_1+x^2_2+...+x^2_n}\leq\sqrt{n}\sqrt{x^2_1+x^2_2+...+x^2_n}$  I don't know how to use the fact: $\|X\|_\infty=\max(|x_1|,|x_2|,...,|x_n|)$


how to find general solution of the system?

I have  $$x' = \begin{pmatrix} 2 && 2 \\ -2 && 2\end{pmatrix}x + \begin{pmatrix}4 \\ 0\end{pmatrix}$$  what steps should I take to solve it?  if this was homogenious system I'd:  1.) find eigenvalues  2.) find eigenvectors  2a.) find generalized eigenvectors (if any)  3.)  write the answer properly  but what should be done here? I have never solved these systems before, general represintation does not seem helpful to me, I need real example but was not able to find any.


Horizontal drag motion - How to disable?

I've already disabled the Swipe between pages option, but I still have this drag jitter... Can I turn this off?   Edit: It's turned off and not swiping between pages, but I still have this drag motion. Looks like this is a normal macos behavior. Is there any way to change it?


What are the visa requirements for an Iranian transiting in Amsterdam, The Netherlands?

I have an Iranian passport and my round trip flight from San Francisco (SFO) to Istanbul (IST) has a stop in Amsterdam, The Netherlands for eight hours.   Do I need a transit visa?  How is the application process and how long it generally takes to get a transit visa?  Do I need to get a separate transit visa for the return flight?


The little icon for new gold badge super closing powers doesn't always appear

Here's a counter-example of the expected gold circle icon:    Compare with:    I'm not certain of when the powers came into play, precisely, but since FredOverflow is neither a moderator nor the owner of that post, I can't see how else he would have marked it as a duplicate single-handedly except for this gold badge power.  Unless I'm missing something…


Integrate:  $$\int\frac{\cos5x+\cos4x}{1-2\cos 3x}\; dx$$  I tried using sums and products formula but couldn't make it. How to approach this problem?


Now I have a binary tree which is  How would I go about proving binary tree with $n$ leaves has exactly $2 n - 1$ nodes ?


I want to use Euler's theorem to calculate the following:  $14^{(2019^{2019})} \mod 60$  $a^{\phi(n)} \equiv 1 \mod n \iff \gcd(a,n) = 1$  Now I start with the outer one first:  $14^{(2019)}\mod 60 \iff \gcd(14,60) = 2$  Now I don't know how can I solve it ...  Can anyone suggest me any hints/further calculations?  Thank you in advance,  Kind Regards.


I'm traveling to the USA in a matter of weeks. I have a B1/2 Tourist Visa (multiple entries 10 Year validity) and am a UK Citizen. I applied for a visa through the UK/US Embassy procedure, as I had a previous arrest for a minor drunk and disorderly offence. The offence did not result in a conviction - The embassy approved my visa. Some say that I could have travelled on ESTA, but the question wording isn't 100% clear, and the official advice is to go via embassy channels.   I've read online that the visa doesn't guarantee entry. I know I've mentioned this before, but does this mean I'm still not guaranteed to get in? I'm really nervous because this holiday means the world to me, I've fully complied with everything.   My crime was not a crime of moral turpitude, and the US Embassy Medical exam proved that I am not an alcohol abuser.   Thanks,


Hi I have an array defined in my header filed  private:     Customer** customerListArray;   In my cpp file I set it as following,   customerListArray = new Customer* [data.size()]; cout << "arr size " << data.size() << "\n"; cout << "arr size " << sizeof(customerListArray) << "\n";   However data.size() is 11900, but sizeof(customerListArray) array is always 4. I've tried replacing data.size() with 100 and still I get 4.  What am I doing wrong here?  Thank you.


Exercise 1.6.3 from Alon & Spencer's *The Probabilistic Method*: prove that $Pr[|X-Y| \leq 2] \leq 3 Pr[|X-Y| \leq 1]$ for i.i.d. real RVs $X$ and $Y$

Doing a little reading over the break (The Probabilistic Method by Alon and Spencer); can't come up with the solution for this seemingly simple (and perhaps even a little surprising?) result:     (A-S 1.6.3) Prove that for every two independent identically distributed real random variables $X$ and $Y$,   $$Pr[|X-Y| \leq 2] \leq 3 Pr[|X-Y| \leq 1].$$


php: sql-injection > how to prevent when no prepared statement can be used?

A simple question: I have a framework which does not use prepared statements (mySQLi). How can sql injections be avoided when I have some user input (made through a public form but no HTML-code is allowed). That comment has to be stored in a mysqli database.  What is the best practice to detect and remove possible injection code? Please no suggestions to use prepared statements, they are not availabe without rewriting the whole framework!  EDIT  I was NOT asking how to do a MySQLi query! I asked how to prevent sql-injections on the php-level. To repeat: some website visitor leave a comment in a plain text field. Inside this comment this visitor (the script kiddie) thinks, he can post a sql-injection.  Now again: how the delete this pseudocode from the comment BEFORE adding it to the database. Answers like "hey, use a prepared statement", "use pdo", "use this kind of query with these parameters" are NOT answering my question. Also answers like "change" your framework" or NOT adequate!  I know that this could such code could be removed by preg_replace(..) and so on. And yes, I know the opinion of some here not to use this technique .. so better do not answer in that direction!


In a Lithium Ion battery (during discharge) positive Li Ions flow to the +3.8 volt cathode. Where do they get the energy to climb that 3.8 V hill?

These positive $\text{Li}$ ions are flowing up hill to the cathode during discharge so where is the energy coming from that allows them to get over the hill?


Why does k-fold cross validation generate an MSE estimator that has higher bias, but lower variance then leave-one-out cross-validation?

Looks like the rationale behind the accepted answer of  is incorrect.   Under leave one out cross validation(LOOCV), the variance of its MSE estimator is $$var [\frac{\Sigma_i x_i}{n}] = \frac{var[\Sigma_i x_i]}{n^2}$$ where $x_i$ is an estimate of MSE from one particular iteration.   I agree that LOOCV has a higher enumerator (b/c of the covariance terms), but the denominator is larger as well because there are essentially n estimates (greater than k estimates as in the k-fold case).  Given this, why does LOOCV still have higher variance in estimating MSE and why does it have lower bias?  (This is against intuition b/c increasing sample should decrease variance and leaves bias unchanged for $\hat\theta$ and $\hat{y}$)


Error in on a null object reference on custom list view

I am trying to add same values on listView by user clicks, when user clicks a button, the system graps the value of two EditTexts and add it into the list.  But when I click a button Error displays:     01-14 12:46:31.623 21297-21297/com.example.transportor   E/AndroidRuntime: FATAL EXCEPTION: main       Process: com.example.transportor, PID: 21297       java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object   android.content.Context.getSystemService(java.lang.String)' on a null   object reference           at android.widget.ArrayAdapter.init(ArrayAdapter.java:310)           at android.widget.ArrayAdapter.(ArrayAdapter.java:153)           at com.example.transportor.product_list_adapter.(product_list_adapter.java:24)           at com.example.transportor.ui.home.HomeFragment$1.onClick(HomeFragment.java:59)           at android.view.View.performClick(View.java:4757)           at android.view.View$PerformClick.run(View.java:19757)           at android.os.Handler.handleCallback(Handler.java:739)           at android.os.Handler.dispatchMessage(Handler.java:95)           at android.os.Looper.loop(Looper.java:135)           at android.app.ActivityThread.main(ActivityThread.java:5235)           at java.lang.reflect.Method.invoke(Native Method)           at java.lang.reflect.Method.invoke(Method.java:372)           at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:898)           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)   My Homefragment:   Context mcontext;  Button addListe = (Button)root.findViewById(R.id.addL);         final ListView productListe = (ListView)root.findViewById(R.id.productList);         addListe.setOnClickListener(new View.OnClickListener() {             @Override             public void onClick(View v) {                 product_list PL = new product_list(quantity.getText().toString(),produit.getText().toString());                 ArrayList<product_list> PLL = new ArrayList<>();                  PLL.add(PL);                 product_list_adapter p_l_a = new product_list_adapter(mcontext,R.layout.adapter_product_list,PLL);                 productListe.setAdapter(p_l_a);             }         });   and My Product list:    private String quantity;     private String product;      public product_list(String quantity, String product) {         this.quantity = quantity;         this.product = product;     }      public String getQuantity() {         return quantity;     }      public void setQuantity(String quantity) {         this.quantity = quantity;     }      public String getProduct() {         return product;     }      public void setProduct(String product) {         this.product = product;     }   and product_list_adapter:   private Context mContext;     int mRessource;     public product_list_adapter(@NonNull Context context, int resource, @NonNull ArrayList<product_list> objects) {         super(context, resource, objects);         this.mContext = mContext;         mRessource = resource;     }        @NonNull     @Override     public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) {         //get infos         String quatity = getItem(position).getQuantity();         String product = getItem(position).getProduct();         product_list PL = new product_list(quatity,product);         LayoutInflater iniat = LayoutInflater.from(mContext);         convertView = iniat.inflate(mRessource,parent,false);         TextView Tquantity = (TextView)convertView.findViewById(R.id.TextView1);         TextView Tproduct = (TextView)convertView.findViewById(R.id.TextView2);         Tquantity.setText(quatity);         Tproduct.setText(product);         return convertView;      }


Can grep return true/false or are there alternative methods

As a part of this script, I need to be able to check if the first argument given matches the first word of file. If it does, exit with an error message; if it doesn't, append the arguments to the file. I understand how to write the if statement, but not how to use grep within a script. I understand that grep will look something like this  grep ^$1 schemas.txt   I feel like this should be much easier than I am making it.  I'm getting an error "too many arguments" on the if statement. I got rid of the space between grep -q and then got an error binary operator expected.   if [ grep -q ^$1 schemas.txt ] then         echo "Schema already exists. Please try again"         exit 1 else         echo "$@" >> schemas.txt fi


Let $\alpha = 2^{1/3}$.          Prove that the set $\mathbb{Q}[\alpha] = \{a+b\alpha+c\alpha^2 \mid a, b, c \in\mathbb{Q}\}$ is closed under addition and multiplication.    Prove that if $z \in \mathbb{Q}[\alpha]$ is nonzero then there exists $z^{-1} $such that $z*z^{-1} = 1$      I have proved that $\mathbb{Q}[\alpha]$ is closed under addition, but I am having difficulty proving that it is closed under multiplication.   With all coefficients in $\mathbb{Q}$, let $a_1 + b_1\alpha + c_1\alpha^2 $ and $a_2 + b_2\alpha + c_2\alpha^2 \in \mathbb{Q}[\alpha]$. When multiplied, these two elements yield a fourth degree polynomial, and I do not know how to prove that it is an element of $\mathbb{Q}[\alpha]$


How can I find the value of this following definite integral?     $$\int_2^4\frac{\sqrt{\log(9-x)}}{\sqrt{\log(9-x)}+\sqrt{\log(3+x)}}dx$$


80/90s UK children's drama series about an "alien" boy with radio weapon

I've been trying to track down a live-action children's TV series (or short story perhaps) from the 1980s or 1990s, probably on CBBC or CITV.  A few people I've spoken to IRL have suggested The Boy from Space or Sky, but I'm pretty sure it's neither as a lot of the details don't seem to match.  The story was set on Earth (possibly England or Wales) and was about an "alien" boy who was being pursued by a group of people, though I don't remember who they were.  Somehow he encountered siblings, a girl and a boy, and made friends with them. I think they lived on a farm with their parents, as I remember quite a large barn or other building, and they hid(?) the boy in a car which was inside or next to this building. He also slept in this car with a dog (which might have been a German shepherd).  The "alien" boy had a portable "radio" (all silver, very 1980s) that repelled his pursuers by emitting a high-pitched sound when he turned a dial on it, and he used it when out and about with the other children whenever they encountered a pursuer. I seem to remember lots of hills and valleys, lots of green.  In the end it turned out he wasn’t really an alien, but a human from the far future. He was pretending to be an alien as he was from 20000 years into the future and humans' appearance had changed by then, but he had the ability to make himself look like current-day humans. When he was in his car/bed he reverted to his normal appearance, so he would hide under the blankets until he was able to assume current-day human appearance.  In the finale, it was revealed that he was never in any danger – the pursuers were testing him as part of a kind of coming-of-age thing. I remember a scene on a spaceship or something where his elders/parents where shown telling him that he was safe all along and that he "passed".  I also seem to remember them referring to "ancestors" and making sure they didn't find out, so the either the girl or boy could well have been a direct ancestor.


Float didn't showing normally (dart languange)

I'm trying to calculate the number 4.2 + 0.2 - 0.1 However Despite having the value of 4.3 the output was 4.300000000000001. This is the animal.dart class class Animal {   String name = '';   int age;   double weight = 0;    Animal(this.name, this.age, this.weight);    void eat() {     print('$name is eating.');     weight = weight + 0.2;   }    void sleep() {     print('$name is sleeping.');   }    void poop() {     print('$name is pooping.');     weight = weight - 0.1;   } }  and this is the main() function import "dart:io"; import "lorem.dart";   void main(){ var pet = Animal('Flowie', 2, 4.2);    pet.eat();   pet.poop();   print(pet.weight); }  and the output is the following: Flowie is eating. Flowie is pooping. 4.300000000000001  what's the correct way to output the weight to 4.3 instead of 4.300000000000001 ?


$f$ is differentiable in $[0,1]$ ,$\sup_{x\in[0,1]}|f'(x)| \le M\lt+\infty $ . Prove $$ \left|\sum_{i=0}^{n-1} \frac{f(i/n)}{n}-\int_{0}^{1}f(x)\,\mathrm{d}x\right|\le\frac{M}{2n} $$ I tried to write $\int_{0}^{1}f(x)\,\mathrm{d}x$ as Riemann sum by partition $[0,1]$ into equal $2n$ parts. And want to use Mean Value Theorem. But I can't get $\frac{1}{2n}$ out of the absolute value. Come to seek some help ... Thanks and regards!


Dismiss flags on the same posts with different validities

Sometimes a post has both valid flags and invalid flags. As far as I can tell, all the flags on the same post have to be dismissed with the same validity.  The scenario I encountered (on ):   A low-quality question is closed. The asker improves the question and flags for reopening. A moderator reopens the question, but doesn't dismiss the flag yet. Someone else flags the question as “off topic”.   Since I agree with the reopening, and I don't consider the question off-topic, I would like to dismiss the first flag as valid and the second flag as invalid. But there's only one set of buttons for both flags.  And just now, two flags on a closed question: one that says “delete it”, the other one that says “reopen it”. The correct course of action is neither (the ideal outcome would be for the question to be edited then reopened). I should provide different feedback to the two flaggers, but I can't.  Unless I've missed something, please allow multiple flags on the same post to be dismissed separately.


Find a prime number $p$ and an integer $b<p$ such that $p$ divides $b^{p−1}−1$.  First I think of long divisions but it didn't work out. Now I'm stuck..


Text for Electorate gold badge is confusing & ambiguous

For observers, this particular badge creates confusion. Currently Electorate badge text shows like this:     Vote on 600 questions and 25% or more of total votes are on questions.   Does it mean:      Vote on 600 posts and/or 25% or more of total votes are on questions.   ... or something better. To me clearly, the original text is not understandable. The "and" part appearing between a number (600) and % (25) is creating confusion.  Update: From the dupe, I learned that the badge is intended the way it is. However below problems are still open:   Is this any vote or just upvote? Should it be "AND" or "OR"?   Practical example: When a user upvotes 600 Qs, then he is surely eligible for the badge. Now, A user votes up 1000th post. This is also the 600th Q. Hence 60%. Is the user eligible for the badge?  Should the text be corrected?  Suggestion:     Vote on 600 questions, which is at least 25% of total votes


How to make Outlook Calendar reminders stay on top in Windows 7

I'm just starting to use Windows 7 and I want to know how to make my Outlook reminders pop up and show themselves prominently.  They keep opening discreetly, as just another window in the Outlook stack on the taskbar.  As a result, I keep overlooking them because they pop up behind everything else.  How do I make them less easy to overlook?  (Clearly, one usually doesn't want obnoxious apps that push themselves to the forefront.  But there are a few places where such behavior is desirable, and Outlook calendar reminders are one of them.)


A fellow player is uncooperative with the group and gets GM favoritism. How do I handle this?

I actually have two situations but they are interconnected. Our group is currently playing a Dresden game. The GM and one of the players are married. Along with that, he is a new member to the group. I can understand her (the GM) wanting to make him feel welcome but it has gone into the the realm of blatant favoritism. A few examples:   Every idea he has is deemed fantastic, wonderful, awesome and is always successful. Most of the time he doesn't have to roll to see if he succeeds; he just does. After a series of major setbacks to the other player's characters, I joked that her husband was the only one left to mess with. Her answer to that was that she would absolutely not be messing with him in the game. He and his character were safe from that. In the last session, he and another player had to make the same roll using the same skill for the same information. He needed a fair to succeed. The other player needed a great. Not the first time that has happened.    The second part of this has to do with him as well. As I said, he is new to the group. When we were discussing a game to play, it was made clear that it would be cooperative. We would all be working together to a common end. However, he will not- I mean ever- share any information with the rest of the group. No matter how vital or needed that information is to advance the story, he just smiles and says he's got nothing. To try and get around this problem, a group aspect was created. That way if a situation or information that everybody needed to know came up, a fate chip could be played and anyone who wanted to be a part of it could be present. He is totally abusing it. Now, instead of just not telling us anything, he adds give me a fate chip and maybe I'll tell you something. It's like he is trying to beat us at the game and that is not the way it was set up.    So, the question to these two situations is what do I do? How do I handle this in a rational and sensitive way? To complicate things further, the GM is my best friend. He is her husband. I don't want to put her in the middle but I am about ready to quit the game. I am tired of it being his game and everyone else being bit players. Should I talk to her or should I talk to him? If anyone has had experience with this, any advice would be appreciated.


The n-th root of a prime number is irrational

If $p$ is a prime number, how can I prove by contradiction that this equation  $x^{n}=p$ doesn't admit solutions in $\mathbb {Q}$ where $n\ge2$


Alignment issue in StackExchange.com inbox, achievement dialog and site switcher

There is an alignment issue in the  Inbox, Achievements dialog and Site Switcher. The icon is not properly padding with the adjacent text.  The alignment in inbox, achievement and site switcher from other sites are fine. I can verify this alignment issue in Chrome and Firefox.   Screenshot for reference:


could a force with corolios and centrifugal terms be written as a potential gradient?

I have an exam in classical mechanics next week, so I came across this problem which I did not fully understand nor any of my colleagues (it was a bonus problem in an old exam)  I just want some hint about it, this is the problem:   A particle with mass m is moving without costraint under the effect of the following time and velocity dependent force:   $\vec{F}(\vec{x},\dot{\vec{x}},t)= -2m\vec{\omega(t)}\!\times\!\dot{\vec{x}}-m\vec{\omega(t)}\!\times\!(\vec{\omega(t)}\!\times\!\vec{x}) - m\dot{\vec{\omega}}\!\times\!\vec{x}$  with $\omega(t)$ a time dependent vector.   Show whether we can get this force in the lagrange formalism, from a generalized potential $V(\vec{x},\dot{\vec{x}},t)$     I think that I just have to check if this force curl free is, and I tend to believe that the answer is no because the second and third term won't vanish nor be subtracted from each other (since the first term would directly vanish since it does not depend on the transition).     so My question now whether the way I'm thinking about this problem is valid. I find it a bit confusing what the prefessor means with (in the lagrange formalism).  Thank you for your help !


Are there any Hogwarts students who live in Hogsmeade during the summer?

Hogsmeade has a lot of individuals who live there, and it has the distinction of being the only non-muggle community in the UK. Are there any students at Hogwarts who live there during the summer?  I ask because  explicitly says that students must ride the train or not go to the school at all, which seems silly for someone who already lives at the destination.     Many pure-blood families were outraged at the idea of their children using Muggle transport, which they claimed was unsafe, insanitary and demeaning; however, as the Ministry decreed that students either rode the train or did not attend school, the objections were swiftly silenced.


What is the best collation when using JSON and some special characters

I'm trying to get data from mysql database with php and JSON and it's not working because of the collation I've chosen. I'm using these characters  : ® ,é, è , ™, É My deafult collation in mysql is: latin1_swedish_ci,and my server default collation is: utf8mb4_unicode_ci.  Should I just remove those special characters or what?  this the php code:   <?php  require "conn.php"; $sql = "select * from produit"; $result = mysqli_query($conn, $sql); // result contient tous les produits  $response = array(); // on déclare un array // pour chaque ligne de la table  while ($row = mysqli_fetch_array($result)) {  array_push($response, array("id_produit"=>$row[0] , "nom"=>$row[1], "catégorie"=>$row[2], "description"=>$row[3], "type"=>$row[4], "prix"=>$row[5], "qte_stock"=>$row[6])); } echo json_encode(array("server_response"=> $response)); mysqli_close($conn);   ?>   show create table produit :   CREATE TABLE `produit` (  `id_produit` int(11) NOT NULL AUTO_INCREMENT,  `nom` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,  `catégorie` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,  `description` text COLLATE utf8mb4_unicode_520_ci NOT NULL,  `type` varchar(255) COLLATE utf8mb4_unicode_520_ci DEFAULT NULL,  `prix` int(11) DEFAULT NULL,  `qte_stock` int(11) DEFAULT NULL,  PRIMARY KEY (`id_produit`) ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci


required hardware upgrade for old system

I want to use Ubuntu 14.04.I do not wish to opt for lightweight versions so I need help in determining some reasonable hardware upgrades so I can use Ubuntu comfortably. Currently my system specs are as follows: 1)512mb of ram. Can be increased not more than 2 GB (would that be enough?) 2)No graphics card (would it be required?) 3)Processor is pentium 4 4)Speed is 2ghz.


What IP addresses and ports are required for firewall exceptions for Stack Overflow sites?

While using the Stack Exchange sites, image uploading is restricted in my office by default and I need to request an exception to interact with Stack Exchange sites (i.e., post questions answers with images, etc.). My office requires me to provide an , , or URLs. So what URLs and ports should I give them to open access for me?  I was thinking to give them,  URLs  https://stackoverflow.com/ https://*.stackoverflow.com/ https://*.stackexchange.com/  PORT: 80   Is there a guideline?


Is it possible to use the TikZ/external library and have pgfplots recreate a figure when a data file that is plotted changes? Say I have something like the following:  file.tex:  \documentclass{article}  \usepackage{tikz,pgfplots} \usetikzlibrary{external} \pgfplotsset{compat=newest} \tikzexternalize \newcommand{\figFilename}{}  \begin{document}   \begin{figure}[t]     \centering     \renewcommand{\figFilename}{thePlot}     \tikzpicturedependsonfile{\figFilename.tikz}     \tikzsetnextfilename{\figFilename}     \input{\figFilename.tikz}     \caption{The caption.}   \end{figure} \end{document}   thePlot.tikz:  \begin{tikzpicture}   \begin{axis}[     xlabel={$x$},     ylabel={$y$},]     \addplot+[only marks,mark=x]       table[x=x,y=y] {data.dat};   \end{axis} \end{tikzpicture}%   data.dat:  x y 0 20.44 1 20.06 2 19.76 3 19.54 4 19.40 5 19.34   If I change thePlot.tikz, the external library will detect that the figure is no longer up-to-date and recreate it. Is it possible to have the same effect when any of the plotted data files changes as well? I tried something along the lines of \tikzpicturedependsonfile{data.dat}, and it doesn't work. That wouldn't be an ideal solution anyway, as most times I use many data files in each plot and listing all dependent files manually would be more pain than gain.  So is there an easy, automated way for the external library to check all data files included in a tikzpicture and recreate the plot if at least one of them has changed?


Java regex: How to match a string if its not consisting a list of certain top level domains

im trying to build a regex where i try to filter urls and only those who are not given in my regex will result in a match.  If there is no test1.com or test2.com in the url it should result in a match.  The top level domains i want not to result in a match (test1.com and test2.com) are using always the https protocol, can contain subdomains and having paths after the top level domain ".com".  Last try was the following but still doesnt work...  https?://([a-z0-9]+[.])((test1)|(test2))[.](com)/.*   Result on regexplanet:  https://abc.test1.com/test.htm    ==> MATCH  www.google.com   ==> NO MATCH  https://123.test2.com/test.html    ==> MATCH  https://test2.com/test.html   ==> NO MATCH  Ho do i need to write the regex that everything which has not the test1.com and test2.com domain in its string will give a match?


How do I take the name of an image? For example: I upload images image_name.jpg. So the URL is http://localhost/xxxx/wp-content/uploads/2014/08/image_name.jpg.   So I just wanted to take the name of the image, not the URL.  How can I do that?   Thank you.


I want a really good book on Complex Analysis, for a good understanding of theory. There are many complex variable books that are only a list of identities and integrals and I hate it. For example, I found Munkres to be a very good book for learning topology, and "Curso de Análise vol I" by Elon Lages Lima is the best Real Analysis book (and the best math book) that I have read with many examples, good theory and challenging exercises.  An intuitive and introductory approach is not very important if the book has good explanations and has correct proofs.  Added: If it is possible, tell me your experience with your recommended books and if you got a really good understanding of complex analysis with a deep reading.


Do fish break a water molecule to absorb oxygen?

How do fish separate oxygen from H20 & consume it? Do they break the water molecule and absorb  the oxygen only?


In my references (the library is automatically produced by Mendeley) I have a paper "Abc", which I refer to quite a lot. At one point I need to refer to a specific section in this paper (or a page, it doesn't matter). Is there a way to do that? Something like: "in Abc, section 3.2" or "in Abc, page 15".  \documentclass{article} \bibliographystyle{apalike} \usepackage{filecontents}  \begin{filecontents}{\library.bib} @book{abc,   author = {Alphabet, A.},   year = {1990},   title = {Abc},   publisher = {My Publisher}, } \end{filecontents}  \begin{document}  I think that the model described in \cite{abc}, chapter 3.2, is awesome.  \bibliography{\library.bib} \end{document}


Install on Second Hard Drive with startup boot option?

In theory, what I want to do is very simple, but I've done some google research and read some posts on this site and I'm still confused.   I want to keep win7 on my primary C:\ drive, and install Ubuntu (12.10) on a secondary drive (that I have yet to buy or install. I just want to be certain that I'm successful when I do this). If at all possible I'd also like it if when I start the computer I have the option to boot either Win7 or Ubuntu, like an account log in type thing where I just pick which drive I'm running with that day. And just to reiterate, I do not want to partition my C:\ drive or alter, change, or affect my Win7 system in any way.  The reason I'm still fairly uncertain about all of this, is that a lot of the guides I've read have been for earlier versions of Ubuntu. Also the vast majority of guides are about partitioning one drive to fit both OS'. I want two separate OS running from two separate drives that I can pick at boot. The guides I did find mentioned that there is some issue with the grub being installed on C:\ but the rest of the OS being installed on the other drive. Is this still the case? How do I avoid that?  Also, if it helps, I've been running 12.04lts on my laptop for a few months now in and out of class and I love it.  Finally, if you could please point me to a guide or write your answer in the form of a guide for a two year old that'd be awesome. I'm still an Ubuntu novice and I don't want to mess up my win7.


Suppose $H$ is a hash function; why is $$H(k\mathbin\|H(k\mathbin\|m))$$ not secure?  See this . In there, indeed two keys are used and the mac algorithm is $$H(k_1\mathbin\|H(k_2\mathbin\|m)).$$ Why don't we use $$H(k\mathbin\|H(k\mathbin\|m)),$$ which has only one key?


In Windows 10, how can I move giant AppData folder to another drive?

People seem to think it's risky to do this.  But I'm trying to work with Android Studio which is enormous.  It's made my AppData folder literally 30 Gb with all the images of virtual machines and different versions of the libraries in the SDK.  I installed Android Studio itself on another drive, but it's still putting all its junk in AppData. My C drive is now full, and the only way I can imagine solving this problem without breaking Android Studio is if I can move AppData itself behind a symlink.  I saw instructions here :   But it suggests if I click on properties on the folder I'll find a move option. There's nothing like this on the properties pop up.  So. Is it possible? If so, how?  Is it dangerous / a bad idea? If so, what can I do about Android Studio which seems determined to use AppData rather than the directory where I put it.


How to programmatically set the front page?

I want to set the Drupal front page programmatically at run time. How can I do this? Is this possible?


It's cool to add a hyperlink in references like this:   I want to know how to add the blue box in bibtex. For example, the following article's link is "ee".   @inproceedings{DBLP:conf/osdi/DeanG04, author    = {Jeffrey Dean and            Sanjay Ghemawat}, title     = {MapReduce: Simplified Data Processing on Large Clusters}, booktitle = {OSDI}, year      = {2004}, ee        = {http://www.usenix.org/events/osdi04/tech/dean.html}, crossref  = {DBLP:conf/osdi/2004}, bibsource = {DBLP, http://dblp.uni-trier.de} }


How do I lower aura and increase taint level thaumcraft 4.1

I need to spread taint to an area where some is already growing


How can this English sentence be translated into a logical expression? ( Translating " unless")

You cannot ride the roller coaster if you are under 4 feet tall unless you are older than 16 years old.   Let:   $P$ stands for "you can ride the roller coaster" $Q$ stands for "you are under 4 feet tall" $R$ stands for "you are older than 16 years old"   Is this logical expression correctly translated?  $$P \rightarrow (Q \wedge R)$$


We have an Availability Group configured. Total number of nodes in the cluster is 3 (odd). All are in same subnet. Also we do have file share witness. Everything is working fine for now.  My question is: do we really need file share witness? And what should the ideal quorum configuration be?  As per my knowledge, it is not needed as we already have an odd number of nodes, so node majority quorum configuration should be fine and is recommended.  SQL Version: Microsoft SQL Server 2016 (SP2) Enterprise Edition OS Version: Windows Server 2016 Standard


Prefer fulfilling some requests over others

We have setup a server to run our rails 3 app.  Some of the webpages in our app have to process a lot of data and take a long time to complete, a few of them even take as much as 10 minutes to complete.  Our server is setup to only fulfill six requests at a time.  Occasionally, during peak usage, the server ends up getting bogged down for several minutes because the requests it is fulfilling are those that take a long time.  Almost every request that is capable of taking more than a handful of seconds has a route like domain/reports/some_thing.    So anyway, I was going through the , specifically sections 3.1.2 and 3.2, and was wondering if it was possible to configure the ApplicationPool to prefer some sessions over others when it is deciding what session to return to the RequestsHelper (primarily based on the request url being /reports/*)?  Probably only allowing 4 of the 6 processes to handle requests with a url like /reports/* would be ideal.  However, simply preferring all other requests above those with a url like /reports/* would probably be pretty practical.  P.S. I have only just started working with the server aspect of this application.  Let me know if there is an easier way, if you need more details, or very likely, if I'm asking about X...  P.P.S. I am going to be revisiting the pages that are slow in an effort to minimize the number of requests of this type that are made by implementing some things with a more client side approach and possibly by implementing a post/redirect/get structure for these pages as well, however, this will take time and will only make the issue less frequent...


Hello I wanted to build this serial to usb converter with ft323R, but I don't understand the small marked part on the left bottom. I found the same thing in other schematics too. I know where to connect gnd, but why is the line longer than it should be? And I don't know the Vcc part too. Thanks.


Unable to resolve unmet dependencies because /boot is full and apt install -f can't finish

I'm trying to install openvpn however I am running into a problem where Ubuntu is complaining about unmet dependencies:  [sudo] password for keith:  Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies:  linux-image-extra-4.4.0-71-generic : Depends: linux-image-4.4.0-71-generic but it is not going to be installed  linux-signed-image-4.4.0-71-generic : Depends: linux-image-4.4.0-71-generic (= 4.4.0-71.92) but it is not going to be installed  openvpn : Depends: libpkcs11-helper1 (>= 1.11) but it is not going to be installed E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).   When I try to run apt-get -f install I'm met with these errors:  dpkg: error processing archive /var/cache/apt/archives/linux-image-4.4.0-71-generic_4.4.0-71.92_amd64.deb (--unpack): cannot copy extracted data for './boot/System.map-4.4.0-71-generic' to '/boot/System.map-4.4.0-71-generic.dpkg-new': failed to write (No space left on device) No apport report written because the error message indicates a disk full error   If I run df -h I see the below:  Filesystem                    Size  Used Avail Use% Mounted on udev                          208M     0  208M   0% /dev tmpfs                          46M  5.2M   41M  12% /run /dev/mapper/temptus--vg-root  8.3G  6.7G  1.2G  86% / tmpfs                         228M  4.0K  228M   1% /dev/shm tmpfs                         5.0M     0  5.0M   0% /run/lock tmpfs                         228M     0  228M   0% /sys/fs/cgroup /dev/sda2                     473M  470M     0 100% /boot /dev/sda1                     511M  3.6M  508M   1% /boot/efi tmpfs                          46M     0   46M   0% /run/user/1000 /home/keith/.Private          8.3G  6.7G  1.2G  86% /home/Keith   As you can see, /dev/sda2 (/boot) is 100% used. I tried following , which does free up space in /boot, however when I remove old kernels and finally run apt-get -f install, the space required always increases more than what I cleared.  For example, if I manage to run apt-get -f install before removing kernels it tells me I need 66.4mb of free space. But if I remove a kernel (4.4.31 for example), it increases to 122mb of free space and wants to reinstall whatever kernel I removed.  Is there a way to forcefully remove kernels and have Ubuntu not reinstall after running sudo apt-get -f install?  Thanks!


How do I create a Windows Batch file that does not show the Command Prompt when executed?

I have installed a ruby gem called Redcar, which is launched from the command line.  When it runs, it steals the shell until it terminates, so I have to create a new shell window to continue doing command line work.  The shell I'm using is the GITBash shell from MySysGit.  I found a Redcar.bat file which is meant to launch Redcar as a shortcut, I presume, but I don't want the extra command prompt window to open whenever I launch the BAT file.    How do I just run the BAT without seeing the prompt?


How to use the built-in generic delegate `EventHandler` provided by the .NET Framework?

Generally, how shall I use the built-in generic delegate EventHandler<TEventArgs> provided by the .NET Framework? Specifically, I saw an example  Class MyEvent{     ...     public event EventHandler<MyEventArgs> SomeEvent;      ... }  Class EventDemo{      ...      void MyEventHandler(Object sender, MyEventArgs e){         ...     }      ...      myEvent = new MyEvent();      myEvent.SomeEvent += new EventHandler<MyEventArgs>(MyEventHandler);  }   Can    myEvent.SomeEvent += new EventHandler<MyEventArgs>(MyEventHandler);   be replaced by  myEvent.SomeEvent += MyEventHandler;   In particular, does new EventHandler<MyEventArgs>() try to convert the function MyEventHandler from one type to another type?   Thanks.


Radius of convergence of series if this particular condition is satisfied by coefficients

I was solving questions from my analysis assignment and couldn't solve this.  Let ${a_n}$ be a sequence of real numbers satisfying $\sum_{n=1}^{\infty} |a_n -a_{n-1}|<\infty$. Then the series $\sum_{n=0}^{\infty} a_n x^n , x\in \mathbb{R}$ is convergent  A) nowhere in $\mathbb{R}$ B) everywhere in $\mathbb{R}$ C) on some set containing (-1,1) D) only on (-1,1) The sequence $a_{n} =(1/2)^n$ satisfies condition and is convergent. So, A) is wrong. But how to contradict/verify other options? Is there any theorem which can be used?


How can I get the 'Make' command in Ubuntu with USB?

I want to start this off by mentioning that I am very new to using Linux, so I'm having a pretty hard time figuring this one out on my own.  Version: Ubuntu Desktop 18.04   I went out and bought a wireless card for this PC so that I can connect to my home internet, however the card will not just "Plug-and-Play." I did some searching online and came across some drivers as well as instructions for installing them via USB, but I seem to have run into an issue. The instructions state that I need to use commands such as "make",  Running the make command in the terminal returns the following:  Command 'make' not found, but it can be installed with: . sudo apt install make sudo apt install make-guile   and running sudo apt install make returns:  Reading package lists... Done Building dependency tree Reading state information... Done Package make is not available, but is referred to by another package. this may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'make' has no installation candidate   I can imagine I'd get this error for all other commands I try to run.  If it helps at all, I'm trying to follow instructions found  to install these drivers. I then did some searching online trying to find a way to get the 'make' command, but pretty much everything says that I will have to connect the machine in question to the internet. I'm looking for a way to either get the make command (and other commands that I will need for installing drivers) onto this PC, or a way to install drivers without using these commands.  Anything I put onto the machine will be coming from a Windows laptop to the Ubuntu machine via a flash drive. Again, I want to say, it is not possible for me to use an Ethernet connection at this time. Thanks in advance for any help you all provide :)


How to rsync files between two remote servers?

How can I rsync files between two remote servers?  I need to transfer files between two remote hosts, but it seems rsync doesn't support synchronization.    Some more information: I have 2 servers A and B, and there is no direct connectivity between A and B. So direct rsync is not possible. But I have a 3rd server from when I have uni-directional connectivity.. Like I have the connectivity from C to A and C to B.  So can anybody help me here to rsync the file from server A to server B by using mediator as C?  Thanks in advance.


calculation of the direct limit of groups

Suppose $\mathbb{Z} \overset{1}\longrightarrow \mathbb{Z} \overset{2}\longrightarrow \mathbb{Z} \overset{3}\longrightarrow \mathbb{Z} \overset{4}\longrightarrow\mathbb{Z}\longrightarrow\cdots$.  How to compute the direct limit of above groups?Does there exist a general method to calculate the direct limit of groups?


Is $0 \, \mathrm m = 0 \, \mathrm s = 0 \,\mathrm {kg} = 0$? How do we define $[0 \, \mathrm m]$?  I once was given an assignment where I was asked to deduce and write down some physical quantity. It turned out that this quantity was $0$ in one unit or another, so I decided to drop the physical units because I figured that it didn't matter anyhow.  But I got to thinking:  If $0 \, \mathrm m = 0$, then we could add units of different dimensions (an operation not normally defined) like so: $5 + 0 \,\mathrm m = 5$.   Does $[ \cdot ]$ map $0 \, \mathrm m$ to both $0$ and $L$? Is there an established regime of thinking about physical quantities as an abstract algebra? Perhaps as a vector space where formal sums such as $5 \, \mathrm m + 10 \, \mathrm s$ are allowed? Would it be improper to drop the units of measurement of $0 \,\mathrm m$ like this in an academic paper?