小编Ahm*_*şli的帖子

硒谷歌登录块

我在使用 Google 登录时遇到问题。我想登录我的帐户,但 Google 说不允许自动化驱动程序登录。

我正在寻找解决方案。是否可以获取普通 Firefox/Chrome 的 cookie 并将其加载到 ChromeDriver/GeckoDriver 中?我认为这可以是一个解决方案。但我不确定这是否可能..

正在寻找解决方案...

在此处输入图片说明

另外,我想添加一个快速解决方案。我通过使用我的旧验证帐户之一解决了这个问题。这对你来说是一个快速的解决方案。

selenium google-chrome selenium-chromedriver selenium-webdriver geckodriver

29
推荐指数
4
解决办法
3万
查看次数

Captcha上的Python图像处理如何去除噪声

我对图像处理很陌生,我想做的是清除验证码中的噪音;

对于验证码,我有不同类型的验证码:

在此处输入图片说明

在此处输入图片说明

在此处输入图片说明

对于第一个我所做的是:

第一步

在此处输入图片说明

首先,我将每个不是黑色的像素转换为黑色。然后,我从图像中找到了一种噪声模式并将其删除。对于第一个验证码,很容易清除它,我找到了带有 tesseract 的文本。

但我正在为第二个和第三个寻找解决方案。

这一定是怎样的?我的意思是清除它的可能方法是什么?

这是我删除模式的方式:

def delete(searcher,h2,w2):
    h = h2
    w = w2
    search = searcher
    search = search.convert("RGBA")
    herear = np.asarray(search)
    bigar  = np.asarray(imgCropped)

    hereary, herearx = herear.shape[:2]
    bigary,  bigarx  = bigar.shape[:2]

    stopx = bigarx - herearx + 1
    stopy = bigary - hereary + 1

    pix = imgCropped.load()

    for x in range(0, stopx):
        for y in range(0, stopy):
            x2 = x + herearx
            y2 = y + hereary
            pic = bigar[y:y2, x:x2]
            test = …
Run Code Online (Sandbox Code Playgroud)

python ocr captcha tesseract image-processing

8
推荐指数
2
解决办法
1290
查看次数

无法获得隔离的 JDBC 连接:org.hibernate.exception.JDBCConnectionException

我面临这个问题 2 小时。

问题是我还有其他课程运行良好。我不知道为什么当前班级会发生此错误。

org.hibernate.exception.JDBCConnectionException: unable to obtain isolated JDBC connection
Caused by: java.sql.SQLTransientConnectionException: HikariPool-1 - Connection is not available, request timed out after 351ms.
Run Code Online (Sandbox Code Playgroud)

但该代码适用于其他表(其他类)。

直到今天它都运行良好。有没有人遇到过这个问题?

2020-03-13 13:52:25,392 [main] WARN  com.zaxxer.hikari.HikariConfig -ScraperPool - idleTimeout is less than 10000ms, setting to default 600000ms.
2020-03-13 13:52:25,400 [main] DEBUG com.zaxxer.hikari.HikariConfig -ScraperPool - configuration:
2020-03-13 13:52:25,406 [main] DEBUG com.zaxxer.hikari.HikariConfig -allowPoolSuspension.............false
2020-03-13 13:52:25,407 [main] DEBUG com.zaxxer.hikari.HikariConfig -autoCommit......................true
2020-03-13 13:52:25,407 [main] DEBUG com.zaxxer.hikari.HikariConfig -catalog.........................none
2020-03-13 13:52:25,408 [main] DEBUG com.zaxxer.hikari.HikariConfig -connectionInitSql...............none
2020-03-13 13:52:25,408 [main] DEBUG com.zaxxer.hikari.HikariConfig …
Run Code Online (Sandbox Code Playgroud)

java mysql connection hibernate hikaricp

5
推荐指数
1
解决办法
598
查看次数

避免使用应用程序发送自动点击

我在 Play 商店上有一个点击游戏(Flutter),一些用户正在使用自动点击应用程序来赢得应用程序内的所有游戏。

问题是因为该用户,我的 Admob 帐户受到限制。因为他们在玩游戏时也会点击广告。Google 限制了我的广告。

我阻止了应用程序内的模拟器,并检查它是否是物理设备。

有什么办法可以阻止这种点击应用程序吗?

如何防止我的应用程序受到这些点击?

谢谢..

dart flutter

5
推荐指数
1
解决办法
739
查看次数

Android RecyclerView添加分页

我为我的应用程序创建了一个RecyclerView,并试图找到一种方法来阻止大量请求,我想使用进度条以10乘10的方式获得结果。我的服务器将在每次向下滚动到最后一项时将结果10乘10发送。

    public class ProfileActivityFriendsList extends AppCompatActivity {
        String[] names={"Ander Herera","David De Gea","Michael Carrick","Juan Mata","Diego Costa","Oscar"};
        String[] positions={"Midfielder","GoalKeeper", "Midfielder","Playmaker","Striker","Playmaker"};
        String[] urls={"Midfielder","GoalKeeper", "Midfielder","Playmaker","Striker","Playmaker"};
        int[] images = {R.mipmap.ic_launcher,R.mipmap.ic_launcher, R.mipmap.ic_launcher,R.mipmap.ic_launcher,R.mipmap.ic_launcher,R.mipmap.ic_launcher};

        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_profile_friends_list);

            Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
            setSupportActionBar(toolbar);

            //GET RECYCLER
            RecyclerView rv = (RecyclerView) findViewById(R.id.myRecycler);
            //SET LAYOUT
            rv.setLayoutManager(new LinearLayoutManager(this));
            rv.setItemAnimator(new DefaultItemAnimator());
            //ADAPTER
            MyAdapter adapter = new MyAdapter(this, names, positions, urls, images);
            rv.setAdapter(adapter);
        }
} 
Run Code Online (Sandbox Code Playgroud)

这是我的适配器类。

public class MyAdapter extends RecyclerView.Adapter<MyHolder> {
    Context c;
    String[] names;
    String[] positions;
    String[] …
Run Code Online (Sandbox Code Playgroud)

android android-recyclerview

3
推荐指数
2
解决办法
7145
查看次数

Node.js Express服务器端结构

我正在尝试为我的服务器及其结构找到解决方案.我想要做的就是分开.

app.post("/login", function(request, response) {  
});

app.post("/register", function(request, response) {  
});

app.get("/", function(request, response) {  
});
Run Code Online (Sandbox Code Playgroud)

到不同的文件.在我的例子中,他们都站在一个名为"server.js"的文件中.我怎样才能将它们分开来更好地处理它们?并同时运行它们.我搜索了这种情况,发现了不同类型的这种情况.但无法得到明确的答案.

javascript node.js express

1
推荐指数
1
解决办法
439
查看次数

Spring Boot 创建 .jar 文件(Maven)

我本来不想问这个问题,但我尝试了 StackOverFlow 上所有可能的解决方案。我尝试过的所有代码的问题是:

在此输入图像描述

这是我的 pom.xml:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.6.6</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.ahmetbesli</groupId>
    <artifactId>nobet</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>jar</packaging>
    <name>nobetci</name>
    <description>Demo project for Spring Boot</description>
    <properties>
        <java.version>11</java.version>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
        </dependency>

        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
            <version>RELEASE</version>
            <scope>compile</scope>
        </dependency>

        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.12</version>
        </dependency>
        <dependency>
            <groupId>org.json</groupId>
            <artifactId>json</artifactId>
            <version>20190722</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

</project>
Run Code Online (Sandbox Code Playgroud)

我正在尝试使用 Intellij 构建工件创建 jar 文件。 …

java intellij-idea maven spring-boot

1
推荐指数
1
解决办法
6611
查看次数