publish

publish empty directories to a web application in VS2010 web project

孤者浪人 提交于 2019-11-29 00:56:31
Often I need to publish a web project preserving a directory tree even if the directories are empty, for example, directories to hold uploaded files. If I publish my app using the VS2010 publish command, the empty directories are not created on the remote filesystem, on the web server. Is there a way to force VS to create certain folders, albeit empty, on the target directory? thanks! Exitos No this is not possible I'm afraid we had the same problem. You need to create a placeholder.txt file in each empty directory if you want the precompilation tool to generate these empty folders. Failing

How to publish a Web Service from Visual Studio into IIS?

十年热恋 提交于 2019-11-29 00:39:07
问题 I have written a WCF web service in C#. I had originally self-hosted it and then decided to host it on IIS running locally on my PC. While the service is working, there are several aspects of the deployment process that I don't understand: Firstly, the URL of this service when hosted in IIS does not correspond to what I specified in my web.config. I had specified "http://localhost:8000/MyServices/OrderService" there and this was used when I self-hosted. Now that I've deployed to IIS, the URL

My app is not available for tablet device on Google play

丶灬走出姿态 提交于 2019-11-28 23:13:26
I published my app 2 days ago on Google Play. For some reasons i can only see it in my phone's Google Play. If i search it on my Samsung Galaxy Tab, it does not appear. In manifest.xml i didnt wrote anything like: android:largeScreens="false" in addition, this tag is set "true" by default, as far as i know. Can anybody tell me something about this issue? On Web browser's Google play i see this info: This app is compatible with some of your devices. -Samsung GT-P7500 This item is not compatible with your device. -Vodafone Samsung GT-I9000 -HTC HTC Sensation Z710e = = = E D I T = = This is my

WebApplication publish to relative filesystem path

∥☆過路亽.° 提交于 2019-11-28 21:01:34
I'm setting up a publish to a relative path for testing locally (especially xml config transformations). Each developer has their own path to the checked out project and I'd like to set up a publish that is machine/environment agnostic. The publish dialog doesn't hint at any variables or wildcards that are allowed in it and it doesn't accept obj\publish or file://./obj/publish Is there a way to publish to a relative filesystem path? Edit For Visual Studio 2012, this solution will not work. You should look at the answer by michielvoo just after this one. Original answer After trying and trying

MQTT系列 | MQTT的QoS介绍

a 夏天 提交于 2019-11-28 20:17:06
1. MQTT中的QoS等级 MQTT设计了一套保证消息稳定传输的机制,包括消息应答、存储和重传。在这套机制下,提供了三种不同层次QoS(Quality of Service): QoS0,At most once,至多一次; QoS1,At least once,至少一次; QoS2,Exactly once,确保只有一次。 QoS 是消息的发送方(Sender)和接受方(Receiver)之间达成的一个协议: QoS0 代表,Sender 发送的一条消息,Receiver 最多能收到一次,也就是说 Sender 尽力向 Receiver 发送消息,如果发送失败,也就算了; QoS1 代表,Sender 发送的一条消息,Receiver 至少能收到一次,也就是说 Sender 向 Receiver 发送消息,如果发送失败,会继续重试,直到 Receiver 收到消息为止,但是因为重传的原因,Receiver 有可能会收到重复的消息; QoS2 代表,Sender 发送的一条消息,Receiver 确保能收到而且只收到一次,也就是说 Sender 尽力向 Receiver 发送消息,如果发送失败,会继续重试,直到 Receiver 收到消息为止,同时保证 Receiver 不会因为消息重传而收到重复的消息。 注意: QoS是Sender和Receiver之间的协议

Django Rest Framework-----序列化(serializers)

孤街浪徒 提交于 2019-11-28 20:12:37
class PublishModelSerializers(serializers.ModelSerializer): class Meta: model=Publish fields="__all__"#book表的所有字段 ''' 不用按字段,直接序列化到表模型 #必须写一个内部内,名字必须交Meta''' class BookSerializers(serializers.Serializer): title = serializers.CharField(max_length=32) price = serializers.IntegerField() pub_date = serializers.DateField() publish=serializers.CharField(source="publish.name") ''' -1 重命名:用source:xx = serializers.CharField(source='name') -2 取出出版社名字: 方式一: -在模型表中重写__str__方法 -publish=serializers.CharField() 方式二: -用source -拿出出版社的城市 -publish=serializers.CharField(source='publish.city') *****如果不指定source

Django-08-admin

不打扰是莪最后的温柔 提交于 2019-11-28 19:29:28
1. 介绍 admin是django强大功能之一,它能共从数据库中读取数据,呈现在页面中,进行管理。默认情况下,它的功能已经非常强大,如果你不需要复杂的功能,它已经够用,但是有时候,一些特殊的功能还需要定制,比如搜索功能,下面这一系列文章就逐步深入介绍如何定制适合自己的admin应用。 如果你觉得英文界面不好用,可以在setting.py 文件中修改以下选项 LANGUAGE_CODE = 'en-us' #LANGUAGE_CODE = 'zh-hans' 2. 注册medel类到admin的两种方式: <1>使用register方法 class BookAdmin(admin.ModelAdmin): ... admin.site.register(Book, BookAdmin) admin.site.register(Author) <2>使用register装饰器 @admin.register(Book) class ... 3. 自定义admin # 自定义admin样式 class BookAdmin(admin.ModelAdmin): list_display = ('id', 'name', 'price', 'pubdate') # 显示的内容 list_editable = ('name', 'price') # 可编辑的内容 filter

MySQL索引使用的注意事项

时光总嘲笑我的痴心妄想 提交于 2019-11-28 17:43:06
MySQL 索引通常是被用于提高 WHERE 条件的数据行匹配时的搜索速度,在索引的使用过程中,存在一些使用细节和注意事项。 1. 不要在列上使用函数和进行运算 不要在列上使用函数,这将导致索引失效而进行全表扫描。 select * from news where year(publish_time) < 2017 为了使用索引,防止执行全表扫描,可以进行改造。 select * from news where publish_time < '2017-01-01' 还有一个建议,不要在列上进行运算,这也将导致索引失效而进行全表扫描。 select * from news where id / 100 = 1 为了使用索引,防止执行全表扫描,可以进行改造。 select * from news where id = 1 * 100 2. 尽量避免使用 != 或 not in或 <> 等否定操作符 应该尽量避免在 where 子句中使用 != 或 not in 或 <> 操作符,因为这几个操作符都会导致索引失效而进行全表扫描。 3. 尽量避免使用 or 来连接条件 应该尽量避免在 where 子句中使用 or 来连接条件,因为这会导致索引失效而进行全表扫描。 select * from news where id = 1 or id = 2 4. 多个单列索引并不是最佳选择

How to deploy angular-cli app on iis

白昼怎懂夜的黑 提交于 2019-11-28 16:23:53
问题 I have simple angular2-cli app (one page with model driven form - no router involved). With "ng serve" all works fine. I made production version with ng build --product. I copied all ./dist folder content into new folder under C:\inetpub\wwwroot. I made virtual app from IIS managment console. Defualt app file is index.html. I browse to app uri and i get only page with "Loading...". I try build without --product switch (only ng build) but result is the same. Angular app is not loading. Is

How to deploy a jekyll site locally with css, js and background images included?

╄→尐↘猪︶ㄣ 提交于 2019-11-28 14:55:26
问题 I've been trying to load my octopress site (based on jekyll) to my local network. There is no server, I just want it available locally on a shared folder. Every time i deploy it to a local folder the css and js and background image links are broken. The available options such as rsync, github and heroku all require ssh's and passwords. This can be found here: http://octopress.org/docs/deploying/ Is there a rake option that helps with this? SOLVED: Kikito, Thank you very much for the guidance.