小编Ale*_*gno的帖子

如何在python-curses中创建滚动菜单

有一种方法可以在python-curses中创建滚动菜单吗?我有一个记录列表,我从sqlite3中的查询得到,我必须在一个框中显示它们但它们超过最大行数:我可以制作一个小菜单来显示它们而不会使诅咒崩溃吗?

python curses terminal python-curses

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

将数组从js传递到android

您好,我有这个活动代码:

public class WebActivity extends ActionBarActivity {

    TextView number;

    WebView mWebView;
    CountDownTimer mTimer;

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_web);


        number = (TextView) findViewById(R.id.number);
        mTimer=new CountDownTimer(10000, 1000) {
            String[] myArray={"javascript:document.getElementById(\"utente\").value=\""+LoginActivity.username+"\"; document.getElementById(\"j_password\").value=\""+LoginActivity.password+"\"; document.querySelector(\"input[type=submit]\").click();","javascript:document.getElementById(\"menu-servizialunno:_idJsp14\").click();"};


            int currentIndex=0;
            public void onTick(long millisUntilFinished) {

                number.setText("seconds remaining: " + millisUntilFinished / 1000 + " " + (currentIndex + 1) + "/" + (myArray.length + 1));
            }
            //code comment start
            // i think this part could be …
Run Code Online (Sandbox Code Playgroud)

javascript arrays android android-webview

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