I have some issue with my code. I need to monitor CUPS server wich each printer is a thread:  public static void startCupsMonitor() throws Exception {      for (CupsPrinter cupsPrinter : PrintJobsUtils.getAllPrinters()) {         new Thread( new PrinterTask( cupsPrinter.getName() ), cupsPrinter.getName() ).start();     } }   As you can see, I start a Thread for each element in my List called at PrintJobsUtils.getAllPrinters (). So far, so good.  But I have a Modal (JDialog with setModal seted to true) with a JTable where it will be updated when a new Print Service arrives on CUPS server. So... I created a class who implemented the Runnable's interface and this stuff:  @Override public void run() {      CupsPrinter cupsPrinter;     PrintQueue printQueue = new PrintQueue();      try {         cupsPrinter = PrintJobsUtils.getPrinter( "http://"                                                      + ApplicationUtils.getApplicationProperties().getProperty( "cups.hostname" )                                                      + ":" + ApplicationUtils.getApplicationProperties().getProperty( "cups.port" )                                                      + "/printers/"                                                      + pName.toUpperCase() );           while (true) {              SwingUtilities.invokeLater( () -> {                 List<PrintJobAttributes> printJobAttributesList;                 try {                     printJobAttributesList = PrintJobsUtils.getAllJobDetails( cupsPrinter );                     if (!printJobAttributesList.isEmpty()) {                         for (PrintJobAttributes printJobAttributes : printJobAttributesList) {                             if (printJobAttributes.getJobState() == JobStateEnum.PENDING_HELD) {                                 printQueue.setVisible( true );                                 if (!ApplicationUtils.cotainsId( printJobAttributes, printQueueArrayList )) {                                     printQueueArrayList.add( printJobAttributes );                                      for (PrintJobAttributes jobAttributes : printQueueArrayList) {                                         printQueue.getDefaultTableModel().addRow( new Object[]{jobAttributes.getJobID(),                                             jobAttributes.getJobName(), jobAttributes.getSize()} );                                     }                                  }                             }                         }                     }                 } catch (Exception e) {                     e.printStackTrace();                 }             } );             Thread.sleep( 1000 );         }     } catch (Exception e) {      }   But this does not work properly. I expected the jtable filled but I got the error above and duplicated rows. So how can I do this? I tried SwingWorker but I had read this class can not be reused.  EDIT   I solved this issue using SwingWorker. Thanks all


How to separate shapefile by attributes into a bunch of new shapefiles?

I am trying to work with census block data at the moment, and I want each of the 4178 blocks making the entire state to be their own shapefiles. How can I do this without having to manually query or iterate through each feature and turn each census block into a shapefile with the "Extract Data" function?


For an android application, I need a regular expression that will match only a legal name.  Legal name, in my terms, is that it should always contain a first name and a last name. It should not only contain a single name.  For example, regex should match the names,   Mike Harry Mike Harry Gary   should not match,   Mike Mike12 Mike - (contains a space before name) 12Mike Mike - (contains a space at the end)


Can't install any update and packages ubuntu 14.10

I am using ubuntu 14.10. I am trying to install all updates, but it's show me the following result:      The package system is broken      Check if you are using third party repositories. If so disable them, since they are a common source of problems.   Furthermore run the following command in a Terminal: apt-get install -f   Details:      The following packages have unmet dependencies:  gcc-4.9-multilib: Depends: gcc-4.9-base (= 4.9.1-16ubuntu6) but 4.9.1-16ubuntu6 is installed                   Depends: gcc-4.9 (= 4.9.1-16ubuntu6) but 4.9.1-16ubuntu6 is installed                   Depends: libc6-dev-i386 (>= 2.11) but it is not installed                   Depends: lib32gcc-4.9-dev (= 4.9.1-16ubuntu6) but 4.9.1-16ubuntu6 is installed                   Depends: libx32gcc-4.9-dev (= 4.9.1-16ubuntu6) but 4.9.1-16ubuntu6 is installed libc6-dev-x32: Depends: libc6-x32 (= 2.19-10ubuntu2.3) but 2.19-10ubuntu2.3 is installed                Depends: libc6-dev-i386 (= 2.19-10ubuntu2.3) but it is not installed                Depends: libc6-dev (= 2.19-10ubuntu2.3) but 2.19-10ubuntu2.3 is installed   Then I removed the third party repositories and run the command in terminal sudo apt-get -f install. But after all I got the following error:       dpkg: error processing archive /var/cache/apt/archives/libc6-dev-i386_2.19-10ubuntu2.3_amd64.deb (--unpack):  trying to overwrite '/usr/include/fpu_control.h', which is also in package libc6-dev-amd64 2.19-10ubuntu2.3 Errors were encountered while processing:  /var/cache/apt/archives/libc6-dev-i386_2.19-10ubuntu2.3_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)    So, now I need the person who can fix the problem. Great pleasure if you can help me to get out this problem. Please...


Why can class name not start with a number?

Attribute class and id names can have any value for the HTML syntax (), while instead for the CSS syntax they can not start for example with a number (): why?  What is the reason for this (uncomfortable) difference between two syntaxes that are daughters of the same "father" (w3c)?  I saw () that the limitation probably depends by a (regex) rule: I do not understand the reason for this rule, since the syntax the html4 managed to do without it (so I suppose that is not a insurmountable physical limit but perhaps unconventional)    $(".1abc").click(function(){   alert("OK with number too"); }); $(".abc").click(function(){   alert("OK"); }); .1abc {   border: 1px solid black; }  .abc {   border: 1px solid black; }
number

no number


I was wondering how I can center inline-blocks. Any help? I tried doing margin-top: x em; but all it did was have the image go down. This inline-block is deliberately inside an image block. If you have links that show me how to position inline-blocks, I will gladly take them into consideration, as I am still learning how to do CSS and HTML.    #img-banner article {   border: solid thick white;   box-sizing: border-box;   display: inline-block;   width: 14em;   position: static; }  #img-banner h1 {   font-family: 'Lobster', cursive;   text-align: center;   color: white;   font-size: 27px; }

Introduction


Fantasy novel where magic is granted by knowledge of words of power

Several years back, I was on a backpacking trip with a guy whose whole family were huge fans of classic SF/Fantasy.  One of the fantasy books he brought for the long car rides piqued my interest, but I've lost the name.  General things I remember:   It's part of a series It's not very recent (certainly not in the last 20 years)   In particular, the logistics of the magic system intrigued me, and is the main reason for wanting to reread the first book and find the later ones.  Magic is granted by knowledge of words of power, of which there are a finite number in the world.  Knowledge of multiple words of power is possible and grants access to various tiers of abilities:   One word grants somebody a knack for a particular skill.  I don't recall the specifics, but I seem to remember that these were extreme enough to guide somebody's path through life without thoroughly defining it Two words makes somebody an adept, who excels at the acquisition of new skills when intensively trained.  In the book, one example described is that an adept who trained for a day with a master swordsman would be his equal by the end of the day Three words makes somebody a sorcerer.  I have very little knowledge of what this does, since there was only a brief encounter with one (if any).  Knowledge of four or more words isn't brought up, AFAIK. Finally,  the power of a word is slightly diluted by the number of people who know it.  People who know words of power may form agreements to share with each other, but these nearly always ended in one member killing the other(s), as one person could slightly increase their power by offing the other guy   The final detail I remember is that there is a set of individuals who share a space in the world.  These people all know the same word of power, and therefore are all adepts (there is a musician, a stereotypical brute, and maybe a thief?), but only one of them exists in the world at a given time.  I seem to remember that these people could switch out if they reached a consensus.


For groups, does $G \times G \cong H\times H$ imply $G \cong H$?

By Remak's theorem, this is true for finite groups, and so any counter example would counter Remak so is probably nontrivial.


how to test the Rest Callout using Stub API

Hi Greetings for the day. using the below code ,I have test the Rest callouts by using Stub API .Test class has been completed with out failure but received code coverage Zero.how to test the Rest Callouts by using Stub API. Code: public class AnimalsCallouts {               public  HttpResponse makePostCallout() {         Http http = new Http();         HttpRequest request = new HttpRequest();         request.setEndpoint('https://th-apex-http-callout.herokuapp.com/animals');         request.setMethod('POST');         request.setHeader('Content-Type', 'application/json;charset=UTF-8');         request.setBody('{"name":"mighty moose"}');         HttpResponse response = http.send(request);         // Parse the JSON response         if (response.getStatusCode() != 201) {             System.debug('The status code returned was not expected: ' +                 response.getStatusCode() + ' ' + response.getStatus());         } else {             System.debug(response.getBody());         }         return response;     }         }   @isTest public class MockProvider implements System.StubProvider  {          public Object handleMethodCall(Object stubbedObject, String stubbedMethodName,          Type returnType, List<Type> listOfParamTypes, List<String> listOfParamNames,          List<Object> listOfArgs) {        system.debug('stubbedMethodName:'+stubbedMethodName);       if(stubbedMethodName == 'returnAcc'){           List<account> aa=new list<account>();           for( integer i=0;i<=10;i++){               Account a=new Account(Name='acc'+i);               aa.add(a);           }           return aa;       }             if(stubbedMethodName == 'makePostCallout'){                HttpResponse response = new HttpResponse();         response.setHeader('Content-Type', 'application/json');         response.setBody('{"animals": ["majestic badger", "fluffy bunny", "scary bear", "chicken", "mighty moose"]}');         response.setStatusCode(200);         return response;                      }       return null;    }          }   @isTest private class AnimalsCalloutsTest {  @isTest  private static void testPostCallout(){          AnimalsCallouts mockDS = (AnimalsCallouts) Test.createStub(AnimalsCallouts.class, new MockProvider());         HttpResponse res=  mockDS.makePostCallout();     system.debug('res:'+res);              } }


A hole of radius r is bored through the center of a sphere of radius $R > r$. Find the volume of the remaining portion of the sphere.    I'm not sure on how to approach this problem. What is the most difficult part is knowing how to set up the bounds of integration. Mainly, how does one set up the bounds either when regarding cylindrical shells or washers? How do we exactly arrive at this (is it the points in which we do the sum of the tiny elements of area $dA$)? Is there a "fool-proof" way of knowing the bounds?  I was trying to solve this problem using the washer method in terms of y, but I'm not sure on how to set up my bounds of integration.  Thank you very much for your help in advance.


Why is "birthday" one word as opposed to two? "Wedding day" or "graduation day" are two

A birthday is the day of your birth, much like graduation day and wedding day.  Why is birthday one word?


Phrase for when something only broken when you need it to work

Consider this scenario:     Your computer is broken, so you call tech support. When they arrive to fix the computer, the problem is no longer present and the computer works as intended. Shortly after they leave, the problem begins again.   In this example your computer is broken when you need it to work, and works when you need it to be broken. Is there a phrase that describes this? I know Murphy's Law comes close to describing it, but doesn't seem to fit very well.


I have very recently started learning about Generalised Linear Mixed Models and was using R to explore what difference it makes to treat group membership as either fixed or random effect. In particular, I am looking at the example dataset discussed here:      As outlined in this tutorial, the effect of Doctor ID is appreciable and I was expecting the mixed model with a random intercept to give better results. However, comparing AIC values for the two methods suggest that this model is worse:  > require(lme4) ; hdp = read.csv("http://www.ats.ucla.edu/stat/data/hdp.csv") > hdp$DID = factor(hdp$DID) ; hdp$Married = factor(hdp$Married) > GLM = glm(remission~Age+Married+IL6+DID,data=hdp,family=binomial);summary(GLM)  Call: glm(formula = remission ~ Age + Married + IL6 + DID, family = binomial,  data = hdp)  Deviance Residuals:  Min       1Q   Median       3Q      Max   -2.5265  -0.6278  -0.2272   0.5492   2.7329    Coefficients:               Estimate Std. Error z value Pr(>|z|)     (Intercept) -1.560e+01  1.219e+03  -0.013    0.990     Age         -5.869e-02  5.272e-03 -11.133  < 2e-16 *** Married1     2.688e-01  6.646e-02   4.044 5.26e-05 *** IL6         -5.550e-02  1.153e-02  -4.815 1.47e-06 *** DID2         1.805e+01  1.219e+03   0.015    0.988     DID3         1.932e+01  1.219e+03   0.016    0.987     [...]  DID405       1.566e+01  1.219e+03   0.013    0.990     DID405       1.566e+01  1.219e+03   0.013    0.990     DID406      -2.885e-01  3.929e+03   0.000    1.000     DID407       2.012e+01  1.219e+03   0.017    0.987     --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  (Dispersion parameter for binomial family taken to be 1)  Null deviance: 10353  on 8524  degrees of freedom Residual deviance:  6436  on 8115  degrees of freedom AIC: 7256  Number of Fisher Scoring iterations: 17   > GLMM = glmer(remission~Age+Married+IL6+(1|DID),data=hdp,family=binomial) ; m  Generalized linear mixed model fit by the Laplace approximation  Formula: remission ~ Age + Married + IL6 + (1 | DID)  Data: hdp  AIC  BIC logLik deviance 7743 7778  -3867     7733 Random effects: Groups Name        Variance Std.Dev. DID    (Intercept) 3.8401   1.9596   Number of obs: 8525, groups: DID, 407  Fixed effects:              Estimate Std. Error z value Pr(>|z|)     (Intercept)  1.461438   0.272709   5.359 8.37e-08 *** Age         -0.055969   0.005038 -11.109  < 2e-16 *** Married1     0.260065   0.063736   4.080 4.50e-05 *** IL6         -0.053288   0.011058  -4.819 1.44e-06 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  Correlation of Fixed Effects:          (Intr) Age    Marrd1 Age      -0.898               Married1  0.070 -0.224        IL6      -0.162  0.012 -0.033   > extractAIC(GLM) ; extractAIC(GLMM)  [1]  410.000 7255.962 [1]    5.000 7743.188   Thus, my questions are:  (1) Is it appropriate to compare the AIC values provided by the two functions? If so, why does the fixed effect model do better?  (2) What is the best way to identify if fixed or random effects are more important (ie to quantify that the variability due to the doctor is more important than patient characteristics?


How to run the same background worker and stop it inside a loop in C#

I performed a genetic algorithm that loops 10 times where each time I call the "FitnessFunction" function, I use a background worker to move an object on the topology and once it reach a specific point then I cancel that background worker and back to the "Genetic_Algorithm" function...  Unfortunately, I got the following error:  Cross-thread operation not valid: Control 'topology' accessed from a thread other than the thread it was created on...   What I have tried:  Run the background worker each time I call "FitnessFunction" function" which is responsible to stop it under a specific condition.


Link-only answers in Low Quality review - how are these (are these?) supposed to be dealt with?

About two weeks ago I performed some reviews from . Per my recollection, back then I commented on about 60-80 link-only answers.  Today, I  I commented from review queue.  As far as I can tell almost 40 posts remained unchanged. About 7-8 answers have been improved by their authors. The rest of commented posts may have been removed, but I can't tell how much because comments made to deleted posts disappear from the list at my profile page.  That so much of my comments appear to be in vain made me wonder how this review is expected to work? Was I supposed to check it later, maybe after a month or two, or three or more?  For the reference, below is a list of link only answers that did not change (full text quotes).


What do we call a person who cannot read people?

A person who has a low emotional IQ and is bad at reading people and decoding their expressions and body language. I don't think I need to give any statement for it.  Edit: They do not have any physical or mental disorders but more like lacking empathy but are not psychopaths. Looking for synonyms of 'socially illiterate'.


What is the internal working of the *args being passed as a parameter to a function

*args is used to pass variable number of arguments that is when the number of arguments not known beforehand. But how it is working when it is passed as a parameter to a function?  In the code how arg1 identifies the first element of the tuple and not the second one and in the similar way arg2 points to the second element of the tuple not the first or third one .Why?  I saw a plenty of resources in the internet which explains *args and *kwargs but none of them explains how do they work when passed as a parameter.  def some_args(arg_1, arg_2, arg_3):     print("arg_1:", arg_1)     print("arg_2:", arg_2)     print("arg_3:", arg_3)  args = ("Sammy", "Casey", "Alex") some_args(*args)


Maven: Running created Jar-File with depedencies

I've written a little Java command line tool, that I want to run by (for example)  java -jar myJarFile.jar de.my.path.MainClass arg0 arg1 arg2   For building the jar-File and managing the depedencies I am using Maven. Now I found out, that Maven does not include the depedencies of the POM-File in the Jar-File. So, when I run my jar-file, I get ClassNotFoundExceptions.. But to execute my jar-file I need those libraries in the classpath.  How can I manage this with Maven?  Thank you for your help!!


Trouble installing tp link tl-wn821N V5 on 16.04

I am trying to install the USB wifi adapter: tp-link TL-WN821N V5.  I found a  for the V5 version but it won't compile. In the manual of the Linux driver it is said that the driver is for: 14.04.01 with GCC v4.8.2. My Linux edition is Ubuntu 16.04 with GCC v5.3.1.  I’ve run lsusb but my USB adapter wasn't listed:  Bus 001 Device 004: ID 2357:0107 Bus 001 Device 003: ID 0781:5406 SanDisk Corp. Cruzer Micro U3 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 003 Device 002: ID 046d:c52e Logitech, Inc. MK260 Wireless Combo Receiver Bus 003 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub   I've run lsusb with and without the adapter plugged and without the adapter the line  The adapter works on Win 7 after installing the appropriate driver.  Bus 001 Device 004: ID 2357:0107   was missing.


How do I copy the normal axis orientation from a mesh face to an Empty hooked to the face OR a bone parented to the face?

EDIT: Ok, my question/explanation doesn't seem to be clear enough, so I'll try to restate my goal.  The end result I'm trying to achieve is to hook an empty or bone to each separated face, BUT using the face normal orientation so that the faces can be animated by each hooked empty/bone and the rotation will occur with respect to each face's normal.    I'm trying to find a way to rotate faces of a mesh on their normals. Currently it seems one needs to separate the faces to individual objects in order to control rotation from an empty/modifier/constraint. However once the faces are separated, and Transform>Origin to Geometry is called, the orientation is not based on the original normals of the mesh face.  How does one copy the original normal orientation of the mesh face to the separated object data?  Is there another way to control rotation of mesh faces (assuming the faces have first been separated within the mesh object)?  I should also mention that I'm wondering about a non-scripted solution, as I could probably figure out a script to do it, but was looking for simpler solution first. Feel free to post script solutions though if you want.  Ideally, a solution that allows mesh face rotation on the individual normals based on an external input without separating faces to objects would be preferable.


Why does reflection occur on transparent materials? For example, air/glass or air/water (two different interfaces)  Mostly it's refraction that's occurring, but I also see some reflection. Why is that?


How do I execute a command and get the output of the command within C++ using POSIX?

I am looking for a way to get the output of a command when it is run from within a C++ program.  I have looked at using the system() function, but that will just execute a command. Here's an example of what I'm looking for:  std::string result = system("./some_command");   I need to run an arbitrary command and get its output. I've looked at , but I have not found anything that will give me what I need.


Replace USB port on logic board Mac mini late 2012

The USB ports stopped working. I tried resetting NVRAM, and all non- physical solutions. It seems it is a hardware malfunction, so is it possible to replace the USB port only on the logic board of a  Mac mini Late 2012 - 2.3 ghz Core i7?


Disabled SIP, but still can't make changes?

Disabled SIP, but still can't make changes:  sh-3.2# id uid=0(root) gid=0(wheel) groups=0(wheel),1(dae…… sh-3.2# mkdir PAH-en mkdir: PAH-en: Read-only file system sh-3.2# csrutil status System Integrity Protection status: disabled. sh-3.2# pwd /System/Library/Input Methods/PressAndHold.app/Contents/PlugIns/PAH_Extension.appex/Contents/Resources   go up several levels (no ACLs or xattrs on intermediates)  sh-3.2# pwd /System/Library sh-3.2# cd ..;ls -lae@ | head total 0 drwxr-xr-x@   8 root  wheel   256 Oct 12 16:17 .     com.apple.rootless     0   0: group:everyone deny delete sh-3.2# cd ..;ls -lae@ | head total 0 drwxr-xr-x@   8 root  wheel   256 Oct 12 16:17 .     com.apple.rootless     0   0: group:everyone deny delete drwxr-xr-x   22 root  admin   704 Jan 30 11:54 .. -rw-r--r--    1 root  wheel     0 Aug 25 17:26 .localized drwxr-xr-x   39 root  wheel  1248 Oct 12 16:16 Applications drwxr-xr-x    5 root  wheel   160 Oct 12 16:11 DriverKit drwxr-xr-x  116 root  wheel  3712 Oct 18 00:55 Library drwxr-xr-x    3 root  wheel    96 Aug 24 15:20 Volumes sh-3.2# pwd /System   So the xattr says I cannot delete anything, but why can't I create something?  For that matter, if SIP only prevents delete when enabled, why is sudo mkdir rejected here when SIP is on?


Image of closed unit ball under a compact operator

Let $X,Y$ be Banach spaces and $A\in\mathcal L(X,Y)$ . The task is to prove the following:  $A$ is compact if and only if the image of the closed unit ball in $X$ is compact in $Y$.  I have proven this when $X$ is a reflexive space.  Proof. Let $X$ be a reflexive space, $\bar B$ the closed unit ball in $X$, and $A$ a compact operator. Let further $y_n=Ax_n$ be a sequence in $A(\bar B)$.  In reflexive spaces $\bar B$ is weakly compact, so there exists a subsequence $x_{n_j} \to x$ weakly.  Because $A$ is compact, $Ax_{n_j}\to Ax$ strongly.   On the other side, $A(\bar B)$ is relatively compact, so there exists $z_k=Ax_{n_{j_k}}$ that converges strongly to $y\in Y$.  But $z_k\to Ax$ strongly. So by unicity of the limit $y=Ax$ and the image is compact.  It's easily proved that if the image is compact, the operator is also compact.  But I don't know what to do in case of nonreflexive spaces. Is there any counterexample or proof in such case?


Does an equivalent of ArcScripts exist?  I know of the the ArcGIS resource center and "Code Galleries" but does something that equates to ArcScripts where users share useful ArcGIS code exist? The new ArcGIS forums are not great for searching for code either.  It seems to me as through the ESRI replacement for ArcScripts are a poor replacement and I am wondering if something 3rd party exists.  I know we can still search ArcScripts but it does not appear to still be an active repository.


How to cure extremely messed up resolutions on Ubuntu

I have just now installed nvidia drivers on my Ubuntu box and realized that the resolutions are very very messed up. On windows which is supposed to share the PC with Ubuntu the screen operates flawlessly at a resolution 1600x900 whereas on Ubuntu the resolution is (Spoiler: Its not gr8) 1024x768. I am using a samsung sync-master 2033 monitor connected with a VGA cable for my primary and only monitor. My mind and eyes alike would appreciate any help. Thanks in Advance.  Bonus fact: when I used Xorg and not proprietary drivers I could achieve higher resolution using xrandr but now when i use the commands it (the terminal) says:  xrandr --addmode VGA-0 1440x900_60.00                                  !103 X Error of failed request:  BadMatch (invalid parameter attributes)   Major opcode of failed request:  140 (RANDR)   Minor opcode of failed request:  18 (RRAddOutputMode)   Serial number of failed request:  33   Current serial number in output stream:  34 here


Let $R$ be a ring such that   $$ x^2-x \in C(R) \quad \forall x \in R,$$   where $C(R)$ is the center of $R$. Prove that $R$ is commutative.   I cannot find any route to proceed. How can I start? Please give hints instead of full solution.


Should yes/no dialogs also have a cancel?

I remember once reading an article that said whenever you present a messagebox with a Yes/No choice, you should always also provide a Cancel button, even if it does the same as No.  The rationale was that if the users know that Cancel is always the "safe" button to click if they don't understand why the message box was displayed, or are confused by the question.           – Wireframes created with   I've followed this advice for years (even though I can no longer remember where I originally heard it), but a number of people have complained about it, saying that they would prefer a simple Yes/No.   So now I am wondering whether it is (or ever was) in fact best practice. If a message box presents a Yes/No choice, should it also offer Cancel (in the case where Cancel and No have the same effect)?


latex places figures on the last page instead of [h]

Code:  \documentclass[12pt,oneside,a4paper,bibliography=totoc,captions=figuresignature]{scrartcl}  \usepackage[left=3cm,right=2cm,top=2cm,bottom=2cm,includeheadfoot]{geometry} \usepackage[ngerman]{babel} \usepackage[utf8]{inputenc} \usepackage[dvipdfmx]{graphicx} \usepackage{moresize} \usepackage{pstricks-add} \usepackage{amssymb} \usepackage{setspace}  \usepackage{mathtools} \usepackage{stmaryrd} \usepackage{textcomp} \usepackage[normalem]{ulem} \usepackage{booktabs} \usepackage{multirow} \usepackage{siunitx} \usepackage{amsmath} \usepackage{tikz} \usepackage{bmpsize} \usepackage{subcaption} \usepackage{float}  \renewcommand{\figurename}{Tabelle} \newcommand{\ra}[1]{\renewcommand{\arraystretch}{#1}} \setkomafont{sectioning}{\rmfamily\bfseries}  \begin{document} \begin{titlepage} \thispagestyle{empty} \begin{center} \textbf{\LARGE Wie prägt der sozioökonomische Status die} \vspace{1cm} \textbf{\LARGE Persönlichkeit eines Kindes?} \vspace{5.5cm} \large Bachelorarbeit zur Erlangung des Grades \\ \vspace{0.75cm} Bachelor of Science (B.Sc.) \\ \vspace{0.75cm} Topic \\ \vspace{0.75cm} Uni \vspace{5.5cm}  Themenstellerin: Professor \vspace{2cm}  vorgelegt im Juni 2017 von: \\ Name \\ Matrikelnummer: 5555555 \end{center} \end{titlepage} \onehalfspacing \newpage \thispagestyle{empty} \tableofcontents \newpage \pagenumbering{arabic} \section{Einleitung} \subsection{Ökonomische Präferenzen und IQ} \newpage \begin{figure}[h]    \caption{Standardnormalverteilungen der ökonomischen Präferenzen}      \begin{subfigure}[!htp]{0.5\textwidth}       \includegraphics[scale=0.69]{zeit.eps}        \subcaption{Zeitpräferenzen}             \label{subfig:time}    \end{subfigure}\hfill%    \begin{subfigure}[!htp]{0.5\textwidth}        \includegraphics[scale=0.69]{risiko.eps}        \subcaption{Risikopräferenzen}             \label{subfig:risk}    \end{subfigure}\\[9.757pt]%    \centering     \begin{subfigure}[!htp]{0.5\textwidth}        \includegraphics[scale=0.69]{altru.eps}        \subcaption{Altruismus}             \label{subfig:alt}    \end{subfigure}     \label{fig:pref} \end{figure} \addtocounter{figure}{-1} \newpage  Zur Quantifizierung des IQ des Kindes wird ebenfalls ein Proxy verwendet. Hierzu wird auf die vom Kind zuletzt erreichte Note in den Fächern Mathematik und Deutsch zurückgegriffen. Die Ergebnisse der Mathe- und Deutschnote wurden standardisiert. In Abbildung 2 sind die Histogramme der Mathenote (a) und Deutschnote (b) zu sehen.  \begin{figure}[h]    \caption{Standardnormalverteilungen der Mathe- und Deutschnoten}      \begin{subfigure}[!htp]{0.49\textwidth}        \includegraphics[scale=0.69]{mathe.eps}        \subcaption{Mathenoten}             \label{subfig:mat}    \end{subfigure}    \begin{subfigure}[!htp]{0.49\textwidth}        \includegraphics[scale=0.69]{deutsch.eps}        \subcaption{Deutschnoten}             \label{subfig:ger}      \end{subfigure}     \label{fig:grades} \end{figure}  \end{document}   Not sure whether I've posted it appropriately. My issue is the placement of the figures (subfigures). They are on the last page and not where they should be. In this example I am using [h] but I've also tried [!h], [!htp] and so on. Anyone an idea what I am perhaps doing wrong? Many thanks in advance!


How to run debian.iso on Windows using qemu?

I have debian.iso + windows 7 and qemu. I don't know windows absolutely. How can I run debian.iso using qemu? What command I need to use for running debian?


Does removing an application from Software Center do a remove or a purge

When I remove an application already installed through the Software Center. Does it remove the app the same way as doing a purge to it (aptitude purge) or does it remove it like a "remove" (aptitude remove).


Is it possible to save every webpage you visit?

Is it possible to save everypage you visit in a browser automatically? I do now want to rely on Cache as a huge cache will slow down the browser. A third party software or an add-on will be helpful.  I use Chrome browser, but any other browser which can help me in my requirement is okay.


What do you call someone who does good things for selfish reasons?

Like someone who donates to charity not because they actually want to donate, but so that they can feel good about themselves.  Is there one specific word to describe that someone? Or is there just not one accurate word for that?


Preserve systemctl colors while redirecting to a file

My Linux server is running  (RHEL/CentOS/Debian/Ubuntu...).  I would like to redirect the output of systemctl list-dependencies to a file, but I want to preserve the ANSI colors (red or green according to the service status).  Unfortunately, as soon as I redirect/filter/pipe the output to a file, the color are gone:  systemctl list-dependencies --no-pager > /tmp/out   Unfortunately, systemctl doesn't seem to have an option like ls --color or grep --color=yes.  How can I do ?


Find the sum of the following series: $ \frac{1}{1 \cdot 2}\,+\,\frac{1}{2 \cdot 3}\,+\,\frac{1}{3 \cdot 4} +\cdots\,+\frac{1}{100 \cdot 101}$


Could anyone suggest a book which would be the equivalent of "Counterexamples in Analysis" for set theory? That is to say, I am looking for a book which would elaborate on the important examples and misconceptions in set theory. Per say, an example of poset which is lattice and but not complete, etc.


Matrix with zeros on diagonal and ones in other places is invertible

Hi guys I am working with this and I am trying to prove to myself that n by n matrices of the type zero on the diagonal and 1 everywhere else are invertible.  I ran some cases and looked at the determinant and came to the conclusion that we can easily find the determinant by using the following $\det(A)=(-1)^{n+1}(n-1)$. To prove this I do induction  n=2 we have the $A=\begin{bmatrix} 0 & 1\\  1 & 0 \end{bmatrix}$ $\det(A)=-1$ and my formula gives me the same thing (-1)(2-1)=-1  Now assume if for $n \times n$ and $\det(A)=(-1)^{n+1}(n-1)$  Now to show for  a matrix B of size $n+1 \times n+1$. I am not sure I was thinking to take the determinant of the $n \times n$ minors but I am maybe someone can help me. Also is there an easier way to see this is invertible other than the determinant? I am curious.


If an undergrad maths student publishes a paper in renowned journals, then will he be able to get chance in top universities?

My grades are average and I want to study mathematics in top institutions like cambridge, princeton etc. If I am able to publish a paper in mathematics in high impact journals, then will it be possible to pursue a research career from best universities?


How does a bikerider turn by leaning on one side?

I am trying to understand the following image:   Could someone please help me understnding it. What I understood so far: Your angular velocity mutyplied by the impulse gives you the impulsemoment. By applying the right hand rule, you know the impulsemoment-vector is oriented to the left.  When you lean to the left the normal force and gravity force combined create a torque which is a pure moment. The vector of this moment is oriented to the rear of the bike (applied the right hand rule).  I think -and hope- so far my explanation is correct. However when I apply it to a real situation it gives quite strange results:  on the first image it seems even as if you go backwards and turn to the left, in stead of going straigh forward and turning to the left. And the second image yhea... seems completely proposturous


How to disable the Mount notification in Gnome 3.4?

How to disable those annoying notifications when you plug a new disk in, or connect to a network and so on....  I know that if I add a device to a mount script they will be mounted on boot thus not showing me the notification, which I did for my hard drives, but it doesn't help with all those flash disks I have... I can't add them all that would be silly.  I looked at:    ... but they didn't help, since the code was different  I also looked at configuration editor, but I think it can only disable auto-mount when inserted, it doesn't disable notification...


I have installed the recommended version of forge and I have installed a mod but it still wont let me play and I've been told to go into my mods folder but I don't have one


Number of Necklaces of Beads in Two Colors

I was reading , and came across an equation which gives an expression for the number of necklaces of beads in two colors, with length n.  $Z_n = \dfrac{1}{n} \displaystyle \sum \limits_{d \mid n} \phi \left( d \right) 2^{n/d}$  The author says that this equality is well known, and cites Golomb and Riordan as examples.  However, I do not have access to these cited works.  I was curious, what is the proof of this equality?  Is it generalizable to necklaces with an arbitrary number of colors?  Related Questions (that do not answer my question explicitly):


I am using LaTeX to write my dissertation, and I have realised that on the table of contents and on every chapter page, LaTeX leaves a lot of empty space.  What I mean is that lets say in the page where chapter 1 begins, from the top of the page until the chapter title there is much more vertical space than on any other page. The same goes with chapter 2 etc... and for contents page as well.   Can anybody help me to remove that space? Is there any mistake in my code or something like that? Is this a default of LaTeX?  the preamble is  \documentclass[12pt,twoside]{report} \pagestyle{plain} \usepackage{a4paper} \usepackage{setspace} \doublespacing  \usepackage{amssymb} \usepackage{amsmath}    I've tried the methods below, but none of them work properly.


What is the difference b/w using ` and not using in mysql query

e.g. query is   SELECT `username`, `uid`,`email` from profile  and `id`='0';   and   SELECT username, uid,email from profile  and id='0';   both will yeild same result. so why we should use or not use ` in mysql query.


Invalid package name due to Bash array dereference

I'm trying to build Emacs from sources. When configure options were listed without an array Emacs configured properly. When I added a Bash array to add optional options it broke configure. Here is the broken array:  BUILD_OPTS=('--with-xml2' '--without-x' '--without-sound' '--without-xpm'     '--without-jpeg' '--without-tiff' '--without-gif' '--without-png'     '--without-rsvg' '--without-imagemagick' '--without-xft' '--without-libotf'     '--without-m17n-flt' '--without-xaw3d' '--without-toolkit-scroll-bars'      '--without-gpm' '--without-dbus' '--without-gconf' '--without-gsettings'     '--without-makeinfo' '--without-compress-install')  if [[ ! -e "/usr/include/selinux/context.h" ]] &&    [[ ! -e "/usr/local/include/selinux/context.h" ]]; then     BUILD_OPTS+=('--without-selinux') fi      PKG_CONFIG_PATH="${BUILD_PKGCONFIG[*]}" \     CPPFLAGS="${BUILD_CPPFLAGS[*]}" \     CFLAGS="${BUILD_CFLAGS[*]}" CXXFLAGS="${BUILD_CXXFLAGS[*]}" \     LDFLAGS="${BUILD_LDFLAGS[*]}" LIBS="${BUILD_LIBS[*]}" \ ./configure --prefix="$INSTALL_PREFIX" --libdir="$INSTALL_LIBDIR" \     "${BUILD_OPTS[*]}"   When configuring with the array it results in:  configure: error: invlaid package name: xml2 --without-x --without-sound --without-xpm --without-jpeg --without-tiff --without-gif ...   I've been through  but I don't see what I am doing wrong. Changing to double quote and no quote did not help.  What is the problem and how do I fix it?


Simplify $\prod_{k=1}^5\tan\frac{k\pi}{11}$ and $\sum_{k=1}^5\tan^2\frac{k\pi}{11}$

My question is:  If $\tan\frac{\pi}{11}\cdot \tan\frac{2\pi}{11}\cdot \tan\frac{3\pi}{11}\cdot \tan\frac{4\pi}{11}\cdot \tan\frac{5\pi}{11} = X$ and $\tan^2\frac{\pi}{11}+\tan^2\frac{2\pi}{11}+\tan^2\frac{3\pi}{11}+\tan^2\frac{4\pi}{11}+\tan^2\frac{5\pi}{11}=Y$ then find $5X^2-Y$.  I couldn't find any way to simplify it. Please help. Thanks.


Peano/Presburger axioms - "find" numbers lower or equal than another number

[EDIT/CONCLUSION] It turns out it was actually working.. I was just like too stupid to let the prover run for more time and assumed it would take a lot / not be able to prove with what I've provided because it wasn't doing it fast and because it took it ~1 minute with a similar goal asking for numbers lower or equal than 1. However, the goal I gave as an example in this post (leq(x,2)) took ~1 minute as well and for leq(x,5), it was actually able to prove it faster I think (~40 seconds if I recall correctly). Thank you very much to everyone who helped!!  [EDIT:] I apologize for not describing my axioms properly.. I have now written them so as they pretty much resemble what I actually wrote.  Hello and Happy New Year,  I am trying to define natural numbers in order to use them in a First-Order Logic Theorem Prover. The problem is I'm unable to solve the following problem:  "Show that the only numbers lower or equal than (for example) 2 are 0,1 and 2".  My axioms go like this:  $$nat(0)$$ $$\forall x( nat(x) \to nat(s(x)) )$$ $$\forall x,y( (nat(x)\land nat(y)) \to nat(add(x,y))$$ $$\forall x( nat(x) \to (s(x) \neq 0) )$$ $$\forall x,y ( (nat(x) \land nat(y)) \to ( (s(x)=s(y)) \to (s=y)))$$ $$\forall x( (nat(x)\land x\neq 0) \to (\exists z (nat(z) \land (x = s(z)))))$$ $$\forall x(nat(x) \to (add(x,0) = x))$$ $$\forall x,y((nat(x)\land nat(y)) \to (add(x,s(y)) = s(add(x,y))))$$ $$\forall x,y((nat(x)\land nat(y)) \to ((leq(x,y) \leftrightarrow (\exists z(nat(z)\land (y = x + z) )))))$$  I have also added addition axioms for commutativity and associativity of addition.  So, what I'd like to be able to prove is something like this (for any number, not just for $2$):  $ \forall x(nat(x) \to (x\leq 2 \to (x = 0) \lor(x=1)\lor(x=2))) $.  Are additional axioms needed in order to be able to prove this?


SQL Server Max Memory not limiting use of RAM

I would like your input on this. I have a sql server 2008r2 Ent. Ed. 64bit with 16 cores and 64GB RAM. There is one instance of SQL server patched fully as of 20111014.  The max ram is set to 60000MB. Amount of free ram is 0 according to task manager after a few days online.  If I change the max ram to below 53GB it will after a few days to stabilize and have some free ram.   It is the sql process that does allocate the ram according to task manager. How do i come to terms with what the problem really is? It goes without saying that i did alot of testing already but havn't solved this to my liking yet. and ohh we do not get the typical memory starvation lagging when the available ram is down to 0 free.  Update 1:  Inspired by another Q/A related to RAM on this page  . I used these two to see what the RAM is being used for.  SELECT TOP ( 10 )         [type] AS [Memory Clerk Type] ,         SUM(single_pages_kb) AS [SPA Mem, Kb] FROM    sys.dm_os_memory_clerks GROUP BY [type] ORDER BY SUM(single_pages_kb) DESC OPTION  ( RECOMPILE ) ;  SELECT  DB_NAME(database_id) AS [Database Name] ,         COUNT(*) * 8 / 1024.0 AS [Cached Size (MB)] FROM    sys.dm_os_buffer_descriptors --WHERE   database_id > 4 -- system databases --        AND database_id <> 32767 -- ResourceDB GROUP BY DB_NAME(database_id) ORDER BY [Cached Size (MB)] DESC OPTION  ( RECOMPILE ) ;   The amount used shown by these are  first select 7948432    Kb second one 44030,57812  MB that is a total of about 52GB used by sql server... so where did the rest of my RAM go? :-) Task manager show right now cached 363, available 401, free 40 and sqlservr.exe has Memory private set 64 459 656. Max Ram set to 60000MB as before.


Will deleting my question also remove the reputation awarded to answerers?

One of my questions got closed, as it was very similar to some other posted questions (though I don't feel the linked questions answered what I was trying to ask).  There's no point to the question staying online, as it doesn't answer anything, so I was going to delete it - but if I do that will it remove the reputation of the helpful answerers I want to upvote?


Increased file size while copying from windows to ubuntu

I copied few video files in mkv format from windows to ubuntu. In windows the size of files is shown 20GB and in ubuntu it shows 21.6GB. what can be the reason for this difference in file size?


For example, in plain.tex and in hyrules.tex (package hyplain) we find such code:  \chardef\active=13 \catcode`\~=\active     \chardef\myh@us@catcode=\the\catcode`\_ ... \catcode`\_=\myh@us@catcode   Are there any other ways to store a number and why this way is preferable to others?


Building attribute table in 3-band raster using ArcGIS Desktop?

I have a 3-band (RGB) raster file from CORINE and the attribute table hasn't been built. When I try to execute the command BuildRasterAttributeTable I get an error that only single band rasters are allowed. What should I do to get the attribute with the land uses?  Error Message:     ERROR 000423 Only single band integer raster dataset is a valid input


sorry for reposting.  I dont get why it is such a good idea to plot the logarithm of the form factor vs $Q^2$ in Guinier plots. It seems arbitrary to me.


Meta Stack Exchange seems to have different rules and user behavior than the "regular" Stack Exchange sites.  How is it different?    Individual questions answered below:                Related


What is happening here while post/pre decrementing a char variable in C

I was solving some multiple choice C codes from a book. Two of the questions involve pre decrementing, post decrementing a char variable initialised at 0. The output for both these is very different. I dont understand whats going on there.   Code 1  char i=0; do {     printf("%d ",i); }while(i--); return 0;   The output for this snippet is 0.  Code 2  char i=0; do {     printf("%d ",i); }while(--i); return 0;   The output is for this one is 0,-1,-2,.....-128,127,126,......1 .  Can anyone explain why this is happening?


How to place an image at the right top of a document?

I've been learning LaTeX and this community has been very helpful. Currently, I'm trying to set up corporate letters but as a newbie I'm encountering a  of , so I'm posting them one by one instead of putting it in the comments... maybe this helps others as well.  Anyway, I am trying to implement this  that indicates that I can use vbox to float an image to the right of my header. I almost have this working, but I now try to adjust this to get my logo to stick to the top of the page. So I want to have this at the right top of my document. This is quite difficult! When I place the vbox, it creates unwanted spacing, for some odd reason. So I can not get the logo to be at the right top, even though I 'reset' every possible margin to 0 (in my opinion). Here is my distilled code:  \documentclass[a4paper]{article} \usepackage{graphicx} \graphicspath{{./img/}} \usepackage{color} \usepackage{xcolor} \definecolor{orange}{HTML}{DD4616} \definecolor{white}{HTML}{FFFFFF} \usepackage{fullpage} \usepackage[margin=0cm, paperwidth=215.9mm, paperheight=30mm,top=0cm]{geometry} \parindent=0pt  \begin{document} \fboxsep0pt  \pagecolor{orange}   \fbox{\vbox to 0pt{\hfill\fbox{\includegraphics[height=3cm]{logo}}}}  \end{document}   I've used a full black logo for illustrative purposes. Here you can see this:    The black line is the vbox border. For some reason, it jumps down. The only way to get rid of this that I found out about is this:    Which means that I need to add:  \edef\theprevdepth{\the\prevdepth}\nointerlineskip \vbox to 0pt{...}\prevdepth=\theprevdepth   But there are two problems with this:   I get an error with I try this (Improper \prevdepth.) More importantly, I really want to understand my code at this point, and get to master the basics of positioning elements. This feels overcomplicated and I do not understand it at all.    Is there any easy way to position an image at the right top of a document?


I want to prepare my presentation's outline page look like . But, I can't figure out how to use square bullets and the font that slide uses. Can someone please be of my help?


I cant find my .minecraft folder anywhere, i already went to %appdata% and roaming, and I also tried doing **%appdata%.minecraft** in run but I dont have it. Can anyone help me ? I play minecraft.


What to do (if something) when someone gets your paper wrong

What would be the best approach when a paper gets published referencing a work of yours, with a wrong explanation/assumption.   E.g.     "The tube lines by [the Mayor of London, 1863] are OK, but can only   used on Tuesday, so in this work we traveled by cab".   This is clearly a wrong statement, probably formulated due to lack of information. What should one do in these cases, if you were the Mayor of London?  My hunch says just ignore it, but I assume that for young researchers like me (unlike the Mayor of London) this can have a bigger impact, as if the first few references to our work are stating something wrong, people may actually stop using the tube.


I came across this question:   If a point $a$ and a compact set $B$ have $d(a,B)=\inf\{d(a,b):d\in B\}=0$, does it mean $a$ is in the closure of $B$? If it is, can we say since $B$ is compact, its closure is itself so $a$ is also contained in $B$? Any help is appreciated.


Counter Mode: how to choose the nonce part of the counter?

Suppose:   The "counter field" is about: NONCE || CTR-VALUE. I have multiples messages $M_a, M_b, M_c, \dots$ Each message can be divided into x-bits blocks ($M_{a1}, M_{a2}, M_{a3}, \dots$).   Each message $M$ (for instance $M_a$) is encrypted following a randomly and uniquely generated key. In this case, does I really need the NONCE part of the "counter field" ? If I really need a nonce, and knowing that each key is again unique-per-message, is there a secure way to derivate the nonce from the key ?


Amortized Running Time of Insert and Get for Java's HashMap

I'm having trouble conceptually understanding the fact that the insert and get operations have an amortized running time of O(1) in Java's Hashmap (simplified to a hash table). Note that in my example the table is created at maximum capacity, meaning it will only need to be expanded one time, when the load factor of 75% is met. Get will also never be called on an invalid target.  Amortized running time is calculated via O(total cost)/operation count.    For insert, an element is added to the bucket corresponding to a particular slot in the hash table. As the newest value is always added to the end of the bucket, the values for this are:   Total cost = find bucket + place at end of bucket, all O(1) time Number of operations = find bucket + place at end of bucket Therefore, Amortized Running Time = (find bucket + place at end of bucket)/(find bucket + place at end of bucket), or O(1)   The only aspect that confuses me here is if the added element places the table over its load factor, resizing it. What steps would Java perform here, and why would it remain O(1) Amortized Running Time?    For get, the time to find a bucket is constant, and finding a match could take anywhere from 1 operation (target is the first value in the bucket) to n operations (all entries are in the same bucket and the target is at the bottom). In this case:   Total cost = find bucket + number of steps to find target in bucket, all 1 time unit Number of operations = find bucket + number of steps to find target in bucket Therefore, Amortized Running Time = (find bucket + number of steps to find target in bucket)/(find bucket + number of steps to find target in bucket), or O(1)     This is my attempt to apply the amortization thought process to these operations, but as I'm fairly new to the concept, I'm not sure whether my logic is correct, and was hoping to get some feedback as to whether a) I'm right or b) where I'm going wrong. Any help is appreciated.


Evaluate $\int\frac{\sqrt {25 - x^2}}{ x^4}$

I'm pretty sure the method used is trig substitution. But I'm having trouble setting up and solving the problem.


I need to set up a MySQL database with a maximum number of tables which can be created in it.  For example, if I have my maximum at 5 tables for a single database, and someone attempts to create a 6th table, an error will be raised.  Also note that this restriction can not affect other databases. For example, database 1 can have a max of 5 tables, and database 2 can have 10 tables, and database 3 can have unlimited tables.  Any help would be greatly appreciated. Thanks!


Any drawbacks for using same time zone configuration in Data Centers across time zones?

I operate almost entirely in one time zone. Supposing a Data Center in another time zone, it would make sense to configure the machines in that data center to use my time zone, and not local.  Are there any drawbacks to this approach?  EDIT: My assumption is that all the devices use UTC and then the time zone configuration comes into play at some points when applications are presenting time information to humans, i.e. logging.


How to make G++ preprocessor output a newline in a macro?

Is there a way in gcc/g++ 4.* to write a macro that expands into several lines?  The following code:  #define A X \ Y   Expands into  X Y   I need a macro expanding into  X Y


Why my touchscreen doesn't respond to a pencil?

I noticed my phone responds to my finger, but not to a plain graphite pencil.   Why is that, what is its physical reason?  How are styli able to approximate the human touch? What kind of conductive materials are being used there?


"unexpected EOF while looking for matching `)'" - when trying autocomplete

Whenever I start typing in a command which uses $(  ) expansion, and I press tab while typing in the inner command, I get an error:  unexpected EOF while looking for matching `)'   Thus, for example, I might see:  $ echo $(echo hbash: unexpected EOF while looking for matching `)' bash: syntax error: unexpected end of file   on my terminal. Where is bash encountering the error? How can I determine which file?  Notes:   I've recently installed a new (and incompatible) distribution but have kept my home directory, so some settings/files are bound be messed up. In case it helps, I'm now on Devuan Ascii.


Story where space explorers find a planet that turns out to be Earth

I probably read it in the 80s or early 90s.  I believe it was a short story, but almost definitely not more than a novella. Explorers come across a planet.  I believe there may be some conversation about "green plants" being weird, but that is fuzzier.  They discover a nomadic human-looking natives and track the migration path to a large concrete edifice.  They travel down to the structure and discover that it is a memorial of the launch of a colony ship and that this planet is actually the lost Earth.


How to parse a Generic XML File in C# to create a Table in SQL Server database

I have this Generic XML file, I want to parse it so I can create a SQL server table according to the XML data : <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="Student">   <xs:complexType>     <xs:sequence>     <xs:element name="Id" type="xs:integer"/>     <xs:element name="Name" type="xs:string"/>     <xs:element name="City" type="xs:string"/>     </xs:sequence>   </xs:complexType> </xs:element> </xs:schema>  I want to recover the following data: Student,   Id / integer  Name / String  City / String  Student will be the name of the table, and Id, Name and City are the columns. All I need is how to parse the XML file and recover the data.


Is it possible in ZFC that you have a cyclic containment of sets, e.g., a inclusion like $A \in B$ and $B \in A$?  I never took set theory classes, I am just curious.


Why did my answer become community wiki when I edited it the first time?

I recently gave one answer, and when I edited my  just once, it became community wiki.   I know that if we edit our post many times, that post will become community wiki.  I just want to know why my answer became community wiki in one edit.  I also want to know exactly when a post will become community wiki.  Updated:  Can we earn bounties on community wiki questions?


Buffer capacitors' role in boost power supply design?

In the power supply design, there are always smaller value capacitors placed at the output.What is the main role played by these capacitors in the module? Check the screenshot attached and I am referring to C7.         – Schematic created using


Solving a functional relation $f\left( x \cdot f(y)\right)=x^2 \cdot y^a$

I have this functional relation - $$f\left( x \cdot f(y)\right)=x^2 \cdot y^a$$ which I am trying to solve.   I put $x=1$, then I put $f(y)=\dfrac{1}{x}$. I also tried out $y=f^{-1}(1)$, but it doesn't seem to work out. Please help me out. Thank you.


Bijection between $\mathbb N \times \mathbb N$ and $\mathbb N$

Show that $\mathbb{N} \times \mathbb{N} \sim\mathbb{N}$.  I found a bijection such that $g(k,l): \mathbb{N} \times \mathbb{N} \to \mathbb{N}$ by  $$g(k,l) = {(k+l)(k+l-1) \over 2} - (l-1)$$  But I am having trouble showing that it is 1-1 and onto.  First I said let   $${(k_1+l_1)(k_1+l_1-1) \over 2} = {(k_2+l_2)(k_2+l_2-1) \over 2}$$  and I was trying to use that to show $k_1 + l_1 = k_2 + l_2$ but I don't know how to do that, and once I get there I'm not sure how to show that $l_1=l_2$ or $k_1=k_2$  for onto I said let $y \in k+l$.  Then $${y(y-1) \over 2} = y$$ so therefore $g(k,l)$ is onto.  therefore g is a bijection.


Two correlated marginally Gaussian RV, but not Jointly Gaussian

We know if two RVs are marginally Gaussian and uncorrelated, they can be not jointly Gaussian. How about two correlated RVs which are marginally Gaussian? Are they Jointly Gaussian or no, there are occasions when they are not Jointly Gaussian?


How to install Nvidia 9400m driver on El Capitan?

I have a Mid 2009 MacBook Pro that updated itself to El Capitan.  There are no drivers for El Capitan at the Nvidia site, only for Snow Leopard that work for 9400m Nvidia.  Is there any way i can install this package in El Capitan without breaking my OS?


i took some frozen fish out the freezer Tuesday night and sat it in a sink of water, how ever my parents decided to get pizza and i thought the put it up, but it sat in the sink over night and the next day (Wednesday) it sat in the fridge till the next day. i feel bad for wasting over is so i am wondering is it still good to bake or grill or to just dump out, ive already cleaned it and 10 mins ago? i need help on this.


What happens when you plug two sides of a cable to a single networking device?

What is likely to happen when you plug two ends of a network cable to a single switch/router? Will this create problems on the network, or just be ignored?


Applying for a new Schengen Visa even though there's still an existing used schengen visa

My mother had a Schengen visa, which she applied for at the Swiss embassy in India. Validity is for 6 months (01-Mar-2013 to 31-Aug-2013) with a single entry visa, She has already spent 88 days in Switzerland and came back to her home country (India), but wants to apply for another Schengen visa at the Swedish embassy in India; validity would be 90 days from 11-Aug-2013 with a single entry visa.  I've heard it's not possible to apply for a new Schengen visa until the old one expires. Is this true? What are her options?


How to Prove the triangle inequality which says for all x (no matter how big or small) and for all y (no matter its size) in the set of irrational+rational numbers, this holds: $|x+y| \leq |x|+|y|$


Exists continuous $f_n: [0,1] \to \mathbb{R}$ that converges pointwise, as $n \to \infty$, to $\chi_\mathbb{Q}$?

Does there exist a sequence of continuous $f_n: [0, 1] \to \mathbb{R}$ that converges pointwise, as $n \to \infty$, to $\chi_\mathbb{Q}$, the characteristic function of the rationals in $[0, 1]$?


Is there someone show me Why this is not true ?  $$-1=(-1)^1=(-1)^\frac{2}{2}=({(-1)}^{2})^{1/2}=\sqrt{1}=1$$  then :$$-1=1$$  Thank you for any help


Whats happening in memory when I use references in c++?

Let me start by saying that I understand pointers. I know what they are and how they work. But I know them because I visually imagine how they are being used in memory by saving the address of something else and so on.  I'm trying to find information online and I can seem to find any information on how references are treated.  Could someone either link or explain how they work having memory management in mind?  thx


I currently only have 1 user account on my ubuntu server. I would like to change the user name without creating another account. Is there a way to do this? Any help would be greatly appreciated.


When I copy a hard drive I often use the dd command I have one question about monitoring. To see the progress of the copy I do like this sudo dd if=$source of=$pathToUsb bs=4M conv=fdatasync status=progress  and I get the following message: 2969567232 octets (3,0 GB, 2,8 GiB) copiés, 22 s, 134 MB/s  if i want to retrieve only the number of bytes how can i proceed ? sudo dd if=$source of=$pathToUsb bs=4M conv=fdatasync status=progress > capture.txt 2>&1  I also tried this sudo dd if=$source of=$usb bs=4M conv=fdatasync 2>&1 | awk 'END {print ($0+0)}'  But it doesn't work Any ideas ?


I have a fraction I am trying to solve. I know the answer already, as Wolfram says it is $\frac{143}{300}$. The fraction is: $$\frac{5}{12} + \frac{3}{50} = \space ?$$ Please explain why and how your method works.


I was stupidly trying to clean the keyboard by taking out each key using a screwdriver as a lever, washing and subsequently drying them. Now only the power button works (MBA 2012). During the process, the screwdriver pierced through some of the plastic "button" (which in itself shouldn't be a problem I guess), and the sharp head (not always dry) touched the underlying board (which is not the motherboard) from time to time as well.  Now I'm planning to replace the broken part on my own, and found out two options. Either the keyboard alone, which isn't officially supported but cheaper, or the complete upper case. For the first option I'd need to make sure that it's really just the keyboard that's broken. Could anyone tell me roughly how likely it is the case from my description?  Thanks in advance.


Inbox messages and Achievements of a closed beta site still shown

I was Active in Arabic SE before it was closed days ago. Though I still see messages and achievements in my inbox that's related to it.  In deleted questions, all go hidden and that's good. Why not doing the same for Closed sites?    because this, the Android app is getting crash at every time I check inbox or achievements.


Does the Snap Shot feat allow AoOs outside of Threatened range against the target of Greater Trip?

Spawned from the comments in , does the Snap Shot feat allow AoOs outside of Threatened range against the target of Greater Trip?  Snap Shot:     While wielding a ranged weapon with which you have Weapon Focus, you threaten squares within 5 feet of you. You can make attacks of opportunity with that ranged weapon. You do not provoke attacks of opportunity when making a ranged attack as an attack of opportunity.   Greater Trip:     You receive a +2 bonus on checks made to trip a foe. This bonus stacks with the bonus granted by Improved Trip. Whenever you successfully trip an opponent, that opponent provokes attacks of opportunity.   The specific case cited has the ranger character making AoOs against enemies tripped by a partner with Greater Trip up to 1000ft away, but the question holds for much shorter distances. If a character has Snap Shot, and no other feats which increase their Threatened area, could that character make AoOs against a creature tripped with Greater Trip 30' away?


How to handle ever-increasing number questions pending closure in the review section

Ever since I gained 3000 rep on SO, I've noticed that the  has increased consistently. It must have been 2 or 3 months ago that I first got rep to start reviewing questions and I've noticed that number creep up from 50k to now almost 83k.  It's clear the number of questions pending more close votes is creeping up and there's literally thousands of questions that will never get touched but remain on the list. Every single other section of reviewable questions/answers stays low consistently.  How do we tackle the endless in-stream of questions with close votes?   I understand that it's common for a close vote or two to get slapped on a question and it gets left that way forever. Should we remove stale close votes that never ended up in an actual closure? Is SO prioritizing newer questions over old ones when you actually start reviewing those questions?  Maybe this isn't even an issue and I'm not seeing it. Let me know what your thoughts are!


A set containing more than half elements of a group

I wish to prove the exercise which states that for a set $A$ containing more than half elements of a group $G$, every element of $G$ is a product of two elements of $A$.  My attempt:  By Lagrange Theorem, subgroup generated by $A$ must coincide with $G$, so every element in $G$ is a product of elements from $A$. How can I prove that the product is of exactly two elements?


How to install specific package version when it's defined by 2 different PPAs?

I want to install luke-dash-jr's BIP148 bitcoin PPA which can be found .  I've already added the unofficial Bitcoin PPA to my sources.list; that PPA can be found .   Both PPAs define a bitcoin package. How do I install just Luke's for the time being?   I realize I can just remove the unofficial Bitcoin PPA from sources.list but was wondering if there's a different solution.


How to make a white number inside a black circle (the picture below)? I want to change numbers inside the black circle, of course.  I use Share LaTeX. I have read some articles here but anyone are not what I would like to get. I would like to get this  (the picture below) - the sixth answer.   Thanks for help.


Can closed:[0-1] apply to the parent question when is:answer is specified via search?

Some users on Stack Overflow have been spending a bit of time  that really need to be closed. This is working out very well, I'm hoping we can cut out some noise for them when they execute these types of searches.  Suppose we have the query:    And we want to refine it so that we only see open questions. Adding closed:0 to that seems like it should filter out questions that have already been closed, but in reality it doesn't because answers can't be closed.  This seems easy to fix if closed:[0-1] applies to the parent question when is:answer is toggled.


so i know why this happens it's because the sockets on the front of the Case are not placed properly and it feels like there is some electricity is going on within it. i will send it to repair it but till then Asus Realtek Audio HD keeps popping up literally every time my handsfree's cord moves ever so slightly. and think that i'm plugging/unplugging it every second. i tried to search around but none of the guides had what I HAVE. it looks like this and i just can't find the automatic pop up setting or whatever. if you could tell me how to disable the automatic pop up as a temporary solution it would be wonderful. PLEASE HELP


Is there a Magnifier app for Ubuntu? I want to use a bounding box with the mouse on a part of the screen and magnify it for our eyes to Zoom

Windows 8, has a amazing new updated Magnifier Application, improved from Win7 for those of us who cannot see clearly.  Does Ubuntu have a Magnifying application which you can either mouse over, or crop a section of the screen to zoom in on it?


I brought a canon pixma G 2000 printer.I can't install it. Please help me to solve the issue.


Allow extending bounties by topping them up (within limits)

One problem with bounties that has turned me off using them is that if you start one, you will have an answer selected and you may not get any good ones. I can understand the bounty having to end to stop gaming the system but maybe we need some flexibility here?  Perhaps we should allow the OP to pay in extra to extend it another week, a few days or whatever. This should only go on for so long. Maybe a month total? Arguably this extra rep added shouldn't increase the bounty either.  Maybe the amount to extend it is also a function of the size of bounty?


Page not found error when joining SciFi SE

Today while I browsed around the SE sites I found an interesting answer on SciFi Meta SE. The answer can be found  if relevant. Since I don't have an account there yet I was prompted to sign up or sign in. So I clicked the link and was redirected to the . Then I clicked on "Confirm and create this account" and was greeted with a , which is obviously a dead end.  How can I create an account on SciFi Meta SE anyway?


playing a sound/notification in finch over ssh on my local machine

So I have finch, a command line chat client (think pidgin) running on a remote machine that I ssh into. finch has notification sounds and can run a command when certain events occur, letting you pass the sound file in as %s. e.g. mplayer %s  from the remote machine, when the notification occurs, what kind of command could I run to play whatever %s is on my local machine?


Regarding syntax and usage of commas in c++

This solution to the problem presented on :     Given an array of integers, find two numbers such that they add up to   a specific target number.      The function twoSum should return indices of the two numbers such that   they add up to the target, where index1 must be less than index2.   Please note that your returned answers (both index1 and index2) are   not zero-based.      You may assume that each input would have exactly one solution.      Input: numbers={2, 7, 11, 15}, target=9 Output: index1=1, index2=2   by wz2326 ():  vector<int> twoSum(vector<int>& nums, int target) {     unordered_map<int, int> hash;     vector<int> res(2, 0);     for (int i = 0; i < nums.size(); i++) {         if (hash.find(target - nums[i]) != hash.end()) {             res[0] = hash[target - nums[i]], res[1] = i + 1;             return res;         }         hash[nums[i]] = i + 1;     } }   introduces pretty strange use of commas during assignment of int values to vector elements:  res[0] = hash[target - nums[i]], res[1] = i + 1;   Does anyone know the meaning of comma here? Thanks.


Firing bullets with a time interval between them

How can I make my enemies shoot bullets in intervals?   I already have the enemy shooting bullets, however my problem is that it shoots the next bullet instantly, making it look like a line instead of bullets with gaps between them.   I tried to use gluttimerfunc but it didn't work since it just delayed the trigger of the bullet but once the trigger (bool statement) was set to true, it would shoot the max bullets on screen instantly.


Is there more prestige publishing in a special or regular issue?

Bit of a random thought, as publishing in either is good of course. I do not intend to demean anyone who has published in special issues.  I can think of pros and cons from one to the other:  Special issues may get more exposure from people searching within a collection. However, these tend to be offered through invitation, which often or not, the submitted paper may less likely be rejected. This means the quality has a potential to be of lower standard.  Regular issues in this instance may be harder to get accepted, especially in high impact journals, as many researchers will try to submit their work to the journal. Would this mean some people view special issues from invitations as a "free paper"? Where publications in regular issues may be more "genuine"?


I am currently running 12.04 and I can't get Jupiter to install on my computer.  These are the commands I am running to install it:  sudo add-apt-repository ppa:webupd8team/jupiter sudo apt-get update sudo apt-get install jupiter   This is the error I get after updating:  W: Failed to fetch http://ppa.launchpad.net/webupd8team/jupiter/ubuntu/dists/saucy/main/binary-amd64/Packages  404  Not Found   and finally after install jupiter, I get this error:  Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package jupiter   Any ideas on how I can fix this issue?  Or can anyone point me in the right direction?


Phase shift of 180 degrees of transversal wave on reflection from denser medium

Can anyone please provide an intuitive explanation of why phase shift of 180 degrees occurs in the Electric Field of a EM wave, when reflected from an optically denser medium?  I tried searching for it but everywhere the result is just used.The reason behind it is never specified.


The solution here  for getting a "Table of Contents (Continued)" heading in the text of the second page of the table of contents works very well and is the best solution I have found after quite a lot of research, but are there any ideas on how I get this on to the third page of the table of contents?


Prove inequality $n<3^n$ using mathematical induction

Prove that $n<3^n$ where $n \in \mathbb N$,  when $ n=1 $, I have proved it's true. And assumed when $n = p$ , $p<3^p$ is true. Can any body help me in showing that it is true for $n =p+1$


Tetris block kinematic rigidbodies pass through one another with Transform.Translate

I am trying to build a Tetris 3D game in Unity but I am stuck at getting the different blocks to interact (to detect each other, to sit one on top of the other rather than going through each other). I have set the ground with a box collider and the spwaned blocks come in with rigidbodies and trigger colliders. This works for them to nicely settle on the ground but when I try to sit a block on top of another block they both have kinematic rigidbodies and the collision detection doesn't work and they end up overlapping. The problem is if I remove the rigidbody of the already settled block then it will go through the ground. Any idea how to get 2 spawned objects to detect each other? using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UIElements;  public class moveBlock : MonoBehaviour {         public static float speed = 2;     public GameObject[] blocks;     public static List<GameObject> blocksSpawned = new List<GameObject>();     public static List<Rigidbody> blocksRBSpawned = new List<Rigidbody>();     public static bool triggerPlatform = true;     Rigidbody rb;      void Update()     {         Vector3 input = new Vector3(Input.GetAxisRaw("Horizontal"), 0, Input.GetAxisRaw("Vertical"));         Vector3 direction = input.normalized;         Vector3 velocity = direction * speed;         Vector3 moveAmount = velocity * Time.deltaTime;          if (triggerPlatform)         {             blocksSpawned.Add((GameObject)Instantiate(blocks[Random.Range(0, 7)], new Vector3(0, 6, 0), Quaternion.Euler(Vector3.right)));             rb = blocksSpawned[blocksSpawned.Count - 1].GetComponent<Rigidbody>();             blocksRBSpawned.Add(rb);             triggerPlatform = false;         }         /*if (!triggerPlatform)         {             Destroy(blocksRBSpawned[blocksRBSpawned.Count - 1]);         }*/         if (blocksSpawned[blocksSpawned.Count - 1] != null)         {             blocksSpawned[blocksSpawned.Count - 1].transform.Translate(Vector3.down * Time.deltaTime*speed, Space.World);             blocksSpawned[blocksSpawned.Count - 1].transform.Translate(moveAmount);         }     } }  using System.Collections; using System.Collections.Generic; using UnityEngine;  public class trigger : MonoBehaviour {         private void OnTriggerEnter(Collider other)     {         moveBlock.triggerPlatform = true;     } }


Alternative to using DISTINCT or FOR XML PATH

Here is the set up, question is below.   CREATE TABLE Person (    PersonId int Identity(1,1) not null,    PersonName varchar(20) not null PRIMARY KEY CLUSTERED (PersonId) ) GO  CREATE TABLE Size (    SizeId int IDENTITY (1,1) not null,    Size varchar(20) null,    PersonId int NOT NULL PRIMARY KEY CLUSTERED (SizeId) )  ALTER TABLE dbo.Size ADD CONSTRAINT FK_Size_Person FOREIGN KEY (PersonId) REFERENCES dbo.Person (PersonId)  GO   INSERT INTO Person (PersonName) VALUES ('Bob'), ('Bill'), ('Dave'), ('Nathan'), ('Luke') GO INSERT INTO Size (Size, PersonId) VALUES ('32', 1), ('2XL', 1), ('Large', 1), ('Small', 2), ('Medium', 3)  CREATE FUNCTION [dbo].[fn_Sizes] (         @PersonId int ) RETURNS varchar(150) AS BEGIN     DECLARE @sizes varchar(150)      SET @sizes = (SELECT s.Size + ', '             FROM dbo.Size s                           WHERE s.PersonId = @PersonId             FOR XML PATH(''))        -- Return the sizes     RETURN ISNULL(LEFT(@sizes, LEN(@sizes)-1),'') END   Fixing a view and one of the issues is a function that combines multiple rows of values into one column.  I'm not sure if the problem is the DISTINCT keyword, or the function, or the use of FOR XML PATH, or all of it.  I am optimizing a view that takes 15 mins to run, and the execution plan says 90% of the work is in the DISTINCT sort.  So I am looking for a way to get rid of it.  The actual view query is really big, but an example of this section is:  SELECT DISTINCT p.PersonName, dbo.fn_Sizes(p.PersonId) as Size FROM dbo.Person p JOIN dbo.Size s ON p.PersonId = s.PersonId   The DISTINCT is in there to get rid of the extra Bob rows, because Bob has many sizes.  I need to keep the multiple sizes on Bob's row, but I don't want multiple rows of Bob.  Is there a more efficient way to do that other than using DISTINCT?  Second, word on the street is that functions are best avoided if you are going for speed.  I don't see a way to use "FOR XML PATH" outside the function, because I can't get it to work on just one column.  So I am looking for a way to produce the multiple values on one row.


Increasing QGIS 3.2 (Bonna) Render Size on my Macbook Air

The render size for the project appears to be small in the QGIS 3.2 for MacOS.   Any tips how to increase this/make it wider?


I have two csv files,and if I do:  df_compiler = pd.read_csv('sub_compiler.csv')   I obtain:    and for the other csv file I do:  df_opt = pd.read_csv('sub_opt.csv')   I obtain:    now what I would like to do is merge these two csv files and obtain something like:    can somebody please help me doing this? Thank's in advance.


When would one use an impact driver versus a regular drill?

Or vice-versa.  As best as I can tell, the impact driver is very good for most any type of screw going through wood.  When would you use a drill (with screw bit) instead?


PageReference.getContent() returning error 'System.CalloutException: Callout loop not allowed

I am receiving the following error 'Web service callout failed: WebService returned a SOAP Fault: System.CalloutException: Callout loop not allowed'. My code is as follows:  pageReference pdf = Page.viewPDF; pdf.getParameters().put('id',commDocIds[0]); Attachment attach = new Attachment(); Blob body; body = pdf.getContent();   And this code is inside a loop. I thought that only soql and dml isn't allow in loop, but now this weird error. How can i solve this ?


Developed an RTP program vs. Developed a RTP program

See title. Which one is correct?  For reference, in case it matters, RTP is an acronym that stands for Real-time Transport Protocol.


How do I render a custom block type (block_content) programmatically with a specific display view?


Why is the assumption of a normally distributed residual relevant to a linear regression model?

Isn't it just the assumptions of autocorrelation, unbiasedness and homoscedasicty that are relevant to proving the efficiency and the unbiasedness of OLS estimators?  How does the normality in the distribution of the residuals play in here?


Limit of the series $\sum_{n=1}^{\infty}{\frac{n}{2^n}}$

Can someone help me to find the sum?     $$\sum_{n=1}^{\infty}{\frac{n}{2^n}}$$


How can I use perl 5.12 on Ubuntu 10.10? There is no distribution package on Ubuntu.  I have to use feature 'unicode_strings'; in my perl code, and this is available from 5.12. I try to install perl on Ubuntu by apt-get install perl, but 5.10 is the latest version.  How can I deal with this? Or is there any code in 5.10 can replace the code feature 'unicode_strings';?  Thanks.


Why does LaTeX throw an error when I write _ in text mode

Why LaTex return error when I write _ in normal mode (not math mode). Why we have decided to return error, we couldn't just print _. I mean if we write _ in a normal mode it print _ and in normal mode it will have another definition.  What are the reasons for choosing that decision?


Oracle VM issue + Ubuntu is not starting

I'm new to Ubuntu and I have this Virtual Machine issue when installing Ubuntu.I have done a huge search to overcome this but I failed.So please help me out.  I'm using Oracle VM (Virtual Box) 4.2.14 and I have installed it on Windows 8 (64 bit). Following are the settings.    And when I start Ubuntu, I get the starting screen and screen gets freezes.    Why and how can I start Ubuntu ? Please help me out


I'm trying to make a number guesser that starts from 000001 and counts up all the way to 999999 how can I do that?


How can I match the wall color after dent fixing?

I used to have a couple of small dents in one of my walls (the walls are plastered brick if that matters). I covered them and the wall is now smooth. However the main issue I have right now is the paint. Is there any way to paint the fixed areas without painting the whole wall and without having a noticeable difference between the old wall color and these fixed patches? First I thought about trying to match the original color but there are 2 problems with that:   I didn't paint the wall in the first place and finding the exact color will be impossible. I assume that since the wall paint is fairly old, even if I find the exact color, it is still going to be different from fresh paint.   Any ideas?


Cant install wine (from PPA) it gives me the following error

The following packages have unmet dependencies:   wine : Depends: wine1.6 or                  wine1.8 but it is not going to be installed E: Unable to correct problems, you have held broken packages.


How to type \sim above another symbol x?

I want to put a "~" above x, just like \hat x but replacing \hat with \sim.   How to do that?


Getting battery usage information for other iOS apps

I want to show these other applications' Battery Usage percentage values from my own application. Can I do that?


Obtain the value of $\int_0^1f(x) \ dx$, where $f(x) = \begin{cases} \frac {1}{n}, & \frac{1}{n+1}<x\le\frac{1}{n}\\ 0, & x=0 \end{cases}$

Is the function Riemann integrable? If yes, obtain the value of $\int_0^1f(x) \ dx$      $f(x) = \begin{cases} \frac {1}{n},  & \frac{1}{n+1}<x\le\frac{1}{n}\\ 0, & x=0 \end{cases}$   My attempt  $f$ is bounded and monotonically increasing on $[0,1]$. Also, $f$ has infinite discontinuities but only one limit point. Therefore $f$ is Riemann integrable. Now, to calculate the integration  $\int_0^1f(x) \ dx=\int_{1/2}^{1}1 \ dx + \int_{1/3}^{1/2}\frac{1}{2} \ dx + \int_{1/4}^{1/3}\frac{1}{3} \ dx+...$  $=\sum_{n=1}^\infty \frac{1}{n^2}-\frac{1}{n}+\frac{1}{n+1}$  How do I proceed from here? How do I calculate these summations? I know $\sum \frac{1}{n}$ is $\log 2$, but not the other two summations.


Does Plane Shift enable teleporting to a different location on the same plane?

Say a caster wants to travel to a different continent on the same plane. Can that journey be made using the spell , or can plane shift be used only to travel to a different plane than the caster's currently on?


Astronaut studying aliens is mistaken for a wizard

This book was about an astronaut studying an alien race. The alien village leader thinks he's a wizard or warlock, he also thinks the astronaut is a monster there to attack them. He uses ordinary things to make his magic and cause problems for the astronaut who's just there to study them.


What was the motivation for the complex plane?

I've read a bit about the history of the complex numbers, and many seem to credit Caspar Wessel with the idea of associating the complex numbers as points on a 2-dimensional plane (or at least the first to explicitly publish the idea). But what was the motivation behind this? Why did people make this leap, and what were their justifications for this?  edit: just to be clear, my question is only about the justification of identifying complex numbers as points on a plane, NOT about justifying complex numbers themselves.


What does `]` stands for in shell script?

In if [ ... ], I know that [ stands for test. What does ] stands for?


How to extend summations to fractional orders?

I was going through some old stuff when I happened upon fractional summations.  They come of the form $\sum_{k=a}^bf(k)$ for $b-a\notin\mathbb Z$.  One such example is the extended harmonic numbers, which has: $$\sum_{k=1}^n\frac1k=\sum_{k=1}^\infty\frac1k-\frac1{k+n}$$ Which got me thinking.  If we had $f(x)$ be continuous and $\lim\limits_{x\to\infty}f(x)=0$, then one might perchance define fractional summations as follows: $$\sum_{k=1}^xf(k)\equiv\sum_{k=1}^\infty f(k)-f(k+x)\forall x\notin\mathbb Z$$ For example, $$\sum_{k=1}^x\frac1{k^s}=\sum_{k=1}^\infty\frac1{k^s}-\frac1{(k+x)^s}=\zeta(s)-\zeta(s,x+1),s\ne1,s>0$$  This got me thinking:  What other ways can we extend summations to fractional orders? Anything to worry about the above definition? Where would these fractional summations appear?   Related:


Create variable with PDO statement for database

Today I'm trying to connect to multiple database (I hope I'm calling it right) with one PDO, so my code looks like this: class DB{     private $con;     private $DATABASE_HOST = 'localhost';     private $DATABASE_USER = 'root';     private $DATABASE_PASS = '';     private $DATABASE_NAME = 'phplogin';          public function __construct(){         $dsn = "mysql:host=$this->DATABASE_HOST;dbname=$this->DATABASE_NAME";          try {             $this->con = new PDO($dsn, $this->DATABASE_USER, $this->DATABASE_PASS);             $this->con->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);         }     }      public function viewData($database){         $query = "SELECT nome FROM :name";         $stmt = $this->con->prepare($query);         $stmt->execute(['name' => $database]);         $data = $stmt->fetchAll(PDO::FETCH_ASSOC);         return $data;     } }  Doing like that it throws me an error for $database because it tell me that there is a Syntax error or access violation. Now, what I want to do is to give to $database the name of the database I want to connect with when i call the function, but I don't know which is the right way, I thought that PDO could help me but I can't understand why it doesn't work... Can anyone help me?


I have a Fedora 26 Lenovo laptop, which means I have a little trackpoint nub for pointer motion as well as the trackpad. By default, the pointer motion is sluggish. So I have a job that sets some parameters in /sys/devices. I set them after reboot, but whenever I close and reopen my laptop lid, those parameters are reset. I want my parameters to remain unchanged, or at least be automatically correctable after the lid opens.  My question is: Is it possible to do what I want quickly? I don't want to have to dig into systemd. I'm looking for a 5-minute fix so I can get back to what I was doing.  The pointer to this article  includes an answer by mivk which answered the question for me. I will followup there with my solution.


How to access a property in a group property in the body of the script?

I defined a class group property with some props inside and did the register and unregister with a pointer, but in the main body of the script how do you access the properties inside the group property?  Note: I can define a scene property and modify the value but cannot do it with a property from the group property.  Any add-on example showing how to do this would be nice too!


string operations in Python using indexing

I have the following piece of code :  str1 = "abcd" print(str1[1:9:3])   The answer I get is "b"  How is this being calculated. This means that in the string str1, print out the 3rd character from 1st position to 9th. Hence str1[1:9] will be "bcd". And the third character in this should throw me an error. But instead I am getting "b". How is this ?


Its a .vbproj and looks like this  <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">     <PropertyGroup>         <ProjectGuid>15a7ee82-9020-4fda-a7fb-85a61664692d</ProjectGuid>   all i want to get is the ProjectGuid but it does not work when a namespace is there...   Dim xmlDoc As New XmlDocument()  Dim filePath As String = Path.Combine(mDirectory, name + "\" + name + ".vbproj")  xmlDoc.Load(filePath)  Dim value As Object = xmlDoc.SelectNodes("/Project/PropertyGroup/ProjectGuid")   what can i do to fix this?


Sub arrays in VBA - I want to slice a dimension off

Say I have a 2D array,   dim iArray(1 to 2, 1 to 2) as integer iArray(1,1)=1: iArray(1,2)=2: iArray(2,1)=3: iArray(2,2)=4 'iArray =   1  2 '           3  4   and I want to cut one of the dimensions out. In Matlab, you could:  %Matlab style: cutArray = iArray(:,2) %cutArray =  2 %            4   Is there an easy way to do this in VBA?


While I was investigating a problem I had with lexical closures in Javascript code, I came along this problem in Python:  flist = []  for i in xrange(3):     def func(x): return x * i     flist.append(func)  for f in flist:     print f(2)   Note that this example mindfully avoids lambda. It prints "4 4 4", which is surprising. I'd expect "0 2 4".   This equivalent Perl code does it right:  my @flist = ();  foreach my $i (0 .. 2) {     push(@flist, sub {$i * $_[0]}); }  foreach my $f (@flist) {     print $f->(2), "\n"; }   "0 2 4" is printed.  Can you please explain the difference ?    Update:   The problem is not with i being global. This displays the same behavior:  flist = []  def outer():     for i in xrange(3):         def inner(x): return x * i         flist.append(inner)  outer() #~ print i   # commented because it causes an error  for f in flist:     print f(2)   As the commented line shows, i is unknown at that point. Still, it prints "4 4 4".


UnboundLocalError when using recursion in Python?

A simple recursive search is shown below. There seems to be conflicting opinions on whether or not nesting a function is good practice. One MOOC is teaching recursion using the template below but many in the community balk at this approach.  Anyway, if the recursion snippet below is changed from this working version,  # subgroups exist, recurse into each one for group in groups:     get_all_users(group)   to this version where the return parameter is captured,  # subgroups exist, recurse into each one for group in groups:     users = get_all_users(group)   then the following error occurs:  Traceback (most recent call last):   File "problem_4.py", line 84, in <module>     print(is_user_in_group("sub_child_1_user", sub_child_1_group))   File "problem_4.py", line 53, in is_user_in_group     users = get_all_users(group)   File "problem_4.py", line 37, in get_all_users     users.extend(group.get_users()) UnboundLocalError: local variable 'users' referenced before assignment   This is particularly confusing because that is not the line where the change was made, meaning if the logic fails here it should have failed in the working version. Also the list named "users" is clearly defined before the recursive function is called. My understanding of the variable scope is that the users list is now fully accessible to the nested recursive function, so why is an error thrown about it "being referenced before assignment" in an unexpected place?  class Group:      # group has a name, users, and children groups     def __init__(self, name):         self.name = name         self.groups = []         self.users = []      # simple getters and setters     def get_name(self):         return self.name     def get_groups(self):         return self.groups     def get_users(self):         return self.users     def add_group(self, group):         self.groups.append(group)     def add_user(self, user):         self.users.append(user)  def is_user_in_group(user, group):     """     Return True if user is in the group, False otherwise.      Args:       user(str): user name/id       group(class:Group): group to check user membership against     """      # initialize a blank list for output     users = []      # recursive function to collect all users in passed group     def get_all_users(group):          # add the users on this group level         users.extend(group.get_users())          # get the subgroup children of this group         groups = group.get_groups()          # base case, there are no subgroups and we are at the lowest level         if len(groups) == 0:             return users          # subgroups exist, recurse into each one         for group in groups:             get_all_users(group)          return users      # start recursion     users = get_all_users(group)      # search through the all collected users     for _user in users:          # current user matches passed user         if user == _user:             return True      return False  ########## TESTING ##########  # create a few groups parent_group = Group("parent_group") child_1_group = Group("child_1_group") child_2_group = Group("child_2_group") sub_child_1_group = Group("sub_child_1_group")  # define the group heirarchy parent_group.add_group(child_1_group) parent_group.add_group(child_2_group) child_1_group.add_group(sub_child_1_group)  # add a user to each group level parent_group.add_user("parent_user") child_1_group.add_user("child_1_user") child_2_group.add_user("child_2_user") sub_child_1_group.add_user("sub_child_1_user")  # check for the presence of the sub_child_1_user in its native sub_child_1_group print(is_user_in_group("sub_child_1_user", sub_child_1_group)) # True  # the sub_child_1_user is also a member of the parent group print(is_user_in_group("sub_child_1_user", parent_group)) # True  # check for the presence of a nonexistant user print(is_user_in_group("sub_child_not_added", child_1_group)) # False  # verify the presence of the parent_user in the top level parent_group print(is_user_in_group("parent_user", parent_group)) # True


Why use a salt instead of AES when storing passwords

Wouldn't AES be more secure at securing passwords when storing them in a database, compared to using salts.  Note: Not concerned with performance, only security. Which one would be more secure. Also, wouldn't it be better to then store the key for encryption, any encryption in another database server, encrypted obviously.


What would the statement "You over there!" be called?

If someone was to shout "You over there!" to get the attention of a friend, for instance, what would this statement be called?  Would it be a declarative because "You" is over there, but then is it an exclamative because you are exclaiming the statement to get the friend's attention... or is it something else entirely?


how do i properly protect get method in php

i have this code  <?php   if(isset($_GET['qry'])) {    echo $_GET['qry'];   }  else if(isset($_GET['ct'])) {    echo $_GET['ct'];   }  else if(isset($_GET['sct'])) {    echo $_GET['sct'];   }  else if(isset($_GET['brand'])) {    echo $_GET['brand'];   }  else {   echo "";  }  ?>   how do i properly protect the value i get from the page url from sql injection or other things since i use the value on the page or database.   I have searched and am seeing different method, please which do you think is the best way.


Enchant Weapon Property: Favor Attack Speed or % Damage?

So I got this new weapon:    However, it lacks a socket, so I need to replace a primary attribute with a socket. My question is which primary property should I replace? It comes down to increased attack speed or an additional percentage of damage. On a more general note, on a weapon, sould I go for attack speed or %damage ?


What does a program do when it's sent SIGKILL signal?

When I used killall -9 name to kill a program, the state become zombie. Some minutes later, it stopped really. So, what's happening during those minutes?


Doing a Green Screen composite renders black

I am a newbie to composite editing, and I followed this green screen tutorial on youtube: .  I have audio in the VSE synced up also. I have the start frame and end frame starting at a different place (other than frame 1) to cut out unwanted footage. Everything looks great in the Composite Viewer but for some reason it renders black.


Markov chain probability of reaching final state

Given a matrix with probability of moving from one state to another.  $$\begin{bmatrix} 0&1&0&0&0&1 \\ 4&0&0&3&2&0 \\ 0&0&0&0&0&0 \\ 0&0&0&0&0&0 \\ 0&0&0&0&0&0 \\ 0&0&0&0&0&0 \end{bmatrix}$$  I have to calculate the probability of reaching state s3 s4 s5 from s0. the answer to them are $3\over14$, $1\over7$, $9\over{14}$ respectively.  While my answers are s3, s4, s5 are $2\over9$, $1\over6$, $1\over9$.  Am I missing anything?  Also How would I go with this when there are multiple paths?  $$\begin{bmatrix} 0&1&0&0&1&1 \\ 4&0&0&3&2&1 \\ 0&0&0&0&0&0 \\ 0&0&0&0&0&0 \\ 0&0&0&0&0&0 \\ 0&0&0&0&0&0 \end{bmatrix}$$


I am new Linux user I have been learning about Linux using it and i liked it but!! I have been getting some errors after installation the first one was that while booting Ubuntu I was asked to run fsck check manually and while I was trying to install steam i also got error of broken packages yeah i have tried many commands sudo apt-get update or sudo apt --fix-broken and many others the error was something like coping a file into another I am unable to fix it Please help?


Prove $\exp(x)\exp(y)=\exp(y)\exp(x)$ if $[x,y]=0$.

How to prove the following statement     Prove that $\exp(x)\exp(y)=\exp(y)\exp(x)$ if $x,y\in \mathfrak{g}$ and $[x,y]=0$.   by using the following results:   $\mathrm{ad} (x)\cdot y=[x,y]$; $\mathrm{Ad} (\exp(x))=\exp(\mathrm{ad}x)$.   where $\mathrm{Ad}:G\rightarrow \mathrm{Gl}(\mathfrak{g})$ and $\mathrm{ad}:=\mathrm{Ad}_{\ast}:~\mathfrak{g}\rightarrow \mathfrak{gl}(\mathfrak{g})$.  (Without using the Campbell-Hausdorff formula...)    Attempt:   If $[x,y]=0$, then $\mathrm{ad}(x)\mathrm{ad}(y)=\mathrm{ad}(y)\mathrm{ad}(x)$.  Also, we have $\mathrm{Ad}(\exp(xy))=1$. But I cannot move forward.


Arch Linux - pactree : command not found

I have to list all dependencies of 71 packages. I planned to write a bash using  with a for loop but I got this message:  pactree : command not found   I have updated pacman but pactree still doesn't work. I searched in the arch repo and aur but both don't have pactree. What should I do to use pactree or at least list all dependencies?