pascal 计算几何 求大神解答 就是清帝之惑之雍正那个 谢谢

描述 Description   话说雍正为了实施促进城市间沟通的政策,他计划在所有的大城市里挑选两个城市,在两个城市之间修建一条运河,这条运河要求是笔直的,以加强这两个城市的经济往来。但雍正希望这条运河长度越短越好,他请来了宰相和大学士帮他解决这个问题——到底挑哪两个大城市,在其间建造运河,使得其长度最小,最小为多少?可是经过长时间的计算和判断,仍然没有得出结果。此时,雍正想到了当初为康熙解决难题的你,是如此的智慧,如此的聪明绝顶。他亲自来到茅厕,找到了你(你当时已然是一个扫厕所的了),希望你能帮他解决这个问题,必定“厚”谢。你欣然答应了。
  雍正将大致的情况告诉了你,并且说:大清一共有n个大城市,所有的大城市都不在同一个地点,同时我们对这n个城市从1到n进行编号;对于一个城市k,他有两个属性,一个是Xk,一个是Yk,分别表示这个城市所处的经度和纬度。请你告诉他问题的结果:L,即运河长度。(你可以假定地球是平面的)
输入格式 Input Format   第1行,一个整数n。
  从第2行到n+1行,按照i从小到大顺序,每行两个整数Xi,Yi,代表编号为i的城市的经度和纬度。
  其中2<=n <=100000,1<=Xi,Yi<2^31。
输出格式 Output Format   一个实数L(保留三位小数)。
求思路!!!谢谢!!!

2个回答

http://blog.sina.cn/dpool/blog/s/blog_6678bed30100hqvp.html?vt=4

http://blog.sina.com.cn/s/blog_6243d9940100f5sy.h

最后小小的问一句,这题怎么这么浓厚的历史氛围呢。。。。

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
pascal 计算几何 求大神赐教 谢谢!!
描述 Description   话说雍正为了实施促进城市间沟通的政策,他计划在所有的大城市里挑选两个城市,在两个城市之间修建一条运河,这条运河要求是笔直的,以加强这两个城市的经济往来。但雍正希望这条运河长度越短越好,他请来了宰相和大学士帮他解决这个问题——到底挑哪两个大城市,在其间建造运河,使得其长度最小,最小为多少?可是经过长时间的计算和判断,仍然没有得出结果。此时,雍正想到了当初为康熙解决难题的你,是如此的智慧,如此的聪明绝顶。他亲自来到茅厕,找到了你(你当时已然是一个扫厕所的了),希望你能帮他解决这个问题,必定“厚”谢。你欣然答应了。   雍正将大致的情况告诉了你,并且说:大清一共有n个大城市,所有的大城市都不在同一个地点,同时我们对这n个城市从1到n进行编号;对于一个城市k,他有两个属性,一个是Xk,一个是Yk,分别表示这个城市所处的经度和纬度。请你告诉他问题的结果:L,即运河长度。(你可以假定地球是平面的) 输入格式 Input Format   第1行,一个整数n。   从第2行到n+1行,按照i从小到大顺序,每行两个整数Xi,Yi,代表编号为i的城市的经度和纬度。   其中2<=n <=100000,1<=Xi,Yi<2^31。 输出格式 Output Format   一个实数L(保留三位小数)。 求详解!!! 谢谢!!!
pascal 问题 计算式子的值 求大神指点
描述 Description 给定一个表达式串,计算其最后结果 输入格式 Input Format 一个表达式串(只包函+-*/()等运算符,且是整除;表达式长度小于255个字符) 输出格式 Output Format 最后结果(一个整数) 样例输入 1+2*3+(1+2) 样例输出 10 program p1654; var tot:ansistring; function f(st:ansistring):longint; var i,len,khw,ans,n,m:longint; fh:boolean; begin if st='' then exit (0); n:=520; len:=length(st); fh:=false; ans:=0; for i:=1 to len do if st[i]in['+','-','*','/'] then fh:=true; if not fh then begin val(st,ans);exit(ans);end; khw:=0; for i:=len downto 1 do begin if st[i] =')' then inc(khw); if st[i] ='(' then dec(khw); if khw=0 then begin if st[i]in['+','-','*','/'] then begin case st[i] of '+':begin n:=1;m:=i;end; '-':if n<>1 then begin n:=2;m:=i;end; '*':if not(n in[1,2]) then begin n:=3;m:=i;end; '/':if not(n in[1,2,3]) then begin n:=4;m:=i;end; end; case n of 1:exit(f(copy(st,1,m-1))+f(copy(st,m+1,length(st)-m))); 2:exit(f(copy(st,1,m-1))-f(copy(st,m+1,length(st)-m))); 3:exit(f(copy(st,1,m-1))*f(copy(st,m+1,length(st)-m))); 4:exit(f(copy(st,1,m-1))div f(copy(st,m+1,length(st)-m))); end; end; end; end; if n=520 then exit (f(copy(st,2,len-2))); end; begin readln(tot); writeln(f(tot)); // readln(tot); end.
一道关于数列的题目,Pascal,求大神帮忙
一道关于数列的题目,我用了Pascal语言,但运行结果总是一个定值,毫无变化,我怀疑主程序的循环有问题,但又找不出来,求大神帮忙找错,谢谢了。 **数列** (sequence.pas/c/cpp) 【问题描述】 给定一个正整数k(3≤k≤15),把所有k的方幂及所有有限个互不相等的k的方幂之和构成一个递增的序列,例如,当k=3时,这个序列是: 1,3,4,9,10,12,13,… (该序列实际上就是:30,31,30+31,32,30+32,31+32,30+31+32,…) 请你求出这个序列的第N项的值(用10进制数表示)。 例如,对于k=3,N=100,正确答案应该是981。 【输入文件】 输入文件sequence.in 只有1行,为2个正整数,用一个空格隔开: k N (k、N的含义与上述的问题描述一致,且3≤k≤15,10≤N≤1000)。 【输出文件】 输出文件sequence.out 为计算结果,是一个正整数(在所有的测试数据中,结果均不超过2.1*109)。(整数前不要有空格和其他符号)。 【输入样例】 3 100 【输出样例】 981 var i,i2,g,sum,n:longint; k:shortint; bit:array[1..100]of shortint;//记录数的二次方的每个数位 function fang(a,b:longint):longint; //求a的b次方 var a2:longint; begin a2:=a; for i:=1 to b do a:=a*a2; exit(a); end; procedure er(c:longint); //求c的二进制(倒序的) begin g:=0;//record times while c<>0 do begin inc(g); bit[g]:=c mod 2; c:=c div 2; end; end; begin read(k,n); er(n); sum:=1; i2:=0; for i:=g downto 1 do//倒序处理bit begin inc(i2); if bit[i]=1 then begin if i2=1 then continue;//已将sum赋值1,所以无需计算0次方了 sum:=fang(k,i2)+sum; end; end; write(sum); end. ``` ```
在使用Tensorflow object_detection API训练自己的数据集时,无法将自己的数据转换为tfrecord文件,但是给的VOC2012可以转换,老板给的任务,急。。。?
win10, Tensorflow-gpu==1.14.0, python3.7 按照要求已将相关文件放至相应位置: ![图片说明](https://img-ask.csdn.net/upload/201911/24/1574584428_312195.png) 数据集准备: ![图片说明](https://img-ask.csdn.net/upload/201911/24/1574584780_579019.png) 标签准备: ![图片说明](https://img-ask.csdn.net/upload/201911/24/1574584792_727796.png) xml文件格式: ![图片说明](https://img-ask.csdn.net/upload/201911/24/1574584811_141648.png) imageset文件准备: ![图片说明](https://img-ask.csdn.net/upload/201911/24/1574584825_425924.png) train.txt文件: ![图片说明](https://img-ask.csdn.net/upload/201911/24/1574584847_363800.png) pascal_label_map也改了:我的只有这两个标签 ![图片说明](https://img-ask.csdn.net/upload/201911/24/1574584895_190927.png) 命令行运行create_pascal_tf_record文件结果: ![图片说明](https://img-ask.csdn.net/upload/201911/24/1574585056_500783.png) 运行完之后只生成一个0kb的record文件 有人说降级到tf1.12.0也许可以,但是现在已经下载不到这个版本了 而且这个程序是可以转换VOC2012的数据集的,也许不是版本问题,卡了三天啦,求大佬指导【抱拳】
常数的判断,Identifying Legal Pascal Real Constants
Description Pascal requires that real constants have either a decimal point, or an exponent (starting with the letter e or E, and officially called a scale factor), or both, in addition to the usual collection of decimal digits. If a decimal point is included it must have at least one decimal digit on each side of it. As expected, a sign (+ or -) may precede the entire number, or the exponent, or both. Exponents may not include fractional digits. Blanks may precede or follow the real constant, but they may not be embedded within it. Note that the Pascal syntax rules for real constants make no assumptions about the range of real values, and neither does this problem. Your task in this problem is to identify legal Pascal real constants. Input Each line of the input data contains a candidate which you are to classify. Output For each line of the input, display your finding as illustrated in the example shown below. The input terminates with a line that contains only an asterisk in column one. Sample Input 1.2 1. 1.0e-55 e-12 6.5E 1e-12 +4.1234567890E-99999 7.6e+12.5 99 * Sample Output 1.2 is legal. 1. is illegal. 1.0e-55 is legal. e-12 is illegal. 6.5E is illegal. 1e-12 is legal. +4.1234567890E-99999 is legal. 7.6e+12.5 is illegal. 99 is illegal.
麻烦大神把这篇Pascal代码翻译成C++谢谢!
麻烦大神把这篇Pascal代码翻译成C++ 因为没有时间学习Pascal所以拜托了! http://www.docin.com/p-939720773-f8.html 这篇文档第71页至第72页的生日蛋糕问题下的代码
Do the Untwist 具体怎么来写的
Description Cryptography deals with methods of secret communication that transform a message (the plaintext) into a disguised form (the ciphertext) so that no one seeing the ciphertext will be able to figure out the plaintext except the intended recipient. Transforming the plaintext to the ciphertext is encryption; transforming the ciphertext to the plaintext is decryption. Twisting is a simple encryption method that requires that the sender and recipient both agree on a secret key k, which is a positive integer. The twisting method uses four arrays: plaintext and ciphertext are arrays of characters, and plaincode and ciphercode are arrays of integers. All arrays are of length n, where n is the length of the message to be encrypted. Arrays are origin zero, so the elements are numbered from 0 to n - 1. For this problem all messages will contain only lowercase letters, the period, and the underscore (representing a space). The message to be encrypted is stored in plaintext. Given a key k, the encryption method works as follows. First convert the letters in plaintext to integer codes in plaincode according to the following rule: '_' = 0, 'a' = 1, 'b' = 2, ..., 'z' = 26, and '.' = 27. Next, convert each code in plaincode to an encrypted code in ciphercode according to the following formula: for all i from 0 to n - 1, ciphercode[i] = (plaincode[ki mod n] - i) mod 28. (Here x mod y is the positive remainder when x is divided by y. For example, 3 mod 7 = 3, 22 mod 8 = 6, and -1 mod 28 = 27. You can use the C '%' operator or Pascal 'mod' operator to compute this as long as you add y if the result is negative.) Finally, convert the codes in ciphercode back to letters in ciphertext according to the rule listed above. The final twisted message is in ciphertext. Twisting the message cat using the key 5 yields the following: Array 0 1 2 plaintext 'c' 'a' 't' plaincode 3 1 20 ciphercode 3 19 27 ciphertext 'c' 's' '.' Your task is to write a program that can untwist messages, i.e., convert the ciphertext back to the original plaintext given the key k. For example, given the key 5 and ciphertext 'cs.', your program must output the plaintext 'cat'. Input The input contains one or more test cases, followed by a line containing only the number 0 that signals the end of the file. Each test case is on a line by itself and consists of the key k, a space, and then a twisted message containing at least one and at most 70 characters. The key k will be a positive integer not greater than 300. Output For each test case, output the untwisted message on a line by itself. Note: you can assume that untwisting a message always yields a unique result. (For those of you with some knowledge of basic number theory or abstract algebra, this will be the case provided that the greatest common divisor of the key k and length n is 1, which it will be for all test cases.) Sample Input 5 cs. 101 thqqxw.lui.qswer 3 b_ylxmhzjsys.virpbkr 0 Sample Output cat this_is_a_secret beware._dogs_barking
Pascal菜鸟求帮助!!
问题 B: 最强素数 题目描述 小李在你帮助之下轻松战胜了他的同学们,于是满怀恶意的同学出了一个题目来为难小李,作为小李神一样的队友,你又要出力了。 素数41能写成连续6个素数之和:41=2+3+5+7+11+13。 现在要求n以内的素数中,能表示为最多连续素数之和的那个数,如果有多个答案,请输出最大的那个素数。 输入 仅一行,一个整数n。 输出 输出就一个整数,为所求的能表示为最多连续素数和的那个素数。 样例输入 100 样例输出 41 提示 【样例说明】 41=2+3+5+7+11+13 【数据规模】 30%的数据,1<=n<=1000 60%的数据,1<=n<=10000 80%的数据,1<=n<=100000 100%的数据,1<=n<=1000000
Tensorflow object detection api 训练自己数据 map一直是 -1
使用Tensorflow object detection api 训练自己的数据 map 一直是-1.loss一直也很低。 结果是这样的: ![图片说明](https://img-ask.csdn.net/upload/201910/14/1571048294_159662.png) loss: ![图片说明](https://img-ask.csdn.net/upload/201910/15/1571105856_282377.jpg) 使用的模型是:model zoo的这个![图片说明](https://img-ask.csdn.net/upload/201910/14/1571047856_17157.jpg) piplineConfig 如下: ``` model { faster_rcnn { num_classes: 25 image_resizer { keep_aspect_ratio_resizer { min_dimension: 720 max_dimension: 1280 } } feature_extractor { type: "faster_rcnn_resnet50" first_stage_features_stride: 16 } first_stage_anchor_generator { grid_anchor_generator { height_stride: 16 width_stride: 16 scales: 0.25 scales: 0.5 scales: 1.0 scales: 2.0 aspect_ratios: 0.5 aspect_ratios: 1.0 aspect_ratios: 2.0 } } first_stage_box_predictor_conv_hyperparams { op: CONV regularizer { l2_regularizer { weight: 0.0 } } initializer { truncated_normal_initializer { stddev: 0.00999999977648 } } } first_stage_nms_score_threshold: 0.0 first_stage_nms_iou_threshold: 0.699999988079 first_stage_max_proposals: 100 first_stage_localization_loss_weight: 2.0 first_stage_objectness_loss_weight: 1.0 initial_crop_size: 14 maxpool_kernel_size: 2 maxpool_stride: 2 second_stage_box_predictor { mask_rcnn_box_predictor { fc_hyperparams { op: FC regularizer { l2_regularizer { weight: 0.0 } } initializer { variance_scaling_initializer { factor: 1.0 uniform: true mode: FAN_AVG } } } use_dropout: false dropout_keep_probability: 1.0 } } second_stage_post_processing { batch_non_max_suppression { score_threshold: 0.300000011921 iou_threshold: 0.600000023842 max_detections_per_class: 100 max_total_detections: 100 } score_converter: SOFTMAX } second_stage_localization_loss_weight: 2.0 second_stage_classification_loss_weight: 1.0 } } train_config { batch_size: 1 data_augmentation_options { random_horizontal_flip { } } optimizer { momentum_optimizer { learning_rate { manual_step_learning_rate { initial_learning_rate: 0.000300000014249 schedule { step: 900000 learning_rate: 2.99999992421e-05 } schedule { step: 1200000 learning_rate: 3.00000010611e-06 } } } momentum_optimizer_value: 0.899999976158 } use_moving_average: false } gradient_clipping_by_norm: 10.0 fine_tune_checkpoint: "/home/yons/code/自动驾驶视觉综合感知/faster_rcnn_resnet50_coco_2018_01_28/model.ckpt" from_detection_checkpoint: true num_steps: 200000 } train_input_reader { label_map_path: "/home/yons/code/自动驾驶视觉综合感知/pascal_label_map.pbtxt" tf_record_input_reader { input_path: "/home/yons/data/自动驾驶视觉综合感知/train_dataset/tfRecord/train/coco_train.record" } } eval_config { num_examples: 200 max_evals: 10 use_moving_averages: false metrics_set: "coco_detection_metrics" } eval_input_reader { label_map_path: "/home/yons/code/自动驾驶视觉综合感知/pascal_label_map.pbtxt" shuffle: false num_readers: 1 tf_record_input_reader { input_path: "/home/yons/data/自动驾驶视觉综合感知/train_dataset/tfRecord/val/coco_val.record" } } ``` label_map配置: ``` item { id: 1 name: 'red' } item { id: 2 name: 'green' } item { id: 3 name: 'yellow' } item { id: 4 name: 'red_left' } item { id: 5 name: 'red_right' } item { id: 6 name: 'yellow_left' } item { id: 7 name: 'yellow_right' } item { id: 8 name: 'green_left' } item { id: 9 name: 'green_right' } item { id: 10 name: 'red_forward' } item { id: 11 name: 'green_forward' } item { id: 12 name: 'yellow_forward' } item { id:13 name: 'horizon_red' } item { id: 14 name: 'horizon_green' } item { id: 15 name: 'horizon_yellow' } item { id: 16 name: 'off' } item { id: 17 name: 'traffic_sign' } item { id: 18 name: 'car' } item { id: 19 name: 'motor' } item { id: 20 name: 'bike' } item { id: 21 name: 'bus' } item { id: 22 name: 'truck' } item { id: 23 name: 'suv' } item { id: 24 name: 'express' } item { id: 25 name: 'person' } ``` 自己解析数据tfrecord: ![图片说明](https://img-ask.csdn.net/upload/201910/14/1571048123_764545.png) ![图片说明](https://img-ask.csdn.net/upload/201910/14/1571048152_258259.png)
用create_pascal_tf_record.py时候出现的问题!
这是我用create_pascal_tf_record.py出现的错误 ``` D:\tensorflow\models\research\object_detection>python dataset_tools\create_pascal_tf_record.py --label_map=D:\tensorflow\pedestrain_train\data\label_map.pbtxt --data_dir=D:\pedestrain_data --year=VOC2012 --set=train --output_path=D:\pascal_train.record Traceback (most recent call last): File "dataset_tools\create_pascal_tf_record.py", line 185, in <module> tf.app.run() File "C:\anaconda\lib\site-packages\tensorflow\python\platform\app.py", line 125, in run _sys.exit(main(argv)) File "dataset_tools\create_pascal_tf_record.py", line 167, in main examples_list = dataset_util.read_examples_list(examples_path) File "D:\ssd-detection\models-master\research\object_detection\utils\dataset_util.py", line 59, in read_examples_list lines = fid.readlines() File "C:\anaconda\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 188, in readlines self._preread_check() File "C:\anaconda\lib\site-packages\tensorflow\python\lib\io\file_io.py", line 85, in _preread_check compat.as_bytes(self.__name), 1024 * 512, status) File "C:\anaconda\lib\site-packages\tensorflow\python\framework\errors_impl.py", line 519, in __exit__ c_api.TF_GetCode(self.status.status)) tensorflow.python.framework.errors_impl.NotFoundError: NewRandomAccessFile failed to Create/Open: D:\pedestrain_data\VOC2012\ImageSets\Main\aeroplane_train.txt : \u03f5\u0373\udcd5\u04b2\udcbb\udcb5\udcbd\u05b8\udcb6\udca8\udcb5\udcc4\udcce\u013c\udcfe\udca1\udca3 ; No such file or directory ``` 可是我的main文件夹里面是pedestrain_train.txt和pedestrain_val.txt为什么他要去找aeroplane_train.txt这个文件呢
回溯 搜索 数独 pascal 求高手赐教
我的代码 请问那里有问题 答案总是错 谢谢 靶形数独 (sudo.pas/c/cpp) 【问题描述】 小城和小华都是热爱数学的好学生,最近,他们不约而同地迷上了数独游戏,好胜的他们想用数独来一比高低。但普通的数独对他们来说都过于简单了,于是他们向Z博士请教,Z博士拿出了他最近发明的“靶形数独”,作为这两个孩子比试的题目。 靶形数独的方格同普通数独一样,在9格宽×9格高的大九宫格中有9个3格宽×3格高的小九宫格(用粗黑色线隔开的)。在这个大九宫格中,有一些数字是已知的,根据这些数字,利用逻辑推理,在其他的空格上填入1到9的数字。每个数字在每个小九宫格内不能重复出现,每个数字在每行、每列也不能重复出现。但靶形数独有一点和普通数独不同,即每一个方格都有一个分值,而且如同一个靶子一样,离中心越近则分值越高。(如图) (6,6,6,6,6 ,6,6,6,6) (6,7,7,7,7 ,7,7,7,6) (6,7,8,8,8 ,8,8,7,6) (6,7,8,9,9 ,9,8,7,6) (6,7,8,9,10,9,8,7,6) (6,7,8,9,9 ,9,8,7,6) (6,7,8,8,8 ,8,8,7,6) (6,7,7,7,7 ,7,7,7,6) (6,6,6,6,6 ,6,6,6,6) 上图具体的分值分布是:最里面一格(黄色区域)为10分,黄色区域外面的一圈(红色区域)每个格子为9分,再外面一圈(蓝色区域)每个格子为8分,蓝色区域外面一圈(棕色区域)每个格子为7分,最外面一圈(白色区域)每个格子为6分,如上图所示。比赛的要求是:每个人必须完成一个给定的数独(每个给定数独有可能有不同的填法),而且要争取更高的总分数。而这个总分数即每个方格上的分值和完成这个数独时填在相应格上的数字的乘积的总和。如图,在以下这个已经填完数字的靶形数独游戏中,总分为2829。游戏规定,将以总分数的高低决出胜负。 7 5 4 9 3 8 2 6 1 1 2 8 6 4 5 9 3 7 6 3 9 2 1 7 4 8 5 8 6 5 4 2 9 1 7 3 9 7 2 3 5 1 6 4 8 4 1 3 8 7 6 5 2 9 5 4 7 1 8 2 3 9 6 2 9 1 7 6 3 8 5 4 3 8 6 5 9 4 7 1 2 由于求胜心切,小城找到了善于编程的你,让你帮他求出,对于给定的靶形数独,能够得到的最高分数。 【输入】 输入文件名为sudo.in。 一共9行,每行9个整数(每个数都在0—9的范围内),表示一个尚未填满的数独方格,未填满的空格用“0”表示。每两个数字之间用一个空格隔开。 【输出】 输出文件sudo.out共1行。 输出可以得到的靶形数独的最高分数。如果这个数独无解,则输出整数-1。 【输入输出样例1】 sudo.in sudo.out 7 0 0 9 0 0 0 0 1 1 0 0 0 0 5 9 0 0 0 0 0 2 0 0 0 8 0 0 0 5 0 2 0 0 0 3 0 0 0 0 0 0 6 4 8 4 1 3 0 0 0 0 0 0 0 0 7 0 0 2 0 9 0 2 0 1 0 6 0 8 0 4 0 8 0 5 0 4 0 1 2 2829 【输入输出样例2】 sudoku.in sudoku.out 0 0 0 7 0 2 4 5 3 9 0 0 0 0 8 0 0 0 7 4 0 0 0 5 0 1 0 1 9 5 0 8 0 0 0 0 0 7 0 0 0 0 0 2 5 0 3 0 5 7 9 1 0 8 0 0 0 6 0 1 0 0 0 0 6 0 9 0 0 0 0 1 0 0 0 0 0 0 0 0 6 2852 【数据范围】 40%的数据,数独中非0数的个数不少于30。 80%的数据,数独中非0数的个数不少于26。 100%的数据,数独中非0数的个数不少于24。 每个测试点时限:2秒 内存上限:128M program shudu; type lin=set of 0..9; type pos= record x,y:longint; end; const gong:array[1..9,1..9]of longint= ((1,1,1,2,2,2,3,3,3), (1,1,1,2,2,2,3,3,3), (1,1,1,2,2,2,3,3,3), (4,4,4,5,5,5,6,6,6), (4,4,4,5,5,5,6,6,6), (4,4,4,5,5,5,6,6,6), (7,7,7,8,8,8,9,9,9), (7,7,7,8,8,8,9,9,9), (7,7,7,8,8,8,9,9,9)); qvan:array[1..9,1..9]of longint= ((6,6,6,6,6 ,6,6,6,6), (6,7,7,7,7 ,7,7,7,6), (6,7,8,8,8 ,8,8,7,6), (6,7,8,9,9 ,9,8,7,6), (6,7,8,9,10,9,8,7,6), (6,7,8,9,9 ,9,8,7,6), (6,7,8,8,8 ,8,8,7,6), (6,7,7,7,7 ,7,7,7,6), (6,6,6,6,6 ,6,6,6,6)); var i,j,kcz,max,hg,dg:longint; ji:set of 0..9; used:array[1..90]of boolean; map:array[0..10,0..10]of longint; dot:array[0..81]of pos; fh:array[0..9,0..9]of boolean; fl:array[0..9,0..9]of boolean; fj:array[0..9,0..9]of boolean; function ysgs(se:lin):longint; var i,k:longint; begin k:=0; for i:=1 to 9 do if i in se then inc(k); exit(k); end; function zsfa:longint; var i,j,k,min,g:longint; begin min:=1000; g:=0; k:=0; for i:=1 to kcz do if not used[i] then begin ji:=[1..9]; for j:=1 to 9 do begin if (not fh[dot[i].x,j])or(not fl[dot[i].y,j])or(not fj[gong[dot[i].x,dot[i].y],j])then ji:=ji-[j]; end; k:=ysgs(ji); if k<min then begin min:=k;g:=i;end; end; exit(g); end; procedure cl; var i,k:longint; begin k:=0; for i:=1 to kcz do k:=k+map[dot[i].x,dot[i].y]*qvan[dot[i].x,dot[i].y]; if k>max then max:=k; end; procedure dfs(s:longint); var i:longint; begin if s=0 then dfs(zsfa) else begin inc(dg); for i:=1 to 9 do begin if fh[dot[s].x,i]and fl[dot[s].y,i]and fj[gong[dot[s].x,dot[s].y],i] then begin map[dot[s].x,dot[s].y]:=i; fh[dot[s].x,i]:=false; fl[dot[s].y,i]:=false; fj[gong[dot[s].x,dot[s].y],i]:=false; used[s]:=true; if dg=kcz then cl else dfs(zsfa); used[s]:=false; map[dot[s].x,dot[s].y]:=0; fh[dot[s].x,i]:=true; fl[dot[s].y,i]:=true; fj[gong[dot[s].x,dot[s].y],i]:=true; end; end; end; end; begin assign(input,'shudu.in'); assign(output,'shudu.out'); reset(input); rewrite(output); max:=0; kcz:=0; hg:=0; dg:=0; fillchar(fh,sizeof(fh),true); fillchar(fl,sizeof(fl),true); fillchar(fj,sizeof(fj),true); fillchar(used,sizeof(used),false); for i:=1 to 9 do for j:=1 to 9 do begin read(map[i,j]); if map[i,j]<>0 then begin hg:=map[i,j]*qvan[i,j]+hg; fh[i,map[i,j]]:=false; fl[j,map[i,j]]:=false; fj[gong[i,j],map[i,j]]:=false; end else begin inc(kcz); dot[kcz].x:=i; dot[kcz].y:=j; end; end; dfs(0); if max=0 then write(-1) else write(max+hg); close(input); close(output); end.
Combinations 组合的问题
Description Computing the exact number of ways that N things can be taken M at a time can be a great challenge when N and/or M become very large. Challenges are the stuff of contests. Therefore, you are to make just such a computation given the following: GIVEN: 5 <= N <= 100; 5 <= M <= 100; M <= N Compute the EXACT value of: C = N! / (N-M)!M! You may assume that the final value of C will fit in a 32-bit Pascal LongInt or a C long. For the record, the exact value of 100! is: 93,326,215,443,944,152,681,699,238,856,266,700,490,715,968,264,381,621, 468,592,963,895,217,599,993,229,915,608,941,463,976,156,518,286,253, 697,920,827,223,758,251,185,210,916,864,000,000,000,000,000,000,000,000 Input The input to this program will be one or more lines each containing zero or more leading spaces, a value for N, one or more spaces, and a value for M. The last line of the input file will contain a dummy N, M pair with both values equal to zero. Your program should terminate when this line is read. Output The output from this program should be in the form: N things taken M at a time is C exactly. Sample Input 100 6 20 5 18 6 0 0 Sample Output 100 things taken 6 at a time is 1192052400 exactly. 20 things taken 5 at a time is 15504 exactly. 18 things taken 6 at a time is 18564 exactly.
在caffe下训练修改后的SSD网络时报错
运行ssd_pascal_py的脚本文件后,设置为不马上执行训练。 修改脚本文件生成的train, test,deploy的三个prototxt文件, 将前两个最大池化改为步长为2的卷积操作。 layer { name: "pool1" type: "Convolution" bottom: "conv1_2" top: "pool1" param { lr_mult: 1.0 decay_mult: 1.0 } param { lr_mult: 2.0 decay_mult: 0.0 } convolution_param { num_output: 64 kernel_size: 2 stride:2 weight_filler { type: "xavier" } bias_filler { type: "constant" value: 0.0 } } } layer { name: "relu1_3" type: "ReLU" bottom: "pool1" top: "pool1" } 如上把第一个最大池化改为了卷积,第二个最大池化也这样进行了修改 运行.sh文件开始训练时,报错 ![图片说明](https://img-ask.csdn.net/upload/201909/04/1567564505_936440.png) 问下大家如何解决??
字谜的一个问题,怎么用的 C 语言
Problem Description Anna Graham is a puzzle maker who prides herself in the quality and complexity of her work. She makes puzzles of all kinds - crosswords, logic problems, acrostics, and word search puzzles, to name but a few. For each puzzle, she has developed a set of rules which she constrains herself to follow. For word search puzzles, she insists not only that all the words be connected to one another (as in most word search puzzles), but also that removing any word from the word list will not cause one or more words to become disconnected from the rest. (Two words are connected if they contain a common letter in the grid.) The example word search puzzle on the left satisfies this condition, but the one on the right does not (removing the word Pascal from the word list disconnects Java from the other two words). Your job is to write a program that checks to see if Anna’s word search problems are up to snuff. Input Input will consist of multiple test cases. The first line of each test case contains 3 integers n m l, where n and m are the number of rows and columns in the puzzle and l is the number of words. Following this are n lines containing m uppercase characters each (the puzzle) followed by l lines containing one word each (the word list, in mixed case). Each word in the word list will appear in the puzzle exactly once. There will be no more than 100 rows and 100 columns in the puzzle and no more than 100 words to search for. There will be no spaces in the input words. Output For each problem instance, output the word Yes or No depending on whether the puzzle satisfies Anna’s constraints. Sample Input 5 6 3 PBROGR PASCAL ASMMIN GIICON TCELST BASIC LISP Pascal 5 6 4 PBROJR PASCAL ASMMVN GIICAN TCELST BASIC Java LISP Pascal 0 0 0 Sample Output Yes No
Combinations 具体的做法是什么
Description Computing the exact number of ways that N things can be taken M at a time can be a great challenge when N and/or M become very large. Challenges are the stuff of contests. Therefore, you are to make just such a computation given the following: GIVEN: 5 <= N <= 100; 5 <= M <= 100; M <= N Compute the EXACT value of: C = N! / (N-M)!M! You may assume that the final value of C will fit in a 32-bit Pascal LongInt or a C long. For the record, the exact value of 100! is: 93,326,215,443,944,152,681,699,238,856,266,700,490,715,968,264,381,621, 468,592,963,895,217,599,993,229,915,608,941,463,976,156,518,286,253, 697,920,827,223,758,251,185,210,916,864,000,000,000,000,000,000,000,000 Input The input to this program will be one or more lines each containing zero or more leading spaces, a value for N, one or more spaces, and a value for M. The last line of the input file will contain a dummy N, M pair with both values equal to zero. Your program should terminate when this line is read. Output The output from this program should be in the form: N things taken M at a time is C exactly. Sample Input 100 6 20 5 18 6 0 0 Sample Output 100 things taken 6 at a time is 1192052400 exactly. 20 things taken 5 at a time is 15504 exactly. 18 things taken 6 at a time is 18564 exactly.
Pascal Library
Description Pascal University, one of the oldest in the country, needs to renovate its Library Building, because after all these centuries the building started to show the effects of supporting the weight of the enormous amount of books it houses. To help in the renovation, the Alumni Association of the University decided to organize a series of fund-raising dinners, for which all alumni were invited. These events proved to be a huge success and several were organized during the past year. (One of the reasons for the success of this initiative seems to be the fact that students that went through the Pascal system of education have fond memories of that time and would love to see a renovated Pascal Library.) The organizers maintained a spreadsheet indicating which alumni participated in each dinner. Now they want your help to determine whether any alumnus or alumna took part in all of the dinners. Input The input contains several test cases. The first line of a test case contains two integers N and D indicating respectively the number of alumni and the number of dinners organized (1 <= N <= 100 and 1 <= D <= 500). Alumni are identified by integers from 1 to N. Each of the next D lines describes the attendees of a dinner, and contains N integers Xi indicating if the alumnus/alumna i attended that dinner (Xi = 1) or not (Xi = 0). The end of input is indicated by N = D = 0. Output For each test case in the input your program must produce one line of output, containing either the word `yes', in case there exists at least one alumnus/alumna that attended all dinners, or the word `no' otherwise. Sample Input 3 3 1 1 1 0 1 1 1 1 1 7 2 1 0 1 0 1 0 1 0 1 0 1 0 1 0 0 0 Sample Output yes no
Identifying Legal Pascal Real Constants
Description Pascal requires that real constants have either a decimal point, or an exponent (starting with the letter e or E, and officially called a scale factor), or both, in addition to the usual collection of decimal digits. If a decimal point is included it must have at least one decimal digit on each side of it. As expected, a sign (+ or -) may precede the entire number, or the exponent, or both. Exponents may not include fractional digits. Blanks may precede or follow the real constant, but they may not be embedded within it. Note that the Pascal syntax rules for real constants make no assumptions about the range of real values, and neither does this problem. Your task in this problem is to identify legal Pascal real constants. Input Each line of the input data contains a candidate which you are to classify. Output For each line of the input, display your finding as illustrated in the example shown below. The input terminates with a line that contains only an asterisk in column one. Sample Input 1.2 1. 1.0e-55 e-12 6.5E 1e-12 +4.1234567890E-99999 7.6e+12.5 99 * Sample Output 1.2 is legal. 1. is illegal. 1.0e-55 is legal. e-12 is illegal. 6.5E is illegal. 1e-12 is legal. +4.1234567890E-99999 is legal. 7.6e+12.5 is illegal. 99 is illegal.
Do the Untwist 正确实现的思路
Description Cryptography deals with methods of secret communication that transform a message (the plaintext) into a disguised form (the ciphertext) so that no one seeing the ciphertext will be able to figure out the plaintext except the intended recipient. Transforming the plaintext to the ciphertext is encryption; transforming the ciphertext to the plaintext is decryption. Twisting is a simple encryption method that requires that the sender and recipient both agree on a secret key k, which is a positive integer. The twisting method uses four arrays: plaintext and ciphertext are arrays of characters, and plaincode and ciphercode are arrays of integers. All arrays are of length n, where n is the length of the message to be encrypted. Arrays are origin zero, so the elements are numbered from 0 to n - 1. For this problem all messages will contain only lowercase letters, the period, and the underscore (representing a space). The message to be encrypted is stored in plaintext. Given a key k, the encryption method works as follows. First convert the letters in plaintext to integer codes in plaincode according to the following rule: '_' = 0, 'a' = 1, 'b' = 2, ..., 'z' = 26, and '.' = 27. Next, convert each code in plaincode to an encrypted code in ciphercode according to the following formula: for all i from 0 to n - 1, ciphercode[i] = (plaincode[ki mod n] - i) mod 28. (Here x mod y is the positive remainder when x is divided by y. For example, 3 mod 7 = 3, 22 mod 8 = 6, and -1 mod 28 = 27. You can use the C '%' operator or Pascal 'mod' operator to compute this as long as you add y if the result is negative.) Finally, convert the codes in ciphercode back to letters in ciphertext according to the rule listed above. The final twisted message is in ciphertext. Twisting the message cat using the key 5 yields the following: Array 0 1 2 plaintext 'c' 'a' 't' plaincode 3 1 20 ciphercode 3 19 27 ciphertext 'c' 's' '.' Your task is to write a program that can untwist messages, i.e., convert the ciphertext back to the original plaintext given the key k. For example, given the key 5 and ciphertext 'cs.', your program must output the plaintext 'cat'. Input The input contains one or more test cases, followed by a line containing only the number 0 that signals the end of the file. Each test case is on a line by itself and consists of the key k, a space, and then a twisted message containing at least one and at most 70 characters. The key k will be a positive integer not greater than 300. Output For each test case, output the untwisted message on a line by itself. Note: you can assume that untwisting a message always yields a unique result. (For those of you with some knowledge of basic number theory or abstract algebra, this will be the case provided that the greatest common divisor of the key k and length n is 1, which it will be for all test cases.) Sample Input 5 cs. 101 thqqxw.lui.qswer 3 b_ylxmhzjsys.virpbkr 0 Sample Output cat this_is_a_secret beware._dogs_barking
Binary Search 的程序的实现
Description The program fragment below performs binary search of an integer number in an array that is sorted in a nondescending order: Pascal (file "sproc.pas") const MAXN = 10000; var A: array[0..MAXN-1] of integer; N: integer; procedure BinarySearch(x: integer); var p, q, i, L: integer; begin p := 0; { Left border of the search } q := N-1; { Right border of the search } L := 0; { Comparison counter } while p <= q do begin i := (p + q) div 2; inc(L); if A[i] = x then begin writeln('Found item i = ', i, ' in L = ', L, ' comparisons'); exit end; if x < A[i] then q := i - 1 else p := i + 1 end end; C (file "sproc.c") #define MAXN 10000 int A[MAXN]; int N; void BinarySearch(int x) { int p, q, i, L; p = 0; /* Left border of the search */ q = N-1; /* Right border of the search */ L = 0; /* Comparison counter */ while (p <= q) { i = (p + q) / 2; ++L; if (A[i] == x) { printf("Found item i = %d" " in L = %d comparisons\n", i, L); return; } if (x < A[i]) q = i - 1; else p = i + 1; } } Before BinarySearch was called, N was set to some integer number from 1 to 10000 inclusive and array A was filled with a nondescending integer sequence. It is known that the procedure has terminated with the message "Found item i = XXX in L = XXX comparisons" with some known values of i and L. Your task is to write a program that finds all possible values of N that could lead to such message. However, the number of possible values of N can be quite big. Thus, you are asked to group all consecutive Ns into intervals and write down only first and last value in each interval. Input The input file consists of a single line with two integers i and L (0 <= i < 10000 and 1 <= L <= 14), separated by a space. Output On the first line of the output file write the single integer number K representing the total number of intervals for possible values of N. Then K lines shall follow listing those intervals in an ascending order. Each line shall contain two integers Ai and Bi (Ai <= Bi) separated by a space, representing first and last value of the interval. If there are no possible values of N exist, then the output file shall contain the single 0. Sample Input 10 3 Sample Output 4 12 12 17 18 29 30 87 94
相见恨晚的超实用网站
搞学习 知乎:www.zhihu.com 简答题:http://www.jiandati.com/ 网易公开课:https://open.163.com/ted/ 网易云课堂:https://study.163.com/ 中国大学MOOC:www.icourse163.org 网易云课堂:study.163.com 哔哩哔哩弹幕网:www.bilibili.com 我要自学网:www.51zxw
爬虫福利二 之 妹子图网MM批量下载
爬虫福利一:27报网MM批量下载    点击 看了本文,相信大家对爬虫一定会产生强烈的兴趣,激励自己去学习爬虫,在这里提前祝:大家学有所成! 目标网站:妹子图网 环境:Python3.x 相关第三方模块:requests、beautifulsoup4 Re:各位在测试时只需要将代码里的变量 path 指定为你当前系统要保存的路径,使用 python xxx.py 或IDE运行即可。
字节跳动视频编解码面经
引言 本文主要是记录一下面试字节跳动的经历。 三四月份投了字节跳动的实习(图形图像岗位),然后hr打电话过来问了一下会不会opengl,c++,shador,当时只会一点c++,其他两个都不会,也就直接被拒了。 七月初内推了字节跳动的提前批,因为内推没有具体的岗位,hr又打电话问要不要考虑一下图形图像岗,我说实习投过这个岗位不合适,不会opengl和shador,然后hr就说秋招更看重基础。我当时
开源一个功能完整的SpringBoot项目框架
福利来了,给大家带来一个福利。 最近想了解一下有关Spring Boot的开源项目,看了很多开源的框架,大多是一些demo或者是一个未成形的项目,基本功能都不完整,尤其是用户权限和菜单方面几乎没有完整的。 想到我之前做的框架,里面通用模块有:用户模块,权限模块,菜单模块,功能模块也齐全了,每一个功能都是完整的。 打算把这个框架分享出来,供大家使用和学习。 为什么用框架? 框架可以学习整体
源码阅读(19):Java中主要的Map结构——HashMap容器(下1)
(接上文《源码阅读(18):Java中主要的Map结构——HashMap容器(中)》) 3.4.4、HashMap添加K-V键值对(红黑树方式) 上文我们介绍了在HashMap中table数组的某个索引位上,基于单向链表添加新的K-V键值对对象(HashMap.Node&lt;K, V&gt;类的实例),但是我们同时知道在某些的场景下,HashMap中table数据的某个索引位上,数据是按照红黑树
c++制作的植物大战僵尸,开源,一代二代结合游戏
    此游戏全部由本人自己制作完成。游戏大部分的素材来源于原版游戏素材,少部分搜集于网络,以及自己制作。 此游戏为同人游戏而且仅供学习交流使用,任何人未经授权,不得对本游戏进行更改、盗用等,否则后果自负。 目前有六种僵尸和六种植物,植物和僵尸的动画都是本人做的。qq:2117610943 开源代码下载 提取码:3vzm 点击下载--&gt; 11月28日 新增四种植物 统一植物画风,全部修
Java学习的正确打开方式
在博主认为,对于入门级学习java的最佳学习方法莫过于视频+博客+书籍+总结,前三者博主将淋漓尽致地挥毫于这篇博客文章中,至于总结在于个人,实际上越到后面你会发现学习的最好方式就是阅读参考官方文档其次就是国内的书籍,博客次之,这又是一个层次了,这里暂时不提后面再谈。博主将为各位入门java保驾护航,各位只管冲鸭!!!上天是公平的,只要不辜负时间,时间自然不会辜负你。 何谓学习?博主所理解的学习,它
程序员必须掌握的核心算法有哪些?
由于我之前一直强调数据结构以及算法学习的重要性,所以就有一些读者经常问我,数据结构与算法应该要学习到哪个程度呢?,说实话,这个问题我不知道要怎么回答你,主要取决于你想学习到哪些程度,不过针对这个问题,我稍微总结一下我学过的算法知识点,以及我觉得值得学习的算法。这些算法与数据结构的学习大多数是零散的,并没有一本把他们全部覆盖的书籍。下面是我觉得值得学习的一些算法以及数据结构,当然,我也会整理一些看过
Python——画一棵漂亮的樱花树(不同种樱花+玫瑰+圣诞树喔)
最近翻到一篇知乎,上面有不少用Python(大多是turtle库)绘制的树图,感觉很漂亮,我整理了一下,挑了一些我觉得不错的代码分享给大家(这些我都测试过,确实可以生成喔~) one 樱花树 动态生成樱花 效果图(这个是动态的): 实现代码 import turtle as T import random import time # 画樱花的躯干(60,t) def Tree(branch
linux系列之常用运维命令整理笔录
本博客记录工作中需要的linux运维命令,大学时候开始接触linux,会一些基本操作,可是都没有整理起来,加上是做开发,不做运维,有些命令忘记了,所以现在整理成博客,当然vi,文件操作等就不介绍了,慢慢积累一些其它拓展的命令,博客不定时更新 顺便拉下票,我在参加csdn博客之星竞选,欢迎投票支持,每个QQ或者微信每天都可以投5票,扫二维码即可,http://m234140.nofollow.ax.
Python 基础(一):入门必备知识
目录1 标识符2 关键字3 引号4 编码5 输入输出6 缩进7 多行8 注释9 数据类型10 运算符10.1 常用运算符10.2 运算符优先级 1 标识符 标识符是编程时使用的名字,用于给变量、函数、语句块等命名,Python 中标识符由字母、数字、下划线组成,不能以数字开头,区分大小写。 以下划线开头的标识符有特殊含义,单下划线开头的标识符,如:_xxx ,表示不能直接访问的类属性,需通过类提供
深度学习图像算法在内容安全领域的应用
互联网给人们生活带来便利的同时也隐含了大量不良信息,防范互联网平台有害内容传播引起了多方面的高度关注。本次演讲从技术层面分享网易易盾在内容安全领域的算法实践经验,包括深度学习图
程序员接私活怎样防止做完了不给钱?
首先跟大家说明一点,我们做 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)杨辉三角
杨辉三角 是经典算法,这篇博客对它的算法思想进行了讲解,并有完整的代码实现。
腾讯算法面试题: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孰优孰劣的问题,争论已经很多年了。一直也没有结论,毕竟每个人的喜好和习惯是大不相同的。我也看
项目中的if else太多了,该怎么重构?
介绍 最近跟着公司的大佬开发了一款IM系统,类似QQ和微信哈,就是聊天软件。我们有一部分业务逻辑是这样的 if (msgType = "文本") { // dosomething } else if(msgType = "图片") { // doshomething } else if(msgType = "视频") { // doshomething } else { // doshom...
致 Python 初学者
欢迎来到“Python进阶”专栏!来到这里的每一位同学,应该大致上学习了很多 Python 的基础知识,正在努力成长的过程中。在此期间,一定遇到了很多的困惑,对未来的学习方向感到迷茫。我非常理解你们所面临的处境。我从2007年开始接触 python 这门编程语言,从2009年开始单一使用 python 应对所有的开发工作,直至今天。回顾自己的学习过程,也曾经遇到过无数的困难,也曾经迷茫过、困惑过。开办这个专栏,正是为了帮助像我当年一样困惑的 Python 初学者走出困境、快速成长。希望我的经验能真正帮到你
Python 编程实用技巧
Python是一门很灵活的语言,也有很多实用的方法,有时候实现一个功能可以用多种方法实现,我这里总结了一些常用的方法,并会持续更新。
“狗屁不通文章生成器”登顶GitHub热榜,分分钟写出万字形式主义大作
一、垃圾文字生成器介绍 最近在浏览GitHub的时候,发现了这样一个骨骼清奇的雷人项目,而且热度还特别高。 项目中文名:狗屁不通文章生成器 项目英文名:BullshitGenerator 根据作者的介绍,他是偶尔需要一些中文文字用于GUI开发时测试文本渲染,因此开发了这个废话生成器。但由于生成的废话实在是太过富于哲理,所以最近已经被小伙伴们给玩坏了。 他的文风可能是这样的: 你发现,...
程序员:我终于知道post和get的区别
是一个老生常谈的话题,然而随着不断的学习,对于以前的认识有很多误区,所以还是需要不断地总结的,学而时习之,不亦说乎
"狗屁不通文章生成器"登顶GitHub热榜,分分钟写出万字形式主义大作
GitHub 被誉为全球最大的同性交友网站,……,陪伴我们已经走过 10+ 年时间,它托管了大量的软件代码,同时也承载了程序员无尽的欢乐。 万字申请,废话报告,魔幻形式主义大作怎么写?兄dei,狗屁不通文章生成器了解一下。这个富有灵魂的项目名吸引了众人的目光。项目仅仅诞生一周,便冲上了GitHub趋势榜榜首(Js中文网 -前端进阶资源教程)、是榜首哦
推荐几款比较实用的工具,网站
1.盘百度PanDownload 这个云盘工具是免费的,可以进行资源搜索,提速(偶尔会抽风????) 不要去某站买付费的???? PanDownload下载地址 2.BeJSON 这是一款拥有各种在线工具的网站,推荐它的主要原因是网站简洁,功能齐全,广告相比其他广告好太多了 bejson网站 3.二维码美化 这个网站的二维码美化很好看,网站界面也很...
《程序人生》系列-这个程序员只用了20行代码就拿了冠军
你知道的越多,你不知道的越多 点赞再看,养成习惯GitHub上已经开源https://github.com/JavaFamily,有一线大厂面试点脑图,欢迎Star和完善 前言 这一期不算《吊打面试官》系列的,所有没前言我直接开始。 絮叨 本来应该是没有这期的,看过我上期的小伙伴应该是知道的嘛,双十一比较忙嘛,要值班又要去帮忙拍摄年会的视频素材,还得搞个程序员一天的Vlog,还要写BU...
相关热词 如何提升c#开发能力 矩阵乘法c# c#调用谷歌浏览器 c# 去空格去转义符 c#用户登录窗体代码 c# 流 c# linux 可视化 c# mvc 返回图片 c# 像素空间 c# 日期 最后一天
立即提问