windows C++开发node.js addon问题?
  1. win7x64, vs2013RTM, node.js-v0.12, gyp
  2. 问题: node官网上的例子可以跑,但看很多写成如下这样:
//官网上的例子
 void Method(const FunctionCallbackInfo<Value>& args) {
    Isolate* isolate = Isolate::GetCurrent();
    HandleScope scope(isolate);
    args.GetReturnValue().Set(String::NewFromUtf8(/isolate, "world");
}

但是看到很多这样写的,这也是官网给出的git链接上的代码

//node官网给出的git链接中的qt的源码
 Handle<Value> QPointFWrap::NewInstance(QPointF q) {
  HandleScope scope;

  Local<Object> instance = constructor->NewInstance(0, NULL);
  QPointFWrap* w = node::ObjectWrap::Unwrap<QPointFWrap>(instance);
  w->SetWrapped(q);

  return scope.Close(instance);
}

但是我自己写的时候,用Arguments就会报错。
在v8.h中,class Arguments是在namespace internal中
像这样:

 namespace v8{
 //...
 namespace internal{
     class Arguments;
 }
 //...
 }

还有,HandleScope scope; 这样写也不行。
v8.h中HandleScope里面没有默认构造函数,只能HandleScope scope(isolate);这样,也没有scope.Close(...)。
但是为什么qt的源码就能想上面给出的那样写呢?

1个回答

自问自答:是因为版本的问题?我看了node.js-v0.10.23的源码,里面的addon例子.cc文件是这样写的

 Handle<Value> Method(const Arguments& args) {
  HandleScope scope;
  return scope.Close(String::New("world"));
}
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
windows C++开发node.js addon问题?
1. win7x64, vs2013RTM, node.js-v0.12, gyp 2. 问题: node官网上的例子可以跑,但看很多写成如下这样: ``` //官网上的例子 void Method(const FunctionCallbackInfo<Value>& args) { Isolate* isolate = Isolate::GetCurrent(); HandleScope scope(isolate); args.GetReturnValue().Set(String::NewFromUtf8(/isolate, "world"); } ``` 但是看到很多这样写的,这也是官网给出的git链接上的代码 ``` //node官网给出的git链接中的qt的源码 Handle<Value> QPointFWrap::NewInstance(QPointF q) { HandleScope scope; Local<Object> instance = constructor->NewInstance(0, NULL); QPointFWrap* w = node::ObjectWrap::Unwrap<QPointFWrap>(instance); w->SetWrapped(q); return scope.Close(instance); } ``` 但是我自己写的时候,用Arguments就会报错。 在v8.h中,class Arguments是在namespace internal中 像这样: ``` namespace v8{ //... namespace internal{ class Arguments; } //... } ``` 还有,HandleScope scope; 这样写也不行。 v8.h中HandleScope里面没有默认构造函数,只能HandleScope scope(isolate);这样,也没有scope.Close(...)。 但是为什么qt的源码就能想上面给出的那样写呢?
node.js c++ addon插件打开窗体后闪退
本人用C++编写了一个node.js插件,功能是打开一个windows窗体处理一些业务,等关闭窗体时把窗体上的数据返回给node.js请求方法; 现在问题是窗体打开一下就闪退了,请求方请求结束了,对C++和node 插件不熟悉,不知用什么方法可以让窗体一直是打开状态?
为什么nuxt.js无法安装node-sass?
1.npm 不管怎么样都安装不了 淘宝镜像也没用 2.每次安装后都卡在Downloading binary from https://github.com/sass/node-sass/releases/download/v4.12.0/win32-x64-64这里然后就报错 3.T.T小白求教 ``` PS E:\Users\FuYuHao\Desktop\sb\a\aaa> npm i node-sass > node-sass@4.12.0 install E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass > node scripts/install.js Downloading binary from https://github.com/sass/node-sass/releases/download/v4.12.0/win32-x64-64_binding.node Cannot download "https://github.com/sass/node-sass/releases/download/v4.12.0/win32-x64-64_binding.node": connect ETIMEDOUT 52.216.135.19:443 Timed out whilst downloading the prebuilt binary Hint: If github.com is not accessible in your location try setting a proxy via HTTP_PROXY, e.g. export HTTP_PROXY=http://example.com:1234 or configure npm proxy via npm config set proxy http://example.com:8080 > node-sass@4.12.0 postinstall E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass > node scripts/build.js Building: C:\Program Files\nodejs\node.exe E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-gyp\bin\node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library= gyp info it worked if it ends with ok gyp verb cli [ 'C:\\Program Files\\nodejs\\node.exe', gyp verb cli 'E:\\Users\\FuYuHao\\Desktop\\sb\\a\\aaa\\node_modules\\node-gyp\\bin\\node-gyp.js', gyp verb cli 'rebuild', gyp verb cli '--verbose', gyp verb cli '--libsass_ext=', gyp verb cli '--libsass_cflags=', gyp verb cli '--libsass_ldflags=', gyp verb cli '--libsass_library=' ] gyp info using node-gyp@3.8.0 gyp info using node@10.14.1 | win32 | x64 gyp verb command rebuild [] gyp verb command clean [] gyp verb clean removing "build" directory gyp verb command configure [] gyp verb check python checking for Python executable "python2" in the PATH gyp verb `which` failed Error: not found: python2 gyp verb `which` failed at getNotFoundError (E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\which\which.js:13:12) gyp verb `which` failed at F (E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\which\which.js:68:19) gyp verb `which` failed at E (E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\which\which.js:80:29) gyp verb `which` failed at E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\which\which.js:89:16 gyp verb `which` failed at E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\isexe\index.js:42:5 gyp verb `which` failed at E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\isexe\windows.js:36:5 gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:154:21) gyp verb `which` failed python2 { Error: not found: python2 gyp verb `which` failed at getNotFoundError (E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\which\which.js:13:12) gyp verb `which` failed at F (E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\which\which.js:68:19) gyp verb `which` failed at E (E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\which\which.js:80:29) gyp verb `which` failed at E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\which\which.js:89:16 gyp verb `which` failed at E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\isexe\index.js:42:5 gyp verb `which` failed at E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\isexe\windows.js:36:5 gyp verb `which` failed at FSReqWrap.oncomplete (fs.js:154:21) gyp verb `which` failed stack: gyp verb `which` failed 'Error: not found: python2\n at getNotFoundError (E:\\Users\\FuYuHao\\Desktop\\sb\\a\\aaa\\node_modules\\which\\which.js:13:12)\n at F (E:\\Users\\FuYuHao\\Desktop\\sb\\a\\aaa\\node_modules\\which\\which.js:68:19)\n at E (E:\\Users\\FuYuHao\\Desktop\\sb\\a\\aaa\\node_modules\\which\\which.js:80:29)\n at E:\\Users\\FuYuHao\\Desktop\\sb\\a\\aaa\\node_modules\\which\\which.js:89:16\n at E:\\Users\\FuYuHao\\Desktop\\sb\\a\\aaa\\node_modules\\isexe\\index.js:42:5\n at E:\\Users\\FuYuHao\\Desktop\\sb\\a\\aaa\\node_modules\\isexe\\windows.js:36:5\n at FSReqWrap.oncomplete (fs.js:154:21)', gyp verb `which` failed code: 'ENOENT' } gyp verb check python checking for Python executable "python" in the PATH gyp verb `which` succeeded python C:\Python27\python.EXE gyp verb check python version `C:\Python27\python.EXE -c "import sys; print "2.7.15 gyp verb check python version .%s.%s" % sys.version_info[:3];"` returned: %j gyp verb get node dir no --target version specified, falling back to host node version: 10.14.1 gyp verb command install [ '10.14.1' ] gyp verb install input version string "10.14.1" gyp verb install installing version: 10.14.1 gyp verb install --ensure was passed, so won't reinstall if already installed gyp verb install version is already installed, need to check "installVersion" gyp verb got "installVersion" 9 gyp verb needs "installVersion" 9 gyp verb install version is good gyp verb get node dir target node version installed: 10.14.1 gyp verb build dir attempting to create "build" dir: E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build gyp verb build dir "build" dir needed to be created? E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build gyp verb find vs2017 Found installation at: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools gyp verb find vs2017 - Found Microsoft.VisualStudio.Component.Windows10SDK.17763 gyp verb find vs2017 - Found Microsoft.VisualStudio.Component.VC.Tools.x86.x64 gyp verb find vs2017 - Found Microsoft.VisualStudio.VC.MSBuild.Base gyp verb find vs2017 - Using this installation with Windows 10 SDK gyp verb find vs2017 using installation: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools gyp verb build/config.gypi creating config file gyp verb build/config.gypi writing out config file: E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\config.gypi gyp verb config.gypi checking for gypi file: E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\config.gypi gyp verb common.gypi checking for gypi file: E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\common.gypi gyp verb gyp gyp format was not specified; forcing "msvs" gyp info spawn C:\Python27\python.EXE gyp info spawn args [ 'E:\\Users\\FuYuHao\\Desktop\\sb\\a\\aaa\\node_modules\\node-gyp\\gyp\\gyp_main.py', gyp info spawn args 'binding.gyp', gyp info spawn args '-f', gyp info spawn args 'msvs', gyp info spawn args '-G', gyp info spawn args 'msvs_version=2015', gyp info spawn args '-I', gyp info spawn args 'E:\\Users\\FuYuHao\\Desktop\\sb\\a\\aaa\\node_modules\\node-sass\\build\\config.gypi', gyp info spawn args '-I', gyp info spawn args 'E:\\Users\\FuYuHao\\Desktop\\sb\\a\\aaa\\node_modules\\node-gyp\\addon.gypi', gyp info spawn args '-I', gyp info spawn args 'C:\\Users\\FuYuHao\\.node-gyp\\10.14.1\\include\\node\\common.gypi', gyp info spawn args '-Dlibrary=shared_library', gyp info spawn args '-Dvisibility=default', gyp info spawn args '-Dnode_root_dir=C:\\Users\\FuYuHao\\.node-gyp\\10.14.1', gyp info spawn args '-Dnode_gyp_dir=E:\\Users\\FuYuHao\\Desktop\\sb\\a\\aaa\\node_modules\\node-gyp', gyp info spawn args '-Dnode_lib_file=C:\\Users\\FuYuHao\\.node-gyp\\10.14.1\\<(target_arch)\\node.lib', gyp info spawn args '-Dmodule_root_dir=E:\\Users\\FuYuHao\\Desktop\\sb\\a\\aaa\\node_modules\\node-sass', gyp info spawn args '-Dnode_engine=v8', gyp info spawn args '--depth=.', gyp info spawn args '--no-parallel', gyp info spawn args '--generator-output', gyp info spawn args 'E:\\Users\\FuYuHao\\Desktop\\sb\\a\\aaa\\node_modules\\node-sass\\build', gyp info spawn args '-Goutput_dir=.' ] gyp verb command build [] gyp verb build type Release gyp verb architecture x64 gyp verb node dev dir C:\Users\FuYuHao\.node-gyp\10.14.1 gyp verb found first Solution file build/binding.sln gyp verb using MSBuild: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe gyp info spawn C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe gyp info spawn args [ 'build/binding.sln', gyp info spawn args '/nologo', gyp info spawn args '/p:Configuration=Release;Platform=x64' ] 在此解决方案中一次生成一个项目。若要启用并行生成,请添加“/m”开关。 生成启动时间为 2019/5/29 22:01:12。 节点 1 上的项目“E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.sln”(默认目标)。 ValidateSolutionConfiguration: 正在生成解决方案配置“Release|x64”。 项目“E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.sln”(1)正在节点 1 上生成“E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.vcxproj.metaproj”(2) (默认目标)。 项目“E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.vcxproj.metaproj”(2)正在节点 1 上生成“E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxproj”(3) (默认目标)。 PrepareForBuild: 正在创建目录“Release\obj\libsass\”。 正在创建目录“E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\Release\”。 正在创建目录“Release\obj\libsass\libsass.tlog\”。 InitializeBuildStatus: 正在创建“Release\obj\libsass\libsass.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。 ClCompile: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\CL.exe /c /I"C:\Users\FuYuHao\.node-gyp\10.14.1\include\node" /I"C:\Users\FuYuHao\.node-gyp\10.14.1\src" /I"C:\Use rs\FuYuHao\.node-gyp\10.14.1\deps\openssl\config" /I"C:\Users\FuYuHao\.node-gyp\10.14.1\deps\openssl\openssl\include" /I"C:\Users\FuYuHao\.node-gyp\10.14.1\deps\uv\include" /I"C:\Users\FuYuHao\.node-gyp\10.14.1\deps\zli b" /I"C:\Users\FuYuHao\.node-gyp\10.14.1\deps\v8\include" /I..\..\src\libsass\include /Z7 /nologo /W3 /WX- /diagnostics:classic /MP /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=libsass /D USING_UV_SHARED=1 /D USING_ V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D "LIBSASS_VERSION=\"3.5.4\"" /GF /Gm- /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Z c:inline /GR- /Fo"Release\obj\libsass\\" /Fd"Release\obj\libsass\libsass.pdb" /Gd /TP /wd4351 /wd4355 /wd4800 /wd4251 /wd4275 /wd4244 /wd4267 /FC /errorReport:queue /GR /EHsc ..\..\src\libsass\src\ast.cpp ..\..\src\libs ass\src\ast_fwd_decl.cpp ..\..\src\libsass\src\backtrace.cpp ..\..\src\libsass\src\base64vlq.cpp ..\..\src\libsass\src\bind.cpp ..\..\src\libsass\src\check_nesting.cpp ..\..\src\libsass\src\color_maps.cpp ..\..\src\libs ass\src\constants.cpp ..\..\src\libsass\src\context.cpp ..\..\src\libsass\src\cssize.cpp ..\..\src\libsass\src\emitter.cpp ..\..\src\libsass\src\environment.cpp ..\..\src\libsass\src\error_handling.cpp ..\..\src\libsass \src\eval.cpp ..\..\src\libsass\src\expand.cpp ..\..\src\libsass\src\extend.cpp ..\..\src\libsass\src\file.cpp ..\..\src\libsass\src\functions.cpp ..\..\src\libsass\src\inspect.cpp ..\..\src\libsass\src\json.cpp ..\..\s rc\libsass\src\lexer.cpp ..\..\src\libsass\src\listize.cpp ..\..\src\libsass\src\memory\SharedPtr.cpp ..\..\src\libsass\src\node.cpp ..\..\src\libsass\src\operators.cpp ..\..\src\libsass\src\output.cpp ..\..\src\libsass \src\parser.cpp ..\..\src\libsass\src\plugins.cpp ..\..\src\libsass\src\position.cpp ..\..\src\libsass\src\prelexer.cpp ..\..\src\libsass\src\remove_placeholders.cpp ..\..\src\libsass\src\sass.cpp ..\..\src\libsass\src\ sass2scss.cpp ..\..\src\libsass\src\sass_context.cpp ..\..\src\libsass\src\sass_functions.cpp ..\..\src\libsass\src\sass_util.cpp ..\..\src\libsass\src\sass_values.cpp ..\..\src\libsass\src\source_map.cpp ..\..\src\libs ass\src\subset_map.cpp ..\..\src\libsass\src\to_c.cpp ..\..\src\libsass\src\to_value.cpp ..\..\src\libsass\src\units.cpp ..\..\src\libsass\src\utf8_string.cpp ..\..\src\libsass\src\util.cpp ..\..\src\libsass\src\values. cpp cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxproj] cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxproj] ast.cpp cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxproj] ast_fwd_decl.cpp cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxproj] backtrace.cpp cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxproj] base64vlq.cpp bind.cpp check_nesting.cpp color_maps.cpp constants.cpp context.cpp cssize.cpp emitter.cpp environment.cpp error_handling.cpp eval.cpp expand.cpp extend.cpp file.cpp functions.cpp inspect.cpp json.cpp e:\users\fuyuhao\desktop\sb\a\aaa\node_modules\node-sass\src\libsass\src\json.cpp(26): warning C4005: “_CRT_NONSTDC_NO_DEPRECATE”: 宏重定义 [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxp roj] e:\users\fuyuhao\desktop\sb\a\aaa\node_modules\node-sass\src\libsass\src\json.cpp: note: 参见“_CRT_NONSTDC_NO_DEPRECATE”的前一个定义 lexer.cpp listize.cpp SharedPtr.cpp node.cpp operators.cpp output.cpp parser.cpp plugins.cpp position.cpp prelexer.cpp remove_placeholders.cpp sass.cpp sass2scss.cpp e:\users\fuyuhao\desktop\sb\a\aaa\node_modules\node-sass\src\libsass\src\sass2scss.cpp(9): warning C4005: “_CRT_NONSTDC_NO_DEPRECATE”: 宏重定义 [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass. vcxpr oj] e:\users\fuyuhao\desktop\sb\a\aaa\node_modules\node-sass\src\libsass\src\sass2scss.cpp: note: 参见“_CRT_NONSTDC_NO_DEPRECATE”的前一个定义 sass_context.cpp sass_functions.cpp sass_util.cpp sass_values.cpp source_map.cpp subset_map.cpp to_c.cpp to_value.cpp units.cpp utf8_string.cpp util.cpp values.cpp C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\CL.exe /c /I"C:\Users\FuYuHao\.node-gyp\10.14.1\include\node" /I"C:\Users\FuYuHao\.node-gyp\10.14.1\src" /I"C:\Use rs\FuYuHao\.node-gyp\10.14.1\deps\openssl\config" /I"C:\Users\FuYuHao\.node-gyp\10.14.1\deps\openssl\openssl\include" /I"C:\Users\FuYuHao\.node-gyp\10.14.1\deps\uv\include" /I"C:\Users\FuYuHao\.node-gyp\10.14.1\deps\zli b" /I"C:\Users\FuYuHao\.node-gyp\10.14.1\deps\v8\include" /I..\..\src\libsass\include /Z7 /nologo /W3 /WX- /diagnostics:classic /MP /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=libsass /D USING_UV_SHARED=1 /D USING_ V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D "LIBSASS_VERSION=\"3.5.4\"" /GF /Gm- /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Z c:inline /GR- /Fo"Release\obj\libsass\\" /Fd"Release\obj\libsass\libsass.pdb" /Gd /TC /wd4351 /wd4355 /wd4800 /wd4251 /wd4275 /wd4244 /wd4267 /FC /errorReport:queue /GR /EHsc ..\..\src\libsass\src\cencode.c cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxproj] cencode.c Lib: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\Lib.exe /OUT:"E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\Release\libsass.lib" /NOLOGO /MACHINE :X64 /LTCG:INCREMENTAL Release\obj\libsass\ast.obj Release\obj\libsass\ast_fwd_decl.obj Release\obj\libsass\backtrace.obj Release\obj\libsass\base64vlq.obj Release\obj\libsass\bind.obj Release\obj\libsass\cencode.obj Release\obj\libsass\check_nesting.obj Release\obj\libsass\color_maps.obj Release\obj\libsass\constants.obj Release\obj\libsass\context.obj Release\obj\libsass\cssize.obj Release\obj\libsass\emitter.obj Release\obj\libsass\environment.obj Release\obj\libsass\error_handling.obj Release\obj\libsass\eval.obj Release\obj\libsass\expand.obj Release\obj\libsass\extend.obj Release\obj\libsass\file.obj Release\obj\libsass\functions.obj Release\obj\libsass\inspect.obj Release\obj\libsass\json.obj Release\obj\libsass\lexer.obj Release\obj\libsass\listize.obj Release\obj\libsass\SharedPtr.obj Release\obj\libsass\node.obj Release\obj\libsass\operators.obj Release\obj\libsass\output.obj Release\obj\libsass\parser.obj Release\obj\libsass\plugins.obj Release\obj\libsass\position.obj Release\obj\libsass\prelexer.obj Release\obj\libsass\remove_placeholders.obj Release\obj\libsass\sass.obj Release\obj\libsass\sass2scss.obj Release\obj\libsass\sass_context.obj Release\obj\libsass\sass_functions.obj Release\obj\libsass\sass_util.obj Release\obj\libsass\sass_values.obj Release\obj\libsass\source_map.obj Release\obj\libsass\subset_map.obj Release\obj\libsass\to_c.obj Release\obj\libsass\to_value.obj Release\obj\libsass\units.obj Release\obj\libsass\utf8_string.obj Release\obj\libsass\util.obj Release\obj\libsass\values.obj libsass.vcxproj -> E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\Release\\libsass.lib FinalizeBuildStatus: 正在删除文件“Release\obj\libsass\libsass.tlog\unsuccessfulbuild”。 正在对“Release\obj\libsass\libsass.tlog\libsass.lastbuildstate”执行 Touch 任务。 已完成生成项目“E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxproj”(默认目标)的操作。 项目“E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.vcxproj.metaproj”(2)正在节点 1 上生成“E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.vcxproj”(4) (默认目标)。 PrepareForBuild: 正在创建目录“Release\obj\binding\”。 正在创建目录“Release\obj\binding\binding.tlog\”。 InitializeBuildStatus: 正在创建“Release\obj\binding\binding.tlog\unsuccessfulbuild”,因为已指定“AlwaysCreate”。 ClCompile: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\CL.exe /c /I"C:\Users\FuYuHao\.node-gyp\10.14.1\include\node" /I"C:\Users\FuYuHao\.node-gyp\10.14.1\src" /I"C:\Use rs\FuYuHao\.node-gyp\10.14.1\deps\openssl\config" /I"C:\Users\FuYuHao\.node-gyp\10.14.1\deps\openssl\openssl\include" /I"C:\Users\FuYuHao\.node-gyp\10.14.1\deps\uv\include" /I"C:\Users\FuYuHao\.node-gyp\10.14.1\deps\zli b" /I"C:\Users\FuYuHao\.node-gyp\10.14.1\deps\v8\include" /I..\..\nan /I..\src\libsass\include /Z7 /nologo /W3 /WX- /diagnostics:classic /MP /Ox /Ob2 /Oi /Ot /Oy /GL /D NODE_GYP_MODULE_NAME=binding /D USING_UV_SHARED=1 /D USING_V8_SHARED=1 /D V8_DEPRECATION_WARNINGS=1 /D WIN32 /D _CRT_SECURE_NO_DEPRECATE /D _CRT_NONSTDC_NO_DEPRECATE /D _HAS_EXCEPTIONS=0 /D BUILDING_NODE_EXTENSION /D _WINDLL /GF /Gm- /MT /GS /Gy /fp:precise /Zc:wchar_t /Zc:forScope /Zc:inline /GR- /Fo"Release\obj\binding\\" /Fd"Release\obj\binding\vc141.pdb" /Gd /TP /wd4351 /wd4355 /wd4800 /wd4251 /wd4275 /wd4244 /wd4267 /FC /errorReport:queue /Zc:threadSafeInit- ..\src\binding.cpp . .\src\create_string.cpp ..\src\custom_function_bridge.cpp ..\src\custom_importer_bridge.cpp ..\src\sass_context_wrapper.cpp ..\src\sass_types\boolean.cpp ..\src\sass_types\color.cpp ..\src\sass_types\error.cpp ..\src\sa ss_types\factory.cpp ..\src\sass_types\list.cpp ..\src\sass_types\map.cpp ..\src\sass_types\null.cpp ..\src\sass_types\number.cpp ..\src\sass_types\string.cpp "E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-gyp\src \win_delay_load_hook.cc" binding.cpp create_string.cpp custom_function_bridge.cpp custom_importer_bridge.cpp sass_context_wrapper.cpp boolean.cpp color.cpp error.cpp factory.cpp list.cpp map.cpp null.cpp number.cpp string.cpp win_delay_load_hook.cc Link: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\VC\Tools\MSVC\14.16.27023\bin\HostX64\x64\link.exe /ERRORREPORT:QUEUE /OUT:"E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\Release\binding.n ode" /INCREMENTAL:NO /NOLOGO kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib DelayImp.lib "C:\Users\FuYuHao\.node-gyp\10.14.1\x64\node.lib" Delayimp.lib /DELAYLOAD:iojs.exe /DELAYLOAD:node.exe /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /DEBUG /PDB:"E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\Release\bindi ng.pdb" /MAP /MAPINFO:EXPORTS /OPT:REF /OPT:ICF /TLBID:1 /RELEASE /DYNAMICBASE /NXCOMPAT /MACHINE:X64 /ignore:4199 /LTCG:INCREMENTAL /DLL Release\obj\binding\binding.obj Release\obj\binding\create_string.obj Release\obj\binding\custom_function_bridge.obj Release\obj\binding\custom_importer_bridge.obj Release\obj\binding\sass_context_wrapper.obj Release\obj\binding\boolean.obj Release\obj\binding\color.obj Release\obj\binding\error.obj Release\obj\binding\factory.obj Release\obj\binding\list.obj Release\obj\binding\map.obj Release\obj\binding\null.obj Release\obj\binding\number.obj Release\obj\binding\string.obj Release\obj\binding\win_delay_load_hook.obj "E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\Release\libsass.lib" C:\Users\FuYuHao\.node-gyp\10.14.1\x64\node.lib : fatal error LNK1107: 文件无效或损坏: 无法在 0x39F993 处读取 [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.vcxproj] 已完成生成项目“E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.vcxproj”(默认目标)的操作 - 失败。 已完成生成项目“E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.vcxproj.metaproj”(默认目标)的操作 - 失败。 已完成生成项目“E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.sln”(默认目标)的操作 - 失败。 生成失败。 “E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.sln”(默认目标) (1) -> “E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.vcxproj.metaproj”(默认目标) (2) -> “E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxproj”(默认目标) (3) -> (ClCompile 目标) -> cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxproj] cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxproj] cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxproj] cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxproj] cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxproj] e:\users\fuyuhao\desktop\sb\a\aaa\node_modules\node-sass\src\libsass\src\json.cpp(26): warning C4005: “_CRT_NONSTDC_NO_DEPRECATE”: 宏重定义 [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vc xproj ] e:\users\fuyuhao\desktop\sb\a\aaa\node_modules\node-sass\src\libsass\src\sass2scss.cpp(9): warning C4005: “_CRT_NONSTDC_NO_DEPRECATE”: 宏重定义 [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsas s.vcx proj] “E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.sln”(默认目标) (1) -> “E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.vcxproj.metaproj”(默认目标) (2) -> “E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxproj”(默认目标) (3) -> cl : 命令行 warning D9025: 正在重写“/GR-”(用“/GR”) [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\src\libsass.vcxproj] “E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.sln”(默认目标) (1) -> “E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.vcxproj.metaproj”(默认目标) (2) -> “E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.vcxproj”(默认目标) (4) -> (Link 目标) -> C:\Users\FuYuHao\.node-gyp\10.14.1\x64\node.lib : fatal error LNK1107: 文件无效或损坏: 无法在 0x39F993 处读取 [E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass\build\binding.vcxproj] 8 个警告 1 个错误 已用时间 00:00:24.13 gyp ERR! build error gyp ERR! stack Error: `C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe` failed with exit code: 1 gyp ERR! stack at ChildProcess.onExit (E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-gyp\lib\build.js:262:23) gyp ERR! stack at ChildProcess.emit (events.js:182:13) gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:240:12) gyp ERR! System Windows_NT 10.0.17763 gyp ERR! command "C:\\Program Files\\nodejs\\node.exe" "E:\\Users\\FuYuHao\\Desktop\\sb\\a\\aaa\\node_modules\\node-gyp\\bin\\node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library=" gyp ERR! cwd E:\Users\FuYuHao\Desktop\sb\a\aaa\node_modules\node-sass gyp ERR! node -v v10.14.1 gyp ERR! node-gyp -v v3.8.0 gyp ERR! not ok Build failed with error code: 1 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.0.7 (node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.0.7: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\watchpack\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@1.2.9 (node_modules\nodemon\node_modules\fsevents): npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@1.2.9: wanted {"os":"darwin","arch":"any"} (current: {"os":"win32","arch":"x64"}) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! node-sass@4.12.0 postinstall: `node scripts/build.js` npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the node-sass@4.12.0 postinstall script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\FuYuHao\AppData\Roaming\npm-cache\_logs\2019-05-29T14_01_39_903Z-debug.log PS E:\Users\FuYuHao\Desktop\sb\a\aaa> ```
c++ addon在electron中,提示 not a valid win32 application
大致情况: 用electron开发一个桌面客户端,实现客户端启动后全屏,同时保持客户端始终是在最前面,防止用户进入后台才做资源管理器; 用c++编写了个node的addon,electron-rebuild后,在electron的主线程中引用; 问题来了,编写的addon直接用node test.js可以正常运行,集成到electron代码里面,运行npm run dev后,客户端启动不起来,报错如下: App threw an error during load Error: Cannot open D:\projects\node_modules\lockscreen\build\Rele ase\lockscreen.node,lockscreen.node is not a valid Win32 application. 百度了很多信息都没法解决,后面直接npm run build打包,运行客户端功能居然生效了,很奇怪为啥在开发模式下不能运行,主要是觉得不方便修改调试。 有了解的老铁指点下,非常感谢。
jQuery和bootstrap的题 帮帮忙!!!
5. bootstrap中的下来菜单是通过()实现的。 A. button B.div C. input D. span 6. bootstarp中如果将不同元素融合到一个文本框 中,外部div使用的类为( ) A. input- group-addon B. form C. input -group D. form-control 13. jQuery选择器中,选择class为ul的标签要用() A.$('ul') B.$(' .ul) C.$( '#ul') D.$(ul) 14. jQuery选择器中,选择id为ul的标签要用() A.$('uL') B.$('.uL') C.$( #uL)D.$(ul) 15. jQuery选择器中,选择属性aria expanded值为true的元素要用() A.$(" .aria expanded . true ' )B.$( ' #aria expanded true ' ) C.$( [aria expanded="true"],)D.$(" [aria expanded=true],)
linux executable函数导出问题
linux x-executable可以像动态库一样导出函数吗? 如果不能那node c++ addon在linux下又是怎么做到的。 其实很简单,就是一个选项而已。
bootstrap中input-group-addon和glyphicon配合后与文本框不对齐问题
我的代码: ``` <div class="container"> <form action=""> <div class="input-group"> <lable class="control-label sr-only">用户名</lable> <span class="input-group-addon glyphicon glyphicon-user"></span> <input type="text" class="form-control"> </div> </form> </div> ``` ![图片说明](https://img-ask.csdn.net/upload/201709/26/1506423845_630769.png) 但是当我把glyphicon的position:relative去掉就正常了,请大神解答下
form提交后,action中怎么获取select下拉框的选中值
点击按钮后如果选择.com表单应该是 http://我的域名/nav/c1.php?id= 如果选择.cn应该是 http://我的域名/nav/c2.php?id= 小白不懂 想问下怎么实现 ``` <form action="这里应该填什么才能保证选择其他选项的时候自动变成option value后的内容" method="get" name="form"> <div class="form-group"> <div class="input-group"> <input type="text" name="id" class="form-control" placeholder="请输入删除后缀的域名"> <div class="input-group-addon"> <select id="select" onchange="change();"> <option value="./nav/c1.php" selected>.com</option> <option value="./nav/c2.php">.cn</option> <option value="./nav/c3.php">.cc</option> <option value="./nav/c4.php">.me</option> <option value="./nav/c5.php">.pw</option> <option value="./nav/c6.php">.top</option> <option value="./nav/c7.php">.net</option> <option value="./nav/c8.php">.bid</option> <option value="./nav/c9.php">.online</option> <option value="./nav/a1.php">.xyz</option> </select> </div> </div> </div> <button type="submit" class="btn btn-success btn-block">生成短链接</button> ```
js如何实现图片从左下飞到右上
![图片说明](https://img-ask.csdn.net/upload/201601/29/1454039182_465342.jpg) 这个火箭被点击可以飞行 代码如下: ``` <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"> <meta name="format-detection" content="telephone=no, email=no, adress=no"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-touch-fullscreen" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="description" content=""> <meta name="keywords" content=""> <link type="text/css" rel="stylesheet" href="{:ADDON_PUBLIC_PATH}/shop/css/reset.css?version={$version}" /> <link type="text/css" rel="stylesheet" href="{:ADDON_PUBLIC_PATH}/shop/css/product.css?version={$version}" /> <link type="text/css" rel="stylesheet" href="__CSS__/dialog.css?v={:SITE_VERSION}" /> <title>{$shop_config.title}</title> </head> <body> <!--顶部--> <header class="header"> <a href="javascript:void(0);" class="header-back-btn back"></a> <h1>详情</h1> <a href="javascript:void(0);" class="header-car-btn" data-url="{:addons_url('Shop://Index/addCollection',array('token'=>get_token(),'id'=>$info['id']))}"></a> <!--a href="{:addons_url('Shop://Index/cart',array('token'=>get_token()))}" class="header-car-btn"></a--> </header><!--header--> <!--轮播图--> <section class="pic"> <!--button class="button2" onclick="_system._guide(true)"> </button--> <ul id="slider"> <foreach name="picArr" item="row" key="k"> <a href="javascript:void(0);"><li><img src="{$row|get_cover_url}" alt=""></li></a> </foreach> </ul> <section class="pic-btn" id="pagenavi"> <foreach name="picArr" item="row" key="k"> <a href="javascript:void(0);" <eq name="k" value="0">class="active"</eq>></a> </foreach> </section><!--pic-btn--> <!--a href="javascript:void(0);" class="collect-btn" data-url="{:addons_url('Shop://Index/addCollection',array('token'=>get_token(),'id'=>$info['id']))}">收藏</a--> <section name="huojian" id="info"> <if condition="$info.distribution_proportion eq 0"> <p></p> <else/> <p class="button2" id="button2" onclick="_system._guide(true)"> <img src="{:ADDON_PUBLIC_PATH}/shop/images/1.png"> </p> </if> </section> </section><!--pic--> <section class="product"> <ul> <li>{$info.name}</li> <li>{$info.desc}</li> <li>¥{$info.true_price}</li> <li><span>运费 {$info.mail_price}元</span><!--span>总销<a>{$info.sellnum}</a>笔</span--></li> </ul> </section><!--product--> <!--section class="box-1"> <a href="javascript:void(0);">分销赚钱</a> </section><!--box-1--> <!--评论--> <section class="speak-box"> <header> <a href="{:addons_url('Shop://Index/evaluationList',array('token'=>get_token(),'id'=>$info['id'],'type'=>0))}">商品评论&nbsp;&nbsp;&nbsp;好评度<span>{$levelPraiseProportion}%</span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>{$newEvaluation.page.count}人评论</span></a> </header> <volist name="newEvaluation.list" id="n"> <ul> <li><div><img src="<if condition="$n.headimgurl eq 0">{:ADDON_PUBLIC_PATH}/shop/images/photo.jpg<else />{$n.headimgurl|get_cover_url}</if>" alt="" /></div><a>{$n.nickname|default="游客"}</a> <switch name="n.star"> <case value="1"><span></span></case> <case value="2"><span></span><span></span></case> <case value="3"><span></span><span></span><span></span></case> <case value="4"><span></span><span></span><span></span><span></span></case> <case value="5"><span></span><span></span><span></span><span></span><span></span></case> </switch> </li> <li>{$n.content}</li> <li>{$n.addtime|date="Y-m-d H:i:s",###} <if condition="$n['color_id'] neq 0">颜色:{:getColorName($n['color_id'])}</if> <if condition="$n['norms_id'] neq 0 and $n['norms_details_id'] neq 0">{:getNormsName($n['norms_id'])}:{:getNormsDetailsName($n['norms_details_id'])}</if></li> </ul> </volist> <a href="{:addons_url('Shop://Index/evaluationList',array('token'=>get_token(),'id'=>$info['id'],'type'=>0))}" class="more-btn">查看更多评价</a> </section><!--speak-box--> <!--猜你喜欢--> <section class="like-box" <if condition="empty($guessYouLike)">style="display:none;"</if>> <h2>猜你喜欢</h2> <section class="like-box-1" id="slider1"> <foreach name="guessYouLike" item="row"> <section class="slide"> <foreach name="row" item="rows"> <ul> <li><a href="{:addons_url('Shop://Index/productinfo',array('token'=>get_token(),'id'=>$rows['id']))}"><img src="{$rows.head_img|get_cover_url}" alt="" /></a></li> <li>{$rows.name|msubstr=###,0,20,"utf-8",false}</li> <li style="font-size:0.9rem;">¥{$rows.true_price}<!--a href="{:addons_url('Shop://Index/productinfo',array('token'=>get_token(),'id'=>$rows['id']))}">立即购买</a--></li> </ul> </foreach> </section><!--slide--> </foreach> </section><!--like-box-1--> <section class="like-box-nav" id="pagenavi1"> <foreach name="guessYouLike" item="row" key="k"> <a href="javascript:void(0);" <eq name="k" value="0">class="active"</eq>></a> </foreach> </section><!--like-box-nav--> </section><!--like-box--> <a href="{:addons_url('Shop://Index/productDetails',array('token'=>get_token(),'id'=>$info['id']))}" class="a-btn">点击查看图文详情</a> <!-- <section class="footer"> <dl> <dd>15天退换货</dd ><dd>全场包邮促销</dd> </dl> </section> --> <section class="box-2"> <a href="tel:4000058002">联系客服</a> </section><!--box-2--> <footer class="footer-btn"> <dl> <dd><a href="javascript:void(0);" data-action="car">加入购物车</a></dd ><dd><a href="javascript:void(0);" data-action="buy">立即购买</a></dd> </dl> </footer><!--footer-btn--> <!--分销特效 点击显示分享给好友--> <script type="text/javascript"> var _system={ $:function(id){return document.getElementById(id);}, _client:function(){ return {w:document.documentElement.scrollWidth,h:document.documentElement.scrollHeight,bw:document.documentElement.clientWidth,bh:document.documentElement.clientHeight}; }, _scroll:function(){ return {x:document.documentElement.scrollLeft?document.documentElement.scrollLeft:document.body.scrollLeft,y:document.documentElement.scrollTop?document.documentElement.scrollTop:document.body.scrollTop}; }, _cover:function(show){ if(show){ this.$("cover").style.display="block"; this.$("cover").style.width=(this._client().bw>this._client().w?this._client().bw:this._client().w)+"px"; this.$("cover").style.height=(this._client().bh>this._client().h?this._client().bh:this._client().h)+"px"; }else{ this.$("cover").style.display="none"; } }, _guide:function(click){ this._cover(true); this.$("guide").style.display="block"; this.$("guide").style.top=(_system._scroll().y+5)+"px"; window.onresize=function(){_system._cover(true);_system.$("guide").style.top=(_system._scroll().y+5)+"px";}; if(click){_system.$("cover").onclick=function(){ _system._cover(); _system.$("guide").style.display="none"; _system.$("cover").onclick=null; window.onresize=null; };} }, _zero:function(n){ return n<0?0:n; } } </script> <!--遮罩层--> <div class="cover"></div> <div id="cover"></div> <div id="guide"><img src="{:ADDON_PUBLIC_PATH}/shop/images/guide1.png"></div> <!--加入购物车弹层--> <section class="car-tc"> <ul> <li><img src="{$info.head_img|get_cover_url}" alt="" /></li> <li>{$info.name}</li> <li>¥{$info.true_price}</li> </ul> <dl> <if condition="!empty($color_arr)"> <dd class="dd-color"><span>主要颜色</span> <volist name="color_arr" id="row"> <a href="{$color_url[$row['id']]}" <eq name="row['id']" value="$info['color_id']">class="active"</eq>>{$row.name}</a> </volist> </dd> </if> <if condition="!empty($norms_details_arr)"> <dd class="dd-style"><span>{$norms_name}</span> <volist name="norms_details_arr" id="row"> <a href="{$norms_details_url[$row['id']]}" <eq name="row['id']" value="$info['norms_details_id']">class="active"</eq>>{$row.name}</a> </volist> </dd> </if> <dd class="dd-num"><span>购买数量</span><div><a href="javascript:void(0);" class="min">-</a><span class="num">1</span><a href="javascript:void(0);" class="max">+</a></div></dd> <input type="hidden" name="products_id" id="products_id" value="{$info['id']}" /> <input type="hidden" name="ajaxAddCartUrl" id="ajaxAddCartUrl" value="{:addons_url('Shop://Cart/inCart',array('token'=>get_token()))}" /> <input type="hidden" name="cartUrl" id="cartUrl" value="{:addons_url('Shop://Index/cart',array('token'=>get_token()))}" /> </dl> <input type="button" value="确定" id="ok_btn" /> </section><!--car-tc--> <div class="cover_1"></div> <script type="text/javascript" src="{:ADDON_PUBLIC_PATH}/shop/js/jquery-1.11.1.min.js?version={$version}"></script> <script type="text/javascript" src="__JS__/m/dialog.js?v={:SITE_VERSION}"></script> <script type="text/javascript" src="{:ADDON_PUBLIC_PATH}/shop/js/jquery.cycle.all.js?version={$version}"></script> <script type="text/javascript" src="{:ADDON_PUBLIC_PATH}/shop/js/touchslider.dev.js?version={$version}"></script> <script type="text/javascript" src="{:ADDON_PUBLIC_PATH}/shop/js/product.js?version={$version}"></script> <include file="./Addons/Shop/View/default/Index/publicShare.html" /> </body> </html> ```
FusionMaps和FusionCharts在同个页面时地图显示不出来
<div class="col-lg-10 col-md-10 col-xs-10 col-sm-10"> <h4><a href="/question/2599">FusionMaps和FusionCharts在同个页面时地图显示不出来</a></h4> <small class="text-muted"> <i class="fa fa-user"></i>&nbsp; <a target="_blank" href="/u/62440"> 咖啡加盐 </a> <i class="fa fa-calendar"></i>&nbsp;2014-04-18 <span>浏览次数:128</span> </small> <p class="text-muted font12"></p><p>把FusionMaps, FusionCharts, PowerCharts 组合在一个页面中,只有地图没有显示出来,我用的是js语言。<br> <br> 1)下载的最新版本的 FusionCharts套包<br> 2)把FusionCharts.HC.Charts.js, FusionCharts.HC.js, FusionCharts.HC.Maps.js, FusionCharts.HC.usa.js, FusionCharts.HC.Widgets.js,<br> &nbsp;FusionCharts.jqueryplugin.js, FusionCharts.js, FusionMaps.js放进一个文件夹里头。<br> 3)使用js语言在同个页面生成USA地图,曲线图,条形图,热度图<br> 4)其他图形图表都能显示,就是地图始终不显示出来5)如果用Flash渲染,或者仅仅只有地图的话就能显示出来</p> <p><span style="font-size:10px"><img alt="" src="http://image.evget.com/images/article/2014/fusionmapsnomapshow.jpg" style="height:330px; width:600px"></span></p> <p>&nbsp;</p> <p></p> <div class="font12"> 标签: <span class="badge badge-default-leve"><a href="/tag/category/49">JavaScript </a></span> <span class="badge badge-default-leve"><a href="/tag/category/51">HTML5</a></span> <span class="badge badge-default-leve"><a href="/tag/category/527">地图</a></span> <span class="badge badge-default-leve"><a href="/tag/category/158">数据可视化</a></span> <span class="badge badge-default-leve"><a href="/tag/category/204">图表控件</a></span> <span class="badge badge-default-leve"><a href="/tag/category/539">FusionMaps</a></span> </div> <div class="input-group mT10 col-lg-10" id="parentReplayContentEditor2599"> <div class="input-group mT10 col-lg-10" id="textReplayContentEditor2599"> <span class="input-group-addon"><i class="fa fa-pencil"></i></span> <input type="text" qid="2599" id="replay2599" onclick="answerReplayQuetion($(this))" class="form-control " placeholder="点击直接回复"> </div> </div> <div style="display: none; margin-top: 10px;" id="answerReplayContenBtn2599"> <input type="button" qid="2599" class="btn btn-primary" value="发表回复" onclick="publishReplayQuestion($(this))"> </div> </div>
bootstraptable-edit使用问题
![图片说明](https://img-ask.csdn.net/upload/201908/06/1565077495_685813.png) 外部的表格无法获取数据,检查contentType属性配置问题。 ``` $(function() { //初始化Table var oTable = new TableInit(); oTable.Init(); }); var TableInit = function() { var oTableInit = new Object(); //初始化Table oTableInit.Init = function() { $('#table').bootstrapTable({ url : 'list',//请求后台的URL(*) method : 'post',//请求方式(*) toolbar : '#toolbar',//工具按钮用哪个容器 striped : true,//是否显示行间隔色 cache : false,//是否使用缓存,默认为true,所以一般情况下需要设置一下这个属性(*) pagination : true,//是否显示分页(*) sortable : false,//是否启用排序 sortOrder : "asc",//排序方式 queryParams : oTableInit.queryParams,//传递参数(*) sidePagination : "server",//分页方式:client客户端分页,server服务端分页(*) pageNumber : 1,//初始化加载第一页,默认第一页 pageSize : 10,//每页的记录行数(*) pageList : [ 10, 25, 50, 100 ],//可供选择的每页的行数(*) search : true,//是否显示表格搜索,此搜索是客户端搜索,不会进服务端,所以,个人感觉意义不大 contentType : "application/x-www-form-urlencoded", strictSearch : true, showColumns : true,//是否显示所有的列 showRefresh : true,//是否显示刷新按钮 minimumCountColumns : 2,//最少允许的列数 clickToSelect : true,//是否启用点击选中行 height : 700,//行高,如果没有设置height属性,表格自动根据记录条数觉得表格高度 uniqueId : "id",//每一行的唯一标识,一般为主键列 showToggle : true,//是否显示详细视图和列表视图的切换按钮 cardView : false,//是否显示详细视图 detailView : false,//是否显示父子表 columns : [ { field : 'id', title : '编号' }, { field : 'name', title : '名字' }, { field : 'price', title : '价格' }, { field : 'operate', title : '操作', formatter : operateFormatter //自定义方法,添加操作按钮 }, ], rowStyle : function(row, index) { var classesArr = [ 'white', 'lightblue' ]; var strclass = ""; if (index % 2 === 0) {//偶数行 strclass = classesArr[0]; } else {//奇数行 strclass = classesArr[1]; } return { classes : strclass }; },//隔行变色 }); }; //得到查询的参数 oTableInit.queryParams = function(params) { var temp = {//这里的键的名字和控制器的变量名必须一直,这边改动,控制器也需要改成一样的 limit : params.limit,//页面大小 //pageNumber: params.pageNumber,//页码 offset : params.offset }; return temp; }; return oTableInit; }; function operateFormatter(value, row, index) {//赋予的参数 return [ '<a href="#" style="color:blue;" οnclick="edit(' + row.id + ')">编辑</a>|', '<a href="#" style="color:red;" οnclick="del(' + row.id + ')">删除</a>', ].join(''); } ``` table-edit.js ``` (function($){ 'use strict'; $.extend($.fn.bootstrapTable.defaults, { editable: false }); var BootstrapTable = $.fn.bootstrapTable.Constructor, _init = BootstrapTable.prototype.init, _initBody = BootstrapTable.prototype.initBody, _onSort = BootstrapTable.prototype.onSort, _append = BootstrapTable.prototype.append, _initHeader = BootstrapTable.prototype.initHeader ; //添加编辑表格默认属性,如何edit设置为false时,表示该列不可编辑 $.extend(true,BootstrapTable.COLUMN_DEFAULTS,{ edit:{ type:'text'//目前只支持 文本:text 下拉:select 日期:date } }); BootstrapTable.prototype.init = function () { _init.apply(this, Array.prototype.slice.apply(arguments)); var that = this; that.prevEditRow = null;//上一次编辑的行 that.columns = {};//列配置信息 that.insertRowVal = {};//新插入行的默认值 that.enableAppend = true;//允许添加新行 if (that.options.editable) { var columnObj = this['getColumns'](); $.each(columnObj,function(i,obj){ $.each(obj,function(z,col){ if(!isNaN(col.fieldIndex) && col.fieldIndex >= 0){ if(col.checkbox)col.edit = false; that.columns['column'+col.fieldIndex] = col; that.insertRowVal[col.field] = ''; } }); }); //this.initEdit(); } }; /*BootstrapTable.prototype.initHeader = function(){ _initHeader.apply(this, Array.prototype.slice.apply(arguments)); this.$container.find('.fixed-table-header').addClass('success'); };*/ BootstrapTable.prototype.initBody = function () { var that = this; _initBody.apply(this, Array.prototype.slice.apply(arguments)); if (!that.options.editable) return; this.initEdit(); //如果列是下拉框,则转换值为对应的文本 $.each(that.columns,function(indx,col){ if(col.edit && col.edit.type == 'select'){ col.edit = $.extend({},$.fn.bootstrapSelect.defaults,col.edit); if(col.edit.data.length > 0){ that.$body.find('>tr').each(function(){ if(that.getData().length < 1)return true; var rowData = that.data[$(this).data('index')];//当前点击td所在行的数据 var $td = $(this).find('td').eq(col.fieldIndex); $.each(col.edit.data,function(i,data){ if(data[col.edit.valueField] == rowData[col.field]){ $td.html(data[col.edit.textField]); } }); }); } else if(col.edit.url){ $.ajax({ url:col.edit.url, type:'post', data:col.edit.paramsType == 'json' ? JSON.stringify(col.edit.params) : col.edit.params, dataType:'json', success: function(jsonLst) { col.edit.onLoadSuccess.call(this,jsonLst); that.$body.find('>tr').each(function(){ if(that.getData().length < 1)return true; var rowData = that.data[$(this).data('index')];//当前点击td所在行的数据 var $td = $(this).find('td').eq(col.fieldIndex); $.each(jsonLst,function(i,data){ if(data[col.edit.valueField] == rowData[col.field]){ $td.html(data[col.edit.textField]); } }); }); col.edit.data = jsonLst; col.edit.url = null; }, error: function(xhr, textStatus, errorThrown){ col.edit.onLoadError.call(this); col.edit.data = []; col.edit.url = null; throw col.field+' 列下拉框数据加载失败'; } }); } } }); }; //根据行号删除指定行 BootstrapTable.prototype.removeRow = function (rowNum) { var that = this; var len = that.options.data.length; if (isNaN(rowNum)){ return; } if(that.$body.find('.editable-select').data('index') != rowNum){ recover(that); } //删除数据 that.options.data.splice(rowNum,1); if (len === that.options.data.length){ return; } var oldClass = {};//保存被标记修改的样式 that.$body.find('>tr').each(function(indx){ if($(this).hasClass('editable-modify')){ if(indx > rowNum){ oldClass[indx-1] = 'editable-modify'; } else{ oldClass[indx] = 'editable-modify'; } } }); //this.prevEditRow = null; //this.$body.find('>tr').removeClass('editable-select'); that.initBody(); //将标记改变过行的样式从新设置回去 for(var key in oldClass){ that.$body.find('>tr').eq(key).addClass(oldClass[key]); } //this.initEdit(); //没有数据时给提示加上样式 if(that.getData().length < 1){ that.$body.find('>tr').addClass('no-records-found'); } }; BootstrapTable.prototype.append = function (){ var that = this; //if(!that.enableAppend)return; var oldClass = {};//保存被标记修改的样式 that.$body.find('>tr').each(function(indx){ if($(this).hasClass('editable-modify') || $(this).hasClass('editable-insert')){ oldClass[indx] = 'editable-modify'; } }); arguments[0] = $.extend({},that.insertRowVal,arguments[0]); _append.apply(this,Array.prototype.slice.apply(arguments)); if (that.options.editable){ //that.initEdit(); setTimeout(function (){ //将标记改变过行的样式从新设置回去 for(var key in oldClass){ that.$body.find('>tr').eq(key).addClass(oldClass[key]); } that.$body.find('>tr:last').addClass('editable-modify'); that.$body.find('>tr:last').addClass('editable-insert');//双重保险,防止在快速点击添加时,为给新增行设置editable-modify属性 that.$body.find('>tr:last').click(); },60); } }; BootstrapTable.prototype.onSort = function () { _onSort.apply(this, Array.prototype.slice.apply(arguments)); var that = this; if (that.options.editable) { this.initEdit(); } }; BootstrapTable.prototype.getData = function () { return (this.searchText || this.searchCallback) ? this.data : this.options.data; }; BootstrapTable.prototype.getColumns = function () { return this.options.columns; }; /** * 获取有被修改过行的值 */ BootstrapTable.prototype.getModiDatas = function (){ var that = this; var datas = []; that.$body.find('.editable-modify').each(function(){ if(that.data[$(this).data('index')]){ datas.push(that.data[$(this).data('index')]); } }); return datas; }; /** * 获取指定列的和,参数为列下标 */ BootstrapTable.prototype.getColTotal = function (num){ var retVal = 0; this.$body.find('>tr').each(function(){ var colNum = 0; if($(this).hasClass('editable-select')){ colNum = $(this).find('td').eq(num).find('input').val(); } else{ colNum = $(this).find('td').eq(num).html(); } if(!isNaN(colNum)){//是数字才做想加 retVal += Number(colNum); } }); return retVal; }; /** * 创建可编辑表格 */ BootstrapTable.prototype.initEdit = function(){ var that = this, data = this.getData(); //this.$body.find('> tr').unbind('click').on('click' //this.$body.delegate('>tr','click' this.$body.find('> tr').unbind('click').on('click',function(){ var $tr = $(this); if($tr.hasClass('editable-select') || data.length < 1 || $tr.hasClass('no-records-found')){ return; } $tr.removeClass('no-records-found'); recover(that); that.prevEditRow = $tr; $tr.addClass('editable-select');//给当前编辑行添加样式,目前样式为空只做标识使用 that.$body.find('> tr').not(this).removeClass('editable-select'); $tr.find('td').closest('td').siblings().html(function(i,html){ initTrClick(that,this); }); }); //鼠标点击事件 $(document).bind('mousedown',function(event){ var $target = $(event.target); if(!($target.parents().andSelf().is(that.$body)) && !($target.parents().andSelf().is($('.datetimepicker')))){ setTimeout(function () { recover(that); //that.prevEditRow = null; //that.$body.find('> tr').removeClass('editable-select'); },10); }; }); }; $.fn.bootstrapTable.methods.push('getColumns', 'getModiDatas','removeRow','getColTotal'); /** * 给tr添加点击事件 */ function initTrClick(that,_this){ that.enableAppend = true; var $td = $(_this); var $tr = $td.parent(); var rowData = that.data[$tr.data('index')];//当前点击td所在行的数据 var tdIndex = $tr.children().index($td);//当前点击的td下标 var tdOpt = that.columns['column'+tdIndex]; if(!tdOpt.edit || typeof tdOpt.edit != 'object'){ return ; } $td.data('field',tdOpt.field); if(!$td.data('oldVal')){ $td.data('oldVal',$.trim(rowData[tdOpt.field])); } var height = $td.innerHeight() - 3; var width = $td.innerWidth() - 2; $td.data('style',$td.attr('style'));//保存原来的样式 $td.attr('style','margin:0px;padding:1px!important;'); var placeholder = ''; if(tdOpt.edit.required == true){ placeholder = '必填项'; } var value = rowData[tdOpt.field] == null || rowData[tdOpt.field] == ''?'':rowData[tdOpt.field]; $td.html('<div style="margin:0;padding:0;overflow:hidden;border:solid 0px red;height:'+(height)+'px;width:'+(width)+'px;">' +'<input type="text" placeholder="'+placeholder+'" value="'+value+'" style="margin-left: 0px; margin-right: 0px; padding-top: 1px; padding-bottom: 1px; width:100%;height:100%">' +'</div>'); $td.width(width); var $input = $td.find('input'); if(!tdOpt.edit.type || tdOpt.edit.type == 'text'){ if(tdOpt.edit['click'] && typeof tdOpt.edit['click'] === 'function'){ $input.unbind('click').bind('click',function(event){ tdOpt.edit['click'].call(this,event); }); } if(tdOpt.edit['focus'] && typeof tdOpt.edit['focus'] === 'function'){ $input.unbind('focus').bind('focus',function(event){ tdOpt.edit['focus'].call(this,event); }); } $input.unbind('blur').on('blur',function(event){ if(tdOpt.edit['blur'] && typeof tdOpt.edit['blur'] === 'function'){ tdOpt.edit['blur'].call(this,event); } }); } else if(tdOpt.edit.type == 'select'){ $input.bootstrapSelect(tdOpt.edit); } else if(tdOpt.edit.type == 'date'){ $td.html('<div style="margin:0;padding:0;overflow:hidden;border:solid 0px red;height:'+(height)+'px;width:'+(width)+'px;" class="input-group date form_datetime" data-link-field="dtp_editable_input">' +'<input class="form-control" type="text" value="'+value+'">' +'<span class="input-group-addon"><span class="glyphicon glyphicon-th"></span></span>' +'</div>' +'<input type="hidden" id="dtp_editable_input" value="'+value+'"/>' ); that.$body.find('.form_datetime').datetimepicker({ weekStart: 1, todayBtn: 1, autoclose: 1, todayHighlight: 1, startView: 2, forceParse: 0, language:'zh-CN', format: 'yyyy-mm-dd hh:ii:ss', pickerPosition: 'bottom-left', showMeridian: 1 }); } } /** * 恢复tr,使之处于不可编辑状态 */ function recover(that){ var isModi = false;//判断行值是否变动过 if(that.prevEditRow != null){ that.prevEditRow.find('td').closest('td').siblings().html(function(i,html){ $(this).attr('style',$(this).data('style')); var textVal = $(this).find('input[type="text"]').val(); var hiddenVal = $(this).find('input[type="hidden"]').val(); if(typeof $(this).find('input[type="text"]').bootstrapSelect('getText') != 'object'){ $(this).find('input[type="text"]').bootstrapSelect('destroy'); } if(textVal != undefined){ if($(this).data('oldVal') != (hiddenVal?hiddenVal:$.trim(textVal)) && $(this).data('field')) { that.data[that.prevEditRow.data('index')][$(this).data('field')] = hiddenVal?hiddenVal:$.trim(textVal); isModi = true; } if(that.columns['column'+i].edit.required == true){ if(textVal == null || textVal == ''){ that.enableAppend = false; return '<span style="color:red;">必填项不能为空</span>'; } } return $.trim(textVal); } }); //新值跟旧值不匹配证明被改过 if(isModi || that.prevEditRow.hasClass('editable-insert')){ that.prevEditRow.addClass('editable-modify'); } else{ that.prevEditRow.removeClass('editable-modify'); } that.prevEditRow = null; that.$body.find('> tr').removeClass('editable-select'); } } })(jQuery); ``` 哪位大神能帮忙解决下
virtualbox安装增强工具失败
共享文件夹failed 已安装包(fedora21 kernel3.19) abrt-addon-kerneloops-2.3.0-4.fc21.x86_64 kernel-3.19.3-200.fc21.x86_64 kernel-core-3.19.3-200.fc21.x86_64 kernel-devel-3.19.3-200.fc21.x86_64 kernel-headers-3.19.3-200.fc21.x86_64 kernel-modules-3.19.3-200.fc21.x86_64 libreport-plugin-kerneloops-2.3.0-6.fc21.x86_64 日志: Uninstalling modules from DKMS Attempting to install using DKMS Creating symlink /var/lib/dkms/vboxguest/4.3.20/source -> /usr/src/vboxguest-4.3.20 DKMS: add completed. Kernel preparation unnecessary for this kernel. Skipping... Building module: cleaning build area... make KERNELRELEASE=3.19.3-200.fc21.x86_64 -C /lib/modules/3.19.3-200.fc21.x86_64/build M=/var/lib/dkms/vboxguest/4.3.20/build...........(bad exit status: 2) Error! Bad return status for module build on kernel: 3.19.3-200.fc21.x86_64 (x86_64) Consult /var/lib/dkms/vboxguest/4.3.20/build/make.log for more information. Failed to install using DKMS, attempting to install without grep: /lib/modules/3.19.3-200.fc21.x86_64/build/include/linux/version.h: No such file or directory make KBUILD_VERBOSE=1 CONFIG_MODULE_SIG= -C /lib/modules/3.19.3-200.fc21.x86_64/build SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules test -e include/generated/autoconf.h -a -e include/config/auto.conf || ( \ echo >&2; \ echo >&2 " ERROR: Kernel configuration is invalid."; \ echo >&2 " include/generated/autoconf.h or include/config/auto.conf are missing.";\ echo >&2 " Run 'make oldconfig && make prepare' on kernel src to fix it."; \ echo >&2 ; \ /bin/false)
jQuery spinner风格,右侧加减,在js里添加input标签,风格失效
``` 添加的bootstrap-spinner.css和jquery.spinner.js路径没问题 我在js里添加以下代码,加减插件无效果 ocell.innerHTML='<div class="input-group spinner" data-trigger="spinner" id="spinner">' +'<input type="text" id="organizationCount" name="organizationCount" class="form-control" value="1" data-max="100" data-min="1" data-step="1" ' + ' onkeypress="return noNumbers(event,this)" onchange="organizationCountKeyUp(this);" onkeyup="organizationCountKeyUp(this);">' +'<div class="input-group-addon">' +'<a href="javascript:;" id="spinUp" class="spin-up" data-spin="up"><i class="icon-sort-up"></i></a>' +'<a href="javascript:;" class="spin-down" data-spin="down"><i class="icon-sort-down"></i></a>' +'</div></div>'; 我在jsp里添加以下代码,加减插件有效果 <div class="input-group spinner" data-trigger="spinner" id="spinner"> <input type="text" id="organizationCount" name="organizationCount" class="form-control" value="${jdList.organizationCount}" data-max="100" data-min="1" data-step="1" data-rule="quantity" onkeypress="return noNumbers(event,this)" onchange="organizationCountKeyUp(this);" onkeyup="organizationCountKeyUp(this);"> <div class="input-group-addon"> <a href="javascript:;" class="spin-up" data-spin="up"><i class="icon-sort-up"></i></a> <a href="javascript:;" class="spin-down" data-spin="down"><i class="icon-sort-down"></i></a> </div> </div> 求大神帮帮忙哈,js添加的控件怎么就没有效果呢? ```
Linux搭建Fastdfs文件服务器安装nginx问题
/home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c In file included from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6:0: /home/jumper/fastdfs-nginx-module/src//common.c:43:2: error: unknown type name ‘FDFSStorePaths’ FDFSStorePaths store_paths; ^ /home/jumper/fastdfs-nginx-module/src//common.c: In function ‘fdfs_load_groups_store_paths’: /home/jumper/fastdfs-nginx-module/src//common.c:123:35: error: request for member ‘paths’ in something not a structure or union group_store_paths[i].store_paths.paths = \ ^ /home/jumper/fastdfs-nginx-module/src//common.c:123:3: error: implicit declaration of function ‘storage_load_paths_from_conf_file_ex’ [-Werror=implicit-function-declaration] group_store_paths[i].store_paths.paths = \ ^ /home/jumper/fastdfs-nginx-module/src//common.c:125:58: error: request for member ‘count’ in something not a structure or union section_name, false, &group_store_paths[i].store_paths.count, \ ^ /home/jumper/fastdfs-nginx-module/src//common.c: In function ‘fdfs_mod_init’: /home/jumper/fastdfs-nginx-module/src//common.c:338:43: error: request for member ‘count’ in something not a structure or union storage_server_port, g_fdfs_store_paths.count); ^ /home/jumper/fastdfs-nginx-module/src//common.c:339:33: error: request for member ‘count’ in something not a structure or union for (i=0; i<g_fdfs_store_paths.count; i++) ^ /home/jumper/fastdfs-nginx-module/src//common.c:343:23: error: request for member ‘paths’ in something not a structure or union g_fdfs_store_paths.paths[i]); ^ /home/jumper/fastdfs-nginx-module/src//common.c:392:48: error: request for member ‘count’ in something not a structure or union for (i=0; i<group_store_paths[k].store_paths.count; i++) ^ /home/jumper/fastdfs-nginx-module/src//common.c:396:38: error: request for member ‘paths’ in something not a structure or union group_store_paths[k].store_paths.paths[i]); ^ /home/jumper/fastdfs-nginx-module/src//common.c:403:16: error: request for member ‘count’ in something not a structure or union store_paths.count, buff); ^ /home/jumper/fastdfs-nginx-module/src//common.c: In function ‘fdfs_http_request_handler’: /home/jumper/fastdfs-nginx-module/src//common.c:556:2: error: unknown type name ‘FDFSStorePaths’ FDFSStorePaths *pStorePaths; ^ /home/jumper/fastdfs-nginx-module/src//common.c:651:15: error: assignment from incompatible pointer type [-Werror] pStorePaths = &g_fdfs_store_paths; ^ /home/jumper/fastdfs-nginx-module/src//common.c:684:15: error: assignment from incompatible pointer type [-Werror] pStorePaths = &g_fdfs_store_paths; ^ /home/jumper/fastdfs-nginx-module/src//common.c:763:35: error: request for member ‘count’ in something not a structure or union store_path_index >= pStorePaths->count) ^ /home/jumper/fastdfs-nginx-module/src//common.c:769:34: error: request for member ‘count’ in something not a structure or union store_path_index, pStorePaths->count); ^ /home/jumper/fastdfs-nginx-module/src//common.c:808:3: error: implicit declaration of function ‘trunk_file_stat_ex1’ [-Werror=implicit-function-declaration] if ((result=trunk_file_stat_ex1(pStorePaths, store_path_index, \ ^ /home/jumper/fastdfs-nginx-module/src//common.c:868:17: error: request for member ‘paths’ in something not a structure or union pStorePaths->paths[store_path_index], \ ^ /home/jumper/fastdfs-nginx-module/src//common.c:973:2: error: implicit declaration of function ‘fdfs_http_get_file_extension’ [-Werror=implicit-function-declaration] ext_name = fdfs_http_get_file_extension(true_filename, \ ^ /home/jumper/fastdfs-nginx-module/src//common.c:973:11: error: assignment makes pointer from integer without a cast [-Werror] ext_name = fdfs_http_get_file_extension(true_filename, \ ^ /home/jumper/fastdfs-nginx-module/src//common.c:977:2: error: passing argument 3 of ‘fdfs_http_get_content_type_by_extname’ makes pointer from integer without a cast [-Werror] if (fdfs_http_get_content_type_by_extname(&g_http_params, \ ^ In file included from /home/jumper/fastdfs-nginx-module/src//common.c:27:0, from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6: /usr/local/include/fastdfs/fdfs_http_shared.h:103:5: note: expected ‘char *’ but argument is of type ‘int’ int fdfs_http_get_content_type_by_extname(FDFSHTTPParams *pParams, \ ^ In file included from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6:0: /home/jumper/fastdfs-nginx-module/src//common.c:977:2: error: passing argument 4 of ‘fdfs_http_get_content_type_by_extname’ makes integer from pointer without a cast [-Werror] if (fdfs_http_get_content_type_by_extname(&g_http_params, \ ^ In file included from /home/jumper/fastdfs-nginx-module/src//common.c:27:0, from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6: /usr/local/include/fastdfs/fdfs_http_shared.h:103:5: note: expected ‘int’ but argument is of type ‘char *’ int fdfs_http_get_content_type_by_extname(FDFSHTTPParams *pParams, \ ^ In file included from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6:0: /home/jumper/fastdfs-nginx-module/src//common.c:977:2: error: too many arguments to function ‘fdfs_http_get_content_type_by_extname’ if (fdfs_http_get_content_type_by_extname(&g_http_params, \ ^ In file included from /home/jumper/fastdfs-nginx-module/src//common.c:27:0, from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6: /usr/local/include/fastdfs/fdfs_http_shared.h:103:5: note: declared here int fdfs_http_get_content_type_by_extname(FDFSHTTPParams *pParams, \ ^ In file included from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6:0: /home/jumper/fastdfs-nginx-module/src//common.c:1092:3: error: unknown type name ‘ConnectionInfo’ ConnectionInfo storage_server; ^ /home/jumper/fastdfs-nginx-module/src//common.c:1096:24: error: request for member ‘ip_addr’ in something not a structure or union strcpy(storage_server.ip_addr, file_info.source_ip_addr); ^ /home/jumper/fastdfs-nginx-module/src//common.c:1097:17: error: request for member ‘port’ in something not a structure or union storage_server.port = the_storage_port; ^ /home/jumper/fastdfs-nginx-module/src//common.c:1098:17: error: request for member ‘sock’ in something not a structure or union storage_server.sock = -1; ^ /home/jumper/fastdfs-nginx-module/src//common.c:1104:3: error: passing argument 2 of ‘storage_download_file_ex1’ from incompatible pointer type [-Werror] result = storage_download_file_ex1(NULL, \ ^ In file included from /usr/local/include/fastdfs/fdfs_client.h:17:0, from /home/jumper/fastdfs-nginx-module/src//common.c:28, from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6: /usr/local/include/fastdfs/storage_client1.h:274:5: note: expected ‘struct TrackerServerInfo *’ but argument is of type ‘int *’ int storage_download_file_ex1(TrackerServerInfo *pTrackerServer, \ ^ In file included from /home/jumper/fastdfs-nginx-module/src//ngx_http_fastdfs_module.c:6:0: /home/jumper/fastdfs-nginx-module/src//common.c:1133:3: error: implicit declaration of function ‘trunk_get_full_filename_ex’ [-Werror=implicit-function-declaration] trunk_get_full_filename_ex(pStorePaths, &trunkInfo, \ ^ /home/jumper/fastdfs-nginx-module/src//common.c:1143:16: error: request for member ‘paths’ in something not a structure or union pStorePaths->paths[store_path_index], \ ^ cc1: all warnings being treated as errors make[1]: *** [objs/addon/src/ngx_http_fastdfs_module.o] Error 1 make[1]: Leaving directory `/home/jumper/nginx-1.0.11' make: *** [build] Error 2
spring mvc中使用post方式请求返回405
后台处理方法 ``` @RequestMapping(value="/doLogin", method=RequestMethod.POST) public ModelAndView doLogin(HttpSession session){ logger.info("user login."); session.setAttribute("USER", "admin"); //return "superMain.html"; return new ModelAndView(new InternalResourceView("/view/superMain.html")); } ``` mvc配置 ``` <bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver"> <property name="order" value="1"/> <property name="contentNegotiationManager" ref="contentNegotiationManager"/> <property name="viewResolvers"> <list> <bean class="org.springframework.web.servlet.view.BeanNameViewResolver"/> <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver"> <property name="prefix" value="/view/" /> </bean> </list> </property> <property name="defaultViews"> <list> <bean class="org.springframework.web.servlet.view.json.MappingJackson2JsonView"/> </list> </property> </bean> ``` 页面html代码 ``` <form action="doLogin" method="post"> <div class="form-group"> <div class="input-group"> <div class="input-group-addon"><i class="fa fa-user"></i></div> <input class="form-control" placeholder="Username" type="text" /> </div> </div> <div class="form-group"> <div class="input-group"> <div class="input-group-addon"><i class="fa fa-asterisk"></i></div> <input class="form-control" placeholder="Password" type="password" /> </div> </div> <div class="row"> <div class="col-xs-4"> <div class="form-group text-right"> <button class="btn btn-success text-uppercase" type="submit">Sign In</button> </div> </div> </div> </form> ``` 错误信息 11:54:35.105 [http-apr-8080-exec-3] DEBUG o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'springMvc' processing POST request for [/cbos-web-1.0/doLogin] 11:54:35.118 [http-apr-8080-exec-3] DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Looking up handler method for path /doLogin 11:54:35.133 [http-apr-8080-exec-3] DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Returning handler method [public org.springframework.web.servlet.ModelAndView com.gtstar.cbos.web.controller.LoginController.doLogin(javax.servlet.http.HttpSession)] 11:54:35.137 [http-apr-8080-exec-3] DEBUG o.s.b.f.s.DefaultListableBeanFactory - Returning cached instance of singleton bean 'loginController' - user login. 11:54:35.181 [http-apr-8080-exec-3] DEBUG o.s.web.servlet.DispatcherServlet - Rendering view [org.springframework.web.servlet.view.InternalResourceView: unnamed; URL [/view/superMain.html]] in DispatcherServlet with name 'springMvc' 11:54:35.183 [http-apr-8080-exec-3] DEBUG o.s.w.s.view.InternalResourceView - Forwarding to resource [/view/superMain.html] in InternalResourceView 'null' 11:54:35.183 [http-apr-8080-exec-3] DEBUG o.s.web.servlet.DispatcherServlet - DispatcherServlet with name 'springMvc' processing POST request for [/cbos-web-1.0/view/superMain.html] 11:54:35.189 [http-apr-8080-exec-3] DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Looking up handler method for path /view/superMain.html 11:54:35.194 [http-apr-8080-exec-3] DEBUG o.s.w.s.m.m.a.RequestMappingHandlerMapping - Did not find handler method for [/view/superMain.html] 11:54:35.209 [http-apr-8080-exec-3] DEBUG o.s.w.s.h.SimpleUrlHandlerMapping - Matching patterns for request [/view/superMain.html] are [/view/**] 11:54:35.226 [http-apr-8080-exec-3] DEBUG o.s.w.s.h.SimpleUrlHandlerMapping - URI Template variables for request [/view/superMain.html] are {} 11:54:35.238 [http-apr-8080-exec-3] DEBUG o.s.w.s.h.SimpleUrlHandlerMapping - Mapping [/view/superMain.html] to HandlerExecutionChain with handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/WEB-INF/view/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@783c52dc]]] and 1 interceptor 11:54:35.245 [http-apr-8080-exec-3] DEBUG o.s.w.s.m.a.ResponseStatusExceptionResolver - Resolving exception from handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/WEB-INF/view/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@783c52dc]]]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported 11:54:35.250 [http-apr-8080-exec-3] DEBUG o.s.w.s.m.s.DefaultHandlerExceptionResolver - Resolving exception from handler [ResourceHttpRequestHandler [locations=[ServletContext resource [/WEB-INF/view/]], resolvers=[org.springframework.web.servlet.resource.PathResourceResolver@783c52dc]]]: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported 11:54:35.257 [http-apr-8080-exec-3] WARN o.s.web.servlet.PageNotFound - Request method 'POST' not supported 11:54:35.275 [http-apr-8080-exec-3] WARN o.s.w.s.m.s.DefaultHandlerExceptionResolver - Handler execution resulted in exception: Request method 'POST' not supported 11:54:35.282 [http-apr-8080-exec-3] DEBUG o.s.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'springMvc': assuming HandlerAdapter completed request handling 11:54:35.316 [http-apr-8080-exec-3] DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request 11:54:35.317 [http-apr-8080-exec-3] DEBUG o.s.web.servlet.DispatcherServlet - Successfully completed request 望大师指导!!
求大神解题,使用的是ssm框架急急急!!!!
``` function init(){ $("#test").tree({ onClick:function(node){ //alert(node.url); } }); //初始化 $("#resource").treegrid({ title:"资源管理", url:"findRs.do", idField:"id", treeField:"text", columns:[[ {field:"id",title:"",width: 100,checkbox:true}, {field:"text",title:"资源名称",width:200}, {field:"url",title:"路径",width: 200} ]], toolbar:[ {text:"添加",iconCls:"icon-add",handler:function(){addResource();}}, {text:"分配权限",iconCls:"icon-add",handler: function(){}} ] }); } $(init); function addResource(){ $("#resource_alert").window("open"); } function save(){ var x=$("#resource_form").serialize(); // alert(x); $.get("resource.do",x,function(data){ alert(data); /* $("#resource_alert").window("close"); location.reload(); */ }); } </script> </head> <body> <a href="findAllResource.do">resource</a> <ul id="test" class="easyui-tree" data-options="url:'findRs.do'"> </ul> <br/> <div id="resource"></div> <!-- 弹出窗口 --> <div id="resource_alert" class="easyui-window" data-options="closed:true" style="width:500px;height:300px"> <form id="resource_form" class="form-group" style="margin: 10px"> <input id="resource_pid" type="hidden" name="Pid" value="0"/> <div class="input-group"> <span class="input-group-addon">资源名称</span> <input id="resource_text" type="text" name="text" class="form-control"/> </div> <div class="input-group"> <span class="input-group-addon">路径</span> <input type="text" name="url" id="resource_url" class="form-control"> </div> <a class="btn btn-success btn-block" href="javascript:save()">保存</a> </form> </div> </body> 如何实现增加的功能啊,要根据pid的不同添加子文件的位置也不同 ```
Angularjs中下载WebAPI返回的字节数组
因工作要求需要实现在后台(WebAPI)生成excel再通过前台(Angularjs)下载。 excel的生成在后台是通过epplus实现的,前台下载excel,在参考了网上很多资料后,以下是我写的例子: 1.webapi主要代码 ![图片说明](https://img-ask.csdn.net/upload/201704/27/1493285356_622717.png) ![图片说明](https://img-ask.csdn.net/upload/201704/27/1493286212_526760.png) 以上截图是webapi向前台返回二进制流的代码截图,其中filecontent是epplus生成的excel经过GetAsByteArray函数获得的字节数组 、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、 2.下载的指令 ![图片说明](https://img-ask.csdn.net/upload/201704/27/1493286630_295245.png) ![图片说明](https://img-ask.csdn.net/upload/201704/27/1493286685_57485.png) 指令中reponseType指定为arraybuffer,保存文件是通过FileSaver来实现的 、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、 3.界面中指令的应用 ``` <button class="btn btn-xs btn-addon btn-info m-l-xs" down-file="/ajax/Order/ExportToExcel" down-file-type="xlsx" ng-model="pageTable"><i class="fa fa-file-excel-o"></i>导出</button> ``` 、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、 4.调试时开发者工具中的截图 ![图片说明](https://img-ask.csdn.net/upload/201704/27/1493287889_399453.png) ![图片说明](https://img-ask.csdn.net/upload/201704/27/1493287621_763098.png) 、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、 5.点击导出后会下载一个excel文件,打开excel后发现excel中并没有我想下载的内容,只有下图中的数据 ![图片说明](https://img-ask.csdn.net/upload/201704/27/1493288091_651002.png) 、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、、 6.问题 网上查了很多资料,angular下载文件的思路基本都是这样的(指定reponseType=arraybuffer、通过Blob或者模拟a标签的方式下载等),仔细对比并没有发现问题所在,跪求大神指点问题所在或者思路~ _检查webapi返回的二进制流的长度觉得应该没有问题,succes回调中headers()["x-filename"]并没有获取到值,感觉是webapi返回数据方式或者angularjs接收数据方式有问题_ 追加描述: succes回调中追加console.log(headers()); ![图片说明](https://img-ask.csdn.net/upload/201704/28/1493345822_185743.png) headers中的数据明显与webapi中不一样 不确定是否与这相关
div取值问题,点击删除会弹出模态框,根据磁盘告警参数id删除该条信息
``` <c:forEach items="${hardVo_list}" var="hard"> <div class="list-group" role="group" aria-label="磁盘配置"> <div class="input-group"> <button id="HardInfo" hidden="hidden" ></button> <span class="input-group-addon">磁盘告警参数:</span> <input type="button" class="form-control" id="harddisk_id" name="harddisk_id" value="${hard.hardDiskId}" > <span class="input-group-addon">磁盘名:</span> <input type="text" class="form-control" id="harddisk_name" name="harddisk_name" value="${hard.hardDiskName}"> <span class="input-group-addon">磁盘检测值(GB):</span> <input type="text" class="form-control" id="minsize" name="minsize" value="${hard.minSize}"> <span class="input-group-addon btn btn-danger " id="btn" data-toggle="modal" data-target="#deleteHard">删除</span> </div> </div> </c:forEach> ```
bootstrap显示问题,input下面加了label
在input下面加了一个label导致label和input并列在图标的右侧<div class="input-group input-group-lg"> <span class="input-group-addon" id="sizing-addon1">@</span> <input type="text" class="form-control" placeholder="Username" aria-describedby="sizing-addon1"> <label>123</label></div>![图片说明](https://img-ask.csdn.net/upload/201607/24/1469348510_403753.png)
Python:如何读取CSV里1000个网页,然后按序存1000个网页HAR data,自动化
程序跑一次,可以去指定网页,转存一个har data文件。(这是没问题的) 但是,现在要跑1000个网页,读CSV里面的urls,但是始终无法自动命名存储下来的文档。 例如: CSV: 1. google.com ----> 存:a1.har 2. qq.com ----->存:a2.har 3. 163.com ------> 存:a3.har..(文件名要自动生成后缀,不要覆盖了) ...如此类推 --------> 存:a1000.har 网络上,国内外的网站都找了,确实比较少关于HAR data 的存储。 个人觉得是查了一个循环的语句,让Python直到浏览器,第一个网站进去了,存好了,再去第二个网站,存好了。这样逻辑, 可是能力不够,麻烦大神帮帮忙。 ``` import csv from browsermobproxy import Server from selenium import webdriver import json server = Server("D:\\browsermob-proxy-2.1.4\\bin\\browsermob-proxy.bat") server.start() proxy = server.create_proxy() profile = webdriver.FirefoxProfile() profile.set_proxy(proxy.selenium_proxy()) driver = webdriver.Firefox(firefox_profile=profile) extension_dir = "C:\\Program Files (x86)\\Mozilla Firefox\\browser\\features\\" # remember to include .xpi at the end of your file names extensions = [ 'adblock_plus-3.5-an+fx.xpi' ] for extension in extensions: driver.install_addon(extension_dir + extension, temporary=True) proxy.new_har("qq") path = "D:\websites.csv" csvfile = open(path,'r') reader = csv.reader(csvfile) result = {} for item in reader: if reader.line_num ==1: continue result[item[0]] = item[1] csvfile.close() print(result) for id, web in result.items(): website = web driver.get(website) server.stop() driver.quit() f = os.fdopen(fi, "w") ```
终于明白阿里百度这样的大公司,为什么面试经常拿ThreadLocal考验求职者了
点击上面↑「爱开发」关注我们每晚10点,捕获技术思考和创业资源洞察什么是ThreadLocalThreadLocal是一个本地线程副本变量工具类,各个线程都拥有一份线程私...
《奇巧淫技》系列-python!!每天早上八点自动发送天气预报邮件到QQ邮箱
将代码部署服务器,每日早上定时获取到天气数据,并发送到邮箱。 也可以说是一个小人工智障。 思路可以运用在不同地方,主要介绍的是思路。
面试官问我:什么是消息队列?什么场景需要他?用了会出现什么问题?
你知道的越多,你不知道的越多 点赞再看,养成习惯 GitHub上已经开源 https://github.com/JavaFamily 有一线大厂面试点脑图、个人联系方式和人才交流群,欢迎Star和完善 前言 消息队列在互联网技术存储方面使用如此广泛,几乎所有的后端技术面试官都要在消息队列的使用和原理方面对小伙伴们进行360°的刁难。 作为一个在互联网公司面一次拿一次Offer的面霸...
8年经验面试官详解 Java 面试秘诀
作者 |胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。 Java程序员准备和投递简历的实...
究竟你适不适合买Mac?
我清晰的记得,刚买的macbook pro回到家,开机后第一件事情,就是上了淘宝网,花了500元钱,找了一个上门维修电脑的师傅,上门给我装了一个windows系统。。。。。。 表砍我。。。 当时买mac的初衷,只是想要个固态硬盘的笔记本,用来运行一些复杂的扑克软件。而看了当时所有的SSD笔记本后,最终决定,还是买个好(xiong)看(da)的。 已经有好几个朋友问我mba怎么样了,所以今天尽量客观...
MyBatis研习录(01)——MyBatis概述与入门
MyBatis 是一款优秀的持久层框架,它支持定制化 SQL、存储过程以及高级映射。MyBatis原本是apache的一个开源项目iBatis, 2010年该项目由apache software foundation 迁移到了google code并改名为MyBatis 。2013年11月MyBatis又迁移到Github。
程序员一般通过什么途径接私活?
二哥,你好,我想知道一般程序猿都如何接私活,我也想接,能告诉我一些方法吗? 上面是一个读者“烦不烦”问我的一个问题。其实不止是“烦不烦”,还有很多读者问过我类似这样的问题。 我接的私活不算多,挣到的钱也没有多少,加起来不到 20W。说实话,这个数目说出来我是有点心虚的,毕竟太少了,大家轻喷。但我想,恰好配得上“一般程序员”这个称号啊。毕竟苍蝇再小也是肉,我也算是有经验的人了。 唾弃接私活、做外...
Python爬虫爬取淘宝,京东商品信息
小编是一个理科生,不善长说一些废话。简单介绍下原理然后直接上代码。 使用的工具(Python+pycharm2019.3+selenium+xpath+chromedriver)其中要使用pycharm也可以私聊我selenium是一个框架可以通过pip下载 pip installselenium -ihttps://pypi.tuna.tsinghua.edu.cn/simple/ ...
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
Java工作4年来应聘要16K最后没要,细节如下。。。
前奏: 今天2B哥和大家分享一位前几天面试的一位应聘者,工作4年26岁,统招本科。 以下就是他的简历和面试情况。 基本情况: 专业技能: 1、&nbsp;熟悉Sping了解SpringMVC、SpringBoot、Mybatis等框架、了解SpringCloud微服务 2、&nbsp;熟悉常用项目管理工具:SVN、GIT、MAVEN、Jenkins 3、&nbsp;熟悉Nginx、tomca...
Python爬虫精简步骤1 获取数据
爬虫,从本质上来说,就是利用程序在网上拿到对我们有价值的数据。 爬虫能做很多事,能做商业分析,也能做生活助手,比如:分析北京近两年二手房成交均价是多少?广州的Python工程师平均薪资是多少?北京哪家餐厅粤菜最好吃?等等。 这是个人利用爬虫所做到的事情,而公司,同样可以利用爬虫来实现巨大的商业价值。比如你所熟悉的搜索引擎——百度和谷歌,它们的核心技术之一也是爬虫,而且是超级爬虫。 从搜索巨头到人工...
Python绘图,圣诞树,花,爱心 | Turtle篇
每周每日,分享Python实战代码,入门资料,进阶资料,基础语法,爬虫,数据分析,web网站,机器学习,深度学习等等。 公众号回复【进群】沟通交流吧,QQ扫码进群学习吧 微信群 QQ群 1.画圣诞树 import turtle screen = turtle.Screen() screen.setup(800,600) circle = turtle.Turtle()...
作为一个程序员,CPU的这些硬核知识你必须会!
CPU对每个程序员来说,是个既熟悉又陌生的东西? 如果你只知道CPU是中央处理器的话,那可能对你并没有什么用,那么作为程序员的我们,必须要搞懂的就是CPU这家伙是如何运行的,尤其要搞懂它里面的寄存器是怎么一回事,因为这将让你从底层明白程序的运行机制。 随我一起,来好好认识下CPU这货吧 把CPU掰开来看 对于CPU来说,我们首先就要搞明白它是怎么回事,也就是它的内部构造,当然,CPU那么牛的一个东...
破14亿,Python分析我国存在哪些人口危机!
一、背景 二、爬取数据 三、数据分析 1、总人口 2、男女人口比例 3、人口城镇化 4、人口增长率 5、人口老化(抚养比) 6、各省人口 7、世界人口 四、遇到的问题 遇到的问题 1、数据分页,需要获取从1949-2018年数据,观察到有近20年参数:LAST20,由此推测获取近70年的参数可设置为:LAST70 2、2019年数据没有放上去,可以手动添加上去 3、将数据进行 行列转换 4、列名...
web前端javascript+jquery知识点总结
1.Javascript 语法.用途 javascript 在前端网页中占有非常重要的地位,可以用于验证表单,制作特效等功能,它是一种描述语言,也是一种基于对象(Object)和事件驱动并具有安全性的脚本语言 ...
Python实战:抓肺炎疫情实时数据,画2019-nCoV疫情地图
今天,群里白垩老师问如何用python画武汉肺炎疫情地图。白垩老师是研究海洋生态与地球生物的学者,国家重点实验室成员,于不惑之年学习python,实为我等学习楷模。先前我并没有关注武汉肺炎的具体数据,也没有画过类似的数据分布图。于是就拿了两个小时,专门研究了一下,遂成此文。
听说想当黑客的都玩过这个Monyer游戏(1~14攻略)
第零关 进入传送门开始第0关(游戏链接) 请点击链接进入第1关: 连接在左边→ ←连接在右边 看不到啊。。。。(只能看到一堆大佬做完的留名,也能看到菜鸡的我,在后面~~) 直接fn+f12吧 &lt;span&gt;连接在左边→&lt;/span&gt; &lt;a href="first.php"&gt;&lt;/a&gt; &lt;span&gt;←连接在右边&lt;/span&gt; o...
在家远程办公效率低?那你一定要收好这个「在家办公」神器!
相信大家都已经收到国务院延长春节假期的消息,接下来,在家远程办公可能将会持续一段时间。 但是问题来了。远程办公不是人在电脑前就当坐班了,相反,对于沟通效率,文件协作,以及信息安全都有着极高的要求。有着非常多的挑战,比如: 1在异地互相不见面的会议上,如何提高沟通效率? 2文件之间的来往反馈如何做到及时性?如何保证信息安全? 3如何规划安排每天工作,以及如何进行成果验收? ...... ...
作为一个程序员,内存和磁盘的这些事情,你不得不知道啊!!!
截止目前,我已经分享了如下几篇文章: 一个程序在计算机中是如何运行的?超级干货!!! 作为一个程序员,CPU的这些硬核知识你必须会! 作为一个程序员,内存的这些硬核知识你必须懂! 这些知识可以说是我们之前都不太重视的基础知识,可能大家在上大学的时候都学习过了,但是嘞,当时由于老师讲解的没那么有趣,又加上这些知识本身就比较枯燥,所以嘞,大家当初几乎等于没学。 再说啦,学习这些,也看不出来有什么用啊!...
渗透测试-灰鸽子远控木马
木马概述 灰鸽子( Huigezi),原本该软件适用于公司和家庭管理,其功能十分强大,不但能监视摄像头、键盘记录、监控桌面、文件操作等。还提供了黑客专用功能,如:伪装系统图标、随意更换启动项名称和表述、随意更换端口、运行后自删除、毫无提示安装等,并采用反弹链接这种缺陷设计,使得使用者拥有最高权限,一经破解即无法控制。最终导致被黑客恶意使用。原作者的灰鸽子被定义为是一款集多种控制方式于一体的木马程序...
Python:爬取疫情每日数据
前言 目前每天各大平台,如腾讯、今日头条都会更新疫情每日数据,他们的数据源都是一样的,主要都是通过各地的卫健委官网通报。 以全国、湖北和上海为例,分别为以下三个网站: 国家卫健委官网:http://www.nhc.gov.cn/xcs/yqtb/list_gzbd.shtml 湖北卫健委官网:http://wjw.hubei.gov.cn/bmdt/ztzl/fkxxgzbdgrfyyq/xxfb...
这个世界上人真的分三六九等,你信吗?
偶然间,在知乎上看到一个问题 一时间,勾起了我深深的回忆。 以前在厂里打过两次工,做过家教,干过辅导班,做过中介。零下几度的晚上,贴过广告,满脸、满手地长冻疮。 再回首那段岁月,虽然苦,但让我学会了坚持和忍耐。让我明白了,在这个世界上,无论环境多么的恶劣,只要心存希望,星星之火,亦可燎原。 下文是原回答,希望能对你能有所启发。 如果我说,这个世界上人真的分三六九等,...
B 站上有哪些很好的学习资源?
哇说起B站,在小九眼里就是宝藏般的存在,放年假宅在家时一天刷6、7个小时不在话下,更别提今年的跨年晚会,我简直是跪着看完的!! 最早大家聚在在B站是为了追番,再后来我在上面刷欧美新歌和漂亮小姐姐的舞蹈视频,最近两年我和周围的朋友们已经把B站当作学习教室了,而且学习成本还免费,真是个励志的好平台ヽ(.◕ฺˇд ˇ◕ฺ;)ノ 下面我们就来盘点一下B站上优质的学习资源: 综合类 Oeasy: 综合...
雷火神山直播超两亿,Web播放器事件监听是怎么实现的?
Web播放器解决了在手机浏览器和PC浏览器上播放音视频数据的问题,让视音频内容可以不依赖用户安装App,就能进行播放以及在社交平台进行传播。在视频业务大数据平台中,播放数据的统计分析非常重要,所以Web播放器在使用过程中,需要对其内部的数据进行收集并上报至服务端,此时,就需要对发生在其内部的一些播放行为进行事件监听。 那么Web播放器事件监听是怎么实现的呢? 01 监听事件明细表 名...
3万字总结,Mysql优化之精髓
本文知识点较多,篇幅较长,请耐心学习 MySQL已经成为时下关系型数据库产品的中坚力量,备受互联网大厂的青睐,出门面试想进BAT,想拿高工资,不会点MySQL优化知识,拿offer的成功率会大大下降。 为什么要优化 系统的吞吐量瓶颈往往出现在数据库的访问速度上 随着应用程序的运行,数据库的中的数据会越来越多,处理时间会相应变慢 数据是存放在磁盘上的,读写速度无法和内存相比 如何优化 设计...
Python新型冠状病毒疫情数据自动爬取+统计+发送报告+数据屏幕(三)发送篇
今天介绍的项目是使用 Itchat 发送统计报告 项目功能设计: 定时爬取疫情数据存入Mysql 进行数据分析制作疫情报告 使用itchat给亲人朋友发送分析报告 基于Django做数据屏幕 使用Tableau做数据分析 来看看最终效果 目前已经完成,预计2月12日前更新 使用 itchat 发送数据统计报告 itchat 是一个基于 web微信的一个框架,但微信官方并不允许使用这...
作为程序员的我,大学四年一直自学,全靠这些实用工具和学习网站!
我本人因为高中沉迷于爱情,导致学业荒废,后来高考,毫无疑问进入了一所普普通通的大学,实在惭愧???? 我又是那么好强,现在学历不行,没办法改变的事情了,所以,进入大学开始,我就下定决心,一定要让自己掌握更多的技能,尤其选择了计算机这个行业,一定要多学习技术。 在进入大学学习不久后,我就认清了一个现实:我这个大学的整体教学质量和学习风气,真的一言难尽,懂的人自然知道怎么回事? 怎么办?我该如何更好的提升自...
粒子群算法求解物流配送路线问题(python)
1.Matlab实现粒子群算法的程序代码:https://www.cnblogs.com/kexinxin/p/9858664.html matlab代码求解函数最优值:https://blog.csdn.net/zyqblog/article/details/80829043 讲解通俗易懂,有数学实例的博文:https://blog.csdn.net/daaikuaichuan/article/...
教你如何编写第一个简单的爬虫
很多人知道爬虫,也很想利用爬虫去爬取自己想要的数据,那么爬虫到底怎么用呢?今天就教大家编写一个简单的爬虫。 下面以爬取笔者的个人博客网站为例获取第一篇文章的标题名称,教大家学会一个简单的爬虫。 第一步:获取页面 #!/usr/bin/python # coding: utf-8 import requests #引入包requests link = "http://www.santostang....
前端JS初级面试题二 (。•ˇ‸ˇ•。)老铁们!快来瞧瞧自己都会了么
1. 传统事件绑定和符合W3C标准的事件绑定有什么区别? 传统事件绑定 &lt;div onclick=""&gt;123&lt;/div&gt; div1.onclick = function(){}; &lt;button onmouseover=""&gt;&lt;/button&gt; 注意: 如果给同一个元素绑定了两次或多次相同类型的事件,那么后面的绑定会覆盖前面的绑定 (不支持DOM事...
相关热词 c# 压缩图片好麻烦 c#计算数组中的平均值 c#获取路由参数 c#日期精确到分钟 c#自定义异常必须继承 c#查表并返回值 c# 动态 表达式树 c# 监控方法耗时 c# listbox c#chart显示滚动条
立即提问