Django Cross Site Request Forgery protection(csrf,csrf_token)

在构建Django应用的时候如果涉及到表单或者一些ajax数据的提交操作,就难免会遇到csrf的问题,一般来说按照官网解说示例走都没啥问题,但是!大部分人不看官网文档,东拼一点,西凑一点,应用是跑起来了,但是出现点相关问题又是摸不着头脑;而且有些时候就算在官网看文档也是找不对地方,比如文档版本和应...

2018-08-22 19:06:22

阅读数:84

评论数:0

一个脚本搞定各linux平台下docker安装

以下脚本来自(https://get.docker.com),本人亲自验证通过 #!/bin/sh set -e#面试会问这里为什么这样写? # This script is meant for quick & easy install via: # $ curl ...

2018-08-20 20:16:15

阅读数:241

评论数:0

下载centos7 with python3 docker镜像无法使用yum源的原因以及solution

下载centos7 with python3 docker镜像无法使用yum源的原因以及solution 可能大多数人都不知道yum的可执行程序使用什么语言写的,请看: [lockey@7-o-1 ~]# cat /usr/bin/yum #!/usr/bin/python import sy...

2018-08-20 19:48:35

阅读数:91

评论数:0

Spark Machine Learning Error analysis and solution(Error with RDD[Vector];Vector takes type paramet)

While we follow spark example case class model_instance (features: Vector) //and val df = rawData.map(line => | { model_instance...

2018-08-20 19:32:33

阅读数:82

评论数:0

Git error solution for “unable to resolve reference” “unable to update local ref”

大清早就遇到一个意外的问题,幸好在stackoverflow上找到了对应topic error: unable to resolve reference refs/remotes/origin/master: No such file or directory ! [new branch] ...

2018-08-16 10:19:54

阅读数:140

评论数:0

Error solution for polyglot(No module named 'icu'、No module named '_bz2' )

系统环境redhat7.1 python3.6 polyglot 16.7.4 pip install polyglot import polyglot from polyglot.text import Text, Word Error 1 :No module named ‘icu’...

2018-08-15 21:43:26

阅读数:129

评论数:0

spark2.3.1执行Spark SQL操作Parquet数据源错误解决(UnsatisfiedLinkError:uncompressedLength(Ljava/nio/ByteBuffer)

scala> namesDF.foreach(attributes =>println("Name: " + attributes(0)+" favorite color:"+at...

2018-08-14 14:08:28

阅读数:102

评论数:0

spark 2.3.1集群搭建(Master,Slave,Slave)

基础配置同上篇博客 配置教程请先参阅:厦门大学数据库实验室系列博客 Spark 2.0分布式集群环境搭建 需要注意的配置有两个 cd /usr/local/spark/ cp ./conf/slaves.template ./conf/slaves #slaves文件设置Worker节点...

2018-08-10 23:51:37

阅读数:217

评论数:0

Hadoop 2.9.1 Fully-Distributed Cluster Setup

环境准备: 系统:ubuntu 16.10(3 servers) Virtualization: vmware Operating System: Ubuntu Zesty Zapus (development branch) Kernel: Linux 4.8.0-22-generic Arc...

2018-08-10 21:24:21

阅读数:89

评论数:0

用面向对象的思想实现一个有理数以及有理数的加减乘除运算——Python版本

class Rational(object): def __init__(self,a,b=1): if(b ==0 ):#对于分母为0的情况直接举异常 raise Exception("Denominator must not be 0!&quo...

2018-08-08 19:08:42

阅读数:88

评论数:0

用面向对象的思想实现一个有理数以及有理数的加减乘除运算——Scala版本

有理数 有理数是“数与代数”领域中的重要内容之一,在现实生活中有广泛的应用,是继续学习实数、代数式、方程、不等式、直角坐标系、函数、统计等数学内容以及相关学科知识的基础。数学上,有理数是一个整数a和一个正整数b的比,例如3/8,通则为a/b。0也是有理数。有理数是整数和分数的集合,整数也可看做是...

2018-08-08 19:02:41

阅读数:103

评论数:1

python杂记20180806

python buildin functions: https://www.programiz.com/python-programming/methods/built-in/abs sorted() Parameters sorted() takes two three param...

2018-08-06 20:50:23

阅读数:38

评论数:0

Codility编程课一MaxProductOfThree

MaxProductOfThree Maximize A[P] * A[Q] * A[R] for any triplet (P, Q, R). Task description A non-empty array A consisting of N integers is given...

2018-08-06 20:46:57

阅读数:39

评论数:0

Codility编程课一MinAvgTwoSlice

MinAvgTwoSlice Find the minimal average of any slice containing at least two elements. Task description A non-empty array A consisting of N int...

2018-08-03 18:46:42

阅读数:34

评论数:0

Codility编程课一GenomicRangeQuery(Find the minimal nucleotide from a range of sequence DNA.)

GenomicRangeQuery Find the minimal nucleotide from a range of sequence DNA. Task description A DNA sequence can be represented as a string cons...

2018-08-03 18:37:56

阅读数:29

评论数:0

Codility编程课一CountDiv(Compute number of integers divisible by k in range [a..b])

CountDiv Compute number of integers divisible by k in range [a..b]. Task description Write a function: def solution(A, B, K) that, given thre...

2018-08-03 18:36:33

阅读数:41

评论数:0

有向无环图转换为Excel再到网页呈现

首先我们需要从后端读取Excel然后做一次数据过滤: 主要是去除空行以及空列,然后将数据结构转换为二位列表以合理的方式传递到前端 >>> import pandas as pd >>&...

2018-08-02 20:28:35

阅读数:47

评论数:0

Codility编程课一PassingCars(Count the number of passing cars on the road.)

PassingCars Count the number of passing cars on the road. A non-empty array A consisting of N integers is given. The consecutive elements of array...

2018-08-02 20:08:37

阅读数:62

评论数:0

Codility编程课一MaxCounters

MaxCounters Calculate the values of counters after applying all alternating operations: increase counter by 1; set value of all counters to current ...

2018-08-02 20:02:36

阅读数:63

评论数:0

Codility编程课一MissingInteger

MissingInteger Find the smallest positive integer that does not occur in a given sequence. Task description This is a demo task. Write a functio...

2018-08-01 23:34:56

阅读数:62

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭