首页 » bug飞

最近发现blazy的一个小bug,原因竟然是一个属性导致的。

1.首先引入 js

<script src="//cdn.jsdelivr.net/blazy/latest/blazy.min.js"></script>
<script>
    window.bLazy = new Blazy({
        container: '.content',
        success: function (element) {
            console.log("Element loaded: ", element.nodeName);
        }
    });
</script>

2.然后加入要加载的图片,看起来没毛病吧,老铁,但是死活加载不出来。

<img class="b-lazy animate b-loaded" data-src="http://cdn.dinbror.dk/assets/blazy/02.jpg" >

3.然后我加入alt 属性,然后图片就出来了,来了,了。。。。

<img class="b-lazy animate b-loaded" data-src="http://cdn.dinbror.dk/assets/blazy/02.jpg"  alt="Lazy load images example 1b" >

4.这什么bug啊,必须有alt属性?反正分享出来给大家一个防坑指南

org.springframework.data.repository.query.ParameterOutOfBoundsException: Invalid parameter index! You seem to have declared too little query method parameters!

原因是没有少了个By,30后面必须有by

Flux<MySeries> findTop30ByOrderByRatingDesc();

Caused by: org.h2.jdbc.JdbcSQLDataException: Value too long for column """BRIEF"" VARCHAR(255) ,h2 生成的默认长度是255
[1]报错如下:
Caused by: org.h2.jdbc.JdbcSQLDataException: Value too long for column """BRIEF"" VARCHAR(255)": "STRINGDECODE('\uff1aDuenpatra\uff08pim\uff09\u5728\u5979\u7684\u7956\u6bcd\u4f4f\u5b85\u7684Prapim\u5f00\u4e86\u4e00\u5bb6\u81ea... (320)"; SQL statement:
insert into my_season (actors, brief, cat, cover, finish, pinyin, plays, rating, score, season_no, title, title_en, year, id) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [22001-199]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:455) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.message.DbException.getJdbcSQLException(DbException.java:427) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.message.DbException.get(DbException.java:205) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.table.Column.validateConvertUpdateSequence(Column.java:441) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.table.Table.validateConvertUpdateSequence(Table.java:824) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.command.dml.Insert.insertRows(Insert.java:175) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.command.dml.Insert.update(Insert.java:132) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.command.CommandContainer.update(CommandContainer.java:133) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.command.Command.executeUpdate(Command.java:267) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.jdbc.JdbcPreparedStatement.executeUpdateInternal(JdbcPreparedStatement.java:200) ~[h2-1.4.199.jar:1.4.199]
    at org.h2.jdbc.JdbcPreparedStatement.executeUpdate(JdbcPreparedStatement.java:154) ~[h2-1.4.199.jar:1.4.199]
    at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeUpdate(ProxyPreparedStatement.java:61) ~[HikariCP-3.2.0.jar:na]
    at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeUpdate(HikariProxyPreparedStatement.java) ~[HikariCP-3.2.0.jar:na]
    at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:175) ~[hibernate-core-5.3.9.Final.jar:5.3.9.Final]
    ... 89 common frames omitted

[2]解决办法,加上下面的声明,注意如果是内存中,需要重启,如果文件中,需要删除重新运行

@Column(length = 2000)
private String brief;

[3]或者


@Column(columnDefinition = "TEXT")
private String brief;

git commit 报 nothing added to commit but untracked files present ,git ,看来git add -A 和 git add . 的区别,git add . 只会加已经track的working tree,而git add -A 根路径下的全部

1.首先尝试,发现不起作用

git add .
git status

2.使用如下,发现其作用了

git add --all
  1. summary--- git add -A 等于 git add . 加 git add -u
    git add -A stages all changes

    git add . stages new files and modifications, without deletions

    git add -u stages modifications and deletions, without new files

archlinux 或者manjaro 这个因为源有问题,解决方案是替换可用的源

[1] 修改/etc/pacman.conf ,添加中科大的源,并且放到前面的位置

#USTC
[archlinuxcn]
     
SigLevel = Never
Server = https://mirrors.ustc.edu.cn/archlinuxcn/$arch

[2] 更新源

pacman -Syy

[3]也有可能是你的镜像源没有更新,上面两部不用做,直接运行下面一行,然后重新安装即可。

sudo pacman -Sy