Create an overview of users that can edit / view specific folders within Google Drive

We have a share Google Drive environment where different folders are shared with several people. Per folder I can see who currently has access to the folder.

For compliance purposes I want to create an overview per folder with how has access. A little like this:

GENERAL: Josh, Henk, Andrew GENERAL/CLASSIFIED: Josh, Henk CLASSIFIED: Josh

Does anybody now of a way I can do this without having to go the specific folder time after time?

How to read from a file into an array List of a specific object

I’m working on a programming project where you’re suppose to write a code for an online shopping store, i have two files one with products in it and the other with accounts information and i need to read these two and store them in ArrayList and another with type accounts,, shown below in the store class, and i’m also suppose to check whether the login info is matching or not

i’ve tried reading both files to list1 and list2 (which are array lists of String type) and it totally worked fine but when i got to the point where i’m suppose to check if username and password are valid i tried the following:

    int accountIndex=-1;      for (int i = 0; i < list2.size(); i++) {        if((list2.get(i).contains(username))&& (list2.get(i).contains(password))){                     accountIndex=0;                 }                  }                 if(accountIndex<0)                     System.out.println("Login Failed! Invalid Username and/or Password.\n"); 

but it didn’t work with all cases and had some bugs so my teacher told me to read files into the already existing array lists of products and accounts but i haven’t found a suitable way of doing it…

this is a sample of what the account file contain: 0001,Salam,1234,AbdulSalam Ahmad,1223 Sultanah – Medina,05555343535,salam@hotmail.com, 0002,Rawan,1111,Rawan Khaled,1223 Alaziziah – Medina,05555343435,rawan@hotmail.com,

//main:

     public static void main(String[] args) throws FileNotFoundException {       int ans;      // Craete a Store object      Store store = new Store("Camera Online Store");        // Read all products from the products file      ArrayList<String>list1=new ArrayList<String>();      File products = new File("Products.txt");       try(Scanner input = new Scanner(products);)       {        input.useDelimiter(",");        while(input.hasNext()){            list1.add(input.nextLine());        }       input.close();     }     // Read all accounts from the account file     File customerFile = new File("Accounts.txt");     ArrayList<String>list2=new ArrayList<String>();     try(Scanner input = new Scanner(customerFile);)       {       input.useDelimiter(",");        while(input.hasNext()){            list2.add(input.nextLine());       } input.close();               }      System.out.println("^^^^^^ Welcome to our "+store.getName()+" ^^^^^");     System.out.println("*****************************************");      while(true)     {     System.out.println("Are you a customer or an admin?\n  (1) for user \n  (2) for admin\n  (3) to exit");     Scanner sc = new Scanner (System.in);     int choice = sc.nextInt();         switch (choice) {             case 1: // customer mode                 System.out.println("Enter your login information.");                System.out.print("Username:");                String username = sc.next();                System.out.print("Password:");                String password = sc.next();                int accountIndex=-1;                 for (int i = 0; i < list2.size(); i++) {                  if((list2.get(i).contains(username))&& (list2.get(i).contains(password))){                     accountIndex=0;                 }                  }                 /*                     get the account index for this customer                 */                if(accountIndex<0)                     System.out.println("Login Failed! Invalid Username and/or Password.\n");                else{                     do                     {                         System.out.println("Choose the required operations from the list below:\n  (1) Display all products \n  (2) Add a product to your shopping cart by id \n  (3) View the products in your shopping cart \n  (4) Go to checkout\n  (5) Go back to main menu");    //Store class:     class Store{  private String name;  private ArrayList<Account> arracc;  private ArrayList<Products> arrprod;  public Store(){  } public void setArrAcc(Account x){     arracc.add(x); } public void setArrProd(Products x){    arrprod.add(x); } public Store(String name){     this.name=name; } public void addProduct(Products p){     arrprod.add(p); } public void deleteProduct(int id){     arrprod.remove(id);//id is the product index  } public void setName(String name){     this.name=name; } public String getName(){     return name; } 

}

//products class:  class Products{  private int productID;  private String name;  private String supplier;  private double price;   public Products(){   } public Products(int productID,String name,String supplier, double price){     this.productID=productID;     this.name=name;     this.supplier=supplier;     this.price=price; } public void setProductID(int ID){     productID=ID; } public void setName(String newName){     name=newName; } public void setSupplier(String newSupplier){     supplier=newSupplier; } public void setPrice(double newPrice){     price=newPrice; } public int getID(){     return productID; } public String getSupplier(){     return supplier; } public String getNAme(){     return name; } public double getPrice(){     return price; } public String toString(){     return" Product ID: "+productID+"\n -Product Name: "+name+"\n -Product Supplier: "+supplier+             "\n -Product Price: "+price+"\n ******************************************"; } 

}

any help would be much appreciated!!

Additional Shipping Fee on COD for Specific Country Magento 2

I’ve a store setup on Magento 2.2.3

I use two payment methods: COD, Credit Card Payment

There are 2 allowed countries (for example A and B)

For Country:A shipping is flat (i.e. 10 USD)

For Country:B shipping is calculated according to weight table

What I want: For Country:A when user selects COD as payment method, additional shipping charges (5 USD) should be charged (i.e. 10 USD + 5 USD = 15 USD)

How do I achieve this in Magento 2.2.3 so that I could set additional shipping charges from admin and User is shown additional charges at front?

Kindly tell me if there’s any free existing module/extension available for this.

How to iterate in table to find specific text using Protractor?

I have a dynamic table with 2 columns and n number of rows.In the first column there will be a title and in second column it will be the button to go into details of that title.

I want to iterate through each of the row to find specific text title and click on the second column’s button of that title.

I tried many ways searching google but couldn’t find anything.

The AngularJS code for that in HTML is as below.

<table>         <tbody>             <tr ng-repeat="registration in Registrations | orderBy:'title'" class="tableRow ng-scope">                 <td style="padding-left: 20px;" ng-if="reg.title != 'Jabc'" class="ng-binding ng-scope">test</td>             <td style="padding-left: 20px;">                 <button ng-click="enter(registration)" class="ng-binding">Enter community</button>             </td>               <tr ng-repeat="registration in Registrations | orderBy:'title'" class="tableRow ng-scope">                 <td style="padding-left: 20px;" ng-if="reg.title != 'Jabc'" class="ng-binding ng-scope">test1</td>             <td style="padding-left: 20px;">                 <button ng-click="enter(registration)" class="ng-binding">Enter community</button>             </td>                <tr ng-repeat="registration in Registrations | orderBy:'title'" class="tableRow ng-scope">                 <td style="padding-left: 20px;" ng-if="reg.title != 'Jabc'" class="ng-binding ng-scope">test2</td>             <td style="padding-left: 20px;">                 <button ng-click="enter(registration)" class="ng-binding">Enter community</button>             </td>     </tbody> </table>  

As shown in the above table there are three rows. I want to select the row by name to suppose “test1” and wants to click on the second column’s button of the same row.

Exclude specific file from Windows Defender command line [migrated]

I want to know how to exclude a specific file or file extension from Windows Defender from the command line. Does anyone have experience with this?

I want to know either how to exclude a file from Windows Defender or just allow the application through Windows Defender so it wouldn’t get scanned in the command line.

How to reinstall/fix specific perl module on ubuntu 16.04

During an update, apt and dkpg returned the following error:

dpkg: error processing package libperl5.22:amd64 (--configure):  package is in a very bad inconsistent state; you should  reinstall it before attempting configuration Errors were encountered while processing:  libperl5.22:amd64 

When I tried to use the prescribed fix, it returned:

user@Server:/# sudo dpkg --remove --force-remove-reinstreq libperl5.22:amd64 dpkg: dependency problems prevent removal of libperl5.22:amd64:  perl depends on libperl5.22 (= 5.22.1-9ubuntu0.5).  dpkg: error processing package libperl5.22:amd64 (--remove):  dependency problems - not removing Errors were encountered while processing:  libperl5.22:amd64 

I have never encountered this error before, not sure how to proceed.

Require basic auth for specific IPs in nginx

I have a whitelist of IPs for nginx, but in addition to this I want to require basic authentication for specific IP.

For example, allow access for these IPs:

111.111.111.111 111.111.111.222 

require basic authentication for this IP:

111.111.111.333 

and deny for anyone else.

How is this possible? satisfy directive doesn’t seem to solve this problem

Squid3 How store user credentials for specific website?

I have a Squid3 Proxy server on my LAN that bridges services to my clients.

Would it be possible for this proxy server to store the credentials that users use to access a specific website? Suppose a user tries to login to login.example.com, how could he store the credentials that my clients use to access that particular website?

Van der Waerden number – on a specific type of sequence

Here is the problem, as given

Let $ R_k$ be the set of increasing sequences $ \{x_1<x_2<\ldots<x_k\}$ of length $ k$ such that there are integers $ a_3, a_4,\ldots,a_k$ (depending on the sequence) such that $ $ x_3=a_3x_2+(1-a3)x_1, \ x_4=a_4x_3+(1-a_4)x_2,\ldots, \ x_k=a_kx_{k-1}+(1-a_k)x_{k-2}$ $ Prove that every $ 2$ colouring of $ [n]$ with $ n \geq 7(k + 1)!/24$ contains a monochromatic member of $ R_k$ .

Notations

We denote $ [n]=\{1,2,\ldots,n\}$

For simplicity, to compare with Van der Wearden numbers $ W(2,k)$ , I’ll call $ P(k)$ the minimum $ n$ such that every $ 2$ colouring of $ [n]$ contains a monochromatic sequence of $ R_k$ .

Comments

We can first notice that the case $ a_i=2$ for all $ i$ induces all artithmetic progressions. Therefore $ P(k)<W(2,k)$ .

We can also rewrite $ R_k$ (I found it easier to read as follow, it might not be the case for everyone). In such a sequence $ x_i$ ‘s, the difference between two consecutive term $ x_i-x_{i-1}$ is a divisor of the difference $ x_i-x_{i-2}$ . All numbers in the sequence can be written in the $ $ x_i=x_1+d\cdot r_i$ $ with some constraints on the $ r_i$ . More precisely $ R_k$ is a set of sequence of the form $ \{x_1,x_2,\ldots,x_k\}$ with :

  • $ x_1$ is the initialisation
  • $ x_2$ defines the difference $ d=x_2-x_1$
  • and then there exist a set of constants $ k_i\geq 1$ such that each $ x_i$ can be written as $ $ x_i = x_{i-1}+d\cdot \prod_{j_3}^{i}k_j$ $

Proof Now working on the actual problem, I think that induction might be a good way to start. Looking then at the base case, $ k=3$ . I need to show that for $ n\geq 7$ , for every colouring $ $ \chi:[n]\rightarrow 2$ $ There exist a monochromatric sequence from $ R_3=\{(x,x+d,x+rd)\mid x\in[n],\ d\geq1, \ r\geq2\}$ . This is easy enough by elimination (I don’t write the details here, but noting that having two consecutive numbers with the same colouring is “bad”, we know that 1,2,3,4 have alternating colors, then 5 must be colored as 2 and 4, 6 must be colored as 1,3, and whatever color for 7 will lead to a monochromatic sequence from $ R_3$ )

Induction This is where I fail. Suppose we have a colouring of $ n’=\frac{7(k+2)!}{24}$ . I think a good way to start is to split $ [n’]$ as follow $ $ \underbrace{[n], \ [n]+n, \ [n]+2n,\ldots, \ [n]+(k+1)n}_{(k+2)\text{ terms}}$ $ With $ =\frac{7(k+1)!}{24}$ . Therefore in each term, I know that there exist a monochromatic sequence from $ R_k$ . I should be able to construct the sequence from $ R_{k+1}$ from theses sequences but I’m not sure to see how.

State specific product offering – Best practice

To build an e-commerce site that offers a specific set of products for each state of a country, what would be the best practice to be followed to create the product catalog.

Approaches

  1. Define each state as root category and then create products under desired subcategories
  2. Define a single root category and then create products under desired subcategories. Define a custom multi-select “Available State” attribute and tag the product to respective state.
  3. Create a multi-store site where each state is represented as a store and then create desired products for each store.