What is the default range in slicing: For example: ls = [1, 2, 3, 4, 5] ls[-3::1]  #returns copy of the elements at indexes -3, -2, -1 ls[-3::-1] #returns copy of the elements at indexes -3 till the start of the list i.e ls[-5] ls[::-1]   #returns copy of the reverse version of the list ls[::1]    #return the list as is  What is the idea behind that? How does python determine unstated start and end indexes?
I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.
What is the concept of erasure in generics in Java? What I want to achieve is very simple: I have a Windows Forms (.NET 3.5) application that uses a path for reading information. This path can be modified by the user, by using the options form I provide.  Now, I want to save the path value to a file for later use. This would be one of the many settings saved to this file. This file would sit directly in the application folder.  I understand three options are available:   ConfigurationSettings file (appname.exe.config) Registry Custom XML file   I read that the .NET configuration file is not foreseen for saving values back to it. As for the registry, I would like to get as far away from it as possible.  Does this mean that I should use a custom XML file to save configuration settings?  If so, I would like to see code example of that (C#).  I have seen other discussions on this subject, but it is still not clear to me. systemd gives us the systemctl commands suite which is mostly used to enable services to start at boot time. We can also start, stop, reload, restart and check status of services with the help of systemctl.  We can do, for example, sudo systemctl enable service_name, and service_name will automatically start at boot time. We can also disable services not to start at boot time.  Is the only difference between the service and systemctl commands that systemctl can be used to enable the start of services at run time? Can we use systemctl on any service? What other significant differences are there? Does iOS support a built-in firewall like macOS does? I don't see anything about it in Settings. Script to Notify me when something happens on a shared directory The situation is:  I have a shared directories from many other machines where other users work on.  I need to be notified whenever a user create, modify or delete a directory or file from his local directory which I share using smb...  It looks like the folder actions in the MAC systems..  Is there a software that do that?!  If there is no such application, any help in writing a script for that is appreciated..  Thanks in advanced... How is MSE divided by $\sigma^2$ always a chi-square distribution? Reference book on measure theory I post this question with some personal specifications. I hope it does not overlap with old posted questions.  Recently I strongly feel that I have to review the knowledge of measure theory for the sake of starting my thesis.  I am not totally new with measure theory, since I have taken and past one course at the graduate level. Unfortunately, because the lecturer was not so good at teaching, I followed the course by self-study. Now I feel that all the knowledge has gone after the exam and still don’t have a clear overview on the structure of measure theory. And here come my specified requirements for a reference book.   I wish the book elaborates the proofs, since I will read it on my own again, sadly. And this is the most important criterion for the book. I wish the book covers most of the topics in measure theory. Although the topic of my thesis is on stochastic integration, I do want to review measure theory at a more general level, which means it could emphasize on both aspects of analysis and probability. If such a condition cannot be achieved, I'd like to more focus on probability. I wish the book could deal with convergences and uniform integrability carefully, as Chung’s probability book.    My expectation is after thorough reading, I could have strong background to start a thesis on stochastic integration at an analytic level.  Sorry for such a tedious question.  P.S: the textbook I used is Schilling’s book: measures, integrals and martingales. It is a pretty good textbook, but misprints really ruin the fun of reading. The new hot questions algorithm sometimes recurses The hot questions algorithm . I like the effects, since I see lots of new interesting stuff every day rather than waiting 6-8 weeks varying amounts of time for the list to update.  However, the new algorithm also has the interesting side effect of recursing the same question:    Of course, this is a world-shattering workflow-breaking unicorn-hating waffle-despising ERROR tremendously minor matter. But, if the SE devs have opportunity during their amazingly large amounts of free time, it might be nice to add a check for the current page before populating the hot questions list. How to prove that a number is irrational Is there a term for grammatical mistakes as a result of trying too hard? How can I derive effect sizes in lme4 and describe the magnitude of fixed effects? SqlServer: can one table's PK be the FK of two table's? I have three tables project, users and proj_user. The PK of proj_user table is the FK of project and users table's pk e.g.(project_id,user_id)  My question is, is it possible if the project_id and user_id's data is different  like project_id = '12345' and user_id = 'abc987'  Please reply  kind regards Vivek I've got this one file, favicon.ico. It's actually a large group of nested files, but purely for example, just this one.  If I do cp favicon.ico favicon2.ico, Apache can read the second one just fine.  If I do mv favicon.ico favicon3.ico, Apache throws a 403 on favicon3.ico.  If I su apache, I can read the file as apache.  stat says both files are identical, except for the inode number.  Is there some hidden flag somewhere or something that I'm missing? I've never seen anything like this.  error_log says (13)Permission denied: access to /favicon3.ico denied How do I tokenize a string in C++? Java has a convenient split method:  String str = "The quick brown fox"; String[] results = str.split(" ");   Is there an easy way to do this in C++? using nginx with SNI By now I've not used SNI with nginx yet. But as IP address pools are quite filled and commercial XP support is about to cease (finally) I'm thinking about converting a few sites to SNI.  I'm aware of the general limitations and pitfalls that might come along with SNI (XP issue, very old browsers). But beyond that is there anything I should be aware of?   Like - nginx related pitfalls when using SNI - issues/bugs with recent (notable!) browsers Why did Dumbledore drink the potion in the attempt to get a Horcrux? I've always wondered why the number of protons in the Universe exactly matches the number of electrons. They are such different particles with totally different cross sections. So, first of all, is this true? And, secondly, how could it be that they have been produced in the same amount after the Big-Bang? I've recently searched how I could get the application's directory in Java. I've finally found the answer but I've needed surprisingly long because searching for such a generic term isn't easy. I think it would be a good idea to compile a list of how to achieve this in multiple languages.  Feel free to up/downvote if you (don't) like the idea and please contribute if you like it.  Clarification:  There's a fine distinction between the directory that contains the executable file and the current working directory (given by pwd under Unix). I was originally interested in the former but feel free to post methods for determining the latter as well (clarifying which one you mean). Are data members allocated in the same memory space as their objects in C++? How to generate PDF/A and PDF/X? I have heard about PDF  PDF/A (for archival) and PDF/X (for printing). How to generate LaTeX documents like that?  I'm also interested in answers with plain TeX and ConTeXt, and hopefully with both pdfTeX and XeTeX engines.