- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试让最基本的 jni 示例正常工作。
我正在关注这个tutorial , 有点旧,但是我能找到的最好的
步骤:
创建 HelloJNI.java
public class HelloJNI {
static {
System.loadLibrary("hello");
}
private native void sayHello();
public static void main(String[] args) {
new HelloJNI().sayHello(); // invoke the native method
}
}
编译 HelloJNI.java
进入HelloJNI.class
:
javac HelloJNI.java
通过运行生成 header :
javah HelloJNI
HelloJNI.h
:
/* DO NOT EDIT THIS FILE - it is machine generated */
#include <jni.h>
/* Header for class HelloJNI */
#ifndef _Included_HelloJNI
#define _Included_HelloJNI
#ifdef __cplusplus
extern "C" {
#endif
/*
* Class: HelloJNI
* Method: sayHello
* Signature: ()V
*/
JNIEXPORT void JNICALL Java_HelloJNI_sayHello
(JNIEnv *, jobject);
#ifdef __cplusplus
}
#endif
#endif
写下HelloJNI.c
文件:
#include <jni.h>
#include <stdio.h>
#include "HelloJNI.h"
// Implementation of native method sayHello() of HelloJNI class
JNIEXPORT void JNICALL Java_HelloJNI_sayHello(JNIEnv *env, jobject thisObj) {
printf("Hello World!\n");
return;
}
现在乐趣开始了......
首先,%JAVA_HOME%
不起作用,您必须使用 $JAVA_HOME
set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_102
echo $JAVA_HOME
gcc -Wl,--add-stdcall-alias -I"$JAVA_HOME\include" -I"$JAVA_HOME\include\win32" -shared -o hello.dll HelloJNI.c
看起来我成功了......嗯不:
然后我尝试使用 Cygwin:
gcc-3 -D __int64="long long" -mno-cygwin -Wl,--add-stdcall-alias -I"<JAVA_HOME>\include" -I"<JAVA_HOME>\include\win32" -shared -o hello.dll HelloJNI.c
-bash: gcc-3: command not found
让我改gcc-3
至 gcc
:
gcc -D __int64="long long" -mno-cygwin -Wl,--add-stdcall-alias -I"<JAVA_HOME>\include" -I"<JAVA_HOME>\include\win32" -shared -o hello.dll HelloJNI.c
gcc: error: option -mno-cygwin unknown
让我们尝试删除它
gcc -D __int64="long long" -Wl,--add-stdcall-alias -I"<JAVA_HOME>\include" -I"<JAVA_HOME>\include\win32" -shared -o hello.dll HelloJNI.c
no such file "jni.h"
让我换成$JAVA_HOME
gcc -D __int64="long long" -Wl,--add-stdcall-alias -I"$JAVA_HOME\include" -I"$JAVA_HOME\include\win32" -shared -o hello.dll HelloJNI.c
也许这次成功了..
java HelloJNI
闲逛
java -Djava.library.path=. HelloJNI
段错误
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0000000180193180, pid=500, tid=0x0000000000000f10
#
# JRE version: Java(TM) SE Runtime Environment (8.0_102-b14) (build 1.8.0_102-b14)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (25.102-b14 mixed mode windows-amd64 compressed oops)
# Problematic frame:
# C [cygwin1.dll+0x153180]
#
# Failed to write core dump. Minidumps are not enabled by default on client versions of Windows
#
# If you would like to submit a bug report, please visit:
# http://bugreport.java.com/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
--------------- T H R E A D ---------------
Current thread (0x0000000001fee800): JavaThread "main" [_thread_in_native, id=3856, stack(0x00000000022b0000,0x00000000023b0000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x0000000000000096
Registers:
RAX=0x0000000000000016, RBX=0x0000000000000002, RCX=0x0000000180300040, RDX=0x0000000000000001
RSP=0x00000000023af6f0, RBP=0x00000000023af7a0, RSI=0x00000000023ad680, RDI=0x00000000023af71c
R8 =0x00000000023af71c, R9 =0x000000018014ac50, R10=0xfefefefefefefeff, R11=0x00000004911210ac
R12=0x0000000000000000, R13=0x000000001c290280, R14=0x00000000023af838, R15=0x0000000001fee800
RIP=0x0000000180193180, EFLAGS=0x0000000000010206
Top of Stack: (sp=0x00000000023af6f0)
0x00000000023af6f0: 000000001c290280 0000000001fee800
0x00000000023af700: 0000000001fee800 0000000001fe2730
0x00000000023af710: 000000001c290280 00000000023af838
0x00000000023af720: 00000000023af740 0000000000000002
0x00000000023af730: 000000000000000d 0000000001fee800
0x00000000023af740: 0000000491123030 000000000000000c
0x00000000023af750: 000000018027fda0 0000000000000001
0x00000000023af760: 000000001c290280 0000000020000021
0x00000000023af770: 00000000ffffffff 000000018012700b
0x00000000023af780: 00000000023afa00 0000000001fee800
0x00000000023af790: 000000001c290280 0000000020000021
0x00000000023af7a0: 00000000023af818 0000000002a07f54
0x00000000023af7b0: 0000000001fee9f8 00000000023af838
0x00000000023af7c0: 0000000020000021 0000000001fee800
0x00000000023af7d0: 0000000002a07c82 00000000023af7d8
0x00000000023af7e0: 000000001c290280 00000000023af838
Instructions: (pc=0x0000000180193180)
0x0000000180193160: 46 50 48 8b 5e 10 85 c0 0f 84 92 00 00 00 48 8d
0x0000000180193170: 7c 24 2c b9 01 00 00 00 48 89 fa e8 c0 0f f7 ff
0x0000000180193180: f6 83 94 00 00 00 01 0f b7 43 10 75 05 f6 c4 02
0x0000000180193190: 74 7e f6 c4 20 75 11 81 a3 94 00 00 00 ff df ff
Register to memory mapping:
RAX=0x0000000000000016 is an unknown value
RBX=0x0000000000000002 is an unknown value
RCX=0x0000000180300040 is an unknown value
RDX=0x0000000000000001 is an unknown value
RSP=0x00000000023af6f0 is pointing into the stack for thread: 0x0000000001fee800
RBP=0x00000000023af7a0 is pointing into the stack for thread: 0x0000000001fee800
RSI=0x00000000023ad680 is pointing into the stack for thread: 0x0000000001fee800
RDI=0x00000000023af71c is pointing into the stack for thread: 0x0000000001fee800
R8 =0x00000000023af71c is pointing into the stack for thread: 0x0000000001fee800
R9 =0x000000018014ac50 is an unknown value
R10=0xfefefefefefefeff is an unknown value
R11=0x00000004911210ac is an unknown value
R12=0x0000000000000000 is an unknown value
R13={method} {0x000000001c290288} 'sayHello' '()V' in 'HelloJNI'
R14=0x00000000023af838 is pointing into the stack for thread: 0x0000000001fee800
R15=0x0000000001fee800 is a thread
Stack: [0x00000000022b0000,0x00000000023b0000], sp=0x00000000023af6f0, free space=1021k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [cygwin1.dll+0x153180]
C [cygwin1.dll+0xe700a]
C 0x00000000023afa00
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j HelloJNI.sayHello()V+0
j HelloJNI.main([Ljava/lang/String;)V+7
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x000000001d8b7800 JavaThread "Service Thread" daemon [_thread_blocked, id=5544, stack(0x000000001f6d0000,0x000000001f7d0000)]
0x000000001d853800 JavaThread "C1 CompilerThread3" daemon [_thread_blocked, id=4884, stack(0x000000001f5d0000,0x000000001f6d0000)]
0x000000001d833000 JavaThread "C2 CompilerThread2" daemon [_thread_blocked, id=3560, stack(0x000000001f310000,0x000000001f410000)]
0x000000001d82a800 JavaThread "C2 CompilerThread1" daemon [_thread_blocked, id=5756, stack(0x000000001f060000,0x000000001f160000)]
0x000000001d823800 JavaThread "C2 CompilerThread0" daemon [_thread_blocked, id=3092, stack(0x000000001f1c0000,0x000000001f2c0000)]
0x000000001d820000 JavaThread "Attach Listener" daemon [_thread_blocked, id=1712, stack(0x000000001ef20000,0x000000001f020000)]
0x000000001c88f000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2452, stack(0x000000001ed10000,0x000000001ee10000)]
0x000000001c87f800 JavaThread "Finalizer" daemon [_thread_blocked, id=5552, stack(0x000000001e760000,0x000000001e860000)]
0x000000001c878800 JavaThread "Reference Handler" daemon [_thread_blocked, id=4664, stack(0x000000001ea50000,0x000000001eb50000)]
=>0x0000000001fee800 JavaThread "main" [_thread_in_native, id=3856, stack(0x00000000022b0000,0x00000000023b0000)]
Other Threads:
0x000000001c872000 VMThread [stack: 0x000000001e890000,0x000000001e990000] [id=5488]
0x000000001d8e6800 WatcherThread [stack: 0x000000001f880000,0x000000001f980000] [id=5872]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap:
PSYoungGen total 76288K, used 2621K [0x000000076b180000, 0x0000000770680000, 0x00000007c0000000)
eden space 65536K, 4% used [0x000000076b180000,0x000000076b40f5e8,0x000000076f180000)
from space 10752K, 0% used [0x000000076fc00000,0x000000076fc00000,0x0000000770680000)
to space 10752K, 0% used [0x000000076f180000,0x000000076f180000,0x000000076fc00000)
ParOldGen total 175104K, used 0K [0x00000006c1400000, 0x00000006cbf00000, 0x000000076b180000)
object space 175104K, 0% used [0x00000006c1400000,0x00000006c1400000,0x00000006cbf00000)
Metaspace used 2512K, capacity 4486K, committed 4864K, reserved 1056768K
class space used 282K, capacity 386K, committed 512K, reserved 1048576K
Card table byte_map: [0x0000000011db0000,0x00000000125b0000] byte_map_base: 0x000000000e7a6000
Marking Bits: (ParMarkBitMap*) 0x000000005556a6c0
Begin Bits: [0x0000000013730000, 0x00000000176e0000)
End Bits: [0x00000000176e0000, 0x000000001b690000)
Polling page: 0x0000000000110000
CodeCache: size=245760Kb used=1109Kb max_used=1113Kb free=244650Kb
bounds [0x00000000029f0000, 0x0000000002c60000, 0x00000000119f0000]
total_blobs=258 nmethods=27 adapters=145
compilation: enabled
Compilation events (10 events):
Event: 0.044 Thread 0x000000001d853800 nmethod 22 0x0000000002b02210 code [0x0000000002b023c0, 0x0000000002b02af8]
Event: 0.044 Thread 0x000000001d853800 23 3 java.lang.AbstractStringBuilder::append (50 bytes)
Event: 0.044 Thread 0x000000001d853800 nmethod 23 0x0000000002b05b90 code [0x0000000002b05d60, 0x0000000002b064b8]
Event: 0.044 Thread 0x000000001d823800 nmethod 24 0x0000000002b067d0 code [0x0000000002b06920, 0x0000000002b069f8]
Event: 0.046 Thread 0x000000001d853800 25 3 java.lang.StringBuilder::append (8 bytes)
Event: 0.046 Thread 0x000000001d853800 nmethod 25 0x0000000002b05010 code [0x0000000002b05180, 0x0000000002b05308]
Event: 0.047 Thread 0x000000001d853800 26 3 java.lang.System::getSecurityManager (4 bytes)
Event: 0.047 Thread 0x000000001d853800 nmethod 26 0x0000000002b04d10 code [0x0000000002b04e60, 0x0000000002b04fb0]
Event: 0.047 Thread 0x000000001d853800 27 3 java.io.WinNTFileSystem::normalize (143 bytes)
Event: 0.048 Thread 0x000000001d853800 nmethod 27 0x0000000002b03f50 code [0x0000000002b04140, 0x0000000002b04968]
GC Heap History (0 events):
No events
Deoptimization events (0 events):
No events
Internal exceptions (3 events):
Event: 0.020 Thread 0x0000000001fee800 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.defineClass(Ljava/lang/String;[BII)Ljava/lang/Class; name or signature does not match> (0x000000076b187c78) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u102\7268\hotspot\sU-¡r#.”?
Event: 0.020 Thread 0x0000000001fee800 Exception <a 'java/lang/NoSuchMethodError': Method sun.misc.Unsafe.prefetchRead(Ljava/lang/Object;J)V name or signature does not match> (0x000000076b187f60) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u102\7268\hotspot\src\share\vm\prims\3ßçÄ…*¥?
Event: 0.041 Thread 0x0000000001fee800 Exception <a 'java/io/FileNotFoundException'> (0x000000076b1dc428) thrown at [C:\re\workspace\8-2-build-windows-amd64-cygwin\jdk8u102\7268\hotspot\src\share\vm\prims\jni.cpp, line 709]
Events (10 events):
Event: 0.046 loading class java/security/BasicPermissionCollection
Event: 0.046 loading class java/security/BasicPermissionCollection done
Event: 0.046 loading class sun/launcher/LauncherHelper$FXHelper
Event: 0.047 loading class sun/launcher/LauncherHelper$FXHelper done
Event: 0.047 loading class java/lang/Class$MethodArray
Event: 0.047 loading class java/lang/Class$MethodArray done
Event: 0.047 loading class java/lang/Void
Event: 0.047 loading class java/lang/Void done
Event: 0.047 loading class java/lang/ClassLoaderHelper
Event: 0.047 loading class java/lang/ClassLoaderHelper done
Dynamic libraries:
0x000000013f9c0000 - 0x000000013f9f7000 C:\Program Files\Java\jre1.8.0_102\bin\java.exe
0x0000000077900000 - 0x0000000077aaa000 C:\Windows\SYSTEM32\ntdll.dll
0x00000000776e0000 - 0x00000000777ff000 C:\Windows\system32\kernel32.dll
0x000007fefd8e0000 - 0x000007fefd94a000 C:\Windows\system32\KERNELBASE.dll
0x000007fefda70000 - 0x000007fefdb4b000 C:\Windows\system32\ADVAPI32.dll
0x000007fefdfe0000 - 0x000007fefe07f000 C:\Windows\system32\msvcrt.dll
0x000007feff860000 - 0x000007feff87f000 C:\Windows\SYSTEM32\sechost.dll
0x000007fefdd90000 - 0x000007fefdebd000 C:\Windows\system32\RPCRT4.dll
0x0000000077800000 - 0x00000000778fa000 C:\Windows\system32\USER32.dll
0x000007feff8e0000 - 0x000007feff947000 C:\Windows\system32\GDI32.dll
0x000007feff950000 - 0x000007feff95e000 C:\Windows\system32\LPK.dll
0x000007fefdec0000 - 0x000007fefdf8a000 C:\Windows\system32\USP10.dll
0x000007fefbf90000 - 0x000007fefc184000 C:\Windows\WinSxS\amd64_microsoft.windows.common-controls_6595b64144ccf1df_6.0.7601.18837_none_fa3b1e3d17594757\COMCTL32.dll
0x000007fefe0a0000 - 0x000007fefe111000 C:\Windows\system32\SHLWAPI.dll
0x000007fefe120000 - 0x000007fefe14e000 C:\Windows\system32\IMM32.DLL
0x000007feff1c0000 - 0x000007feff2c9000 C:\Windows\system32\MSCTF.dll
0x00000000577a0000 - 0x0000000057871000 C:\Program Files\Java\jre1.8.0_102\bin\msvcr100.dll
0x0000000054d50000 - 0x00000000555ea000 C:\Program Files\Java\jre1.8.0_102\bin\server\jvm.dll
0x000007fef5420000 - 0x000007fef5429000 C:\Windows\system32\WSOCK32.dll
0x000007fefdf90000 - 0x000007fefdfdd000 C:\Windows\system32\WS2_32.dll
0x000007fefdd80000 - 0x000007fefdd88000 C:\Windows\system32\NSI.dll
0x000007fefa1d0000 - 0x000007fefa20b000 C:\Windows\system32\WINMM.dll
0x000007fefc700000 - 0x000007fefc70c000 C:\Windows\system32\VERSION.dll
0x0000000077ac0000 - 0x0000000077ac7000 C:\Windows\system32\PSAPI.DLL
0x0000000064bc0000 - 0x0000000064bcf000 C:\Program Files\Java\jre1.8.0_102\bin\verify.dll
0x00000000598e0000 - 0x0000000059909000 C:\Program Files\Java\jre1.8.0_102\bin\java.dll
0x000000005f250000 - 0x000000005f266000 C:\Program Files\Java\jre1.8.0_102\bin\zip.dll
0x000007fefe150000 - 0x000007fefeeda000 C:\Windows\system32\SHELL32.dll
0x000007feffa00000 - 0x000007feffc03000 C:\Windows\system32\ole32.dll
0x000007fefd630000 - 0x000007fefd63f000 C:\Windows\system32\profapi.dll
0x0000000491120000 - 0x0000000491138000 C:\Users\GBarbieri\Documents\NetBeansProjects\jni\hello.dll
0x0000000180040000 - 0x0000000180630000 C:\cygwin64\bin\cygwin1.dll
0x000007fef16f0000 - 0x000007fef1815000 C:\Windows\system32\dbghelp.dll
VM Arguments:
java_command: HelloJNI
java_class_path (initial): .
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_102
PATH=C:\cygwin64\usr\local\bin;C:\cygwin64\bin;C:\ProgramData\Oracle\Java\javapath;C:\jet11.0-eval-amd64\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0;cygwin-directory\bin;C:\Program Files (x86)\CMake\bin;C:\Program Files (x86)\Windows Kits\8.1\Windows Performance Toolkit;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files (x86)\Skype\Phone;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Users\GBarbieri\Documents\NetBeansProjects\nifty-gui\nifty-examples\target\natives;C:\Program Files (x86)\Microsoft SDKs\TypeScript\1.0;C:\Program Files\Microsoft SQL Server\120\Tools\Binn;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit;C:\Program Files\Git\cmd;C:\Program Files\Java\jdk1.8.0_102\bin
USERNAME=GBarbieri
SHELL=/bin/bash
OS=Windows_NT
PROCESSOR_IDENTIFIER=Intel64 Family 6 Model 60 Stepping 3, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows 7 , 64 bit Build 7601 (6.1.7601.23539)
CPU:total 8 (4 cores per cpu, 2 threads per core) family 6 model 60 stepping 3, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3, sse4.1, sse4.2, popcnt, avx, avx2, aes, clmul, erms, rtm, lzcnt, ht, tsc, tscinvbit, bmi1, bmi2
Memory: 4k page, physical 16694948k(12736124k free), swap 33388036k(28626128k free)
vm_info: Java HotSpot(TM) 64-Bit Server VM (25.102-b14) for windows-amd64 JRE (1.8.0_102-b14), built on Jun 22 2016 13:15:21 by "java_re" with MS VC++ 10.0 (VS2010)
time: Tue Oct 11 10:47:52 2016
elapsed time: 0 seconds (0d 0h 0m 0s)
我还有希望吗?
Ps:在教程中,他提到了gcc-4
闲逛,对我来说java HelloJNI
闲逛。此外,我应该有 gcc5.4
我的机器是:win7 x64,jdk8 102
最佳答案
这有点冒险,但最后我做到了,步骤:
忘记任何关于 cygwin、mingw、win-builds 的事情,从 here 下载 MSYS2| (根据您要使用的 Windows 版本选择 32 位或 64 位)
从开始菜单打开它 -> MSYS2 64bit -> MSYS2 MinGW 64-bit
运行 pacman -Sy pacman
(pacman 是 Arch 中 apt-get 的等价物)
关闭控制台并重新打开
pacman -Syu
先试试pacman -S mingw-w64-x86_64-gcc
,如果失败,就是因为这个bug (可能如果你之前安装了 mingw32),重新运行添加 --force
,即 pacman -S --force mingw-w64-x86_64-gcc
生成库gcc -Wl,--add-stdcall-alias -I"$JAVA_HOME\include\win32"-shared -o hello.dll HelloJNI.c
我尝试在 MSYS2 中运行,它自动完成了 java
命令但没有找到它(wtf?),然后我回退到使用 window powershell 运行它:
Hello World!
给你...
关于java - 简单的 java jni 教程失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39974626/
我正在努力实现以下目标, 假设我有字符串: ( z ) ( A ( z ) ( A ( z ) ( A ( z ) ( A ( z ) ( A ) ) ) ) ) 我想编写一个正则
给定: 1 2 3 4 5 6
很难说出这里要问什么。这个问题模棱两可、含糊不清、不完整、过于宽泛或夸夸其谈,无法以目前的形式得到合理的回答。如需帮助澄清此问题以便重新打开,visit the help center . 关闭 1
大家好,我卡颂。 Svelte问世很久了,一直想写一篇好懂的原理分析文章,拖了这么久终于写了。 本文会围绕一张流程图和两个Demo讲解,正确的食用方式是用电脑打开本文,跟着流程图、Demo一
身份证为15位或者18位,15位的全为数字,18位的前17位为数字,最后一位为数字或者大写字母”X“。 与之匹配的正则表达式: ?
我们先来最简单的,网页的登录窗口; 不过开始之前,大家先下载jquery的插件 本人习惯用了vs2008来做网页了,先添加一个空白页 这是最简单的的做法。。。先在body里面插入 <
1、MySQL自带的压力测试工具 Mysqlslap mysqlslap是mysql自带的基准测试工具,该工具查询数据,语法简单,灵活容易使用.该工具可以模拟多个客户端同时并发的向服务器发出
前言 今天大姚给大家分享一款.NET开源(MIT License)、免费、简单、实用的数据库文档(字典)生成工具,该工具支持CHM、Word、Excel、PDF、Html、XML、Markdown等
Go语言语法类似于C语言,因此熟悉C语言及其派生语言( C++、 C#、Objective-C 等)的人都会迅速熟悉这门语言。 C语言的有些语法会让代码可读性降低甚至发生歧义。Go语言在C语言的
我正在使用快速将 mkv 转换为 mp4 ffmpeg 命令 ffmpeg -i test.mkv -vcodec copy -acodec copy new.mp4 但不适用于任何 mkv 文件,当
我想计算我的工作簿中的工作表数量,然后从总数中减去特定的工作表。我错过了什么?这给了我一个对象错误: wsCount = ThisWorkbook.Sheets.Count - ThisWorkboo
我有一个 perl 文件,用于查看文件夹中是否存在 ini。如果是,它会从中读取,如果不是,它会根据我为它制作的模板创建一个。 我在 ini 部分使用 Config::Simple。 我的问题是,如果
尝试让一个 ViewController 通过标准 Cocoa 通知与另一个 ViewController 进行通信。 编写了一个简单的测试用例。在我最初的 VC 中,我将以下内容添加到 viewDi
我正在绘制高程剖面图,显示沿路径的高程增益/损失,类似于下面的: Sample Elevation Profile with hand-placed labels http://img38.image
嗨,所以我需要做的是最终让 regStart 和 regPage 根据点击事件交替可见性,我不太担心编写 JavaScript 函数,但我根本无法让我的 regPage 首先隐藏。这是我的代码。请简单
我有一个非常简单的程序来测量一个函数花费了多少时间。 #include #include #include struct Foo { void addSample(uint64_t s)
我需要为 JavaScript 制作简单的 C# BitConverter。我做了一个简单的BitConverter class BitConverter{ constructor(){} GetBy
已关闭。这个问题是 not reproducible or was caused by typos 。目前不接受答案。 这个问题是由拼写错误或无法再重现的问题引起的。虽然类似的问题可能是 on-top
我是 Simple.Data 的新手。但我很难找到如何进行“分组依据”。 我想要的是非常基本的。 表格看起来像: +________+ | cards | +________+ | id |
我现在正在开发一个 JS UDF,它看起来遵循编码。 通常情况下,由于循环计数为 2,Alert Msg 会出现两次。我想要的是即使循环计数为 3,Alert Msg 也只会出现一次。任何想法都
我是一名优秀的程序员,十分优秀!