使用 windows cmd 我必须将大型程序放在编译上,这需要大量时间。每次要知道操作是否完成,我都必须一次又一次地检查 cmd。我想知道是否有办法对 cmd 进行更改,以便它通过播放声音或打开对话框等方式向我发出操作已完成的信号。
如果有人有任何想法,请分享
我想在我的Android应用程序中集成Facebook登录。我正在使用Facebook-sdk-4.4.0。使用LoginManager类方法。但是我在运行以下代码时遇到问题-
FacebookSdk.sdkInitialize(getApplicationContext());
callbackmanager = CallbackManager.Factory.create();
// Set permissions
LoginManager.getInstance().logInWithReadPermissions((Activity)getContext(), Arrays.asList("email", "public_profile"));
LoginManager.getInstance().registerCallback(callbackmanager,
new FacebookCallback<LoginResult>() {
@Override
public void onSuccess(LoginResult loginResult) {
GraphRequest request = GraphRequest.newMeRequest(
loginResult.getAccessToken(),
new GraphRequest.GraphJSONObjectCallback() {
@Override
public void onCompleted(JSONObject userInfo, GraphResponse graphResponse) {
try {
FacebookClientController.setUserId(userInfo.optString(ID));
FacebookClientController.setDisplayName(userInfo.optString(NAME));
FacebookClientController.setEmailAddress(userInfo.optString(EMAIL));
JSONObject picJson = userInfo.getJSONObject(PICTURE).getJSONObject("data");
FacebookClientController.setProfilePicUrl(picJson.optString("url"));
Log.d(LOGTAG, "\nUsername :" + FacebookClientController.getDisplayName());
Log.d(LOGTAG, "\nEmail :" + FacebookClientController.getEmailAddress());
Log.d(LOGTAG, "\nUserId :" + FacebookClientController.getUserId());
Log.d(LOGTAG, "\nProfilePicUrl :" + FacebookClientController.getProfilePicUrl());
} catch (JSONException e) {
Log.d(LOGTAG, "Json Error");
}
}
}
);
Bundle …Run Code Online (Sandbox Code Playgroud) 我想使用Google Drive android Api在Google云端硬盘上制作".ppt"文件的本地副本(外部存储).
我正在读一个字节并将其写入我的本地文件.但是当我试图打开它时显示该文件已损坏.请帮我解决我的问题.
final DriveFile file = Drive.DriveApi.getFile(getClient(), fileid);
final Metadata[] metadata = new Metadata[1];
file.getMetadata(getClient())
.setResultCallback(new ResultCallback<DriveResource.MetadataResult>() {
@Override
public void onResult(DriveResource.MetadataResult metadataResult) {
metadata[0] = metadataResult.getMetadata();
L.b(EditorWindow.this, metadata[0].getMimeType(), 0);
}
});
file.open(getClient(), DriveFile.MODE_READ_ONLY, null)
.setResultCallback(new ResultCallback<DriveApi.DriveContentsResult>() {
@Override
public void onResult(DriveApi.DriveContentsResult result) {
if (!result.getStatus().isSuccess()) {
L.c("Error in creating new file");
return;
}
DriveContents contents = result.getDriveContents();
String filename = metadata[0].getTitle();
File localFile = new File(Environment.getExternalStorageDirectory(), filename);
OutputStream out = null;
InputStream in = null;
try …Run Code Online (Sandbox Code Playgroud) android google-api google-api-java-client google-drive-android-api
我的问题是关于6502发布的解决方案[ c ++ stringstream太慢,如何加速? 他发布的解析Float方法很快,但是它没有给出大的double值的正确结果.
输入:
132.12345645645645
输出:
132.123
double parseFloat(const std::string& input){
const char *p = input.c_str();
if (!*p || *p == '?')
return NAN_D;
int s = 1;
while (*p == ' ') p++;
if (*p == '-') {
s = -1; p++;
}
double acc = 0;
while (*p >= '0' && *p <= '9')
acc = acc * 10 + *p++ - '0';
if (*p == '.') {
double k = 0.1;
p++;
while …Run Code Online (Sandbox Code Playgroud) 我正尝试使用https://developers.google.com/drive/android/files#making_modifications中提供的程序将数据附加到Google云端硬盘上的现有文件中
虽然控制正常但没有变化反映在文件中.
public void addHistoryEntry(final String location) {
final DriveFile file = Drive.DriveApi.getFile(getClient(), historyFileId);
file.open(getClient(), DriveFile.MODE_READ_WRITE, null)
.setResultCallback(new ResultCallback<DriveContentsResult>() {
@Override
public void onResult(DriveContentsResult driveContentsResult) {
if (!driveContentsResult.getStatus().isSuccess()) {
L.c("Problem in Writing to file");
return;
}
DriveContents contents = driveContentsResult.getDriveContents();
try {
ParcelFileDescriptor parcelFileDescriptor = contents.getParcelFileDescriptor();
FileInputStream fileInputStream = new FileInputStream(parcelFileDescriptor.getFileDescriptor());
// Read to the end of the file.
fileInputStream.read(new byte[fileInputStream.available()]);
// Append to the file.
FileOutputStream fileOutputStream = new FileOutputStream(parcelFileDescriptor
.getFileDescriptor());
Writer writer = new OutputStreamWriter(fileOutputStream);
writer.write(location+"\n"); …Run Code Online (Sandbox Code Playgroud) 我想知道是否可以使用R编程语言编写任何使用C编程语言编写的程序.我知道可以从R调用C代码,但我想知道我是否想从头开始编写R中的每个算法是否可行.
我想知道R是否具有实现用C语言编写的所有程序所需的所有构造?
android ×3
google-api ×2
c ×1
c++ ×1
cmd ×1
facebook ×1
parsing ×1
performance ×1
r ×1
windows ×1