Can I use shingles from lattice in ggplot2 in R

Question: It is possible to use the shingles to define specific ranges in ggplot2.  As far as i understand shingles are a way to generate groups.  Can we create such shingles and use them in ggplot2 facet_grid to obtain graphs?
Comment: Shingles are a bit more than "defining groups". They are overlapping ranges of the conditioning variable, hence the term "shingle". If there isn't a shingle concept in ggplot2 then I don't think you can do what you propose for the reason that an individual sample can be in two "groups" where the ranges for two shingles overlap.
Comment: @Gavin, I agree with you.  But so far I have seen that ggplot2 pretty much replaces lattice, and does seem to be easier to use.  I just want to know if it is actually possible to do what you say, "an individual sample can be in two groups where ranges of two shingles overlap"
Answer: Following up from the comments, ggplot can't draw shingles (in the way lattice draws shingles with special indicators in the strip) and by default doesn't have a means of producing the overlapping groups.
However, I cam across this excellent PDF document which aims to produce a gpplot2 version of every figure in Depayan's excellent Lattice book (Lattice: Multivariate Data Visualization with R).
Page 31 contains a custom function fn() which replicates the behaviour of equal.count(), as far as I can tell, to provide the correct data structure to plot with overlapping shingles. The PDF contains plenty of examples of "shingles" in ggplot that you can play with.
So not sure if this answers the Q - but at least it appears one can fudge ggplot into producing plots that use the shingle concept.


Loading purchased music onto my iPhone 5S

Question: I have purchased a lot of music from iTunes on my MacBook. Whenever I select that music to be moved to my iPhone, it appears (on the iPhone) with a "Cloud" icon beside it. As far as I can tell, the only way I can play this music is to re-load it from the "Cloud" - which the phone tells me will cost money. Why is this happening? I have already bought the music! All I want is for it to appear, like any other music, on my iPhone, as a playable file. Suggestions?
Answer: Make sure the iPhone and iTunes are connected to the same iTunes store account and are both 'authorized'. Then you should be able to drag-and-drop in iTunes between your computer and iPhone.


Docker + Django if_debug template tag is not working

Question: I am running a docker-compose with nginx routing requests to my Django server, with this config:
upstream django {
    server backend:8000;
}

server {

    listen 80;

    location / {
        proxy_pass http://django;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Host $host;
        proxy_redirect off;
    }
}

To use the {% if debug %} template tag I know I need both the correct internal IP and the DEBUG setting turned on. I get the correct internal IPs by running the following code snippet in my Django settings.py:
import socket
hostname, _, ips = socket.gethostbyname_ex(socket.gethostname())
INTERNAL_IPS = [ip for ip in ips] + ['127.0.0.1']

When I docker exec -it backend sh, and import the DEBUG and INTERNAL_IPS settings, I get that the values are ['172.19.0.4', '127.0.0.1'] and True, respectively. Then, when I run docker inspect -f '{{.Name}} - {{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' $(docker ps -aq) to check the containers' IP address, I see that the backend container that runs Django has an IP of 172.19.0.4, same as the internal IP.
Despite this all, in the Django template, I get a Django debug mode error (further proving that debug is turned on) that says that an error got triggered on line 61!!!
57    {% if debug %}
58
59
60    {% else %}
61    {% render_vite_bundle %}
62    {% endif %}

Can someone help me understand what I'm doing wrong and why this template tag won't work? Is there an easier way to do an if statement based on the Django debug setting? Thanks in advance!
Answer: I figured it out! I was getting the IP of the backend container when I typed hostname, _, ips = socket.gethostbyname_ex(socket.gethostname()), but what I really wanted was to mark Nginx's forwarding as "internal". So, I changed the line to hostname, _, ips = socket.gethostbyname_ex("nginx") and the request got forwarded correctly. Might be worth it to consider whitelisting all of the DOcker containers' internal IPs so we can receive messages freely.
Comment: Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer).


Pokemon Go Evolving a Pokemon vs Catching it in the Wild

Question: Is there a difference if I were to evolve a pidgey into a pidgeot vs catching a pidgeot in the wild?
Answer: There are multiple.
The biggest one is that pokemon you evolve tend to have a higher CP than an already evolved pokemon in the wild but their maximum CP will always be the same. An exception would be if you evolved a pokemon when you're at level 5 but then you catch the same pokemon at level 10. Because your maximum CP for every pokemon is higher with trainer levels the pokemon you find also have higher CP.
The other reason is that you gain a fair amount of experience from evolving a pokemon. It is 500 experience per evolution and an extra 500 if the evolved pokemon is not something you have caught before.
Comment: But their maximum CP would be the same?  Then wouldn't it be better to just save the candy to power up the pidgeot instead of evovling?
Comment: Evolving doesn't spend dust and powering up does. For something as common as pidgeys it is extremely easy to get pidgey candies while stardust is universal and should be treasured more.
Comment: Potentially yes but also keep in mind catching evolved form of pokemon is significantly harder especially for something as strong as Dragonite. Also stardust used for power ups gets very very expensive. Case by case basis.
Comment: yes. The Maximum CP would remain the same, they only change with an increase in Trainer level.
Comment: I'm using pidgey as an example but for rare pokemons like Dragonites, it would be better to just save the candy to powerup than evovle a draginti?  Or Gradados, because 400 magickarp candies...........
Answer: I caught a Pigeoto and evolved a Pidgey but the wild one was still stronger; plus the wild one has better attacks. I do not understand it. Might as well evolve the wild Pigeoto at some point and just power up to max CP.


"close" pop-up box bug on mobile site

Question: There's a small bug with the "close" pop-up on the mobile interface; if I've already voted to close, then when I click the "close" link, nothing comes up.
Answer: It seems to have been fixed (maybe when we added the "retract vote" feature).
Comment: Wow, kudos to you for keeping even the oldest bugs on your radar. Glad this is fixed.

"close" pop-up box bug on mobile site


cross compile net snmp for arm processor

Question: i just want to cross compile net snmp for arm cortex a9 (cyclone v soc altera).
can anybody tell me how to proceed step by step?in custum board my ram is 4 gb and sd card 8 gb .i want to compile full version .
Answer: Not tested with this particular package and architecture but generally it should work as long as configuration needed (e.g. Kernel version) is not too odd:

Get Buildroot from https://buildroot.org/
Install the required packages from https://buildroot.org/downloads/manual/manual.html#requirement-mandatory
Do make menuconfig, choose your architecture, Linux Kernel and whether you want to compile with glibc or uclibc, dynamically or statically and such. Exit (Esc-Esc) and confirm to save the settings.
make toolchain
make netsnmp


Subsonic MySQL Version

Question: I understand that Subsonic 2.2 requires the MySQL.data  5.2.3 dll.  I'm trying to integrate a subsonic DAL for a VB project in Visual Studio.  The project already uses a lot of datasets.  Because of this, Visual Studio requires that I have the MySQL NET connector software installed, which automatically throws its own MySQL dll deep into my system.
The problem is that with the MySQl NET Connector installed on my system, I can't include the MySql.data 5.2.3 dll with my project because it complains that I have two conflicting versions of the same dll.
The closest Net Connector version I can find to install is 5.2.6.  Subsonic demands 5.2.3.  I can't seem to use both in the project.  What the heck am I supposed to do?
Answer: You can try to build SubSonic from source using the MySql.dll that you are using in your project.  Thats what I did once.

Subsonic MySQL Version


AC Gearmotor 115 Nameplate RPM 4.0 RPM Max. Torque 75.0 in-lb trips breaker when switch is turned off

Question: To whom it may concern, I recently purchased a Dayton AC Gearmotor 115 Nameplate RPM 4.0 RPM Max Model #
52JE07. Torque 75.0 in-lb. The gear motor is single phase with two wires L1 and L2 respectively with no ground. I wired this into a 20 amp industrial switch. From the switch is 10 feet of 14 gauge extension cord to plug to my outlet. When I turn the switch to off, it blows the 20 Amp circuit breaker in my box every time. This motor does not require a capacitor according to the technical specs provided by Dayton. I did not ground the plug nor the switch as the motor is two wire. I switched neutral and hot on the switch and vice versa from the L1 and L2 terminals with absolutely no change.  There are GFCI outlets in the circuit where I am plugging into. They do not trip, only the main breaker. I can turn the motor off and on by tripping the GFCI breaker on the next outlet leaving the switch on. As soon as I turn the switch off, trips the breaker. My question is, should I wire ground to neutral on the switch from my plug wire? Any ideas of what could be causing this?
Comment: please draw a diagram of the electrical connections
Comment: Why are the connections labeled L1 and L2 given this is a 115 V AC motor?
Comment: Jim, I honestly do not know why they labeled them L1 and L2 on this 115 AC motor. Here is a link with Daytons basic drawing.  https://www.grainger.com/ec/pdf/1MBF3_4.pdf
Comment: Did you try hooking it up without the switch?
Comment: Is the circuit breaker a GFCI breaker, or is it a plain breaker?  Does it have a TEST button?  Or is it an AFCI breaker?
Comment: Did you try hooking it up without the switch? I did not previously wire it without a switch.
Comment: Is the circuit breaker a GFCI breaker, or is it a plain breaker? Does it have a TEST button? Or is it an AFCI breaker? – Harper - Reinstate Monica They are AFCI breakers.
Answer: I'm pretty sure you wired your switch wrong, and "off" (so you think) is a dead short.


how to get data from database when there is a update in any table in the database

Question: Like some user x updates some info on website and some other user z should receive a notification about x's update without he refreshing the page.
Comment: For that i would suggest to do this with cron job.
Answer: Without getting too technical, you could use a combination of an event dispatcher and a method to push notifications (like a websocket service).
Your websocket service should subscribe to your event dispatcher.
When an update takes place, dispatch an event, which your socket service will then use to send out the data to the proper set of users.
On the web app's side, you'll of course have to be subscribed to the websocket and then do whatever's needed with the data that comes in.
This method (using the event dispatcher) means your services are not tightly coupled and therefore more maintainable and testable.
Answer: This is a very large question that implies a lot of different notions.
You should work at different levels (server, client and database) with multiple possibilities each time.
1) client pull
In the client page (user Z), you should send AJAX requests every once in a while (every 1 sec?) and the script on the server side should detect what values have been changed since the last request. This heavily relies on the existence of a timestamp field that is updated using triggers on every SQL insert or update (or delete?).
2) server push
Using websockets, the client (user Z) keeps an open connection to the server. On the server, a process is running constantly in the background and periodically checks the database (every 1 sec?) for updates (again based on timestamps) and sends the difference to the client on the websocket.
Detect changes
If your database does not fix some identifiable timestamp or id or else, you may try to execute an external program using triggers which will probably add another level of complexity.
Answer: <code>window.setInterval(function(){
  /// ajax call here, for example:
    $.ajax({
       type: "POST",
       url: 'your-url-to-check-if-there-is-any-updates',
             dataType: "html",
             data: { your data},
             success: function(data) {
              // do something with notifications
              return data;
             }
   });
}, 5000);
</code>
This will check your table every 5 seconds. You will need to send old data to url to check if there is something new, and if so, do something in success function.
However, this is not recommended.
As @Simon said, use websockets, for example: sockets.io


Python won't run in terminal

Question: In an attempt to get CairoPlot to run correctly on my Ubuntu 11.04, I stupidly copied the CairoPlot.py into my /usr/local/bin/python dir. When I realized that this wasn't the way to go, I deleted the file, now running 'python' in terminal just hangs, I have restarted the machine, any ideas?
Comment: Try re-installing python (easiest way is Synaptic).
Answer: sudo apt-get --reinstall install python

This will reinstall python from the command line, if you don't want to use Synaptic like loki2302 suggests. (Synaptic would be fine, of course.)
Comment: Note johanvdw's answer below. The "local" means you've installed it not using the normal package management system.
Answer: Since you have an error after touching a file in /usr/local/bin, reinstalling python the ubuntu is most likely not needed and won't help at all.
Probably you have installed a version of python yourself in /usr/local, which is now damaged. You can verify this by running /usr/bin/python. This should still work, whereas /usr/local/bin/python should give your error.
In this case you should uninstall your own version of python. If you still have the sources available you can use sudo make uninstall. Otherwise you should delete the python programs in /usr/local/bin (note the local).
Answer: other wise if the Python won't run in terminal post does not work
Try purge python which will remove all files and directories installed. It will also let you know if it can't remove a directory because there were files in it that it could not delete. You might find there was an other file in there that was causing problems. Which you should also delete.

sudo apt-get purge python
  sudo apt-get install python
Answer: I would guess that /usr/local/bin/python has /usr/bin/env python set as interpreter, hence making it run in infinite loop. (since /usr/local/bin comes before /usr/bin/ in $PATH.
Type which python, and if it is /usr/local/bin/python, then just delete/rename that file. Packaged python is installed in /usr/bin/python and will work again. (Try which python, it should give you /usr/bin/python now).
Answer: What worked for me, was to start the
apt-get purge python

then kill it after a few minutes, then open a new terminal and:
apt-get --reinstall install python

Python won't run in terminal


Creative Commons for physical objects?

Question: Does anyone know if it is possible to file physical objects under creative commons or something similar?  I don't want to make money off anything I make, I want to show the public how to make it and if someone uses one of my creations for a not for profit cause then all the better. That being said I also don't want someone else profiting off something I have created.  Any suggestions would be great!
Answer: I understand your concerns, but even if you were able to protect your ideas (see @endolith, @jluciani) you would still face the "make me" crowd.  That is, people who will make money off your design anyway.  When you remind them that they can't (if you've gone through the effort and expense of a patent), they may just say "make me".  Then you have court costs on TOP of everything else.  Sure, if it's a clear-cut case you may be able to get a lawyer to take on your case without charge (knowing the reward will be huge), but it's still an incredible time sink, and that's if you're lucky.
I'd say, just go ahead and say your work is under the spirit of the license.  People may try to make money off of it anyway, and by just putting it out there you save yourself a lot of time, money and effort.  Honestly, you're more likely to get some consulting side gigs out of it if you build something really cool.  Of course, that's my opinion on the subject and it doesn't really give you the answer you were looking for.
Answer: Try this one, it should do the trick -> Non-commercial CC license
It's more effective than any patent for what you need - as an individual or small business you couldn't afford to do anything in the way protecting your product from the big guns.
The big boys use multiple patents and trade marks - plus they have a colossal legal team to back them up in a court of law. So from that point of view, there's fairly little you can do to protect your ideas. However - the Non-commercial CC license should protect you from the majority of idiots from running off with your hard work.
Good Luck!
Answer: Similar question: Best licenses for Open Hardware
Creative Commons can be applied to anything that's copyrightable.  PCB layouts are copyrighted all the time, which is what most companies try to do to protect their designs, but anyone can re-design the same circuit and it won't be a violation, just like paraphrasing text.  You can copyright creative expression, but you can't copyright an idea.  To protect a circuit, you need to get a patent on it.
Even architecture can be copyrighted in some places.  The number of things you can copyright and the length of time they're protected is increasing all the time...
Answer: Unless you patent your idea and grant rights there is no legal
way (in the U.S.) to prevent someone from using your idea for
any purpose. Creative Commons (copyright protection) only
protects the documentation.
If someone rewrites the documentation then they hold
the copyright to the new documentation. If they copy
significant pieces you may have some recourse.
Answer: "I also don't want someone else profiting off something I have created."
I think that's the wrong attitude.
Making and selling something usually requires more effort (and is IMHO less fun) than designing something, so using your idea commercially wouldn't be freeloading.
And you gain more the more your design is used.
Comment: It's his choice.  Under a NC-only license, people can still make money off it - they just have to talk to you first.  Maybe you want to be involved in the making and selling stage, or know that even a small cut of the profits will be a huge amount for you.   I don't know why everyone's so deadset against people making money off their designs.
Comment: That's a good point...if you don't plan to make money off your idea, why are you so against someone else attempting to?
Answer: Very, very few ideas are worth commercializing.
Those ideas that are worth it are very hard to commercialize.
Given that, you can release everything of yours into the public domain, and it's such a low chance that someone will profit off it that it's probably not worrying about.
However, you will reap great rewards through simply showing people that you can do particular work well.
Further, the people who would rip you off are not your customers - in fact they could likely do the work themselves, but are seeking a shortcut for an idea they already have.  Your customers are people who can't do what you can do, and can't do what the people who would rip you off can do.  So there's really no conflict of interest.
If you successfully protect your work from being used commercially, it doesn't mean those people are going to fall in line and license your design - it just makes them look for another way to accomplish their goals without being caught, or without doing something that would fall afoul of the law.  Any effort you put into protecting your work is wasted - you should instead spend it on creating more, and protecting less.
So there's no benefit to protecting your work:

Ideas are rarely worth commercializing
Good ideas are very hard to commercialize
The people who would steal it aren't your target audience
Your target audience isn't going to be able to steal it
The people who steal it will find a way around any roadblock you put up anyway

Creative Commons for physical objects?


How to make hostnames of VM's visible to host OS?

Question: I have a Windows XP host that is running two VM's (Windows Server 2003) and the VM's are configured for NAT. Is there any way to make the hostnames of the VM's visible to the host OS without changing to a bridged network type?
Answer: Since your question is ambiguous, I will assume you mean "Can I access guests running on a host machine by using WINS hostnames?"
No, this is inherent to the way NAT works; a router handles unicast requests from the 'inside' of the router to the 'outside' (and the respective unicast replies in the opposite direction). Since WINS is a protocol that relies on broadcasts, which are dropped by the router, the host will never see WINS broadcasts from the guests. On a normal managed router, you could define rules that would allow the router to forward broadcasts, however neither VMware Server, Workstation nor Player allows you to modify the built-in routing logic.
Using DNS hostnames is not an alternative, since the router will need to have specific routes defined to forward traffic, this is also not possible with the aforementioned VMware products.
Comment: Yes, bridged is the option.. this makes it so the Virtual Machines are connected to the network in the same fashion as the host computer.  They are on an equal footing and can communicate and see each other at that point.
Comment: So a bridged network type is my only option?
Comment: Well there is the option to use "Host Only" network, however your guest VM's will not be able to access *any* other network resources (including an internet gateway).
Answer: And a second NIC to your VM on the Host-only network, and use that.
Maybe if you tell us what you're trying to do we can direct you to the best solution? :)


How does TCP client know the destination port at the beginning of the handshake?

Question: I know that at the beginning of the handshake, the client should fill in the Destination IP (For IP Layer) and Destination Port numbers for the segment to be correctly delivered to the server. A client can learn the Destination IP by using the DNS service, but how does TCP know the Destination Port number (suppose it is not a well-known port), at the first step of the handshake?
Answer: For most applications the port is actually well-known. These are usually maintained by IANA. Then there are product specific protocols which are not maintained by IANA but where the (default) ports are coded into the product itself. Any ports outside these defaults are usually explicitly given by the user (like using a URL like http://host:3000/ for port 3000 instead of http://host/ for default port 80).

suppose it is not a well-known port ...

And then there are some mechanism where ports gets assigned dynamically or where ports are looked up using some external mechanism. For example FTP (file transfer protocol) uses TCP connection for data transfer which are separate from the control connection which only transfers commands. The ports for these data connections get dynamically assigned and then send inside the control connection using commands like PORT, PASV, EPRT, EPSV to the peer so that it knows which port to connect to. A similar mechanism is for exchange of RTP data (usually UDP not TCP) inside SIP (a VoIP protocol). Additionally some protocols (like SIP) might use DNS SRV records to look up the IP and port needed to connect to a specific service.
In other words: there is no single mechanism to find out the port. There are a few common mechanisms adapted by several protocols (i.e. IANA maintained, hardcoded into product, SRV records) but there are also product- or protocol specific mechanism (like in FTP). To find out which mechanism gets actually used look at the specific protocol.
Answer:
how does TCP know the Destination Port number (suppose it is not a well-known port), at the first step of the handshake?

TCP is told which port to connect to by the application opening the socket. The application needs to know. Commonly, the application just uses a 'well-known port' - like TCP port 80 for HTTP. Otherwise the application has to be configured or instructed to use another port. Rarely, it just guesses and tries various ports.
Answer: First, understand that TCP, itself, knows nothing about clients or servers, which are an application concept. TCP creates connections between peers.
There are some standard port assignments for services. These are maintained in by IANA in the Service Name and Transport Protocol Port Number Registry.
For example, TCP port 80 is reserved for HTTP. If a web browser wants to communicate with an HTTP server, it will default to sending requests to TCP port 80. That is not to say that an HTTP server cannot use a different TCP port, but a web browser would need to know ahead of trying to connect that the HTTP server is using a non-standard TCP port.


Movies and Songs are my listening troubles

Question: I have almost no problem to understand English speech or radio talk and I can communicate with native speakers with no problem but surprisingly I can't recognize the words in movies and  songs. I've read somewhere that using subtitle and lyrics just worsen listening skills. So would anyone please tell me what to do?
Comment: Some movies, I'd be happy if I understood 70% of what they said - & I'm an English native :P If you have 5.1 with variable volumes pushing the centre channel to make speech louder than 'soundtrack' may help [sometimes]
Comment: I can't recognize the words in some movies either
Comment: What language, what kind of movies or music? Some examples might be helpful. My guess would be it is because verbal expression in music and cinema is different than in normal speech.
Comment: Subtitles are often paraphrases, so they can be counterproductive, it's true.
Comment: In my experience, if you can understand about 70% of something, you will understand more of that type of thing with more experience. If you understand less, using subtitles or reading lyrics should help, not hurt. It would be a lot better to watch the movie, or at least part of it, repeatedly, seeing if you can eventually understand about 70% or more without the subtitles. It takes time, but it does generally work.
Comment: More seriously, I find with subtitled [foreign, to me] movies that I can either read or listen, my brain doesn't get time to do both, so I usually stop listening & read.
Comment: Use subtitles, then watch or listen again without subtitles.  It helps.
Answer: There are a few things you can try to help with comprehension.

For films, try searching out written summaries of the film to read ahead of time. Having basic context for what you will be hearing can make it much easier to understand the dialog.
Read a screenplay or the song lyrics ahead, and then listen to the film/song without them. Again, you'll have a general idea of what you are listening for, and then can train your ear to listen for the words you remember from your reading.
Repeated listening. Listening to a short section of a film over and over will help you build comprehension. You can also try writing out the dialog as you listen. If you are the type of person who needs to write to retain information, this can really help you absorb what you are hearing.
Switch up the genres you are listening to. Some films and songs are just easier to understand than others. Ask a native English speaker from the US how much they understood of Trainspotting, for example, and I suspect every one of them will tell you they needed subtitles. On the other hand, a movie where the characters talk slowly and clearly like The Wizard of Oz takes a lot less work to understand. I apologize that my movie references are both so dated - they are just the ones that came to mind today!
Answer:
I've read somewhere that using subtitle and lyrics just worsen listening skills.

Don't believe everything you read.
I'm a native AmE speaker and I like turning on subtitles!
If you know that always reading subtitles might be a distraction from acquiring language listening skills, then just don't do that when the subtitles are on.  It's not like subtitles are the product of the some evil anti-language-learning Illuminati.  I also have to read lyrics to understand them.
Also, that advice--if it has merit--would probably be more applicable to someone still learning how to hear English, which wouldn't apply to you.
Of course, sometimes lyrics/subtitles are good, sometimes lousy.  But what other option is there?  None really.


Detecting person on the picture if we know it is there

Question: I implemented an algorithm for pedestrian classification using Keras and Tensorflow and it is quite good, it has 96 percent accuracy on test data. It gives you information about existence of a person on the picture. Now I want to use that to detect where the person is. How to do that? For example, I want to build rectangle around the pedestrian but I don't know how to do that if I already know that there is a person on the picture.
Answer: What you are trying to do is called object localisation. If you have multiple of that object in the scene it is called object detection. There are numerous things that you can try that I refer to some of them.

YOLO paper which may be the perfect thing for your task which has the state of the art performance these days.
There is another algorithm which is old and is not efficient but is a simple way of detecting objects. It is not that much accurate. It is called Sliding Window.
The previous algorithm is time-consuming due to the fact that it calculates repetitive calculations. In OverFeat: Integrated Recognition, Localization and ... paper they have tried to overcome that mistake.

There are other approaches too because object detection is an important task in computer vision and every day someone makes another approach. You can see the citation of the mentioned papers which means there are abundant studies about the problem.


Which layer in a CNN able to detect spinned and translated objects?

Question: Does the conv layer, max pooling layer, or anything else do the job? In my opinion, the Conv layer or max pooling layer is able to do the job only when the rotations or translations are not too big.
Answer: Convolutional layers are not equivariant to rotation, and pooling layers only help with invariance to small rotations. "Invariance" of the whole classifier to rotations is not part of the inductive bias, but it's actually learned through heavy data augmentation.
However, for each group action there exists a corresponding group convolution operator which is equivariant to it. This concept is used, for example, in 3D Steerable CNNs: Learning Rotationally
Equivariant Features in Volumetric Data by Weiler, Geiger, Welling, Boomsma and Cohen, 2018,
to design layers which are equivariant to 3D rotations:
https://arxiv.org/pdf/1807.02547.pdf
Answer: For translational invariance, you can follow the discussion here. In general, pooling layer is the important player in local translational invariance by removing the spatial dimension in, for example, max-pooling. For instance, if an object slightly moves towards some direction, max-pooling still captures the max element and the same output will appear after the pooling. The convolutional layer is actually equivariant in translation.
Neither layers are rotation-invariant. Though, the network can exhibit this behavior if the properties of the data, and the overall architecture permit. A NIPS paper addresses this issue and use Spatial Transformers to improve CNNs invariance to rotation, scale and translation.
Comment: now that neither of them reserves rotation invariance, how do modern CNNs detect spinned images by merely using combinations of conv, pooling, etc layers?
Comment: Rotation invariance is not built in to the individual layers, but it doesn't mean CNNs can't learn it. Probably, there is enough data with lots of variety, and enough layers that can make sense of spun objects.


How to install pkg config in windows?

Question: I am trying to do it, but all I can get is some source code that I don't know how to do deal with I downloaded from http://pkgconfig.freedesktop.org/releases/.
Answer: This is a step-by-step procedure to get pkg-config working on Windows, based on my experience, using the info from Oliver Zendel's comment.
I assume here that MinGW was installed to C:\MinGW. There were multiple versions of the packages available, and in each case I just downloaded the latest version.

go to http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/
download the file pkg-config_0.26-1_win32.zip
extract the file bin/pkg-config.exe to C:\MinGW\bin
download the file gettext-runtime_0.18.1.1-2_win32.zip
extract the file bin/intl.dll to C:\MinGW\bin
go to http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28
download the file glib_2.28.8-1_win32.zip
extract the file bin/libglib-2.0-0.dll to C:\MinGW\bin

Now CMake will be able to use pkg-config if it is configured to use MinGW.
Comment: how to change cmake to configure to use MinGW?
Comment: You don't have to use MinGW - you can follow these steps but extract pk-config.exe and the required DLL's to any folder of your choosing (including a new folder), just be sure the folder is in your PATH.
Comment: @cindywmiao: choose a CMake generator with MinGW in its name, like "MinGW Makefiles", from the list of generators. I personally use "CodeBlocks - MinGW Makefiles" which additionally generates a project file for the CodeBlocks IDE.
Comment: it's complicated. is there any newer answer for 2021? it's different now.
Comment: If anyone needs it as a GitHub action. https://gist.github.com/geoffreygarrett/06765936df5b4687d320491517ca5d47
Answer: Get the precompiled binaries from http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/
Download pkg-config and its depend libraries :

pkg-config_0.26-1_win32.zip
glib_2.28.8-1_win32.zip
gettext-runtime_0.18.1.1-2_win32.zip
Comment: I found the needed gtk binaries there too; for pkg-config_0.26-1_win32.zip you need the file libglib-2.0-0.dll from http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28/glib_2.28.8-1_win32.zip and intl.dll from http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip
Comment: But where does pkg-config on Windows look for installed libs?? Where does it go to search for pc files? This is SO confusing and a shame for everybody involved in such garbage software... :)
Comment: Where do I put these files so that they will be found by cmake?
Comment: Place them in the directory `/bin` where pkg-config is located.
Comment: Put the pkg-config executables and dependent DLLs in any folder on the path, e.g. C:\WINDOWS
Comment: You didn't mention where to put them.
Answer: A alternative without glib dependency is pkg-config-lite.
Extract pkg-config.exe from the archive and put it in your path.
Nowdays this package is available using chocolatey, then it could be installed with
choco install pkgconfiglite

Comment: Works well, also the *other* pkg-config listed in the FAQ [here](http://mingw.org/wiki/FAQ) crashes for me on Windows 10 Home as well as Pro.
Comment: what do you mean your path?
Answer: I did this by installing Cygwin64 from this link https://www.cygwin.com/
Then - View Full, Search gcc and scroll down to find pkg-config.
Click on icon to select latest version.
This worked for me well.
Answer: I would like to extend the answer of @dzintars about the Cygwin version of pkg-config in that focus how should one use it properly with CMake, because I see various comments about CMake in this topic.
I have experienced many troubles with CMake + Cygwin's pkg-config and I want to share my experience how to avoid them.
1. The symlink C:/Cygwin64/bin/pkg-config -> pkgconf.exe does not work in Windows console.
It is not a native Windows .lnk symlink and it won't be callable in Windows console cmd.exe even if you add ".;" to your %PATHEXT% (see https://email@example.com/msg104088.html).
It won't work from CMake, because CMake calls pkg-config with the method execute_process() (FindPkgConfig.cmake) which opens a new cmd.exe.
Solution: Add -DPKG_CONFIG_EXECUTABLE=C:/Cygwin64/bin/pkgconf.exe to the CMake command line (or set it in CMakeLists.txt).
2. Cygwin's pkg-config recognizes only Cygwin paths in PKG_CONFIG_PATH (no Windows paths).
For example, on my system the .pc files are located in C:\Cygwin64\usr\x86_64-w64-mingw32\sys-root\mingw\lib\pkgconfig. The following three paths are valid, but only path C works in PKG_CONFIG_PATH:

A) c:/Cygwin64/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig -
does not work.
B) /c/cygdrive/usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig -
does not work.
C) /usr/x86_64-w64-mingw32/sys-root/mingw/lib/pkgconfig - works.

Solution: add .pc files location always as a Cygwin path into PKG_CONFIG_PATH.
3) CMake converts forward slashes to backslashes in PKG_CONFIG_PATH on Cygwin.
It happens due to the bug https://gitlab.kitware.com/cmake/cmake/-/issues/21629. It prevents using the workaround described in [2].
Solution: manually update the function _pkg_set_path_internal() in the file C:/Program Files/CMake/share/cmake-3.x/Modules/FindPkgConfig.cmake. Comment/remove the line:
file(TO_NATIVE_PATH "${_pkgconfig_path}" _pkgconfig_path)

4) CMAKE_PREFIX_PATH, CMAKE_FRAMEWORK_PATH, CMAKE_APPBUNDLE_PATH have no effect on pkg-config in Cygwin.
Reason: the bug https://gitlab.kitware.com/cmake/cmake/-/issues/21775.
Solution: Use only PKG_CONFIG_PATH as an environment variable if you run CMake builds on Cygwin. Forget about CMAKE_PREFIX_PATH, CMAKE_FRAMEWORK_PATH, CMAKE_APPBUNDLE_PATH.
Answer:
Install mingw64 from https://sourceforge.net/projects/mingw-w64/. Avoid program files/(x86) folder for installation. Ex. c:/mingw-w64
Download pkg-config__win64.zip from here
Extract above zip file and copy paste all the files from pkg-config/bin folder to mingw-w64. In my case its 'C:\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin'
Now set path = C:\mingw-w64\i686-8.1.0-posix-dwarf-rt_v6-rev0\mingw32\bin
taddaaa you are done.

If you find any security issue then follow steps as well

Search for windows defender security center in system
Navigate to apps & browser control> Exploit protection settings> Program setting> Click on '+add program customize'
Select add program by name
Enter program name: pkgconf.exe
OK
Now check all the settings and set it all the settings to off and apply.

Thats DONE!
Comment: I liked taddaaa thing!
Answer: In 2022 VS Code works with CMake & pkgconfig out of the box (add pkgconf && vcpkg-pkgconfig-get-modules to your vcpkg.json)
Comment: which version of pkgconf do you have? could you post the structure of the .json file?
Comment: You could check out [VSCode vcpkg plugin page](https://learn.microsoft.com/en-us/vcpkg/get_started/get-started-vscode?pivots=shell-cmd), also I can achieve the above just by calling `vcpkg install` to install each mentioned packages.
Answer: Another place where you can get more updated binaries can be found at Fedora Build System site. Direct link to mingw-pkg-config package is: http://koji.fedoraproject.org/koji/buildinfo?buildID=354619
Comment: that page assumes Mingw. I run Visual Studio 2008 on my Mac from a VM. Hard disk space is scarce. I don't want to install mingw or Cygwin only to be able to run pkg-config. pkg-config missing is an error spat out by cmake. I feel lost in that mess
Comment: That site does seem to have more recent builds, but the build you linked to is out of date. The package link is actually http://koji.fedoraproject.org/koji/packageinfo?packageID=13212
Comment: Following up to my previous comment: those downloads don't help; I extracted the file with 7-Zip and had no idea what to do next. Instead I went with the instructions on the following site, despite them calling for a less up-to-date build: http://www.gaia-gis.it/spatialite-3.0.0-BETA/mingw_how_to.html#pkg-config
Answer: for w64-based computers you have to install mingw64. If pkg-config.exe is missing then, you can refer to http://ftp.acc.umu.se/pub/gnome/binaries/win64/dependencies/
Unzip and copy/merge pkg-config.exe into your C:\mingw-w64 installation, eg. into on my pc into C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin
Answer: From: https://github.com/JoinMarket-Org/joinmarket/wiki/Installing-JoinMarket-on-Windows
This guide describes how to install JoinMarket and its dependencies (python, libsodium, secp256k1) on Windows.
Some or all of this may or may not work for all versions of Windows. Reports appreciated. It is not claimed to be in any way comprehensive. Verification of downloads are your own responsibility.
Install JoinMarket - go to https://github.com/JoinMarket-Org/joinmarket/releases and download the most recent release. Unzip it into any location you choose.

You will need to install MinGW from here or go to their website. After a few introductory screens, you will be shown a windows with some optional components that you have to choose; this basic setup is sufficient:

From "Basic Setup" in the left menu:
mingw-developer-toolkit
mingw32-base
mingw32-gcc-g++
msys-base

Once you have chosen these, choose "Update" from the main menu first item. These components will be installed into C:\MinGW\bin. Once that is complete, you should have this dll: libgcc_s_dw2-1.dll in that folder C:\MinGW\bin, along with a lot of other files; I'm mentioning this file explicitly, since it's needed specifically for libsecp256k1 to operate in this setup.
Next, you must make sure C:\MinGW\bin is added to your PATH variable. Here's one guide to how to do that; you must append ;C:\MinGW\bin to the end of the path before continuing.
Install Python from https://www.python.org/ftp/python/2.7.11/python-2.7.11.msi. Run the executable. Choose to install the feature Add python.exe to Path (it's the last option in the installer, off by default - switch it on) on local hard drive during installation; Python should then be installed in C:\Python27 (EXTRA NOTE: the most recent 2.7 installation linked here seems to install pip automatically, which is very useful for step 4)

Check that Python runs. Open a new command prompt as administrator by typing cmd.exe into the Start menu and pressing Ctrl+Shift+Enter. Type python and you should see something like:

Python 2.7.11 (default....
....
>>>

Exit the Python console with exit() or by pressing Ctrl+C. Now, make sure your version of pip is up to date: run the command: python -m pip install --upgrade pip.
Go to the directory C:\Python27\Lib\distutils and add a new file, called distutils.cfg. Inside it, put:

[build]
compiler=mingw32

Close and save the file.
Next, you need to install the dll for libnacl. First go to https://download.libsodium.org/libsodium/releases/ and choose the file libsodium-1.0.4-msvc.zip to download. Unzip anywhere, and then copy the file libsodium.dll from the directory \Win32\Release\v120\dynamic (do not use v140), and paste it into root joinmarket directory (the same directory where README.md lives). Then you need to address the Visual C++ 2013 runtime dependency. Do so by going to www.microsoft.com/en-us/download/details.aspx?id=40784 and clicking Download. Choose x86 even on a 64-bit system, and run the executable.

Note that after doing this, you must run pip install -r requirements-windows.txt from the Joinmarket root directory (where the README.md file is) and should not get an error message (this will install/check the python packages libnacl and secp256k1(-transient)).

How to install pkg config in windows?


Can blender game engine hide vertices that are not visible to the camera?

Question: Is it possible for the Blender Game Engine to hide any vertices/faces currently not visible to the camera in order to optimize game performance? This would be for parts of meshes specifically.
Answer: Yes, it can. This is done by using the Occlude physics type; this makes an object hide all other objects (or parts of objects) behind it. This does, however, mean that it can only be applied to Static (physics type) objects, since an object can't have two physics types, and the Occlude type works like the Static type (i.e. it doesn't move).
Keep in mind that:

If the occluders are small and don't hide many objects.

In that case, occlusion culling is just dragging your CPU down).

If the occluders are large but hides simple objects.

In that case you're better off sending the objects to the GPU).

You can read the wiki for more details about performance.
Answer: To build on @someonewithpc 's answer;
This is generally used to set up render zones where static doors or walls with occlude enabled hide rooms with complex geometry.
Another way is to parent an occlude to the back of the head of you character;
This will hide pretty much everything you can't see.
Comment: Could you please elaborate on the second way, which involves parenting an occluding object to the character?
Comment: I'm sorry, I wrote this answer a while ago and more extensive testing shows that the second way does not work. :-(


Does a relief pitcher who loses the lead then regains it get a win?

Question: Starting pitcher ends inning with a 3-1 lead.  New inning, relief pitcher gives up two runs for a 3-3 tie.  Bottom of that inning we go ahead and finish with a win. Which pitcher gets the W?  Seems odd if the relief pitcher who blows the lead would get the W.
Comment: https://sports.stackexchange.com/questions/21330/mlb-rules-for-blown-save-and-win-by-same-pitcher
Comment: There is an exception that "a relief pitcher who is
ineffective in a brief appearance" does not have to be awarded the win, even if their team takes the lead while they are pitcher of record.  However, I think "brief appearance" usually means something like 0 or 1 outs; if they pitched a full inning, even if badly, this normally wouldn't apply.
Answer: Rule 9.17(a) states:

The Official Scorer shall credit as the winning pitcher that pitcher whose team assumes a lead while such pitcher is in the game, or during the inning on offense in which such pitcher is removed from the game, and does not relinquish such lead
[ some exceptions which don't apply here ]

The relief pitcher in your example meets that definition, so they are the winning pitcher. What you're finding here is that wins and losses for pitchers aren't a very good measure of very much at all.
As an aside, as the relief pitcher entered the game in what was a save situation (a lead of no more than 3 runs) and failed to keep the lead, they would be "credited" with a blown save in this example. However, saves are probably an even less meaningful statistic than wins and losses.


which version of rails should I use for a new project

Question: I have been working with rails 2.3.5. I am gonna start a new project on rails. Should i continue using the earlier version or should i hop on to rails > 3 ? If so which is the more stable version?
Answer: It is better to use rails 3.0.x version as these days lot of new plugins(like active_reload) are targeted only for 3.x version.
3.1.x have lot of cool features(like asset pipeline, saas integration, coffescript integration, etc), but its still a release candidate and I faced some issues while using it. I guess we have to wait for the stable 3.1.x release.
I have been using 3.0.7 for a while and found it to be very stable.
3.0.10 is recently released and you can easily upgrade to it from 3.0.7 any time you want in the future.
If you are stuck to 2.x version you will be missing cool features like mentioned here: http://net.tutsplus.com/tutorials/ruby/5-awesome-new-rails-3-features/
Answer: For a new project, I would use Rails 3.1 or for a bit more stability, 3.0.7. There are some noticeable differences compared to 2.3, but it will be supported for longer and most development of new gems and documentation are being written for Rails 3.
Answer: You should definitely NOT use 2.3 and earlier.
The Rails framework is improving at a steady pace and if there is a downside to that is that it can be a pain to upgrade from version to version, especially as regards to major version changes which introduce tons of backward incompatibilities.
Why then would you want to put yourself in the hole at the get go.
Another issue is how ready and mature is the ecosystem (ruby, popular gem packages, etc.). This leads you to consider whether you should start with 3.0.10 or 3.1 release candidate.
It turns out the great majority of gems working with Rails 3.0 is also working fine with Rails 3.1.
The little downside is that 3.1 is still in release candidate status but it's all but ready for final release and that should come within a matter of days or maximum a couple weeks (as of today Aug. 25, '11).
I would strongly recommend you start all new apps with 3.1. That's what I'm doing.


Moderators privileges

Question: Let me start by stating that I am not questioning the right of moderators to close questions or perform any other of their duties. However I have noticed that, recently, more questions are being summarily closed. I was wondering if, since there is a gentler mechanism, 5 individual close votes, this was really necessary. If 5 of us think it should be closed, then by all means close it, but a moderator, however exalted, is only one person with one person's opinion and interpretation of the rules and their action leaves little scope for discussion and dissent. On the other hand, you may think they are saving 5 of us the bother of voting.
Answer: Some food for thought:

I'm not sure that five close votes is really a "gentler" method of closing. Five close votes from the community might seem more brutal than a single close vote from a moderator.

Remember, a moderator's close vote may be immediate, but it isn't binding. The community can always override a moderator's decision with five reopen votes. Unless these recently-closed questions have been reopened regularly, I'd guess they are probably worth being closed.

A closed question is rarely the desired end state; the hope is that the OP will come back and improve the question so that it can be reopened.

The title of your question is "Moderators privileges." Performing the work of a moderator is hard work; I'd say it's more of a duty than a privilege. Yes, moderators have elevated rights that allow them to perform certain functions, but this work is almost always done from the perspective of trying to help the community become a better place.

Whether it's one moderator acting unilaterally or a team of moderators acting in concert, the chief goal of closing questions it to ultimately improve the quality of questions over time thereby making the site a more interesting and helpful place to visit.
Comment: I fully appreciate your point of view. Someone who has a question closed by 5 votes should realise that the reason(s) were generally recognised and that they had posted a bad question. If it is closed by one individual then there is always the lingering suspicion that it was just one opinion (however experienced) and somehow unfair. There are questions that should be summarily closed, ones that seriously break the rules either in themselves or by people how have been banned or under caution.
Comment: I don't envy the moderators their job and whatever they do someone will always question it. I appreciate their work and wish them all well.
Comment: @PeterJ - I just checked my voting record; I have voted to reopen a question 306 times. (I think most of these were on questions where someone – either the OP or perhaps someone else in the community – made changes to improve the question. A few of these might have been cast because I felt like the question should never have been closed in the first place, but I don't think that happened very often when I was more actively moderating.)
Comment: How many closed questions are reopened? How many people come back after their post has been closed to improve their question? I'm not that observant, but I can't remember having seen either. Maybe some questions are edited by reviewers to try to improve them, but I gave up doing this when I was told off by a mod for supposedly  "changing the meaning or intent of the question"
Comment: Yes, a question that is closed isn't meant to stay closed. It's just closed to avoid answers while the question is put in shape and made on-topic. That is something that every user should remember. Unfortunately, many questions aren't rewritten to be on-topic.
Answer: Peter,
You're probably referring to questions I've been closing.
It would be helpful if you included links to questions summarily closed by mods that you think should have been left to the community to decide on. That, or perhaps clarify that you mean you'd prefer that mods never summarily close any questions, and that it should always be left to the community to decide, which is also a valid position.
When I see a post I think should be closed, there's two different reasons I might close it summarily. One is I consider it unambiguously a bad question, and would be among the bottom percentiles of questions that normally get closed by the community. In this way, I save the community some review work, and I get questions removed from the front page that would either attract imitators or reward bad questions with good answers. This probably isn't the kind of question you're referring to though.
There are also times when I close questions that are not as close-worthy as those above, ones which I'd normally leave up to the community to close. These are questions from particular users that are under caution from a mod to improve the quality of some particular aspect of their questions, so when I see them post a question that fails in that regard -- even if it's otherwise a good question -- I close it. This also applies to low quality answers and comments from users with a history -- I often delete them without waiting for them to be flagged.
This applies in particular to users who have expressed to the mod team that they are indifferent to the quality of their questions in terms of whether they get closed or of the effect on the site overall, so long as the questions live long enough to get the answer they want.
And low quality questions do attract answers. As much as I wish users knew to ignore poor quality questions, they don't, and I don't see any reasonable way to change this behaviour. Some users will even downvote a poor question and leave negative comments, then provide a high quality answer. ¯\_ (ツ)_/¯
Comment: Hi gotube, See my comment to David above. But since you are putting your hand up, I had noticed that the preponderance of such recent closures are down to you. I agree with most of what you say. I would only suggest IMHO that a good answer to a bad question still has merit and deserves a place here. I guess that I've occasionally been guilty of answering a question that I've also voted to close. Of course, at my level I have no idea if a particular user is under caution or a repeat offender. I repeat, this is not an attack on any moderator, just an attempt to clarify the process.
Comment: @PeterJennings Also, good answers do have merit, but as a community we agree that bad questions get closed, even though it means a potential good answer to that question won't arrive. The reasoning behind for closing questions is the belief that when users improve the quality of their questions, they get more and better answers. What I'm doing is a "streamlined" version of that, at least in my mind. ;) If it's not working for the community at large, of course I'm open to shifting my habits. Thanks for raising this question BTW
Comment: Regarding the not closed question, the OP does say "...if I have used ... in the dialog below" which could be construed as proofreading since I read it that they created the dialogue.  And a google search for *meaning "make a good living"* brings up 2 or 3 answers, so a non-native speaker could have answered it for themselves. But, as I've already said, I'm not out to start an argument, just to get clarification and discus points of view in an amicable fashion.
Comment: I'm sure that most of the questions you summarily close would have got close voted in any case and your point about saving time and effort and clogging up the review queue is perfectly valid. So taking your and David's answers into consideration I guess I'm happy with the current situation.
Comment: @PeterJennings Thanks Peter, and to be clear, I understand your concern, I think it's valid, and I take it in the spirit intended. I don't expect users to know what my motivations are for closing questions, and have sometimes wondered if I was going to get feedback about seemingly questionable summary closures. Now I know, and since you're almost certainly not the only person thinking that way, I'm glad we're having the discussion in the open.
Comment: Just playing devil's advocate, I notice that you have just given an answer to https://ell.stackexchange.com/questions/325492/does-make-a-good-living-just-mean-earn-well. A question which **could** be classified as "asking for meaning" or "proof reading", both reasons for closure. I hasten to add that I agree with your decision and would have answered myself had I got there first! It's a thin line we tread.
Comment: Well in the spirit of widening the discussion how about https://ell.meta.stackexchange.com/questions/5641/resources-for-learning-the-difference-between-present-perfect-and-past-simple-in in this meta site. This was closed although it seemed to me on topic for the meta site. To be fair I think I voted to reopen but it did not get popular support.
Comment: @mdewey That was my mistake. Thanks for bringing it up. I've reopened it.
Answer: I will not speak for the other moderators, and I have not yet checked the logs for question closed by them. This question might be improved by links to some questions recently closed by mods.
For myself, I would only close a question if it seemed very clear that it should be closed. In clear-cut cases of spam, rudeness, or abuse, I would close at once. In other cases that seem very clear, there seems to me no benefit to waiting for users to get around to casting inevitable close votes. This site has a fairly long close queue, and the delay serves no helpful purpose that I can see.  I do not see a closure by one mod as "gentler" than  closure by five trusted users.
One point of prompt closure is to discourage other off-topic questions by not allowing improper questions to sit open and perhaps be imitated.
As it happens, I have not to the best of my memory closed any questions since I was elected a moderator, except in one case where I thought close votes improper, so I closed and immoderately reopened a question, to remove it from the closure queue.
Comment: David, Of course, now I go looking for some examples, I can't find any! Without searching over 2000 pages of questions the only one I can find closed by Gotube is on page 4 and I agree it should be closed.. However, if in the future I spot a question I'm not sure should have been summarily closed, I'll flag it here.
Comment: David, I cannot fault your answer. The reason I specifically didn't link to any questions or name names was to avoid finger pointing and make this a general discussion, not a witch hunt or diatribe against any particular moderator.
Comment: @Peter Jennings Of course ther is no desire for a witch hunt, but without spwcifics to address, thew general answers are of at best limited use. But since Gotube has been specific about recent closures, I think you could safely link to  a few posts that you are concerned about without that seeming accusatory.
Comment: @PeterJennings I searched through the  close review history and didn't find any behaviour  that stood out as being unduly strict. If you want, you can search users activity pages e.g. https://ell.stackexchange.com/users/18673/glorfindel?tab=activity&sort=reviews Glorfindel closed a couple of questions that *already* had three close votes but since the beginning of October I can count them on one finger!
Answer: The fantasy is that the community contains many willing and eager reviewers. They sit at their devices poised to vote to close the inadequate or misguided questions to stop well meaning people spending time answering questions which are not clear.
In desperation the moderators, seeing the queues stretch out into the distance, step in and use their powers to close the most egregious examples. It is possible that the OP comes back and edits and then the question goes into the reopen queue or a community member votes to reopen. Is there a community sitting watching the reopen queue to help out here? See first paragraph for a hint.
On other sites the magic number of votes has been reduced from five to three to try to expedite the process but this was not carried out in the context of a properly conducted scientific experiment so we will never know whether it has helped.
We live in an imperfect world and in the absence of someone wishing to offer community members riches beyond the dreams of avarice to participate in the queues we are left with the present situation.

Moderators privileges


SPListItem.Delete() has some issues

Question: I have a list which consist of more than 5600 items. In my application i will search all the items from particular date range by using SPquery. As the result of the SPQuery, the splistitem collection have 2500 records. When i am trying to delete these items one by one. It will stop after particular numberof records deletion. It will not occur in a single stretch. I think this may be the one bug of Sharepoint. Does anyone faced the same issue early? If you guys have any solution for this please help me. I strucked on this issue. Thanks in advance.
Comment: Can you show the code you are using to delete the listitems?  Are there any errors in the ULS logs when the deletion is occurring?
Answer: I have refered this Useful Link to resolve my issue. I have used SPWeb.ProcessBatchData() method for deleting all records from my List.
Answer: From my blog:

There is a virtual situation :
You have no archival / expiration policies setup for your list and on
  and off you want to delete everything older than 30 days . What you
  will do ?
This sample power shell solves your purpose and fulfill example for
  offset parameter in powershell :
<code>$WebURL = "http://mysitecollection:100/myWeb";
$spWeb = Get-SPWeb -Identity $WebURL;

$sList = $spWeb.GetList("/myWeb/Lists/myList");
write-host $sList.Title;
$camlQuery = "<Where><Lt><FieldRef Name='Modified' /><Value Type='DateTime'><Today OffsetDays=-30 /></Value></Lt></Where>";
$spQuery = new-object Microsoft.SharePoint.SPQuery ;
$spQuery.Query = $camlQuery ;
$spQuery.ViewFields = "<FieldRef Name='ID' />";

$ToBeDeleted = $sList.GetItems() ;
$ToBeDeleted = $sList.GetItems($spQuery) ;
$i=0;
$ToBeDeleted | ForEach-Object {
    $i++;
    Write-Host $_.ID -foregroundcolor cyan

    $deaditem= $sList.GetItemById($_.ID);  # if you wish you may decide to recycle instead to recycle bin

    $deaditem.Delete();
}

write-host $i;
</code>

Ref :
Offset Today in SPQuery Example
Answer: I guess you might be using the following code:
SPListItemCollection delItemCol = customList.GetItems(spQuery);
for(int count=0; count< delItemCol.Count ;count++)
delItemCol[count].delete();
Now here we can't use the foreach because if you try to modify the collection of SPListItemCollection, it will throw exception. So best is to use the for loop.
If you analyse the counter and delItemCol.Count.
<code>        counter      delItemCol.Count
        0           20
        1           19
        2           18
        3           17
        4           16
        5           15
        6           14
        7           13
        8           12
        9           11
        10          10
        11           9
</code>
So...after sometime the value of delItemCol.Count is less than counter and will throw exception.
So how to deal with this in simplest way. Either use double for loop a or ProcessBatchData.
This is not a manual code without any kind of testing. But it must work.
Answer: You loop should go in reverse order .... i.e.
<code>for(int count=delItemCol.Count-1; count > delItemCol.Count ;count--)
{
delItemCol[count].delete();
}
</code>

SPListItem.Delete() has some issues


Why is S.T.A.R. labs so easy to walk into?

Question: Several characters including villains just walk into where Barry is in his Flash suit unmasked, or testing his speed in street clothes.
Comment: because Barry is secretly on a mission to tell everyone who he is.
Comment: I would like to know this answer too. It seems like there is no lock on the door. People just come walking in at the perfect time during a conversation.
Comment: They also make a joke about this on the Flash-Arrow crossover event, when Oliver says they can't go hide in S.T.A.R. labs because of the "revolving doors" they installed so anyone can get in/
Answer: It is hopelessly understaffed and was never originally designed for security.
Star Labs is a huge facility that only ever has 2-3 people permanently around. Even after Cisco "upgrades" security to prevent people from just 'walking in', in that same episode someone just walks in and by passes what I can only assume was a stern 'do not enter' sign.
This suggests two things:

for all of Cisco's brilliance, he is a terrible installer of security systems.
It isn't easy for a few people and cameras to cover all the entrances of a large research facility that wasn't necessarily designed for security.


How to register a Gmail account if I don't have any Phone?

Question: I can't "verify" the registration because the Gmail site states that I need to verify it through my telephone. But I don't have one. What can I do? Get another e-mail service provider?
Comment: I don't know any step within GMail at which you would need a phone? It is always optional and you will usually find a "skip" button! The exception might of course be if you talk about "two-factor-authentication" (for which you need a smartphone or SMS), but otherwise...
Answer: When registering a new Gmail or Google account, they sometimes require a phone number for verification -- this is "to prevent abusive use of their services".
There are several possible factors that can lead to this, for example, a potentially false name or other false information. But the most common is your IP address.
If your IP address is somehow flagged for "potentially abusive activity", it could be a shared IP address with a service like VPN, proxy or widely used by school, work, etc.
To register on Gmail without phone verification:

Use a private IP address (with a hostname), from a home ISP.
You only get one chance per registration, which means that you will need to register a totally new account for each new attempt.

However, Google has not disclosed any information on how they screen registrations.
Answer: As a way to prevent abuse and slow down spammers, Google more-or-less now requires a phone number that can receive SMS messages. Further, a single phone number can only be used for a limited number of accounts. ("Ten" is a number that sticks in my head for some reason.)
Other email providers are following suit, so you may be limited to email providers that are a little "icky". Further, a Google account is required for other Google services, such as Google Photos.
Supposedly, there are still some things that will let you open a Google account without giving up your phone number:

Some geographic locations may allow you to create an account merely by filling out a CAPTCHA to prove you're human. Try clearing your browser data or using a different browser.
If that doesn't work, a proxy service to make it seem like you're coming from somewhere else may work out. (See previous point.)
Use an online SMS service. These services will give you a phone number that you can use to receive SMS messages on the web. Assuming Google doesn't get wise and start blocking these, this may be your best option.

Of course, by bypassing this verification, you're reducing the options that Google has to alert you if something is amiss with your account. For instance, if someone else is trying to log into your account, Google might send you a message to alert you. Or, conversely, if you lose access to your account, the recovery number may allow you to get it back.


Increasing PE ratio good or bad?

Question: Some stocks like sbux, and nke have continuously increasing PE ratio. Is this a sign of company doing well or a bad sign that company is slowly getting overvalued ?
Comment: It is a sign that the market is valuing the company more than it used to compare to its earning record. That's it. If you want to know if the company is doing well or not, You should look at their financial statements.
Answer: A better measurement than PE, of whether a company is doing well is are the earnings increasing year after year. This gives an indication that the company is growing and if it continues it will eventually be worth more.
If the PE is increasing then it means that the price is increasing faster than the earnings, or that the earnings are falling faster than the price, or worst combination is price is increasing whilst earnings are decreasing.
Answer: PE in isolation does not tell anything. A higher PE as mentioned by oldergod just means that the market is believing that this company will do good in future
Answer: PE can not tell you very much. The average is 20-25, if a company is above that they are expected to grow. The basic ratio is <code>market value / income production </code> or <code> price per share / earnings per share </code>
There is also "trailing" and "forward" PE ratios you can consider, here's a good article: https://www.investopedia.com/articles/investing/041013/differences-between-forward-pe-and-trailing-pe.asp

Increasing PE ratio good or bad?


Is it possible to have a shiny event Darkrai in Pokemon BW or B2W2?

Question: I'm curious... My friend got a shiny Darkrai from some random user, and I'm wondering if it's real or hacked.
It's from France, is an event Pokemon (2011HVR), and has an OT of 11011. It says it came from Unova.
EDIT: This Darkrai is from Gen 5 and is now in a copy of Pokemon X.
Answer: Yes, this is possible. Obviously this is no guarantee it is legitimate but it's impossible to prove it's fake from the information you've given. That said, it is unlikely someone would give away a shiny event legend to a random person.
The 2011 Winter Darkrai was released in France. It was available for generation V in Unova and does have an ID of 11011. Because it was released as an encounter and isn't shiny locked (as far as I know) it can potentially be shiny.
Sources:
http://bulbapedia.bulbagarden.net/wiki/List_of_local_French_event_Pok%C3%A9mon_distributions_in_Generation_V#Winter_2011_Darkrai
http://www.serebii.net/games/shiny.shtml
Comment: "That said, it is unlikely someone would give away a shiny event legend to a random person." -> Hmm. Person cheated on his girlfriend and girlfriend gives away all his rare Pokemon as revenge. ;-)
Answer: According to the Generation 5 Wondercard Map, offset 0x37 determines if it can be shiny.
Checking the 2011 French Darkrai here, you can see that 0x37 is 0.  This means that pokemon will NEVER be shiny.
Edit:
To get a shiny Darkrai, you must have gotten the encounter from generation 4 and transferred it to gen 5.
Comment: Welcome to the site! How are you explicitly viewing the 0x37 value in the Darkrai file? This would be good info to have :-)


Multiple different languages in one brain

Question: Could a human-sized brain be able to learn all the spoken languages in the world? Is our brain size capable of that not only learning them, but fluently being able to speak them? Also, if one is fluent in a language, if they don't speak it for a while, can the lose it and end up being not fluent any longer?
Comment: All languages and dialects? What about accents? I speak English but have a hard time understanding the Scots.
Comment: There are several thousand languages on Earth. Some dialect might be considered as languages because the distinction between the two is not really clear but there are a lot of languages anyway. Many are only spoken by a handful of people. Maybe you can set a specific amount : 10,50,100?
Comment: The brain's capacity is not enough to hold thousands of languages.
Comment: Of course anyone with the will can try to pickup any existing language and vocab in the current world, however will power alone cannot guarantee you can become proficient enough also too many different words and pronounciations just for an object alone is going to shut off our brain reward system unless you are replacing "rain man".
Answer: This question requires us to handwave a few things.  For one, we have to define what a language is, as opposed to a dialect or otherwise.  Usually this isn't an issue, but when you start throwing around the phrase "all the spoken languages," details like that start to be important.  For sake of argument, we'll say there's 6,500 languages in the world.
Fluency is another tricky one.  Non-linguists often use the word as a level of expertise: one is not fluent until they finally achieve fluency.  In reality, there is no bar.  One never finishes learning a language, not even their native tongue.  One simply becomes more and more fluent as they practice.
However, we can work around this one with some division.  Let's give our language learner a lot of luck: let's let them live to be 100 years old.  To learn 6,500 languages in 100 years, you must learn 65 languages per year, every year, from birth to death.  That's one language every 5.6 days, more than one language every week!
So, no, a human brain cannot learn all the spoken languages in the world, because it is strapped to a body which will give out before it can finish.
The closest we have is Daniel Temment, who managed to learn "conversational" Icelandic in a week, and German in a similar amount of time.  He's also an autistic savant with synesthesia who can recite pi to 22,514 digits.
A lower bar might be to just be able to communicate with every person in the world, but that's an answer for another question!
Comment: I agree with that last sentence, a person who knows Spanish could possible speak with most people in the Latin sphere of the language, a person with Swedish could manage Danish and Norwegian also, and i assume most there is similarities in most other languages. A person who speaks C also manage PHP, C++, Java and C# with some good willl.
Answer:
Could a human-sized brain be able to learn all the spoken languages in
  the world?

If by all languages, you mean all languages with all dialects to an expert level (or become fluent), then I don't think the human brain can be able to do it.
Why?  Because, as the answer by Cort Ammon put the total number of languages to be 6500+, as a data scientist I can vouch for the fact that knowing all the dialects of all the languages fluently would definitely exceed 100 TB, which is the approximate estimate of the brain's memory storage.

Also, if one is fluent in a language, if they don't speak it for a
  while, can the lose it and end up being not fluent any longer?

Yes, as fluency and expertise is built up through practise which involves strengthening the connections of the neurons in the brain, it is a fact that lack of usage would weaken the connections.


How would two equally massed stars orbit?

Question: In an empty universe, except for two equally massed stars, how would they orbit? Or, for another example, if the earth suddenly grew to be the mass of the sun, how would they orbit, or interact? Would they simple pull together and combine? In the earth example, because the earth is already moving, would inertia keep it orbiting the sun?
Comment: Pedantic comment. Is there an observer in this "empty universe"? I ask because, with no frame of reference to compare their motion to, wouldn't they be just be static? Adding a observer; how they appeared to move would depend on his orbit. I.e if he parked at their center of mass or orbited them at their own orbital period.
Comment: No. If he parked at the barycenter and co-rotated, he would observe the stars moving periodically closer and further apart. Even if the orbits were circular, he could detect his own rotation using a Foucault pendulum, disqualifying him as an inertial observer.
Answer: The orbits would be elliptical. What kind of elliptical depends on the distance of the stars from each other and their velocities at a given point.
At any given time, if you draw a straight line between the two stars, that line will pass through the barycenter of the system (the center of mass). The stars will move more slowly when they are farther from the barycenter than they will when they are close to it. If you increase their speed at periapsis (closest approach to the barycenter), they will get further away from the barycenter on the other side and their orbits would be more elliptical.
The earth would migrate inwards toward the sun if it suddenly grew in mass. If it grew close to the mass of the sun, the sun and newly-gigantic earth might become a binary system, where they orbit each other.
Though all objects in orbit "fall" towards each other at all times, they move out of the way of each other fast enough to not collide. If the earth gains more mass, the gravitational pull between it and the sun will become stronger. As long as the process by which it gained mass kept the momentum proportional (ie. it keeps the same velocity), it will no longer be "getting out of the way" of the sun as fast as it falls towards it. It might not fall into the sun, but the result would be that it would fall closer to the sun and wind up in a more elliptical orbit. If became just as massive as the sun, both suns would be suddenly drawn together very strongly. I suspect they would collide, but I haven't done the math on that.
Answer: Take a look at Two body problem article at wikipedia. You'll find how to calculate any two body orbit given the mass of the bodies, their initial positions and initial velocities.
Comment: For the generalization of the Two-body problem to General Relativity, see http://en.wikipedia.org/wiki/Two-body_problem_in_general_relativity . This gives slightly more accurate answers in solar system mechanics and is required to describe binary stars where one or both members is a dense, collapsed object- white dwarf, neutron star, or stellar mass black hole.
Answer: The orbit would not necessarily be elliptical, it could also be circular, parabolic, hyperbolic, or radial. There are two parameters which determine the shape of an orbit, the angular momentum, and the orbital energy. If the angular momentum is zero, the orbit will be radial.
Low energy orbits are bound and periodic, the shape is either a line, a circle or an ellipse.
Medium energy orbits (parabolic) are non-periodic, the shape is either a line, or a parabola.
High energy orbits (hyperbolic) are escape orbits, they are non-periodic, the shape is either a line, or a hyperbola.


Is there a defined note for the triangle?

Question: Do all triangles sound the same note in the same octave, or are there differences between models?
Comment: It might not have a pitch.  Percussion instruments like bells and blocks are often non-harmonic.
Answer: There are many differences, both in pitch and timbre. I've seen triangles used with a 10" side length down to 4", and you can purchase them made out of a variety of different materials and construction methods.
Some pieces even call for three different triangles of different pitch. So no, there's no defined standard pitch. A percussionist just chooses the triangle that he finds most appropriate for the style of the piece (which the conductor may override if he/she feels differently).
Not only that, but orchestral percussionists will carry around a set of triangle beaters of different sizes and weights to further fine-tune the tone of the triangle.
Comment: In general it's an non-pitched sounding tone, I find. With the overtones present in the sound of most triangles, It's difficult to pin down to a single pitch without another reference. You can certainly tell whether one triangle is lower or higher… but by how much is getting too fine, in my opinion. As NReilingh said, there's no standard note, and I would say that most triangle manufacturers try to get as far from a defined "note" as possible.
Comment: That's the opposite of what I just said. Different models of triangle have different pitches (or notes) based on their size and material. There is no standard pitch.
Comment: A lot of that comes down to your own ear. People routinely tune snare drums, for example, and that's a tone that is MUCH more difficult to distinguish than a triangle. Any percussive instrument, by definition, is pitched; but you are right: depending on the overtones present, some may be more easily picked out than others.
Comment: So, if the pitch is the only the pitch, the note remain the same. But **what note is it**?
Answer: The thing about triangles is that their overtones are not integer multiples of their fundamentals. I'll show you what I mean:
In the beginning, there were sine waves. Well, not really, but they are the simplest waveform. Waveform influences timbre, and the sine wave is composed of one sine wave:
The sine wave is cool, but it is boring to listen to. But we can take all the sine waves with frequencies an integer multiple (2x fundamental, 3x fundamental, etc.) of the first one,and add them together to get (after messing with the relative amplitudes) a square waveform!
Now, most musical instruments naturally produce some variation on this or a similar waveform (those variations are one reason you can tell a violin from a flute). The instrument itself will usually vibrate in multiple ways, which is what creates the multiple sine waves. Our ears, amazingly, hear all the combined sine waves as one note.
However, a triangle is different. Ideally, the overtones are exact multiples. Though no musical instrument produces overtones that are perfect multiples of the fundamental (except maybe violin and a few others: https://en.wikipedia.org/wiki/Inharmonicity), triangles are so imperfect (by design) that their overtones are too far away from the integer multiples and our ears and brains do not perceive them as having a fundamental, instead hearing a noise. They do have one, but it's near impossible to determine it aurally and has no use musically. Because of this, I presume that not all triangles sound the exact same note, but that it doesn't matter; a triangle will sound okay in any key as a percussion sound. This also explains the same phenomenon in drums and other unpitched percussion instruments.
That said, some pieces will call for multiple triangles, and their different frequencies can be used to some effect (but I doubt anyone's tried triangle triads).
"No, no, no! You've got it all wrong! The triangle is waaay out of tune!"
Comment: It's funny you mentioned triangle triads, and then I stumbled upon this while listening to demos... https://youtu.be/ZhI4q7frInM?t=733
Answer: I use 3 triangles in an orchestra. They definitely have a discernible pitch that can conflict with or support the current scale in use. They also can create dissonance. Most of the time it is not noticeable if played in sequence.
Answer: This question was recently revived and I was surprised it didn't include some of the basics of orchestration.
From my copy of Orchestration by Piston:

...A number of different sizes are made...
...The triangle is an instrument of indefinite pitch (although some triangles wrongly give a definite note), but it will sound like the upper partials of whatever fundamental harmony it accompanies.
...The part is written on a single line or staff.

The parenthetical note is Piston's.
An example from a score...

Do all triangles sound the same note in the same octave, or are there differences between models?

So, the answer is "no."
But it should also be noted that:

even if triangles come in different sizes and may be marked with a pitch scores don't normally specify a pitch
the player or conductor may select whatever triangle seems best for the part
Comment: " it will sound like the upper partials of whatever fundamental harmony it accompanies." - I'd love to see a demo of this; for me when a triangle goes ting it defininitely *sounds* like a note, but maybe I've only ever heard wrongly-made triangles...
Comment: @AakashM, keep in mind I was only posting Piston's comments (and I'm not a percussionist or really know acoustics.) I just wanted to get an orchestration source posted. To my layman's ear, triangles may sound "bright" but also noisy. Seems like only in the decay does the sound start to clear up, but even then there is lots of beating of really high pitches.


Is antimatter boosted nuclear weapon theoretically possible?

Question: Are there any fundamental obstacles to using a nuclear explosion as a trigger for antimatter generation and thus considerably increasing the yield?
Comment: Hi Anna, welcome to Worldbuilding! Interesting first question. One bit of advice - it's often a good idea to wait 24 hours before accepting an answer, in case there's an expert or particularly ingenious user asleep somewhere else on the planet who hasn't yet seen it. Many users will skip questions that are already answered, so giving out that green check too early can reduce the quantity and quality of other answers that are on their way.
Comment: Uh, the title and the question are asking two different things. Do you want _boosting_ or _generation_?
Comment: (I understood it as _generating_ antimatter to _boost_ the weapon's yield?)
Comment: @CarlWitthoft PET uses radioisotopes that decay by positron emission.. that's what the P and E stand for, after all. No pair production involved.
Comment: @StarfishPrime correct -- I was writing too fast.  the emitted positron meets up with an electron to produce a pair of $ \gamma $ ; that's the pair-production I meant to identify
Answer: Unfortunately, it wouldn't increase the yield.
When matter and antimatter annihilate each other, yes, they do liberate a huge amount of energy. But, you don't get energy for free - no matter how it's produced, creating antimatter will take up exactly as much energy as annihilating it will release.
So, even if it were plausible that a fission or fusion bomb could be rigged to produce antimatter, the antimatter annihilation would only give you back energy that it borrowed from the fission/fusion reaction in the first place.
Comment: Thermodynamics says creating antimatter will actually take *more* energy than annihilating it will release... 2nd Law rules all.
Comment: @Andon no, it won't, but primarily because you can't just magically choose the output products of a nuclear reaction.
Comment: Yup this was my first, and second, thought as well.
Comment: Now I am curious if using fission/fusion to make antimatter would make the bomb 'cleaner' and produce less radioactives.
Answer:
Are there any fundamental obstacles to using a nuclear explosion as a trigger for antimatter generation and thus considerably increasing the yield

No...
What you refer to is the yield limit (I believe it was first pointed out by Ulam) to a fusion device, caused by the explosion disrupting the conditions that allow fusion to take place. By carefully constructing the device so it explodes in "stages", the yield figure of around 7-8 megatons per ton can be maintained in the tens of tons range.
Beyond that, the explosion is no longer controllable and any additional fusion material (typically lithium deuteride) will only add a negligible amount to the bang, in the form of a "fizzle".
So, converting matter to anti-matter, which will explode no matter what - pardon the pun - however widely dispersed, would appear as a practical shortcut around the yield limit, even if the laws of conservation of energy mandate that the total maximum theoretical yield will be the same. Antimatter conversion would simply allow coming closer to that yield.
This is somewhat akin to the technique of injecting nebulized water into gas engines. While the total chemical energy available can't change (it actually decreases slightly), the deflagration becomes smoother, more thorough and better suited to supplying expansion work; the result is therefore an increase in power yield, through a reduction of wasted energy (and fuel).
...or rather, yes.
The fundamental obstacle lies in the conversion itself - there is no known process that can lead to the creation of matter/antimatter particle pairs from a fusion event with any efficiency.
Currently, antiprotons are produced by shooting very high energy protons (to the tune of 26+ GeV) against suitable targets, and the antimatter yield is about four antiprotons every million collisions. So we currently need to expend around 25,000 Teraelectronvolts to create four particles with a rest mass of around four GeV.
If the whole energy of the Tsar Bomba at full design spec (100 Mt) were to be converted into antimatter with such yields, we could squeeze a yield increase of maybe 1-2 Mt. It is entirely probable that to achieve this, though, the explosive power of the Bomba would be greatly diminished, so that the operation would turn out as a net loss.
Answer: Yes, there's a huge fundamental stumbling block.
Conservation of energy.  The energy to create the antimatter has to come from the nuclear fission and/or fusion of the "trigger", so the net, final yield can't exceed that of the nuclear material in the original bomb.
Now, John W. Campbell once wrote a series of books in which, among other completely implausible things (even for the 1950s), he had a ray that converted 50% of matter to antimatter.  And then, somehow, rather than erasing Chicago the first time it was tested, his character managed to turn it into an energy generator and propulsion system.  This amounted to annihilating matter by converting it to its equivalent energy, but that's a whole different thing from using the (minuscule) quantity of matter/antimatter pairs produced in a nuclear explosion to boost the yield (they're already part of it).


Eclipse. Copy JAR file into project

Question: How to include (NOT ONLY reference) JAR file into existing project? I added it by using Project properties - Build path - add external jar's. But when I export my project, and then import it in another computer, this library was missing.
Comment: http://www.cs.duke.edu/courses/cps004g/fall05/assign/final/addlibrary.html
Answer: Drag it into your project view so it appears in the project as any other file.
Right-click the jar in the project view and add to build path.
Answer: Put your jars into a directory of your project e.g yourproject/lib so that external libraries are accessed through a relative path. And then use "Add JARs" option to add the jar to build path as in eboix's link.
Answer: You want to export your project as an archive (Export -> General -> Archive File), and then import your project as an existing project (Import -> General -> Existing Projects into Workspace). This way the project will be identical to the exported version and all of the configuration will be right.
Oh, and do what the other people suggest and copy the Jar file into the project so you don't have to reference it as an external Jar file (and everything is in one place).

Eclipse. Copy JAR file into project


What is the difference between LVM and LUN

Question: Both seem to be a virtualization layer on top of physical disks. I'm having a hard-time understanding each of them and the difference between them.
Answer: Different layers of abstraction.
If you've got a large storage array, you probably don't want one server to use the whole thing, so you divide it into logical units (LUN is actually Logical Unit Number, but hey, it helps me remember). So you've got your storage sliced into usable chunks, and now you present it to the server. In a simple example, suppose it shows up as /dev/sdb. No partitions on it, it's just a disk, so far as the server cares.
Why throw LVM on top of it? For me, it's because of growth. If I fill up that disk, I want to be able to add more space to it. LVM makes it easier and (in my mind) less risky, because I can resize that LUN on the storage array (or even create another LUN and present that to the server) and using LVM, I can grow the "virtual" disk without rebooting.
I wrote an introduction to LVM here: http://www.standalone-sysadmin.com/blog/2008/09/introduction-to-lvm-in-linux/
Which I referenced when talking about resizing LUNs here: http://www.standalone-sysadmin.com/blog/2009/05/resizing-storage-luns-in-linux-on-the-fly/
Answer: LVM is a piece of software used to "carve" up a disk, usually a locally attached disk, into smaller sections.

LVM is a method of allocating hard drive space into logical volumes that can be easily resized instead of partitions.

A LUN is a construct, usually on a storage array, with which you present a "slice" of a disk array/volume to a host, where it appears as a physically attached local disk via some connection, usually SAN (iSCSI/FC).
For example, if you presented a LUN to a host, you could then use LVM to further customize the layout of what the system thought was a local disk.

A LUN is a Logical Unit Number. It can be used to refer to an entire physical disk, or a subset of a larger physical disk or disk volume. The physical disk or disk volume could be an entire single disk drive, a partition (subset) of a single disk drive, or disk volume from a RAID controller comprising multiple disk drives aggregated together for larger capacity and redundancy. LUNs represent a logical abstraction or, if you prefer, virtualization layer between the physical disk device/volume and the applications.
Answer: A LUN is generally a disk array level reference to an amount of raw disk space that's been formatted and allocated to a specific server or group of servers. It might be spread out over multiple physical disks, but will be presented by the disk array as a single "logical" drive to the target server.
LVM stands for "Logical Volume Manager", and is generally a piece of operating system software  which is layered on top of the raw LUNs being assigned to a server. LVM allows you to perform various tasks on the LUNS, such as sub-divide LUNs into smaller logical volumes, group them together into volume groups, perform disk mirroring between LUNS, etc.
Answer: A LUN is a SCSI concept (a "Logical Unit Number").
SCSI has "targets", which correspond to controllers. A target might have a number of "logical units" attached. As an example, imagine a JBOD with a bunch of disks attached. It could choose to present those disks as LUNs on a single target.
Often a storage array will present RAIDs of several disks as individual LUNs; you get an interface that looks like a large disk but is RAID protected.
LVM is a higher level concept, decoupling the logical "things you put a filesystem on" from "physical disks". You can certainly implement an "LVM controller" which takes in a bunch of disks, internally does some form of LVM, and presents the resulting drives as LUNs on SCSI targets. That is very common on fancier storage arrays.
However, a LUN need not be the result of any LVM! It may just be a physical disk.