我也遇到这个问题，请问怎么解决的

*1*条回答

#### 相关推荐

- 回答 29 已采纳 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
- 回答 3 已采纳 1.如何实现输入一个数判断健康值？ 2.对于private类型的变量，如果要改变变量的值，是在set中改还是在下面的dog.setLove(16)这里改？ package study; public class Dogs { private String strain = "拉布拉多犬"; private int health = 100; private int love = 0; public String getStrain() { return strain; } public void setStrain(String strain) { this.strain = strain; } public int getLove() { return love; } public void setLove(int love) { this.love = 50; } public int getHealth() { return health; } //如何实现从键盘输入一个数 public void setHealth(int health){ if(health > 100 || health < 0) { this.health = 40; System.out.println("健康值应该在0——100之间，默认值是40"); }else this.health = health; } public static void main(String[] args) { Dogs dog = new Dogs(); dog.getHealth(); System.out.println(dog.getHealth()); dog.setLove(16); System.out.println(dog.getLove()); dog.setStrain("大黄狗"); System.out.println(dog.getStrain()); } }
- 6年前回答 1 已采纳 Trying to match a string like ^grape-ape to run a search using Leafly API. I am just no good at regex, my dyslexia looses me on the patterns. Any ideas why it doesn't seem to be matching/replacing? /*********************/ /* Tag Search Test */ /*********************/ $str = 'I really love that ^blue-dream and ^grape-ape'; preg_match('/^\^([a-z0-9\-])/i', $str, $match); if (!(empty($match)) && $match != false) { $slugs = $match; if(!(is_array($slugs))) { $strain = exec('curl -v -H "app_id:*******************" -H "app_key:*******************" -X GET "http://data.leafly.com/strains/'.$slugs.'"'); if (is_array(json_decode($strain))) { $str = preg_replace('/^\^('.preg_quote($slugs).')/i', '<span title="'.$strain['descriptionPlain'].'">'.$strain['name'].'</span>', $str); } } else { foreach($slugs as $slug) { $strain = exec('curl -v -H "app_id:*******************" -H "app_key:*******************" -X GET "http://data.leafly.com/strains/'.$slug.'"'); if (is_array(json_decode($strain))) { $str = preg_replace('/^\^('.preg_quote($slug).')/i', '<span title="'.$strain['descriptionPlain'].'">'.$strain['name'].'</span>', $str); } } } } echo '<pre>'; print_r($str); echo '</pre>'; /*********************/ /* Reference Test */ /*********************/ $strain = exec('curl -v -H "app_id:*******************" -H "app_key:*******************" -X GET "http://data.leafly.com/strains/grape-ape"'); echo '<pre>'; print_r(json_decode($strain)); echo '</pre>';
- 回答 5 已采纳 public class Test { public static void main(String[] args) { Dog ououDog =new Dog("欧欧","雪瑞娜"); //构造函数，参数是name和strain Dog meimeiDog =new Dog("美美","拉布拉多"); Dog yayaDog =new Dog("亚亚","雪瑞娜"); Dog feifeiDog =new Dog("菲菲","拉布拉多"); Map lists =new HashMap(); lists.put(ououDog.getName(),ououDog); lists.put(meimeiDog.getName(), meimeiDog); lists.put(feifeiDog.getName(),feifeiDog); lists.put(yayaDog.getName(),yayaDog); Set keys =lists.keySet(); Iterator it =keys.iterator(); //打印方法一 while(it.hasNext()){ System.out.println(it.next()+"\t"+lists.get(it.next()).getStrain()); } //打印方法二 while(it .hasNext()){ String key =it.next(); Dog dog =lists.get(key); System.out.println(key+"\t"+dog.getStrain()); } } }
- 回答 1 已采纳 Problem Description Triangulation of surfaces has applications in the Finite Element Method of solid mechanics. The objective is to estimate the stress and strain on complex objects by partitioning them into small simple objects which are considered incompressible. It is convenient to approximate a plane surface with a simple polygon, i.e., a piecewise-linear, closed curve in the plane on m distinct vertices, which does not intersect itself. A chord is a line segment between two non-adjacent vertices of the polygon which lies entirely inside the polygon, so in particular, the endpoints of the chord are the only points of the chord that touch the boundary of the polygon. A triangulation of the polygon, is any choice of m - 3 chords, such that the polygon is divided into triangles. In a triangulation, no two of the chosen chords intersect each other, except at endpoints, and all of the remaining (unchosen) chords cross at least one of the chosen chords. Fortunately, finding an arbitrary triangulation is a fairly easy task, but what if you were asked to find the best triangulation according to some measure? Figure I.1: Five out of nine possible triangulations of the example polygon. The leftmost has the smallest largest triangle. Input On the first line of the input is a single positive integer n, telling the number of test scenarios to follow. Each scenario begins with a line containing one positive integer 2 < m < 50, being the number of vertices of the simple polygon. The following m lines contain the vertices of the polygon in the order they appear along the border, going either clockwise or counter clockwise, starting at an arbitrary vertex. Each vertex is described by a pair of integers x y obeying 0 <= x <= 10 000 and 0 <= y <= 10 000. Output For each scenario, output one line containing the area of the largest triangle in the triangulation of the polygon which has the smallest largest triangle. The area should be presented with one fractional decimal digit. Sample Input 1 6 7 0 6 2 9 5 3 5 0 3 1 1 Sample Output 9.0
- 回答 1 已采纳 Like many others I use WAMP on my local machine to test my PHP code and regularly use trigger_error to pin down issues with my scripts. This works really well but the one thing that is a constant irritant is the loquacity of the error_log file. Every PHP Notice is accompanied by a stack trace etc. I have often toyed with the idea of writing an application of some description that would help me to zero in on the information I want rapidly and without eye strain (I generally keep the error_log file open in my browser and just refresh it to check the latest entries). However, that would be a digression from the real job and chances are that something of the nature already exists. I have Googled a fair bit to find a ready made solution but have not found one yet. Perhaps someone here might be able to point me in the right direction?
- 10年前回答 4 已采纳 Part of my site requires user to input URLs, but in case they type the URL incorrectly or just input a non-existent one on purpose I end up with a bad record on my database. E.G in Chrome if there isn't anything at a URL you get the error message "Oops! Google Chrome could not find fdsafadsfadsf.com". (this is the case I'm referring) This could be solved by checking the URL to see if there is anything, I can only think of one which is loading the external URL in a PHP file and then parsing it's content. But I hope there is a method that doesn't put unneeded strain on my server. What other ways exist to check if there is anything at a particular URL?
- 7年前回答 1 已采纳 Part of my decryption process is using a RSA private key to decrypt part of my data. I store my private RSA Key on a separate server (as well as the password for the private RSA Key) from where I process the decryption request. Decryption of information in my SQL database happens a lot. So I am trying to figure out the most efficient way to grab my key and the password to the key so I don't bog down the server too much. note: I do not know how much strain this puts on a server so I may be completely wrong Right now, the only way I can think about doing it is SSH'ing into the server and grabbing the file contents and then closing the request. Does anyone have any suggestions? Something along the lines of this: $connection = ssh2_connect('domain.com', 22); ssh2_auth_password($connection, 'username', 'password'); $sftp = ssh2_sftp($connection); $file = fopen("ssh2.sftp://$sftp/path/to/file", 'r');
- 5年前回答 2 已采纳 问题描述 : Triangulation of surfaces has applications in the Finite Element Method of solid mechanics. The objective is to estimate the stress and strain on complex objects by partitioning them into small simple objects which are considered incompressible. It is convenient to approximate a plane surface with a simple polygon, i.e., a piecewise-linear, closed curve in the plane on m distinct vertices, which does not intersect itself. A chord is a line segment between two non-adjacent vertices of the polygon which lies entirely inside the polygon, so in particular, the endpoints of the chord are the only points of the chord that touch the boundary of the polygon. A triangulation of the polygon, is any choice of m – 3 chords, such that the polygon is divided into triangles. In a triangulation, no two of the chosen chords intersect each other, except at endpoints, and all of the remaining (unchosen) chords cross at least one of the chosen chords. Fortunately, finding an arbitrary triangulation is a fairly easy task, but what if you were asked to find the best triangulation according to some measure? Figure I.1: Five out of nine possible triangulations of the example polygon. The leftmost has the smallest largest triangle. 输入: On the first line of the input is a single positive integer n, telling the number of test scenarios to follow. Each scenario begins with a line containing one positive integer 2 < m < 50, being the number of vertices of the simple polygon. The following m lines contain the vertices of the polygon in the order they appear along the border, going either clockwise or counter clockwise, starting at an arbitrary vertex. Each vertex is described by a pair of integers x y obeying 0 <= x <= 10 000 and 0 <= y <= 10 000. 输出: On the first line of the input is a single positive integer n, telling the number of test scenarios to follow. Each scenario begins with a line containing one positive integer 2 < m < 50, being the number of vertices of the simple polygon. The following m lines contain the vertices of the polygon in the order they appear along the border, going either clockwise or counter clockwise, starting at an arbitrary vertex. Each vertex is described by a pair of integers x y obeying 0 <= x <= 10 000 and 0 <= y <= 10 000. 样例输入: 1 6 7 0 6 2 9 5 3 5 0 3 1 1 样例输出: 9.0
- 10年前回答 6 已采纳 Is there a numeric captcha available for PHP? (which doesn't rely on JavaScript being turned on) EDIT: I know there are JS-independent captchas out there. I know there are PHP captchas out there. I know there are numeric captchas out there. But I'm looking for a PHP numeric Javascript-independent captcha. The only numeric captcha's I've found are either for ASP.NET or jQuery/JS based ones. I don't want any of those as an answer to the question. And I'm not taking about a small website here. In the answer I'd like to know whether your suggestion puts a lot of strain on the server or not.
- zhangrelay的博客 Ubuntu 意外死机 （Linux Crash/Hang）解决以Intel Bay Trail/J1900/N2940 为例，通常是由于linux kernel和硬件兼容性问题导致：查询网址：https://bugzilla.kernel.org/点开... Bug List: (5 of 5) First Last Prev Ne
- sanlinux的博客 Chances are a thousand other people have noticed and the fix is already published. Index Basic Linux kernel documentation Contributors and some special expressions Related mailing ...
- 2年前echoechoin的博客 1、abandon vt.离弃，遗弃，抛弃；放弃。 放纵，放弃 a-否定（前缀）band-布带on 布带不在自己身上，放纵，放弃 band n.条，带；乐队；波段；v.绑扎 一群人绑在一起：乐队，一群 ...在小带子上写的字：slogan...
- 3年前weixin_38169562的博客 term slow contrast zone wake airport brown shirt pilot warn ultimately...fix appeal mirror tooth smart length entirely rely topic complain variable telephone perception attract confidence bedroom secret ...
- 3年前guanjianhe的博客 new brandy brass brave breach bread break breakdown breakfast ...bug build builder building bulb bulk bull bullet bulletin bully bump bun bunch bundle bungalow burden bureau bureaucracy bureaucrat ...
- 3年前dearbaba_1666的博客 &lt;?php // Plug-in 8: Spell Check // This is an executable example with additional code supplie
- vslyu的博客 Using username "sinc-lab". sinc-lab@115.156.132.2's password: Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-21-generic x86_64) * Documentation: https://help.ubuntu.com ...
- backard的博客 （从网上搜集的，并且整理为DOC文档，希望大家可以从这篇文章中学到更多的东西， ... 1、Don't put your resume（n. 履历） ahead of therequirements As engineers we sometimes recommend（v....
- sdfjlkjsdfsaldfsdf的博客 superword是一个Java实现的英文单词分析软件，主要研究英语单词音近形似转化规律、前缀后缀规律、词之间的相似性规律等等。 CET4、CET6、GRE、IELTS、TOEFL、考研英语总的词汇量为14055，其中有4646个出现到...
- 10年前Felven的博客 Design and implement a simple spell checker. 许多常用字处理软件都内置了拼写检查程序。请设计和实现自己的拼写检查程序。可以在程序中建立字典文件。 dictionary.txt ...abandon abandonment