fo

Nginx 403 error: directory index of [folder] is forbidden

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have 3 domain names and am trying to host all 3 sites on one server (a Digital Ocean droplet) using Nginx. mysite1.name mysite2.name mysite3.name Only 1 of them works. The other two result in 403 errors (in the same way). In my nginx error log, I see: [error] 13108#0: *1 directory index of "/usr/share/nginx/mysite2.name/live/" is forbidden . My sites-enabled config is: server { server_name www.mysite2.name; return 301 $scheme://mysite2.name$request_uri; } server { server_name mysite2.name; root /usr/share/nginx/mysite2.name/live/; index

Convert Date format into DD/MMM/YYYY format in SQL Server

匿名 (未验证) 提交于 2019-12-03 02:08:02
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have a query in sql, I have to get date in a format of dd/mmm/yy Example: 25/jun/2013 . How can I convert it for SQL server? 回答1: I'm not sure there is an exact match for the format you want. But you can get close with convert() and style 106 . Then, replace the spaces: SELECT replace(convert(NVARCHAR, getdate(), 106), ' ', '/') 回答2: we can convert date into many formats like SELECT convert(varchar, getdate(), 106) This returns dd mon yyyy More Here This may help you 回答3: There are already multiple answers and formatting types for SQL

电子邮件处理控件Aspose.Email for .NET 10月新版更新上线!

江枫思渺然 提交于 2019-12-03 02:07:57
Aspose.Email for .NET 是一套完整的电子邮件处理控件,用于构建跨平台应用程序,无需使用Microsoft Outlook即可创建,操作,转换和传输电子邮件。API提供电子邮件处理功能,例如添加,提取或删除邮件对象中的附件,通过添加或删除收件人或更改主题等来自定义邮件头。 Aspose.Email for .NET 可以轻松地使用许多Outlook消息格式,如MSG,EML,EMLX和MHT,并提供管理消息存储文件的功能,如个人存储文件(PST)和脱机存储文件(OST)。开发人员可以使用API通过POP3,IMAP和SMTP等多种流行协议传输邮件,或通过WebDav和Exchange Web服务与Microsoft Exchange Server连接,以发送和接收带附件的电子邮件。 Aspose.Email for .NET更新至v19.10,修复提取电子邮件时附件计数错误和解压缩EML文件时附件计数错误等诸多问题! 新增与改善 key 概述 类别 EMAILNET-39579 错误显示HtmlBodyText URL 增强功能 EMAILNET-39580 从MapiMessage转换为MailMessage时发生异常 Bug修复 EMAILNET-39574 将包含PST文件中的嵌入式图像的RTF转换为MIME时,将消息转换为MIME时图像会丢失 Bug修复

Keras error “You must feed a value for placeholder tensor 'bidirectional_1/keras_learning_phase' with dtype bool”

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I get the following error for the code snippet below: You must feed a value for placeholder tensor 'bidirectional_1/keras_learning_phase' with dtype bool If I add the dropout layer model.add(Dropout(dropout)) , it works. Anyone knows why? The back-end is Tensorflow, Keras 2.0.1 def prep_model1(embedding_layer1, embedding_layer2, dropout=0.5): model0 = Sequential() model0.add(embedding_layer1) model0.add(Bidirectional(LSTM(128, return_sequences=False, dropout=dropout))) model1 = Sequential() model1.add(embedding_layer2) model1.add

Signature trust establishment failed for SAML metadata entry

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: In order to fetch metadata from a remote source, I defined an ExtendedMetadataDelegate bean as follows: @Bean @Qualifier("replyMeta") public ExtendedMetadataDelegate replyMetadataProvider() throws MetadataProviderException { String metadataURL = "https://ststest-replynet.reply.it/FederationMetadata/2007-06/FederationMetadata.xml"; final Timer backgroundTaskTimer = new Timer(true); HTTPMetadataProvider provider = new HTTPMetadataProvider( backgroundTaskTimer, httpClient(), metadataURL); provider.setParserPool(parserPool());

Is it possible to implement MonadFix for `Free`?

匿名 (未验证) 提交于 2019-12-03 02:06:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: http://hackage.haskell.org/package/free in Control.Monad.Free.Free allows one to get access to the "free monad" for any given Functor . It does not, however, have a MonadFix instance. Is this because such an instance cannot be written, or was it just left out? If such an instance cannot be written, why not? 回答1: Consider the description of what mfix does: The fixed point of a monadic computation. mfix f executes the action f only once, with the eventual output fed back as the input. The word "executes", in the context of Free , means

Modify collection inside a Spark RDD foreach

匿名 (未验证) 提交于 2019-12-03 02:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm trying to add elements to a map while iterating the elements of an RDD. I'm not getting any errors, but the modifications are not happening. It all works fine adding directly or iterating other collections: scala> val myMap = new collection.mutable.HashMap[String,String] myMap: scala.collection.mutable.HashMap[String,String] = Map() scala> myMap("test1")="test1" scala> myMap res44: scala.collection.mutable.HashMap[String,String] = Map(test1 -> test1) scala> List("test2", "test3").foreach(w => myMap(w) = w) scala> myMap res46: scala

What is the most efficient algorithm for reversing a String in Java?

匿名 (未验证) 提交于 2019-12-03 02:05:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: What is the most efficient way to reverse a string in Java? Should I use some sort of xor operator? The easy way would be to put all the chars in a stack and put them back into a string again but I doubt that's a very efficient way to do it. And please do not tell me to use some built in function in Java. I am interested in learning how to do it not to use an efficient function but not knowing why it's efficient or how it's built up. 回答1: You say you want to know the most efficient way and you don't want to know some standard built-in way of

How to get most informative features for scikit-learn classifiers?

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 由 翻译 强力驱动 问题: The classifiers in machine learning packages like liblinear and nltk offer a method show_most_informative_features() , which is really helpful for debugging features: viagra = None ok : spam = 4.5 : 1.0 hello = True ok : spam = 4.5 : 1.0 hello = None spam : ok = 3.3 : 1.0 viagra = True spam : ok = 3.3 : 1.0 casino = True spam : ok = 2.0 : 1.0 casino = None ok : spam = 1.5 : 1.0 My question is if something similar is implemented for the classifiers in scikit-learn. I searched the documentation, but couldn't find anything the like.

What column type/length should I use for storing a Bcrypt hashed password in a Database?

匿名 (未验证) 提交于 2019-12-03 02:03:01
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I want to store a hashed password (using BCrypt) in a database. What would be a good type for this, and which would be the correct length? Are passwords hashed with BCrypt always of same length? EDIT Example hash: $2a$10$KssILxWNR6k62B7yiX0GAe2Q7wwHlrzhF3LqtVvpyvHZf0MwvNfVu After hashing some passwords, it seems that BCrypt always generates 60 character hashes. EDIT 2 Sorry for not mentioning the implementation. I am using jBCrypt . 回答1: The modular crypt format for bcrypt consists of $2$ , $2a$ or $2y$ identifying the hashing algorithm and