求教各位大神var url = "read.html?name="和"&password="是什么意思?
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8"/>
    <title></title>
    <script>
        function post() {
            var url = "read.html?name=" + escape(document.all.name.value);
            url += "&password=" + escape(document.all.password.value);
            window.location = url;
        };
    </script>
</head>
<body>

Name:<input type="text" name="name"/><br/>

Pass:<input type="text" name="password"/><br/>

<input type="button" value="post" onClick="post()"/>

</body>
</html> 

我还有一个read.html的文件,我知道大概就是调用read.html的意思,,但是如果想要吧这个post.html页面的JS和read.html中的JS合并,post.html中的JS代码该如何改动?

3个回答

你这个是拼接了一个url,就是登录名和密码,然后通过这个跳转到read.html页面
不知道你的合并用的是什么,你定义一个js页面,然后read.html和post.html分别引入这个js就行

liangayang
敲个锤子 回复reborn_tou: 之前在写代码,你试试看看好使不,百度百度
一年多之前 回复
reborn_tou
reborn_tou 回复reborn_tou: 好的谢谢我试试
一年多之前 回复
reborn_tou
reborn_tou 回复liangayang: read.html?可以不用改动吗?
一年多之前 回复
reborn_tou
reborn_tou 回复liangayang: 我就是想写在外部然后引用,,这个我会,但是因为不知道这个JS是怎么引用post.html的,所有想知道如果这个两个JS函数放在同一个文件中的话,是不是就可以不用read.html?了?
一年多之前 回复
liangayang
敲个锤子 回复reborn_tou: 把标签:<script></script>中的东西写到post.js中,然后read.html中引入post.js,function别重复
一年多之前 回复
reborn_tou
reborn_tou 就是想简化代码,想把JS和HTML分离开来,read.html文件其实里面就是单纯的JS代码,然后想把post.html中的JS代码分离出去后跟post.html(post.js)合并
一年多之前 回复
liangayang
敲个锤子 回复reborn_tou: 你是想吧哪个js放在read.html的哪个代码中,js写法现在一般分为2种,一种引入其他js页面,一种就是你这种写在script标签中
一年多之前 回复
reborn_tou
reborn_tou 您好,请问如果要把这个JS函数放到read.html的那个代码中,这段代码该怎么改呢?直接删去read.html?就可以吗?
一年多之前 回复

var url = "read.html?name="和"&password="是什么意思?
这个是url地址,带了参数,name="和" ,password="xxx"。就是你输入的用户名和密码。
看你代码的意识就是:点击一个按钮,然后js实现跳转页面。顺便把用户的名字和密码带过去。

qq_23126581
渊渟无迹静涛君 回复reborn_tou: 你是想在read.html里取到你输入的用户名和密码吗?在页面写<% String name= request.getParameter("name"); ,String password= request.getParameter("password"); %>
一年多之前 回复
reborn_tou
reborn_tou 您好,请问如果要把这个JS函数放到read.html的那个代码中,这段代码该怎么改呢?直接删去read.html?就可以吗?
一年多之前 回复

拼接URL,传值过去

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
求教各位大神var url = "read.html?name="和"&password="是什么意思?

``` <!DOCTYPE html> <html> <head> <meta charset="UTF-8"/> <title></title> <script> function post() { var url = "read.html?name=" + escape(document.all.name.value); url += "&password=" + escape(document.all.password.value); window.location = url; }; </script> </head> <body> Name:<input type="text" name="name"/><br/> Pass:<input type="text" name="password"/><br/> <input type="button" value="post" onClick="post()"/> </body> </html> ``` 我还有一个read.html的文件,我知道大概就是调用read.html的意思,,但是如果想要吧这个post.html页面的JS和read.html中的JS合并,post.html中的JS代码该如何改动?

在安装robotframework的AutoItLibrary库的时候遇到一个报错File "setup.py", line 57,求教各位大神

按照别的大神的安装帖子安装,一共3个插件,后面2个都安装好了,就第一个报错,![按照别的大神的安装帖子安装,一共3个插件,后面2个都安装好了,就第一个报错,报错代码如下](https://img-ask.csdn.net/upload/201907/01/1561960546_853724.png) 报错代码如下 ``` C:\Users\Administrator\Downloads\AutoItLibrary-1.1.post1>python setup.py install File "setup.py", line 57 print "Don't think we need to unregister the old one..." ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(print "D on't think we need to unregister the old one...")? ``` 安装电脑环境 win7旗舰版 64位 python是 64位的3.6.4

<jsp:useBean id="book" class="beans.Book"/>

<jsp:useBean id="book" class="beans.Book"/>中class="beans.Book"一直报错,不知道什么原因,求教

easyui row=$("#dg").datagrid("getSelected")的问题

新手求教 想知道row=$("#dg").datagrid("getSelected") 里的中文是什么格式的 我编码格式是GB2312 但是 row里面的中文取出来是 ``` &#21496; ``` 这样的 !!

myeclipse 里 window show 里的servers 出错。怎么解决,求教!

Could not create the view: Plug-in "com.genuitec.eclipse.ast.deploy.core" was unable to instantiate class "com.genuitec.eclipse.ast.deploy.core.ui.ServerView".

请问我在给DSP(28335)编译的时候出现了如下错误,向大神求教该怎么解决?

"../CMD/28335_RAM_lnk.cmd", line 15: error: BEGIN memory range has already been specified "../CMD/28335_RAM_lnk.cmd", line 15: error: BEGIN memory range overlaps existing memory range BEGIN "../CMD/28335_RAM_lnk.cmd", line 17: error: RAMM0 memory range has already been specified 诸如上面的各种报错下面还有二十多个,我是缺少了什么文件吗?请大神教我!

求教大神,ajax找不到url里的方法

public void modifyPerformance() { Integer id = Integer.parseInt(request.getParameter("id")); String checkItem = request.getParameter("checkItem"); Double coefficient = Double.parseDouble(request.getParameter("coefficient")); String addMoneyType = request.getParameter("addMoneyType"); Double perAddMoneyValue = Double.parseDouble(request.getParameter("perAddMoneyValue")); Double addMoney = Double.parseDouble(request.getParameter("addMoney")); String reduceMoneyType = request.getParameter("reduceMoneyType"); Double perReduceMoneyValue = Double.parseDouble(request.getParameter("perReduceMoneyValue")); Double reduceMoney = Double.parseDouble(request.getParameter("reduceMoney")); performanceService.modifyPerformance(id, checkItem, coefficient, perAddMoneyValue, addMoney, perReduceMoneyValue, reduceMoney, addMoneyType, reduceMoneyType); } yes: function(index){ layer.close(index); var idVice = $("#id").val(); var checkItemVice = $("#checkItem").val(); var coefficientVice = $("#coefficient").val(); var addMoneyTypeVice = $("#addMoneyType").val(); var perAddMoneyValueVice = $("#perAddMoneyValue").val(); var addMoneyVice = $("#addMoney").val(); var reduceMoneyTypeVice = $("#reduceMoneyType").val(); var perReduceMoneyValueVice = $("#perReduceMoneyValue").val(); var reduceMoneyVice = $("#reduceMoney").val(); alert(idVice); alert(checkItemVice); alert(coefficientVice); alert(addMoneyTypeVice); alert(perAddMoneyValueVice); alert(addMoneyVice); alert(reduceMoneyTypeVice); alert(perReduceMoneyValueVice); alert(reduceMoneyVice); $.ajax({ type:'post', data:{id: idVice, checkItem: checkItemVice, coefficient: coefficientVice, addMoneyType: addMoneyTypeVice, perAddMoneyValue: perAddMoneyValueVice, addMoney: addMoneyVice, reduceMoneyType: reduceMoneyTypeVice, perReduceMoneyValue: perReduceMoneyValueVice, reduceMoney: reduceMoneyVice}, dataType:'json', url:'/administration/performance/modifyPerformance', success:function() { } }); } <package name="performanceAction" extends="json-default" namespace="/administration/performance"> <action name="save_*" class="performanceAction" method="{1}"> <interceptor-ref name="token" /> <interceptor-ref name="defaultStack"/> <result name="invalid.token">/pages/submitRepeatError.jsp</result> <result name="error">/pages/administration/error.jsp</result> <result name="render_findPerformanceApplys" type="redirect">/administration/performance/findPerformanceApplys</result> </action> <action name="*" class="performanceAction" method="{1}"> <result name="showPerformanceDiagram">/pages/performance/common/showPerformanceDiagram.jsp</result> <result name="newPerformance">/pages/performance/common/newPerformance.jsp</result> <result name="performanceApplys">/pages/performance/common/performanceApplys.jsp</result> <result name="showPerformanceDetail">/pages/performance/common/showPerformanceDetail.jsp</result> <result name="pmAudit">/pages/performance/common/pmAudit.jsp</result> <result name="toTaskList" type="redirect"> <param name="type">${type}</param> <param name="location">/personal/findTaskList</param> </result> <result name="modifyPositionPerformance">/pages/performance/common/modifyPositionPerformance.jsp</result> <result name="processHistory">/pages/performance/common/processHistory.jsp</result> <result name="staffPerformances">/pages/performance/common/staffPerformances.jsp</result> <result name="showModifyProcess">/pages/performance/common/showModifyProcess.jsp</result> <result name="findPersPerf">/pages/performance/common/findPersPerf.jsp</result> </package>

NullPointerException during IR Conversion求教各位大佬这个问题应该怎么解决

下载了Mozilla的fenix的工程,然后自己新建了一个项目,但是没有办法生成APK,build的时候出现NullPointerException during IR Conversion 生成APK的时候出现这个错误 ``` Error: C:\Users\1247\.gradle\caches\transforms-2\files-2.1\a23c8c3902a9b5254e713513da60c387\jetified-feature-tab-collections-43.0.20200520130058-runtime.jar:mozilla/components/feature/tab/collections/TabCollectionStorage.class, androidx.lifecycle.LiveData mozilla.components.feature.tab.collections.TabCollectionStorage.getCollections(int), NullPointerException during IR Conversion ``` 尝试过 1.指定r8版本,classpath 'com.android.tools:r8:1.6.88' 2.在gradle.properties中添加android.useNewApkCreator=false 3.提高依赖版本 还是没有用 下面是我的gradle文件 ``` ``` buildscript { ext.kotlin_version = '1.3.72' repositories { maven { url "https://nightly.maven.mozilla.org/maven2" content { // Always fetch components from the snapshots repository includeGroup "org.mozilla.components" } } maven { url "https://maven.mozilla.org/maven2" content { // Never fetch components from here. We always want to use snapshots. excludeGroup "org.mozilla.components" } } google() jcenter() { url 'https://jcenter.bintray.com/' } } dependencies { classpath 'com.android.tools.build:gradle:3.6.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files def nav_version = "2.2.2" classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version" classpath 'com.google.android.gms:oss-licenses-plugin:0.10.2' def components_version = "43.0.20200520130058" classpath "org.mozilla.components:tooling-glean-gradle:$components_version" classpath "org.jetbrains.kotlin:kotlin-allopen:1.3.72" classpath "com.android.tools:r8:1.6.84" } } allprojects { repositories { google() jcenter() maven { url "https://nightly.maven.mozilla.org/maven2" content { // Always fetch components from the snapshots repository includeGroup "org.mozilla.components" } } maven { url "https://maven.mozilla.org/maven2" content { // Never fetch components from here. We always want to use snapshots. excludeGroup "org.mozilla.components" } } } } task clean(type: Delete) { delete rootProject.buildDir } ``` buildscript { ext.kotlin_version = '1.3.72' repositories { maven { url "https://nightly.maven.mozilla.org/maven2" content { // Always fetch components from the snapshots repository includeGroup "org.mozilla.components" } } maven { url "https://maven.mozilla.org/maven2" content { // Never fetch components from here. We always want to use snapshots. excludeGroup "org.mozilla.components" } } google() jcenter() { url 'https://jcenter.bintray.com/' } } dependencies { classpath 'com.android.tools.build:gradle:3.6.3' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files def nav_version = "2.2.2" classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$nav_version" classpath 'com.google.android.gms:oss-licenses-plugin:0.10.2' def components_version = "43.0.20200520130058" classpath "org.mozilla.components:tooling-glean-gradle:$components_version" classpath "org.jetbrains.kotlin:kotlin-allopen:1.3.72" classpath "com.android.tools:r8:1.6.84" } } allprojects { repositories { google() jcenter() maven { url "https://nightly.maven.mozilla.org/maven2" content { // Always fetch components from the snapshots repository includeGroup "org.mozilla.components" } } maven { url "https://maven.mozilla.org/maven2" content { // Never fetch components from here. We always want to use snapshots. excludeGroup "org.mozilla.components" } } } } task clean(type: Delete) { delete rootProject.buildDir } ``` ``` plugins { id "com.jetbrains.python.envs" version "0.0.26" } apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: "androidx.navigation.safeargs.kotlin" apply plugin: 'com.google.android.gms.oss-licenses-plugin' android { compileSdkVersion 29 defaultConfig { applicationId "com.frobisher.netexplorer" minSdkVersion 23 targetSdkVersion 29 versionCode 1 versionName "1.0" // def buildDate = Config.generateBuildDate() // buildConfigField 'String', 'BUILD_DATE', '"' + buildDate + '"' buildConfigField 'String', 'SENTRY_TOKEN', 'null' testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" vectorDrawables.useSupportLibrary = true def deepLinkSchemeValue = "net-explorer" manifestPlaceholders = [ "isRaptorEnabled": "false", "deepLinkScheme" : deepLinkSchemeValue ] resValue "bool", "IS_DEBUG", "false" buildConfigField "String", "AMO_COLLECTION", "\"16f6e5d9a40448b8955db57ced6d75\"" buildConfigField 'String', 'DIGITAL_ASSET_LINKS_TOKEN', 'null' buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\"" buildConfigField 'boolean', 'CRASH_REPORTING', 'true' buildConfigField 'String', 'ADJUST_TOKEN', 'null' buildConfigField 'boolean', 'TELEMETRY', 'false' } buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro' } } kotlinOptions { jvmTarget = "1.8" } compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 targetCompatibility JavaVersion.VERSION_1_8 } android.applicationVariants.all { variant -> try { def token = new File("${rootDir}/.mls_token").text.trim() buildConfigField 'String', 'MLS_TOKEN', '"' + token + '"' println "(Added from .mls_token file)" } catch (FileNotFoundException ignored) { buildConfigField 'String', 'MLS_TOKEN', '""' println("X_X") } try { def parts = new File("${rootDir}/.leanplum_token").text.trim().split(":") def id = parts[0] def key = parts[1] buildConfigField 'String', 'LEANPLUM_ID', '"' + id + '"' buildConfigField 'String', 'LEANPLUM_TOKEN', '"' + key + '"' println "(Added from .leanplum_token file)" } catch (FileNotFoundException ignored) { buildConfigField 'String', 'LEANPLUM_ID', 'null' buildConfigField 'String', 'LEANPLUM_TOKEN', 'null' println("X_X") } } } task buildTranslationArray { def foundLocales = new StringBuilder() foundLocales.append("new String[]{") fileTree("src/main/res").visit { FileVisitDetails details -> if (details.file.path.endsWith("/strings.xml")) { def languageCode = details.file.parent.tokenize('/').last().replaceAll('values-', '').replaceAll('-r', '-') languageCode = (languageCode == "values") ? "en-US" : languageCode foundLocales.append("\"").append(languageCode).append("\"").append(",") } } foundLocales.append("}") def foundLocalesString = foundLocales.toString().replaceAll(',}', '}') android.defaultConfig.buildConfigField "String[]", "SUPPORTED_LOCALE_ARRAY", foundLocalesString } // Generate Kotlin code and markdown docs for the Fenix Glean metrics. ext.gleanGenerateMarkdownDocs = true ext.gleanDocsDirectory = "$rootDir/docs" apply plugin: "org.mozilla.telemetry.glean-gradle-plugin" dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']) implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version" implementation 'androidx.appcompat:appcompat:1.1.0' implementation 'androidx.core:core-ktx:1.2.0' // implementation 'androidx.constraintlayout:constraintlayout:1.1.3' testImplementation 'junit:junit:4.12' androidTestImplementation 'androidx.test.ext:junit:1.1.1' androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0' def components_version = "43.0.20200520130058" implementation "org.mozilla.components:browser-toolbar:$components_version" implementation "org.mozilla.components:browser-engine-gecko-nightly:$components_version" implementation "org.mozilla.components:browser-menu:$components_version" implementation "org.mozilla.components:browser-awesomebar:$components_version" implementation "org.mozilla.components:browser-domains:$components_version" implementation "org.mozilla.components:browser-search:$components_version" implementation "org.mozilla.components:browser-tabstray:$components_version" implementation "org.mozilla.components:browser-menu:$components_version" implementation "org.mozilla.components:browser-session:$components_version" implementation "org.mozilla.components:browser-state:$components_version" implementation "org.mozilla.components:browser-storage-sync:$components_version" implementation "org.mozilla.components:browser-icons:$components_version" implementation "org.mozilla.components:browser-thumbnails:$components_version" implementation "org.mozilla.components:feature-toolbar:$components_version" implementation "org.mozilla.components:feature-addons:$components_version" implementation "org.mozilla.components:feature-app-links:$components_version" implementation "org.mozilla.components:feature-awesomebar:$components_version" implementation "org.mozilla.components:feature-contextmenu:$components_version" implementation "org.mozilla.components:feature-customtabs:$components_version" implementation "org.mozilla.components:feature-findinpage:$components_version" implementation "org.mozilla.components:feature-media:$components_version" implementation "org.mozilla.components:feature-sitepermissions:$components_version" implementation "org.mozilla.components:feature-intent:$components_version" implementation "org.mozilla.components:feature-search:$components_version" implementation "org.mozilla.components:feature-session:$components_version" implementation "org.mozilla.components:feature-tabs:$components_version" implementation "org.mozilla.components:feature-downloads:$components_version" implementation "org.mozilla.components:feature-prompts:$components_version" implementation "org.mozilla.components:feature-push:$components_version" implementation "org.mozilla.components:feature-pwa:$components_version" implementation "org.mozilla.components:feature-qr:$components_version" implementation "org.mozilla.components:feature-readerview:$components_version" implementation "org.mozilla.components:feature-syncedtabs:$components_version" implementation "org.mozilla.components:feature-webcompat:$components_version" implementation "org.mozilla.components:feature-webnotifications:$components_version" implementation "org.mozilla.components:feature-accounts:$components_version" implementation "org.mozilla.components:feature-accounts-push:$components_version" implementation "org.mozilla.components:feature-tab-collections:$components_version" implementation "org.mozilla.components:feature-top-sites:$components_version" implementation "org.mozilla.components:feature-share:$components_version" implementation "org.mozilla.components:concept-engine:$components_version" implementation "org.mozilla.components:concept-toolbar:$components_version" implementation "org.mozilla.components:concept-tabstray:$components_version" implementation "org.mozilla.components:concept-storage:$components_version" implementation "org.mozilla.components:concept-push:$components_version" implementation "org.mozilla.components:concept-sync:$components_version" implementation "org.mozilla.components:ui-icons:$components_version" implementation "org.mozilla.components:ui-colors:$components_version" implementation "org.mozilla.components:ui-autocomplete:$components_version" implementation "org.mozilla.components:ui-tabcounter:$components_version" implementation "org.mozilla.components:service-firefox-accounts:$components_version" implementation "org.mozilla.components:service-glean:$components_version" implementation "org.mozilla.components:service-experiments:$components_version" implementation "org.mozilla.components:service-sync-logins:$components_version" implementation "org.mozilla.components:service-location:$components_version" implementation "org.mozilla.components:support-utils:$components_version" implementation "org.mozilla.components:support-ktx:$components_version" implementation "org.mozilla.components:support-rustlog:$components_version" implementation "org.mozilla.components:support-rusthttp:$components_version" implementation "org.mozilla.components:support-webextensions:$components_version" implementation "org.mozilla.components:support-locale:$components_version" implementation "org.mozilla.components:support-migration:$components_version" implementation "org.mozilla.components:lib-crash:$components_version" implementation "org.mozilla.components:lib-push-firebase:$components_version" implementation "org.mozilla.components:lib-publicsuffixlist:$components_version" implementation "com.google.android.material:material:1.1.0" implementation "androidx.constraintlayout:constraintlayout:2.0.0-beta6" implementation "androidx.recyclerview:recyclerview:1.1.0" implementation "androidx.paging:paging-runtime-ktx:2.1.2" implementation "androidx.lifecycle:lifecycle-livedata-ktx:2.2.0" implementation "androidx.lifecycle:lifecycle-runtime-ktx:2.2.0" implementation "androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0" implementation 'androidx.work:work-runtime-ktx:2.3.4' implementation "androidx.preference:preference-ktx:1.1.1" implementation "com.google.android:flexbox:2.0.1" // Kotlin implementation "androidx.navigation:navigation-fragment-ktx:2.2.2" implementation "androidx.navigation:navigation-ui-ktx:2.2.2" implementation "com.tencent.bugly:crashreport:3.1.8" implementation 'com.tencent.bugly:nativecrashreport:3.7.1' implementation 'com.airbnb.android:lottie:3.4.0' implementation "com.google.android.gms:play-services-oss-licenses:17.0.0" implementation "com.google.android.gms:play-services-ads-identifier:17.0.0" implementation "io.sentry:sentry-android:1.7.10" implementation "com.leanplum:leanplum-core:5.2.3" implementation "com.leanplum:leanplum-fcm:5.2.3" implementation "androidx.biometric:biometric:1.0.1" // For the initial release of Glean 19, we require consumer applications to // depend on a separate library for unit tests. This will be removed in future releases. // testImplementation "org.mozilla.telemetry:glean-forUnitTests:${project.ext.glean_version}" implementation"com.adjust.sdk:adjust-android:4.18.3" } ``` 下载了Mozilla的fenix的工程,然后自己新建了一个项目,但是没有办法生成APK,build的时候出现NullPointerException during IR Conversion,求各位大佬帮忙看看什么问题,谢谢

html 求教这个怎么加背景图片啊

<html> <head> <meta charset="utf-8"> <title>执子之手,与子偕老</title> <audio id="bgmMusic" src="http://qzone.haoduoge.com/music3/2015-02-05/1423102935.mp3" preload="auto" type="audio/mp3" autoplay loop></audio> <style type="text/css"> body { /*background-image:url(images2/20150018.jpg); background-attachment:fixed;*/ margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; background-color: #FF62FF; } .content { width: 80%; color: #90F; height: 100%; top: 0px; left: 10%; font-size: 18px; line-height: 25px; font-family: "微软雅黑"; margin-top: 0px; } body { color: #FFF; padding: 10px; background: #FFF url(/bg_105_wrap2.jpg) no-repeat fixed top center; margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } .des { font-size: 15px; color: #3C3C3C; /*width: 100%;*/ text-shadow : 0px 0px 1px #fff; z-index:1000; right:20px; position:fixed !important; bottom:0px; } .des a { color: #3C3C3C; text-shadow : 0px 0px 1px #fff; } </style> <script src="jquery-1.7.1.min.js" language="javascript" type="text/javascript"></script> <script src="tao.js" language="javascript" type="text/javascript"></script> <script> $(document).ready(function(e) { /*禁止右键和隐藏鼠标*/ $("body").bind("contextmenu", function() { return false; }); /*定义文字最底部显示到哪儿*/ var guangs=[" ","|"," ","|"]; var guangBiao="/"; var guangSub=0; var guang=setInterval("$.guang()",120); var subs=0; var string="亲<-- 致-->"; $.intent=function(str){ str="  "+str; //var reg=new RegExp("/█{1,2}/","i"); //创建正则RegExp对象 str=str.replace(eval("/█/gi"),"█"); return str; } string=$.intent(string); var echo=setInterval("$.echo()",300); $.guang=function(){ if(guangSub<guangs.length-1){ guangSub++; }else{ guangSub=0; } guangBiao=guangs[guangSub]; $("#guang").html(guangBiao); } $.echo=function(){ if(subs<string.length){ $("#txt").html($("#txt").html()+$.repl(string.substr(subs,1))); if($("#guang").offset().top > document.body.scrollHeight / 2){ window.scrollTo(0,$("#guang").offset().top); } $(".des").css("bottom","0px"); subs++; } } $.repl=function(str){ str=str.replace("\r\n","<br/>"); str=str.replace("\n","<br/>"); str=str.replace("█","<br/>"); return str; } }); </script> </head> <center> <div align="left" class="content"><span id="txt"></span><span id="guang"></span> <span></span> </div> </center> <div id="bubbles" style="visibility:hidden"> <img src="img/1.png"> <img src="img/2.png"> <img src="img/1.png"> </div> <!----> </body> </html>

封装了个js方法,结果要加上alert()才能运行,而且不会显示alert框?

<pre name="code" class=" 引入js的位置 "> &lt;/body&gt; &lt;script type="text/javascript" src="${pageContext.request.contextPath}/js/linkUrl.js"&gt;&lt;/script&gt; &lt;/html&gt;</pre> <p> </p> <pre name="code" class="调用的地方">&lt;a href="#" onclick="javascript:linkUrl('${pageContext.request.contextPath}/wap/login/register.jsp?topColumnId=${i_TopColumnID}')"&gt; 注册&lt;/a&gt;|</pre> <p> </p> <pre name="code" class="js脚本中的方法">/* * 功能 : 将如"register.jsp?name=a&amp;pwd=a"的链接改成form提交,以达到隐藏表单。 * 使用:将&lt;a href="register.jsp?name=a&amp;pwd=a"&gt;注册&lt;/a&gt;|替换这 * &lt;a href="#" onclick="linkUrl('register.jsp?name=a&amp;pwd=a')"&gt;注册&lt;/a&gt;| * */ function linkUrl(allUrl){ var url,queryString,oneArray,twoArray,name,value,turnForm,turnInput; //1 创建form turnForm = document.createElement("form"); document.body.appendChild(turnForm); //2 解析完整url,加入隐藏域 <span style="color: #ff0000;">alert(allUrl);</span> url = allUrl.substring(0,allUrl.indexOf("?")); queryString = allUrl.substr(allUrl.indexOf("?")+1); // alert(url); // alert(queryString); oneArray = queryString.split("&amp;"); for(var i=0;i&lt;oneArray.length;i++){ twoArray = oneArray[i].split("="); name = twoArray[0]; value = twoArray[1]; //alert(name); //alert(value); turnInput = document.createElement("input"); turnInput.type = "hidden"; turnForm.appendChild(turnInput); turnInput.name = name; turnInput.value = value; } //3 提交 turnForm.action=url; turnForm.method = "post"; turnForm.submit(); }</pre> <p>   结果要加上 13行 <span style="color: #ff0000;">alert(allUrl);</span><br>的那一句才能正常执行,否则就报找不到action的错误。 太神奇了。求教。</p>

Struts2 ajax问题 新手求教

实践了一下书上的 Ajax实例 没有得到应有的效果 index.jsp页面 得到name password的值 用XMLHttpRequest对象和Action交互 理论效果应该是页面的一部分进行更新 然而结果却返回了success页面 主要代码如下: 分别是 页面 拦截器 和Action的代码 > ``` <%@ page contentType="text/html;charset=UTF-8" language="java" %> <%@ taglib prefix="s" uri="/struts-tags" %> <%@ taglib prefix="sx" uri="/struts-dojo-tags" %> <html> <head> <meta http-equiv="Content-Type" content="text/html" charset="UTF-8"> <title>Insert title here</title> <sx:head/> <script type="text/javascript"> var XHR = false; function CreateXHR() { try { XHR = new ActiveXObject("msxml2.XMLHTTP"); } catch (e1) { try { XHR = new ActiveXObject("microsoft.XMLHTTP"); } catch (e2) { try { XHR = new XMLHttpRequest(); } catch (e3) { XHR = false; } } } } function sendRequest() { CreateXHR(); if (XHR) { var name = document.getElementById("name").value; var password = document.getElementById("password").value; var uri = "http://localhost:8080/StrutsDemo/login.action?name=" + name + "&password=" + password; XHR.open("GET", uri, true); alert(1); XHR.onreadystatechange = resultHander; alert(2); XHR.send(null); alert(3); } } function resultHander() { if (XHR.readyState == 4 && XHR.status == 200) { alert(4); alert(XHR.responseText); alert(5); } } </script> </head> <body> <center> Name:<input type="text" id="name"/><br/> password:<input type="password" id="password"/><br/> <input type="button" value="ok" onclick="sendRequest();"/> </center> </body> </html> ``` ``` <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE struts PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 2.1.7//EN" "http://struts.apache.org/dtds/struts-2.1.7.dtd"> <struts> <package name="Struts_AJAX_DEMO" namespace="/" extends="struts-default"> <action name="login" class="com.action.LoginAction"> <result>/success.jsp</result> </action> </package> </struts> ``` ``` package com.action; import javax.servlet.http.HttpServletResponse; import javax.swing.plaf.basic.BasicInternalFrameTitlePane.SystemMenuBar; import org.apache.struts2.ServletActionContext; import com.opensymphony.xwork2.ActionSupport; public class LoginAction extends ActionSupport { private static final long serialVersionUID = 1L; private String name; private String password; public String getName() { return name; } public void setName(String name) { this.name = name; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String execute() throws Exception{ HttpServletResponse response = ServletActionContext.getResponse(); response.setContentType("text/xml;charset=UTF-8"); response.setHeader("Cache-Control","no-cache"); response.getWriter().println("success"); if(name.equals("tom")&&password.equals("123")) { response.getWriter().println("welcome login!"); }else{ response.getWriter().println("error,palease input again!"); } return SUCCESS; } } ```

求大神帮忙改进一下sql语句

sql语句如下,前面是执行时间,求教怎么把查询速度优化至最大。 array(2) { [0] => string(6) "4.1184" [1] => string(316) "select a.custid from g_customer_tb a join g_customer_tbdata b on a.custid = b.custid where (b.rq > '2016-01-29 00:00:00 ' and b.rq < '2018-01-27 23:59:59') and a.shopid in (5,7,18,29,47,77,78,86,87,88,196,197,198,199) and( a.size1 = 1 or a.size2 = 1 or a.size3 = 1 ) group by b.custid having count(b.id) = 1" }

关于tomcat启动spring注入的时候报找到2个bean

我确定在自己的类中Service只有一个实现..但是bean不唯一的错..我现在也很迷茫..用的开发工具是IDEA 求教各位大神 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'baseInfoController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.ljljob.p2p.core.base.service.ISystemDictionaryItemService com.ljljob.p2p.website.controller.BaseInfoController.systemDictionaryItemService; nested exception is org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type [com.ljljob.p2p.core.base.service.ISystemDictionaryItemService] is defined: expected single matching bean but found 2: systemDictionaryItemServiceImpl,ISystemDictionaryItemService spring配置如下 <!--1:配置注解解析--> <context:annotation-config/> <context:component-scan base-package="com.ljljob.p2p"/> <!--2:加载外部资源--> <context:property-placeholder location="classpath:db.properties,classpath:sms.properties,classpath:email.properties"/> <!--3:配置dataSource--> <bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource"> <property name="driverClassName" value="${jdbc.driverClassName}"/> <property name="url" value="${jdbc.url}"/> <property name="username" value="${jdbc.username}"/> <property name="password" value="${jdbc.password}"/> </bean> <!--4:配置sesssionFactory--> <bean id="sqlsessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean"> <property name="dataSource" ref="dataSource"/> <property name="configLocation" value="classpath:mybatis.cfg.xml"/> <property name="mapperLocations" value="classpath:com/ljljob/p2p/*/*/mapper/*Mapper.xml"/> <property name="typeAliasesPackage" value="com.ljljob.p2p"/> </bean> <!--5:配置事务管理器--> <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> <property name="dataSource" ref="dataSource"/> </bean> <!--6:配置事务处理--> <tx:advice id="txAdvice" transaction-manager="transactionManager"> <tx:attributes> <tx:method name="query*" read-only="true" propagation="SUPPORTS"/> <tx:method name="select*" read-only="true" propagation="SUPPORTS"/> <tx:method name="get*" read-only="true" propagation="SUPPORTS"/> <tx:method name="list*" read-only="true" propagation="SUPPORTS"/> <tx:method name="*" propagation="REQUIRED"/> </tx:attributes> </tx:advice> <!--7:配置AOP--> <aop:config> <aop:pointcut id="txPointCut" expression="execution(* com.ljljob.p2p..service.*.*(..))"/> <aop:advisor advice-ref="txAdvice" pointcut-ref="txPointCut"/> </aop:config> <!--配置mapper扫描器--> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <property name="basePackage" value="com.ljljob.p2p.core"/> </bean> </beans>

Tomcat启动时,卡在了spring创建bean的地方,请问该怎么解决?

项目整合了struts2,spring,hibernate,最近启动项目的时候经常跑 不起来,但有时又可以,可是今晚就老是跑不起来,下面是最后的几行日志,求大神赐教: 十一月 30, 2017 10:35:13 下午 org.apache.catalina.core.ApplicationContext log INFO: Initializing Spring root WebApplicationContext 2017-11-30 22:35:13,935 INFO (org.springframework.web.context.ContextLoader:187) - Root WebApplicationContext: initialization started 2017-11-30 22:35:14,208 INFO (org.springframework.web.context.support.XmlWebApplicationContext:456) - Refreshing Root WebApplicationContext: startup date [Thu Nov 30 22:35:14 CST 2017]; root of context hierarchy 2017-11-30 22:35:14,567 INFO (org.springframework.beans.factory.xml.XmlBeanDefinitionReader:315) - Loading XML bean definitions from ServletContext resource [/WEB-INF/applicationContext.xml] 2017-11-30 22:35:15,601 INFO (org.springframework.beans.factory.support.DefaultListableBeanFactory:555) - Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@5bed0458: defining beans [dataSource,sessionFactory,HibernateConfig,baseDao,loginService,goodService,wsMsgService,LoginAction,WsMsgAction,GoodAction]; root of factory hierarchy 我的spring配置文件如下: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <!-- <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> --> <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> <property name="driverClassName"> <value>com.mysql.jdbc.Driver</value> </property> <property name="url"> <value>jdbc:mysql://localhost:3506/xmesdb</value> </property> <property name="username"> <value>root</value> </property> <property name="password"> <value>123456</value> </property> </bean> <bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"> <property name="dataSource"> <ref local="dataSource"/> </property> <property name="hibernateProperties"> <props> <prop key="hibernate.dialect"> org.hibernate.dialect.MySQLDialect </prop> <prop key="hibernate.show_sql">true</prop> <prop key="hibernate.hbm2ddl.auto">update</prop> <prop key="hibernate.current_session_context_class">thread</prop> </props> </property> <property name="mappingResources"> <list> <value>com/model/User.hbm.xml</value> <value>com/model/WsMsg.hbm.xml</value> <value>com/model/GoodMobilePhone.hbm.xml</value> <value>com/model/GoodBook.hbm.xml</value> <value>com/model/GoodComputer.hbm.xml</value> <value>com/model/GoodMobike.hbm.xml</value> </list> </property> </bean> <bean id="HibernateConfig" class="com.hibernate.HibernateConfig"> <property name="sessionFactory"> <ref local="sessionFactory"/> </property> </bean> <bean id="baseDao" class="com.dao.BaseDaoImpl" scope="prototype"> <property name="sessionFactory"> <ref local="sessionFactory"/> </property> </bean> <bean id="loginService" class="com.service.impl.LoginServiceImpl" scope="prototype"> <property name="baseDao"> <ref local="baseDao"/> </property> </bean> <bean id='goodService' class="com.service.impl.GoodServiceImpl" scope="prototype"> <property name="baseDao"> <ref local="baseDao"/> </property> </bean> <bean id="wsMsgService" class="com.webSocket.Service.impl.WsMsgServiceImpl" scope="prototype"> </bean> <bean id="LoginAction" class="com.action.LoginAction" scope="prototype"> <property name="baseDao" ref="baseDao"></property> <property name="loginService" ref="loginService"></property> <property name="wsMsgService" ref="wsMsgService"></property> </bean> <bean id="WsMsgAction" class="com.action.WsMsgAction" scope="prototype"> <property name="wsMsgService" ref="wsMsgService"></property> </bean> <bean id="GoodAction" class="com.action.GoodAction" scope="prototype"> <property name="goodService" ref="goodService"></property> </bean> </beans> 菜鸟一枚,求教求教

求教大神,哪位大神能救救命啊

![图片说明](https://img-ask.csdn.net/upload/201504/12/1428836719_147666.png) 要求点击chapter类型的章节时显示chapter章节下的session章节,点击session类型的章节时显示lession类型的章节。。。 @Controller @RequestMapping(value = "${adminPath}/edu/eduLearnings") public class EduLearningsController extends BaseController { @Autowired private EduLearningsService eduLearningsService; @Autowired private EduSubjectsService eduSubjectsService; @Autowired private EduGradesService eduGradesService; @ModelAttribute public EduLearnings get(@RequestParam(required=false) String id) { EduLearnings entity = null; if (StringUtils.isNotBlank(id)){ entity = eduLearningsService.get(id); } if (entity == null){ entity = new EduLearnings(); } return entity; } @RequiresPermissions("edu:eduLearnings:view") @RequestMapping(value = {"list", ""}) public String list(EduLearnings eduLearnings, HttpServletRequest request, HttpServletResponse response, Model model) { Page<EduLearnings> page = eduLearningsService.findPage(new Page<EduLearnings>(request, response), eduLearnings); List<EduGrades> eduGrades = eduGradesService.findList(new EduGrades()); List<EduSubjects> eduSubjects = eduSubjectsService.findList(new EduSubjects()); for(EduLearnings learns:page.getList()){ for(EduGrades grade:eduGrades){ if(grade.getGradeid()==learns.getGradeid()){ learns.setGraname(grade.getGradename()); } } for(EduSubjects sub:eduSubjects){ if(sub.getSubjectid()==learns.getSubjectid()){ learns.setSubname(sub.getSubjectname()); } } } model.addAttribute("page", page); model.addAttribute("eduGrades", eduGrades); model.addAttribute("eduSubjects", eduSubjects); return "modules/edu/eduLearningsList"; } @RequiresPermissions("edu:eduLearnings:view") @RequestMapping(value = "form") public String form(EduLearnings eduLearnings, Model model) { model.addAttribute("eduLearnings", eduLearnings); return "modules/edu/eduLearningsForm"; } @RequiresPermissions("edu:eduLearnings:edit") @RequestMapping(value = "save") public String save(EduLearnings eduLearnings, Model model, RedirectAttributes redirectAttributes) { if (!beanValidator(model, eduLearnings)){ return form(eduLearnings, model); } eduLearningsService.save(eduLearnings); addMessage(redirectAttributes, "保存章节成功"); return "redirect:"+Global.getAdminPath()+"/edu/eduLearnings/?repage"; } @RequiresPermissions("edu:eduLearnings:edit") @RequestMapping(value = "delete") public String delete(EduLearnings eduLearnings, RedirectAttributes redirectAttributes) { eduLearningsService.delete(eduLearnings); addMessage(redirectAttributes, "删除章节成功"); return "redirect:"+Global.getAdminPath()+"/edu/eduLearnings/?repage"; } }

安卓整合友盟推送后debug项目报错

![图片说明](https://img-ask.csdn.net/upload/201701/17/1484636712_3325.png) java.lang.ClassNotFoundException: DexPathList[[zip file "/data/app/com.kchl.maimai-1/base.apk"],nativeLibraryDirectories=[/data/app/com.kchl.maimai-1/lib/arm, /data/app/com.kchl.maimai-1/base.apk!/lib/armeabi, /vendor/lib, /system/lib]] java.lang.ClassNotFoundException: Didn't find class "com.taobao.accs.utl.h$a" on path: DexPathList[[zip file "/data/app/com.kchl.maimai-1/base.apk"],nativeLibraryDirectories=[/data/app/com.kchl.maimai-1/lib/arm, /data/app/com.kchl.maimai-1/base.apk!/lib/armeabi, /vendor/lib, /system/lib]] debug可以跑到项目里,但执行一步就会这些错误,把数据线拔掉之后项目才能运行起来,求教(本人二手安卓开发,请见谅)

新手求教!!关于使用struts 下载csv文件的问题 急

我配置好struts后,点击下载的时候页面没有任何的响应,这是为什么啊? struts.xml ``` <action name="xxDownload" class="com.xx.action.xxAction" method="download" > <result name="success" type="stream"> <param name="contentType" >application/csv</param > <param name="inputName" >stream</param> <param name="contentDisposition" > attachment;filename="${fileName}" </param> <param name="bufferSize" >4096</param> </result> ``` xxAction ``` private InputStream stream; String fileName; public String download(){ try { xx= service.search(condition); fileName = "xx_"+Math.random()+".csv"; File file = new File(fileName); OutputStream out = new BufferedOutputStream(new FileOutputStream(file)); String str = ".........shenglve\n"; out.write(str.getBytes()); out.flush(); for (int i = 0; i < x.size(); i++) { str = xx.get(i).getStoreCD() + "," + xx.get(i).getProductCD() + "," + xx.get(i).getStartDate() + "," + xx.get(i).getEndDate() + "," + xx.get(i).getMassExposure() + ",aa\n"; out.write(str.getBytes()); out.flush(); } out.flush(); stream = new FileInputStream(file); } catch (Exception e) { logger.error(e.getMessage(),e); exFlag = "1"; } return "success"; } ``` js ``` var msg ="是否下载?"; if(window.confirm(msg)){ var url = "xxDownload"; var param = { "xx.a":"1" ,"xx.b":"2" ,"xx.c":"3" ,"xx.d":"" }; $.post(url,param); } ```

无法打开mysql_version.h":No such file or directory

win7系统,visual studio2013 ,mysql5.5,在创建项目后已经把 mysql.h,libmysql.lib,libmysql.dll文件包含到项目文件下,可编译时出现如上问题: 代码如下: #include"stdafx.h" #include<winsock2.h> #include"mysql.h"//必须为"",不能为<> #include<iostream> #pragma comment(lib,"libmysql.lib") int main() { MYSQL mysql; mysql_init(&mysql); if (!mysql_real_connect(&mysql, "localhost", "root", "sqlln", "test", 3306, NULL, 0)) { std::cout << "数据库连接失败" << std::endl; } else { std::cout << "连接成功" << std::endl; } return 0; } 编译结果: 1>------ 已启动生成: 项目: 90, 配置: Debug Win32 ------ 1> 90.cpp 1>d:\我的文档\visual studio 2013\projects\prj1\90\90\mysql.h(71): fatal error C1083: 无法打开包括文件: “mysql_version.h”: No such file or directory ========== 生成: 成功 0 个,失败 1 个,最新 0 个,跳过 0 个 ========== 求教大神啊!已经被visual studio如何连接mysql困扰了几天了。

一个很有档次的问题,呵呵(Not in GZIP format)

我在用socket下载页面(http://www.amazon.cn/mn/detailApp?ref=RK&uid=478-9408365-8400056&asin=B0036DD2ZS )时,在解压gzip时出现这个问题: Exception in thread "main" java.io.IOException: Not in GZIP format at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:137) at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:58) at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:68) 我想可能是http header部分和html部分切分的不够好,但是我试了很多切分, 都是这个问题, 现在不知道是什么原因导致这个异常,还有就是 , 我在读socket输入流时 ,总是在一个地方停下来,过来很长(好几分钟)时间才会读完,每次出现这个现象, 那么这个gzip的解压就一定出问题,如果很快的读完socket输入流,那就解压正常,我想求教各位这是为什么??谢谢 了!!!

Mybatis 整合spring使用自动扫描包的方式来注册各种Mapper 出现问题,求教

如果采用 <!-- 注册Mapper方式二:也可不指定特定mapper,而使用自动扫描包的方式来注册各种Mapper ,配置如下:--> <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer"> <property name="basePackage" value="org.hyn.maper" /> </bean> 其中有org.hyn.maper.UserMapper 那么<bean id="userService" class="org.hyn.service.UserServiceImpl"> <property name="userMapper" ref="userMapper" /> </bean> 这个<property name="userMapper" ref="userMapper" />如何能够找到 ,小白求教

大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了

大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、电子书搜索 对于大部分程序员...

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

Java基础知识面试题(2020最新版)

文章目录Java概述何为编程什么是Javajdk1.5之后的三大版本JVM、JRE和JDK的关系什么是跨平台性?原理是什么Java语言有哪些特点什么是字节码?采用字节码的最大好处是什么什么是Java程序的主类?应用程序和小程序的主类有何不同?Java应用程序与小程序之间有那些差别?Java和C++的区别Oracle JDK 和 OpenJDK 的对比基础语法数据类型Java有哪些数据类型switc...

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

String s = new String(" a ") 到底产生几个对象?

老生常谈的一个梗,到2020了还在争论,你们一天天的,哎哎哎,我不是针对你一个,我是说在座的各位都是人才! 上图红色的这3个箭头,对于通过new产生一个字符串(”宜春”)时,会先去常量池中查找是否已经有了”宜春”对象,如果没有则在常量池中创建一个此字符串对象,然后堆中再创建一个常量池中此”宜春”对象的拷贝对象。 也就是说准确答案是产生了一个或两个对象,如果常量池中原来没有 ”宜春” ,就是两个。...

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

Linux面试题(2020最新版)

文章目录Linux 概述什么是LinuxUnix和Linux有什么区别?什么是 Linux 内核?Linux的基本组件是什么?Linux 的体系结构BASH和DOS之间的基本区别是什么?Linux 开机启动过程?Linux系统缺省的运行级别?Linux 使用的进程间通信方式?Linux 有哪些系统日志文件?Linux系统安装多个桌面环境有帮助吗?什么是交换空间?什么是root帐户什么是LILO?什...

Linux命令学习神器!命令看不懂直接给你解释!

大家都知道,Linux 系统有非常多的命令,而且每个命令又有非常多的用法,想要全部记住所有命令的所有用法,恐怕是一件不可能完成的任务。 一般情况下,我们学习一个命令时,要么直接百度去搜索它的用法,要么就直接用 man 命令去查看守冗长的帮助手册。这两个都可以实现我们的目标,但有没有更简便的方式呢? 答案是必须有的!今天给大家推荐一款有趣而实用学习神器 — kmdr,让你解锁 Linux 学习新姿势...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

史上最全的 python 基础知识汇总篇,没有比这再全面的了,建议收藏

网友们有福了,小编终于把基础篇的内容全部涉略了一遍,这是一篇关于基础知识的汇总的文章,请朋友们收下,不用客气,不过文章篇幅肯能会有点长,耐心阅读吧爬虫(七十)多进程multiproces...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

女程序员,为什么比男程序员少???

昨天看到一档综艺节目,讨论了两个话题:(1)中国学生的数学成绩,平均下来看,会比国外好?为什么?(2)男生的数学成绩,平均下来看,会比女生好?为什么?同时,我又联想到了一个技术圈经常讨...

85后蒋凡:28岁实现财务自由、34岁成为阿里万亿电商帝国双掌门,他的人生底层逻辑是什么?...

蒋凡是何许人也? 2017年12月27日,在入职4年时间里,蒋凡开挂般坐上了淘宝总裁位置。 为此,时任阿里CEO张勇在任命书中力赞: 蒋凡加入阿里,始终保持创业者的冲劲,有敏锐的...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

新一代神器STM32CubeMonitor介绍、下载、安装和使用教程

关注、星标公众号,不错过精彩内容作者:黄工公众号:strongerHuang最近ST官网悄悄新上线了一款比较强大的工具:STM32CubeMonitor V1.0.0。经过我研究和使用之...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

大学一路走来,学习互联网全靠这几个网站,最终拿下了一把offer

大佬原来都是这样炼成的

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

为什么你不想学习?只想玩?人是如何一步一步废掉的

不知道是不是只有我这样子,还是你们也有过类似的经历。 上学的时候总有很多光辉历史,学年名列前茅,或者单科目大佬,但是虽然慢慢地长大了,你开始懈怠了,开始废掉了。。。 什么?你说不知道具体的情况是怎么样的? 我来告诉你: 你常常潜意识里或者心理觉得,自己真正的生活或者奋斗还没有开始。总是幻想着自己还拥有大把时间,还有无限的可能,自己还能逆风翻盘,只不是自己还没开始罢了,自己以后肯定会变得特别厉害...

什么时候跳槽,为什么离职,你想好了么?

都是出来打工的,多为自己着想

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

你期望月薪4万,出门右拐,不送,这几个点,你也就是个初级的水平

先来看几个问题通过注解的方式注入依赖对象,介绍一下你知道的几种方式@Autowired和@Resource有何区别说一下@Autowired查找候选者的...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

立即提问
相关内容推荐