How/Why would Ethernet devices switch to a lower speed entirely on their own?

Question: As far as I know, usually an Ethernet connection either negotiates the maximum rate advertised by both ends (regardless of actual cable quality), or fails negotiation and falls back to 10 Mbps half-duplex. If two 100 Mbps devices are connected with a really bad cable, I would expect them to still negotiate 100 Mbps and just work poorly.
But I've seen various cases where devices actually switch to a lower rate:

A computer should have a 1 Gbps connection (and does for some time after connecting), but several minutes later switches to 100 Mbps full-duplex on its own. Reconnecting the cable brings 1 Gbps back, but a few hours later it's at 100 Mbps again.
(The cable is 4–5 meters Cat5e. Computer's owner insists it's because the Ethernet cable is running right next to AC mains cable, though posts on SU usually say that shouldn't be a problem.)

An Ubiquiti device should have a 100 Mbps connection (and does for some time), but several days later I find it using 10 Mbps full-duplex. Merely reconnecting the cable brings 100 Mbps back, but several days later the problem repeats again.
(The cable is Cat5e, somewhere around 20–40 m. Two similar devices exhibit this problem. They're both on the roof, and I'm not sure if the cable is an "outdoors" one, although it is at least FTP from what I remember. It wasn't professionally installed, that's for sure.)

In either case, the speed negotiation seems to succeed (it's not a half-duplex mode, and both the device and the switch agree on the selected mode), I just have no idea what the mechanism is? Port statistics on all devices always show 0 errors received, for what it's worth.
(I guess at least the 1st case could be explained by the "Ethernet@Wirespeed" feature, but do they apply even after all 4 pairs were determined to work? And in the second case, it's only a 10/100 device with a two-pair connection anyway.)
Answer: There are network cable testers available (e.g. from Fluke) which measure the physical properties of ethernet cables if you're unsure about the cabling.
You also might want to check the power supplies of Ethernet switches in between. It has happened several times to me that dying power supplies (usually seen after 5 years of use) create the strangest connection problems.
About the fact, that some cables are installed outdoors:
I had cheap SFTP cables for indoor use routed on the outside of a house for 10 years in direct sunlight without any visible cracks to the outer PVC layer after that period. YMMV if the cables are exhibited to very hot or cold conditions.


Resources To Learn NewtonScript

Question: Today I got my Apple Newton MessagePad 2000 and then I want to start developing for it. I already downloaded and installed the Newton Toolkit, but where I can learn NewtonScript?
Comment: The second google result
Answer: Greetings, visitor from the past! Welcome to the 21st century. All restaurants are Taco Bell. Smoking is illegal. The Newton has been replaced by the iPhone. Happily, we have frozen a specimen of the documentation you seek, which you can read by activating this magical portal--it's something like Gopher. Fare well, and watch out for Skylab debris!
Answer: The United Network of Newton Archives (UNNA) is a great collection for anything Newton related. For learning NewtonScript, I'd recommend checking the Development/Documentation section. As Avi commented, "Programming for the Newton" is a great starting point, and it can be found in that section as a downloadable HTML version, but I would definitely recommend reading the official "Newton Programmer's Guide" as well. Further, the NTK comes with example code which is very instructive.
Another way of digging in is to use ViewFrame (also on UNNA) which lets you inspect any existing NewtonScript application directly on the Newton. That can be very helpful if you are wondering how an application does certain things.
Answer: Wow.... a blast from the past.
Julie McKeehan and Neil Rhodes wrote several excellent Newton programming books. If you can locate any copies of Programming for the Newton, do so. Make sure to get the second edition, which covered the 2.0 version of NewtonOS.
And hang out at www.newtontalk.net.
-Avi, bigtime Newton nerd from long ago
Answer: Morgant Aldridge has recently launched a site which gathers a vast assortment of NewtonScript resources under one roof. The newtonscript.org site contains information about the language itself, development tools for various platforms, libraries with NewtonScript interfaces, and other programming reference materials.
You can also contribute to the site through this GitHub repository.

Resources To Learn NewtonScript


Access Oracle Database remotely via DBeaver

Question: I have two machines, a windows 10 notebook with oracle database installed, and a Raspberry Pi 4 with DBeaver installed. On the Raspberry I have PostgreSQL which I can access locally via dbeaver, but since I'm studying and practicing Oracle DB, I need to access the database with the Raspberry. Is there any way to do it? Both machines are connected on the same wifi.
Comment: Did you install Oracle client software on your Raspberry? If not, this is where you should start.
Answer: Yes, remote connections to an Oracle database is the standard way in real deployments.
Assuming there is nothing blocking communication between the two devices on your WiFi.

Start a listener on your notebook (lsnrctl start), the default one will start up using the your machine name as the host (this is ideal)
Make sure your instance is registering with the listener. Check with lsnrctl status for your instance. If it does not exist then check your local_listener parameter of your instance and add your machine name to it
Use the listener host in your connection string from your Raspberry Pi. Use an appropriate service name
Comment: Could you guide me step by step? I don't know anything about oracle but some basic sql language. Im studying Java and am at the JDBC topic, that's why I need to keep checking out the dbs I create. That said, I really dont know where to type lsnrctl, for example. Thanks for your time!


Mapping a Rubik's Cube state to a unique natural number

Question: I am writing an implementation of Kociemba's algorithm, and I am trying to generate pruning tables.  However, this requires converting the state of the Rubik's Cube to a natural number that can be created quickly.  I have access to the orientation and positions of the corners and edges of the cube, so I think that it is possible to map each possible state to a unique number.  However, I cannot figure out how, and I figured that this question is more about the math of the cube than the coding of the algorithm, but let me know if you think I should move it to stack overflow.  Thank you in advance for your help.
Comment: Is the idea is to take that natural number mod $n$ and look it up in a hash table?  If so it may be more efficient to generate the hash directly without actually computing a unique number corresponding to the state.
Comment: Also, isn't there a sense in which the state already _is_ a natural number, however you have implemented it?  As long as the state is a sequence of bits, that is a unique number in binary.
Comment: Yes, i think this question is better for Stack Overflow. There are [dozens](https://stackoverflow.com/questions/5563671/solving-rubiks-cube-programmatically) of algorithms and programs already done for rubik, for solving it optimally. Though we could suggest, nothing in here would talk correctly to be software efficient.
Answer: If you just need an identifier for each state, prime numbers are your friend.  Assign a number from $0$ to $5$ to each color.  Start from the upper left front cubie and assign a prime to each color square.  A natural thing is to assign $2$ to the top face, $3$ to the front face and $5$ to the left face.  You can represent this cubie by $2^a3^b5^c$ where $a$ is the color on top, $b$ is the color on the front, and $c$ is the color on the left.  Assign different primes to each location.  Raise each to the power of the color at that location.  Multiply the values for each location and you have a unique number for each cube configuration.  You can take a standard position for the center cubies, so ignore them.
This works.  Each number has only one configuration of the cube.  It ignores the ease of writing an algorithm that takes a given configuration of the cube, does one rotation, and returns the new configuration of the cube.  It also uses a lot of bits, though bits are cheap, because the highest prime you will use is $223$ and powers of that are big.  It would probably be better to represent a cube configuration by a string of $48$ numbers from $0$ to $5$ where you just list the locations aside from the centers and the numbers are the color at that location.  Now a quarter turn of the right slice is just a permutation of the string.  If you are worried about storage each number is only three bits so a cube configuration is $144$ bits.  You have to pack and unpack them, so it would be time efficient but space inefficient to make your strings ASCII.  A state is then $48$ bytes instead of $16$ but processing them is much easier.
Answer: I would try an approach using permutations. First, work on corner, edge and center face cubies separately. So, for example, the eight corner cubies are permuted. There are standard ways of ranking of permutations, so use one of them. For edge cubies do something similar. Finally, for center face cubies, the same thing.  You will probably want to include rotations of cubies (order three for corners, order two for edges), in an ordered list, using $\{0,1,2\}$ or $\{0,1\}$, respectively for elements. Combine all these together by a standard ranking of Cartesian products of ranked sets.


Faith in science

Question: Is faith in science comparable to religious faith? Scientists aren't dogmatic in the sense that they review their theories whenever they are contradicted by new experiments, but still, they have faith that their methods lead them to a better understanding of the world.
Comment: Hi, welcome to PSE. Your question is very similar to this one that already has answers http://philosophy.stackexchange.com/questions/28956/can-belief-in-science-be-considered-a-form-of-theism?rq=1
Comment: There is **no** *faith* in science; scientific methods lead **us** to a better understanding of the world. Of course, science is a human activity, and thus subject to error, deception and so on. But, in the "long run", it works. In any case, it works better than any other way humans have found in order to acquire "understanding of the world".
Comment: I would think that the bulk of science has more to do with 'over-coming' our relationship to the natural world than it does with producing nice rational narratives about it. Its more concerned with the manipulation/control/intervention of certain phenomena for numerous, typically practical advantages- a.k.a technology. Faith doesn't come into it.
Answer: If you ask the question at this level of generality, the answer is probably "yes".  This is not necessarily very profound; if you get general enough you would expect the two to have something in common: "Are science and religion comparable in that both are human endeavors?"; "Are science and religion comparable in that both are intended to convey information?"
In particular, yes, scientists do engage in their pursuit because they believe that it will lead them to a better understanding of the world.  The question then is whether it's apt to call it "faith".  Scientists have accomplished breathtaking things, so there's certainly abundant evidence that science leads them to a more powerful position from which to manipulate the world.  But there's always doubt that running that RNAseq experiment will really tell you something meaningful about the interaction partners of CREB, and generally as a personal matter it's faith that this whole thing's eventually going to work and turn out that keeps scientists going.
You cannot conclude from this that science and religion have the same sorts of guarantees behind the robustness of their claims, only that people like to do things that they believe in, and scientists are people.

Faith in science


Are [marque-year] tags okay, or superfluous?

Question: I ran into a ford-1987 tag today, and I wonder if it is an attempt to set some sort of tagging standard (because I had not seen any other one like it after trying several manufacturers). Should it be kept and expanded, or eliminated?
Comment: You should *always* list the marque and year in the question, but as tags I feel they're too specific, at least given the current size of the site.
Comment: @BenBrocka, I don't think they work at any size: this sort of tag is exclusionary rather than inclusionary.  It makes it very hard to search.
Comment: @BobCross true, the more general model tag should help too, but in larger forums it can be helpful to split into exactly the specific model...which the issue pertains to that model only. Which is why I think tags work better; it's only split that fine if you need it that fine, otherwise you have a generic fallback that's still relevant
Comment: @BenBrocka, I'll put my answer in an answer.
Answer: In my opinion they are extraneous. While tags debated at Tags for specific models of cars? can be helpful, especially using umbrella synonyms, something like "1987 Ford" does not mean much. There are tons of different models of different cars, pick-ups, and lorries, from different continents that would have little in common aside from blue oval on the grille.
Answer: I'm in favor of breaking out all the useful information into tags.  For instance, I'll break out subaru and wrx in my questions.  There's a problem when we start including years as tags, though: I happen to know that the USA WRX was largely identical for 2002 and 2003, with significant changes in 2004.  However, if I was searching for an answer to an issue on a 2003 (e.g., foglights), I would miss the 2002-relevant information if I just went with tags.  I definitely wouldn't want information on the 2004 foglights.
Fundamentally, I think that the combined tags tend to make the site harder to navigate rather than easier.  A partition of tags into wrx-2002, wrx-2003, and wrx-2004 would make it harder to quickly scan the superset and find something most relevant to my issue (click this tag, then click that tag, etc).
Instead, if we can provide the key distinguishing features as tags and let the search engine parse out the rest for us.
Comment: While that makes perfect sense when it comes to the more knowledgeable crowd, would that be helpful to someone less familiar with motor vehicles? I personally don't know the engine or chassis code for my car (despite the fact that I probably should). Also, honest question here, which method of grouping would make more sense for peripheral parts? In other words, do all Subaru/WRX/EJ20's use the same speakers? windows? batteries? etc.
Comment: Could there be a tag for each update in body style? e.g. Mazda 3's had the same body style from 2004 to 2009. Don't know how to format the tag, but could that be useful?
Comment: @tarheel, that's not a bad idea but I would tend to go with something more like an engine or chassis code.  That would tend to naturally include a swath of model years.  So a subaru, wrx, EJ20 would include all the 2.0 liter turbo WRX models
Comment: @tarheel, no, if you came in with zero knowledge, the EJ20 code wouldn't help you on the way in the door.  However, you might find out which code applied from the answer that turned up in your search.  That's the whole idea behind inclusive tags: you won't miss any information because of the tagging.
Answer: The ford-1987 tag sounds like belongs to me. After much frustration trying to look for information related to a 1987 Ford F150 pickup truck rough idle and ending up getting either Google results about 1992 Ford Escort idle problems or 1987 Chevy Cavalier idle adjustment specs, or just random noise in all of the forums, I've often thought of how nice it would be to be able to limit searches to specific makes/models only and then filter out all of the noise.
Or vice versa, wouldn't it be nice to search for Ford idle problems and open up the search to all Fords.
The problem we face here is that we're limited to 5 tags, so I thought that ford and 1987 would perhaps be more helpful if combined. However, the problem with combining them is that it makes it hard to look for just information on Ford, since the Ford and 1987 are bound together and cannot be searched for separately.
I think a great feature request for Mechanics would be a sub-tag feature. For instance, if I select "Ford" as a tag, I should be able to also tag with a Model and year so that people who want to search just "Ford" can do so, while people wanting to search "Ford - 1987 - F150" can also do the same.
This Make-Model-Year combination could be considered one of the 5 tags, with the requirement that you select a Make (or all) and a Model (or all) before specifying a year (which you could also mark as "all").
I am not 100% sure what the answer is to the tagging situation, and if anyone wants to kill my ford-1987 tag I won't hold it against you. ;)  Also, if you're going to kill that tag, also be on the lookout for thunderbird-1968.
While I think expanded tagging could be helpful, based on the inconsistencies in my tag naming schema, it's quite evident that the current tagging mechanism isn't robust enough to tag individual makes, models, and years.
As an aside, the forum noise problem is something I talk about here in this chat transcript. I wanted to discuss before posting on meta. Let me know what you think.
Comment: One can just search two tags together such as `[ford] [f150] seat track`, and like combinations. And, similarly, tag the same way. Though I understand concern about five tag limitation.
Comment: @theUg - The limitation is the main problem. Not everyone will use [ford] and [f150] in their question if they think other tags will be more useful. With that said, we tend to have less noise so far than all of the forums on Google, so maybe this isn't needed. Of course, we're also still small...
Answer: Some questions really could be specific to a particular year of a given make/model. If not, though, I don't think they should be tagged marque-year.
How about platform tags?  I don't think they're an alternative by themselves, but maybe along with the much maligned year tag, together or separate?


Procedural Rougness texture

Question: I'm looking to create a procedural basic rough texture in blender with some texture nodes. Can someone either share a node tree or a link to a video on it? Thanks!
Comment: Hello, please a picture of the kind of texture you would like to reproduce
Comment: I don't have a picture of the texture. I just want to rough the surface up a little bit.
Answer: It depends if you mean roughness as a 2D effect or 3D effect.
For 2D roughness you can use a Noise (or this kind of texture) as a factor in a mix between a glossy and a non glossy material:

For 3D roughness you need to plug a Noise (or this kind of texture) into a Bump node that you plug into the Normal sockets of your nodes. Here I've mixed 2 Noise Texture nodes into a MixRGB (try Overlay or Darken or Lighten mode) in order to have some smoother areas.

If you're not fully procedural and use an Image Texture:
In the case of a 2D effect, if you use an Image Texture you can create something without any unwrap, I guess it's the quickest way:

Prepare your dirt texture (a simple black and white jpg is ok).
Create this nodes setup: Texture Coordinate (Object output) > Mapping > Image Texture > ColorRamp > Factor socket of a Mix Shader.
In the Image Texture, load your dirt image, choose Box instead of Flat so that the texture will be projected all around the object. You may need to play with the Blend factor to avoid any seam effect.
In the Mix Shader, plug the 2 materials, the one that is supposed to be the glossy and the rough one.
You can play with the Location and Scale of the Mapping node, but don't play with the Rotation if you want to avoid stretching.

In the case of a 3D effect, same setup on the left, then:

Plug your Image Texture node into the Height socket of a Bump node.
Plug the Bump into the Normal sockets of your Diffuse and Glossy nodes.
Here I've used a (Math) Multiply node instead of a ColorRamp. - Play with the Strength of the Bump to increase the 3D effect.
Comment: The recent versions of Blender have Map Range node but you could have had it before as a node group. I find it a good way to control some important values when you need to have some variations but on a certain scale.
Comment: oh ok I don't know anything about it
Comment: Thanks!!!!!!!!!
Answer: Put a noise (procedural) texture instead of image texure as this node tree shows,and you get a basic rough shader.how-to-make-a-bump-map-from-a-texture-paint

Procedural Rougness texture


Can I hide images on Google Image Search that I've already flagged?

Question: When I'm reporting offensive images on Google, is it possible to hide images that I've already flagged? I want the images that I've flagged as offensive to disappear from my search results (instead of showing up again and again.)
Comment: To clarify, I keep seeing the images that I've flagged even when I reload the page after flagging the images.
Comment: I am also using the "safesearch moderate" search setting.
Comment: Those flagged images probably haven't been reviewed so that's why they will still show up. Don't think you can have them not appear until they are removed, if they are
Comment: Yes, that's why a web browser extension would be useful for this purpose. (Also, where can I make feature requests for improvements to Google Image Search?)
Answer: No. You cannot have an instant flag remove the image.  You can however set safeSearch to strict giving you a slimmer change of browsing offensive images.
Comment: Safesearch strict mode brings up a lot of false positives, so I'd prefer to stay with SafeSearch moderate. Also, I think this type of  feature (per-user image filtering) should be requested to Google - where can I make feature requests for Google Search improvements?
Comment: Are there any browser extensions that can remove specific images from search results (or prevent the loading of specific images?)


"007 astra 1.6 vvt how does the inlet manifold vacuum flaps work and the point of them?

Question: have a astra with a 1.6vvt z16xer engine and would like to understand how the vacuum controlled flaps within the sealed inlet manifold work, the flap. very much like a throttle flap I think? is operated via a vacuum solenoid electrically controlled from the ecu
is it similar to twinport ?
Comment: All it does is change the intake runners from long to short, Which changes the torque and horsepower of the motor during low rpm and high rpm.
Answer: As engine speed increases, the flaps are gradually opened until, at around 2,000 rpm, they are parallel to the airflow and present virtually no resistance. Their purpose is to ensure that the air entering the cylinder is sufficiently turbulent for good fuel-air mixing even at low engine speeds. This aids in reducing certain toxic emissions and may also improve low-end power and torque.
Link
https://www.avontuning.co.uk/services/swirl-flap-removal


What is the exact difference between MPLS tunnel and LSP Path?

Question: According to my knowledge,
Tunnel - Path between Ingress and Egress Routers.Used for Traffic Engineering (Band-width assigned)
LSP Path - Path between Ingress and Egress Routers.Used for MPLS.
Comment: Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you can provide and accept your own answer.
Answer: LSP is Predetermined path Over two Label edge Routers. It is established over Label switching router. It is based on Forwarding equivalence class. LSP is required to MPLS forwarding.
MPLS Traffic Engineering build unidirectional Tunnel between source and destination. IT is based on LSP Path.
For more details cisco
Answer: According to my understanding of Cisco terminology:
Tunnel: what you configure in the router, it is keyword used by Cisco to indicate the interface. For ex: I will configure a tunnel between Router1 and Router2.
LSP: is somehow virtual, means if you combine the labels between R1 and R2 and put them in top of each other. You will get an LSP. It is the virtual path that can be visualized by the stack of labels.
To clear it further, a tunnel can have a primary and a secondary path between the same R1 and R1. But usually each of the paths will have a different LSP (labels).
Answer: Tunnel is a construct/container of following: source, destination, path/s.
It is the tunnel that is used by upper level application to resolve NH to destinations. e.g. L3-vpn, L2-vpn.
Source = Sender, destination = receiver, path = LSP.
Tunnel may have more that one path or LSP. Use-case of multiple path is primary/secondary
LSP may be signaled by control protocols like LDP, RSVP or Segment-routing (even BGP labeled unicast).


Can Darkcoin's Darksend be implemented on top of Bitcoin?

Question: Can Darkcoin's Darksend (I think this is called coinjoin, but I am unsure) be implemented on any cryptocurrency (without a fork), or must the feature be present when the coin is first released?
Comment: Can you perhaps explain what "Darksend" is? I looked at http://www.darkcoin.io/ and there is a PDF that explains *how* to enable Darksend, but nothing about *what* it is or what it does.
Comment: This doesn't directly answer your question, but note that there is [Zerocoin](http://zerocoin.org/), a similar protocol designed for Bitcoin.
Comment: Read the darksend documentation http://darkcoin.io/downloads/DarkSendDocumentation.pdf && whitepaper http://darkcoin.io/downloads/DarkcoinWhitepaper.pdf

Note, darksend is in early beta stage, actually beta V5
Comment: @Tony Would implementing ZeroCoin require a fork of the Bitcoin Blockchain, or could wallets be released that support this protocol while still being compatible with everyone who doesn't upgrade their wallet? I would guess that the answer to my original question is the same.
Answer: Yes, DarkSend is one specific implementation of CoinJoin, and CoinJoin can implemented directly on top of Bitcoin without a modification of the protocol. So no fork is necessary.
The Darkcoin Whitepaper does not
mention anything that would deviate from the CoinJoin idea and thus require a modification of Bitcoin. (However, the paper is not very detailed and I did not look at the source code, so I cannot provide an answer with 100% certainty.)
CoinJoin has been originally proposed by Gregory Maxwell. The main advantage of CoinJoin to avoid that coins can be stolen while mixing them with other users. It does not change Bitcoin, it runs on top of it, i.e., it only provides a special way to create perfectly valid Bitcoin transactions that can be submitted to the network. Of course, users need a special client to participate in the protocol. For users with normal clients, the created transaction is just a normal Bitcoin transaction that appears in the blockchain.


what it means to have low ROC AUC?

Question: I have trained two classifiers namely a logistic regression and a decision tree on a data set. When evaluating both models on the testing data set, the decision tree has a ROC AUC = 0.62 but the logistic regression has ROC AUC = 0.91. However both models have similar gain chart and the lift for the first decile is almost the same and is 5.7 and this is almost the highest lift I can get considering my response rate (~17%). How come that is possible and what it means?
Answer: While the interpretation of the AUC is something you should look up as it's widely available, in cases when you want a deeper analysis of your model, it is a wise choice to plot your ROC curve and not only calculate its area. It can give you insights on how your model is working (for example, your logistic regression model may have a sweet spot where it works well but the other thresholds perform horribly, which would bring the AUC down).
Comment: The selected answer in here might interest you: https://stats.stackexchange.com/questions/105501/understanding-roc-curve
Comment: The fact that both have, probably, identified the group with the highest lift does not mean that they perform equally for the whole population. The decision tree may, for example, be incorrectly classifying a lot of the negative samples as positive, which would lower the AUC.
Comment: after drawing ROC, how to figure out what threshold perform horribly? The reason I'm asking is the threshold is not drawn in the ROC curve.
Comment: A certain point performs better the closest it is to the upper left corner. As far as I know, there is no way of knowing the exact threshold point (there may be ways I'm not aware of, though), but it can guide you on which intervals to try. You could try and pinpoint a certain threshold interval and evaluate it manually.
Comment: what about the lift value? do you have any comment on the lift value here?
Comment: https://stats.stackexchange.com/questions/29719/how-to-determine-best-cutoff-point-and-its-confidence-interval-using-roc-curve-i
Answer: An alternative reason could be underfitting of the data. While it is quite unlikely to happen with decision trees, it could still be the case if some of the parameters were chosen poorly.
Underfitting is the exact opposite of overfitting: the capacity of your model is too low to fit the training data at all and your model under-performs. It generalizes very well and underperforms on the test data as well.
When people make statements such as "avoid overfitting", what they mean is actually to try to minimize the gap between the training and test error rates, sometimes referred as "generalization gap". There is a good explanation of this effect in (Goodfellow et al., 2016) see for instance figure 5.3.

If you get a poor fit on the training data you will of course get poor results on the test data too. Before drawing any conclusion about the performance of the test data, remember to always check the fit on the training data too.
References:(Goodfellow et al., 2016) Ian Goodfellow, Yoshua Bengio and Aaron Courville. Deep Learning. MIT Press, 2016.
Comment: My main concern is about having a high 'lift value' while it's ROC_AUC is very bad. Besides, the AUC_ROC  for training and testing in both models are very close (0.911 and 0.912 for logistic regression) and (0.621 and 0.622) for decision tree. the results looks a bit suspicious to me. Any idea?
Comment: @H.Z. This all suggests massive underfitting - especially if the training ROC is no better than the test one. The high lift indicates that you have some special structure in your data that makes it respond well to this particular measure, but I'm afraid it is impossible to answer without actually seeing the data.

what it means to have low ROC AUC?


How to load multiple images in Jupyter notebook?

Question: I have a folder filled with png images and I want to load them into my Jupyter notebook to form a training set. This question sounds simple; however, I can not find any methods of loading all my png images into my Jupyter notebook and use them for training.
Comment: This is not a jupyter specific question, it's a python question, right?
Answer: Create a notebook in the same folder of your images,
paste this code in a cell. Then run it.
# collect all .png files in working dir
fs = !ls *.png

import IPython.display as dp

# create list of image objects
images = []
for ea in fs:
    images.append(dp.Image(filename=ea, format='png'))

# display all images
for ea in images:
    dp.display_png(ea)

Hope it helps.
Answer: Use scipy.misc.imread(name='my_file.png'), this will return a Numpy array that you can then use to create a dataset.
You can see more information on the docs
Imagining you have all your images in a folder called 'data' and the images are of format 'image_0.png, image_1.png, ...' your code could be something like this:
import numpy as np
import scipy

n_images = 100 #Example value
image_names = ["data/image_{0}.png".format(k) for k in range(n_images)]

training_set = []
for img in image_names:
     training_set += [scipy.misc.imread(name=img)]

Answer: You can insert a picture in a notebook by writing the following command in a markdown cell :
![alt text](fig1.png "figure one")

You could repeat this for each of your pictures.


What is the most effective cold weapon alternative to knife?

Question: There are certain regulations on carrying a knife in some regions. I wonder what are effective alternatives that can be used in knife's stead, and that can be considered cold weapons.
Comment: This is a tough question because it depends upon wording of laws - many don't explicitly prohibit knives or bladed weapons, but they do prohibit *offensive* weapons. For example a [kubotan](https://en.wikipedia.org/wiki/Kubotan) can be considered offensive, depending on your intention and the situation and the mood of the law enforcement officer.
Comment: I'm voting to close this question as off-topic because it is looking for legal advice on carrying offensive weapons.
Comment: @MikeP, I didn't mean to ask for legal advice. I actually wanted to know other effective weapons which do not have the stigma often associated with knives. Legal advice from some of the answers were pretty insightful though.
Comment: @JasonStack, asking for advice on weapons that can be carried, (to me) implies an intention to harm which would be, at best, inappropriate and, in my opinion, illegal. So, you may not have meant to ask for legal advice, but, in essence, you are.
Comment: Placing this on hold because it is too broad (no region specified and because no particular genre of weapon was specified or criteria beyond "replacement for a knife" and "cold").
Answer: This is going to depend highly on your particular region's laws, be them at the city, county, state, province, or country level. And the laws change from time to time. It's hard to know for sure what's allowed.
The other thing to keep in mind is that even if a weapon is legal, if you go to court on homicide or assault charges, even if it was clearly self-defense, juries are often prejudiced against the use of weapons, particularly if your attacker is unarmed. They can easily rule against you in favor of the prosecution.
Oddly enough, I've heard that guns are the only exception (in the U.S. and other countries where gun ownership is legal and encouraged). They say juries tend to be okay with someone using guns to protect themselves. Not knives, for example. If you use a knife, even legally, the jury may see it as something only a "thug" would be carrying. Only guns are something an "upright" citizen would carry for self-defense.
The best advice I can give anyone who wants to carry a weapon for self-defense that's not a gun is to carry something that isn't a weapon but can be used that way. This has to be something you might have with you at the time and have a good reason to have it other than for self-defense.
For example, a very strong, heavy umbrella. Or a cane or a walking stick. Or even a strong, metal pen with a hard, blunt point to it. Drum sticks. Belts, ropes, and electrical cables can be used defensively. Screw drivers and wrenches. Steel tipped boots. Etc.
If you're a woman carrying a purse, think about keeping rolls of pennies or nickels at the bottom of the purse so you can flail your purse at an attacker. Guys might want to also have rolls of pennies, nickels, or quarters in your jacket pockets to use while punching.
You get the idea.
Legally, that's more justifiable than having an actual weapon on your person and using it. But, again, this depends on your local laws. It often doesn't matter that you used something that wasn't actually a weapon. If you used it "as" a weapon, that may be the only thing that matters, legally.
So you really have to be aware of your own local laws.
The only other thing I'd suggest looking at is pepper spray. In fact, I'd go so far as to say get that before thinking about the improvised non-weapons I mentioned above. It's easily justified in courts as a pure self-defense weapon. It doesn't have the stigma that knives do, being associated with criminals and "thugs". Pepper spray is common, cheap, effective, and legal - in the U.S. anyway, if over 18 years of age.
But make sure you know how to use your pepper spray and go through drills every now and then. You don't want to have to fidget with it to get it to work when you need it. You should know how to aim it and do some target practice with it. It should be kept out of reach of children. There should be a safety lock to prevent it from accidentally discharging. Etc.
All of the states in the U.S. allow pepper spray without a license now (or will as of this July it seems), but there are some regulations you have to abide by on a per-state basis. Other countries may or may not allow pepper spray. Many countries only allow law enforcement officers to have pepper spray. You can check this link for info on your particular location:
https://en.wikipedia.org/wiki/Pepper_spray#Legality
But be careful not to use pepper spray without a good reason. Just because it's legal doesn't mean you can't be sued or imprisoned for using it.
That's true of everything else I mentioned as well. If you use an umbrella or a rolled up newspaper against someone, for example, and they press charges against you with the police, you might be imprisoned for battery with a weapon.
Hope that helps.
Answer: As no specific region was specified in the question, this answer applies exclusively to Canada. Perhaps similar provisions exists in other legal systems, however.
In Canada, the law allows you to openly carry a knife of pretty much any size, as long as it conforms to these points of the Criminal Code Article 84 :

Prohibited weapon means
(a) a knife that has a blade that opens automatically by gravity or centrifugal force or by hand pressure applied to a button, spring or other device in or attached to the handle of the knife, or
(b) any weapon, other than a firearm, that is prescribed to be a prohibited weapon

As the first item implies, any straight knife or knife that opens from pressure to the blade only is legal, with no size restriction.
The prohibited cold weapons list includes :

Tear gas, sprays or other similar items
nunchaku
shuriken
Kusari or Manrikigusari
bladed rings (as in weaponized jewellery)
TASER
Crossbows longer than .5m or that can be fired with a single hand
push daggers
any item smaller than 30cm that conceals a blade or spike of any kind
spiked wristbands
blowguns
telescoping clubs
morning stars
brass knuckles made of metal

Basically, if it's not on that list, it's legal to own one. Notice the emphasis on own... In Canada, use and intent are considered when weapons are involved, as far as the Criminal Code Article 88 is concerned :

Every person commits an offence who carries or possesses a weapon, an imitation of a weapon, a prohibited device or any ammunition or prohibited ammunition for a purpose dangerous to the public peace or for the purpose of committing an offence.

The common interpretation is that if you are carrying weapons for the practice of martial arts or for mundane uses (i.e. that knife on your belt with an 8" blade is for woodworking and general bushcraft, opening sealed boxes, etc.), it's 100% legal. However, if you are carrying for combat purposes, even if it is self-defence, it is deemed "dangerous to the public peace" and you could be arrested. Obviously, carrying a weapon with the intent of committing a crime is prohibited.
Nonetheless, some interesting stuff is still legal to own in Canada. For instance, pretty much any straight knife is OK, as well as unassisted opening folded knives. Metallic and wooden clubs are fine, too, as long as they are not telescopic (it's apparently OK for law enforcement, though). Metallic brass knuckles are prohibited, but not hard plastic or ceramic ones. Bows are apparently perfectly fine, too!
As long as you remember that these items are utilitarian in nature or part of your personal collection, they are perfectly fine. Just never use them as a weapon or state that you could intend to do so if you felt threatened...
As a matter of fact, I used to regularly transport swords of various kinds in the Montreal metro system, going to demonstrations and other martial arts related activities. I was questioned more than once by the local law enforcement, but was never fined or arrested, nor were my weapons confiscated. The only thing that was said to me was that I should wrap them in a piece of cloth, as it becomes more apparent that I'm only carrying the weapons, and not actively prepared to use them. After I started doing so, I was never bothered again, even if I sported the classic anime look with an obvious bundle of swords strapped to my back.
Comment: There's a good illustration of my point above: in this country nunchaku and shuriken are not forbidden, I can walk down the road openly carrying them. But I have a good reason or purpose - a gang member or youth won't get away with the same behavior.
Comment: @slugster - Some of the prohibited weapons are very ridiculous. I mean... who carries a manrikigusari or a morningstar? But yeah... in Canada, owning and using weapons are very different. You can own pretty much anything, but if you have any intention of using it offensively or defensively, it's illegal. Truth be told, when coming to and from the dojo, I wouldn't hesitate to use my weapons if I got mugged or something. But I'm not carrying those weapons for that purpose specifically. Rather, I'm using them to legally practice martial arts, and I happened to have them on me at that time.
Comment: That list is pretty crazy.  You can't sport a morning star, but a flanged mace is fine. Canada also seems to have an infestation of ninjas.
Comment: The most amusing example I've come across of the legality of carrying weapons was an occasion where football fans were being searched prior to being allowed into a Scotland vs England football match. One gentleman dressed up as a highlander strolled past the police unmolested while wearing a Claymore on his back.
Answer: I'll give you both the "ideal but still probably illegal" answer, and the more realistic answer.
Smashing weapons - still probably illegal
If you can't have edged weapons, a stick or club is a great tool.  It gives you reach, leverage, and can smash bones.  If you want a short pocket weapon, then you want brass knuckles.
Personally, if I had the choice, I'd take brass knuckles over a knife, because many people report not feeling pain from stabs or cuts, but broken bones destroy the structure people need to keep attacking you.  If you don't have the training to incapacitate someone correctly and they bleed out 20 minutes after they've already killed you, it doesn't help you any.
However, these things tend to be just as outlawed as knives so the point is moot.
The practical option
To most of my friends I recommend a flashlight.  You can get metal flashlights that have good heft, and range in size from pocket flashlights to foot long "regular" flashlight sizes, which are generally acceptable as normal tools to carry or have in your car. And frankly, you'll use them for actual flashlight duty, so it's an honest claim.
I carry a small 7 inch pocket flashlight that allows me to strike with either a hammerfist or a stabbing motion to strike with either side of the flashlight.  Most of the blade techniques I've learned from silat carry over fairly well, provided you train to go for bone smashes and with more force than you would use for a knife.
Don't get the kind with 101 "features" like "tactical edges" or such. Solid construction, heavy weight are what make this work, and all the extras move it from being a tool into a weapon as far as most people are concerned.
Your local laws, interpretation, and bias
Obviously, this also filters through your local regulations.  Those also filter through your local law enforcement, which may be much more arbitrary than the actual laws itself.  Given that for some people, they can't walk down the street with a soda can without police shooting them, carrying a knife, even if legal, would be out of the question when their primary goal is what makes them safer.
Comment: In the UK, as I understand it, any object used with the intention of causing harm is an offensive weapon. So, buying a heavy torch so you can use it as a club would make the torch an offensive weapon.
Answer: You can't go wrong with the tried and true Millwall brick.
Answer: Just carry a pen. It can save your life. If your attacker has a knife, honestly I'd say forget the rules; you are evening your odds or otherwise going 6 ft under. You can legally carry a pen anywhere you want, including into a court room. A simple fountain pen is THE ultimate concealed weapon. I have one in my car and on me at all times. Don't just use it for nothing or flash it around. We know from very early (well, some of us) that it's to your best advantage that other people don't even know you practice martial arts! Good luck, I hope for our sake we don't have to use it. Would it work? Um, yeah, it would.
N.B. don't go buying a "combat pen" or something stupid like that. You're hust fine with a good old-fashioned ball-point pen. Good luck explaining the "combat pen" stupidity to a judge! Hope that helped in some way.
Comment: Unfortunately it is not that easy any defensive action it is an offence now dais(I know several cases). In that case the best defence would be some thing like: - he fell and broke his arm/got something in his eye dont ask me I was there staing still mr judge.


Is there such a thing as "right to be heard" by the authorities?

Question: Does an individual have a right to be heard by state authorities of their grievances? Would such a right be possible to deduce from freedom of expression as defined in the American, Australian and Canadian constitutions?
Comment: On law.SE one might get even more detailed answers about this.
Comment: Since you haven't accepted either of the obvious answers regarding "right to petition", perhaps you should explain what you think "right to be heard" means to you.
Answer: Yes, this is normally called the "right to petition".
In the USA it is part of the first amendment:

Congress shall make no law [...] abridging [...] the right of the people [...] to petition the Government for a redress of grievances.

Similar clauses exist in the German Basic Law, the EU, in UK law and the Chinese constitution:

Citizens of the People's Republic of China have the right to criticize and make suggestions regarding any State organ or functionary.

The right to petition is explicit in the English Bill of Rights:

That it is the right of the subjects to petition the king, and all commitments and prosecutions for such petitioning are illegal;

Australia does not have a Bill of Rights (except as derived from English Law), and its constitution does not specify any delimited rights.  However the courts have indicated that laws that would prevent the operation of a representative government, as described by the constitution, are subject to judicial review and may be struck down.  A law that removed the right to petition would surely fail this test.
Comment: The right to petition is a right to *speak*, not a right to be heard. It means the government cannot punish you (even with civil liability!) for making requests for government assistance, not that you have any particular right to have those requests heard. See many Supreme Court cases such as Smith v. Arkansas Highway Employees. (The Supreme Court said in dicta in 2010 that it might be more than that and could include some right to be heard, but no case has established anything else to date and all attempts to do so have failed.)
Comment: Plus, even though in the US there is a right to petition the Gov for a redress, etc, there is nothing stopping the various government agencies from enacting policies, procedures, etc to define how those agencies may be petitioned. i.e. you want to yell at the school board, you'd need to look up the when and where to get yourself added to the agenda, perhaps, or when and where you need to appear to be heard during new business, or whatever the board calls. There is usually a period in a normal board meeting where the public can come in and be recognized (heard).
Comment: I wish there was such a right in India. I couldn't find anything regarding this in the Indian constitution except article 350 which states that "people are entitled to submit a representation for redressal of any grievance in any language of the state or union" is this a right to petition or just a right to petition "where appropriate" in the languages used in the center or the state
Answer: This heavily depends on the circumstances, the jurisdiction, and what exactly you mean by "the right to be heard." This answer will deal with the US, but I suspect that other western jurisdictions will be at least somewhat similar in broad terms.
In the US, in general, you have a right to express your opinion to the government (the "right to petition," as James K says), and the government has the right to completely ignore you. Perhaps the government "heard" you on some level, but they certainly did not listen to you. If you write a letter to some member of Congress about some political issue, 99% of the time, you will get back a form letter which explains the Congressperson's opinion on the matter, and contains little or no acknowledgement of your own opinion.
But there are many situations where things get more complex. If you are accused of a crime or otherwise subject to certain kinds of government sanction, you have a right to be heard as one element of procedural due process. This is a real, substantive right - whatever tribunal is hearing your case must seriously consider the evidence or arguments you present, and present a written explanation of its decision, based on its determinations of fact and law.
Similarly, the Administrative Procedure Act requires government agencies to hold "notice and comment" periods before enacting certain kinds of regulations. During this period, anyone can submit comments into the record, and the agency is formally required to consider those comments. In practice, it is typical for agencies to write some perfunctory fluff acknowledging the comments they disagree with, and then do whatever they were always planning to do anyway, but they cannot totally disregard this requirement, or else a court will have grounds for reversal of the regulation. Agencies governed by the APA sometimes also hold trial-like proceedings, in which they are required to seriously consider any evidence which is properly before them, and cannot simply handwave their way through said evidence.
Comment: For what it's worth, on a couple of the relatively rare occasions where I have submitted feedback to my local U.S. Representative, I've received a call back from their office. Even when that doesn't happen, though, members of Congress do try to have a good feel for the opinions of the people in their respective electorate, as they typically want to be re-elected and, thus, want to know at least what the people want to hear (whether they act on it is a different question...) Of course, you're right that they have no legal requirement to listen, though. Just an electoral motivation.
Comment: "[T]he government has the right to completely ignore you." I would rephrase that. The political philosophy of the US system is that the government does not have rights vis-a-vis the people; it has duties and responsibilities. I would say, :The government has no duty to do anything."
Comment: @reirab If they had a _legal obligation_ to change their legislative actions based on what grievances their constituents aired, I don't think that would be a good thing. It would be too easy a system to high jack by someone with a little money and / or influence.
Comment: @arthur I might very reasonably decide the jerk senator who ignores me is still preferable to anyone else. In that case, a system which punishes him for ignoring me would actually be a gag on my ability to petition him.
Comment: According to the last paragraph it seems that a large enough crowd of people who have nothing better to do could filibuster a disagreeable proposal with a flood of petitions too large for the agency to process.
Comment: @Michael: There is a start date and an end date for the comment period, and you can only enter one comment (plus a reply, if a reply period is provided). The agency does not need to respond to each individual comment, they just need to provide an overall response with enough detail that a court believes they at least looked at the comments. If a comment is not germane, the agency can silently ignore it.
Comment: @Wastrel: Formally, the Tenth Amendment refers to them as "powers," but it seems to very explicitly contemplate the powers of the government and the powers of the people as being of the same overall kind. I don't think the distinction you are trying to draw is actually supported by the text of the Constitution.
Comment: @Kevin I think you are right regarding the "powers" of the states vis-a-vis the federal government. Nevertheless, the 10th Amendment gives the people the ultimate "powers" that are not reserved to the federal government or the states. And "rights" are reserved to the people. The states do have rights, but that is not relevant here.
Answer: There are better responses here, but I want to meditate on this point:
The "right to be heard" probably has to be understood in relation to the "right to receive a response".
If you express something to the government, does it count if they heard it but never act on it? It brings us back to the old saying: "If a tree falls in a forest and no one is around to hear it, does it make a sound?"
Understandably, others have went for "right to petition" as answer, since it creates a legal obligation for the government to respond (assuming the peition passes and that it is binding rather than consultative).
But there are other scenarios that do not fit neatly into this answer:

If a referendum passes, but it is only consultative (no binding effect), then the government could theoretically not act on the decision. In this case, has the voice been heard?

If a nationwide protest demanding the scrapping of a controversial judicial reform continues for months and the government refuses to honor the demand, has the voice been heard?

If a person writes to their representative, and the representative responds to tell them they will not take action to implement their demand, has the voice been heard?

Due to the above consideration, I would argue there is no strong evidence that "right to be heard" exists (if your definiton of being heard is that your demand moves the dial in real terms). However, if a jurisdiction has strong protection for "freedom of expression", then it increases the chance of your voice being heard.
Comment: What you describe would be a right to be heard **and be followed**. That does not exist and would be undemocratic at its core. Neither an informal nationwide protest nor a letter to a representative can ever prove they represent a majority view on a matter. (That is in contrast to a referendum, obviously.)
Comment: "If a nationwide protest demanding the scrapping of a controversial judicial reform continues for months and the government refuses to honor the demand, has the voice been heard?"  Assumes that **everyone** is protesting to make the change.  There are certainly people (maybe *lots* of people!) who are saying that the reform should remain.  They should be heard, too.
Comment: [Sound is a pressure wave which is
created by a vibrating object.](http://www.cs.toronto.edu/~gpenn/csc401/soundASR.pdf)  Thus, **yes**, trees make a sound when they fall, even if there's no one around to hear it.
Answer: In the United States, there is no right to free speech granted by the U.S. Constitution. The Constitution does not grant rights to any individual. It simply limits the government's authority to abridge certain inalienable rights naturally given by our creator. Our Constitution enumerates our natural instincts for fairness, security, self-defense, justice, accountability, and self-governance.
Therefore, the right to be heard doesn't exist either. The right to be heard would imply an entitlement has been granted, and therefore, can be taken away at any time. The right to be heard would further suggest that people and the government have a duty to listen to your grievances, which would be contradictory to the first amendment.
Free speech and free expression are rooted in human nature and are largely connected to the type of land you are on. Since the beginning of time, people have gathered to express their opinions and ideas in public areas such as roads, state-owned public buildings, and public parks. Many examples of this include protests, political rallies, parades, speeches, religious practices, passing out handbills, potlucks, music festivals, and other gatherings. But nobody has a duty to hear your message, attend your religious gathering, or read your newspaper.

"Wherever the title of streets and parks may rest, they have
immemorially been held in trust for the use of the public and, time
out of mind, have been used for purposes of assembly, communicating
thoughts between citizens, and discussing public questions. Such use
of the streets and public places has, from ancient times, been a part
of the privileges, immunities, rights, and liberties of citizens."
Hague V. CIO 307 U.S. 496, 515 (1939)

The basic concept of the right to be heard, which should be called the "desire to be heard", or the "ability to be heard", can be peacefully exercised using components of First Amendment protected activities. The ability to engage in free speech protected activities in public places, inherently demands that individuals and governments have no expectation of privacy in public places and in the course of government activities. The U.S. Supreme Court has repeatedly upheld that anything you can see in public can be recorded and disseminated to the public, while fully protected by the first amendment. It is up to the individual to create privacy, which is also protected under the fourth amendment of the U.S. Constitution.
It is important to note, however, there are many places where first amendment activities are not protected. Some examples include inside someone's private home, in public bathrooms, inside courtrooms, or where there is a reasonable expectation of privacy in a public or private setting. Some states have prohibitions on recording individuals in a private setting without their consent.
The First Amendment, paired with the 14th Amendment, also protects the occupancy and use of public spaces, including publicly (government) owned land and buildings. An individual cannot trespass in public places without committing a crime. Nor can an individual be prohibited from occupying a publicly accessible government building that provides services to members of the public.

"As regulation of the use of the streets for parades and processions
is a traditional exercise of control by local government, the question
in a particular case is whether that control is exerted so as not to
deny or unwarrantedly abridge the right of assembly and the
opportunities for the communication of thought and the discussion of
public questions immemorially associated with resort to public
places."
Cox v. New Hampshire, 312 U.S. 569 (1941)

Journalists and activists often engage in these First Amendment protected activities to make their voices heard. By approaching politicians in public, temporarily occupying a government building, or organizing a protest to legally gather comments, and content, or sending a message to political and corporate interests, there is no way they won't be heard.
Freedom of speech has been litigated in many different cases. For the purpose of public access to publicly (government) owned property, the U.S. Supreme Court refers to the Public Forum Doctrine to determine where free speech is acceptable. The Public Forum Doctrine describes categories of government-owned property, where the government can place reasonable time, place, and manner restrictions on access to government property for free speech purposes.
The three categories include:

Traditional, or quintessential, public forums where the government cannot regulate all speech. Examples: roads, parks, public lands, right of way, and easements.
limited, or designated, public forums where the government is bound by the customs of a traditional public forum but is not required to retain an open charter. Example: publicly accessible buildings, schools, or possibly an event covering a specific topic, where the government can limit speech to that topic.
Nonpublic forums where the government may reasonably impose time, place, and manner restrictions and may reserve the forum for its intended purpose. Examples: courts, congressional hearings, under-oath proceedings, etc.

The Public Forum Doctrine derived from the Cox v. Louisiana case where 23 members of the anti-segregation group Congress of Racial Equality (CORE) were accused of criminal conspiracy, disturbing the peace, obstructing public passages, and picketing before a courthouse during a protest against racial segregation.
See the concept of the public forum doctrine

There is an additional reason why this conviction cannot be sustained.
The statute at issue in this case, as authoritatively interpreted by
the Louisiana Supreme Court, is unconstitutionally vague in its overly
broad scope. The statutory crime consists of two elements: (1)
congregating with others "with intent to provoke a breach of the
peace, or under circumstances such that a breach of the peace may be
occasioned," and (2) a refusal to move on after having been ordered to
do so by a law enforcement officer. While the second part of this
offense is narrow and specific, the first element is not. The
Louisiana Supreme Court in this case defined the term "breach of the
peace" as "to agitate, to arouse from a state of repose, to molest, to
interrupt, to hinder, to disquiet." 244 La. at 1105, 156 So. 2d at
455. In Edwards, defendants had been convicted of a common law crime similarly defined >by the South Carolina Supreme Court. Both
definitions would allow persons to be punished merely for peacefully
expressing unpopular views. Yet, a function of free speech under our
system of government is to invite dispute. It may indeed best serve
its high purpose when it induces a condition of unrest, creates
dissatisfaction with conditions as they are, or even stirs people to
anger. Speech is often provocative and challenging. It may strike at
prejudices and preconceptions, and have profound unsettling effects as
it presses for acceptance of an idea. That is why freedom of speech .
. . is . . . protected against censorship or punishment. . . . There
is no room under our Constitution for a more restrictive view. For the
alternative would lead to standardization of ideas either by
legislatures, courts, or dominant political or community groups."
Cox v. Louisiana, 379 U.S. 536 (1965)

Another notable first amendment case is Jewish War Veterans v. The American Nazi Party, where the supreme court and the American Civil Liberties Union defended the American Nazi Party, advocating the gassing of Jews under the first amendment. The ACLU controversially defended the American Nazi Party and its leader, George Lincoln Rockwell, to speak publicly.

Certainly, George Lincoln Rockwell, the Congress of Racial Equality, a church, or any other entity couldn't force an individual to "hear" them. Such a demand would suggest that the government has the duty to act on the demands of George Lincoln Rockwell. It could also lead to other human rights abuses like a state-sanctioned religion.
Answer: This is a narrow specific case but I think it is relevant.
When a new building is planned in Switzerland, a "ghost building" must be built in that place first and stay for at least a month. The "ghost building" consists of poles clearly outlining the shape of the new building, or any major addition to existing building. For tall buildings, tethered balloons and even helicopters have been employed to hover at a specified height. Underground structures are marked with wooden stakes at their corners. This rule has been discussed in The Guardian for United Kingdom also.

The rationale behind this requirement is to help the general public in understanding what is being built so they could oppose if the new building would have the visual impact that does not look acceptable for them. Hence the community has the right to say "no" before the construction begins. It would be much more problematic to oppose the existence of the building that is already standing and should be demolished at high cost. The right to oppose requires the right to know what is being built starting from.
Just architectural drawings may be difficult to obtain and complex to understand.
Answer: Italian Constitution has a specific article that has a broader application (emphasis mine):

Art. 24.
Tutti possono agire in giudizio per la tutela dei
propri diritti e interessi legittimi.
La difesa e` diritto inviolabile in ogni stato e
grado del procedimento.
Sono assicurati ai non abbienti, con appositi
istituti, i mezzi per agire e difendersi davanti ad
ogni giurisdizione.
La legge determina le condizioni e i modi per la
riparazione degli errori giudiziari.

My approximate (IANAL) translation:

Everyone can act before a judge to defend their rights and legitimate interests. The defense is an inviolable right in every state and stage of the [judicial] proceeding.
Poor people are granted, with dedicated institutions, the means to act and defend themselves before any jurisdiction.
The law determines the conditions and the ways for the reparation of judicial errors.

So, although this article doesn't directly address the right to be heard directly in 1st person from any authority, it grants the right to go the judicial way to make oneself be heard.
Of course the article grants this fundamental right when ones rights or legitimate interests are at stake, it doesn't mean that anyone has the right to voice their opinion directly to the authorities. However, since any grievance not heard by the relevant authority could hide a violation of someone's right or legitimate interest, many authorities are subjected to laws that in some form or another, allow the citizens to be heard.
In fact, there's a further article (n.28) that strongly compels public servants to "behave" without ignoring:

I funzionari e i dipendenti dello Stato e degli
enti pubblici sono direttamente responsabili, secondo le leggi penali, civili e amministrative, degli
atti compiuti in violazione di diritti.
In tali casi la
responsabilita` civile si estende allo Stato e agli
enti pubblici.

Translation:

State officers and employees and employees of public entities are directly responsible, according to criminal, civil and administrative laws, for their actions accomplished in violation of [a citizen's] rights.
In those cases civil responsibility extends to the State and to the public entities.

And there are more glimpses of these same principles interspersed in other articles of our constitution. In summary, an Italian citizen has an intrinsic "right to be heard" from the authorities.
However, the sad reality is that the procedure to make your voice heard or the fact that once you have been heard you are taken seriously or into consideration is another matter. It widely depends on the particular institution you are dealing with and also on the specific regional situation.


How large can the power set P(N) be made via forcing?

Question: Given the Constructable Universe L, is there a forcing extension L[G] of L in which P(N) is the 'size' (so to speak) of ORD, the proper class of all ordinals?  I am interested in forcing extensions of L because L is the smallest submodel of ZFC containing 'all' the ordinals and as such, figuratively speaking, is the 'skeleton' of ZFC.  The research program I am considering is using forcing to 'broaden' the power set P(A) of a set A so that P(A) contains all possible subsets of A (short of inconsistency), then using forcing to so broaden each stage of the Cumulative Hierarchy (insofar as the particular stage of the cumulative hierarchy can be so broadened) so that the 'true universe' V will contain all possible sets (short of inconsistency).  I would be using the naturalist account of forcing.  Is such a research program at all coherent?  It would seem, at least, to be desired inasmuch as it seems intuitive to interpret the definition of P(A) ('the set of all subsets of A') as 'the set of all possible subsets of A'.  Since no one[?] believes V=L, using forcing to broaden L seems quite natural.
Answer: With class forcing, yes, one can add ORD many Cohen reals, but the forcing extension will no longer satisfy the power set axiom and thus will not satisfy ZFC, although it will satisfy a significant fragment of ZFC. Indeed, this forcing is the one of the easiest ways to see that class forcing need not necessarily preserve ZFC. The most direct partial order to do this is Add($\omega$,ORD), the forcing to add ORD many Cohen reals, that is, the collection of finite binary partial functions from ORD to 2, ordered by extension. This is a proper class, and one must pay attention to the issues of class forcing, including the definability of the forcing relation. This forcing is the union of a chain of set-sized complete subposets, namely, the initial segments $\text{Add}(\omega,\theta)$ for cardinals $\theta$, and this is enough to let the basic forcing theory work out. But the power set axiom, of course, will not be preserved to the corresponding extension.
In general, since the ordinals of a forcing extension $V[G]$ are the same as the ordinals of $V$, if you are ever to pump up the power set of a set to become equinumerous with ORD, then that power set in the extension must be a proper class, and this is why you must lose ZFC in the extension.
Meanwhile, if you want to preserve ZFC, then you can use $\text{Add}(\omega,\kappa)$, and the basic fact is due to Solovay:  for any cardinal $\kappa$ for which $\kappa^\omega=\kappa$ in $V$, and under GCH this includes any regular uncountable cardinal (and more), there is a forcing extension $V[G]$ in which $2^\omega=\kappa$.
Comment: Thanks, Prof. Hamkins, that is helpful.  I have another question that you in particular might be able to answer, since you co-wrote the the paper relating modal logic to forcing.  The question is this:  can the phrase 'all possible' be a coherent quantifier?  As I mentioned in my question, I am interested in interpreting the universal quantifier in the power set axiom as 'all possible' subsets of a given set A.  Of course the usual interpretation of the universal quantifier limits its interpretation to all sets in a given model(and such limitations give rise to the multiverse view)
Comment: But if one can coherently interpret the universal quantifier as 'all possible', even as a type of generalized quantifier, couldn't one have
a set theory that satisfies the universalist demands, even though it would be different (slightly?) from ZFC (in the manner in which you specify)?
Comment: Question:   Would the 'significant fragment'  of $ZFC$ mentioned in this answer be, in fact, $ZFC^{-}$ + _Collection_?  Also, could one replace "Cohen reals" with "random reals" in this result?


Is it possible for two things to be equal but not identical?

Question: Is it possible for two things to be equal, but not identical? For example, would it be correct to say that 2+2 is equal to 1+3, but 2+2 is not identical to 1+3? If not in that particular case, is there at least one case where two objects are equal but not identical? Or is equality and identity the same relation?
Comment: 4 quarters = 1 dollar bill but 4 quarters is not identical to a 1 dollar bill.
Comment: The psycho-social-academic issues that produced this question are way more interesting than the question.
Comment: Equal can mean equivalent or identical, often when two things are equivalent, it is because there a property about them that is identical. In mathematics, equality is about identity between objects, but as a result of this the two 'expressions' 2+2 and 1+3 representing the same object are equivalent, it is essentially the fact that we see both expressions as different but equivalent that we use the word 'equal' for equivalent. As is the example with coins, they are equivalent but the value of both is identical. In your example the strings of symbols are not identical, but the object is.
Answer: 2 + 3 is equal to 5 but not identical to it.
Equal means "the same in one or several particular respects", respect which are usually left implicit when understood from the context.
Identical means "the same in all respects".
So 2 + 3 = 5 is true because 2 + 3 and 5 have the same value. And it goes without saying that value is the respect in which they are equal.
So they are the same in respect of their value, although they are obviously different as indicated by their forms and so are not identical: 2 + 3 is an operation and 5 is a number.
2 + 3 and 5 have identical values since their values are the same in all respects. Here we have to narrow down the scope of identity by being explicit it is their values which are the same: identical values. This because Identical on its own has maximal scope, beyond just value.
Answer: This comes down to the way we can use "equal" to mean "identical" (the same in all ways) or "equivalent" (same in a relevant way).
This makes sense in @Steven Saban's example of 4 quarters being equivalent to a 1 dollar bill in the relevant way of currency value (but not in all ways, such as physical appearance, so they are not identical).
So, considering the question of a "case where two objects are equal but not identical" this is not just possible but common. Obviously if we interpret "equal" to mean "identical" this trivially won't make sense, but where "equal" means equivalent, such as where "4 quarters is equivalent to 1 dollar bill" in the context of currency value but not appearance or "perro is equivalent to dog" in the context of semantics but not spelling, are cases of this.
Note: In mathematics the usages of "equal" and "equivalent" have their own important differences, though it is shifted more to a utility of mathematics than our everyday language so should be considered within that field.
Answer: Equality doesn't require an exact likeness in all respects:

Merriam Webster Equal:

"Equal 1 of 3 adjective
ˈē-kwəl
1a (1): of the same measure, quantity, amount, or number as another
       (2): identical in mathematical value or logical denotation : EQUIVALENT
  b: like in quality, nature, or status
  c: like for each member of a group, class, or society
provide equal employment opportunities
2: regarding or affecting all objects in the same way : IMPARTIAL

  3: free from extremes: such as
      a: tranquil in mind or mood
      b: not showing variation in appearance, structure, or proportion
  4a: capable of meeting the requirements of a situation or a task
    b: SUITABLE
bored with work not equal to his abilities

equal 2 of 3 noun
  1: one that is equal
insists that women can be absolute equals with men - Anne Bernays
  2: an equal quantity
equal 3 of 3 verb
equaled or equalled; equaling or equalling
transitive verb
1: to be equal to
especially : to be identical in value to
2 archaic : EQUALIZE
3: to make or produce something equal to

If two properties are the same then those are equal, but the objects are not necessarily identical.


How best to remove list items in a loop in C#

Question: Given the code:
var AllItems = new List<CartItem>();

using(var db = new MainContext())
{
    foreach (var item in AllItems)
    {
        if (!db.tblStoreItems.Where(i => i.ID == item.ItemID).Any())
        {
            AllItems.Remove(item);
        }
    }
}

Is this the best way to remove an item from the List object in a loop?
Answer: I don't think so. If you remove an item from the list on which you are iterating, the results will be securely wrong.
It's best to use an old fashion for - loop in reverse order
using(var db = new MainContext())
{
    for(int x = AllItems.Count - 1; x >= 0; x--)
    {
        var item = AllItems[x];
        if (!db.tblStoreItems.Where(i => i.ID == item.ItemID).Any())
        {
            AllItems.RemoveAt(x);
        }
    }
}

Comment: Items are being removed from array and parallely loop is going on for original number of items. Finally it will be crashed on `Index Out of Range`.
Answer: There are several things that are wrong with the loop approach, the main being - you cannot remove items from the collection you're currently iterating over with foreach - you will get an exception.
Since your main collection is a List<T>, you should use the RemoveAll method that takes in a predicate. You should also simplify your query like this:
AllItems.RemoveAll(item => !db.tblStoreItems.Any(i => i.ID == item.ItemID));

Answer: That's wrong (the OP's approach) as rightly suggested by Steve (Steve's way is probably the best in terms of performance),
I prefer to store the 'those to be removed' into a separate list, then you can do e.g.
AllItems = AllItems.Except(Items2Remove);

That is not best from performance way but for me makes things cleaner - you could also combine with LINQ enumerate - e.g. make IEnumerable from the list of records etc.
hope this helps
EDIT: just to clarify as per Steve's response
Comment: @Steve maybe I put it 'wrong' :) - yours is perfect - I meant 'his approach'. I just prefer going 'twice around', yours is more performant and works just perfect.


Give ANT deployment a label

Question: Is there anyway to specify a name on an ANT deployment, instead of just an 18 character guid?  It would be especially helpful with for the new quick-deploy feature.
Answer: I believe you should address that to Salesforce.
You can log a case or suggest your idea on IdeaExchange.
It is not possible to change name for ANT Deployment currently.
Probably they would implement this option if you log a case or suggest your idea on IdeaExchange. They are constantly implementing some old most-voted user suggestions from idea exchange in new releases.

Give ANT deployment a label


How to stop interstellar civilizations from becoming too dissimilar?

Question: In this world there are humans have developed the technology to allow for interstellar travel, accomplished by light speed engines. However, this has created a problem. Is there any way for those who live on the vastly different planets can stay genetically similar to humans on Earth? Conditioning like people living on a freezing cold planet having a higher tolerance level against the cold is fine; but evolving to have less efficient muscles for more body heat wouldn't be allowed. Is there any way this idea can be implemented in this world?
Comment: Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer.
Comment: Humans evolved in the scorching heat of the African savannah and they now live in the freezing cold Arctic without having to resort to genetic engineering for "a higher tolerance level against the cold". Our distant Stone Age ancestors invented this little known technology called *clothes*.
Comment: Why stop it at all? Why would very different cultures and civilizations, spread over tens or hundreds of light-years, all conspire to keep themselves the same/similar?
Comment: Are your "light speed engines" ones that are limited by light speed and relativity, or ones that allow FTL travel or jumps?
Answer: The only natural way to keep populations from genetic drifting is regular interbreeding. Fortunately, the mechanism for this would take hundreds of thousands of years before you'd diverge enough to cause breeding issues. For example, the peoples that made it across the Pacific by whatever route were separated from their Asian ancestors for at least 13,000 years, and maybe as much as 50,000.
There are a few known unnatural ways of doing it, but they all involve identifying an "ideal center" for genetics and testing a new child at some point in development. You can pick the point at which this occurs for optimal dystopic effects on your story.
Half of all pregnancies are currently non-viable and result in an immediate reset of the reproductive system. These are called "chemical pregnancies," and generally result in a slightly heavier than normal period. If you induce a virus that prevents divergent pregnancies from taking hold, you will keep your population within "human norm", but you run the risk of a population eventually becoming barren because their genetics has drifted up against one of the virus-imposed walls.
There are more than enough stories about cultures that test babies at birth and throw away the unwanted ones. Such high-tech barbarism might make for excellent drama. If the testing took place later, you could guarantee that there was a lot of cheating going on.
Alternately, you could require one in a thousand women to get knocked up by a traveling God King (or his near descendants) who was the epitome of ideal genetics. If these children were given favorable economic and social treatment, that would maintain a standard.
Addendum: In response to @JBH's comment, I want to note that H. sapiens sapiens (that's us) were cross-breedable with H. sapiens neanderthalensis. That's right, neanderthals interbred with our ancestors as recently as 45k years ago, even though they diverged from us more than a half million years ago. The upshot of this is that your interstellar civilization has at least one orbit around the Milky Way before you have to worry about it. Put another way, the stars you're visiting will diverge more than the populations' genetics will.
Note that this presumes that the speed of genetic variation matches that of our cradle. Given higher population counts and a bad habit of encountering radiation, you might run into that problem a bit sooner, but not in the time-scales described in Asimov's Foundation trilogy.
Comment: That's fascinating, and I would think a useful bit of information for the OP. It basically says that unless his/her story involves a breathtaking amount of time, the variation has more to do with politics and morality than science.
Comment: @JBH, we could still cross-breed with the Neanderthals, and that was 125k years ago. The best guess I've seen suggests the speciation limit was about twice that. Fertility rates would decline along the entire timeline, so there's no real hard cut-off, but you might be able to identify a point where you couldn't bear enough replacement children if you tried.
Comment: Now you've got me curious. Does science have an idea of how far back in time we'd have to go before a modern human wouldn't successfully breed with an ancestor?
Comment: @JBH: *"How far back in time":* Not really known, but surely not more than about 4 or 5 million years ago. (Because 4 or 5 million years ago our ancestors could still breed with the ancestors of chimpanzees, meaning that the chromosomal re-arrangement, which fused the chimpanzee chromozomes 2A and 2B into the human chromosome 2, had not yet happened.)


Does Islam clash with the "Do whatever you want" ideology?

Question: I always hear Islam is oppressive from many non-Muslims as people say it oppresses women or people arent free to do what they want. Of course being free to what you want to do has limitations but does Islam clash with the general idea that submission to God clashes with the idea of being free to do what you want and what does Islam say about the claims made against it about this "oppressive" nature etc?
Answer: Yes, Islam has rules. But then again, so does pretty much any ideology outside of outright anarchy.
If anyone considers being expected to follow rules as "oppressive", that says far more about that person than it does about the ideology itself.
Comment: But what is the Islam's response to this being like oppressive and stuff? Like people arent allowed to do what they want and that women have a lot less rights and stuff? What hadith or quran verses are there or are there even any?
Comment: @YakoubAli You want a response? Try "*Lakum dinukum waliya din*".
Comment: Yes but saying that is basically like saying yeah my religion is oppressive but we have our rules and you have yours. It doesnt necessarily mean justify it if you get what Im trying to say.
Answer: First of all
Do you know what does a religion mean?
Do you know all philosophy behind Islam or other religions to reach this questions?
Quick answer:
Religion mean some rules by a complete thing (god) to guide us because there is not enough time to find best philosophy for each issue in life and you can trust these rules by prove of a religion.
And about your question:
1.Gender equality:
As we know of historical books and as Quran as Arabs were in a terrible condition of gender equality before the Islam and even after that.We should remember Islam was a help patch not a brutal way.
As everybody argue about gender equality around the world, there is no way to say womans and mans are physically equal because it is true for 75% of humans and it mean other ones are exceptions.
Main issue is about human rights and about that you can surf the Quran as base rules of Islam to find strong words about equality in this rights like politics and science.
And another question about limits.Yes, every religions bring us some rules to live till we found them logical and useful.Like every countries rules.
Sorry for poor english.
Answer: Yes Islam have rules not guidelines. Rules are inherently attached to punishment or judgements while guidelines provide you ways (not a single way) to select from but doesn't impose judgement on you, you are free to choose your path and can even reject these guidelines based on your empirical experience and create your own gudielines. Most of the traditional wisdom around the ancient world and few of tradition in eastern world currently is based on guidelines and thus provide room for innovation, discovery and invention while once the society is closed inside set of rules, all these dies. The guidelines based society concern with direct relationship between person and reality whereas rule based society have an authority between person and reality which sets code of conduct.
Comment: Please let me know the downvote if I have written anything wrong?


Good books for 4th graders focusing on fun, interesting and challenging math topics and exercises

Question: My son shows strong interests in math and he is currently a 4th grader. I wonder if there are any good books that could be used to keep up his interests and at the same time challenge him a little bit.
Comment: Is he doing 4th-grade math, or is he ahead of his grade level? Martin Gardner's books might be good. Non-book options might include math competitions or playing with free software such as Geogebra.
Comment: What sort of math is he doing right now?  What's really capturing his interests?
Comment: He is ahead of his grade level. He likes to solve the puzzles and logic problems
Comment: Also: Mathematical Puzzles of Sam Loyd.
Answer: You might try The Number Devil: A Mathematical Adventure (Amazon), although it's more "fun" then "exercises". (I'm glad you included "fun" and "interesting" in your question; nothing better to destroy someone's interest in math than a bunch of "exercises".) That's the only one I can think of that's written for children right now. But depending on how much of a reader he is, you might consider the "pop math" stuff written for adult audiences. Look up "recreational mathematics"; try Martin Gardner or Ian Stewart perhaps. If he's up to it, take him to the 510s of the adult nonfiction section of a public library (and the rest of it too!). I certainly had a lot of fun there in elementary and middle school.
He might enjoy competitions and summer camps (especially in a couple of years), which have the additional benefit of providing a community of peers. If you're in the U.S., you might look into MATHCOUNTS, Art of Problem Solving (books, online classes, videos, and forum), MOEMS, Khan Academy, CTY, and MathPath. I've only had (very positive) firsthand experiences with the first two, but people have recommended the others.
Comment: Wow, this is so nice set of books. And yes, I want to keep up his interests to make it more of fun experience. Thanks a lot!


Outputs floating-point

Question: I just wanted to create a program that reads a float (i.e. single-precision number) from the keyboard and then outputs it, and there're no warnings or errors, but I couldn't get correct answers, instead, I got 0.00000000. What's wrong with my code?
This is my code:
.data 0x10000000
msg1: .asciiz "Please enter a float: "
.text
.globl main
main: addu $s0, $ra, $0  # save $31 in $16
li $v0, 4 # system call for print_str
la $a0, msg1 # address of string to print
syscall
li $v0, 6 # system call for read_float
syscall # the float placed in $f0
mtc1 $t0, $f0# move the number in $t0
sll $t0, $t0, 4
# print the result
li $v0, 2 # system call for print_float
mfc1 $t0, $f12 # move number to print in $f12
syscall
# restore now the return address in $ra and return from main
addu $ra, $0, $s0 # return address back in $31
jr $ra # return from main

Answer: You've got mtc1 and mfc1 backwards.

mtc1 means GPR -> FPR
mfc1 means GPR <- FPR

So if we take a look at what this code actually does:
mtc1 $t0, $f0      # Sets $f0 = $t0. You haven't specified a value for $t0 at this point,
                   # but it doesn't really matter since you're not using $f0 any more
                   # after this point.
sll $t0, $t0, 4    # Shifts whatever was in $t0 4 bits to the left.
li $v0, 2          # System call for print_float.
mfc1 $t0, $f12     # Set $t0 = $f12.
syscall            # Calls print_float without having specified a value for $f12.

I don't understand the point of this shift since you say that you just want to print the number that was read, so the above code could be replaced with:
mov.s $f12, $f0
li $v0, 2
syscall

If you do still want to perform that shift for some reason, then you need to change your mtc1 to mfc1 and vice versa.

Outputs floating-point


Loshon hora and Torah lectures

Question: Where in hilchos loshon hora, does the chofetz chaim say that ridiculing Torah lectures is a form of loshon hora?
Comment: What gave you the idea that he says this somewhere therein? Why do you want to find it?
Comment: Its one of his most used examples
Comment: In Guard Your Tongue by Rabbi Zelig Pliskin, page 39.
Comment: Wouldn't this not apply then if the lecture was so bad that it isn't even considered Torah? (which is probably why people are making fun of it.)
Answer: Chafetz Chayim, Lashon ha-Ra, 2:12, see here.

Loshon hora and Torah lectures


Outlets not working in bathrooms

Question: Is it possible for a fuse from the main breaker box to go bad? I have 3 outlets not working 2 in 1 bathroom and 1 in another bathroom all on the same floor. In the bathroom with 2 outlets had 1 GFCI the test or reset button wouldn't do anything I figured if I changed it out with a new one that would fix the problem. It did not. So I changed all 3 outlets and they are still not working. They are getting power they are connected correctly. When this first happened last Sunday the breaker that all 3 lines are on felt spongy for lack of a better word. You could flip the breaker back and forth and there was no tension in the switch. After changing the outlets out the breaker feels normal it clicks when moving it back and forth. This is definitely above my basic knowledge and We do have an electrician coming to check it out. Just curious if anyone knows what this could be based off of my description.
Comment: What make and model is your breaker panel? (If you aren't sure, please post photos of both the breakers and the label on the inside of the door and we can figure it out from there)
Comment: They are getting power and are connected correctly. Makes me question a bit. but your description of the breaker I would swap it or just purchase a new one unless it is a FPE federal pacific or zinsco panel these do have known problems (the only work I will do on an FPE panel is replace it).
Comment: What test did you perform to determine that "they are getting power"? If they are getting power, but will not power appliances plugged into them, then you have a failed neutral connection. This could be either in the panel or could be in a box. I think you should let an electrician handle this, but you might get info with a plug in 3-prong receptacle tester.
Answer: Yes, it's entirely possible for a breaker to go bad.  The symptoms you describe are consistent with such a problem. You should replace it immediately as in this condition it may not perform as it was designed to and you could be at risk for a fire should a short-circuit occur.  When in doubt, change it out!
Answer: Breakers definitely go bad. There are many moving, spring loaded parts in them and with age they go bad. One final test would be to swap breakers in the main panel to verify the faulty breaker. Then you could pick one up at your home store and save the price of an electrician. This shouldn't be done unless you're very familiar with the procedure. Good luck.
Comment: We bought a new breaker and that didn't fix the line I have an electrician coming on Tuesday

Outlets not working in bathrooms


Magento 2 trying to get the product sizes off from the category page

Question: I'm using magento 2 , and I'm trying to get rid off the product sizes from the catalog page , I only want the size on the product page.. I've tryed to edit Stores -> (Attributes) Product -> dress_size -> Storefront properties -> Visible on Catalog Pages on Storefront set to NO , I save the attribute , clear the cache , but when I come back , Catalog Pages on Storefront is set back to YES.. Does anyone had this issue before ?
Comment: Did you try to reindex ?
Answer: You have to set No in Use in Layered Navigation field.(if you want not display inside layered navigation).
other option is,
Used for Sorting in Product Listing set to No
you just have to reindex command,

php bin/magento indexer:reindex

clear cache and remove browser cache.
Comment: Did also this , still coming out with YES , after reindex and cleared the cache..
Comment: i have updated my answer plz check.
Comment: But if I do like that , it dissapear from the side bar , but is still under the product , the thing is I want to keep it as filter on the side bar , and get rid of it only under the product..