使用训练的tiny_yolov3模型检测时常报错 似乎与布尔值有关 请大神帮我看看

图片说明
图片说明

源码:git clone https://github.com/qqwweee/keras-yolo3.git

1个回答

已解决 不知道为什么只能使用单个GPU不能使用多个 后续再了解

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
keras yolov3 tiny_yolo_body网络结构改为vgg16结构
将keras框架yolov3 tiny_yolo_body网络结构改为vgg16网络结构,程序能够运行 loss正常下降即可。
树莓派上跑yolov3-tiny.weigths出现segmentation fault是什么原因?
./darknet detector test cfg/voc.data cfg/yolov3-tiny.cfg weights/yolov3-tiny.weights data/dog.jpg ![图片说明](https://img-ask.csdn.net/upload/201908/28/1566964218_348263.png)
急,跪求pycharm跑yolov3-train.py报错
![图片说明](https://img-ask.csdn.net/upload/201905/23/1558616226_449733.png) ``` import numpy as np import keras.backend as K from keras.layers import Input, Lambda from keras.models import Model from keras.callbacks import TensorBoard, ModelCheckpoint, EarlyStopping from yolo3.model import preprocess_true_boxes, yolo_body, tiny_yolo_body, yolo_loss from yolo3.utils import get_random_data def _main(): annotation_path = 'train.txt' log_dir = 'logs/000/' classes_path = 'model_data/voc_classes.txt' anchors_path = 'model_data/yolo_anchors.txt' class_names = get_classes(classes_path) anchors = get_anchors(anchors_path) input_shape = (416,416) # multiple of 32, hw model = create_model(input_shape, anchors, len(class_names) ) train(model, annotation_path, input_shape, anchors, len(class_names), log_dir=log_dir) def train(model, annotation_path, input_shape, anchors, num_classes, log_dir='logs/'): model.compile(optimizer='adam', loss={ 'yolo_loss': lambda y_true, y_pred: y_pred}) logging = TensorBoard(log_dir=log_dir) checkpoint = ModelCheckpoint(log_dir + "ep{epoch:03d}-loss{loss:.3f}-val_loss{val_loss:.3f}.h5", monitor='val_loss', save_weights_only=True, save_best_only=True, period=1) batch_size = 8 val_split = 0.1 with open(annotation_path) as f: lines = f.readlines() np.random.shuffle(lines) num_val = int(len(lines)*val_split) num_train = len(lines) - num_val print('Train on {} samples, val on {} samples, with batch size {}.'.format(num_train, num_val, batch_size)) model.fit_generator ( data_generator_wrapper ( lines[:num_train] , batch_size , input_shape , anchors , num_classes ) , steps_per_epoch=max ( 1 , num_train // batch_size ) , validation_data=data_generator_wrapper ( lines[num_train:] , batch_size , input_shape , anchors , num_classes ) , validation_steps=max ( 1 , num_val // batch_size ) , epochs=10 , initial_epoch=0 , callbacks=[logging , checkpoint] ) model.save_weights(log_dir + 'trained_weights.h5') def get_classes(classes_path): with open(classes_path) as f: class_names = f.readlines() class_names = [c.strip() for c in class_names] return class_names def get_anchors(anchors_path): with open(anchors_path) as f: anchors = f.readline() anchors = [float(x) for x in anchors.split(',')] return np.array(anchors).reshape(-1, 2) def create_model(input_shape, anchors, num_classes, load_pretrained=False, freeze_body=False, weights_path='model_data/yolo_weights.h5'): K.clear_session() # get a new session h, w = input_shape image_input = Input(shape=(w, h, 3)) num_anchors = len(anchors) y_true = [Input(shape=(h//{0:32, 1:16, 2:8}[l], w//{0:32, 1:16, 2:8}[l], num_anchors//3, num_classes+5)) for l in range(3)] model_body = yolo_body(image_input, num_anchors//3, num_classes) print('Create YOLOv3 model with {} anchors and {} classes.'.format(num_anchors, num_classes)) if load_pretrained: model_body.load_weights(weights_path, by_name=True, skip_mismatch=True) print('Load weights {}.'.format(weights_path)) if freeze_body in [1, 2]: # Do not freeze 3 output layers. num = (185 , len ( model_body.layers ) - 3)[freeze_body - 1] for i in range(num): model_body.layers[i].trainable = False print('Freeze the first {} layers of total {} layers.'.format(num, len(model_body.layers))) model_loss = Lambda ( yolo_loss , output_shape=(1 ,) , name='yolo_loss', arguments={'anchors': anchors, 'num_classes': num_classes, 'ignore_thresh': 0.5} )(model_body.output + y_true) model = Model(inputs=[model_body.input] + y_true, outputs=model_loss) return model def data_generator(annotation_lines, batch_size, input_shape, anchors, num_classes): n = len(annotation_lines) i = 0 while True: image_data = [] box_data = [] for b in range(batch_size): if i==0: np.random.shuffle(annotation_lines) image, box = get_random_data(annotation_lines[i], input_shape, random=True) image_data.append(image) box_data.append(box) i = (i+1) % n image_data = np.array(image_data) box_data = np.array(box_data) y_true = preprocess_true_boxes(box_data, input_shape, anchors, num_classes) yield [image_data]+y_true, np.zeros(batch_size) def data_generator_wrapper(annotation_lines, batch_size, input_shape, anchors, num_classes): n = len(annotation_lines) if n==0 or batch_size<=0: return None return data_generator(annotation_lines, batch_size, input_shape, anchors, num_classes) if __name__ == '__main__': _main() ``` 报了一个:tensorflow.python.framework.errors_impl.InvalidArgumentError: Inputs to operation training/Adam/gradients/AddN_24 of type _MklAddN must have the same size and shape. Input 0: [2768896] != input 1: [8,26,26,512] [[Node: training/Adam/gradients/AddN_24 = _MklAddN[N=2, T=DT_FLOAT, _kernel="MklOp", _device="/job:localhost/replica:0/task:0/device:CPU:0"](training/Adam/gradients/batch_normalization_65/FusedBatchNorm_grad/FusedBatchNormGrad, training/Adam/gradients/batch_n
Treasure Map 是如何实现的
Problem Description "Take 147 steps due north, turn 63 degrees clockwise, take 82 steps, ...". Most people don't realize how important accuracy is when following the directions on a pirate's treasure map. If you're even a tiny bit off at the start, you'll end up far away from the correct location at the end. Pirates therefore use very exact definitions. One step, for instance, has been defined by the 1670 Pirate Convention to be exactly two times the size of the wooden leg of Long John Silver, or 1.183 m in metricunits. Captain Borbassa was thus not at all worried when he set sail to the treasure island, having a rope with knots in it, exactly one step apart, for accurately measuring distances. Of course he also brought his good old geotriangle, once given to him by his father when he was six years old. However, on closer inspection of the map, he got an unpleasant surprise. The map was made by the famous captain Jack Magpie, who was notorious for including little gems into his directions.In this case, there were distances listed such as sqrt(33) steps. How do you measure that accurately? Fortunately, his first mate Pythagor came to the rescue. After puzzling for a few hours, he came up with the following solution: let pirate A go 4 steps into the perpendicular direction, and hold one end of the measuring rope there. Then pirate B goes into the desired direction while letting the rope slide through his fingers, until he is exactly 7 steps away from pirate A. Pythagor worked out a formula that states that pirate B has then traveled exactly sqrt(33) steps. Captain Borbassa was impressed, but he revealed that there were more such distances on the map. Paranoid as he is, he refuses to let Pythagor see the map, or even tell him what other distances there are on it. They are all square roots of integers, that's all he gets to know. Only on the island itself will the captain reveal the numbers, and then he expects Pyhtagor to quickly work out the smallest two integer numbers of steps that can combine to create the desired distance, using the method described above. Pythagor knows this is not easy, so he has asked your help. Can you help him by writing a program that can determine these two integers quickly? By the way, he did ask the captain how large the numbers inside the square root could get, and the captain replied "one billion". He was probably exaggerating, but you'd better make sure the program works. If you can successfully help the pirates, you'll get a share of the treasure. It might be gold, it might be silver, or it might even be... a treasure map! 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, satisfying 1 <= N <= 10^9. Output For every test case in the input, the output should contain two nonnegative integers, separated by a space, on a single line: the distance pirate A needs to head in the perpendicular direction, and the final distance between pirate A and B, such that pirate B has traveled sqrt(N) steps. If there are multiple solutions, give the one with the smallest numbers. If there are no solutions, the output should be "IMPOSSIBLE" (without the quotation marks) on a single line. Sample Input 4 33 16 50 101 Sample Output 4 7 0 4 IMPOSSIBLE 50 51
tiny yolo 训练 已放弃 (核心已转储)
jerrylew@jerrylew-CW15:~/darknet$ ./darknet detector train ./cfg/voc.data cfg/tiny-yolo-voc.cfg tiny-yolo-voc layer filters size input output 0 conv 16 3 x 3 / 1 416 x 416 x 3 -> 416 x 416 x 16 1 max 2 x 2 / 2 416 x 416 x 16 -> 208 x 208 x 16 2 conv 32 3 x 3 / 1 208 x 208 x 16 -> 208 x 208 x 32 3 max 2 x 2 / 2 208 x 208 x 32 -> 104 x 104 x 32 4 conv 64 3 x 3 / 1 104 x 104 x 32 -> 104 x 104 x 64 5 max 2 x 2 / 2 104 x 104 x 64 -> 52 x 52 x 64 6 conv 128 3 x 3 / 1 52 x 52 x 64 -> 52 x 52 x 128 7 max 2 x 2 / 2 52 x 52 x 128 -> 26 x 26 x 128 8 conv 256 3 x 3 / 1 26 x 26 x 128 -> 26 x 26 x 256 9 max 2 x 2 / 2 26 x 26 x 256 -> 13 x 13 x 256 10 conv 512 3 x 3 / 1 13 x 13 x 256 -> 13 x 13 x 512 11 max 2 x 2 / 1 13 x 13 x 512 -> 13 x 13 x 512 12 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 13 conv 1024 3 x 3 / 1 13 x 13 x1024 -> 13 x 13 x1024 14 conv 305 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 305 15 detection darknet: ./src/parser.c:281: parse_region: Assertion `l.outputs == params.inputs' failed. 已放弃 (核心已转储) 这什么情况啊 求解
linux内核编译时出错 不知道怎么弄
scripts/kconfig/conf -s arch/mips/Kconfig CHK include/linux/version.h CHK include/linux/utsrelease.h SYMLINK include/asm -> include/asm-mips CALL scripts/checksyscalls.sh CHK include/linux/compile.h /opt/linux-2.6.32/scripts/gen_initramfs_list.sh: Cannot open '/mnt/ramdisk.tiny4/' /opt/linux-2.6.32/usr/Makefile:64: recipe for target 'usr/initramfs_data.cpio.gz' failed make[1]: *** [usr/initramfs_data.cpio.gz] Error 1 Makefile:878: recipe for target 'usr' failed make: *** [usr] Error 2
Ink Blots 怎么来做的
Description Drops of dark ink can fall on a white piece of paper creating a number of round ink blots. Three examples are shown above. The blots can create multiple distinct white regions. In the first figure, there is just one white region. In the second figure there is the outer white region plus a small white region bounded by the left four blots and an even smaller white region bounded by the right three blots. In the third figure, there are four white regions, one on the very outside, one inside the outer ring of blots and outside the four blots in the middle, and two tiny ones each formed between three of the four inner blots. Two points are in the same white region if a path can be drawn between them that only passes through white points. Your problem is to count the number of white regions given the centers and radii of the blots. Math Formulas: If circles C1 with center (x1, y1) and radius r1, and C2 with center (x2, y2) and radius r2 intersect in exactly two distinct points, let d equal the distance between the centers of C1 and C2, A = atan2(y2-y1, x2-x1), and B = acos((r12 + d2 - r22)/(2*r1*d)); then the intersection points on C1 are at angles A+B and A-B radians counterclockwise from the ray extending to the right from the center of C1. The function atan2 is the inverse tangent function with two arguments, and acos is the inverse cosine function, both available in the math libraries of C, C++, and Java. Input There are from one to 15 data sets, followed by a final line containing only 0. A data set starts with a line containing a single positive integer n, which is no more than 100. It is the number of blots in the dataset. Then 3n positive integers follow, with a single blank or a newline separating them. Each group of three give the data for the circular boundary of one blot: x and y coordinate of the center of the blot and its radius, in that order. Each of these numbers will be no larger than 1,000,000. All blots lie entirely on a piece of paper, and no blot touches any edge of the paper. No two circles in a dataset will be identical. Given any two distinct circles, they will either intersect at exactly two distinct points or not intersect at all. If two circles in the input intersect, then they overlap by at least one unit. More precisely, if they have radii r1 and r2, where r1 <= r2, and if d is the distance between their centers, then r2 - r1 + 1 <= d <= r1 + r2 - 1. Three or more circles will never intersect at the same point. If C is a circle in the input that intersects at least one other input circle, and p and q are any of the intersection points of C with any of the other input circles, with p distinct from q, then p and q will be separated on C by at least 0.001 radians of arc. The restrictions on radii and angles ensure that standard double-precision arithmetic is sufficient for the calculations suggested above. The sample input below corresponds to the figures above, though the scale is different in each figure. Output The output contains one line for each data set. The line contains only the number of white regions for the dataset, which is never more than 200. Sample Input 4 45 45 40 65 55 35 45 45 10 20 95 10 5 30 30 20 30 60 20 60 30 20 60 60 20 90 45 15 16 200 120 65 300 100 55 400 120 65 480 200 65 500 300 55 480 400 65 400 480 65 300 500 55 200 480 65 120 400 65 100 300 55 120 200 65 300 245 60 300 355 60 385 300 51 215 300 51 0 Sample Output 1 3 4
Shoring Up the Levees 线段坐标的计算问题
Problem Description The tiny country of Waterlogged is protected by a series of levees that form a quadrilateral as shown below: The quadrilateral is defined by four vertices. The levees partition the country into four quadrants. Each quadrant is identified by a pair of vertices representing the outside edge of that quadrant. For example, Quadrant 1 shown below is defined by the points (x1, y1) and (x2, y2) . It happens very often that the country of Waterlogged becomes flooded, and the levees need to be reinforced, but their country is poor and they have limited resources. They would like to be able to reinforce those levees that encompass the largest area first, then the next largest second, then the next largest third, and the smallest area fourth. Help Waterlogged identify which quadrants are the largest, and the length of the levees around them. Input here will be several sets of input. Each set will consist of eight real numbers, on a single line. Those numbers will represent, in order: X1 Y1 X2 Y2 X3 Y3 X4 Y4 The four points are guaranteed to form a convex quadrilateral when taken in order -- that is, there will be no concavities, and no lines crossing. Every number will be in the range from -1000.0 to 1000.0 inclusive. No Quadrant will have an area or a perimeter smaller than 0.001. End of the input will be a line with eight 0.0's. Output For each input set, print a single line with eight floating point numbers. These represent the areas and perimeters of the four Quadrants, like this: A1 P1 A2 P2 A3 P3 A4 P4 Print them in order from largest area to smallest -- so A1 is the largest area. If two Quadrants have the same area when rounded to 3 decimal places, output the one with the largest perimeter first. Print all values with 3 decimal places of precision (rounded). Print spaces between numbers. Do not print any blank lines between outputs. Sample Input 1 2 1 5 5 2 2 0 3.5 2.2 4.8 -9.6 -1.2 -4.4 -8.9 12.4 0.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 Sample Output 5.100 11.459 3.400 9.045 0.900 6.659 0.600 4.876 44.548 38.972 21.982 25.997 20.342 38.374 10.038 19.043
ATMEL Tiny13 单片机检验字节问题
ATMEL Tiny13这款单片机的校验字节是否能修改,还有,校验字节有什么用? 这两个字节是否会导致同一程序下载到不同的mcu中时数据发送变化?
字符串代码处理,具体怎么写,Ye Holy Hand Grenades!
Problem Description Holy Hand Grenades have found multiple uses throughout history. Most notably, King Arthur did use a Holy Hand Grenade (HHG) to dispatch a vicious rabbit which was guarding the entrance to a cave. The instructions for its use are in the Book of Armaments (Chapter 2, verses 9-21), and are read as follows: Unfortunately, the Book of Armaments faileth to mention that the HHG must come to a complete stop (i.e. rest stably) before it can explodeth and blow a rabbit to tiny bits. As long as it rolleth or wobbeleth, it refuseth to explodeth. Unknown is the reason why the authors of the Book of Armaments neglected to mention this pertinent fact. Further complicating matters, different HHGs have different radii of destruction (RD). Once a HHG resteth stably, and explodeth, everything within or equal to its RD shalt be snuffed out. Presumably, this is what happened to the rabbit with big, pointy teeth; however, there remaineth some controversy over this matter. Because of this controversy, the king hath decreed a simulation to be run that may possibly answer this question. Your task is to determine the result of the grenade’s explosion. The grenade must always be at rest in order to detonate. All HHGs have a radius R=1 and a variable radius of destruction (RD). At the instant of detonation, the rabbit could be mid-leap, on the ground, or underground. For each simulation the terrain remaineth unchanged. It consisteth of two intersecting curves, y = e-x and y = ln(x) as we have revealed unto you in the illustrious illustration. The curves reside in the plane formed by the rabbit, the grenade, and the center of the earth. The terrain is impervious to detonations, and changeth not between tests. If a bunny’s center of mass is strictly below the ground level (as denoted by the intersecting curves) when a HHG explodeth, that bunny shalt remaineth un-snuffedeth and thus shalt live to bite another day. If the bunny resideth strictly outside of the range of a stably resting HHG’s radius of destruction, that bunny shalt also remain un-snuffedeth out. Each result shalt be dependent upon computations accurate even unto 8 significant figures. There shalt not be an input value smaller even than 1.0E-15 or greater even than 1.0E+15. Because the bunny’s center of mass doth be its location, a bunny might possibly end up inside both the RD and the R=1 of a HHG. This simply means the bunny is curled around the grenade. If the center of mass of such a bunny be strictly inside the RD it shall most surely be snufféd out. Amen. . Input The first line of input doth contain yea verily a single integer indicating the number of holy hand grenades in the data file. Each line of the file doth contain the radius of destruction of this particular holy hand grenade, and finally doth contain the rabbit’s x coordinate (xb) and y coordinate (yb) during this particular test run. Output For each test run, thy program shalt print out the words "Bunny Bits" (if the rabbit is blown to bits by the grenade) or "Bunny Biteth Knights" (if the rabbit liveth to fight on another day anon). Sample Input 2 1.5 3.0 3.0 5.5 3.0 3.0 Sample Output Bunny Biteth Knights Bunny Bits
C的程序语言,Showstopper
Problem Description Data-mining huge data sets can be a painful and long lasting process if we are not aware of tiny patterns existing within those data sets. One reputable company has recently discovered a tiny bug in their hardware video processing solution and they are trying to create software workaround. To achieve maximum performance they use their chips in pairs and all data objects in memory should have even number of references. Under certain circumstances this rule became violated and exactly one data object is referred by odd number of references. They are ready to launch product and this is the only showstopper they have. They need YOU to help them resolve this critical issue in most efficient way. Can you help them? Input Input file consists from multiple data sets separated by one or more empty lines. Each data set represents a sequence of 32-bit (positive) integers (references) which are stored in compressed way. Each line of input set consists from three single space separated 32-bit (positive) integers X Y Z and they represent following sequence of references: X, X+Z, X+2*Z, X+3*Z, …, X+K*Z, …(while (X+K*Z)<=Y). Your task is to data-mine input data and for each set determine weather data were corrupted, which reference is occurring odd number of times, and count that reference. Output For each input data set you should print to standard output new line of text with either “no corruption” (low case) or two integers separated by single space (first one is reference that occurs odd number of times and second one is count of that reference). Sample Input 1 10 1 2 10 1 1 10 1 1 10 1 1 10 1 4 4 1 1 5 1 6 10 1 Sample Output 1 1 no corruption 4 3
bugzilla安装后注册新用户报错
Software error: Can't locate object method "message" via package "SMTP auth requires MIME::Base64 and Authen::SASL at C:/Perl/site/lib/Email/Sender/Transport/SMTP.pm line 162. Email::Sender::Transport::SMTP::_smtp_client(Email::Sender::Transport::SMTP::Persistent=HASH(0x48559bc)) called at C:/Perl/site/lib/Email/Sender/Transport/SMTP/Persistent.pm line 32 Email::Sender::Transport::SMTP::Persistent::_smtp_client(Email::Sender::Transport::SMTP::Persistent=HASH(0x48559bc)) called at C:/Perl/site/lib/Email/Sender/Transport/SMTP.pm line 202 Email::Sender::Transport::SMTP::send_email(Email::Sender::Transport::SMTP::Persistent=HASH(0x48559bc), Email::Abstract=ARRAY(0x484623c), HASH(0x4853064)) called at C:/Perl/site/lib/Email/Sender/Role/CommonSending.pm line 45 Email::Sender::Role::CommonSending::try {...} () called at C:/Perl/lib/Try/Tiny.pm line 103 eval {...} called at C:/Perl/lib/Try/Tiny.pm line 94 Try::Tiny::try(CODE(0x485d714), Try::Tiny::Catch=REF(0x3deeba4)) called at C:/Perl/site/lib/Email/Sender/Role/CommonSending.pm line 58 Email::Sender::Role::CommonSending::send(Email::Sender::Transport::SMTP::Persistent=HASH(0x48559bc), Email::Abstract=ARRAY(0x484623c), HASH(0x485d504)) called at C:/Perl/site/lib/Email/Sender/Simple.pm line 119 Email::Sender::Simple::send_email("Email::Sender::Simple", Email::Abstract=ARRAY(0x484623c), HASH(0x4845f24)) called at C:/Perl/site/lib/Email/Sender/Role/CommonSending.pm line 45 Email::Sender::Role::CommonSending::try {...} () called at C:/Perl/lib/Try/Tiny.pm line 103 eval {...} called at C:/Perl/lib/Try/Tiny.pm line 94 Try::Tiny::try(CODE(0x3c1eb14), Try::Tiny::Catch=REF(0x3c3634c)) called at C:/Perl/site/lib/Email/Sender/Role/CommonSending.pm line 58 Email::Sender::Role::CommonSending::send("Email::Sender::Simple", Bugzilla::MIME=HASH(0x48539c4), HASH(0x3f4452c)) called at C:/Perl/lib/Sub/Exporter/Util.pm line 18 Sub::Exporter::Util::__ANON__(Bugzilla::MIME=HASH(0x48539c4), HASH(0x3f4452c)) called at Bugzilla/Mailer.pm line 212 eval {...} called at Bugzilla/Mailer.pm line 212 Bugzilla::Mailer::MessageToMTA("From: shaviation_fae\@163.com\x{a}To: 13817976834\@163.com\x{a}Subject:"..., 1) called at Bugzilla/Token.pm line 129 Bugzilla::Token::issue_new_user_account_token("jyuan", "13817976834\@163.com") called at Bugzilla/User.pm line 2498 Bugzilla::User::check_and_send_account_creation_confirmation(Bugzilla::User=HASH(0xa3b63c), "jyuan", "13817976834\@163.com") called at C:/bugzilla-5.1.1/createaccount.cgi line 46 " (perhaps you forgot to load "SMTP auth requires MIME::Base64 and Authen::SASL at C:/Perl/site/lib/Email/Sender/Transport/SMTP.pm line 162. Email::Sender::Transport::SMTP::_smtp_client(Email::Sender::Transport::SMTP::Persistent=HASH(0x48559bc)) called at C:/Perl/site/lib/Email/Sender/Transport/SMTP/Persistent.pm line 32 Email::Sender::Transport::SMTP::Persistent::_smtp_client(Email::Sender::Transport::SMTP::Persistent=HASH(0x48559bc)) called at C:/Perl/site/lib/Email/Sender/Transport/SMTP.pm line 202 Email::Sender::Transport::SMTP::send_email(Email::Sender::Transport::SMTP::Persistent=HASH(0x48559bc), Email::Abstract=ARRAY(0x484623c), HASH(0x4853064)) called at C:/Perl/site/lib/Email/Sender/Role/CommonSending.pm line 45 Email::Sender::Role::CommonSending::try {...} () called at C:/Perl/lib/Try/Tiny.pm line 103 eval {...} called at C:/Perl/lib/Try/Tiny.pm line 94 Try::Tiny::try(CODE(0x485d714), Try::Tiny::Catch=REF(0x3deeba4)) called at C:/Perl/site/lib/Email/Sender/Role/CommonSending.pm line 58 Email::Sender::Role::CommonSending::send(Email::Sender::Transport::SMTP::Persistent=HASH(0x48559bc), Email::Abstract=ARRAY(0x484623c), HASH(0x485d504)) called at C:/Perl/site/lib/Email/Sender/Simple.pm line 119 Email::Sender::Simple::send_email("Email::Sender::Simple", Email::Abstract=ARRAY(0x484623c), HASH(0x4845f24)) called at C:/Perl/site/lib/Email/Sender/Role/CommonSending.pm line 45 Email::Sender::Role::CommonSending::try {...} () called at C:/Perl/lib/Try/Tiny.pm line 103 eval {...} called at C:/Perl/lib/Try/Tiny.pm line 94 Try::Tiny::try(CODE(0x3c1eb14), Try::Tiny::Catch=REF(0x3c3634c)) called at C:/Perl/site/lib/Email/Sender/Role/CommonSending.pm line 58 Email::Sender::Role::CommonSending::send("Email::Sender::Simple", Bugzilla::MIME=HASH(0x48539c4), HASH(0x3f4452c)) called at C:/Perl/lib/Sub/Exporter/Util.pm line 18 Sub::Exporter::Util::__ANON__(Bugzilla::MIME=HASH(0x48539c4), HASH(0x3f4452c)) called at Bugzilla/Mailer.pm line 212 eval {...} called at Bugzilla/Mailer.pm line 212 Bugzilla::Mailer::MessageToMTA("From: shaviation_fae\@163.com\x{a}To: 13817976834\@163.com\x{a}Subject:"..., 1) called at Bugzilla/Token.pm line 129 Bugzilla::Token::issue_new_user_account_token("jyuan", "13817976834\@163.com") called at Bugzilla/User.pm line 2498 Bugzilla::User::check_and_send_account_creation_confirmation(Bugzilla::User=HASH(0xa3b63c), "jyuan", "13817976834\@163.com") called at C:/bugzilla-5.1.1/createaccount.cgi line 46 "?) at Bugzilla/Mailer.pm line 214. For help, please send mail to the webmaster (admin@aeroer.com), giving this error message and the time and date of the error.
友善之臂tiny4412ADK 1312开发板通过gpio口控制外接led灯问题
![图片说明](https://img-ask.csdn.net/upload/201612/04/1480820785_233204.jpg)最近自己在用友善的tiny4412ADK 1312开发板,目的是想通过gpio口来控制外接led灯。目前自己可以实现资料上所给的GPIO_LED_Demo程序例子,点亮核心板上的led1~4灯,但对于外接led灯这个过程不是太了解,以及如何通过gpio口控制外接led灯?希望有这方面经验的前辈给我点建议,谢谢!
激光的程序怎么设计Laser Beam
Problem Description There is an equilateral triangle consist of 3 mirrors. There is a tiny slit in the corners of the triangle, which can let a laser beam pass through. We label the 3 slits as A, B and C. There only exists two ways (see the picture above) make a laser beam enter our triangle though C, reflects 11 times in ther triangle, and exit from the triangle though C. The 2 ways are symmetry. Here is the question for you, our great programmer. How many ways we can make a laser beam enter the triangle though C and exit though C, and the beam reflects n times in the triangle? e.g. there are 80840 ways when n is 1000001. Input The first line contains a number T.(1≤T≤100) Then the following T line each line contains a number n.(1≤n≤107) Output For each n, print the corresponding result. Sample Input 10 2 5 7 11 13 17 19 23 29 31 Sample Output 0 0 2 2 2 0 4 4 2 6
Android下RTL8192cu WiFi模块的移植
本人用的友善之臂的tiny210开发板,想要在Android4.0系统下移植WiFi热点功能,所用的WiFi模块是USB接口的RTL8192CU模块。移植过程中,realtek技术文档说如果要使用nl80211接口的话,需要在驱动autoconf.h头文件中定义宏CONFIG_IOCTL_CFG80211,但是定义该宏变量后,系统每次加载该驱动时就会报错并自动重启。 报错结果如下: ![图片说明](https://img-ask.csdn.net/upload/201508/06/1438829631_983534.png) 然而,如果不定义该宏变量,驱动虽然正确加载,但是上层不能正常启动wpa_supplicant进程,logcat中也有报错: E/wpa_supplicant(2966): wlan0: Unsupported driver 'nl80211' E/WifiHW(1863): Supplicant not running, cannot connect E/WifiStateMachine(1863): Failed to setup control channel, restart supplicant E/WifiHW(1863): Unable to open connection to supplicant on "wlan0": No such file or directory 请问,有没有大神知道是怎么回事,或者有没有谁做过这个,能不能指导一下
一道C++的分段函数问题
using namespace std; const double TINY_VALUE = 1e-10; //计算精度为 10^-10 double tsin(double x) { double g = 0; double t = x; int n = 1; do { g += t; n++; t = -t * x*x / (2 * n - 1) / (2 * n - 2); } while (fabs(t) >= TINY_VALUE); return g; } int main() { double k, r, s; cout << "r = "; cin >> r; cout << "s = "; cin >> s; if (r*r <= s * s) k = sqrt(tsin(r)*tsin(r) + tsin(s)*tsin(s)); else k = tsin(r*s) / 2; cout << k << endl; return 0; } 请问do~while语句里面的代码是什么意思。小白求教,谢谢了。
使用darknet时出现的问题
./darknet detect ./cfg/tiny-yolo-voc.cfg tiny-yolo-voc.weights ./data/eagle.jpg 在我输入这条指令测试时冒出了 layer filters size input output 0 conv 32 3 x 3 / 1 416 x 416 x 3 -> 416 x 416 x 32 1 max 2 x 2 / 2 416 x 416 x 32 -> 208 x 208 x 32 2 conv 64 3 x 3 / 1 208 x 208 x 32 -> 208 x 208 x 64 3 max 2 x 2 / 2 208 x 208 x 64 -> 104 x 104 x 64 4 conv 128 3 x 3 / 1 104 x 104 x 64 -> 104 x 104 x 128 5 conv 64 1 x 1 / 1 104 x 104 x 128 -> 104 x 104 x 64 6 conv 128 3 x 3 / 1 104 x 104 x 64 -> 104 x 104 x 128 7 max 2 x 2 / 2 104 x 104 x 128 -> 52 x 52 x 128 8 conv 256 3 x 3 / 1 52 x 52 x 128 -> 52 x 52 x 256 9 conv 128 1 x 1 / 1 52 x 52 x 256 -> 52 x 52 x 128 10 conv 256 3 x 3 / 1 52 x 52 x 128 -> 52 x 52 x 256 11 max 2 x 2 / 2 52 x 52 x 256 -> 26 x 26 x 256 12 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 13 conv 256 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 256 14 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 15 conv 256 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 256 16 conv 512 3 x 3 / 1 26 x 26 x 256 -> 26 x 26 x 512 17 max 2 x 2 / 2 26 x 26 x 512 -> 13 x 13 x 512 18 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 19 conv 512 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 512 20 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 21 conv 512 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 512 22 conv 1024 3 x 3 / 1 13 x 13 x 512 -> 13 x 13 x1024 23 conv 1024 3 x 3 / 1 13 x 13 x1024 -> 13 x 13 x1024 24 conv 1024 3 x 3 / 1 13 x 13 x1024 -> 13 x 13 x1024 25 route 16 26 conv 64 1 x 1 / 1 26 x 26 x 512 -> 26 x 26 x 64 27 reorg / 2 26 x 26 x 64 -> 13 x 13 x 256 28 route 27 24 29 conv 1024 3 x 3 / 1 13 x 13 x1280 -> 13 x 13 x1024 30 conv 120 1 x 1 / 1 13 x 13 x1024 -> 13 x 13 x 120 31 detection darknet: ./src/parser.c:280: parse_region: Assertion `l.outputs == params.inputs' failed. 已放弃 (核心已转储) 这样的提示 请问这个错误提示是因为什么呢? 另外我在安装完darknet之后按照csdn上的教程改参数,可是发现我的src文件夹中没有yolo.c等文件,但是example里面有,我就给拷贝到了scr中并做了修改,现在想想是不是安装失败了啊orz
C语言来编写Ye Holy Hand Grenades
Problem Description Holy Hand Grenades have found multiple uses throughout history. Most notably, King Arthur did use a Holy Hand Grenade (HHG) to dispatch a vicious rabbit which was guarding the entrance to a cave. The instructions for its use are in the Book of Armaments (Chapter 2, verses 9-21), and are read as follows: Unfortunately, the Book of Armaments faileth to mention that the HHG must come to a complete stop (i.e. rest stably) before it can explodeth and blow a rabbit to tiny bits. As long as it rolleth or wobbeleth, it refuseth to explodeth. Unknown is the reason why the authors of the Book of Armaments neglected to mention this pertinent fact. Further complicating matters, different HHGs have different radii of destruction (RD). Once a HHG resteth stably, and explodeth, everything within or equal to its RD shalt be snuffed out. Presumably, this is what happened to the rabbit with big, pointy teeth; however, there remaineth some controversy over this matter. Because of this controversy, the king hath decreed a simulation to be run that may possibly answer this question. Your task is to determine the result of the grenade’s explosion. The grenade must always be at rest in order to detonate. All HHGs have a radius R=1 and a variable radius of destruction (RD). At the instant of detonation, the rabbit could be mid-leap, on the ground, or underground. For each simulation the terrain remaineth unchanged. It consisteth of two intersecting curves, y = e-x and y = ln(x) as we have revealed unto you in the illustrious illustration. The curves reside in the plane formed by the rabbit, the grenade, and the center of the earth. The terrain is impervious to detonations, and changeth not between tests. If a bunny’s center of mass is strictly below the ground level (as denoted by the intersecting curves) when a HHG explodeth, that bunny shalt remaineth un-snuffedeth and thus shalt live to bite another day. If the bunny resideth strictly outside of the range of a stably resting HHG’s radius of destruction, that bunny shalt also remain un-snuffedeth out. Each result shalt be dependent upon computations accurate even unto 8 significant figures. There shalt not be an input value smaller even than 1.0E-15 or greater even than 1.0E+15. Because the bunny’s center of mass doth be its location, a bunny might possibly end up inside both the RD and the R=1 of a HHG. This simply means the bunny is curled around the grenade. If the center of mass of such a bunny be strictly inside the RD it shall most surely be snufféd out. Amen. . Input The first line of input doth contain yea verily a single integer indicating the number of holy hand grenades in the data file. Each line of the file doth contain the radius of destruction of this particular holy hand grenade, and finally doth contain the rabbit’s x coordinate (xb) and y coordinate (yb) during this particular test run. Output For each test run, thy program shalt print out the words "Bunny Bits" (if the rabbit is blown to bits by the grenade) or "Bunny Biteth Knights" (if the rabbit liveth to fight on another day anon). Sample Input 2 1.5 3.0 3.0 5.5 3.0 3.0 Sample Output Bunny Biteth Knights Bunny Bits
【c-WinAPI】 程序运行崩溃(自己写的函数出错),求大神帮忙!!!!
# 先行说明: ## 工程简要说明 说明下,这个工程一共5个文件(两个头文件,三个资源文件): 头文件中,一个是宏定义用文件【WinMacro.h】,另一个是函数声明用文件【WinHead.h】; 资源文件中,一个是窗口注册文件(基本可以忽略)【WinMain.c】,第二个是窗口过程文件【WinProc.c】,最后一个里是函数定义文件(主要出错的地方)【WinSupport.c】。 ## 编译器介绍 这里我用的是Dev c++ (v.5.11)编译器,有段时间入了学生联赛的坑,然后现在就有点停不下来,对VC没什么好感,emmm。 ## 对于ERROR的探索 我本来是希望用TextOut函数做一个模拟DrawText函数的新函数:TextPrint,后续还想给它添加一些独特的输出特效,不过现在看来都运行不了(一运行就立即报错,但是编译没问题),尴尬。 万恶的Dev c++调试功能有问题,找了很长时间解决办法之后,就调试了一下,结果就...完全看不懂了。 在下面我标注的【图6】第27行(WinSupport.c)这里单步调试会终止,并弹出显示: > program received signal SIGFPE, Airthmetic expection 然后会显示 Windows CPU 运行表(大概是这个叫法...),但还是看不懂。所以我后面修改了代码,把27、28行都改成了将那两个变量赋值为常数2,而不是即时计算。 顺便改了一下74行,把pcText换成了pChar (74行这里是自己发现的逻辑错误)。 现在各位看到的代码是最初的版本,上面的修改在下面附的代码里都未体现。不是说我懒的修改,而是因为我想把这里弄明白,到底是什么原因。 修改后的代码其实也有问题,那就是虽然可以运行,但是假如在一个矩形内输出了n(n>1)行,那么只有第一行能被保留(啊啊啊,要疯了!!!) ## 最终预期功能 嗯,这里在重申一下,那个TextPrint函数是低配版的DrawText函数,功能就是指定一个矩形,然后向矩形范围内输出(每行填满后自动换行)(假如要输出的内容填满了整个矩形都没有输出完,那就停止输出)。 ## 一些个人看法 自己也试了许多次,但就是不太清楚其中机理,只好劳烦各位“达人”了。 我是直接看书自学的WinAPI,没什么耐性,就先用刚学的新函数TextOut练练手, 所以...挖了个大坑。 个人感觉应该是WinAPI"可重入"的锅,但是实在是没有接触过面向对象的编程(只会一点C),so...... ## 致谢 (.-..-.)刚刚注册的号,学生党一枚,初次提问,言谢在先! # 源代码: 【WinMacro.h】: ```c #define CLASSNAME "Program: Get Seated" #define APPNAME "Tiny Spotlessness: The Seats" #define SIZE_101 SIZEOFSTRING #define SIZEOFSTRING 100 #define EMPTY INITIAL #define INITIAL 0 #define CXSCREEN GetSystemMetrics (SM_CXSCREEN) #define CYSCREEN GetSystemMetrics (SM_CYSCREEN) #define FAULTMSG_101 FAULTMSG_WNDNTNEEDED #define FAULTMSG_WNDNTNEEDED "Fault 101: WindowsNTneeded!" ``` 【图1】 ![图片说明](https://img-ask.csdn.net/upload/201907/06/1562392986_229499.png) 【WinHead.h】: ```c /*---------------------------------------------------------------- Supporting Header Files -----------------------------------------------------------------*/ #include <windows.h> #include <stdbool.h> #include "WinMacro.h" /*---------------------------------------------------------------- Supporting Value Structions -----------------------------------------------------------------*/ /*---------------------------------------------------------------- Supporting Function Statements -----------------------------------------------------------------*/ LRESULT CALLBACK WndProc ( /*--------------------------------------*/ HWND hwnd, /* Stating the Main Window Process, */ UINT message, /* a special function with four para- */ WPARAM wParam, /* meters, using the other functions. */ LPARAM lParam /*--------------------------------------*/ ); int TextPrint( /*--------------------------------------*/ HDC hdc, /* Print on any place of rect, using */ RECT *pRect, /* a pointer to rect and a pointer to */ const TEXTMETRIC *pTm, /* the text metric, a string with */ const TCHAR *pcText, /* its length, and return the number */ int iLenth /* of the characters outputted. */ ); ``` 【图2】 ![图片说明](https://img-ask.csdn.net/upload/201907/06/1562393250_936313.png) 【图3】 ![图片说明](https://img-ask.csdn.net/upload/201907/06/1562393275_813852.png) 【WinMain.c】: ```c /*-------------------------------------- WinMain.c, (c) Shen Pengfei, 2019 --------------------------------------*/ #include "WinHead.h" int WINAPI WinMain ( HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow ) { TCHAR szClassName[] = TEXT (CLASSNAME); TCHAR szAppName[] = TEXT (APPNAME); HWND hwnd; MSG msg; WNDCLASS wndclass; wndclass.style = CS_HREDRAW | CS_VREDRAW; wndclass.lpfnWndProc = WndProc; wndclass.cbClsExtra = EMPTY; wndclass.cbWndExtra = EMPTY; wndclass.hInstance = hInstance; wndclass.hIcon = LoadIcon (NULL, IDI_APPLICATION); wndclass.hCursor = LoadCursor (NULL, IDC_ARROW); wndclass.hbrBackground = (HBRUSH) GetStockObject (WHITE_BRUSH); wndclass.lpszClassName = szClassName; wndclass.lpszMenuName = NULL; if (!RegisterClass (&wndclass)) { MessageBox ( NULL, TEXT (FAULTMSG_WNDNTNEEDED), szAppName, MB_ICONERROR ); return EMPTY; } hwnd = CreateWindow ( szClassName, /* window class name */ szAppName, /* window caption name */ WS_OVERLAPPEDWINDOW | WS_VSCROLL, /* window style */ INITIAL, /* initial x position */ INITIAL, /* initial y position */ CXSCREEN, /* initial x size */ CYSCREEN, /* initial y size */ NULL, /* parent window handle */ NULL, /* window menu handle */ hInstance, /* program instance handle */ NULL /* creation parameters */ ); ShowWindow (hwnd, iCmdShow); UpdateWindow (hwnd); while (GetMessage (&msg, NULL, EMPTY, EMPTY)) { TranslateMessage (&msg); DispatchMessage (&msg); } return msg.wParam; } ``` 【图4】 ![图片说明](https://img-ask.csdn.net/upload/201907/06/1562393472_122237.png) 【图5】 ![图片说明](https://img-ask.csdn.net/upload/201907/06/1562393485_726445.png) 【WinSupport.c】: ```c /*------------------------------------------------ (c) Shen PengFei, 2019 A file to set up some functions to complite some special tasks. -------------------------------------------------*/ #include "WinHead.h" int TextPrint ( HDC hdc, RECT *pRect, const TEXTMETRIC *pTm, const TCHAR *pcText, int iLenth ) { static int iLine; static int iRaw; static int iCount; static const TCHAR *pChar; /*-------------------------------------------- Count the width and the Height of the screen, by the way, creating a pointer copying the address of initial string ---------------------------------------------*/ iLine = (pRect->right - pRect->left) / pTm->tmAveCharWidth; iRaw = (pRect->bottom - pRect->top) / (pTm->tmHeight + pTm->tmExternalLeading); pChar = pcText; for ( iCount = INITIAL; /*------------------------------------------------ To prevent the number of charaters outputt -ed on the screen from overring the string's, check if the result value of [PCHAR minus PCTEXT] was not larger than the length of the string. And also, to prevent the strin -g's overring the initial rect, check if the raw number over the max value counted and called IRAW. -------------------------------------------------*/ pChar - pcText < iLenth && iCount <= iRaw; /*------------------------------------------------ Change the outputting address of each raw, the position of the changed pointer to the string and Add the cyclelatte times value in turn each time, to end the running in time. -------------------------------------------------*/ pRect->top += pTm->tmHeight + pTm->tmExternalLeading, pChar += iLine, iCount ++ ) { /*----------------------------------------------- Solve the special condition that outputted characters' last raw is not enough to make the whole raw full, while may cause that the stuffs behind the address of the string fluent the system running. ------------------------------------------------*/ if ( iLenth % iLine != EMPTY && iCount == iLenth / iLine ) iLine = iLenth % iLine; TextOut ( hdc, pRect->left, pRect->top, pcText, iLine ); } /* Return the initial value used in turn */ pRect->left = pRect->top = INITIAL; return pChar - pcText; } ``` 【图6】 ![图片说明](https://img-ask.csdn.net/upload/201907/06/1562393526_633017.png) 【图7】 ![图片说明](https://img-ask.csdn.net/upload/201907/06/1562393538_23024.png) 【图8】 ![图片说明](https://img-ask.csdn.net/upload/201907/06/1562393576_200998.png) 【WinProc.c】: ```c /*----------------------------------------------- (c) Shen Pengfei, 2019 A file to create a series of windows, used by WINMAIN.C . ------------------------------------------------*/ #include "WinHead.h" LRESULT CALLBACK WndProc ( HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam ) { static int cxChar; static int cyChar; static RECT rectPrint; static TCHAR szText [SIZEOFSTRING]; HDC hdc; RECT rect; PAINTSTRUCT ps; TEXTMETRIC tm; switch (message) { case WM_CREATE: rectPrint.left = INITIAL; rectPrint.top = INITIAL; rectPrint.right = CXSCREEN; rectPrint.bottom = CYSCREEN; hdc = GetDC (hwnd); /*----------------------------------------- To get the text parameters on its width and height (may with the external leading). ------------------------------------------*/ GetTextMetrics (hdc, &tm); cxChar = tm.tmAveCharWidth; cyChar = tm.tmHeight + tm.tmExternalLeading; ReleaseDC (hwnd, hdc); return EMPTY; case WM_SIZE : rectPrint.right = LOWORD (lParam); rectPrint.bottom = HIWORD (lParam); return EMPTY; case WM_PAINT: hdc = BeginPaint (hwnd, &ps); /* Debugging part */ TextPrint ( hdc, &rectPrint, &tm, szText, wsprintf ( szText, TEXT ("sdaf") ) ); EndPaint (hwnd, &ps); return EMPTY; case WM_DESTROY: PostQuitMessage (EMPTY); return EMPTY; } return DefWindowProc (hwnd, message, wParam, lParam); } ``` 【图9】 ![图片说明](https://img-ask.csdn.net/upload/201907/06/1562393610_312365.png) 【图10】 ![图片说明](https://img-ask.csdn.net/upload/201907/06/1562393619_968385.png)
爬虫福利二 之 妹子图网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# 文字导航控件
立即提问