spawning c1.exe...安装路径和include和lib那些放在一个盘里了

想做一个生日贺卡出来,想到图形库,因为本人只系统学过c,所以在网上找到了
easyx这个东西,第一次用可以,easyx成功检测到vc++6.0,可是有一次出现了(具体忘记了,大概就是说头文件找不到的提示),之后总是这样,后来我就把软件卸载掉了,重装了一次,结果easyx检测不到vc++6.0,无论是c还是cpp都是提示“spawning c1.exe。

c++
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
vc++6.0出现error spawning cl .exe怎么解决
程序是对的一编译就出现error spawing cl.exe用的是win8.1系统。。。。。。。求各位大神解答
vc++6.0运行时总是报错时怎么回事
在使用vc++6.0时,程序本身没有输入错误,但总是报错,显示Error spawning c1.exe 这是怎么回事,该如何解决
在F盘安过VC++6.0,删后重新安在D盘,运行时 Error spawning cl.exe
![图片说明](https://img-ask.csdn.net/upload/201606/01/1464744432_509886.png)在F盘装过,但是我已经全删了,但每次运行都是上述结果,不知道怎么解决,如果说更改路径,但是F盘的路径已经找不到了。
C++ 软件安装问题,--------------------Configuration
怎么解决--------------------Configuration: asd - Win32 Debug-------------------- Compiling... Error spawning cl.exe asd.exe - 1 error(s), 0 warning(s) 这种问题
pm2报错[PM2] Spawning PM2 daemon with pm2_home=/root/.pm2
执行pm2命令后只有 ``` [PM2] Spawning PM2 daemon with pm2_home=/root/.pm2 ```,回车后又到命令行,检查后磁盘只用了17%,不是网上有说过的磁盘满了的问题。怀疑不知道是不是安装问题,不过卸载后重新安装了还是这样,求各位大神解答。
appium 测试无法打开 app,请各位大神帮忙
初学appium,使用python写测试脚本,现在可以安装上app,之后无法自动启动app。 这是我的脚本: #coding=utf-8 from appium import webdriver from lib2to3.pgen2.driver import Driver from lib2to3.tests.support import driver import os import time PATH=lambda p:os.path.abspath(os.path.join(os.path.dirname(file),p)) global driver desired_caps = {} desired_caps['platformName'] = 'Android' desired_caps['platformVersion'] = '4.4.2' desired_caps['deviceName'] = 'b91b9b66' #desired_caps['appPackage'] = 'com.zhengyuan.watch' #desired_caps['appActivity'] = 'com.zhengyuan.watch.logic.launch.AppStart' desired_caps['app'] = PATH('D:\android\app\rtring_c_zhengyuan.apk') driver = webdriver.Remote('http://localhost:4723/wd/hub', desired_caps) time.sleep(5) driver.swipe(600,660,10,660,1000) time.sleep(1) driver.swipe(600,660,10,660,1000) time.sleep(1) log: info: --> POST /wd/hub/session {"desiredCapabilities":{"platformVersion":"4.4.2","deviceName":"b91b9b66","app":"D:\android\app\rtring_c_zhengyuan.apk","platformName":"Android"}} info: Client User-Agent string: Python-urllib/2.7 info: [debug] No appActivity desired capability or server param. Parsing from apk. info: [debug] No appPackage desired capability or server param. Parsing from apk. info: [debug] Using local app from desired caps: D:\android\app\rtring_c_zhengyuan.apk info: [debug] Creating new appium session 7ab051a1-8c95-4b9a-a998-f1748ed52d47 info: Starting android appium info: [debug] Getting Java version info: Java version is: 1.7.0_79 info: [debug] Checking whether adb is present info: [debug] Using adb from D:\android\sdk\platform-tools\adb.exe info: [debug] Parsing package and activity from app manifest info: [debug] Checking whether aapt is present info: [debug] Using aapt from D:\android\sdk\build-tools\android-4.4W\aapt.exe info: [debug] Extracting package and launch activity from manifest. info: [debug] executing cmd: D:\android\sdk\build-tools\android-4.4W\aapt.exe dump badging D:\android\app\rtring_c_zhengyuan.apk info: [debug] badging package: com.zhengyuan.watch info: [debug] badging act: com.zhengyuan.watch.logic.launch.AppStart info: [debug] Parsed package and activity are: com.zhengyuan.watch/com.zhengyuan.watch.logic.launch.AppStart info: [debug] Using fast reset? true info: [debug] Preparing device for session info: [debug] Checking whether app is actually present info: Retrieving device info: [debug] Trying to find a connected android device info: [debug] Getting connected devices... info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe devices info: [debug] 1 device(s) connected info: Found device b91b9b66 info: [debug] Setting device id to b91b9b66 info: [debug] Waiting for device to be ready and to respond to shell commands (timeout = 5) info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 wait-for-device info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 shell "echo 'ready'" info: [debug] Starting logcat capture info: [debug] Getting device API level info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 shell "getprop ro.build.version.sdk" info: [debug] Device is at API Level 19 info: Device API level is: 19 info: [debug] Extracting strings for language: default info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 shell "getprop persist.sys.language" info: [debug] Current device persist.sys.language: zh info: [debug] java -jar "C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\appium_apk_tools.jar" "stringsFromApk" "D:\android\app\rtring_c_zhengyuan.apk" "C:\Users\admin\AppData\Local\Temp\com.zhengyuan.watch" zh info: [debug] Reading strings from converted strings.json info: [debug] Setting language to default info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 push "C:\Users\admin\AppData\Local\Temp\com.zhengyuan.watch\strings.json" /data/local/tmp info: [debug] Checking whether aapt is present info: [debug] Using aapt from D:\android\sdk\build-tools\android-4.4W\aapt.exe info: [debug] Retrieving process from manifest. info: [debug] executing cmd: D:\android\sdk\build-tools\android-4.4W\aapt.exe dump xmltree D:\android\app\rtring_c_zhengyuan.apk AndroidManifest.xml info: [debug] Set app process to: com.zhengyuan.watch info: [debug] Not uninstalling app since server not started with --full-reset info: [debug] Checking app cert for D:\android\app\rtring_c_zhengyuan.apk. info: [debug] executing cmd: java -jar "C:\Program Files (x86)\Appium\node_modules\appium\node_modules\appium-adb\jars\verify.jar" D:\android\app\rtring_c_zhengyuan.apk info: [debug] App already signed. info: [debug] Zip-aligning D:\android\app\rtring_c_zhengyuan.apk info: [debug] Checking whether zipalign is present info: [debug] Using zipalign from D:\android\sdk\build-tools\android-4.4W\zipalign.exe info: [debug] Zip-aligning apk. info: [debug] executing cmd: D:\android\sdk\build-tools\android-4.4W\zipalign.exe -f 4 D:\android\app\rtring_c_zhengyuan.apk C:\Users\admin\AppData\Local\Temp\116210-428-1fgurq6\appium.tmp info: [debug] MD5 for app is 310a577ec209ceac8a6dee5086a1bf5d info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 shell "ls /data/local/tmp/310a577ec209ceac8a6dee5086a1bf5d.apk" info: [debug] Getting install status for com.zhengyuan.watch info: [debug] Getting device API level info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 shell "getprop ro.build.version.sdk" info: [debug] Device is at API Level 19 info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 shell "pm list packages -3 com.zhengyuan.watch" info: [debug] App is installed info: Installing App info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 shell "mkdir -p /data/local/tmp/" info: [debug] Removing any old apks info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 shell "ls /data/local/tmp/*.apk" info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 shell rm "/data/local/tmp/8f29ab35c86ad03708a23dfe9aaeeaa0.apk" info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 push "D:\android\app\rtring_c_zhengyuan.apk" /data/local/tmp/310a577ec209ceac8a6dee5086a1bf5d.apk info: [debug] Uninstalling com.zhengyuan.watch info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 shell "am force-stop com.zhengyuan.watch" info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 uninstall com.zhengyuan.watch info: [debug] App was uninstalled info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 shell "pm install -r /data/local/tmp/310a577ec209ceac8a6dee5086a1bf5d.apk" info: [debug] Forwarding system:4724 to device:4724 info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 forward tcp:4724 tcp:4724 info: [debug] Pushing appium bootstrap to device... info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 push "C:\Program Files (x86)\Appium\node_modules\appium\build\android_bootstrap\AppiumBootstrap.jar" /data/local/tmp/ info: [debug] Pushing settings apk to device... info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 install "C:\Program Files (x86)\Appium\node_modules\appium\build\settings_apk\settings_apk-debug.apk" info: [debug] Pushing unlock helper app to device... info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 install "C:\Program Files (x86)\Appium\node_modules\appium\build\unlock_apk\unlock_apk-debug.apk" info: Starting App info: [debug] Attempting to kill all 'uiautomator' processes info: [debug] Getting all processes with 'uiautomator' info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 shell "ps 'uiautomator'" info: [debug] Attempting to kill process 31936 info: [debug] executing cmd: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 shell "kill 31936" info: [debug] Running bootstrap info: [debug] spawning: D:\android\sdk\platform-tools\adb.exe -s b91b9b66 shell uiautomator runtest AppiumBootstrap.jar -c io.appium.android.bootstrap.Bootstrap -e pkg com.zhengyuan.watch -e disableAndroidWatchers false info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: numtests=1 info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: stream= info: [debug] [UIAUTOMATOR STDOUT] io.appium.android.bootstrap.Bootstrap: info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: id=UiAutomatorTestRunner info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: test=testRunServer info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: class=io.appium.android.bootstrap.Bootstrap info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS: current=1 info: [debug] [UIAUTOMATOR STDOUT] INSTRUMENTATION_STATUS_CODE: 1 info: [debug] [BOOTSTRAP] [debug] Socket opened on port 4724 info: [debug] [BOOTSTRAP] [debug] Appium Socket Server Ready info: [debug] [BOOTSTRAP] [debug] Loading json... error: Unhandled error: Error: getaddrinfo ENOENT at Object.exports.errnoException (util.js:746:11) at errnoException (dns.js:49:15) at GetAddrInfoReqWrap.onlookup as oncomplete context: [POST /wd/hub/session {"desiredCapabilities":{"platformVersion":"4.4.2","deviceName":"b91b9b66","app":"D:\android\app\rtringc_zhengyuan.apk","platformName":"Android"}}] info: [debug] [BOOTSTRAP] [debug] json loading complete. info: [debug] [BOOTSTRAP] [debug] Registered crash watchers. info: <-- POST /wd/hub/session - - ms - - undefined 之后就停住了,请大家帮我看看是什么问题,纠结了好几天了,谢谢大家!
Linux下安装ROR所遇到的问题
首先得谢谢 robbin 写了这么多的好文章及教程, 但本人入行不久,而最近对ROR兴趣浓烈,google一下, 就找到 robbin的这篇文章:<在Linux平台上安装和配置Ruby on Rails详解>, 确实写的非常详细, 不过我还是遇到不少的问题,有几个问题至今未得到解决,希望在此能得到答案,问题如下: 1. 安装并配置Lighttpd后,输入如下命令: # /etc/init.d/lighttpd start Starting lighttpd: [OK] 启动好像没问题,但输入如下命令: Stopping lighttpd: [FAILED] 停止时出现错误,肯定配置有问题,由于从未用过lighttpd,根本查不到哪有问题. 2. 在安装ImageMagick时,输入命令: rpm –qa |grep libjpeg rpm –qa |grep libtiff 未找到相关安装文件,到安装盘及网上找也未找到,不知这个是否是必须安装的? 引用robbin的一句话: 如果没有安装,那么在Linux安装光盘找到相应rpm包安装上,再次configure直到确认需要的 图形格式全部支持为止,然后编译安装 可这步我无法判断哪些图形模式是否支持,哪位大哥大姐是否可以原谅本人愚笨把这里再说清楚一点? 我将感激不尽. 最后要安装的是RMagic,因好像要依赖之前的ImageMagick,所以也没有安装. 注: OS: Red Hat PS: 查看/var/log/lighttpd/error.log 错误信息如下: 2008-07-31 21:42:56: (log.c.75) server started 2008-07-31 21:42:56: (mod_fastcgi.c.1029) the fastcgi-backend /root/rails_app/r4rmusicl/public/dispatch.fcgi failed to start: 2008-07-31 21:42:56: (mod_fastcgi.c.1033) child exited with status 9 /root/rails_app/r4rmusicl/public/dispatch.fcgi 2008-07-31 21:42:56: (mod_fastcgi.c.1036) If you're trying to run PHP as a FastCGI backend, make sure you're using the FastCGI-enabled version. You can find out if it is the right one by executing 'php -v' and it should display '(cgi-fcgi)' in the output, NOT '(cgi)' NOR '(cli)'. For more information, check http://trac.lighttpd.net/trac/wiki/Docs%3AModFastCGI#preparing-php-as-a-fastcgi-programIf this is PHP on Gentoo, add 'fastcgi' to the USE flags. 2008-07-31 21:42:56: (mod_fastcgi.c.1340) [ERROR]: spawning fcgi failed. 2008-07-31 21:42:56: (server.c.908) Configuration of plugins failed. Going down. [b]问题补充:[/b] 尝试手动启动后,无任何提示,查看Lighttpd的error.log文件,还是有前面的错误提示. 这句话如何理解:the fastcgi-backend /root/rails_app/r4rmusicl/public/dispatch.fcgi failed to start: 谢谢! [b]问题补充:[/b] 做了相关修改后,运行命令; /etc/init.d/lighttpd start 出现如下错误信息: I will not set uid to 0 /etc/lighttpd/lighttpd.conf 里面的路径都没有问题,请问这是为何? [b]问题补充:[/b] 对了,补充上面一句: 在日志文件没有输出任何信息. [b]问题补充:[/b] 我知道大家都很忙,希望你们能理解一下我们新手, 我现在把所有分都用上了,只可惜总共才30分,再次谢谢!
etcd交予systemd管理,start时状态217不成功
日志信息如下: ``` Feb 06 05:04:48 master-15 systemd[1]: Unit etcd.service entered failed state. Feb 06 05:04:48 master-15 systemd[1]: etcd.service failed. Feb 06 05:04:54 master-15 systemd[1]: etcd.service holdoff time over, scheduling restart. Feb 06 05:04:54 master-15 systemd[1]: Starting Etcd Server... -- Subject: Unit etcd.service has begun start-up -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit etcd.service has begun starting up. Feb 06 05:04:54 master-15 systemd[16498]: Failed at step USER spawning /usr/bin/etcd: No such pr -- Subject: Process /usr/bin/etcd could not be executed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- The process /usr/bin/etcd could not be executed and failed. -- -- The error number returned by this process is 3. Feb 06 05:04:54 master-15 systemd[1]: etcd.service: main process exited, code=exited, status=217 Feb 06 05:04:54 master-15 systemd[1]: Failed to start Etcd Server. -- Subject: Unit etcd.service has failed -- Defined-By: systemd -- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel -- -- Unit etcd.service has failed. -- -- The result is failed. Feb 06 05:04:54 master-15 systemd[1]: Unit etcd.service entered failed state. Feb 06 05:04:54 master-15 systemd[1]: etcd.service failed. ``` etcd.service如下: ``` [Unit] Description=Etcd Server After=network.target After=network-online.target Wants=network-online.target [Service] Type=notify WorkingDirectory=/var/lib/etcd/ User=etcd # set GOMAXPROCS to number of processors ExecStart=/usr/bin/etcd \ --name=etcd1 \ --cert-file=/etc/kubernetes/ssl/etcd.pem \ --key-file=/etc/kubernetes/ssl/etcd-key.pem \ --peer-cert-file=/etc/kubernetes/ssl/etcd.pem \ --peer-key-file=/etc/kubernetes/ssl/etcd-key.pem \ --trusted-ca-file=/etc/kubernetes/ssl/ca.pem \ --peer-trusted-ca-file=/etc/kubernetes/ssl/ca.pem \ --initial-advertise-peer-urls=https://192.168.230.15:2380 \ --listen-peer-urls=https://192.168.230.15:2380 \ --listen-client-urls=https://192.168.230.15:2379,http://127.0.0.1:2379 \ --advertise-client-urls=https://192.168.230.15:2379 \ --initial-cluster-token=k8s-etcd-cluster \ --initial-cluster=etcd1=https://192.168.230.15:2380 \ --initial-cluster-state=new \ --data-dir=/var/lib/etcd Restart=on-failure RestartSec=5 LimitNOFILE=65536 [Install] WantedBy=multi-user.target ```
flutter项目无法引入qr_flutter包,packages get时候报错,望各位大佬指点迷津!
Package qr_flutter has no versions that match >=1.1.3 <2.0.0 derived from: - zhihu depends on version ^1.1.3 ---- Log transcript ---- FINE: Pub 2.0.0-dev.16.0 IO : Spawning "cmd /c ver" in F:\ECAVC\zhihu-flutter-master\zhihu-flutter-master\. IO : Finished ver. Exit code 0. | stdout: | | | | Microsoft Windows [Version 6.1.7601] | Nothing output on stderr. MSG : Resolving dependencies... SLVR: Solving dependencies: | - cupertino_icons ^0.1.0 from hosted (cupertino_icons) (locked to 0.1.1) | - flutter any from sdk (flutter) (locked to 0.0.0) IO : Get versions from https://pub.flutter-io.cn/api/packages/qr_flutter. IO : HTTP GET https://pub.flutter-io.cn/api/packages/qr_flutter | Accept: application/vnd.pub.v2+json | user-agent: Dart pub 2.0.0-dev.16.0 IO : HTTP response 200 OK for GET https://pub.flutter-io.cn/api/packages/qr_flutter | took 0:00:01.060953 | connection: keep-alive | transfer-encoding: chunked | date: Fri, 28 Sep 2018 13:45:12 GMT | content-encoding: gzip | vary: Accept-Encoding | x-m-reqid: qWoAAP8YGXNIlFgV | content-type: application/json | x-xss-protection: 1; mode=block | x-source: C/200 | x-m-log: QNM:xs462;SRCPROXY:xs481;SRC:254;SRCPROXY:255;QNM3:553 | server: marco/2.6 | x-request-id: e6d1190402c12d9729c11b58b7ab7625 | via: S.mix-gd-can-007, T.10.D, V.mix-gd-can-007, T.3.D, M.cun-hn-csx-005 | x-frame-options: SAMEORIGIN | x-content-type-options: nosniff | x-qnm-cache: Validate,MissValidate SLVR: * start at root SLVR: | cupertino_icons 0.1.1 from hosted is locked SLVR: | * select cupertino_icons 0.1.1 from hosted SLVR: | | english_words 3.1.3 from hosted is locked SLVR: | | * select english_words 3.1.3 from hosted SLVR: | | | flutter 0.0.0 from sdk is locked SLVR: | | | * select flutter 0.0.0 from sdk SLVR: | | | | collection 1.14.5 from hosted is locked SLVR: | | | | * select collection 1.14.5 from hosted SLVR: | | | | | flutter_test 0.0.0 from sdk is locked SLVR: | | | | | * select flutter_test 0.0.0 from sdk SLVR: | | | | | | * select pub itself SLVR: | | | | | | | args 1.2.0 from hosted is locked SLVR: | | | | | | | * select args 1.2.0 from hosted SLVR: | | | | | | | | async 2.0.3 from hosted is locked SLVR: | | | | | | | | * select async 2.0.3 from hosted SLVR: | | | | | | | | | barback 0.15.2+14 from hosted is locked SLVR: | | | | | | | | | * select barback 0.15.2+14 from hosted SLVR: | | | | | | | | | | boolean_selector 1.0.2 from hosted is locked SLVR: | | | | | | | | | | * select boolean_selector 1.0.2 from hosted SLVR: | | | | | | | | | | | charcode 1.1.1 from hosted is locked SLVR: | | | | | | | | | | | * select charcode 1.1.1 from hosted SLVR: | | | | | | | | | | | | cli_util 0.1.2+1 from hosted is locked SLVR: | | | | | | | | | | | | * select cli_util 0.1.2+1 from hosted SLVR: | | | | | | | | | | | | | convert 2.0.1 from hosted is locked SLVR: | | | | | | | | | | | | | * select convert 2.0.1 from hosted SLVR: | | | | | | | | | | | | | | crypto 2.0.2+1 from hosted is locked SLVR: | | | | | | | | | | | | | | * select crypto 2.0.2+1 from hosted SLVR: | | | | | | | | | | | | | | | csslib 0.14.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | * select csslib 0.14.1 from hosted SLVR: | | | | | | | | | | | | | | | | glob 1.1.5 from hosted is locked SLVR: | | | | | | | | | | | | | | | | * select glob 1.1.5 from hosted SLVR: | | | | | | | | | | | | | | | | | html 0.13.2+2 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | * select html 0.13.2+2 from hosted SLVR: | | | | | | | | | | | | | | | | | | http 0.11.3+16 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | * select http 0.11.3+16 from hosted SLVR: | | | | | | | | | | | | | | | | | | | http_multi_server 2.0.4 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | * select http_multi_server 2.0.4 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | http_parser 3.1.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | * select http_parser 3.1.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | io 0.3.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | * select io 0.3.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | isolate 1.1.0 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | * select isolate 1.1.0 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | js 0.6.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | * select js 0.6.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | logging 0.11.3+1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | * select logging 0.11.3+1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | matcher 0.12.1+4 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | * select matcher 0.12.1+4 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | meta 1.1.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | * select meta 1.1.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | mime 0.9.5 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | * select mime 0.9.5 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | mockito 2.2.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select mockito 2.2.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | multi_server_socket 1.0.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select multi_server_socket 1.0.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | node_preamble 1.4.0 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select node_preamble 1.4.0 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | package_config 1.0.3 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select package_config 1.0.3 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | package_resolver 1.0.2 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select package_resolver 1.0.2 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | path 1.5.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select path 1.5.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | plugin 0.2.0+2 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select plugin 0.2.0+2 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pool 1.3.4 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select pool 1.3.4 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pub_semver 1.3.2 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select pub_semver 1.3.2 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | quiver 0.28.0 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select quiver 0.28.0 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shelf 0.7.2 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select shelf 0.7.2 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shelf_packages_handler 1.0.3 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select shelf_packages_handler 1.0.3 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shelf_static 0.2.7 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select shelf_static 0.2.7 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | shelf_web_socket 0.2.2 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select shelf_web_socket 0.2.2 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sky_engine 0.0.99 from path is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select sky_engine 0.0.99 from path SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source_map_stack_trace 1.1.4 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select source_map_stack_trace 1.1.4 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source_maps 0.10.4 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select source_maps 0.10.4 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | source_span 1.4.0 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select source_span 1.4.0 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stack_trace 1.9.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select stack_trace 1.9.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | stream_channel 1.6.3 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select stream_channel 1.6.3 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | string_scanner 1.0.2 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select string_scanner 1.0.2 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | term_glyph 1.0.0 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select term_glyph 1.0.0 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | test 0.12.30+1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select test 0.12.30+1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | analyzer 0.31.1 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select analyzer 0.31.1 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | front_end 0.1.0-alpha.9 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select front_end 0.1.0-alpha.9 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kernel 0.3.0-alpha.9 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select kernel 0.3.0-alpha.9 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | typed_data 1.1.4 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select typed_data 1.1.4 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | utf 0.9.0+3 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select utf 0.9.0+3 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vector_math 2.0.5 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select vector_math 2.0.5 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | watcher 0.9.7+6 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select watcher 0.9.7+6 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | web_socket_channel 1.0.6 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select web_socket_channel 1.0.6 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | yaml 2.1.13 from hosted is locked SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * select yaml 2.1.13 from hosted SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | version 1.1.2 of qr_flutter doesn't match >=1.1.3 <2.0.0: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zhihu 0.0.0 (root) -> qr_flutter ^1.1.3 from hosted (qr_flutter) SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | version 1.1.1 of qr_flutter doesn't match >=1.1.3 <2.0.0: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zhihu 0.0.0 (root) -> qr_flutter ^1.1.3 from hosted (qr_flutter) SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | version 1.1.0 of qr_flutter doesn't match >=1.1.3 <2.0.0: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zhihu 0.0.0 (root) -> qr_flutter ^1.1.3 from hosted (qr_flutter) SLVR: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | version 1.0.0 of qr_flutter doesn't match >=1.1.3 <2.0.0: | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | zhihu 0.0.0 (root) -> qr_flutter ^1.1.3 from hosted (qr_flutter) SLVR: BacktrackingSolver took 0:00:01.494368 seconds. | - Tried 1 solutions | - Requested 1 version lists | - Looked up 1 cached version lists | FINE: Resolving dependencies finished (1.5s). ERR : Package qr_flutter has no versions that match >=1.1.3 <2.0.0 derived from: | - zhihu depends on version ^1.1.3 FINE: Exception type: NoVersionException FINE: package:pub/src/entrypoint.dart 216 Entrypoint.acquireDependencies | package:pub/src/command/get.dart 38 GetCommand.run | package:args/command_runner.dart 194 CommandRunner.runCommand | package:pub/src/command_runner.dart 167 PubCommandRunner.runCommand.<fn> | dart:async new Future.sync | package:pub/src/utils.dart 103 captureErrors.<fn> | package:stack_trace Chain.capture | package:pub/src/utils.dart 118 captureErrors | package:pub/src/command_runner.dart 167 PubCommandRunner.runCommand | package:pub/src/command_runner.dart 116 PubCommandRunner.run | E:\b\build\slave\dart-sdk-windows-dev\build\sdk\third_party\pkg\pub\bin\pub.dart 8 main | ===== asynchronous gap =========================== | dart:async _Completer.completeError | package:pub/src/entrypoint.dart Entrypoint.acquireDependencies | ===== asynchronous gap =========================== | dart:async _asyncThenWrapperHelper | package:pub/src/entrypoint.dart 194 Entrypoint.acquireDependencies | package:pub/src/command/get.dart 38 GetCommand.run | package:args/command_runner.dart 194 CommandRunner.runCommand | ===== asynchronous gap =========================== | dart:async new Future.microtask | package:args/command_runner.dart 142 CommandRunner.runCommand | package:pub/src/command_runner.dart 167 PubCommandRunner.runCommand.<fn> | dart:async new Future.sync | package:pub/src/utils.dart 103 captureErrors.<fn> | package:stack_trace Chain.capture | package:pub/src/utils.dart 118 captureErrors | package:pub/src/command_runner.dart 167 PubCommandRunner.runCommand ---- End log transcript ---- pub get failed (1) ``` ```
CentOS sublime text build error
build system 文件内容: { "cmd": ["make", "linux"], "working_dir": "/home/cyb/lua-5.3.4/src", "encoding": "utf-8" } build 错误信息: Running make linux Exception in thread Thread-4: Traceback (most recent call last): File "./python3.3/threading.py", line 901, in _bootstrap_inner File "./python3.3/threading.py", line 858, in run File "/opt/sublime_text/Packages/Default.sublime-package/exec.py", line 152, in read_fileno decoder_cls = codecs.getincrementaldecoder(self.listener.encoding) AttributeError: 'NoneType' object has no attribute 'encoding' 如果我把build system里的命令写错,比如把make写成其他的不存在的命令,在sublime的build result窗口会显示我的命令有错误,但是如果命令对了,成功进入make的环节,就会报错~ code in exec.py ``` import collections import functools import html import os import subprocess import sys import threading import time import codecs import signal import sublime import sublime_plugin class ProcessListener(object): def on_data(self, proc, data): pass def on_finished(self, proc): pass class AsyncProcess(object): """ Encapsulates subprocess.Popen, forwarding stdout to a supplied ProcessListener (on a separate thread) """ def __init__(self, cmd, shell_cmd, env, listener, path="", shell=False): """ "path" and "shell" are options in build systems """ if not shell_cmd and not cmd: raise ValueError("shell_cmd or cmd is required") if shell_cmd and not isinstance(shell_cmd, str): raise ValueError("shell_cmd must be a string") self.listener = listener self.killed = False self.start_time = time.time() # Hide the console window on Windows startupinfo = None if os.name == "nt": startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW # Set temporary PATH to locate executable in cmd if path: old_path = os.environ["PATH"] # The user decides in the build system whether he wants to append $PATH # or tuck it at the front: "$PATH;C:\\new\\path", "C:\\new\\path;$PATH" os.environ["PATH"] = os.path.expandvars(path) proc_env = os.environ.copy() proc_env.update(env) for k, v in proc_env.items(): proc_env[k] = os.path.expandvars(v) if sys.platform == "win32": preexec_fn = None else: preexec_fn = os.setsid if shell_cmd and sys.platform == "win32": # Use shell=True on Windows, so shell_cmd is passed through with the correct escaping self.proc = subprocess.Popen( shell_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, startupinfo=startupinfo, env=proc_env, shell=True) elif shell_cmd and sys.platform == "darwin": # Use a login shell on OSX, otherwise the users expected env vars won't be setup self.proc = subprocess.Popen( ["/usr/bin/env", "bash", "-l", "-c", shell_cmd], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, startupinfo=startupinfo, env=proc_env, preexec_fn=preexec_fn, shell=False) elif shell_cmd and sys.platform == "linux": # Explicitly use /bin/bash on Linux, to keep Linux and OSX as # similar as possible. A login shell is explicitly not used for # linux, as it's not required self.proc = subprocess.Popen( ["/usr/bin/env", "bash", "-c", shell_cmd], stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, startupinfo=startupinfo, env=proc_env, preexec_fn=preexec_fn, shell=False) else: # Old style build system, just do what it asks self.proc = subprocess.Popen( cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, stdin=subprocess.PIPE, startupinfo=startupinfo, env=proc_env, preexec_fn=preexec_fn, shell=shell) if path: os.environ["PATH"] = old_path if self.proc.stdout: threading.Thread( target=self.read_fileno, args=(self.proc.stdout.fileno(), True) ).start() if self.proc.stderr: threading.Thread( target=self.read_fileno, args=(self.proc.stderr.fileno(), False) ).start() def kill(self): if not self.killed: self.killed = True if sys.platform == "win32": # terminate would not kill process opened by the shell cmd.exe, # it will only kill cmd.exe leaving the child running startupinfo = subprocess.STARTUPINFO() startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW subprocess.Popen( "taskkill /PID %d /T /F" % self.proc.pid, startupinfo=startupinfo) else: os.killpg(self.proc.pid, signal.SIGTERM) self.proc.terminate() self.listener = None def poll(self): return self.proc.poll() is None def exit_code(self): return self.proc.poll() def read_fileno(self, fileno, execute_finished): decoder_cls = codecs.getincrementaldecoder(self.listener.encoding) decoder = decoder_cls('replace') while True: data = decoder.decode(os.read(fileno, 2**16)) if len(data) > 0: if self.listener: self.listener.on_data(self, data) else: try: os.close(fileno) except OSError: pass if execute_finished and self.listener: self.listener.on_finished(self) break class ExecCommand(sublime_plugin.WindowCommand, ProcessListener): BLOCK_SIZE = 2**14 text_queue = collections.deque() text_queue_proc = None text_queue_lock = threading.Lock() proc = None errs_by_file = {} phantom_sets_by_buffer = {} show_errors_inline = True def run( self, cmd=None, shell_cmd=None, file_regex="", line_regex="", working_dir="", encoding="utf-8", env={}, quiet=False, kill=False, update_phantoms_only=False, hide_phantoms_only=False, word_wrap=True, syntax="Packages/Text/Plain text.tmLanguage", # Catches "path" and "shell" **kwargs): if update_phantoms_only: if self.show_errors_inline: self.update_phantoms() return if hide_phantoms_only: self.hide_phantoms() return # clear the text_queue with self.text_queue_lock: self.text_queue.clear() self.text_queue_proc = None if kill: if self.proc: self.proc.kill() self.proc = None self.append_string(None, "[Cancelled]") return if not hasattr(self, 'output_view'): # Try not to call get_output_panel until the regexes are assigned self.output_view = self.window.create_output_panel("exec") # Default the to the current files directory if no working directory was given if working_dir == "" and self.window.active_view() and self.window.active_view().file_name(): working_dir = os.path.dirname(self.window.active_view().file_name()) self.output_view.settings().set("result_file_regex", file_regex) self.output_view.settings().set("result_line_regex", line_regex) self.output_view.settings().set("result_base_dir", working_dir) self.output_view.settings().set("word_wrap", word_wrap) self.output_view.settings().set("line_numbers", False) self.output_view.settings().set("gutter", False) self.output_view.settings().set("scroll_past_end", False) self.output_view.assign_syntax(syntax) # Call create_output_panel a second time after assigning the above # settings, so that it'll be picked up as a result buffer self.window.create_output_panel("exec") self.encoding = encoding self.quiet = quiet self.proc = None if not self.quiet: if shell_cmd: print("Running " + shell_cmd) elif cmd: cmd_string = cmd if not isinstance(cmd, str): cmd_string = " ".join(cmd) print("Running " + cmd_string) sublime.status_message("Building") show_panel_on_build = sublime.load_settings("Preferences.sublime-settings").get("show_panel_on_build", True) if show_panel_on_build: self.window.run_command("show_panel", {"panel": "output.exec"}) self.hide_phantoms() self.show_errors_inline = sublime.load_settings("Preferences.sublime-settings").get("show_errors_inline", True) merged_env = env.copy() if self.window.active_view(): user_env = self.window.active_view().settings().get('build_env') if user_env: merged_env.update(user_env) # Change to the working dir, rather than spawning the process with it, # so that emitted working dir relative path names make sense if working_dir != "": os.chdir(working_dir) self.debug_text = "" if shell_cmd: self.debug_text += "[shell_cmd: " + shell_cmd + "]\n" else: self.debug_text += "[cmd: " + str(cmd) + "]\n" self.debug_text += "[dir: " + str(os.getcwd()) + "]\n" if "PATH" in merged_env: self.debug_text += "[path: " + str(merged_env["PATH"]) + "]" else: self.debug_text += "[path: " + str(os.environ["PATH"]) + "]" try: # Forward kwargs to AsyncProcess self.proc = AsyncProcess(cmd, shell_cmd, merged_env, self, **kwargs) with self.text_queue_lock: self.text_queue_proc = self.proc except Exception as e: self.append_string(None, str(e) + "\n") self.append_string(None, self.debug_text + "\n") if not self.quiet: self.append_string(None, "[Finished]") def is_enabled(self, kill=False, **kwargs): if kill: return (self.proc is not None) and self.proc.poll() else: return True def append_string(self, proc, str): was_empty = False with self.text_queue_lock: if proc != self.text_queue_proc and proc: # a second call to exec has been made before the first one # finished, ignore it instead of intermingling the output. proc.kill() return if len(self.text_queue) == 0: was_empty = True self.text_queue.append("") available = self.BLOCK_SIZE - len(self.text_queue[-1]) if len(str) < available: cur = self.text_queue.pop() self.text_queue.append(cur + str) else: self.text_queue.append(str) if was_empty: sublime.set_timeout(self.service_text_queue, 0) def service_text_queue(self): is_empty = False with self.text_queue_lock: if len(self.text_queue) == 0: # this can happen if a new build was started, which will clear # the text_queue return characters = self.text_queue.popleft() is_empty = (len(self.text_queue) == 0) self.output_view.run_command( 'append', {'characters': characters, 'force': True, 'scroll_to_end': True}) if self.show_errors_inline and characters.find('\n') >= 0: errs = self.output_view.find_all_results_with_text() errs_by_file = {} for file, line, column, text in errs: if file not in errs_by_file: errs_by_file[file] = [] errs_by_file[file].append((line, column, text)) self.errs_by_file = errs_by_file self.update_phantoms() if not is_empty: sublime.set_timeout(self.service_text_queue, 1) def finish(self, proc): if not self.quiet: elapsed = time.time() - proc.start_time exit_code = proc.exit_code() if exit_code == 0 or exit_code is None: self.append_string(proc, "[Finished in %.1fs]" % elapsed) else: self.append_string(proc, "[Finished in %.1fs with exit code %d]\n" % (elapsed, exit_code)) self.append_string(proc, self.debug_text) if proc != self.proc: return errs = self.output_view.find_all_results() if len(errs) == 0: sublime.status_message("Build finished") else: sublime.status_message("Build finished with %d errors" % len(errs)) def on_data(self, proc, data): # Normalize newlines, Sublime Text always uses a single \n separator # in memory. data = data.replace('\r\n', '\n').replace('\r', '\n') self.append_string(proc, data) def on_finished(self, proc): sublime.set_timeout(functools.partial(self.finish, proc), 0) def update_phantoms(self): stylesheet = ''' <style> div.error-arrow { border-top: 0.4rem solid transparent; border-left: 0.5rem solid color(var(--redish) blend(var(--background) 30%)); width: 0; height: 0; } div.error { padding: 0.4rem 0 0.4rem 0.7rem; margin: 0 0 0.2rem; border-radius: 0 0.2rem 0.2rem 0.2rem; } div.error span.message { padding-right: 0.7rem; } div.error a { text-decoration: inherit; padding: 0.35rem 0.7rem 0.45rem 0.8rem; position: relative; bottom: 0.05rem; border-radius: 0 0.2rem 0.2rem 0; font-weight: bold; } html.dark div.error a { background-color: #00000018; } html.light div.error a { background-color: #ffffff18; } </style> ''' for file, errs in self.errs_by_file.items(): view = self.window.find_open_file(file) if view: buffer_id = view.buffer_id() if buffer_id not in self.phantom_sets_by_buffer: phantom_set = sublime.PhantomSet(view, "exec") self.phantom_sets_by_buffer[buffer_id] = phantom_set else: phantom_set = self.phantom_sets_by_buffer[buffer_id] phantoms = [] for line, column, text in errs: pt = view.text_point(line - 1, column - 1) phantoms.append(sublime.Phantom( sublime.Region(pt, view.line(pt).b), ('<body id=inline-error>' + stylesheet + '<div class="error-arrow"></div><div class="error">' + '<span class="message">' + html.escape(text, quote=False) + '</span>' + '<a href=hide>' + chr(0x00D7) + '</a></div>' + '</body>'), sublime.LAYOUT_BELOW, on_navigate=self.on_phantom_navigate)) phantom_set.update(phantoms) def hide_phantoms(self): for file, errs in self.errs_by_file.items(): view = self.window.find_open_file(file) if view: view.erase_phantoms("exec") self.errs_by_file = {} self.phantom_sets_by_buffer = {} self.show_errors_inline = False def on_phantom_navigate(self, url): self.hide_phantoms() class ExecEventListener(sublime_plugin.EventListener): def on_load(self, view): w = view.window() if w is not None: w.run_command('exec', {'update_phantoms_only': True}) ```
使用ACE互斥锁进行线程同步,编译都没有问题,不加锁跑起来线程不同步很正常,加了锁,运行时崩溃
参数类: class Args { public: Args(int iterations):mutex_(), iterations_(iterations){} //初始化列表 ACE_Thread_Mutex mutex_; //锁对象 int iterations_; }; worker函数 void* worker (void * arguments) { //这里我没有用 iterations_,用全局变量number做了一个简单循环 Args *arg= (Args*) arguments; while (::number>0) { LOG_INFO("yes i can" << number); arg->mutex_.acquire(); //不加这个锁,number会错乱,加了锁,运行时崩溃 number -= 10; arg->mutex_.release(); } return NULL; } 主程序 int n_threads = 3; //定义即将新建的线程的线程ID和句柄 ACE_thread_t *threadID = new ACE_thread_t[n_threads+1]; ACE_hthread_t *threadHandles = new ACE_hthread_t[n_threads+1]; //启动线程组 if(ACE_Thread::spawn_n( threadID, //线程ID n_threads, //线程数 (ACE_THR_FUNC)worker, //线程执行的函数worker 0, //worker函数参数 THR_JOINABLE | THR_NEW_LWP, //flags ACE_DEFAULT_THREAD_PRIORITY, 0, 0, threadHandles)==-1) ACE_DEBUG((LM_DEBUG,"Error in spawning thread/n")); //等待所有线程运行结束 for(int i=0; i < n_threads; i++) { ACE_Thread::join(threadHandles[i]); }
相见恨晚的超实用网站
相见恨晚的超实用网站 持续更新中。。。
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它是一个过程,是一个不断累积、不断沉淀、不断总结、善于传达自己的个人见解以及乐于分享的过程。
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 free -m 其中:m表示兆,也可以用g,注意都要小写 Men:表示物理内存统计 total:表示物理内存总数(total=used+free) use...
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入 假设现有4个人...
python学习方法总结(内附python全套学习资料)
不要再问我python好不好学了 我之前做过半年少儿编程老师,一个小学四年级的小孩子都能在我的教学下独立完成python游戏,植物大战僵尸简单版,如果要肯花时间,接下来的网络开发也不是问题,人工智能也可以学个调包也没啥问题。。。。。所以python真的是想学就一定能学会的!!!! --------------------华丽的分割线-------------------------------- ...
兼职程序员一般可以从什么平台接私活?
这个问题我进行了系统性的总结,以下将进行言简意赅的说明和渠道提供,希望对各位小猿/小媛们有帮助~ 根据我们的经验,程序员兼职主要分为三种:兼职职位众包、项目整包和自由职业者驻场。 所谓的兼职职位众包,指的是需求方这边有自有工程师配合,只需要某个职位的工程师开发某个模块的项目。比如开发一个 app,后端接口有人开发,但是缺少 iOS 前端开发工程师,那么他们就会发布一个职位招聘前端,来配合公司一...
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 演示地点演示 html代码如下` music 这个年纪 七月的风 音乐 ` 然后就是css`*{ margin: 0; padding: 0; text-decoration: none; list-...
JAVA 基础练习题
第一题 1.查看以下代码,并写出结果 public class Test01 { public static void main(String[] args) { int i1 = 5; boolean result = (i1++ &gt; 5) &amp;&amp; (++i1 &gt; 4); System.out.println(result); Sy...
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。
数据库优化 - SQL优化
以实际SQL入手,带你一步一步走上SQL优化之路!
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 cpp 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7 p...
通俗易懂地给女朋友讲:线程池的内部原理
餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”
C++知识点 —— 整合(持续更新中)
本文记录自己在自学C++过程中不同于C的一些知识点,适合于有C语言基础的同学阅读。如果纰漏,欢迎回复指正 目录 第一部分 基础知识 一、HelloWorld与命名空间 二、引用和引用参数 2.1引用的定义 2.2 将引用用作函数参数 2.3 将引用用于类对象 2.4 引用和继承 2.5 何时使用引用参数 2.6 引用和指针的区别 三、内联函数 四、默认参数的...
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
将代码部署服务器,每日早上定时获取到天气数据,并发送到邮箱。 也可以说是一个小型人工智障。 知识可以运用在不同地方,不一定非是天气预报。
经典算法(5)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
Python实例大全(基于Python3.7.4)
博客说明: 这是自己写的有关python语言的一篇综合博客。 只作为知识广度和编程技巧学习,不过于追究学习深度,点到即止、会用即可。 主要是基础语句,如三大控制语句(顺序、分支、循环),随机数的生成,数据类型的区分和使用; 也会涉及常用的算法和数据结构,以及面试题相关经验; 主体部分是针对python的数据挖掘和数据分析,主要先攻爬虫方向:正则表达式匹配,常用数据清洗办法,scrapy及其他爬虫框架,数据存储方式及其实现; 最后还会粗略涉及人工智能领域,玩转大数据与云计算、进行相关的预测和分析。
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹...
面试官:你连RESTful都不知道我怎么敢要你?
干货,2019 RESTful最贱实践
机械转行java自学经历,零基础学java,血泪总结的干货
机械转行java自学经历,零基础学java,血泪总结的干货 据说,再恩爱的夫妻,一生中都有100次想离婚的念头和50次想掐死对方的冲动。 求职路上亦是如此,打开这篇文章,相信你也有转行的想法。和身边的朋友聊过,入职后的他们,或多或少对现在的职位都有些不满,都有过转行的冲动。 可他们只是想,而我真的这样做了。 下面就介绍下我转行的血泪史。 我为什么要转行 高中复读了一年,考了个双非院校的机械。当时...
刷了几千道算法题,这些我私藏的刷题网站都在这里了!
遥想当年,机缘巧合入了 ACM 的坑,周边巨擘林立,从此过上了"天天被虐似死狗"的生活… 然而我是谁,我可是死狗中的战斗鸡,智力不够那刷题来凑,开始了夜以继日哼哧哼哧刷题的日子,从此"读题与提交齐飞, AC 与 WA 一色 ",我惊喜的发现被题虐既刺激又有快感,那一刻我泪流满面。这么好的事儿作为一个正直的人绝不能自己独享,经过激烈的颅内斗争,我决定把我私藏的十几个 T 的,阿不,十几个刷题网...
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看...
【Linux系统编程】Linux信号列表
00. 目录 文章目录00. 目录01. Linux信号编号02. 信号简介03. 特殊信号04. 附录 01. Linux信号编号 在 Linux 下,每个信号的名字都以字符 SIG 开头,每个信号和一个数字编码相对应,在头文件 signum.h 中,这些信号都被定义为正整数。信号名定义路径:/usr/include/i386-linux-gnu/bits/signum.h 要想查看这些信号和...
JavaScript 为什么能活到现在?
作者 | 司徒正美 责编 |郭芮 出品 | CSDN(ID:CSDNnews) JavaScript能发展到现在的程度已经经历不少的坎坷,早产带来的某些缺陷是永久性的,因此浏览器才有禁用JavaScript的选项。甚至在jQuery时代有人问出这样的问题,jQuery与JavaScript哪个快?在Babel.js出来之前,发明一门全新的语言代码代替JavaScript...
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
Python 编程开发 实用经验和技巧
Python是一门很灵活的语言,也有很多实用的方法,有时候实现一个功能可以用多种方法实现,我这里总结了一些常用的方法和技巧,包括小数保留指定位小数、判断变量的数据类型、类方法@classmethod、制表符中文对齐、遍历字典、datetime.timedelta的使用等,会持续更新......
借助AI力量,谷歌解开生命奥秘?
全文共4484字,预计学习时长8分钟 Paweł Czerwiński发布在 Unsplash上的原图 假如疾病不复存在会发生什么?如果我们能像大自然一样迅速获取能量又会发生什么?要是我们能够在极短时间内循环塑料、废油、或其它的一些物质呢?如果人类能够解开生命的奥秘,那么以上这些想象将在未来成为现实。人工智能企业DeepMind的数据科学分析师日前在此领域有了重大发现。以下为具体内容:...
吐血推荐珍藏的Visual Studio Code插件
作为一名Java工程师,由于工作需要,最近一个月一直在写NodeJS,这种经历可以说是一部辛酸史了。好在有神器Visual Studio Code陪伴,让我的这段经历没有更加困难。眼看这段经历要告一段落了,今天就来给大家分享一下我常用的一些VSC的插件。 VSC的插件安装方法很简单,只需要点击左侧最下方的插件栏选项,然后就可以搜索你想要的插件了。 下面我们进入正题 Material Theme ...
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1...
Python 植物大战僵尸代码实现(2):植物卡片选择和种植
这篇文章要介绍的是: - 上方植物卡片栏的实现。 - 点击植物卡片,鼠标切换为植物图片。 - 鼠标移动时,判断当前在哪个方格中,并显示半透明的植物作为提示。
Python3.7黑帽编程——病毒篇(基础篇)
引子 Hacker(黑客),往往被人们理解为只会用非法手段来破坏网络安全的计算机高手。但是,黑客其实不是这样的,真正的“网络破坏者”是和黑客名称和读音相似的骇客。 骇客,是用黑客手段进行非法操作并为己取得利益的人。黑客,是用黑客手段为国家或单位做事的人。 那么,既然黑客不是一个很坏的职业,我们就可以去试着学习。 黑客本身的初衷 ——黑客其实一直是善良的。 骇客其实他的前身就是黑客。 骇客与黑客分家...
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员...
了解了这些,轻松拿offer——Java面试之道
本篇文章将讲述Java基础中的面试题及其解答,希望对大家有所帮助。 synchronized和Lock的区别 synchronized是JVM层面实现的,java提供的关键字,Lock是API层面的锁。 synchronized不需要手动释放锁,底层会自动释放;Lock则需要手动释放锁,否则有可能导致死锁 synchronized等待不可中断,除非抛出异常或者执行完成;Lock可以中断,通过in...
相关热词 c#委托 逆变与协变 c#新建一个项目 c#获取dll文件路径 c#子窗体调用主窗体事件 c# 拷贝目录 c# 调用cef 网页填表c#源代码 c#部署端口监听项目、 c#接口中的属性使用方法 c# 昨天
立即提问