这是我登录Facebook的代码.
mLoginButton = (LoginButton) findViewById(R.id.login);
// restore session if one exists
SessionStore.restore(Utility.mFacebook, this);
SessionEvents.addAuthListener(new FbAPIsAuthListener());
SessionEvents.addLogoutListener(new FbAPIsLogoutListener());
/*
* Source Tag: login_tag
*/
mLoginButton.init(this, AUTHORIZE_ACTIVITY_RESULT_CODE, Utility.mFacebook, permissions);
if (Utility.mFacebook.isSessionValid()) {
requestUserData();
}
public class FbAPIsAuthListener implements AuthListener {
//@Override
public void onAuthSucceed() {
requestUserData();
}
//@Override
public void onAuthFail(String error) {
mText.setText("Login Failed: " + error);
}
}
/*
* The Callback for notifying the application when log out starts and
* finishes.
*/
public class FbAPIsLogoutListener implements LogoutListener { …Run Code Online (Sandbox Code Playgroud) 我见过一些扫描图像并回复文本的应用程序.这个或没有图书馆吗?我的意思是扫描文本或拍照并识别字符?
我搜索过OCR,但是我没有找到材料以便阅读.你能帮帮我吗?
这些是我的声明.为什么它不识别签名类型?我导入了numeric_std库,在文档中我看到它支持signed和unsigned.这有什么不对?
library IEEE;
use IEEE.STD_LOGIC_1164.all;
use work.my_package.all;
entity landmark_1 is
generic
(data_length :integer := 8;
address_length:integer:=3 );
port ( clk:in std_logic;
vin:in std_logic;
rst:in std_logic;
flag: in std_logic;
din: in signed(data_length -1 downto 0)
done: out std_logic
);
end landmark_1;
Run Code Online (Sandbox Code Playgroud)