I'm running Ubuntu 11.04. I use the terminal to start a bash session, and I want to add an environment variable:  $r@hajt:~$ env THEVAR=/example   But it's not working. It shows all the variables with THEVAR being the last one, but another call to env does not show THEVAR anymore- env | grep THEVAR returns nothing.  Similarly, scripts with export (export THEVAR=/example) or other variable assignments (THEVAR=/example) don't add the environment variable.  I know I'm doing something wrong, I know it should be something simple, but I just can't find what.  UPDATE: The real meaning of my question was this one:   (Anyway I'll choose the most voted answer and leave the edited title -that wasn't what I was asking)  env runs a program in a modified environment, then dismisses all the changes.


Allow images from Area 51 as Community Ads

I was on Meta Super User trying to submit an ad for the Internet of Things Q&A proposal, with the following in my answer box:  [![Stack Exchange Q&A site proposal: Internet of Things][1]][2]    [1]: http://area51.stackexchange.com/ads/proposal/94224.png   [2]: http://area51.stackexchange.com/proposals/94224/   I then got an error:       Community ads must have an image hosted at i.stack.imgur.com; use the image button from the editor to upload.   Can we enable Area 51 images for Community Ads?


How to reliably keep an SSH tunnel open?

I use an SSH tunnel from work to go around various idotic firewalls (it's ok with my boss :)). The problem is, after a while the ssh connection usually hangs, and the tunnel is broken.  If I could at least monitor the tunnel automatically, I could restart the tunnel when it hangs, but I haven't even figured a way of doing that.  Bonus points for the one who can tell me how to prevent my ssh connection from hanging, of course!


How is `void main` invalid, when it compiles just fine?

I find about int main definition, but not of void main in introduction of c++ programming language. I tried reading all the articles written in introduction of c++ programming language.


In this case I'm trying to understand the difference between this wrong strdup and the good one.  char *wrong_strdup(char *str) {     char *dest;      dest = str;     return (dest); }


What approach should I take to establish this logical proof?

I need to design a logical math proof:  Write a detailed structured proof to prove that if m and n are integers, then either 4 divides mn or else 4 does not divide n.   Hint: Think about the form of the statement.   I was thinking about first proving that either 4 should divide m or n in order for the first part to be true, then use proof by cases to prove what happened when m was 4, and another case when n was 4...  But I got stuck, what do you recommend:    This is what I got so far: Claim: (m ∈ Z ∧ n ∈ Z) => (4 | mn ˅ 4 ∤ n)  Negated claim: (m ∈ z ∧ n ∈ z) ∧ ( P(n) ∧ ¬P(mn) )  Proof by contradiction  Assume m , n ∈ z:    Assume P(n) ∧ ¬P(mn):       Then ∃ q ∈ R, n = 4q       Let q0 be such that n = 4q0       Then mn = m(4q0)       Then mn = 4(mq0)       Then ∃ q ∈ R, mn = 4q        Then 4 | mn     Then P(n) ∧ P(mn) Then (m , n ∈ z) ∧ P(n) ∧ P(mn))    I know that is wrong, how can I fix it?


How to I mount a folder from my computer into a specific spot on my VM AND have it owned by me, not root?

I am running a VirtualBox with Ubuntu 18.04 Desktop, and I need access on this guest to a folder on the host; however, the access needs to be full so I can run Wordpress. I have added myself to the vboxsf group after using the built in mounting for Ubuntu desktop, no result. I've tried chown, no result. How can I mount the shared folder on my VM and have it not owned by root and have all permissions?


Replace strings in a file based on a list of strings and a list of corresponding replacements

I am trying to replace strings in a file A:  Hello Peter, how is your dad? where is mom?    where the strings to be replaced are in file B:  Peter dad mom   and their corresponding replacements are in file C:  John wife grandpa   Expected outcome:  Hello John, how is your wife? where is grandpa?   Can I edit file A, replacing the value in file B by using the value from the corresponding line in file C?  What I have done so far:   cat 1.txt | sed -e "s/$(sed 's:/:\\/:g' 2.txt)/$(sed 's:/:\\/:g' 3.txt)/" > 4.txt   it works if there is only one line in file B & file C, if there is more than one line, it won't work.


Could you please tell me how to go back to my old android? I have a Samsung S5 and I tried the factory reset and that did not work. I hate this new android version


Creating a color theme using adobe kular

I am trying to create a color theme to my website using adobe kuler. I am really new to that app and confusing how to create a theme there.   This is my main color - #53001e   Can any body tell me what are the other colors that might be match to this main color?   Thank You.


What does an Italicized username mean in a chat room, and how much can a room owner penalize somebody that doesn't like somebody else?

I was in a room and one of the characters there whose name was in italics, didn't like the discussion another was engaged in. The person whose name was in italics, then wrote some incorrect information (probably trolling saying something blatantly wrong) (I'll include it here since he appeared here, introduced himself, and provided the transcript) "THERE IS NO REFERENCES OR POINTERS IN JAVA GET OVER IT" Vogel612 (the person whose name was in italics) (in the Java chat room) And he tried to imply that any discussion of references in java was off topic, because java didn't have references.  (a rather absurd claim). The fact that he was wrong (references do exist in java) was pointed out to him,  at which point he suggested that he had some power, as indicated by his name being in italics, and that he shouldn't be messed with, and he declared that the topic should not be discussed further. I went to see who owns the room, but I saw no list. Though I see clicking on names of people whose names are in italics, lists that individual as an owner of the room. So i'm curious. Do these owners have the power to ban somebody from a room? If so, then for how long? Do they have the power to mute somebody? Interestingly the person whose name was in italics, then started telling other people whose names were also in italics that the discussion was finished. Is it possible that one person whose name is in italics has more power than another. And is it possible to see what the ranking is? vogel has brought up the chat transcript itself, link here


Why doesn't echo called as /bin/sh -c echo foo output anything?

For example, while this works:   $ echo foo foo   This doesn't:   $ /bin/sh -c echo foo    Whereas this does:   $ /bin/sh -c 'echo foo; echo bar' foo bar   Is there an explanation?


Multiple footmark messes with hyperref. Hyperlinks pointing to wrong footnotes or dead

When setting multiple footmarks inside an environment that doesn't allow any (equation), the ids correspond to the correct footnotetexts but not the hyperlinks.  \documentclass{article}  \usepackage{amsmath} \usepackage{hyperref}  \begin{document}      Text\footnote{text1} Text\footnote{text2}      \begin{equation}         \refstepcounter{equation}         J=b a^3         \tag{\theequation\footnotemark{}\footnotemark{}}     \end{equation}      \#1 links to \#1      \#2 links to \#2      \#3 does not link anywhere      \#4 links to \#3      \addtocounter{footnote}{-2} %3=n     \stepcounter{footnote}\footnotetext{a}     \stepcounter{footnote}\footnotetext{b}      \newpage\null\thispagestyle{empty}\newpage   \end{document}


How to change switched outlets to half switched and half always hot

I'm trying to make my two switched outlets to be half hot. I tried breaking the brass tab on outlet 1 to accomplish that but that didn't work. It only made one receptacle work from the switch while the other didn't work at all. It also caused outlet 2 to not work at all. I don't know if it's the current wiring or if it's just not possible at all. Help please!!


How do I repair "partially" corrupted raw (cr2) files?

I have a number of raw images which were restored after deletion, when I open them in image viewer they seem to be fine, but if I open them in Photoshop image seem to be corrupted. How is it possible and is there a way to extract this uncorrupted image?


Deriving $p = mv$ from translational symmetry (momentum conservation law)?

"In classical mechanics, momentum is defined as the quantity which is   conserved under global spatial translations or, alternatively, as the   generator of spatial translations."   (G.Parisi, Quantum mechanics)   From this definition (the generator of spatial translation), how can I obtain the analytical expression of the momentum (i.d. $p=mv$)?


Is there any function to calculate statistical NDVI in landsat8 package


What will happen to flag marked as "eventinvalidated"?

A few days ago, someone posted a question about updating dataset. After some questions/comments to his question, it didn't receive answers (and no up/down vote).  1 or 2 days later, the user posted the  (he just reformulated the question, posted less code and with bad formatting, the code doesn't compile due to missing ' for comments), so it would be harder to get answer for this question . The question received a +1.   I flagged this question as a duplicate of the previous and asked user to edit the previous instead of creating a new one, but he deleted the previous.  I do not blame the asker, I understand he wanted to keep it's 5 points rep  :) And it seems he solved his problem later.  But now the flag is marked with eventinvalidated because it is impossible now to accept or reject it?   Since my flag is no longer appropriate, I am just curious about what could happen to this flag?


Question: Can a number written using one hundreds 0's, one hundred 1's and one hundred 2's be a perfect square?  I have no idea where to start.


Is it possible that your friends can join your Hamachi server when they don't have Hamachi?


I am confused about what TeX and its offspring (LaTeX, pdfTeX/pdfLaTeX, e-TeX, ConTeXt, LuaTeX, etc.) are.  Some, like LaTeX, seem like add ons to TeX (maybe a change to the eyes and mouth, but not stomach). Others, like pdfTeX, seem like changes to the underlying system (i.e., a change to the stomach).  Is there a good reference that explains the differences and the evolution?


Where to ask a question about an IDE?  It's programming related (well, kinda), but it's also a question about software. It's most likely that programmers will be able to answer the question correctly.  So, should it go on Stack Overflow, Super User or both?


Or point me to some statistics page that could help me answer my own question.  Does posting questions on weekends reduce the chance of getting an answer? It obviously doesn't count if the answers are fewer because the questions are fewer.


I want to round the numbers like this:  Value   Expected 0,523%  1% 2,235%  2,5% -0,081% -0,5% -1,081% -1,5%   How can I do this with JavaScript?  Solution:    static round (num) {     const abs = Math.abs(num);     const sign = num < 0 ? -1 : 1;     return sign * (abs % 1 > 0.5 ? Math.ceil(abs) : Math.floor(abs) + 0.5) } }   I used Excel for it =round(Value/Granularity)*Granularity but I tried it in JavaScript not working.    static calc(num){     const granularitiy = 0.00005;     let calc = Math.round((num / granularitiy)) * granularitiy;     return calc;   }   My granularity value is 0.00005;


I want my screen and/or the pc to go to sleep(or suspend) after x amount of time. Have enabled automatic suspend, blank screen after 1 minute, blank screen delay(inside the Privacy section), and it does nothing. Searched the web for possible fixes and disabled the bluetooth as well(to prevent it from not going to idle). Disabled to mouse so that it won't "jiggle" - nothing happens. Is this supposed to work on a desktop pc(not a laptop)? Seeing that most of the questions regarding this are related to "how do i disable suspend in ubuntu", my first reaction was wtf, why does everyone wants to turn this off? I don't know how to debug this and certainly don't wanna go back to win 10 just b/c of this, so every hint or suggestion is welcome!


Sum category column in one sheet based on a dates column in another sheet


Can I accept an already rejected edit (to my own post)?

Today,  to one of . Before I got to see the notification, the edit already was rejected by other people (three rejections, one approval).  But the edit was actually a good one (like most edit proposals to my post I get to see) – a correction of syntax errors, so I would have definitively approved it.  (The suggested edit didn't change the main point of the answer, which was about the API to use, but it made the code example of my answer actually usable. I didn't compile it when writing my answer, it was late at the evening.)  So I did edit my post to include the proposed change, so the proposal is not fully lost. But the proposer only got the negative feedback from the rejection, and none of the reputation bonus an accepted edit gives.  My suggestion: Could there be added a way a post author can accept edits which were already rejected by other users?  Also, is there some way I can contact the rejectors and teach them not to reject good edits?


The following is a test of mba entrance    Why is there a 's after RNA in number 2 ?  PS: the number 2 should change to      RNA's direct   according to the answer sheet.


What happens in Neutrino-antineutrino annihilation?

They only interact with gravity and weak force, so how do they emit their energy? My theory is that they would somehow emit photons (?)


Why is Java's Math.min so slow in my Android app?

I had some code I was profiling and was surprised at how much time was being spent on Math.min(float, float).  In my use case I needed to get the min of 3 float values, each value is guaranteed to not be NAN or another edge case float value.  My original method was:  private static float min2(float v1, float v2, float v3) {     return Math.min(Math.min(v1,v2),v3); }   But I found that this was about 5x faster:  private static float min1(float v1, float v2, float v3) {     if (v1 < v2 && v1 < v3) {         return v1;     }     else if (v2 < v3) {         return v2;     }     else {         return v3;     } }   For reference this is the code for Math.min:  public static float min(float f1, float f2) {     if (f1 > f2) {         return f2;     }     if (f1 < f2) {         return f1;     }     /* if either arg is NaN, return NaN */     if (f1 != f2) {         return Float.NaN;     }     /* min(+0.0,-0.0) == -0.0 */     /* 0x80000000 == Float.floatToRawIntBits(-0.0f) */     if (Float.floatToRawIntBits(f1) == 0x80000000) {         return -0.0f;     }     return f2; }   Note: My use case was symmetric and the above was all true for max instead of min.  EDIT1: It turns out ~5x was an overstatement, but I am still seeing a speed difference  inside my application. Although I suspect that may be due to not having a proper timing test.  After posting this question I wrote a proper micro optimization speed test in a separate project. Tested each method 1000 times on random floats and they both took the same amount of time. I don't think it would be useful to post that code as it's just confirming what we all already thought.  There must be something specific to the project I'm working on causing the speed difference.  I'm doing some graphic work in an Android app, and I was finding the min/max of the values from 3 touch events. Again, edge cases like -0.0f and the different infinities are not an issue here. Values range between 0.0f and say 3000f.  Originally I profiled my code using the Android Device Monitor's Method Profiling tool, which did show a ~5x difference. But, this isn't the best way to micro-profile code as I have now learned.  I added the below code inside my application to attempt to get better data:  long min1Times = 0L; long min2Times = 0L; ... // loop assigning touch values to v1, v2, v3         long start1 = System.nanoTime();         float min1 = min1(v1, v2, v3);         long end1 = System.nanoTime();         min1Times += end1 - start1;         long start2 = System.nanoTime();         float min2 = min2(v1, v2, v3);         long end2 = System.nanoTime();         min2Times += end2 - start2;         double ratio = (double) (min1Times) / (double) (min2Times);         Log.d("", "ratio: " + ratio);   This prints a running ratio with each new touch event. As I swirl my finger on the screen, the first ratios logged are either 0.0 or Infinity or NaN. Which makes me think this test isn't very accurately measuring the time. As more data is collected the ratio tends to vary between .85 and 1.15.


Is there a Windows equivalent of Unix 'CPU steal time'?

In order to assess performance monitoring accuracy on virtualization platforms, the CPU steal time has become an increasingly relevant metric - see  for an instructive summary in the context of  and IBM's paper on  for a more in-depth technical explanation (including illustrations) of the concept:     Steal time is the percentage of time a virtual CPU waits for a real   CPU while the hypervisor is servicing another virtual processor.   Accordingly, it is exposed in most related Unix/Linux monitoring tools nowadays - see e.g. columns %steal or st in sar or top:     st  --  Steal Time   The amount of CPU 'stolen' from this virtual machine by the hypervisor   for other tasks (such as running another virtual machine).   I've been unable to figure out how to capture the same metric on Windows though, is this possible already? (Ideally for the  on EC2 and via a respective  of course.)


How to extract link URL from a Google Sheet?

If I have a cell with =hyperlink("http://www.example.com", "Example.com") in it. What formula can I use to extract just the link out of that cell?


In The Last Jedi Luke agrees to train Rey he says that he is going to:      Teach her three lessons:  Lesson 1: He teaches her about what the Force really is  Lesson 2: He explains to her why the Jedi should end   So whats the third one? Is it ever explained?


My TI-83 calculator doesnt allow me to do this, but using Windows calculator, I can compute the factorial of say 5.8. What does this mean and how does it work?


What is the benefit of review a scientific paper as a referee?

I got an invitation to review a scientific paper from a journal. I accepted the offer to review but was wondering what benefits I might get if I review a paper? Can I write it in my CV as I will be applying for a Ph.D. position soon? Someone told me if I write it in my CV that I reviewed an article, no professor is gonna hire me thinking she already knows so many things and it will be hard to control her during the whole Ph.D.! Still, I accepted the offer out of excitement. Also, if my review is not up to the mark, is it like the editors will never give me anything to review again?


Does having more gyms give more stardust?

I was told that even if you hold 3 gyms you still get 500 Stardust, though you do get 30 coins. Since I've been unable to  control more than one gym at a time, I've been unable to confirm this.   Does having more gyms equate to more stardust?


How to separate command output to individual lines

list=`ls -a R*` echo $list   Inside a shell script, this echo command will list all the files from current directory starting with R, but in one line. How can I print each item on one line?  I need a generic command for all the scenarios happening with ls, du, find -type -d, etc.


We all know that this refers to the actual instance of a class...but it seems to me that most people are not using it. So, should I be using it?  My thoughts about it are as follows: Since this refers to the actual instance of a class, it should be used to access any member of that class.    public void(String newValue) {         this.privateVariable = newValue;   }   This should guarantee that the value is not assigned to an object with the same name within the scope (which could also end up as undefined behavior, anyway). But, what if an underscore is used to separate private from non-private fields:    public voud(String newValue) {         _privateVariable = newValue;   }   this seems in that case a little redundant and unnecessary.  So, are there good reasons to use or not use this? Or am I just racking my brain about nothing?


I have post my post in two different pages. One is News and the other is Blog. However, all my posts go to News page insead. My Blog is a hidden page, it will not display in the menu. This is more for my SEO purposes.   What I have done: Created a new category called blog under post button. However, there is nowhere I can link this blog category to my Blog page.    Once I create the post, the post will go to spotworks.com.sg/category/blog as well as in the New page. However, I want my blog to display only in spotworks.com.sg/blog   The problem now is how can I show the selected post in my Blog page, or how can I link the category to my Blog page. Also, this will not affect the post in my News page. Really thank you for the people can help me here!


How can a Java program get its own process ID?

How do I get the id of my Java process?   I know there are several platform-dependent hacks, but I would prefer a more generic solution.


Calculating X and Y of line start and line end using ArcPy?

I have  a series of polyline shapefiles and I am trying to automate the process of calculating the X and Y coordinates of the line start and line end using Python.  I have added the 4 fields (startx, starty, endx, endy) in Python with the following code:  Arcpy.addfield_management ("Polyline","startx","DOUBLE")   I can perform this task by right-clicking the attribute and calculating geometry, but I want to automate this process for about 30 polylines.  I have the following code I've found that might be able to perform the desired task with some modification:  xExpression = "float(!SHAPE.CENTROID!.split()[0])" yExpression = "float(!SHAPE.CENTROID!.split()[1])"  arcpy.CalculateField_management("Polyline", "startx", xExpression, "PYTHON") arcpy.CalculateField_management("Polyline", "starty", yExpression, "PYTHON")   This code only calculates the coordinate at the centre of the shape I believe. Are their any expressions I can add to this code to calculate the X and Y coordinates of the start and end points of the polyline?  I am using ArcGIS 10.1 with ArcInfo license.


Computing dominant area in polygon using ArcGIS Desktop?

First, I have a shapefile consisting of square grids and each grid has an ID. Second, I have a shapefile consisting of different zones (with IDs).  A grid ID in the first shapefile can contain many zone IDs from the second shapefile.  I want to know what is the dominant zone ID inside a grid and record that in a table. I only want to know the dominant zone (in terms of the area) and not the rest of the zones intersecting that grid. In the end, I would want a 2-column table with all the grid IDs in the first column and the corresponding dominant zone ID (or the largest zone in terms of area) in the second column.  Here is a sample figure.  By just looking at the figure, I could tell that in Grid ID 1, the dominant zone/area is Zone ID 1.  In Grid ID 2, the dominant zone/area is Zone ID 2.  And in Grid ID 3, the dominant zone/area is Zone ID 3.  I would like to have a table with two columns, with each grid showing only the ID of the dominant area.


Strange error when decreasing double value

While developing an application I've found a serious error. But first some details: I've wanted  to display a temperature on a GUI. The temperature is a double value. The user should be able to increase/decrease the temperature. The goal was to emulate a heating/temperature valve for the heating unit. In addition to have random values, the user should be able to increase/decrease this value by using the GUI. Basically the value is intialized on startup with 20.1 (just a random value I setted at the beginning).  I've noticed a strange behaviour when I tried to decrease the temperature. Everything works finde when incrementing. But decreasing the temperature (by stepsize 1) leads to the following: 20.1 , 19.1 , 18.1, 17.1, 16.1, and then 15.100000000000001, 14.100000000000001 etc.  What's the reason? The error does just occur, when using values ending on .1. So it does make no difference when trying with a base value of 22.1 or 31.1.  The error always occurs with the change from 16.1 to 15...  It's reproducable everytime. I've wrote a test application, feel free to try it:  package devices;  import java.awt.EventQueue; import java.awt.Font; import java.awt.event.ActionEvent; import java.awt.event.ActionListener;  import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JLabel; import javax.swing.JPanel;  public class Test extends JFrame {  /**  * the temperature  */ private Double temp = 20.1; private JPanel contentPane;  /**  * Launch the application.  */ public static void main(String[] args) {     EventQueue.invokeLater(new Runnable() {         @Override         public void run() {             try {                 Test frame = new Test();                 frame.setVisible(true);             } catch (Exception e) {                 e.printStackTrace();             }         }     }); }  /**  * Create the frame.  */ public Test() {     setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);     setBounds(100, 100, 271, 152);     contentPane = new JPanel();     setContentPane(contentPane);     contentPane.setLayout(null);      final JLabel lblNewLabel = new JLabel("");     lblNewLabel.setBounds(10, 11, 235, 56);     lblNewLabel.setFont(new Font("Tahoma", Font.PLAIN, 19));     lblNewLabel.setText(String.valueOf(temp));     contentPane.add(lblNewLabel);      JButton btnNewButton_1 = new JButton("Increase");     btnNewButton_1.addActionListener(new ActionListener() {         @Override         public void actionPerformed(ActionEvent e) {             temp = temp + 1;             lblNewLabel.setText(String.valueOf(temp));         }     });     btnNewButton_1.setBounds(10, 78, 101, 23);     contentPane.add(btnNewButton_1);      JButton btnNewButton = new JButton("Decrease");     btnNewButton.setBounds(137, 78, 108, 23);     btnNewButton.addActionListener(new ActionListener() {         @Override         public void actionPerformed(ActionEvent e) {             temp = temp - 1;             lblNewLabel.setText(String.valueOf(temp));         }     });     contentPane.add(btnNewButton); }  }   Greetings and thanks in advance,  Julian


What is a *.pkinfo file?   Google Search results talk about Package Info files and how they contain map documents and layers, so I don't see how this is different from a .mpk file.    I also have not found anything about how to create a *.pkinfo file.


I know that it is a very old question but still I don't find any satisfactory solution for Achilles Paradox. Please explain me the fundamentals of Achilles paradox in terms of stage wise distance covered. Note that it is easily solvable in terms of time, but if you start analysing this event in terms of time, then there is not at all any paradox. So please explain in terms of stage wise distances only.


The app stopped during getting the location from Gps. PrayerTimes Class The app stopped during getting the location from Gps. in these two lines     public static Mazhab getDefaultMazhab(String countryCode) {         countryCode = countryCode.toUpperCase();          if("AF, AL, EG".contains (countryCode)) return Mazhab.PTC_MAZHAB_SHAFEI;          return Mazhab.PTC_MAZHAB_HANAFI;     }      public static Way getDefaultWay(String countryCode) {         countryCode = countryCode.toUpperCase();          if("CM, CF, CD, CG, CI, EG, GH, IQ, KE, LY, MY, ML, SN, SO, SD, TN".indexOf(countryCode)>=0) return Way.PTC_WAY_EGYPT;          if("AF, AL, BD, IN, PK, WF".indexOf(countryCode)>=0) return Way.PTC_WAY_KARACHI;          if("CA, US".indexOf(countryCode)>=0) return Way.PTC_WAY_ISNA;          if("BH, KW, OM, QA, SA, AE, YE".indexOf(countryCode)>=0) return Way.PTC_WAY_UMQURA;          return Way.PTC_WAY_MWL;     } }  LogCat from LogCat Attempt to invoke virtual method 'java.lang.String java.lang.String.toUpperCase()' on a null object reference  at at mindtrack.muslimorganizer.calculator.prayer.PrayerTimes.getDefaultMazhab(PrayerTimes.java:282)         at mindtrack.muslimorganizer.ui.activity.MainActivity.onLocationChanged(MainActivity.java:324)


How to pass variables from one function to another or combine functions

I have two functions:   1st - Takes care of all customizer options 2nd - Generates an inline style from those options   In first function I set variables from which I create customizer settings and controls like this:  function im_customize_register( $wp_customize ) {  //Custom Sections  $wp_customize->add_section(     'body',     array(         'title'     => __('Body Settings', 'impressive'),         'priority'  => 200     ) );  //Styles  $bg_color = 'background-color:'; $max_width = 'max-width:';  $styles = array();  $styles[] = array(   'slug'=>'body_bcolor',    'default' => "#F1F2F1",   'label' => __('Body Background Color', 'impressive'),   'css_class' => 'body',   'attribute' => $bg_color,   'section' => 'body',   'type' => 'color' ); $styles[] = array(   'slug'=>'max_container_width',    'default' => '1440',   'label' => __('Maximal Container Width', 'impressive'),   'css_class' => '.header',   'attribute' => $max_width,   'section' => 'body',   'type' => 'number' );  foreach( $styles as $style ) {    $wp_customize->add_setting(     $style['slug'], array(       'default' => $style['default'],       'type' => 'option',        'capability' =>        'edit_theme_options'     )   );   if ( $style['type'] == 'color' ) {   $wp_customize->add_control(     new WP_Customize_Color_Control(       $wp_customize,       $style['slug'],        array('label' => $style['label'],       'section' => $style['section'],       'settings' => $style['slug'],       'type' => $style['type'])     )   );   } elseif ( $style['type'] == 'image' && $style['section'] == 'header_image' ) {     $wp_customize->add_control(         new WP_Customize_Header_Image_Control(         $wp_customize,         $style['slug'],          array('section' => $style['section'],         'settings' => $style['slug'])     )   );  } else {   $wp_customize->add_control(     new WP_Customize_Control(       $wp_customize,       $style['slug'],        array('label' => $style['label'],       'section' => $style['section'],       'settings' => $style['slug'],       'type' => $style['type'])     )   );    }  }  } add_action( 'customize_register', 'im_customize_register' );   In second function I need to type same variables in order for the script to generate inline CSS:  function im_custom_style_create() {  wp_enqueue_style( 'im_custom_style', get_template_directory_uri() . '/css/im_custom_style.css' );  $custom_css = '';  $bg_color = 'background-color:'; $max_width = 'max-width:';  $measurement_unit = '';  $styles = array();  $styles[] = array(   'slug'=>'body_bcolor',    'default' => "#F1F2F1",   'label' => __('Body Background Color', 'impressive'),   'css_class' => 'body',   'attribute' => $bg_color,   'section' => 'body',   'type' => 'color' ); $styles[] = array(   'slug'=>'max_container_width',    'default' => '1440',   'label' => __('Maximal Container Width', 'impressive'),   'css_class' => '.header',   'attribute' => $max_width,   'section' => 'body',   'type' => 'number' );  foreach( $styles as $style ) {  if ( $style['attribute'] == $max_width ) { $measurement_unit = 'px'; }  if ( get_option( $style['slug'] ) == true ) { $custom_css = '' . $style['css_class'] . ' { ' . $style['attribute'] . ' ' . get_option( $style['slug'] ) . $measurement_unit . '; } '; };  wp_add_inline_style ('im_custom_style', $custom_css); }  } add_action( 'wp_enqueue_scripts', 'im_custom_style_create' );   My question is: Is there is a way to pass $styles from 1st function to 2nd or is there isn't one can I combine those two function. I tried combining them but I couldn't make the magic happen.


How do I create a frame around an entire section, so that it doesn't eat up my table?

used mdframe for 1st and it worked, and in the second it eats it up.  Here is the latex code:  \documentclass [10pt]{ article} \usepackage[utf8]{ inputenc} \usepackage[croatian]{babel} \usepackage{amsfonts} \usepackage{color} \usepackage{amsmath} \usepackage{mdframed} \DeclareMathOperator{\tg}{tg} \DeclareMathOperator{\ctg}{ctg} \title{LaTeX vježbe-5} \author{Dino Luinović} \date{30.10.2017}  \begin{document}     \maketitle     \pagenumbering{gobble}     \newpage     \pagenumbering{arabic}     \newtheorem{zadatak}{Zadatak}[section]     \begin{mdframed}     \section{Derivacija}     \subsection{Tehnika deriviranja}      \textbf{Definicija:} Neka je $f:I\rightarrow\mathbb{R}$ funkcija, $I\subseteq\mathbb{R}$ otvoreni interval i $c\in I$.Kažemo da je $f$ derivabilna u $c$ ako postoji\\     \begin{equation}\label{derlim}     \lim_{x \to c}\frac{f(x)-f(c)}{x-c}\\     \end{equation}     i taj limes označimo s $f'(c).$      \begin{zadatak}         Koristeći definiciju $\left( {\color{red}\ref{derlim}} \right)$,          odredite derivaciju funkcije $ f(x)= \cos(x).$       \end{zadatak}     \textbf{Rješenje:}\\     \begin{align*}     f'(c) & = \lim_{x \to c}\frac{f(x)-f(c)}{x-c}\\     & = \lim_{x \to c}\frac{\sin(x)-\sin(c)}{x-c}\\     & = \lim_{x \to c}\frac{-2\sin(\frac{x+c}{2})\sin(\frac{x-c}{2})}{x-c}\\     & = -\sin c     \end{align*}\\      \begin{itemize}         \item[DZ:] Neka je $f(x)= \ln\left(\frac{x^2}{x-1}\right)$. Odredite:         \item[(a)] domenu funkcije $f$         \item[(b)] intervale monotonosti i ekstreme.     \end{itemize}  \end{mdframed}      \newpage     \begin{mdframed}      \section{Integral}     \subsection{Tablica Integrala}     \begin{table}[h]         \centering         \caption{Integrali}         \label{tab1}         \begin{tabular}{|l | l| c|}             \hline             $\int\ dx = x + C$ & $\int\frac{\,dx}{\cos^2 x}=\tg x + C$\\             \hline             $\int\ x^a {\,dx}=\frac{x^{a+1}}{a+1} + \ +C (a \neq -1)$             &$\int\frac{\,dx}{\sin^2 x}=-\ctg x+\ C$ \\             \hline         \end{tabular}     \end{table}      Tablica $\left( {\color{red}\ref{tab1}} \right)$ prikazuje integrale nekih funkcija.  \end{mdframed}        \section{Red}     \subsection{Taylorovi redovi}     U ovom području se zadaju naredbe za treću sekciju.     \section{Matrice}     A ovdje pišemo naredbe za sekciju Matrice.   \end{document}


How to extract second element from path?

How do I extract such pattern using sed?  This is my path: /sample/xyz/logs/test.logs  Output should be : xyz  How is that possible if the path keeps changing for example like   /example/xyz/log/test.logs?   using sed or awk?


I tried to make a horizontal line inside a matrix by the attached code. However, it didnot work the compiling process gives a time out message. It work normally without the \hline command. Any help!  \documentclass[journal,draftcls,onecolumn,12pt,twoside]{IEEEtran} \usepackage{array} \usepackage{blkarray} \begin{document} \begin{equation}  \centering W_b(1)=\begin{blockarray}{cccccc} \begin{block}{(ccccc)c}  a      & b     &     &  &  & \matindex{\leftarrow d=0} \\ \ddots & \ddots&     &  &  & \matindex{\vdots} \\    &     a & b   &  &  & \matindex{\ \ \ \   \leftarrow d=d_b-1} \\   %\hline  c      & d     &     &  &  & \matindex{\leftarrow d=d_b} \\   \ddots &\ddots &     &  &  & \matindex{\vdots} \\    &   c   &  d  &  &  & \matindex{\leftarrow d=D}  \end{block} \end{blockarray}, \label{eq:eq4}  \end{equation}  \end{document}


Where does the postulate of quantum mechanic that possible results are eigenvalues come from?

Where does the idea come from, that possible results of quantum measurement are eigenvalues of the operator corresponding to the observable?


Is there any resource with a list of feature engineering techniques? A mapping of type of data, model and feature engineering technique would be a gold mine.


Surprisingly many network interfaces on macOS: are these legitimate?

ifconfig reveals a surprisingly long list of network interfaces on my MacBook, which is running macOS High Sierra (10.13.6): lo0, gif0, stf0, XHC20, en0, p2p0, awdl0, en1, en2, bridge0, utun0.  There is an F5 VPN client installed, but I've rebooted the MacBook since the last VPN connection.  Are all of these network interfaces legitimate or is this something I should worry about?


Solving functional equation $f(x+y)+f(x-y)=2f(x)\cos y$?

How can I solve this functional equation, where $x,y$ are any real numbers and $f:\mathbb{R}\to \mathbb R$ is a function such that : $$f(x+y)+f(x-y)=2f(x)\cos y$$    I tried substituting $x=0$ to get $f(y)+f(-y)=2f(0)\cos y$ . Taking $x=y$ gives $f(2x)+f(0)=2f(x)\cos x$. I similar get some more relations like that, but its not really helping me in finding anything useful. I also think the function must either be $\sin$ or $\cos$ looking at the product to sum formulae. Can anyone tell me how should I solve this?


Proof: any triangle can be dissected into more than six isosceles triangles

Using induction, Prove that any triangle can be dissected into more than six isosceles triangles. I can't figure out how to solve this using induction. Because i don't see any clear steps. What should


I was given that $S=1+2r+3r^2+\cdots = \frac{1}{(1-r)^2}$ was an identity from my students, and I tried to prove directly using geometric series.  I got stuck and looked around online only to be told that taking the derivative of the series that converges to $\frac{1}{1-r}$.  I liked that proof because it was simple and easy, but unfortunately my student is in Alg II so I cannot explain her with derivatives.  My idea was to expand $S$ as $$(1+r+r^2+r^3+\cdots) +(r+r^2+r^3+\cdots)+(r^2+r^3+\cdots)+\cdots$$  but I get confused whether I should rewrite this as $$(1+r+r^2+r^3+\cdots) +r(1+r+r^2+\cdots)+r^2(1+r+\cdots)+\cdots$$  or  $$(1+r+r^2+r^3+\cdots) +((-1)+1+r+r^2+\cdots)+((-1-r)+1+r+\cdots)+\cdots$$  I was able to get the ID using the first way, but I am not sure if the step I took was valid due to some stuff I vaguely remember about manipulating an infinite series like that was not always allowed.  And on the second way I simply did not know where to go from there.  Can I have some help ?  It would also be helpful to know the criteria of when I can manipulate the order of how to add the series.


I discovered on  the other day that the word "dog" appears to have come from nowhere and displaced the German word "hund".  Has any research revealed how it arrived in the English language?


How would one be able to prove mathematically that $1+1 = 2$?

Is it possible to prove that $1+1 = 2$? Or rather, how would one prove this algebraically or mathematically?


Let's say I have a s390 Suse zLinux running (or any other Non-Ubuntu Linux). Is there a way to install Ubuntu with a sort of installer program to a new disk (including makes it able to boot) ? If yes, how does it work ? (no x86 involved !)


Find all functions $f:(0,\infty)\rightarrow(0,\infty)$ subject to the conditions:  $f(f(f(x)))+2x=f(3x)$ for all $x>0$ and $\displaystyle\lim_{x\to\infty}(f(x)-x)=0$  I tried as follows: Suppose $x_0=x,x_1=f(x_0)=f(x),...,x_n=f(x_{n-1})$. But I am facing problem due to $f(3x)$ term.


How to patch a Windows 7 machine to fix recent Security Essentials exploit?

I have a Windows 7 machine, and I have it set to only manually allow updates from Windows update  There is this exploit that needs to be patched.    I'm looking at my Windows Security Essentials version on Windows 7, and it's v1.1.13701.0, meaning it's still vulnerable.  I want it to be up to v 1.1.13704.0, which is not vulnerable to that exploit.  I downloaded and installed the Windows Malicious Software Removal Tool x64 - May 2017 (KB890830) update, and restarted my machine.  I figured that was the update.  After rebooting, I'm still on v1.1.13701.0.  The update I just mentioned is listed as installed.  There is no information that I can find online.  The microsoft documents online are utterly worthless, not telling me how to actually manually do an update myself:    Does anybody know what specific actual update I have to apply to patch my Windows Security Essentials on my machine?


Given the three line segments below, of lengths a, b and 1, respectively:  construct the following length using a compass and ruler: $$\frac{1}{\sqrt{b+\sqrt{a}}} \ \ \text{and} \ \ \ \sqrt[4]{a} $$  Make sure to draw the appropriate diagram(s) and describe your process in words. We are also to use the following axioms and state where they are used:   Any two points can be connected by a line segment,  Any line segment can be extended to a line,  Any point and a line segment define a circle,  Points are born as intersection of lines, circles and lines and circles


Proving that $\binom{r}{r} + \binom{r + 1}{r} + \cdots + \binom{n}{r} = \binom{n + 1}{r + 1}$

Let $n$ and $r$ be positive integers with $n \geq r$.  Prove that  $$\binom{r}{r} + \binom{r + 1}{r} + \cdots + \binom{n}{r} = \binom{n + 1}{r + 1}$$  I'm confused how to start this question. Would it require induction?


I would love to know, If you know some way to mitigate DDos/Dos attacks on Windows. In Linux we can Mitigate using the IPTables Almighty, but I wonder If there is something like that in Windows.  I am talking about pure Window Protection, No Cloud Based Protection like CloudFlare and Porxy like Nginx.


Defrag: Does it really improve performance? Could physical file location be equally detrimental?

Over time, windows just runs slower.  Fragmented files are often to blame, but time after time I feel like I see evidence that defragmenting the files doesn't help.  I've been running defrag on each of the PC's I've used over the years (20y+), usually once they start acting sluggish (lengthy boot times, unexplained pauses in responsiveness).  But never have I experienced any noticeable improvement due to a defrag operation; at times I've felt like it gets worse. My current PC (of 1.5years) has reach that limit somewhat sooner/more sever than usual, ridiculous pauses while the HDD chunks away; and I just noticed that defrag is scheduled to run weekly, and fragmentation is 0%. Question #1 Knowing that defrag reassembles file fragments and puts them in the next available contiguous free space.  Is it possible that scattering the files themselves causes an equally detrimental fragmentation? As the various processes and threads run on the OS, there is an inadvertent sequence of frequently read files; files with physical locations randomly scattered along the platter radius causing the physical accesses to be out of sequence Question #2 Does a utility exist that not only defrags files, but puts them in relatively similar order to the sequence in which they are typically accessed? Question #3 (if no utility exists) Is there any utility to spy/log the time of access of the files?  To determine how often each file is access, or even a common sequence of files being accessed?  To find out which files are being read/written in those times when the PC is frozen and the HDD is chunking away with file accesses.  Process Explorer and Process Hacker don't indicate any particular process as a smoking gun (high I/O rates).


Is this proper usage ? seems to me "perfect"  is like "best" (it can't be more or less "perfect or "best").


How to add php to theme to show alt attributes

I am trying to figure out how to add PHP / code to my template so that my alt tags show up for my images. The theme has been modified by a company that is no longer around so I can't ask how to rectify this.  This is the code that the theme developer gave me but it doesn't correspond to a file that came with the theme.  <?php echo ''; ?>   I suppose my question is how do I make this work so my alt tags show up.  This is the website  and this is the main alterer pages.     I don't have any PHP experience but know my way around Wordpress ok.  Any help will be very gratefully received.  Thanks  Danny
     <?php _e( 'To be uploaded on save:', 'yachtcharter' ); ?>

     <?php _e( 'Add to gallery', 'yachtcharter' ); ?>
  <input type="hidden" name="ycbe_gallery_hidden" id="ycbe-gallery-hidden" value="<?php echo $value; ?>">


I have a class that depends on another class. Rather that instantiate the depended upon class, I require it be passed in in the one and only constructor. Does this effectively inject said dependency?  So confused!


Find the positive integers $n$ with exactly $12$ divisors $1 = d_1 < d_2 < · · · < d_{12} = n$ such that the divisor with index d4 (that is, $d_{d_4 − 1}$) is $(d_1 + d_2 + d_4)d_8$ It said that there exists an $1<i<12$ such that $d_i = d_1+d_2+d_4$, but the book did not explain why, it does not seem trivial for me


How is the voice not distorted when Barry is running at super-speeds?

I am not a physicist, however, when Barry is running/flashing, he gets to talk to the team back in HQ - How?  When he talks back to them, I have a feeling, his voice needs to be distorted, even if not possible, as everything is ultra fast with him.  Isn't there some law in physics, that the movie is breaking, by allowing him to talk normally (vocal cords, breathing) while moving at 1000's steps per seconds (or whatever?)


What is the role of the resistor at the input of the OpAmp?

Could anyone explain the role of resistor R1 in the circuit below?  Thank you.


pgfplots with gnuplot and raw input for embedded data

I would like to have the following gnuplot graph (that's just an exemple), which is using embedded data instead of an external file:  $data << EOD 1 5 2 10 3 1 EOD ; plot $data using ($1):($2) with lines;   I tried the following simple approach, which obviously is not working as intended: the generated gnuplot code is missing the line breaks, which are necessary for a correct processing by gnuplot:  \begin{tikzpicture}   \begin{axis}     \addplot gnuplot [raw gnuplot]{     $data << EOD      1 5      2 10      3 1 EOD ;     plot $data using ($1):($2) with lines;    };   \end{axis} \end{tikzpicture}   Is it possible to feed gnuplot raw input (preserving line break) to \addplot ?


I am on an Asus Zenbook UX32VD in Ubuntu 12.10. Both in 12.04 and 12.10 I haven't been able to change the mouse speed (i.e. the "sensitivity" in the mouse/touchpad dialog). I can change the slider, but nothing changes.  This is a big problem for me, since the mouse speed is somewhat slow. Any suggestions?  The problem is both for the touchpad and mouse.


What I want is this:  Having a file called file somewhere in the filesystem with a content something like:  #!/bin/whatever-interpreter-you-want echo 'line1' echo 'line2'   When ANY (almost any since must exist a way to edit the script itself) program opens  file to read it gets:  line1 line2   As its contents instead of:  #!/bin/whatever-interpreter-you-want echo 'line1' echo 'line2'   Something like file contents being executed on the fly by the filesystem or the kernel itself (please, no cron, no inotify, no duct tape).


Number of ways to write $n$ as a sum of $k$ non-negative integers of at most $d$

How many way can we write the integer $n$ as the sum of $k$ non-negative integers such that the largest number of the $k$ non-negative integers is $d$. The condition is the largest number in all $k$ non-negative must be $d$.  For example, I can write $10$ as $3+3+2+1+1$ and $3+2+2+2+1$ if $k = 5$ and $d = 3$.


Is there a $\sigma$-algebra which has countably many elements but not finitely many?

I couldn't think anything about this question from a book by Bass:      Does there exist a $σ$-algebra which has countably many elements, but not finitely many?   May I get a hint please? Thanks!


GeoServer fails to read a JPEG compressed TIFF with alpha band

I have been trying to publish a GeoTIFF (with JPEG compression + alpha band) but couldn't succeed. The TIFF is generated using this GDAL command :   gdalwarp -t_srs EPSG:4326 -r bilinear -dstalpha -of GTiff -co COMPRESS=JPEG -co JPEG_QUALITY=25 -co TILED=YES input.vrt output.tif   I am using the dstalpha option of gdalwarp in order to avoid some black seamlines on the borders of images.  Unfortunately, it seems that GeoServer doesn't handle Alpha band with JPEG compression, I get this kind of exception :      Caused by: javax.imageio.IIOException: Unsupported Image Type   geoserver   |       at java.desktop/com.sun.imageio.plugins.jpeg.JPEGImageReader.readInternal(JPEGImageReader.java:1139)   |       at java.desktop/com.sun.imageio.plugins.jpeg.JPEGImageReader.read(JPEGImageReader.java:1110)   geoserver   |       at it.geosolutions.imageioimpl.plugins.tiff.TIFFJPEGDecompressor.decodeRaw(TIFFJPEGDecompressor.java:282)   |       at it.geosolutions.imageio.plugins.tiff.TIFFDecompressor.decode(TIFFDecompressor.java:2637)   |       at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.decodeTile(TIFFImageReader.java:1764)   |       at it.geosolutions.imageioimpl.plugins.tiff.TIFFImageReader.read(TIFFImageReader.java:2065)   |       at com.sun.media.jai.imageioimpl.ImageReadOpImage.computeTile(ImageReadOpImage.java:697)   When doing gdalinfo on my file, everything seems fine :  Driver: GTiff/GeoTIFF Files: subset_nz.tif Size is 4404, 4404 Coordinate System is: GEOGCS["WGS 84",     DATUM["WGS_1984",         SPHEROID["WGS 84",6378137,298.257223563,             AUTHORITY["EPSG","7030"]],         AUTHORITY["EPSG","6326"]],     PRIMEM["Greenwich",0],     UNIT["degree",0.0174532925199433],     AUTHORITY["EPSG","4326"]] Origin = (175.499992707622397,-37.099986337232799) Pixel Size = (0.000022707000000,-0.000022707000000) Metadata:   AREA_OR_POINT=Area Image Structure Metadata:   COMPRESSION=JPEG   INTERLEAVE=PIXEL Corner Coordinates: Upper Left  ( 175.4999927, -37.0999863) (175d29'59.97"E, 37d 5'59.95"S) Lower Left  ( 175.4999927, -37.1999880) (175d29'59.97"E, 37d11'59.96"S) Upper Right ( 175.5999943, -37.0999863) (175d35'59.98"E, 37d 5'59.95"S) Lower Right ( 175.5999943, -37.1999880) (175d35'59.98"E, 37d11'59.96"S) Center      ( 175.5499935, -37.1499872) (175d32'59.98"E, 37d 8'59.95"S) Band 1 Block=256x256 Type=Byte, ColorInterp=Red   Mask Flags: PER_DATASET ALPHA Band 2 Block=256x256 Type=Byte, ColorInterp=Green   Mask Flags: PER_DATASET ALPHA Band 3 Block=256x256 Type=Byte, ColorInterp=Blue   Mask Flags: PER_DATASET ALPHA Band 4 Block=256x256 Type=Byte, ColorInterp=Alpha   I am running GeoServer 2.16.2, is this a known issue or is there anything wrong with my files/config?


Does apt-get use https or any kind of encryption? Is there a way to configure it to use it?


Minimize the following term under the given constraint

If $f(x)$ is a real valued continuous and differentiable function in $[0, 1]$ and $\int_{1/3}^{2/3}f(x)dx = 0$ minimize $\frac{\int_{0}^{1}f'(x)^2 dx}{(\int_{0}^{1}f(x)dx)^2}$


Why is entropy formula defined as what it is?

This is probably a naive question. Why is Entropy formula defined as the way what it is intead of more simpler formula? for example just P(x)*P(y) which I imagine can express uncertainty as well (0.5*0.5 > 0.4*0.6 > 0.3*0.7).


show that every continuous real-valued function defined on $S_{\mathbb{\Omega}}$ is eventually constant.Where $S_{\mathbb{\Omega}}$ denote the first uncountable ordinal.  There is a hint that for each $\epsilon$,there is an element $\alpha$ of $S_{\mathbb{\Omega}}$  such that $|f(\alpha)-f(\beta)|<\epsilon$ for all $\beta>\alpha$. However, I couldn't figure out how to prove this statement.


Help to prove an inequality not by math induction

Can someone help to prove the inequality from below? Not by math induction. $\frac 1 2 \times \frac 3 4 \times \dots \times \frac {2n-1} {2n}$ < $\frac {1} {\sqrt{2n-1}}$


How can I concatenate all files in a directory together in one command line operation?

I have 1000 csv files in a directory. I would like to concatenate them all together in order. They are named img_size_1.csv to approx img_size_1000.csv  is close but assumes a list file. Can this be done in a one-liner?


In the power management, I selected the option called "suspend when I close the lid". If I close the lid, the computer is not suspending. It keep itself on. How can I solve this problem?


Allow seeing which posts were affected by removed users

When the reputation changes you can see what specific post caused the change, the exception to this rule (are there others?) is when a user is removed.  When I see that my reputation has changed due to the removal of a user I would like to see a list of posts which the user has voted on and how the reputation has changed for each.  Why do I want this? Probably because I'm slightly obsessive, I'm not sure this feature actually has any real value. I would totally understand rejecting the request but I just thought I'd let my wishes known...


Let $f:[0,a]\times[0,b]\rightarrow\mathbb{R}$ be a continuous function. Prove a version of Fubini's Theorem:

$$\int_0^b\left(\int_0^af(x,y)dx\right)dy=\int_0^a\left(\int_0^bf(x,y)dy\right)dx.$$ I am given the following hint: Investigate $p:[0,b]\rightarrow\mathbb{R}$ defined by $$p(t)=\int_0^t\left(\int_0^af(x,y)dx\right)dy-\int_0^a\left(\int_0^tf(x,y)dy\right)dx.$$ I have read the classical proof of Fubini's Theorem that uses $\sigma$-finite spaces, but this is beyond the scope of which this question is asked in. I am looking for advice on how to utilize the provided hint to establish a proof of this.


Would this sentence be correct?     Being scared is the first step to becoming free.   The more I look at it, the less clear it becomes.


Installing Ubuntu 18.04 alongside windows10, the SSD is not recognized

I have DELL Precision, with 512GB SSD. I did shrink the only Drive C,  and made 125 GB of unallocated space to install Ubuntu on it.  restarting the system choosing boot, install Ubuntu, the installation process does not recognize any hard disk except the Flash memory that contains ubuntu bootable.  the information from Windows 10 side:  Dell Precision 3520 windows 10 pro Intel Core i7-7820HQ BIOS mode UEFI from the device manager; Storage Controllers:         Intel chipset SATA/PCIe RST premium controller         microsoft spaces storage controller         microsoft VHD loopback controller Disk 0: (Basic)        SSDPEKK NVMe INTEL 512GB               Partition Style GPT Rapid Storage Technology:        Controller 1, Port 0        Port Location Internal        Type PCIe solid-state drive        System Disk: yes        Controller Type: NVMe BIOS options on power up:         System Configuration/SATA Operation = RAID on (Intel RST)   I've read that the Ubuntu kernel is compatible with RST and should recognize the SSD, Also the Disk 0 is shown as basic which I think means hardware RAID.  What should do in this case to have a dual boot installation of Ubuntu


As I know we can use both structures to talk about past ability , but is there any difference between them?  A. He could climb the mountain  B. He could have climbed the mountain


Apt sources.list problem , packages not found?

I am trying to install WICD but getting following errors on my ubuntu 10.04 box  sudo apt-get install wicd   Err http://archive.ubuntu.schoolnet.lk/ubuntu/ lucid/universe python-wicd 1.7.0+ds1-2   Could not connect to archive.ubuntu.schoolnet.lk:80 (103.29.60.18). - connect (111: Connection refused) Err http://archive.ubuntu.schoolnet.lk/ubuntu/ lucid/main python-iniparse 0.3.1-1   Unable to connect to archive.ubuntu.schoolnet.lk:http: Err http://archive.ubuntu.schoolnet.lk/ubuntu/ lucid/universe wicd-daemon 1.7.0+ds1-2   Unable to connect to archive.ubuntu.schoolnet.lk:http: Err http://archive.ubuntu.schoolnet.lk/ubuntu/ lucid/universe wicd-gtk 1.7.0+ds1-2   Unable to connect to archive.ubuntu.schoolnet.lk:http: Err http://archive.ubuntu.schoolnet.lk/ubuntu/ lucid/universe wicd 1.7.0+ds1-2   Unable to connect to archive.ubuntu.schoolnet.lk:http: Failed to fetch http://archive.ubuntu.schoolnet.lk/ubuntu/pool/universe/w/wicd/python-wicd_1.7.0+ds1-2_all.deb  Could not connect to archive.ubuntu.schoolnet.lk:80 (103.29.60.18). - connect (111: Connection refused) Failed to fetch http://archive.ubuntu.schoolnet.lk/ubuntu/pool/main/p/python-iniparse/python-iniparse_0.3.1-1_all.deb  Unable to connect to archive.ubuntu.schoolnet.lk:http: Failed to fetch http://archive.ubuntu.schoolnet.lk/ubuntu/pool/universe/w/wicd/wicd-daemon_1.7.0+ds1-2_all.deb  Unable to connect to archive.ubuntu.schoolnet.lk:http: Failed to fetch http://archive.ubuntu.schoolnet.lk/ubuntu/pool/universe/w/wicd/wicd-gtk_1.7.0+ds1-2_all.deb  Unable to connect to archive.ubuntu.schoolnet.lk:http: Failed to fetch http://archive.ubuntu.schoolnet.lk/ubuntu/pool/universe/w/wicd/wicd_1.7.0+ds1-2_all.deb  Unable to connect to archive.ubuntu.schoolnet.lk:http: E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?


During your tour, you will see historic buildings.. or historical?

In the description of a guided tour across a city, what adjective should one pick:     During your tour, you will see historic buildings   or     During your tour, you will see historical buildings   Judging by , one should opt for historic if the building is important in history, and for historical if the building is merely part of the city's history:     The adjective historic means having importance in history or having influence on history.  The adjective historical means having taken place in history, from the past or pertaining to history.   Judging by Google, both adjectives are used, although historic seems to predominate.  Which of them is more appropriate in my case?


Problem: Color change when pasting from Photoshop to Illustrator

What I want to achieve:  I want to copy an image in Illustrator and paste it into Photoshop. The image is just a grey circle with a #d1d1d1 fill and no stroke.  The problem:  Bottom line, the color of what I'm pasting changes.The pasted image is a different shade of grey: #d5d6d8.  What I've tried:  I've checked my color settings in both Photoshop and Illustrator (Edit > Color Settings). The settings are identical.   Any ideas on what's causing the color difference?


How to do estimation, when only summary statistics are available?

This is in part motivated by the following  and the discussion following it.   Suppose the iid sample is observed, $X_i\sim F(x,\theta)$. The goal is to estimate $\theta$. But original sample is not available. What we have instead are some statistics of the sample $T_1,...,T_k$. Suppose $k$ is fixed. How do we estimate $\theta$? What would be maximum likelihood estimator in this case?


Domain strictly contained in the intersection of localizations at the primes of height one

If $R$ is a Noetherian normal domain, then it is equal to the intersection of its localizations at height one primes.      What is an example of a non-normal domain that is strictly contained in such an intersection?    I'd prefer an example that is a finitely generated $\mathbb{C}$-algebra, and all I want is a candidate suggested. I'd prefer to verify it myself.


I have a voucher for $1000 from American Airlines.  How do I turn that into cash so I can use it to book a flight?


Null Pointer Exception because of a class member

public static void main(String args[]) throws IOException{     String line = null;     File newfile = new File("/home/aoblah/Documents/Metaphor/June12/X");     File ex = new File("../June13/Test ID=ru002.txt");     BufferedReader in = new BufferedReader(new FileReader(ex));     PrintWriter wr = new PrintWriter(newfile);     while((line = in.readLine()) != null){         id = ex.getName();         id = id.substring(0, id.indexOf("."));         if(line.matches("^Sentence: [\\d]$")){             sen_count ++;         }         if(line.contains(":Sentence:")){             res_count ++;     }      }      Sentence[] sen = new Sentence[sen_count];     Results[] res = new Results[res_count];      in = new BufferedReader(new FileReader(ex));      sen_count = res_count = 0;      while((line = in.readLine()) != null){         if(line.matches("^Sentence: [\\d]$")){             line = line.trim();             a = line.split(": ");             sen[sen_count].sentence_number = a[1];             System.out.println(sen[sen_count].sentence_number);         }     }   }   public class Sentence{     public String sentence_number;      public String sentence;     public Sentence(){         this.sentence = null;         this.sentence_number = null;     }  Above is the structure and a string "1" is assigned to sen[0].sentence_number where I receive a null pointer exception. The pattern is extracted and when I assign the value of part of the pattern to a simple string, it works fine. The exception occurs when I assign it to the class member. It says that the value I am assigning it to, is referenced on a null variable. How do I fix this?  Thanks.


Extra alignment tab has been changed to \cr error

I found from several posts that this usually happens due to extra column in data. But I can't find it in my code. Here is the partial code:  \begin{table}[h] \tbl{Comparison of parameters using different k value}{     \begin{tabular}{ |c|c|c|c|c|c|c|c|c|}          \toprule          Dataset & $A$ & $B$ & $C$ & $D$ & $E$ & $F$ & \multicolumn{2}{c|}{G}\\         \cline{8-9}         &&&&&&&{H}&{I}&         \hline         \multirow{2}{*}{DATA1} & 1 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\         \cline{3-9}         & 2 & 1 & 1 & 1 & 1 & 1 & 1 & 1 \\         \hline     \end{tabular} } \end{table}   where tbl is defined as:  \long\def\tbl#1#2{%     \parindent\z@\ignorespaces\noindent\tablecaptionfont     \caption{#1}%     \par\setbox\tempbox\hbox{\tablefont #2}%     \tablewd\hsize\advance\tablewd-\wd\tempbox\global\divide\tablewd\tw@     \ifdim\wd\captionbox<\wd\tempbox\centerline{\unhbox\captionbox}     \else\leftskip\tablewd\rightskip\leftskip{\unhbox\captionbox}\par     \fi\vskip5pt\centerline{\box\tempbox} }


Why is $\log(e^z)\ne z$ in complex analysis?

I always know that the natural logarithm $\log_e$ is the inverse of the exponential function $e$, but to my surprise when reading elementary functions in complex analysis, I discover that that is not always true. $$\log(e^z)=z+2k\pi i$$  My question here is that, why is the above expression true?


I'm doing a computer vision program in which I have three coplanar points and I want to know their position at all times. In other words, I want to realize when there is translation and when there is rotation.  For the translation I have no problems (at least for now), but the rotation to the sides (right and left) is driving me crazy, I can not figure out how to calculate it.  Being 3 points I work it as a triangle, I am able to know the distance between sides, angles, heights and area of the triangle. But none of this works for me since the rotation to the left and the rotation to the right are always symmetrical and therefore the computer is not able to detect what direction it is. Do you know any method for this calculation without adding more points? I'm sure this has been solved before but I don't know what else to think.  Thank you so much  EDIT  It's not a duplicate of  question because my triangles are 2D. That is the problem, I'm working with 2D coplanar points. That's what's difficult to know if the rotation is to the left or to the right because the behaviour is symmetrical.


How much missing data can you replace with data imputation?

I have a data set with 40 participants that underwent 20 different tests. For most of these tests all the data is there. For 2 of the 20 tests, 2 out of the 40 values are missing. However, for 5 of the tests (due to financial limitations and this test being expensive) we only about 25 participants have data. Is it possible to fill in those remaining 15 values for those 5 tests using data imputation or is that too many values missing?


I'm trying to figure out, how to recreate the effect used in shapes 2 & 4. 1 and 3 seems to be simple halftones. 1 & 3 though are made with the perfect dots (not like a usual halftone) while they still reflect highlights and shades of the source image.   I have tried to use Bitmap > Diffusion Dither and then bring the result to Illustrator, trace it and use Convert to shape > Ellipse and it somehow works, but does not produce so neat result as this on the original artwork.   How can I do it cleaner?


Given $f(x,y)$, a function that has continuous partial derivatives in every point. such that $\nabla f(0,-18)=-2i+3j$ We define a new function $g(x,y)=f(xy+x^2,xy-y^2)$ calculate $\nabla  g(3,-3)$  How I tried to solve this? I need to find: $$\nabla g(3,-3)$ = g_x'(3,-3)i+g_y'(3,-3)j=f(xy+x^2,xy-y^2)_x'(3,-3)i+f(xy+x^2,xy-y^2)_y'(3,-3)j$$ and I have a formula for $\nabla g(3,-3)$, in other words I am evaluating the gradient of $g$ at the point $x=3$ and $y=-3$. In this formula I have the terms $f(xy+x^2, xy-y^2)^{'}_x$ and  $f(xy+x^2, xy-y^2)^{'}_y$ so I need to substitute $x=3$ and $y=-3$ into them which gives me a final answer of $-2i+3j$ which is wrong.


I am trying to access my Windows laptop from my Mac. I am using Filezilla and FTP/SFTP. I am not sure if Filezilla only works with remote servers. Right now I am using the username, password, public IP address, and port 22 with Filezilla, but it is failing. Should I use the private IP address since I am on the same network (i.e 192.168.1.5)?


I don't know why my camera is not working, I am sure it is a software problem, it just shows a black page. All features are working but it doesn't show an image. It is not working on other apps, like Instagram, as well. The front camera is not working. I have tried to "Reset All Aetting" option but it is not working neither. I upload a photo which is the screenshot when I run camera  How can I solve this problem?


An Exercises from Linear Algebra by Serge Lang     Let R be a commutative ring. If $M$ is an ideal, denote the ideal $MM$ by $M^2$. Let $M_1, M_2$ be two ideals such that $M_1+M_2=R$. Show that $M_1^2+M_2^2=R$.   I let $x \in M_1,y \in M_2 $ such that $x+y=e$ (the identity element). Then I want to prove there exist some elements $a \in M_1^2, \ b \in M_2^2$ respectively and such that $a+b=e$. However I am stuck here. any hint?


So I have a class like this:  public class Person {    private List<String> list = new ArrayList<String>();     public addPerson(String s) {         this.list.add(s);       } }  public class TestPerson extends TestCase {      private Person person;       public testAddPerson() {         this.person.addPerson("John");      }     }   My question is how can I test that John was added in the list. I woulod like to do some tests like list.size() == 1 or list.get(0).equals("John")  Any suggestions?


How to free space on a completely full volume?

I am using Linux. And within an uncontrolled event, my 4GB system disk is full.  When I try to uninstall some program by sudo apt-get purge program-name, it gives me this error:  /usr/bin/mandb: can't write to /var/cache/man/25843: No space left on device   Is there any system file that can be deleted in this situation?


Generating correlated binomial random variables

I was wondering if it might be possible to generate correlated random binomial variables following a linear transformation approach?  Below, I tried something simple in R and it produces some correlation. But I was wondering if there is a principled way to do this?  X1 = rbinom(1e4, 6, .5) ; X2 = rbinom(1e4, 6, .5) ;  X3 = rbinom(1e4, 6, .5) ; a = .5  Y1 = X1 + (a*X2) ; Y2 = X2 + (a*X3) ## Y1 and Y2 are supposed to be correlated  cor(Y1, Y2)


Creating Interactive Map Using Something Other Than Google?

I have a Roleplay Forum, and I would like to add a map of my Roleplay World to the website.  I would like my map to be clickable, and have each location take you to a place on the forum. I don't know coding outside of basic basic  prosilver.  I want the map to be an image, a large one, where you can scroll around the element like a map and then click on a city, location or land and it takes you there on the forum.


Correct links and references after changing chapter number/letter

I'm trying to change the numbering for some chapters from numbers to letters, using:  \documentclass{report} \setlength\parindent{0pt} \usepackage{hyperref} \begin{document}  Reference to chapter 1: \ref{chapter_1}  Reference to chapter A: \ref{chapter_a}  \chapter{A chapter} \label{chapter_1}  \setcounter{chapter}{0} \renewcommand{\thechapter}{\Alph{chapter}}% \chapter{Another one} \label{chapter_a}  \end{document}    Of course, using \setcounter{chapter}{0}, I end up with two chapters "1", one denoted as a number, the other as a letter, which messes up the clickable references from hyperref (in the example above, both clickable references lead to the first chapter).   Is there a way to solve that -- change one chapter to use a letter instead of a number, without messing up the references by resetting the chapter number?


My PCs have a spear which is able to cast the Daylight Spell. Would this have any effect on Vampires in the spell radius like regular Sunlight would or would it just be considered Bright light for the vampire and have no ill effects against him?


Is it correct to use multiple hyphens in this sentence?

"...it will secure local-authority-enabled-and-delivered housing."  I think it does but I'm not sure. If not, can someone explain why?   Thank you.


Difference between declaring a variable with and without get; set;

When I declare a variable in a class like this:  public class Test {     public string x = 0; }   and another like this:  public class Test2 {     public string x {get; set;} }   What is the difference?


Can you decide to counterspell after another counterspell has failed?

Imagine the following situation: Bobby and Tommy, 2 characters with the Counterspell spell prepared, face against Freddy, an evil priest (who does not have Counterspell). Freddy casts a high level spell. Bobby attempts to counterspell it (and must roll to do so) and Tommy does not react, believing that Bobby will be successful in his roll. But Bobby rolls too low and his Counterspell fails. At that moment, Tommy wants to attempt a Counterspell himself, after seeing his friend fail.  Considering that the reaction must be taken precisely when the spell is cast, is it possible for Tommy to actually wait for another Counterspell to fail before attempting his own Counterspell ?


How to create effect that looks like an acetylene torch cut steel plate

I wanted to have some text cut out of a steel plate, but I wanted hot/glowing edges as if it has just been cut. So far I did  Created a plane and bent/dented it with sculpting Add a solidify modifier to give it some thickness Created some text and extruded it Overlapped the text with the plate and added a boolean modifier (which is applied) to cut out the text. I applied a rusty metal material to the plate I applied a shiny metal material to the cut faces in the plate.  Now I'm stuck trying to make the metal look like it was cut with a torch. Thanks


How to make input text field replace any character by *?

I am working on a site where user authentication is used. When user submits the authentication form, browser asks if user wants to remember password. I think that "feature" is very annoying, so I need to tell every browser not to remember that password. I don't want to use AJAX authentication, also autocomplete="off" doesn't work. So I need  to hide characters replacing them by *.


Why can't we measure imaginary numbers? I mean, we can take the projection of a complex wave to be the "viewable" part, so why are imaginary numbers given this immeasurable descriptor? Namely with operators in quantum mechanics, why must measurable quantities be Hermitian, and consequently real?


Ubuntu 14.04 Unity won't load, no access to terminal

I was working on the system all day on Friday and had it logged out for the weekend. This morning when I try to boot Ubuntu, I'm taken to a screen consisting of the default desktop purple-orange and nothing else. I can right click and use the standard options available, but nothing else. I have tried every possible keyboard shortcut for the terminal (other answers say to run ccsm) but I can't get a terminal to appear.   Is there another way to get the terminal to show up so I can attempt to fix this? Any other workarounds?


Converting between KML and shapefile (SHP) format

My users are sending me point data that were digitized using Google Earth. How can I convert their KML to a shapefile and vice versa?


Where should I post this question about medical packaging?

I posted , but it was closed due to being off-topic.  Why are medical tablets packed in random order? See this picture:  Is there any medical reason for this type of packing?  Is there a SE site that will suit this question?


Memory Efficiency and Performance of String.Replace .NET Framework

string str1 = "12345ABC...\\...ABC100000";   // Hypothetically huge string of 100000 + Unicode Chars  str1 = str1.Replace("1", string.Empty);  str1 = str1.Replace("22", string.Empty);  str1 = str1.Replace("656", string.Empty);  str1 = str1.Replace("77ABC", string.Empty);   // ...  this replace anti-pattern might happen with upto 50 consecutive lines of code.   str1 = str1.Replace("ABCDEFGHIJD", string.Empty);   I have inherited some code that does the same as the snippet above. It takes a huge string and replaces (removes) constant smaller strings from the large string.  I believe this is a very memory intensive process given that new large immutable strings are being allocated in memory for each replace, awaiting death via the GC.  1. What is the fastest way of replacing these values, ignoring memory concerns?  2. What is the most memory efficient way of achieving the same result?  I am hoping that these are the same answer!  Practical solutions that fit somewhere in between these goals are also appreciated.  Assumptions:    All replacements are constant and known in advance Underlying characters do contain some unicode [non-ascii] chars


I have several images like the image below which have very simple LaTeX in them. I am trying to change those images into an actual LaTeX code. Is there any package which does that?


How to prevent DDoS attack on Google Cloud Storage

How can I protect my public images hosted on GCS from ddos attacks?  Does Google provide any protection, or should I pay for the bandwidth used by that attack?


Ive lost my phone how do i install an app on that stolen phone from my pc or laptop

Im working in the DRC an sombody stole my Samsung Gallaxy S4 from my car I want to block the phone so he cant use it any more


Use an indented contour and residues to establish the Cauchy principal   value of $\int_{-\infty}^{\infty}\frac{\sin x}{x}$ using complex   integration.   I see that breaking this up into $\int_{C_R} + \int_{-R}^{-r} + \int_{-C_r} + \int _{-r}^{R}$ (where $-C_r$ is the upper hemispherical contour about $0$ and under $C_R$),  and taking the limit as $r \rightarrow 0 \text{ and } R \rightarrow \infty$ would the be ideal method, but I don't see how $\int_{C_R} \rightarrow 0$.  Even if I alter $\int_{-\infty}^{\infty}\frac{\sin x}{x}$ to $\int_{-\infty}^{\infty}\frac{e^{iz}}{x}$, I'm still left with the fact that the denominator is not $\ge 2 + $the degree of the numerator.  Am I missing something here or is there a better way to solve this?


Horror short movie where an AI implant comes to think of itself as its owner, then is extracted and subjected to sense deprivation

I'm currently searching for the name of a series (or a short movie perhaps?) that I have seen some time ago.   I remember the video shows a woman living her daily life in a smart home. Some time after she's undergoing some kind of surgery. They extract some kind of device which stores an AI that was placed inside that woman's head.  The AI believes it is the person it just got extracted from. From that moment on the AI lives in some kind of white vast room and has to control the smart home for her former self.  After she refuses, the salesman for this smart home control system just lets her sit inside this white empty room for a long time. Soon her mind is broken and she does as she has been told.


I am trying to find a suitable diode to place on the wire that connects c and e in the circuit, with the cathode on the right hand side. I need to justify why I chose the specific diode as well.   However I have no idea on what to chose in terms of forward current and voltage rating as when I start putting other diodes in the circuit later (which is the next step), the currents and voltages through that wire change.   I suppose my question is, am I suppose to find out what the highest current is in that wire out of all possible future diode configurations and then use that?   And would I be right in using a power (rectifier) diode rather than Zener etc?         – Schematic created using


returning 404 page error on form submission

I have decided not to use a plugin to create a simple contact form on my site and used some php code to do the same job. This was so i could style the form exactly how I wanted to. However when I test the form and submit it, the user is sent to the 404 error page despite the url at the top of the browser indicating the contact page that exists. I'm not sure why that would be the case.?  I followed this tutorial to create the template page on my site   Here is the form on my test site


How can I tell if a product has an entry for the standard pricebook?

I have VF page from where i i trying to add products to a pricebook. IF the standard pricebook of the product not active then i am getting an error 'DML exception: Standard price not defined'. So how can i chank the standard price of a product is active or not OR how can i get only products whose standard price is active. Please guide me.


C# Add custom attribute to a class without modify

Lets say I have a sealed class Bank, and it has to properties string Name and int Code.  I have a custom attribute, AlertAttribute and I want to add it to each property in Bank class. How can I do that without modify the code of the Bank class? (no inheritance or partial class is allowed)  Is there any language mechanism to do it (compile-time)? Is it possible to add it by reflection (run-time)?  Thanks a lot.  eLopez  EDIT: I just want to know if it's possible at design time (compile-time) to add attributes with the constrains I exposed. If there none, I would consider to add at run-time, so given link to the answer would be implemented. Thanks


How do you remove the ability for a user to make a comment or post on a page?

I am building a new website on Wordpress, and all my pages have the add comment box at the bottom. I wish fo rthis to be removed from pages such as Home, Contact Us, About etc etc, but want it to remain on the blogs and galleries.  I have read  but do not really understand what this means to do. is there an easier way to do it. I do not have  under Settings -> Discussions.


How can I check if my code is SQL injection proof?

I am already using mysqli_real_escape_string for every user input. I did try to enter the following value inside a textarea which was later meant to be stored in the database.  Something'); DROP TABLE table_name;--   It did not delete table_name from the database and the value was stored exactly like Something'); DROP TABLE table_name;-- in one of the tables. No character was escaped. This made me doubt if mysqli_real_escape_string is actually working or not.  Is user input saved without escaping any characters even when we run the input through mysqli_real_escape_string?  If the input is indeed saved with with escaped characters, why was the query saved without any changes in my case? Am I doing something wrong?


Is there any experimental data for the gravitational lensing equation  $$ \alpha=\frac{4M}{b} $$  where $b$ is the distance of closest approach, $M$ is the mass of the object.   I tried Google but didn't find anything.


Suppose that $f$ is a twice differentiable real function such that $f''(x)>0$ for all $x\in[a,b]$. Find all numbers $c\in[a,b]$ at which the area between the graph $y=f(x)$, the tangent to the graph at $(c,f(c))$, and the lines $x=a$, $x=b$, attains its minimum value.  I understand that the area mentioned above is $$A(c)=\int\limits_a^b (f(x)-f(c)-f'(c)\cdot(x-c))dx,$$ and using this formula I can get that $c= \frac{a+b}{2}$ is a critical point of $A$, but I'm falling to see why this has to be where $A$ attains, specifically, a minimum. If anyone could enlighten me, that would be wonderful.


Auto-flag duplicates of deleted questions for reopening / deletion

Update: This has been implemented according to the .    OK, so  is the  time I've come across a perfectly valid bug report here on meta.SO that was closed as a duplicate, and the question it was closed as a duplicate of then deleted.  Since I don't have 10k here on MSO, I can't really tell when or why those questions were deleted, but I assume there were valid reasons for it.  However, regardless of the reasons for the deletion, having the questions that were closed as duplicates of the deleted question remain closed seems like a disservice to users.  Presumably, a duplicate of a deleted question either:   is no longer a duplicate, and should therefore be reopened; or is crap, just like the deleted question, and should therefore also be deleted.   I therefore propose that, when a question is deleted, any other questions closed as duplicates of it should be automatically flagged for reopening and/or deletion.  I'll leave the exact implementation details for the devs to decide, but one option might be to just add the dupes to both the reopen and the deletion queue, and let the reviewers in those queues decide their fate.  Or perhaps the 10k auto-flag system used e.g. for "questions closed without comment" could be adapted for this purpose too.  Edit: I like  of automatically adding dupes of deleted questions to the reopen review queue, but with the "leave closed" button replaced with "delete" / "recommend deletion" (since just leaving the question closed is not really a useful option in this situation).


In (ListChangeListener.Change change) what is the use of "?" in it?

I was taking tutorial on filtering data on table view JAVAFX and saw that line  its a listener and want to know what is the work of that "?" at that place?


Measurement units not returned in project CRS units

I am attempting to calculate area of country polygons using the field calculator.   The layer in question is unprojected WGS84, but I have set the project CRS to World Equidistant Cylindrical (Sphere), which is listed with the projected CRSs. I've also enabled on-the-fly transformation.  From my limited understanding of the program (I am running QGIS 1.8.0), the measurements should be given in the units of the project CRS, and the proj4 string for the World Equidistant Cylindrical seems to indicate that its units are in meters.  Nonetheless, the measurements are off by orders of magnitude. For example, Afghanistan is significantly larger than 92 square meters, or even 92 sq km. I can only assume I am getting area in degrees. What must I do to change that?


Probability of obtaining at least k heads with a set of unfair coins

I'm trying to figure out an algorithm to compute the probability of obtaining at least k successes after N independent events that have different probabilities of success, i.e., the probability of obtaining at least k heads on N coin flips where each flip has its own probability of heads.  I think this is called a Poisson Binomial distribution and I suspect the solution may involve dynamic programming, but I need help getting started.


Sentences ending with something that already contains a period/full-stop

What's the rule about sentences that end in something that already has a period in it?  Like a sentence that ends in: Washington D.C. -or- etc.  Personally, and I realise this is wrong, I would love to have two periods - the first being, of course, the mark for the abbreviation and the second being the period/full-stop of the sentence.  I'm guessing that it is just treated as a stone that kills two birds, but I've never heard a definite answer as to how to deal with these.


What happens when an electric charge crosses the event horizon?

Let's say a charged particle is falling into a black hole.   What happens immediately after the particle crosses the horizon? It seems to me that one of these two situations will take place.   The charge is instantaneously distributed on the surface of the horizon. It looks like this scenario breaks the local conservation of electric charge. Not only this, but charge density moving instantly from one end of the horizon to another would generate an infinite electromagnetic field. The charge is not instantaneously distributed on the surface of the horizon. But this would violate the no-hair theorem, because the black hole would have a non-uniform charge distribution.


Easy way to have multiple color versions of the same logo without duplicating?

I have a logo made of text and paths. Everything is blue. I also want an all white version, an all black version, and a version that has one word blue and one grey. The only way I know how to accomplish this is to copy and paste the entire group of objects into another artboard, or copy the file, and then just change the colors. I would have 5 or so versions of the same logo, just different colors.  But then if I tweak one object, I have to recreate that tweak in the other 4.  Is there any way to keep one version of the logo but link it to different color schemes?  Using Illustrator 2017


Questions about a commutative ring with exactly three ideals

Let $R$ be a commutative ring with identity. Assume that $R$ has exactly three distinct ideals: $\{0\},I, R.$      1) Show that if $a \in R-I$, then $a$ is a unit in $R$.      2) Let $a,b\ne0$ in $I$. Show that $ab=0$.


How do i advance my research career and publish papers without university affiliation?

I am a recent masters grad from a US institution as a foreign student. As of now I have no university affiliation. My work as a grad student was mainly research oriented. Hence now looking for a job seems redundant as many research jobs in US require US citizenship or field experience. So as a researcher my options are limited. Nevertheless I am working on a theoretical paper. The question is    What are my options at this point considering an academic career where I could become a teacher/lecturer/professor or academician carrying out scientific work. If I have a paper ready how do i publish it in a good journal with a decent impact factor without a university affiliation.    I could not find published research in reputed journals by any independent scholars.


Flying with a desktop computer (as checked luggage)

On an upcoming trip, I will be taking a desktop computer and monitor as checked luggage (on a United/Continental flight). What should I be aware of when doing this? What needs to be done to properly protect all the components? Are there any airline policies I should be aware of?


How to format a large text containing special Characters and breaklines?

I have this rather long text which is the output of a several console inputs. I'd like to have the text as it is as of right now.  Here a link to the raw text since I didn't want to include it in this post:    I tried replacing the special characters with the correspondending escape characters. But it still causes a lot of issues. I am fairly new to LaTeX too.


Can't login even with password Linux ubuntu

I can't log on, it lets me type my password in and almost logs in but then goes back to the login screen. Can't even login on the guest account. I tried Ctrl+Alt+F2 but it tells me my login is wrong even though I know it isn't.  Ubuntu 14.04.3


Whenever I post any question I am expressed as "unknown" in preview and something like "user_.. " as display name with my question or any comment. How can I edit my display name?? I have been using my account since recently.


What is the expected number of red apples left when all the green apples are picked?

We have 4 green apples and 60 red apples. Each time we pick one out without replacement. Then what is the expected number of red apples left when all 4 green apples are picked?


apex record sharing with and without manual rowcause

I am working on a scenario where record created by users with permission set 'A' should be visible to users with permission set 'B'. On googling I came across apex sharing of a record programmatically. However the one thing I could not understand is the usage of rowCause and the difference of using rowcause manual and custom rowcause. I don't see what difference does it make if one uses custom rowcause (using sharing reason) instead of manual rowcause.


How can I find the cars I buy on my character's cell phone? What garage do I go to to get the car?


How should i properly arrange these in beamer?

I was not able to find out the correct coding to place two figures vertically in right column, on left column itemize environment with figures Here is my MWE   \documentclass[10pt]{beamer}    \definecolor{dipjyoticol}{rgb}{0.137,0.466,0.641}  \setbeamercolor{structure}{fg=dipjyoticol}   \usetheme{Warsaw}  \usefonttheme{professionalfonts}    \title{ Name of the Title}   \author{ Presented by:{\textbf{Author Name}} \\Supervisor:{\textbf{supervisor name}} \\~\\ \vspace{2mm}     Name of Department \\ABC Institute of Technology}  \logo{\includegraphics[height=0.6in, width=0.6in]{example-image-b}}  \date{\tiny {\today}}  %**********************  \useoutertheme{sidebar}   \setbeamercolor{frametitle}{fg=white}   \begin{document}   \begin{frame}{abcdefgshwttt gsshshshs1}      \begin{minipage}{5cm}           \begin{itemize}               \item \small It was observed that the maximum brightness value of ABCDE (device B1) improves significantly to 0000 $cd/m^{2}$ as compared to 1111 $cd/m^{2}$ of PFO (more than $n$ times).           \end{itemize}           \begin{figure}                \includegraphics[scale=0.20]{example-image-a}                \caption{\small Voltage vs Current Density (LE-J) curves of PFO and ABCDE based hole only and electron only devices, Film thickness=00nm}           \end{figure}      \end{minipage}\hfill      \begin{minipage}{5cm}           {\small\fontdimen2\font=1pt Device structure:ABC/ABCDE:SSS(00nm)/ polymer(00nm)/CiF(0.0nm)/Cl(000nm)}      \begin{columns}            \begin{column}{0.7\textwidth}                 (a).\begin{figure}                     \includegraphics[width=3cm,height=3cm]{example-image-a}                 \end{figure}            \end{column}      \end{columns}      \begin{columns}           \begin{column}{0.7\textwidth}             (b).               \begin{figure}             \includegraphics[width=3cm,height=3cm]{example-image-a}             \caption{Brightness vs. Current Density (B-J) (a) and Current Density vs. Voltage (J-V) (b) curves of the single layer Blue PLEDs.}             \end{figure}            \end{column}       \end{columns}     \end{minipage}     \end{frame}       \end{document}


Prove or disprove: If $A$ and $B$ are non-negative definite matrices then $AB$ is diagonalizable

Let $A_{(m\text{x}m)}$ and $B_{(m\text{x}m)}$ nonnegative definite symmetric matrices.  Prove or disprove: $AB$ is diagonalizable. It seems to be false, but I have some problems to find a counterexample.


How do I determine SFDC Edition using SOQL?

How do I use SOQL to determine what edition of SFDC someone has? Such as essential, professional, etc...


How to put a figure correctly in required place

I'm using t to place the figure on top, I find it shifted downwards for more than half a page leaving the above part empty. Any help?


I have a lens with a small but significant looking scratch near the center. But I don't see any difference in the photos. Where does the imperfection show up? How important is it to get the piece of glass replaced? (It's a Panasonic 14-45mm micro 4/3 lens).


How can I raise flags after having reached 3000 rep?

I finally reached 3000 reputation. So I can now vote to close questions.  But since I'm able to do this, I can't flag posts anymore. They are automatically close votes.  So I can't get the Marshal badge anymore, where I must raise 500 helpful flags. But when I take a look at the users which were recently awarded this badge, most of them have over 3k rep.   How can I raise flags which are counted for the badge?


How to navigate to a alert using Selenium Web Driver with Java?

I am trying to navigate the command on the alert box, but I am not able to do it in Web Driver with JAVA. Please help me with it. Apart from this I would also like to know how to tackle with the confirmation box and Warnings prompts displayed.


i have written a code . this looks as follows .  #include<stdio.h>  #include<string.h>   int do_print2(char *q[]);  int main() {    char *p[]={"pointervaule","NAM", "JAM", "CALM"};   do_print2(p);   return 1;  }  int do_print2(char *p[]) {      printf("this is print1 char *p \n");     strcat(p[0],"added");     printf("%s\n", (p[0]));     return 1;  }   after compilation, i am trying to run it, i am getting segmentation fault. help me in learning what is the reason for that error. thank in advance.


when i click ok to software update it shows 'This requires installing packages from unauthenticated sources' please help me how to get out from this problem


windows xp 2 GB missing hard drive space

I've got an odd problem with a machine that has a old windows XP installed on it (changing the OS is sadly not possible for that machine).  The hard drive is a 90 GB drive (84 useable). So far so good.  Now when I tried to clean up the contents I enabled seeing all hidden files in the windows explorer, made a clean hard drive command on the hard drive properties and then went through all the main folders in c:\ and noted down the sizes to see where I could best get started.  So far so good with only one exception......the hard drive says that 11,7 GB of space are used (properties) but I only come up to 9,52 GB including the pagefile in C:\ when I mark all in C:\ and use properties) as 72,3 of the 84,0 GB are empty.  So my question is where could those 2,18 GB of missing disk space be at? (already did a chkdsk but it came up inconclussive and I'm running out of ideas now because of that)


Deleting polygon created with Add Polygon Feature in QGIS

I was playing with the "Add polygon Feature" in QGIS. I ended up with some weird ugly polygon. How do I delete the polygon?


Currently, this site embeds YouTube videos as Flash. (see an example: )  However, this is not the best solution, as now YouTube also supports HTML5, and some users (like me!) prefer to use HTML5 player instead of Flash. Supposedly, it should also work on devices that don't have Flash player (I can't confirm because I don't have one).  The solution seems quite simple: just change the embed code to an iframe, as described at     EDIT:  says:     Note: YouTube <object> embeds were  on January 27, 2015. Please migrate your applications to the , which can intelligently use whichever embedded player – HTML (<video>) or Flash (<object>) – the client supports.


Simple Proof of the Euler Identity $\exp{i\theta}=\cos{\theta}+i\sin{\theta}$

My question is too simple. We know all that if we define the exponential function on $\mathbb{C}$ then we define the real part and imaginary part of $\exp{it}$ as $\cos{t}$ and $\sin{t}$.  So if we assume that we know the definition of the trigonometric functions and the exponential function not as a series but for exponential as solution of differential equation $y'-y=0$ then my question is     How can I explain this relation (intrinsically)in a simple way to a high-school student, they is any physical interpretation of this formula  ?   or we  can give another equivalent question (in my sens)     How can one prove the Euler relation? and What was the original proof of Euler himself?


Example of a finite non-commutative ring without a unity

Give an example of a finite, non-commutative ring, which does not have a unity.    I can't think of any thing which fits this question. I was thinking $M_2(\mathbb{R})$ but it has the identity. Any help is appreciated.


At home I have a large nas with a bunch of video files on it (various filetypes).  I'm looking for a way to stream those videos if I need them so I can watch them from any computer that has a internet connection.  It would need username/password protection or at least ip based protection.  Thanks


I'm trying to ssh to my iPhone from my mac and I got the following message:  The authenticity of host '192.168.1.253 (192.168.1.253)' can't be established. RSA key fingerprint is SHA256:P8yscqMVDOPOQ24i3qJjcm4hUMeeuxDy7JkRegtV20Q. Are you sure you want to continue connecting (yes/no)?   On my iPhone I typed ssh-keygen -lf /var/mobile/.ssh/id_rsa.pub to check my fingerprint and the fingerprint displayed didn't match the fingerprint displayed on my mac.  Why wouldn't the fingerprints match and how can I fix it without compromising the connection, e.g to a man in the middle?  I have have really no clue what's going on, I've just been searching for a solution so I was hoping someone could help me    Update  I ran ssh-keygen -lf /etc/ssh/ssh_host_rsa_key.pub instead, and this indeed matched. Am I on the clear to connect?