如何在不包含stdio.h的情况下直接调用"printf"?
我在这里找到了一个有趣的教程:http:
//www.halcode.com/archives/2008/05/11/hello-world-c-and-gnu-as/
所以,这是我的尝试:
int main(){
char ss[] = "hello";
asm (
"pushl %ebp ;"
"movl %esp, %ebp ;"
"subl $4, %esp ;"
"movl $ss, (%esp) ;"
"call _printf ;"
"movl $0, %eax ;"
"leave ;"
"ret ;"
);
return 0;
}
Run Code Online (Sandbox Code Playgroud)
我正在使用MinGW 4.4,这是我如何编译它:
gcc -c hello.c -o hello.o
ld hello.o -o hello.exe C:/mingw/lib/crt2.o C:/mingw/lib/gcc/mingw32/4.4.0/crtbegin.o C: /mingw/lib/gcc/mingw32/4.4.0/crtend.o -LC:/mingw/lib/gcc/mingw32/4.4.0 -LC:/ mingw/lib -lmingw32 -lgcc -lmsvcrt -lkernel32
不幸的是,它失败了:
hello.o:hello.c :(.text + 0x26):对`ss'的未定义引用
如何解决这个问题?
这是一个显示交易的表格,使用DataTables实现。

$( document ).ready(function() {
var table = $('#tbl_transaksi').DataTable( {
"ajax": "data_transaksi.php",
"bPaginate":true,
"bProcessing": true,
"pageLength": 10,
"columns": [
{ mData: 'username' } ,
{ mData: 'fullname' },
{ mData: 'the_date' },
{ mData: 'amount', render: function ( data, type, row ) {
return "Rp " + data;
}
}
],
"dom": 'Bfrtip',
"buttons": [
'copy', 'csv', 'excel', 'pdf', 'print'
]
});
});
Run Code Online (Sandbox Code Playgroud)
有用。现在我想添加一个增强功能:使用印度尼西亚格式格式化金额(“jumlah”),例如1000000将显示为“ Rp 1.000.000 ”;
谷歌搜索将我指向渲染器。我将渲染部分添加到我的代码中,并且它不会更改格式。这里有什么问题?
我正在做一个自由职业项目。客户(让我们称他为foobar)要求我使用他的 github 帐户(我的工作 PC 运行 64 位 Windows 10,我安装了 git 2.15.0)上传代码。
所以我做了这些步骤。
转到凭据管理器 -> Windows 凭据 -> 通用凭据。删除了我的 Github 帐户
在源代码目录上,执行标准程序:
git init
git add *
git commit -m "first message"
git remote add origin https://github.com/foobar/supersecretproject.git
git push -u origin master
Run Code Online (Sandbox Code Playgroud)出现了一个 Github 凭据对话框。输入了他的证件。
稍等片刻,是的,代码已提交到 Github。打开 Github 页面,奇怪的是提交者是我,而不是foobar。奇怪的。如何解决这个问题?我想以foobar 的身份提交。
这是我第一次使用OkHttp,想先学习一些基本的代码。
所以这是代码,取自here:
package com.anta40.app.okconnectiontest;
import java.io.IOException;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.Response;
public class MainClass {
public static void main(String args[]) {
OkHttpClient okcl = new OkHttpClient();
Request request = new Request.Builder()
.url("http://www.vogella.com/index.html")
.build();
okcl.newCall(request).enqueue(new Callback() {
@Override
public void onFailure(Call call, IOException e) {
e.printStackTrace();
}
@Override
public void onResponse(Call call, final Response response) throws IOException {
if (!response.isSuccessful()) {
throw new IOException("Unexpected code " + response);
}
else {
System.out.println("okay.....");
}
} …Run Code Online (Sandbox Code Playgroud) 客户端请求实现仪表板切换的功能.我在做这个工作:
Dashboard.js
import React, { Component } from 'react';
import { connect } from 'react-redux';
// components
import UserDashboard from '../components/dashboard/user-dashboard/UserDashboard.js';
import NewUserDashboard from '../components/new-dashboard/user-dashboard/NewUserDashboard.js';
@connect((state) => {
return {
identity: state.identity.toJS().profile
};
})
export default class Dashboard extends Component {
render() {
const msisdn = this.props.location.state ? this.props.location.state.msisdn : null;
return (
<UserDashboard msisdn={ msisdn }/>
);
}
}
Run Code Online (Sandbox Code Playgroud)
Dashboard.js是仪表板控制器.我有2个仪表板:UserDashboard和NewDashboard.
假设用户正在查看另一个屏幕,并且在该屏幕中有一个按钮.如果单击该按钮,仪表板将调用它的渲染方法,而是返回NewDashboard.NewDashboard将自动显示.这可能吗?
我已经在 Java 桌面应用程序上成功使用了 Apache POI,并希望在 Android 上使用它来读写 Excel 文件。
这是我的 Github 仓库:https : //github.com/anta40/StockChecker
每次我尝试打开 XLSX 文件时,最终应用程序都会因为
org.apache.poi.javax.xml.stream.FactoryConfigurationError:未找到提供程序 com.bea.xml.stream.EventFactory
这是我的 build.gradle 的内容:apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.anta40.app.stockchecker"
minSdkVersion 15
targetSdkVersion 28
multiDexEnabled true
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.github.SUPERCILEX.poi-android:poi:3.17'
implementation 'com.github.angads25:filepicker:1.1.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation …Run Code Online (Sandbox Code Playgroud) java ×2
javascript ×2
android ×1
apache-poi ×1
assembly ×1
c ×1
datatables ×1
eclipse ×1
excel ×1
git ×1
github ×1
mingw ×1
okhttp ×1
printf ×1
react-redux ×1
reactjs ×1