[ Law & Ethics ] Open Question : If drugs are illegal in USA, how do so many celebrities use them?

Celebrities like Miley Cyrus have admitted to using marijuana and cocaine. I’ve looked up the list of legal drugs to use as recreation in USA, and marijuana and cocaine are not among them. I’m confused. If drugs like marijuana and cocaine are prohibited and banned in USA, how do celebrities access them, boast about it and not be arrested?

Windows feature that stores specific data about applications run to help them start faster? [migrated]

do you know of a Windows feature that stores specific data about applications run to help them start faster? Asking because a forensics challenge I’m attempting to do had that as a hint to find the most recently run executable. Can I get any help?

I’ve purchased headphones in a foreign country and declared them when coming back. Do I have to re-declare them on subsequent trips?

A few months back I’ve purchased a set of expensive headphones in the US and dutifully declared them when coming back to Canada. Now I would like to travel to the US again and carry the same headphones in my backpack. When coming back to Canada, would I need to re-declare the item as technically it wasn’t purchased in Canada? If not, how do I prove that the headphones have already been imported to Canada and I don’t need to pay duty on them any longer?

If it matters, in the first trip I’ve verbally declared that I’m carrying the headphones when re-entering Canada by car and thus didn’t have to fill out a customs declaration. I did not pay any duty as I was below the duty free limit at that time.

Why do 2019-era email clients [(+/-) a few years] often allow you to delete or enter new destination addresses, but not fully edit them?

Suppose that you are writing an email. You mistype someone’s address in the “To” field. For example, maybe you write, “john.reed@blah.com.” Before sending the email, you remember that that person spells their name in a funny way. You want to delete the letter “H” in “john.” The correct email address is “jon.reed@blah.com”

In a significant number of present-day email clients you cannot edit an email address already entered into the “To” field. Once you press enter or shift the keyboard focus to the body of the email, the “To”-address changes. The user interface changes what you have typed into something which can be deleted/removed, but not edited. This is also true of the carbon-copy fields. If you mistype someone’s email, you have to delete the address completely, and re-type it. For many email clients, left-clicking on the email address might delete it, but it does not enable text editing.

I am talking about the front-end of the interface, not what’s under the hood. What is weird is that in the years from 2000 to 2010, editing a destination email address was trivial. In most email clients, the “To” field was a text-box. You could click anywhere inside of the “To” field and type almost anything you liked. The backspace key worked fine; the delete key worked fine; anything.

Features do not become popular in multiple competing companies user-interfaces, unless those features are an improvement over the old way of doing things. There must be a rationale for disallowing users from editing email addresses previously typed into the “to” field. Technically, you can edit them by deleting and re-typing from scratch, but hopefully my meaning is apparent. What is the thinking behind this? Is it a matter of making “the common case” fast? Which user-cases are faster/easier using the (new or delete) style of design instead of the old (edit text) style of design?

PDF’s corrupting / not opening when I compile them via Overleaf / LaTeX using XeLaTeX?

PDF’s corrupting / not opening when I compile them via Overleaf / LaTeX using XeLaTeX? Basically when I compile a file on overleaf.com using XeLaTex then say download on chrome browser onto my android device which runs Android OS 8.1.0, specifically downloading into the default download folder on either the MicroSD card OR internal storage (both tested) the file opens fine when in this folder. When I move the file outside this folder anywhere on the system the file then no longer opens. I have tried compiling the file (pdf) on my PC and directly transferring it as well as putting onto a cloud drive and downloading, all with the same negative result, the file no longer opens but it maintains its file size. I just need to move the PDF into a specific folder on my MicroSD card for a specific unimportant reason (relating to my work) and also to save space on internal storage. I have tested all the above with various other pdf files and they all work fine when I move them into a different folder. The reader I am using is an app called ‘ReadEra’ I have found no issues with this reader so far, I was having similar issues with all ‘pdfs’ on adobe acrobat user, but I don’t seem to get any issues until now with ‘ReadEra’ specifically only pdf files compiled with XeLaTex engine, note again the file opens still if kept in the google download folder on the android device but not when moved or copier out of this folder onto my microsd card. I have also just given this a go with a different pdf file compiled with latex I think with pdfLaTeX engine, it seems to be a specific problem only with compiled files from LaTeX, a security issue perhaps? The error message it says when opening:

  • Title name of file
  • “Unable to open the document, decoding error”
  • /Directory name here which is usually my MicroSD card.

I have also tested the file name I was using and a few other LaTeX compilers for the pdf’s and the same issue, I have also tried to do a basic filename “test.pdf” with no effect as I thought underscores in the filenames might be causing an issue. Additionally I have checked security tabs in adobe reader in windows 10 on a working pdf on android compared to the non working file and I can’t see any difference in them.

I have a list of urls . I run OpenreadAsyn(url1) to OpenReadAsync(urlN) .. How do I wait for all of them to complete

I have a result list of length N. I have a URL list of N URLs. I need to perform below operation.

            List<Result> results=new List<Result>;             //Urls is a list of URLs.              public void FillResults()             {                  foreach( var urlx in Urls)                  {                         GetResponse(urlx, (response) =>                         {                             if (response != null && response.StatusCode==200)                             {                                 Result result=new Result;                                 result=response.SomeValue;                                 result.url=urlx;------>It is important that SomeValue corresponds to urlx and not other say,urly                                 results.Add(result);                               }                         });                 }             }               //wait till List results is completely filled               private void GetResponse(Uri uri, Action<MyResponse> callback)                     {                         using(var m_webClient = new WebClient())                         {                         m_webClient.OpenReadCompleted += (o, a) =>                         {                             if (callback != null)                             {                                 DataContractJsonSerializer ser = new DataContractJsonSerializer(MyResponse));                                 callback(ser.ReadObject(a.Result) MyResponse);                              }                         };                         m_webClient.OpenReadAsync(uri);                      }                 }                  public class MyResponse:Response                 {                 } 

// Wait for the results list to be filled completely

I want every request to happen asynchronously which is happening but want to wait untill results list is completely filled to move forward.

What considerations are there for using USB WiFI adapters and how to protect against them?

Often with older machines, the built-in WiFi adapters have failed. These in turn drive a demand to procure USB WiFi adapters since ethernet connectivity is not a choice.

Since the devices will be plugged into a USB port, what are the security considerations when using USB WiFi adapters?

For example, does it make them more susceptible to physical attacks wherein they may be stolen and used to connect to the WiFi network? If yes, how can these attacks be protected against? Note, the devices that the USB WiFi adapters will be plugged into are not stationary. The users often work remotely or off-site.

The devices will be used for both Microsoft Windows and Linux desktops.

Defining Value to Numbers and Text and then Adding them

I am comparing apartments and I have columns for features like bedroom, full bath, half bath, rent, pet friendly, balcony, laundry, utilities, parking, and bus access. Some of these have numbers like bathrooms and rent, while other like pet friendly and utilities have words like “yes” and “Included”. I found some help assigning value and so far I have:

=IF(AND(B2>=1, B2<= 1), 1,  IF(AND(B2>=2, B2<= 2), 2,  IF(AND(B2>=3, B2<= 3), 3,  IF(AND(B2>=4, B2<= 4), 4,  IF(AND(C2>=1, C2<= 1), 1,  IF(AND(C2>=2, C2<= 2), 2,  IF(AND(C2>=3, C2<= 3), 3,  IF(AND(C2>=4, C2<= 4), 4,  IF(AND(D2>=1, D2<= 1), 1,  IF(AND(D2>=2, D2<= 2), 2,  IF(AND(D2>=3, D2<= 3), 3,  IF(AND(D2>=4, D2<= 4), 4,  IF(AND(F2>=0, F2<= 1000), 3,  IF(AND(F2>=1001, F2<= 1500), 2,  IF(AND(F2>=1501, F2<= 2000), 3,  IF(AND(G2="Yes"),1,   IF(AND(G2="No"),0,(H2="Yes"),1,   IF(AND(H2="No"),0,  IF(AND(I2="Facility"),0,  IF(AND(I2="Private"),1,  IF(AND(J2="Included"),1,  IF(AND(J2="Not Included"),0,(K2="Yes"),1,   IF(AND(K2="No"),0,(L2="Yes"),1,   IF(AND(L2="No"),0,)))))))))))))))))))))))))) 

How do I add the rows up with these parameters to create a score for each apartment?

screenshot of my sheet

Set List Queue Deque Map these are Collection frameworks of Java but can anyone differentiate the unique features among each of them [on hold]

We are know Set List Deque Map Queue are all a part of java collection framework but can anyone please tell me how are the unique in terms of

  1. Memory management
  2. Fetching Data
  3. When is the particular data structure most appropriate
  4. Also drawbacks in why should we not use the particular data structure