小编rei*_*eki的帖子

Java,如何使用shift来拆分String

如何用2字符拆分字符串shifting.例如;

我的字符串是= todayiscold

我的目标是: "to","od","da","ay","yi","is","sc","co","ol","ld"

但是这个代码:

Arrays.toString("todayiscold".split("(?<=\\G.{2})")));
Run Code Online (Sandbox Code Playgroud)

我得到:`"to","da","yi","co","ld"

有人帮忙吗?

java regex string split

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

如何在具有lazyload scrollLoader.js的站点中使用Jsoup

我有一个关于jsoup的问题,因为lazyload scrollLoader.js我用java代码到达网站,我只列出了50个图像名称jsoup.But在网站上向下滚动时,很多图像不断加载.我的问题是,是否可以将图像数量发布到用于Jsoup.connect() 从网站获取所有图像的网址?

这是网站:http://www.logowik.com

这是网站中脚本的用法:

<script type="text/javascript">

            $(document).ready(function(e) {
                CalculateColumns();
                recordCount = 50;
                groupID = "0";
                catID = "0";
                query = "";
                userEntry = "";
                groupInterval = "0";
                AddEvent(window, "resize", CalculateColumns);
                document["scrollLoader"] = new scrollLoader({evn : getGrids, seize : 1});
                document["scrollLoader"].DoScroll();
                addLogoClickEvent();
            });


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

我用url发布这个参数: http://www.logowik.com/index.php?g=1&groupID=1&catID=0 用这个url我得到50个图像,因为recordCount = 50in script.但我无法将此参数发布到网址.为了获得100张图片,我尝试了这个网址: http://www.logowik.com/index.php?recordCount=100&g=1&groupID=1&catID=0 但它没有效果.

谢谢

javascript java url post jsoup

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

Edittext更改宽度与动画

我想创建一个在其父级左侧对齐的edittext,当用户单击它时,edittext的width将增加到右侧.这是我使用的代码.但是当动画结束时,edittext宽度变为第一大小.
谁能帮我.?
有没有解决方案在动画中将"fillparent"设置为宽度的最终大小?

Animation scaleAnimation = new ScaleAnimation(0, -500, 1, 1);
scaleAnimation.setDuration(750);
editText.startAnimation(scaleAnimation);
Run Code Online (Sandbox Code Playgroud)

scaleAnimation.setFillAfter(true);在动画开始之前添加了但是我得到了这个; 在此输入图像描述

在750ms之后,edittext将转到第一个宽度.

xml android android-animation android-edittext

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