问:
Why won't my nav lis display horizontally with floats?
I'm new to coding and trying to figure out why my nav li's will not display horizontally? I've tried a few things which I've noted in the code below.

The catch here is, I must use floats instead of flexbox.

header nav>* {
  float: left;
  width: 7%;
  margin: 0 5%;
  padding-bottom: 30px;
  list-style: none;
  text-decoration: none;
}

header nav ul li {
  width: 100px;
  float: right;
  display: block;
  text-decoration: none;
  /*margin-left: 2px;
  display: inline; not working*/
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><header>
  <nav>
    Courses
    <form action="">
      <input type="text" placeholder="Search">
    </form>
    <img class="icon" src="#">
    <h2>Tech Academy</h2>
    <ul id="SideBar">
      <li>Donate</li>
      <li>Login</li>
      <li>Sign up</li>
    </ul>
  </nav>
</header></code>```

I have tried changing the specificity to a class or id and that hasn't fixed anything. I should also note that 'text-decoration' is not working for the li but is working for the a 'courses'? * border: box-sizing is also at the top of the css sheet.

This is what it looks like on the browser

I am very new to coding and this one has had me stumped for hours. T

答:
header nav>* {
  float: left;
  /*width: 7%;*/
  margin: 0 5%;
  padding-bottom: 30px;
  list-style: none;
  text-decoration: none;
}

header nav ul li{
 width: 100px;
 float: right;
 /*display: block;*/
 text-decoration: none;
 margin-left: 2px;
 display: inline;
}```
<pre class="snippet-code-html lang-html prettyprint-override"><code><header>
<nav>

<h2>Tech Academy</h2>

<ul id="SideBar">
<li>Donate</li>
<li>Login</li>
<li>Sign up</li>
</ul>

</nav>
</header></code>```

The problem

is you have used width: 7%; to header nav>*

Weird one

its weird that you have used display: block; along with display: inline;

Solution

I have commented the The problem and Weird one,run the snippet it should work

Body:
I'm new to coding and trying to figure out why my nav li's will not display horizontally? I've tried a few things which I've noted in the code below.

The catch here is, I must use floats instead of flexbox.

header nav>* {
  float: left;
  width: 7%;
  margin: 0 5%;
  padding-bottom: 30px;
  list-style: none;
  text-decoration: none;
}

header nav ul li {
  width: 100px;
  float: right;
  display: block;
  text-decoration: none;
  /*margin-left: 2px;
  display: inline; not working*/
}

    Courses
    <form action="">
      <input type="text" placeholder="Search">
    </form>

Tech Academy

Donate

Login

Sign up

I have tried changing the specificity to a class or id and that hasn't fixed anything. I should also note that 'text-decoration' is not working for the li but is working for the a 'courses'? * border: box-sizing is also at the top of the css sheet.

This is what it looks like on the browser

I am very new to coding and this one has had me stumped for hours. T

Body:
header nav>* {
  float: left;
  /*width: 7%;*/
  margin: 0 5%;
  padding-bottom: 30px;
  list-style: none;
  text-decoration: none;
}

header nav ul li{
 width: 100px;
 float: right;
 /*display: block;*/
 text-decoration: none;
 margin-left: 2px;
 display: inline;
}

<header>
<nav>

<h2>Tech Academy</h2>

<ul id="SideBar">
<li><a href="#">Donate</a></li>
<li><a href="#">Login</a></li>
<li><a href="#">Sign up</a></li>
</ul>

</nav>
</header>

The problem

is you have used width: 7%; to header nav>*

Weird one

its weird that you have used display: block; along with display: inline;

Solution

I have commented the The problem and Weird one,run the snippet it should work


来源: stackexchange

问:
How to make spark commit in each batch when using batchsize and writing into RDBMS (ORACLE, MsSQL, etc,...)?
I am new to spark and am attempting to insert 50 million records into RDBMS. The RDBMS can be ORACLE or MsSQL or anything. Below is the sample code

```<code>df.write
  .format('jdbc')
  .mode('append')
  .option("truncate", false)
  .option("driver", ****)
  .option("url", ****)
  .option("user", ****)
  .option("password", ****)
  .option("dbtable", "TABLE_NAME")
  .option("batchsize", 100000)
  .save();
</code>```

My assumption is that when using the "batchsize" option, it will perform insert in batches of 100k records.

Problem is that it is not committing batch by batch. After a point the tablespace for the uncommitted records becomes full and I get the below error

ERROR Executor: Exception in task 0.0 in stage 6.0 (TID 6)
java.sql.BatchUpdateException: ORA-30036: unable to extend segment by
8 in undo tablespace '***'

My requirement is to perform insert & commit for every batch based on the "batchsize" value.

答:
"isolationLevel" option did the trick for me.

Reference link - here

isolationLevel    - The transaction isolation level, which applies to
current connection. It can be one of NONE, READ_COMMITTED,
READ_UNCOMMITTED, REPEATABLE_READ, or SERIALIZABLE, corresponding to
standard transaction isolation levels defined by JDBC's Connection
object, with default of READ_UNCOMMITTED. This option applies only to
writing. Please refer the documentation in java.sql.Connection.

Below is the sample code

```<code>df.write
  .format('jdbc')
  .mode('append')
  .option("truncate", false)
  .option("driver", ****)
  .option("url", ****)
  .option("user", ****)
  .option("password", ****)
  .option("dbtable", "TABLE_NAME")
  .option("isolationLevel", "NONE")
  .option("batchsize", 100000)
  .save();
</code>```

ContentLicense: CC BY-SA 4.0

Body:
I am new to spark and am attempting to insert 50 million records into RDBMS. The RDBMS can be ORACLE or MsSQL or anything. Below is the sample code

df.write
  .format('jdbc')
  .mode('append')
  .option("truncate", false)
  .option("driver", ****)
  .option("url", ****)
  .option("user", ****)
  .option("password", ****)
  .option("dbtable", "TABLE_NAME")
  .option("batchsize", 100000)
  .save();

My assumption is that when using the "batchsize" option, it will perform insert in batches of 100k records.

Problem is that it is not committing batch by batch. After a point the tablespace for the uncommitted records becomes full and I get the below error

ERROR Executor: Exception in task 0.0 in stage 6.0 (TID 6)
java.sql.BatchUpdateException: ORA-30036: unable to extend segment by
8 in undo tablespace '***'

My requirement is to perform insert & commit for every batch based on the "batchsize" value.

Body:
"isolationLevel" option did the trick for me.

Reference link - here

isolationLevel    - The transaction isolation level, which applies to
current connection. It can be one of NONE, READ_COMMITTED,
READ_UNCOMMITTED, REPEATABLE_READ, or SERIALIZABLE, corresponding to
standard transaction isolation levels defined by JDBC's Connection
object, with default of READ_UNCOMMITTED. This option applies only to
writing. Please refer the documentation in java.sql.Connection.

Below is the sample code

df.write
  .format('jdbc')
  .mode('append')
  .option("truncate", false)
  .option("driver", ****)
  .option("url", ****)
  .option("user", ****)
  .option("password", ****)
  .option("dbtable", "TABLE_NAME")
  .option("isolationLevel", "NONE")
  .option("batchsize", 100000)
  .save();


问:
Bash script add some lines to created config file in WP-CLI
Below bash script create for me in WP-CLI  config file and add database details:

```<code>#set database details in the config file
  su -s /bin/bash -c "/usr/local/bin/wp config create --dbname=$wpconfigdbuser --dbuser=$wpconfigdbuser --dbpass=$dbpass --dbhost=localhost" $username
</code>```

I need to add to .wp-config   this   2 lines code:

```<code>define('DISALLOW_FILE_EDIT', true);
define('DISALLOW_FILE_MODS', true);
</code>```

Can anyone help me?

答:
You can just append those values to the wp-config.php file after the wp-cli creates it. Does the following work for your purposes?

For example,

```<code>su -s /bin/bash -c "/usr/local/bin/wp config create --dbname=$wpconfigdbuser --dbuser=$wpconfigdbuser --dbpass=$dbpass --dbhost=localhost" $username
cat << EOF >> wp-config.php
define('DISALLOW_FILE_EDIT', true);
define('DISALLOW_FILE_MODS', true);
EOF
</code>```

Or all on one line,

```<code>su -s /bin/bash -c "/usr/local/bin/wp config create --dbname=$wpconfigdbuser --dbuser=$wpconfigdbuser --dbpass=$dbpass --dbhost=localhost" $username && printf "define('DISALLOW_FILE_EDIT', true);\ndefine('DISALLOW_FILE_MODS', true);\n" >> wp-config.php
</code>```

In practice,

```<code>$ su -s /bin/bash -c "/usr/local/bin/wp config create --dbname=$wpconfigdbuser --dbuser=$wpconfigdbuser --dbpass=$dbpass --dbhost=localhost" $username && printf "define('DISALLOW_FILE_EDIT', true);\ndefine('DISALLOW_FILE_MODS', true);\n" >> wp-config.php
Success: Generated 'wp-config.php' file.
$ cat wp-config.php
...
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
    define( 'ABSPATH', dirname( __FILE__ ) . '/' );
}

/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';
define('DISALLOW_FILE_EDIT', true);
define('DISALLOW_FILE_MODS', true);
</code>```

Body:
Below bash script create for me in WP-CLI  config file and add database details:

#set database details in the config file
  su -s /bin/bash -c "/usr/local/bin/wp config create --dbname=$wpconfigdbuser --dbuser=$wpconfigdbuser --dbpass=$dbpass --dbhost=localhost" $username

I need to add to .wp-config   this   2 lines code:

define('DISALLOW_FILE_EDIT', true);
define('DISALLOW_FILE_MODS', true);

Can anyone help me?

Body:
You can just append those values to the wp-config.php file after the wp-cli creates it. Does the following work for your purposes?

For example,

su -s /bin/bash -c "/usr/local/bin/wp config create --dbname=$wpconfigdbuser --dbuser=$wpconfigdbuser --dbpass=$dbpass --dbhost=localhost" $username
cat << EOF >> wp-config.php
define('DISALLOW_FILE_EDIT', true);
define('DISALLOW_FILE_MODS', true);
EOF

Or all on one line,

su -s /bin/bash -c "/usr/local/bin/wp config create --dbname=$wpconfigdbuser --dbuser=$wpconfigdbuser --dbpass=$dbpass --dbhost=localhost" $username && printf "define('DISALLOW_FILE_EDIT', true);\ndefine('DISALLOW_FILE_MODS', true);\n" >> wp-config.php

In practice,

$ su -s /bin/bash -c "/usr/local/bin/wp config create --dbname=$wpconfigdbuser --dbuser=$wpconfigdbuser --dbpass=$dbpass --dbhost=localhost" $username && printf "define('DISALLOW_FILE_EDIT', true);\ndefine('DISALLOW_FILE_MODS', true);\n" >> wp-config.php
Success: Generated 'wp-config.php' file.
$ cat wp-config.php
...
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
    define( 'ABSPATH', dirname( __FILE__ ) . '/' );
}

/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';
define('DISALLOW_FILE_EDIT', true);
define('DISALLOW_FILE_MODS', true);


问:
how to fix Undefined variable: Products in view blade eloquent laravel 5.3
I didn't know why undefined variable, I've made controller, model and view. I've included the compact in the controller for the variable.

this is my controller

```<code>public function product(){
    $products = Product::all();
    // print_r($products);
    return view('views.product', compact('products'));
}
</code>```

model

```<code>class Product extends Model{
    protected $fillable = ['product_name', 'price', 'kategori'];
}
</code>```

and view

```<code>@foreach ($Products as $post)
    <tr>
        <td>{{$post->product_name}}</td>
    </tr>
@endforeach
</code>```

route

```<code>Route::get('/product', 'AdminController@product')->name('Product');
</code>```

Please help me I don't know why this undefined variable, cause I've included compact in my controller

答:
//$products instead of $Products
@foreach ($products as $post)

   {{$post->product_name}}

@endforeach

if above code is not work then use below code

@if(!empty($products))
  @foreach ($products as $post)

     {{$post->product_name}}

  @endforeach
@endif```

ContentLicense: CC BY-SA 3.0

Body:
I didn't know why undefined variable, I've made controller, model and view. I've included the compact in the controller for the variable.

this is my controller

public function product(){
    $products = Product::all();
    // print_r($products);
    return view('views.product', compact('products'));
}

model

class Product extends Model{
    protected $fillable = ['product_name', 'price', 'kategori'];
}

and view

@foreach ($Products as $post)

        {{$post->product_name}}

@endforeach

route

Route::get('/product', 'AdminController@product')->name('Product');

Please help me I don't know why this undefined variable, cause I've included compact in my controller

Body:
//$products instead of $Products
@foreach ($products as $post)
<tr>
   <td>{{$post->product_name}}</td>
</tr>
@endforeach

if above code is not work then use below code

@if(!empty($products))
  @foreach ($products as $post)
  <tr>
     <td>{{$post->product_name}}</td>
  </tr>
  @endforeach
@endif


问:
Scala _* to select a list of dataframe columns
I have a dataframe and a list of columns like this:

```<code>import spark.implicits._
import org.apache.spark.sql.functions._

val df = spark.createDataFrame(Seq(("Java", "20000"), ("Python", "100000"))).toDF("language","users_count")
val data_columns = List("language","users_count").map(x=>col(s"$x"))
</code>```

Why does this work:

```<code> df.select(data_columns:_ *).show()
</code>```

But not this?

```<code> df.select($"language", data_columns:_*).show()
</code>```

Gives the error:

```<code> error: no `: _*' annotation allowed here
    (such annotations are only allowed in arguments to *-parameters)
</code>```

And how do I get it to work so I can use _* to select all columns in a list, but I also want to specify some other columns in the select?

Thanks!

Update:

based on @chinayangyangyong answer below, this is how I solved it:

```<code>df.select( $"language" +: data_columns :_*)
</code>```

Body:
I have a dataframe and a list of columns like this:

import spark.implicits._
import org.apache.spark.sql.functions._

val df = spark.createDataFrame(Seq(("Java", "20000"), ("Python", "100000"))).toDF("language","users_count")
val data_columns = List("language","users_count").map(x=>col(s"$x"))

Why does this work:

 df.select(data_columns:_ *).show()

But not this?

 df.select($"language", data_columns:_*).show()

Gives the error:

 error: no `: _*' annotation allowed here
    (such annotations are only allowed in arguments to *-parameters)

And how do I get it to work so I can use _* to select all columns in a list, but I also want to specify some other columns in the select?

Thanks!

Update:

based on @chinayangyangyong answer below, this is how I solved it:

df.select( $"language" +: data_columns :_*)

Body: df.select(data_columns.head, data_columns.tail:_*),show()


问:
i want to change my API response to become array of array object in laravel
i have a problem for the response, i want to change the response API because i need for my mobile APP, the feature have filter object based on date. So i hope you all can help me to solve the problem

i wanna change the response for my API

before:

```<code>{
    "tasks": [
        {
            "id": 7,
            "user_id": 1,
            "title": "gh",
            "date": "2022-02-10 13:05:00",
            "deskripsi": "gfh",
            "created_at": "2022-02-09T06:05:56.000000Z",
            "updated_at": "2022-02-09T06:05:56.000000Z"
        },
        {
            "id": 5,
            "user_id": 1,
            "title": "ghf",
            "date": "2022-02-17 16:05:00",
            "deskripsi": "fghf",
            "created_at": "2022-02-09T06:05:12.000000Z",
            "updated_at": "2022-02-09T06:05:12.000000Z"
        },
        {
            "id": 6,
            "user_id": 1,
            "title": "fgh",
            "date": "2022-02-17 18:05:00",
            "deskripsi": "gh",
            "created_at": "2022-02-09T06:05:40.000000Z",
            "updated_at": "2022-02-09T06:05:40.000000Z"
        }
    ]
}
</code>```

here is the code for the response API above

```<code>return response([
            'tasks' => Task::where('user_id', auth()->user()->id)->where('date','>',NOW())->orderBy('date','asc')->get(),
        ],200);
</code>```

and i want to change it my response API into this response

```<code>{
    "tasks": [
        {
            "date": "2022-02-10",
            "task": [
               {
                  "id": 7,
                  "user_id": 1,
                  "title": "gh",
                  "date": "2022-02-10 13:05:00",
                  "deskripsi": "gfh",
                  "created_at": "2022-02-09T06:05:56.000000Z",
                  "updated_at": "2022-02-09T06:05:56.000000Z"
               },
               {
                  "id": 7,
                  "user_id": 1,
                  "title": "gh",
                  "date": "2022-02-10 15:05:00",
                  "deskripsi": "gfh",
                  "created_at": "2022-02-09T06:05:56.000000Z",
                  "updated_at": "2022-02-09T06:05:56.000000Z"
               }
            ]
        },
        {
            "date": "2022-02-12",
            "task": [
               {
                  "id": 7,
                  "user_id": 1,
                  "title": "gh",
                  "date": "2022-02-12 13:05:00",
                  "deskripsi": "gfh",
                  "created_at": "2022-02-09T06:05:56.000000Z",
                  "updated_at": "2022-02-09T06:05:56.000000Z"
               }
            ]
        },
    ]
}
</code>```

答:
```<code>$task = Task::where('user_id', auth()->user()->id)->where('date','>',NOW())->orderBy('date','asc')->get();

foreach($task as $item){
   $date[] = item->date;
   $result = Task::where('user_id', auth()->user()->id)->where('date','=', $date)->get();
}

return response([
   'tasks' =>
      ['date' => $date,
      'task' => $task]
],200);
</code>```

maybe something like this

Body:
i have a problem for the response, i want to change the response API because i need for my mobile APP, the feature have filter object based on date. So i hope you all can help me to solve the problem

i wanna change the response for my API

before:

{
    "tasks": [
        {
            "id": 7,
            "user_id": 1,
            "title": "gh",
            "date": "2022-02-10 13:05:00",
            "deskripsi": "gfh",
            "created_at": "2022-02-09T06:05:56.000000Z",
            "updated_at": "2022-02-09T06:05:56.000000Z"
        },
        {
            "id": 5,
            "user_id": 1,
            "title": "ghf",
            "date": "2022-02-17 16:05:00",
            "deskripsi": "fghf",
            "created_at": "2022-02-09T06:05:12.000000Z",
            "updated_at": "2022-02-09T06:05:12.000000Z"
        },
        {
            "id": 6,
            "user_id": 1,
            "title": "fgh",
            "date": "2022-02-17 18:05:00",
            "deskripsi": "gh",
            "created_at": "2022-02-09T06:05:40.000000Z",
            "updated_at": "2022-02-09T06:05:40.000000Z"
        }
    ]
}

here is the code for the response API above

return response([
            'tasks' => Task::where('user_id', auth()->user()->id)->where('date','>',NOW())->orderBy('date','asc')->get(),
        ],200);

and i want to change it my response API into this response

{
    "tasks": [
        {
            "date": "2022-02-10",
            "task": [
               {
                  "id": 7,
                  "user_id": 1,
                  "title": "gh",
                  "date": "2022-02-10 13:05:00",
                  "deskripsi": "gfh",
                  "created_at": "2022-02-09T06:05:56.000000Z",
                  "updated_at": "2022-02-09T06:05:56.000000Z"
               },
               {
                  "id": 7,
                  "user_id": 1,
                  "title": "gh",
                  "date": "2022-02-10 15:05:00",
                  "deskripsi": "gfh",
                  "created_at": "2022-02-09T06:05:56.000000Z",
                  "updated_at": "2022-02-09T06:05:56.000000Z"
               }
            ]
        },
        {
            "date": "2022-02-12",
            "task": [
               {
                  "id": 7,
                  "user_id": 1,
                  "title": "gh",
                  "date": "2022-02-12 13:05:00",
                  "deskripsi": "gfh",
                  "created_at": "2022-02-09T06:05:56.000000Z",
                  "updated_at": "2022-02-09T06:05:56.000000Z"
               }
            ]
        },
    ]
}

Body:
$task = Task::where('user_id', auth()->user()->id)->where('date','>',NOW())->orderBy('date','asc')->get();

foreach($task as $item){
   $date[] = item->date;
   $result = Task::where('user_id', auth()->user()->id)->where('date','=', $date)->get();
}

return response([
   'tasks' =>
      ['date' => $date,
      'task' => $task]
],200);

maybe something like this


问:
Oracle PLSQL wrong number or types of arguments in call to 'BIND_ARRAY' in DBMS_SQL
I've written the below PLSQL block.
However when i execute it , i am getting following error.
Kindly tell me how to pass nested tables in the DBMS_SQL to

execute and generate the report.
Can we use DBMS_SQL to pass array value to bind
parameters ?
Or else do we have to use Execute Immediate only.
We are using DBMS_SQL for generating all the reports.

```<code>Error report -
ORA-06550: line 34, column 2:
PLS-00306: wrong number or types of arguments in call to 'BIND_ARRAY'
ORA-06550: line 34, column 2:
PL/SQL: Statement ignored
ORA-06550: line 35, column 2:
PLS-00306: wrong number or types of arguments in call to 'BIND_ARRAY'
ORA-06550: line 35, column 2:

declare

 l_cursor number := dbms_sql.open_cursor;
 l_ignore number;
 q varchar2(32000);
 o_desc_tab  DBMS_SQL.desc_tab;
 l_col_cnt number(10);
 l_val            VARCHAR2 (32767);
 l_rec_no NUMBER;
 l_col_sep VARCHAR2(25) := ',';
 l_text               VARCHAR2 (32767);
 l_value              VARCHAR2 (4000);
 TYPE T_dc_code IS TABLE OF VARCHAR2(25);
 A_dc_code T_dc_code;
  TYPE T_bin_type IS TABLE OF VARCHAR2(25);
 A_bin_type T_bin_type;
begin
q :='select col1, col2, col3, col4
     from tabl1 wbm
          inner join table2 wam
          on wbm.dc_code=wam.dc_code
          and wbm.dc_area=wam.dc_area
    where wbm.dc_code  MEMBER OF :P_DC_CODE
     and wbm.BIN_TYPE MEMBER OF :P_BIN_TYPE
    )';

   dbms_sql.parse( l_cursor,q,dbms_sql.native );
  A_dc_code.EXTEND(2);
  A_dc_code(1) := '888';
  A_dc_code(2) := '902';
    A_bin_type.EXTEND(2);
 A_bin_type(1) := 'R';
 A_bin_type(2) := 'P';
 dbms_sql.bind_array( l_cursor, ':P_DC_CODE', A_bin_type );
 dbms_sql.bind_array( l_cursor, ':P_BIN_TYPE', A_dc_code );

 DBMS_SQL.describe_columns (l_cursor, l_col_cnt, o_desc_tab);

 FOR l_cl_cnt IN 1 .. o_desc_tab.COUNT
 LOOP
 DBMS_SQL.define_column (l_cursor, l_cl_cnt, l_val, 32767);
 END LOOP;

 l_ignore := dbms_sql.execute( l_cursor );

 WHILE (DBMS_SQL.fetch_rows (l_cursor) > 0)
            LOOP
             DBMS_OUTPUT.PUT_LINE('COMING IN LOOP');
                FOR l_rec_no IN 1 .. o_desc_tab.COUNT
                   LOOP
                      DBMS_SQL.COLUMN_VALUE (l_cursor, l_rec_no, l_value);
                      l_text := l_text || l_col_sep || l_value;
                END LOOP;
            END LOOP;
  dbms_sql.close_cursor( l_cursor );
 DBMS_OUTPUT.PUT_LINE('THE VALUE IS ---- '||l_text);
end;
/
</code>```

Thanks

答:
You have to use one of the pre-defined types, e.g. DBMS_SQL.varchar2_table, see Types for Scalar and LOB Collections.

Using your own TYPE T_bin_type IS TABLE OF VARCHAR2(25) is not possible

```<code>   A_bin_type DBMS_SQL.varchar2_table;

BEGIN

   A_bin_type(1) := 'R';
   A_bin_type(2) := 'P';
</code>```

Body:
I've written the below PLSQL block.
However when i execute it , i am getting following error.
Kindly tell me how to pass nested tables in the DBMS_SQL to

execute and generate the report.
Can we use DBMS_SQL to pass array value to bind
parameters ?
Or else do we have to use Execute Immediate only.
We are using DBMS_SQL for generating all the reports.

Error report -
ORA-06550: line 34, column 2:
PLS-00306: wrong number or types of arguments in call to 'BIND_ARRAY'
ORA-06550: line 34, column 2:
PL/SQL: Statement ignored
ORA-06550: line 35, column 2:
PLS-00306: wrong number or types of arguments in call to 'BIND_ARRAY'
ORA-06550: line 35, column 2:

declare

 l_cursor number := dbms_sql.open_cursor;
 l_ignore number;
 q varchar2(32000);
 o_desc_tab  DBMS_SQL.desc_tab;
 l_col_cnt number(10);
 l_val            VARCHAR2 (32767);
 l_rec_no NUMBER;
 l_col_sep VARCHAR2(25) := ',';
 l_text               VARCHAR2 (32767);
 l_value              VARCHAR2 (4000);
 TYPE T_dc_code IS TABLE OF VARCHAR2(25);
 A_dc_code T_dc_code;
  TYPE T_bin_type IS TABLE OF VARCHAR2(25);
 A_bin_type T_bin_type;
begin
q :='select col1, col2, col3, col4
     from tabl1 wbm
          inner join table2 wam
          on wbm.dc_code=wam.dc_code
          and wbm.dc_area=wam.dc_area
    where wbm.dc_code  MEMBER OF :P_DC_CODE
     and wbm.BIN_TYPE MEMBER OF :P_BIN_TYPE
    )';

   dbms_sql.parse( l_cursor,q,dbms_sql.native );
  A_dc_code.EXTEND(2);
  A_dc_code(1) := '888';
  A_dc_code(2) := '902';
    A_bin_type.EXTEND(2);
 A_bin_type(1) := 'R';
 A_bin_type(2) := 'P';
 dbms_sql.bind_array( l_cursor, ':P_DC_CODE', A_bin_type );
 dbms_sql.bind_array( l_cursor, ':P_BIN_TYPE', A_dc_code );

 DBMS_SQL.describe_columns (l_cursor, l_col_cnt, o_desc_tab);

 FOR l_cl_cnt IN 1 .. o_desc_tab.COUNT
 LOOP
 DBMS_SQL.define_column (l_cursor, l_cl_cnt, l_val, 32767);
 END LOOP;

 l_ignore := dbms_sql.execute( l_cursor );

 WHILE (DBMS_SQL.fetch_rows (l_cursor) > 0)
            LOOP
             DBMS_OUTPUT.PUT_LINE('COMING IN LOOP');
                FOR l_rec_no IN 1 .. o_desc_tab.COUNT
                   LOOP
                      DBMS_SQL.COLUMN_VALUE (l_cursor, l_rec_no, l_value);
                      l_text := l_text || l_col_sep || l_value;
                END LOOP;
            END LOOP;
  dbms_sql.close_cursor( l_cursor );
 DBMS_OUTPUT.PUT_LINE('THE VALUE IS ---- '||l_text);
end;
/

Thanks

Body:
You have to use one of the pre-defined types, e.g. DBMS_SQL.varchar2_table, see Types for Scalar and LOB Collections.

Using your own TYPE T_bin_type IS TABLE OF VARCHAR2(25) is not possible

   A_bin_type DBMS_SQL.varchar2_table;

BEGIN

   A_bin_type(1) := 'R';
   A_bin_type(2) := 'P';


问:
How do I use select() and gRPC to create a server?
I need to use gRPC but in a single-threaded application (with additional socket channels). Naively, I'm thinking of using select() and depending on which file descriptor pops, calling gRPC to handle the message. My question is, can someone give me a rough (5-10 lines of code) outline skeleton on what I need to call after the select() pops?

Looking at Google's "hello world" example in the synchronous case implies a thread pool (which I can't use), and in the asynchronous case shows the main loop blocking -- which doesn't work for me because I need to handle other socket operations.

答:
This can be done using a gRPC async service along with grpc::Alarm to send any events that come from select or other polling APIs onto the gRPC completion queue. You can see an example using Epoll and gRPC together in this gist. The important functions are these two:

bool grpc_tick(grpc::ServerCompletionQueue& queue) {
  void* tag = nullptr;
  bool ok = false;
  auto next_status = queue.AsyncNext(&tag, &ok, std::chrono::system_clock::now());
  if (next_status == grpc::CompletionQueue::GOT_EVENT) {
    if (ok && tag) {
      static_cast<RequestProcessor*>(tag)->grpc_queue_tick();
    } else {
      std::cerr << "Not OK or bad tag: " << ok << "; " << tag << std::endl;
      return false;
    }
  }
  return next_status != grpc::CompletionQueue::SHUTDOWN;
}

bool tick_loops(int epoll, grpc::ServerCompletionQueue& queue) {
  // Pump epoll events over to gRPC's completion queue.
  epoll_event event{0};
  while (epoll_wait(epoll, &event, /*maxevents=*/1, /*timeout=*/0)) {
    grpc::Alarm alarm;
    alarm.Set(&queue, std::chrono::system_clock::now(), event.data.ptr);
    if (!grpc_tick(queue)) return false;
  }

  // Make sure gRPC gets at least 1 tick.
  return grpc_tick(queue);
}
```

Here you can see the tick_loops function repeatedly calls epoll_wait until no more events are returned. For each epoll event, a grpc::Alarm is constructed with the deadline set to right now. After that, the gRPC event loop is immediately pumped with grpc_tick.

Note that the grpc::Alarm instance MUST outlive its time on the completion queue. In a real-world application, the alarm should be somehow attached to the tag (event.data.ptr in this example) so it can be cleaned up in the completion callback.

The gRPC event loop is then pumped again to ensure that any non-epoll events are also processed.

Completion queues are thread safe, so you could also put the epoll pump on one thread and the gRPC pump on another. With this setup you would not need to set the polling timeouts for each to 0 as they are in this example. This would reduce CPU usage by limiting dry cycles of the event loop pumps.

Body:
This can be done using a gRPC async service along with grpc::Alarm to send any events that come from select or other polling APIs onto the gRPC completion queue. You can see an example using Epoll and gRPC together in this gist. The important functions are these two:

bool grpc_tick(grpc::ServerCompletionQueue& queue) {
  void* tag = nullptr;
  bool ok = false;
  auto next_status = queue.AsyncNext(&tag, &ok, std::chrono::system_clock::now());
  if (next_status == grpc::CompletionQueue::GOT_EVENT) {
    if (ok && tag) {
      static_cast<RequestProcessor*>(tag)->grpc_queue_tick();
    } else {
      std::cerr << "Not OK or bad tag: " << ok << "; " << tag << std::endl;
      return false;
    }
  }
  return next_status != grpc::CompletionQueue::SHUTDOWN;
}

bool tick_loops(int epoll, grpc::ServerCompletionQueue& queue) {
  // Pump epoll events over to gRPC's completion queue.
  epoll_event event{0};
  while (epoll_wait(epoll, &event, /*maxevents=*/1, /*timeout=*/0)) {
    grpc::Alarm alarm;
    alarm.Set(&queue, std::chrono::system_clock::now(), event.data.ptr);
    if (!grpc_tick(queue)) return false;
  }

  // Make sure gRPC gets at least 1 tick.
  return grpc_tick(queue);
}

Here you can see the tick_loops function repeatedly calls epoll_wait until no more events are returned. For each epoll event, a grpc::Alarm is constructed with the deadline set to right now. After that, the gRPC event loop is immediately pumped with grpc_tick.

Note that the grpc::Alarm instance MUST outlive its time on the completion queue. In a real-world application, the alarm should be somehow attached to the tag (event.data.ptr in this example) so it can be cleaned up in the completion callback.

The gRPC event loop is then pumped again to ensure that any non-epoll events are also processed.

Completion queues are thread safe, so you could also put the epoll pump on one thread and the gRPC pump on another. With this setup you would not need to set the polling timeouts for each to 0 as they are in this example. This would reduce CPU usage by limiting dry cycles of the event loop pumps.


问:
Pyspark UDF getting error - ModuleNotFoundError: No module named 'sklearn'
I am running a code using a pyspark UDF to score a dataframe using a pickled sklearn model. This seemed to work with no issues in Python 2.7 until I changed the engine to Python 3.6. Also this seems to be happening only when the UDF script is run (distributed mode), but sklearn is working fine when ran outside the UDF.

I am getting the ModuleNotFoundError: No module named 'sklearn' whenever I try to .show() the dataframe, or in another instance when I try to write the dataframe into the database. See script below:

```<code>import pickle
from pyspark.sql.functions import udf
from pyspark.sql.types import DoubleType
from pyspark.sql import SparkSession
from pyspark.sql.functions import *

spark = SparkSession.builder.getOrCreate()
sc = spark.sparkContext

df = spark.sql("""SELECT * from database.table_for_scoring""")

## Load pickle file (scikit-learn trained model)
model_rdd_pkl = sc.binaryFiles("final_model.pkl")
model_rdd_data = model_rdd_pkl.collect()

ms_model = pickle.loads(model_rdd_data[0][1])
broadcast_ms_model = sc.broadcast(ms_model)

def predict(*cols):
  prediction = broadcast_ms_model.value.predict_proba((cols,))
  return float(prediction[0,1])

predict_udf = udf(predict, DoubleType())

feature_list = ['feature_a', 'feature_b', 'feature_c']
df_scored = df.withColumn("ms_score", predict_udf(*feature_list))

df_scored.show()
</code>```

Below is the detailed error:

Py4JJavaError: An error occurred while calling o148.showString. :
org.apache.spark.SparkException: Job aborted due to stage failure:
Task 0 in stage 1.0 failed 4 times, most recent failure: Lost task 0.3
in stage 1.0 (TID 4, dlxwnr15n4120.globetel.com, executor 1):
org.apache.spark.api.python.PythonException: Traceback (most recent
call last):   File
"/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/pyspark.zip/pyspark/worker.py", line 177, in main
process()   File "/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/pyspark.zip/pyspark/worker.py", line 172, in process
serializer.dump_stream(func(split_index, iterator), outfile)   File
"/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/pyspark.zip/pyspark/serializers.py", line 220, in dump_stream
self.serializer.dump_stream(self._batched(iterator), stream)   File
"/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/pyspark.zip/pyspark/serializers.py", line 138, in dump_stream
for obj in iterator:   File "/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/pyspark.zip/pyspark/serializers.py", line 209, in _batched
for item in iterator:   File "", line 1, in    File
"/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/pyspark.zip/pyspark/worker.py", line 71, in
return lambda *a: f(*a)   Engine, line 2, in predict   File "/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/pyspark.zip/pyspark/broadcast.py", line 108, in value
self._value = self.load(self._path)   File "/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/pyspark.zip/pyspark/broadcast.py", line 99, in load
return pickle.load(f) ModuleNotFoundError: No module named 'sklearn'

Things I tried:

Changed both PYSPARK_PYTHON and PYSPARK_DRIVER_PYTHON to "/usr/local/bin/python3"

Retrained and pickled the sklearn model in Python 3, in the same sklearn version the engine is using, but still doesn't work

Could it be that the executors are not seeing the sklearn package? What else can I do?

答:
You need to install the library in the environment that you are currently using. It looks like you installed the needed libraries in the Python 2.7 environment but not in 3.6.
Try installing it with pip3 as follows:

```<code>pip3 install -U scikit-learn scipy matplotlib
</code>```

Body:
I am running a code using a pyspark UDF to score a dataframe using a pickled sklearn model. This seemed to work with no issues in Python 2.7 until I changed the engine to Python 3.6. Also this seems to be happening only when the UDF script is run (distributed mode), but sklearn is working fine when ran outside the UDF.

I am getting the ModuleNotFoundError: No module named 'sklearn' whenever I try to .show() the dataframe, or in another instance when I try to write the dataframe into the database. See script below:

import pickle
from pyspark.sql.functions import udf
from pyspark.sql.types import DoubleType
from pyspark.sql import SparkSession
from pyspark.sql.functions import *

spark = SparkSession.builder.getOrCreate()
sc = spark.sparkContext

df = spark.sql("""SELECT * from database.table_for_scoring""")

## Load pickle file (scikit-learn trained model)
model_rdd_pkl = sc.binaryFiles("final_model.pkl")
model_rdd_data = model_rdd_pkl.collect()

ms_model = pickle.loads(model_rdd_data[0][1])
broadcast_ms_model = sc.broadcast(ms_model)

def predict(*cols):
  prediction = broadcast_ms_model.value.predict_proba((cols,))
  return float(prediction[0,1])

predict_udf = udf(predict, DoubleType())

feature_list = ['feature_a', 'feature_b', 'feature_c']
df_scored = df.withColumn("ms_score", predict_udf(*feature_list))

df_scored.show()

Below is the detailed error:

Py4JJavaError: An error occurred while calling o148.showString. :
org.apache.spark.SparkException: Job aborted due to stage failure:
Task 0 in stage 1.0 failed 4 times, most recent failure: Lost task 0.3
in stage 1.0 (TID 4, dlxwnr15n4120.globetel.com, executor 1):
org.apache.spark.api.python.PythonException: Traceback (most recent
call last):   File
"/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/pyspark.zip/pyspark/worker.py", line 177, in main
process()   File "/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/pyspark.zip/pyspark/worker.py", line 172, in process
serializer.dump_stream(func(split_index, iterator), outfile)   File
"/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/pyspark.zip/pyspark/serializers.py", line 220, in dump_stream
self.serializer.dump_stream(self._batched(iterator), stream)   File
"/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/pyspark.zip/pyspark/serializers.py", line 138, in dump_stream
for obj in iterator:   File "/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/pyspark.zip/pyspark/serializers.py", line 209, in _batched
for item in iterator:   File "", line 1, in    File
"/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/pyspark.zip/pyspark/worker.py", line 71, in
return lambda *a: f(*a)   Engine, line 2, in predict   File "/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/pyspark.zip/pyspark/broadcast.py", line 108, in value
self._value = self.load(self._path)   File "/opt/cloudera/parcels/SPARK2-2.2.0.cloudera1-1.cdh5.12.0.p0.142354/lib/spark2/python/lib/pyspark.zip/pyspark/broadcast.py", line 99, in load
return pickle.load(f) ModuleNotFoundError: No module named 'sklearn'

Things I tried:

Changed both PYSPARK_PYTHON and PYSPARK_DRIVER_PYTHON to "/usr/local/bin/python3"

Retrained and pickled the sklearn model in Python 3, in the same sklearn version the engine is using, but still doesn't work

Could it be that the executors are not seeing the sklearn package? What else can I do?

Body:
You need to install the library in the environment that you are currently using. It looks like you installed the needed libraries in the Python 2.7 environment but not in 3.6.
Try installing it with pip3 as follows:

pip3 install -U scikit-learn scipy matplotlib


问:
In CakePhp 4, how to specify unique constraint validator for multiple fields?
In my database i have this table:

```<code>table `candidates` (
      id,
      email,
      department
)
</code>```

And both email and department need to be unique (you can apply for a post in two different departments with the same email but not twice in the same department with same email). This is built in my SQL DB.

And I am stuck as how to check this in CakePHP validators, because I can check for the uniqueness of two separate fields but not for the combination of two fields. It seemed to be possible in CakePHP2 like shown here  https://book.cakephp.org/2/en/models/data-validation.html#Model::Validation::isUnique with this array method

```<code>public $validate = array(
    'email' => array(
        'rule' => array('isUnique', array('email', 'username'), false),
        'message' => 'This username & email combination has already been used.'
    )
);
</code>```

But now validators work differently and I can't seem to find a way to solve this issue.

EDIT :

Here is what I have that doesn't work.

```<code>    public function validationDefault(Validator $validator): Validator
    {
        ...

        $validator
            ->email('email')
            ->requirePresence('email', 'create')
            ->notEmptyString('email')
            ->add('email', 'unique', ['rule' => 'validateUnique', 'provider' => 'table']);

        return $validator;
    }

    public function buildRules(RulesChecker $rules): RulesChecker
    {
        $rules->add($rules->isUnique(['email', 'vac_no']), 'This email has already been used for this vacancy');
        return $rules;
    }
</code>```

Thanks

Sims Olden

答:
From cakephp 4.2 this is where you are looking for:
Code example in a UsersTable class:

```<code>use Cake\ORM\RulesChecker;
use Cake\ORM\Rule\IsUnique;

public function buildRules(RulesChecker $rules): RulesChecker {
    $rules->add($rules->isUnique(['email', 'department'], __('The email and department should be unique')));
return $rules;
}
</code>```

https://book.cakephp.org/4/en/orm/validation.html

Body:
In my database i have this table:

table `candidates` (
      id,
      email,
      department
)

And both email and department need to be unique (you can apply for a post in two different departments with the same email but not twice in the same department with same email). This is built in my SQL DB.

And I am stuck as how to check this in CakePHP validators, because I can check for the uniqueness of two separate fields but not for the combination of two fields. It seemed to be possible in CakePHP2 like shown here  https://book.cakephp.org/2/en/models/data-validation.html#Model::Validation::isUnique with this array method

public $validate = array(
    'email' => array(
        'rule' => array('isUnique', array('email', 'username'), false),
        'message' => 'This username & email combination has already been used.'
    )
);

But now validators work differently and I can't seem to find a way to solve this issue.

EDIT :

Here is what I have that doesn't work.

    public function validationDefault(Validator $validator): Validator
    {
        ...

        $validator
            ->email('email')
            ->requirePresence('email', 'create')
            ->notEmptyString('email')
            ->add('email', 'unique', ['rule' => 'validateUnique', 'provider' => 'table']);

        return $validator;
    }

    public function buildRules(RulesChecker $rules): RulesChecker
    {
        $rules->add($rules->isUnique(['email', 'vac_no']), 'This email has already been used for this vacancy');
        return $rules;
    }

Thanks

Sims Olden

Body:
From cakephp 4.2 this is where you are looking for:
Code example in a UsersTable class:

use Cake\ORM\RulesChecker;
use Cake\ORM\Rule\IsUnique;

public function buildRules(RulesChecker $rules): RulesChecker {
    $rules->add($rules->isUnique(['email', 'department'], __('The email and department should be unique')));
return $rules;
}

https://book.cakephp.org/4/en/orm/validation.html


问:
ngx-chess-board.component.d.ts:75:21 - error TS2694: Namespace '"/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'
I have an app using ngx-chess-board library and it was working fine locally and on the server but recently I get dependency errors when I try to run npm start locally. I tried different versions of ngx-chess-board but no luck. Deleting node modules did not help. I get the errors below when I run npm start:

```<code>   Error: node_modules/ngx-chess-board/lib/ngx-chess-board.component.d.ts:75:21 - error TS2694: Namespace '"/Library/Mobile Documents/app/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

75     static ɵfac: i0.ɵɵFactoryDeclaration<NgxChessBoardComponent, never>;
                       ~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-chess-board/lib/ngx-chess-board.component.d.ts:76:21 - error TS2694: Namespace '"/Library/Mobile Documents/app/node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDeclaration'.

76     static ɵcmp: i0.ɵɵComponentDeclaration<NgxChessBoardComponent, "ngx-chess-board", never, { "darkTileColor": "darkTileColor"; "lightTileColor": "lightTileColor"; "showCoords": "showCoords"; "sourcePointColor": "sourcePointColor"; "destinationPointColor": "destinationPointColor"; "legalMovesPointColor": "legalMovesPointColor"; "showLastMove": "showLastMove"; "showLegalMoves": "showLegalMoves"; "showActivePiece": "showActivePiece"; "showPossibleCaptures": "showPossibleCaptures"; "size": "size"; "freeMode": "freeMode"; "dragDisabled": "dragDisabled"; "drawDisabled": "drawDisabled"; "pieceIcons": "pieceIcons"; "lightDisabled": "lightDisabled"; "darkDisabled": "darkDisabled"; }, { "moveChange": "moveChange"; "checkmate": "checkmate"; "stalemate": "stalemate"; }, never, never>;
                       ~~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-chess-board/lib/ngx-chess-board.module.d.ts:9:21 - error TS2694: Namespace '"/Library/Mobile Documents/app/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

9     static ɵfac: i0.ɵɵFactoryDeclaration<NgxChessBoardModule, never>;
                      ~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-chess-board/lib/ngx-chess-board.module.d.ts:10:21 - error TS2694: Namespace '"/Library/Mobile Documents/app/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.

10     static ɵmod: i0.ɵɵNgModuleDeclaration<NgxChessBoardModule, [typeof i1.NgxChessBoardComponent, typeof i2.PiecePromotionModalComponent], [typeof i3.CommonModule, typeof i4.DragDropModule], [typeof i1.NgxChessBoardComponent]>;
                       ~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-chess-board/lib/ngx-chess-board.module.d.ts:11:21 - error TS2694: Namespace '"/Library/Mobile Documents/app/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.

11     static ɵinj: i0.ɵɵInjectorDeclaration<NgxChessBoardModule>;
                       ~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-chess-board/lib/piece-promotion/piece-promotion-modal/piece-promotion-modal.component.d.ts:13:21 - error TS2694: Namespace '"/Library/Mobile Documents/app/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

13     static ɵfac: i0.ɵɵFactoryDeclaration<PiecePromotionModalComponent, never>;
                       ~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-chess-board/lib/piece-promotion/piece-promotion-modal/piece-promotion-modal.component.d.ts:14:21 - error TS2694: Namespace '"/Library/Mobile Documents/app/node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDeclaration'.

14     static ɵcmp: i0.ɵɵComponentDeclaration<PiecePromotionModalComponent, "app-piece-promotion-modal", never, { "pieceIconInput": "pieceIconInput"; "color": "color"; }, {}, never, never>;
                       ~~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-chess-board/lib/service/ngx-chess-board.service.d.ts:6:21 - error TS2694: Namespace '"/Library/Mobile Documents/com~apple~CloudDocs/Desktop/app/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

6     static ɵfac: i0.ɵɵFactoryDeclaration<NgxChessBoardService, never>;
                      ~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-chess-board/lib/service/ngx-chess-board.service.d.ts:7:22 - error TS2694: Namespace '"/Library/Mobile Documents/app/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectableDeclaration'.

7     static ɵprov: i0.ɵɵInjectableDeclaration<NgxChessBoardService>;
                       ~~~~~~~~~~~~~~~~~~~~~~~
</code>```

my package.json is:

```<code>{
  "name": "App",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "main": "server.js",
    "heroku-postbuild": "ng build --aot --prod",
    "preinstall": "npm install -g @angular/cli @angular/compiler-cli typescript",
    "start": "ng serve",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^11.0.5",
    "@angular/cdk": "^11.0.3",
    "@angular/common": "^11.0.5",
    "@angular/compiler": "~11.2.14",
    "@angular/compiler-cli": "~11.2.14",
    "@angular/core": "^11.0.5",
    "@angular/flex-layout": "^11.0.0-beta.33",
    "@angular/forms": "^11.0.5",
    "@angular/localize": "^11.0.5",
    "@angular/material": "^11.0.3",
    "@angular/platform-browser": "11.0.5",
    "@angular/platform-browser-dynamic": "11.0.5",
    "@angular/router": "11.0.5",
    "ng2-charts-schematics": "^0.1.7",
    "@angular-devkit/build-angular": "^0.1100.5",
    "@angular/cli": "11.0.5",
    "@angular/language-service": "^11.0.5",
    "@fortawesome/fontawesome-free": "^5.15.1",
    "@types/chartist": "^0.11.0",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/lodash": "^4.14.135",
    "@types/node": "^8.10.66",
    "@types/uuid": "^8.3.0",
    "angular-cli-ghpages": "^0.6.2",
    "protractor": "^7.0.0",
    "ts-node": "~5.0.1",
    "@ng-bootstrap/ng-bootstrap": "^5.3.1",
    "@ng-bootstrap/schematics": "^2.0.0-alpha.1",
    "@ngtools/webpack": "^11.0.5",
    "@ngx-translate/core": "13.0.0",
    "@ngx-translate/http-loader": "^4.0.0",
    "@types/chart.js": "^2.7.42",
    "@types/express": "^4.17.0",
    "@types/w3c-web-usb": "^1.0.4",
    "@types/web-bluetooth": "0.0.4",
    "angular-bootstrap-md": "^7.4.3",
    "angular-cc-library": "^2.1.2",
    "angular-notifier": "^4.1.1",
    "angular-responsive-carousel": "^2.0.2",
    "angular5-csv": "^0.2.11",
    "apexcharts": "^3.25.0",
    "bcryptjs": "^2.4.3",
    "body-parser": "^1.18.3",
    "bootstrap": "^4.5.3",
    "chart.js": "^2.9.4",
    "chartist": "^0.11.4",
    "config": "^3.3.6",
    "core-js": "^2.5.4",
    "cors": "^2.8.5",
    "css-loader": "^2.1.0",
    "dotenv": "^6.1.0",
    "exec": "^0.2.1",
    "express": "^4.16.4",
    "express-jwt": "^5.3.1",
    "express-sslify": "^1.2.0",
    "font-awesome": "^4.7.0",
    "fontawesome": "^5.6.3",
    "got": "^11.8.1",
    "hammerjs": "^2.0.8",
    "jsonwebtoken": "^8.2.2",
    "ldbutton": "^1.0.2",
    "lodash": "^4.17.11",
    "mat-table-exporter": "^1.0.2",
    "material-design-lite": "^1.3.0",
    "mdbootstrap": "^4.19.2",
    "mongodb": "^3.0.10",
    "mongoose": "^5.1.4",
    "ng-apexcharts": "^1.5.8",
    "ng-chartist": "^4.1.0",
    "ng-multiselect-dropdown": "^0.2.3",
    "ng-thermal-print": "^1.0.3",
    "ng2-charts": "^2.4.2",
    "ngx-autosize": "^1.8.4",
    "ngx-bootstrap": "^6.2.0",
    "ngx-chess-board": "^2.0.7",
    "path": "^0.12.7",
    "popper.js": "^1.15.0",
    "pusher": "^2.2.0",
    "pusher-js": "^4.4.0",
    "readable-stream": "^3.6.0",
    "remote-pay-cloud": "3.1.0",
    "remote-pay-cloud-api": "^4.0.3",
    "request": "^2.88.2",
    "request-promise": "^4.2.4",
    "resize-base64": "^1.0.12",
    "rootpath": "^0.1.2",
    "rxjs": "^6.5.2",
    "rxjs-compat": "^6.3.3",
    "time-ago-pipe": "^1.3.2",
    "tslib": "^1.9.0",
    "typescript": "4.0.5",
    "uuid": "^3.3.2",
    "web-animations-js": "^2.3.2",
    "zone.js": "~0.10.3"
  },
  "devDependencies": {
    "@angular-devkit/core": "^11.0.5",
    "@angular-devkit/schematics": "^11.0.5",
    "codelyzer": "^5.0.1",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~5.1.1",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.0",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "ng2-charts-schematics": "^0.1.7",
    "protractor": "^7.0.0",
    "ts-node": "~5.0.1",
    "tslint": "~6.1.3"
  },
  "engines": {
    "node": "10.13",
    "npm": "6.9.0"
  }
}
</code>```

my app.module.ts:

```<code>import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {ReactiveFormsModule} from '@angular/forms';
import {HttpClientModule, HTTP_INTERCEPTORS, HttpClient} from '@angular/common/http';
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
// used to create fake backend
import {FormsModule} from '@angular/forms';
import {AppComponent} from './app.component';
import {routing} from './app.routing';

import {AlertComponent} from './_directives';
import {AuthGuard} from './_guards';
import {JwtInterceptor, ErrorInterceptor} from './_helpers';
import {AlertService, AuthenticationService, UserService} from './_services';
import {HomeComponent} from './home';
import {LoginComponent} from './login';
import {RegisterComponent} from './register';
import {TimeAgoPipe} from 'time-ago-pipe'
import {MDBBootstrapModule} from 'angular-bootstrap-md';
import {YoutubeComponent} from './youtube/youtube.component';
import {ChartOfUserAccountsComponent} from './chart-of-user-accounts/chart-of-user-accounts.component';
import {DropdownUserRolesComponent} from './dropdown-user-roles/dropdown-user-roles.component';
import {VideosListComponent} from './videos-list/videos-list.component';
import {VideosSearchComponent} from './videos-search/videos-search.component';
import {VideosPlaylistComponent} from './videos-playlist/videos-playlist.component';
import {VideoDurationPipe} from './shared/pipes/video-duration.pipe';
import {VideoPlayerComponent} from './video-player/video-player.component';
import {VideoLikesViewsPipe} from './shared/pipes/video-likes-views.pipe';
import {VideoNamePipe} from './shared/pipes/video-name.pipe';
import {LazyScrollDirective} from './shared/directives/lazy-scroll/lazy-scroll.directive';
import {YoutubeApiService} from './shared/services/youtube-api.service';
import {YoutubePlayerService} from './shared/services/youtube-player.service';
import {PlaylistStoreService} from './shared/services/playlist-store.service';
import {NotificationService} from './shared/services/notification.service';
import {BrowserNotificationService} from './shared/services/browser-notification.service';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {MatIconModule} from '@angular/material/icon';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatDialogModule } from '@angular/material/dialog';
import { MatDividerModule } from '@angular/material/divider';
import { MatExpansionModule } from '@angular/material/expansion';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatSelectModule } from '@angular/material/select';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatSortModule } from '@angular/material/sort';
import { MatTableModule } from '@angular/material/table';
import {HelpComponent} from './help/help.component';
import {CreateUserComponent} from './create-user/create-user.component';
import { AddCategoryComponent } from './add-category/add-category.component';
import { CategoriesComponent } from './categories/categories.component';
import {DropdownCategoriesComponent} from './dropdown-categories/dropdown-categories.component';
import { AddItemComponent } from './add-item/add-item.component';
import {CartService} from './_services/cart.service';
import { ViewCartComponent } from './view-cart/view-cart.component';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ItemsByCategoryComponent } from './items-by-category/items-by-category.component';
import { ItemsPageComponent } from './items-page/items-page.component';
import { OrderHistoryComponent } from './order-history/order-history.component';
import { DropdownBooleanSelectorComponent } from './dropdown-boolean-selector/dropdown-boolean-selector.component';
import { NgMultiSelectDropDownModule } from 'ng-multiselect-dropdown';
import {DropdownItemOptionSelectorComponent} from './dropdown-item-option-selector/dropdown-item-option-selector.component';
import { ViewOrdersComponent } from './view-orders/view-orders.component';
import { TableSummaryComponent } from './table-summary/table-summary.component';
import { DropdownTableSelectorComponent } from './dropdown-table-selector/dropdown-table-selector.component';
import { DropdownFilterByItemSelectorComponent } from './dropdown-filter-by-item-selector/dropdown-filter-by-item-selector.component';
import { DropdownFilterByCategorySelectorComponent } from './dropdown-filter-by-category-selector/dropdown-filter-by-category-selector.component';
import {SidebarMenuComponent} from './sidebar-menu/sidebar-menu.component';
import { ItemOptionsDialogComponentComponent } from './item-options-dialog-component/item-options-dialog-component.component';
import { NotificationPopupComponent } from './notification-popup/notification-popup.component';
import {NotifierModule, NotifierOptions} from 'angular-notifier';
import { OrderHistoryDataTableComponent } from './order-history-data-table/order-history-data-table.component';
import { ServerOrderComponent } from './server-order/server-order.component';
import {NotificationConfirmationComponentComponent} from './notification-confirmation-component/notification-confirmation-component.component';
import { WaiterReadyOrderViewComponent } from './waiter-ready-order-view/waiter-ready-order-view.component';
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
import { DropdownLanguageSelectorComponent } from './dropdown-language-selector/dropdown-language-selector.component';
import { CustomMessageItemDialogComponent } from './custom-message-item-dialog/custom-message-item-dialog.component';
import { KioskComponent } from './kiosk/kiosk.component';
import {CloverAuthenticationService} from './_services/cloverAuthentication.service';
import { CategoriesByItemComponent } from './categories-by-item/categories-by-item.component';
import { UploadImageDialogComponent } from './upload-image-dialog/upload-image-dialog.component';
import {LogoutComponent} from './logout/logout.component';
import {addTipComponent} from './add-tip/add-tip.component';
import {paymentReceiptComponent} from './payment-receipt/payment-receipt.component';
import {PrinterListComponent} from './printer-list/printer-list.component';
import { PaymentPendingScreenComponent } from './payment-pending-screen/payment-pending-screen.component';
import { CreditCardDirectivesModule } from 'angular-cc-library';
import { CreditCardPaymentScreenComponent } from './credit-card-payment-screen/credit-card-payment-screen.component';
import {DragDropModule} from '@angular/cdk/drag-drop';
import {Provider, Type} from '@angular/core';
import {ThermalPrintModule} from 'ng-thermal-print';
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
import {MatListModule} from '@angular/material/list';
import { DashboardComponent } from './dashboard/dashboard.component';
import {MatDatepickerModule} from '@angular/material/datepicker';
import {MatNativeDateModule} from '@angular/material/core';
import {MatTooltipModule} from '@angular/material/tooltip';
import {ChartistModule} from 'ng-chartist';
import {RouterModule} from '@angular/router';
import { NgApexchartsModule } from 'ng-apexcharts';
import {AutosizeModule} from 'ngx-autosize';
import {ServerRequestService} from './_services/serverRequest.service';
import {AuthGuardClover} from './_guards/authClover.guard';;
import { GamesComponent } from './games/games.component';
import {NgxChessBoardModule} from 'ngx-chess-board';
import { CloverAuthRouterComponent } from './clover-auth-router/clover-auth-router.component';

const customNotifierOptions: NotifierOptions = {
  position: {
    horizontal: {
      position: 'right',
      distance: 12
    },
    vertical: {
      position: 'top',
      distance: 60,
      gap: 10
    }
  },
  theme: 'material',
  behaviour: {
    autoHide: 5000,
    onClick: 'hide',
    onMouseover: 'pauseAutoHide',
    showDismissButton: true,
    stacking: 4
  },
  animations: {
    enabled: true,
    show: {
      preset: 'slide',
      speed: 300,
      easing: 'ease'
    },
    hide: {
      preset: 'fade',
      speed: 300,
      easing: 'ease',
      offset: 50
    },
    shift: {
      speed: 300,
      easing: 'ease'
    },
    overlap: 150
  }
};

@NgModule({
    imports: [
        MDBBootstrapModule.forRoot(),
        TranslateModule.forRoot({
            loader: {
                provide: TranslateLoader,
                useFactory: HttpLoaderFactory,
                deps: [HttpClient]
            }
        }),
        BrowserModule,
        DragDropModule,
        ReactiveFormsModule,
        HttpClientModule,
        AutosizeModule,
        routing,
        FormsModule,
        NgxChessBoardModule.forRoot(),
        NotifierModule.withConfig(customNotifierOptions),
        MatIconModule,
        CreditCardDirectivesModule,
        BrowserAnimationsModule,
        MatSidenavModule,
        NgApexchartsModule,
        MatCheckboxModule,
        MatFormFieldModule,
        MatTableModule,
        MatSortModule,
        BrowserAnimationsModule,
        FormsModule,
        ReactiveFormsModule,
        HttpClientModule,
        RouterModule,
        MatDividerModule,
        MatCardModule,
        MatPaginatorModule,
        MatSelectModule,
        MatSlideToggleModule,
        MatExpansionModule,
        ThermalPrintModule,
        MatNativeDateModule,
        NgbModule,
        MatTooltipModule,
        ChartistModule,
        MatDatepickerModule,
        MatInputModule,
        MatListModule,
        MatButtonToggleModule,
        MatProgressSpinnerModule,
        NgMultiSelectDropDownModule.forRoot(),
        MatDialogModule,
        FlexLayoutModule],
  entryComponents: [
    ItemOptionsDialogComponentComponent,
    NotificationPopupComponent,
    NotificationConfirmationComponentComponent,
    CustomMessageItemDialogComponent,
    UploadImageDialogComponent
  ],
  declarations: [
    AppComponent,
    AlertComponent,
    HomeComponent,
    LoginComponent,
    RegisterComponent,
    TimeAgoPipe,
    DropdownUserRolesComponent,
    DropdownCategoriesComponent,
    ChartOfUserAccountsComponent,
    YoutubeComponent,
    AppComponent,
    VideosListComponent,
    VideosSearchComponent,
    VideoPlayerComponent,
    VideosPlaylistComponent,
    VideoDurationPipe,
    VideoLikesViewsPipe,
    VideoNamePipe,
    LazyScrollDirective,
    HelpComponent,
    CreateUserComponent,
    AddCategoryComponent,
    CategoriesComponent,
    AddItemComponent,
    ViewCartComponent,
    ItemsByCategoryComponent,
    ItemsPageComponent,
    OrderHistoryComponent,
    DropdownBooleanSelectorComponent,
    DropdownItemOptionSelectorComponent,
    ViewOrdersComponent,
    TableSummaryComponent,
    DropdownTableSelectorComponent,
    DropdownFilterByItemSelectorComponent,
    SidebarMenuComponent,
    DropdownFilterByCategorySelectorComponent ,
    ItemOptionsDialogComponentComponent,
    NotificationPopupComponent ,
    OrderHistoryDataTableComponent ,
    ServerOrderComponent,
    NotificationConfirmationComponentComponent,
    WaiterReadyOrderViewComponent ,
    DropdownLanguageSelectorComponent ,
    CustomMessageItemDialogComponent,
    CategoriesByItemComponent,
    KioskComponent,
    LogoutComponent,
    UploadImageDialogComponent,
    addTipComponent,
    paymentReceiptComponent,
    PrinterListComponent,
    PaymentPendingScreenComponent,
    CreditCardPaymentScreenComponent
,
    DashboardComponent ,
    GamesComponent ,
    CloverAuthRouterComponent],
  providers: [
    AuthGuard,
    AuthGuardClover,
    AlertService,
    AuthenticationService,
    ViewCartComponent,
    UserService,
    YoutubeApiService,
    CloverAuthenticationService,
    YoutubePlayerService,
    CartService,
    PlaylistStoreService,
    ServerRequestService,
    NotificationService,
    BrowserNotificationService,
    addTipComponent,
    paymentReceiptComponent,
    PrinterListComponent,
    {provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true},
    {provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true}

  ],
  bootstrap: [AppComponent]
})

export class AppModule {
}
export function HttpLoaderFactory(http: HttpClient) {
  return new TranslateHttpLoader(http);
}

declare module '@angular/core' {

  interface ModuleWithProviders<T = any> {
    ngModule: Type<T>;
    providers?: Provider[];
  }
}
</code>```

答:
This was resolved by changing

```<code>"ngx-chess-board": "^2.0.7",
</code>```

to:

```<code>"ngx-chess-board": "2.0.7",
</code>```

Body:
I have an app using ngx-chess-board library and it was working fine locally and on the server but recently I get dependency errors when I try to run npm start locally. I tried different versions of ngx-chess-board but no luck. Deleting node modules did not help. I get the errors below when I run npm start:

   Error: node_modules/ngx-chess-board/lib/ngx-chess-board.component.d.ts:75:21 - error TS2694: Namespace '"/Library/Mobile Documents/app/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

75     static ɵfac: i0.ɵɵFactoryDeclaration<NgxChessBoardComponent, never>;
                       ~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-chess-board/lib/ngx-chess-board.component.d.ts:76:21 - error TS2694: Namespace '"/Library/Mobile Documents/app/node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDeclaration'.

76     static ɵcmp: i0.ɵɵComponentDeclaration<NgxChessBoardComponent, "ngx-chess-board", never, { "darkTileColor": "darkTileColor"; "lightTileColor": "lightTileColor"; "showCoords": "showCoords"; "sourcePointColor": "sourcePointColor"; "destinationPointColor": "destinationPointColor"; "legalMovesPointColor": "legalMovesPointColor"; "showLastMove": "showLastMove"; "showLegalMoves": "showLegalMoves"; "showActivePiece": "showActivePiece"; "showPossibleCaptures": "showPossibleCaptures"; "size": "size"; "freeMode": "freeMode"; "dragDisabled": "dragDisabled"; "drawDisabled": "drawDisabled"; "pieceIcons": "pieceIcons"; "lightDisabled": "lightDisabled"; "darkDisabled": "darkDisabled"; }, { "moveChange": "moveChange"; "checkmate": "checkmate"; "stalemate": "stalemate"; }, never, never>;
                       ~~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-chess-board/lib/ngx-chess-board.module.d.ts:9:21 - error TS2694: Namespace '"/Library/Mobile Documents/app/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

9     static ɵfac: i0.ɵɵFactoryDeclaration<NgxChessBoardModule, never>;
                      ~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-chess-board/lib/ngx-chess-board.module.d.ts:10:21 - error TS2694: Namespace '"/Library/Mobile Documents/app/node_modules/@angular/core/core"' has no exported member 'ɵɵNgModuleDeclaration'.

10     static ɵmod: i0.ɵɵNgModuleDeclaration<NgxChessBoardModule, [typeof i1.NgxChessBoardComponent, typeof i2.PiecePromotionModalComponent], [typeof i3.CommonModule, typeof i4.DragDropModule], [typeof i1.NgxChessBoardComponent]>;
                       ~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-chess-board/lib/ngx-chess-board.module.d.ts:11:21 - error TS2694: Namespace '"/Library/Mobile Documents/app/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectorDeclaration'.

11     static ɵinj: i0.ɵɵInjectorDeclaration<NgxChessBoardModule>;
                       ~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-chess-board/lib/piece-promotion/piece-promotion-modal/piece-promotion-modal.component.d.ts:13:21 - error TS2694: Namespace '"/Library/Mobile Documents/app/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

13     static ɵfac: i0.ɵɵFactoryDeclaration<PiecePromotionModalComponent, never>;
                       ~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-chess-board/lib/piece-promotion/piece-promotion-modal/piece-promotion-modal.component.d.ts:14:21 - error TS2694: Namespace '"/Library/Mobile Documents/app/node_modules/@angular/core/core"' has no exported member 'ɵɵComponentDeclaration'.

14     static ɵcmp: i0.ɵɵComponentDeclaration<PiecePromotionModalComponent, "app-piece-promotion-modal", never, { "pieceIconInput": "pieceIconInput"; "color": "color"; }, {}, never, never>;
                       ~~~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-chess-board/lib/service/ngx-chess-board.service.d.ts:6:21 - error TS2694: Namespace '"/Library/Mobile Documents/com~apple~CloudDocs/Desktop/app/node_modules/@angular/core/core"' has no exported member 'ɵɵFactoryDeclaration'.

6     static ɵfac: i0.ɵɵFactoryDeclaration<NgxChessBoardService, never>;
                      ~~~~~~~~~~~~~~~~~~~~
node_modules/ngx-chess-board/lib/service/ngx-chess-board.service.d.ts:7:22 - error TS2694: Namespace '"/Library/Mobile Documents/app/node_modules/@angular/core/core"' has no exported member 'ɵɵInjectableDeclaration'.

7     static ɵprov: i0.ɵɵInjectableDeclaration<NgxChessBoardService>;
                       ~~~~~~~~~~~~~~~~~~~~~~~

my package.json is:

{
  "name": "App",
  "version": "0.0.0",
  "scripts": {
    "ng": "ng",
    "main": "server.js",
    "heroku-postbuild": "ng build --aot --prod",
    "preinstall": "npm install -g @angular/cli @angular/compiler-cli typescript",
    "start": "ng serve",
    "test": "ng test",
    "lint": "ng lint",
    "e2e": "ng e2e"
  },
  "private": true,
  "dependencies": {
    "@angular/animations": "^11.0.5",
    "@angular/cdk": "^11.0.3",
    "@angular/common": "^11.0.5",
    "@angular/compiler": "~11.2.14",
    "@angular/compiler-cli": "~11.2.14",
    "@angular/core": "^11.0.5",
    "@angular/flex-layout": "^11.0.0-beta.33",
    "@angular/forms": "^11.0.5",
    "@angular/localize": "^11.0.5",
    "@angular/material": "^11.0.3",
    "@angular/platform-browser": "11.0.5",
    "@angular/platform-browser-dynamic": "11.0.5",
    "@angular/router": "11.0.5",
    "ng2-charts-schematics": "^0.1.7",
    "@angular-devkit/build-angular": "^0.1100.5",
    "@angular/cli": "11.0.5",
    "@angular/language-service": "^11.0.5",
    "@fortawesome/fontawesome-free": "^5.15.1",
    "@types/chartist": "^0.11.0",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/lodash": "^4.14.135",
    "@types/node": "^8.10.66",
    "@types/uuid": "^8.3.0",
    "angular-cli-ghpages": "^0.6.2",
    "protractor": "^7.0.0",
    "ts-node": "~5.0.1",
    "@ng-bootstrap/ng-bootstrap": "^5.3.1",
    "@ng-bootstrap/schematics": "^2.0.0-alpha.1",
    "@ngtools/webpack": "^11.0.5",
    "@ngx-translate/core": "13.0.0",
    "@ngx-translate/http-loader": "^4.0.0",
    "@types/chart.js": "^2.7.42",
    "@types/express": "^4.17.0",
    "@types/w3c-web-usb": "^1.0.4",
    "@types/web-bluetooth": "0.0.4",
    "angular-bootstrap-md": "^7.4.3",
    "angular-cc-library": "^2.1.2",
    "angular-notifier": "^4.1.1",
    "angular-responsive-carousel": "^2.0.2",
    "angular5-csv": "^0.2.11",
    "apexcharts": "^3.25.0",
    "bcryptjs": "^2.4.3",
    "body-parser": "^1.18.3",
    "bootstrap": "^4.5.3",
    "chart.js": "^2.9.4",
    "chartist": "^0.11.4",
    "config": "^3.3.6",
    "core-js": "^2.5.4",
    "cors": "^2.8.5",
    "css-loader": "^2.1.0",
    "dotenv": "^6.1.0",
    "exec": "^0.2.1",
    "express": "^4.16.4",
    "express-jwt": "^5.3.1",
    "express-sslify": "^1.2.0",
    "font-awesome": "^4.7.0",
    "fontawesome": "^5.6.3",
    "got": "^11.8.1",
    "hammerjs": "^2.0.8",
    "jsonwebtoken": "^8.2.2",
    "ldbutton": "^1.0.2",
    "lodash": "^4.17.11",
    "mat-table-exporter": "^1.0.2",
    "material-design-lite": "^1.3.0",
    "mdbootstrap": "^4.19.2",
    "mongodb": "^3.0.10",
    "mongoose": "^5.1.4",
    "ng-apexcharts": "^1.5.8",
    "ng-chartist": "^4.1.0",
    "ng-multiselect-dropdown": "^0.2.3",
    "ng-thermal-print": "^1.0.3",
    "ng2-charts": "^2.4.2",
    "ngx-autosize": "^1.8.4",
    "ngx-bootstrap": "^6.2.0",
    "ngx-chess-board": "^2.0.7",
    "path": "^0.12.7",
    "popper.js": "^1.15.0",
    "pusher": "^2.2.0",
    "pusher-js": "^4.4.0",
    "readable-stream": "^3.6.0",
    "remote-pay-cloud": "3.1.0",
    "remote-pay-cloud-api": "^4.0.3",
    "request": "^2.88.2",
    "request-promise": "^4.2.4",
    "resize-base64": "^1.0.12",
    "rootpath": "^0.1.2",
    "rxjs": "^6.5.2",
    "rxjs-compat": "^6.3.3",
    "time-ago-pipe": "^1.3.2",
    "tslib": "^1.9.0",
    "typescript": "4.0.5",
    "uuid": "^3.3.2",
    "web-animations-js": "^2.3.2",
    "zone.js": "~0.10.3"
  },
  "devDependencies": {
    "@angular-devkit/core": "^11.0.5",
    "@angular-devkit/schematics": "^11.0.5",
    "codelyzer": "^5.0.1",
    "jasmine-core": "~2.99.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "~5.1.1",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.0",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^0.2.2",
    "ng2-charts-schematics": "^0.1.7",
    "protractor": "^7.0.0",
    "ts-node": "~5.0.1",
    "tslint": "~6.1.3"
  },
  "engines": {
    "node": "10.13",
    "npm": "6.9.0"
  }
}

my app.module.ts:

import {NgModule} from '@angular/core';
import {BrowserModule} from '@angular/platform-browser';
import {ReactiveFormsModule} from '@angular/forms';
import {HttpClientModule, HTTP_INTERCEPTORS, HttpClient} from '@angular/common/http';
import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
// used to create fake backend
import {FormsModule} from '@angular/forms';
import {AppComponent} from './app.component';
import {routing} from './app.routing';

import {AlertComponent} from './_directives';
import {AuthGuard} from './_guards';
import {JwtInterceptor, ErrorInterceptor} from './_helpers';
import {AlertService, AuthenticationService, UserService} from './_services';
import {HomeComponent} from './home';
import {LoginComponent} from './login';
import {RegisterComponent} from './register';
import {TimeAgoPipe} from 'time-ago-pipe'
import {MDBBootstrapModule} from 'angular-bootstrap-md';
import {YoutubeComponent} from './youtube/youtube.component';
import {ChartOfUserAccountsComponent} from './chart-of-user-accounts/chart-of-user-accounts.component';
import {DropdownUserRolesComponent} from './dropdown-user-roles/dropdown-user-roles.component';
import {VideosListComponent} from './videos-list/videos-list.component';
import {VideosSearchComponent} from './videos-search/videos-search.component';
import {VideosPlaylistComponent} from './videos-playlist/videos-playlist.component';
import {VideoDurationPipe} from './shared/pipes/video-duration.pipe';
import {VideoPlayerComponent} from './video-player/video-player.component';
import {VideoLikesViewsPipe} from './shared/pipes/video-likes-views.pipe';
import {VideoNamePipe} from './shared/pipes/video-name.pipe';
import {LazyScrollDirective} from './shared/directives/lazy-scroll/lazy-scroll.directive';
import {YoutubeApiService} from './shared/services/youtube-api.service';
import {YoutubePlayerService} from './shared/services/youtube-player.service';
import {PlaylistStoreService} from './shared/services/playlist-store.service';
import {NotificationService} from './shared/services/notification.service';
import {BrowserNotificationService} from './shared/services/browser-notification.service';
import {BrowserAnimationsModule} from '@angular/platform-browser/animations';
import {MatIconModule} from '@angular/material/icon';
import {MatProgressSpinnerModule} from '@angular/material/progress-spinner';
import { MatButtonToggleModule } from '@angular/material/button-toggle';
import { MatCardModule } from '@angular/material/card';
import { MatCheckboxModule } from '@angular/material/checkbox';
import { MatDialogModule } from '@angular/material/dialog';
import { MatDividerModule } from '@angular/material/divider';
import { MatExpansionModule } from '@angular/material/expansion';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatInputModule } from '@angular/material/input';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatSelectModule } from '@angular/material/select';
import { MatSidenavModule } from '@angular/material/sidenav';
import { MatSortModule } from '@angular/material/sort';
import { MatTableModule } from '@angular/material/table';
import {HelpComponent} from './help/help.component';
import {CreateUserComponent} from './create-user/create-user.component';
import { AddCategoryComponent } from './add-category/add-category.component';
import { CategoriesComponent } from './categories/categories.component';
import {DropdownCategoriesComponent} from './dropdown-categories/dropdown-categories.component';
import { AddItemComponent } from './add-item/add-item.component';
import {CartService} from './_services/cart.service';
import { ViewCartComponent } from './view-cart/view-cart.component';
import { FlexLayoutModule } from '@angular/flex-layout';
import { ItemsByCategoryComponent } from './items-by-category/items-by-category.component';
import { ItemsPageComponent } from './items-page/items-page.component';
import { OrderHistoryComponent } from './order-history/order-history.component';
import { DropdownBooleanSelectorComponent } from './dropdown-boolean-selector/dropdown-boolean-selector.component';
import { NgMultiSelectDropDownModule } from 'ng-multiselect-dropdown';
import {DropdownItemOptionSelectorComponent} from './dropdown-item-option-selector/dropdown-item-option-selector.component';
import { ViewOrdersComponent } from './view-orders/view-orders.component';
import { TableSummaryComponent } from './table-summary/table-summary.component';
import { DropdownTableSelectorComponent } from './dropdown-table-selector/dropdown-table-selector.component';
import { DropdownFilterByItemSelectorComponent } from './dropdown-filter-by-item-selector/dropdown-filter-by-item-selector.component';
import { DropdownFilterByCategorySelectorComponent } from './dropdown-filter-by-category-selector/dropdown-filter-by-category-selector.component';
import {SidebarMenuComponent} from './sidebar-menu/sidebar-menu.component';
import { ItemOptionsDialogComponentComponent } from './item-options-dialog-component/item-options-dialog-component.component';
import { NotificationPopupComponent } from './notification-popup/notification-popup.component';
import {NotifierModule, NotifierOptions} from 'angular-notifier';
import { OrderHistoryDataTableComponent } from './order-history-data-table/order-history-data-table.component';
import { ServerOrderComponent } from './server-order/server-order.component';
import {NotificationConfirmationComponentComponent} from './notification-confirmation-component/notification-confirmation-component.component';
import { WaiterReadyOrderViewComponent } from './waiter-ready-order-view/waiter-ready-order-view.component';
import {TranslateLoader, TranslateModule} from '@ngx-translate/core';
import {TranslateHttpLoader} from '@ngx-translate/http-loader';
import { DropdownLanguageSelectorComponent } from './dropdown-language-selector/dropdown-language-selector.component';
import { CustomMessageItemDialogComponent } from './custom-message-item-dialog/custom-message-item-dialog.component';
import { KioskComponent } from './kiosk/kiosk.component';
import {CloverAuthenticationService} from './_services/cloverAuthentication.service';
import { CategoriesByItemComponent } from './categories-by-item/categories-by-item.component';
import { UploadImageDialogComponent } from './upload-image-dialog/upload-image-dialog.component';
import {LogoutComponent} from './logout/logout.component';
import {addTipComponent} from './add-tip/add-tip.component';
import {paymentReceiptComponent} from './payment-receipt/payment-receipt.component';
import {PrinterListComponent} from './printer-list/printer-list.component';
import { PaymentPendingScreenComponent } from './payment-pending-screen/payment-pending-screen.component';
import { CreditCardDirectivesModule } from 'angular-cc-library';
import { CreditCardPaymentScreenComponent } from './credit-card-payment-screen/credit-card-payment-screen.component';
import {DragDropModule} from '@angular/cdk/drag-drop';
import {Provider, Type} from '@angular/core';
import {ThermalPrintModule} from 'ng-thermal-print';
import {MatSlideToggleModule} from '@angular/material/slide-toggle';
import {MatListModule} from '@angular/material/list';
import { DashboardComponent } from './dashboard/dashboard.component';
import {MatDatepickerModule} from '@angular/material/datepicker';
import {MatNativeDateModule} from '@angular/material/core';
import {MatTooltipModule} from '@angular/material/tooltip';
import {ChartistModule} from 'ng-chartist';
import {RouterModule} from '@angular/router';
import { NgApexchartsModule } from 'ng-apexcharts';
import {AutosizeModule} from 'ngx-autosize';
import {ServerRequestService} from './_services/serverRequest.service';
import {AuthGuardClover} from './_guards/authClover.guard';;
import { GamesComponent } from './games/games.component';
import {NgxChessBoardModule} from 'ngx-chess-board';
import { CloverAuthRouterComponent } from './clover-auth-router/clover-auth-router.component';

const customNotifierOptions: NotifierOptions = {
  position: {
    horizontal: {
      position: 'right',
      distance: 12
    },
    vertical: {
      position: 'top',
      distance: 60,
      gap: 10
    }
  },
  theme: 'material',
  behaviour: {
    autoHide: 5000,
    onClick: 'hide',
    onMouseover: 'pauseAutoHide',
    showDismissButton: true,
    stacking: 4
  },
  animations: {
    enabled: true,
    show: {
      preset: 'slide',
      speed: 300,
      easing: 'ease'
    },
    hide: {
      preset: 'fade',
      speed: 300,
      easing: 'ease',
      offset: 50
    },
    shift: {
      speed: 300,
      easing: 'ease'
    },
    overlap: 150
  }
};

@NgModule({
    imports: [
        MDBBootstrapModule.forRoot(),
        TranslateModule.forRoot({
            loader: {
                provide: TranslateLoader,
                useFactory: HttpLoaderFactory,
                deps: [HttpClient]
            }
        }),
        BrowserModule,
        DragDropModule,
        ReactiveFormsModule,
        HttpClientModule,
        AutosizeModule,
        routing,
        FormsModule,
        NgxChessBoardModule.forRoot(),
        NotifierModule.withConfig(customNotifierOptions),
        MatIconModule,
        CreditCardDirectivesModule,
        BrowserAnimationsModule,
        MatSidenavModule,
        NgApexchartsModule,
        MatCheckboxModule,
        MatFormFieldModule,
        MatTableModule,
        MatSortModule,
        BrowserAnimationsModule,
        FormsModule,
        ReactiveFormsModule,
        HttpClientModule,
        RouterModule,
        MatDividerModule,
        MatCardModule,
        MatPaginatorModule,
        MatSelectModule,
        MatSlideToggleModule,
        MatExpansionModule,
        ThermalPrintModule,
        MatNativeDateModule,
        NgbModule,
        MatTooltipModule,
        ChartistModule,
        MatDatepickerModule,
        MatInputModule,
        MatListModule,
        MatButtonToggleModule,
        MatProgressSpinnerModule,
        NgMultiSelectDropDownModule.forRoot(),
        MatDialogModule,
        FlexLayoutModule],
  entryComponents: [
    ItemOptionsDialogComponentComponent,
    NotificationPopupComponent,
    NotificationConfirmationComponentComponent,
    CustomMessageItemDialogComponent,
    UploadImageDialogComponent
  ],
  declarations: [
    AppComponent,
    AlertComponent,
    HomeComponent,
    LoginComponent,
    RegisterComponent,
    TimeAgoPipe,
    DropdownUserRolesComponent,
    DropdownCategoriesComponent,
    ChartOfUserAccountsComponent,
    YoutubeComponent,
    AppComponent,
    VideosListComponent,
    VideosSearchComponent,
    VideoPlayerComponent,
    VideosPlaylistComponent,
    VideoDurationPipe,
    VideoLikesViewsPipe,
    VideoNamePipe,
    LazyScrollDirective,
    HelpComponent,
    CreateUserComponent,
    AddCategoryComponent,
    CategoriesComponent,
    AddItemComponent,
    ViewCartComponent,
    ItemsByCategoryComponent,
    ItemsPageComponent,
    OrderHistoryComponent,
    DropdownBooleanSelectorComponent,
    DropdownItemOptionSelectorComponent,
    ViewOrdersComponent,
    TableSummaryComponent,
    DropdownTableSelectorComponent,
    DropdownFilterByItemSelectorComponent,
    SidebarMenuComponent,
    DropdownFilterByCategorySelectorComponent ,
    ItemOptionsDialogComponentComponent,
    NotificationPopupComponent ,
    OrderHistoryDataTableComponent ,
    ServerOrderComponent,
    NotificationConfirmationComponentComponent,
    WaiterReadyOrderViewComponent ,
    DropdownLanguageSelectorComponent ,
    CustomMessageItemDialogComponent,
    CategoriesByItemComponent,
    KioskComponent,
    LogoutComponent,
    UploadImageDialogComponent,
    addTipComponent,
    paymentReceiptComponent,
    PrinterListComponent,
    PaymentPendingScreenComponent,
    CreditCardPaymentScreenComponent
,
    DashboardComponent ,
    GamesComponent ,
    CloverAuthRouterComponent],
  providers: [
    AuthGuard,
    AuthGuardClover,
    AlertService,
    AuthenticationService,
    ViewCartComponent,
    UserService,
    YoutubeApiService,
    CloverAuthenticationService,
    YoutubePlayerService,
    CartService,
    PlaylistStoreService,
    ServerRequestService,
    NotificationService,
    BrowserNotificationService,
    addTipComponent,
    paymentReceiptComponent,
    PrinterListComponent,
    {provide: HTTP_INTERCEPTORS, useClass: JwtInterceptor, multi: true},
    {provide: HTTP_INTERCEPTORS, useClass: ErrorInterceptor, multi: true}

  ],
  bootstrap: [AppComponent]
})

export class AppModule {
}
export function HttpLoaderFactory(http: HttpClient) {
  return new TranslateHttpLoader(http);
}

declare module '@angular/core' {

  interface ModuleWithProviders<T = any> {
    ngModule: Type<T>;
    providers?: Provider[];
  }
}

Body:
This was resolved by changing

"ngx-chess-board": "^2.0.7",

to:

"ngx-chess-board": "2.0.7",


问:
.net satellite resource dll editor
Is there any free resource editor to edit compiled .net managed assemblies?

One of my clients requested to edit texts on windows forms controls of their app. I put all texts(strings) in a separate resource file. I can edit them in Visual studio but for the client to edit them, I guess they must be able to decompile the dll and edit resulted rc files and then compile them back again which I am not going to suggest cause it's too much hassle.

I was wondering if any resource file editor exists that can do it automatically.

答:
A resource editor that you can try is
http://www.zeta-resource-editor.com/
This is used mostly for multi language resources but its free and lets you edit the resource files, you would just have to complie the resource afterwards</p>

Title: .net satellite resource dll editor


问:
react-native "Export statement may only appear at top level" was working fine until cleaning project how do I find out the issue?
I'm only seeing mention of changes in babelrc etc. online for this message.  I've tried to remove the dependency that gives me this error and it appears that then next dependency evaluated returns the same message.

The error is coming from any/all of my node_modules folder and the code is correct.  I'm guessing something has changed w/ versions of something in my dev dependencies but not sure how to track it down...

I'm using RN 61.5 old I know but this is a production env and can't update atm.  Any help on where to look to find the issue please?

```<code>    "dependencies": {
        "@nartc/react-native-barcode-mask": "1.1.5",
        "@react-native-community/async-storage": "1.7.1",
        "@react-native-community/masked-view": "0.1.5",
        "@react-native-community/netinfo": "6.0.2",
        "@react-native-community/picker": "1.6.5",
        "@reduxjs/toolkit": "1.2.3",
        "clone": "2.1.2",
        "expo-keep-awake": "8.0.0",
        "expo-linear-gradient": "8.0.0",
        "lodash": "4.17.19",
        "moment": "2.24.0",
        "react": "16.9.0",
        "react-native": "0.61.5",
        "react-native-ble-manager": "git+https:/react-native-ble-manager.git#mergeUpstreamv750",
        "react-native-camera": "3.15.1",
        "react-native-date-picker": "2.7.12",
        "react-native-device-battery": "2.0.0",
        "react-native-device-info": "5.5.1",
        "react-native-elements": "^3.4.2",
        "react-native-exception-handler": "^2.10.10",
        "react-native-fs": "2.16.4",
        "react-native-gesture-handler": "1.5.3",
        "react-native-json-tree": "^1.3.0",
        "react-native-lock-task": "1.0.8",
        "react-native-masked-text": "1.13.0",
        "react-native-modal": "11.5.4",
        "react-native-reanimated": "1.4.0",
        "react-native-restart": "0.0.17",
        "react-native-safe-area-context": "0.6.2",
        "react-native-screens": "2.0.0-alpha.23",
        "react-native-svg": "12.0.3",
        "react-native-unimodules": "0.7.0",
        "react-native-vector-icons": "6.6.0",
        "react-native-version-number": "0.3.6",
        "react-navigation": "4.1.1",
        "react-navigation-animated-switch": "0.5.5",
        "react-navigation-header-buttons": "3.0.5",
        "react-navigation-hooks": "1.1.0",
        "react-navigation-stack": "2.0.13",
        "react-redux": "7.1.3",
        "redux": "4.0.5",
        "redux-saga": "1.1.3",
        "redux-storage": "4.1.2",
        "redux-storage-engine-reactnativeasyncstorage": "1.0.7",
        "reselect": "4.0.0",
        "sedcommon": "git+https://sedcommon.git#p2.3.6",
        "semver": "7.3.2",
        "socket.io-client": "4.1.3",
        "styled-components": "5.0.0",
        "ts-optchain": "0.1.8"
    },
    "devDependencies": {
        "@babel/core": "^7.7.7",
        "@babel/runtime": "^7.7.7",
        "@carimus/metro-symlinked-deps": "^1.1.0",
        "@react-native-community/eslint-config": "^0.0.6",
        "@types/jest": "~26.0.13",
        "@types/lodash": "^4.14.153",
        "@types/node": "^14.0.6",
        "@types/react": "^16.9.17",
        "@types/react-native": "^0.60.30",
        "@types/react-navigation": "^3.4.0",
        "@types/react-redux": "^7.1.7",
        "@types/react-test-renderer": "^16.9.1",
        "@types/socket.io": "^2.1.4",
        "@types/styled-components": "^4.4.2",
        "@typescript-eslint/eslint-plugin": "^2.26.0",
        "@typescript-eslint/parser": "^2.26.0",
        "apk-parser": "^0.1.7",
        "babel-jest": "^24.9.0",
        "babel-plugin-dynamic-import-node": "^2.3.0",
        "babel-plugin-module-resolver": "^4.0.0",
        "eslint": "^6.8.0",
        "eslint-config-prettier": "^6.10.1",
        "eslint-plugin-prettier": "^3.1.2",
        "eslint-plugin-react": "^7.19.0",
        "husky": "^4.2.3",
        "jest": "^26.4.2",
        "js-yaml": "^4.1.0",
        "jshint": "^2.11.0-rc1",
        "metro-react-native-babel-preset": "^0.56.4",
        "node-apk-parser": "^0.2.3",
        "prettier": "^2.0.5",
        "prettier-eslint": "^9.0.1",
        "react-native-typescript-transformer": "^1.2.13",
        "react-test-renderer": "16.9.0",
        "redux-devtools-extension": "^2.13.8",
        "redux-perf-middleware": "1.2.2",
        "simple-git": "^2.44.0",
        "ts-jest": "^26.3.0",
        "ts-node": "^10.2.0",
        "typescript": "^4.4.4"
    },
</code>```

My current babel.conig.js

```<code>module.exports = (api) => {
    api.cache.using(() => process.env.NODE_ENV);

    const presets = ['module:metro-react-native-babel-preset'];
    const plugins = [
        ['dynamic-import-node'],
        [
            'module-resolver',
            {
                root: ['./src'],
                extensions: ['.js', '.ts', '.tsx', '.ios.js', '.android.js'],
                alias: {
                    // when changed here also change in tsconfig.json
                    actions: './src/actions',
                    components: './src/components',
                    constants: './src/constants',
                    images: './src/images',
                    lib: './src/lib',
                    reducers: './src/reducers',
                    sagas: './src/sagas',
                    screens: './src/screens',
                    utils: './src/utils',
                    types: './src/types',
                },
            },
        ],
    ];

    return {
        presets,
        plugins,
    };
};

</code>```

答: we decided to take the big plunge. upgrade the project from rn 61.5 to 67! it only took 2 days ;) wish we would have started there...</p>

Body:
I'm only seeing mention of changes in babelrc etc. online for this message.  I've tried to remove the dependency that gives me this error and it appears that then next dependency evaluated returns the same message.

The error is coming from any/all of my node_modules folder and the code is correct.  I'm guessing something has changed w/ versions of something in my dev dependencies but not sure how to track it down...

I'm using RN 61.5 old I know but this is a production env and can't update atm.  Any help on where to look to find the issue please?

    "dependencies": {
        "@nartc/react-native-barcode-mask": "1.1.5",
        "@react-native-community/async-storage": "1.7.1",
        "@react-native-community/masked-view": "0.1.5",
        "@react-native-community/netinfo": "6.0.2",
        "@react-native-community/picker": "1.6.5",
        "@reduxjs/toolkit": "1.2.3",
        "clone": "2.1.2",
        "expo-keep-awake": "8.0.0",
        "expo-linear-gradient": "8.0.0",
        "lodash": "4.17.19",
        "moment": "2.24.0",
        "react": "16.9.0",
        "react-native": "0.61.5",
        "react-native-ble-manager": "git+https:/react-native-ble-manager.git#mergeUpstreamv750",
        "react-native-camera": "3.15.1",
        "react-native-date-picker": "2.7.12",
        "react-native-device-battery": "2.0.0",
        "react-native-device-info": "5.5.1",
        "react-native-elements": "^3.4.2",
        "react-native-exception-handler": "^2.10.10",
        "react-native-fs": "2.16.4",
        "react-native-gesture-handler": "1.5.3",
        "react-native-json-tree": "^1.3.0",
        "react-native-lock-task": "1.0.8",
        "react-native-masked-text": "1.13.0",
        "react-native-modal": "11.5.4",
        "react-native-reanimated": "1.4.0",
        "react-native-restart": "0.0.17",
        "react-native-safe-area-context": "0.6.2",
        "react-native-screens": "2.0.0-alpha.23",
        "react-native-svg": "12.0.3",
        "react-native-unimodules": "0.7.0",
        "react-native-vector-icons": "6.6.0",
        "react-native-version-number": "0.3.6",
        "react-navigation": "4.1.1",
        "react-navigation-animated-switch": "0.5.5",
        "react-navigation-header-buttons": "3.0.5",
        "react-navigation-hooks": "1.1.0",
        "react-navigation-stack": "2.0.13",
        "react-redux": "7.1.3",
        "redux": "4.0.5",
        "redux-saga": "1.1.3",
        "redux-storage": "4.1.2",
        "redux-storage-engine-reactnativeasyncstorage": "1.0.7",
        "reselect": "4.0.0",
        "sedcommon": "git+https://sedcommon.git#p2.3.6",
        "semver": "7.3.2",
        "socket.io-client": "4.1.3",
        "styled-components": "5.0.0",
        "ts-optchain": "0.1.8"
    },
    "devDependencies": {
        "@babel/core": "^7.7.7",
        "@babel/runtime": "^7.7.7",
        "@carimus/metro-symlinked-deps": "^1.1.0",
        "@react-native-community/eslint-config": "^0.0.6",
        "@types/jest": "~26.0.13",
        "@types/lodash": "^4.14.153",
        "@types/node": "^14.0.6",
        "@types/react": "^16.9.17",
        "@types/react-native": "^0.60.30",
        "@types/react-navigation": "^3.4.0",
        "@types/react-redux": "^7.1.7",
        "@types/react-test-renderer": "^16.9.1",
        "@types/socket.io": "^2.1.4",
        "@types/styled-components": "^4.4.2",
        "@typescript-eslint/eslint-plugin": "^2.26.0",
        "@typescript-eslint/parser": "^2.26.0",
        "apk-parser": "^0.1.7",
        "babel-jest": "^24.9.0",
        "babel-plugin-dynamic-import-node": "^2.3.0",
        "babel-plugin-module-resolver": "^4.0.0",
        "eslint": "^6.8.0",
        "eslint-config-prettier": "^6.10.1",
        "eslint-plugin-prettier": "^3.1.2",
        "eslint-plugin-react": "^7.19.0",
        "husky": "^4.2.3",
        "jest": "^26.4.2",
        "js-yaml": "^4.1.0",
        "jshint": "^2.11.0-rc1",
        "metro-react-native-babel-preset": "^0.56.4",
        "node-apk-parser": "^0.2.3",
        "prettier": "^2.0.5",
        "prettier-eslint": "^9.0.1",
        "react-native-typescript-transformer": "^1.2.13",
        "react-test-renderer": "16.9.0",
        "redux-devtools-extension": "^2.13.8",
        "redux-perf-middleware": "1.2.2",
        "simple-git": "^2.44.0",
        "ts-jest": "^26.3.0",
        "ts-node": "^10.2.0",
        "typescript": "^4.4.4"
    },

My current babel.conig.js

module.exports = (api) => {
    api.cache.using(() => process.env.NODE_ENV);

    const presets = ['module:metro-react-native-babel-preset'];
    const plugins = [
        ['dynamic-import-node'],
        [
            'module-resolver',
            {
                root: ['./src'],
                extensions: ['.js', '.ts', '.tsx', '.ios.js', '.android.js'],
                alias: {
                    // when changed here also change in tsconfig.json
                    actions: './src/actions',
                    components: './src/components',
                    constants: './src/constants',
                    images: './src/images',
                    lib: './src/lib',
                    reducers: './src/reducers',
                    sagas: './src/sagas',
                    screens: './src/screens',
                    utils: './src/utils',
                    types: './src/types',
                },
            },
        ],
    ];

    return {
        presets,
        plugins,
    };
};


问:
I'm getting error "Class 'Predis\Client' not found" in Laravel 5.2
I want to using Redis in laravel 5.2 however, I'm getting error such a Class 'Predis\Client' not found, How I can solve it. </p>

答:
It's easy to just look at the path and filename Examples that exist Most of the path name or autoload file name are not spelled correctly

1-go to https://github.com/predis/predis/tags

2-create folder in host by name redis

3-download predis and upload to your website dir (www) in redis

4- create index.php out of the predis folder(redis)

5- past this code for test in index.php

```<code>require 'redis/Autoload.php';
Predis\Autoloader::register();
$client = new Predis\Client();
$client->set('foo', 'bar');
$value = $client->get('foo');
echo $value;
</code>```

Body:
It's easy to just look at the path and filename Examples that exist Most of the path name or autoload file name are not spelled correctly

1-go to https://github.com/predis/predis/tags

2-create folder in host by name redis

3-download predis and upload to your website dir (www) in redis

4- create index.php out of the predis folder(redis)

5- past this code for test in index.php

require 'redis/Autoload.php';
Predis\Autoloader::register();
$client = new Predis\Client();
$client->set('foo', 'bar');
$value = $client->get('foo');
echo $value;