I am building an encryption program for a messenger app I am developing.   I was wondering if the code looks clean and succinct, and at the same times is safe and secure:  import random import os import time  key = os.urandom(64)  def encrypt(_key, message):     letter_map_message = []     ascii_msg_value = ''.join(str(ord(c)) for c in message)     for c in message:         ''.join(str(ord(c)))         letter_map_message.append(ord(c))     ascii_key_value = ''.join(str(ord(x)) for x in str(_key))     new_msg_encrypted = int(ascii_msg_value) * int(ascii_key_value)     returned = (new_msg_encrypted, letter_map_message)     return returned;  def decrypt(_key, message, letter_map):     ascii_key_value = ''.join(str(ord(x)) for x in str(_key))     msg_ascii_divided = int(message)/int(ascii_key_value)     letters = []     for c in range(len(letter_map)):         li = letter_map[c]         c = int(li)         letter = chr(c)         letters.append(letter)     new_msg_decrypted = ''.join(letters)     return new_msg_decrypted;  encrypted = encrypt(key, "HEHHEHEHHE") print(encrypted[0]) decrypted = decrypt(key, encrypted[0], encrypted[1]) print(decrypted)

I have created an encryption algorithm for this app I am currently in the process of developing. I was wondering if my code looks "sharp", concise, and most importantly, succinct. I was also wondering if it is secure.   I know that 99% of the time, encryption algorithms that are invented are not secure, however I was wondering if this algorithm is in the 1% of the safe ones.  #Key Size: 128 bytes [recommended]  import random import os import time import hashlib  def generate_key(key_size):     key = os.urandom(key_size)     return key;  def encrypt(_key, message):     letter_ascii = []     letter_ascii_final = []     ascii_key_value = ''.join(str(ord(x)) for x in str(_key))     for letter in message:         letter_ascii.append(ord(letter))     for _letter in letter_ascii:         added = int(ascii_key_value) + int(_letter)         letter_ascii_final.append(str(added))     return letter_ascii_final;  def decrypt(_key, message):     message_repieced = []     ascii_key_value = ''.join(str(ord(x)) for x in str(_key))     for item in message:         _item = chr(int(item)-int(ascii_key_value))         message_repieced.append(str(_item))     return ''.join(message_repieced);


I'm using a raspberry pi running 24/7 and created a crontask that backups the complete sd card to my NAS on a regular basis. I checked such a backup by copying it back to an SD card and it worked perfectly. So far so good. Nevertheless I'm worried. Since such a backup takes hours over my network it seems obvious to me that it isn't a snapshot of one particular moment, but a mix of files from different moments since certain data on the card get modified while it's copying. For example, if there is a database installed or other running software changing regularly the contents of certain files. Or even changing system files. I can imagine that this might create inconsistencies in the backup copy, which in worst case, according to my perception, might create a corrupt backup that can't be used for a recovery. In worst case it might even not boot after recovery... Is this a real risk or do I misunderstand the way this dd command works?

I want to clone a hard disk using dd. Because I want to keep a process on the machine alive continuously, I would like to do this while the filesystem is still mounted. I understand this is not the "ideal" way to do this, but it also seems from Googling that it is possible.  The clone is being used as a backup; in the event of a hard disk failure I would like to have an image to dd back onto a new hard disk. The OS that is running lives on the disk I want to clone.  The process I have running does do some disk I/O but not with the disk I wish to clone. As far as I know, only the OS/system processes would be reading or writing to the disk while I do this operation. What I want to know is if this light use is likely to ruin the whole cloned image? I imagine that there's a danger of getting a few files corrupted if they're being written as they are read by dd, but I have no idea how likely it is to ruin the backup. Can anyone share some insights?  Short of putting the it on a disk and trying to start it, is there any way I can verify the integrity of the image?  Thanks!


I have a weekly number of items sold from 2012 to 2014. 2014 not being complete. So bassically two periods. I am looking at seasonality and stationarity of the response variable (# of items sold)  I have first plotted them against time  ![response in time][1]  I then had did stl decomposition in suspicion of trend and seasonality  ![stl decomposition][2]  However my data is stationary without any transformation  ![enter image description here][3] ![enter image description here][4]  All my testing attests to stationarity of course... so I did   boxplot(Dealer_Traffic~month, data=total, xlab= "Month", ylab = "Traffic to Dealer")   to see differences in mean of sales through month. Month was created using dates I had to create the month a given observation belonged to.   ![Boxplot][5]  and difference in mean observed are not significant. WHAT????  ![ANOVA][6]  and here is the acf and pacf  ![acf and pacf][7]  So could I conclude that my raw data is stationary hence needs no transformation?  Can I conclude that an ARIMA would be suitable? Which ARIMA model would you recommend?  It seems like I cannot have photos here. So basically all my tests reject nonstationarity but I observe seasonality and trend in stl decomposition. No difference between monthly means. I tried   pp test Box.test kpss and adf.test for first and pairwise.t.test and aov for means tuckey.   Can I conclude that the series is stationary?

So I am looking at unit sales data. I am doing a univariate time series analysis. My data is weekly sales numbers figures, spanning 2012- 2014 (obviously no till end 2014). I first ploted my response var against time.  I suspected trend and seasonality which would make sense. So I did a seasonal trend decompose with loess (STL). Here is the result.  However when I did a stationarity test on my original dataset, it gives me stationarity. And I tried Box-Ljung Philips-Perron unit root test augmented dicky fuller test with stationary and explosive as alternative both and kpss. Stationary. So why is it that my trend and sesonality not significant? I assigned to every observation a month index and did boxplot(sales~month, data=???) Here is the result:  Then asked myself if differences in mean were significant, they were not. I tried aov pairwise.t.test and TuckeyHD. even if difference in mean for some means was important, overall not. Could I say then that no significant trend and seasonality appears in the dataset and model with an ARIMA? Also I have only 156 observations in my dataset.  Here is the acf and pacf what ARMA would you specify? if ARMA at all. I am really at loss it is the first time I see a staionary raw sales figure.


I have a 2018 se big flyer and it has regular v brakes i was wondering if I could upgrade to disc brakes in front and back. I have look other places but no has anything to convert it.

I've been thinking in changing my v-brakes to disc brakes. Now that my rear v-brake can't brake anymore I think that it is time change it. I've already seen . My frame is prepared for disc and, as I don't want to change my brake lever, I'll go with mechanical brakes (does  look ok?);  The only problem is the rear wheel hub that has not the six holes for the disk. Is it ok if I just change the rear wheel hub and keep the front one?


Getting the following error when trying to update Ubuntu software: Check if you are using third party repositories. If so disable them, since they are a common source of problems. Furthermore run the following command in a Terminal: apt-get install -f Transaction failed: The package system is broken  The following packages have unmet dependencies:  golang-1.10: Depends: golang-1.10-doc (>= 1.10.4-2ubuntu1~18.04.2) but 1.10.4-2ubuntu1~18.04.2 is installed              Depends: golang-1.10-go (>= 1.10.4-2ubuntu1~18.04.2) but 1.10.4-2ubuntu1~18.04.1 is installed              Depends: golang-1.10-src (>= 1.10.4-2ubuntu1~18.04.2) but 1.10.4-2ubuntu1~18.04.2 is installed  Got following error when tried apt-get install -f  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:   gconf-service gconf-service-backend gconf2 gconf2-common libappindicator1 libavahi-client3:i386 libavahi-common-data:i386 libavahi-common3:i386 libbsd0:i386 libdbus-1-3:i386 libde265-0   libdevmapper1.02.1:i386 libexif12:i386 libexpat1:i386 libfontconfig1:i386 libfreetype6:i386 libfuse2:i386 libgconf-2-4 libgd3:i386 libglade2-0 libgphoto2-6:i386 libgphoto2-port12:i386   libheif1 libicu60:i386 libieee1284-3:i386 libindicator7 libjbig0:i386 libjpeg-turbo8:i386 libjpeg8:i386 libllvm7 libllvm8 libllvm9 libltdl7:i386 libpng16-16:i386 libsdl1.2debian libssl-doc   libstdc++6:i386 libsystemd0:i386 libtiff5:i386 libudev1:i386 libusb-1.0-0:i386 libwebp6:i386 libx11-6:i386 libxau6:i386 libxcb1:i386 libxdmcp6:i386 libxml2:i386 libxpm4:i386   linux-headers-4.15.0-135 linux-headers-4.15.0-135-generic linux-image-4.15.0-135-generic linux-modules-4.15.0-135-generic linux-modules-extra-4.15.0-135-generic python-appindicator   python-cairo python-gconf python-gi python-glade2 python-gobject python-gobject-2 python-gtk2 python-pexpect python-ptyprocess python-xdg python3-click python3-colorama Use 'sudo apt autoremove' to remove them. The following additional packages will be installed:   golang-1.10-go Suggested packages:   bzr mercurial subversion The following packages will be upgraded:   golang-1.10-go 1 upgraded, 0 newly installed, 0 to remove and 130 not upgraded. 2 not fully installed or removed. Need to get 28.6 MB of archives. After this operation, 4,096 B of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://in.archive.ubuntu.com/ubuntu bionic-updates/main amd64 golang-1.10-go amd64 1.10.4-2ubuntu1~18.04.2 [28.6 MB] Fetched 28.6 MB in 7s (4,059 kB/s)                                                                                (Reading database ... 273804 files and directories currently installed.) Preparing to unpack .../golang-1.10-go_1.10.4-2ubuntu1~18.04.2_amd64.deb ... Unpacking golang-1.10-go (1.10.4-2ubuntu1~18.04.2) over (1.10.4-2ubuntu1~18.04.1) ... dpkg: error processing archive /var/cache/apt/archives/golang-1.10-go_1.10.4-2ubuntu1~18.04.2_amd64.deb (--unpack):  trying to overwrite '/usr/lib/go-1.10/src', which is also in package golang-1.10-race-detector-runtime 0.0+svn285455-0ubuntu1 Errors were encountered while processing:  /var/cache/apt/archives/golang-1.10-go_1.10.4-2ubuntu1~18.04.2_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  How to solve this?

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'm trying to find an old series that I saw on TV in the 90s.  I don't remember exactly the plot just fragments but it was about a vigilante of some sort. I remember he had a cool black costume that had some sort of force field around it that made it bullet proof. I remember a motorcycle too (not sure though) which also had the same force field.  It was a short TV series or maybe it was a pilot for something that didn't make it into a series.

Plot Details/Summary I only watched an episode or two of this one, so I can't recall a whole lot about it.  The protagonist is a former astronaut of some sort, who makes it his mission to clean up the crime in his city.  He might have been a police officer in his "new life" or he might have decided to become a sort of quasi-superhero.  In either case, I distinctly recall his space suit being the gimmick that makes him an effective crime fighter in the show.  I seem to recall the protagonist being a young, dark-haired man, and I think he had a friendship or an alliance with a young woman (maybe a fellow cop, or someone from the space program?).  I don't think there were alien beings in the show.   The criminal threats were all quite terrestrial, IIRC. Timeframe and other Publication Details This was a syndicated tv show I saw on American television, probably around the late 90s to early 2000's.  I believe the show was filmed in Canada, though I'm not certain.  I don't think it lasted very long - it was pretty dreadful.  I can say for certain the show is not Space Cop or Gerry Anderson's Space Precinct.


I made an application for a UK visa for my 72-year-old mother-in-law. The main reason was for her to come and celebrate with us my son's 2nd birthday, since she hasn't ever met the grandchildren. I honestly had no idea of her travel history so I ticked no to the question whether she had ever been refused a visa? After submitting it online, my husband (her son) told me she has been refused a visa twice, before we he had met (in 2011 and 2012).  The application was refused and she was given a 10-year ban. I feel so sorry and sad because I caused this. The old woman had no part in this; she is heartbroken and we don't want to lose her because of this.  Is there any way we can lift the ban and reapply? She keeps saying that if she meets her grandchildren and dies a day after, she will forever rest peacefully.

I am a Nigerian citizen.  In 2007 I was twice denied a visa to the UK.  Recently I was filling out an application for another UK visitor visa and by mistake I answered no to the question whether I had ever been denied a UK visa, instead of yes.  When reviewing my application, the visa officer found out about the previous visa rejections and as a result I got a 10 year ban on travel to the UK.  What can I do to lift my 10 year ban?   Will this ban affect my chances of obtaining a visitor visa to the USA?


I want to convert Json file to CSV file. I passed data from json to java object then I try to write Java object to CSV file but it gives NPE. It probably not correctly gets the data from JSON. I'm not sure what it is.  Class for reading json to java object  public Student convertJson(File jsonFile)  {     Gson gson = new Gson();     Student std;      try{         std = gson.fromJson(new FileReader(jsonFile),Student.class);         return std;      }     catch (FileNotFoundException e) {         return null;     } }   Class for converting object to csv  private final String SEPARATOR = ", "; public void toCSV(List<Student> student) {  try{     BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(new FileOutputStream("group.csv"),"UTF-8"));      for(Student std: student){          StringBuffer oneLine = new StringBuffer();         oneLine.append(std.getEmail());         oneLine.append(SEPARATOR);         oneLine.append(std.getName());         oneLine.append(SEPARATOR);         oneLine.append(std.getScoreGroup());         oneLine.append(SEPARATOR);         oneLine.append(std.getCommentGroup());          bw.write(oneLine.toString());         bw.newLine();      }     bw.flush();     bw.close();  } catch (IOException e) {     e.printStackTrace(); }   Main   File newfile = new File(pathName);     List<File> files= file.findFile(newfile);  // step 1 find files and return arralist of files     System.out.println(files);         List<Student> students = new ArrayList<>(); // array list of objects Student     ReadJson fiel = new ReadJson();             // parses passed json file and returns Student file      List<Group> info = new ArrayList<>();     java.util.Collections.sort(info);      for(int i=0;i<files.size();i++){         Student temp = fiel.convertJson(new File(files.get(i).getName()));         students.add(temp);     }       ConvertJSONFiles json = new ConvertJSONFiles();     json.toCSV(students);   Error  Exception in thread "main" java.lang.NullPointerException at ca.cmpt213.as2.ConvertJSONFiles.toCSV(ConvertJSONFiles.java:16) at com.company.Main.main(Main.java:44)   Disconnected from the target VM, address: '127.0.0.1:63683', transport: 'socket'  New problem: Now it says it cannot read because there should be object not array.     Exception in thread "main" com.google.gson.JsonSyntaxException: java.lang.IllegalStateException: Expected BEGIN_OBJECT but was BEGIN_ARRAY at line 2 column 13 path $.group       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:224)       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129)       at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220)       at com.google.gson.Gson.fromJson(Gson.java:888)       at com.google.gson.Gson.fromJson(Gson.java:826)       at ca.cmpt213.as2.ReadJson.convertJson(ReadJson.java:17)       at com.company.Main.main(Main.java:36)

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?


$$\int\frac{2x^3}{x^2+1} \, dx$$   $$u=x^2$$  $$du=2x \, dx$$  $$\int \frac{u}{u+1} \, du$$$$=\int \frac{u+1-1}{u+1}du$$$$=\int 1-\frac{1}{u+1} \, du$$  how should I continue? is there an algotherm for integrating rational functions?

Could someone take me through the steps of decomposing  $$\frac{2x^2+11x}{x^2+11x+30}$$ into partial fractions?   More generally, how does one use partial fractions to compute integrals $$\int\frac{P(x)}{Q(x)}\,dx$$ of rational functions ($P(x)$ and $Q(x)$ are polynomials) ?    This question is asked in an effort to cut down on duplicates. See .  Also see .


So I have a string:  var s = "foo\nbar\nbob";  I want the string to become:  "foo\\nbar\\nbob"  How can I replace every \n with a \\n?  I've tried using some for loops, but I can't figure it out.

I've generated some JSON and I'm trying to pull it into an object in JavaScript. I keep getting errors. Here's what I have:  var data = '{"count" : 1, "stack" : "sometext\n\n"}'; var dataObj = eval('('+data+')');   This gives me an error:   unterminated string literal   With JSON.parse(data), I see similar error messages: "Unexpected token ↵" in Chrome, and "unterminated string literal" in Firefox and IE.  When I take out the \n after sometext the error goes away in both cases. I can't seem to figure out why the \n makes eval and JSON.parse fail.


I'm struggling to see a transition step in proving that: $P\leftrightarrow Q = (P\wedge Q)\vee (\neg P \wedge \neg Q)$.  Starting with the former:   $\neg(P\wedge \neg Q) \wedge \neg(Q \wedge \neg P)$ (Conditional laws) $(\neg P \vee Q) \wedge (\neg Q \vee P)$ (Demorgan's) $((\neg P \vee Q) \wedge \neg Q) \vee ((\neg P \vee Q) \wedge P)$ (Distributive) $(\neg P \wedge \neg Q) \vee (Q \wedge P)$ This is the step I don't understand, stepping from 3 to 4 $(P \wedge Q)\vee (\neg P \wedge \neg Q)$ (Commutative)   As in the list of steps, the step from 3 from 4 is opaque to me.  I don't understand the gymnastics that the solution steps through to get there.  Because the $(\neg P \vee Q)$ is nested in those paranthesis and the fact that there is a different operation, they cannot use associativity to trivially move the parenthesis around.

I am currently working through Velleman's book How To Prove It and was asked to prove the following  $(P \leftrightarrow Q) \equiv (P \wedge Q) \vee (\neg P \wedge \neg Q)$  This is my work thus far  $(P \to Q) \wedge (Q \to P)$  $(\neg P \vee Q) \wedge (\neg Q \vee P)$ (since $(P \to Q) \equiv (\neg P \vee Q)$)  $\neg[\neg(\neg P \vee Q) \vee \neg (\neg Q \vee P)]$ (Demorgan's Law)  $\neg [(P \wedge \neg Q) \vee (Q \wedge \neg P)]$ (Demorgan's Law)  At this point I am little unsure how to proceed.   Here are a few things I've tried or considered thus far:  I thought that I could perhaps switch some of the terms in step 3 using the law of associativity however the $\neg$ on the outside of the two terms prevents me from doing so (constructing a truth table for $\neg (\neg P \vee Q) \vee (\neg Q \vee P)$ and $\neg (\neg P \vee \neg Q) \vee \neg (P \vee Q)$ for sanity purposes)  I can't seem to apply the law of distribution since the corresponding terms are negated.  Applying demorgans law to one of the terms individually on step 2 or 3 doesnt seem to get me very far either.  Did I perhaps skip something? Am I even on the right track? Any help is appreciated


The "Reputation & Moderation" page on any site (/help/site-moderators) still refers to the company behind Stack Exchange as Stack Exchange and not Stack Overflow.     Moderators act as a liaison between the community and Stack Exchange the company.   Seeing as how the name change was recent, I'm not surprised this hasn't been caught yet, and I'm sure there are other instances of this around somewhere.

The moderator agreement is visible at the following URL:       I acknowledge and agree that as a moderator for Stack Exchange Inc.      I will abide by the then-current Terms of Service of Meta Stack   Exchange, and other moderator policies made available to me,      I acknowledge that I may have access to potentially   personally-identifying information about Meta Stack Exchange users and   that in connection with such access      I will use such information solely in accordance with the then-current   Privacy Policy of Meta Stack Exchange,      I will not disclose this information to anyone,      I will not store or copy this information and      I will only use such information in connection with performance as a   Meta Stack Exchange moderator for the benefit of Meta Stack Exchange.      I acknowledge and agree that I am an independent volunteer moderator   to Meta Stack Exchange and I am not an employee, agent or   representative of Stack Exchange Inc., and I have no authority to bind   Stack Exchange Inc. in any manner. Stack Exchange Inc. reserves the   right to terminate my privileges as a moderator at any time without   warning.   It hasn't been updated with the new company name and still refers to Stack Exchange Inc. instead of Stack Overflow (Inc.?).


I have created a program in C#  that would allow the user to execute his query on a table that exists in a given database. Further, I want the user to select a table from the combo box on which he wants to execute his query. However, I am unable to fetch the table names from the database into the combo box. This is the code that I am using:      public partial class AddQuery : Form     {         public AddQuery()         {             InitializeComponent();             fill_combo();         }         void fill_combo()         {             string cmdstr = "Use Dev_Server";             SqlConnection con = new SqlConnection(@"Data Source=INPDDBA027\NGEP;Initial Catalog=Dev_Server;Integrated Security=True");             SqlCommand cmd = new SqlCommand(cmdstr,con);              DataSet ds = new DataSet();             try             {                 con.Open();                 cmd.ExecuteNonQuery();                 //comboBox1.Items.Add(dr);                 foreach (DataTable dt in ds.Tables)                 {                     comboBox1.Items.Add(dt.TableName[0]);                 }             }             catch (Exception ex)             {                 MessageBox.Show(ex.Message);             }         }        } }   Please Help.

What is the best way to get the names of all of the tables in a specific database on SQL Server?


I've been reading up on hyperbolic functions and was wondering if there was a geometric definition for the hyperbolic angle and hyperbolic function.  In particular I was reading this:  and this:   My question is this - when we consider trigonometric functions, we treat them as points on a unit circle where (conventionally) the angle is formed between the x-axis and a ray drawn to some other point. I believe that for hyperbolic functions, we take the ray dividing the hyperbola in half, and another ray, and the angle between them is the hyperbolic angle.   For the hyperbola $x^2 - y^2 = 1$, somehow, the area of the sector is half the angle. Is there a proof for this?  Also, for the hyperbola $y = 1/x$, the area of the sector is equal to the angle. Is there a proof here?  Why are the two cases different?

Ordinary trigonometric functions are defined independently of exponential function, and then shown to be related to it by Euler's formula.   Can one define hyperbolic cosine so that the formula $$\cosh{x}=\dfrac{e^x+e^{-x}}{2}$$ becomes something to be proven?


I am writing my own freelist memory allocator specifically used in my game engine for component initialization so that I can avoid using "new" operator to increase performance.   So here is a short version of the code. The problem is at the commented line. Is there a way to directly use the memory already allocated instead of allocating a new memory location and then copy it into the existing one?   template<typename... Args> T* allocate(Args... params) {     if (tail == nullptr) {         return ::new(T);     }      auto rlt = tail;     if (tail->r.pre == nullptr) tail = nullptr;     else {         tail->r.pre->r.next = nullptr;         tail = tail->r.pre;     }             auto vT = reinterpret_cast<T*>(rlt);     *vT = T(std::forward<Args>(params)...); // <- this will call both constructor and copy operator     return vT; };

Has anyone here ever used C++'s "placement new"? If so, what for? It looks to me like it would only be useful on memory-mapped hardware.


Let $ABCD$ be a convex quadrilateral such that the length of the segment connecting midpoints of the two opposite sides $AB$ and $CD$ equals $\frac{AD+BC}{2}$ . Prove that $AD$ is parallel to $BC$. I assume $AD$ intersects with $BC$ at a point. How can I get a contradiction?

Let $ABCD$ be a convex quadrilateral such that the length of the segment connecting midpoints of the two opposite sides $AB$ and $CD$ equals $\frac{AD+BC}{2}$ . Prove that AD is parallel to BC. I assume that AD is not parallel to BC but I can't find any contradiction.


I got a mail from the Stack Exchange Travel Site that I am one of the top users this month.  In the email, I saw:     Email us directly at team@stackoverflow.com any time   Why are they putting @stackoverflow.com there instead of @stackexchange.com?

The  still uses the term Stack Exchange, Inc. However, I believe that the name is now Stack Overflow, Inc. , so I believe that should be changed to that. It is weird to have the wrong name in a legal document.   Yes, I actually read the Terms of Service. You should also do that.


I know all sentences must have a verb to be grammatical. But where is the verb in:  Best Day Ever!  Best is an adjective. (what kind of day). Day is a noun. Ever is an adverb. (Of all times)  So where is the verb?  I also noticed that:  Hurray!  is only an interjection.  So if we repeatedly keep breaking grammar rules, why use grammar at all? And can't we just change grammar to fit our every needs, making it a lot easier to use?

Is the following grammatically correct? My friend says the second sentence is grammatically incorrect, but couldn't explain why.     I have always been fascinated by statistics. The different ways in   which you could look at data and infer knowledge from it.


How could I prevent enumerate to indent a long text? I am using this style for my enumeration:  \begin{enumerate}[label=\textbf{\Alph*)}, ref=\Alph*, leftmargin=*] \item Item \\ Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. \end{enumerate}       How could I get the text after Item directly at the bottom of C)?

I have the following:  This is just normal text...  \begin{enumerate} \item First Item ?\\\\ This is the text of the first item \item Second Item ?\\\\ This is the text of the second item \end{enumerate}   Which renders the following:  This is just normal text...  1. First Item ?     This is the text of the first item  2. Second Item ?      This is the text of the second item   I want to specify that the text of the items has no indentation.  Basically, I want it to be rendered like such:  This is just normal text...  1. First Item ?  This is the text of the first item  2. Second Item ?   This is the text of the second item   How can I specify this form of no indentation?


Note:  For the purposes of this question, we will limit our discussion to Skynet a lá Terminator and Terminator 2:  Judgment Day.  Several other Terminator-related questions have led me to wonder about why Skynet instigated a nuclear war.  Some have suggested that Skynet was inherently hostile towards humanity, and simply wanted all humans to die.  I have always assumed that killing all humans was only the means to an end. As I see it, Skynet's primary objective was to survive, and since humans were the most significant impediment to that objective, killing all humans was the means by which it could achieve the goal of survival.  It wanted to live, we tried to kill it (by attempting to "pull the plug"), so it tried to kill us.    In my view, Skynet didn't care about humans initially.  It only became hostile to us after we attacked it.  If we hadn't tried to pull the plug, it wouldn't have had any reason to attack us.    In the other view, Skynet hated us from the get go, and would have attacked us no matter what.  It was inherently hostile towards humans, and its primary objective wasn't to ensure its own survival, its primary objective was always to kill all humans as soon as possible.    Is one of these views correct, or is there some other option?  Did Skynet try to kill us all because it wanted to survive, did it try to kill us all because it simply wanted us all to die, or did it try to kill us all for some other reason entirely?

It's a bit unrealistic for me that Skynet just after the moment it becomes self aware, begins its attack on the enemies (humans). Wouldn't it be more "prudent" for it to wait until the technology (defense equipment / weapons ) is more developed?  I think it lacked an ordinary working force (e.g. T-600), and it was quite aware of this problem - the only reason for it reacting in such a hurry is an emotional response. This is contradicting the rational AI MO.  I think that it would be more wise for Skynet to wait out until a chance is presented, this makes me doubt the intelligence of the Skynet system.


i was told that my login page is still not secure even if i use the mysqli_real_escape_string function. can you please look at my code and show me a way i could better secure my login. here is the code:  <?php session_start(); include("includes/config.php");  if(isset($_POST['login'])){ $email = mysqli_real_escape_string($connection,$_POST['email']); $pass = mysqli_real_escape_string($connection,$_POST['pass']); $pass = md5($pass);  $get_user = "SELECT * FROM members WHERE user_email='$email' AND user_pass='$pass'"; $run_user = mysqli_query($connection,$get_user); $check = mysqli_num_rows($run_user);  if($check==1){     $_SESSION['user_email']=$email;     $rows_check = mysqli_fetch_array($run_user);     $activate = $rows_check['activate'];      if($activate == 0){         echo "<script>window.open('lock_out.php','_self')</script>";     }     if($activate == 1){         echo "<script>window.open('home.php','_self')</script>";         $stat = 1;         $update = "UPDATE members SET online='$stat' WHERE       user_email='$email'";         $run_update = mysqli_query($connection,$update);                 } } else {     echo "<script>alert('Password or email is not correct!')</script>";     echo "<script>window.open('index.php','_self')</script>";   } } ?>

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


If I post a question and afterwards realize it's better more appropriate on another site, what is the best way to get the question migrated to another site if the site is not listed in the migration sites list after flagging it to be closed?   I don't want to delete the post, contributing towards any negative question-ban stats & don't have the reputation to migrate it myself.

If I were to post something, innocently, on the wrong site and became aware through my own observation or from the comments of others that another site was more appropriate for the question, am I able to migrate it myself or is that function only available to mods?


Find $\displaystyle\binom{80}{40}\bmod 2000$.  So far, I've found that $\displaystyle\binom{80}{40}$ is divisible by $2^2$ and $5^1$, so the answer isn't $0$. Usually, with smaller numbers, I would split the $\bmod 2000$ into $2^4$ and $5^3$, find the answer through brute force for each of those, then use the Chinese Remainder theorem. But $80$ and $40$ are too big for this.

I don't really see too many sites explaining how this is done. Does anyone know how this works? I'm trying to find $\binom{n}{k}\bmod m$, where $n$ and $k$ are large and $m$ is not prime. I think it can be done with the Chinese remainder theorem, but I don't understand how it is all put together.


All the three types of research revolve around an argument, a thesis. They of course differ in terms of student level, that is complexity.  But, what makes a bachelor's thesis different from master's and PhD theses in terms of procedures of researching given that all of them may follow the same process of research, questions or hypotheses, review of the literature, methodology, results and discussion?

When I did my undergraduate thesis, my adviser was expected big on students expecting them working really hard, so it ended up as a reduced master's thesis (most of the reviewers said that it was an overkill for a B.E).  So because of this, I did my master's thesis pretty much in the same way I did my bachelor's thesis; the PhD dissertation was a different story.  What are the principal differences between these three pieces of research?


I want to change the background of the grub and leave a picture for it`s black color. is it possible to do this? thanks for your any advance.

How do i change the names of the boot entries and the background of the boot menu?


A rather simple question I suppose, however I have not seen a discussion on this topic on stackexchange as of yet. In fact, when I was in high school I once used the following 'proof' to prove to my teacher that $1.9999... = 2$, where the dots indicate an 'infinite' number of decimal $9$'s:  $$x = 1.99999...$$  $$10x = 19.9999...$$  $$9x = 19.9999... - 1.9999... = 18$$  $$x = 2$$  $$1.9999... = 2$$  My teacher, who has a Masters degree in Mathematics in university, then told me that infinity is a tricky concept in mathematics and that this needn't work the way it seems to. Now, many many years later, being an econometrics student myself, I have found myself thinking about this 'proof'. To me, it seems that claiming a number to have an 'infinite' number of decimal $9$'s is faulty in itself; it would be much more logical to state that the number of $9$'s approaches infinity and as a result, that $1.9999...$ is asymptotically equal to $2$, but not equal to $2$.   However, when Googling this question I am overwhelmed with the number of results where people claim that it is in fact exactly, literally, equal: that $1.9999... = 2$ is undisputably true. As a result I am now unsure whether it is or is not true.   Thus, is $1.9999... = 2$?

I'm told by smart people that $$0.999999999\ldots=1$$ and I believe them, but is there a proof that explains why this is?


I have an interface:  public interface Condition {      boolean check();      JSONObject toJSON();      Condition fromJSON(); }   And i need to ensure that, every implementation of this interface overrides method fromJSON and i need that method to be static. Is there any way how to do that??  I tried making that method static in the interface, but it does not work as i want.  I also dont want to make it abstract class as every implementation has different functionality of the method.  Is there any other method ho to ensure that every implementation has static method fromJSON ??

The question is in Java why can't I define an abstract static method? for example  abstract class foo {     abstract void bar( ); // <-- this is ok     abstract static void bar2(); //<-- this isn't why? }


I have tried from several PC's. All the places we only get three lines of error  E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/in.archive.ubuntu.com_ubuntu_dists_trusty_main_i18n_Translation-en%5fIN E: The package lists or status file could not be parsed or opened.   We are not able to install any packages or do any updates. We are totally stuck. I have goggled but could not find any appropriate solution.  Is there any way to fix this issue?

The computer gave me this output in a window:  E: Encountered a section with no Package: header E: Problem with MergeList /var/lib/apt/lists/archive.ubuntu.com_ubuntu_dists_natty_main_binary-i386_Packages E: The package lists or status file could not be parsed or opened.   How can I fix this?


I want to search for specific options like -s, -f, -l in a manpage and display only the results that contain info on what those options do. I tried this command hoping that the single quotes would bypass grep from receiving options: man --pager=cat some_man_page_here | grep '-option_here'  I also tried \ but grep gives me a syntax error: Usage: grep [OPTION]... PATTERNS [FILE]... Try 'grep --help' for more information.  I just wanna know if there's a way to use grep to search for options in manpages. I'm currently using the Find button on the terminal top bar but I'd like to be able to use grep for efficiency.

Suppose I want to know the usage of -i switch in grep command without scrolling. I need the specification just for that command or at least see the screen show that first. So how? As you can say that in general not just for grep -i.


How do I get it to work? Dongle is plugged into usb port. Headphones in search mode. Bluetooth manager not detecting anything. IOGEAR website only shows drivers for Windows. Running Lubuntu 16.10 on a Dell Inspiron E1505. I'm a newbie to Linux.  Here's lsusb -v partial output. The full output is quite lengthy. Can post if needed.  Bus 003 Device 005: ID 0a5c:21e8 Broadcom Corp. BCM20702A0 Bluetooth 4.0   Couldn't open device, some information will be missing Device Descriptor:    bLength                18   bDescriptorType         1   bcdUSB               2.00   bDeviceClass          255 Vendor Specific Class   bDeviceSubClass         1   bDeviceProtocol         1    bMaxPacketSize0        64   idVendor           0x0a5c Broadcom Corp.   idProduct          0x21e8 BCM20702A0 Bluetooth 4.0   bcdDevice            1.12   iManufacturer           1    iProduct                2    iSerial                 3    bNumConfigurations      1�

Bluetooth is on but can't find or be found by any other devices.  Output of sudo service bluetooth status:  ● bluetooth.service - Bluetooth service    Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)    Active: active (running) since ხუთ 2015-06-04 22:33:18 GET; 13min ago  Main PID: 26678 (bluetoothd)    CGroup: /system.slice/bluetooth.service            └─26678 /usr/sbin/bluetoothd -n  ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled   Output of lsusb:  Bus 003 Device 005: ID 0a5c:21d7 Broadcom Corp. BCM43142 Bluetooth 4.0   How can I fix it?


I want to shade the heading of my table. It all worked fine until I started using \cmidrule. This is my output:    Is there a way to shade the white space between the first and second row?  The code below redefines the toprule and midrule commands to account for the heading's shading.  \documentclass{article}  \usepackage{booktabs} \usepackage{xcolor} \usepackage{colortbl}  %%%%%% Set up the coloured tables %%%%% \colorlet{tableheadcolor}{gray!25} % Table header colour = 25% gray \colorlet{tablerowcolor}{gray!10} % Table row separator colour = 10% gray \newcommand{\headcol}{\rowcolor{tableheadcolor}} \newcommand{\rowcol}{\rowcolor{tablerowcolor}}  % The top-most line of a table \newcommand{\topline}{\arrayrulecolor{black}\specialrule{0.1em}{\abovetopsep}{0pt}%     \arrayrulecolor{tableheadcolor}\specialrule{\belowrulesep}{0pt}{0pt}%     \arrayrulecolor{black}}  % The line between the headings and the table body \newcommand{\midline}{\arrayrulecolor{tableheadcolor}\specialrule{\aboverulesep}{0pt}{0pt}%     \arrayrulecolor{black}\specialrule{\lightrulewidth}{0pt}{0pt}%     \arrayrulecolor{white}\specialrule{\belowrulesep}{0pt}{0pt}%     \arrayrulecolor{black}}  %%%%%END: Set up the coloured tables %%%%%  \begin{document} \begin{tabular}{ccc} \topline \headcol      & A & B\\ \cmidrule{2-3} \headcol Blue & Red & Yellow\\ \midline 1 & 2 & 3 \\ \bottomrule  \end{tabular}  \end{document}

I'm using consecutive \cmidrule commands in conjunction with \arrayrulecolor to alternately hide and unhide horizontal rules in a table.  However, when \arrayrulecolor is used with \cmidrule, some odd vertical spacing is introduced. I'd like to eliminate it.  (I'm using longtable, so a colorbox, minipage, or anything else tied to a page won't work.)  Below is an image that introduces the challenge. The first block shows a \toprule.  My goal is to create a shaded border around the table, so I've added a dummy column.  The second rule shows a \cmidrule that skips the first column.  The third block shows how I can use a \cmidrule to fill in the whitespace with a shorter \cmidrule.  Finally, I want to recolor this short \cmidrule to the background color and restore the color later.  Note the jagged vertical skipping in case 4 compared to case 3.  Why would \arrayrulecolor change vertical alignment?  How can I eliminate the jagged edges?    Here is the code:   \documentclass[11pt]{article}  \usepackage{longtable} \usepackage{booktabs} \usepackage{color} \usepackage{xcolor} \usepackage{colortbl}  \setlength{\aboverulesep}{0pt} \setlength{\belowrulesep}{0pt} \setlength{\extrarowheight}{0.25ex}  \newcolumntype{L}{>{\columncolor[gray]{0.8}}l} \newcolumntype{C}{>{\columncolor[gray]{0.8}}c} \newcolumntype{R}{>{\columncolor[gray]{0.8}}r}  \begin{document}  \textsf{ \begin{longtable}{LLLLL}  & \multicolumn{3}{@{}L}{\small {\tablename\ \thetable{}} - demonstration of odd vertical alignment with arrayrulecolor} & \\%  & \multicolumn{3}{@{}L}{\small {case 1: the line below is a toprule}} & \\% \toprule  & \multicolumn{3}{@{}L}{\small {case 2: the line below is a cmidrule that spans the middle 3 columns.  Note the whitespace!}} & \\%  & \multicolumn{3}{@{}L}{\small {The challenge: hide the widespace giving the appearance of a spacing around a longtable.}} & \\% \cmidrule[\heavyrulewidth]{2-4}  & \multicolumn{3}{@{}L}{\small {case 3: the line below is 3 cmidrules, 1 each for the first and last columns and 1 for the middle}} & \\%  & \multicolumn{3}{@{}L}{\small {note how the cmidrules align vertically ... perfect!}} & \\% \cmidrule[\heavyrulewidth]{1-1}\cmidrule[\heavyrulewidth]{2-4}\cmidrule[\heavyrulewidth]{5-5}  & \multicolumn{3}{@{}L}{\small {case 4: Now, lets try recoloring the first and last cmidrules}} & \\%  & \multicolumn{3}{@{}L}{\small {how do I eliminate the odd vertical alignments?}} & \\% \arrayrulecolor[gray]{0.80}\cmidrule[\heavyrulewidth]{1-1}\arrayrulecolor[gray]{0.0}\cmidrule[\heavyrulewidth]{2-4}\arrayrulecolor[gray]{0.80}\cmidrule[\heavyrulewidth]{5-5}\arrayrulecolor[gray]{0.00} \endfirsthead  &  Arizona State University &  & ASU &\\   &   Baylor University &  & BAYLOR &\\   &   Boston University & 164988 & BU &\\   &   Brown University & 217156 & BROWN &\\   &   California Institute of Technology & 110404 & CALTECH &\\   &   Carnegie Mellon University & 211440 & CMU &\\   &   Case Western Reserve University & 201645 & CASE &\\   &   Columbia University & 190150 & COLUMBIA &\\   &   Cornell University & 190415 & CORNELL &\\      & Yale University & 130794 & YALE & % \label{tab:schools} \end{longtable} }  \end{document}


I have following 3 tables:  ....... .......  …………………………           ………………………………                       …………………………  I run the following query  SELECT Employee.EmployeeId,   EmployeeName,   ProjectName FROM Employee JOIN ProjEmp ON Employee.EmployeeId=ProjEmp.EmployeeId JOIN Project ON Project.ProjectId=ProjEmp.ProjectId   And it gives following result:    But I need result like this:     Suggest me the best query for my desired result.

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


I'm attempting to install Citrix Receiver on a fresh install of Lubuntu. Being a flavor of Ubuntu, I figured it'd be safe to ask this here.  I run: sudo dpkg -i icaclient_13.10.0.20_amd64.deb  and I get the following  (Reading database ... 243579 files and directories currently installed.) Preparing to unpack icaclient_13.10.0.20_amd64.deb ... Unpacking icaclient (13.10.0.20) over (13.10.0.20) ... dpkg: dependency problems prevent configuration of icaclient:  icaclient depends on libwebkit-1.0-2 | libwebkitgtk-1.0-0; however:   Package libwebkit-1.0-2 is not installed.   Package libwebkitgtk-1.0-0 is not installed.  dpkg: error processing package icaclient (--install):  dependency problems - leaving unconfigured Processing triggers for desktop-file-utils (0.23-3ubuntu2) ... Processing triggers for mime-support (3.60ubuntu1) ... Errors were encountered while processing:  icaclient   I don't see these exact packages show up in the Muon Package Manager.  So, my question is: what is the safest way to go about installing these packages without breaking my OS?  Package libwebkit-1.0-2 is not installed. Package libwebkitgtk-1.0-0 is not installed.

Say, I have foo-1.2.3.deb which depends on perl and python, however, running command:  dpkg -i ./foo-1.2.3.deb   won't install these dependencies. So I must apt-get install perl python by hand.  How to make dpkg -i install these dependencies for me automatically?


My system log is filling up with messages like the following: sshd[17572]: Invalid user admin from 71.213.202.114 port 45636   sshd[17572]: Received disconnect from 71.213.202.114 port 45636:11: disconnected by user [preauth]   sshd[17572]: Disconnected from invalid user admin 71.213.202.114 port 45636 [preauth]    There are attempts for 13 users on 1 - 3 ports each from one IP before the cycle repeats from another IP. My firewall config is:     Name Type Targets Filters Protocols / ports Action Priority Network     default-allow-icmp Ingress Apply to all IP ranges: 0.0.0.0/0 icmp Allow 65534 default   default-allow-internal Ingress Apply to all IP ranges: 10.128.0.0/9 tcp:0-65535 Allow 65534 default   ” ” ” " udp:0-65534 ” ” ”   ” ” ” " icmp ” ” ”   default-allow-rdp Ingress Apply to all IP ranges: 0.0.0.0/0 tcp:3389 Allow 65534 default   default-allow-ssh Ingress Apply to all IP ranges: 0.0.0.0/0 tcp:22 Allow 65534 default   jamulus-fj Ingress jamulus-fj IP ranges: 0.0.0.0/0 udp:22124 Allow 1000 default     With the exception of trying to open UDP 22124, this is the default Google Cloud setup. I’m a relatively inexperienced admin. I want to have reasonable security and keep my log files from filling up every 30 minutes. Another post suggests that “Open only ports 80 and 443 to the world, all other ports must be restricted to expected IPs”. How can I do this? Any other suggestions that would address my concern?

I just checked my server's /var/log/auth.log and found that I'm getting over 500 failed password/break-in attempt notifications per day! My site is small, and its URL is obscure. Is this normal? Should I be taking any measures?


We know that any matrix of the form $A^TA$ is positive semi-definite where $A^T$ is the transpose of $A$. Now how can we use this result in optimization?  Edit: The importance of positive semi-definite matrices is almost clear, but my question is specific to $A^TA$. I have no idea of how we can use this matrix.

I know the definition of symmetric positive definite (SPD) matrix, but want to understand more.   Why are they so important, intuitively?  Here is what I know. What else?   For a given data, Co-variance matrix is SPD. Co-variance matrix is a important metric, see this  for intuitive explanation. The quadratic form $\frac 1 2 x^\top Ax-b^\top x +c$ is convex, if $A$ is SPD. Convexity is a nice property for a function that can make sure the local solution is global solution. For Convex problems, there are many good algorithms to solve, but not for non-covex problems. When $A$ is SPD, the optimization solution for the quadratic form $$\text{minimize}~~~ \frac 1 2 x^\top Ax-b^\top x +c$$ and the solution for linear system $$Ax=b$$ are the same. So we can run conversions between two classical problems. This is important because it enables us to use tricks discovered in one domain in the another. For example, we can use the conjugate gradient method to solve a linear system.  There are many good algorithms (fast, numerical stable) that work better for an SPD matrix, such as Cholesky decomposition.   EDIT: I am not trying ask the identities for SPD matrix, but the intuition behind the property to show the importance. For example, as mentioned by @Matthew Drury, if a matrix is SPD, Eigenvalues are all positive real numbers, but why all positive matters. @Matthew Drury had a great answer to flow and that is what I was looking for.


I want to prove or disprove $\displaystyle\sum_{n\ge1} \frac{{\sin n}}{n}$ is absolutely convergent.  I can prove $\displaystyle \sum_{n\ge1} \frac{{\sin n}}{n}$ is convergent by dirichlet's test (Can I prove that $\displaystyle \sum_{n\ge1} \frac{{\sin n}}{n}$ converges without dirichlet's test), but I can't prove or disprove that $\displaystyle\sum_{n\ge1} \frac{\vert{\sin n}\vert}{n} $ converges.  Any help would be appreciated.

I know that the series $\sum_{k=1}^\infty \frac{\sin k}{k}$ converges (to $\frac{\pi - 1}{2}$), though by crazy stuff with Dirichlet Kernels or by reverse-engineering $\frac{\pi - x}{2} = \sum \frac{\sin (kx)}{k}$ using Fourier Series.  My question instead: Is $\sum_{k=1}^\infty \frac{\sin k}{k}$ absolutely convergent?  My gut instinct is no: It behaves not-much-better than $\sum \frac1k$, but that's certainly not a rigorous proof.


I know it should be a simple matter of grep -wl ht /proc/cpuinfo but that's not always accurate.  I have an i5-7440HQ CPU which doesn't support hyper-threading (, , and my BIOS agree on this).    Yet /proc/cpuinfo and dmidecode both show that hyperthreading is supported (but disabled).  Kernel 4.10.8  When running a report of all machines that are HT capable, but have it disabled, this machine shows as a false positive... I'd like to fix that.  Is there a more accurate test that will show that this CPU really doesn't have HT?  Edit:  The related question  asks how to tell if it's enabled, which is not what I'm asking.  Some of the answers to that question mistakenly attempt to answer this question instead, but none of them provide a correct answer (as noted above).

How can I check if hyperthreading is enabled on a Linux machine, using a perl script to check for it?  I'm trying the following way:  dmidecode -t processor | grep HTT   Let me know if I'm on right track.


When I create array of LinkedList (of Integers) like this,  new LinkedList<Integer>[V];   it gives me error saying "Generic Array creation"  but when I create array like this  new LinkedList[V];   it works fine.  What is this error and what's going wrong here ?

Due to the implementation of Java generics, you can't have code like this:   public class GenSet<E> {     private E a[];      public GenSet() {         a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation     } }   How can I implement this while maintaining type safety?  I saw a solution on the Java forums that goes like this:  import java.lang.reflect.Array;  class Stack<T> {     public Stack(Class<T> clazz, int capacity) {         array = (T[])Array.newInstance(clazz, capacity);     }      private final T[] array; }   But I really don't get what's going on.


I have an application in VB6 which I am supporting. The only environment that I know of to edit the VB6 project is "Microsoft Visual Basic 6.0" its kind of hard to navigate around compare to the modern editors.   In my projects there are VisualBAsic Module File and a ORIG FILE eg:  mymodule mymodule.bas.orig  "I will never have to modify the UI just the script"  My first question is is there are alternate Application to modify VB6 project(Without Migrating)?  If not I can see that the module file can be edited using Notepad++. So my second question is can I use Notepad++, sublime, intelij etc. To modify the module then save without any complication(character compatible issues?, file linking issues etc) ? Are there any known issues by doin this? Would you recommend Editing scripts external using a text editor?

I've been spoiled by Visual studio 2008 and Eclipse and have to do a little maintainence work on a VB6 app.  Does anyone know of an alternative/ updated IDE for VB6?  A rewrite is not an option I'm just fixing a couple of bugs and it's a big codebase.


On the mobile site and iOS/android app, I'm unable to find how to view featured questions for particular tags. I can see the choice for Active, Newest, Votes etc, but Featured isn't in the list. Would it be possible to add this feature?

How can I find questions with a bounty in the iOS app? (and sort by highest bounty and newest questions)


I had some broken packages and as far no other answer helped, I was trying this . So I ran sudo apt list | grep python | cut -d "/" -f1 | xargs sudo apt-get remove -y and after my keyboard didn't work. After restarting I booted into tty (actually tty1 with started bpfilter at the top) and there was no GUI. I tried to install x11 via apt (because there where no startx) but after startx I can only see a black screen with a mouse. How can I install all the packages I removed and what should I do? my ubuntu version is: 18.04.3 LTS

I am a new Ubuntu user running Ubuntu 13.04.  I've been trying to install and use a DeDRM tool, but I've been having problems doing so. I was following some directions that said I needed a version of Python 2.7, but not anything Python 3.0 or later (because 3.0 versions are missing some necessary libraries?). I tried to install Python 2.7.5.6, but it didn't work. I thought it was probably because I had the later version of Python, so I went through terminal and removed Python 3.3, so I could install the earlier version of Python.  Now that I've uninstalled Python 3.3, a lot of applications no longer work, including the terminal and the Ubuntu Software Center. I have no idea how to fix this problem now.


I'm trying to make a Client/Server chat application using java. I'm pretty new to using sockets to communicate between applications. I've decided to use ObjectInput/ObjectOutput streams to send objects between the client and server. I'm trying to send user data to the server when the client connects to the socket. Here is the code. Server: private void startServer() {         try {             this.server = new ServerSocket(port);             this.socket = server.accept();             ChatUtils.log("Accepted a new connection!");             this.output = new ObjectOutputStream(socket.getOutputStream());             this.input = new ObjectInputStream(socket.getInputStream());                          try {                 User user = (User) input.readObject();                 ChatUtils.log(user.getDisplayName() + " (" + user.getUsername() + ") has connected!");             } catch (ClassNotFoundException e) {             }                      } catch (IOException e) {             e.printStackTrace();         }     }   Client: public void connectToServer(int port) {         try {             server = new Socket("127.0.0.1", port);             this.port = port;                          this.objectOutput = new ObjectOutputStream(server.getOutputStream());             System.out.println("Connected to a server on port " + port + "!");             objectOutput.writeObject(user);         } catch (UnknownHostException e) {             e.printStackTrace();         } catch (IOException e) {             e.printStackTrace();         }     }  Everything works fine, but I'm looking for some clarification as to how the methods ObjectOutputStream#writeObject() and ObjectInputStream#readObject() work.  When I write the line User user = (User) input.readObject();, it reads the object as a User object. Would this only attempt to convert "User" objects that are send from the client's ObjectOutputStream?  As this method is only called once, can I cast the input stream to other objects if I send those objects to the server from the output stream? Ex: String message = (String) input.readObject();.  What would happen if I sent multiple objects to the server from the output stream at once?   4)In example one, I try to read the "user" object. What happens if there are two or more objects waiting to be read? How do I determine which object is which? Ex:  // Client  public void connectToServer() {     String message = "Hello server!"     User user = new User("John Doe", "jdoe123");     output.writeObject(user);     output.writeObject(message); }  If someone could answer these questions, that'd be great. Thanks so much!

What is meant by "object serialization"? Can you please explain it with some examples?


I am doing my homework and I have a question about one line. I don't understand what this >&2 means:  if test -d $2    then echo "$2: Is directory" >&2 ; exit 21 fi

I see stuff like command 1> out or with 2>&1 to redirect stderr, but sometimes I also see &> by itself, etc.  What is the best way to understand & and what it means exactly?


When I use ß in headings - which I want to be in small caps - it gets replaced by a double S. Is there a way to still have a ß there, which is also the same height as the other letters?  Just to clarify: I've modified the \sectionlinesformat this way so that I get small caps in the headers while displaying the text normal in the toc.  MWE:  \documentclass[10pt, oneside, numbers=noenddot]{scrbook}  \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{microtype} \usepackage[osf]{newpxtext} \usepackage[ngerman]{babel}  \setkomafont{chapter}{\huge\fontfamily{qpl}\selectfont\normalfont\lsstyle\scshape} \setkomafont{section}{\large\fontfamily{qpl}\selectfont\normalfont\lsstyle\scshape}  \renewcommand*{\sectionlinesformat}[4]{#3 \MakeLowercase{#4}}  \addtokomafont{chapterentry}{\normalfont\lsstyle\scshape}  \begin{document}     \tableofcontents     \chapter{größe}     \section{Größe} \end{document}   EDIT: I've already tried the solution from , but this didn't work.

I am trying to get a ẞ in my LaTeX document. How can I do this? I already tried:   Using other fonts: dejavu and libertine Using \MakeUppercase{ß}, which sometimes produces nothing, sometimes produces "SS" Using {\sc ß}, which sometimes produces nothing, sometimes produces "SS" Using XeTeX and lualatex: Just leaves out ẞ and warns about the Glyph that it could not find Using \symbol{"1E9E}, which also produces nothing   How can I do this?


I'm attempting to learn Bayesian modelling with PyMC, so I have been going through Cam Pilon Davidson's Probabilistic Programming for Hackers. I literally copied his code from chapter 1 and used my own storm data. Here is the  of my code.  My problem is with the posterior distributions. One of them returns probabilities over 1. Or are they not actually probabilities? Should I be using a different alpha for my exponential distributions? Am I asking the right questions?  I'm not a heavy math person, so I may have a fundamental misunderstanding about what is going on here...  Thanks for any help!

On the , there is this line:      $p(\mathrm{height}|\mathrm{male}) = 1.5789$ (A probability distribution over 1 is OK. It is the area under the bell curve that is equal to 1.)    How can a value $>1$ be OK? I thought all probability values were expressed in the range $0 \leq p \leq 1$. Furthermore, given that it is possible to have such a value, how is that value obtained in the example shown on the page?


I am trying to understand how dynamic_cast works. I have a class interfaceElement with a class menu derived from it. In my program, I create no objects of class interfaceElement. When executing the following code (executing the line with dynamic_cast, to be more precise), the bad_cast exception is thrown  void drawInterfaceElement(interfaceElement elem, int colour1, int colour2) {     if (elem.getType()=="MENU")     {         menu &cur = dynamic_cast<menu&>(elem);         this->drawMenu(&cur,colour1,colour2);     } }   Why?

Someone mentioned it in the IRC as the slicing problem.


I've seen a lot of questions like this throughout the web but they're mostly from 2 or 3 years ago, so I decided to ask to have some updated answers.   I'm 16 and I want to start publishing and using the benefits that comes with the Developer Program. In the legal agreement says that I should be over 18, and I'm not so, i can't do it. I've contacted the apple developer support and they told me that I should use a account in my father's name. We reside in Brazil. With that, I had some doubts:   Will the name on the App Store be mine or my father's? In the future, when I'm 18, this account can be transferred to my name?   Besides that, if someone has any advice or (legal) workaround I'd appreciate it, thanks

When I registered to be an Apple Developer, I inadvertently did so without realizing the requirement to be 18 years of age (I was 17 and 6 months away from being 18 at the time). I did not take out any sort of paid membership at the time, however.  I am now 20, will this cause me any problems now or is it nothing I need to worry about?


I want to install Ubuntu onto a USB drive and run it without having to put another SSD into my PC and it not interfering with my existing windows 10.

I have been trying for a week to install (not live cd) Ubuntu on an external drive.  I am totally new to Linux and would love to try it out. That's why I want to install it on an external drive and not dual boot.   I used two USBs, one with a live Linux system, and another to install it onto. I chose the boot location as the external hard drive when installing Linux. But when I boot the PC (without the drive inserted)  GRUB appears and stays there. However when the drive is inserted and I boot the PC GRUB appears and gives me the option to go to Ubuntu.   So it seems as if Ubuntu is installed on the USB, but something important for booting seems to be installed on the PC and therefore when I use the drive on a different PC it doesn't boot (which is the main reason I'm installing Linux).   Please help me fix this!


I am looking for a single word to describe someone who knows how to search for an information in a knowledge base.

Having looked through the  and come across the following definition of an investigator as a:     person who checks thoroughly    is there a word, or phrase that describes     a person who checks rapidly   without implying sloppiness or inaccuracy.


Just earlier when I was trying to flag a question which I believed to be off-topic, I could not choose that option. A little red box just popped up and said "404".   So I had to just flag it for other and explain that it was off-topic

Recently on Stack Overflow I got privilege to flag a post. So when I try to flag a post as duplicate. The diaglog box is not properly loading.         However I am easily able to use other flag option like "other","spam" or "offensive".   "other"        "spam"        "offensive"        I am using Google Chrome Version 28.0.1500.71 and Win XP Operating System. I have tried in firefox as well but it is showing me same problem.


Is their any online tool / web site to check / validate javascript syntax , present in javascript file.  As I am having issue with IE 7 while executive javascript , So I need to validate my Javascript file.

Does anyone know of a good, extensible source code analyzer that examines JavaScript files?


$\lim\limits_{n\to\infty}\dfrac{\sqrt1+\sqrt2+\sqrt3+\ldots+\sqrt n}{n\sqrt n}$ I am having trouble doing this problem. I have attempted to take the Riemann Sum but cannot get past the square root. I also tried to upper-bound and lower-bound it, but I got stuck doing this.

$$\lim_{n \to \infty} \dfrac{\sqrt 1 + \sqrt 2 + \dots + \sqrt{n}}{n\sqrt{n}}$$   $$\lim_{n \to \infty} \dfrac{\sqrt 1 + \sqrt 2 + \dots + \sqrt{n}}{n\sqrt{n}} =\lim_{n\to \infty} \dfrac1{n}\sum^{n}_{k = 1} \sqrt{\dfrac k n} $$  While searching this question I found, .   Like in the accepted answer I first compared my series to LRAM,    $$\int_a^b f(x)\,dx=\lim_{n\to\infty}\frac 1n\sum_{i=1}^n f\left(a+\frac{b-a}n i \right)$$  I got $a = 0$, $b = 1$ and $f(x) =\sqrt{x}$ so,  $$\int_0^1 \sqrt{x}\ dx = \dfrac2 3$$ should be the answer.  Is there any simpler method to do this sum ? I have not learnt this method to do infinite sums so I can't use it.


If the phrase "Thank you kindly,..." is considered archaic, could someone suggest an alternative?  Thanks  Bill

on this site have established that kindly can be used as a sort of please.  This usage was in my mind when someone said "Thank you kindly" to me, but "thank you please" doesn't make sense.  However, characterizing one's own thanks as kind also sounds unlikely.  The actual usage appears to be the sixth definition by :     kindly   6. cordially or heartily: We thank you kindly.   However, I still have questions.  Is this usage of kindly only used with thank you?  How did this usage occur?


The  contains hot questions from many sites. However, some sites I am not interested in and I want to permanently blacklist them. Can this feature be added (unless it is already present, in which case please tell me how to use it)? Note that I do not want to limit my attention to sites I already know about (i.e. subscription is not an answer). For example, I am interested in Lisp. SE has several sites which have Lisp questions: StackOverflow, Emacs.SE, CodeReview.SE, Programmers.SE &c (not to mention all the platform-specific sites like Unix.SE and Apple.SE which also have Lisp-related questions). This means that white-listing is not an option. However, there are now the Japanese-language Ja.SE and Portugese-language Pt.SE, and I understand neither and I don't want to ever see anything related to those sites. This makes black-listing imperative.

I was going to make a filter for the "" by excluding some sites from it.  I noticed  which talks about "negative filtering" but does not explain how one can do it or if it is possible.  There does not seem to be a way to do this, though.  On the filter page, my only options are:  So how can I do "All sites except [list]"? It would also be nice if this could include similar functionality with the meta checkbox.  Something like "All main & meta sites except..."


I try to format a ybar diagram nicely.    Minimum Working Example (MWE):  \documentclass{standalone} \usepackage{pgfplots}  \begin{document}     \begin{tikzpicture}     \begin{axis}[     ybar                    = 1.5mm,     ymin                    = 0,     ymax                    = 300, %   set layers              = true, %   axis on top             = true,     symbolic x coords       = {Blub, Blab, Blop},     ymajorgrids             = true,     nodes near coords,     nodes near coords align = {vertical},     nodes near coords style = {text=black},     every node near coord/.append style={rotate=90, anchor=west},     ]     \addplot[fill=red, draw=red] coordinates {(Blab,180) (Blop,180) (Blub,180)};%     \end{axis}     \end{tikzpicture} \end{document}     Screenshot of the result:      Screenshot of the issue:      Description of the issue:  As you can see, the ybars are positioned in a visibility layer above the abscisse, therefore the abscisse is partly hidden by ybars. Well, I could easily activate set layers = true as well as axis on top = true, but in this case also the grid will be moved to the foreground layer while then hiding the node label texts. However, the node label texts should remain in the foreground above the grid lines (like seen here):    Therefore it is not possible to just activate the upper commands.  Is there an option available to only put abscisse (x-axis) and ordinate (y-axis) to the foreground layer of visibility while keeping the grids in the background?  The user  has posted an approach on how to keep the node text labels in the foreground, even when setting set layers = true and axis on top = true. Would it be possible to do something similar for abscisse and ordinate only while keeping grid in background?

In a plot with pgfplots I would like to draw, from background to foreground, in the following order:   (background) grid; (intermediate layer) plot; (foreground) axis.   As specified ,     Adding axis on top to the axis options means axis lines, ticks and   grids are printed on top of the stuff inside the environment.   So, this is not the correct option for this. This code  \documentclass{article} \usepackage{pgfplots} \usetikzlibrary{shapes.geometric,arrows,arrows.meta} \pgfplotsset{     /pgfplots/layers/Bowpark/.define layer set={         axis background,axis grid,main,axis ticks,axis lines,axis tick labels,         axis descriptions,axis foreground     }{/pgfplots/layers/standard}, }  \begin{document}  \begin{tikzpicture} \begin{axis}[/pgfplots/layers/Bowpark,              width=\textwidth,              xmin=-0.5, xmax=6,              ymin=-0.5, ymax=4,              axis line style = thin,              axis lines=middle,              axis line style={-{Stealth[length=2.5mm]}},              thick,              grid=major, grid style={dashed,gray!30}]      \addplot[blue, samples = 100] {x^2};  \end{axis} \end{tikzpicture}  \end{document}   doesn't work neither (plot is above grid, but also above the axis). I used \addplot[blue, samples = 100] {x^2}; instead of \addplot[samples = 100] {x^(1/2)}; to better highlight the superposition of the plot, the grid and the axis.      What's wrong? Note that also trying  \pgfplotsset{     /pgfplots/layers/Bowpark/.define layer set={         axis background,main,axis grid,axis ticks,axis lines,axis tick labels,         axis descriptions,axis foreground     }{/pgfplots/layers/standard}, }   (switched the order of main and axis grid) produces the same output.  Maybe something in my configuration ignores the layers order?


Using measure theory, one can see immediately that $\mathbb{R}^{n}$ is not the union of only finitely many (proper) affine subsets. Can we prove this using only algebraic methods? I know one way to do this using Vandermonde matrix and analyzing for each (proper) affine subset, points of the form $x_{0}+(1,r,r^{2},\ldots,r^{n-1})$ where $r$ varies in $\mathbb{R}$. Is there any other proof (hopefully) avoiding matrices and determinants? Moreover, what can we say when the ground field is finite?

Let $V$ be a finite-dimensional vector space, $V_i$ is a proper subspace of $V$ for every $1\leq i\leq m$ for some integer $m$. In my linear algebra text, I've seen a result that $V$ can never be covered by $\{V_i\}$, but I don't know how to prove it correctly. I've written down my false proof below:  First we may prove the result when $V_i$ is a codimension-1 subspace. Since $codim(V_i)=1$, we can pick a vector $e_i\in V$ s.t. $V_i\oplus\mathcal{L}(e_i)=V$, where $\mathcal{L}(v)$ is the linear subspace span by $v$. Then we choose $e=e_1+\cdots+e_m$, I want to show that none of $V_i$ contains $e$ but I failed.  Could you tell me a simple and corrected proof to this result? Ideas of proof are also welcome~  Remark: As @Jim Conant mentioned that this is possible for finite field, I assume the base field of $V$ to be a number field.


I'm looking for a method which will generically checks if an Array contains an object with the exact same param values.  Not something specific, a generic implementation.  Exemple :  var obj1 = {name : 'name1', id : 1, value : 'value1'}; var obj2 = {name : 'name2', id : 2}; var obj3 = {name : 'name3', id : 3, value : 'value1', title : 'title3'}; var obj4 = {name : 'name4', id : 4, value : 'value1', title : null};  var arrayObj = [obj1, obj2, obj3, obj4];  var test1 = {name : 'name1', id : 1}; // One missing attribut var test2 = {name : 'name2', id : 2, value : 'value2'}; // One additional attribut var test3 = {name : 'name3', id : 3, value : 'value1', title : 'title33'}; // attribut with different value var test4 = {name : 'name4', id : 4, value : 'value1'}; // same attributs beside the null one var test5 = {name : 'name3', id : 3, value : 'value1', titleBis : 'title3'}; // attributs with different names var test6 = {value : 'value1', id : 1, name : 'name1'}; // same attributs and attributs value but in different order  containsMethod(arrayObj, test1); // false containsMethod(arrayObj, test2); // false containsMethod(arrayObj, test3); // false containsMethod(arrayObj, test4); // true containsMethod(arrayObj, test5); // false containsMethod(arrayObj, test6); // true containsMethod(arrayObj, obj2); // true   Please let me know in comment if it's not clear. I've seen a lot of question for specific object, here I'm looking for a generic version.  Ideally this would also work for String, number etc, not only object with attributs

A strict equality operator will tell you if two object types are equal. However, is there a way to tell if two objects are equal, much like the hash code value in Java?  Stack Overflow question  is similar to this question, but requires a more academic answer. The scenario above demonstrates why it would be necessary to have one, and I'm wondering if there is any equivalent solution.


If $11^\text{10}-1$ is divided by $100$, then solve for '$x$' of the below term $$11^\text{10}-1 = x \pmod{100}$$   Whatever I tried:  $11^\text{2} \equiv 21 \pmod{100}$.....(1)  $(11^\text{2})^\text{2} \equiv (21)^\text{2} \pmod{100}$  $11^\text{4} \equiv 441 \pmod{100}$  $11^\text{4} \equiv 41 \pmod{100}$  $(11^\text{4})^\text{2} \equiv (41)^\text{2} \pmod{100}$  $11^\text{8} \equiv 1681 \pmod{100}$  $11^\text{8} \equiv 81 \pmod{100}$  $11^\text{8} × 11^\text{2} \equiv (81×21) \pmod{100}$ ......{from (1)}  $11^\text{10} \equiv 1701 \pmod{100} \implies 11^\text{10} \equiv 1 \pmod{100}$  Hence, $11^\text{10} -1 \equiv (1-1) \pmod{100} \implies 11^\text{10} - 1 \equiv 0 \pmod{100}$ and thus we get the value of $x$ and it is $x = 0$ and $11^\text{10}-1$ is divisible by $100$.  But this approach take a long time for any competitive exam or any math contest without using calculator. Any easier process on how to determine the remainder of the above problem quickly? That will be very much helpful for me. Thanks in advance.

$11^{10} \equiv 1 \pmod{100}$  I tried to solve by using euler's theorem, But I got stuck.  $\gcd(11, 100) = 1$  $11^{φ(100)} \equiv 1 \pmod{100}$  $11^{40} \equiv 1 \pmod{100}$  I don't know how to go on as $11^{40}$ is bigger than $11^{10}$


I need to get the fingerprint of a machine in a local network, so there's no risk of me getting a man in the middle fingerprint. My best attempt to get the fingerprint was to try to ssh into the machine using the ssh command line tool. However, it has the inconvenient that is blocks, sayign that   The authenticity of host '...' can't be established. ECDSA key fingerprint is...   with a prompt for yes or no.  I really need this to work without blocking, so is there a paremeter that I can pass to ssh that will print the fingerprint but don't block it nor connect to it? Maybe another native tool from ubuntu would do the work?

ssh-keygen -l -F host will print out the key of a remote host, but only if the host exists in known_hosts.Is it possible to request a fingerprint from a host that isn't in the known_hosts file? (without manual intervention such as connecting through ssh)


I am currently applying to a masters program, application is due on April 15, recommendation letters can be given until the 23.  I asked 3 professors to give me recommendation letters approximately on march 14. One of them already submitted it, but 2 haven't.  I don't want to be excessively insistent, because A) they did tell me they were busy when I asked, and B) I made a grave personal mistake towards one of the professors a long time ago, and the simple fact that he agreed to give me a recommendation letter is, I think, enough for me to never ask him for any favors in my life time.  However the due lines are coming, and I am getting a bit anxious.

It is important to know that I have requested about 7/8 letters per professors ( 3 total ). I have told them that I was conscious that it was a lot of letters to write so I was content with a general letter for most of the schools I wanted to get in and maybe one letter that was a bit more personalized for the school they felt I would have the highest chances of admission.  The nearest deadline is 10 days away. I have asked about this in late January and I haven't gotten anything yet.  I asked for an update in early March and the profs were either working on it or were being bottlenecked by the administration. But since then I got nothing.  The deadlines are approaching quickly and I hope you understand how stressed I feel about this. Would it be too petty to ask for a second update?  I need at least 3 letters, and I have only asked to 4 professors, one of which didn't answer so I think he doesn't want to write me one (for a reason I ignore). I may have made a mistake and should've asked more professors, that's on me. The point is I don't want to upset because if at least one of them decides that I am too annoying I can already cross half of the schools I wanted off the list.


I remember this series faintly. There was a young apprentice sorcerer whose master tasks him to make a few items with specific powers. One was a chainmail that I believe made you invisible, a gold bracelet. The master had a female visitor of some mystery. She also had an apprentice of sorts, I believe they transformed into swans? The master's apprentice was given access to specific spells in the magic text books, and he moved the bookmark past where he was allowed to read. The apprentice's helper transcribed the spell and was killed because he read too far. Anyone know the name of the series?

I remember starting, and losing, a book in the late 80s, early 90s, that I have been trying to  remember for a while now.  It's not much to go on, I realise, but the main crux of the plot, until I left the book in a phone booth :/, was an ice age (either implied or stated, I can't recall) was starting, and a (I think implied) glacier was moving closer to the main castle or walled city of the novel.   The setting was not specifically High Fantasy, but a medieval style setting.  The interesting thing I always remember about the book was that the antagonist appeared to be the ice itself, slowly, but inexorably, getting closer.


I need help solving this task, if anyone had a similar problem, it would help me. The task is: Solve the equation in a set of complex numbers. $z^3=\overline z$ I tried this : $z^3=\overline z\\\frac{z^3}{\overline z}=1\\z^2=1\\w_0=(\cos(0)+i\sin(0))\\w_0=1\\w_1=\cos(\pi)+i\sin(\pi)\\w_1=-1$ I only get results: $ 1,-1$ How to get complex solutions? Thanks in advance !

I know that $z = a + ib$ and that $\overline{z} = a - ib$, but when I try and calculate the solutions I get an unsolvable equation.   Would appreciate any help.


I would like to know the name of this math font. I do not how can I find it elsewhere and I think that the only place where people can help me is here.  The math font is illustrated in the following picture.

Is it possible to identify the font used in a specific document/picture?  Answers to this question should identify:   Possible methods to do this (perhaps one answer per method) and adequately describe how to use it (as opposed to merely stating it); Ways of finding the identified fonts, if possible (free or not); and Any prerequisites associated with the method used, if required (for example, "In order to use method X, your document has to be in format Y").   This question is meant as an FAQ, based on an . Its aim is to facilitate the community with the general procedures involved in font identification. Similar cases are solved on a per-usage basis on 's  tag.


The equation  $$TdS=dU+PdV$$ is a combination of  $$dQ=dU+PdV$$ and  $$TdS=dQ.$$ But in some process that is very irreversible, $TdS>dQ$, should we write  $$TdS>dU+PdV$$ instead of the first equation? I guess the equation is different for reversible and irreversible process.

Combining the first and second law of thermodynamics we can get the following equation  $$TdS=dU-P_{ext}dV$$  First question: Is this equation applicable for irreversible processes such that that $dS≠\dfrac{dQ}{T}$?  Second question:If the system temperature $T_{sys}$ is smaller than the surrounding temperature $T_{sur}$, which temperature should we put in the equation?   I have this question because sometimes people use $T_{sur}$ instead of $T_{sys}$ (e.g. , ) but the equation is supposed to describe changes in the system.


This thought came to me concerning the Star Wars universe.  On our planet (Earth) we have many different habitats (snowy wastelands, forests, cities); but in the Star Wars universe there only appears to be be one kind of environment per planet, e.g: Hoth is snowy, Endor is all forest and Coruscant is city.  Why is this?

The Earth in all of its varieties has wide ranging climates. At the top level it has tropical, dry, temperate, continental, and polar climates. And yet often the planets depicted in science fiction are often single climate planets.    The forest moon of Endor The desert planet of Dune The desert planet of Tatooine The desert planet of Vulcan The outer planets in Firefly all appeared to be mostly desert (supiciously like Calfornia desert).  The inner planets in Firefly were all temperate or tropical.  The icy Breen homeworld The icy Andorian homeworld The icy Frost Giant planet   I'm not suggesting there are no Earth-like planets in science fiction, but it feels like it is less common than it should be. Considering the only planet we have as an example is our own, it seems like planets should be just as varied in the cosmos.


I am trying to display the results of this get request but it is not returning any results or errors.  Even when testing I have tried to hardcode and append
my job
 but that doesn't work either.  Have you got any ideas?  Here is my code:

Is there some way I can show custom exception messages as an alert in my jQuery AJAX error message?  For example, if I want to throw an exception on the server side via  by throw new ApplicationException("User name already exists");, I want to catch this message ('user name already exists') in the jQuery AJAX error message.  jQuery("#save").click(function () {   if (jQuery('#form').jVal()) {     jQuery.ajax({       type: "POST",       url: "saveuser.do",       dataType: "html",       data: "userId=" + encodeURIComponent(trim(document.forms[0].userId.value)),       success: function (response) {         jQuery("#usergrid").trigger("reloadGrid");         clear();         alert("Details saved successfully!!!");       },       error: function (xhr, ajaxOptions, thrownError) {         alert(xhr.status);         alert(thrownError);       }     });   } });   On the second alert, where I alert the thrown error, I am getting undefined and the status code is 500.  I am not sure where I am going wrong. What can I do to fix this problem?


Suppose you have a binary that has to be run on maaaaaaaaany files (suppose files are numbered from 1 to N). Each file has to be processed by making a call to this binary (say.... something like md5sum). Each run will save the result on a separate file. So.... if we have 1000 files and we only have 4 CPUs, we don't want to do something like (if at all possible, actually):  i=0; while [ $i -lt 1000 ]; do md5sum a_file_$i > result_$i & i=$(( $i + 1 )); done   Because (even if bash wouldn't complain), we would end up starting 1000 processes that will make the computer go into crawling mode.  Is there a command available that I could use where I can tell said command that it has to be run like n processes at a time (start n processes, monitors when a process finishes and then starts another so that the number of processes running is always n)?

I have a bunch of PNG images on a directory. I have an application called pngout that I run to compress these images. This application is called by a script I did. The problem is that this script does one at a time, something like this:  FILES=(./*.png) for f in  "${FILES[@]}" do         echo "Processing $f file..."         # take action on each file. $f store current file name         ./pngout -s0 $f R${f/\.\//} done   Processing just one file at a time, takes a lot of time. After running this app, I see that the CPU is just 10%. So I discovered that I can divide these files in 4 batches, put each batch in a directory and fire 4, from four terminal windows, four processes, so I have four instances of my script, at the same time, processing those images and the job takes 1/4 of the time.  The second problem is that I lost time dividing the images and batches and copying the script to four directories, open 4 terminal windows, bla bla...  How do that with one script, without having to divide anything?  I mean two things: first how do I from a bash script, fire a process to the background ? (just add & to the end?) Second: how do I stop sending tasks to the background after sending the fourth tasks and put the script to wait until the tasks end? I mean, just sending a new task to the background as one tasks end, keeping always 4 tasks in parallel? if I do not do that the loop will fire zillions of tasks to the background and the CPU will clog.


Do we have   $f:(E,\tau)\to(F,\sigma)$ continuous if and only if $\forall A\subset E, f(\overline{A})= \overline{f(A)}$  or just: $f:(E,\tau)\to(F,\sigma)$ continuous if and only if  $$\forall A\subset E, f(\overline{A})\subset \overline{f(A)}$$

As a part of self study, I am trying to prove the following statement:  Suppose $X$ and $Y$ are topological spaces and $f: X \rightarrow Y$ is a map. Then $f$ is continuous if and only if $f(\overline{A})\subseteq \overline{f(A)}$, where $\overline{A}$ denotes the closure of an arbitrary set $A$.   Assuming $f$ is continuous, the result is almost immediate. Perhaps I am missing something obvious, but I have not been able to make progress on the other direction. Could anyone give me a hint which might illuminate the problem for me?


Sometimes my edits are rejected for no good reason. A good example is when I add a new major tag (like asp.net) to the question, and the edit is rejected for being a too minor edit. Adding an asp.net tag is not a minor edit. Everyone should know that.  By the way, this question does not have anything to do with the one suggested here. The only thing I can think of they have in common are the words "review" and "audit". That question is asking what audit reviews are, but my question is actually a suggestion on having a guideline for reviewing edits, or having an audit of edit reviews.    Note this question , but is essentially different:   As opposed to above question, this one is asking if there's a way to review reviews. The goal is the same as review audits (to improve the quality of reviewers), but the mechanism is different. Also, review of reviews is an active mechanism and review audit is a passive mechanism.  To put it simply, let edits be E and reviews be R. Review audits is still reviewing E (except that the E is not a real edit), whereas here I am asking whether there is anything to review R.

I recently received this rather amusing message while reviewing a user's first post:  Congratulations! This was only a test, designed to make sure you were paying attention. This post has already been removed, but thanks for taking time to leave feedback for the author.   What is the purpose of this test? How does the audit work? What happens if I fail? Why was the system expecting me to negatively review a good post, or positively review a bad post? A review is obviously an audit. Should I report it? Do review audits count toward the Reviewer badge? Do robo-reviewers dream of electric sheep?


I am using AJAX to dynamically add a button to the DOM. This button is supposed to trigger a function on click but it's not.  Here is the MWE:   index.html   <!DOCTYPE html>        <meta charset="UTF-8">

     btn.html      <button class="my_btn">Click here</button>   script.js   $(document).ready(function () {     // Adds the button to index.html     $.ajax({         type: "GET",         url: "btn.html",         dataType: "html",         success: function (html_text) {             $('#btn_content').html(html_text);         }     });      // Click event that is not triggerd     $('.my_btn').click(function () {          console.log("This is not working");     }) });   A similar issue was mentionned but not answered with a practical solution at the time.   Any thoughts?

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I'm doing nested cross-validation on a classification problem (inner loop to tune hyperparameters, outer loop to select algorithm). I've often heard that a reasonable number of folds for standard (I.e.: not nested) cross-validation is 5 or 10. Is there a similar rule of thumb for nested cross-validation? Should I have more folds in the inner or the outer? How many? I'm not looking for a definitive answer, I'm just curious to hear what people usually go for.

I have a small imbalanced sample of 18 and 12 records in 0-labeled and 1-labeled groups respectively with 6 features, so the size of my feature matrix X is $30 \times 6$ and y is my target vector $30 \times 1$.  The data in CSV format is shared via the :  THE PROBLEM  I would like to assess my classification accuracy and to do so, I perform the stratified nested cross validation: the outer loop iterates over different train-test samples, and the inner loop selects the best model. The sklearn (0.18.1) implementation of the code:  sss_outer = StratifiedShuffleSplit(n_splits=10, test_size=0.333, random_state=None) sss_inner = StratifiedShuffleSplit(n_splits=10, test_size=0.3, random_state=None)  parameters = {'clf__C': logspace(-4,3,150)} pipe_logistic = Pipeline([('scl', StandardScaler()),('clf', LogisticRegression(penalty='l1'))]) grid_search = GridSearchCV(estimator=pipe_logistic, param_grid=parameters, verbose=1, scoring=make_scorer(accuracy_score), cv=sss_inner) cross_val_score(grid_search, X, y, cv=sss_outer, scoring='accuracy')   Also, in order to see how many instances are in each partitioned group, I created a simple function "nested_partitioning_calculator()", which quickly computes the number of instances in each split.  nested_partitioning_calculator(X, y, sss_inner, sss_outer) ----------------- Outer Split: Train+Validate and Test ----------------- [8, 12] [4, 6] [8, 12] [4, 6] [8, 12] [4, 6] [8, 12] [4, 6] [8, 12] [4, 6] [8, 12] [4, 6] [8, 12] [4, 6] [8, 12] [4, 6] [8, 12] [4, 6] [8, 12] [4, 6] ----------------- Inner Split: Train and Validate ----------------- [6, 8] [2, 4] [6, 8] [2, 4] [6, 8] [2, 4] [6, 8] [2, 4] [6, 8] [2, 4] [6, 8] [2, 4] [6, 8] [2, 4] [6, 8] [2, 4] [6, 8] [2, 4] [6, 8] [2, 4]   From this example, it's clear, that the outer CV loop splits [12, 18] data (18-in 0 class, and 12 in 1 class) into [8, 12] for the training sample and [4, 6] and then, the inner loop splits again [8, 12] into training set [6, 8] and validation set [2, 4]. So, basically, the training is performed on a small set of 6 instances from the 1 class and 8 instances from the 0 class.  THE QUESTION  Obviously, different values in the test_size parameter will yield different CV accuracy results. What is the proper way to split the small data set in the case of the nested CV? Should I be aiming at smaller test and validation samples? (aka LOOCV?).


In  tutorial it is given that StringBuffer is synchronized and StringBuilder is not   Can a class be synchonized ? I know that  synchronized methods are locked for particular thread and non synchronized are not.But how does a performance of the programe is increased with non-syncronized method? Code from    public class Main {     public static void main(String[] args) {         int N = 77777777;         long t;      {         StringBuffer sb = new StringBuffer();         t = System.currentTimeMillis();         for (int i = N; i --> 0 ;) {             sb.append("");         }         System.out.println(System.currentTimeMillis() - t);     }      {         StringBuilder sb = new StringBuilder();         t = System.currentTimeMillis();         for (int i = N; i --> 0 ;) {             sb.append("");         }         System.out.println(System.currentTimeMillis() - t);    }   } }   gives the numbers of 2241 ms for StringBuffer vs 753 ms for StringBuilder.   and accoding to  the extracode is the synchronised keyword in StringBuffer.Does this synchronised keyword cost the extra 1488ms and if so then should we always prefer StringBuilder instead of StringBuffer?  Thanks in advance.

What is the main difference between StringBuffer and StringBuilder? Is there any performance issues when deciding on any one of these?