"无法找到或加载主类"是什么意思?

A common problem that new Java developers experience is that their programs fail to run with the error message: Could not find or load main class ...

What does this mean, what causes it, and how should you fix it?

转载于:https://stackoverflow.com/questions/18093928/what-does-could-not-find-or-load-main-class-mean

csdnceshi70
笑故挽风 Please note that this is a "self-answer" question that is intended to be a generic reference Q&A for new Java users. I could not find an existing Q&A that covers this adequately (IMO).
6 年多之前 回复

28个回答

The java <class-name> command syntax

First of all, you need to understand the correct way to launch a program using the java (or javaw) command.

The normal syntax1 is this:

    java [ <option> ... ] <class-name> [<argument> ...]

where <option> is a command line option (starting with a "-" character), <class-name> is a fully qualified Java class name, and <argument> is an arbitrary command line argument that gets passed to your application.
1 - There is a second syntax for "executable" JAR files which I will describe at the bottom.

The fully qualified name (FQN) for the class is conventionally written as you would in Java source code; e.g.

    packagename.packagename2.packagename3.ClassName

However some versions of the java command allow you to use slashes instead of periods; e.g.

    packagename/packagename2/packagename3/ClassName

which (confusingly) looks like a file pathname, but isn't one. Note that the term fully qualified name is standard Java terminology ... not something I just made up to confuse you :-)

Here is an example of what a java command should look like:

    java -Xmx100m com.acme.example.ListUsers fred joe bert

The above is going to cause the java command to do the following:

  1. Search for the compiled version of the com.acme.example.ListUsers class.
  2. Load the class.
  3. Check that the class has a main method with signature, return type and modifiers given by public static void main(String[]). (Note, the method argument's name is NOT part of the signature.)
  4. Call that method passing it the command line arguments ("fred", "joe", "bert") as a String[].

Reasons why Java cannot find the class

When you get the message "Could not find or load main class ...", that means that the first step has failed. The java command was not able to find the class. And indeed, the "..." in the message will be the fully qualified class name that java is looking for.

So why might it be unable to find the class?

Reason #1 - you made a mistake with the classname argument

The first likely cause is that you may have provided the wrong class name. (Or ... the right class name, but in the wrong form.) Considering the example above, here a variety of wrong ways to specify the class name:

  • Example #1 - a simple class name:

    java ListUser
    

    When the class is declared in a package such as com.acme.example, then you must use the full classname including the package name in the java command; e.g.

    java com.acme.example.ListUser
    
  • Example #2 - a filename or pathname rather than a class name:

    java ListUser.class
    java com/acme/example/ListUser.class
    
  • Example #3 - a class name with the casing incorrect:

    java com.acme.example.listuser
    
  • Example #4 - a typo

    java com.acme.example.mistuser
    
  • Example #5 - a source filename

    java ListUser.java
    
  • Example #6 - you forgot the class name entirely

    java lots of arguments
    

Reason #2 - the application's classpath is incorrectly specified

The second likely cause is that the class name is correct, but that the java command cannot find the class. To understand this, you need to understand the concept of the "classpath". This is explained well by the Oracle documentation:

So ... if you have specified the class name correctly, the next thing to check is that you have specified the classpath correctly:

  1. Read the three documents linked above. (Yes ... READ them. It is important that a Java programmer understands at least the basics of how the Java classpath mechanisms works.)
  2. Look at command line and / or the CLASSPATH environment variable that is in effect when you run the java command. Check that the directory names and JAR file names are correct.
  3. If there are relative pathnames in the classpath, check that they resolve correctly ... from the current directory that is in effect when you run the java command.
  4. Check that the class (mentioned in the error message) can be located on the effective classpath.
  5. Note that the classpath syntax is different for Windows versus Linux and Mac OS. (The classpath separator is ; on Windows and : on the others.)

Reason #2a - the wrong directory is on the classpath

When you put a directory on the classpath, it notionally corresponds to the root of the qualified name space. Classes are located in the directory structure beneath that root, by mapping the fully qualified name to a pathname. So for example, if "/usr/local/acme/classes" is on the class path, then when the JVM looks for a class called com.acme.example.Foon, it will look for a ".class" file with this pathname:

  /usr/local/acme/classes/com/acme/example/Foon.class

If you had put "/usr/local/acme/classes/com/acme/example" on the classpath, then the JVM wouldn't be able to find the class.

Reason #2b - the subdirectory path doesn't match the FQN

If your classes FQN is com.acme.example.Foon, then the JVM is going to look for "Foon.class" in the directory "com/acme/example":

  • If your directory structure doesn't match the package naming as per the pattern above, the JVM won't find your class.

  • If you attempt rename a class by moving it, that will fail as well ... but the exception stacktrace will be different.

To give a concrete example, supposing that:

  • you want to run com.acme.example.Foon class,
  • the full file path is /usr/local/acme/classes/com/acme/example/Foon.class,
  • your current working directory is /usr/local/acme/classes/com/acme/example/,

then:

# wrong, FQN is needed
java Foon

# wrong, there is no `com/acme/example` folder in the current working directory
java com.acme.example.Foon

# wrong, similar to above
java -classpath . com.acme.example.Foon

# fine; relative classpath set
java -classpath ../../.. com.acme.example.Foon

# fine; absolute classpath set
java -classpath /usr/local/acme/classes com.acme.example.Foon

Notes:

  • The -classpath option can be shortened to -cp in most Java releases. Check the respective manual entries for java, javac and so on.
  • Think carefully when choosing between absolute and relative pathnames in classpaths. Remember that a relative pathname may "break" if the current directory changes.

Reason #2c - dependencies missing from the classpath

The classpath needs to include all of the other (non-system) classes that your application depends on. (The system classes are located automatically, and you rarely need to concern yourself with this.) For the main class to load correctly, the JVM needs to find:

(Note: the JLS and JVM specifications allow some scope for a JVM to load classes "lazily", and this can affect when a classloader exception is thrown.)

Reason #3 - the class has been declared in the wrong package

It occasionally happens that someone puts a source code file into the the wrong folder in their source code tree, or they leave out the package declaration. If you do this in an IDE, the IDE's compiler will tell you about this immediately. Similarly if you use a decent Java build tool, the tool will run javac in a way that will detect the problem. However, if you build your Java code by hand, you can do it in such a way that the compiler doesn't notice the problem, and the resulting ".class" file is not in the place that you expect it to be.

Still can't find the problem?

There lots of things to check, and it is easy to miss something. Try adding the -Xdiag option to the java command line (as the first thing after java). It will output various things about class loading, and this may offer you clues as to what the real problem is.

Also, consider possible problems caused by copying and pasting invisible or non-ASCII characters from websites, documents and so on. And consider "homoglyphs", were two letters or symbols look the same ... but aren't.


The java -jar <jar file> syntax

The alternative syntax used for "executable" JAR files is as follows:

  java [ <option> ... ] -jar <jar-file-name> [<argument> ...]

e.g.

  java -Xmx100m -jar /usr/local/acme-example/listuser.jar fred

In this case the name of the entry-point class (i.e. com.acme.example.ListUser) and the classpath are specified in the MANIFEST of the JAR file.


IDEs

A typical Java IDE has support for running Java applications in the IDE JVM itself or in a child JVM. These are generally immune from this particular exception, because the IDE uses its own mechanisms to construct the runtime classpath, identify the main class and create the java command line.

However it is still possible for this exception to occur, if you do things behind the back of the IDE. For example, if you have previously set up an Application Launcher for your Java app in Eclipse, and you then moved the JAR file containing the "main" class to a different place in the file system without telling Eclipse, Eclipse would unwittingly launch the JVM with an incorrect classpath.

In short, if you get this problem in an IDE, check for things like stale IDE state, broken project references or broken launcher configurations.

It is also possible for an IDE to simply get confused. IDE's are hugely complicated pieces of software comprising many interacting parts. Many of these parts adopt various caching strategies in order to make the IDE as a whole responsive. These can sometimes go wrong, and one possible symptom is problems when launching applications. If you suspect this could be happening, it is worth restarting your IDE.


Other References

csdnceshi64
游.程 If the classpath contains the separator (: or ;) that has to be escaped, the classloader doesn't complain if it isn't. I just stumbled over this, maybe someone wants to amend it to #2
一年多之前 回复
weixin_41568196
撒拉嘿哟木头 My problem was that I was trying to launch the Main Class that I wrongly put on the "src/test/java" folder and thats not packaged by maven to the jar file. lol
一年多之前 回复
csdnceshi69
YaoRaoLov I've encountered it a third time. I've run the program from a Windows 10 batch file, and put the .jar name in a variable (called with "-cp %jarname%;lib*"). I've mistakenly put an extra space at the end of the jarname, and it caused the error. Hat trick :)
接近 2 年之前 回复
csdnceshi69
YaoRaoLov I had this problem twice in Eclipse. First time the signature of main() was wrong. Second time I have renamed a .jar, and even though I added the new one to the build path, Eclipse didn't find the old one, so the project didn't compile, with this error. I had to remove the .jar file from Project > Properties > Java Build Path > Libraries.
大约 2 年之前 回复
csdnceshi73
喵-见缝插针 hello, i am using android studio 3.0.1 for developing my app. while developing app i had receive the same error. could not load main class. can anyone please help me to solve this problem?
2 年多之前 回复
csdnceshi68
local-host Additional notes, point 2 save me! It is sad to see that java does not say it does not find an imported class, but instead the main class you're trying to run. This is misleading, although I'm sure there's a reason for that. I had the case where java knew exactly where my class is, however it couldn't find one of the imported classes. Instead of saying that, it complained about not finding my main class. Really, annoing.
3 年多之前 回复
csdnceshi57
perhaps? After years of java programming I still managed to end up on this page. For me the issue was that the classpath syntax is OS-dependent. I'm kind of new to programming on Windows and had no idea.
大约 5 年之前 回复
weixin_41568184
叼花硬汉 I had this problem when I was trying to run a Class with a 3rd party library. I invoked java like this: java -cp ../third-party-library.jar com.my.package.MyClass; this does not work, instead it is necessary to add the local folder to the class path as well (separated by :, like this: java -cp ../third-party-library.jar:. com.my.package.MyClass, then it should work
大约 6 年之前 回复

If your classes are in packages then you have to cd to the main directory and run using the full name of the class (packageName.MainClassName).

Example:

My classes are in here:

D:\project\com\cse\

The full name of my main class is:

com.cse.Main

So I cd back to the main directory:

D:\project

Then issue the java command:

java com.cse.Main
csdnceshi56
lrony* This answer makes a whole load of assumptions. And there are other ways to achieve this. Instead of blindly following the above advice, I would recommend that people take the time to read the links in my Answer that explain how the Java classpath works. It is better to UNDERSTAND what you are doing ...
大约 5 年之前 回复

If your source code name is HelloWorld.java, your compiled code will be HelloWorld.class.

You will get that error if you call it using:

java HelloWorld.class

Instead, use this:

java HelloWorld
csdnceshi52
妄徒之命 - That is only an option if you have an executable JAR file ...
2 年多之前 回复
csdnceshi52
妄徒之命 - Yes ... that works ... sometimes. To understand when it works, and when it doesn't work, read the top-voted answer.
2 年多之前 回复
csdnceshi52
妄徒之命 - did you read my comment? If this doesn't work, then one or more of the preconditions is not satisfied. Look at the top-voted answer.
2 年多之前 回复
csdnceshi51
旧行李 I needed to to do java -classpath . HelloWorld
大约 3 年之前 回复
weixin_41568174
from.. java -jar HelloWorld.jar is also an option
3 年多之前 回复
csdnceshi54
hurriedly% This did not work for me. It still says, "Could not find or load main class HelloWorld"
3 年多之前 回复
weixin_41568110
七度&光 like Stephen said, this only works with "default package" - which means no package declaration at the top of the file. For a quick test of some code, I did: javac TestCode.java followed by java TestCode
4 年多之前 回复
csdnceshi52
妄徒之命 The problem is that this solution only works for Java classes declared in the default package with no JAR file dependencies. (And even then, not all of the time.) Most Java programs are not that simple.
4 年多之前 回复

When the same code works on one PC, but it shows the error in another, the best solution I have ever found is compiling like the following:

javac HelloWorld.java
java -cp . HelloWorld
csdnceshi74
7*4 If you have 'package com.some.address' as a first line - this will not work. You will need to comment out 'package address'..
大约 2 年之前 回复
csdnceshi72
谁还没个明天 This solved the immediate problem so I say it is good.
大约 2 年之前 回复
csdnceshi67
bug^君 Well certainly javac -classpath . HelloWorld.java would have worked! And that is a better solution in your case.
4 年多之前 回复
csdnceshi67
bug^君 This is not a good recommendation. You are depending on the CLASSPATH environment variable being unset, or having a value that is consistent with ".". Yes, it works in many cases, but it won't in others.
4 年多之前 回复

I had such an error in this case:

java -cp lib.jar com.mypackage.Main

It works with ; for Windows and : for Unix:

java -cp lib.jar; com.mypackage.Main
csdnceshi54
hurriedly% Yes. That's most likely because your Main is not in the JAR file. -cp lib.jar; means the same thing as -cp lib.jar;. i.e. the current directory is included on the classpath.
3 年多之前 回复

In this instance you have:

Could not find or load main class ?classpath

It's because you are using "-classpath", but the dash is not the same dash used by java on the command prompt. I had this issue copying and pasting from Notepad to cmd.

csdnceshi53
Lotus@ Wow! That is a totally bizarre cause! (But it serves you right for using Notepad instead of a real text editor :-) )
接近 5 年之前 回复

This might help you if your case is specifically like mine: as a beginner I also ran into this problem when I tried to run a Java program.

I compiled it like this:

javac HelloWorld.java

And I tried to run also with the same extension:

java Helloworld.java

When I removed the .java and rewrote the command like java HelloWorld, the program ran perfectly. :)

csdnceshi74
7*4 This helped me and worked :)
接近 2 年之前 回复
csdnceshi54
hurriedly% For the record, this is the same as Reason #1, Example #5 in my Answer ...
2 年多之前 回复
csdnceshi73
喵-见缝插针 This is because you are executing the compiled version of your .java. It is actually executing the .class file
2 年多之前 回复

What helped me was specifying the classpath on the command line, for example:

  1. Create a new folder, C:\temp

  2. Create file Temp.java in C:\temp, with the following class in it:

    public class Temp {
        public static void main(String args[]) {
            System.out.println(args[0]);
        }
    }
    
  3. Open a command line in folder C:\temp, and write the following command to compile the Temp class:

    javac Temp.java
    
  4. Run the compiled Java class, adding the -classpath option to let JRE know where to find the class:

    java -classpath C:\temp Temp Hello!
    
weixin_41568126
乱世@小熊 - read the accepted answer
大约 2 年之前 回复
csdnceshi76
斗士狗 I still got Error: Could not find or load main class Temp could anybody help!
接近 3 年之前 回复
csdnceshi56
lrony* I'm using Debian 8 and this worked. Not sure why.
3 年多之前 回复
weixin_41568126
乱世@小熊 - The most likely reasons were: 1) java wasn't looking at $CLASSPATH (because you used -classpath or -jar) or 2) the classpath setting was not set in the environment that was not in effect in the context that java was run; e.g. because you didn't "source" the file where added the setenv commands in the right shell.
大约 4 年之前 回复
csdnceshi72
谁还没个明天 Thanks a lot for this......even though not sure why java was not being able to find out the classpath even after setting it in environment variables.
4 年多之前 回复
weixin_41568126
乱世@小熊 - The reason that "." is not in $PATH by default is that it is a security trap. seas.upenn.edu/cets/answers/dot-path.html
接近 5 年之前 回复
csdnceshi70
笑故挽风 In Ubuntu, I also had to specify the path. Don't understand why it can't use the Current Working Directory by default. I'm convinced that Java is sponsored by Keyboard manufacturers!!
5 年多之前 回复

According to the error message ("Could not find or load main class"), there are two categories of problems:

  1. Main class could not be found
  2. Main class could not be loaded (this case is not fully discussed in the accepted answer)

Main class could not be found when there is typo or wrong syntax in the fully qualified class name or it does not exist in the provided classpath.

Main class could not be loaded when the class cannot be initiated, typically the main class extends another class and that class does not exist in the provided classpath.

For example:

public class YourMain extends org.apache.camel.spring.Main

If camel-spring is not included, this error will be reported.

csdnceshi78
程序go In this situation is there any way to tell exactly which dependency class is failing to load?
大约 2 年之前 回复
weixin_41568134
MAO-EYE This information is crucial and deserves an explicit mention (this is the only answer that mentions extends). I've just learned the hard way that when main class fails to load because it extends another that could not be found, java does not report which actual class was not found (unlike NoClassDefFoundError). So yes it does happen, and it's a hair-pulling situation when you don't know this.
接近 3 年之前 回复
csdnceshi69
YaoRaoLov I would have revised it to something like "You need to included all of the classes that is required to initiate the main class to avoid this particular error". I am not trying to convince you. It is just a way that I would like to see. I left the answer here just for people who might like reading things in this way. Let's not extend this discussion further :) I changed my statement to "not fully discussed in the accepted answer" and hope you feel better.
4 年多之前 回复
csdnceshi61
derek5. But the fact remains that the classpath DOES need to include all of the other classes. The statement is true, and you have not convinced me that there is any value in revising it. (Indeed, if you think about it, if I revised it to say something like "You don't need >>all<< of the classes on the classpath to avoid this particular error but you will get different errors in some cases so you had better put them on anyway." ... then the typical reader of this answer is likely to get even more confused than he/she already is.)
4 年多之前 回复
csdnceshi69
YaoRaoLov I meant in some (most) cases you don't see THIS error when dependencies are not provided in classpath. Maybe you want to revise "The classpath needs to include all of the other classes". Completely up to you. Not offending.
4 年多之前 回复
csdnceshi61
derek5. There are definitely scenarios where a missing class will result in a different exception. However, I believe that you will get that exception if any missing class causes the main class to fail to load. Not just a missing superclass. It could be any type that is mentioned by the class that you are loading ... or any of its super classes / interfaces.
4 年多之前 回复
csdnceshi69
YaoRaoLov Your answer is good. I read it and am going to read the references. Thanks! It covers the first point pretty well. When it comes to the second point, I think it is not quite right (very happy if I am wrong instead). In your answer you said "The classpath needs to include all of the other (non-system) classes". Actually to avoid the error it is not necessary. There will be other errors and exceptions (NullPionter for example) but you will not see "Coud not find or load main class" as long as main class is found and loaded.
4 年多之前 回复
csdnceshi61
derek5. Yes. I realize that. But have you read my answer? Doesn't it cover all of the cases that you mentioned? Really my point is that your answer is adding nothing new ... and since it is leaving out all of the many other causes, it is actually going to be a hinderance to a lot of readers.
4 年多之前 回复
csdnceshi69
YaoRaoLov There are TWO because the error says "Could not FIND or LOAD main class". If there are other categories, please advise me. I've seen it, so just want to share it here maybe someone else will need it.
4 年多之前 回复
csdnceshi61
derek5. "Basically" there are lots of other categories too. And the missing superclass problem is a very unusual subcase. (So unusual that I've never seen it ... in questions asked on this site.)
4 年多之前 回复

I spent a decent amount of time trying to solve this problem. I thought that I was somehow setting my classpath incorrectly but the problem was that I typed:

java -cp C:/java/MyClasses C:/java/MyClasses/utilities/myapp/Cool  

instead of:

java -cp C:/java/MyClasses utilities/myapp/Cool   

I thought the meaning of fully qualified meant to include the full path name instead of the full package name.

csdnceshi50
三生石@ Neither of these is correct. The class must be given as utilities.myapp.Cool or whatever its package name is, if any.
大约 2 年之前 回复
csdnceshi74
7*4 I've updated my answer to try to address that confusion.
4 年多之前 回复
共28条数据 1 3 尾页
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Thinkphp 部署后出现错误"无法加载缓存类型:File"
Thinkphp 部署后出现错误"无法加载缓存类型:File" 部署环境:ubuntu + nginx +php 7.0 ![图片说明](https://img-ask.csdn.net/upload/202003/23/1584938902_13492.png) 以为是目录权限问题与空间不足问题,但都排除了。
js加载出来的checkbox,用$("input:checkbox")无法找到
js加载出来的checkbox,用$("input:checkbox")无法找到,就解决办法
错误: 找不到或无法加载主类 Java()
public class Java{ public static void main(String[] args){ System.out.println("这是我的第一个JAVA程序"); }//错误: 找不到或无法加载主类 Java //环境配置正确,在Notepadyunxing
如何用 "babel-preset-react-hmre": "^1.1.1",实现代码热加载
我在配置读react全栈这本书时,按照书上面的进行配置,但是出现不了描述的效果 我的package.json代码为: { "name": "react_webpack", "version": "1.0.0", "description": "", "main": "index.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1", "build": "webpack", "dev": "webpack-dev-server --hot", "start": "webpack-dev-server --hot --inline" }, "author": "jkwu", "license": "ISC", "devDependencies": { "babel-core": "^6.23.1", "babel-loader": "^6.3.0", "babel-plugin-react-transform": "^2.0.2", "babel-preset-es2015": "^6.22.0", "babel-preset-react": "^6.23.0", "babel-preset-react-hmre": "^1.1.1", "css-loader": "^0.26.1", "eslint": "^3.15.0", "eslint-config-airbnb": "^14.1.0", "eslint-loader": "^1.6.1", "eslint-plugin-import": "^2.2.0", "eslint-plugin-jsx-a11y": "^4.0.0", "eslint-plugin-react": "^6.9.0", "file-loader": "^0.10.0", "html-webpack-plugin": "^2.28.0", "react-transform-catch-errors": "^1.0.2", "react-transform-hmr": "^1.0.4", "redbox-react": "^1.3.3", "style-loader": "^0.13.1", "url-loader": "^0.5.7", "webpack": "^2.1.0-beta.21", "webpack-dev-server": "^2.1.0-beta.1" }, "dependencies": { "babel-polyfill": "^6.6.1", "react": "^15.4.2", "react-dom": "^15.4.2" } } webpack.config代码为: var path=require('path'); var webpack=require('webpack'); var HtmlWebpackPlugin=require('html-webpack-plugin'); //一些常用路径 var ROOT_PATH=path.resolve(__dirname); var APP_PATH=path.resolve(ROOT_PATH,'app'); var BUILD_PATH=path.resolve(ROOT_PATH,'build'); // console.log("ROOT_PATH====="+ROOT_PATH); // console.log("APP_PATH====="+APP_PATH); // console.log("BUILD_PATH====="+BUILD_PATH); module.exports={ entry:{ //注意这里教材中使用的是index.jsx app:path.resolve(APP_PATH,'app.jsx') }, output:{ path:BUILD_PATH, filename:'bundle.js' }, //开启 dev source map devtool:'eval-source-map', //开启 webpack dev server devServer:{ historyApiFallback: true, hot: true, inline: true, progress: true, port:9999 //端口你可以自定义 //contentBase是访问路径,设置这个的话没图片会访问不到,如果html文件和css img等文件打包后都在这个路径下是没有问题,否则会找不到文件的 }, module: { // 配置preLoaders,将eslint添加进入 preLoaders: [ { test:/\.jsx?$/, loaders:['eslint'], include:APP_PATH } ], // rules: [ // { // test:/\.jsx?$/, // include:APP_PATH, // enforce: 'pre', // use: [{loader: 'eslint-loader', options: {rules: {semi: 0}}}], // }, // // other rules // ], // 配置loaders,将babel添加进去 loaders:[ { test:/\.jsx?$/, loaders:['babel-loader'], include:APP_PATH }, { test:/.(png)|(jpg)$/, loaders:['url'], include:APP_PATH }, { test:/.css$/, loaders:['style','css'], include:APP_PATH } ] }, //配置plugin plugins:[ new HtmlWebpackPlugin({ title:'My first react app' }) ], resolve:{ extensions:['','.js','.jsx'] } } .babelrc文件为: { "presets": ["es2015","react"], "env": { "development":{ "presets":["react-hmre"] } } } nodejs版本为 jkwu@jkwu:~/Projects/React_Webpack$ nodejs -v v4.2.6 jkwu@jkwu:~/Projects/React_Webpack$ node -v v6.9.4 jkwu@jkwu:~/Projects/React_Webpack$
JavaFX代码运行之后报错找不到或无法加载主类?
出现报错 错误: 找不到或无法加载主类 com.Test.MyJavaFX 原因: java.lang.NoClassDefFoundError: javafx/application/Application 附上代码 package com.Test; import javafx.application.Application; import javafx.scene.Scene; import javafx.scene.control.Button; import javafx.stage.Stage; public class MyJavaFX extends Application{ @Override public void start(Stage primaryStage) { Button btOK = new Button("OK"); Scene scene = new Scene(btOK, 200, 250); primaryStage.setTitle("MyJavaFX"); primaryStage.setScene(scene); primaryStage.show(); } public static void main(String[] args) { Application.launch(args); } }
错误: 找不到或无法加载主类 org.testng.TestNG
问题:在命令行运行“java org.testng.TestNG testng.xml”总是报错“错误: 找不到或无法加载主类 org.testng.TestNG”,网上帖子翻了好多但是都不能解决问题 配置了classpath之后“java -classpath "%classpath%:C:\Users\morris\.m2\repository\org\testng\testng\6.10\testng-6.10.jar" org.testng. TestNG testng.xml”还是同样的报错
VM 已启动: 错误: 找不到或无法加载主类
手动启动tomcat时报"VM 已启动: 错误: 找不到或无法加载主类 org.apache.catalina.startup.Bootstrap",请教一下各位大神如何解决? ![图片说明](https://img-ask.csdn.net/upload/201707/29/1501329285_719431.png)
JAVA多功能计算器,不能实现"√","1/x","log","sin"功能,下面附代码!请注释!
package exp099s; import java.awt.*; import javax.swing.*; import java.awt.event.*; public class J11W099 extends JFrame { /** * */ private static final long serialVersionUID = 1L; private String front = "", behind = ""; //分别用于记录加减乘除运算符之前,之后输入的内容 private String op; //用于记录运算符 private String re;//用于存储运算结果的字符串格式 private boolean flag = false; //用于记录是否按下了运算符 private boolean flag1 = false;//用于判断是否输入了点运算符 private double result;//用于存储运算结果 private boolean flag2 = false;//用于判断是否输入了数字 private boolean flag3 = false;//用于判断是否按下了等号运算符 JPanel contentPane; JTextField txtResult = new JTextField("0"); JButton btnSqrt = new JButton("√"); JButton btnFour = new JButton("4"); JButton btnFive = new JButton("5"); JButton btnSix = new JButton("6"); JButton btnDecrease = new JButton("-"); JButton btnBegin = new JButton("C"); JButton btnOne = new JButton("1"); JButton btnTwo = new JButton("2"); JButton btnThree = new JButton("3"); JButton btnMultiply = new JButton("*"); JButton btnCancel = new JButton("←"); JButton btnZero = new JButton("0"); JButton btnMinus = new JButton("+/-"); JButton btnPoint = new JButton("."); JButton btnDivide = new JButton("/"); JButton btnEqual = new JButton("="); JButton btnIncrease = new JButton("+"); JButton btnSeven = new JButton("7"); JButton btnEight = new JButton("8"); JButton btnNine = new JButton("9"); JButton btnDown = new JButton("1/x"); JButton btnSin = new JButton("sin"); JButton btnLog = new JButton("log"); public J11W099() { try { setDefaultCloseOperation(EXIT_ON_CLOSE); jbInit(); } catch (Exception exception) { exception.printStackTrace(); } } private void jbInit() throws Exception { contentPane = (JPanel) getContentPane(); contentPane.setLayout(null); this.setResizable(false); setSize(new Dimension(400, 300)); setTitle("计算器"); txtResult.setEnabled(false); txtResult.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); txtResult.setEditable(false); txtResult.setHorizontalAlignment(SwingConstants.RIGHT); txtResult.setBounds(new Rectangle(33, 19, 378, 34)); //btnNull.addActionListener(new FrameCalculate_btnNull_actionAdapter(this)); //第一行 btnSeven.setBounds(new Rectangle(33, 70, 46, 37)); btnSeven.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnEight.setBounds(new Rectangle(101, 70, 46, 37)); btnEight.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnNine.setBounds(new Rectangle(167, 70, 46, 37)); btnNine.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnIncrease.setBounds(new Rectangle(234, 70, 46, 37)); btnIncrease.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnSqrt.setBounds(new Rectangle(298, 70, 46, 37)); btnSqrt.setFont(new java.awt.Font("Dialog", Font.PLAIN, 12)); btnBegin.setBounds(new Rectangle(366, 70, 46, 37)); btnBegin.setFont(new java.awt.Font("Dialog", Font.PLAIN, 15)); //第二行 btnFour.setBounds(new Rectangle(33, 120, 46, 37)); btnFour.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnFive.setBounds(new Rectangle(101, 120, 46, 37)); btnFive.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnSix.setBounds(new Rectangle(167, 119, 46, 37)); btnSix.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnDecrease.setBounds(new Rectangle(234, 120, 46, 37)); btnDecrease.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnDown.setBounds(new Rectangle(298, 121, 46, 37)); btnDown.setFont(new java.awt.Font("Dialog", Font.PLAIN, 8)); btnCancel.setBounds(new Rectangle(366, 121, 46, 37)); btnCancel.setFont(new java.awt.Font("Dialog", Font.PLAIN, 12)); //第三行 btnOne.setBounds(new Rectangle(33, 172, 46, 37)); btnOne.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnTwo.setBounds(new Rectangle(101, 172, 46, 37)); btnTwo.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnThree.setBounds(new Rectangle(167, 172, 46, 37)); btnThree.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnMultiply.setBounds(new Rectangle(234, 172, 46, 37)); btnMultiply.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnSin.setBounds(new Rectangle(298, 172, 46, 37)); btnSin.setFont(new java.awt.Font("Dialog", Font.PLAIN, 9)); btnLog.setBounds(new Rectangle(366, 172, 46, 37)); btnLog.setFont(new java.awt.Font("Dialog", Font.PLAIN, 9)); //第四行 btnZero.setBounds(new Rectangle(33, 222, 46, 37)); btnZero.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnMinus.setBounds(new Rectangle(101, 222, 46, 37)); btnMinus.setFont(new java.awt.Font("Dialog", Font.PLAIN, 10)); btnPoint.setBounds(new Rectangle(167, 222, 46, 37)); btnPoint.setFont(new java.awt.Font("Dialog", Font.PLAIN, 30)); btnPoint.setHorizontalTextPosition(SwingConstants.CENTER); btnDivide.setBounds(new Rectangle(234, 222, 46, 37)); btnDivide.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); btnEqual.setBounds(new Rectangle(298, 222, 114, 37)); btnEqual.setFont(new java.awt.Font("Dialog", Font.PLAIN, 20)); //加载C和←的监听事件 btnBegin.addActionListener(new Calculate_btnBegin_actionAdapter(this)); btnCancel.addActionListener(new Calculate_btnCancel_actionAdapter(this)); //加载√ 1/x log sin 的监听事件 btnSqrt.addActionListener(new Calculate_btnSqrt_actionAdapter(this)); btnDown.addActionListener(new Calculate_btnDown_actionAdapter(this)); btnLog.addActionListener(new Calculate_btnLog_actionAdapter(this)); btnSin.addActionListener(new Calculate_btnSin_actionAdapter(this)); //加载数字0-9的监听事件 btnZero.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnOne.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnTwo.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnThree.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnFour.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnFive.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnSix.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnSeven.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnEight.addActionListener(new Calculate_btnZero_actionAdapter(this)); btnNine.addActionListener(new Calculate_btnZero_actionAdapter(this)); //加载+/- . = 的监听事件 btnMinus.addActionListener(new Calculate_btnMinus_actionAdapter(this)); btnPoint.addActionListener(new Calculate_btnPoint_actionAdapter(this)); btnEqual.addActionListener(new Calculate_btnEqual_actionAdapter(this)); //加载加减乘除运算符的监听事件 btnIncrease.addActionListener(new Calculate_btnIncrease_actionAdapter(this)); btnDecrease.addActionListener(new Calculate_btnIncrease_actionAdapter(this)); btnMultiply.addActionListener(new Calculate_btnIncrease_actionAdapter(this)); btnDivide.addActionListener(new Calculate_btnIncrease_actionAdapter(this)); contentPane.add(btnFive); contentPane.add(btnSix); contentPane.add(btnDecrease); contentPane.add(btnBegin); contentPane.add(btnOne); contentPane.add(btnTwo); contentPane.add(btnThree); contentPane.add(btnMultiply); contentPane.add(btnCancel); contentPane.add(btnMinus); contentPane.add(btnPoint); contentPane.add(btnDivide); contentPane.add(btnEqual); contentPane.add(btnEight); contentPane.add(btnNine); contentPane.add(btnFour); contentPane.add(btnSeven); contentPane.add(btnIncrease); contentPane.add(btnSqrt); contentPane.add(txtResult); contentPane.add(btnZero); contentPane.add(btnDown); contentPane.add(btnSin); contentPane.add(btnLog); } public void btnZero_actionPerformed(ActionEvent e) { if (flag) { //如果刚刚按下了运算符 txtResult.setText(""); if (flag1) {//判断之前是否输入了点运算符 txtResult.setText("0." + e.getActionCommand()); flag1 = false; } else { txtResult.setText(e.getActionCommand()); } flag2 = true; } else { int num = txtResult.getText().indexOf("."); if (num < 0 && !txtResult.getText().equals("0")) { txtResult.setText(txtResult.getText() + e.getActionCommand()); } else if (num < 0 && txtResult.getText().equals("0")) { txtResult.setText(e.getActionCommand()); } else if (num >= 0 && txtResult.getText().equals("0")) { txtResult.setText("0." + e.getActionCommand()); } else if (num >= 0 && !txtResult.getText().equals("0")) { txtResult.setText(txtResult.getText() + e.getActionCommand()); } } flag = false; flag3=false; } public void btnIncrease_actionPerformed(ActionEvent e) { if(flag3){ txtResult.setText(txtResult.getText()); op = e.getActionCommand(); //得到刚刚按下的运算符 front = txtResult.getText(); //记录加减乘除运算符之前输入的内容 } else if (flag2) { ActionEvent ee = new ActionEvent("qq", 1, "pp"); btnEqual_actionPerformed(ee); op = e.getActionCommand(); //得到刚刚按下的运算符 front = re; flag2 = false; } else { front = txtResult.getText(); //记录加减乘除运算符之前输入的内容 op = e.getActionCommand(); //得到刚刚按下的运算符 } flag3=false; flag = true; //记录已经按下了加减乘除运算符的其中一个 } public void btnEqual_actionPerformed(ActionEvent e) { if(!flag3)//未曾按下等于运算符 behind = txtResult.getText(); else front = re; try { double a1 = Double.parseDouble(front); double b1 = Double.parseDouble(behind); if (op == "+") { result = a1 + b1; } else if (op == "-") { result = a1 - b1; } else if (op == "*") { result = a1 * b1; } else { result = a1 / b1; } re = Double.toString(result); txtResult.setText(re); } catch (ArithmeticException ce) { txtResult.setText("除数不能为零"); } catch (Exception ee) { } if (!flag3) flag3 = true; } public void btnPoint_actionPerformed(ActionEvent e) { int num=txtResult.getText().indexOf("."); if(num<0 && !flag) txtResult.setText(txtResult.getText()+e.getActionCommand()); if(flag) flag1=true; } public void btnBegin_actionPerformed(ActionEvent e) {//清零运算符事件处理 flag=false; flag1=false; flag2=false; flag3=false; front=""; behind=""; re=""; txtResult.setText("0"); } public void btnMinus_actionPerformed(ActionEvent e) {//取反运算符事件处理 if(txtResult.getText().equals("0")){//如果文本框内容为0 txtResult.setText(txtResult.getText()); }else if(txtResult.getText().indexOf("-")>=0){//若文本框中含有负号 String a=txtResult.getText().replaceAll("-",""); txtResult.setText(a); }else if(flag){ txtResult.setText("0"); }else{ txtResult.setText("-"+txtResult.getText()); } } public void btnCancel_actionPerformed(ActionEvent e) {//退格事件处理方法 String str=txtResult.getText(); if(str.length() == 1){//如文本框中只剩下最后一个字符,将文本框内容置为0 txtResult.setText("0"); } if(str.length()>1){ str=str.substring(0,str.length()-1); txtResult.setText(str); } } public static void main(String[] args){ J11W099 fc = new J11W099(); fc.setSize(468,310); fc.setLocation(200,150); fc.setVisible(true); } } //监听事件的类 class Calculate_btnCancel_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnCancel_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnCancel_actionPerformed(e); } } class Calculate_btnMinus_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnMinus_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnMinus_actionPerformed(e); } } class Calculate_btnBegin_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnBegin_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnBegin_actionPerformed(e); } } class Calculate_btnPoint_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnPoint_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnPoint_actionPerformed(e); } } class Calculate_btnEqual_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnEqual_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnEqual_actionPerformed(e); } } class Calculate_btnIncrease_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnIncrease_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnIncrease_actionPerformed(e); } } class Calculate_btnZero_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnZero_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnZero_actionPerformed(e); } } class Calculate_btnSqrt_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnSqrt_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnZero_actionPerformed(e); } } class Calculate_btnDown_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnDown_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnZero_actionPerformed(e); } } class Calculate_btnLog_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnLog_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnZero_actionPerformed(e); } } class Calculate_btnSin_actionAdapter implements ActionListener { private J11W099 adaptee; Calculate_btnSin_actionAdapter(J11W099 adaptee) { this.adaptee = adaptee; } public void actionPerformed(ActionEvent e) { adaptee.btnZero_actionPerformed(e); } }
xml出现Exception in thread "main" java.lang.NullPointerException怎么解决
## 运行代码出现Exception in thread "main" java.lang.NullPointerException ![图片说明](https://img-ask.csdn.net/upload/202003/05/1583381600_143599.png)![图片说明](https://img-ask.csdn.net/upload/202003/05/1583381609_587656.png) JsoupDemo1.java代码如下: ``` package study.java.xml.jsoup; /* * Jsoup快速入门 * */ import org.jsoup.Jsoup; import org.jsoup.nodes.Document; import org.jsoup.nodes.Element; import org.jsoup.select.Elements; import java.io.File; import java.io.IOException; public class JsoupDemo1 { public static void main(String[] args) throws IOException { //2.1获取student.xml的path String path = JsoupDemo1.class.getClassLoader().getResource("src\\student.xml").getPath(); //上面的student.xml是已经写好的xml文件 //2.2解析xml文档,加载文档进内存,获取dom树--->Document Document document = Jsoup.parse(new File(path), "UTF-8"); //3.获取xml文档里面的元素标签对象 Element-----name Elements elements = document.getElementsByTag("name"); System.out.println(elements.size()); //3.1获取第一个name的Element对象 Element element = elements.get(0); //3.2获取数据 String name = element.text(); System.out.println(name); } } ``` student.xml代码如下: ``` <?xml version="1.0" encoding="UTF-8" ?> <students> <student number="heima_0001"> <name>zhangsan</name> <age>11</age> <sex>male</sex> </student> <student number="heima_0002"> <name>lisi</name> <age>44</age> <sex>female</sex> </student> </students> ```
<link href="a"/>js把href属性值清空,浏览器重新加载其他css文件
``` <link href="style.css"/>通过js把href属性值="",浏览器会重新加载其他css文件吗 页面:/AAA/BBB/Fire/FireEntry.aspx包含这两行代码: <\/link id="cssWait" href="Style.css" rel="stylesheet" type="text/css" //> <\/link id="Menu" href="Menu.css" rel="stylesheet" type="text/css" //> <br/> 网页目录:/AAA/BBB/Fire/FireEntry.aspx 样式的目录:/AAA/CSS/Menu.css Menu.css包含:background: url(../Images/Menu/sys_offover.jpg); <br/> 问题描述: 通过js把id='cssWait'的href属性值="",IE浏览器通过Fiddler调试发现Menu.css里样 背景图片background: url(../Images/Menu/sys_offover.jpg);的路径被修改为 错误的路径: /AAA/BBB/Images/Menu/sys_offover.jpg 正确的路径:/AAA/Images/Menu/sys_offover.jpg ```
java文件问题]错误:找不到或无法加载主类 Hello.java
编写简单的Hello.java程序,在cmd命令行下用javac Hello.java命令编译没有问题,可以生成Hello.class文件。但输入java Hello命令后(文件目录和命令目录一致),提示错误:“找不到或无法加载主类 Hello.java”。 安装配置如下 JAVA_HOME D:\Java\jdk1.8.0_45 path .;%JAVA_HOME%\bin; classpath .;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar; 程序如下 名称 Hello.class public class Hello { public static void main(String args[]) { System.out.println("你好,很高兴学习Java"); } }
.net运行程序后 报错"无法加载 DLL“iclit09b.dll”: 找不到指定的模块
用户代码未处理 System.TypeInitializationException Message="“IBM.Data.Informix.IfxConnection”的类型初始值设定项引发异常。" Source="IBM.Data.Informix" TypeName="IBM.Data.Informix.IfxConnection" StackTrace: 在 IBM.Data.Informix.IfxConnection..ctor(String connectionString) 在 dal.DaoBase.get_Connection() 位置 D:\myweb\jyfx\dal\DaoBase.cs:行号 29 在 dal.AbstractQuery.Execute(String cmdText, Boolean isStore, IfxParameter[] paramz) 位置 D:\myweb\jyfx\dal\AbstractQuery.cs:行号 27 在 dal.AbstractQuery.ExecuteQuery(String cmdText, IfxParameter[] paramz) 位置 D:\myweb\jyfx\dal\AbstractQuery.cs:行号 19 在 dal.UserDao.getone(String ucode, String pass, String lip) 位置 D:\myweb\jyfx\dal\UserDao.cs:行号 31 在 admin_checkLogin.Page_Load(Object sender, EventArgs e) 位置 d:\myweb\jyfx\jyfx\Component\checkLogin.aspx.cs:行号 61 在 System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) 在 System.Web.UI.Control.OnLoad(EventArgs e) 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) InnerException: System.DllNotFoundException Message="无法加载 DLL“iclit09b.dll”: 找不到指定的模块。 (异常来自 HRESULT:0x8007007E)。" Source="IBM.Data.Informix" TypeName="" StackTrace: 在 IBM.Data.Common.UnsafeNativeMethods.Ifx32.SQLAllocHandle(Int16 HandleType, IntPtr InputHandle, IntPtr& OutputHandle) 在 IBM.Data.Informix.IfxConnPoolManager..ctor() 在 IBM.Data.Informix.IfxConnection..cctor() InnerException: iclit09b.dll也辅助到system32中了,项目bin目录也有,但仍然报这个错误。请大神帮忙解答一下。。。
js判断pc端还是移动端window.location.href=""重复刷新,请大神帮忙看一下代码。
html中使用了jquery-3.1.0.min.js, 在没有任何外面加载的js时,判断代码是正常工作的。 使用用下面的js判断就重复刷新了,是不是这个判断与jquery-3.1.0.min.js里的冲突了?代码放jquery-3.1.0.min.js前面也是重复刷新,又找不到原因。被困很久。 if(/Android|webOS|iPhone|iPod|BlackBerry/i.test(navigator.userAgent)) { //WAP端 window.location.assign("/wap/index.html"); } else { //PC端 //alert("pc"); window.location.assign("/index.html"); } //03-15 alert(navigator.userAgent) 拿到的数据。 Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.106 Safari/537.36
找不到或无法加载主类 Student
import java.util.*; public class Student { public int score; public String name; public int age; public Student() { super(); } public Student(int score, String name, int age) { //构造方法 super(); this.score = score; this.name = name; this.age = age; } //text public class Text { public static void main (String[] args) { System.out.println("*****录入学员信息,当录入学员的编号为0时结束*****"); Scanner input = new Scanner(System.in); ArrayList<Student> arraylist = new ArrayList<Student>(); //输入学员信息 while(true){ Student student = new Student(); System.out.print("请输入学员学号:"); student.score = input.nextInt(); if(student.score==0){ System.out.println("结束录入!"); break; }else{ System.out.print("请输入学员姓名:"); student.name = input.next(); System.out.print("请输入学员年龄:"); student.age = input.nextInt(); arraylist.add(student); } } //输出学员信息 System.out.println("学员的信息如下:"); System.out.println("分数\t姓名\t年龄"); Iterator<Student> iterator = arraylist.iterator(); while(iterator.hasNext()){ Student a = iterator.next(); System.out.println(a.score+"\t"+a.name+"\t"+a.age); } } } }
dsoframer控件,电脑上装了两个版本的办公软件,一个是office,一个是wps,两个程序加载的代码一样,一个加载的wps,一个加载的office
![图片说明](https://img-ask.csdn.net/upload/202003/04/1583321191_185899.png) 如图所示,两个demo程序,调用的方法一致,代码如下。但是加载的office缺不一样,我本地打开word文件时wps。现在加载office的程序调用接口方法,总是报错“调用的目标发生了异常” if (count == 2) { axFramerControl1.Open(docPath, true, "Word.Document.8", "", ""); } else if (count == 3) { axFramerControl1.Open(docPath, true, "Word.Document.12", "", ""); } else if (count == 4) { axFramerControl1.Open(docPath, true, "Word.Document.16", "", ""); } else if (count == 1) { axFramerControl1.Open(docPath, true, "Word.Document", "", ""); } else { axFramerControl1.Open(docPath); }
js中怎么给<object>下<param>中的FileName赋值,并且重新加载。
<body id="pay"> <form id="videomForm"> <input type="text" class="easyui-textbox" name="videoUrl" id="videoUrl" value=""> </form> <object id="MediaPlayer" classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="900" height="500" standby="Loading Windows Media Player components…" type="application/x-oleobject" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701"> <param name="FileName" value=""> <script type="text/javascript"> $("#MediaPlayer param").each(function(index){ //var url = 'E:\\video\\caifen\\2020-03-19-17-59\\10_23_31.mp4'; var url = $("#videoUrl").val(); $('[name="FileName"]').val(url) }) </script> <param name="animationatstart" value="true"> <param name="transparentatstart" value="true"> <param name="autostart" value="true"> <param name="showcontrols" value="true"> <param name="ShowStatusBar" value="-1"> <param name="windowlessvideo" value="true"> </object> </body> ``` ``` 可是<object>标签为啥总是先加载,而我通过这样赋值后F12可以看到值,但是页面缺没有进行显示,请问各位大神这个该如何处理了?
加载base64图片出现黑线
图片加载后会出现黑线 ![图片说明](https://img-ask.csdn.net/upload/202003/27/1585271991_571456.png) 右击下载图片则显示正常![图片说明](https://img-ask.csdn.net/upload/202003/27/1585272063_759802.png) ,调试情况下也显示正常,刷新后则不再出现。 贴上代码 var drawtable = []; var handlerUrl = "/xxx/xxxHander.ashx?v=" + Math.random(); //获得画 $.ajax({ async: false, type: "POST", //GET url: encodeURI(handlerUrl), data: "action=drawimage, beforeSend: function (XMLHttpRequest) { $("<div class='loadingWrap'></div>").appendTo("body"); }, success: function (data, textStatus) { if (data != "") { var jsonObj = JSON.parse(data); var imagegriddiv = document.getElementById("imagegrid");// for (var i = 0; i < jsonObj.length; i++) { movenullstr(jsonObj[i]); var imageindex = parseInt($("#<%=hideImageIndex.ClientID %>").val()) + 1;//获得当前页面的id var div = document.createElement("div"); var img = document.createElement("img"); var txt = document.createElement("p"); var checkdiv = document.createElement("div"); var checkinput = document.createElement("input"); div.className = "grid__item"; img.className = "grid__item_img"; txt.innerText = jsonObj[i].ImageNumInfo; img.src = jsonObj[i].Image; img.id = jsonObj[i].ID; div.appendChild(img); div.appendChild(txt); checkdiv.className = "checkdiv"; checkinput.type = "checkbox"; checkinput.name = jsonObj[i].ID; checkinput.id = "box" + imageindex; checkinput.checked = false; checkdiv.appendChild(checkinput); div.appendChild(checkdiv); imagegriddiv.appendChild(div); } } }, complete: function (XMLHttpRequest, textStatus) { $(".loadingWrap").remove(); }, error: function (XMLHttpRequest, textStatus, errorThrown) { alert("执行失败!原因:" + XMLHttpRequest.status + ";" + XMLHttpRequest.readyState + ";" + textStatus); r = "error"; } }); } ``` <div class="grid" id="imagegrid" style="height: 580px;"> <div class="uploadImgBtn" id="uploadImgBtnSetup"> <img src="xxx/xxx.jpg" alt="xxx/xxx.jpg" class="grid__item" /> <input class="uploadImg" type="file" name="file" multiple id="file" data-size="1280x853" /> </div> </div> ```
MacBook的Safari下type="submit"点击后显示不出div
如题,按钮点击的时候在window浏览器这个红色背景的div会一闪而过,但是在macbook的Safari中什么效果都没有,return false的时候div可以显示出来,但表单还怎么提交啊,return true时页面中div已经加载变成block了,感觉是还没来得及被浏览器渲染页面就刷新了一下,有没有什么办法可以让它有一闪而过的效果? ``` html: <div id="divTest" style="height:100px;background-color:red;display:none;"></div> <input type="submit" value="submit点击" id="testBtn1" /> jq: <script type="text/javascript"> $(function(){ $("#testBtn1").on("click",function(){ $("#divTest").css("display","block"); return true; }); }); </script> ```
求助:html只能在微信浏览器打开,调用微信接口问题?
大家好 ,新手请教两个个问题 1.网页上输入域名的时候 直接访问了public目录下面的index.html 没有访问index.php 这个是tp模块默认的设置么? 2.这个怎么设置的index.html只能在微信端打开,我应该怎么解除,让他在普通浏览器也能正常打开呢? 个人觉得原因:1.它直接通过index.html里的js调用了微信授权,需要把js里的微信授权取消。但是我没能找到js里微信授权在哪里。 下么是图片: ![图片说明](https://img-ask.csdn.net/upload/202003/22/1584857161_740465.jpg) ![图片说明](https://img-ask.csdn.net/upload/202003/22/1584856909_155952.png) 下么是其中一个js代码: 1.index.5d79cff.js ``` (function(e){function n(n){for(var a,i,s=n[0],u=n[1],c=n[2],l=0,d=[];l<s.length;l++)i=s[l],o[i]&&d.push(o[i][0]),o[i]=0;for(a in u)Object.prototype.hasOwnProperty.call(u,a)&&(e[a]=u[a]);g&&g(n);while(d.length)d.shift()();return r.push.apply(r,c||[]),t()}function t(){for(var e,n=0;n<r.length;n++){for(var t=r[n],a=!0,i=1;i<t.length;i++){var u=t[i];0!==o[u]&&(a=!1)}a&&(r.splice(n--,1),e=s(s.s=t[0]))}return e}var a={},o={index:0},r=[];function i(e){return s.p+"static/js/"+({"pages-aboutUs-aboutUs":"pages-aboutUs-aboutUs","pages-buyLesson-buyLesson":"pages-buyLesson-buyLesson","pages-cargoDetail-cargoDetail~pages-questionDetail-questionDetail":"pages-cargoDetail-cargoDetail~pages-questionDetail-questionDetail","pages-cargoDetail-cargoDetail":"pages-cargoDetail-cargoDetail","pages-questionDetail-questionDetail":"pages-questionDetail-questionDetail","pages-feedback-feedback":"pages-feedback-feedback","pages-login-login":"pages-login-login","pages-partiPost-partiPost":"pages-partiPost-partiPost","pages-payOrder-payOrder":"pages-payOrder-payOrder","pages-searchDetails-searchDetails":"pages-searchDetails-searchDetails","pages-tabbar-drycargo-drycargo":"pages-tabbar-drycargo-drycargo","pages-tabbar-mine-mine":"pages-tabbar-mine-mine","pages-tabbar-question-question":"pages-tabbar-question-question","pages-tabbar-release-release":"pages-tabbar-release-release","pages-tabbar-search-search":"pages-tabbar-search-search","pages-teacherDetail-teacherDetail":"pages-teacherDetail-teacherDetail","pages-userinfo-userinfo":"pages-userinfo-userinfo"}[e]||e)+"."+{"pages-aboutUs-aboutUs":"f00552b3","pages-buyLesson-buyLesson":"6bf6a2ae","pages-cargoDetail-cargoDetail~pages-questionDetail-questionDetail":"35e61b5d","pages-cargoDetail-cargoDetail":"9f2898d6","pages-questionDetail-questionDetail":"9c645e70","pages-feedback-feedback":"e2280327","pages-login-login":"d7b4ab6c","pages-partiPost-partiPost":"78de4437","pages-payOrder-payOrder":"8718e180","pages-searchDetails-searchDetails":"7710a11b","pages-tabbar-drycargo-drycargo":"1312f8dd","pages-tabbar-mine-mine":"f44636f9","pages-tabbar-question-question":"8d8629a7","pages-tabbar-release-release":"fdfe539f","pages-tabbar-search-search":"2c50eba0","pages-teacherDetail-teacherDetail":"65279f5c","pages-userinfo-userinfo":"38dd4057"}[e]+".js"}function s(n){if(a[n])return a[n].exports;var t=a[n]={i:n,l:!1,exports:{}};return e[n].call(t.exports,t,t.exports,s),t.l=!0,t.exports}s.e=function(e){var n=[],t=o[e];if(0!==t)if(t)n.push(t[2]);else{var a=new Promise(function(n,a){t=o[e]=[n,a]});n.push(t[2]=a);var r,u=document.createElement("script");u.charset="utf-8",u.timeout=120,s.nc&&u.setAttribute("nonce",s.nc),u.src=i(e),r=function(n){u.onerror=u.onload=null,clearTimeout(c);var t=o[e];if(0!==t){if(t){var a=n&&("load"===n.type?"missing":n.type),r=n&&n.target&&n.target.src,i=new Error("Loading chunk "+e+" failed.\n("+a+": "+r+")");i.type=a,i.request=r,t[1](i)}o[e]=void 0}};var c=setTimeout(function(){r({type:"timeout",target:u})},12e4);u.onerror=u.onload=r,document.head.appendChild(u)}return Promise.all(n)},s.m=e,s.c=a,s.d=function(e,n,t){s.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:t})},s.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.t=function(e,n){if(1&n&&(e=s(e)),8&n)return e;if(4&n&&"object"===typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(s.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var a in e)s.d(t,a,function(n){return e[n]}.bind(null,a));return t},s.n=function(e){var n=e&&e.__esModule?function(){return e["default"]}:function(){return e};return s.d(n,"a",n),n},s.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},s.p="/",s.oe=function(e){throw console.error(e),e};var u=window["webpackJsonp"]=window["webpackJsonp"]||[],c=u.push.bind(u);u.push=n,u=u.slice();for(var l=0;l<u.length;l++)n(u[l]);var g=c;r.push([0,"chunk-vendors"]),t()})({0:function(e,n,t){e.exports=t("1e48")},"0538":function(e,n,t){"use strict";var a=t("288e");Object.defineProperty(n,"__esModule",{value:!0}),n.mock=n.http=void 0;var o=a(t("795b")),r=a(t("cebc")),i=a(t("42e7")),s=new i.default;n.mock=s,s.setConfig(function(e){return e.baseUrl="https://www.fastmock.site/mock/09d86ed8a861337ae7da96bbb47bc39e/shoppage",e.header=(0,r.default)({},e.header),e}),s.interceptor.request(function(e,n){return e}),s.validateStatus=function(e){return 200===e},s.interceptor.response(function(e){if(1===e.data.error_code)return e.data},function(e){return e});var u=new i.default;n.http=u,u.setConfig(function(e){return e.baseUrl="http://xinghuo.com/index.php/index/",e.header=(0,r.default)({},e.header),e}),u.validateStatus=function(e){return 200===e},u.interceptor.response(function(e){return 200!==e.statusCode?o.default.reject(e):(1===e.data.code||(102===e.data.code?uni.reLaunch({url:"/pages/common/login/login"}):uni.showToast({title:e.data.msg||"加载中",icon:"none"})),o.default.resolve(e.data))},function(e){return e})},"0831":function(e,n,t){"use strict";t.r(n);var a=t("ac83"),o=t("1333");for(var r in o)"default"!==r&&function(e){t.d(n,e,function(){return o[e]})}(r);t("9578");var i,s=t("f0c5"),u=Object(s["a"])(o["default"],a["b"],a["c"],!1,null,null,null,!1,a["a"],i);n["default"]=u.exports},1333:function(e,n,t){"use strict";t.r(n);var a=t("bc27"),o=t.n(a);for(var r in a)"default"!==r&&function(e){t.d(n,e,function(){return a[e]})}(r);n["default"]=o.a},"1e48":function(e,n,t){"use strict";var a=t("e54b"),o=t("288e"),r=o(t("cebc"));t("cadf"),t("551c"),t("097d"),t("356c"),t("1c31"),t("921b");var i=o(t("e143")),s=o(t("0831")),u=o(t("48a2")),c=a(t("3322")),l=o(t("b90f"));i.default.config.productionTip=!1,i.default.prototype.$api=c,i.default.prototype.websiteUrl="http://xinghuo.tanfangzi.cn",i.default.prototype.getImgUrl=function(e){return this.websiteUrl+e},i.default.prototype.isLogin=function(e){var n=uni.getStorageSync("userInfo");return!!n&&n.token},i.default.prototype.$store=u.default,i.default.prototype.$api=c,i.default.prototype.$utils=l.default,s.default.mpType="app";var g=new i.default((0,r.default)({},s.default));g.$mount()},"279b":function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={pages:{"pages/tabbar/search/search":{navigationBarTitleText:"搜索",navigationStyle:"custom"},"pages/login/login":{navigationBarTitleText:"登录",navigationBarBackgroundColor:"#389CFB",navigationBarTextStyle:"white",navigationStyle:"custom"},"pages/tabbar/question/question":{navigationBarTitleText:"问答",navigationStyle:"custom"},"pages/tabbar/drycargo/drycargo":{navigationBarTitleText:"干货",navigationStyle:"custom"},"pages/tabbar/release/release":{navigationBarTitleText:"发布帖子",navigationStyle:"custom"},"pages/tabbar/mine/mine":{navigationBarTitleText:"我的",navigationBarBackgroundColor:"#389CFB",navigationBarTextStyle:"white",navigationStyle:"custom"},"pages/searchDetails/searchDetails":{navigationBarTitleText:"搜索",navigationStyle:"custom"},"pages/cargoDetail/cargoDetail":{navigationBarTitleText:"干货详情",navigationStyle:"custom"},"pages/teacherDetail/teacherDetail":{navigationBarTitleText:"讲师详情",navigationStyle:"custom"},"pages/userinfo/userinfo":{navigationBarTitleText:"个人资料",navigationStyle:"custom"},"pages/aboutUs/aboutUs":{navigationBarTitleText:"关于我们",navigationStyle:"custom"},"pages/feedback/feedback":{navigationBarTitleText:"意见反馈",navigationStyle:"custom"},"pages/buyLesson/buyLesson":{navigationBarTitleText:"购买课程",navigationStyle:"custom"},"pages/partiPost/partiPost":{navigationBarTitleText:"参与帖子",navigationStyle:"custom"},"pages/questionDetail/questionDetail":{navigationBarTitleText:"帖子详情",navigationStyle:"custom"},"pages/payOrder/payOrder":{navigationBarTitleText:"支付",navigationStyle:"custom"}},globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"}};n.default=a},3322:function(e,n,t){"use strict";var a=t("288e");Object.defineProperty(n,"__esModule",{value:!0}),n.go=i,n.usersave=n.topay=n.order=n.buy=n.purchase=n.openid=n.userinfo=n.suggestion=n.mydata=n.bannerpost=n.about=n.phone=n.comment=n.videodeta=n.video=n.issue=n.postdeta=n.searchvideo=n.post=n.banner=void 0;var o=a(t("f499")),r=t("0538");function i(e,n){n?(n=(0,o.default)(n),uni.navigateTo({url:"/pages/"+e+"/"+e+"?data="+n})):uni.navigateTo({url:"/pages/"+e+"/"+e})}var s=function(e){return r.http.post("banner/index",e||{})};n.banner=s;var u=function(e){return r.http.post("video/post",e||{})};n.post=u;var c=function(e){return r.http.post("video/search_video",e||{})};n.searchvideo=c;var l=function(e){return r.http.post("video/postdeta",e||{})};n.postdeta=l;var g=function(e){return r.http.post("video/issue",e||{})};n.issue=g;var d=function(e){return r.http.post("video/video",e||{})};n.video=d;var p=function(e){return r.http.post("video/videodeta",e||{})};n.videodeta=p;var f=function(e){return r.http.post("video/comment",e||{})};n.comment=f;var y=function(e){return r.http.post("banner/phone",e||{})};n.phone=y;var b=function(e){return r.http.post("banner/about",e||{})};n.about=b;var m=function(e){return r.http.post("banner/post",e||{})};n.bannerpost=m;var h=function(e){return r.http.post("banner/mydata",e||{})};n.mydata=h;var _=function(e){return r.http.post("banner/suggestion",e||{})};n.suggestion=_;var v=function(e){return r.http.post("banner/user_info",e||{})};n.userinfo=v;var C=function(e){return r.http.post("banner/openid",e||{})};n.openid=C;var T=function(e){return r.http.post("banner/purchase",e||{})};n.purchase=T;var S=function(e){return r.http.post("video/buy",e||{})};n.buy=S;var D=function(e){return r.http.post("video/order",e||{})};n.order=D;var x=function(e){return r.http.post("video/to_pay",e||{})};n.topay=x;var w=function(e){return r.http.post("banner/user_save",e||{})};n.usersave=w},"356c":function(e,n,t){"use strict";(function(e){var n=t("288e"),a=n(t("5176")),o=n(t("e143"));e["____14021FC____"]=!0,delete e["____14021FC____"],e.__uniConfig={globalStyle:{navigationBarTextStyle:"black",navigationBarTitleText:"uni-app",navigationBarBackgroundColor:"#F8F8F8",backgroundColor:"#F8F8F8"},tabBar:{borderStyle:"black",backgroundColor:"#FFFFFF",color:"#333333",selectedColor:"#333333",list:[{pagePath:"pages/tabbar/search/search",iconPath:"static/tabbar/taba1.png",selectedIconPath:"static/tabbar/taba2.png",text:"搜索",redDot:!1,badge:""},{pagePath:"pages/tabbar/question/question",iconPath:"static/tabbar/tabb1.png",selectedIconPath:"static/tabbar/tabb2.png",text:"问答",redDot:!1,badge:""},{pagePath:"pages/tabbar/drycargo/drycargo",iconPath:"static/tabbar/tabc1.png",selectedIconPath:"static/tabbar/tabc2.png",text:"干货",redDot:!1,badge:""},{pagePath:"pages/tabbar/mine/mine",iconPath:"static/tabbar/tabd1.png",selectedIconPath:"static/tabbar/tabd2.png",text:"我的",redDot:!1,badge:""}]}},e.__uniConfig.router={mode:"hash",base:"/"},e.__uniConfig["async"]={loading:"AsyncLoading",error:"AsyncError",delay:200,timeout:3e3},e.__uniConfig.debug=!1,e.__uniConfig.networkTimeout={request:6e3,connectSocket:6e3,uploadFile:6e3,downloadFile:6e3},e.__uniConfig.sdkConfigs={},e.__uniConfig.qqMapKey="XVXBZ-NDMC4-JOGUS-XGIEE-QVHDZ-AMFV2",e.__uniConfig.nvue={"flex-direction":"column"},o.default.component("pages-tabbar-search-search",function(e){var n={component:t.e("pages-tabbar-search-search").then(function(){return e(t("ef27"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-login-login",function(e){var n={component:t.e("pages-login-login").then(function(){return e(t("31d9"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-tabbar-question-question",function(e){var n={component:t.e("pages-tabbar-question-question").then(function(){return e(t("3c6e"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-tabbar-drycargo-drycargo",function(e){var n={component:t.e("pages-tabbar-drycargo-drycargo").then(function(){return e(t("3b16"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-tabbar-release-release",function(e){var n={component:t.e("pages-tabbar-release-release").then(function(){return e(t("9932"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-tabbar-mine-mine",function(e){var n={component:t.e("pages-tabbar-mine-mine").then(function(){return e(t("6d8f"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-searchDetails-searchDetails",function(e){var n={component:t.e("pages-searchDetails-searchDetails").then(function(){return e(t("4d92"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-cargoDetail-cargoDetail",function(e){var n={component:Promise.all([t.e("pages-cargoDetail-cargoDetail~pages-questionDetail-questionDetail"),t.e("pages-cargoDetail-cargoDetail")]).then(function(){return e(t("0c29"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-teacherDetail-teacherDetail",function(e){var n={component:t.e("pages-teacherDetail-teacherDetail").then(function(){return e(t("b00e"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-userinfo-userinfo",function(e){var n={component:t.e("pages-userinfo-userinfo").then(function(){return e(t("d13d"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-aboutUs-aboutUs",function(e){var n={component:t.e("pages-aboutUs-aboutUs").then(function(){return e(t("e582"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-feedback-feedback",function(e){var n={component:t.e("pages-feedback-feedback").then(function(){return e(t("b75c"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-buyLesson-buyLesson",function(e){var n={component:t.e("pages-buyLesson-buyLesson").then(function(){return e(t("c589"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-partiPost-partiPost",function(e){var n={component:t.e("pages-partiPost-partiPost").then(function(){return e(t("93e6"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-questionDetail-questionDetail",function(e){var n={component:Promise.all([t.e("pages-cargoDetail-cargoDetail~pages-questionDetail-questionDetail"),t.e("pages-questionDetail-questionDetail")]).then(function(){return e(t("0553"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),o.default.component("pages-payOrder-payOrder",function(e){var n={component:t.e("pages-payOrder-payOrder").then(function(){return e(t("5404"))}.bind(null,t)).catch(t.oe),delay:__uniConfig["async"].delay,timeout:__uniConfig["async"].timeout};return __uniConfig["async"]["loading"]&&(n.loading={name:"SystemAsyncLoading",render:function(e){return e(__uniConfig["async"]["loading"])}}),__uniConfig["async"]["error"]&&(n.error={name:"SystemAsyncError",render:function(e){return e(__uniConfig["async"]["error"])}}),n}),e.__uniRoutes=[{path:"/",alias:"/pages/tabbar/search/search",component:{render:function(e){return e("Page",{props:(0,a.default)({isQuit:!0,isEntry:!0,isTabBar:!0,tabBarIndex:0},__uniConfig.globalStyle,{navigationBarTitleText:"搜索",navigationStyle:"custom"})},[e("pages-tabbar-search-search",{slot:"page"})])}},meta:{id:1,name:"pages-tabbar-search-search",isNVue:!1,pagePath:"pages/tabbar/search/search",isQuit:!0,isEntry:!0,isTabBar:!0,tabBarIndex:0,windowTop:0}},{path:"/pages/login/login",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"登录",navigationBarBackgroundColor:"#389CFB",navigationBarTextStyle:"white",navigationStyle:"custom"})},[e("pages-login-login",{slot:"page"})])}},meta:{name:"pages-login-login",isNVue:!1,pagePath:"pages/login/login",windowTop:0}},{path:"/pages/tabbar/question/question",component:{render:function(e){return e("Page",{props:(0,a.default)({isQuit:!0,isTabBar:!0,tabBarIndex:1},__uniConfig.globalStyle,{navigationBarTitleText:"问答",navigationStyle:"custom"})},[e("pages-tabbar-question-question",{slot:"page"})])}},meta:{id:2,name:"pages-tabbar-question-question",isNVue:!1,pagePath:"pages/tabbar/question/question",isQuit:!0,isTabBar:!0,tabBarIndex:1,windowTop:0}},{path:"/pages/tabbar/drycargo/drycargo",component:{render:function(e){return e("Page",{props:(0,a.default)({isQuit:!0,isTabBar:!0,tabBarIndex:2},__uniConfig.globalStyle,{navigationBarTitleText:"干货",navigationStyle:"custom"})},[e("pages-tabbar-drycargo-drycargo",{slot:"page"})])}},meta:{id:3,name:"pages-tabbar-drycargo-drycargo",isNVue:!1,pagePath:"pages/tabbar/drycargo/drycargo",isQuit:!0,isTabBar:!0,tabBarIndex:2,windowTop:0}},{path:"/pages/tabbar/release/release",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"发布帖子",navigationStyle:"custom"})},[e("pages-tabbar-release-release",{slot:"page"})])}},meta:{name:"pages-tabbar-release-release",isNVue:!1,pagePath:"pages/tabbar/release/release",windowTop:0}},{path:"/pages/tabbar/mine/mine",component:{render:function(e){return e("Page",{props:(0,a.default)({isQuit:!0,isTabBar:!0,tabBarIndex:3},__uniConfig.globalStyle,{navigationBarTitleText:"我的",navigationBarBackgroundColor:"#389CFB",navigationBarTextStyle:"white",navigationStyle:"custom"})},[e("pages-tabbar-mine-mine",{slot:"page"})])}},meta:{id:4,name:"pages-tabbar-mine-mine",isNVue:!1,pagePath:"pages/tabbar/mine/mine",isQuit:!0,isTabBar:!0,tabBarIndex:3,windowTop:0}},{path:"/pages/searchDetails/searchDetails",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"搜索",navigationStyle:"custom"})},[e("pages-searchDetails-searchDetails",{slot:"page"})])}},meta:{name:"pages-searchDetails-searchDetails",isNVue:!1,pagePath:"pages/searchDetails/searchDetails",windowTop:0}},{path:"/pages/cargoDetail/cargoDetail",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"干货详情",navigationStyle:"custom"})},[e("pages-cargoDetail-cargoDetail",{slot:"page"})])}},meta:{name:"pages-cargoDetail-cargoDetail",isNVue:!1,pagePath:"pages/cargoDetail/cargoDetail",windowTop:0}},{path:"/pages/teacherDetail/teacherDetail",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"讲师详情",navigationStyle:"custom"})},[e("pages-teacherDetail-teacherDetail",{slot:"page"})])}},meta:{name:"pages-teacherDetail-teacherDetail",isNVue:!1,pagePath:"pages/teacherDetail/teacherDetail",windowTop:0}},{path:"/pages/userinfo/userinfo",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"个人资料",navigationStyle:"custom"})},[e("pages-userinfo-userinfo",{slot:"page"})])}},meta:{name:"pages-userinfo-userinfo",isNVue:!1,pagePath:"pages/userinfo/userinfo",windowTop:0}},{path:"/pages/aboutUs/aboutUs",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"关于我们",navigationStyle:"custom"})},[e("pages-aboutUs-aboutUs",{slot:"page"})])}},meta:{name:"pages-aboutUs-aboutUs",isNVue:!1,pagePath:"pages/aboutUs/aboutUs",windowTop:0}},{path:"/pages/feedback/feedback",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"意见反馈",navigationStyle:"custom"})},[e("pages-feedback-feedback",{slot:"page"})])}},meta:{name:"pages-feedback-feedback",isNVue:!1,pagePath:"pages/feedback/feedback",windowTop:0}},{path:"/pages/buyLesson/buyLesson",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"购买课程",navigationStyle:"custom"})},[e("pages-buyLesson-buyLesson",{slot:"page"})])}},meta:{name:"pages-buyLesson-buyLesson",isNVue:!1,pagePath:"pages/buyLesson/buyLesson",windowTop:0}},{path:"/pages/partiPost/partiPost",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"参与帖子",navigationStyle:"custom"})},[e("pages-partiPost-partiPost",{slot:"page"})])}},meta:{name:"pages-partiPost-partiPost",isNVue:!1,pagePath:"pages/partiPost/partiPost",windowTop:0}},{path:"/pages/questionDetail/questionDetail",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"帖子详情",navigationStyle:"custom"})},[e("pages-questionDetail-questionDetail",{slot:"page"})])}},meta:{name:"pages-questionDetail-questionDetail",isNVue:!1,pagePath:"pages/questionDetail/questionDetail",windowTop:0}},{path:"/pages/payOrder/payOrder",component:{render:function(e){return e("Page",{props:(0,a.default)({},__uniConfig.globalStyle,{navigationBarTitleText:"支付",navigationStyle:"custom"})},[e("pages-payOrder-payOrder",{slot:"page"})])}},meta:{name:"pages-payOrder-payOrder",isNVue:!1,pagePath:"pages/payOrder/payOrder",windowTop:0}},{path:"/preview-image",component:{render:function(e){return e("Page",{props:{navigationStyle:"custom"}},[e("system-preview-image",{slot:"page"})])}},meta:{name:"preview-image",pagePath:"/preview-image"}},{path:"/choose-location",component:{render:function(e){return e("Page",{props:{navigationStyle:"custom"}},[e("system-choose-location",{slot:"page"})])}},meta:{name:"choose-location",pagePath:"/choose-location"}},{path:"/open-location",component:{render:function(e){return e("Page",{props:{navigationStyle:"custom"}},[e("system-open-location",{slot:"page"})])}},meta:{name:"open-location",pagePath:"/open-location"}}]}).call(this,t("c8ba"))},"42e7":function(e,n,t){"use strict";var a=t("288e");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=a(t("a4bb"));t("ac6a");var r=a(t("f499")),i=a(t("cebc")),s=a(t("795b"));t("96cf");var u=a(t("3b8d")),c=a(t("d225")),l=a(t("b0b4")),g=a(t("bd86")),d=function(){function e(){var n=this;(0,c.default)(this,e),(0,g.default)(this,"config",{baseUrl:"",header:{"content-type":"application/json;charset=UTF-8"},method:"GET",dataType:"json",responseType:"text"}),(0,g.default)(this,"interceptor",{request:function(e){e&&(n.requestBeforeFun=e)},response:function(e,t){e&&t&&(n.requestComFun=e,n.requestComFail=t)}})}return(0,l.default)(e,[{key:"requestBeforeFun",value:function(e){return e}},{key:"requestComFun",value:function(e){return e}},{key:"requestComFail",value:function(e){return e}},{key:"validateStatus",value:function(e){return 200===e}},{key:"setConfig",value:function(e){this.config=e(this.config)}},{key:"request",value:function(){var n=(0,u.default)(regeneratorRuntime.mark(function n(){var t,a=this,o=arguments;return regeneratorRuntime.wrap(function(n){while(1)switch(n.prev=n.next){case 0:return t=o.length>0&&void 0!==o[0]?o[0]:{},t.baseUrl=this.config.baseUrl,t.dataType=t.dataType||this.config.dataType,t.responseType=t.responseType||this.config.responseType,t.url=t.url||"",t.data=t.data||{},t.params=t.params||{},t.header=t.header||this.config.header,t.method=t.method||this.config.method,n.abrupt("return",new s.default(function(n,o){var s=!0,u={};t.complete=function(e){e.config=u,a.validateStatus(e.statusCode)?(e=a.requestComFun(e),n(e)):(e=a.requestComFail(e),o(e))};var c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"handle cancel",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,a={errMsg:e,config:n};o(a),s=!1};u=(0,i.default)({},a.requestBeforeFun(t,c));var l=(0,i.default)({},u);if(s){var g=e.posUrl(t.url)?t.url:t.baseUrl+t.url;if("{}"!==(0,r.default)(t.params)){var d=e.addQueryString(t.params);g+=-1===g.indexOf("?")?"?".concat(d):"&".concat(d)}l.url=g,uni.request(l)}}));case 10:case"end":return n.stop()}},n,this)}));function t(){return n.apply(this,arguments)}return t}()},{key:"get",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.request((0,i.default)({url:e,method:"GET"},n))}},{key:"post",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"POST"},t))}},{key:"put",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"PUT"},t))}},{key:"delete",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"DELETE"},t))}},{key:"connect",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"CONNECT"},t))}},{key:"head",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"HEAD"},t))}},{key:"options",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"OPTIONS"},t))}},{key:"trace",value:function(e,n){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.request((0,i.default)({url:e,data:n,method:"TRACE"},t))}},{key:"upload",value:function(n,t){var a=this,o=t.filePath,r=t.name,u=t.header,c=t.formData;return new s.default(function(t,s){var l=!0,g={},d={baseUrl:a.config.baseUrl,url:n,filePath:o,method:"UPLOAD",name:r,header:u||a.config.header,formData:c,complete:function(e){e.config=g,200===e.statusCode?(e=a.requestComFun(e),t(e)):(e=a.requestComFail(e),s(e))}},p=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"handle cancel",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:d,t={errMsg:e,config:n};s(t),l=!1};g=(0,i.default)({},a.requestBeforeFun(d,p));var f=(0,i.default)({},g);l&&(f.url=e.posUrl(n)?n:a.config.baseUrl+n,uni.uploadFile(f))})}}],[{key:"posUrl",value:function(e){return/(http|https):\/\/([\w.]+\/?)\S*/.test(e)}},{key:"addQueryString",value:function(e){var n="";return(0,o.default)(e).forEach(function(t){n+=t+"="+e[t]+"&"}),n.substring(0,n.length-1)}}]),e}();n.default=d},"48a2":function(e,n,t){"use strict";var a=t("288e");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=a(t("e143")),r=a(t("2f62"));o.default.use(r.default);var i=new r.default.Store({state:{hasLogin:!1,userInfo:{},address:{},coords:{},isWeixin:"",openid:""},mutations:{login:function(e,n){e.hasLogin=!0,e.userInfo=n,uni.setStorage({key:"userInfo",data:n})},logout:function(e){e.hasLogin=!1,e.userInfo={},uni.removeStorage({key:"userInfo"})},addressinfo:function(e,n){e.address=n,uni.setStorage({key:"address",data:n})},coordsinfo:function(e,n){e.coords=n,uni.setStorage({key:"coords",data:n})},isweixin:function(e,n){console.log(n),e.isWeixin=n},setopenid:function(e,n){e.openid=n,uni.setStorage({key:"openid",data:n})}},actions:{}}),s=i;n.default=s},"56c3":function(e,n,t){var a=t("ef9f");"string"===typeof a&&(a=[[e.i,a,""]]),a.locals&&(e.exports=a.locals);var o=t("4f06").default;o("0afb4e03",a,!0,{sourceMap:!1,shadowMode:!1})},"6e05":function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={appid:"__UNI__14021FC"};n.default=a},9578:function(e,n,t){"use strict";var a=t("56c3"),o=t.n(a);o.a},ac83:function(e,n,t){"use strict";var a,o=function(){var e=this,n=e.$createElement,t=e._self._c||n;return t("App",{attrs:{keepAliveInclude:e.keepAliveInclude}})},r=[];t.d(n,"b",function(){return o}),t.d(n,"c",function(){return r}),t.d(n,"a",function(){return a})},b90f:function(e,n,t){"use strict";var a=t("288e");Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=a(t("795b"));t("6762");var r=["133","149","153","173","177","180","181","189","199","130","131","132","145","155","156","166","171","175","176","185","186","166","134","135","136","137","138","139","147","150","151","152","157","158","159","172","178","182","183","184","187","188","198"],i=function(e){return 11===e.length&&r.includes(e.slice(0,3))},s=function(e){return new o.default(function(n,t){var a=newTestPhone(e+"");a?n(a):(uni.toast({title:"手机号格式不正确",icon:"none"}),t(a))})},u=function(e){var n=e.title,t=e.icon,a=void 0===t?"success":t,r=e.duration,i=void 0===r?1500:r;return new o.default(function(e,t){uni.showToast({title:n,icon:a,duration:i,success:function(){setTimeout(function(){e()},i)},fail:function(){t()}})})},c={test_phone:i,verifyPhone:s,toast:u};n.default=c},bc27:function(e,n,t){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var a={onLaunch:function(){console.log("App Launch")},onShow:function(){console.log("App Show")},onHide:function(){console.log("App Hide")}};n.default=a},ef9f:function(e,n,t){n=e.exports=t("2350")(!1),n.push([e.i,"\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\r\n/*每个页面公共css */.container{font-size:%?30?%}.flex{display:-webkit-box;display:-webkit-flex;display:flex}.flex1{-webkit-box-flex:1;-webkit-flex:1;flex:1}.fdc{-webkit-box-orient:vertical;-webkit-box-direction:normal;-webkit-flex-direction:column;flex-direction:column}.jcsb{-webkit-box-pack:justify;-webkit-justify-content:space-between;justify-content:space-between}.jcc{-webkit-box-pack:center;-webkit-justify-content:center;justify-content:center}.jcfe{-webkit-box-pack:end;-webkit-justify-content:flex-end;justify-content:flex-end}.aic{-webkit-box-align:center;-webkit-align-items:center;align-items:center}.por{position:relative}.pof{position:fixed}.poa{position:absolute}.tac{text-align:center}.line{width:100%;height:%?16?%;background-color:#f7f7f7}.bxsbb{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ellipsiss{\r\n\t/* width: 300upx; */overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}.nodata{padding:%?100?%;text-align:center}.ylf-button{margin:%?200?% auto;width:%?611?%;height:%?98?%;line-height:%?98?%;border-radius:%?98?%;font-size:$y-fs40;text-align:center;color:#fff;background-color:#60abfc}",""])}}); ```
java System.loadLibrary("xx"); ,如何加载类路径下的某个dll, 现在有异常UnsatisfiedLinkError
用设置环境变量参数的方法可以
在中国程序员是青春饭吗?
今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...
《MySQL 性能优化》之理解 MySQL 体系结构
本文介绍 MySQL 的体系结构,包括物理结构、逻辑结构以及插件式存储引擎。
程序员请照顾好自己,周末病魔差点一套带走我。
程序员在一个周末的时间,得了重病,差点当场去世,还好及时挽救回来了。
Python+OpenCV实时图像处理
目录 1、导入库文件 2、设计GUI 3、调用摄像头 4、实时图像处理 4.1、阈值二值化 4.2、边缘检测 4.3、轮廓检测 4.4、高斯滤波 4.5、色彩转换 4.6、调节对比度 5、退出系统 初学OpenCV图像处理的小伙伴肯定对什么高斯函数、滤波处理、阈值二值化等特性非常头疼,这里给各位分享一个小项目,可通过摄像头实时动态查看各类图像处理的特点,也可对各位调参、测试...
2020年一线城市程序员工资大调查
人才需求 一线城市共发布岗位38115个,招聘120827人。 其中 beijing 22805 guangzhou 25081 shanghai 39614 shenzhen 33327 工资分布 2020年中国一线城市程序员的平均工资为16285元,工资中位数为14583元,其中95%的人的工资位于5000到20000元之间。 和往年数据比较: yea...
为什么猝死的都是程序员,基本上不见产品经理猝死呢?
相信大家时不时听到程序员猝死的消息,但是基本上听不到产品经理猝死的消息,这是为什么呢? 我们先百度搜一下:程序员猝死,出现将近700多万条搜索结果: 搜索一下:产品经理猝死,只有400万条的搜索结果,从搜索结果数量上来看,程序员猝死的搜索结果就比产品经理猝死的搜索结果高了一倍,而且从下图可以看到,首页里面的五条搜索结果,其实只有两条才是符合条件。 所以程序员猝死的概率真的比产品经理大,并不是错...
害怕面试被问HashMap?这一篇就搞定了!
声明:本文以jdk1.8为主! 搞定HashMap 作为一个Java从业者,面试的时候肯定会被问到过HashMap,因为对于HashMap来说,可以说是Java集合中的精髓了,如果你觉得自己对它掌握的还不够好,我想今天这篇文章会非常适合你,至少,看了今天这篇文章,以后不怕面试被问HashMap了 其实在我学习HashMap的过程中,我个人觉得HashMap还是挺复杂的,如果真的想把它搞得明明白...
毕业5年,我问遍了身边的大佬,总结了他们的学习方法
我问了身边10个大佬,总结了他们的学习方法,原来成功都是有迹可循的。
python爬取百部电影数据,我分析出了一个残酷的真相
2019年就这么匆匆过去了,就在前几天国家电影局发布了2019年中国电影市场数据,数据显示去年总票房为642.66亿元,同比增长5.4%;国产电影总票房411.75亿元,同比增长8.65%,市场占比 64.07%;城市院线观影人次17.27亿,同比增长0.64%。 看上去似乎是一片大好对不对?不过作为一名严谨求实的数据分析师,我从官方数据中看出了一点端倪:国产票房增幅都已经高达8.65%了,为什...
推荐10个堪称神器的学习网站
每天都会收到很多读者的私信,问我:“二哥,有什么推荐的学习网站吗?最近很浮躁,手头的一些网站都看烦了,想看看二哥这里有什么新鲜货。” 今天一早做了个恶梦,梦到被老板辞退了。虽然说在我们公司,只有我辞退老板的份,没有老板辞退我这一说,但是还是被吓得 4 点多都起来了。(主要是因为我掌握着公司所有的核心源码,哈哈哈) 既然 4 点多起来,就得好好利用起来。于是我就挑选了 10 个堪称神器的学习网站,推...
这些软件太强了,Windows必装!尤其程序员!
Windows可谓是大多数人的生产力工具,集娱乐办公于一体,虽然在程序员这个群体中都说苹果是信仰,但是大部分不都是从Windows过来的,而且现在依然有很多的程序员用Windows。 所以,今天我就把我私藏的Windows必装的软件分享给大家,如果有一个你没有用过甚至没有听过,那你就赚了????,这可都是提升你幸福感的高效率生产力工具哦! 走起!???? NO、1 ScreenToGif 屏幕,摄像头和白板...
阿里面试,面试官没想到一个ArrayList,我都能跟他扯半小时
我是真的没想到,面试官会这样问我ArrayList。
曾经优秀的人,怎么就突然不优秀了。
职场上有很多辛酸事,很多合伙人出局的故事,很多技术骨干被裁员的故事。说来模板都类似,曾经是名校毕业,曾经是优秀员工,曾经被领导表扬,曾经业绩突出,然而突然有一天,因为种种原因,被裁员了,...
C语言荣获2019年度最佳编程语言
关注、星标公众号,不错过精彩内容作者:黄工公众号:strongerHuang近日,TIOBE官方发布了2020年1月编程语言排行榜单。我在前面给过一篇文章《2019年11月C语言接近Ja...
大学四年因为知道了这32个网站,我成了别人眼中的大神!
依稀记得,毕业那天,我们导员发给我毕业证的时候对我说“你可是咱们系的风云人物啊”,哎呀,别提当时多开心啦????,嗯,我们导员是所有导员中最帅的一个,真的???? 不过,导员说的是实话,很多人都叫我大神的,为啥,因为我知道这32个网站啊,你说强不强????,这次是绝对的干货,看好啦,走起来! PS:每个网站都是学计算机混互联网必须知道的,真的牛杯,我就不过多介绍了,大家自行探索,觉得没用的,尽管留言吐槽吧???? 社...
良心推荐,我珍藏的一些Chrome插件
上次搬家的时候,发了一个朋友圈,附带的照片中不小心暴露了自己的 Chrome 浏览器插件之多,于是就有小伙伴评论说分享一下我觉得还不错的浏览器插件。 我下面就把我日常工作和学习中经常用到的一些 Chrome 浏览器插件分享给大家,随便一个都能提高你的“生活品质”和工作效率。 Markdown Here Markdown Here 可以让你更愉快的写邮件,由于支持 Markdown 直接转电子邮...
看完这篇HTTP,跟面试官扯皮就没问题了
我是一名程序员,我的主要编程语言是 Java,我更是一名 Web 开发人员,所以我必须要了解 HTTP,所以本篇文章就来带你从 HTTP 入门到进阶,看完让你有一种恍然大悟、醍醐灌顶的感觉。 最初在有网络之前,我们的电脑都是单机的,单机系统是孤立的,我还记得 05 年前那会儿家里有个电脑,想打电脑游戏还得两个人在一个电脑上玩儿,及其不方便。我就想为什么家里人不让上网,我的同学 xxx 家里有网,每...
史上最全的IDEA快捷键总结
现在Idea成了主流开发工具,这篇博客对其使用的快捷键做了总结,希望对大家的开发工作有所帮助。
阿里程序员写了一个新手都写不出的低级bug,被骂惨了。
这种新手都不会范的错,居然被一个工作好几年的小伙子写出来,差点被当场开除了。
谁是华为扫地僧?
是的,华为也有扫地僧!2020年2月11-12日,“养在深闺人不知”的华为2012实验室扫地僧们,将在华为开发者大会2020(Cloud)上,和大家见面。到时,你可以和扫地僧们,吃一个洋...
AI 没让人类失业,搞 AI 的人先失业了
最近和几个 AI 领域的大佬闲聊 根据他们讲的消息和段子 改编出下面这个故事 如有雷同 都是巧合 1. 老王创业失败,被限制高消费 “这里写我跑路的消息实在太夸张了。” 王葱葱哼笑一下,把消息分享给群里。 阿杰也看了消息,笑了笑。在座几位也都笑了。 王葱葱是个有名的人物,21岁那年以全额奖学金进入 KMU 攻读人工智能博士,累计发表论文 40 余篇,个人技术博客更是成为深度学习领域内风向标。 ...
2020年,冯唐49岁:我给20、30岁IT职场年轻人的建议
点击“技术领导力”关注∆每天早上8:30推送 作者|Mr.K 编辑| Emma 来源|技术领导力(ID:jishulingdaoli) 前天的推文《冯唐:职场人35岁以后,方法论比经验重要》,收到了不少读者的反馈,觉得挺受启发。其实,冯唐写了不少关于职场方面的文章,都挺不错的。可惜大家只记住了“春风十里不如你”、“如何避免成为油腻腻的中年人”等不那么正经的文章。 本文整理了冯...
一份王者荣耀的英雄数据报告
咪哥杂谈本篇阅读时间约为 6 分钟。1前言前一阵写了关于王者的一些系列文章,从数据的获取到数据清洗,数据落地,都是为了本篇的铺垫。今天来实现一下,看看不同维度得到的结论。2环境准备本次实...
作为一名大学生,如何在B站上快乐的学习?
B站是个宝,谁用谁知道???? 作为一名大学生,你必须掌握的一项能力就是自学能力,很多看起来很牛X的人,你可以了解下,人家私底下一定是花大量的时间自学的,你可能会说,我也想学习啊,可是嘞,该学习啥嘞,不怕告诉你,互联网时代,最不缺的就是学习资源,最宝贵的是啥? 你可能会说是时间,不,不是时间,而是你的注意力,懂了吧! 那么,你说学习资源多,我咋不知道,那今天我就告诉你一个你必须知道的学习的地方,人称...
那些年,我们信了课本里的那些鬼话
教材永远都是有错误的,从小学到大学,我们不断的学习了很多错误知识。 斑羚飞渡 在我们学习的很多小学课文里,有很多是错误文章,或者说是假课文。像《斑羚飞渡》: 随着镰刀头羊的那声吼叫,整个斑羚群迅速分成两拨,老年斑羚为一拨,年轻斑羚为一拨。 就在这时,我看见,从那拨老斑羚里走出一只公斑羚来。公斑羚朝那拨年轻斑羚示意性地咩了一声,一只半大的斑羚应声走了出来。一老一少走到伤心崖,后退了几步,突...
一个程序在计算机中是如何运行的?超级干货!!!
强烈声明:本文很干,请自备茶水!???? 开门见山,咱不说废话! 你有没有想过,你写的程序,是如何在计算机中运行的吗?比如我们搞Java的,肯定写过这段代码 public class HelloWorld { public static void main(String[] args) { System.out.println("Hello World!"); } ...
【蘑菇街技术部年会】程序员与女神共舞,鼻血再次没止住。(文末内推)
蘑菇街技术部的年会,别开生面,一样全是美女。
那个在阿里养猪的工程师,5年了……
简介: 在阿里,走过1825天,没有趴下,依旧斗志满满,被称为“五年陈”。他们会被授予一枚戒指,过程就叫做“授戒仪式”。今天,咱们听听阿里的那些“五年陈”们的故事。 下一个五年,猪圈见! 我就是那个在养猪场里敲代码的工程师,一年多前我和20位工程师去了四川的猪场,出发前总架构师慷慨激昂的说:同学们,中国的养猪产业将因为我们而改变。但到了猪场,发现根本不是那么回事:要个WIFI,没有;...
为什么程序猿都不愿意去外包?
分享外包的组织架构,盈利模式,亲身经历,以及根据一些外包朋友的反馈,写了这篇文章 ,希望对正在找工作的老铁有所帮助
Java校招入职华为,半年后我跑路了
何来 我,一个双非本科弟弟,有幸在 19 届的秋招中得到前东家华为(以下简称 hw)的赏识,当时秋招签订就业协议,说是入了某 java bg,之后一系列组织架构调整原因等等让人无法理解的神操作,最终毕业前夕,被通知调往其他 bg 做嵌入式开发(纯 C 语言)。 由于已至于校招末尾,之前拿到的其他 offer 又无法再收回,一时感到无力回天,只得默默接受。 毕业后,直接入职开始了嵌入式苦旅,由于从未...
立即提问