求解关于html input标签中利用pattern属性和正则表达式没用的问题 10C
<html>
  <head>
    <title>查看/修改</title>
     <script language="JavaScript" src="script/trim.js"></script>
     <script language="JavaScript">
       function check(){

         document.all.mf.submit();
       }
     </script>
  </head>
  <body bgcolor="#EBF5FD">
    <jsp:useBean id="userBean" class="wyf.zrk.UserBean" scope="session"/>
    <table width="100%" height="44" bgcolor="#206AB3">
      <tr align="center"><td>
        <font color="#FFFFFF" size="5">电表信息管理</font>
        <font color="#FFFFFF" size="2">--电表信息添加</font>
      </td></tr>
    </table>
    <table>
      <tr><td><a href="javascript:history.back()">
        <img border="0" src="img/back.jpg"/></a>
      </td></tr>
    </table>
    <hr color="black" size="1"/>    
    <form action="ManageServlet" method="post" id="mf">
    <table width="80%" border="0" cellspacing="1" bgcolor="black" align="center">   
      <tr bgcolor="white">
        <td align="center">管理员姓名:</td>
        <td><input name="name" id="name" /></td>
      </tr>
      <tr bgcolor="white">
        <td align="center">居住地址:</td>
        <td>
          <select name="address">
          <% 
            //获取WebApplicationContext
            WebApplicationContext wac=
               WebApplicationContextUtils.getWebApplicationContext(this.getServletContext());
            DButil db = (DButil)wac.getBean("DButil");
            List<String> address = db.getHouseAddress();

            for(String name:address){

            %>
                <option value="<%= name %>" ><%= name %></option>
            <% 
                }
             %>
          </select>
        </td>
      </tr>
      <tr bgcolor="white">
        <td align="center">电表类型:</td>
        <td><input name="mtype" id="mtype" /></td>
      </tr>
      <tr bgcolor="white">
        <td align="center"> 电表型号:</td>
        <td><input name="machine" id="machine" /></td>
      </tr>
      <tr bgcolor="white">
        <td align="center">运营商:</td>
        <td><input name="company" id="company" /></td>
      </tr>
      <tr bgcolor="white">
        <td align="center">安装时间:</td>
        <td><input name="cometime" id="cometime" /></td>
      </tr> 
      <tr bgcolor="white">
        <td align="center">所在区域:</td>
        <td><input name="region" id="region" /></td>
      </tr>
    </table>
    <table align="center">
      <tr>
        <td><img border="0" src="img/xg.gif" id="xg" onclick="JavaScript:check()"
              style="cursor:hand"
              onmouseover="document.all.xg.src='img/xga.gif'"
              onmouseout="document.all.xg.src='img/xg.gif'"
              onmouseup="document.all.xg.src='img/xga.gif'"         
              onmousedown="document.all.xg.src='img/xgb.gif'"/></td>
        <td><img border="0" src="img/cze.gif" id="cz" onclick="JavaScript:document.all.mf.reset()"
              style="cursor:hand"
              onmouseover="document.all.cz.src='img/czd.gif'"
              onmouseout="document.all.cz.src='img/cze.gif'"
              onmouseup="document.all.cz.src='img/czd.gif'"         
              onmousedown="document.all.cz.src='img/czc.gif'"/></td>
      </tr>
    </table>
    <input type="hidden" name="action" value="adduser"/>


    </form>
  </body>
</html>

我想在 安装时间 那里的input后面添加确认格式为yyyy-mm-dd的正则表达式,上但加上去后却会直接跳过,求大神帮忙,顺便再求大神解惑一下javascript的check()方法和input的submit属性的区别,我这个例子可以改成用submit的方法吗,我现在无论怎么加正则表达式,我下面点击下面的图片都会运行check方法直接跳转,我该怎么处理才好?

3个回答

 <td align="center">安装时间:</td>
    <td><input name="cometime" id="cometime" /></td>

            这个cometime是“yyyy/mm/dd”这样的格式吗
qq_34471916
锋芒神话霜 是的,在数据库里的格式也是datetime
8 个月之前 回复
<input name="datetime"  type="text" placeholder="日期" pattern="[0-9]{4}\/[0-9]{2}\/[0-9]{2}" required oninvalid="setCustomValidity('日期格式yyyy/mm/dd')" oninput="setCustomValidity('')" />

qq_35235940
听楼一夜雨 [0-9]{4}-[0-1]{1}[0-9]{1}-[0-3]{1}[0-9]{1}
8 个月之前 回复
qq_34471916
锋芒神话霜 你好,我改了一下格式要求,要求是yyyy-mm-dd的格式,请问应该怎么改啊
8 个月之前 回复

提交的时候 必须要在form 里面 用 或者 标签提交才能生效的,点击按钮后才生效。希望采纳

qq_34471916
锋芒神话霜 请问能不能具体一些啊,比如说写出具体代码之类的
8 个月之前 回复
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Parking Ships 问题求解
Problem Description Life on the great oceans has been good for captain Blackbeard and his fellow pirates. They have gathered so many treasures, that each of them is able to buy a house on their favorite island. The houses on this island are all placed in a long row along the beach line of the island. Next to a house, every pirate is also able to buy his own ship to do their own bit of plundering. However, this causes a whole new kind of problem. Along the beach line there is a long pier where every pirate can park his ship. Although there is enough space along the pier for all the ships, not every pirate will be able to park in front of his house. A pirate is happy with his parking space if some part of the parking space is in front of the center of his house. Captain Blackbeard has been given the diffcult task of assigning the parking spaces to the pirates. A parking space for a pirate i is a range [ai, bi] (ai, bi∈R) along the pier such that li<= bi - ai, where li is the length of the ship of pirate i. Thus, pirate i is happy if ai <= xi <= bi, where xi is the center of the house of pirate i. Clearly, parking spaces of different pirates must be interior disjoint (the ends of ranges can coincide). Above all, the captain wants a good parking space for himself, so he gives himself the parking space such that the center of his ship is aligned with the center of his house. Next to that, he wants to make as many pirates happy as possible. Can you help him out? Input The first line of the input contains a single number: the number of test cases to follow. Each test case has the following format: 1.One line with one integer n (1 <= n <= 1,000): the number of pirates including the captain. 2.n lines with on each line two integers xi (-10^9 <= xi <= 10^9) and li (1 <= li <= 10^9): the center of the house of the ith pirate and the total length of his ship, respectively. The first pirate in the input is always the captain. Output For every test case in the input, the output should contain one integer on a single line: the maximum number of happy pirates using an optimal assignment of the parking spaces. This number includes the captain himself. You can assume that the space along the pier is unbounded in both directions. Sample Input 2 5 0 6 -5 2 -4 1 4 2 5 3 4 0 4 -5 4 3 4 5 3 Sample Output 5 3
Family Fortune 怎么求解
Problem Description While studying the history of wealthy families, researchers want to know just how much of a fortune each family has amassed. There are various 'net worth' figures for each individual throughout history, but totaling them is complicated by double counting, caused by inheritance. One way to estimate the wealth of a family is to sum up the net worth of a set of K people such that no one in the set is an ancestor or a descendant of anyone else in the set. The wealth of the family is the maximum sum achievable over all such sets of K people. Since historical records contain only the net worth of male family members, the family tree is a simple tree in which every male has exactly one father and a non-negative number of sons. Also, there is exactly one person who is an ancestor of all other family members. Given information about a family tree, what is the wealth of the family, by this measure? Input There will be several test cases in the input. Each test case will begin with two integers: N K Where N (1 ≤ N ≤ 100,000) is the total number of family members in the records, and K (1 ≤ K ≤ 1,000) is the size of the desired set of people. Each of the next N lines will hold two integers: P W Where P (0 ≤ P ≤ N) indicates the parent of that family member. The family members are numbered from 1 to N, with the parent and fortune of family member i appearing on the i^th line. There will be a single root, with P=0. The tree will not have a depth greater than 1,000, and, of course, it won’t have any cycles. W (1 ≤ W ≤ 1,000) is the wealth (in millions) of that family member. The input will end with a line with two 0s. Output For each test case, output a single integer on its own line, which is the maximum sum (in millions) of the fortunes of a set of K family members in the tree, where no member of the set is an ancestor or descendant of any other member of the set. If you cannot find K such nodes, then output 0. Output no extra spaces, and do not separate answers with blank lines. Sample Input 11 5 0 1 1 1 1 1 2 1 2 1 3 1 3 1 3 1 5 1 7 1 7 1 11 5 11 3 1 1 4 1 1 2 10 2 10 2 6 2 6 1 10 2 11 3 0 4 7 3 0 18 1 20 1 15 2 12 2 6 3 8 3 8 0 0 Sample Output 5 10 36
IMBA? 问题求解
Problem Description As a kind problem setter, I should warn you, as you may already notice the sample output, it’s a horrible problem and very IMBA (imbalanced). Today we learn circle, a circle is a simple shape of Euclidean geometry consisting of those points in a plane that are a given distance from a given point, the center. The distance between any of the points and the center is called the radius. Circles are simple closed curves which divide the plane into two regions: an interior and an exterior. In everyday use, the term "circle" may be used interchangeably to refer to either the boundary of the figure, or to the whole figure including its interior; in strict technical usage, the circle is the former and the latter is called a disk. A circle can be defined as the curve traced out by a point that moves so that its distance from a given point is constant. A circle may also be defined as a special ellipse in which the two foci are coincident and the eccentricity is 0. Circles are conic sections attained when a right circular cone is intersected by a plane perpendicular to the axis of the cone. Now let’s draw a circle with your program. Given a radius R, we draw a circle in a (2*R + 1) * (2*R + 1) rectangle, set the center of circle at (R, R) (0-based), for all point, if the square root of the difference between the square of its distance to the center and the square of the radius is less than 1.732050807568877293527446341505872366942805253810380628055806979451933016908800037081146186757248575675626141415406703029969945094998952478 81165551209437364852809323190230558206797482010108467492326501531234326690332288665067225466892183797122704713166036786158801904998653737985 9389467650347506576051, draw a star (‘*’), otherwise draw a blank. Refer to the output for more details. To avoid Presentation Error, you should output exactly the same characters in each row of one test case. The sample output are not completely standard for some non-shown blanks, take care. Input The first line contains a single integer T, indicating the number of test cases. Each test case contains one integer R. Technical Specification 1. 1 <= T <= 10 2. 3 <= R <= 18 Output For each test case, output the case number in the first line, then a circle required in the description. Sample Input 2 10 13 Sample Output Case 1: *** * * * * * * * * * * * * * * * * * * * * * * * * * * *** Case 2: *** * * * * * * * * * * * * * * * * * * * * * * ***
python中如何判断0123全是数字?
python中如何判断0123全是数字? 代码如何实现,求解
localhost本地无法访问项目,求解?
1、运行项目没有报错。 2、防火墙杀毒软件全部关闭。 3、端口号没有改。 4、server配置文件没动。 5、localhost:8080正常 以上都验证过了,但是启动项目后,访问不了,日志什么也没用打印?请问大佬知道有可能是哪里的问题吗?
在Dos中进行java编译运行
javac在c盘,java文件在f盘,我再Dos中写入javac的路径到bin目录 然后javac f:\Program Files\test\HelloWorld. java ,提示javac:无效标志:F:\Program,求解
Permutaion 问题求解
Problem Description As we known, there are N! permutations of {1,2,...N}. Now you are requested to find how many permutations satisfying that, the difference of every two adjacent numbers is not more than K. Because the answer may be quite large, you only need to output the answer module (%) 1,000,000,007. You can assume 2 <= N <= 50 and 0 <= K <= 4. Input There are several lines of the input. Each line indicates one test case, and contains two numbers N and K. Output Output one line for each test case, indicating the answer module 1,000,000,007. Sample Input 4 2 Sample Output 12
反素数 程序求解
Problem Description 反素数就是满足对于任意i(0<i<x),都有g(i)<g(x),(g(x)是x的因子个数),则x为一个反素数。现在给你一个整数区间[a,b],请你求出该区间的x使g(x)最大。 Input 第一行输入n,接下来n行测试数据 输入包括a,b, 1<=a<=b<=5000,表示闭区间[a,b]. Output 输出为一个整数,为该区间因子最多的数.如果满足条件有多个,则输出其中最小的数. Sample Input 3 2 3 1 10 47 359 Sample Output 2 6 240
排列组合 问题求解
Problem Description 有n种物品,并且知道每种物品的数量。要求从中选出m件物品的排列数。例如有两种物品A,B,并且数量都是1,从中选2件物品,则排列有"AB","BA"两种。 Input 每组输入数据有两行,第一行是二个数n,m(1<=m,n<=10),表示物品数,第二行有n个数,分别表示这n件物品的数量。 Output 对应每组数据输出排列数。(任何运算不会超出2^31的范围) Sample Input 2 2 1 1 Sample Output 2
求解后台怎么通过http请求访问这个方法?求代码
@RequestMapping(value = "/va/save/", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_UTF8_VALUE, consumes = MediaType.APPLICATION_JSON_VALUE) public R saveImmigrationByPersonInfo( @RequestParam("token") String token, @RequestParam("code") String code) { ..... }
php导出数据量过大 出现空白页
![图片说明](https://img-ask.csdn.net/upload/202001/16/1579153270_478077.jpg) # php 做文件导出时 数据量过大时 出现这样的空白页 大神求解?
Crystal mine 求解
Problem Description Legends always begin with the sentence “Long long ago......” Long long ago, there is a kingdom. The border of this kingdom is rectangular, and some lakes in it. Old king divides land to N * M areas. So, we can regard this kingdom as a matrix. Every element of matrix is an area. This kingdom is famous for crystal mine, because every land contains an ocean of crystal underground, except lakes. Now, the old king wants to build a large rectangular mine field in a rectangular range which is decide by him. What’s more, he wants to build a special area in mine field, which can produce crystal manyfold. Notice that mine field can't contain lakes. Unfortunately, the old king is too old to remember something. He always asks his adviser this question with different range. Adviser is tired of answering those questions day by day. So, you are assigned to solve this problem. You get the kingdom map, and the amount of crystal of every area (as A[][]) has been marked on this map. You should find out the best plan to build this mine field which can produce most crystal. Old king never care the details of plan. The only thing he wants know is the number of crystal the mine field can produce. Input There are several test cases in the input file. The first line of input file contains a number T, representing the number of test cases. For each test case: First line contains four integers separated by a single blank, N (1 <= N <= 150), M (1 <= M <= 150), Q (1<= Q <= 200), S (1 <= S <= 10). The size of matrix is N * M. Q indicates the number of questions of old king. S indicates that, if you set the special area in (i,j), (i,j) will produce S * A[i][j] instead of A[i][j]. The following N lines, each line contains M number, the j-th number of i-th line represent A[i][j] (-1 <= A[i][j] < 100 ). Number -1 indicates that, this area is a lake. Otherwise A[i][j] indicates the amount of crystal in this area. Following Q line, each line contains four integers p, q, x, y. (1 <= p <= x <= N, 1 <= q <= y <= M) indicating the rectangular range of this question is from (p,q) to (x,y). (p,q) is upper left corner of range, and (x,y) is lower right corner of range. Output For each test case, first line should contains “Case #: ”, ”#”is case number (starting from 1). Each of the following Q line contains a number indicating the answer of question. Look at sample output for more details. There is a blank line between two consecutive test cases. Sample Input 1 4 4 3 2 1 -1 0 3 1 1 2 0 2 1 0 -1 1 4 6 1 1 1 1 1 1 1 3 3 1 3 3 4 Sample Output Case 1: 2 9 8
Pachinko 求解
Problem Description Pachinko is a Japanese game played for amusement and prizes, and is similar to pinball. The game is very simple: you shoot small metal balls into the machine and they fall down, bouncing off the obstacles until they fall into a gate. The gate into which your ball falls determines the winnings. Since you can more or less determine the column into which the ball is dropped (by setting its initial speed and direction), you can influence your win chances. You are to calculate your expected winnings. We model the pachinko machine as follows: you can drop the ball in any column and it falls down until it either reaches the bottom of the machine (which results in no wins), a gate (indicated by a number 1 to 9, which results in that win) or an obstacle (indicated by a asterisk). If a ball hits an obstacle it proceeds falling in the column to the left or to the right of the obstacle, with 50/50 probability. No two obstacles or gates are adjacent, not even diagonally, and none is located in the leftmost or rightmost column. Input On the first line an integer t (1 <= t <= 100): the number of test cases. Then for each test case: One line with two integers h and w (1 <= h,w <= 100): the height and width of the pachinko machine. h lines with w characters describing the pachinko machine. A '.' denotes an empty space, '*' an obstacle and '1'. . . '9' the winning gates. Output For each testcase: One line with the maximal expected winnings with either an absolute or a relative error of at most 10-6. Sample Input 3 7 5 ..... .1... ...2. .*... ..... ..... ..5.. 8 8 ...1.... ........ ..*...*. ....*... .1...... ...*.*.. ........ ..9.7.7. 10 10 .*.*.*.*.. .......... ..*.*.*.*. .......... .*.*.*.*.. .......... ..*.*.*.*. .......... .*.*.*.*.. ....9..... Sample Output 5.000000 7.500000 3.375000
Air Raid 问题求解
Problem Description Consider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that starting from an intersection and walking through town's streets you can never reach the same intersection i.e. the town's streets form no cycles. With these assumptions your task is to write a program that finds the minimum number of paratroopers that can descend on the town and visit all the intersections of this town in such a way that more than one paratrooper visits no intersection. Each paratrooper lands at an intersection and can visit other intersections following the town streets. There are no restrictions about the starting intersection for each paratrooper. Input Your program should read sets of data. The first line of the input file contains the number of the data sets. Each data set specifies the structure of a town and has the format: no_of_intersections no_of_streets S1 E1 S2 E2 ...... Sno_of_streets Eno_of_streets The first line of each data set contains a positive integer no_of_intersections (greater than 0 and less or equal to 120), which is the number of intersections in the town. The second line contains a positive integer no_of_streets, which is the number of streets in the town. The next no_of_streets lines, one for each street in the town, are randomly ordered and represent the town's streets. The line corresponding to street k (k <= no_of_streets) consists of two positive integers, separated by one blank: Sk (1 <= Sk <= no_of_intersections) - the number of the intersection that is the start of the street, and Ek (1 <= Ek <= no_of_intersections) - the number of the intersection that is the end of the street. Intersections are represented by integers from 1 to no_of_intersections. There are no blank lines between consecutive sets of data. Input data are correct. Output The result of the program is on standard output. For each input data set the program prints on a single line, starting from the beginning of the line, one integer: the minimum number of paratroopers required to visit all the intersections in the town. Sample Input 2 4 3 3 4 1 3 2 3 3 3 1 3 1 2 2 3 Sample Output 2 1
求解正则表达式处理问题
如何如何利用正则表达式将 11223344aabb 处理为 11:22:33:44:aa:bb
Paint on a Wall 思路的求解
Problem Description Annie wants to paint her wall to an expected pattern. The wall can be represented as a 2*n grid and each grid will be painted only one color. Annie has a brush which could paint a rectangular area of the wall at a single step. The paint could be overlap and the newly painted color will replace the older one. For a given pattern of the wall, your task is to help Annie find out the minimum possible number of painting steps. You can assume that the wall remains unpainted until Annie paint some colors on it. Input There are multiple test cases in the input. The first line contains the number of test cases. For each test case, the first line contains the only integer n indicating the length of the wall. (1 <= n <= 8) Two lines follow, denoting the expected pattern of the wall. The color is represented by a single capital letter. See the sample input for further details. Output For each test case, output only one integer denoting the minimum number of steps. Sample Input 3 3 ABA CBC 3 BAA CCB 3 BBB BAB Sample Output Case #1: 3 Case #2: 3 Case #3: 2
Shoot-out 的求解
Problem Description This is back in the Wild West where everybody is fighting everybody. In particular, there are n cowboys, each with a revolver. These are rather civilized cowboys, so they have decided to take turns firing their guns until only one is left standing. Each of them has a given probability of hitting his target, and they all know each other’s probability. Furthermore, they are geniuses and always know which person to aim at in order to maximize their winning chance, so they are indeed peculiar cowboys. If there are several equally good targets, one of those will be chosen at random. Note that a cowboy’s code of ethics forces him to do his best at killing one of his opponents, even if intentionally missing would have increased his odds (yes, this can happen!) Input On the first line of the input is a single positive integer t, telling the number of test cases to follow. Each case consists of one line with an integer 2 ≤ n ≤ 13 giving the number of cowboys, followed by n positive integers giving hit percentages for the cowboys in the order of their turns. Output For each test case, output one line with the percent probabilities for each of them surviving, in the same order as the input. The numbers should be separated by a space and be correctly rounded to two decimal places. Sample Input 5 2 1 100 3 100 99 98 3 50 99 100 3 50 99 99 3 50 99 98 Sample Output 1.00 99.00 2.00 0.00 98.00 25.38 74.37 0.25 25.38 49.50 25.12 25.63 24.63 49.74
Falling Ice 具体的求解
Problem Description Imagine disks of ice falling, one at a time, into a box, each ending up at the lowest point it can reach without overlapping or moving previous disks. Each disk then freezes into place, so it cannot be moved by later disks. Your job is to find the overall height of the final combination of disks. So that the answer is unique, assume that any disk reaching the bottom of the box rolls as far to the left as possible. Also the data is chosen so there will be a unique lowest position for any disk that does not reach the bottom. The data is also such that there are no "perfect fits": each disk that lands will be in contact with only two other points, on previous circles or the sides of the box. The illustrations above show white filled disks labeled with the order in which they fall into their boxes. The gray circle in the fourth illustration is not intended to be a disk that fell in. The gray disk is included to demonstrate a point: the gray disk is the same size as disk 2, so there is space for disk 2 on the very bottom of its box, but disk 2 cannot reach that position by falling from the top. It gets caught on disk 1 and the side of the box. One way to find the top intersection point of two intersecting circles is as follows. Suppose circle 1 has center (x1, y1) and radius r1, and suppose circle 2 has center (x2, y2), and radius r2. Also assume that circle 1 is to the left of circle 2, i.e., x1 < x2. Let dx = x2 - x1, dy = y2 - y1, D = sqrt(dx*dx + dy*dy), E = (r1*r1 - r2*r2 + D*D)/(2*D), F = sqrt(r1*r1 - E*E); then the upper intersection point is (x1 + (E*dx - F*dy)/D, y1 + (F*dx + E*dy)/D). Input The input consists of one or more data sets, followed by a line containing only 0 that signals the end of the input. Each data set is on a line by itself and contains a sequence of three or more blank-separated positive integers, in the format w, n, d1, d2, d3, ..., dn, where w is the width of the box, n is the number of disks, and the remaining numbers are the diameters of the disks, in the order in which they fall into the box. You can assume that w < 100, that n < 10, and that each diameter is less than w. Output For each data set, output a single line containing the height of the pile of disks, rounded to two places beyond the decimal point. Sample Input 10 3 5 2 3 8 2 5 5 11 3 10 2 4 9 3 4 4 6 10 6 5 4 6 3 5 2 0 Sample Output 5.00 9.00 12.99 9.58 14.19
关于正则表达式的问题
我之前学了正则表达式的语法,后来在网上找了一个正则表达式的库,然后,然后找了代码,但是却匹配不出来,但是表达式在正则表达式测试器里面测过的,能够匹配出来啊?怎么回事?是不是不同的库语法不一样?求解。
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过...
大学四年自学走来,这些私藏的实用工具/学习网站我贡献出来了
大学四年,看课本是不可能一直看课本的了,对于学习,特别是自学,善于搜索网上的一些资源来辅助,还是非常有必要的,下面我就把这几年私藏的各种资源,网站贡献出来给你们。主要有:电子书搜索、实用工具、在线视频学习网站、非视频学习网站、软件下载、面试/求职必备网站。 注意:文中提到的所有资源,文末我都给你整理好了,你们只管拿去,如果觉得不错,转发、分享就是最大的支持了。 一、PDF搜索网站推荐 对于大部
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
比特币原理详解
一、什么是比特币 比特币是一种电子货币,是一种基于密码学的货币,在2008年11月1日由中本聪发表比特币白皮书,文中提出了一种去中心化的电子记账系统,我们平时的电子现金是银行来记账,因为银行的背后是国家信用。去中心化电子记账系统是参与者共同记账。比特币可以防止主权危机、信用风险。其好处不多做赘述,这一层面介绍的文章很多,本文主要从更深层的技术原理角度进行介绍。 二、问题引入  假设现有4个人
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 IT 类的外包开发,是非标品开发,所以很有可能在开发过程中会有这样那样的需求修改,而这种需求修改很容易造成扯皮,进而影响到费用支付,甚至出现做完了项目收不到钱的情况。 那么,怎么保证自己的薪酬安全呢? 我们在开工前,一定要做好一些证据方面的准备(也就是“讨薪”的理论依据),这其中最重要的就是需求文档和验收标准。一定要让需求方提供这两个文档资料作为开发的基础。之后开发
网页实现一个简单的音乐播放器(大佬别看。(⊙﹏⊙))
今天闲着无事,就想写点东西。然后听了下歌,就打算写个播放器。 于是乎用h5 audio的加上js简单的播放器完工了。 欢迎 改进 留言。 演示地点跳到演示地点 html代码如下`&lt;!DOCTYPE html&gt; &lt;html&gt; &lt;head&gt; &lt;title&gt;music&lt;/title&gt; &lt;meta charset="utf-8"&gt
Python十大装B语法
Python 是一种代表简单思想的语言,其语法相对简单,很容易上手。不过,如果就此小视 Python 语法的精妙和深邃,那就大错特错了。本文精心筛选了最能展现 Python 语法之精妙的十个知识点,并附上详细的实例代码。如能在实战中融会贯通、灵活使用,必将使代码更为精炼、高效,同时也会极大提升代码B格,使之看上去更老练,读起来更优雅。 1. for - else 什么?不是 if 和 else 才
数据库优化 - SQL优化
前面一篇文章从实例的角度进行数据库优化,通过配置一些参数让数据库性能达到最优。但是一些“不好”的SQL也会导致数据库查询变慢,影响业务流程。本文从SQL角度进行数据库优化,提升SQL运行效率。 判断问题SQL 判断SQL是否有问题时可以通过两个表象进行判断: 系统级别表象 CPU消耗严重 IO等待严重 页面响应时间过长
2019年11月中国大陆编程语言排行榜
2019年11月2日,我统计了某招聘网站,获得有效程序员招聘数据9万条。针对招聘信息,提取编程语言关键字,并统计如下: 编程语言比例 rank pl_ percentage 1 java 33.62% 2 c/c++ 16.42% 3 c_sharp 12.82% 4 javascript 12.31% 5 python 7.93% 6 go 7.25% 7
通俗易懂地给女朋友讲:线程池的内部原理
餐厅的约会 餐盘在灯光的照耀下格外晶莹洁白,女朋友拿起红酒杯轻轻地抿了一小口,对我说:“经常听你说线程池,到底线程池到底是个什么原理?”我楞了一下,心里想女朋友今天是怎么了,怎么突然问出这么专业的问题,但做为一个专业人士在女朋友面前也不能露怯啊,想了一下便说:“我先给你讲讲我前同事老王的故事吧!” 大龄程序员老王 老王是一个已经北漂十多年的程序员,岁数大了,加班加不动了,升迁也无望,于是拿着手里
经典算法(5)杨辉三角
写在前面: 我是 扬帆向海,这个昵称来源于我的名字以及女朋友的名字。我热爱技术、热爱开源、热爱编程。技术是开源的、知识是共享的。 这博客是对自己学习的一点点总结及记录,如果您对 Java、算法 感兴趣,可以关注我的动态,我们一起学习。 用知识改变命运,让我们的家人过上更好的生活。 目录一、杨辉三角的介绍二、杨辉三角的算法思想三、代码实现1.第一种写法2.第二种写法 一、杨辉三角的介绍 百度
腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹?
昨天,有网友私信我,说去阿里面试,彻底的被打击到了。问了为什么网上大量使用ThreadLocal的源码都会加上private static?他被难住了,因为他从来都没有考虑过这个问题。无独有偶,今天笔者又发现有网友吐槽了一道腾讯的面试题,我们一起来看看。 腾讯算法面试题:64匹马8个跑道需要多少轮才能选出最快的四匹? 在互联网职场论坛,一名程序员发帖求助到。二面腾讯,其中一个算法题:64匹
面试官:你连RESTful都不知道我怎么敢要你?
面试官:了解RESTful吗? 我:听说过。 面试官:那什么是RESTful? 我:就是用起来很规范,挺好的 面试官:是RESTful挺好的,还是自我感觉挺好的 我:都挺好的。 面试官:… 把门关上。 我:… 要干嘛?先关上再说。 面试官:我说出去把门关上。 我:what ?,夺门而去 文章目录01 前言02 RESTful的来源03 RESTful6大原则1. C-S架构2. 无状态3.统一的接
为啥国人偏爱Mybatis,而老外喜欢Hibernate/JPA呢?
关于SQL和ORM的争论,永远都不会终止,我也一直在思考这个问题。昨天又跟群里的小伙伴进行了一番讨论,感触还是有一些,于是就有了今天这篇文。 声明:本文不会下关于Mybatis和JPA两个持久层框架哪个更好这样的结论。只是摆事实,讲道理,所以,请各位看官勿喷。 一、事件起因 关于Mybatis和JPA孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
SQL-小白最佳入门sql查询一
一 说明 如果是初学者,建议去网上寻找安装Mysql的文章安装,以及使用navicat连接数据库,以后的示例基本是使用mysql数据库管理系统; 二 准备前提 需要建立一张学生表,列分别是id,名称,年龄,学生信息;本示例中文章篇幅原因SQL注释略; 建表语句: CREATE TABLE `student` ( `id` int(11) NOT NULL AUTO_INCREMENT, `
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // dosho
【图解经典算法题】如何用一行代码解决约瑟夫环问题
约瑟夫环问题算是很经典的题了,估计大家都听说过,然后我就在一次笔试中遇到了,下面我就用 3 种方法来详细讲解一下这道题,最后一种方法学了之后保证让你可以让你装逼。 问题描述:编号为 1-N 的 N 个士兵围坐在一起形成一个圆圈,从编号为 1 的士兵开始依次报数(1,2,3…这样依次报),数到 m 的 士兵会被杀死出列,之后的士兵再从 1 开始报数。直到最后剩下一士兵,求这个士兵的编号。 1、方
致 Python 初学者
文章目录1. 前言2. 明确学习目标,不急于求成,不好高骛远3. 在开始学习 Python 之前,你需要做一些准备2.1 Python 的各种发行版2.2 安装 Python2.3 选择一款趁手的开发工具3. 习惯使用IDLE,这是学习python最好的方式4. 严格遵从编码规范5. 代码的运行、调试5. 模块管理5.1 同时安装了py2/py35.2 使用Anaconda,或者通过IDE来安装模
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,
程序员:我终于知道post和get的区别
IT界知名的程序员曾说:对于那些月薪三万以下,自称IT工程师的码农们,其实我们从来没有把他们归为我们IT工程师的队伍。他们虽然总是以IT工程师自居,但只是他们一厢情愿罢了。 此话一出,不知激起了多少(码农)程序员的愤怒,却又无可奈何,于是码农问程序员。 码农:你知道get和post请求到底有什么区别? 程序员:你看这篇就知道了。 码农:你月薪三万了? 程序员:嗯。 码农:你是怎么做到的? 程序员:
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU
加快推动区块链技术和产业创新发展,2019可信区块链峰会在京召开
      11月8日,由中国信息通信研究院、中国通信标准化协会、中国互联网协会、可信区块链推进计划联合主办,科技行者协办的2019可信区块链峰会将在北京悠唐皇冠假日酒店开幕。   区块链技术被认为是继蒸汽机、电力、互联网之后,下一代颠覆性的核心技术。如果说蒸汽机释放了人类的生产力,电力解决了人类基本的生活需求,互联网彻底改变了信息传递的方式,区块链作为构造信任的技术有重要的价值。   1
程序员把地府后台管理系统做出来了,还有3.0版本!12月7号最新消息:已在开发中有github地址
第一幕:缘起 听说阎王爷要做个生死簿后台管理系统,我们派去了一个程序员…… 996程序员做的梦: 第一场:团队招募 为了应对地府管理危机,阎王打算找“人”开发一套地府后台管理系统,于是就在地府总经办群中发了项目需求。 话说还是中国电信的信号好,地府都是满格,哈哈!!! 经常会有外行朋友问:看某网站做的不错,功能也简单,你帮忙做一下? 而这次,面对这样的需求,这个程序员
网易云6亿用户音乐推荐算法
网易云音乐是音乐爱好者的集聚地,云音乐推荐系统致力于通过 AI 算法的落地,实现用户千人千面的个性化推荐,为用户带来不一样的听歌体验。 本次分享重点介绍 AI 算法在音乐推荐中的应用实践,以及在算法落地过程中遇到的挑战和解决方案。 将从如下两个部分展开: AI 算法在音乐推荐中的应用 音乐场景下的 AI 思考 从 2013 年 4 月正式上线至今,网易云音乐平台持续提供着:乐屏社区、UGC
【技巧总结】位运算装逼指南
位算法的效率有多快我就不说,不信你可以去用 10 亿个数据模拟一下,今天给大家讲一讲位运算的一些经典例子。不过,最重要的不是看懂了这些例子就好,而是要在以后多去运用位运算这些技巧,当然,采用位运算,也是可以装逼的,不信,你往下看。我会从最简单的讲起,一道比一道难度递增,不过居然是讲技巧,那么也不会太难,相信你分分钟看懂。 判断奇偶数 判断一个数是基于还是偶数,相信很多人都做过,一般的做法的代码如下
日均350000亿接入量,腾讯TubeMQ性能超过Kafka
整理 | 夕颜出品 | AI科技大本营(ID:rgznai100) 【导读】近日,腾讯开源动作不断,相继开源了分布式消息中间件TubeMQ,基于最主流的 OpenJDK8开发的
8年经验面试官详解 Java 面试秘诀
    作者 | 胡书敏 责编 | 刘静 出品 | CSDN(ID:CSDNnews) 本人目前在一家知名外企担任架构师,而且最近八年来,在多家外企和互联网公司担任Java技术面试官,前后累计面试了有两三百位候选人。在本文里,就将结合本人的面试经验,针对Java初学者、Java初级开发和Java开发,给出若干准备简历和准备面试的建议。   Java程序员准备和投递简历的实
面试官如何考察你的思维方式?
1.两种思维方式在求职面试中,经常会考察这种问题:北京有多少量特斯拉汽车? 某胡同口的煎饼摊一年能卖出多少个煎饼? 深圳有多少个产品经理? 一辆公交车里能装下多少个乒乓球? 一
相关热词 c# 输入ip c# 乱码 报表 c#选择结构应用基本算法 c# 收到udp包后回包 c#oracle 头文件 c# 序列化对象 自定义 c# tcp 心跳 c# ice连接服务端 c# md5 解密 c# 文字导航控件
立即提问

相似问题

5
主键生成策略中IDENTITY跟AUTO的区别,请详细说明,求解
1
关于opencv中的convexhull函数求解问题
2
关于创建springboot项目,test测试类引包异常报错求解?
4
JAVA编程题求解方法和思路
2
来自计算机菜鸟的提问 :c语言中void怎么用?求解求解。求师傅
4
怎样用js代码 使input(文本框)中的ondblclick事件失效
2
求解:ueditor中去掉选中图片设置对齐方式的样式?
4
将html转成图片 手机端 下载base64 的图片下载失败?pc端正常什么原因?求解?
2
求解10的1000次方怎么办
2
html audio标签在iPhone手机上打开为什么controls不起作用
0
跪求大佬帮忙看一下表达式求解问题
3
多个form表单数据一修改全变了,求解
1
方块染色算法的计算机的求解过程,怎么利用C程序语言的设计的技术来编写代码的
0
分数和分数的平方的等式问题利用C语言的办法如何求解,具体一个问题的代码的实现
1
求解关于scrapy请求会自动携带上一次请求中的set-cookie字段的问题
1
python从键盘输入整数n,输出数字方阵。求解。
2
设置了Tomcat的服务后启动报1053,不知道为什么,求解
1
raptor问题求解,快救救孩子叭
2
求解下载文件名中文变为下划线,改成new String(fileName.getBytes("UTF-8"), "ISO8859-1")后又变成了乱码。
0
置换组合的排序算法问题,怎么利用C程序的代码编写技术实现序列的位置的求解?