runtime

Creating binary with CMake removes runtime path

若如初见. 提交于 2019-12-02 22:18:23
I am using CMake to build a program on linux. The program compiles successfully and runs from the project build directory. The program is linked with a custom library in the directory ${HOME}/build/lib I have an install stage with: install(TARGETS ProgName RUNTIME DESTINATION bin) When I run make install the program gets put in the correct place, but the cmake installer removes the runtime path from the binary. -- Install configuration: "Debug" -- Installing: *binary name* -- Removed runtime path from "*binary name*" I have read articles on the internet discussing the misuse of the LD_LIBRARY

打开python 报R6034 错误

匿名 (未验证) 提交于 2019-12-02 22:11:45
我只在Python3和python2同时在anaconda3下安装出现的问题,后来移除python2 也不起作用,找到了这个方法,解决的问题。 6034 指的是:”An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information“. http://stackoverflow.com/questions/14552348/runtime-error-r6034-in-embedded-python-application http://technet.microsoft.com/en-ca/sysinternals/bb896653.aspx 2. 打开你的应用,会显示R6034的问题 3. 打开Process Explorer。在主菜单”View“中选择”Lower Pane View“并且选择”DLLS“ 按照老外的方法,用process explorer查看依赖项,果然发现了两个msvcr90.dll,一个在VisualSVN Server目录下,一个在系统WinSxS目录下。最后经测试发现,卸载VisualSVN或者删除其目录下的msvcr90.dll

2)NET CORE特性与优势

匿名 (未验证) 提交于 2019-12-02 22:09:29
 先看看netcore有哪些特性,哪些优点,与.net frameworkd 差异吧: 跨平台: 跨体系结构保持一致: 命令行工具: 部署灵活: Docker 容器 使用。 兼容性: 开放源代码: .NET Foundation 由 Microsoft 支持: .NET Core 公开了多种方案的 API,以下介绍了几种: bool int 。 System.Collections.Generic.List<T> System.Collections.Generic.Dictionary<TKey,TValue> 。 System.Net.Http.HttpClient System.IO.FileStream 。 System.Data.DataSet DbSet 。 System.Numerics.Vector Pipelines 。 .NET Standard .NET Core 包括以下部分 : .NET Core runtime :提供类型系统、程序集加载、垃圾回收器、本机互操作和其他基本服务。 .NET Core 框架库 提供基元数据类型、应用编写类型和基本实用程序。 ASP.NET runtime :提供框架以生成基于新式云的 Internet 连接的应用程序,例如 Web 应用、IoT 应用以及移动后端。 .NET Core CLI 工具 和语言编译器(

INFO [alembic.runtime.migration] Context impl MySQLImpl. INFO [alembic.runtime.migration] Will ass

匿名 (未验证) 提交于 2019-12-02 21:59:42
问题:flask数据库迁移,只有一个版本表,没有生成其他表 解决: from app import models #1导入模型,导入表 manager= Manager(app) Migrate(app=app,db=db)#2位置参数确保正确,用app=?代替直接写app manager.add_command("db",MigrateCommand) #3在命令窗口 重新执行 python manage.py db migrate python manage.py db upgrade #只要这俩句不需要再执行Python manage.py init(第一次执行) 文章来源: INFO [alembic.runtime.migration] Context impl MySQLImpl. INFO [alembic.runtime.migration] Will ass

golang执行Linux和Windows命令

匿名 (未验证) 提交于 2019-12-02 21:56:30
1. 可接收变参命令 package main import ( "fmt" "os" "os/exec" "strings" ) func main (){ sliceFunc ( os . Args [ 1 :]...) } func sliceFunc ( cmd ... string ){ fmt . Println ( cmd ) if len ( cmd ) == 0 { fmt . Printf ( "Usage: %s args...\n" , os . Args [ 0 ]) os . Exit (- 1 ) } fmt . Println ( cmdFunc ( cmd ...)) } func cmdFunc ( cmd ... string ) string { fmt . Printf ( "cmd slice len: %d, value:%v\n" , len ( cmd ), cmd ) result , err := exec . Command ( cmd [ 0 ], cmd [ 1 :]...). Output () if err != nil { fmt . Println ( "Command failed:" , err . Error ()) } // return string(result) // with '\n' return

Linux 进程一直占用单核CPU分析

匿名 (未验证) 提交于 2019-12-02 21:56:30
pidstat 1信息 可以查看pid为12186的进程在占用着CPU 0,并且对CPU 0的使用率为100%,还是system消耗了 CPU 0 100%的cpu mpstat -P ALL 1信息 使用ps 命令查看该进程中线程的cpu消耗情况 ps -mp 12186 -o THREAD,tid,time USER %CPU PRI SCNT WCHAN USER SYSTEM TID TIME actiont+ 176 - - - - - - 43-18:00:43 actiont+ 0.0 19 - futex_ - - 12186 00:00:00 actiont+ 0.1 19 - poll_s - - 12187 00:48:52 actiont+ 0.0 19 - futex_ - - 12188 00:00:00 actiont+ 0.0 19 - futex_ - - 12189 00:00:00 actiont+ 14.0 19 - - - - 12190 3-11:26:12 actiont+ 0.0 19 - futex_ - - 12191 00:00:00 actiont+ 0.0 19 - futex_ - - 12192 00:02:23 actiont+ 13.0 19 - futex_ - - 12193 3-05:45:42 actiont

java注解

匿名 (未验证) 提交于 2019-12-02 21:53:52
从java5开始,Java支持在源文件中嵌入补充信息,这类信息称为注解annotation。注解不会改变程序的动作,因此也不会改变程序的语义。 1.注解是基于接口的机制创建的。 public @interface AnnoDemo { String strVal(); int setVal(); } 所有的注解只包含方法声明,没有方法实现;所有注解类型都自动扩展了Annotation接口。 创建好注解后可以使用声明注解了,可以用于类,方法,成员变量,参数,枚举常量,包括注解本身。 2.注解的保留策略 java定义了3种保留策略:SOURCE,CLASS,RUNTIME 1.使用SOURCE保留策略的注解,只在源文件中保留,在编译期间会被抛弃。 2.使用CLASS保留策略的注解,在编译后的calss中保留,在jvm运行期间会被抛弃。 3.使用RUNTIME保留策略的注解,在编译后的calss中保留,在jvm运行期间可以得到这些注解,它提供了永久的注解。 保留级别通过使用@Retention(RetentionPolicy.XXX)指定, 如果没有为注解指定保留级别,默认保留级别为RetentionPolicy.CLASS。 3.使用反射获取注解。 略。。。 4.注解的分类。 1.标记注解 标记注解不包含成员,唯一的目的是标记声明。 @Retention(RetentionPolicy

从 Native 函数调用 Java 函数

匿名 (未验证) 提交于 2019-12-02 21:53:52
要想深入地理解 art 虚拟机,那么理解 Java 方法在虚拟机当中是如何执行的是必不可少的一环。 本篇从 Native 函数调用 Java 函数角度来探讨一下 Java 函数在 art 虚拟机当中的执行。(基于 Android 8.1) 首先,我们用 gdb 将断点打在 art_quick_invoke_stub,观察一下 Native 函数 -> Java 函数的调用栈: 点击查看大图 我们可以看到 Native 函数调用 Java 函数最开始是要调用 env->CallBooleanMethod: (gdb) f 6 #6 0x000000798f46c2d0 in JavaBBinder::onTransact (this=0x79032efa80, code=4, data=..., reply=0x78f55fd1c0, flags=17) at frameworks/base/core/jni/android_util_Binder.cpp:312 312 jboolean res = env->CallBooleanMethod(mObject, gBinderOffsets.mExecTransact, (gdb) list 307 const int32_t strict_policy_before = thread_state-

java调用sqlldr报错:Message 2100 not found

匿名 (未验证) 提交于 2019-12-02 21:52:03
java调用Oracle的sqlldr命令报错:Message 2100 not found; No message file for product=RDBMS, facility=ULMessage 2100 not found; No message file for product=RDBMS, facility=UL 手动执行sqlldr 可以正常执行,但放在java中 就会报上面的2100的错。 找错误找了两天。 希望能帮助并记录这个问题。 在这里整理解决办法(两种)(先说自己的,然后总结下百度到的)。 1.先说下我遇到的问题 先说结论:手动可以执行sqlldr,但再java中则需要设置环境变量。(本人不太懂Java,至少我这样设置后问题就解决了) 网上查到的 Runtime.getRuntime().exec(cmd) 这个行代码就可以执行sqlldr,方法没错,只不过好像都没有写 还需要设置环境变量。 String [] cmd = { "/bin/bash" , "-c" , "echo $ORACLE_HOME;echo $LD_LIBRARY_PATH;$ORACLE_HOME/bin/" + shellCommand }; final Process pid = Runtime . getRuntime (). exec ( cmd , new String

sending a cmdarray for exec to process — hello world

我是研究僧i 提交于 2019-12-02 20:51:04
问题 Am I not sending an array of commands, "hello world ", to exec() correctly? correct output, hello world: thufir@mordor:~$ thufir@mordor:~$ java -jar NetBeansProjects/HelloExec/dist/HelloExec.jar Apr 05, 2016 7:11:23 AM net.bounceme.mordor.telnet.Main run INFO: starting.. Apr 05, 2016 7:11:23 AM net.bounceme.mordor.telnet.Telnet <init> INFO: connecting.. Apr 05, 2016 7:11:23 AM net.bounceme.mordor.telnet.Telnet connect INFO: connect.. Apr 05, 2016 7:11:23 AM net.bounceme.mordor.telnet.Telnet