linux配置阿里云SSL证书,遇到:Invalid keystore format 10C

org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:935)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:530)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:852)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
at org.apache.catalina.startup.Catalina.load(Catalina.java:622)
at org.apache.catalina.startup.Catalina.load(Catalina.java:645)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:311)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:494)
Caused by: java.lang.IllegalArgumentException: java.io.IOException: Invalid keystore format
at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:114)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:85)
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:216)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1039)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:540)
at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:70)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:932)
... 13 more
Caused by: java.io.IOException: Invalid keystore format
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:650)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55)
at java.security.KeyStore.load(KeyStore.java:1445)
at org.apache.tomcat.util.net.SSLUtilBase.getStore(SSLUtilBase.java:139)
at org.apache.tomcat.util.net.SSLHostConfigCertificate.getCertificateKeystore(SSLHostConfigCertificate.java:204)
at org.apache.tomcat.util.net.jsse.JSSEUtil.getKeyManagers(JSSEUtil.java:183)
at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:112)
... 19 more
这事报的异常。
而同样的配置在Windows上没有问题,而在linux配置就报异常。

1个回答

我也遇到了差不多的问题,目前有两种思路:1.看看sun和jdk的security文件夹下的两个jar,是不是有对加密算法长度的限制。2.转换数字证书格式,sun支持pkcs12等,而IBM支持jsk,转换文件格式试试

Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
其他相关推荐
Vue点击事件无效:Invalid handler for event "click": got undefined

描述: 定义了单击事件,但是使用Vue组件生成的标签就检测不到单击的方法,并报错:Invalid handler for event "click": got undefined 把标签放到外面可以正常使用,使用Vue组件生成后就报错,而且msg这个也找不到了 请问该如何处理?以下是全部代码 ``` <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>index</title> <script type="text/javascript" src="js/jquery.min.js"></script> <script type="text/javascript" src="js/vue.js"></script> </head> <body> <div id="container"> <div id="navbar_left"> <pr></pr> </div> </div> <script> Vue.component("pr",{ name:"pr", template:"<p @click='this.toggle'>{{msg}}</p>", data(){ return{ open:true } } }); var app = new Vue({ el:"#navbar_left", data:{ msg:"hello world", }, methods:{ toggle(){ this.open = !this.open } }, }); </script> </body> </html> ```

ValueError: invalid literal for int() with base 10: 'aer'

#coding=utf-8 #Version:python3.6.0 #Tools:Pycharm 2017.3.2 import numpy as np import tensorflow as tf import re TRAIN_PATH="data/ptb.train.txt" EVAL_PATH="data/ptb.valid.txt" TEST_PATH="data/ptb.test.txt" HIDDEN_SIZE=300 NUM_LAYERS=2 VOCAB_SIZE=10000 TRAIN_BATCH_SIZE=20 TRAIN_NUM_STEP=35 EVAL_BATCH_SIZE=1 EVAL_NUM_STEP=1 NUM_EPOCH=5 LSTM_KEEP_PROB=0.9 EMBEDDING_KEEP_PROB=0.9 MAX_GRED_NORM=5 SHARE_EMB_AND_SOFTMAX=True class PTBModel(object): def __init__(self,is_training,batch_size,num_steps): self.batch_size=batch_size self.num_steps=num_steps self.input_data=tf.placeholder(tf.int32,[batch_size,num_steps]) self.targets=tf.placeholder(tf.int32,[batch_size,num_steps]) dropout_keep_prob=LSTM_KEEP_PROB if is_training else 1.0 lstm_cells=[ tf.nn.rnn_cell.DropoutWrapper(tf.nn.rnn_cell.BasicLSTMCell(HIDDEN_SIZE), output_keep_prob=dropout_keep_prob) for _ in range (NUM_LAYERS)] cell=tf.nn.rnn_cell.MultiRNNCell(lstm_cells) self.initial_state=cell.zero_state(batch_size,tf.float32) embedding=tf.get_variable("embedding",[VOCAB_SIZE,HIDDEN_SIZE]) inputs=tf.nn.embedding_lookup(embedding,self.input_data) if is_training: inputs=tf.nn.dropout(inputs,EMBEDDING_KEEP_PROB) outputs=[] state=self.initial_state with tf.variable_scope("RNN"): for time_step in range(num_steps): if time_step>0:tf.get_variable_scope().reuse_variables() cell_output,state=cell(inputs[:,time_step,:],state) outputs.append(cell_output) # 把输出队列展开成[batch,hidden_size*num_steps]的形状,然后再reshape成[batch*numsteps,hidden_size]的形状 output=tf.reshape(tf.concat(outputs,1),[-1,HIDDEN_SIZE]) if SHARE_EMB_AND_SOFTMAX: weight=tf.transpose(embedding) else: weight=tf.get_variable("weight",[HIDDEN_SIZE,VOCAB_SIZE]) bias=tf.get_variable("bias",[VOCAB_SIZE]) logits=tf.matmul(output,weight)+bias loss=tf.nn.sparse_softmax_cross_entropy_with_logits( labels=tf.reshape(self.targets,[-1]), logits=logits ) self.cost=tf.reduce_sum(loss)/batch_size self.final_state=state # 只在训练模型时定义反向传播操作 if not is_training:return trainable_variables=tf.trainable_variables() #控制梯度大小 grads,_=tf.clip_by_global_norm( tf.gradients(self.cost,trainable_variables),MAX_GRED_NORM) # 定义优化方法 optimizer=tf.train.GradientDescentOptimizer(learning_rate=1.0) # zip() 函数用于将可迭代的对象作为参数,将对象中对应的元素打包成一个个元组,然后返回由这些元组组成的对象,这样做的好处是节约了不少的内存。 #定义训练步骤 self.train_op=optimizer.apply_gradients( zip(grads,trainable_variables)) def run_epoch(session,model,batches,train_op,output_log,step): total_costs=0.0 iters=0 state=session.run(model.initial_state) for x,y in batches: cost,state,_=session.run( [model.cost,model.final_state,train_op], {model.input_data:x,model.targets:y, model.initial_state:state} ) total_costs+=cost iters+=model.num_steps # 只有在训练时输出日志 if output_log and step %100==0: print("After %d steps,perplexity is %.3f"%( step,np.exp(total_costs/iters) )) step +=1 return step,np.exp(total_costs/iters) # 从文件中读取数据,并返回包含单词编号的数组 def read_data(file_path): with open(file_path,"r") as fin: id_string=" ".join([line.strip() for line in fin.readlines()]) id_list=[int(w) for w in id_string.split()] # 将读取的单词编号转为整数 return id_list def make_batches(id_list,batch_size,num_step): # 计算总的batch数量,每个batch包含的单词数量是batch_size*num_step try: num_batches=(len(id_list)-1)/(batch_size*num_step) data=np.array(id_list[:num_batches*batch_size*num_step]) data=np.reshape(data,[batch_size,num_batches*num_step]) data_batches=np.split(data,num_batches,axis=1) label=np.array(id_list[1:num_batches*batch_size*num_step+1]) label=np.reshape(label,[batch_size,num_batches*num_step]) label_batches=np.split(label,num_batches,axis=1) return list(zip(data_batches,label_batches)) def main(): # 定义初始化函数 intializer=tf.random_uniform_initializer(-0.05,0.05) with tf.variable_scope("language_model",reuse=None,initializer=intializer): train_model=PTBModel(True,TRAIN_BATCH_SIZE,TRAIN_NUM_STEP) with tf.variable_scope("language_model",reuse=True,initializer=intializer): eval_model=PTBModel(False,EVAL_BATCH_SIZE,EVAL_NUM_STEP) with tf.Session() as session: tf.global_variables_initializer().run() train_batches=make_batches(read_data(TRAIN_PATH),TRAIN_BATCH_SIZE,TRAIN_NUM_STEP) eval_batches=make_batches(read_data(EVAL_PATH),EVAL_BATCH_SIZE,EVAL_NUM_STEP) test_batches=make_batches(read_data(TEST_PATH),EVAL_BATCH_SIZE,EVAL_NUM_STEP) step=0 for i in range(NUM_EPOCH): print("In iteration:%d" % (i+1)) step,train_pplx=run_epoch(session,train_model,train_batches,train_model.train_op,True,step) print("Epoch:%d Train perplexity:%.3f"%(i+1,train_pplx)) _,eval_pplx=run_epoch(session,eval_model,eval_batches,tf.no_op,False,0) print("Epoch:%d Eval perplexity:%.3f"%(i+1,eval_pplx)) _,test_pplx=run_epoch(session,eval_model,test_batches,tf.no_op(),False,0) print("Test perplexity:%.3f"% test_pplx) if __name__ == '__main__': main()

IllegalArgumentException: invalid value for field

![图片说明](https://img-ask.csdn.net/upload/201611/24/1479975761_217240.png)

Django创建超级用户时,出现错误 ValueError: invalid literal for int() with base 10: ''

ERROR exception 135 Internal Server Error: /users/ Traceback (most recent call last): File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/core/handlers/exception.py", line 41, in inner response = get_response(request) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/core/handlers/base.py", line 187, in _get_response response = self.process_exception_by_middleware(e, request) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/core/handlers/base.py", line 185, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view return view_func(*args, **kwargs) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/views/generic/base.py", line 68, in view return self.dispatch(request, *args, **kwargs) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/rest_framework/views.py", line 505, in dispatch response = self.handle_exception(exc) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/rest_framework/views.py", line 465, in handle_exception self.raise_uncaught_exception(exc) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception raise exc File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/rest_framework/views.py", line 502, in dispatch response = handler(request, *args, **kwargs) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/rest_framework/generics.py", line 242, in post return self.create(request, *args, **kwargs) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/rest_framework/mixins.py", line 19, in create self.perform_create(serializer) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/rest_framework/mixins.py", line 24, in perform_create serializer.save() File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/rest_framework/serializers.py", line 213, in save self.instance = self.create(validated_data) File "/home/python/dihai02/per02/apps/users/serializers/user.py", line 25, in create user = User.objects.create_user(**validated_data) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/contrib/auth/models.py", line 159, in create_user return self._create_user(username, email, password, **extra_fields) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/contrib/auth/models.py", line 153, in _create_user user.save(using=self._db) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/contrib/auth/base_user.py", line 80, in save super(AbstractBaseUser, self).save(*args, **kwargs) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/db/models/base.py", line 808, in save force_update=force_update, update_fields=update_fields) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/db/models/base.py", line 838, in save_base updated = self._save_table(raw, cls, force_insert, force_update, using, update_fields) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/db/models/base.py", line 924, in _save_table result = self._do_insert(cls._base_manager, using, fields, update_pk, raw) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/db/models/base.py", line 963, in _do_insert using=using, raw=raw) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/db/models/manager.py", line 85, in manager_method return getattr(self.get_queryset(), name)(*args, **kwargs) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/db/models/query.py", line 1076, in _insert return query.get_compiler(using=using).execute_sql(return_id) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1111, in execute_sql for sql, params in self.as_sql(): File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1064, in as_sql for obj in self.query.objs File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1064, in <listcomp> for obj in self.query.objs File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1063, in <listcomp> [self.prepare_value(field, self.pre_save_val(field, obj)) for field in fields] File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/db/models/sql/compiler.py", line 1003, in prepare_value value = field.get_db_prep_save(value, connection=self.connection) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/db/models/fields/__init__.py", line 770, in get_db_prep_save prepared=False) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/db/models/fields/__init__.py", line 762, in get_db_prep_value value = self.get_prep_value(value) File "/home/python/.virtualenvs/yuan/lib/python3.7/site-packages/django/db/models/fields/__init__.py", line 1853, in get_prep_value return int(value) ValueError: invalid literal for int() with base 10: ''

ValueError: invalid literal for int() with base 10: '05.png'

原帖子是这个https://www.cnblogs.com/skyfsm/p/8051705.html 我只是把这个帖子里的素材换成自己的而已 一直报![图片说明](https://img-ask.csdn.net/upload/202005/04/1588582796_8539.png) 谁救救我啊,我卡在这好久了,另问有没有可用深度学习的的发票训练集和数据集,可有偿

git 推送时出错:remote: invalid credentials

由Tim/tt 派生到Herry/tt, 向 Herry/tt推送时出错: remote: invalid credentials fatal: Authentication failed

【Android ADT】Error generating final archive...

昨晚使用Eclipse Android ADT 修改项目,突然ADT发神经报了个keystore错误然后按照网上的法子删除掉 .../Administrator/.android/keystore 文件。 再次打开就产生了下面这玩意,目前百度不到解决方法: Error generating final archive: java.security.cert.CertificateParsingException: java.io.IOException: Parse Generalized time, invalid format

munmap_chunk(): invalid pointer

![图片说明](https://img-ask.csdn.net/upload/201904/06/1554550406_562231.png) 42 //析构函数 43 MyString::~MyString() 44 { 45 cout<<"MyString::~MyString():"<<endl; 46 if (p != NULL) 47 { 48 delete []p; 49 p = NULL; 50 } 51 size = 1; 52 } 46行判断p不为空为真,进入删除却出现错误“munmap_chunk(): invalid pointer 已放弃 (核心已转储)”,有大佬解释一下么?万分感谢!!!

Python:SyntaxError: invalid syntax

#!/usr/bin/python import pexpect import shutil import os import stat remote_dir=r'/quest/splex-builds/depot/spo/9.0.1/latest/' local_dir=r'/splex/' tmp_file=r'/splex/tmp.txt' file_head=r'SharePlex-9.0.1-b' file_tail=r'-oracle110-rh-40-amd64-m64.tpm' user = 'qarun' ip = '127.0.0.1' mypassword = 'qarun' child = pexpect.spawn('ssh %s@%s' % (user, ip)) child.expect('password:') child.sendline(mypassword) child.expect('#') for (p, d, f) in os.walk(remote_dir): for i in f: if i.startswith(file_head) and i.endswith(file_tail): if os.path.exists(i): child.sendline(local_dir+i|tee -a tmp_file) [qarun@zh11gtm03:/splex]$./upgrade.py File "./upgrade.py", line 30 child.sendline(local_dir+i|tee -a tmp_file) ^ SyntaxError: invalid syntax 在最后的这行代码中,我想要实现执行这个命令的同时,将这个命令打印出来的代码都放到tmp_file里面,这个功能该如何实现呢?

linux下free(): invalid next size (fast)的问题

简单来说就是把mac地址转换成00:00:00:00:00:00这种形式,被调函数在for循环i=1时还很正常,i=2的时候执行到macValue += buffer这句话就挂了,报错 free(): invalid next size (fast),实在是找不到原因了,谷歌说内存泄露,可是我实在不知道string这里怎么泄露啊,求各位帮忙看看啊 不胜感激!(另外,我用小程序测试过这段代码完成没问题啊,可是放到大程序里面就不行了,嘤嘤嘤) 主调函数部分 rule.fieldValue[DL_SRC] = ::getMacValueAsString(ofm->match.dl_src); 被调用函数: string getMacValueAsString(const uint8_t* macAddress) { string macValue ; char buffer[8]; for(int i = 0; i < OFP_ETH_ALEN; i++) { uint8_t upperNibble = macAddress[i] >> 4; uint8_t lowerNibble = macAddress[i] & (uint8_t)0xF; sprintf(buffer, "%x%x", upperNibble, lowerNibble); macValue += buffer; cout<<"macValue:"<<macValue<<endl; if(i != (OFP_ETH_ALEN - 1)) { macValue+=':'; } } return macValue; }

运行pip显示SyntaxError: invalid syntax

C:\Users\Administrator>pip list Traceback (most recent call last): File "C:\Python32\Scripts\pip-script.py", line 9, in <module> load_entry_point('pip==9.0.1', 'console_scripts', 'pip')() File "C:\Python32\lib\site-packages\distribute-0.6.27-py3.2.egg\pkg_resources.py", line 337, in load_entry_point return get_distribution(dist).load_entry_point(group, name) File "C:\Python32\lib\site-packages\distribute-0.6.27-py3.2.egg\pkg_resources.py", line 2308, in load_entry_point return ep.load() File "C:\Python32\lib\site-packages\distribute-0.6.27-py3.2.egg\pkg_resources.py", line 2018, in load entry = __import__(self.module_name, globals(),globals(), ['__name__']) File "C:\Python32\lib\site-packages\pip-9.0.1-py3.2.egg\pip\__init__.py", line 21, in <module> from pip._vendor.requests.packages.urllib3.exceptions import DependencyWarning File "C:\Python32\lib\site-packages\pip-9.0.1-py3.2.egg\pip\_vendor\requests\__init__.py", line 66, in <module> from .models import Request, Response, PreparedRequest File "C:\Python32\lib\site-packages\pip-9.0.1-py3.2.egg\pip\_vendor\requests\models.py", line 856 http_error_msg = u'%s Client Error: %s for url: %s' % (self.status_code, reason, self.url) ^ SyntaxError: invalid syntax

SyntaxError: invalid syntax

运行此行代码[print(s) for s in lseqs]出现SyntaxError: invalid syntax ``` def create_matrix_zeros(nrows,ncols): res = [] for i in range(0,nrows): res.append([0]*ncols) return res def print_matrix(mat): for i in range(0,len(mat)): print(mat[i]) class MyMotifs: def __init__(self,seqs=[],pwm=[],alphabet=None): if seqs: self.size = len(seqs[0]) self.seqs = seqs self.alphabet = seqs[0].alphabet() self.do_counts() self.create_pwm() else: self.pwm = pwm self.size = len(pwm[0]) self.alphabet = alphabet def __len__(self): return self.size def do_counts(self): # noinspection PyAttributeOutsideInit self.counts = create_matrix_zeros(len(self.alphabet),self.size) for s in self.seqs: for i in range(self.size): lin = self.alphabet.index(s[i]) self.counts[lin][i] += 1 def create_pwm(self): if self.counts is None: self.do_counts() self.pwm = create_matrix_zeros(len(self.alphabet),self.size) for i in range(len(self.alphabet)): for j in range(self.size): # noinspection PyTypeChecker self.pwm[i][j] = float(self.counts[i][j]) / len(self.seqs) def consensus(self): res = "" for j in range(self.size): maxcol = self.counts[0][j] maxcoli = 0 for i in range(1,len(self.alphabet)): if self.counts[i][j]>maxcol: maxcol = self.counts[i][j] maxcoli = i res += self.alphabet[maxcoli] return res def masked_consensus(self): res = "" for j in range(self.size): maxcol = self.counts[0][j] maxcoli = 0 for i in range(1,len(self.alphabet)): if self.counts[i][j]>maxcol: maxcol = self.counts[i][j] maxcoli = i if maxcol>len(self.seqs) / 2: res += self.alphabet[maxcoli] else: res += "-" return res def probability_sequence(self,seq): res = 1.0 for i in range(self.size): lin = self.alphabet.index(seq[i]) res *= self.pwm[lin][i] return res def probability_all_positions(self,seq): res = [] for k in range(len(seq)-self.size+1): res.append(self.probability_sequence(seq)) return res def most_probable_sequence(self,seq): maximum = -1.0 maxind = -1 for k in range(len(seq)-self.size): p = self.probability_sequence(seq[k:k+self.size]) if p > maximum: maximum = p maxind = k return maxind def create_motif(self,seqs): from Bio.Seq import Seq l = [] for s in seqs: ind = self.most_probable_sequence(s.seq) subseq = Seq(s[ind:(ind+self.size)],s.get_seq_biotype() ) l.append(subseq) return MyMotifs(l) def test(): from Bio.Seq import Seq seq1 = Seq("AAAGTT") seq2 = Seq("CACGTG") seq3 = Seq("TTGGGT") seq4 = Seq("GACCGT") seq5 = Seq("AACCAT") seq6 = Seq("AACCCT") seq7 = Seq("AAACCT") seq8 = Seq("GAACCT") lseqs = [seq1,seq2,seq3,seq4,seq5,seq6,seq7,seq8] motifs = MyMotifs(lseqs) print ("Counts matrix") print_matrix(motifs.counts) print ("PWM") print_matrix(motifs.pwm) print ("Sequence alphabet") print(motifs.alphabet) [print(s) for s in lseqs] print ("Consensus sequence") print(motifs.consensus()) print ("Masked Consensus sequence") print(motifs.masked_consensus()) print(motifs.probability_sequence("AAACCT")) print(motifs.probability_sequence("ATACAG")) print(motifs.most_probable_sequence("CTATAAACCTTACATC")) ``` line 123 [print(s) for s in lseqs] ^ SyntaxError: invalid syntax,请问此行代码该如何修改才能正常运行

nginx配置SSL报错问题

在nginx.conf文件中配置443端口 ``` server{ listen 443 ssl; server_name javaweb.ourtool.cn; # ssl on; ssl_certificate cert/214345150860079.pem; ssl_certificate_key cert/214345150860079.key; ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; location / { proxy_pass http://127.0.0.1:9090; } } ``` 启动报错(错误信息:nginx: [emerg] the "ssl" parameter requires ngx_http_ssl_module in /home/soft/nginx/conf/nginx.conf:76) 按照网上的教程安装--with-http_ssl_modul 报错信息:./configure: error: invalid option "--with-http_ssl_modul" 然后就找不到决解方案了,有没有懂nginx的大神???

python SyntaxError: invalid syntax

>>> for c in 'spam': ... print(c.upper(), end=' ') ... print() File "<stdin>", line 3 print() ^ SyntaxError: invalid syntax 在cmd中,这个错误是什么意思,怎么解决? 我是想让它全部输出玩后,再换行

java.io.StreamCorruptedException: invalid type code: 62

EJB+JBoss+Swing EJB部署在JBoss中,Swing调用EJB中的一个方法A(List<Object) lists),之后就报java.io.StreamCorruptedException: invalid type code: 62. 所传递的集合lists中起初包含一个未序列化的对象,但是我在调用A方法前将其移除后,还是报java.io.StreamCorruptedException: invalid type code: 62. 请大家指点下

springboot证书配置问题

srping boot项目配置完证书后,idea中启动正常,打包成jar后用java -jar 运行报如下错误 ``` 11:12:04.641 [main] ERROR o.a.c.u.LifecycleBase - [log,175] - Failed to start co mponent [Connector[HTTP/1.1-443]] org.apache.catalina.LifecycleException: Protocol handler start failed at org.apache.catalina.connector.Connector.startInternal(Connector.java: 1008) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) at org.apache.catalina.core.StandardService.addConnector(StandardService .java:227) at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPrevi ouslyRemovedConnectors(TomcatWebServer.java:263) at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(To mcatWebServer.java:195) at org.springframework.boot.web.servlet.context.ServletWebServerApplicat ionContext.startWebServer(ServletWebServerApplicationContext.java:297) at org.springframework.boot.web.servlet.context.ServletWebServerApplicat ionContext.finishRefresh(ServletWebServerApplicationContext.java:163) at org.springframework.context.support.AbstractApplicationContext.refres h(AbstractApplicationContext.java:552) at org.springframework.boot.web.servlet.context.ServletWebServerApplicat ionContext.refresh(ServletWebServerApplicationContext.java:141) at org.springframework.boot.SpringApplication.refresh(SpringApplication. java:744) at org.springframework.boot.SpringApplication.refreshContext(SpringAppli cation.java:391) at org.springframework.boot.SpringApplication.run(SpringApplication.java :312) at org.springframework.boot.SpringApplication.run(SpringApplication.java :1215) at org.springframework.boot.SpringApplication.run(SpringApplication.java :1204) at com.weclud.WebApplication.main(WebApplication.java:21) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner .java:48) at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLau ncher.java:578) Caused by: java.lang.IllegalArgumentException: Stream closed at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(Abst ractJsseEndpoint.java:99) at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(Abstrac tJsseEndpoint.java:71) at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:218) at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractE ndpoint.java:1124) at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.ja va:1210) at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:585) at org.apache.catalina.connector.Connector.startInternal(Connector.java: 1005) ... 22 common frames omitted Caused by: java.io.IOException: Stream closed at java.util.zip.InflaterInputStream.ensureOpen(InflaterInputStream.java :67) at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:142) at org.springframework.boot.loader.jar.ZipInflaterInputStream.read(ZipIn flaterInputStream.java:52) at java.io.BufferedInputStream.fill(BufferedInputStream.java:246) at java.io.BufferedInputStream.read(BufferedInputStream.java:265) at java.security.DigestInputStream.read(DigestInputStream.java:124) at java.io.DataInputStream.readInt(DataInputStream.java:387) at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:653) at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:5 6) at sun.security.provider.KeyStoreDelegator.engineLoad(KeyStoreDelegator. java:224) at sun.security.provider.JavaKeyStore$DualFormatJKS.engineLoad(JavaKeySt ore.java:70) at java.security.KeyStore.load(KeyStore.java:1445) at org.apache.tomcat.util.security.KeyStoreUtil.load(KeyStoreUtil.java:6 9) at org.apache.tomcat.util.net.SSLUtilBase.getStore(SSLUtilBase.java:217) at org.apache.tomcat.util.net.SSLHostConfigCertificate.getCertificateKey store(SSLHostConfigCertificate.java:206) at org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.jav a:283) at org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.j ava:247) at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(Abst ractJsseEndpoint.java:97) ... 28 common frames omitted ``` 这是相关配置 ``` # 项目相关配置 weclud: # 名称 name: 文件管理 # 版本 version: 1.0 # 版权年份 copyrightYear: 2019 # 获取ip地址开关 addressEnabled: true # 开发环境配置 server: # 服务端口 port: 443 servlet: # 项目contextPath context-path: tomcat: # tomcat的URI编码 uri-encoding: UTF-8 # tomcat最大线程数,默认为200 max-threads: 800 # Tomcat启动初始化的线程数,默认值25 min-spare-threads: 30 ssl: key-store: classpath:static/dacx.weclud.com.jks key-store-password: zhang1990 key-store-type: jks ``` ``` <build> <resources> <resource> <directory>src/main/resources</directory> <includes> <include>**.*</include> <include>**/*.*</include><!-- i18n能读取到 --> <include>**/*/*.*</include> </includes> </resource> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> <excludes> <exclude>ssl/**</exclude> <exclude>static/**</exclude> <exclude>templates/**</exclude> </excludes> </resource> </resources> <!-- 为jar包取名 --> <finalName>weclud-web</finalName> <plugins> <!-- 热布署 --> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <!--fork : 如果没有该项配置,这个devtools不会起作用,即应用不会restart --> <fork>true</fork> <jvmArguments>-Dfile.encoding=UTF-8</jvmArguments> <mainClass>com.weclud.WebApplication</mainClass> <!-- <layout>ZIP</layout>--> </configuration> <executions> <execution> <goals> <goal>repackage</goal><!--可以把依赖的包都打包到生成的Jar包中--> </goals> <!--可以生成不含依赖包的不可执行Jar包--> <!-- configuration> <classifier>exec</classifier> </configuration> --> </execution> </executions> </plugin> </plugins> </build> ```

导入requests的时候出现SyntaxError: invalid syntax

### 请问各位大佬门有没有遇到过在import requests 的时候遇到过语法无效的问题?求指点 #### 没有重名文件,模块也重新安装过 #### 错误如下 ``` Traceback (most recent call last): File "/home/zhang/project/spiders/text3.py", line 2, in <module> import requests File "/home/zhang/.myvirtualenvs/data/lib/python3.6/site-packages/requests/__init__.py", line 43, in <module> import urllib3 File "/home/zhang/.myvirtualenvs/data/lib/python3.6/site-packages/urllib3/__init__.py", line 8, in <module> from .connectionpool import ( File "/home/zhang/.myvirtualenvs/data/lib/python3.6/site-packages/urllib3/connectionpool.py", line 29, in <module> from .connection import ( File "/home/zhang/.myvirtualenvs/data/lib/python3.6/site-packages/urllib3/connection.py", line 38, in <module> from .util.ssl_ import ( File "/home/zhang/.myvirtualenvs/data/lib/python3.6/site-packages/urllib3/util/__init__.py", line 6, in <module> from .ssl_ import ( File "/home/zhang/.myvirtualenvs/data/lib/python3.6/site-packages/urllib3/util/ssl_.py", line 346 warnings.warn( ^ SyntaxError: invalid syntax ```

python 2.7.6报错SyntaxError: invalid syntax

在学习爬虫的时候遇到了点问题: 'User-Agent':'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/34.0.1847.116 Chrome/34.0.1847.116 Safari/537.36' 这一行老是报错SyntaxError: invalid syntax ``` headers = { 'Accept':'text/html, */*' 'User-Agent':'Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/34.0.1847.116 Chrome/34.0.1847.116 Safari/537.36' } ``` 版本问题吗 ?

IDLE import torch报错:SyntaxError: invalid syntax

>>> import torch Traceback (most recent call last): File "<pyshell#0>", line 1, in <module> import torch File "C:\Python\Python37\torch.py", line 2 t.abs? ^ SyntaxError: invalid syntax >>> ``` ```

在中国程序员是青春饭吗?

今年,我也32了 ,为了不给大家误导,咨询了猎头、圈内好友,以及年过35岁的几位老程序员……舍了老脸去揭人家伤疤……希望能给大家以帮助,记得帮我点赞哦。 目录: 你以为的人生 一次又一次的伤害 猎头界的真相 如何应对互联网行业的「中年危机」 一、你以为的人生 刚入行时,拿着傲人的工资,想着好好干,以为我们的人生是这样的: 等真到了那一天,你会发现,你的人生很可能是这样的: ...

再不跳槽,应届毕业生拿的都比我多了!

跳槽几乎是每个人职业生涯的一部分,很多HR说“三年两跳”已经是一个跳槽频繁与否的阈值了,可为什么市面上有很多程序员不到一年就跳槽呢?他们不担心影响履历吗? PayScale之前发布的**《员工最短任期公司排行榜》中,两家码农大厂Amazon和Google**,以1年和1.1年的员工任期中位数分列第二、第四名。 PayScale:员工最短任期公司排行榜 意外的是,任期中位数极小的这两家公司,薪资...

我以为我学懂了数据结构,直到看了这个导图才发现,我错了

数据结构与算法思维导图

数据库——玩转SQL语句(以MySQL为例)

一、前言 照着大学的SQL server来学

技术大佬:我去,你写的 switch 语句也太老土了吧

昨天早上通过远程的方式 review 了两名新来同事的代码,大部分代码都写得很漂亮,严谨的同时注释也很到位,这令我非常满意。但当我看到他们当中有一个人写的 switch 语句时,还是忍不住破口大骂:“我擦,小王,你丫写的 switch 语句也太老土了吧!” 来看看小王写的代码吧,看完不要骂我装逼啊。 private static String createPlayer(PlayerTypes p...

华为初面+综合面试(Java技术面)附上面试题

华为面试整体流程大致分为笔试,性格测试,面试,综合面试,回学校等结果。笔试来说,华为的难度较中等,选择题难度和网易腾讯差不多。最后的代码题,相比下来就简单很多,一共3道题目,前2题很容易就AC,题目已经记不太清楚,不过难度确实不大。最后一题最后提交的代码过了75%的样例,一直没有发现剩下的25%可能存在什么坑。 笔试部分太久远,我就不怎么回忆了。直接将面试。 面试 如果说腾讯的面试是挥金如土...

和黑客斗争的 6 天!

互联网公司工作,很难避免不和黑客们打交道,我呆过的两家互联网公司,几乎每月每天每分钟都有黑客在公司网站上扫描。有的是寻找 Sql 注入的缺口,有的是寻找线上服务器可能存在的漏洞,大部分都...

讲一个程序员如何副业月赚三万的真实故事

loonggg读完需要3分钟速读仅需 1 分钟大家好,我是你们的校长。我之前讲过,这年头,只要肯动脑,肯行动,程序员凭借自己的技术,赚钱的方式还是有很多种的。仅仅靠在公司出卖自己的劳动时...

上班一个月,后悔当初着急入职的选择了

最近有个老铁,告诉我说,上班一个月,后悔当初着急入职现在公司了。他之前在美图做手机研发,今年美图那边今年也有一波组织优化调整,他是其中一个,在协商离职后,当时捉急找工作上班,因为有房贷供着,不能没有收入来源。所以匆忙选了一家公司,实际上是一个大型外包公司,主要派遣给其他手机厂商做外包项目。**当时承诺待遇还不错,所以就立马入职去上班了。但是后面入职后,发现薪酬待遇这块并不是HR所说那样,那个HR自...

总结了 150 余个神奇网站,你不来瞅瞅吗?

原博客再更新,可能就没了,之后将持续更新本篇博客。

副业收入是我做程序媛的3倍,工作外的B面人生是怎样的?

提到“程序员”,多数人脑海里首先想到的大约是:为人木讷、薪水超高、工作枯燥…… 然而,当离开工作岗位,撕去层层标签,脱下“程序员”这身外套,有的人生动又有趣,马上展现出了完全不同的A/B面人生! 不论是简单的爱好,还是正经的副业,他们都干得同样出色。偶尔,还能和程序员的特质结合,产生奇妙的“化学反应”。 @Charlotte:平日素颜示人,周末美妆博主 大家都以为程序媛也个个不修边幅,但我们也许...

MySQL数据库面试题(2020最新版)

文章目录数据库基础知识为什么要使用数据库什么是SQL?什么是MySQL?数据库三大范式是什么mysql有关权限的表都有哪几个MySQL的binlog有有几种录入格式?分别有什么区别?数据类型mysql有哪些数据类型引擎MySQL存储引擎MyISAM与InnoDB区别MyISAM索引与InnoDB索引的区别?InnoDB引擎的4大特性存储引擎选择索引什么是索引?索引有哪些优缺点?索引使用场景(重点)...

如果你是老板,你会不会踢了这样的员工?

有个好朋友ZS,是技术总监,昨天问我:“有一个老下属,跟了我很多年,做事勤勤恳恳,主动性也很好。但随着公司的发展,他的进步速度,跟不上团队的步伐了,有点...

我入职阿里后,才知道原来简历这么写

私下里,有不少读者问我:“二哥,如何才能写出一份专业的技术简历呢?我总感觉自己写的简历太烂了,所以投了无数份,都石沉大海了。”说实话,我自己好多年没有写过简历了,但我认识的一个同行,他在阿里,给我说了一些他当年写简历的方法论,我感觉太牛逼了,实在是忍不住,就分享了出来,希望能够帮助到你。 01、简历的本质 作为简历的撰写者,你必须要搞清楚一点,简历的本质是什么,它就是为了来销售你的价值主张的。往深...

程序员写出这样的代码,能不挨骂吗?

当你换槽填坑时,面对一个新的环境。能够快速熟练,上手实现业务需求是关键。但是,哪些因素会影响你快速上手呢?是原有代码写的不够好?还是注释写的不够好?昨夜...

离职半年了,老东家又发 offer,回不回?

有小伙伴问松哥这个问题,他在上海某公司,在离职了几个月后,前公司的领导联系到他,希望他能够返聘回去,他很纠结要不要回去? 俗话说好马不吃回头草,但是这个小伙伴既然感到纠结了,我觉得至少说明了两个问题:1.曾经的公司还不错;2.现在的日子也不是很如意。否则应该就不会纠结了。 老实说,松哥之前也有过类似的经历,今天就来和小伙伴们聊聊回头草到底吃不吃。 首先一个基本观点,就是离职了也没必要和老东家弄的苦...

HTTP与HTTPS的区别

面试官问HTTP与HTTPS的区别,我这样回答让他竖起大拇指!

程序员毕业去大公司好还是小公司好?

虽然大公司并不是人人都能进,但我仍建议还未毕业的同学,尽力地通过校招向大公司挤,但凡挤进去,你这一生会容易很多。 大公司哪里好?没能进大公司怎么办?答案都在这里了,记得帮我点赞哦。 目录: 技术氛围 内部晋升与跳槽 啥也没学会,公司倒闭了? 不同的人脉圈,注定会有不同的结果 没能去大厂怎么办? 一、技术氛围 纵观整个程序员技术领域,哪个在行业有所名气的大牛,不是在大厂? 而且众所...

程序员为什么千万不要瞎努力?

本文作者用对比非常鲜明的两个开发团队的故事,讲解了敏捷开发之道 —— 如果你的团队缺乏统一标准的环境,那么即使勤劳努力,不仅会极其耗时而且成果甚微,使用...

为什么程序员做外包会被瞧不起?

二哥,有个事想询问下您的意见,您觉得应届生值得去外包吗?公司虽然挺大的,中xx,但待遇感觉挺低,马上要报到,挺纠结的。

当HR压你价,说你只值7K,你该怎么回答?

当HR压你价,说你只值7K时,你可以流畅地回答,记住,是流畅,不能犹豫。 礼貌地说:“7K是吗?了解了。嗯~其实我对贵司的面试官印象很好。只不过,现在我的手头上已经有一份11K的offer。来面试,主要也是自己对贵司挺有兴趣的,所以过来看看……”(未完) 这段话主要是陪HR互诈的同时,从公司兴趣,公司职员印象上,都给予对方正面的肯定,既能提升HR的好感度,又能让谈判气氛融洽,为后面的发挥留足空间。...

面试阿里p7,被按在地上摩擦,鬼知道我经历了什么?

面试阿里p7被问到的问题(当时我只知道第一个):@Conditional是做什么的?@Conditional多个条件是什么逻辑关系?条件判断在什么时候执...

终于懂了TCP和UDP协议区别

终于懂了TCP和UDP协议区别

无代码时代来临,程序员如何保住饭碗?

编程语言层出不穷,从最初的机器语言到如今2500种以上的高级语言,程序员们大呼“学到头秃”。程序员一边面临编程语言不断推陈出新,一边面临由于许多代码已存在,程序员编写新应用程序时存在重复“搬砖”的现象。 无代码/低代码编程应运而生。无代码/低代码是一种创建应用的方法,它可以让开发者使用最少的编码知识来快速开发应用程序。开发者通过图形界面中,可视化建模来组装和配置应用程序。这样一来,开发者直...

面试了一个 31 岁程序员,让我有所触动,30岁以上的程序员该何去何从?

最近面试了一个31岁8年经验的程序猿,让我有点感慨,大龄程序猿该何去何从。

大三实习生,字节跳动面经分享,已拿Offer

说实话,自己的算法,我一个不会,太难了吧

程序员垃圾简历长什么样?

已经连续五年参加大厂校招、社招的技术面试工作,简历看的不下于万份 这篇文章会用实例告诉你,什么是差的程序员简历! 疫情快要结束了,各个公司也都开始春招了,作为即将红遍大江南北的新晋UP主,那当然要为小伙伴们做点事(手动狗头)。 就在公众号里公开征简历,义务帮大家看,并一一点评。《启舰:春招在即,义务帮大家看看简历吧》 一石激起千层浪,三天收到两百多封简历。 花光了两个星期的所有空闲时...

《Oracle Java SE编程自学与面试指南》最佳学习路线图(2020最新版)

01、Java入门(Getting Started);02、集成开发环境(IDE);03、项目结构(Eclipse JavaProject);04、类和对象(Classes and Objects);05:词法结构(Lexical Structure);06:数据类型和变量(Data Type and Variables);07:运算符(Operators);08:控制流程语句(Control Flow Statements);

Java岗开发3年,公司临时抽查算法,离职后这几题我记一辈子

前几天我们公司做了一件蠢事,非常非常愚蠢的事情。我原以为从学校出来之后,除了找工作有测试外,不会有任何与考试有关的事儿。 但是,天有不测风云,公司技术总监、人事总监两位大佬突然降临到我们事业线,叫上我老大,给我们组织了一场别开生面的“考试”。 那是一个风和日丽的下午,我翘着二郎腿,左手端着一杯卡布奇诺,右手抓着我的罗技鼠标,滚动着轮轴,穿梭在头条热点之间。 “淡黄的长裙~蓬松的头发...

大牛都会用的IDEA调试技巧!!!

导读 前天面试了一个985高校的实习生,问了他平时用什么开发工具,他想也没想的说IDEA,于是我抛砖引玉的问了一下IDEA的调试用过吧,你说说怎么设置断点...

立即提问
相关内容推荐