小编iru*_*eru的帖子

iwconfig - 通过终端上的wifi连接网络

关于覆盆子pi

irukeru@raspberrypi ~ $ sudo iwconfig wlan0 mode managed
irukeru@raspberrypi ~ $ sudo iwconfig wlan0 channel 11
irukeru@raspberrypi ~ $ sudo iwconfig wlan0 essid linksys
irukeru@raspberrypi ~ $ sudo iwconfig wlan0 key xxxxxxx
Error for wireless request "Set Encode" (8B2A) :
    invalid argument "xxxxxxx".
Run Code Online (Sandbox Code Playgroud)

我也试过了

irukeru@raspberrypi ~ $ sudo iwconfig wlan0 key s:xxxxxxx
Error for wireless request "Set Encode" (8B2A) :
    SET failed on device wlan0 ; Invalid argument.
Run Code Online (Sandbox Code Playgroud)

我是否需要编写密钥的bash代码?

linux terminal wifi raspberry-pi raspbian

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

在c中使用libtar库

我正在尝试使用c创建一个tar文件.我无法使用的原因

system("tar -cvf xxxx.tar xxxx");

我的代码是:

#include <stdio.h>
#include <libtar.h>
#include <fcntl.h>

int main(void) {

        TAR *pTar;

        char *tarFilename = "file.tar";
        char *srcDir = "directory";

        char *extractTo = ".";
        tar_open(&pTar, tarFilename, NULL, O_WRONLY | O_CREAT, 0644, TAR_GNU);
        tar_append_tree(pTar, srcDir, extractTo);
        tar_close(pTar);
        return (0);

}
Run Code Online (Sandbox Code Playgroud)

运行此代码后,当我想解压缩时

tar -xvf file.tar
Run Code Online (Sandbox Code Playgroud)

我收到了一个错误

tar: This does not look like a tar archive
tar: Exiting with failure status due to previous errors
Run Code Online (Sandbox Code Playgroud)

我的c代码有什么问题?

c linux tar

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

editText setOnFocusChangeListener出错

试图使用setOnFocusChangeListener

mMessageBox.setOnFocusChangeListener(new OnFocusChangeListener() {

    @Override
    public void onFocusChange(View v, boolean hasFocus) {
        // TODO Auto-generated method stub

    }
});
Run Code Online (Sandbox Code Playgroud)

但是当我在onCreate函数中使用此函数时,eclipse会给出错误

Multiple markers at this line
    - The method setOnFocusChangeListener(View.OnFocusChangeListener) in the type View is not applicable for the arguments (new 
     OnFocusChangeListener(){})
    - OnFocusChangeListener cannot be resolved to a type
Run Code Online (Sandbox Code Playgroud)

是因为我在清单文件中使用的最小sdk?我在清单文件中的sdk选项是

<uses-sdk
    android:minSdkVersion="9"
    android:targetSdkVersion="17" />
Run Code Online (Sandbox Code Playgroud)

java android

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

黑莓模拟器网络错误不足

我正在尝试为黑莓做一个应用程序在黑莓地图上做一些思考.当我开始在smilator上调试时,由于网络覆盖不足而导致错误.

我在它的浏览器上试过google.com,但它确实有效!但在我的应用程序上它提供的网络错误不足.

这个问题怎么解决?

blackberry java-me blackberry-simulator blackberry-maps

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