So, the end product is creating a multi client to single server type of program, where the clients send text files in xml form, the server then takes the file and parses it to attain information. I'm at square one, trying to get only one client to send a file to the server. I made it so (at the moment) the client creates a text file (that I as a user will input in console) and sends that text file to the server. The server checks if the file is indeed a text file, and then responds to the client with 'File received!', however, there is something wrong within the client class that I am just not understanding, can anyone help me out?   Here is the server code:  package ServerClientTower;  import java.io.IOException;     import java.io.PrintStream; import java.net.ServerSocket; import java.net.Socket; import java.util.Scanner;  public class Server {      public static void main(String[] args) throws IOException {         // TODO Auto-generated method stub         String file,temp;         ServerSocket sock1=new ServerSocket(1234);         Socket ss=sock1.accept();         Scanner scan=new Scanner(ss.getInputStream());         PrintStream ps= new PrintStream(ss.getOutputStream());         file=scan.next();         if(file.substring(file.length() - 4)==".txt") {             temp="File retrieved";             ps.println(temp);         }         //temp= number + number;       }}   Here is the client code:  package ServerClientTower; import java.util.Scanner; import java.io.File; import java.io.IOException; import java.io.PrintStream; import java.net.Socket; import java.net.UnknownHostException; public class Client {      public static void main(String[] args) throws UnknownHostException, IOException {         // TODO Auto-generated method stub          File f= new File("invoice.txt"); //creating .txt file name invoice         String option,file,temp;         Scanner scan= new Scanner(System.in);         Socket sock= new Socket("127.0.0.1",1234);         Scanner scan2=new Scanner(sock.getInputStream());         PrintStream print= new PrintStream(sock.getOutputStream());         System.out.println("Please enter your command using this options \n1.Send (nameofFile).txt\n\n2.Delete\n\n");         option= scan.nextLine(); //reads input line from user         String input[]=option.split("\\s");// splits the input, taking in the first user string, and then the second user string         System.out.println(input[0] +' '+ input[1]); //testing to see if the split actually worked         if(input[0].contains("Send")) {               print.println(input[1]);                     }         // print.println(number);             temp= scan2.next();   //this comes up with an error, though I don't understand why         System.out.println(temp);      }  }   The error that comes up is :  Exception in thread "main" java.util.NoSuchElementException: No line found     at java.util.Scanner.nextLine(Unknown Source)     at ServerClientTower.Client.main(Client.java:29)   So I don't know if I need to remove the temp=scan2.next() or use a different method all together.

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


In the following matrix  \documentclass[10pt]{article} \usepackage{amsmath}  \begin{document} \begin{align}     \begin{bmatrix}         a_{11} & a_{12} & a_{13} & a_{14} & a_{15} & a_{16} & 0     & \cdots & 0      &        &         &        & \\         a_{21} & a_{22} & a_{23} & a_{24} & a_{25} & a_{26} & 0     & \cdots & 0      &        &         &        & \\         a_{31} & a_{32} & a_{33} & a_{34} & a_{35} & a_{36} & 0     & \cdots & 0      &        &         &        & \\         a_{41} & a_{42} & a_{43} & a_{44} & a_{45} & a_{46} & 0     & \cdots & 0      &        &         &        & \\         0      & 0      & 0      & 1/24   & -9/8   & 9/8    & -1/24 & 0      & \cdots &        &         &        & \\         \vdots & \vdots & \vdots & 0      & 1/24   & -9/8   & 9/8   & -1/24  & 0      & \cdots &         &        & \\                &        &        & \vdots & 0      & 1/24   & -9/8  & 9/8    & -1/24  & 0      & \cdots  &        & \\                &        &        &        & \vdots & 0      & 1/24  & -9/8   & 9/8    & -1/24  & 0       & \cdots & \\                &        &        &        &        & \vdots & 0     & \ddots & 0      &        &         &        &     \end{bmatrix} \end{align} \end{document}   I'm receiving the message  ! Extra alignment tab has been changed to \cr. <recently read> \endtemplate   l.17 \end{align}   Cannot understand why, I have checked all & and they all match, tried to add $0$ in empty cells, but same error.

The code below works,  but when I add 10 more columns, it does not. So, how can I add ten more columns to the matrix below?  \documentclass{article} \usepackage{amsmath} \begin{document}  \begin{equation} \begin{bmatrix}  1 & 0 & 0 & 0  & 0 & 1 & 0 & 0 & 1 & 0  \end{bmatrix} \end{equation}  \end{document}


In the Method 1 and 2 how is the $e$ in the LHS equal to the RHS?  In the junior classes I was just given to learn that $cos(\frac{π}{2}±\theta)=\mp sin\theta$ but we never proved it.  I have no idea how the e got there in the first statement of the proof.  Can anyone prove the first statement of the proof of Method 1 and 2?  Any help would be appreciated.

Could you provide a proof of Euler's formula: $e^{i\varphi}=\cos(\varphi) +i\sin(\varphi)$?


In Martin Braun's book Differential Equations, problem 16 in section 1.10 says:  Consider the initial-value problem $y'= t^2+y^2$, $y(0)=0$ ... (*)  and Iet $R$ be the rectangle $0\leq t \leq a, - b \leq y \leq b$  (a) Show that the solution $y(t)$ of (*) exists for $0 \leq t \leq min(a, b/(a^2+b^2))$  (b) Show that the maximum value of $b/(a^2 +b^2)$, for a fixed $a$, is $1/2a$.  (c) Show that $\alpha=min(a,\frac{1}{2}a)$ is largest when $a=\frac{1}{2^{1/2}}$.  (d) Conclude that the solution $y ( t)$ of (*) exists for $0 \leq t \leq \frac{1}{2^{1/2}} $  The problem is, in the incise b) i proof by calculus of the maximum of the function $f(b)=\frac{a^2}{a^2+b^2}$, the maximun is reached when $f(a)=\dfrac{1}{2a}$, but in incise c) the book puts $\alpha=min(a,\frac{1}{2}a)$, my question is, that is an error? or i'm wrong? it should be $\alpha=min(a,\frac{1}{2a})$? or not? and, how can i prove that? thanks and, i apologize if the question is clumsy, but i tried to solve this problem for hours and the book confused me, because the notation.

Consider the ODE $$\frac{dy}{dx}=x^{2}+y^{2}, y(0)=0.$$ I have to find the interval of unique solution by using Picard method. As in my local book it is solved as $$|f(x,y)|=|x^{2}+y^{2}|\leq a^{2}+b^{2}=M. $$ $$h=\min\{a,\frac{b}{M}\}$$ where $M=a^{2}+b^{2}$. So $h=\min\{a,\frac{b}{a^{2}+b^{2}}\}$. Then my main problem is the author do like $$a=\frac{b}{a^{2}+b^{2}}$$ which gives a quadratic in $b$ as $ab^{2}-b+a^{3}=0$ with discriminant as  $1-4a^{4}=0$ gives $a=\frac{1}{\sqrt{2}}$ so $|h|\leq\frac{1}{\sqrt{2}}.$ Please suggest me how he  find $h=\min\{a,\frac{b}{a^{2}+b^{2}}\}$? Why he put $a=\frac{b}{a^{2}+b^{2}}$? Thanks in advance.


I often come across columns that are varchar(255), so presumably this is a convention of sorts. 255 is 2^8 - 1. So is there something 'magical' about lengths that are 2^n - 1? Or just specifically 255? Is there a performance or storage optimisation advantage to certain specific varchar lengths? Or is this just old wisdom which is no longer applicable to current versions of MariaDB and MySQL?

Is declaring VARCHAR size make sense for performance? Is there any difference (in speed) between VARCHAR(50) and VARCHAR(255)? Or defining length is logic/design constraint?


Hi there, I've created the circuit following  thread. The arduino D9 pin get 5v and I measured with the tester a VBE of 0,82v, which is right for the transistor saturation. Unfortunately the pump doesn't start! I've tried attaching the pump directly to the 8.3v battery pack (2x18650 batteries in series) and works fine, consuming 150mA. To calculate the 200ohm resistance for the driving current of the base I've followed  guide. The arduino port when HIGH provides 4.7v, so 4.7-0.80=3.9v drop. The resistance should be 3.9V/0.02A=195ohm, i've just rounded to 200.  The pump is connected with the + to the + of the battery.  Any suggestions on how to make it working?

I'm trying to build a simple system to turn a water pump every 24 hours for 10-20 seconds. I have 5V pump. When I connect it to 5V, GND it works but when I connect it to pin 12 (or any other digital pin) and GND it does not work. Here's my sample sketch:  int led = 12;  void setup() {                   Serial.begin(9600);   pinMode(led, OUTPUT);      }  void loop() {   digitalWrite(led, HIGH); }   What am I doing wrong?


I want to clean a folder filled with files without deleting the folder and I cant for the hecc of it figure it our or find some documentation on the matter. (clearing the Temp folder filled with junk files and folders) import os  os.remove(r"C:\Users\junio\AppData\Local\Temp\")  any suggestions to make it work? (probably pretty easy, and thanks in advance)

I am getting an 'access is denied' error when I attempt to delete a folder that is not empty. I used the following command in my attempt: os.remove("/folder_name").   What is the most effective way of removing/deleting a folder/directory that is not empty?


I was wondering, what is the best way to implement the following case:  vm.elasticQuery = userQuery.replace(/~='[a-zA-Z]+'/g,':*[a-zA-Z]+*')   In other words, I would like to replace every pattern that looks like this ~='SomeLetters' to a pattern that looks like this :*SomeLetters*. Take into account that I do not want to remove/change the alphabets but only the outside.  Your help is appriciated.

I am trying to grab the capital letters of a couple of words and wrap them in span tags. I am using  for extract and wrapping purposes, but it's not outputting anything.  preg_replace("/[A-Z]/", "$1", $str)


Everywhere in the literature, I have seen that while deriving the variance of the least squares slope estimate $Var(\hat \beta_1) = \dfrac{\sigma ^2}{SS_{xx}}$, we always assume that $X_i$s are fixed i.e., they are deterministic in nature. Can we derive the variance formula without this assumption? (Assuming we already have the result $E(\hat \beta_1) = \beta_1$

I stumbled over a rather simple result of OLS regression which is  $$ Var[\hat\beta] = \sigma^2(X^TX)^{-1} $$ where $\sigma$ is the variance of the error term $u$ and $X$ is the regressor matrix.  I first just accepted the proof in my textbook but now I am thinking that it either uses sloppy notation or I am missing something. $\hat\beta$ is the estimated and $\beta$ is the true parameter (assuming unbiasedness).  It states that   \begin{align} Var[\hat\beta] &= E[(\hat\beta - \beta)(\hat\beta-\beta)^T] \\                &= E[(X^TX)^{-1}X^Tuu^TX(X^TX)^{-1}]         \\                &=  (X^TX)^{-1}X^T E[uu^T] X(X^TX)^{-1} \end{align}  but $X$ was only assumed to be exogenous and not non-stochastic. Under this assumption I think $X$ cannot be dragged outside the expectation operator.   Momentarily, I think that it should be $Var[\hat\beta|X]$ to make sense. Is that the case? My web research couldn't clarify this. I only found similar derivations to the above without further explainations.


I'm trying to make a handrail but i get this unwanted rotation. I want the start and the end of the handrail to have the same rotation (flat).  I used a long subdivided cube to show it better, you can see that at the start it is flat like I want it but at the end it gets rotated by something like 40 degrees.  If I use a curve with the bevel option instead of an object with the curve modifier i get the same problem.

I have attempting to make a fin tube for two days and it is killing me.  Fin tubes are pipes that have a tight spiral of flat fins sticking out all around them. The spiral wraps around the circumference of the pipe. They are used in heat reclaimers among other places.  I made a spiral using the extra shapes add-on and scales pretty tight. And then I set the scale.  I made the fin shape and set its scale. I added the curve modifier and it jumped around a bit. I set its origin point to one end face and finally got it going the right way off the beginning of the curve.  Then I added the array modifier and moved it to the top  of the stack. It all looked good for the first loop, then the fins started to tip. The outside edge aimed upward steadily as the inside edge seemed to continue to be oriented at the center base of the curve.  How can I keep the darned things at 90 degrees to the z axis? Or should I be using a particle system? I haven't learned that one yet, sigh.


When storing latitude or longitude data in an ANSI SQL compliant database, what datatype would be most appropriate? Should float be used, or decimal, or ...?  I'm aware that Oracle, MySql, and SQL Server have added some special datatypes specifically for handling geo data, but I'm interested in how you would store the information in a "plain vanilla" SQL database.

Bearing in mind that I'll be performing calculations on lat / long pairs, what datatype is best suited for use with a MySQL database?


This question comes from M.A. Armstongs book Groups & Symmetry, Chapter 13, #5.  I came across a similar question , but I am not familiar with the language yet and would rather solve using the tools I've amassed to this point in my learning.  The question tells us to use Cayley's and Cauchy's Theorem, as well as the fact that if a subgroup $H$ of $S_n$ is not contained in the alternating group $A_n$, then half the elements of $H$ are even.  At the moment a promising approach (to me) is to examine the two cases: $2n+1$ is prime or $2n+1$ is not prime. The former leads directly to the conclusion via Cauchy, but the more difficult one tells me nothing other than $2n+1$ is a product of primes.  Any suggestions or hints to pursue this course or another one is appreciated.

I searched in the existing post and didn't find this problem. I am sorry if someone else have already posted.     Let $G$ be a group of order $2m$ where $m$ is odd. Prove that $G$ contains a normal subgroup of order $m$.   There is a hint:     Denote by $\rho$ the regular represetation of $G$: find an odd permutation in ${\rho}(G)$.   I don't know how to find an odd permutation in the regular representation. I am wondering whether all the elements of $G$ of odd order form this subgroup in this case.  Thanks.


I want to find the difference between two times. I have only time stored in database. I don't have date stored.  Note : Time is in string format.  Case 1:   Starting time : 06:18:09  Ending time :  06:18:45   Case 2:   Starting time : 06:03:35     Ending time 06:18:04   Case 3: [This case isn't working ]  Starting time : 23:44:56     Ending time : 00:45:43   I'm using this code to find in seconds.But not working for me.  $datetime1 = date_create($a);   $datetime2 = date_create($b);   $interval = date_diff($datetime1, $datetime2);  $min=$interval->format('%s');   Any helps ?  Thanks!

How to calculate minute difference between two date-times in PHP?


I'm using a BH1750 light sensor with arduino to display the lux values on an LCD. But in the code, I'm unable to get the formula. Can anybody explain me the formula?  I tried to find it in the datasheet of BH1750, but I was not able to understand this line:   value = ((buff[0]<<8)|buff[1])/1.2;   The whole code:  #include<Wire.h> #include<LiquidCrystal.h>  int BH1750address = 0x23; byte buff[2]; LiquidCrystal lcd (7,6,5,4,3,2); //RS, E, D4, D5, D6, D7  void setup() {   Wire.begin();   lcd.begin(16,2);   lcd.print("  BH1750 Light  ");   lcd.setCursor(0,1);   lcd.print("Intensity Sensor");   delay(2000); }  void loop() {   int i;   uint16_t value=0;   BH1750_Init(BH1750address);   delay(200);    if(2==BH1750_Read(BH1750address))   {     value=((buff[0]<<8)|buff[1])/1.2; //This is where the problem is     lcd.clear();     lcd.print("Intensity in LUX");     lcd.setCursor(6,1);     lcd.print(value);   }   delay(150); }  int BH1750_Read(int address)  {   int i=0;   Wire.beginTransmission(address);   Wire.requestFrom(address, 2);   while(Wire.available())    {     buff[i] = Wire.read();     i++;   }   Wire.endTransmission();     return i; }  void BH1750_Init(int address)  {   Wire.beginTransmission(address);   Wire.write(0x10);   Wire.endTransmission(); }

I've been attempting to learn C in my spare time, and other languages (C#, Java, etc.) have the same concept (and often the same operators) ...   What I'm wondering is, at a core level, what does bit-shifting (<<, >>, >>>) do, what problems can it help solve, and what gotchas lurk around the bend? In other words, an absolute beginner's guide to bit shifting in all its goodness.


I have an LCD monitor,and from what I've read from the Wikipedia article,they only protect CRT and plasma monitors  which means that LCD monitors are not vulnerable to phosphor burn-in like those mentioned above  does that mean that screen savers are useless for LCD monitors?

Old computers were using CRT monitors and when an image was continuously displayed on the screen, it became marked. So, screensaver where invented to avoid screen burn-in.   Laptops and modern computers almost all uses LCD display now and, AFAIK, they are not affected by this effect.  So, should I completely deactivate this feature and use power management instead or I am wrong?


I'm looking to create a function that calculates the top occurring keywords in some text and returns the top 10 most common keywords.   So far I've been using the following code:  public static String KeywordDensityCalc(String articles ) {     String[] body = articles.split(" ");     HashMap<String, Integer> densityTracker = new HashMap<String, Integer>();      for(int densityCounter = 0; densityCounter < body.length; densityCounter++)     {          if (!densityTracker.containsKey(body[densityCounter]))                  {                   densityTracker.put(body[densityCounter], 1);                  } else                 {                     densityTracker.put(body[densityCounter], densityTracker.get(body[densityCounter]) + 1);                 }       }   This allows me to create a hashmap of string (as keys) and number of occurrences (as values). Now my question is how to sort them from highest to lowest and return the top 10 (or some other number)?

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way?


I'm writing a script in python to extract the name of the featured artist  from an mp3 filename and set the appropriate id3v2 tag of the file. The filenames are in 3 different formats:  Artist - Track ft. FeatArtist.mp3 Artist ft. FeatArtist - Track.mp3 Artist - Track (ft. FeatArtist).mp3   This is the regex that I wrote:  r'ft\. (.+)[.-)]'   Then I can use re.findall to get the contents of the group. But this is what I get:  In [40]: r = r'ft\. (.+)[.\-)]'  In [47]: re.findall(r, 'Artist - Track ft. FeatArtist.mp3') Out[47]: ['FeatArtist']  In [48]: re.findall(r, 'Artist ft. FeatArtist - Track.mp3') Out[48]: ['FeatArtist - Track']  In [49]: re.findall(r, 'Artist - Track (ft. FeatArtist).mp3') Out[49]: ['FeatArtist)']   My intended output is in all three cases precisely:  FeatArtist   The problem is that the regex is matching as much as it can - I want it to to stop as soon as it finds one of the characters in [.\-)]. How can I do this ?

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


Let $R$ a commutative ring, and $M$ a maximal ideal of $R$. If there exists $n\in \mathbb{N}$ such that $M^n=0$, then $R$ is local.  In general, I have proved that $R/M^n$ is local with a unique maximal ideal $M/M^n$. But I don't see how to prove that $R$ is local.

Let $R$ be a (not necessarily commutative) ring and suppose $R$ has a maximal left ideal $I$ consisting of nilpotent elements, that is for $x\in R$ there exists some $n\in\mathbb{Z}_{\geq 0}$ such that $x^{m}=1$. I want to show that in this case, $I$ is the unique maximal left ideal.  To attempt to prove this, assume $J$ is some other maximal left ideal of $R$. Since $x^{m}=0$, we have $x^{m}\in J$. This is where I get stuck.  In the commutative case we can note that $I$ is necessarily a prime ideal, so either $x\in J$ or $x^{m-1}\in J$. Iterating this process shows that $x\in J$, then $I=J$ by maximality.  In the non-commutative case I can't seem to proceed. This is probably really easy but I'd appreciate a hint.


I have created class library project into dotnet framework 4.5. I have added new file - app configuraiton file and connectiong string is mentioned inside as a key/value.  Now, I need to add this dll into GAC and use into some other application.  Please suggest me how i could add this DLL with configuraiton file so, it should work completely ?  NOTE: this dll will be used in some SSIS and other applications. please suggest how i could use configuration file.  Thanks

I have a .NET dll which needs to read it's config settings from it's config file. Usually, the config file is placed in the same directory as the DLL. But how do i read the config file if the DLL is GAC'ed, because I can put only the DLLs in the GAC, and not it's config files.


Our DM has decided that it only makes sense for a two-way  to exist in our world.  Background: Our characters own a small shipping company that frequently makes its profits by selling things our party finds in dungeons, and splits the profit with us. Frequently this means that we have to travel back to town or even track down an active boat and intercept it mid-route in order to drop off more wholesale goods. For reasons I'm not going to get into, we don't really want to go through this process with any other merchants.   Obviously the process is a pain and requires some form of scrying and teleportation every time, or worse, hunting down traders and intercepting them (because again, we only trust this one trader).  The DM has ruled that the trader will make a two-way Bag of Holding, which is to say, one dimensional space to be accessed from two separate bags, which are forever linked, in order to reasonably deposit items directly to the trader in exchange for money. We payed 20,000 gold for this to be researched by a magician and subsequently created, (presumably 10,000 gold for each task, estimated by DM).  My questions are as follows: using the existing Pathfinder system of rules,  a) are there ways this could be overpowered we haven't considered? b) is this a reasonable price with consideration to item creation feats that would be involved (presumably a  with permanency inside the hole is probably the most expensive way to produce such an object, but I suspect there's cheaper methods).  Additional information: The only other balancing rule we have is that air doesn't explicitly enter the hole unless both entrances are open, to prevent people from staying inside it with the safe side of the portal open.  For price, assume the bag of holding for all intents and purposes is a type I Bag of Holding, only with two openings, one on each side.

For the Pathfinder RPG, the costs and limits of a  are defined pretty clearly. Though it comes in four different types, I'll take a Type I Bag of Holding as an example.  The Type I bag weighs 15 pounds, has a Contents Limit of 250 pounds., a Contents Volume Limit of 30 cubic feet, a Market Price of 2,500 gp, and a Cost To Create of 1,250 gp.  The creator needs the Craft Wondrous Item feat and the spell Secret Chest. Caster Level is 9.  The bag of holding opens into a nondimensional space.   For my campaign I've created a Mutex Bag of Holding. A Type I Mutex Bag of Holding is actually two different bags (A and B). Both bags open on to the same nondimensional space. Only one bag may be open at a time. If Bag A is already open, Bag B refuses to open and cannot be opened.    The advantage here is that Bag A can be across the globe from Bag B; it provides a way of resupplying a party from across vast distances, passing notes or potions or rations or whatever. Picking up and holding the bag does not provide any sort of identification, location nor communication with the owner of the other bag, but there's aways  spells. Passing notes through the bag is permitted.  EDIT   In case it is relevant, the Player Characters in my campaign currently have only one of the two bags and don't know who possesses the other bag: friend, foe, or absent-minded wizard who left Bag B open.   Does something like this already exist?  I have not found it in my searches to date.  How do I figure out the Cost To Create for this item?  I treat the two bags as one set.  I plan to put a premium on this because the pair allows some new creative uses over a single Bag, but I'm not sure how to cost this out, as it approaches the convenience of a  that is both permanent and portable.


Does require antivirus for Ubuntu 13.04, if yes then what is the anti-virus should be install in Ubuntu 13.04.

I thought that there was no need to scan for viruses either in Ubuntu or any Linux distros until I found virus scanner packages clamtk and klamav in Ubuntu software center yesterday.  This leads to the following questions:   How do viruses differ between Linux and Windows? How do the strategies for protection differ between Linux and Windows? Should a virus scanner package be installed on my system? If so, which would be a better option?


Can anyone please help me figure out the icon provided by me in the screenshot that appears on the top left corner of the notification bar which looks like a message box with an exclamation mark! Whether it is an app notification icon or android system based icon.

I'm concerned about an app on my child's phone. I saw an app icon in the notification area that looked strange (Andy Android head, slightly tilted as its icon).  How can I find out what app it is from just having seen that icon in the notification bar?


I have created 3 random points within each of 27k polygons. I now want to label each of those 3 points as "A", "B", "C" within each polygon.   Is there a quick/automated way to do this?

I am needing to auto increment a field based on groups within a feature class. I have 8 plots within a given polygon and I need to assign them an ID from 1-8 for each set of plots within each polygon. The polygon would have its own unique ID number to be used to group the plots.  I assume it would be an alteration of this:  rec=0 def autoIncrement():  global rec  pStart = 1   pInterval = 1   if (rec == 0):    rec = pStart   else:    rec = rec + pInterval   return rec


On a CentOS 7.3 server, I would like to watch the logs in real time for postfix. I can currently see some detail by issuing:  systemctl status postfix -l  However, this exits. I want a command I can run that will show me the journal entries as they appear and not exit until I want it to. Any ideas?

Usually I use tail -f /var/log/messages to get updates if there are new lines.  How to have the similar functionality for journalctl?


I'm looking for a solution to live-stream my hikes. As far as I'm aware, the best solution is to do cellular bonding, but I will be in areas with little to no cell-signal. (I'm based in the mountains just outside Seattle). Are there any portable satellite receivers that exist on the market today? Or do I need to wait a few years before this technology is available? I saw Starlink come out recently, but it requires a stationary position. Thanks.

I'm a software engineer, and my company has announced that even after COVID-19 is no longer an issue, we're free to work remotely indefinitely. My boss has given me permission to travel the world while working remotely, and I'd like to open my eyes and see the developing world. Sub-saharan Africa, India, and parts of Asia specifically are on my list. I'm planning to learn and explore and gain a better understanding of the region during the day, and then work during the evenings, 7pm to midnight, which is typical business hours in the american timezones. I'm seeing two major obstacles here, electricity and internet. Electricity I can tackle using solar panels, as I can keep my laptop and a portable phone battery charging during the day, and then work until my laptop is drained at night. But internet is harder, as many of these areas have very little cellular infrastructure, and I probably need at least a few Mbps to get work done. Are there devices I can buy that use satellites to get me at least reasonable internet access, basically anywhere on earth? I'm willing to really stretch the budget to make this happen, so cost isn't too much of a concern.


I need to export all commands and the commands' log of a user in a Linux distribution like Debian. Any idea?

I'm running a bash file to obtain data on what system processes are running (i.e netstat, syslog, arp etc). All's going well except for the history. I'm trying to save the history to a text file with  cp ~/. bash_history $path/filename.txt      Unfortunately this doesn't give me the complete history. If manually input the command   history > /media/root/usb/filename    I get a completely different result. My aim is to automate the whole process under the one bash file, is there a way of doing this. Also i'd ideally like the date and time with the history.


I think there is some conversion error when importing SVG into blender. As you can see in the picture, the mesh is complex, so I think, it's hard to make a material. is there a way to remove the dirty mesh inside the shape?

Im importing and svg file and when i go to edit mode get some 1000's mesh and edges,etc. Is there a file to get a clean mesh. Image is attach object mode look fine but when turn to edit mode 1000's of mesh. Is there any other file format which we can get a clean mesh.    blender file   file disappear


In advance: newbie here, thanks for your help! I used to play around with NURBS in Maya and loved this feature where I could mold the object like clay- pushing and pulling with a red/yellow mapping of the strength. Though, I don't remember what the tool is called or if its even the same for mesh/Blender. I have a model I want to move uniformly instead of just the faces/vertices I select- which gives long, hard lines instead of a gradient. Example: I need to move the arm up in a T-pose, but if I select it to rotate and generally manipulate it, there's an unnatural edge to where my selection starts/ends. How do I get the option to click a point, see the radius of strength, and then push/pull so it moves all in the radius uniformly?

I have moved multiple vertices gradually but a set of vertices at a time not all at a time, as shown in the animation below (First I moved the four vertices from top, then three, then two and at last the last vertex).  I wanted to do the same thing as shown in the animation below but all at a time.


Say I have a mathematical function that I want a neural network to learn (a realistic and helpful example would be trigonometric sine() ). Due to mathematical functions' consistency, as opposed to a data set that has human-related aspects (such as handwritten letters), will neural networks understand and train to a higher degree of success in a lower epoch count when compared to a neural network for, say, digit recognition?   How would training data for something such as sine() look like? Would it simply be a random input n, and the desired output be sine(n)? Or would the training data be similar to something like the MNIST-data set: consisting of a limited amount of constant inputs and desired output that would be run over by several epochs? Are there any known optimizations for neural networks to learn mathematical functions?  Thanks

I understand that neural networks (NNs) can be considered universal approximators to both functions and their derivatives, under certain assumptions (on both the network and the function to approximate). In fact, I have done a number of tests on simple, yet non-trivial functions (e.g., polynomials), and it seems that I can indeed approximate them and their first derivatives well (an example is shown below).   What is not clear to me, however, is whether the theorems that lead to the above extend (or perhaps could be extended) to functionals and their functional derivatives. Consider, for example, the functional: \begin{equation}     F[f(x)] = \int_a^b dx ~ f(x) g(x) \end{equation} with the functional derivative: \begin{equation}     \frac{\delta F[f(x)]}{\delta f(x)} = g(x) \end{equation} where $f(x)$ depends entirely, and non-trivially, on $g(x)$. Can a NN learn the above mapping and its functional derivative? More specifically, if one discretizes the domain $x$ over $[a,b]$ and provides $f(x)$ (at the discretized points) as input and $F[f(x)]$ as output, can a NN learn this mapping correctly (at least theoretically)? If so, can it also learn the mapping's functional derivative?   I have done a number of tests, and it seems that a NN may indeed learn the mapping $F[f(x)]$, to some extent. However, while the accuracy of this mapping is OK, it is not great; and troubling is that the computed functional derivative is complete garbage (though both of these could be related to issues with training, etc.). An example is shown below.  If a NN is not suitable for learning a functional and its functional derivative, is there another machine learning method that is?  Examples:  (1) The following is an example of approximating a function and its derivative: A NN was trained to learn the function $f(x) = x^3 + x + 0.5$ over the range [-3,2]:   from which a reasonable approximation to $df(x)/dx$ is obtained:   Note that, as expected, the NN approximation to $f(x)$ and its first derivative improve with the number of training points, NN architecture, as better minima are found during training, etc.  (2) The following is an example of approximating a functional and its functional derivative: A NN was trained to learn the functional $F[f(x)] = \int_1^2 dx ~ f(x)^2$. Training data was obtained using functions of the form $f(x) = a x^b$, where $a$ and $b$ were randomly generated. The following plot illustrates that the NN is indeed able to approximate $F[f(x)]$ quite well:    Calculated functional derivatives, however, are complete garbage; an example (for a specific $f(x)$) is shown below:   As an interesting note, the NN approximation to $F[f(x)]$ seems to improve with the number of training points, etc. (as in example (1)), yet the functional derivative does not.


I am reading jshint source code and found return void error("E009"); line.  I know void means return nothing in languages such as C and C++. But what does it mean in javascript and how can it be used? Or is it good practice to use it in Javascript?

I've seen some people using void operator in their code. I have also seen this in href attributes: javascript:void(0) which doesn't seem any better than javascript:;  So, what is the justification of using the void operator?


I have checked out the questions that seem to be related to this issue but none of the suggested fixes work. Here is the output from the following command:  sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following extra packages will be installed:   libc6-dev-i386   The following NEW packages will be installed:   libc6-dev-i386   0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.   87 not fully installed or removed.   Need to get 0 B/1,148 kB of archives.   After this operation, 6,333 kB of additional disk space will be used.   Do you want to continue? [Y/n] y   (Reading database ... 484101 files and directories currently installed.)   Preparing to unpack .../libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb ...   Unpacking libc6-dev-i386 (2.19-0ubuntu6.6) ...   dpkg: error processing archive /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb (--unpack):   trying to overwrite '/usr/include/bits', which is also in package libc6-dev-amd64 2.19-0ubuntu6.6   Errors were encountered while processing:   /var/cache/apt/archives/libc6-dev-i386_2.19-0ubuntu6.6_amd64.deb   E: Sub-process /usr/bin/dpkg returned an error code (1)     I have tried to fix this with the following command:   sudo apt-get clean   It just returns and has no apparent effect on the problem.  Ultimately I would like to remove the i386 cross-compile libraries since I no longer use this machine for development except for occasional stuff in which the native 64bit environment is sufficient.    Any takers?  Cheers!!

For example:  $ sudo apt-get install curl Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these: The following packages have unmet dependencies: bsh : Depends: libjline-java but it is not going to be installed groovy : Depends: libjline-java but it is not going to be installed rhino : Depends: libjline-java but it is not going to be installed E: Unmet dependencies.   Try 'apt-get -f install' with no packages (or specify a solution).   I get the same or similar errors when I attempt to install clojure1.3, leiningen, and several other packages.   When I try the suggestion made in the error message, this is what happens:  $ sudo apt-get -f install  Reading package lists... Done Building dependency tree        Reading state information... Done Correcting dependencies... Done The following packages were automatically installed and are no longer required:   diffstat linux-headers-3.2.0-26-generic linux-headers-3.2.0-26 dh-apparmor dkms html2text libmail-sendmail-perl libsys-hostname-long-perl Use 'apt-get autoremove' to remove them. The following extra packages will be installed:   libjline-java Suggested packages:   libjline-java-doc The following NEW packages will be installed:   libjline-java 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. 23 not fully installed or removed. Need to get 0 B/72.0 kB of archives. After this operation, 129 kB of additional disk space will be used. Do you want to continue [Y/n]? Y (Reading database ... 226243 files and directories currently installed.) Unpacking libjline-java (from .../libjline-java_1.0-1_all.deb) ... dpkg: error processing /var/cache/apt/archives/libjline-java_1.0-1_all.deb (--unpack):  trying to overwrite '/usr/share/java/jline.jar', which is also in package scala 2.9.2-400 Errors were encountered while processing:  /var/cache/apt/archives/libjline-java_1.0-1_all.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  $ sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  bsh : Depends: libjline-java but it is not installed  groovy : Depends: libjline-java but it is not installed  rhino : Depends: libjline-java but it is not installed E: Unmet dependencies. Try using -f.


I have bash shell script which is internally calling python script.I would like to know how long python is taking to execute.I am not allowed to do changes in python script. Any leads would be helpful thanks in advance.

I want to execute something in a linux shell under a few different conditions, and be able to output the execution time of each execution.  I know I could write a perl or python script that would do this, but is there a way I can do it in the shell? (which happens to be bash)


I have been trying to find an answer to the question below, but never found any of the answers in google search to be satisfactory.  I know the bullet is lighter in mass as compared to stone. Maybe the bullet exerts a smaller force on the window glass than the stone or may be the stone has a larger area of contact with window, but I cannot relate any of these facts to some law in Physics.  Question  Why does a bullet fired from a gun make a clean hole with minimum cracking/shattering in a glass window but a stone thrown at a similar window shatters the glass? I am assuming that the glass is not bullet proof but just regular window glass.

One can often see (hopefully only in the movies) that a bullet shot through a pane of window glass leaves a hole in it, but overall the glass is left largely intact. However, a low-speed projectile, e.g., a stone thrown into a window would probably shatter the glass completely. Is there a critical speed below which a bullet would shatter the whole window pane instead of piercing a hole?


Which of the following sentences is correct according to English grammar and usage? (Note: this was asked in an examination and I have to select only one of the four sentences.)     1) The fishermen, whom the flood victims owed their lives, were rewarded by the government.      2) The fishermen, to which the flood victims owed their lives, were rewarded by the government.      3) The fishermen, to whom the flood victims owed their lives, were rewarded by the government.      4) The fishermen, that the flood victims owed their lives, were rewarded by the government.   I think it is 1) or 3), but I’m not sure which. Is “to” required before “whom” in a sentence like this?

I believe it's okay to end a sentence with a preposition. That seems to be the consensus  as well.   Now I think that when who is the object of a preposition, it should technically be whom, e.g. "To whom it may concern..."   So, is it acceptable to use whom and have a preposition at the end of the sentence? Which of the following sentences are okay:   Who are you talking to? Whom are you talking to? To whom are you talking?


Should we approve edits that do nothing except adding relevant links to Wikipedia pages that correspond to the topic being discussed?  Case in point-  just adds 2 Wikipedia links, which IMO does clearly improve the post which is the standard for approving edits. However, if that sets a precedent, similar edits can then be made to a large number of SE posts.

So, I've been rejecting the addition of resources/hyperlinks to posts simply because I had no idea that this was an acceptable practice.  Today, I was browsing through the edits page and saw:     Some common reasons to edit are:         to fix grammatical or spelling mistakes   to clarify the meaning of a post without changing it   to correct minor mistakes or add addendums / updates as the post ages   to add related resources or hyperlinks      Why is this an acceptable practice?  I can see adding links to official documentation, but the quality of outside resources is (potentially) subjective.  I see the merit in adding resources, but it seems to me that these additional resources should be placed in comments, not inserted into the post via an edit.  Anyone have thoughts on this?


So this is the first time I've done this in Blender opposed to using PMX Editor. I wanted a model to have legs and a skirt instead of the jeans she originally had so I added them and removed the bones that came with the legs. I have deleted the extra vertex groups it created and now none of the bones work.  How do I go about fixing this? I have included the Blender file. Any help would be absolutely amazing.

My issue is that I have a blender file in which cameras and lamps do not move when I attempt to rotate them using the mouse. If I select the objects (in object mode), press R, and move the mouse in the viewport, the lamps and cameras don't respond; they remain in the same orientation as when I started, no matter how vigorously I try to move the mouse. The values in the information bar show that the mouse is communicating. If, however, I manually enter a new value for the amount of rotation in the properties shelf of the viewport, the camera moves to the new orientation.  On a new default Blender scene, the cameras and lamps do respond to commands to rotate and scale using the mouse. I've compared all of the settings I can think of, and don't see anything obvious that corrects the problem.   is available.


I've (programmatically) created a custom module which includes a block with a string wrapped in the $this->t() function. How or where can I extract this translation file?  In Drupal 7 I would extract a translation file of the custom module, but the POTX module is not ported to Drupal 8 yet.  public function build() {   return array(     '#markup' => $this->t('How and where can I translate this string?'),   ); }

Where is the page in the administrative section where I can put the translations in Drupal 8?


I'm trying to plot a few curves that show some singularity close to the ends of the abscissas axis. This works fine with samples=500 but it takes quite some time to create the plot. Is there a way to have "biased sampling" (say, to have a higher sampling rate close to some point of interest)? This is the MWE, and the image of the plot.  \documentclass{article} \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture}     \begin{semilogyaxis}[         width=8cm,         legend style={font=\footnotesize, at={(0.98,0.98)}, anchor=north east, draw=none,                         /tikz/every even column/.append style={column sep=0.2cm}},         legend columns=2,         every axis y label/.style={at={(current axis.north west)},xshift=-10pt,rotate=0},         every axis x label/.style={at={(current axis.south)},yshift=-10pt},     ]      \addplot [mark=none, domain=0.00001:0.99999, samples=50] {1/(2*x-2*x^2)};     % E2/E1 = 3     \addplot [mark=none, domain=0.00001:0.99999, samples=50] {-((1 + 2*x*(4 + x*(-5 + 2*x)) + sqrt(1 + 4*x*(-2 + x*(17 + x*(-38 + x*(41 + 4*(-5 + x)*x))))))/(-1 - 2*x*(4 + x*(-5 + 2*x)) + sqrt(1 + 4*x*(-2 + x*(17 + x*(-38 + x*(41 + 4*(-5 + x)*x)))))))};     % E2/E1 = 9     \addplot [mark=none, domain=0.00001:0.99999, samples=50] {-((1 + 26*x - 34*x^2 + 16*x^3 + sqrt(72*(-1 + x)*x + (1 + 2*x*(13 + x*(-17 + 8*x)))^2))/(9*x*(-3 - 2*(-2 + x)*x) + (-1 + x)*(1 + 2*x^2) + sqrt(72*(-1 + x)*x + (1 + 2*x*(13 + x*(-17 + 8*x)))^2)))};     % E2/E1 = 27     \addplot [mark=none, domain=0.00001:0.99999, samples=50] {-((1 + 80*x - 106*x^2 + 52*x^3 + sqrt(216*(-1 + x)*x + (1 + 2*x*(40 + x*(-53 + 26*x)))^2))/(27*x*(-3 - 2*(-2 + x)*x) + (-1 + x)*(1 + 2*x^2) + sqrt(216*(-1 + x)*x + (1 + 2*x*(40 + x*(-53 + 26*x)))^2)))};     % E2/E1 = 81     \addplot [mark=none, domain=0.00001:0.99999, samples=50] {-((1 + 242*x - 322*x^2 + 160*x^3 + sqrt(648*(-1 + x)*x + (1 + 2*x*(121 + x*(-161 + 80*x)))^2))/(81*x*(-3 - 2*(-2 + x)*x) + (-1 + x)*(1 + 2*x^2) + sqrt(648*(-1 + x)*x + (1 + 2*x*(121 + x*(-161 + 80*x)))^2)))};     % E2/E1 = 243     \addplot [mark=none, domain=0.00001:0.99999, samples=50] {-((1 + 728*x - 970*x^2 + 484*x^3 + sqrt(1944*(-1 + x)*x + (1 + 2*x*(364 + x*(-485 + 242*x)))^2))/(243*x*(-3 - 2*(-2 + x)*x) + (-1 + x)*(1 + 2*x^2) + sqrt(1944*(-1 + x)*x + (1 + 2*x*(364 + x*(-485 + 242*x)))^2)))};          \legend{ $1$ \\ $3$ \\ $9$ \\ $27$ \\ $81$ \\ $243$ \\ }      \end{semilogyaxis} \end{tikzpicture}  \end{document}

See this example code:  \documentclass{article}  \usepackage{pgfplots} \pgfplotsset{compat=1.10} \begin{document}   \begin{tikzpicture}     \begin{axis}[                  xmin=-0.1,                  xmax=1.1,                  ymin=-1.1,                  ymax=1.1,                  domain=0:1,                  samples=30                 ]       \addplot[blue] {sqrt(x)};       \addplot[purple] {-sqrt(x)};     \end{axis}   \end{tikzpicture} \end{document}   The result appears acceptable far from zero, but near zero it's too much undersampled:    Increasing samples value makes the plot nice, but it considerably slows down processing. As a workaround I could just plot the inverse in a parametric plot (i.e. (y^2,y)), but in my actual code it'd require quite a bit of additional work.  Is there a way to provide a custom sampling function or specify different density of samples in different parts of the domain?


How can I tell if my Ubuntu is hacked or been compromised? I'm starting to think it is because I keep overhearing my neighbors talked about something I just posted on a site. They've said many details that matches what I just wrote and I was weirded out. Next, my sister came to me saying something about how I should stop something and that she was worried. She wasn't at home when I used my laptop. I even locked the door so no one can take a peek at what I'm doing.  Is there any way I could see signs of hacking or snooping on my laptop? Like typing a few commands on a terminal but more revealing, for a lack of better word? I only know dmesg, who and last/lastlog and would wish for more commands or packages that would help me know what happened here?   I have read about key loggers, but not screen loggers, is there any information about this?

How could I know if there's a keylogger in my system, or at least if one is active right now?


I am given a text that is placed on top of a background of a given color. I need a way to determine the monochrome color the text should have to ensure the text's maximum visibility.   My intuition: take the background color, invert it and make it monochrome - this is the color the text should have. Is this correct? This does seem to work, but I am not sure if the method is infallible. Perhaps this method does work, but there is a simpler way to do this?

Because of the recent Web accessibility Law in my region, I need to ensure I'm designing with an appropriate contrast ratio.  WCAG says the value of this ratio is 4.5:1    How do I figure this out in in Photoshop and Illustrator?


Sometimes I have asked a question which got no answers, but is answered in the comments to the question.  How should I handle these questions? I can't accept an answer, so it is never an accepted question.  For example this one:   (ok here the answer in the comments is from me, but nevertheless I also have others of them)

I'm trying to go through and provide answers to every unanswered question (search "closed:0 answers:0"), somewhat following the spirit that was blogged about at  .  However, I'm finding this much more difficult than it needs to be, as many of the questions have already been answered without the use of an "answer" - but instead, in the form of a comment by either the OP or another poster. I wouldn't mind reading through and skipping these, as long as there was some appropriate action I could take to at least assist with preventing these questions from being seen again from the same query - either by myself or another SO member.  Is there such an appropriate action?  Should we vote to close?  If so, using what reason? Even if I vote to close, what are the chances that 4 other users will also view the question and also vote to close?  (i.e., will my individual vote even do any good?  Is there any report to show recent close votes, so that others may also review and contribute supporting close votes?) Should we post some sort of an answer - even just something to the effect of "this was already answered by the OP's own comment to his answer (above)"? Would something like this be appropriate to flag for moderator attention, and let the moderators deal with it?  (Or would this be considered too trivial?) Should we rename the question title to something standard that can be used in a search exclusion?  (Maybe "SOLVED:"?)  Basically, how can I help to denote questions as "This question is no longer in active search of an answer - though better answers may still be appreciated."? I've already reviewed , which was closed as a duplicate of  - but this requires effort on part of a user who may very likely no longer be active. Otherwise, is there something I should be doing to improve my search to filter out these types of questions? I've run across this many times, so I don't consider it to be a rare issue.  However, the last question like this I just ran across, prompting this question, was .  In this case, the question was self-answered by the OP in the form of a comment, this question is the OP's only question, the OP has no other visible activity on SO, and the OP hasn't been seen on SO since he registered and posted the question 5 months ago. Another one I just ran across is .  However, here the "answer" comment was posted by a reputable and recently active SO member.  Should I leave a comment directed at him, asking him to re-post his comment as an answer, or should I post my own answer echoing his comment?  (Or something else?) Yet another is .  Interestingly, the OP actually self-edited the question to include the "SOLVED:" prefix on to the question, instead of posting his resolving comment as an answer (and ideally accepting it) as he was asked to do by another comment.  This brings up another good idea - is there a "standard" we should use to rename the titles on these "resolved but unanswered" posts that could be used as a search exclusion?  (Also added to the above list.)


I simply do not get the "All Mailboxes" mailbox icon in the mailbox panel of OSX. I followed the directions here:  So I restarted Spotlight indexing, then deleted the Mail envelope files in accordance with the advice on macobserver. This caused a rebuild of Mail data with a long progress bar and restored functionality but only temporarily. After some time, generally after closing and reopening the clamshell on my MBP, Mail search fails again and requires a logout/login to fix. Search from Spotlight fails as well as from within Mail. I have Siri off, and has always been. I can't imagine what else could affect specifically Mail search when search works in other contexts, and worked previously. This problem affects a 2015 MBP and an older Mac Mini that fails after some time sleeping. Logout/login restores functionality here as well, but only temporarily.

As an online shopper, I regularly use Amazon to purchase lots of stuff.  When I reconcile my credit card spending, I use Mail.app to search all mailboxes for specific dollar figures (e.g. command-option F, then type 24.95). Prior to Big Sur, finding dollar figures in Mail.app worked perfectly, whether the email messages resided "On My Mac" or on iCloud.  However, since Big Sur, doing a global Mail.app search for numeric strings, especially with a decimal point, doesn't work reliably. For example, I'll do a global search in Mail.app for 65.88 and I'll get one result from a locally archived message from years ago, however a very recent message in my InBox containing that figure is not found.  When I do a single message search (command-F) looking for 65.88, the value IS found. Unsurprisingly, using Spotlight delivers the exact same results. Using mdutil, I've manually erased and rebuilt the Spotlight index, rebuilt my Mail.app mailboxes, deleted all ~/Library/Mail/V8/MailData/Envelope* files to force the Mail.app to re-import everything, and reinstalled Big Sur.  I've also confirmed all my Spotlight settings to assure that Mail and Messages are included in searches, and that the volume where my mail resides is not excluded.  Nothing worked. I should note that I am using one SSD for macOS, and a separate SSD for my Home directory (c/o "Advanced Options" under Users & Groups).  I've had this setup well before Big Sur, again, without any issues. Interestingly, I tried using the Spark email app, which DID successfully find dollar figures without any issue.  I suspect that Spark is not relying on Spotlight to obtain search results, and that's why it works.  (I would use Spark, however it doesn't support local mailboxes.) I've already sent Apple a report using the Feedback Assistant, and I can only hope something will get fixed. Can anyone else confirm this issue with Mail.app on Big Sur?  Any ideas on what else I can do?


I'm new to C++, and this question will probably seem trivial to many, but please keep in mind I am just starting the C++ language. I have assigned a variable x to equal 20 and want to concatenate it with a string. My C++ code is below. #include <iostream> #include <string> #include <cmath> using namespace std;  int main() {   int x = 20;   int y = 15;   if (x >= y) {     cout << x + " is greater than " + y;   } }  My expected outcome would be 20 is greater than 15, but what instead comes up is some odd é@. I'm confused, and I couldn't find a solution on GeeksForGeeks, w3schools, or the rest of SO. I understand that using cout << x << " is greater than " << y; works just fine, but I'm not sure why concatenation doesn't work here. Also, why do these odd characters come out instead? Thanks in advance. (Also, please don't leave an answer without answering the question. I remember when starting JS I asked a question and the only answer was "don't use document.write." While I get that, it would be far better to actually answer the question and put that as a side note.)

I thought this would be really simple, but it's presenting some difficulties. If I have std::string name = "John"; int age = 21;  How do I combine them to get a single string "John21"?


Anyone one of you has or have? Anyone should be using has, but you should be using have. What about anyone of you?

Am I using any of correctly in these sentences?  Any of its members are admitted. Any of its members is admitted.


Yesterday my brother's computer was showing ads on almost every site, the same ads in the bottom right corner with a black close button. Today, my computer started showing them. I use the same network with him but as a public network to minimize the risk of network infection. The problem is that I NEVER install software from suspicious sources. Does anyone know something about this virus? I have some screenshots for some legit sites with those ads. So my computer is infected, no suspisous Chrome extensions or addons. Any suggestions? Thanks.

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


By this evening, I was able to use CMD just fine. However, just now, whenever I try to access CMD I see the following error.    Before this error, the window would just open up and close and spawn a process named SoundMixer.exe in Task Manager. So, I went ahead and deleted it since it was probably a virus. Any help as to how I can fix this would be greatly appreciated as soon as possible.


Suppose M is a topological space which is Hausdorff and second countable. Can we say that M can be written as countable union of compact sets? Since M is second countable it has a countable basis.Then how can we find those compact sets or how can we find the counter example?

Today in measure theory, we introduced the concept of a $\sigma$-compact set, which is a set which can be expressed as the countable union of compact sets.   Since the set of $\sigma$-compact sets seemed to be very large (I couldn't think of a not $\sigma$-compact set), I asked for a set which is not $\sigma$-compact, but our instructor couldn't come up with a set, which he didn't have to explicitly construct with the axiom of choice, for which we didn't have time.     My question is if there is such an set which can be constructed without the axiom of choice.


As a DBA - assuming my users are knowledgeable with PLSQL and SQL - why would I not grant my users privileges to compile and run their own PLSQL code. We have an MI database environment where the data has undergone ETL. The tables contain a large numbers of rows but not necessarily large rows in size. The analysis - will be - I assume of calculus in nature. The users are wanting to run their own code on the data for the purposes of ad-hoc analysis - within their own schemas. They come from a SAS background which from my understanding has allowed them to write and run their own analysis of data. Albeit, SAS runs on its own dataset - extracted from Oracle or elsewhere.  In my opinion this is a dangerous set-up - but without answering my own question - what are the pitfalls?


How can I use column Formatting on Stackoverflow. I have tried the stackoverflow help but could not found anything related. For example:  I have this data in column style.   Name      Address       City       Country   John      street 26     Paris      France   Darin     blck 2        Dubai      UAE     and so on.

I want to use a table in my answer. e.g  |-------------|----------------| | ShortCut    | Description    | |-------------|----------------|  I have posted an answer , which requires this kind of formatting.   Is it possible to have such formatting in stackoverflow Questions & answers ?    If yes, How ? If no, why ?   Edit : I tried to use following code directly in editor of SO. But it didn't work for me.

 hello	 hello2

 hello3	 hello4


I removed the lens to show to the shutter release. While putting the lens back on I didn't place it correctly on the first attempt. Also, when I removed the lens, the camera was on and possibly in live view.   Now, the aperture doesn't change while in Live View mode. (Yes, I'm holding down the -/+ button. Also while it is on manual.) I can only change the aperture while in viewfinder mode.  Did I mess something up? Or is it in the settings somewhere?

I just bought a Nikon d5100 and everything seems to be working pretty fine. Except for the fact that I am unable to preview the shot I'm willing to take. When I turn my LCD it shows me what the camera is seeing. But when I change settings like iso, f stop etc and try to see how it has affected my frame, the LCD just doesn't show it. It still shows me what my camera is seeing.  If there are any adjustments I need to make in the settings please let me now. I would like to see how the change in iso or f stops would affect my image even before I click like in Canon, on my LCD. The reason I'm stressing on the same point again and again is because someone asked this question earlier and most of the people who replied didn't understand the question.


I am unable to use Pivot in SQL server due to some compatible issues, so I am trying do same thing in code level by using LINQ TO SQL.  I have a record set as like below.  Dates           RM      DM      LocationNum     City        State   Count -----           --      --      -----------     ----        -----   ----- 2013-12-13      1       1       4795            Grapevine   TX      1 2013-12-13      1       2       4796            Grapevine   TX      1 2013-12-14      2       3       4797            Grapevine   TX      1 2013-12-15      NULL    NULL    NULL            NULL        NULL    0 2013-12-16      NULL    NULL    NULL            NULL        NULL    0      I am trying to convert this in   RM  DM  Loc     City        2013-12-13      2013-12-14  2013-12-15  2013-12-16   --  --  ---     ----        ----------      ----------  ----------  ---------- 1   1   4795    City1       1               0           0           0 1   2   4796    City2       1               0           0           0 1   3   4797    City3       0               1           0           0   Can any one help me in this.


I read from the link proving that the inverse element in associative structure should be unique. However, it's only proving that should there exist a left and a right inverse element, then they should be identical. And I remember reading examples in non-commutative rings (so there should also be a similar case in monoids), an element has multiple multiplicative left inverse elements. But I'm not quite sure anymore. Could anybody reproduce such an example?  Also, interestingly, even for non-commutative groups, the inverse element is unique. Does all of this have to do with the fact that every element in the group is assigned with an inverse element?

I'm trying to find a ring which has an element that has many(more than two) distinct left inverses.  I first tried the (square) matrices but then realized that if a matrix is a left unit, then it has determinant greater than 0, thus it is also a right unit and has unique inverse.  And then next I tried to do it with functions with usual addition and composition, and I found this example(in the first answer, by user23211):   But I realized that the space of functions does not form a ring since the distribution law fails.  To make distribution law hold, we can only have homomorphisms; while the elements in the above example are not.  I also have seen that we can construct a similar examples with infinite vector spaces, but they are not rings.  Is there any ring like this?


select * from aa  update aa set City='chennai',LastName='vinoth';  ID  FirstName  LastName  City 29  Abcrdrr    vinoth    chennai 1   John       vinoth    chennai 2   Joe        vinoth    chennai 35  raja       vinoth    chennai 38  Johsdfgn   vinoth    chennai   I have wrongly updated Lastname, City columns in all the rows. Now I want to rollback to the old table rows.   Using SQL-Server 2008R2.

I mistakenly deleted around 2,000,000 records from a remote SQL Server 2008 table.  The server is not granting me access to the backup files on the server side.   Is there any way to get back these records?


The neutrino decoupling and the photon decoupling happened after the big bang, though at different times. The CMB is very detectable, and although there is no universal reference frame, the CMB is quite often used as some kind of a reference frame.    Now theoretically it is possible that in the future we will be able to detect the CNB, though these neutrinos are much less energetic then the ones currently detected.     Big Bang cosmology makes many predictions about the CνB, and there is very strong indirect evidence that the cosmic neutrino background exists, both from Big Bang nucleosynthesis predictions of the helium abundance, and from anisotropies in the cosmic microwave background.     My question is whether the CNB should be comoving with the CMB or, different from the CMB?  Question:   Should the CNB be comoving with the CMB?

It is well known that there exists a reference frame where the total momentum of the Cosmic Microwave Background is zero (a basic fact of special relativity applied to a collection of massless particles) and the radiation is homogeneous and isotropic. This can be observed in the dipole anisotropy.  Neutrinos also decoupled from matter shortly after the Big Bang, and therefore relic neutrinos must form a Cosmic Neutrino Background ($\mathrm{C}\nu\mathrm{B}$). These neutrinos are extremely hard, if not impossible, to detect with current technology.   The $\mathrm{C}\nu\mathrm{B}$ also defines a reference frame of zero total momentum. Is it expected that this reference frame is coincident with that of CMB?


If you have a chain that is a well order (all well orders are chains), then $Aut(C)$ is trivial. I'm asking if the converse is also true.

While grading some papers and thinking about a question related to well-orders (in particular, pointing a mistake in a solution), I came to think of a reasonable characterization for well-orders. I can immediately see it's true for countable orders, but not for uncountable orders.  Definition. Let $\cal L$ be a first-order language, and $\cal M$ an $\cal L$-structure. We say that $\cal M$ is rigid if $\text{Aut}(\cal M)=\{\rm id\}$.     Conjecture. Let $\cal L=\{<\}$. Then $\mathcal M=\langle M,<\rangle$ is rigid if and only if it is a well-order or its reverse order is a well-order.   One direction is trivial. Well-orders are rigid (and therefore their reversed orders are rigid as well). In the other direction, if $\cal M$ is countable, then it is easy. Suppose it's not a well-order.   If $\cal M$ contains a convex copy of $\Bbb Z$ then fix everything else and shift that copy by $1$. Otherwise $\cal M$ contains a convex copy of $\Bbb Q$ and then we can shift that copy by $1$ (or multiply it by $\frac12$, whatever floats your boat).   The problem is that for uncountable order types the plot thickens and they might be $\kappa$-dense, so neither of the arguments would work (and there is no additive structure - that I know of - that we can exploit like in the countable case).     Question: Does the conjecture hold, or is there some intricate counterexample?


I try to write a program in arm assembly, which writes whole char** argv content. In C it would be like so:  #include <stdio.h>  int main(int argc, char** argv) {     for (unsigned int i = 0; argv[i] != 0; i++)         puts(argv[i]);     return 0; }   and I wrote it in assembly like this:   .global main  .data  .bss  .text  .align 4  @r0 = argc @r1 = argv  main:         @prologue         stmfd sp!, {fp, lr}         add fp, sp, #4         sub sp, sp, #8          @i = 0         mov r0, #0         str r0, [fp, #-8]         b loop_begin  loop_content:         bl puts         ldr r0, [fp, #-8]         add r0, r0, #1         str r0, [fp, #-8]  loop_begin:         @r0 = i         ldr r0, [fp, #-8]          @i = i * 4         lsl r0, r0, #2          @r0 = argv + i         add r0, r1, r0          @r3 = argv[i]         ldr r0, [r0]          @argv[i] == 0?         cmp r0, #0          @if arvg[i] != 0 go to ...         bne loop_content          mov r0, #0         sub sp, fp, #4         ldmfd sp!, {fp, lr}         bx lr   but it gives me segfault at           str r0, [fp, #-8]   I have no idea why, do you have any ideas why does it happen?

It's been a while since I last coded arm assembler and I'm a little rusty on the details. If I call a C function from arm,  I only have to worry about saving r0-r3 and lr, right?  If the C function uses any other registers, is it responsible for saving those on the stack and restoring them? In other words, the compiler would generate code to do this for C functions.   For example if I use r10 in an assembler function, I don't have to push its value on the stack, or to memory, and pop/restore it after a C call, do I?  This is for arm-eabi-gcc 4.3.0.


For example, let $p = 3$ and $q= 11$, choose $e = 3$. What computation I have to apply in order to find the corresponding $d$? I know it's 7, but I want to know the exact process to be applied to find it.

What is the definition of textbook or "raw" RSA?  What are some of the properties of textbook RSA?  How does it differ from other schemes based on RSA?


If $m_1 , m_2, \cdots m_n$ are natural numbers where at least one of them is not a perfect square, then how do I prove that the sum $$\sqrt{m_1}+\sqrt{m_2}+ \cdots + \sqrt{m_n}$$ is irrational? I'm hoping to prove this using methods from pre-calculus level algebra.

Can a sum of a finite number of square roots of integers be an integer? If yes can a sum of two square roots of integers be an integer?  The square roots need to be irrational.


The  gave mass to other particles via spontaneous symmetry breaking; does this mean it gives mass to all particles that have mass - such as neutrinos, quarks or weak bosons and strong bosons (gluons)?  In the articles I've seen its not clear what the criteria is for the Higgs Field to couple to particles to give mass; Anna v's answer suggest that electo-weak vertexes are required; but the linked article suggests it also couples to quarks.

I'm not a particle physicist, but I did manage to get through the Feynman lectures without getting too lost. Is there a way to explain how the Higgs field works, in a way that people like me might have a hope of understanding?


I'm creating a project where I have a Django server sending JSON data to a template which has Vue.js running on it. The JSON data is sending values with a trailing space after them which is causing problems. I'd like to remove them on the HTML page if possible.  I've tried using Javascript.trim() on the JSON data which didn't seem to have any effect. I also can't strip the entire JSON file of whitespace, since some values need to have whitespace in them.  I am trying to remove whitespace from {"keyword" : "value"} sets. The "value" section sometimes has "value " or " value" in them.  This won't work <option value="And">And</option>  But this will <option value="And ">And</option>   The JSON object contains  "keyword": "And "   Instead of  "keyword": "And"   I expect the  tag to work regardless of the whitespace surrounding the value in the data.  Edit: I can't use Javascript's trim() function, since there are dozens of occurences of the issue in the JSON data. Looping through the data and trimming each individual string would significantly increase the load times for the page.  Edit2:  <b-form-select for="action-text" v-model="step.keyword" class="mx-3">     <option value="Given ">Given</option>     <option value="When ">When</option>     <option value="Then ">Then</option>     <option value="And ">And</option>     <option value="But ">But</option> </b-form-select>   Where in this would I do as needed trimming?

How do I trim a string in JavaScript? That is, how do I remove all whitespace from the beginning and the end of the string in JavaScript?


I have a Divine Soul Sorcerer 6 (with INT 13) playing in a published adventure.   I just found a spellbook with 11 spells in it of varying levels. All are wizard spells, and some of the spells are also on the sorcerer and cleric spell lists, to which I have access.  The specific spellbook can be found in this adventure and location:      Waterdeep: Dungeon of the Mad Mage, level 1, in the bugbear area.   The specific spells are:      1st level spells (x4): , , ,   2nd level spells (x3): , ,   3rd level spells (x2): ,   4th level spells (x1:    If I were to multiclass into Wizard, what do my options become for using this spellbook?    More precisely, if I were to take 1 level in Wizard,  can I then cast the spells in this book, assuming of course I have the required spell slots/abilities from my Sorcerer levels?  Please note that my question is specifically regarding the found spellbook and how I can go about using it.  is not a duplicate because it is only talking about copying spells into another wizard's book. I'm looking for all options available to me to use the book and I'm not assuming copying is a requirement.

Sam is a level 8 sorcerer that takes 1 level of wizard for his 9th level. He now has a wizard spellbook and all that.  Walter the level 9 wizard has a thought. Walter hands Sam his own spellbook for a day.   Can Sam prepare the 5th level wizard spells in Walter's book? He has the spell slots and the book has the spells.      Not in the scope of the question:  Number of spells preparable. Sam is a level 1 wizard with Int 14 - so, three spells.  Walter is a curious wizard who is willing allowing this to happen.  Sam can read the language in Walter's spell book.


I am currently experiencing a very obvious artifact that occurs when looking at objects on very grazing angles  Here is a picture of the artifact:   I noticed that the issue was coming from my implementation of Cook-Torrance's Specular BRDF.   Here is the equation for the Cook-Torrance Specular BRDF:    More specifically, calculating the denominator is causing the issue:  float denominator = 4 * max(dot(viewDir, normal), 0.0) * max(dot(lightDir, normal), 0.0) + 0.001;  // Prevents any division by zero   When I change the calculation of dot(viewDir, normal) to dot(halfway, normal), the artifact disappears:  float denominator = 4 * max(dot(halfway, normal), 0.0) * max(dot(lightDir, normal), 0.0) + 0.001;  // Prevents any division by zero   But this equation is no longer correct. I was wondering if anyone knows why my implementation causes these artifacts?  If you want to see my fragment shader you can find the code here:    Thank you!


I want to serve both vector and raster data sets of large volume (ex: for a country).  Right now I'm using GeoServer for vector and MapServer for raster.   Is there any literature or reference such that which server is better for servicng vector data and raster datasets?   I got some reference from  and .

I currently know the following open source GIS servers:   : java based, vector and bitmap support, also supports. Is now on par with mapserver (performance-wise). : c/c++, used to be the fastest server. Better for raster than vector? : do not know this : the new kid on the block? do not know much about it, but it looks appealing : as far as i know, only retrieves vector-data for display in openlayers. There does exist a rails implementation.   If possible i would like some kind of comparison, which did you choose or prefer and why?  I am looking at building a rails website, and need some kind of GIS server. I will need raster and vector data (clickable). Is this doable with one server? Backend database will be Postgis.


(Inspired by the comments for )  Why is ls this much slower than echo *?  $ time bash -c 'for i in {1..10000}; do ls -f > /dev/null; done' bash -c 'for i in {1..10000}; do ls -f > /dev/null; done' 7.49s user 5.39s system 108% cpu 11.883 total   $ time bash -c 'for i in {1..10000}; do echo * > /dev/null; done' bash -c 'for i in {1..10000}; do echo * > /dev/null; done' 0.16s user 0.25s system 98% cpu 0.415 total   I mean, sure, ls being slightly slower than echo * makes sense, but this seems ridiculous.  Why would ls be nearly  be the case?  If it has to do with ls not needing the speed, then there's no reason for yes .  What is ls doing under the hood that makes it so slow?  (I'm using zsh on Arch Linux, on a laptop. Times are similar on bash. I've also tested on a (Linux Mint) desktop computer with similar results. (There, ls -f is faster at around 7 seconds, echo * is still about 0.4 seconds, which is still a ridiculous difference.) On Arch Linux, ls was also unaliased, but I didn't bother for Mint, and it didn't make a difference anyway.)

I'm trying to update the timestamp to the current time on all of the xml files in my directory (recursively).  I'm using Mac OSX 10.8.5.  On about 300,000 files, the following echo command takes 10 seconds:  for file in `find . -name "*.xml"`; do echo >> $file; done   However, the following touch command takes 10 minutes! :   for file in `find . -name "*.xml"`; do touch $file; done   Why is echo so much faster than touch here?


I'm new at this forum and I love it already.  I had some doubts about the usage of "or" in terms of meaning.  If we have the sentence as follows:  "No student at your school can speak Russian or knows C++"   What does this really mean?  As far as I know, this means that there is an amount of students at my school and none of them speaks Russian. And, in addition, none of them knows C++.  However, today my English teacher told me that this means that there is an amount of students at my school and none of them speaks Russian or knows C++, but not both. Therefore, some students might not speak Russian but know C++, and some others might speak Russian but not know C++.  Is my teacher wrong? Or am I wrong? This doesn't make any sense to me.  Thank you.

My wife and I are playing a game where you roll dice and move so many spaces in a grid "vertically or horizontally".   In the use of English it is very common to say, this or the other when it comes to making a choice  (exclusive or). Now I know that "or" can also be inclusive, for example "she couldn't read or write", or can be clearly used as an xor "you either come or not" making the statement true for only one of the options but not both.   My issue is where it is not clear whether it is an inclusive/exclusive or, the best example being our game.   I argue that you can move in either direction (inclusive) and the normal use of this conjunction in English should be inclusive unless specified otherwise.   Is this right?


Need a tool to analyse apex code vulnerabilities and provide solutions.

What static code analysis tools are there for apex? The only one I seem to be able to find is the Force.com Security Source Code Scanner but that has the draw back of placing your request into a queue and running it when it can. I would like something I can run locally so I can make refactoring into a number of very short cycles.


I want to use the roboto font for my document. It works nice when I compile it on my development machines. On our continous integration machine (running Jenkins) there is an old distribution of LaTeX on which I do not have influence on. Now I want to decide when to use the roboto package based upon which machine I build it. Can I do this in LaTeX or do I have to use Bash? I was thinking about using hostname for this.

How do I construct a conditional statement based on the hostname of the compiling computer in LaTeX? For example:  \ifhostname{mymachine}   \dostuff \else   \dootherstuff \fi   Why: I am working with a collaborator on a document that has dependencies on a couple files that are located in different places. I would like the document to automagically detect who is compiling it and use the appropriate file locations.


I want to write an equation with one curly brace ({) on the right hand side and, next to the curly, two statements in two different lines. How can i do it using TeX or Latex? Thanks.

How do I produce a conditional expression with large brackets? For example: X = 0 if a=1, 1 otherwise, with a large left bracket and specifying each condition in a line?


I've been searching for a good few hours on how to change the mouse speed on Ubuntu 14.04, but all the answers and tutorials I find only teach me how to adjust the acceleration and not the speed. I need to lower my mouse speed. I like a bit of acceleration, but my mouse base speed is too high which means it's hard to aim for small buttons. How do I adjust just the mouse speed, with either xset or xinput, or other tools? Command line solutions are preferable, because I suspect the GUI for mouse and touchpad settings in Ubuntu 14.04 is bugged. There isn't much available to tweak besides the double click speed and laterality (right or left-handed, see attached image).

If I go to "Settings -> Mouse & Touchpad" in Ubuntu 14.04 all the options are gone! How can I bring them back?


This seems obvious as its just saying that if the sequence has $L$ for limit when $n$ is odd and even then the sequence has $L$ for its limit. Yet, I am not quite sure how to prove this

$(z_n)_{n\in \mathbb{N}}$ is a complex valued sequence such that subsequences $(z_{2n})_{n\in \mathbb{N}}$ and $(z_{2n+1})_{n\in \mathbb{N}}$ converges to same limit.  How could I show that the sequence $(z_n)_{n\in \mathbb{N}}$ converges to the same limit using $\epsilon$, $N$ definition?    For every $\epsilon >0$,  $|z_{2n}-l|<\epsilon$ whenever $n>N_1$, and   $|z_{2n+1}-l|<\epsilon$ whenever $n>N_2$.  We want to show that for every $\epsilon >0$, there exists $N$ such that $|z_{n}-l|<\epsilon$ whenever $n>N$. I tried something like  $|z_{n}-l|\le|z_n-z_{2n}|+|z_{2n}-l|$ but wasn't sure what to do next


How do I prove that for all positive integer n, the inequality $2n\choose n$$<4^n$ holds?  Thank you!

I would like to prove the following inequality, for $n=0,1,2,...$,   $$ \binom{2n}{n}\leq 4^n.$$ I already proved it by induction, and I'm looking for another proof.


[![enter image description here][1]][1]as I applied the enumerate to generate the numbered list for my latex file, unfortunately the second page pdf output generate bit different than the first page. here is the MWE:   \documentclass{book} \usepackage{enumitem} \usepackage[utf8]{inputenc} \usepackage[english]{babel}  \setbox1=\hbox{1.} \setlist{noitemsep, topsep=0pt, parsep=0pt, leftmargin=1.8cm, labelindent=1.2cm, labelwidth=\wd1, itemindent=*, labelsep=\dimexpr0.6cm-\wd1}  \setlength{\parindent}{4em} \setlength{\parskip}{1em}  \begin{document} \pagestyle{plain}  \begin{enumerate} \item \textbf {What is Lorem Ipsum? }\\  Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.  \item \textbf {Why are you motivated?} \\  Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. \\  \item \textbf{Why is this topic interested?} \\  Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. \\  \item \textbf{Why do we use it?} \\  1. Where does it come from? 2. Where can I get some?  3. Why do we use it?  4. Section 1.10.33 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC is okay?  5. Section 1.10.33 of "de Finibus Bonorum et Malorum", written by Cicero in 45 BC is valid?   \item \textbf{Why do we use it? } \\  "At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident, similique sunt in culpa qui officia deserunt mollitia animi, id est laborum et dolorum fuga. Et harum quidem rerum facilis est et expedita distinctio. Nam libero tempore, cum soluta nobis est eligendi optio cumque nihil impedit quo minus id quod maxime placeat facere possimus, omnis voluptas assumenda est, omnis dolor repellendus. Temporibus autem quibusdam et aut officiis debitis aut rerum necessitatibus saepe eveniet ut et voluptates repudiandae sint et molestiae non recusandae. Itaque earum rerum hic tenetur a sapiente delectus, ut aut reiciendis voluptatibus maiores alias consequatur aut perferendis doloribus asperiores repellat."\end{enumerate} \end{document}  ````     [1]: https://i.stack.imgur.com/Rnm7d.png

Shouldn't the twoside option produce a wider margin at the binding/spine edge, rather than the other way around? I'm using \documentclass[twoside]{report}.


I installed Lubuntu 12.04 while I am roaming on old Dell Inspiron Pentium 4 with 1GB ram and integrated Ati graphics because I read that this distro handles 720p and more videos. Well, it looks like I was wrong because Mplayer keeps crashing. I started to think that if I update it may fix the problem. Okay, so I have data roaming but not tethering/hotspot, nor the money for it. Is there a way to download my updates to my phone (185MB approx.) then transfer to my laptop?

I have a friend who has got a computer that is not connected to the Internet. Is there any way to install software offline easily?


Text must be left.

     Please help me How can I centrally align sub div and paragraph must be left. Please refer ?

How can I horizontally center a
 within another
 using CSS?

Foo foo


the error im getting is this one -   java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.Spinner.setAdapter(android.widget.SpinnerAdapter)' on a   Im creating a game dialog where the user gets to choose a suit. It seems to be blowing up when I try to set the adapter is there anything wrong here? The app crashes.   private void showChooseSuitDialog(){         final Dialog chooseSuitDialog = new Dialog(myContext);         chooseSuitDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);         chooseSuitDialog.setContentView(R.layout.choose_suit_dialog);         final Spinner suitSpinner = (Spinner)findViewById(R.id.suitSpinner);         ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(myContext, R.array.suits, android.R.layout.simple_spinner_item);          adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);         suitSpinner.setAdapter(adapter); //        Button okButton = (Button) chooseSuitDialog.findViewById(R.id.okButton); //        okButton.setOnClickListener(new OnClickListener() { //            @Override //            public void onClick(View v) { //                validSuit = (suitSpinner.getSelectedItemPosition()+1) * 100; //                String suitText = ""; //                if(validSuit == 100){ //                    suitText = "Diamonds"; //                }else if(validSuit == 200){ //                    suitText = "Clubs"; //                }else if(validSuit == 300) { //                    suitText = "Hearts"; //                }else { //                    suitText = "Spades"; //                } //                chooseSuitDialog.dismiss(); //                Toast.makeText(myContext, "You chose " //+suitText,Toast.LENGTH_SHORT).show(); //            } //        });         chooseSuitDialog.show();     }

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


Excuse the image of the random cat, but I noticed these random purple spots/lines in all the pictures I've taken today. They're in the same location and in the same shape so have I damaged the sensor?

I bought this used Canon 60D for a reasonable price, however, I get these purple pixels in the top right of my image. Even though I can work around it, it is very annoying. I've tried a lot of ways to fix it, like manual cleaning. I am trying to find another alternative than having to send my camera to Canon, as I don't have too much money to spend on repairing or a new one.    Thanks in advance for any help!  Here's a full image.   Here's a crop of the affected area.


I finished reading The Hobbit around a week or so ago, and given how ominously the Necromancer was mentioned, I was sure he was being set up to be the main villain (or somebody very important to the plot). I've read up to the part where Gandalf's telling a now 50-year-old Frodo about the lore of Bilbo's ring, and he keeps talking about the Dark Lord Sauron. Do we know what happened to the Necromancer? Additionally, are there any extra books that go into detail about who the Necromancer is and what evil things he did during his time as an evil tyrant?

During the time period of The Hobbit, a character is mentioned called the Necromancer.  Radagast even (in the movie) specifically states that the Necromancer can "summon the spirits of the dead."  (It's been a while since I read the book so I don't know if this exact phrasing is used there, but given the name it seems reasonable.) This character is later revealed to be Sauron.  Since when can Sauron summon the spirits of the dead?  He can extend life ad infinitum, like Gollum's, for example, and he can twist people into half-alive monsters, like the Ringwraiths, and he himself seems impossible to kill so long as the One Ring remains, but I can't recall ever actually seeing him "summon" something that was once fully dead.  In fact, the only character I remember doing that was actually Aragorn, though he merely commanded them and didn't raise them himself.  Is this just an unfounded rumor about the power in Dol Guldur, some hushed-whisper nightmare that isn't actually an accurate description, or is there a reason he is called the Necromancer?  It seems like if Sauron could actually resurrect the dead, what little chance Middle Earth had of defeating his hordes would be long, long gone...


In order to cope with utf8 listing files, I want to use listingsutf8. However on XeLaTeX i receive the warning:   Package listingsutf8 Warning: Package loading is aborted because of missing \pdf@unescapehex.   My question is: is the package incompatible with XeLaTex? Is there a workaround? or can we simply use the old listings on this engine without the options: extendedchars & literate and let the engine figure out the encodings.

Please, do you know if there's any possibility how to use the listings package together with XeLaTeX? I have to use XelaTeX and therefore I have UTF-8 encoded files. This is not compatible with listings which allows one-byte encoding. (I know there is listingsutf8 package, but it converts files from UTF-8 which I don't need.)  The listings package works somehow, bu I only can use English letters. I've fond some solution like a list of special characters (  ) but it seems it works only for some letters. It there anything that would support UTF-8 in listing 'naturally'?


I am in my college and working on DNS. Whenever, I need to use network, I have to login using 10.2.0.10:8090. Now, some times it becomes tough to do so. For my own system, I know that we can make some changes to /etc/hosts and get the desired result:  127.0.0.1   localhost 127.0.1.1   Shahjahan 10.2.0.10:8090   login   # The following lines are desirable for IPv6 capable hosts ::1     ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters   I want to make my computer a DNS server for the lan. How can I do so. I know I need to define zones and such things. Please link any answer or tutorial. Thanks.

I have a small home network that just got larger (new roommate, my existing roommate got a laptop (on top of her computer), my friends coming over with laptops, etc.).    I'd like to run a local DNS server for lookups of my local network stuff (fileserver.local, windowsTV.local, machineA.local, machineB.local, appletv.local).   I used to have a business line with a static IP, and run bind/named internally.   However, now I have a normal account.  My ISP's DNS servers are constantly changing (for whatever reasons my ISP doesn't like to keep the same IP range for long).  I need my local DNS to be automatically updated to use my ISP's DNS for external traffic, but be able to maintain an internal DNS server (getting to update the hosts file is being a hassle with every new machine on top of rebuilding existing machines with win7 or Ubuntu 9.04).  Additionally, My ISP's DNS servers often crash or become unresponsive.  Are there any open DNS servers that are reliable (I don't want to reconfig every day) that I could use as my primary, then if those fail, then use my ISP's?  UPDATE:  Also looking for each workstation to be able to use dhcp to connect, but instead of getting ISP DNS servers, getting my internal one....