I'm trying to write a bash script that will go into a directory loop through the .gz files and delete them if they are empty (ie the uncompressed file contained within in empty.  I've got a couple of questions:   Is there a standard file size of a compressed (gz) empty file I can check for? Or is there a better way to check if a gz contains an empty file without decompressing it with a bash script?   I was trying to use the following code to acheive this but it relies on the filesize being 0 i think.  for f in dir/* do     if [[ -s $f ]]     then         do_file_creation     fi done

Is there a quick way to check if a gzipped file is empty, or do I have to unzip it first?  example:  $ touch foo $ if [ -s foo ]; then echo not empty; fi $ gzip foo $ if [ -s foo.gz ]; then echo not empty; fi not empty $ wc -l foo.gz       1 foo.gz


rm -rf .* will only not end horribly because rm refuses to delete . and ...  How do I exclude these special directories from a glob pattern?  This is not solved by dotglob since I want to match only files beginning with a dot not all files.

I use Ubuntu 14.04 and in a terminal I became root with sudo su and I wanted to delete root's trash manually. It deleted everything except for a few files that start with a dot. Like .htaccess etc. So I went to that directory (which is "files") and I ran this command:  rm -rf .*   It did delete those files, BUT I also got an error message that the system couldn't delete "." and ".."  What does it mean? Like if I tried to delete the whole directory tree? Like I said, when I was running that command I was in the lowest directory. This one to be exact: /root/.local/share/Trash/files/ I shot down my PC and then turned it on. Everything seems to be normal at first glance. So now I want to ask is what went wrong and if what I did could really cause any serious damage to the system in general? In other words, should I be worried now or everything is OK?


I have a C file (say file1.c) that calls a function fun1(1,b).  This function fun1(int a,int b) resides in another C file (say file2.c) but its prototype is not included in the header file (say file2.h). file2.h is included in file1.c.  My question is, if I call fun1(a,b) from file1.c, will it work by passing control to the function definition in file2.c? Or will an exception occur or what will be the expected behavior?  Do I have to give a prototype of fun1(int a, int b) in file2.h for this to work?

To be truly standards-compliant, must all functions in C (except for main) have a prototype, even if they are only used after their definition in the same translation unit?


On  the iphone, under the Safari settings, there was an option ADD TO HOME SCREEN.  that gets quite handy to have direct bookmarks launchable from a single tap on the icon.  How do you do that in the android world?   I got a note 3 & I'm dying to get this functionality in.

Is it possible to create an icon on my desktop home screen (Android 2.1 Samsung Galaxy) that I can tap to fire up the browser to a specific web site?


I apologize in advance if this is a dumb question. I tried searching for duplicates but couldn't find any. Also, it is more of a curiosity, than a real question, so I hope it fits within the site guidelines. Backstory Yesterday, I was driving through California's Central Valley, thinking about how most of the roads there are orthogonal, directed north-south or east-west, creating some sort of square grid. Similar pattern to one found in many American cities and towns, with square grid layouts. Here is a snapshot from Google Maps near Turlock, CA  I had driving directions on, and wondered for a bit about how an algorithm would calculate the shortest/fastest path when traveling "diagonally" (northeast -> southwest, for example). I didn't spend too much time on that, since some of these roads have different features, speed limits, etc. Instead, I started thinking about different ways to calculate the distance between opposite corners of a square or rectangle (for simplification, I will focus on squares moving forward, but the math applies to both). Pythagoras We know that using Pythagoras, we can calculate the hypotenuse as the square root of the sum of the sides squared: $ h = \sqrt{a^2 + b^2} $ Thus, for a 10 by 10 square, the hypotenuse will be the square root of 200: 14.1421... Not Pythagoras Ok, now, consider this. Given a 10 by 10 square (think of a city block, or orthogonal roads like the ones above), if we want to travel from one corner (A) to the opposite corner (B), first we need to visit one of the remaining two corners.  In this case, the distance traveled would be 10 + 10 = 20 (much longer than the 14.14 hypotenuse). Now, if we divide this square into 4 equal squares, and we travel through the center, the distance traveled will remain the same: 5 + 5 + 5 + 5 = 20 units.  The number of horizontal segments is equal to the number of columns (2 in this case). The length of each horizontal segment is equal to the width divided the number of columns: $ s_h = \frac{width}{columns} $ Thus, the distance traveled horizontally $ d_h $ would be $ s_h * columns $, or in other words, equal to the total width. The same applies to the distance traveled vertically $ d_v $, where the total distance will be equal to the total height. $ d_h = columns * \frac{width}{columns} = width $ $ d_v = rows * \frac{height}{rows} = height $ It seems to be the case that the number of columns and rows does not matter, as the distance traveled will always be the sum of the width (horizontal distance) and height (vertical distance). We could divide the square infinitely, so we have infinite columns and infinite rows, and the distance will still be the same (20 units in this example). Wait a minute... My Conjectures  According to the above, the distance traveled through infinite segments will be 20.  Why is the value so different from the hypotenuse (almost 50% higher), given than the path from A to B would pretty much represent a diagonal line at that point?   It's been long since I studied integrals and Calculus, so I'm looking for someone that would not mind spending some time explaining this. Thank you! PS: I looked at , which has a nice diagram similar to mine, but the  (aka Taxicab Geometry) is not what I'm looking for, as it does not mention any relation with hypotenuse distance when the number of segments approaches infinity.

What is wrong with this proof?    Is $\pi=4?$


I read this article on Space.com and I quote "As far as we know, that's as far [back] as we can see — we get an image of the universe as it was when it was about 389,000 years old," So what I wanna know is that    How can we look into the past? Does this mean that we might be able to see ourselves even?

This is a question that has been gnawing on me for many years now. Back a long time ago, as I recall in reference to a scene in a popular science show on TV, I was asked the following.  The claim is that when you look out into the universe, you see the universe as it appeared at some past time. (This follows from the speed of light being finite, and looking at objects by observing their emitted light or other EM radiation.) The amount of time that one looks backwards is equal to the distance to the observed object in light-distance (so looking at something ten lightyears away means you are observing it as it was ten years ago).  Matter moves at a rate of speed less than the speed of light (it has to, since matter has mass, even if miniscule at the atomic level). So $v_{mass} \lt v_{EM}$ (probably significantly less, since $v_{EM} = c$).  So let's say you're looking at an object $10^{10}$ lightyears away by observing something for which $v=c$. To the observer, that object appears as it was $10^{10}$ years ago. But the Earth is much younger than $10^{10}$ years and we established that matter moves at a slower speed than EM radiation, so wouldn't the radiation that was emitted $10^{10}$ years ago long since have passed Earth's current position?  If, say, $v_{mass} = 0.5 \times c$ (a big assumption, but bear with me for a second), it would seem that the radiation emitted $10^{10}$ years ago would have passed Earth's current position $10^{10} - (0.5 \times 10^{10}) = 5 \times 10^{9}$ years ago, around the time when the solar system was still forming. Setting $v_{mass} = 0.25 \times c$ (which seems more realistic) means the radiation would have passed "us" around $7.5 \times 10^{9}$ years ago. So how could we be observing it now?  I'm not sure I'm posing this question in the best possible way (I'll admit I do find the concept somewhat confusing), and I'm sure that there's a simple explanation for it all. Just what am I missing?  I did find  which seems peripherally related but not quite the same thing. Qmechanic brought up  but that question seems to be about whether it is so, not why it is so.


Was one of Hilbert questions regarding physics to make an axiomatic foundation for physics?  Regardless of Godels work could some Physics principles that are 'basic' and 'presently verifiable' be treated as axioms in a logic system along with Math axioms and Set theory or maybe with Category theory as a basis. If 'axiomatized' one could prove a physics theory with a type of Physics 'proving' algorithm. Like Leibnitz's dream of a 'calculating machine' that could calculate any question's answer.

I'll write the question but I'm not fully confident of the premises I'm making here. I'm sorry if my proposal is too silly.   consisted roughly about finding axioms for physics (and it was proposed in $1900$). I guess that at the time, such thing was impossible due to the nature of physics which is mainly based on observations and models. But it seems that after Gödel's work on $1931$, the axioms which were seen as self-evident truths started to be seen as unprovable statements and the job of a mathematician is grossly about deriving theorems from these axioms.  So if this shift of axiomatic conception really happened, couldn't we just accept anything (including the physical observations) as axioms and reason about their consequences? Thus somehow solving Hilbert's sixth problem?


Hi everyone I'm making a C# WinForms application that searches for duplicate images in a directory. It starts by calling a constructor with every image in the directory.  There is a lot of files in the directory and memory was quickly rising to 2gb and then the program would throw an out of memory exception.  Now I've added a check in my for loop to check if the memory has exceeded 800 Megabits and I force a garbage collection. But I've noticed after the first forced collection the memory no longer rises. (The forced garbage collection occurs at loop ~180 out of ~800 then it never occurs again)   (It looks a little like a shark fin swimming through the water leaving waves in its wake.)  I'm stumped as to why this is happening and have come here in search of help.  private void GeneratePrints() {     for (int i = 0; i < files.Count; i++)     {         if (imageFileExtensions.Contains(Path.GetExtension(files[i])))             prints.Add(new FilePrint(directory + "/" + files[i]));          //800 Megabits         const long MAX_GARBAGE = 800 * 125000;          if (GC.GetTotalMemory(false) > MAX_GARBAGE)         {             GC.Collect();             GC.WaitForPendingFinalizers();         }     }      Console.WriteLine("File Prints Complete."); }   GeneratePrints() is called 1 time, once a directory is selected.  I will also show you the constructor for the FilePrint class. I'm pretty sure this all has something to do with the MemoryStream object.  public FilePrint(string filename) {     Bitmap img;      using (var fs = new FileStream(filename, FileMode.Open))     {         using (var ms = new MemoryStream())         {             fs.CopyTo(ms);             ms.Position = 0;             img = (Bitmap)Bitmap.FromStream(ms);              ms.Close();         }          fs.Close();     }      this.size = img.Size;     img = ResizeImage(img, 8, 8);     img = MakeGrayscale(img);      //I do some basic for-loop arithmetic here      //calculating the average color of the image, not worth posting.      img.Dispose(); }   So basically I'm wondering how can I make it so that the 'shark-fin-like' memory usage spike at the start never happens so that I do not have to force a garbage collection.  Here is a memory snapshot I have taken when the forced garbage collection occurs (Am I not disposing of the MemoryStreams properly?):    Thank you for your replies, ideas and answers in advance!

I wrote C++ for 10 years. I encountered memory problems, but they could be fixed with a reasonable amount of effort.  For the last couple of years I've been writing C#. I find I still get lots of memory problems. They're difficult to diagnose and fix due to the non-determinancy, and because the C# philosophy is that you shouldn't have to worry about such things when you very definitely do.  One particular problem I find is that I have to explicitly dispose and cleanup everything in code. If I don't, then the memory profilers don't really help because there is so much chaff floating about you can't find a leak within all the data they're trying to show you. I wonder if I've got the wrong idea, or if the tool I've got isn't the best.  What kind of strategies and tools are useful for tackling memory leaks in .NET?


i had recently dual booted ubuntu 20.04 with my windows 10 and i alloted 35 gb to ubuntu.Both my operating systems are on ssd . Now i want to give some hdd space to ubuntu for storage purposes.How can i do this?

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


Specifications  [midas@localhost ~]$ uname -a Linux localhost.localdomain 4.0.4-301.fc22.x86_64 #1 SMP Thu May 21 13:10:33 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux  and  [midas@localhost ~]$ cat /etc/issue Fedora release 22 (Twenty Two)  Problem preface  I was trying to install a new package through dnf on my Fedora 22. (Linux 4.0.4) When the package stopped downloading at 52% and the terminal window didn't show any more advancement.  I aborted the download and attempted to restart it using the same dnf install [package name] command.  I then received the following notification: Waiting for process with pid 2967 to finish.  Turns out dnf was still running in the background:  [midas@localhost ~]$ ps -A | grep 2967  2967 ?        00:00:01 dnf  Problem  I figured I could just kill the process, however:  [midas@localhost ~]$ kill 2967 bash: kill: (2967) - No such process [midas@localhost ~]$ sudo kill 2967 kill: sending signal to 2967 failed: No such process  How come ps can list the process but kill can't find it?  I know a reboot will solve this (or a bit of patience even). But I'm just curious as to why there is such a difference between these 2 commands.

Can somebody please explain when parent process receives the exit status of a dead child process via wait, who actually reallocates the memory of the child process and removes it from the process table?


I have navigated to the desired folder in my command window and I would like to delete all files and folders within the specific directory where I am currently located. I do not want to delete any files/folders outside of this directory.  How can I go about achieving this?

The closest I've gotten is   # rm /path/to/directory/*.*   but that doesn't work for files that don't have an extension...


I was going through the java Method.class (Decompiled) and I found something that caught my eye.  @Override public boolean isSynthetic() {     return super.isSynthetic(); }   "Synthetic". What does that mean?  Is it usable in code?  .  And since I found this in the Method class, I was wondering, is it that an entire method could be "synthetic", or is it that it contains something synthetic?  Thanks in advance.  .  not a copy of

What is a synthetic class in Java? Why should it be used? How can I use it?


So I am an undergraduate student in my third semester and I am mostly done with my double major in Pure and Applied Mathematics/Statistics. I will be done with the requirements for my bachelors by my fifth semester at the latest.  If I want to go for a PhD in Pure Math, would I be better off graduating after my 5th semester or pushing some classes back, taking graduate level classes and seminars in my 6th semester and doing an undergraduate thesis? I have some research done and will be doing more next semester, but that is nowhere near what I would do for the honors thesis.   Alternatively, I could go all out next semester and graduate then. However this would leave me very little time to study for the subject GRE (I am good with the general GRE) and to actually apply for schools due to how busy I will be.  I tried to make this a good question by including as much information as I thought was relevant, but if there are any questions or anything I forgot to mention then please let me know.  Does anyone have advice?

I read this question  and became very worried when I saw everyone blasting the OP for contemplating graduating in three years. The general consensus was that there was no reason at all to graduate early and that the lack of additional experience would hurt your chances at graduate school. I am concerned because I am graduating with only 2.5 years because I can only barely afford this by maxing out all loans.  I would love to be able to develop greater depth in my field. Instead it has been a constant sprint to finish before I run out of money completely. I was rejected from every top ten university, and the one token safety school I got into jacked up the price as soon as they found I had nowhere to go.  Are the criticisms that finishing too fast valid in the context of extreme debt? I am saving over $100,000 by finishing early, will this reason be accepted by graduate schools? I see that graduate students do not have to pay tuition and get a small stipend, this sounds like a wonderful way to pursue an education and is very attractive to me right now. I feel that my education is rushed and I have not had the time to contemplate open research questions which are very important for graduate admissions. Graduate school is also the path to a job in research labs or academia.  edit: I have done well enough (6th in graduating class unless I mess up). They offer to tack on a year for a masters at your current rate, which is touted as a way extend finiancial aid. This is untenable for me.


Why should I make a yeast starter and not just sprinkle the yeast on top of the wort like the packet says? I am sure there must be some good reason why you would do this.

I have noticed that the smackpacks say on the package that the package is meant for a 5 gal. batch and that you should pour the pack directly into the wort.   On the otherhand - nearly everyone tells me to always make a starter.   Is this just because making a starter never hurts or does the package contain wrong instructions?   I would have guessed that the yeast producers would tell you on the package if you should need some extra steps to get a good product.


(Note: I feel that this question is sufficiently different from  to justify a new post, as my question is about specific information informing Wizard spell preparation)  (Additional note: These same issues may be similarly relevant for other preparation casters. I chose to focus on Wizards because of my personal experiences as a player, my current needs as a DM, and the flexibility in access to spells that is unique to Wizards.  Please feel free to address this question for any preparation caster; Wizards simply have more opportunity to make "bad" choices in preparing spells due to their large spell list and greater number of spells known, while also having one of their key features be their versatility in what spells they can bring to a challenge)    One of the major class-balancing elements of the Wizard class is that they are only able to prepare a certain number of spells at a time. Among all magic using classes, wizards have access to the largest number of spells that they can learn, which makes them extremely versatile, but that versatility is tempered because they can only prepare a subset of those spells at any given time.  This can be very exciting-- it adds a degree of planning, creativity, coordination, and tension to playing a wizard. It is also valuable in that it helps prevent the wizard from overshadowing other spellcasters with less expansive spell lists.  However, it can also be frustrating, particularly at lower levels when fewer spells can be prepared at once. It's difficult to choose which spells to prepare if you don't have any idea what challenges you'll be facing, and even if you do have some information about that there may not be enough time to change which spells are prepared beforehand. It can be annoying to be completely mis-prepared for challenges.  Sometimes that's appropriate: surprises do happen, narrow windows of opportunity may appear, and being maximally appropriately prepared for every encounter is not a realistic goal. Often there will be a middle ground, such as knowing you'll be exploring an area rumored to be filled with undead enemies and so it might be a good idea to have spells that are useful against the undead.  But it's not much fun to only rarely be able to use spells that you've learned specifically to deal with situations in which you find yourself because you didn't (whether or not you couldn't) know anything about what you're walking into. Using magic to solve problems is largely what the Wizard class is about.  This has frustrated me as a player, and I'm having trouble balancing those concerns in a game I'm running now. If my approach to the issue is fundamentally that:   Surprising encounters can happen, particularly if my players drive those events Events which are known in advance may not offer enough time to swap out prepared spells before dealing with them Gathering advance knowledge about upcoming challenges won't always be equally possible or reliable Obtained knowledge about future challenges shouldn't be a how-to guide on min-maxing those challenges I don't want to do away with the preparation mechanic I don't want to elide the issue by providing abundant spell scrolls or similar items   My experiences playing a wizard have been plagued by this issue, often leading me to wish I'd just chosen a different class. I'd like to spare my players that irritation if I can.  How can I telegraph enough information to a player with a preparation caster character (especially at lower levels) that they can avoid being totally mis-prepared, and how often should I do so?

There are some play-styles of D&D in which the spectre of player-character death is considered a feature of the game rather than a bug. For my own reasons (which aren't the point of the question), I see them as a feature especially in exploration-focused games (e.g., sandboxes, old-school dungeon-crawling) where there are lots of ways for players to arm themselves with enough information to make informed decisions about the dangers they're willing to tackle.  Even with players that play strategically, seeking that intel and using it to pick their battles strategically, it is still on the DM's shoulders to provide good clues and tell-tales during play. How well the DM does this will significantly impact the players' ability to make informed decisions on where to go, how to prepare, what to fight, and what to avoid. If the players don't catch the clues, it should be because they weren't paying attention or didn't put 2 and 2 together, not because the DM's descriptions suck.  What techniques can the DM use to effectively telegraph to the players the existence and/or nature of the dangers they face?  These assumptions are inherent in the question:   The players are already playing strategically, and don't need to be "trained" in this play-style. Senseless, random PC death is a real possibility, not just threat to set the tone of the game or generate fearfulness in the players. Characters almost always die when players put them in dangerous situations they're not prepared to deal with. Characters might live when players are observant, know what dangers to expect, are well-prepared, and don't take on dangers that are beyond their ability—and even then, the dice have to go in their favour. Knowledge is the edge they need to bend the odds in their favour. The players don't necessarily have access to stat blocks or other, out-of-game information on in-game dangers. Players are relying on the DM's descriptions to understand the world, including its dangers and rewards.   (This isn't an invitation to argue whether an exploration, frequent-PC-death play-style is good or not. That's just background to the question.)   Related:


My wife was born in Canada but now has her US citizenship and resides with me in the US. She still has Canadian Citizenship but, as you know, the US does not recognize dual citizenship.  One of her Canadian parents wishes to gift her money. We know what the exemptions are if the gift was a US parent to US adult child; however, we are confused as to how the gifting from a "foreigner" would work. We are also confused about whether to open a bank account in Canada for the gifting of the funds as my wife still holds Canadian Citizenship.  We have been told that there are no gift taxes in Canada for cash and have also been told that the US IRS looks unkindly on people having more than $10,000 USD in a foreign bank account.   So, in essence, what is the best path here to allow the gift to incur as little taxes (within the laws) to giver and receiver and where should the money be received, in Canada or to the US?

I am a Canadian resident who wants to gift my adult US child $175K Canadian. What are the tax implications for the US resident who resides in California?


I teach English   It happens periodically, time to time, every monday and so on. Present SImple     I am teachining English   1) It is happening right now, I am in the class 2) It's a current period of time when I am doing it.  But even if it's a period of time, anyway it happens time to time, periodically.  I may be 97 and I say:     I teach English   I consider this action like a repeating over and over one  I can also say:     I am teaching English   having meant all my life I've been doing it like one huge period.  What's the difference then of their usages?

"These days" express the period around now. Then, I wonder, why is used the Present Simple in the following sentence?:   These days I travel a lot.  I’m spending more and more time away from home. (Considering the rule given above, I would say: These days I am travelling a lot.)   I've also come across the sentence where both  tenses are considered correct:   These days, more and more people prefer / are preferring to retire    early.   So, is it optional whether we use present simple or continuous with "these days"?


This is message I get when I turn laptop on, have tried various things but nothing helps. Not an IT wizard so basic instructions to help would be appreciated. Screen reads:  Errors were found while checking the disk drive for /.    Press F to attempt to fix the errors, I to ignore, S to skip mounting or M for manual recovery...   Any ideas please

After upgrading my laptop from karmic to lucid, my fat32 partition won't mount automatically. I get the message:  The disk drive for /osshare is not ready yet or not present Continue to wait; or Press S to skip mounting or M for manual recovery   Funny thing is, if I skip, then /osshare/ is mounted once I log in.   I've a similar setup on my desktop, and it works fine. Fstab on desktop:  UUID=4663-6853  /osshare        vfat    utf8,umask=007,gid=46 0       1   /etc/fstab on laptop:  UUID=1234-5678 /osshare vfat utf8,auto,rw,user 0 0


I have a <select> form element that is being generated dynamically after the page loads. I was using jQuery to attach a change event that would update other fields in the form, and wanted to eliminate the need to rewire the handler each time the form containing the <select> was replaced.  For click events on dynamic elements, I have been moving to unobtrusive JavaScript and wanted to use that approach for change - but no success. Attaching to the <select>directly was cumbersome because when the node is replaced in the DOM, the connected event listener dies with it, and the new node must be attached to again.  So I wanted to know, is there a way to unobtrusively assign a change event handler to the parent element of a newly-created <select> and let the event bubble up to a handler on a previously-existing element, in order to avoid attaching a handler each time a new target input element is created?

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


In python only, I use S = float(raw_input( 'Insert the value: ') when I want allow to user insert a value then is used in that script.  When I try to use the same on a python script that I've already implement as script tool on arcgis, it seems no possible because give me an error like this:     Runtime error  Traceback (most recent call last):   File "",   line 769, in  EOFError: EOF when reading a line   So I infer that the problem is arcpy don't recognize the function "raw_input" or python window doesn't allow that user insert a value..  Can anyone help me to replace python's function raw_input ?

I'm developing an interface with arcgis and python.  When I have only python, I can make my script interactive using:  S = float(raw_input( 'Please enter the value: '))   I can open and run my script at the python window of the ArcGIS, and the script run, but when I try become this interactive, asking the value, ArcGIS gives me an error:   Runtime error  Traceback (most recent call last):   File "<string>", line 769, in <module> EOFError: EOF when reading a line


Suppose we have the following sequence:  {$a_n$} such as: $a_0 = 1, \\ a_1 = 1, \\ a_2 = -1, \\ a_3 = -1, \\ a_4 = 1, \\ a_5 = 1, \\ ... $  How can we find the general term of this sequence? I tried using a trigonometric function e.g. $\alpha \sin(x+\phi)$, then we impose some constraints on $\alpha$ and $\phi$ to get that sequence, but I get lost, is there any clever way to find the general term?  EDIT: The question is identified as duplicate, but that answer does not solve the question, because I am looking for a solution that does not involve floor function.

Consider a sequence of the form:  $x[n]=-1,-1...,1,1,...,-1,-1...,1,1... \quad n>0$  One can think of this as a square wave ($\pm1$) with a 50 % duty cycle (coming from EE).  For the simplest case of such a series i.e. $-1,+1,-1,+1,-1...$, a general equation is quite trivial ($x[n]=-1^n$).  Can we have e general equation for the other cases i.e. when there are multiple $-1$'s followed by $+1$'s ?


My team wants to move news section of our website to subdomain ex "news.website.com" does it affect SEO? Can anyone tell me pro and cons of this thing?

If I have example.com, and blog.example.com, do search engines see those as one site or two? Will using subdomains hurt SEO? I have some technical reasons why I can't use example.com/blog.


I want to know if the following has been done experimentally; after the spin (or any other characteristic with a probability of 50%) of 2 entangled particles has been measured, we change the spin of one and we see the spin of the other changing instantaneously at a distance.   For example, entangled particle A is spinning up and entangled particle B is spinning down, we make A spin down and see B start spinning up at the same time.  I know entanglement has been proven experimentally but it always seems to imply this "spooky action at a distance" and I wonder if THAT has actually been proven experimentally. Maybe my question should have been has anyone seen spooky action at a distance...

I have never found experimental evidence that measuring one entangled particle causes the state of the other entangled particle to change, rather than just being revealed.  Using the spin up spin down example we know that one of the particles will be spin up and the other spin down, so when we measure one and find it is spin up we know the other is spin down. Is there any situation after creation that the particle with spin up will change to spin down?


So I tried to start a war with my clan, Fallout. We had ten people at the time but when I had attempted to start a war it said I did not have enough eligible players. What makes someone eligible in clash of clans and exact

I am currently in a clan with three members. When we tried to initiate a clan war it said we had insufficient clan requirements. Does anyone know what the full requirements are? Is there a minimum clan member requirement?


I want to know which word does "they" refer to, in the following statements. The question rises because the subject in the beginning sentence is "someone" which is in singular form. The Statements are as follows:   Simply this: When someone discounts the idea that the whole block universe really exists, and insists instead that it is only what is happening right now that exists, presumably  they mean to include what is happening right now in locations other than where they themselves happen to be.

Is there a pronoun I can use as a gender-neutral pronoun when referring back to a singular noun phrase?  Each student should save his questions until the end. Each student should save her questions until the end.


Context: an organization with which I am affiliated just sent an e-mail asking for donations. It was an obvious attempt to make everyone feel guilty about not donating. I wanted to send a message to a colleague: "this email is dripping with <enter word here>" -- but  I couldn't come up with a word. I know the of the phrase "guilt trip", which describes the actual guilt imposition, but it doesn't quite fit the usage I was after. Is there a word that describes the act of trying to impose guilt, that would fit the usage above?

I’m looking for a word to refer to the act of trying to embarrass someone to the point that they do something they don’t want to do.  Example: Let’s say all of your friends are jumping off of a cliff into a lake, but you don’t want to, for whatever reason. One friend remains at the top with you, trying to convince you to jump. One tactic they use is to try and embarrass you enough or anger you into doing it by saying something along the lines of - “So, basically, you’re too chicken to jump, right?”  I believe I could use the phrase ‘egg on’ for this, but would rather have a singular, more specific word for it. I’m pretty sure there is one, but I just can’t bring it to mind. I’ve considered ‘reverse psychology’, too, but it just doesn’t fit what I’m trying to say.


I have been working on a Blender project for a couple of days and I want to import another image as plane. I got to File -> Import and only see options for importing "Collada" and "Alembic". How do I get back the other import options?    If I make a new project, then all import options are there.

I have a blend file, But when I am trying to import the only options I have are collada and alembic. FBX, OBJ etc are all missing.  I have enabled FBX add on in preferences. I have seen the options MANY times before, why is it missing all of a sudden?


Although I opened explorer, set it to detailed and from options clicked Apply to All Folders, some folders still show up in Large Icon mode. To my understanding those are folders with media files? How to prevent this behavior?

I use details as my default folder view, which works fine except for folders that only contain media files like photos or mp3. In these cases the view changes in order to show thumbnails etc. (which I also disabled).  How can I prevent this view switch and tell the explorer to stick to details view.


I am trying to do exhaustive subset selection in python. So, I need to select the best model among models having "n" predictors. Is R-Squared enough? Or is Adjusted-R-Squared better? It will be nice if you could also write about AIC, BIC.

Common data-based variable selection procedures (for example, forward, backward, stepwise, all subsets) tend to yield models with undesirable properties, including:   Coefficients biased away from zero. Standard errors that are too small and confidence intervals that are too narrow. Test statistics and p-values that do not have the advertised meaning. Estimates of model fit which are overly optimistic. Included terms which can be meaningless (e.g., exclusion of lower-order terms).   Yet, variable selection procedures persist.  Given the problems with variable selection, why are these procedures necessary?  What motivates their use?  Some proposals to start the discussion....   The desire for interpretable regression coefficients? (Misguided in a model with many IVs?) Eliminate variance introduced by irrelevant variables? Eliminate unnecessary covariance/redundancies among the independent variables? Reduce the number of parameter estimates (issues of power, sample size)   Are there others?  Are the problems addressed by variable selection techniques more or less important than the problems variable selection procedures introduce?  When should they be used?  When should they not be used?


Lately, we had our finals and a question popped up in that went like this:  Liverpool players are known to be skilled. They ...... The match easily. The choices were: "will win" or "are going to win"  Lots of people are debating because some consider "known to be skilled" and "easily" as evidences. So, it should be "are going to". And others say that the personal skills are not evidences. So, it's "will win".  Sorry for my long intro, but hope I find a final answer here.   Thanks in advance. :)

I know several questions were asked about the difference between "going to" and "will". Based on several answers (see, for instance, ,  and ), I understood that "will" is more spontaneous and "going to" is used with more planned actions.  So, it seems that everything is pretty fine. However, in , Kosmonaut has an answer in which he states: "Let's say that tomorrow you will walk your dog from 7 - 8 AM".  On the one hand, you probably planned to walk your dog long before and thus I should use "Let's say that tomorrow you're going to walk your dog from 7 - 8 am".   On the other hand, since I'm saying "let's say...", I'm deciding right now (thus, unplanned) that you will walk your dog. So, even though in this hypothetical situation you made a plan, I'm in a more spontaneous mood deciding right now that that's what you will do tomorrow, and, thus, I should use "will".  Which one (if any) of the above explanations is right?


Show that if $(x_n)$ is unbounded, then there exists a subsequence $(x_{n_k})$ such that $\lim 1/(x_{n_k}) =0.$ I was thinking that $(x_n)$ is a subsequence of itself. WLOG, suppose $(x_n)$ does not have an upper bound. By Algebraic Limit Theorem, $\lim 1/(x_{n_k}) =0.$ Is there any flaws in my proof?

Given the sequence $(x_n)$ is unbounded, show that there exist a subsequence $(x_{n_k})$ such that $\lim(1/x_{n_k})=0$.   I guess I have to prove that $(x_{n_k})$ diverge, but I don't know how to carry on.  Thanks.


I'm looking for an easy way to let my code turn a link from regular static text into a hyperlink that can be clicked. The code should let you put in an input of text, and then the code will automatically turn it into a link that lets you use that image search in the Google doodle game, Image Breakout, a spin-off of Atari Breakout.  The first thing I did was try this:  function IMAGEBREAKOUT(input)  { var array = []; var url = 'https://www.google.com/search?q=' + input + '&tbm=isch&tbs=boee:1';   array.push([url]);   return array; }   That only gave me regular text, and did not give me a clickable link, so then I tried this:  function IMAGEBREAKOUT(input)  {   var array = [];   var url = 'https://www.google.com/search?q=' + input + '&tbm=isch&tbs=boee:1';     array.push("" + url + "");     return array; }   But, that only gave me static text with HTML formatting that didn't work. So, then I tried researching, and went on to try this:  function IMAGEBREAKOUT(input)  {  var array = [];  var url = 'https://www.google.com/search?q=' + input + '&tbm=isch&tbs=boee:1';     SpreadsheetApp.getActiveSheet().getActiveCell().setFormula('=HYPERLINK("' + url + )'); }   But it said I didn't have permission to call setFormula.  I tried authorizing the app later, and it worked when running it in the editor, but running the formula in Google Sheets gives me the same error.  I'm in a tight spot here. Can someone help me, or revise my script so that it doesn't require so much? If that's not possible, is there a simpler way to do this that I'm not thinking about? Thanks!

How do you safely encode a URL using JavaScript such that it can be put into a GET string?  var myUrl = "http://example.com/index.html?param=1&anotherParam=2"; var myOtherUrl = "http://example.com/index.html?url=" + myUrl;   I assume that you need to encode the myUrl variable on that second line?


How to prove the claim that the conditional distribution of a normal random variable is also normal random? And how to think it intuitively?

Suppose that $\mathbf{X} \sim N_{2}(\mathbf{\mu}, \mathbf{\Sigma})$. Then the conditional distribution of $X_1$ given that $X_2 = x_2$ is multivariate normally distributed with mean:   $$ E[P(X_1 | X_2 = x_2)] = \mu_1+\frac{\sigma_{12}}{\sigma_{22}}(x_2-\mu_2)$$  and variance: $${\rm Var}[P(X_1 | X_2 = x_2)] = \sigma_{11}-\frac{\sigma_{12}^{2}}{\sigma_{22}}$$  It makes sense that the variance would decrease since we have more information. But what is the intuition behind the mean formula? How does the covariance between $X_1$ and $X_2$ factor into the conditional mean?


Can anybody please tell me what the difference between some and any is?  Here are two examples:        Can you please give any advice on that?   Can you please give some advice on that?

I'm doing my English homework and my book says these sentences are correct:  1) Do you have any wine?  2) Can I have some water, please?  My questions are:   These sentences are structured differently.  Does a difference between "wine" and "water" cause the sentences to be structured differently? Why do we not use the word "some" in sentence #1?


Some distributions do not have finite/defined mean/variance:  Is there a way to determine from your sample if the population distribution has undefined mean or variance?  Both sample means and sample variances obviously always exist. Would it be using a series of Chi-square goodness of fit tests for common distributions without mean/variance? Knowing if the population has defined mean/variance would impact your ability to draw conclusions using typical parametric statistical tests.

Is it possible to test for finiteness (or existence) of the variance of a random variable given a sample? As a null, either {the variance exists and is finite} or {the variance does not exist/is infinite} would be acceptable. Philosophically (and computationally), this seems very strange because there should be no difference between a population without finite variance, and one with a very very large variance (say > $10^{400}$), so I am not hopeful this problem can be solved.  One approach that had been suggested to me was via the Central Limit Theorem: assuming the samples are i.i.d., and the population has finite mean, one could check, somehow, whether the sample mean has the right standard error with increasing sample size. I'm not sure I believe this method would work, though. (In particular, I don't see how to make it into a proper test.)


How to reproduce bug:   Start typing a comment. Rotate the screen orientation of your device. Try clicking the "POST" button. Nothing will happen.   I've reproduced using the the latest version (1.0.85) of the app on Samsung I9305 running Android 4.4.4   And Asus ZE551ML (5.0).   @IlmariKaronen  on Samsung XCover 3 (5.1.1).  @JonasCz has reproduced this on Cyanogenmod (4.4).  @meatball has reproduced this on Nexus 5 (6.0.1).

There's a bug in the Android app where a comment can be typed in but not posted, meaning the post button does nothing and I have to back out of the question and go back in to post the comment. This definitely happens when the screen rotates, and also other times but I haven't identified them exactly.  I have version 1.0.78.  Edit: This had stopped happening but now started happening again when I updated to Android 6.0.1, now with version 1.0.85.


Initially, when the current starts flowing the temperature of the filament is less and thus resistance is less. So, more current flows through the bulb and the power delivered to the bulb is more. As, time passes and the filament starts glowing at a steady rate its temperature has increased which in turn has increased its resistance. So, less current flows through it and thus less power is delivered.  Is this the case? Please help me understand the situation.

My original thought was:  $$ L = L_0 \left( 1 - e^{-t/\tau} \right) $$  where $L$ = luminosity and $L_0$ = initial luminosity.   But when I tested this I found that the time constant $\tau$ was higher for smaller values of Voltage, so I have no idea and all I can find is the luminosity of planets etc. Any help would be good.


Ok,so i had installed ubuntu on my hp laptop by completely removing windows 8.1.now the problem is that i have 500gb of disk space originally and ubuntu has used up arond 80 gb of it.I cannot access the remaining 420 gb now i.e it cannot be seen from my ubuntu desktop.please help as i want to change the 80gb to the whole of 500gb.

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


I'm developing an Android App using Xamarin Android. Implementing the UI, I've a loop creating some buttons and it's handlers. My problem is thar whenever the handler is executed, the primitive value passed into the method is the reference of the outter value (i).  private void MyUiMethod(){     var i = 0;   foreach(var item in itemList){     var data = new MyCustomData();     var button = new Button();     button.Click = (s, e) => ButtonClick(s, e, data, i);     i++;   } }  private void ButtClick(object s, EventArgs e, MyCustomData data, int index){   // HERE ALWAYS THE VALUE OF INDEX IS THE LAST VALUE   // e.g. If the list has 3 items, index = 3 no matter the button I've clicked;  }   Any suggestions?

I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


I have created a new startup file in order to improve my workflow.  One example among many others, I've created new Screens Layouts. It really makes a difference. But when I open old saved files, they use old settings like old Screen Layouts. It's time consuming to re-adjust the settings one by one to my new liking. It's also the same problem if I open blend files created by other people, I'm forced to use their settings.  So, is there a way to override the settings of old files with the ones from my new startup file?

Is there a way to open files without changing the UI layout?  Sometimes in older files the layout will be in the old 2.4x style, which can be annoying.  One way would seem to be appending everything in, but that gets tedious with having to do it over again and again for objects, materials, textures, etc.


I am using python to send Post requests to /wp-json/wp/v2//. This successfully updates default info such as title, content etc. However I am unable to make any changes to the custom theme meta data structured like "post_meta":{     "meta_1":[],      .      .      "meta_n":[] }   Thanks

I am using python to send POST requests to /wp-json/wp/v2/< post type >/< post id >. This successfully updates standard fields such as title, content etc. However I am unable to make any changes to the custom theme meta fields structured like "post_meta":{     "meta_1":[],      .      .      "meta_n":[] }.  When I make a GET request to the same endpoint, the post meta fields are returned so I don't think this is an issue with the fields not being registered? Thanks


I want to round decimal values in C#. For example when a decimal value is < or equal to .5, It should take the original value → e.g 344.5 is rounded to 344 and if it is more, it goes 1 value up → e.g 344.51 becomes 345. It is pretty simple to do, but I have noticed an issue with Math.Round/Decimal.Round.  Below is the code I have used and I noticed that c sharp adds 1 for some numbers when the decimal is .5 and for others it just ignores it.  decimal x; x = 1.5M;  for (int i = 0; i < 200; i++) {     Console.WriteLine($"{x} becomes {decimal.Round(x)}");     x = x + 1; }  Console.Read();   Output:    Does anyone know how I can always get the desired result: if the decimal is less or equal to .5, take the base number, if it is more than .5, only then add 1.

According to the documentation, the  method uses a round-to-even algorithm which is not common for most applications. So I always end up writing a custom function to do the more natural round-half-up algorithm:  public static decimal RoundHalfUp(this decimal d, int decimals) {     if (decimals < 0)     {         throw new ArgumentException("The decimals must be non-negative",              "decimals");     }      decimal multiplier = (decimal)Math.Pow(10, decimals);     decimal number = d * multiplier;      if (decimal.Truncate(number) < number)     {         number += 0.5m;     }     return decimal.Round(number) / multiplier; }   Does anybody know the reason behind this framework design decision?  Is there any built-in implementation of the round-half-up algorithm into the framework? Or maybe some unmanaged Windows API?  It could be misleading for beginners that simply write decimal.Round(2.5m, 0) expecting 3 as a result but getting 2 instead.


I'm taking a mathematics course in my university that relies on past knowledge of an older course I've taken. It's been a long time, and I don't remember much from the other course.   One thing I'm struggling on is coming up with the operation tables for the elements in a field. I know they have something to do with modular arithmetic, but I'm also new to that. Anyway here's what my professor came up with for the addition table:     \begin{array}{|c|c|c|c|} \hline +& 0 & 1 & a & b \\ \hline  0 & 0 & 1 & a & b\\ \hline  1& 1 & 0 & b & a\\ \hline  a& a & b & 0 & 1\\ \hline  b& b & a & 1 & 0 \\ \hline \end{array}   And this for the multiplication table:     \begin{array}{|c|c|c|c|} \hline  * & 0 & 1 & a & b \\ \hline  0 & 0 & 0 & 0 & 0 \\ \hline  1 & 0 & 1 & a & b \\ \hline  a & 0 & a & b & 1 \\ \hline  b & 0 & b & 1 & a \\ \hline \end{array}   I get that adding anything to zero is that element, and multiplying by one is also that element, and multiplying by 0 is zero. What I don't get is how to get the other answers. I'm a bit stuck and any help in the right direction would be greatly appreciated.

Question: Why is the table of $GF(4)$ look like the one below? I know it has to do with the fact that 4 is composite Let $GF(4) = \{0,1,B,D\}$ Addition: $$ \begin{array}{c|cccc} +  & 0&   1&   B &  D  \\ \hline     0&   0 &  1 &  B &  D \\  1 &  1 &  0 &  D &  B  \\ B &  B &  D &  0 &  1  \\ D &  D &  B &  1 &  0  \end{array} $$ Multiplication: $$\begin{array}{c|cccc} \cdot &   0 &  1 &  B &  D  \\ \hline 0 &  0 &  0 &  0 &  0  \\ 1 &  0 &  1 &  B &  D  \\ B &  0 &  B &  D &  1  \\ D &  0 &  D &  1 &  B     \end{array}$$


I try to  generate a tableofcontents which I will get, but the color of the numbering+text for sections, subsections is different than the color of the pagenumber. What am I doing wrong ? Am I using the right packages, or too many packages, or not in the right order?  My code looks like :  \documentclass[twoside]{article}  % Packages required  \usepackage{calc} \usepackage{doxygen} \usepackage{graphicx} \usepackage[utf8]{inputenc} \usepackage{makeidx} \usepackage{multicol} \usepackage{multirow} \usepackage{textcomp} \usepackage[table]{xcolor} %\usepackage{color}  % Font selection \usepackage[T1]{fontenc} \usepackage{mathptmx}            %  \usepackage[scaled=.90]{helvet}  %  \usepackage{courier}             %  \usepackage{amssymb} \usepackage{sectsty} \renewcommand{\familydefault}{\sfdefault} % \usepackage{float} % for the "pageanchor" \usepackage[titles]{tocloft} % Einrücken \tocloftpagestyle{fancy} % Headers & footers \usepackage{fancyhdr}  % making  use of the fancy-package \pagestyle{fancy} % \usepackage{titletoc} \usepackage{titlesec} % \titlespacing{\section}{0pt}{0cm}{1cm} % move the "next" text a little bit down  \titlespacing{\subparagraph}{0pt}{0pt}{0pt} % \titleformat{name=\section}[hang]{\color{black}\hrule\vspace{-1cm}}{\cmssbx\color{blue}\thesection}{1.8em}{\cmssbx\color{blue}}{\cmssbx\color{blue}}   % \let\stdsection\section \renewcommand{\section}{\newpage\stdsection} % start every section on a new page  %================================ \begin{document}  \tableofcontents

I try to color the page numbers of my table of contents.  I'm using the package hyperref along with the options :  \hypersetup{   colorlinks,   linkcolor=wine-stain % custom color }      Here's the output :       The numbers remain black..  What should I do so the numbers become the same color as defined for the sections ?  I tried to \color{wine-stain}{\tableofcontents} but still that doesn't work since "Contents" is also colorized and the subsection numbers are remaining black.


$\sqrt{1+2\sqrt{1+3\sqrt{1+4\sqrt{1+...}}}}$  Apparently, the answer is 3.

I think I have sort of a proof of the following nested radical expression due to Ramanujan for $x\ge 0$.     $$\large x+1=\sqrt{1+x\sqrt{1+(x+1)\sqrt{1+(x+2)\sqrt{1+\cdots}}}}$$ for $ x\ge -1$   I just want to know if my proof is okay or there is a flaw, and if there is one I request to give some suggestions to eliminate them. Thank you. The proof is the following:  Proof: Let us define $$ a_n(x)=\underbrace{\sqrt{1+x\sqrt{1+(x+1)\sqrt{1+(x+2)\sqrt{1+\cdots}}}}}_{n \ \mbox{terms}}$$ for $x\ge 0$ so that $$ a_1(x)=\sqrt{1+x},\ a_2(x)=\sqrt{1+x\sqrt{1+(x+1)}},\ a_3(x)=\cdots$$    and so on. Since $x\ge 0$ each one of the $a_n$ is defined (I am taking only the positive square root). Also, we note that $$a_{n+1}^2(x)=1+xa_{n}(x+1)$$  Now, we note that $\{a_n(x)\}$ is an increasing sequence and that $$a_n(x)<x+1$$ $\forall n\ge 1$, this is easy to prove by induction as below:  For $n=1$, $a_1(x)=\sqrt{1+x}<1+x$ since $x\ge 0\Rightarrow 1+x\ge 1$. SO it is true for $n=1$. Similarly, the truth can be proved for $n>1$.  Then $a_n(x)$ converges to $$l(x)=\sup_{n}a_n(x)\le x+1$$ Now I make the following claim:  Claim: $l(x)=x+1\quad \forall i\ge 0$  Proof: Fix $x$. Let $l(x)<x+1$. Then, $l(x)=x+1-\epsilon$ for some $\epsilon>0$. Now, I claim that there must be a $n$ such that $$x+1-a_n(x)<\epsilon$$, and if that is true then $$a_n(x)>x+1-\epsilon=l(x)$$ which is a contradiction since $$l(x)=\sup_{n}a_n(x)$$ and then it implies that $$l(x)=x+1$$ To prove my claim it requires $$x+1-a_n(x) <  \epsilon$$ Now, \begin{align} x+1-a_n(x) = & x+1-\sqrt{1+xa_{n-1}(x+1)} \\ \ =& \frac{(x+1)^2-({1+xa_{n-1}(x+1)})}{x+1+\sqrt{1+xa_{n-1}(x+1)} } \\ \ =& x\frac{(x+1)+1-a_{n-1}(x+1)}{x+1+\sqrt{1+xa_{n-1}(x+1)} } \\ \ <& \frac{x}{x+2}((x+1)+1-a_{n-1}(x+1))\\ \ <& \frac{x}{x+2}\cdot\frac{x+1}{x+3}((x+2)+1-a_{n-2}(x+2))\\ \ <& \frac{x}{x+n-1}\cdot \frac{x+1}{x+n} ((x+n-1)+1-a_{1}(x+n-1))\\ \ <& \frac{x}{x+n-1}\cdot \frac{x+1}{x+n}(x+n-\sqrt{x+n})\\ \ <& \frac{x(x+1)}{x+n-1} \end{align}  Now, if one is able to find $n$ such that $$\frac{x(x+1)}{x+n-1}<\epsilon \Rightarrow x< \frac{-(1-\epsilon)+\sqrt{(1-\epsilon)^2+4\epsilon(n-1)}}{2}$$ then we're done.   Now from the upper bound it seems that there always exists some $n$ that satisfies this requirement. Hence the claim is proved.


i'm really confused by the concept of both conventional current and electron flow. Since electrons flow from negative terminal to positive terminal, shouldn't positive terminal be used for grounding?

The standard as I learned it is that the flow of current is from positive voltage to negative voltage. The direction of current flow is opposite the direction of electron flow. This is what I learned in school, the assumption made by almost every engineer I've worked with, and the standard in every simulator I've ever seen.  I've encountered two exceptions. One is this , which a colleague has on his shelf from his associates degree training. The other is a pair of former navy personnel I've worked with, both of whom were taught electron flow in the navy and had to unlearn it when they left.  I understand that both are valid mathematical models of the same phenomenon. What I don't understand is why anyone would purposefully and knowingly train people in a fashion contrary to a near-universal standard. (It took a lot of work to make that textbook!) Is the standard as I understand it not as standard as I think it is? Is there some analytical advantage to the electron flow model that I'm not seeing, perhaps in realms of EE I don't visit often?  Why is anyone, anywhere, ever taught that current flows from negative voltage to positive voltage?


I have the following viewport:  Edges (on the left) are "ugly". Is there a way to improve this ? I use blender 2.8. I already look in preferences viewport: What else can I try ?

I have recently started using blender and one of the models I'm working on has dark shadows along edges. I started this model from scratch. I can't remember them being there when I first started the model, but I had trouble joining areas together and think I've pressed something I shouldn't have. However, there are so many options I'm not sure what I did.  Here is an image of what I mean   The one on the left has the shadow. As a test I started a new model, which is on the right in the image, and as you can see it doesn't have any shadows.  Also, occluded vertices partially show through the model. Occlusion doesn't work properly.   In orthogonal view small darkened triangles appear along the the edges.    I don't really want to start the model again from scratch so any ideas on how to remove this shadow would be great. Thanks.


How to install Epson L3150 inkjet printer's scanner in Ubuntu 18.04? Printer was successfully installed in Ubuntu 18.04. But scanner not detect in Gimp,Xsane.(imagescan-bundle-ubuntu-18.04-3.57.0.x64.deb(1).tar.gz)installed.

I am trying to install the Epson scanner driver... I have extracted the tar.gz. file but on ./configure shows the error  checking for GIMP - version >= 1.0.0... checking for gimp-config... no no checking for XML... configure: error: Package requirements (libxml-2.0) were not met:  No package 'libxml-2.0' found  Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.  Alternatively, you may set the environment variables XML_CFLAGS and XML_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details."


Why optical microscope can not be used for higher magnification? Enlist different microscope used for higher magnification (> 2000 x).

Optical microscopes are quoted as having a maximum magnification of 1500x to 2000x - what is this calculated from?


Please excuse my ignorance here, but for most of my life I thought that the twin paradox was predicted by special relativity (ie. time dilation). I also know that the twin paradox has been explained multiple times on this site and others. What I want to know is that, if general relativity were "turned off", would the paradox go away? In other words, is the only phenomenon involved the fact that a clock will run slower in an accelerating frame?

I read a lot about the classical twin paradox recently. What confuses me is that some authors claim that it can be resolved within , others say that you need . Now, what is true (and why)?


Why isn’t the adjectival form “governatorial” or something similar? Why did “gubernatorial” become the standard and accepted adjective for “governor”? Govern’s adjective is governable and not gubernable. Government’s adjective is governmental and not gubernmental. Why then is governor’s adjective gubernatorial?

Both "govenor" and its adjective form, "gubernatorial", originally derive from the same Latin word "gubernare" (to govern) yet we use root "govern" in all contexts ("govern", "government", "governor", "governing", "governmental"...) except for "gubernatorial."  Why is "gubernatorial" the odd man out?  Also, is this just an American thing? In Australia, we also have governors but I've never heard the word used outside of the context of American politics.


I have a method being run on ~20 objects in a for loop. I want each iteration of the loop to perform the method with a new task to prevent the GUI from stalling while the work is happening. However, I noticed right after a task is created I get a System.ArgumentOutOfRangeException error in the output. Eventually, the entire app crashes with System.ArgumentOutOfRangeException: 'Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index'.  My first thought was it was a simple error in the loop with the current iteration index not matching up, but that isn't the case.  Here's my loop:  Collection<string> tableNames = GetTableNames(path); //just gets a collection of strings var tasks = new List<Task>(); for (int i = 0; i < tableNames.Count; i++) {     var addTask = Task.Run(() => { AddLayer(tableNames[i]); });     tasks.Add(addTask); } await Task.WhenAll(tasks); ResumeRefresh(); //I want this to be called after all the tasks complete   Not sure if this is important but at the end of the AddLayer method in the for loop is a function call that acts on a GUI control, so I do this at the function call:  private void AddLayer(string tableName) {     //some work done here     Application.Current.Dispatcher.BeginInvoke((Action)(() => Map.Layers.Add(layer))) }

I met an interesting issue about C#. I have code like below.  List<Func<int>> actions = new List<Func<int>>();  int variable = 0; while (variable < 5) {     actions.Add(() => variable * 2);     ++ variable; }  foreach (var act in actions) {     Console.WriteLine(act.Invoke()); }   I expect it to output 0, 2, 4, 6, 8. However, it actually outputs five 10s.  It seems that it is due to all actions referring to one captured variable. As a result, when they get invoked, they all have same output.  Is there a way to work round this limit to have each action instance have its own captured variable?


There are 2 servers, they were application level clusters.   One of the servers / got corrupted, see:   The idea is the next: I would dd the sda1 from the good server to the bad one.   The Q: what should I update on the bad machine, after dd'ing the sda1?   My hints so far:    grep -r HOSTNAME /* and modify it vi /etc/sysconfig/network/* re-generate /etc/ssh/ssh_host_ vi /etc/fstab vi /etc/hosts vi /etc/passwd and /etc/group generate new blkid for sda1

I know that it can, in some circumstances, be difficult to move a Windows installation from one computer to another (physically move the hard drive), but how does that work on linux? Aren't most of the driver modules loaded at bootup? So theoretically would it be that much of a hassle?  Obviously xorg configs would change and proprietary ATI drivers and such would have to be recompiled (maybe?). Is there more to it than I'm thinking of?  Assume the 2 computers are from the same era, ie both i7s but slightly different hardware.  Update: Thanks for the answers. This is mostly for my own curiosity. I have my linux system up and running at work, but eventually I'd like to move to a computer that I can get dual video cards into so I can run more than 2 monitors. But not any time soon


Just today when I started Ubuntu 18.04 (Linux Kernel 4.15.0-51) in VMware Workstation Player 14 (14.1.7) the boot freezes just before the login prompt. The mouse cursor is visible and the Ubuntu logo at the bottom center is just being rendered as is visible in the attached screenshot. (Depending on the exact moment of the freeze the Ubuntu logo appears more or less bright.)  I am able to boot if I enter recovery mode and simply resume the boot. However, I am not able to set the display resolution to the hosts' nor is the host's display device detected.  To resolve the issue I reinstalled the VMware tools as well as the open-vm-tools. I also tried to extend the "Unit" section of /etc/systemd/system/multi-user.target.wants/open-vm-tools.service with Requires/After=graphical.target to no effect. Lastly, I attempted to check the filesystem which failed:   /lib/recovery-mode/recovery-menu: line 80: /etc/default/rcS: No such file or directory fsck from util-linux 2.31.1 /dev/sda1 mounted. e2fsck: Cannot continue, aborting.  Finished, please press ENTER   Boot freeze on purple screen before login prompt:

I installed the latest updates from the software update center today (I update when ubuntu displays a notification), restarted the machine and now it's unable to boot properly. The best screen I can get is displayed below. If I resize the screen then it goes to black. If I restart the machine then it displays just purple.    Note that the screen is unresponsive, I can't click anything on it.  Other than SMBus Host Controller not enabled! I don't see any other warnings. Note that I don't know if this warning existed before the update.  I'm running ubuntu 18.04 in vwmare workstation 15 player (latest update). Any ideas on how to begin debugging this?    Update: Trying to boot Ubuntu, with Linux 4.15.0-50-generic instead of Ubuntu, with Linux 4.15.0-51-generic didn't help.  Update: Blacklisting i2c-piix4 according to  answer didn't remove the warning or fix the issue.  Update: Blacklisting i2c-piix4 according to  answer removed the warning but didn't fix the issue.  Update: The answer from Uzair helped me log into the account (run dpkg and update grub from recovery mode).  Answer:  answer helped me fully to resolve the issue. I don't understand the fix. If anyone does, put it as the answer and I'll mark it as such.  Regarding duplicity: The answer from another question did solve my issue but I don't think my question is a duplicate of that one. I began with a fresh install of 18.04 a few months ago, did several updates without an issue and only today experienced issues which are different than those described in the other question. I think we experienced different bugs with wayland and we both solved it by disabling it which is a destructive solution applicable to many questions.


Can anyone help me out, I am not getting how gcc is compiling the below statement and printing its output.:-  printf("%d",7["sunderban"]);

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]?


I have a list of different things and I was wondering how to split it every time it hits a new name?   So what I would like to have is have it take a list that looks like this:  list = [corn, 14, 2, 500, broccoli, 2, 10, 1400, potato, 2, 14, 7]   and it will create 3 lists:  list1 = [corn, 14, 2, 500]  list2 = [broccoli, 2, 10, 1400]  list3 = [potato, 2, 14, 7]   I am guessing it would be something along the lines of a loop that repeats a new list until it hits a non integer, but I really dont know how it would look set up.

I have a list of arbitrary length, and I need to split it up into equal size chunks and operate on it. There are some obvious ways to do this, like keeping a counter and two lists, and when the second list fills up, add it to the first list and empty the second list for the next round of data, but this is potentially extremely expensive.  I was wondering if anyone had a good solution to this for lists of any length, e.g. using generators.  I was looking for something useful in itertools but I couldn't find anything obviously useful. Might've missed it, though.  Related question:


I have a UTM that I have configured to send daily logs to a Ubuntu Server through ssh authenticating with a Public DSA key that has been generated by the UTM. (I know DSA is considered less secure than RSA, unfortunately my UTM only offers DSA). I have added the DSA Public Key to /home/user/.ssh/authorized_keys. I have setup r/w permissions for the owner user explicitly. I have uncommented AuthorizedKeysFile %h/.ssh/authorized_keys in /etc/ssh/sshd_config. My UTM host not been able to connect, after checking var/log/auth.log I found the following message:   userauth_pubkey: key type ssh-dss not in PubkeyAcceptedKeyTypes [preauth]  How do I add ssh-dss to PubkeyAcceptedKeyTypes?

I am trying to ssh to localhost, but it's asking for a password every time.   What I tried:   ssh localhost ssh-keygen -t dsa -P '' -f ~/.ssh/id_dsa  cat ~/.ssh/id_dsa.pub >> ~/.ssh/authorized_keys


Am I correct that a block inside main() doesn't have separate scope?  For example, if I do the following, I will get compile error:  static int i = 1;  public static void main(String[] args) {    int i = 2;     {        int i = 3;     } }   Why is this?

The following method does not work because the inner block declares a variable of the same name as one in the outer block. Apparently variables belong to the method or class in which they are declared, not to the block in which they are declared, so I therefore can't write a short little temporary block for debugging that happens to push a variable in the outer scope off into shadow just for a moment:  void methodName() {   int i = 7;   for (int j = 0; j < 10; j++) {     int i = j * 2;   } }   Almost every block-scoped language I've ever used supported this, including trivial little languages that I wrote interpreters and compilers for in school.  Perl can do this, as can Scheme, and even C.  Even PL/SQL supports this!  What's the rationale for this design decision for Java?  Edit: as somebody pointed out, Java does have block-scoping.  What's the name for the concept I'm asking about?  I wish I could remember more from those language-design classes. :)


I want to use  function to zip up a folder from a C++ console application. No examples are given in the article of how to use the function from C++, just C# or VB, and I can't find any other code samples anywhere.  The article doesn't really even clarify whether the function is available in C++. Is this function supported in C++? And if so, how do I call it?  Thanks.

Suppose I am writing an application in C++ and C#.  I want to write the low level parts in C++ and write the high level logic in C#.  How can I load a .NET assembly from my C++ program and start calling methods and accessing the properties of my C# classes?


This works: {{ drupal_view('nursing_resource_blog_teasers', 'block_1') }  But this doesn't: {% set view_name = "nursing_resource_blog_teasers" %} {{ drupal_view(view_name , 'block_1') }  It appears that drupal_view() isn't allowing a variable as the View name. Is there a way to make this work?

myfield is a plain text field. {{ content.field_myfield }} renders the field with HTML markup and the field label.  How do I render the raw value of the field? {{ content.field_myfield.value }} doesn't work.


The other day, I checked on my . To my surprise, the achievements icon displayed a different reputation change amount than what I had earned:    There is a discrepancy of 2, just as in .  My reputation total appears correct, but can we please get the discrepancy fixed?  Edit:  The next image, taken immediately after the first, shows the vote count. With 1 upvote and 1 downvote, the achievement icon could not have totaled +6:    2nd Edit:  Images of all my sites show no recent reputation changes, except MSE.  Stack Overflow:    Super User:    Software Engineering:    Code Review:    Code Golf:    Stack Apps:    Meta Stack Exchange:

In the top bar, the green “achievements” number shows +14. But when I open the dropdown, I see four items totalling +20. Why does the total not match the sum of the items?    No lower entries were highlighted.


I am trying to execute action in multiple servers in my loop but I would like to launch my actions in the first server and go directly to the second one without waiting for the first one to complite .  HOSTS="host1 host2"     For hostname in ${HOST} ; do ssh -tt ${USERNAME}@${hostname} << EOF actions exit EOF Done    Anyone has an idea hos to do that in linux sh bash ?  Thank you in advance.

Can scp be used to send a single file to multiple remote servers at the same time? If so, how? If not, what's the alternative?


I try to transpose matrix by reference, but without success, the matrix in the main stays in the same state. what can I do?  p.s. the function must to be "void"  thank you!   public static void trans(int a[][]) {         int n = a.length;         int m = a[0].length;         int b[][] = new int[m][n];         for (int i = 0; i < b.length; i++) {             for (int j = 0; j < b[0].length; j++) {                 b[i][j] = a[j][i];             }         }                a = b; }     public static void main(String[] args) {         int a[][] = {{1,2,3},                      {4,5,6}};           trans(a);          System.out.println("*****************************");         for (int i = 0; i < a.length; i++) {             for (int j = 0; j < a[0].length; j++) {                 System.out.print(a[i][j]+"\t");             }             System.out.println();         }     }

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


How can I find the determinant of this type of square matrix of $n\times n$ $$\begin{vmatrix} a&b&b&b& \ldots&b\\b&a&b&b&\ldots&b\\b&b&a&b&\ldots&b \\ \vdots&b&b&a&\ldots &b \\ b&b&b&\ldots &a&b \\b&b&b&b&\ldots &a \end{vmatrix}_{n\times n}=?$$ I have applied elementary operation: $C_1\to C_1+C_2+C_3+\ldots+C_n$ $$\begin{vmatrix} a+(n-1)b&b&b&b& \ldots&b\\a+(n-1)b&a&b&b&\ldots&b\\a+(n-1)b&b&a&b&\ldots&b \\ \vdots&b&b&a&\ldots &b \\ a+(n-1)b&b&b&\ldots &a&b \\a+(n-1)b&b&b&b&\ldots &a \end{vmatrix}_{n\times n}$$ Applied, $C_2\to C_2-C_3$, $C_3\to C_3-C_4$, $\ldots$, $C_{n-1}\to C_{n-1}-C_n$ $$=(a+(n-1)b)\begin{vmatrix} 1&0&0&0& \ldots&b\\1&a-b&0&0&\ldots&b\\1&0&a-b&0&\ldots&b \\ \vdots&0&0&a-b&\ldots &b \\ 1&0&0&\ldots &a-b&b \\1&0&0&\ldots &b-a&a \end{vmatrix}_{n\times n}$$ $$=(a+(n-1)b)(a-b)^{n-1}\begin{vmatrix} 1&0&0&0& \ldots&b\\1&1&0&0&\ldots&b\\1&0&1&0&\ldots&b \\ \vdots&0&0&1&\ldots &b \\ 1&0&0&\ldots &1&b \\1&0&0&\ldots &-1&a \end{vmatrix}_{n\times n}$$ I got stuck here. I can't find the way to solve this. However the answer is $(a+(n-1)b)(a-b)^{n-1}$. your help will certainly be appreciated. thank you.

I have the following $n\times n$ matrix:  $$A=\begin{bmatrix} a & b & \ldots & b\\ b & a & \ldots & b\\ \vdots & \vdots & \ddots & \vdots\\ b & b & \ldots & a\end{bmatrix}$$  where $0 < b < a$.  I am interested in the expression for the determinant $\det[A]$ in terms of $a$, $b$ and $n$.  This seems like a trivial problem, as the matrix $A$ has such a nice structure, but my linear algebra skills are pretty rusty and I can't figure it out.  Any help would be appreciated.


Why there are Arabic Alphabets instead of English in this output? It happens whenever the output is about some system files, but why not English?

My months and days in my File Manager are in German, how do I change that? On the photo you see 'Dez' : It means Dezember (German for December). I also saw one day Mittwoch (German for Wednesday). How do I change that German issue? This is only my File Manager and not completly but partially. Weird.


I tagged favorites on my PC and want to have a look at them on my phone...  I don't want to search them again!

I know there is a way to  from the app, but I cannot find a practical way to  follow the activity on the questions I favorited.  The only way I found was to type infavorites:mine into the search box and sort by active. But there is no way to bookmark a search, and repeatedly typing this search command on a small screen is no fun.   I understand not all desktop site features can be built into the app. But following the activity on my favorite questions is precisely the sort of things I'm likely to do from a mobile device.


I have a path:  path('update/<int:pk>/<int:projet>', UtilisateurUpdateView.as_view(), name='update', ),   I want to be able to get value of parameters 'projet' in my UtilisateurUpdateView but don't know how  for example, if my url is  I would like to be able to recovered 8 corresponding to parameters 'projet'  class UtilisateurUpdateView(UpdateView):     model = Utilisateur     fields = ['uti_nom','uti_pre','uti_mai','uti_sit','uti_pro']     print('projet POST',self.request.POST['projet'])     def get_context_data(self, **kwargs):         data = super(UtilisateurUpdateView,self).get_context_data(**kwargs)          if self.request.POST:             data["utilisateur"] = self.request.user.username             # data["projet"] = get_object_or_404(Projet, pro_ide = self.request.POST['projet'])             data["user_profil"] = self.request.session.get('user_profil')             data["application"] = ApplicationFormset(self.request.POST, instance=self.object)         else:             data["application"] = ApplicationFormset(instance=self.object)         return data      def form_valid(self, form):         context = self.get_context_data()         application = context["application"]         user_profil = context["user_profil"]         # print('projet',context["projet"].pro_nom)         if user_profil == 'investigateur':             self.object.uti_val = 0 # demande modifiée par investigateur -> repasse à non validée + envoie de mail         elif user_profil == 'moniteur':             self.object.uti_val = 1 # demande validée par moniteur -> validée + envoie de mail             self.object.uti_val_dat = timezone.now()         else:             self.object.uti_val = 0         self.object = form.save()          if application.is_valid():             form.instance = self.object             application.save()             # informations nécessaires pour l'envoi d'un mail             utilisateur_nom = form.data['uti_nom'] # nom de l'utilisateur pour lequel une demande est créée             utilisateur_prenom = form.data['uti_pre']             utilisateur = utilisateur_nom+' ,'+utilisateur_prenom             applications = [app.app_app_nom for app in Application.objects.filter(uti_ide=self.object.uti_ide)]             # email('modification',context["utilisateur"],'j.lecarrou@hotmail.fr',utilisateur,context["projet"].pro_nom,applications)         return super().form_valid(form)      def get_success_url(self):         return reverse("project:index")

I am currently defining regular expressions in order to capture parameters in a URL, as described in the tutorial. How do I access parameters from the URL as part the HttpRequest object? My HttpRequest.GET currently returns an empty QueryDict object. I'd like to learn how to do this without a library, so I can get to know Django better.


Input file.txt:  Start of test case:test1 a b c Date is feb 12 Start of test case:test2 m n o Date is feb 13 Start of test case:test3 x y z Date is feb 14   Desired output files  test1.txt:  Start of test case:test1 a b c Date is feb 12   test2.txt :  Start of test case:test2 m n o Date is feb 13   test3.txt:  Start of test case:test3 x y z Date is feb 14

I have a text file which I want to split into 64 unequal parts, according to the 64 hexagrams of the Yi Jing. Since the passage for each hexagram begins with some digit(s), a period, and two newlines, the regex should be pretty easy to write.  But how do I actually split the text file into 64 new files according to this regex? It seems like more of a task for perl. But maybe there's a more obvious way that I'm just totally missing.


I am trying to return a list of integers having length of the list/array passed.  But it's returning null pointer exception error. Should I use any other data structure for the same List, array etc.   What would be the best to be used.   import java.util.ArrayList;  public class App {      private static ArrayList<Integer> a;      public static ArrayList<Integer> map(String[] x) {          for (int i = 0; i < x.length; i++) {              a.add(x[i].length());          }          return a;     }      public static void main(String[] args) {          String[] string = { "hello", "how", "r", "you" };          System.out.println(map(string).toString());     }  }

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?


Let $f : \mathbb{R}\to \mathbb{R}$ be a monotone function and consider the set $S$ of all points $a\in \mathbb{R}$ such that   $$\lim_{x\to a^-}f(x)\neq \lim_{x\to a^+}f(x).$$  I want to show that this set is countable, but I'm not finding any way to do it. I thought one way would be to show that this set is discrete, so that it is countable. For that to happen, I would need to show that there is no convergent sequence $(x_n)$ of points of $S$ all different than $a$ whose limit is $a$.  My idea then is to suppose there is such a sequence $(x_n)$. Then $x_n\in S$ and $\lim x_n = a$ with $x_n\neq a$. In that case we have $\lim_{x\to x_n^-}f(x)\neq \lim_{x\to x_n^+}f(x)$.  Intuition says this should contradict $f$ being monotone, but I'm not finding a way to prove it.  So how can I finish this proof? Is my strategy correct? If so how do I finish it? If not, how should I prove this result?

I would like to prove the following:       Let $g$ be a monotone increasing function on $[0,1]$. Then the set of points where $g$ is not continuous is at most countable.     My attempt:    Let $g(x^-)~,g(x^+)$ denote the left and right hand limits of $g$ respectively. Let $A$ be the set of points where $g$ is not continuous. Then for any $x\in A$, there is a rational, say, $f(x)$ such that $g(x^-)\lt f(x)\lt g(x^+)$. For $x_1\lt x_2$, we have that $g(x_1^+)\leq g(x_2^-)$. Thus $f(x_1)\neq f(x_2)$ if $x_1\neq x_2$. This shows an injection between $A$ and a subset of the rationals. Since the rationals are countable, $A$ is countable, being a subset of a countable set.    Is my work okay? Are there better/cleaner ways of approaching it?


I found out about serial upvoting detection today (lost 81 rep; I can't imagine how serial upvoting would result in that value, but let's ignore that for now). I decided to go on about my business of the day.  I open tabs for the tags I know about. I open tabs for a bunch of recent questions that look reasonable (including those that have answers, even accepted answers). I go through and start voting, blessing those answers that look good. It only takes 30s or a minute to review some questions and answers to know "Yup, that person got it. Well done." Normally I'd drop a +1 on the answer(s) that are right and move on.  Now I'm spooked. What if (like me) there are knowledgeable users who have high activity rates in short periods of time in an area? Do I have to wait a few minutes between upvotes so that I don't erroneously get flagged as a serial upvoter? Do I have to ensure that I throw a -1 between each +1? Do I have to ensure that I +1 someone else before I +1 the same person twice in a row? Or does the heuristic properly ignore upvotes on answers that temporally proximal to the upvote time, and I'm safe?  I suspect that many will say "We can't give away the secret of the heuristic, or the sock puppets will use that information to work around the system!" But I don't want to start 'working around the system' out of fear due to lack of knowledge.  How can you assure me that the behavior I'm describing as a morning routine will not 'waste' my votes and 'punish' helpful users (by depriving them of deserved upvotes)?

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


I have a raco double two device gang box in one of my rooms. I found that a couple of those holes are stripped. Is it better to trying to tap it at 6/32 again, go to the next size which is 8/32 (tremendous difficulty finding 8/32 screws that are painted white or maybe i have to paint them) Or replace the box? What would you suggest?

The metal double-gang box (40 yrs old) is stripped where you place the 8/32 screws. I should have replace the box in the beginning. It took me an hour or so to put a nut on both of these screws from within (not touching any wires) behind the stripped holes to hold the screws. Do most electricians replace the box or get the next size screws up (10/32)?


Everyone. I'm a new user of Linux, very beginner to be fair. I'm trying to keep myself away from Windows/MAC. After hours of surfing,I did not success on my task yet. I would like to use my Epson v550 to digitalize my 35mm negatives. I download Epson drivers, but the programs I tried so for none of them they show up the scanner, xsane, VuScan, and also Image Scan. Any help would be appreciated. I hope there is a solution out there, instead of going to my Windows Partition.

I have a v500 scanner, but it doesn't show up in simple scan. I've turned it off and on a few times to see if that was the problem. Here is the usb information:  Bus 002 Device 008: ID 04b8:0130 Seiko Epson Corp. Perfection V500 (GT-X770)


I have a Material that someone else created that I import into my file. I would like to have this first import be a "Master" copy and duplicate that one for when I would assign it to an object. I could then modify the copied material without affecting the original Material that was imported. That way if I accidentally change one of the attributes, I can easily "reset" it by copying the unaltered default. Is there a way to do this?

I want to create a new material based on an existing material. For that a need a copy of the existing material as a starting point. How can I make such a copy?


Today I played an offline game (like Euro Truck Simulator 2) on my personal steam account on my laptop. My daughter wanted to play Mirror's Edge on the desktop computer on the SAME!!!!!! account.  Steam kicked me from my account because she run that game, closing my game. I am not using Family Share, so I don't understand why this happened. How can I prevent this in the future?

I own a lot of games on Steam, and I'm overall a big fan of the service.  However, one thing about it really bothers me, and I'm wondering if anything can be done about it.  Let's say I have two different online, multiplayer games, both of which I legally own.   If I bought these games normally, I could be playing one of them online, while my fiance could play the other one online on another computer.     However, with Steam, I can only be signed in on one computer at a time.  So, despite the fact that I have bought about 40 games, if I'm playing one of them, someone else in my house is not able to play any of the others.  Is there a way to get around this?  I don't think this is illegal or immoral as I own both of the games in question, and only one person is playing the game at a given time (same IP address and the same household, so it should be easy for Steam to verify that I am not sharing my games unfairly).    If I had bought simple boxed copies, this wouldn't be an issue, but since I became such a fan of Steam, I can't play any of those games at the same time as my fiance.    Is there anything that can be done?


Is there any way to capture all the places in a String, where there are punctuation marks like '.,:;!?'      Basically, am looking for a regex that captures all the above.

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


in Microsoft Windows you can right click on a folder for Properties and it will report Contains # files and # folders  Is there a way to do this in linux on the command line?  I want to know the total number of files and the total number of folders under a given folder as well as within any and all subfolders from that starting folder.

How can I use word counter (wc) and piping to count how many files or directories are in the /usr/bin directory?


Example sentences:  You can only see pictures [that] they have picked.  I've got those letters [that] she sent me.  I don't like "that", but without it it feels like something is missing.  Thank you.

Sometimes, the word 'that' to introduce a dependent clause is optional.  For example, these sentences both make sense with or without 'that':  Long books [that] religious people like tend to be Bibles. Water tanks [that] fish need are spacious.  ... whereas in these sentences, 'that' is mandatory and the sentence is ungrammatical without it:  Those that are rotten must be thrown away. Cars that break down endanger pedestrians.  I can't quite put my finger on the rule which determines when 'that' must be used.  What is it?


The regex -?\d+ [+|-|*|/] -?\d+ matches expression 1 + 3 without any problems also 1 + -2 without any problems, but I don't know why it does not match 1 - 2. Could you explaing why it does not match the - char correctly?  By my regex I wanted to achieve:   optional - at the beginning string of digits whitespace then operator then whitespace optional - before second stringof digits

Pattern pattern = Pattern.compile("^[a-z]+$"); String string = "abc-def"; assertTrue( pattern.matcher(string).matches() ); // obviously fails   Is it possible to have the character class match a "-" ?


I would really like some help to make a dodecahedron! That means i would like to make a "ball" form made entirely of pentagons.

I've been thinking of animating some dice and while most are easy to make, I'm having some trouble figuring out a way to generate a regular dodecahedron. I could hand build it but it would be potentially uneven. Would using the base of a 5 sided cylinder and then some variation on spin be the best option or is there a better way?


My book defines Carmichael numbers like this:     Let $n$ be a composite number. Then $n$ is said to be a Carmichael number if $b^n \equiv b \mod n$ for all integers $b$.   Question:     Prove that a composite number $n$ is a Carmichael number if and only if $b^{n-1} \equiv 1 \mod n$ for all integers b with $(b,n)=1$   I proved the only if part as follows: Let a composite number $n$ be a Carmichael number. Then for any integer $b$, $b^n \equiv b \mod n$. In particular, if $b$ is any integer with $(b,n)=1$, then  $b^n \equiv b \mod n$. Thus $b^{n-1} \equiv 1 \mod n$. But I don't know how to prove the if part.

In Burton's Elementary Number Theory, when introducing absolute pseudoprimes (also called Carmichael numbers), the author states that they are composite numbers $n$ such that $a^{n-1} \equiv 1 \pmod n$ for all integers $a$ with $\gcd(a,n) = 1$.   When showing that 561 is an absolute pseudoprime, he then concludes that $a^{561} \equiv a \pmod{561}$ for all $a$.   I searched a bit on the internet, and it seems that these two are actually equivalent definitions of a Carmichael number. However I have not been able to find a proof; the fact that the implication in the title of the post is stated so plainly in my textbook makes me think it is quite simple to see, but I can't seem to understand the argument.


Suppose I begin with the following list [a,b,c], and that I from this list want to create the following list [[a,b,c], [c,a,b], [b,c,a]]which contains all the cycles of the original list. How can I do that in the most efficient way possible?

I have a list with 15 numbers in, and I need to write some code that produces all 32,768 combinations of those numbers.   I've found  (by Googling) that apparently does what I'm looking for, but I found the code fairly opaque and am wary of using it. Plus I have a feeling there must be a more elegant solution.  The only thing that occurs to me would be to just loop through the decimal integers 1–32768 and convert those to binary, and use the binary representation as a filter to pick out the appropriate numbers.   Does anyone know of a better way? Using map(), maybe?


Reading  a few people have assumed that Dumbledore understands Parseltongue but can't speak it. Where is the evidence in the books (or movies) of this?  I've read all the books a few time and the only thing that comes to mind is the memory at Little Hangleton where some of the Gaunts speak it. Unless I'm remembering poorly it isn't indicated if Dumbledore understands them - he lets Harry know that Harry can understand it (as a way of letting Harry know that it's Parseltongue and not English since Harry hears it as English).

J.K. Rowling has stated that Dumbledore was fluent¹ in English, Mermish, Gobbledygook, and Parseltongue. If this is so: Why didn't Dumbledore hear the Basilisk during the events in Chamber of Secrets? There's nothing to indicate Dumbledore was hard of hearing (no ear trumpet!) and he spent enough time in the castle that surely he would have been near the Basilisk at least once or twice. Is there any canon-based explanation for this?  ¹What J.K. Rowling actually said was that Dumbledore understands Mermish, Parseltongue, and Gobbledygook. That's enough of a difference from fluency that I felt I should mention this. Further, J.K. Rowling has this to say about learning Parseltongue:     Q: Since Ron is able to speak Parseltongue in the last book, does that mean that Parseltongue is a language that most witches and wizards can learn or must a person be born with some ability to speak Parseltongue?   JKR: I don't see it really as a language you can learn. So few people speak it that who would teach you? This is a weird ability passed down through the Slytherin blood line. However Ron was with Harry when he said one word in Parseltongue, which I do not know so I cannot duplicate for you, but he heard him say "Open," and he was able to reproduce the sound. So it was one word. Whether he could learn to speak to snakes properly is a separate issue. I don't think he could. But he knew enough, he was smart enough, to duplicate one necessary sound.      So where does this leave Dumbledore when it comes to Parseltongue?


Looking for a few tips to help me with a project. I got a  as a hand-me-down and love the bike, but I am having trouble getting used to the brakes. I would like to do a conversion to disc brakes but I have never done a project like this before. I am an apartment dweller and so this is the only bike I have for commuting so I also can not afford to have it out of commission for an extended period of time while I tinker with it. I am thinking I need a new fork, new front and back wheels, rotors, mechanical calipers, and a mounting system for the rear caliper on the frame. What parts specifically should I get and what advice should I listen to to avoid common pitfalls?

I have a bike (Surly Crosscheck) that is used for commuting and cyclocross. As it's a bit older and disc brakes were not legal for 'cross until recently, it has cantilever brakes for optimal mud clearance.  They also kind of suck for commuting in a rainy city with panniers.  I have been debating doing a conversion to discs for this bike, but I don't really know what I'd need to replace, so a list would be highly helpful, then I can price it out and decide whether or not I should just buy a new bike... Possibly I could also keep the cantilever on the rear and just go with a disc on the front for good stopping.  Presumably the wheels and front fork at the least would need to change. As would the brifters as those probably pull differently. What else would I need?