Cannot change Live Id in Onenote

Question: I am using Windows 8 Pro. I installed Office 2010 includoing OneNote 2010. When I run OneNote and I try to open a notebook from SkyDrive, it shows me another Live Id as logged in. When I click the Not XX button to logout, It does not work, I see a progress ring for a few seconds and then it is back to the previously logged Live Id. How do I get OneNote working with my Live Id and my notebooks on SkyDrive? The Live Id that is logged into my Skydrive in OneNote is a Live Id I used exacty once to acces Windows Store as a developer.
Comment: When you say it "does not work" describe in detail what happens.
Comment: I click Not XXX, see a progress ring for a few seconds and then it goes back to seeing the Live Id as logged user
Answer: I solved it by deleting all the data (cache, cookies, sessions etc.) from IE10 (which I never use).

Cannot change Live Id in Onenote


Can a fluorescent light electronic ballast fail and still supply voltage?

Question: I am trying to debug a failed fluorescent light fixture. T8, 1x36W. I have checked the tube (vs. both a new one and a known working one), and this is not the problem. So I thought it must be the electronic ballast ("preheating start" type). What is confusing me though is that there is power both going into and out of the ballast (and also reaching the actual clamps for the tube light).
So my question is: is it possible that the ballast is broken, but that there is still power coming out of it? By "power" I mean there is enough voltage across the output terminals of the ballast to light up a phase tester screwdriver.
Thanks!
PS. This setup does not have a separate starter.
Comment: **How** an electronic device fails cannot always be predicted. A device will only fail in a predictable way if it was designed to do so and the condition causing the failure is within certain limits. Without knowing 1) the exact design of the ballast 2) the exact conditions that made it fail 3) failure analysis of the ballast it is impossible to answer your question other than "Yes it is possible".
Comment: _"is it possible that the ballast is broken, but that there is still power coming out of it?"_ - yes.
Comment: A "phase tester screwdriver" will detect any electrical field over \$x\$ intensity, regardless of any other considerations. But at least two supplies power a fluorescent lamp - one for the filaments and another *between* the filaments. So this tool is incapable of determining which of the two has failed, since they are electrically common. Regardless, a new ballast is the solution.
Answer: Thanks for your comments. I put in a new ballast and that did the trick. So to answer the original question, and as indicated in the comments, just because there is power flowing out of the ballast does not mean that the ballast is ok.


Unused String and Image Resources in Android

Question: My project has a large number of String and ImageResources, many of which i feel are unused. Is there any way i can find out which of these resources are currently not been referenced from my code?
Answer: In Android Studio (tried up to Version 2.1.3), you can simply go to Main Menu -> Analyze -> Run Inspection by Name..., and select Unused resources

(It runs Android Lint for you.)
Comment: How to delete all resources?
Answer: In Android Studio there is a shortcut available.
Press Ctlr + Alt + Shift + i (or Cmd + Option + Shift + i on Mac)
This will open a dialog in which you can type "Unused" to see a number of options.
I generally type "unused resources" and get a list including layouts, strings, drawables, etc.
Answer: In Android Studio 2.0 and above
in menu select Refactor-->click on Remove Unused Resources...
Answer: Improving @Ramesh R answer, the best way is Right click on your res folder, Select Refactor and Remove Unused Resources.
This tool is fantastic, my applauses to his developer xD;
Answer: you can use lint
Android Lint is a new tool for ADT 16 (and Tools 16) which scans Android project sources for potential bugs.

Here are some examples of the types of errors that it looks for:
Missing translations (and unused translations)
Layout performance problems (all the issues the old layoutopt tool used to find, and more)
Unused resources
Inconsistent array sizes (when arrays are defined in multiple configurations)
Accessibility and internationalization problems (hardcoded strings, missing contentDescription, etc)
Icon problems (like missing densities, duplicate icons, wrong sizes, etc)
Usability problems (like not specifying an input type on a text field)
Manifest errors and many more.

Answer: Yes, the ADT in eclipse includes android lint
Refer android lint
Answer: You can use this library
Place it to project folder and run jar from command line.
Comment: This jar program finds resources that lint overlooks, such as in colors, dimensions etc...
Answer: If you want to delete unused resources in drawable file :
Click on drawable file ~ then Click Refactor ~ then Click Remove Unused Resources..
Answer: Regarding the image resources you would like to remove, you should also consider moving all the drawable-xxxx folders out of your project into a temporary folder, then do a rebuild all, and take a look at the build message list which will tell you which ones are missing.
This can be specially useful if you want to get an overview of which resources you are effectively using and maybe replace them with an icon font or svg resources, possibly with the help of the Android Iconics library.


Difference between Aggregate Precision-Recall curves and Precision-Recall curves

Question: In the context of Information Retrieval, some papers like this one talk about Aggregate Precision-Recall curves (cf figure 3). What is the difference between these curves and Precision-Recall curves ? The authors of this paper seem to make a difference between the two, because they describe the curves shown in figure 4 as Precision-Recall curves and not Aggregate Precision-Recall curves (cf section 4.5)
Answer: Aggregate vs. Non-aggregate P&R Curves
In general, there is a difference between precision-recall curves and aggregate precision recall curves. You typically create a precision-recall curve for a single query (query=entity in this paper) given a system -- by slicing up the ranking and calculating both precision and recall at every point, you can plot this curve.
When you have a few hundred queries (entities), as is typical in papers, you can't show a few hundred graphs (nor could humans interpret them...), so what you do is average the curves somehow. They are referring to this as "aggregate" precision recall curves in this work. It is a little unfortunate they do not specify their aggregation method, but it would be reasonable to assume they use the mean, which is quite typical for these curves. I like to mention the software package I used to do it in situations like this, since it's difficult to know exactly how to group recalls across queries.
On your more specific question (about Figures 3 & 4):
They're not actually making a difference between Figure 3 and Figure 4 in this paper; they're just less precise in their references to Figure 4. At the very end of section 4.1 (Dataset and Evaluation Metrics) they mention that they

report both the aggregate curves precision/recall curves and Precision@N (P@N) in our experiments

This is a typical convention of papers. Unless specifically stated otherwise, you can assume that graphs and measures refer to those described in a setup section like this one.
Comment: so you're saying that we have a list of precision and recall values for each relation (the list being parameterized by the number of retrieved relations),   and that each point in the PR curve is the average of the precision and recall over the relations ?
Comment: Yes, usually this means the aggregate. If they did something weirder, the only fallback (given it's not clear from the paper) would be to email the authors.
Answer: There are multiple relations considered. For each one of them, we order the instances discovered from the test set with respect to the confidence score (which is encoded in the output of the network), and report the precision and recall values. Once this is done for all the relation types, the precision and recall curves are averaged, so that in final we only have ONE list of precision recall values parameterized by the number of retrievals. How exactly the average is computed is not clearly stated in the paper. The plot of this list is what is referred to as the aggregate precision-recall curve. Thanks to @John Foley!


Transparent texture in OpenGL ES for Android

Question: I'm trying to set the transparency of a texture on a quad in opengl, playing with the blend functions didn't help neither did anything on google. Any suggestions?
Answer: I had a similar problem, with one piece of code that worked correctly and another that didn't. After a lot of logging and debugging, I found that the difference was one line of code.
In the code that had working alpha, I was calling the following before setting my renderer.
    setEGLConfigChooser(false)

If that doesn't help, here are a couple of other pointers...
Make sure that you've enabled blending before you load the texture.
For example:
    // Enable blending using premultiplied alpha.
    gl.glEnable(GL10.GL_BLEND);
    gl.glBlendFunc(GL10.GL_ONE, GL10.GL_ONE_MINUS_SRC_ALPHA);

...and make sure that the bitmap that you're using to generate the texture actually has an alpha component.
Answer: I was able to fix my problem listed using a different method. I first set
gl.glTexEnvf(GL10.GL_TEXTURE_ENV, GL10.GL_TEXTURE_ENV_MODE, /*GL10.GL_REPLACE*/ GL10.GL_MODULATE);

Then was able to set the alpha of a texture using
gl.glColor4f

Answer: Following Ron's answer I got closer to solving my problem of the texture's transparency not displaying. The next issue I had was, I had a non-GL SurfaceView behind my GLSurfaceView and by using:
setEGLConfigChooser(false);

I saw my texture okay but my entire SurfaceView was blacked out. The following fixed my issue:
setEGLConfigChooser(8, 8, 8, 8, 0, 0);

Setting false as the only parameter is one way to disable depth testing but you can effectively do the same by setting the 2nd to last parameter to 0 as well. The former will create a default RGB_565 config whereas I required a RGBA_8888 config hence the change.


Need to find users of ASN in my country

Question: Anyone knows where I can get list of Autonomous system number  users by country ?
If it is not possible to get it by country, any kind of list will suffice.
thnx
Answer: One good list can be found at: http://bgp.potaroo.net/cidr/autnums.html
Its harder to get them sorted by "country" since lots of organisations span several continents and might use the same AS globally, but the world is split up into regional registries so you can see atleast what region gave out the specific AS number. So for Europe, for example, you have RIPE. A list of AS numbers and what region they were given out to can be found at:
http://www.iana.org/assignments/as-numbers/as-numbers.xml
If you want to do some manual processing you can get information from this file too:
ftp://ftp.ripe.net/ripe/stats/delegated-ripencc-latest
Fields are split by |. The second field is country code, the third field type (asn for AS number) and the fourth field the actual AS number. Since its a text file you can easily import it in Excel and search around, or if you have access to command line utilities you can query it that way. An example from Linux with awk to list all AS numbers delegated to Sweden.
awk -F\| '{if ($2 == "SE" && $3 == "asn" ) print $4}' < delegated-ripencc-latest

To search for Russia replace SE with RU.
A bit more advanced from a Linux prompt, to download the RIPE database file, to sort out all AS numbers from russia, then prepare an input file for an AS number lookup service (from Team Cymru), then send the request file and save the output to asn.ru you you can do something like this, line by line into your Linux shell:
wget ftp://ftp.ripe.net/ripe/stats/delegated-ripencc-latest
awk -F\| '{if ($2 == "RU" && $3 == "asn" ) print $4}' < delegated-ripencc-latest > output.txt
sed -i -e 's/^/AS/' output.txt
(echo begin;echo verbose;cat output.txt;echo end) > input.txt
nc whois.cymru.com whois < input.txt > asn.ru

Then your asn.ru will output something like this:
Bulk mode; whois.cymru.com [2012-01-18 19:09:55 +0000]
2118    | RU | ripencc  | 1993-02-17 | RELCOM-AS OOO _NPO Relcom_
2122    | RU | ripencc  | 2000-06-30 | JSC PIOGLOBAL Asset Management, www.pioglobal.ru
2587    | RU | ripencc  | 1995-03-23 | FREE-NET-AS2587 OOO FREEnet Group

Answer: You can get all AS-numbers registered to a given country using the services on cc2asn.com. Input a two-letter country code (ISO 3166-1 Alpha-2), and all ASNs are returned. Options available to get IPv4 or IPv6 prefixes. Examples:
Using whois to get all ASNs for Sweden:
whois -h cc2asn.com SE

Will output
AS1755
AS1878
AS1879
AS1880
AS1881
AS1882
...

Or you can use curl to get the same data:
curl www.cc2asn.com/data/se_asn

You can also get the entire database, for offline lookups:
wget www.cc2asn.com/data/db.tar.gz

This database is updated on a daily basis (the frequency of the RIRs updating their delegations files).
Source code available on github: http://github.com/toringe/cc2asn
Answer: The ipinfo.io country reports include a list of all of the ASNs for each country. The screenshot below shows the data for Brazil, which is available at http://ipinfo.io/countries/br

Need to find users of ASN in my country


From what did we instantiated the concept of "Nothingness"

Question: So as i understand according to Aristotle's theory of abstraction every abstract concept (i.e universal) is instantiated (or abstracted) from it particulars in the outside world if that so how can we explain the existence of the concept "Nothingness" (or the concept of "impossible") in our minds if it has no particulars (Nothingness does not exist)
Comment: Abstraction in Aristotle works by selective attention, some features are disregarded and others are focused on. If you disregard all of them in any particular you are left with nothing.
Answer: If Blue is the quality of all blue things and Existence is the quality of all existing things, then surely Nothingness is the quality of all non-existent things.
Sounds right to me.
Answer: Systems are defined by boundaries (cf. systems theory), which essentially define what is and what is not the system. The idea of negation is inherent to our thinking.
Systems are, by definition, groups of interrelated parts. In multiple circumstances, a system loses all its parts (behavior known as dissipation). Emptyness is what happens to such system, and nothingness is its equivalent, from a generic point of view of existence.
For example, if you have marbles in your pocket, the system is "marbles", which is a group of parts (each marble) sharing an ideal relationship (e.g. they are all in the same place, or, they are all marbles of the same size, or they are all not coins). If your pocket gets empty, the system has dissipated, become empty.
So, the pure concept of "apple" raises the idea of "non-apple" in our mind. If I ask you to put all apples in a bag, you will not put a bottle inside, this is quite obvious, but it shouldn't be so. "Possibility" raises naturally the notion of "impossibility" in our mind. For nothingness, the idea of "everything" would produce a group of what is not everything. This is inevitable, it's just how our brain processes ideas. So, what is not everything comes to be nothingness, a natural idea raising from the idea of grouping all things.
Comment: So basically the idea of "Nothingness" came from the act of "Negation" wich is conter part to the law of identity of i understand well
Comment: I don't think the opposite of negation is identity. Identity is essentially the lack of mutation of an entity along time (following Aristotle's three laws, X should be X all along a set of mathematical operations, for example). The concept of nothingness has no intrinsic relation with time. But yes, we can say that _nothingness_ comes essentially from a negation. Like thinking of a lack of elephants in a room is essentially thinking on elephants in a room, and then removing them from the room.
Answer: For me Nothingness is simply the ontological reality/truth/God or whatever name which is similar. It's simply unknowable through our human mind perceptions, experiences, reasoning, no matter how advanced the techniques you employ, there's still an invincible gap between human understandings and the ultimate reality, assuming its existence. So you can also even claim it does not exist as we normally experienced in this world, not even like unseen X-ray.
The critical insight of Nothingness is like a blank paper metaphor, from it you can draw any shape or structure as long as it's possible according to certain rules. So many religions and philosophy schools historically conveniently used this vivid name to call the ultimate relevant reality, but the drawback is it easily caused so many confusions for layperson to believe there's no meaning or worthwhile to do anything. But on the other hand, no name will be perfect to describe the "undescribable" ontology...


gstreamer axis camera

Question: I have a rtsp web stream (axis 211 ip camera).  Gst-launch Playbin2 uri=... can show it just fine.  I cannot figure out the right pipeline to duplicate what playbin2 is doing.  Is there a way to dump a description of the pipeline playbin 2 creates.
Answer: You should first identify the type streams outputted by the camera. For example I have axis 1054 camera transmitting h.264 video and MPEG-4 AAC audio (.m4a) elementary streams.
So my pipeline for displaying the video is as follows:-
<code>gst-launch rtspsrc location = rtsp://192.x.x.x:555/media ! rtph264depay ! ffdec_h264 ! ffmpegcolorspace ! autovideosink.
</code>
If you are identifying the format of the streams correctly then you should have no problem.
Answer: use the -v argument to gst-launch. You can figure out what pieces to put together from the output.
Answer: The other answer were useful for sure but in the end I found the bast way is to use the DOT file dump.
http://gstreamer.freedesktop.org/wiki/DumpingPipelineGraphs
you can see al the details of what the playbin constructed..  Very useful.
In a C program you can call
GST_DEBUG_BIN_TO_DOT_FILE()

gstreamer axis camera


Increasable and decreasable signal strengths

Question: I want to be able to press a button to increase a signal's strength by 1 and press another button to decrease it by 1. I have thought about making 15 t flip-flops, but that sounds like a difficult way of doing it. What is a better way to do this?
Answer:
This is probably the most compact circuit of this type; it additionally can accept pulses on any length on both inputs and provides symmetrical signals, x and 15-x on the two sides. The only downside is that you need 18 stacks of any 64-stackable item, to completely fill the droppers under the repeaters - the other droppers are to be left empty. Both repeaters should be set to 2 ticks.
This circuit should also work on Bedrock Edition, with the small modification - add solid blocks on top of the empty droppers to power them through these blocks - on JE they can be powered through quasi-connectivity.
Answer: I have found a viable solution:
Signal strength memory
It does exactly what the description says, except the "button" has to be exactly 2 ticks or it will increase/decrease too much. A simple pulse shortener should sort that out.
Here is what it looks like as well as a layer breakdown:
Comment: Pleas do not post link-only answers as the links may become unreachable or unavailable. You can put the link as your source but you must include some basic description of the links.
Answer: Maybe you could have two droppers facing each other and get a signal from one with a comparator, one button could cause a dropper to add a item to the other and increase the signal strength and the other dropper could send an item back to the other to decrease signal strength.


Use body field for views nivo slider instead of title field

Question: I'm implementing a Views Nivo Slider on a Drupal site.  It's currently taking the title field for the caption and using the whole text as a link.  How can I configure it to use the body field for the caption so I can just have specific words for links instead of the entire field?
Answer: When you set up the view, you can click on the Row Style options (the little gear thingy :) and then it will give you three options, Image Field, Title Field, and Link Field.  The Title Field is the Caption and you can put any field that you've selected in your view (in Fields) you want for it. So, if you've selected Node Body as a field, you should be able to select it there.  But, just as using the Node Title, it will put in the whole body (or at least what part will fit I'd imagine) in the caption.  If you want something else, you may want to consider yet another field in your content type, or some sort of views rewriting of the field.


Looking for a word for an annoying person

Question: Is there a word for an annoying person? I'm not just looking for synonyms of annoying.
Comment: If you're not looking for synonyms, what are you looking for? You need to describe what you're trying to express, and hopefully also provide an example sentence for the type of word you're looking for. (What's wrong with *annoying* in the first place?)
Comment: What did a thesaurus suggest?
Answer: It would depend on how they're annoying.
If they are annoying in a little sister or little brother sort of way, try "pest".
If they are annoying in an unwanted suitor way, especially if 'suitor' is very much a euphemism, try "creep".
If they are annoying in a general way, they may be a "loudmouth" (self-evident), a "nerd" (annoying in that slow-to-develop socially way), or even a "busybody" (in this case, more in the personally nosy way than in the gossipy way).
In general, all of these people are "nuisances".
(But these are also given as nouns, and most won't work as direct substitutes for the adjective annoying.)
Comment: Exactly right. There are thousands of terms for annoying persons. They're one of our favorite conversational topics, and new ones are made up daily. They all depend on the context they occur in, and the presuppositions and entailments it provides for interpretation.
Answer: irksome TFD
adj.

Causing annoyance, weariness, or vexation: irksome duties; irksome
  restrictions;

As in:
an irksome person
Answer: This might depend on the context of your need for the word, but maybe pest or nuisance?


webform2pdf blank page

Question: I am using webform2pdf. I'm having an issue with the download PDF button; it goes to a blank page when it goes to a path like /node/3/webform-results/downloadpdf. Does anyone have a fix for this?
Comment: See the d.o.[page](https://www.drupal.org/node/158043) on troubleshooting the WSOD death for finding the error in Drupal blank pages.
Answer: what PHP errors do you get when errors are set to be shown on the website from your php.ini or htaccess file. webform2pdf has a dependency on TCPDF library and they often become out-of-sync with one another. So as a developer you need to be sure you're using the recommended versions of the required dependencies.
Answer: I actually went on a long shot and downloaded the tcpdf straight from http://www.tcpdf.org and created a folder named /sites/all/libraries/ from there I took the tcpdf folder and dropped it in that directory. Fixed everything. The Drupal module for TCPDF does not work.

webform2pdf blank page


RefinableString## actual values are not shown in the refinement panel

Question: We are trying to create a new custom search refiner based on an existing managed property.We have mapped the existing crawled property in people results to the RefinableString## in order to add it to the refinement panel. Although it shows up in the list of refiners, the real values are not shown. It has been 4 days since we did the mapping. Can you please let us know how to proceed
Answer: We had faced same issue in SharePoint Online environment. There is no problem with the process you followed. Once i read a SPO document where it was specified that continuous crawl happen every 15 mins and full crawl happens every 48 hours. But that was true for long back. Its almost over a year, we faced same issue, where full crawl happen after 7 days. After the full crawl we were able to get the right values.
It could be one of your case, you can raise a ticket with Microsoft for full crawl in such case.


How to calculate the transformation from the pivot point to each stereo camera

Question: I checked the API documentation and this related question, and it looks like there is no easy way to get the pose of both the left-stereo and right-stereo cameras. So, I think the only solution is to calculate the transformation by ourselves. I will propose a solution myself but feel free to add your own to the answers if you know a better/simpler way.
Answer: Assuming that Stereoscopy in ON (bpy.context.scene.render.use_multiview = True). No matter how you change the stereoscopy parameters (Mode, Interocular Distance, Pivot, ...), the world_coordinates of the camera are always the same, which can be obtained using C.scene.camera.matrix_world. So my first question was what is camera.matrix_world pose representing in a stereo setup?
A: I made some tests and I found that it always corresponds to the pose of the Pivot point. So if Pivot = Left it corresponds to the left camera, Pivot = Right to the right camera, and Pivot = Centre it corresponds to neither of the cameras, but the point in the middle!
For simplification, I will assume that we only care about the Pivot = Left scenario. Also, here I will assume that we are using the computer vision axis, with the Z outwards the camera. Since I am in the Pivot = Left scenario, I can convert the C.scene.camera.matrix_world into the extrinsic of the Left camera (using @rfabbri method). Note that if we were in the scenario of Pivot = Centre, we would need to calculate two transformations, from pivot to left-stereo and from pivot to right-stereo.
Pivot = Left
Stereo mode 1 - Parallel
In this mode, it is easy to calculate the transformation, since it corresponds to a single translation that depends on the stereo.interocular_distance.

Stereo mode 2 - Toe-in
In this mode, in addition to the interocular_distance we rotate the non-pivot cameras, in this case, the right camera only. What I imagined it would be something like in the image below. However, I made a test, with a small sphere 10 [m] away from the pivot (in this case the left camera), with a convergence_distance = 10 [m] and interocular_distance = 10 [m]. With these values the centre of the sphere does not align on the two stereo images, so the set-up below is wrong.

Experiment:

Stereo mode 3 - Off-Axis
The off-axis currently I don't understand how it works.
I think here it is not only a geometrical transformation, but they also change the intrinsic matrix of the non-pivot camera, since they mention shifts in the documentation.
Does anyone understand how the Toe-in or Off-Axis work in Blender? Specifically, I am interested in their geometric models.
I will edit the answer once I find out more information.


interface stops retrieving pages when static ip is set

Question: Below is my current setup, the main ethernet connection is configured with a static ip and it's working fine. The two other interfaces are connected to different Android hotspots using DHCP. I have also configured routes so that each interface can receive/send traffic independently
Below is my fully working /etc/network/interfaces file
root@poweredge:/etc/network# cat interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug enp1s0
#iface enp1s0 inet dhcp
iface enp1s0 inet static
        address 192.168.1.212
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1

auto wlx74da388c32d0
iface wlx74da388c32d0 inet dhcp
        wpa-ssid four
        wpa-psk fcac8bd4439859aadf1457463f47f49091acb02895bd5a28914a1fc36969c66d
        post-up ip route add default via 172.16.11.254 table wlx74da388c32d0
        post-up ip rule add from 172.16.11.107 lookup wlx74da388c32d0

auto wlx74da388c32c7
iface wlx74da388c32c7 inet dhcp
        wpa-ssid one
        wpa-psk e629e0873738c638cde76ae81487effb28b0e22c309c9e163996e389a313c14c
        post-up ip route add default via 192.168.43.1 table wlx74da388c32c7
        post-up ip rule add from 192.168.43.209 lookup wlx74da388c32c7

I have confirmed that each interface is working independently by using the following commands
curl --interface wlx74da388c32c7 ifconfig.co
curl --interface wlx74da388c32d0 ifconfig.co
curl --interface enp1s0 ifconfig.co

Each curl command is showing the public IP address of the connection as expected. This is exactly how I want things to work.
However, I am running into issues when I setup a static IP on one of the wireless interfaces. For example when I change interface wlx74da388c32c7 to static IP as below
auto wlx74da388c32c7
iface wlx74da388c32c7 inet static
        address 192.168.43.100
        netmast 255.255.255.0
        gateway 192.168.43.1
        wpa-ssid one
        wpa-psk e629e0873738c638cde76ae81487effb28b0e22c309c9e163996e389a313c14c
        post-up ip route add default via 192.168.43.1 table wlx74da388c32c7
        post-up ip rule add from 192.168.43.100 lookup wlx74da388c32c7

curl just hangs when I try to get a page using any interface.
Below is my rt_tables
root@poweredge:/etc/iproute2# cat rt_tables
#
# reserved values
#
255 local
254 main
253 default
0   unspec
#
# local
#
#1  inr.ruhep
10 wlx74da388c32d0
11 wlx74da388c32c7

and below is my ip a command after setting the static ip on the wlx74da388c32c7 interface
root@poweredge:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp1s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:1e:4f:cd:c1:5f brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.212/24 brd 192.168.1.255 scope global enp1s0
       valid_lft forever preferred_lft forever
    inet6 fe80::21e:4fff:fecd:c15f/64 scope link
       valid_lft forever preferred_lft forever
3: wlx74da388c32c7: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 74:da:38:8c:32:c7 brd ff:ff:ff:ff:ff:ff
    inet 192.168.43.100/24 brd 192.168.43.255 scope global wlx74da388c32c7
       valid_lft forever preferred_lft forever
4: wlx74da388c32d0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 74:da:38:8c:32:d0 brd ff:ff:ff:ff:ff:ff
    inet 172.16.11.107/24 brd 172.16.11.255 scope global wlx74da388c32d0
       valid_lft forever preferred_lft forever

My ip route list when DHCP is being used
root@poweredge:~# ip route list
default via 192.168.1.1 dev enp1s0 onlink
172.16.11.0/24 dev wlx74da388c32d0 proto kernel scope link src 172.16.11.107
192.168.1.0/24 dev enp1s0 proto kernel scope link src 192.168.1.212
192.168.43.0/24 dev wlx74da388c32c7 proto kernel scope link src 192.168.43.209

My ip rule list when DHCP is being used
root@poweredge:~# ip rule list
0:  from all lookup local
32764:  from 192.168.43.209 lookup wlx74da388c32c7
32765:  from 172.16.11.107 lookup wlx74da388c32d0
32766:  from all lookup main
32767:  from all lookup default

Anyone know what I'm doing wrong?
Comment: @HaukeLaging should I do those when the static ip is set or when DHCP is set?
Comment: Your `ip a` output shows that the WLAN interfaces are both *down*...
Comment: @HaukeLaging that happens when I set the static ip
Comment: So is the problem gone after `ip link set up dev wlx74da388c32c7; ip link set up dev wlx74da388c32d0`?
Answer: in your ouput for ip rule list you have the ip 192.168.43.209 this ip does not match with 192.168.43.100 .
To simplify your routing table , you can change  to :
post-up ip rule add from 192.168.43.0/24 lookup wlx74da388c32c7


java Jar's library conflicts

Question:
I've been struggling for a while trying to figure out which war application is using a couple of libraries (ie  "cxf-2.0.3-incubator.jar" & "cxf-manifest-incubator.jar") that are causing me troubles at the moment of deploying a new war application on a jboss.4.0.5.GA java application server. The thing is that if I remove those jars, the conflict disappears and the newly deployed application works fine. However trying to deploy this application without removing the mentioned jars fails.
Is there any tool or (linux bash command) suitable for listing all jar dependencies for war applications? (I've already tried tattletale tool, but it seems to work only with jars components).
Regards
Answer: If you can then try to mavenize your web application project to get all the dependencies that are required and to get away from all the non-required ones.

java Jar's library conflicts


What to do when there's no more adjustment room on disc brakes

Question: I just built up a new frame and discovered that, due to slightly different geometry the rear disc caliper can't be adjusted so that it doesn't rub. Basically I've got them all the way over to one side and it's still not enough. Can I fix this without getting new brake calipers? They're Shimano BR-M406 hydraulic caliper BTW.
Comment: @Ӎσᶎ yep, I ended up finding a washer from an old axle and putting it on axle on the side with the rotor - the disk was rubbing on the outside of the caliper. That fixed it, but the axle bolt on that side doesn't stick out the full width of the drop out now, which concerns me. When I've got the energy I'll loosen off the lock nuts and put it next to the cone, and then wind the axle through so it's even, but that's going to be a whole evenings work with adjusting the cones again.
Comment: First make sure you've got it all assembled correctly! If you need the rotor closer to the frame you can buy sets of shimming washers for the rotor that are very accurately all the same thickness. To move it away the slightly annoying solution is a washer on the axle. Depending on the wheel setup you may be able to put that washer between the locknuts on the axle which would remove a lot of the annoyance.
Comment: What side is the issue on? Inside or out? Depending on your wheel you may be able to move the hub along the axle slightly through loosening and tightening the cones. Or you could shim the disc out a little with thin washers but don't know how safe that would be.
Comment: I have noticed that there are two kinds of calliper attachment. Some of them have spherical washer kit onto the bolt, allowing for finer adjustment, while others are just post-mounted onto the fork/adaptor and have much less space for tuning.
Answer: Ӎσᶎ's answer was the method I went with. I just got a washer from another hub (I didn't want to use a plain old steel washer from the hardware shop because I was concerned it might be too soft, though that might not be the case) and put it on the axle next to the cone. I did that In January and it's done about 4000k without any problems since then.
Answer: You can buy shims to put between the disc and hub. Here's one example: http://www.jensonusa.com/Syntace-Disc-Rotor-Shims
It's really that simple.
Comment: It's a good tip for people who have the opposite problem to me, but I needed the rotor to go toward the wheel - or the calliper to go away from the wheel.


System.ObjectDisposedException with graphics object

Question: I have to write a game in C# using a Windows form. For my drawing method on my screen, I'm getting a weird System.ObjectDisposedException which spawns upon one of my graphics objects being instantiated.Here is the problematic code:
// Graphics variables.
Graphics graphics;
Graphics backBufferObject;
Bitmap backBuffer;
// Graphics and backBuffer are instantiated, elsewhere, in the constructor.

private void DrawScreen()
{
    // Copy the BackBuffer to Graphics Object.
    using (graphics = Graphics.FromImage(backBuffer))
    using (backBufferObject = this.CreateGraphics())
    {
        // Draw BackBuffer to screen (buffer switching).
        backBufferObject.DrawImage(backBuffer, 0, 0, this.Width, this.Height);

        graphics.DrawImage(Properties.Resources.scary_pacman, new Rectangle(
            this.Width / 2 , this.Height / 2, 32, 32));

        graphics.Clear(Color.Thistle); // Clear BackBuffer for efficient rendering.
    }
}

The problematic line, which throws a System.ObjectDisposedException is the line: using (backbufferObject = this.CreateGraphics()). I'm not sure why this exception is being thrown at this particular point due to the fact that this object is being reinstantiated at this point, whereas it was disposed at the end of the using brackets. So far I've tried putting those two lines in using statements due to the fact that they are affected by IDisposable.
It'd probably be noteworthy that the error is being thrown after I close the Windows form during Run time. So why is this Graphics object being disposed of in this particular instance?
Full code: http://pastebin.com/mSa6XCpP
Answer: If your form has been disabled, the this referenced in the line of code the exception happens on:
using (backbufferObject = this.CreateGraphics())

... will like already be disposed. So it isn't the Graphics object that's being disposed. It's the form.


View Cookies in Mozilla Firefox

Question: If you use Mozilla Firefox in the "never remember history" setting, how can one see which cookies are currently saved (and possibly delete specific ones)? The answer I've heard is to look in Preferences -> Tools, but this is the screen shot of that tab, and there is no list of cookies here:
Answer: As of Firefox 61, access to cookies has been removed from regular end user UI. You can still see and modify them via Developer Tools however:

Press Ctrl+Shift+I (Cmd+Option+I on macOS) to open Developer Tools.
Click the heading of the "Storage" tab.
On the left side of the panel, make sure to select the desired site under "Cookies." If the site has third-party frames, you can also see cookies set by these frames by selecting the right site.
You can delete cookies via context menu. You can also double-click the value to modify it.

Original answer, for reference
The Page Info dialog lets you view cookies - from the context menu on a page choose "View Page Info", go to the "Security" tab and click "View Cookies". By default it will only show the cookies for the current page but you can remove the search string and it will show all cookies. If you want it a bit more comfortable you can install the View Cookies extension.
Comment: The problem is that this requires actually going to the site which might not be possible for any number of reasons, but more importantly, going to the site might very well modify the data. I don't understand why they removed the ability to view cookies out-of-band.
Comment: @WladimirPalant, that's the problem, it used to show you values and let you delete individual cookies, now it only shows you the sites and lets you only delete _everything_. The "simple" UI is completely useless. They assume every domain hosts only a single site and that all cookies are related to a single entity which is just not true (eg Geocities/ISP hosts, etc). Even if it were true, it's still useless because you might not want to delete everything. For example, you might want to only delete the cookies for a single game on Kongregate, not all of them.
Comment: Mozilla "We totally value privacy and user freedom" Firefox, everyone
Comment: @SorenBjornstad: Yes, I've updated this answer for new Firefox versions.
Comment: That extension is now removed from Firefox addons website.
Comment: This answer should add the details from the more up-voted answer, and it would be a very comprehensive solution. Additionally, the fact that the extension was removed is a definite detractor from this answer.
Comment: The Page Info dialog no longer has this option as far as I can tell (Firefox 62.0). It lets you clear the cookies but not look at them.
Comment: is there a way to export them?
Comment: @JonathanBaldwin, a doubleplusgood example of newspeak that is
Comment: @Synetech: Under about:preferences#privacy you can click "Manage data" which will list all the sites along with the number of cookies stored. But it will no longer show you the actual values, presumably to keep this UI simple.
Answer: Quick Solution:
You can manage cookies by going to the following address*:
chrome://browser/content/preferences/cookies.xul

*Domains have been removed from the screenshot

Alternatively...
Setting Firefox to Never remember history will hide the link or button to manage cookies. To enable the button, you must choose Remember history or Use custom settings for history as @kreemoweet mentioned.
Comment: This doesn't work anymore (Firefox 62.0) -- the page doesn't exist.
Comment: The `chrome://` URL scheme refers to the _application_ look-and-feel.  It is unrelated to and was in use well before the similarly named browser by Google.
Comment: This doesn't work on Firefox 63 on mac os High Sierra. I get an error: "File not found"
Comment: this *does* work on Firefox 52 (on RHEL 7.4) and I'm actually quite surprised that Firefox implements a `chrome://` URL scheme
Answer: By far, to me, this seems the best way to view and delete cookies in the Firefox since it shows some details which are not available in the other methods - e.g. if a field in a cookie is httpOnly or not will be visible this way.

Press F12 to open Firefox Developer Tools.
Go to Storage tab.
From the left pane, expand Cookies node. Under this node you can see a list of Websites that have cookies stored on your device.
Select one Website and see its cookies on the right pane with their details. From here you can delete every individual cookie.

HTH
Comment: The problem is that this requires actually going to the site which might not be possible for any number of reasons, but more importantly, going to the site might very well modify the data. I don't understand why they removed the ability to view cookies out-of-band.
Comment: As of 2018-06, or Firefox version 60 this is the only option. Page Info, chrome:URI, preferences/privacy and most of plugins will not show individual cookies.
Comment: "a list of Websites that have cookies stored on your device" - to be clear, this is only a list of sites/domains (and associated cookies) that have set cookies as a result of visiting the currently viewed website. It's not a list of _all_ websites that have cookies stored on your device.
Comment: @Synetech When you visit the site and open the developer tools afterwards, any new modifications will be there. So, other than probable impossibility of going to the site, data modification should not be a serious problem I guess. I, too, don't understand why they removed the ability to view the cookies out-of-band.
Comment: Worked great on Firefox 63 on Mac OS High Sierra.
Comment: `When you visit the site and open the developer tools afterwards, any new modifications will be there.` @Kamran That's my point. By going to the site, you risk the data getting modified. It's no longer possible to view the data without risking it being modified from within the browser itself. :-\
Answer: Access the Cookie Database
You can query the cookie DB directly using SQLite; you'll have all the power of SQL at your fingertips.
First, find the Firefox profile directory. Type about:support in the URL bar. Look for "Profile Folder" in the table. Open a terminal and change to that directory.
$ cd ~/.mozilla/firefox/fw6qr.default-1234567

Close Firefox to unlock the cookie DB. Then open the cookie DB using SQLite.
$ sqlite3 cookies.sqlite
sqlite> .tables
moz_cookies
sqlite> -- view cookie table schema
sqlite> .schema moz_cookies
sqlite> -- example cookie query
sqlite> SELECT host, name, value FROM moz_cookies ORDER BY host;
sqlite> -- delete tracking cookies
sqlite> DELETE FROM moz_cookies WHERE host LIKE '%googleadservices.com';

Pro Tip
The cool thing about accessing the cookie database directly is that you can programatically delete nefarious or annoying cookies. Just wrap the invocation to Firefox in a script. After Firefox terminates, then cleanse your cookies.
Comment: Great tip. One thing though: one does not have to close Firefox. You can just copy the SQLite db file to some temporary location and then open it.
Answer: Also, you could find Cookie Manager+ add-on useful. In particular, "Delete and block" command there.
Comment: That looks interesting. Can add-on's like this leak information. i.e., am I giving the information about the cookies to the author of cookie manager+, or is it all working in a sand box?
Answer: You could try the Firecookie addon.
Comment: Firecookie is not compatible with the firefox on the beta channel, so I haven't tried it yet, but it looks good. They should update it to make it compatible with 11.0, if you are or know the developer.
Answer: In Private Browsing you do not have cookies stored, so there's nothing to see.
Details at: http://support.mozilla.org/en-US/kb/Private-Browsing.
Edit to add:
If you have pre-existing cookies you want to look over, you can change the
drop-down box setting to "use custom settings for history", which will cause
a number of additional settings to appear below, among which is a button to
"View Cookies".
Comment: The question is not asking about Private Browsing. The user has set Firefox to 'never remember history'. This preference keeps any old history, cookies, etc, but in the future, will not store any history.
Comment: Good catch! That is the reason why the 'show/remove cookies' link is missing. :)
Comment: I think it still saves cookies for the length of the session. Otherwise, you wouldn't be able to log in to gmail, and everythime you open a link, you would have to log back in. Its just that the cookies are deleted when you quit the application.
Answer: The list of cookies is here (any plugin is needed) :
Preference -> Tools -> Privacy -> Historic -> on the combo box is selected : "Use custom settings for historic"
They are few checkbox underneath and a button named: "Display Cookies.."
When a click under this button a window pops with all the currents cookies inside, which could be deleted
I'm using FireFox 10.0 and I'm able to see which cookies are currently saved (and possibly delete specific ones).
Comment: Strangely, that button is only displayed with the `Use custom settings for history` setting. It is not displayed when `Never remember history` is selected.
Answer: The only built-in way at the moment is to go through the Developer-Tools which requires actually going to the site (assuming that's even possible), but even then, that means it's possible/likely that when you do, the site will modify the cookies. Unfortunately, for some reason, the Firefox developers decided to remove the built-in ability to view cookies out-of-band from the browser itself.
If you want to view cookies for a site without going to it (e.g., it's down, no Internet access, you want to recover the data, do mild forensics, etc.), currently the only option is to use a third-party utility. Fortunately Nirsoft is a reliable, trusted source of tools and his MZCookiesView utility is ideal for this purpose.
Some features include:
 • View and delete cookies without even closing the browser
 • Provides useful sorting, search, and filtering functions
 • Gives instant access to full meta-data about the cookies
 • Makes it easy to work with cookies of different profiles
 • Can let you access and edit with offline/backup profiles
 • Has builtin backup and restore functions for cookie file
 • Manually select a different "cookies.sqlite" file to use
Comment: (Sometimes I run into issues myself and find my way back onto SE sites—which is unavoidable now. If I end up finding a solution that isn't listed, then I'll probably share it. I'm just not actively "playing" the StackExchange MMOG anymore; I don't care about medals and points.)
Comment: unrelated, but in your bio you said you will not be helping future users and said sorry to the 'non-existent' future users for not helping. Here I am forgiving you for the sorry you said back, for the endeavor you are doing now.

View Cookies in Mozilla Firefox


QGIS keeps cutting off attribute table column names after 10 characters, can I stop this?

Question: How do I get QGIS to stop chopping off parts of my attribute table column names past 10 characters? Or is this unavoidable
Comment: If you use a shapefile, this limitation is by design
Comment: If save your layer as a Geopackage you can have longer field names.
Answer: See here: http://switchfromshapefile.org/#10characters
Referring to shapefiles:

Attribute names are limited to 10 characters max. Longer names are
usually automatically shortened. This leads to abbreviated and/or
cryptic attribute names that are unintuitive to the recipient of the
data.

More details about Shapefiles in the Shapefile Technical Description and Shapefile on Twitter.
If you want to use more than 10 characters, you should use another format, e.g. geopackage. Most limitations of shapefiles are not relevant for geopackage. However, Shapefiles are a de facto standard for interchange and has the best support for reading/writing. Geopackage however has become more popular and in the meantime most GIS software can at least read Geopackage. Full writing support is not implemented everywhere, so always reflect what you will need your data for: just for yourself, locally? Or do you have to share your data? With whom? What kind of software do they use and how is Geopackage supported by this software? Are they maybe willing to install QGIS instead to get full Geopacke support? If you just have to deal with people using QGIS and FOSS software, Geopackage might be a good choice.
However, even here some disadvantages of using Geopackage might be worth considering. I cite from a presentation of Geopackage Hackaton (the original is in german), see the second pdf here (Geopackage Hackathon - Einführung) on page 6:
https://www.inspire.gv.at/INSPIRE-Oesterreich/GeoPackage-Hackathon.html

Geopackage is based on SQLite DB, a complex binary format
(=disvadvantage for archiving)
The format is not streamable: it must be written to a local file
system or most be accessible by a data service

As an alternative if you have to share your data often and don't want to use either Shapefile or Geopackage, consider using a server based geodatabase system like PostGIS.
Also consider this from the official Geopackage website FAQ:

Does GeoPackage replace Shapefile?
It could but it doesn't have to. If all you need is simple exchange
and display then GeoPackage may be overkill and something like GeoJSON
may be more appropriate.

And than there is also file geodatabase that is ESRI's solution to the shortcomings of its own Shapefile format. However, file geodatabase has also disadvantages compared to geopackage, see: https://carto.com/blog/fgdb-gpkg/
And, last but not least, see The Ultimate List of GIS Formats and Geospatial File Extensions.
Comment: So it looks like the 10 character limit cannot be overcome then
Comment: Not with shapefiles, correct
Comment: That's a really good article you've linked to, it exposes all of the potential problems and comments on the benefits of the shapefile format. I think it's important to mention that the shapefile definition was documented by Esri in 1998 when ArcINFO (workstation) coverage was the major GIS data storage. At that time hard drives were *very* small in comparison, the CPU was Pentium II, the concept of a 2 GB file was considered ludicrous. Since then shapefiles have become the lowest common denominator for interchange and nobody wants to change the spec as it would destroy interoperability.
Comment: Added some information in my answer


Workaround for lack of "hide sensitive content" setting for lockscreen notifications in CyanogenMod 13?

Question: I have recently installed CyanogenMod 13 on an Android One phone (i.e. the 'sprout' version of CM).  I installed the release version.  In the notification settings, under "when locked", I was surprised to find that the setting "hide sensitive content" is missing.  I.e. I can either choose to have all my notifications be completely visible, or I can choose to have them be completely hidden.  Neither of those is a convenient setting.  Is there a workaround for this?
Comment: Looks like a bug. You should report this to CM's issue tracker and see what they reply with. You could try a different ROM in the meantime. Or you could one of the dozens of lock screen replacement apps on the play store, but then they can also access all your notifications, even if they don't show them on the lock screen (via accessibility permissions).
Answer: The problem turns out to be that this option only shows up if the lock screen is set to a PIN / password / etc.  If it is set to swipe, it doesn't show up.  This is not exactly intuitive but I guess it makes sense at some level.


How does a minor major seventh chord have tonic function when it's so unstable?

Question: In a minor key, the chord built on the tonic can be a minor sixth or a minor major seventh chord, both of which are supposed to have tonic function. To my ear, the minor sixth chord can feel like "home", but I've always heard the minor major seventh chord as being too unstable to sit on because of the augmented triad inside it. How is it supposed to have tonic function then? (I know it's the I chord in harmonic (or melodic) minor. My question is how it can have its supposed harmonic function.)
Answer: While generally in functional harmony chords build on the i are considered to have tonic function, this is not always the case, especially when using non-traditional chord like the minor 6th or the minor major 7th. The minor 6th does not come from either the natural or harmonic minor scales, the scales most often used to build chords in the minor key. It can be considered to come from the melodic minor scale as you state in your question. I have mostly heard that it's from the dorian mode. On the other hand, the minor major 7 can be considered to be build using the harmonic minor scale. This is an atypical use of the harmonic minor scale as mostly it is just used to build a dominant V chord (or sometimes a viio chord). To my knowledge, both of these chords come from jazz theory and do not follow the typical rules of functional harmony.
So, to the nitty-gritty. Both minor 6ths and minor major 7ths can be considered to have tonic function, but do not necessarily have tonic function given certain circumstances. The tritone in the minor 6th and augmented 5th in the minor major 7th are prone to sounding resolved when moved. A minor 6th build on the tonic is enharmonically equivalent to a diminished 7th built on the 6th scale degree. Meaning it can act as a secondary dominant, specifially the viio/♭VII, iio/v, ivo/III, or vio/♯i (not 100% sure about the last two). Further, I've seen the minor major 7th resolve to the ♭III chord; the augmented 5th interval falls down to a perfect 5th interval. This can tonicize the relative major. All that is to say, these chords can be very directional and have clear dominant function even if build on the 1st scale degree.
If you want to establish tonic function with one of those chords here are a few suggestions:

Stay on the home chord. Eventually, any chord or structure you sit on will become tonicized.
Try a two-chord vamp. Switch between your chord of choice and the root triad.
Move to the minor 6th or minor major 7th chord with a dominant function chord like the V or the viio.
Move away from minor 6th or minor major 7th chord in such a way that doesn't show a clear resolution. See above for chords not to go to.

Lastly, to your point of minor major 7th chords sounding less able to be tonicized than a minor 6th chord. Quite possibly this is due to the fact that we are much less familiar with augmented triads than diminished ones in western music. Particularly, this is true if you listen to a lot of blues where dominant 7th chords are ubiquitous (the upper structure being a diminished triad).
Comment: I've only ever come across mM7 as a 'stepping stone' chord - usually between tonic  m to m7. This Masquerade is an example. It's hardly a chord to finish a piece on, so 'tonic function' seems a strange term to blight it with.
Comment: Thanks for the thorough answer. Fair point about unstable intervals in both "tonic" dominant seventh chords and minor sixth chords which I don't have a problem with. It probably is just being used to that sound from the blues.
Comment: it's not to do with familiarity, the minor 6th is an inherently stable chord, acoustically speaking.  The minor major seventh most certainly isn't.


Create a single executable from a Python project

Question: I want to create a single executable from my Python project.  A user should be able to download and run it without needing Python installed.  If I were just distributing a package, I could use pip, wheel, and PyPI to build and distribute it, but this requires that the user has Python and knows how to install packages.  What can I use to build a self-contained executable from a Python project?
Answer: There are several different ways of doing this.

The first -- and likely most common -- way is to use "freeze" style programs. These programs work by bundling together Python and your program, essentially combining them into a single executable:

PyInstaller:
Website || Repo || PyPi
Supports Python 3.7 - 3.10 on Windows, Mac, and Linux.

cx_Freeze:
Website || Repo || PyPi
Supports Python 3.6 - 3.10 on Windows, Mac, and Linux.

py2exe:
Website || Repo || PyPi
Supports Python 3.7 - 3.10 on Windows only.

py2app:
Website || Repo || PyPi
Supports Python 3.6 - 3.10 on Macs only.

The main thing to keep in mind is that these types of programs will generally only produce an exe for the operating system you run it in. So for example, running Pyinstaller in Windows will produce a Windows exe, but running Pyinstaller in Linux will produce a Linux exe. If you want to produce an exe for multiple operating systems, you will have to look into using virtual machines or something like Wine.

Of course, that's not the only way of doing things:

pynsist:
Website || Repo || PyPi
Pynsist will create a Windows installer for your program which will directly install Python on the user's computer instead of bundling it with your code and create shortcuts that link to your Python script.
The pynsist tool itself requires Python 3.5+ to run, but supports bundling any version of Python with your program.
Pynsist will create Windows installers only, but can be run from Windows, Mac, and Linux. See their FAQ for more details.

Nuitka:
Website || Repo (Github mirror) || PyPi
Nuitka will literally compile your Python code and produce an exe (as opposed to the other projects, which simply include Python) to try and speed up your code. As a side effect, you'll also get a handy exe you can distribute. Note that you need to have a C++ compiler available on your system.
Supports Python 2.6 - 2.7 and Python 3.3 - 3.10 on Windows, Mac, and Linux.

cython:
Website || Repo || PyPi
Cython is similar to Nuitka in that it is a Python compiler. However, instead of directly compiling your code, it'll compile it to C. You can then take that C code and turn your code into an exe. You'll need to have a C compiler available on your system.
Supports Python 2.7 and Python 3.3 - 3.11 on Windows, Mac, and Linux.

My personal preference is to use PyInstaller since it was the easiest for me to get up and running, was designed to work nicely with various popular libraries such as numpy or pygame, and has great compatibility with various OSes and Python versions.
However, I've also successfully built various exes using cx_Freeze without too much difficulty, so you should also consider trying that program out.
I haven't yet had a chance to to try pynist, Nuitka, or Cython extensively, but they seem like pretty interesting and innovative solutions. If you run into trouble using the first group of programs, it might be worthwhile to try one of these three. Since they work fundamentally differently then the Pyinstaller/cx_freeze-style programs, they might succeed in those odd edge cases where the first group fails.
In particular, I think pynist is a good way of sidestepping the entire issue of distributing your code altogether: Macs and Linux already have native support for Python, and just installing Python on Windows might genuinely be the cleanest solution. (The downside is now that you need to worry about targeting multiple versions of Python + installing libraries).
Nuitka and Cython (in my limited experience) seem to work fairly well. Again, I haven't tested them extensively myself, and so my main observation is that they seem to take much longer to produce an exe then the "freeze" style programs do.

All this being said, converting your Python program into an executable isn't necessarily the only way of distributing your code. To learn more about what other options are available, see the following links:

https://packaging.python.org/overview/#packaging-python-applications
https://docs.python-guide.org/shipping/packaging/#for-linux-distributions
Comment: @DebayanPaul:  since these are packaging solutions, what you do in your code shouldn't be important, unless it has impact during package-time. I eventually used pyinstaller, which worked great
Comment: Hi @Michael0x2a, I was wondering if any of these solutions can work for multiple Python scripts which has interdependencies and user input collection, at a same time and create a single .exe file? I have a Python project based which has multiple scripts for different functionalities like user inputs collection, .txt file processing, dashboard creation etc.
Comment: I'd discourage Cython for this. It's only really designed to compile single modules and so explicitly doesn't handle the problem of bundling dependencies (including the Python standard library)
Answer: pyinstaller is under active development as of July 2022. You can see the latest changes on GitHub. It supports for Windows, Linux, and MacOS; 32 and 64-bit. It supports Python versions 2.6, 2.7, and 3.3+.

Install PyInstaller with pip:
pip install pyinstaller

Go to your program's directory and run:
pyinstaller -F script.py

Find the .exe in the dist folder. Adding -F parameter generates a standalone .exe.
Answer: auto-py-to-exe is a GUI for PyInstaller.


Plugin framework,parameter passing,c++,dll,gdi+

Question: I am creating a plugin framework as mentioned in tutorial enter link description here
Here PluginInterface class looks like
class PluginInterface
{
   public:
      PluginInterface(){}
      virtual ~PluginInterface(){}

      virtual int Activate()=0;
      virtual int Execute()=0;
      virtual int Destroy()=0;
};

Instead I want my plugin class to be like below:
class PluginInterface
{
   public:
      PluginInterface(){}
      virtual ~PluginInterface(){}

      virtual int Process(Image *)=0;

};

Is is possible that I can pass Image* from my application to plugin and plugin can do some processing on it??
Image is gdiplus object . My thinking is that plugin dll will be loaded in same memory space as that of applicaiton , so if my application allocates memory for Image object so that should be available for plugin also and plugin can perform operations on that Image.
If this is possible , then do I need to statically link plugin with gdiplus.lib using
#pragma comment(lib, "gdiplus.lib")

Since my applcation is already statically linked with gdiplus,I am not sure if that is again required for plugin.
Answer: This will be required if you gonna call any gdiplus.dll functions from your plugin and compile plugin separately from its host application.
And to be honest this is called implicit dynamic linking, not static.


Blender 3.0 shadow catcher really slow

Question: Since the new Blender 3.0 version came out, it seems that they use a new shadow catcher in cycles, which is much slower than in version 2.93, which makes it unusable for me as the render times increase extremely (even on good hardware (RTX 3070, Ryzen 3700X)). Is there any way to use the 2.93 shadow catcher in 3.0, because the new Cycles X is faster than in 2.93 but not with the new shadow catcher.
Answer: The new shadow catcher is not "just" a shadow catcher, it takes indirect lighting into account as well - therefore it's slower than the old one. It makes a difference however if you have the Shadow Catcher pass enabled in the Render Layers - when it is disabled, it only uses an approximation. When it's enabled, it captures all indirect light interactions.
See the note here: https://docs.blender.org/manual/en/latest/render/cycles/object_settings/object_data.html

Blender 3.0 shadow catcher really slow


How can I batch render lots of objects individually?

Question: I have over 100 objects I need to render out as catalogue style images. What would be the most efficient way to render these all these with the same environment, lighting, material and camera angle?
Comment: same environment, lighting and camera can be achieved using one file with an object, after each render change the object data to the next object and render, repeat as needed, a script will make this task much less daunting
Comment: Keep them at the center of the world and switch their visibility in the Outliner (both Hide in Viewport and Disabke in Renders)? Or put each of these objects in a collection and enable/disable these collections?
Comment: What is the file format of your objects? .blend or something like .obj, .fbx, ...?
Comment: The file format is Stl files
Answer: I've written a very basic AddOn, that does basically what you need.

How to use the AddOn:
The AddOn let's you select your files, puts them one after another in your current scene, and renders them to an outpu-directory.
The AddOn adds a button to the Output-Properties-panel.
By clicking it, you open a file-browser-window.

Select all your files you intend to render and press "Select Files to Render".

Blender then renders all of your selected objects into an "output"-folder, that is created in the same location, that your current .blend-file is located in. The rendered images will be given the objects filename (without the extension). For example "suzanne.obj" may be rendered and saved to "suzanne.png".
All other rendersettings are taken from Blender directly.
Besides the .stl-format, .obj, .fbx and .blend files are supported.
Disclaimer: Since I don't have that much experience in writing AddOns, I can't guarantee you, that it works flawlessly. As far as I've seen, it works for me.
Code-quality is probably a mess and the AddOn lacks some pleasant UX features as,  for example, render-progress. (Blender is not responsive during the rendering!)

How it works / Code-snippets used
This is a more detailed description of what I did, in case you want to create your own script out of it.
An ImportHelper is used to fetch the different files.
I then iterate over each file,
for file in files:
    filename, extension = os.path.splitext(file.name)
    filepath = os.path.join(directory, file.name)

create a temporary collection for each object,
collection = bpy.data.collections.new("tmp-collection")
scene = context.scene
scene.collection.children.link(collection)

and import the object into this collection.
bpy.ops.import_mesh.stl(filepath)

for obj in bpy.context.selected_objects:
    collection.objects.link(obj)
    bpy.context.scene.collection.objects.unlink(obj)

I then render the scene to the output-folder
scene.render.filepath = "//output/"+filename
bpy.ops.render.render(write_still=True)

and delete the temporary-collection with its containing objects.
for c in scene.collection.children:
    if c.name == "tmp-collection":
        scene.collection.children.unlink(c)

for c in bpy.data.collections:
    if not c.users:
        bpy.data.collections.remove(c)


Cleaving large enemies

Question: Are there any clarifications or thoughts on if you can use cleave to get more than 1 attack against a large enemy (say takes up 4 tiles)?
The feat says "If you hit (with the first attack) you deal damage normally and can make an additional attack (using your full base attack bonus) against a foe that is adjacent to the first and also within reach."
it seems to be clear but the concept behind cleave is you make a big swipe to hit a wide arc, so why not use it to attack multiple limbs of a larger creature, getting 2 attack and damage rolls as if both giant arms were 2 separate small foes?
Comment: I wonder if this is related to the reason why large creatures don't take more damage from area effect attacks, despite having more surface area exposed?
Answer: The rules as written require a separate foe. A Large or larger creature does not count as adjacent to itself, and so cannot be eligible for the Cleave attack (its larger size is instead modeled by the AC penalty it takes for being Large or larger).
All things considered, it might make an interesting houserule, though. Cleave is not exactly the greatest of feats; usually it's most useful against large numbers of weak enemies (which tend to not be too dangerous as a group, so it's a bad choice for specializing). So giving it a use against big solo opponents seems like a good idea to me, anyway.
Comment: @KRyan at some level, this is exactly what *is* happening with reach = 1. I can see the annoyance of triangulating for Greater Cleave. I wonder how broken it becomes if it is just simplified to "any two creatures within reach"?
Comment: Pathfinder Cleave only requires that you hit the first target, not that you down the target, so it's equally effective against groups of weak and strong enemies.
Comment: @SteveG Eh, even then, only if they're adjacent, which, particularly with Large or larger enemies (who have Reach), is unlikely. That's certainly an improvement to the feat but it's nonetheless far from a great feat.
Comment: I like the house rule idea. As character level, the creatures definitely tend to get bigger. While it probably doesn't make sense for a 1-step size difference, allowing a cleave for a 2-step size difference probably makes sense. Because if a creature is 2 sizes larger than you, there will basically never be anything adjacent.
Comment: @GatesVP I'd be tempted to change it from "adjacent" to "within your own melee reach, measured from the originally-struck creature," as well, but I worry that this would be complicated and slow to rule on the table.

Cleaving large enemies


View all validation rules

Question: I've just created Data Validation for the named range. How can I edit the validation? I tried to click Data Validation... on the range, but there is a new validation rule, but not existing for the range (selected ranges are equals). Is there possible to view all validation rules for the sheet?
Comment: Next time, try selecting the whole sheet.
Answer: Not possible, there is no Data validation preview in Google Sheets where you would see the list of all rules you created (like in Conditional formatting, Protected ranges or Named ranges).
Comment: data validation is bound to the cell, not to the named range. named range is just an input. to remove data validation you just need to click on the cell/range you created data validation for and remove it by right-click > data validation > remove
Comment: So, there is not way to remove validation rule for named range without removing named range?
Comment: I checked it one more time. I thought the name range was `X:Y` and I tried to select `X:Y`, but named range was `X:Y-1`. My mistake. Too bad I can't see the whole list of all validation rules. May be later I write add-one for this if it is possible. Thank you!
Answer: If you know which cells have validations rules, select that particular cell and go to data > data validation. It will show the rule, you may edit or delete the same.

View all validation rules


How to use hadoop tools in ArcMap 10.3?

Question: I have downloaded hadoop tools for ArcMap and installed. In the ArcToolboxe window the hadoop tools are displayed.
In the hadoop toolbox the "Copy from HDFS" tool is asking for an HDFS server hostname, TCP port number, username and remote file. I'm having hard time getting these right. Please tell about the values to be typed in the host name, username and port number.
I'm using "Cloudera VMWare" for analyzing the data using hive queries.
Comment: I'm not experienced using hadoop with ArcMap, but these videos might be a good resource: http://video.esri.com/search/hadoop
Answer: There are tutorials on the gis-tools-for-hadoop project wiki page. You will be most interested in the tutorial on moving data from ArcGIS to Hadoop.
If you have not seen the front page of the project, that gives an overview of the project, as well as listing blog and video resources at the bottom.
There are also a few issues on GitHub that may help you troubleshoot any problems that you encounter.
Full disclosure, I work on this project.

How to use hadoop tools in ArcMap 10.3?


Long Table Data

Question:
I want to show this long data in more compact way with best experience preferably without scrolling, is there any good idea?
Answer: Your best bet is to prioritize the information and subordinate the less-important data.
It seems you have a couple of free text cells in each row that could become long (Remarks, Lessons learned), so you might explore patterns that don't rely on showing every single piece of information in the table row.
Look at your user's goals for this screen. What do they need to see right away? Keep that in your table. What less-important information could they access with a single click?
Expansion Panels
One option is to put the less-important information into an expansion panel, like in this example from Sencha:

Detail Sheet
Another is to add the less-important information to a modal or side sheet that can open and close:

Grouping
You could also group information in cells to save space if you don't need to sort/filter on them. For example, all of your "who" information (Department, Entity, Custodian) could be grouped in a cell, and all your "when" information (dates) could be grouped together in another cell.
Custom Table Views
You could allow your user to choose which columns they need to see in the main view, and hide what they don't.
Freeze the First Column
Finally, if none of these work because your user genuinely needs to see all information in a single row, you could freeze the Initiative column, and allow the user to scroll left-to-right without losing context.
Comment: I tried to prioritize but user insist and wants to see all the information in a single row :( . Your suggestions helps lot, Thank you Izquierdo :)

Long Table Data


Preventing Interference when using RF transmitters and receivers

Question: I want to use a "listen-before-talk" approach to transmit data from sensors connected to a transmitter and receiver pair to a MCU connected to a transmitter and receiver, which means that the sensor will only transmit data once it has been asked to do so by the MCU, but the problem I'm having is that my receivers will have no way of knowing if the information it's receiving is from one of my transmitters or from some other 433 transmitter in the area.The receiver I want to use has a product description here which seems to suggest there may be a method of pairing up my transmitters and receivers but how? If I transmit transmitter ID information e.g if the transmitter is transmitting 4 bits, I make the first two bits always "11" so the receiver knows that the information is from one of the transmitters it should listen to would I then be able to filter data I don't want on the AVR?
Comment: possible duplicate of [Designing a good RF Transmission/Reception system for Embedded System](http://electronics.stackexchange.com/questions/58933/designing-a-good-rf-transmission-reception-system-for-embedded-system)
Comment: @DaveTweed it seems to be related, but not a duplicate.
Comment: @Kortuk: Look at the revision history of the other question (and note the timestamps).
Comment: @DaveTweed Ahh yes, the user thought that you just kept editing to add more to the question. This is much better, ask each question discretely. Thanks for explaining!
Answer: Those types of transmitters and receivers only work on a single channel. The receivers usually employ a form of active gain control (AGC), so will increase the gain until something (usually noise) is received. The gain is reduced to an appropriate level when a transmission starts.
Generally best practice is to:

Agree on a bit rate between the two systems (e.g. 4800bps). Generally
receiver/transmitter pairs will give you some guidance on these.
Transmit a preamble of 10101010 (generally somewhere between 8 and 40 bits) before starting the main transmission. This has two purposes - it allows the AGC to settle at
a good point, and can be detected by the microcontroller so it is
aware that a transmission is starting.
Transmit a sync word e.g. 0xD5F7, and only listen to packets which have the correct sync word. The length of the sync word varies.
Use the rest of the data packet to detail the address, direction, and
data.

I have found that the VirtualWire library for the Arduino is actually a nice, clear example of how to go about this. Maybe take a look, even if you are working with another microcontroller family.
One further thing worth considering is the encoding of bits. You can just send a 1 as a 1 and a 0 as a 0. There are more complex schemes though. Manchester encoding ensures that each bit of data transmitted has at least one signal transition. This has two significant effects:

Regardless of the data sent, there will be an equal number of highs and lows sent. This means the AGC can work properly and there is no DC bias to the signal.
As there is a transition for each bit, it is easy to recover the clock from the signal even if it is not known. This really means you transmitters no longer have a need to use an external crystal - the internal oscillator is accurate enough.
Comment: +1 for Preamble.. you can also add a SOM if you want.


Mediawiki Documentation - get Article Text

Question: I am writing an extension for Mediawiki. If I know the page_id and page_title of an article, how do I get the first 50 odd words of the article? Is there a function defined to get the article text give the page_id?
Answer: Something like:
<code>$article = new Article( Title::newFromText( 'Main_Page' ) ) ;
echo $article->getContent();
</code>
Grabbing just the first 50 words is left as an exercise for the reader.
Comment: Hey thanks Joshua :) Can you please point me to a link which documents these classes and methods because I have been unable to find any source of information on such crucial functionality anywhere!
Answer: If anyone is looking for more documentation, refer to:
http://svn.wikimedia.org/doc/
Answer: I think you may want to look at this section of the Bot Wikipedia Page http://en.wikipedia.org/wiki/Wikipedia:Creating_a_bot#PHP
The most commented and readable set of classes I have used is http://toolserver.org/~chris/highlight.php?d=chris/classes/&f=botclasses.php
And this can be used in the following way
<code>require 'botclasses.php';

$wiki = new wikipedia;
$wiki->url = 'http://en.wikipedia.org/w/api.php';
global $wiki;

$wiki->login("Username","Password");

$text = $wiki->getpage("Wikipedia:Sandbox");
</code>
Or you can use any of the other functions that are set out in the classes linked above.


Gerber Setup Options

Question: I have almost finished my PCB design and preparing to make Gerber files. I have some doubts related to Gerber Setup Options of Altium Designer 16.1.My first quesiton about Files->Fabrication Ouputs->Gerber Files->Drill Drawings menu. I have selected both "Plot all used drill pairs" options. Is it an important selection? The second question is in Advanced menu. I have selected both "Keep leading and trailing zeros" and "Reference to absolute origin" selections. I have read the Altium's online document related to these topics however i could not understand completely. I am sharing the images what i mentioned. My board has two layers, both smd and thorugh hole components, and 60mm x 100mm sizes. For the other Gerber Setup options, i have clicked"mm","4:3", "Embedded Apertures (RS274X)" also. Thank you so much.
Comment: I don't think I ever made a Drill Drawing - the board shop doesn't need it.  They do, however require an NC Drill File.  That file is, if I recall correctly, produced by a different menu item from the Gerber photoplot files.
Comment: @PeterBennett ... I didn't used to do this, but at some point board houses started asking me for a fabrication drawing which is basically a Drill Drawing, dimensions and notes on routes and cutouts etc., and other information on how the board should be made. It's worth googling "pcb fabrication drawing". I alway include one these days.
Answer: I always check the Plot all used drill pairs for both the drill drawing and drill guide because you never know when you might need it. Regarding the advanced screen I always reference to the relative origin. The relative origin is the one you can move by going to Edit --> Origin --> Set (shortcut E-O-S). I place this origin at a large mounting hole which supposedly makes it easier for the board house to reference the other holes to it. The absolute origin, if memory serves, is the bottom left-hand corner of the PCB editor window. I don't like to use this origin because it places the actual board away from it. As for the leading and trailing zeros most board houses will not care one little bit.
Comment: By default I have leading zeroes suppressed and trailing zeroes not suppressed, but like I said it really doesn't matter in most cases. Mine is only set that way because that was what Altium defaulted to when I installed it.
Comment: So, do you chose keep or suppress them?
Comment: I think you need zeros on one side or the other (not necessarily both sides), so the photoplotter can reliably determine where the decimal point is in the coordinates.  If you omit both leading and trailing zeros, the plotter can't determine if a given coordinate is 45, 4.5, 0.45, or 0.0045 units.
Comment: @PeterBennett They wouldn't have options to suppress the zeros if they weren't able to reconstruct the actual drill data when the zeros are suppressed.. I don't currently know how it works and would need to do some reading to gain an understanding. If I think of it I might look that up tomorrow and report back here.

Gerber Setup Options


Disable favicon in jsp page

Question: How I can disable favicon.ico in specific jsp page so there wouldn't be any traffic?
Thanks in advance.
Answer: When the physical favicon.ico file is placed in the webapp's root folder, then most browsers will automatically use it, regardless of whether you explicitly specify it in a <link> or not. If you change this by moving the favicon file into some folder and using the <link> element to reference it as follows,
<link rel="shortcut icon" href="${pageContext.request.contextPath}/somefolder/favicon.ico" />

or even rename the file to something else than the standard favicon.ico,
<link rel="shortcut icon" href="${pageContext.request.contextPath}/logo-16x16.png" />

then you could for the particular JSP page just remove/skip the whole <link> altogether.
Don't forget to clear the browser cache before testing. Browsers cache it very agressively.
Answer: It's impossible because you can't prevent browser from requesting it. Quoted from Yahoo!

The favicon.ico is an image that stays in the root of your server.
  It's a necessary evil because even if you don't care about it the
  browser will still request it

So all you can do is to make that image as small as possible and set expires header with what you feel comfortable.
You can take a look at this SO question for more information.

Disable favicon in jsp page


Rigging and control rig issue

Question: I have a deform rig I'm not allowed to edit. I need to set up IK's on the legs but the bones aren't connected or orientated properly.
I can make a secondary rig over the that has normal connections and all the connections I need but I can't break the parenting to allow proper constraints. Please help. I'm pulling my hair out.
Answer: The general idea is to build a new rig (let we call it NR) which will have all specs you need (orientations, dimensions, IK, ......) and all "joints" (bones heads) in the same place as your untouchable rig (by now called UR), then set a "copy rotation" constraint on every bone of the UR, so that the UR will exactly act as stated by the NR (use "local space" on the constraint options).
After you have performed the animation, if you want to export the act (I know you will want) you will have to select (in pose mode) all bones of the UR, and go to the pose menu - animation - bake action, check the all needed boxes (Only selected bones, Visual keying and Clear Constraints). This procedure will create a new action that can be exported and played on the UR without any type of constraint.
You can choose to build the NR as a new armature on its own or a new layer of the same UR armature.
Use the "Shift S" functions (cursor to selected and selection to cursor) to build the NR bones exactly in the same location of the UR heads bones, and uncheck the "deform" option of all NR bones.

Rigging and control rig issue


ball bearing on every gear?

Question: I'm new to engineering but I have a project with a lot of gears.I was wondering if it was plausible/bad/good to just stick a bunch of mini ball bearings on every single gear. I was looking into these: https://www.amazon.com/gp/product/B07FVYPMPX/ref=ewc_pr_img_1?smid=A1THAZDOWP300U&th=1
Comment: No, some gears need to be keyed or similar to shafts depending on the power flow.
Comment: but then what about those that don't need to be keyed
Comment: Depends on the system. If you don't use a ball bearing then you need to use a bushing. The ball bearing are smoother and will handle high speeds better but the bushing is smaller, cheaper, and will survive shock loads better.
Comment: Why don't you get a gearbox or 2 from a scrapyard and take them apart, then you will get an idea of what you may need to consider- that way you can also calculate all the ratios and the power paths. The best bit will be you being able to put them back together correctly with NO bits left over…
Comment: I don't know what your usage is, but my former maintenance-man self is developing an eye twitch at the thought of using bearings bought from Amazon.
Answer: When a gear needs to freewheel on a shaft the bearing typically used is called a needle roller bearings. These use thin needle like roller instead of balls.
They minimize the space wasted to the balls and let the shaft be larger.
For lower power applications a plain bushing will also work.
Answer: You would typically need 2 ball bearings in that case. See the ball bearing has a point (ish) contact so to be able for you to design it carrying any possible axial loads youd need to have 2 ball bearings. If you use a needle bearing or bushing then youd be fine with 1 though you may want two in anycase.

ball bearing on every gear?


Can you explain how this NDT ultrasonic transmitter circuit works?

Question: I am simulating the circuit shown below. I do not understand how this  works and how this will help in generating high voltage pulses for NDT ultrasonic testing.
Comment: Murugesh - Hi, Your original question already has an answer. Therefore you are not allowed to make a major change to it now, as answers to the new question will be different to answers to the old question. As I explained in my comment when you asked the new question as an "answer" - please [ask a new question](/questions/ask) and include the details which I explained before. For the reasons above, your edit to *this* question has been reversed ("rolled back"). Do not try to ask your new question *here* again. Instead, *ask a new question* & include a link to this one, if relevant. Thanks.
Answer: This circuit produces high negative voltage pulses at the output.
C1 will initially be charged to the voltage of V1 via R1, R2, R6 and R7. When M1 turns on, a falling edge of 300V can be seen at the drain, which is directly forwarded via C1, D2 and R3 to the output.
R3 limits the output current to an acceptable level for the ultrasonic transducer. R4 and R5 damp the resonance ringing of the transducer.
There may also be an inductive part in the transducer. Diode D1 can protect M1 when voltage spikes above Vin come up.
Comment: I understood now, thank you


Why don't electrons collide among themselves

Question: The Heisenberg principle states that we cannot ascertain simultaneously the position or momentum of any small particle.
However slight, is there a chance that 2 or more electrons from the same or different orbitals may collide and lose energy thereby destabilizing the atom,or is there a way to determine that an electron never comes in proximity of another electron with enough kinetic energy to actually smash into it?
Answer: There is no such thing as classical motion of an electron in an atom.
The quantum states electrons in an atom are in are atomic orbitals, which possess a definite energy, but not a definite position. The Bohr model of the electron, in which electrons are thought of as classical particles orbiting the nucleus, is false. The question whether or not two electrons in an atom can collide does therefore not make sense.
The electrons do, however, interact, mainly by the "inner" electrons screening the nucleus' charge for the "outer" electrons. Interaction is all that happens quantum mechanically, the notion of collision is meaningless.
There is a notion of "scattering" or "collision" in quantum mechanics, where two objects briefly have a localized interaction and then separate again, but electrons inside an atom do not scatter off each other in this sense.
Comment: "but electrons inside an atom do not scatter off each other in this sense.", can you please tell me why not? We do have electron-electron scattering. "High energy electron-electron colliding beam history begins in 1956 when K. O'Neill of Princeton University became interested in high energy collisions, and introduced the idea of accelerator(s) injecting into storage ring(s)." https://en.wikipedia.org/wiki/Electron_scattering
Comment: @ÁrpádSzendrei As I wrote, scattering involves the particles *separating* again after a brief interaction. The electrons in an atom are bound to the atom and continuously interact without leaving the atom, so this is not "scattering".
Answer: A non-quantam mechanic answer - would be
electrostatic repulsions (b/w -vely charged electrons) would prevent it and give them definite paths which don't intersect.
Even if they move with 0.3c they can't comes much nearer than 4 fm.
Answer: before E it was thought by many that the model for the Atom was one of vibrational content. For this model to work, it requires the electrons moving at near the speed of light giving the illusion of being solid.It would explain their attratcive nature for each other... they have to be creating a small virbational field that move around the atom creating wave like fields around it, hence it has a north pole and south pole, with north and south poles bonding and creating a bigger field around them. It is kind of like human relationships should be, give and take, when one gives the other is in need and takes and then the roles reverse as they vibrate.
one of the problems with this model is electron eollisions... maybe all the electrons are clumping together as to not collide...a few things are for certain with this model, there has to be unison with their movement, which the electron microscope is scattering with the frequency changes it induces. But like everything harmony always wins over chaos and the electrons come back together immediately creating its vibrational content so it continues bonding.
Answer:
Why don't electrons collide among themselves

Because they aren't anything like billiard balls. Check out the wave nature of matter. And take a look at the Wikipedia atomic orbitals article: "The electrons do not orbit the nucleus in the sense of a planet orbiting the sun, but instead exist as standing waves".

The Heisenberg principle states that we cannot ascertain simultaneously the position or momentum of any small particle.

See this in the Wikipedia article: "It has since become clear, however, that the uncertainty principle is inherent in the properties of all wave-like systems, and that it arises in quantum mechanics simply due to the matter wave nature of all quantum objects". Don't think of an electron as something small. It isn't some speck that has a field. Instead think standing wave, standing field. The electron is field, and it doesn't end a micron from the middle. Always remember this: it's quantum field theory, not quantum point-particle theory.

However slight, is there a chance that 2 or more electrons from the same or different orbitals may collide and lose energy thereby destabilizing the atom

No. Like rmhleo said, the Pauli exclusion principle prevents this. For an analogy, think of whirlpools. They don't overlap, and they don't crash into each other like billiard balls.

or is there a way to determine that an electron never comes in proximity of another electron with enough kinetic energy to actually smash into it?

Notwithstanding the above, there are electron colliders where this does happen.


How can I practice using nmap without scanning some real site or performing computer trespass?

Question: I want to learn nmap and its various options. What can I do or setup in order to see examples of issues found by nmap - e.g., something with security holes on purpose.
Comment: U could `nmap localhost` first....
Answer: There is a specific URL for that : scanme.nmap.org

Hello, and welcome to Scanme.Nmap.Org, a service provided by the Nmap
  Security Scanner Project and Insecure.Org.
We set up this machine to help folks learn about Nmap and also to test
  and make sure that their Nmap installation (or Internet connection) is
  working properly. You are authorized to scan this machine with Nmap or
  other port scanners. Try not to hammer on the server too hard. A few
  scans in a day is fine, but dont scan 100 times a day or use this site
  to test your ssh brute-force password cracking tool.
Thanks
  -Fyodor

If you are looking for vulnerable webapp here are some good lists :

Hacking Vulnerable Web Applications Without Going To Jail
Deliberately Insecure Web Applications For Learning Web App Security
Answer: nmap won't disclose security holes, nmap will only disclose what services are running.
I'd highly recommend downloading virtualbox then getting an vunerable webserver like metasploitable to run on it. That way you can scan until your hearts content and also futher research what exploits etc are possible.
Comment: With Nmap scripting engine and scripts you can detect and exploit vulnerabilities.
Answer: Take a look at Metasploitable (http://www.offensive-security.com/metasploit-unleashed/Metasploitable)
It is a Virtual machine that has a whole bunch of vulnerable services installed. There is a tutorial that walk through how to exploit each service, part of this will be using NMAP to fingerprint the services.
Answer: As a starter you should check the scanme.nmap.org provided by Nmap. Then download the Metasploitable Virtual Machine provided by Offensive Security. With the Metasploitable VM you'll also practise your exploitation techniques. After these, i'd suggest you to sign up to several penetration testing online labs such us Hack The Box, TryHackMe and RootMe. When you are familiar with Nmap and other network scanning and packet capturing tools (Wireshark very useful), you could setup your own virtual or physical Lab for more Advanced - Field Testing.
Virtual: Create a virtual lab provided by your VMs with a virtual network.
Physical:  Connect a computer to an existing router and configure router's settings according to what you want to do/practise. Then try the several scans.
Answer: Go to hackthebox or any similar site you can practice as many scans as you want on retired machines. Just start the machine on your own and get it done.