I was previously reprojecting a point cloud in .las format using liblas 1.7.0 (with GeoTIFF 1.4.0 GDAL 1.10.1) as follows:  las2las /tmp/input.las --a_srs EPSG:4326 --t_srs EPSG:3857 --scale 0.001 0.001 0.001 --offset -13704940,4639778,0 --output /tmp/new.las   However, after upgrading to liblas 1.8.0 (with GeoTIFF 1.4.1 GDAL 1.11.3) I now get the following error which I believe indicates the scale factor and offset combination are not enough to cover the data range:     ERROR 1: latitude or longitude exceeded limits   error: Could not project point for ReprojectionTransform::latitude or longitude exceeded limits   I have played about with the offset and scale factor and can get it to work only if I set the scale factors to 0.01 and remove the offset, e.g.:  las2las /tmp/input.las --a_srs EPSG:4326 --t_srs EPSG:3857 --scale 0.01 0.01 0.01 --output /tmp/next.las   Why am I getting this error with the newer version of liblas, and what should my reprojection command be?  For your information, here is the lasinfo for the input point cloud:    Version:                     1.2   Source ID:                   0   Reserved:                    0   Project ID/GUID:             '00000000-0000-0000-0000-000000000000'   System ID:                   'libLAS Python API'   Generating Software:         'libLAS 1.8.0'   File Creation Day/Year:      149/2018   Header Byte Size             227   Data Offset:                 738   Header Padding:              0   Number Var. Length Records:  4   Point Data Format:           2   Number of Point Records:     20   Compressed:                  False   Number of Points by Return:  20 0 0 0 0   Scale Factor X Y Z:          0.00000010000000 0.00000010000000 0.01000000000000   Offset X Y Z:                -123.1140000 38.4250000 -100.00   Min X Y Z:                   -123.1139429 38.4257008 -2.43   Max X Y Z:                   -123.1130518 38.4263682 18.19   Spatial Reference: 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"]]

I have a lidar file (file.las) with the following spatial reference:  Spatial Reference:            PROJCS["NAD83 / UTM zone 11N",     GEOGCS["NAD83",         DATUM["North_American_Datum_1983",             SPHEROID["GRS 1980",6378137,298.2572221010002,                 AUTHORITY["EPSG","7019"]],             AUTHORITY["EPSG","6269"]],         PRIMEM["Greenwich",0],         UNIT["degree",0.0174532925199433],         AUTHORITY["EPSG","4269"]],     PROJECTION["Transverse_Mercator"],     PARAMETER["latitude_of_origin",0],     PARAMETER["central_meridian",-117],     PARAMETER["scale_factor",0.9996],     PARAMETER["false_easting",500000],     PARAMETER["false_northing",0],     UNIT["metre",1,         AUTHORITY["EPSG","9001"]],     AUTHORITY["EPSG","26911"]]   Then I reproject it to WGS84 with las2las:  las2las --a_srs EPSG:26911 --t_srs EPSG:4326 -i file1.las -o output.las   And I get:   Spatial Reference:                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"]]   But when I try to revert the transformation: from WGS84 to NAD83/UTM 11N, I get an error:  las2las --a_srs EPSG:4326 --t_srs EPSG:26911 -i output.las -o wgs2utm.las ERROR 1: latitude or longitude exceeded limits error: Could not project point for ReprojectionTransform::latitude or longitude exceeded limits0.   Why I got this error, if I am just reversing the transformation (originally from NAD83 to WGS84, and then from WGS84 to NAD83)?.


I would like to reset my network settings and services entirely as if starting from scratch. I had recently installed Ubuntu a few days ago, and deleted a important boot file.  After installing Ubuntu again, my network was not auto configured like my previous install. And my network did not work. Then I think I messed up the network settings too much in attempting to fix it, and now I would like to completely reset network settings. My system is an old HP Pavilion dv8 running Ubuntu 14.04 and Windows 8.1 dual boot.

When I first installed Ubuntu, all networking worked perfectly. After messing with the settings every so often, it slowly became unusable. I would really like to know if there is a way to completely reset network settings without re-installing Ubuntu, DNS settings, proxy settings, everything. I'm running 12.04.


So I'm making an expandable listView with the following adapter:  class SubcategoriesAdapter extends BaseExpandableListAdapter {     @Override     public View getChildView(int groupPosition, int childPosition, boolean isLastChild, View convertView, ViewGroup parent) {         View v=convertView;         if(v==null) v=layoutInflater.inflate(R.layout.tip_view, null, false);         ((TextView)v.findViewById(R.id.title)).setText(data.subcategories.get(groupPosition).tips.get(childPosition).title);         ((TextView)v.findViewById(R.id.content)).setText(data.subcategories.get(groupPosition).tips.get(childPosition).text);         return v;     }      @Override     public boolean isChildSelectable(int groupPosition, int childPosition) {         return true;     }      @Override     public int getGroupCount() {         return data.subcategories.size();     }      @Override     public int getChildrenCount(int groupPosition) {        return data.subcategories.get(groupPosition).tips.size();     }      @Override     public boolean hasStableIds() {         return false;     }      @Override     public Object getChild(int groupPosition, int childPosition) {         return data.subcategories.get(groupPosition).tips.get(childPosition);     }      @Override     public long getGroupId(int groupPosition) {         return 0;     }      @Override     public Object getGroup(int groupPosition) {        return data.subcategories.get(groupPosition);     }      @Override     public long getChildId(int groupPosition, int childPosition) {         return 0;     }      @Override     public View getGroupView(int groupPosition, boolean isExpanded, View convertView, ViewGroup parent) {         View v=convertView;         Tips.TipsSubcategory me=data.subcategories.get(groupPosition);         if(v==null) v=LayoutInflater.from(getContext()).inflate(R.layout.tips_subcategory_view, null, false);        /* ((TextView)v.findViewById(R.id.title)).setText(me.title);         Picasso.with(getActivity()).load(me.ad_url).into(((ImageView) v.findViewById(R.id.adImageView)));         Picasso.with(getActivity()).load(me.image_url).into((ImageView)v.findViewById(R.id.image)); */         return v;     } }   When I'm loading this Fragment that contains the list, I get the following exception:  java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference     at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:715)     at android.view.LayoutInflater.rInflate(LayoutInflater.java:806)     at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)     at android.view.LayoutInflater.rInflate(LayoutInflater.java:809)     at android.view.LayoutInflater.inflate(LayoutInflater.java:504)     at android.view.LayoutInflater.inflate(LayoutInflater.java:414)     at biz.energit.cookingfridge.user.fragments.TipsCategory$SubcategoriesAdapter.getGroupView(TipsCategory.java:148)   This line that it's pointing to, 148 is the line where I inflate the view:   if(v==null) v=LayoutInflater.from(getContext()).inflate(R.layout.tips_subcategory_view, null, false);   I tried removing the i, passing the actual parent instead of null, and getting the inflater from the fragment or via other means. I'm clueless.  UPDATE: Just in case someone has this issue again, I can't write an answer because someone marked this a duplicate. The problem was using <view instead of <View in the XML I was inflating. The compiler says nothing about it, but the issue mafiests itself this way.

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


I made a list of cars, the factory produces every 4 cars broken (public bool Broken;).  My code  public static void BuildCar() {      List<Factory> cars = new List<Factory>();      for (int i = 1; i < 10; i++)     {         Factory newCars = new Cars("string", "string", "bool");         if (i % 4 == 0)         {             newCars.Broken = true;             cars.Add(newCars);         }         else         {             newCars.Broken = false;             cars.Add(newCars);         }     } }   What I did     A list of all the cars (good and broken).   What I need to do     Create a method that copies only good cars to another list.   Thx.

I am looking for a very fast way to filter down a collection in C#.  I am currently using generic List<object> collections, but am open to using other structures if they perform better.  Currently, I am just creating a new List<object> and looping thru the original list.  If the filtering criteria matches, I put a copy into the new list.  Is there a better way to do this?  Is there a way to filter in place so there is no temporary list required?


What we know from the movies and the books is that Malfoy's parents had assisted Lord Voldemort, we also know that Malfoy's father was a Death Eater but we do not know whether his mother was though.  My question is, after the final book and the war was over did Malfoy's parents go to Azkaban for assisting Lord Voldemort?

All I can find about Lucius or Narcissa Malfoy, or their life after the Second Wizarding War, is that they were not sent to Azkaban and that they had a grandchild.  Is there any information about what happened to them and what they did after the Second Wizarding War?  Were they ostracized by friends because they left the Death Eaters publicly?  Were people scared to trust them?  Has J. K. Rowling given any information about what their life was like after the war?


I don't know why it doesn't work.  template <typename E> class SearchTree { public:     class Iterator {              Iterator& operator++();     }; };  template <typename E> Iterator& SearchTree<E>::Iterator::operator++() {}      warning C4346 : 'iterator' Dependent name is not a type       error C2061 : Syntax error: identifier 'iterator'

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


As the title mentions I need to create a pie of sorts using Adobe Illustrator. It seems like it would be easy using the Polar Grid Tool but I can't, for the life of me, figure out how to make each 'piece' of the pie be into its own independant object/layer/etc. I need each piece to be independantly editible for color/content/text/etc. Please help an AI noob....

Is there a fairly simple way to divide a circle into equal parts using Adobe Illustrator CC?


Recently, LaTeX always shows  "Underfull \hbox (badness 10000) in paragraph at lines 106--107  Trial:     \documentclass{ctexart}    \usepackage{color}    \usepackage{amsmath}    \usepackage{amssymb}    \usepackage{graphicx}    \usepackage{epstopdf}    \hfuzz=\maxdimen    \tolerance=10000    \hbadness=10000    \begin{document}  $(A \pm  B)^{-1} \neq A^{-1} \pm B^{-1}$,$(A \pm  B)^* \neq A^* \pm B^*$~\ $|(A^*)^*|=|A|^{n^2-2 n+1}$~\ \end {document}   My question :How to revise it?  And I found the code that cotains the "~\\" and blank line  always shows the warning imformation "Underfull \hbox (badness 10000) in paragraph at lines"

Recently,I found the code that cotains the"~\\" and blank line always shows the warning imformation "Underfull \hbox (badness 10000) in paragraph at lines"  \documentclass{ctexart} \usepackage{color} \usepackage{amsmath} \usepackage{amssymb} \usepackage{graphicx} \usepackage{epstopdf} \hfuzz=\maxdimen   $(A \pm  B)^{-1} \neq A^{-1} \pm B^{-1}$,$(A \pm  B)^* \neq A^* \pm B^*$~\\  $|(A^*)^*|=|A|^{n^2-2 n+1}$~\\  \end {document}   I add the code:  \tolerance=10000 \hbadness=10000 \begin{document}   However,fail to solve it!


I wanna cut a mesh by specifying the angle, but knife mode only cut 45° with C key.  I want to cut by the angle around specifying the vertex.

Instead of the constrained 45 degrees that happens when you press C, is there a specific angle I can get for example 35 degrees instead?   It's currently cut at 45 degrees in the attached image and I need it to be 35.


I'm trying to calculate the future time when a user inputs hours and minutes separated by a space.  I'm stuck on when the user inputs minutes that calculates the future minutes to be less than 10.  For example, if the current time now is 10:04 and the user inputs 1 hour, 4 minutes, the future time SHOULD be 11:08.  Instead, I get printed 11:8  int extraHours = minutesGiven/60; hoursGiven = hoursGiven+extraHours; // System.out.println("hoursGiven= " + hoursGiven); int extraMinutes = minutesGiven%60;  if((minutesNow + extraMinutes)>59){     minutesNow = minutesNow + extraMinutes-60; }else if((minutesNow+hoursGiven)<10){     minutesNow = minutesNow + extraMinutes;     String padded = String.format("%02d" , minutesNow); }else{     minutesNow = minutesNow + extraMinutes; }  //calculate the future hour int futureHours = 0; if(minutesGiven==30){     futureHours = (hourNow + hoursGiven +1)%24; }else{     futureHours = (hourNow + hoursGiven)%24; } //print the time System.out.println("The time will be " + futureHours + ":" + minutesNow);  // LocalTime noon = LocalTime.of(12, 0); //12 hours, 0 minutes //System.out.println("Noon printed as a LocalTime object: " + noon);

Is there a better way of getting this result? This function fails if num has more digits than digits, and I feel like it should be in the library somewhere (like Integer.toString(x,"%3d") or something)  static String intToString(int num, int digits) {     StringBuffer s = new StringBuffer(digits);     int zeroes = digits - (int) (Math.log(num) / Math.log(10)) - 1;      for (int i = 0; i < zeroes; i++) {         s.append(0);     }     return s.append(num).toString(); }


I have a binary string containing 160 digit. I have tried:  new BigInteger("0000000000000000000000000000000000000000000000010000000000000000000000000000001000000000010000011010000000000000000000000000000000000000000000000000000000000000", 2).toByteArray()   but it returns the 15 bytes array with removed leading 0 bytes.  I would like reserve those leading 0 bytes, keep it 20 bytes.  I know some other ways to accomplish that, but I would like to know is there any easier way might just need few lines of code.

I'm working with some example java code for making md5 hashes. One part converts the results from bytes to a string of hex digits:  byte messageDigest[] = algorithm.digest();      StringBuffer hexString = new StringBuffer(); for (int i=0;i<messageDigest.length;i++) {     hexString.append(Integer.toHexString(0xFF & messageDigest[i]));     }   However, it doesn't quite work since toHexString apparently drops off leading zeros. So, what's the simplest way to go from byte array to hex string that maintains the leading zeros?


I have been working on this quiz:   and don´t understand why casting an int to a float would output 0.000000      #include <stdio.h>     int main()     {             int i = 10;             void *p = &i;             printf("%f\n", *(float*)p);             return 0;     }   Expected output: 10.000000  Actual output: 0.000000  Thank you very much for your help!

When asking about , people sometimes refer to the strict aliasing rule. What are they talking about?


I'm currently using an Arnova 10G2 that has never been used as it was a relatives christmas present. When trying to load the Google Play Store on the device after re-downloading it from Softpedia, a notification comes up saying:     You must add an account to continue. Do you want to add one now?   Whether I click yes or no, it closes the application and brings me back to the devices home screen. I do not want to root the device to fix this.  Is there any sort of known solution? I could not see a clear one when searching.

I have recently installed a custom ROM and cannot find the Play Store. It seems like all apps that belong to Google are missing.  How can I install the Google Apps Package (Play Store, ...) on my Android device?


I have a RL80-UR543 LED 8MM. How much voltage I need if I use a resistor of 100Ohm?

I'm trying to work out what value resistor to use in a LED circuit. The equation I'd use to do this is:  $$ R = \frac{V_{cc} - V_f}{I_f} $$  Seems logical, and makes complete sense. The answers to the question  confirm this too.  I have the following LEDs:   \$ V_f = 3.3V \$ \$ I_{f_{typ}} = 20mA \$   Using a 5V power supply:   \$ V_{cc} = 5V \$   Plugging these into the above equation gives:  $$ \begin{eqnarray} R & = & \frac{V_{cc} - V_f}{I_f} \\   & = & \frac{5V - 3.3V}{20mA} \\   & = & 85\Omega \end{eqnarray} $$  All good so far.  However, if I use the calculator at , that gives me 100Ω. If I use the ElectroDroid app on my phone, that gives me 85Ω.  So, I assume that the linear1 calculator is using a different method of calculating this resistor value; is there some better way of doing this?


My PC (Ubuntu 16.04) is connected to the home network by an Ethernet cable. I want to move to another room and use Wifi. I want to switch over as seamlessly as possible (to avoid VPN disconnection, for instance). I can connect to both the Wifi and Ethernet, but if at that point I disconnect the Ethernet applications receive a connection error.   So I think I need a way to force the traffic to use the Wifi interface before disconnecting the wire. With both interfaces active, ip route says:  default via 192.168.0.254 dev enp0s31f6  proto static  metric 100  default via 192.168.0.254 dev wlp4s0  proto static  metric 600  192.168.0.0/24 dev enp0s31f6  proto kernel  scope link  src 192.168.0.43  metric 100  192.168.0.0/24 dev wlp4s0  proto kernel  scope link  src 192.168.0.7  metric 600    If I use:  ip route del default via 192.168.0.254 dev enp0s31f6    traffic goes to a crawl.  So I think I have to be a bit more subtle and keep both interfaces active for a while, but make the Wifi one the preferred one. I believe this is accomplished by having a smaller metric on the Wifi interface than on the Ethernet one. However, if I do:  ip route change default via 192.168.0.254 dev enp0s31f6 proto static metric 600   I get:  default via 192.168.0.254 dev enp0s31f6  proto static  metric 100  default via 192.168.0.254 dev enp0s31f6  proto static  metric 600    So the command seems to replace whatever interface has the given metric. And if I try to use any other metric value than 100 or 600, I get:  RTNETLINK answers: No such file or directory   Of course, if I am on Wifi and reconnect to the Ethernet, the traffic switches seamlessly to it...   So, which of my assumptions are wrong? Is there a solution?

I want to use WiFi port of my server as redundant link for copper connection to my home DSL router. My router if SAGEM 2704 with very limited functionality. So practically the only possibility is to configure something on the server. Is it possible to use WiFi for redundancy. If so, what I have to implement on my server?


I have (2) Cisco UCS 5108 Blade chassis with a total of (16) Cisco B200M3 Blades.  Each blade has (2) 10 Core Intel E5-2680 1866MHz CPUs.  Total environments resources 32 CPUs (320 Cores), 4096 GM Memory and 45TB of combined storage on an EMC array.   Any compatibility issues with Ubuntu 18.04 LTS?   I would like to install Openstack on this environment.  Any advice would be appreciated.  Best Larry

I have a device on which I would like to install Ubuntu. How do I find out if Ubuntu will work on it?


Let $G$ a bipartite graph with partitions $X$, $Y$ such that all degrees in $X$ are at least one, and if $x\in X$ has an edge to $y$ then $d(x)\geq d(y)$. Show that there's a matching saturating X.  I think I need to use Hall's theorem, but my attempts to show Hall's condition holds for such graphs always ended up in cyclic arguments. Also, I've noted that if $k$ vertices from $X$ share a neighbour, their neighbourhood has size at least $k$ (the neighbour has degree $\geq k$, thus all of the vertices have degree at least $k$), yet I'm not sure how to use it to show Hall's condition in general. (Note: this is not the same question as , as here we have $d(x)\geq d(y)$ guaranteed only if $x$ has an edge to $y$)

In a bipartite graph $G$ with parts $X$ and Y, for each $x∈X$ and $y∈Y$, $\deg(x)≥\deg(y)$. Show that $G$ has an matching that infects each vertex of $X$.


I'm trying to write an application which I can point at different databases and look at the database's schema, that is, tables and their column's properties, relationships, constraints, etc. I've been looking into the  method GetTable(), but this appears to return nothing;  public static IEnumerable<MetaTable> GetMetaTables() {     using (var connection = new SqlConnection(ConnectionString))     using (var context = new SchemaDataContext(connection))            return context.Mapping.GetTables().ToList(); }   What am I doing wrong!?

Right now I have an  package that runs every morning and gives me a report on the number of packages that failed or succeeded from the day before. The information for these packages is contained partly within the sysjobs table (a system table) within the msdb database (a system database) in .  When trying to move the package to a C# executable (mostly to gain better formatting over the email that gets sent out), I wasn't able to find a way to create a dbml file that allowed me to access these tables through . I tried to look for any properties that would make these tables visible, but I haven't had much luck.  Is this possible with ?


I'm encountering the same problem as in "" and in "".  I'm not to sure about the solutions presented there. As I use KOMA-Script, I preferred using tocstyle, but the package happily announces:     THIS IS AN ALPHA VERSION! USAGE OF THIS VERSION IS ON YOUR OWN RISK! EVERYTHING MAY HAPPEN! EVERYTHING MAY CHANGE IN THE FUTURE! THERE IS NO SUPPORT, IF YOU USE THIS PACKAGE! Maybe it would be better, not to load this package   Maybe it really would be better not to use tocstyle.  In another answer, I read that tocloft doesn't work well with KOMA-Script. So this is doesn't sound like an alternative either.  The other answer to these questions redefines \@pnumwidth. As I have no knowledge of the LaTeX kernel, I'm not sure whether this changes too many widths.  So my question is, is there a good, stable solution to roman numbers intruding into the margin? Or are any of my concerns with the proposed solutions wrong?  For reference, here's a MWE:  \documentclass{scrreprt}      \begin{document}  \pagenumbering{Roman} \tableofcontents  \clearpage Text\clearpage Text\clearpage Text\clearpage Text\clearpage Text\clearpage Text\clearpage Text\clearpage Text\clearpage Text\clearpage Text\clearpage Text\clearpage  \chapter{Chapter} Text\clearpage Text\clearpage Text\clearpage Text\clearpage Text\clearpage \section{Section} Text\clearpage \section{Section}   \end{document}   And it's result (The margin begins at the last "I" in "XIII"):

Consider the Code below:  \documentclass[%     paper=A4,     twoside=true,     fontsize=12pt,     titlepage=true,     listof=totoc,     bibliography=totoc,     listof=flat,     open=right,     cleardoublepage=empty,     headsepline=true,     footsepline=false,     captions=tableheading,     numbers=noendperiod,     parskip=half-,     headings=normal]{scrbook} \usepackage[a4paper]{geometry} \geometry{     includehead=true,     hmarginratio=1:2,     vmarginratio=3:5,     textwidth=170mm,     textheight=230mm,     headheight=20pt,     footskip=15mm,     bindingoffset=6mm} \usepackage{showframe} \usepackage{blindtext} \usepackage[tocindentauto]{tocstyle} \usetocstyle{KOMAlike} \begin{document} \frontmatter \tableofcontents \cleardoublepage \mainmatter \blinddocument\blindtext \pagenumbering{Roman} \setcounter{page}{20} \appendix \blinddocument \end{document}   The roman pagenumbers in the table of contents are too wide. How to fix this?


When adding a circle I can see the 'Add circle' panel below the tool bar, but once I do something else it disappears. How do I get this back? How can I change the number vertices on an existing circle for instance? It appears that you have to do this immediately after adding the primitive, otherwise you're scuppered?

When you first add a cylinder, you have the option to change the number of vertices, etc, but once you do anything else in blender, it seems you no longer can edit those parameters.   Is there a setting anywhere or an add-on that allows these parameters to be edited later on? If not, how easy would such an addon/feature be to create for anyone reading this?


What did you say?   What you said.         How did you and mum guess I wanted Agnes?   how you and Mum guessed I wanted Agnes   What is the meaning of above two sentences? When should I use "did + present tense" and the past tense of a verb?

Should I use the past tense with did? For example, I was to say:     The important question is: Did they knew what it means or not?   Or should I say:     The important question is: Did they know what it means or not?   In other words: Should I use past tense with did?  I looked at this:    but it didn't really answer my question.


I've a value like "13.4" in a MySQL Database.  When I print it in a PHP page, it's showed as "13.39999961853"  Any suggestion?

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I recently bought a new laptop, and have updated it to El Capitan. I have started working on an old paper, which compiled just fine on my last laptop, and cannot get the bibliography to compile.   I am using TexShop. I can compile the main file (in XeLaTeX). but when I try to compile the bibliography I get this error message: "The program bibtex does not exist". The console does not generate any text whatsoever.   I've looked around online but can't find anyone else who seems to have had this exact problem. I'm assuming it's not with my code, as I can compile it on my old machine, but something to do with how TeX Shop has loaded on my new computer?   Any suggestions would be greatly appreciated!  the relevant bibliography code:  \usepackage[style=apa]{biblatex} \addbibresources{MyFile.bib}

Texstudio doesn't work for me anymore after updating to Mac OS X 10.11 El Capitan. I have the latest version of TexStudio installed (2.10.2). As pointed out by , this is due to a change in the places OS X allows files to be saved. When I started TexStudio, I received a message "PDFLatex could not be launched". In the settings, I had to change the folder of the compiler from user/texbin/ to /Library/Tex/texbin, as shown in the screenshot below:    Can anybody tell me if I have to make further changes in order to make TexStudio fully working (bibliography and the like), and if yes, which?   I hope TexStudio are very soon going to release an update (there is an issue for this on their issue queue.  Thank you for your help. This is my first post here, so please apologize any imprecisions.


I have this Hash Set code and when I try to run my compile method on it I get the Null Pointer Exception: null  error on it. Here is the code:  private void initKeywords() {         keywords = new HashSet<String>();         keywords.add("final");         keywords.add("int");         keywords.add("while");         keywords.add("if");         keywords.add("else");         keywords.add("print");          }      private boolean isIdent(String t) {         if (keywords.contains(t)) {  ***//This is the line I get the Error***             return false;         }         else if (t != null && t.length() > 0 && Character.isLetter(t.charAt(0))) {             return true;         }         else {             return false;         }     }   The other lines that goes along with this error is:   public void compileProgram() {                 System.out.println("compiling " + filename);         while (theToken != null) {             if (equals(theToken, "int") || equals(theToken, "final")) {                 compileDeclaration(true);             } else {                 compileFunction(); //This line is giving an error with the above error             }         }         cs.emit(Machine.HALT);         isCompiled = true;     }    private void compileFunction() {         String fname = theToken;         int entryPoint = cs.getPos();           if (equals(fname, "main")) {             cs.setEntry(entryPoint);         }          if (isIdent(theToken)) theToken = t.token(); ***//This line is giving an error***         else t.error("expecting identifier, got " + theToken);          symTable.allocProc(fname,entryPoint);          accept("(");         compileParamList();         accept(")");         compileCompound(true);         if (equals(fname, "main")) cs.emit(Machine.HALT);         else cs.emit(Machine.RET);     }

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


I'm interested in compiling a list of proofs that look logically correct at a glance, but "prove" something obviously incorrect.  Here are some examples.    $e^{i \pi} = -1$ $e^{2i\pi} = 1$ $2i\pi = \ln 1$ $2i\pi = 0$ $-4\pi^2 = 0$  Let $a = b$.  Then:   $a = b$ $a^2 = ab$ $a^2 - b^2 = ab - b^2$ $(a+b)(a-b) = b(a-b)$ $a + b = b$ $a = 0$  The :      You are on a game show, in which the host fills two indistinguishable envelopes with random amounts of money, such that one envelope contains $x$ dollars and the other contains $10x$ dollars.  You pick an envelope at random, but then you are offered a chance to switch envelopes (intuitively, it shouldn't matter whether or not you choose to switch).  You reason: there is a 50/50 chance that I currently hold the higher-valued or lower-valued envelope in my hands.  If I keep this envelope, my expected return is $x$.  If I switch, then my expected return is $\frac{1}{2}(\frac{1}{10}x) + \frac{1}{2}(10x) = 5.05x$.  Therefore, I should switch.   Any other good ones?

If you know it, also try to include the precise reason why the proof is fallacious. To start this off, let me post the one that most people know already:    Let $a = b$.  Then $a^2 = ab$  $a^2 - b^2 = ab - b^2$  Factor to $(a-b)(a+b) = b(a-b)$  Then divide out $(a-b)$ to get $a+b = b$  Since $a = b$, then $b+b = b$  Therefore $2b = b$  Reduce to $2 = 1$   As @jan-gorzny pointed out, in this case, line 5 is wrong since $a = b$ implies $a-b = 0$, and so you can't divide out $(a-b)$.


I always thought larger sample sizes were better.  Then I read something somewhere about how when sample sizes are larger, it's easier to find significant p-values when they're not really there (i.e., false positives), because significance gets exaggerated.  Is there a name for this phenomenon?  I'm currently working with a large sample size (around 5,000 cases) where I did a t-test and the p-value turned out to be less than 0.001. What test(s) can I use to determine whether this is a valid p-value or whether this happened because the sample size was large.  I'm not a statistics expert, so please pardon any "newb-ness" evident in my post.

In a  of Amstat News, the authors (Mark van der Laan and Sherri Rose) stated that "We know that for large enough sample sizes, every study—including ones in which the null hypothesis of no effect is true — will declare a statistically significant effect.".  Well, I for one didn't know that. Is this true? Does it mean that hypothesis testing is worthless for large data sets?


How can I prove that if $2^x+1$ is prime, then $x$ is a power of $2$? Can someone help me prove this?

A little bird told me that if $2^n+1$ is prime, then $n$ is a power of $2$. I tend not to trust talking birds, so I'm trying to verify that statement independently.  Suppose $n$ is not a power of $2$. Then $n = a \cdot 2^m$ for some $a$ not a power of $2$ and some integer $m$. This gives $2^n+1 = 2^{a \cdot 2^m}+1$. Now I suspect there's a way to factor that, but I don't see how. Can someone give me a hint?


This is not a duplicate, see bolded parts; please vote to re-open I am attempting to execute an external application via C#. I wish to pass stdin into the started application, and capture the result. The equivalent bash command would be: echo Typist 1 . 0 | figlet-2.2.5/figlet -f Slant  In C#, how can I run the above command and store its stdout into a variable?  I have tried using Process.Start("figlet-2.2.5/figlet", "-f Slant"), but this doesn't work because the application:  needs data via stdin requires parameters to be supplied and provides output via stdout

I need to spawn a child process that is a console application, and capture its output.  I wrote up the following code for a method:  string retMessage = String.Empty; ProcessStartInfo startInfo = new ProcessStartInfo(); Process p = new Process();  startInfo.CreateNoWindow = true; startInfo.RedirectStandardOutput = true; startInfo.RedirectStandardInput = true;  startInfo.UseShellExecute = false; startInfo.Arguments = command; startInfo.FileName = exec;  p.StartInfo = startInfo; p.Start();  p.OutputDataReceived += new DataReceivedEventHandler (     delegate(object sender, DataReceivedEventArgs e)     {         using (StreamReader output = p.StandardOutput)         {             retMessage = output.ReadToEnd();         }     } );  p.WaitForExit();  return retMessage;   However, this does not return anything. I don't believe the OutputDataReceived event is being called back, or the WaitForExit() command may be blocking the thread so it will never callback.  Any advice?  EDIT: Looks like I was trying too hard with the callback. Doing:  return p.StandardOutput.ReadToEnd();    Appears to work fine.


I want to archive my photos into tar archives.  The directory containing photos has one dir per year and multiple dirs inside each year dir:  Photos     2005     2006         Some dir with spaces             Pic1.jpg             Pic2.jpg             ...         Other dir here         ...     2007     ...   Target structure should also contain a directory per year, but inside a year dir I would have tar.gz files for each subdir from source dir, like this:  Backup     2005     2006         Some_dir_with_spaces.tar.gz         Other_dir_here.tar.gz         ...     2007     ...   Script which I'm creating to do this looks as follows:  cd ~/Photos for y in * do     YEAR_DIR=~/Backup/$y     mkdir -p $YEAR_DIR      pushd $y      for d in *     do         f=`echo $d | tr ' ' '_' | tr -d ',.!'`  # Clean the name         t=$YEAR_DIR/$f.tar.gz         d=$(printf '%q' "$d")         # echo tar czf $t "$d"  # This outputs the command as expected         tar czf $t "$d"  # but executing it results in error: Cannot stat: No such file or directory     done      popd done   As hinted in the comment, echoing the prepared command looks fine, and also if I copy that statement and execute it from terminal it works, but executing it within the script (tar czf $t "$d") results in an error:   tar: Some\ dir\ with\ spaces: Cannot stat: No such file or directory   What am I doing wrong?  P.S. I'm doing this on a Mac.

Or, an introductory guide to robust filename handling and other string passing in shell scripts.  I wrote a shell script which works well most of the time. But it chokes on some inputs (e.g. on some file names).  I encountered a problem such as the following:   I have a file name containing a space hello world, and it was treated as two separate files hello and world. I have an input line with two consecutive spaces and they shrank to one in the input. Leading and trailing whitespace disappears from input lines. Sometimes, when the input contains one of the characters \[*?, they are replaced by some text which is is actually the name of files. There is an apostrophe ' (or a double quote ") in the input and things got weird after that point. There is a backslash in the input (or: I am using Cygwin and some of my file names have Windows-style \ separators).   What is going on and how do I fix it?


I need to determine if a value exists in an array.  I am using the following function:  Array.prototype.contains = function(obj) {     var i = this.length;     while (i--) {         if (this[i] == obj) {             return true;         }     }     return false; }   The above function always returns false.  The array values and the function call is as below:  arrValues = ["Sam","Great", "Sample", "High"] alert(arrValues.contains("Sam"));

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


I am trying to post a question, but the title of the question is apparently not of an acceptable quality, resulting in an error.  What are the criteria for an acceptable question title?

A good title helps your question get the attention it deserves.  What goes into a good title?


This proof seems to follow very quickly from the definition of infinite sets, but I feel like what I have is incomplete:  Since $S$ is infinite, we have that $S\sim \mathbb{N}$. By definition, $S$ is equinumerous to a proper subset of itself. Let $A\subset S$ be such a set. Hence, $A\sim S$. Thus, $A\sim S\sim \mathbb{N}$, so $A\sim \mathbb{N}$. Thus, there is some $A\subset S$ such that $A\sim \mathbb{N}$.  It's one of those "that seems way to easy" situations. Is this proof "too good to be true?" :)

I have some trouble understanding this proof of every infinite set $S$ contains a denumerable subset contained in Charles Pugh's Real Analysis text.      Proof:       Since $S$ is infinite, it is nonempty and contains $s_1$. Then   $S \backslash \{s_1\}$ is nonempty and there exists a $s_2 \in S  \backslash \{s_1\}$      Since $S$ is infinite, $S \backslash \{s_1, s_2\}$ is nonempty and   there exists a $s_3 \in S \backslash \{s_1,s_2\}$      Continuing this way gives a list $(s_n)$ of distinct elements of $S$.   The set of these elements forms a denumerable subset of $S$   Three questions:   Continuing this way...wouldn't we end up with an infinite list $(s_n) = \{s_1, s_2, s_3, \ldots\}$ which is back to our set $S$? Why don't we just stop at $\{s_1\}$? $\{s_1\}$ is in $S$, it is a singleton, it is countable, the end.  We already know that infinite sets are denumerable, meaning we can consturct a bijection $f(k) = s_k,  \forall k \in \mathbb{N}$. Why is it even needed to show that $S$ contains a denumerable subset when itself is a denumerable subset of itself?


Javascript Code  var d = function c() { console.log(c); }; d(); // function c() { console.log(c); };  c(); // Reference Error   I understand the concept of variable hoisting where variable declarations and function definitions are hoisted to top of the existing scope. Also function definition in function expressions are not hoisted.   So, above will be  var d; d = function c() { console.log(c); }; d(); c();   Hence d is a reference to a named function c   on executing d() the function c is executed in global scope, where there is no variable or property named c. But still console manages to log function definition of c.  When I tried c() I got a reference error. [As I Expected]   Case 2 proves that there is no window property named c available So, How did d() manage to print the c's definition on execution?   Does every function have its own definition in its local scope as a property?

I've recently started maintaining someone else's JavaScript code. I'm fixing bugs, adding features and also trying to tidy up the code and make it more consistent.  The previous developer used two ways of declaring functions and I can't work out if there is a reason behind it or not.  The two ways are:  var functionOne = function() {     // Some code };     function functionTwo() {     // Some code }   What are the reasons for using these two different methods and what are the pros and cons of each? Is there anything that can be done with one method that can't be done with the other?


I couldn't solve this problem. Can anyone help me out? For example: User input is: I eat rice the output should be: ecir tae I

I have a block of text that I want to put in reverse-characer order (backmasking). Is there a simple way to do that via a Unix / Cygwin command-line?


So I needed to get random numbers between 25 and 75 and I tried two things:  System.out.println(random.nextInt(75)+25); System.out.println((int)(Math.random()*75) + 25);   From what I understood, the "75" I wrote in both lines should be the greatest number I get and the "25" should be the smallest number. However, I got numbers like:  84,94,82,79,98 // these are only the numbers that went out of range   I guess I misunderstood the rules of nextInt and Math.random. How can I get the numbers I want(between 25 and 75)?

How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.


I was searching pointers in C and on a given website I found the following usage:  int main() {     int i;     int array[5] = {10, 20, 30, 40, 50};      for(i = 0; i < 5; i++) {         printf("%d\n", i[array]); /* Instead of "array[i]"" */     }      return 0; }   How does it happen and why does printf function understand this?

As Joel points out in , in  (aka: K & R), there is mention of this property of arrays in C: a[5] == 5[a]  Joel says that it's because of pointer arithmetic but I still don't understand. Why does a[5] == 5[a]?


We know that if we take Fourier transform of momentum we go to position space. But why Fourier transform only.

Does anyone have a (semi-)intuitive explanation of why momentum is the Fourier transform variable of position?  (By semi-intuitive I mean, I already have intuition on Fourier transform between time/frequency domains in general, but I don't see why momentum would be the Fourier transform variable of position. E.g. I'd expect it to be a derivative instead.)


I am asking the same question as in  since I have the same problem but the solution does not work for me. I am using language tool to verify the grammar, but it is almost impossible to see the underlined grammar mistake(it is gray). On the other hand, it overwrites the spelling of texstudio; hence, it is impossible to find spelling mistakes as well. Here are my questions:   How to fix the color problem? (texstudio preferences -> syntax highlighting does not work for me.) Is it possible to force texstudio to use its own dictionary?   I am running Texstudio 12.6 on windows 10.

I've recently installed LanguageTool to check grammar and spelling mistakes in TeXstudio. However, I often miss the errors because the gray-bluish underlining makes them hard to spot. Is there a way to change the underlining to a distinctive color, such as red for example?   I checked . It says I have to do some changes to the .languagetool.cfg file, but for some reason this file doesn't appear in File Explorer.


I have a question on getting the most common names in the /etc/passwd file on Unix.  Is this the correct command?:  cut -d: -f5 /etc/passwd | uniq -c | sort -i | sort -n

My /etc/passwd has a list of users in a format that looks like this:   username:password:uid:gid:firstname.lastname, somenumber:/...   Goal : I want to see only the first names and than sort them having the most common name appear first, 2nd most common appear 2nd etc....  I saw some  as to how to do the 2nd part, although they are relevant to working with a text file and not to reading from a map.  In regards to the first part, I really don't know how to approach this. I know that there are some solutions but don't really know how to do them.


Let $S$ be a nonempty set of natural numbers. Is the following formula $$ \exists p\ \bigl(\text{$p$ is prime } \rightarrow \forall x  \text{ ($x$ is prime)}\bigr)  $$ true or false on $S$? I know the answer to this question, but what would be the shortest way to arrive to the conclusion using some deduction system?

Why is this true?  $(\exists x)(P(x) \Rightarrow (\forall y) P(y))$


Can not install brackets from .deb file.  Please help someone.     Its solved.

I've downloaded Springseed 2 deb file and when I open it by Ubuntu Software Center, it shows this error:     Dependency is not satisfiable: libgcrypt11   I've looked for this package in my Synaptic Package Manager, there is a libgcrypt20 but nothing for libgcrypt11.  How should resolve this problem?


I am wondering why after Smeagol first saw the ring, without even touching it, he was immediately prepared to kill his friend to get it. Bilbo had the ring for many years and yet he was willing to give it up after some minor persuasion from Gandalf. I just thought there might be an explanation written somewhere that I haven't seen.  edit:     This question is not a duplicate. This question is predicated on 'first contact' with the ring, not the effects after 'longstanding possession' of it that the other question is asking. We can see that Aragorn and Faramir, both mortals, resisted the 'call' of the Ring and wouldn't take it, much less by force even when they easily could have. Yet others are so enthralled without ever touching it that they would kill their own mother to possess it.

Why did Sméagol turn into a 'creature', but not Bilbo Baggins?  Déagol found the ring in a river, Sméagol stole it and then turned into a weird creature. Bilbo did not turn into a creature when he found the ring.


I have a script to setup a machine that need to change to another user. Unfortunately, I get a "permission denied" after the su command.   #!/bin/bash # script executed from /home/foo/ touch hi_foo cd /home/bar sudo bar touch hi_bar <-- permission denied   Any idea of a workaround? My script works well if I copy and paste it in the command line.   I am running Ubuntu 14.04

I'm running a remote bash script (using ssh -t 'bash doscript.sh'). In "doscript.sh" I have a sudo su anotheruser. At that point, the script seems to push a shell and I'm left in that "interactive" script and the rest of my script (doscript.sh) doesn't run unless I type "exit". Is there a workaround that gets around this problem?  Thanks in advance.  Here is the contents of my test script "doscript.sh":  sudo su diy cd pwd whoami exit whoami


I know absolutely nothing about remote access to a desktop. I've just set up a machine with Ubuntu installed which I wish to run calculations on remotely.  I've installed openssh-server and opened port 22. I can now successfully access the desktop remotely using the command  ssh username@IPADDRESS   But I have a couple of questions:  1) Since this machine is connected to a network, I'm worried the IP address may change - how do I make it static?  2) (And more importantly). It would be a lot easier if it wasn't an IP address used to ssh to the machine. How do I change it from an IP address to something like:  ssh username@MACHINENAME.university.address   Some machines here already have this set up but I'm not quite sure how to do it.  Thank you

I've created accounts and hostnames within my  account, which is by  far the most commonly used service for my type of server. Can somebody walk me through the configuration process of using ddclient with no-ip, as I'm a command line noob?


I am doing a paper on native Americans totem animals and how the native Americans give animal characteristics to the human and was wondering what is the scientific word for this?

I am writing a paper about Art Spiegelman's Maus, specifically the metaphor that Spiegelman creates by depicting his obviously quite human characters with the heads of various animals, or a couple times animal masks. The metaphor is used at times to bestialize/animalize the acts of the Nazis and, in some cases, to show the arbitrary nature of the classes/groups/divisions they and others applied to human beings.  I considered "chremamorphism," but this describes the attribution of the characteristics of an object to, or the objectification of, a human. I also considered "animalize" and "bestialize," but those describe some of the effects that can be produced by Spiegelman's metaphor, not the metaphor itself - in many scenes in the book, the characters are extremely human, and I think that the negative or degrading connotations of these words makes them inappropriate for this use. Nor do "anthropomorphism" or "personification" fit, because Spiegelman is not applying human characteristics to animals but the other way around. None of the words that I can think of quite fit.  What is a word that accurately describes Art Spiegelman's depiction of obviously human characters as having animal body parts or wearing animal masks in the comic book Maus?


I filed a 1040 a few weeks ago and, per that form, was due a refund. I put in the routing information for my bank information to receive the refund deposit, but I haven't received it yet.  I just received a K-1 and am filing an amendment to my return, a 1040X. Now, per the 1040X, I owe the government money. Do I write them a check for the amount I owe plus the original refund? Or just the amount I owe?  To use fake concrete numbers, let's say my original refund was $1000 and now, per the amendment, I owe $1500. Do I write a check for $2500 or $1500? I have not yet received the refund, but it could be sent before my amended return is processed. Since it's an electronic refund I can't just not cash the check.

I need to amend my return, but I have already received a check from IRS (they approved my return that I need to amend). Should I cash out this check and then amend my return, or should I dispose this check and wait for a check from an amended return?


on topic of duplicate claims - I tested  - "solution" it resulted in LaTeX displaying "?" rather than "⌀".  Thanks to people who provided high quality and very useful answers.    I added ⌀ to text and now pdflatex is crashing with     Package inputenc Error: Unicode char \u8:⌀ not set up for use with LaTeX.   I know that I can use \DeclareUnicodeCharacter or similar to introduce special handling of this character but doing it every time that new UTF-8 character appears in the input is not acceptable.  It needs to work in pdflatex (or other pdf-generating latex compiler) as I use latex solely as pdf generator (LaTeX is generated from input, pdflatex generates pdf output).  MWE:  \begin{document} ⌀ \end{document}   MWE with my document declarations present  \documentclass{article} \usepackage[a4paper, total={6.5in, 10.5in}]{geometry} \usepackage[T1]{fontenc} \usepackage[utf8]{inputenc} \usepackage{cprotect} \usepackage{fvextra} \usepackage{textcomp}  % make TOC work correctly \makeatletter \def\l@section{\@dottedtocline{1}{1em}{2em}} \makeatother \usepackage{index} \makeindex  \DeclareUnicodeCharacter{00A0}{~}  \DefineVerbatimEnvironment{escape}   {Verbatim}   {fontfamily=\rmdefault,breaklines,breaksymbolleft={}} \CustomVerbatimCommand\escapeinline{Verb}{fontfamily=\rmdefault,breaklines,breaksymbolleft={}}  \begin{document} ⌀ \end{document}

I have a web interface that generates LaTeX-letters to customers. These letters are rendered dynamically. Some customers have some special characters in their names, that LaTeX can't translate, so I run into unicode errors all the time. The *.tex-Template includes \usepackage[utf8]{inputenc}, but I keep having problems with unicode characters. Here are two error messages from today: Unicode char \\u8:\xc2\xb0 not set up for use with LaTeX. Unicode char \\u8:\xe5\x8d\x97 not set up for use with LaTeX. For now, I use a Python dictionary to convert some already as problematic identified chars into correct LaTeX code. But it's never ending. Is there a way to tell LaTeX to ignore ALL unicode-related compiling errors, e.g. by telling LaTeX to convert all problematic chars into one ?-char?


I am trying to synthesize a verilog file with some part of code like this(obviously i hadn't declared module and other input and output variables)  input [15:0] me;  reg [15:0] p_array [7:0]; reg abc_pqr [2:0];  abc_pqr[0] <= me[0]; abc_pqr[1] <= me[1]; abc_pqr[2] <= me[1]; p_array[abc_pqr[0]] <= me[0]; p_array[abc_pqr[1]] <= me[1]; p_array[abc_pqr[2]] <= me[2];   where i had used reg as index of array element, so is it not valid, though this module inside my verilog file didn't synthesized as it contain a memory element but just want to confirm that is it valid to use reg as array index? I dint find anything on net in this regards,but taking reg as index will make array act as buffer and i think it must be a valid code.

How can we read and write values in a multidimensional array in verilog, i had read in  regarding different operations that can be done on multidimensional array. like if there is a part of code like this  input [15:0] me;  reg [15:0] p_array [7:0]; reg abc_pqr [2:0];  abc_pqr[0] <= me[0]; abc_pqr[1] <= me[1]; abc_pqr[2] <= me[1]; p_array[abc_pqr[0]] <= me[0]; p_array[abc_pqr[1]] <= me[1]; p_array[abc_pqr[2]] <= me[2];   so is this code will work and will not produce any error?  What is the difference between these two while assigning value  "<=" and "=", i had seen "<=" in most of the places during passing values.


Do any need a special package to include .bmp figures in a document? Because it gaves me an error if I try to include them in the document.  I tried saving the figures as .jpg, but the quality is really low. Am I forced to use the .eps format to be able to include high quality figures?

I can't include bitmaps with pdflatex. Here is my mwe:  \documentclass[12pt,a4paper]{article} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[turkish]{babel} \addto\extrasturkish{\uccode`i=\string"9D \lccode`I=\string"19 } \addto\noextrasturkish{\uccode`i=`I \lccode`I=`i }   \usepackage{graphicx}  \begin{document}  \shorthandoff{=}  \includegraphics[width=5cm,height=5cm]{000.bmp} \end{document}   Gives the error Unknown graphics extension: .bmp.


This is a followup on my original post  which may be deleted in the future.  In the process of backing up my audio books, I "permanently" removed a folder (with subfolders) that I had already exclusively moved to that drive. It's path is /media/gratis/Seagate Expansion Drive/Audiobooks/Jason Dark. The sole folder in that should be called John Sinclair; but I'm not sure about that.  Which tool offers the best chances to recover those files? I haven't written plenty on that drive afterwards; so I hope for the best. It's not that other methods failed; I just cant get my head around what to do and I want to be cautious. It's a NTFS Drive.  According to testdisk it has an "EFI GPT" Partition table.  Disk /dev/sdb - 5000 GB / 4657 GiB - CHS 608001 255 63, sector size=512 - Seagate Expansion Desk, FW:9401   Information According to "Disks" (Ubuntu Standard Software):  NTFS; GUID Partition Table; [...] Partition Type: Microsoft Reserved   Attempt 1: First off, ntfsprogs seems to no longer be in repos (those mentioned by another user); but it is already installed on my machine so no problems there. I always get the error:     Access is denied because the NTFS volume is already exclusively opened. The volume may be already mounted, or another software may use it which could be identified for example by the help of the 'fuser' command. You can use force option to avoid this check, but this is not recommended and may lead to data corruption.   Although I only just plugged it in and even quit Nautilus by force (nautilus -q).   Therefore, I ran sudo ntfsundelete /dev/sdb2 -f. That gave me a list of a bunch of files, 205013 to be exact. Now, what I want is the content of the directory .../Audiobooks/Jason\ Dark/ to be restored. What do I have to do? It's contents are .m4b & .opus files and folders, of course.

About two weeks ago I had a problem with my PC that my brother wrote a question about at .  I still haven't solved the problem, so my PC is unusable now.  Now I think that it would be simpler to re-install both Win7 & Ubuntu than repair them, but there're some data on their partitions. I want to recover this data.  These partitions are not mountable for some reason. I don't know why.  sudo fdisk -l about the problematic partitions:     Device    Boot      Start         End      Blocks   Id  System /dev/sda1            2048     147912703    73955328   83 Linux /dev/sdb2            206848   174079999    86936576    7  HPFS/NTFS/exFAT   And in GParted:      And the error of the mount command:  Failed to mount '/dev/sdb2': Invalid argument The device '/dev/sdb2' doesn't seem to have a valid NTFS. Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?   And the exact same message for /dev/sda1  How can I recover my data from those HDDs?  EDIT     I have tried to specify the type of the drive:  $ sudo mount -t ext4 /dev/sda1 /olddisk mount: wrong fs type, bad option, bad superblock on /dev/sda1,        missing codepage or helper program, or other error        In some cases useful info is found in syslog - try        dmesg | tail  or so $ sudo mount -t ntfs /dev/sdb2 /olddisk NTFS signature is missing. Failed to mount '/dev/sdb2': Invalid argument The device '/dev/sdb2' doesn't seem to have a valid NTFS. Maybe the wrong device is used? Or the whole disk instead of a partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?   EDIT     sudo ntfsfix /dev/sdb2 returns:  Mounting volume... NTFS signature is missing. FAILED Attempting to correct errors... NTFS signature is missing. FAILED Failed to startup volume: Invalid argument NTFS signature is missing. Trying the alternate boot sector Unrecoverable error Volume is corrupt. You should run chkdsk.


My right arrow key doesn't work anymore. Maybe it's a hardware failure but is there an easy workaround maybe a software key remapping? I have tried to open my pc to no avail.

I broke my laptop and had to buy a new one with a new keyboard that I am struggling to get familiar with, especially with the keys like home, page-up, page-down and end, which aren't standardized at all.  I found myself doing this for like the 5th time in the last several years, and I think it is really annoying.   Is there an app that can reliably map one key to another?  By reliably I mean that key mapping works with Shift, Alt, and other modifiers.  UPDATE  Windows 7, Samsung Chronos 7


I've downloaded the source code and data published in a paper. I've followed their methods, in particularly, copied and pasted their sample code. Unfortunately, I've failed to reproduce the figures in the paper with their software. For example, the variance accounted by the first principal component reported in the paper is about 10% more than I can see on my computer.  My generated figure:    Their reported figure in     The difference is small but the medians are different in the paper to my generation. The figure in the paper looks better and more aligned to the medians (a good thing). I did a PCA plot (they also did that for the paper), the eigenvalues are different to reported.  I followed their methods in   I simply copied and pasted their code and used their R-package.  Can I consider this as an example of data-manipulation (to make the figures look better) and therefore academic misconduct?   EDIT:  The method is non-stochastic, it involves computing singular value decomposition for factor analysis. There is nothing stochastic, no random number is generated. Identical data-set (downloaded from their R-package).

I am trying to reproduce published results in a paper. Those results come from numerical simulations. The original authors and I do not use the same software, and theirs is proprietary (I don't have access to it). I have tried to reproduce their results, and it works qualitatively but not quantitatively: the differences between their results and mine on typical quantities of interest are between 2 and 5 times the expected accuracy of the method.  So far, I have communicated with the original authors, trying to clear out all possible sources of error I could think of (checked that I got the tricky parts of the algorithms right, checked that the “usual” parameters that were missing from their paper had the “usual” values, everything I could think of). They are forthcoming enough, and reply to my questions quickly, but it's clear they don't want to invest time in doing any serious follow-up on their side. And without access to their software, it appears I'm stuck.  Now, my question is on how to proceed. The “ideal case” for unreproducible results is to make a detailed analysis of how and why they cannot be reproduced, and possibly find out a source of failure (or at least plausible issues). This advances the field, and is probably publishable (not in a very high-profile journal). Here, this is not possible.  I have, however, nice results that I have obtained (extending their work far beyond what was already published), and if I didn't have these differences with their paper, it would make a very attractive paper. What can I do with those? Is it possible to publish them, merely noting the different with their paper without more comment? Or are my results simply unpublishable? I welcome any comment, especially from people who have found themselves in such an uncomfortable situation!


I get the following error on a website when I try to load content in an iframe from another server in the intranet with a self signed certificate:     Content was blocked because it was not signed by a valid security   certificate.   I have tried this already:   But it looks it doesn't work for explorer 11.

We use self signed certificates on our intranet. What do I need to do to get Internet Explorer 8 to accept them without showing an error message to the user? What we did for Internet Explorer 7 apparently isn't working.  EDIT: Internet Explorer 7 wouldn't show any errors if I put the certificate into trusted root certification authorities. Internet Explorer 8 seems to show errors even with the certificate there.


I have some value in variable v, how to check it's type?  Hint: it is NOT v.dtype.  When I do type(v) in debugger, I get   type(v) = {type} <type 'h5py.h5r.Reference'>   or  type(v) = {type} <class 'h5py._hl.dataset.Dataset'>   How to check these value at runtime?  "Check" means calculate boolean result, saying if the type is given.  UPDATE  In so called "duplicate" question, it is said, that to compare type one should use  type(v) is str   which implicitly assume that types are strings. Are they?

What is the best way to check whether a given object is of a given type? How about checking whether the object inherits from a given type?  Let's say I have an object o. How do I check whether it's a str?


Note: This is not a duplicate of , since I am asking specifically about receiving notifications, nor is it a duplicate of , since I am asking about a separate facility to tag individual questions.    I'm asking this from the context of Puzzling.SE, although I'm sure it could be relevant for all SE sites.  Often, on Puzzling, a difficult puzzle will be posted.  I will look at it, and think, "That's really interesting; I'm curious to know what the solution is."  Sometimes I will favourite/bookmark it, and continue to go back to it to see if anyone has posted an answer/comment.  What would be much more helpful to me, is if I could click something that would add that question to my SE notifications, so I get notified when someone posts an answer or comments, in the same way I get notified for my own questions.  Since people use the "favourite" functionality for different things (as a temporary bookmark, or as a way to keep a list of best questions, or as a way to give kudos for an excellent question), it doesn't seem like it should be used for this.  Rather there should be a separate "flag" of some sort that can be applied.  Once I lose interest, I could uncheck it, and I would no longer get the notifications for that question.  On Puzzling there are also often puzzles that are worked on in a "group" format:  There are many bits to the puzzle, and different people offer solutions for each bit.  Thus it would also be beneficial to receive notifications of edits on answers I have tagged/flagged/marked.  I realize this aspect might be more difficult, since it doesn't mimic the notifications supplied for my own questions, but even if the notifications of answers/comments could be implemented, it would be very helpful.

We are happy to announce that the  follow question and answer feature is now live across the Network, including Stack Overflow, all Stack Exchange sites, and all Meta sites. (International Stack Overflow sites will have it turned on in a day or two once we have translations all set.) You can follow any question or answer (that you did not author) by clicking on the [follow] button that is shown in the menu immediately below the post (alongside the [share] button):    After you have followed a post, you will get inbox notifications for all new answers (in the case where you followed a question), comments, edits, and notices. You will not receive notifications for any action that you performed. As was mentioned in the earlier post, we are not making changes at this point to the notifications received by a post owner, or due to @mentions. The initial release had been planned to only include question following. Thanks to many folks who chipped in over the past few weeks, we are happy to release both question and answer following at the same time. These are available in both the regular and mobile views. We are still planning on two more related releases:  Follows profile tab and question listing filter: A tab for follows will be added to your user profile activity page. Each user will be able to view this tab that will provide a listing of followed questions and answers, with standard sorts, and the ability to unfollow from the listing. Users (with the exception of moderators and authorized staff) will not be able to see this information about other users (nor will it be made public in the API, SEDE, or data dumps). We will be renaming the Favorites feature to Bookmarks. As we mentioned in the preview post, the feature will be the same as Favorites, with the name and icon updated to more accurately represent user expectations and usage. And you will be able to both "bookmark" and "follow" a question.  We hope that this new feature will allow you to have better access to the content that you care about and want to keep tabs on. Update (June 11, 2020): The user profile tab and the rename of Favorites to Bookmarks have been released.


I am trying to enter the below statement into HashMap  Input Line: Rainy#No:2 Sunny#No:3 Rainy#Yes:3 Sunny#Yes:2 Overcast#Yes:4 Expected Output:{Rainy={No=2,Yes=3},Rainy={No=3,Yes=2},Overcast={Yes=4}}   What I did so far is   import java.util.HashMap; import java.util.Map; import java.util.StringTokenizer; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentMap;   public class StackHash{  /** *@paramargs */  staticConcurrentMap<String,HashMap<String,Integer>>map=newConcurrentHashMap<>(); public static final String TAB="\t"; public static final String SPACE=" "; public static final String HASH="#"; public static final String COLON=":"; public static void main(String[]args){ //TODOAuto-generatedmethodstub  Stringline="Rainy#No:2 Sunny#No:3 Rainy#Yes:3 Sunny#Yes:2 Overcast#Yes:4"; StringTokenizerst=newStringTokenizer(line,SPACE); HashMap<String,Integer>attibuteCollect=newHashMap<String,Integer>(); while(st.hasMoreTokens()){  Stringtoken1=st.nextToken();  String[]parts=token1.split(HASH);  String[]parts1=parts[1].split(COLON);  attibuteCollect.put(parts1[0],Integer.parseInt(parts1[1]));  if(map.isEmpty()){    map.put(parts[0],attibuteCollect);  }  else{    for(Map.Entry<String,HashMap<String,Integer>>entry:map.entrySet()){      StringkeyMap=entry.getKey();      if(keyMap.equals(parts[0])){        map.put(keyMap,attibuteCollect);      }      else{        map.put(parts[0],attibuteCollect);      }  } } } System.out.println("finalmap"+map); } }   Output  map {Rainy={Yes=4, No=3}, Sunny={Yes=4, No=3}, Overcast={Yes=4, No=3}}   Am I doing anything wrong.  Please Suggest.

I am using a Collection (a HashMap used indirectly by the JPA, it so happens), but apparently randomly the code throws a ConcurrentModificationException. What is causing it and how do I fix this problem? By using some synchronization, perhaps?  Here is the full stack-trace:  Exception in thread "pool-1-thread-1" java.util.ConcurrentModificationException         at java.util.HashMap$HashIterator.nextEntry(Unknown Source)         at java.util.HashMap$ValueIterator.next(Unknown Source)         at org.hibernate.collection.AbstractPersistentCollection$IteratorProxy.next(AbstractPersistentCollection.java:555)         at org.hibernate.engine.Cascade.cascadeCollectionElements(Cascade.java:296)         at org.hibernate.engine.Cascade.cascadeCollection(Cascade.java:242)         at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:219)         at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:169)         at org.hibernate.engine.Cascade.cascade(Cascade.java:130)


I'm new to D&D and I have never played as a casting character doses anyone know how the spell attack bonus works.

I'm not entirely sure I understand what the PHB is telling me about spell attacks.  Say I'm a wizard who's casting Fire Bolt (I could also be a Cleric casting Inflict Wounds or what-have-you), the spell itself doesn't say anything about making an attack roll or the enemy making a saving throw.    So do I make an attack roll and then add in my INT mod + proficiency bonus?  Or does the target have to make a saving throw against a DC of 8+ my INT mod + proficiency bonus?  And, assuming I hit, do I add my INT mod + proficiency bonus to the damage?


My thesis guideline states that bibliographies should continue to next page with heading "Kaynaklar Dizini devam ediyor" (meaning "Bibliography Continued").  I'm using memoir and biblatex. How can I manage this?  My MWE is below  \documentclass[12pt, a4paper, oneside]{memoir}           \usepackage{polyglossia}             \setmainlanguage{turkish}  \usepackage{fontspec} \setmainfont[Language=Turkish]{Times New Roman}  \usepackage[citestyle=authoryear,bibstyle=authoryear]{biblatex} \bibliography{Zotero.bib}  \renewcommand*{\finalnamedelim}{\addspace ve\space} \DefineBibliographyStrings{english}{andothers={\space vd \space}} %---------------CHAPTER STYLE------------- \makechapterstyle{bolum}{% \renewcommand{\afterchaptertitle}{\par\nobreak\vskip \baselineskip}  \renewcommand{\chaptitlefont}{\centering\normalfont\Large\bfseries}  \renewcommand{\chapnumfont}{\centering\normalfont\Large\bfseries}    \renewcommand{\printchaptertitle}{\chaptitlefont\MakeUppercase}  \renewcommand*{\printchaptername}{}          \renewcommand*{\chapternamenum}{}            \renewcommand*{\chapnumfont}{\chaptitlefont} \renewcommand*{\printchapternum}{\chapnumfont \thechapter . \space}  \renewcommand*{\afterchapternum}{} \afterchaptertitle } %--------------------  %---Page Numbering---- \copypagestyle{chapter}{plain} \makeoddhead{chapter}% Tek sayılı sayfaların üstbilgisi  {}% Tek sayfa üstbilgi Sol   {}% Tek sayfa üstbilgi orta  {\thepage}% Tek sayfa üstbilgi sağ \makeevenhead{chapter}% Çift sayılı sayfaların üstbilgisi  {}% Tek sayfa üstbilgi sol  {}% Tek sayfa üstbilgi orta  {\thepage}% Tek sayfa üstbilgi sağ   \makeoddfoot{chapter}% Tek sayılı sayfaların altbilgisi  {}% Tek sayfa altbilgi sol  {}% Tek sayfa altbilgi orta  {}% Tek sayfa altbilgi sağ \makeoddfoot{chapter}% Çift sayılı sayfaların altbilgisi  {}% Tek sayfa altbilgi sol  {}% Tek sayfa altbilgi orta  {}% Tek sayfa altbilgi sağ  %----------------------------  \chapterstyle{bolum} \pagestyle{chapter}  \begin{document} \chapter{Deneme} fnrejgnrğthnsv.njgıtnhğwrytnh.ngıtjhgosejg. \cite{spencer_brief_2008},       \cite{guo_microstructure_2014}, \cite{zhang_differential_2008},  \cite{kesim_augmented_2012}, \cite{popov_numerical_2010}, \cite{kim_interactive_2012}, \cite{keehan_influence_2006}, \cite{manova_evolution_2004}, \cite{carruthers_material_????},\cite{shevtsov_optimal_2005},\cite{m.j._neale_d19_1996} \printbibliography[heading=bibnumbered, title={KAYNAKLAR\space DİZİNİ}] \end{document}   What I want to achieve is Bibliography as seen below  Second page

I'm trying to format my thesis to university requirements. My university requires; Second and Third Page of bibliography's title must be "KAYNAKLAR DİZİNİ (devam)" I can't add title to bibliography's second or third page.  \printbibliography[ title={KAYNAKLAR\space DİZİNİ}] %numaralı olsun istersen  optionlarda heading=bibnumbered, yaz \defbibheading{bibliography}[\refname]{%   \section*{#1}%   \markboth{\MakeUppercase{#1}}{\MakeUppercase{#1}}}  \end{document}


Why this works:  [ -r /tmp ] && echo "tt" >/tmp/taa cat taa tt   But the following doesn't and how to fix that, preserving variable for reusability?  COMD='[ -r /tmp ] && echo "tt"' $COMD >/tmp/taa bash: [: missing `]   Thanks  Edit: eval indeed works. However, I don't get why, and in , there is no explanation either. Moreover, if the part starting with && is removed it works and even actually returns right results without eval:  COMD='[ -r /tmp ]' $COMD echo $? 0  COMD='[ -r /tmpdddd ]' $COMD echo $? 1

$ ls -l /tmp/test/my\ dir/ total 0   I was wondering why the following ways to run the above command fail or succeed?  $ abc='ls -l "/tmp/test/my dir"'  $ $abc ls: cannot access '"/tmp/test/my': No such file or directory ls: cannot access 'dir"': No such file or directory  $ "$abc" bash: ls -l "/tmp/test/my dir": No such file or directory  $ bash -c $abc 'my dir'  $ bash -c "$abc" total 0  $ eval $abc total 0  $ eval "$abc" total 0


I have always noticed the default login avatar for Stack Overflow is set to some random graphics image. How is this avatar created?

Is there a name for the default avatars that are generated for users who do not assign one themselves? Not the avatar of the blank user, but the one made up of shards, shapes, and colours:      Is there an online generator for something like that? See also:


Starting to review grammar. It's a little confusing for me to identify which is the correct one.     Not only my husband but also my son is a doctor.    Someone said that it must be doctors because there are two subjects in the sentence. But someone else believes it must be a doctor because it follows is.

At first glance, sentence 1 below seems more correct because there are two subjects. However, something seems more natural about sentence 2. Maybe there is something abbreviated, elliptical, or adverbial in sentence 2. In sentences of this structure, should the verb be singular or plural?   Not only a book, but also a pencil are on the table  Not only a book, but also a pencil is on the table.


For a 16 bit ADC with a -10V to +10V analog input range I have read the following:  The resolution \$ \text{delta} = \dfrac{20V}{2^{16}} \$  16 bit 0000000000000000 corresponds to decimal 0 and this means the voltage read by the ADC is between -10V to -9 999.695V.  Similarly 16 bit 1111111111111111 corresponds to decimal 65535 and this means the voltage read by the ADC is between +9 999.695V to +10 000.  But I have couple of questions here where I get confused:  1-) If the ADC samples a voltage of +9 999V, will it register as 65535 or 65534?  2-) How about 32767 and 32768? Do they both represent OV? It seems to me 32767 is registered if the voltage is between -20/2^16V and 0V; and 32768 is registered if the voltage is between +20/2^16V and 0V. Is that correct. If so it means for 0V there are two steps unlike other voltage readings.  3-) Is the resolution \$ \dfrac{20V}{2^{16}} \$  or \$ \dfrac{20V}{2^{16}-1} \$?  EDIT:  I plotted in Python quantization of a sinusoid for a 3 bit ADC.  Which plot below represents better a 3-bit ADC converter quantizing a 10V 1Hz sinusoid input in this case sampled at 512Hz rate:  3 is the number of bits.  Below call it Plot 1, the number of levels are odd i.e (2^3)-1:     And below call it Plot 2, the number of levels are even i.e 2^3:    Which one above represents an ADC quantization better?  EDIT 2:  In response to Dirceu Rodrigues Jr and the transfer function he provided in his answer, I tried to plot it in Python (3 bit ADC for -10 to +10V input versus binary code in decimal):  import numpy as np import matplotlib.pyplot as plt  #ANALOG SIGNAL: va = np.linspace(-10, 10, 10000 ) #Analog input from -10V to +10V fs_p = 10.0 fs_n = -10.0   #DIGITAL OUTPUT CODE:  n=3 #ADC resolution  vd = ((va - fs_n) / (fs_p - fs_n)) * (2**n) #Transfer function vd = (vd).astype(int) #output code  plt.plot(va, vd,'.b') plt.plot(va, vd,'-g') plt.xlabel('Va (Analog input)') plt.ylabel('Vd (Output code)') plt.show() plt.grid()   Here is the output:

While working on my project, I got to a point where I don't know the answer. I have a 10-bit ADC (the one incorporated in the ATMEGA328P) and it returns values up to 1023 (210 - 1).   The official documentation states that the equation to convert the values from the ADC to the corresponding voltage is:   $$ V = \frac{V_{in} \cdot ADC}{2^{10}} $$  But, if the values go up to 1023, then wouldn't it be better to replace the 210 by 210 - 1?  Thanks.


I'm trying to have a sorted map Map<Integer,Set<Integer>> which keeps elements sorted based on the size() of the value set.  In practice this is a map of a node to the other nodes connected to that node. I want to quickly (O(logn)) access the node with the most edges without having to sort every time.  For example the order should be:  3 => {1,2,4,5} 12 => {1,2,3} 14 => {3,2,3} 65 => {3,8} 6 => {2} 2 => {5}   Since TreeMap won't do it since I can't sort based on values, I probably need to roll something custom.  EDIT: The size of the Set may indeed change which may over-complicate things even more  What would be the simplest way to achieve this?

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


I am declaring the amount as a float. When I multiply the value by 100 and plug it into an "int" variable the value changes to 419... why is this happening?  #include <stdio.h> #include <cs50.h> #include <math.h>  float amount; int cents, coins, quarters, dimes, nickels, pennies, Q, D, N, P; int main(void){  do {     amount = get_float("How much we talkin?\n"); } while (amount < 0);         printf("cents = %.55f\n", amount); cents = amount * 100;         printf("cents = %i\n", cents); quarters = cents % 25;     Q = cents / 25;         printf("quarters = %i\n", quarters); dimes = quarters % 10;     D = quarters / 10;         printf("dimes = %i\n", dimes); nickels = dimes % 5;     N = dimes / 5;         printf("nickels = %i\n", nickels); pennies = nickels % 1;     P = nickels / 1;         printf("pennies = %i\n", pennies); coins = Q+D+N+P;      printf("%i\n", coins);  }  ~/workspace/pset1/cash/ $ ./cash How much we talkin? 4.2 cents = 4.1999998092651367187500000000000000000000000000000000000 cents = 419 quarters = 19 dimes = 9 nickels = 4 pennies = 0 22   ... that link helped. Thank you!

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


In page 29 of the third edition of the Python Cookbook, the author makes the following statement:     "... might also be done by creating a sequence of tuples and passing them to the dict() function. For example:           p1 = dict((key, value) for key, value in prices.items() if value > 200)      The author's referral of the argument passed to the dict() constructor as a "sequence" kinda got me wondering... what exactly is for ... in ...? It isn't an expression is it? One can't just type into a Python interpreter: for x in (1,2,3) and receive a result? The  for list(), for example suggests constructor expects an iterable but it's unclear to me what's going on.

I'm starting to learn Python and I've come across generator functions, those that have a yield statement in them.  I want to know what types of problems that these functions are really good at solving.


A couple days ago all of a sudden my laptop stopped connecting to the Internet. For instance, if I open the Chrome browser (64-bit version 78.0.3904.97) and enter in the url textbox: apple.stackexchange.com, then after a long wait the following message appears:     This site can't be reached   apple.stackexchangecom's server IP address could not be found.   Try:   Checking the proxy, firewall, and DNS configuration   DNS_PROBE_FINISHED_BAD_CONFIG   This happens whether I connect with Ethernet or WiFi.  However, strangely, my VPN app (TorGuard v. 3.96.1) still manages to connect when turned on, and if I repeat the above scenario while the VPN app is on, Chrome downloads the apple.stackexchange.com front page.  Given the above error message, I should probably add that, as far as I know, I use no proxy or firewall, however if someone could explain to me how to check this definitively, I'll be grateful.  Computer: MacBook Pro (mid 2012) OS: macOS Catalina, v. 10.15    It has been suggested that this question is a duplicate of . I don't think it is, becaused the other question says: "I just tried at a friend's house to check, with no problems." In my case I don't think trying to connect elsewhere would have solved the problem, because the problem was with the DNS settings, which, to the best of my understanding, are configured manually, and don't simply change by moving the device to another location (but I'm not sure).

I'm really hoping someone here can help me, as I'm getting pretty frustrated with my macbook now. I have a late 2011 model 15" macbook pro running OSX 10.9.5 that refuses to connect to Internet on my home network. I have the same problem whether it's WiFi or through ethernet cable, I have full signal but not getting online. Every other device connects fine; android phones and tablets,xbox one, iPhone and other macbooks, all online and browsing the net. I have had no problems connecting to other networks with my macbook pro before and I just tried at a friend's house to check, with no problems. A little something, that may be a clue to someone: when I open network diagnostic tool, my macbook pro connects for something that seems like a microsecond and it tells me I'm connected to Internet and everything seems fine. My IP is 192.168.0.5 subnet mask 255.255.255.0 and IPv6 is set to automatic. None of the options are checked under the proxies tab. Now I've tried the following, in different order and a number of times, to no avail:   Renewing/turning off&on/inputting manually DHCP.  Restarting/resetting the router and the macbook.  Turning WiFi on/off. Remove & add services (WiFi & ethernet). Checked and copied all network settings from another macbook pro that's connected and online on my network. Ran network diagnostic and assistant tools Duplicated/removed/added location Removed the /Library/Preferences/SystemConfiguration folder. Removed network password from keychain.      I've tried other things too, but can't remember what else right now.  Response from ifconfig en1:  en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500              ether 28:cf:da:e6:95:0a              inet6 fe80::2acf:daff:fee6:950a%en1 prefixlen 64 scopeid 0x5               inet 192.168.0.5 netmask 0xffffff00 broadcast 192.168.0.255              nd6 options=1<PERFORMNUD>              media: autoselect               status: active    I'm praying that someone out there has the magic words or the 2-click solution for me, but I would be grateful for a long thorough guidelines to solve it too! <3        Regards Trond


I cannot find the walkthrough I used to check when pushing a new project with git command. I remember logging on to GitHub.com, creating a project. Then do git init, git -add something.. THen i cannot remember the rest of the operations. Can someone give me the list or if the page with the walkthrough URL still exists perhaps send me the link?  Searching on GitHub.com and Git-Scm.com  git init git add *  I expected a new GitHub repo with all files in a folder pushed up to it. The manual is complicated.

Ok, after seeing , I have decided to skip to the end and go with .  So what I need is a beginner's practical guide to Git.  "Beginner" being defined as someone who knows how to handle their compiler, understands to some level what a  is, and has touched source control without understanding it very well.  "Practical" being defined as this person doesn't want to get into great detail regarding what Git is doing in the background, and doesn't even care (or know) that it's distributed.  Your answers might hint at the possibilities, but try to aim for the beginner that wants to keep a 'main' repository on a 'server' which is backed up and secure, and treat their local repository as merely a 'client' resource.  So:  Installation/Setup    How do you set up Git?  Try to cover Linux, Windows, Mac, think 'client/server' mindset.         Working with the code          How do you handle binary files (visio docs, for instance, or compiler environments)? How do you merge files changed at the "same time"?    Tagging, branching, releases, baselines    How do you pull a particular 'release'?   How do you resolve conflicts and complete the merge? How do you merge parts of one branch into another branch?        Other   Describe and link to a good GUI, IDE plugin, etc. that makes Git a non-command line resource, but please list its limitations as well as its good.    - Cross platform, included with Git  - Cross platform history viewer, included with Git  - Mac OS X  - Mac OS X history viewer  - Cross platform, commercial, beta  - console GUI for Linux  - GUI for Windows, Linux  - package for Windows, includes friendly GUI  Any other common tasks a beginner should know?     How do I work effectively with a subversion repository set as my source control source?   Other Git beginner's references                 Delving into Git     (and )    I will go through the entries from time to time and 'tidy' them up so they have a consistent look/feel and it's easy to scan the list - feel free to follow a simple "header - brief explanation - list of instructions - gotchas and extra info" template.  I'll also link to the entries from the bullet list above so it's easy to find them later.


Sorry if the question was duplicated  I have a XML file, something like  <item>    <attr1>attr1.1</attr1>    <attr2>attr1.2</attr2> </item> ... <item>    <attr1>attr2.1</attr1>    <attr2>attr2.2</attr2> </item>   And all I want to do is use Regex to get an array of item. For some reason, I don't want to use jQuery here(I have read about jQuery.parseXML). Can you show me how to get all of the items, or something, function in javascript which like match_all() in PHP. And here is my Regex,   /<item>([\w\W]+?)<\/item>/   Thank you!

I want to match a portion of a string using a  and then access that parenthesized substring:  var myString = "something format_abc"; // I want "abc"  var arr = /(?:^|\s)format_(.*?)(?:\s|$)/.exec(myString);  console.log(arr);     // Prints: [" format_abc", "abc"] .. so far so good. console.log(arr[1]);  // Prints: undefined  (???) console.log(arr[0]);  // Prints: format_undefined (!!!)   What am I doing wrong?    I've discovered that there was nothing wrong with the regular expression code above: the actual string which I was testing against was this:  "date format_%A"   Reporting that "%A" is undefined seems a very strange behaviour, but it is not directly related to this question, so I've opened a new one, .    The issue was that console.log takes its parameters like a printf statement, and since the string I was logging ("%A") had a special value, it was trying to find the value of the next parameter.


I faced the issue on several occasions, so I am reporting it here. Please see the screenshot for a better understanding of my concern.   I use a Mac. Please auto-hide it after, say, 1 second.  The last line always gets clipped when I scroll to the right.     {some long code - hello world - 123 456 sdf adsf adsf adsf adsf as fasf as fas fasd fasd fa sf adsf adsf adsf ads fads fads f dasf}

I've been running into this lately.  The scroll-bar gets stuck and makes it difficult to read the text.  I'm running Chrome Version 56.0.2924.87 (64-bit) on macos.


Why is this error happening? I'm using freemarker-2.3.20 and spring-webmvc-3.2.17   Caused by: java.lang.NoSuchMethodError: freemarker.template.Configuration.<init>(Lfreemarker/template/Version;)V         at org.springframework.ui.freemarker.FreeMarkerConfigurationFactory.newConfiguration(FreeMarkerConfigurationFactory.java:320)         at org.springframework.ui.freemarker.FreeMarkerConfigurationFactory.createConfiguration(FreeMarkerConfigurationFactory.java:250)         at org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer.afterPropertiesSet(FreeMarkerConfigurer.java:114)         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)         at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)         ... 58 more

I'm getting a NoSuchMethodError error when running my Java program.  What's wrong and how do I fix it?


Let $(x_n)$ be a real sequence such that $\sum^{\infty}_{n=1}|x_n|$   converges and, for each $k\in \mathbb N, \sum^{\infty}_{n=1}x_{kn}=0.$   Show that $x_n=0$ for all $n$.   I can't get anywhere useful.   Preferably I would ask that the answer is given from 'first principles' if that's the right term (i.e. no theorems or known results on such series) as this is supposed to be done just as the course introduces series and convergence.  Any help is appreciated   Thanks

Let $\sum a_{n}$ be an absolutely convergent series such that $$\sum a_{kn}=0$$ for all $k\geq 1$.   Help me prove that $a_{n}=0$ for all $n$.  Thank you!


What is the most efficient way to lock a specific row for within a mysql transaction. I am currently using for update using select is there another method that im unaware of?  if not are mysql locks only released when committed or rolled back?  for example i run the following transaction: begin select for update insert.. insert.. update(locked table) select another table commit does the commit release the lock or the update?

I have a financial transaction that looks something like this (pseudo):  begin     select record for update     update record(same record as selected)     insert another record into another table commit   If I call SELECT ... FOR UPDATE within the transaction, will the lock be released for the specific rows only when the transaction is committed ?


The Problem  Writing a bounty comment will, after a text exceeds a certain length and passes down to the next line, reformat the frame and the first characters of the next lines thereafter will be wrong.  The Tools  Windows XP SP2, Mozilla Firefox 23.0.1  The Steps   Start a Bounty   Select the Draw Attention button, then press Next   The beginning frame   The problem is at the left. As seen, the entrybox is stretched to the left, and the two first characters of each line are now "seemingly randomly" displayed.

I was attempting to create a bounty for a question over on Stack Overflow and ran into a rendering glitch on the last page. After entering a sentence that exceeds the length of a single line, the popup contents scroll slightly to the right and strange characters start showing up:    There is no '(' in my sentence so it's strange that it's showing up in the textarea. When you move the cursor it around the line edge, the textarea scrolls from right to left and back.  Here's what I've got:   Ubuntu 12.10 64-bit Firefox 18.0.2   This is also occurring on Firefox 24.0 on Windows 7 Enterprise Service Pack 1.    The data entry starts out fine:    Then it goes all wacky as I complete the second line:


Let $a_n$ and $b_n$ be two sequences of real numbers such that series $\sum a_n^2$ and $\sum b_n^2$ converge. Then the series $\sum a_nb_n$  A. is absolutely convergent  B. may not converge  C.is always convergent, but maynot converge absolutely  D.converges to 0  Attempt  I took $a_n =(-1)^n$ and $b_n=1$. Then , $a_nb_n$ is not convergent.So this removes options C and D.If i take $a_n=\frac{(-1)^n}{n}$ and $b_n=1$, it removes option A. So B is left. But i am not sure  Thanks

If $\sum (a_n)^2$ converges and $\sum (b_n)^2$ converges, does $\sum (a_n)(b_n)$ converge?  Could someone help me to solve this or at least give me a hint?, I have tried using Cauchy's criterion, the Dirichlet test for convergence, etc, but I can´t prove it.Honestly I don´t know where to start. Any help will be appreciated.


In the acknowledgments of my thesis, after a long list of names, I (also) want to thank  "[...] all other supportive people whom I have inevitably left out".  Does this look appropriate? In particular, I'm concerned about the usage of "whom" vs. "who". I tried to google the phrase "who(m) I have left out", but both versions yield millions of hits. [about 10:1 who vs. whom].  Note that I'm no native speaker, but write English by feeling.

I can never figure out whether I should use who and whom. Most people use who for both colloquially, but some people say this is not correct.  What’s the rule for using who and whom correctly?


Is the following equation impossible?     $AB-BA=I_n$, where $A,B\in M_n(\mathbb C)$    If it does, then how do I prove it? Thanks in advance!

The following question is from Artin's Algebra.      If $A$ and $B$ are two square matrices with real entries, show that $AB-BA=I$ has no solutions.    I have no idea on how to tackle this question. I tried block multiplication, but it didn't appear to work.


Or was it only Muggles and Muggle-borns? I'm writing a story and I need a little bit of help.

If half-bloods were filthy scum, according to Voldemort, I don't have words to describe Muggles. Why didn't Voldemort choose to eliminate Muggles first which would have been very easy? Also, destruction of entire Muggle gene pool would have removed the possibility of birth of half-bloods.


I have a class like this:  public class ClassList {      public class SubClassOne {      }      public class SubClassTwo {      }  }   Now i want to have a list of all classes in my ClassList class without having to add them all by hand. Is that possible?

In Java, is there any way to use the JDK libraries to discover the private classes implemented within another class? Or do I need so use something like asm?


I have a MacBook and I did not take care of the battery properly. It started to shut down unexpectedly at around 20% and then even at 30%. I got a new battery and it seems to work fine; it lets me get down to 6%. The only problem is that even with the new battery, a warning does not pop up telling me that it is time to plug in my computer. I was waiting for it to come up when my computer was at 6%, and instead it just died. I don't know if I need to change some kind of setting or what. Any ideas on how to fix this?

I have Macbook Air, Mac OS X El Capitan.  There is no warning box shown before the battery is near %15, like it did for Mountain Lion. So I can not notice and my computer goes sleep simply when the battery is off.  And even if it did I generally miss it because I use it external monitor attached to my Macbook Air. And because I play Spotify, I may miss the warning sound, too.  Is there warning box for low battery on El Capitan? If not, is there any utility or software that may help for external monitors and even playing music?


was tagged "status completed" by Jeff Atwood on 1/9/11, but I don't see any option under Flagging > Closing > Off-Topic to get it moved there.  Am I missing something, or is there not a current way to get non-code related questions to programmers.SE?

Currently the migration path options from SO are:   Meta.SO Serverfault SuperUser Webmasters Programmers   If we are going to be limited to 5 options, shouldn't we periodically re-evaluate which sites are most appropriate?   (10k only) indicate that the top sites for the last 90 days are:   Superuser - 564 - 5% rejected ServerFault - 278 - 10% rejected Tex - 157 - 13% rejected DBA - 144 - 2% rejected Sharepoint - 127 - 1% rejected Programmers - 126 - 26% rejected CodeReview - 100 - 3% rejected Meta.SO - 81 - 18% rejected Wordpress - 75 - 14% rejected Webmasters - 58 - 8% rejected   All these migrations for sites out of the list required a flag and a moderator to process it.  This is just extra work for the mod team!  If we had the top 5 destinations by volume as the 5 options, we would have had a net savings of 160 flags to be processed.  I suspect we will actually see these numbers change quite a bit if it's easier for users to put questions in the appropriate spot without moderator intervention.  Can we have a review of the migration path list based on migration volume?  Think of the flags!