Category Archives: How to Fix

Error: Gradle project sync failed. Please fix your project and try again.

download a demo that looks like this

1 first check if gradle downloaded

if the following text prompt is not downloaded, it may be caused by a network problem

Gradle sync failed: Connection timed out: connect. If you are behind an HTTP proxy, please configure the proxy settings either in IDE or Gradle.

2 first checks if the androidmanifest.xml configuration file is missing the interface pointing to

if you’ve done both of those things, and you haven’t done them properly, then restart it and take a look at

3 restart

, in general the most likely problems are 1 and 3,

How to Fix error performing isolated work; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarE

introduction
The

error is simple, but make a note of it and help someone who needs help

background programming today, suddenly reported an error, the complete error message is as follows: </p b>

org.springframework.dao.InvalidDataAccessResourceUsageException: error performing isolated work; SQL [n/a]; nested exception is org.hibernate.exception.SQLGrammarException: error performing isolated work

	at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:279)
	at org.springframework.orm.jpa.vendor.HibernateJpaDialect.translateExceptionIfPossible(HibernateJpaDialect.java:253)
	at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.translateExceptionIfPossible(AbstractEntityManagerFactoryBean.java:527)
	at org.springframework.dao.support.ChainedPersistenceExceptionTranslator.translateExceptionIfPossible(ChainedPersistenceExceptionTranslator.java:61)
	at org.springframework.dao.support.DataAccessUtils.translateIfNecessary(DataAccessUtils.java:242)
	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:153)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.data.jpa.repository.support.CrudMethodMetadataPostProcessor$CrudMethodMetadataPopulatingMethodInterceptor.invoke(CrudMethodMetadataPostProcessor.java:135)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:93)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.data.repository.core.support.SurroundingTransactionDetectorMethodInterceptor.invoke(SurroundingTransactionDetectorMethodInterceptor.java:61)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:212)
	at com.sun.proxy.$Proxy99.save(Unknown Source)
	at com.imooc.repository.ProductCategoryRepositoryTest.saveTest(ProductCategoryRepositoryTest.java:36)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.springframework.test.context.junit4.statements.RunBeforeTestExecutionCallbacks.evaluate(RunBeforeTestExecutionCallbacks.java:74)
	at org.springframework.test.context.junit4.statements.RunAfterTestExecutionCallbacks.evaluate(RunAfterTestExecutionCallbacks.java:84)
	at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:75)
	at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:86)
	at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:84)
	at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:251)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:97)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
	at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
	at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:363)
	at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:190)
	at org.junit.runner.JUnitCore.run(JUnitCore.java:137)
	at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)
	at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:33)
	at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:230)
	at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:58)
Caused by: org.hibernate.exception.SQLGrammarException: error performing isolated work
	at org.hibernate.exception.internal.SQLExceptionTypeDelegate.convert(SQLExceptionTypeDelegate.java:63)
	at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
	at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:79)
	at org.hibernate.id.enhanced.TableStructure$1.getNextValue(TableStructure.java:125)
	at org.hibernate.id.enhanced.NoopOptimizer.generate(NoopOptimizer.java:40)
	at org.hibernate.id.enhanced.SequenceStyleGenerator.generate(SequenceStyleGenerator.java:482)
	at org.hibernate.event.internal.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:123)
	at org.hibernate.event.internal.DefaultPersistEventListener.entityIsTransient(DefaultPersistEventListener.java:192)
	at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:135)
	at org.hibernate.event.internal.DefaultPersistEventListener.onPersist(DefaultPersistEventListener.java:62)
	at org.hibernate.internal.SessionImpl.firePersist(SessionImpl.java:800)
	at org.hibernate.internal.SessionImpl.persist(SessionImpl.java:785)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:308)
	at com.sun.proxy.$Proxy93.persist(Unknown Source)
	at org.springframework.data.jpa.repository.support.SimpleJpaRepository.save(SimpleJpaRepository.java:489)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.springframework.data.repository.core.support.RepositoryComposition$RepositoryFragments.invoke(RepositoryComposition.java:359)
	at org.springframework.data.repository.core.support.RepositoryComposition.invoke(RepositoryComposition.java:200)
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$ImplementationMethodExecutionInterceptor.invoke(RepositoryFactorySupport.java:644)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:608)
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.lambda$invoke$3(RepositoryFactorySupport.java:595)
	at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.invoke(RepositoryFactorySupport.java:595)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:59)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:294)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:98)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:186)
	at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:139)
	... 40 more
Caused by: java.sql.SQLSyntaxErrorException: Table 'sell.hibernate_sequence' doesn't exist
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:974)
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1024)
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
	at org.hibernate.id.enhanced.TableStructure.executeQuery(TableStructure.java:216)
	at org.hibernate.id.enhanced.TableStructure.access$300(TableStructure.java:46)
	at org.hibernate.id.enhanced.TableStructure$1$1.execute(TableStructure.java:138)
	at org.hibernate.id.enhanced.TableStructure$1$1.execute(TableStructure.java:126)
	at org.hibernate.jdbc.WorkExecutor.executeReturningWork(WorkExecutor.java:55)
	at org.hibernate.jdbc.AbstractReturningWork.accept(AbstractReturningWork.java:34)
	at org.hibernate.resource.transaction.backend.jdbc.internal.JdbcIsolationDelegate.delegateWork(JdbcIsolationDelegate.java:57)
	... 74 more

solution 1:

as you can see from the error message, when inserting data, you need to check the table structure fields to see which fields are missing </p b>

Reset power on password of lightning simulator

**

lightning simulator reset boot password

download the adb

clear the password
1, we open the CMD window (Ctrl+R)

2. Open the terminal, we first link the simulator and input
, adb connect ****** (device name and IP). If you can’t remember the IP, restart the simulator, and then proceed directly to the third step

3, use devices to view the device
adb devices

4. Use the following command to get the root permission of the simulator
adb root

5. After obtaining root permission, use remount name to login
adb remount

6. After successful login, enter into the shell side
adb shell
and enter into the shell side under /data/system directory

7, finally delete the password operation
rm *. Key

8. After deletion, close the emulator and reopen it. The password is gone

Summary of k8s single master cluster deployment

fix warning:

1.[WARNING Firewalld]: firewalld is active, please ensure ports [6443 10250] are open or your cluster may not function correctly

answer: systemctl stop firewalld.service

2.[WARNING Service-Docker]: docker service is not enabled, please run ‘systemctl enable docker.service’

Systemctl enable docker.service

answer: systemctl enable docker.service

3.[WARNING IsDockerSystemdCheck]: detected “cgroupfs” as the Docker cgroup driver. The recommended driver is “systemd”. Please follow the guide at https://kubernetes.io/docs/setup/cri/

a:

official documentation indicates that changing the Settings so that the container runtime and kubelet use systemd as the cgroup driver makes the system more stable. Notice that under Docker, you set the option native. Cgroupdriver = Systemd.

two solutions:

1. Edit docker configuration file /etc/docker/daemon.json

1

2

3

“exec-opts”: [“native.cgroupdriver=systemd”]

systemctl daemon-reload

systemctl restart docker

2, edit the/usr/lib/systemd/system/docker. Service

1

2

3

ExecStart=/usr/bin/dockerd -H fd:// –containerd=/run/containerd/containerd.sock –exec-opt native.cgroupdriver=systemd

systemctl daemon-reload

systemctl restart docker

command:

vi /usr/lib/systemd/system/docker.service

–exec-opt native. Cgroupdriver =systemd (append)

After setting

, you can see that the Cgroup Driver is systemd

through the docker info command

1

docker info | grep Cgroup

4.[WARNING FileExisting-tc]: tc not found in system path

solution:

cannot be installed with yum, yum has a version, but has been unable to load down.

can be installed with yum, yum server is also this version:

yum command: yum install tc-y

note: the version is very important. I tried several versions. Only 5.3.0-1 works

download RPM package:

http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/iproute-tc-5.3.0-1.el8.x86_64.rpm

local installation:

yum localinstall – y iproute – tc – 5.3.0-1 RPM el8. X86_64.

5.[WARNING Hostname]: hostname “master” could not be reached

solution: see 6

6.[WARNING Hostname]: hostname “master”: lookup master on [fe80::1%ens33]:53: read udp [fe80::e0c:1711:9797:f6c7%ens33]:56921-> [fe80::1%ens33]:53: i/o timeout
error execution phase preflight: [preflight] Some fatal errors occurred:

solution:

The

command changes the host name

hostnamectl set-hostname k8s

change/etc/hostname

echo k8s > /etc/hostname

modifies the example

cat > > /etc/hosts < < EOF
192.168.100.4 master
192.168.100.5 node1
192.168.100.6 node2
EOF

, where IP is the address of the master node and the node node assigned to you

cleanup command:

sudo kubeadm reset

if

$kubeadm init \
– apiserver – advertise – address = 192.168.44.146 \
– image – repository registry.aliyuncs.com/google_containers \
– kubernetes – version v1.18.0 \
– service – cidr = 10.96.0.0/12 \
– pod – network – cidr = 10.244.0.0/16

that’s the step that’s going to go wrong, that’s the easiest step to go wrong. Master can’t boot up alive, so you can use this command.

caution, the test is nothing, it will not kill you (k8s) I am still a vegetable chicken, not only this command will bring side effects, but when the test, to solve the problem, it really works!

docker system prune -a

can be used to clean up disks, remove closed containers, useless data volumes, and networks

Example of public key signature and verification generated with fabric case

public and private keys generated by Fabric case

The

Fabric case generates public and private key pairs for nodes such as Peer, User, Admin, etc. Public and private keys are shown in the figure below.


example of signing and validating with public and private key pairs

Example code for signing and validating a message with the above public and private key pairs is shown below.

package main

import (
	"crypto/ecdsa"
	"crypto/rand"
	"crypto/sha256"
	"crypto/x509"
	"encoding/pem"
	"fmt"
	"io/ioutil"
)

func main() {
	msg := "hello, world"
	hash := sha256.Sum256([]byte(msg))
	msg2 := "Hello, world"
	hash2 := sha256.Sum256([]byte(msg2))

	privBytes, _ := ioutil.ReadFile("./priv_sk")
	blkPriv, _ := pem.Decode(privBytes)
	fmt.Println("priv_sk  type:", blkPriv.Type)
	key, _ := x509.ParsePKCS8PrivateKey(blkPriv.Bytes)
	ecdsaKey := key.(*ecdsa.PrivateKey)
	r, s, _ := ecdsa.Sign(rand.Reader, ecdsaKey, hash[:])

	certBytes, _ := ioutil.ReadFile("./cert.pem")
	blkCert, _ := pem.Decode(certBytes)
	fmt.Println("cert.pem type:", blkCert.Type)
	cert, _ := x509.ParseCertificate(blkCert.Bytes)
	pubkey := cert.PublicKey.(*ecdsa.PublicKey)
	ok := ecdsa.Verify(pubkey, hash[:], r, s)
	fmt.Println("verify hash(shoule be true):", ok)

	ok = ecdsa.Verify(pubkey, hash2[:], r, s)
	fmt.Println("verify hash2(shoule be false):", ok)
}

compiles and runs as shown below.

Why do we not need to write implementation classes in mybatis to get the objects we need

let’s say we need now we need a method
is all the information in the query table
we’ll write

@Override
public List<User> selectAll() {
    SqlSession sqlSession = factory.openSession();
    List<User> userList = sqlSession.selectList("com.tubai.dao.UserDao.selectAll");
    sqlSession.close();
    return userList;
}

is mainly through the sqlSession selectList to achieve the function

so how does Mybatis do this work for us?

pursue source

let’s start
in debug mode and step into

when this sentence is executed

userDao = sqlSession.getMapper(UserDao.class);

to

public <T> T getMapper(Class<T> type) {
    return this.configuration.getMapper(type, this);
}

next->

public <T> T getMapper(Class<T> type, SqlSession sqlSession) {
    return this.mapperRegistry.getMapper(type, sqlSession);
}

->

public <T> T getMapper(Class<T> type, SqlSession sqlSession) {
    MapperProxyFactory<T> mapperProxyFactory = (MapperProxyFactory)this.knownMappers.get(type);
    if (mapperProxyFactory == null) {
        throw new BindingException("Type " + type + " is not known to the MapperRegistry.");
    } else {
        try {
            return mapperProxyFactory.newInstance(sqlSession);
        } catch (Exception var5) {
            throw new BindingException("Error getting mapper instance. Cause: " + var5, var5);
        }
    }
}

we found that

was executed

return mapperProxyFactory.newInstance(sqlSession);

continue into ->

public T newInstance(SqlSession sqlSession) {
    MapperProxy<T> mapperProxy = new MapperProxy(sqlSession, this.mapperInterface, this.methodCache);
    return this.newInstance(mapperProxy);
}

->

protected T newInstance(MapperProxy<T> mapperProxy) {
    return Proxy.newProxyInstance(this.mapperInterface.getClassLoader(), new Class[]{this.mapperInterface}, mapperProxy);
}

here we find that the newProxyInstance method that calls the dynamic proxy
so let’s go straight to the third parameter

open the class MapperProxy

find the invoke method inside

public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
    try {
        if (Object.class.equals(method.getDeclaringClass())) {
            return method.invoke(this, args);
        }

        if (this.isDefaultMethod(method)) {
            return this.invokeDefaultMethod(proxy, method, args);
        }
    } catch (Throwable var5) {
        throw ExceptionUtil.unwrapThrowable(var5);
    }

    MapperMethod mapperMethod = this.cachedMapperMethod(method);
    return mapperMethod.execute(this.sqlSession, args);
}

finds that it finally calls

mapperMethod.execute(this.sqlSession, args);

open the source code for this method and continue

public Object execute(SqlSession sqlSession, Object[] args) {
    Object param;
    Object result;
    switch(this.command.getType()) {
    case INSERT:
        param = this.method.convertArgsToSqlCommandParam(args);
        result = this.rowCountResult(sqlSession.insert(this.command.getName(), param));
        break;
    case UPDATE:
        param = this.method.convertArgsToSqlCommandParam(args);
        result = this.rowCountResult(sqlSession.update(this.command.getName(), param));
        break;
    case DELETE:
        param = this.method.convertArgsToSqlCommandParam(args);
        result = this.rowCountResult(sqlSession.delete(this.command.getName(), param));
        break;
    case SELECT:
        if (this.method.returnsVoid() && this.method.hasResultHandler()) {
            this.executeWithResultHandler(sqlSession, args);
            result = null;
        } else if (this.method.returnsMany()) {
            result = this.executeForMany(sqlSession, args);
        } else if (this.method.returnsMap()) {
            result = this.executeForMap(sqlSession, args);
        } else if (this.method.returnsCursor()) {
            result = this.executeForCursor(sqlSession, args);
        } else {
            param = this.method.convertArgsToSqlCommandParam(args);
            result = sqlSession.selectOne(this.command.getName(), param);
        }
        break;
    case FLUSH:
        result = sqlSession.flushStatements();
        break;
    default:
        throw new BindingException("Unknown execution method for: " + this.command.getName());
    }

    if (result == null && this.method.getReturnType().isPrimitive() && !this.method.returnsVoid()) {
        throw new BindingException("Mapper method '" + this.command.getName() + " attempted to return null from a method with a primitive return type (" + this.method.getReturnType() + ").");
    } else {
        return result;
    }
}

in Case:SELECT we find

result = this.executeForMany(sqlSession, args);

let’s do

private <E> Object executeForMany(SqlSession sqlSession, Object[] args) {
    Object param = this.method.convertArgsToSqlCommandParam(args);
    List result;
    if (this.method.hasRowBounds()) {
        RowBounds rowBounds = this.method.extractRowBounds(args);
        result = sqlSession.selectList(this.command.getName(), param, rowBounds);
    } else {
        result = sqlSession.selectList(this.command.getName(), param);
    }

    if (!this.method.getReturnType().isAssignableFrom(result.getClass())) {
        return this.method.getReturnType().isArray() ? this.convertToArray(result) : this.convertToDeclaredCollection(sqlSession.getConfiguration(), result);
    } else {
        return result;
    }
}~

and finally we found

sqlSession.selectList

Derivation process of gradient descent method based on house price

recall that in the previous section, we introduced the house-price based modeling under a single variable, the cost function, and the design of the gradient descent method. In this section, we extended the problem to the generalization, and how to deduce the gradient descent process under the change of a single variable into a multiple variable.

As shown in the figure, the input features are (x1,x2,x3,x4)

The output feature of

is y

The total number of samples

is m

It’s

and we’re assuming that the fitting function is

, then we want to minimize the cost function, the solution of the parameter is shown in the figure

in order to understand the cost function when there are only two variables, the cost function is shown in the figure

X1 = size (0-2000)

X2 = bedroom (0-5)

by observing the left figure, we find that when x1 and x2 are greatly different, the cost function image is of thin and tall shape. In this case, the route of gradient descent to the optimal solution is more tortuous, that is, the regression is more difficult. When the parameters are relatively close, as shown in the right figure, the gradient descent route is closer to a linear line, that is, the gradient descent is easier.

so we need to scale the feature

scale to [0-1] feature/ the total of number

method 2 scales to [-1, 1] (feature – mean)/the total of number

, of course, as shown in the figure, if the parameters are not far apart, such as between [-3, 3], there is no need to scale the feature

in the previous section, we talked about the effect of a on regression in the case of gradient descent, and then we specifically discuss the value of a

through the previous observation, we found that in order to find the parameters of the hypothesis function, we need to update the parameters step by step, and then introduce another solution method (through mathematical reasoning method: normal equation, one step in place to find the optimal parameter)

let’s look at this formula, X is a row vector, (XTX) is an n by n matrix, and solving its inverse requires order n3 complexity, so we don’t use this method when we have more features.

C language string processing error warning, c4996, sprintf, predicted, c4996, strcpy, c4996, strcat

for declared C4996: ‘sprintf’ was declared deprecated or warning C4996: ‘strcpy’ was declared deprecated if used in vs2003, vs2005 or vs2019. Here are some ways to solve the problem. Method 1: call those non-standard functions with the suffix “_s” advocated by VS2005, followed by “_s”, as sprintf is changed to sprintf_s.
method 2: add #define _CRT_SECURE_NO_DEPRECATE or #pragma warning(disable:4996) at the beginning of the file, which isa method of ignoring warnings (which is rarely used).
method 3: dry substance set in the project properties (recommended).

is set in the Project property as follows:

opens project-settings –Resources– Preprocessor definitions for VC6:
, and adds _CRT_SECURE_NO_DEPRECATE and _SCL_SECURE_NO_DEPRECATE macros to
.

version for VS series:
open project, the project properties – configuration properties – C/C + + preprocessor definition pretreatment,
add _CRT_SECURE_NO_DEPRECATE and _SCL_SECURE_NO_DEPRECATE both macro.

Mybatis uses step-by-step lazy loading to cause abnormal JSON conversion. The interface 500 reports an error

Mybatis USES lazy step loading to cause json conversion exception

  1. anomaly description
    No serializer found for class org. Apache. Ibatis. Executor. Loader. The javassist. JavassistProxyFactory...

  2. solve abnormal * * *

    in distributed query each related bean class add annotation @ JsonIgnoreProperties (value = {} "handler")

  3. reason

    lazy loading is you have to use data will give you query 0, but 1 directly query object 2 into json string will lead to 3 results have not been query out of json4, This is what causes the interface 500 exception. Note : object does not load SQL query, only when output this object is use this data 0 will be 1 query 2 from the database and assign data to dependent object

    3

  4. 4

5