├── GitHub-Info └── img │ ├── current.png │ └── project-architecture.png ├── README.md ├── Run-Docker ├── docker-compose.yml ├── packing.sh ├── spider │ ├── scrapy-redis │ │ └── Dockerfile │ └── weibo_client │ │ ├── Dockerfile │ │ ├── run_crawl.sh │ │ └── spider.tgz └── webserver │ ├── Dockerfile │ └── start-server.sh └── SourceProject ├── dataprocess ├── __pycache__ │ ├── weibocomment.cpython-35.pyc │ └── weibouser.cpython-35.pyc ├── comment_strategy.py ├── data │ └── weibo_comment_data ├── hadoop-strategy │ └── weibo_comment_task.sh ├── nlp_process.py ├── weibocomment.py ├── weibomodel │ ├── weibocomment.py │ └── weibouser.py └── weibouser.py ├── proxymanager ├── cpp │ ├── Makefile │ ├── demo.cpp │ ├── include │ │ └── proxymanager.h │ └── src │ │ └── proxymanager.cpp ├── proxyfile └── py │ └── proxy_update.py ├── server-tool ├── Makefile ├── build.sh ├── clean.sh ├── control │ └── main.cpp ├── lib │ ├── include │ │ ├── http.h │ │ ├── log.h │ │ └── webserver.h │ └── libwebserver.a ├── resource │ ├── bower_components │ │ ├── bootstrap │ │ │ ├── .bower.json │ │ │ ├── CHANGELOG.md │ │ │ ├── Gemfile │ │ │ ├── Gemfile.lock │ │ │ ├── Gruntfile.js │ │ │ ├── ISSUE_TEMPLATE.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── bower.json │ │ │ ├── dist │ │ │ │ ├── css │ │ │ │ │ ├── bootstrap-theme.css │ │ │ │ │ ├── bootstrap-theme.css.map │ │ │ │ │ ├── bootstrap-theme.min.css │ │ │ │ │ ├── bootstrap-theme.min.css.map │ │ │ │ │ ├── bootstrap.css │ │ │ │ │ ├── bootstrap.css.map │ │ │ │ │ ├── bootstrap.min.css │ │ │ │ │ └── bootstrap.min.css.map │ │ │ │ ├── fonts │ │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ │ └── js │ │ │ │ │ ├── bootstrap.js │ │ │ │ │ ├── bootstrap.min.js │ │ │ │ │ └── npm.js │ │ │ ├── fonts │ │ │ │ ├── glyphicons-halflings-regular.eot │ │ │ │ ├── glyphicons-halflings-regular.svg │ │ │ │ ├── glyphicons-halflings-regular.ttf │ │ │ │ ├── glyphicons-halflings-regular.woff │ │ │ │ └── glyphicons-halflings-regular.woff2 │ │ │ ├── grunt │ │ │ │ ├── .jshintrc │ │ │ │ ├── bs-commonjs-generator.js │ │ │ │ ├── bs-glyphicons-data-generator.js │ │ │ │ ├── bs-lessdoc-parser.js │ │ │ │ ├── bs-raw-files-generator.js │ │ │ │ ├── change-version.js │ │ │ │ ├── configBridge.json │ │ │ │ ├── npm-shrinkwrap.json │ │ │ │ └── sauce_browsers.yml │ │ │ ├── js │ │ │ │ ├── .jscsrc │ │ │ │ ├── .jshintrc │ │ │ │ ├── affix.js │ │ │ │ ├── alert.js │ │ │ │ ├── button.js │ │ │ │ ├── carousel.js │ │ │ │ ├── collapse.js │ │ │ │ ├── dropdown.js │ │ │ │ ├── modal.js │ │ │ │ ├── popover.js │ │ │ │ ├── scrollspy.js │ │ │ │ ├── tab.js │ │ │ │ ├── tooltip.js │ │ │ │ └── transition.js │ │ │ ├── less │ │ │ │ ├── .csscomb.json │ │ │ │ ├── .csslintrc │ │ │ │ ├── alerts.less │ │ │ │ ├── badges.less │ │ │ │ ├── bootstrap.less │ │ │ │ ├── breadcrumbs.less │ │ │ │ ├── button-groups.less │ │ │ │ ├── buttons.less │ │ │ │ ├── carousel.less │ │ │ │ ├── close.less │ │ │ │ ├── code.less │ │ │ │ ├── component-animations.less │ │ │ │ ├── dropdowns.less │ │ │ │ ├── forms.less │ │ │ │ ├── glyphicons.less │ │ │ │ ├── grid.less │ │ │ │ ├── input-groups.less │ │ │ │ ├── jumbotron.less │ │ │ │ ├── labels.less │ │ │ │ ├── list-group.less │ │ │ │ ├── media.less │ │ │ │ ├── mixins.less │ │ │ │ ├── mixins │ │ │ │ │ ├── alerts.less │ │ │ │ │ ├── background-variant.less │ │ │ │ │ ├── border-radius.less │ │ │ │ │ ├── buttons.less │ │ │ │ │ ├── center-block.less │ │ │ │ │ ├── clearfix.less │ │ │ │ │ ├── forms.less │ │ │ │ │ ├── gradients.less │ │ │ │ │ ├── grid-framework.less │ │ │ │ │ ├── grid.less │ │ │ │ │ ├── hide-text.less │ │ │ │ │ ├── image.less │ │ │ │ │ ├── labels.less │ │ │ │ │ ├── list-group.less │ │ │ │ │ ├── nav-divider.less │ │ │ │ │ ├── nav-vertical-align.less │ │ │ │ │ ├── opacity.less │ │ │ │ │ ├── pagination.less │ │ │ │ │ ├── panels.less │ │ │ │ │ ├── progress-bar.less │ │ │ │ │ ├── reset-filter.less │ │ │ │ │ ├── reset-text.less │ │ │ │ │ ├── resize.less │ │ │ │ │ ├── responsive-visibility.less │ │ │ │ │ ├── size.less │ │ │ │ │ ├── tab-focus.less │ │ │ │ │ ├── table-row.less │ │ │ │ │ ├── text-emphasis.less │ │ │ │ │ ├── text-overflow.less │ │ │ │ │ └── vendor-prefixes.less │ │ │ │ ├── modals.less │ │ │ │ ├── navbar.less │ │ │ │ ├── navs.less │ │ │ │ ├── normalize.less │ │ │ │ ├── pager.less │ │ │ │ ├── pagination.less │ │ │ │ ├── panels.less │ │ │ │ ├── popovers.less │ │ │ │ ├── print.less │ │ │ │ ├── progress-bars.less │ │ │ │ ├── responsive-embed.less │ │ │ │ ├── responsive-utilities.less │ │ │ │ ├── scaffolding.less │ │ │ │ ├── tables.less │ │ │ │ ├── theme.less │ │ │ │ ├── thumbnails.less │ │ │ │ ├── tooltip.less │ │ │ │ ├── type.less │ │ │ │ ├── utilities.less │ │ │ │ ├── variables.less │ │ │ │ └── wells.less │ │ │ ├── nuget │ │ │ │ ├── MyGet.ps1 │ │ │ │ ├── bootstrap.less.nuspec │ │ │ │ └── bootstrap.nuspec │ │ │ ├── package.js │ │ │ └── package.json │ │ └── jquery │ │ │ ├── .bower.json │ │ │ ├── AUTHORS.txt │ │ │ ├── LICENSE.txt │ │ │ ├── README.md │ │ │ ├── bower.json │ │ │ ├── dist │ │ │ ├── core.js │ │ │ ├── jquery.js │ │ │ ├── jquery.min.js │ │ │ ├── jquery.min.map │ │ │ ├── jquery.slim.js │ │ │ ├── jquery.slim.min.js │ │ │ └── jquery.slim.min.map │ │ │ ├── external │ │ │ └── sizzle │ │ │ │ ├── LICENSE.txt │ │ │ │ └── dist │ │ │ │ ├── sizzle.js │ │ │ │ ├── sizzle.min.js │ │ │ │ └── sizzle.min.map │ │ │ └── src │ │ │ ├── .eslintrc.json │ │ │ ├── ajax.js │ │ │ ├── ajax │ │ │ ├── jsonp.js │ │ │ ├── load.js │ │ │ ├── parseXML.js │ │ │ ├── script.js │ │ │ ├── var │ │ │ │ ├── location.js │ │ │ │ ├── nonce.js │ │ │ │ └── rquery.js │ │ │ └── xhr.js │ │ │ ├── attributes.js │ │ │ ├── attributes │ │ │ ├── attr.js │ │ │ ├── classes.js │ │ │ ├── prop.js │ │ │ ├── support.js │ │ │ └── val.js │ │ │ ├── callbacks.js │ │ │ ├── core.js │ │ │ ├── core │ │ │ ├── DOMEval.js │ │ │ ├── access.js │ │ │ ├── init.js │ │ │ ├── nodeName.js │ │ │ ├── parseHTML.js │ │ │ ├── ready-no-deferred.js │ │ │ ├── ready.js │ │ │ ├── readyException.js │ │ │ ├── stripAndCollapse.js │ │ │ ├── support.js │ │ │ └── var │ │ │ │ └── rsingleTag.js │ │ │ ├── css.js │ │ │ ├── css │ │ │ ├── addGetHookIf.js │ │ │ ├── adjustCSS.js │ │ │ ├── curCSS.js │ │ │ ├── hiddenVisibleSelectors.js │ │ │ ├── showHide.js │ │ │ ├── support.js │ │ │ └── var │ │ │ │ ├── cssExpand.js │ │ │ │ ├── getStyles.js │ │ │ │ ├── isHiddenWithinTree.js │ │ │ │ ├── rmargin.js │ │ │ │ ├── rnumnonpx.js │ │ │ │ └── swap.js │ │ │ ├── data.js │ │ │ ├── data │ │ │ ├── Data.js │ │ │ └── var │ │ │ │ ├── acceptData.js │ │ │ │ ├── dataPriv.js │ │ │ │ └── dataUser.js │ │ │ ├── deferred.js │ │ │ ├── deferred │ │ │ └── exceptionHook.js │ │ │ ├── deprecated.js │ │ │ ├── dimensions.js │ │ │ ├── effects.js │ │ │ ├── effects │ │ │ ├── Tween.js │ │ │ └── animatedSelector.js │ │ │ ├── event.js │ │ │ ├── event │ │ │ ├── ajax.js │ │ │ ├── alias.js │ │ │ ├── focusin.js │ │ │ ├── support.js │ │ │ └── trigger.js │ │ │ ├── exports │ │ │ ├── amd.js │ │ │ └── global.js │ │ │ ├── jquery.js │ │ │ ├── manipulation.js │ │ │ ├── manipulation │ │ │ ├── _evalUrl.js │ │ │ ├── buildFragment.js │ │ │ ├── getAll.js │ │ │ ├── setGlobalEval.js │ │ │ ├── support.js │ │ │ ├── var │ │ │ │ ├── rcheckableType.js │ │ │ │ ├── rscriptType.js │ │ │ │ └── rtagName.js │ │ │ └── wrapMap.js │ │ │ ├── offset.js │ │ │ ├── queue.js │ │ │ ├── queue │ │ │ └── delay.js │ │ │ ├── selector-native.js │ │ │ ├── selector-sizzle.js │ │ │ ├── selector.js │ │ │ ├── serialize.js │ │ │ ├── traversing.js │ │ │ ├── traversing │ │ │ ├── findFilter.js │ │ │ └── var │ │ │ │ ├── dir.js │ │ │ │ ├── rneedsContext.js │ │ │ │ └── siblings.js │ │ │ ├── var │ │ │ ├── ObjectFunctionString.js │ │ │ ├── arr.js │ │ │ ├── class2type.js │ │ │ ├── concat.js │ │ │ ├── document.js │ │ │ ├── documentElement.js │ │ │ ├── fnToString.js │ │ │ ├── getProto.js │ │ │ ├── hasOwn.js │ │ │ ├── indexOf.js │ │ │ ├── pnum.js │ │ │ ├── push.js │ │ │ ├── rcssNum.js │ │ │ ├── rnothtmlwhite.js │ │ │ ├── slice.js │ │ │ ├── support.js │ │ │ └── toString.js │ │ │ └── wrap.js │ ├── imgs │ │ └── logo.png │ ├── index.css │ ├── index.html │ ├── index.js │ ├── spiderManager.css │ ├── spiderManager.html │ └── spiderManager.js └── test │ ├── proxy_request.py │ └── spider_report.py ├── spider ├── scrapy.cfg └── weibo │ ├── __init__.py │ ├── __pycache__ │ ├── __init__.cpython-35.pyc │ ├── __init__.cpython-36.pyc │ ├── connection.cpython-35.pyc │ ├── connection.cpython-36.pyc │ ├── defaults.cpython-35.pyc │ ├── defaults.cpython-36.pyc │ ├── items.cpython-35.pyc │ ├── items.cpython-36.pyc │ ├── middlewares.cpython-36.pyc │ ├── pipelines.cpython-35.pyc │ ├── pipelines.cpython-36.pyc │ ├── settings.cpython-35.pyc │ └── settings.cpython-36.pyc │ ├── connection.py │ ├── defaults.py │ ├── dupefilter.py │ ├── items.py │ ├── middlewares.py │ ├── pipelines.py │ ├── proxy_request.py │ ├── scheduler.py │ ├── settings.py │ ├── spider_report.py │ └── spiders │ ├── __init__.py │ ├── __pycache__ │ ├── __init__.cpython-35.pyc │ ├── __init__.cpython-36.pyc │ ├── weibo_comment.cpython-35.pyc │ ├── weibo_comment.cpython-36.pyc │ └── weibo_redis.cpython-36.pyc │ └── weibo_comment.py ├── spidermanager ├── Makefile ├── README.md ├── demo.cpp ├── include │ └── spidermanager.h └── src │ └── spidermanager.cpp └── utils ├── file_utils.h ├── other_utils.h └── string_utils.h /GitHub-Info/img/current.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linukey/DataMining-And-Social-Sentiment-Analysis-Based-On-Weibo/a9ee213873b78b34beb26ed5cfa54ab304b7d970/GitHub-Info/img/current.png -------------------------------------------------------------------------------- /GitHub-Info/img/project-architecture.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linukey/DataMining-And-Social-Sentiment-Analysis-Based-On-Weibo/a9ee213873b78b34beb26ed5cfa54ab304b7d970/GitHub-Info/img/project-architecture.png -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # 基于微博的数据挖掘与社交舆情分析 2 | 3 | ## This project consists of four parts: 4 | ``` 5 | 1. Crawl weibo data, contain comment、userinfo etc... 6 | 2. Process the captured data to the format we want 7 | 3. Analyze the data in order to get social sentiment information 8 | 4. Show the final result on the website 9 | ``` 10 | 11 | ## Project catalog: 12 | ``` 13 | 1.Run-Docker: 使用docker-compose作为分布式的解决方案 14 | 2.SourceProject: 项目源代码 15 | ``` 16 | 17 | ## contact me 18 | ``` 19 | ==================================================================================== 20 | qq:410282618 21 | Email:410282618@qq.com 22 | 23 | ---2017.11.11 24 | ==================================================================================== 25 | ``` 26 | -------------------------------------------------------------------------------- /Run-Docker/docker-compose.yml: -------------------------------------------------------------------------------- 1 | version: "3" 2 | 3 | services: 4 | 5 | redis: 6 | image: redis 7 | container_name: redis 8 | expose: 9 | - 6379 10 | tty: true 11 | 12 | webserver: 13 | build: ./webserver 14 | container_name: webserver 15 | expose: 16 | - 8001 17 | ports: 18 | - "8001:8001" 19 | tty: true 20 | command: sh /start-server.sh 21 | 22 | spider-one: 23 | build: ./spider/weibo_client 24 | container_name: spider-one 25 | tty: true 26 | command: sh /run_crawl.sh 27 | links: 28 | - redis 29 | - webserver 30 | 31 | spider-two: 32 | build: ./spider/weibo_client 33 | container_name: spider-two 34 | tty: true 35 | command: sh /run_crawl.sh 36 | links: 37 | - redis 38 | - webserver 39 | 40 | spider-three: 41 | build: ./spider/weibo_client 42 | container_name: spider-three 43 | tty: true 44 | command: sh /run_crawl.sh 45 | links: 46 | - redis 47 | - webserver 48 | -------------------------------------------------------------------------------- /Run-Docker/packing.sh: -------------------------------------------------------------------------------- 1 | SOURCE_NAME="../SourceProject/spider" 2 | PACK_NAME="spider/weibo_client/spider.tgz" 3 | 4 | rm ${PACK_NAME} 2>/dev/null 5 | tar -zcvf ${PACK_NAME} ${SOURCE_NAME} 6 | 7 | SOURCE_NAME="../SourceProject/server-tool ../SourceProject/proxymanager ../SourceProject/spidermanager ../SourceProject/utils" 8 | PACK_NAME="webserver/server-tool.tgz" 9 | 10 | rm ${PACK_NAME} 2>/dev/null 11 | tar -zcvf ${PACK_NAME} ${SOURCE_NAME} 12 | -------------------------------------------------------------------------------- /Run-Docker/spider/scrapy-redis/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | 3 | # install python3 & python3-pip 4 | RUN apt update \ 5 | && apt install python3 -y \ 6 | && apt install python3-pip -y \ 7 | # install vim 8 | && apt install vim -y \ 9 | # install scrapy & scrapy-redis 10 | && pip3 install scrapy \ 11 | && pip3 install scrapy-redis \ 12 | # clean 13 | && rm -rf /var/lib/apt/lists/* \ 14 | && apt purge -y --auto-remove python3-pip \ 15 | -------------------------------------------------------------------------------- /Run-Docker/spider/weibo_client/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM linukey/scrapy-redis 2 | 3 | COPY spider.tgz /root 4 | COPY run_crawl.sh / 5 | 6 | RUN cd /root \ 7 | && tar -xzvf spider.tgz \ 8 | && rm spider.tgz \ 9 | -------------------------------------------------------------------------------- /Run-Docker/spider/weibo_client/run_crawl.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd /root/SourceProject/spider 4 | scrapy crawl WeiboComment 5 | -------------------------------------------------------------------------------- /Run-Docker/spider/weibo_client/spider.tgz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linukey/DataMining-And-Social-Sentiment-Analysis-Based-On-Weibo/a9ee213873b78b34beb26ed5cfa54ab304b7d970/Run-Docker/spider/weibo_client/spider.tgz -------------------------------------------------------------------------------- /Run-Docker/webserver/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM linukey/webserver 2 | 3 | COPY server-tool.tgz / 4 | COPY start-server.sh / 5 | 6 | RUN cd / \ 7 | && tar -xzvf server-tool.tgz \ 8 | && rm server-tool.tgz \ 9 | && apt-get update \ 10 | && apt-get install python3-pip -y \ 11 | && pip3 install requests \ 12 | && cd /usr/lib \ 13 | && ln -s /usr/lib/python3.5/config-3.5m-x86_64-linux-gnu/libpython3.5.so libpython3.5.so 14 | -------------------------------------------------------------------------------- /Run-Docker/webserver/start-server.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | cd ./SourceProject/server-tool 4 | sh build.sh 5 | ./run_server 6 | -------------------------------------------------------------------------------- /SourceProject/dataprocess/__pycache__/weibocomment.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linukey/DataMining-And-Social-Sentiment-Analysis-Based-On-Weibo/a9ee213873b78b34beb26ed5cfa54ab304b7d970/SourceProject/dataprocess/__pycache__/weibocomment.cpython-35.pyc -------------------------------------------------------------------------------- /SourceProject/dataprocess/__pycache__/weibouser.cpython-35.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linukey/DataMining-And-Social-Sentiment-Analysis-Based-On-Weibo/a9ee213873b78b34beb26ed5cfa54ab304b7d970/SourceProject/dataprocess/__pycache__/weibouser.cpython-35.pyc -------------------------------------------------------------------------------- /SourceProject/dataprocess/comment_strategy.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/python3 2 | 3 | import sys 4 | import io 5 | sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8') 6 | import json 7 | from weibouser import WeiboUser 8 | from weibocomment import WeiboComment 9 | 10 | # 去掉评论中的html信息 11 | def format_comment(line): 12 | line = line.strip() 13 | i = 0 14 | while i < len(line): 15 | if line[i] == '<': 16 | begin = i 17 | while i < len(line) and line[i] != ' ': 18 | i += 1 19 | if i < len(line): 20 | close_tag = '/' + line[begin+1:i] + '>' 21 | close_index = line.find(close_tag) 22 | if close_index != -1: 23 | close_index_right = close_index + len(close_tag) 24 | if close_index_right >= len(line): 25 | line = line[:begin] 26 | break 27 | else: 28 | line = line[:begin] + line[close_index_right:] 29 | i = begin - 1 30 | i += 1 31 | return line 32 | 33 | def extractComments(data): 34 | jsonData = json.loads(data) 35 | comments = [] 36 | 37 | for data in jsonData["data"]: 38 | source = data["source"] 39 | text = format_comment(data["text"]) 40 | cid = data["id"] 41 | 42 | uid = data["user"]["id"] 43 | name = data["user"]["screen_name"] 44 | profileUrl = data["user"]["profile_url"] 45 | profileImageUrl = data["user"]["profile_image_url"] 46 | verified = data["user"]["verified"] 47 | 48 | user = WeiboUser(uid, name, verified, profileUrl, profileImageUrl) 49 | 50 | comment = WeiboComment(cid, source, user, text) 51 | comments.append(comment) 52 | 53 | return comments 54 | 55 | 56 | if __name__ == '__main__': 57 | for line in sys.stdin: 58 | comments = extractComments(line) 59 | for comment in comments: 60 | #comment.toString() 61 | print(comment.text) 62 | -------------------------------------------------------------------------------- /SourceProject/dataprocess/hadoop-strategy/weibo_comment_task.sh: -------------------------------------------------------------------------------- 1 | TASK_NAME=weibo_comment 2 | 3 | HADOOP=/home/users/chenguodong02/influence/hadoop-client/hadoop/bin/hadoop 4 | INPUT=/user/ccdb/rd/chenguodong02/weibo/input 5 | OUTPUT=/user/ccdb/rd/chenguodong02/weibo/output 6 | 7 | $HADOOP fs -rmr ${OUTPUT} 8 | 9 | $HADOOP streaming \ 10 | -input "${INPUT}" \ 11 | -output "${OUTPUT}" \ 12 | -jobconf mapred.job.name="$TASK_NAME" \ 13 | -jobconf mapred.job.priority="HIGH" \ 14 | -jobconf mapred.max.reduce.failures.percent="10" \ 15 | -jobconf mapred.job.map.capacity="50" \ 16 | -jobconf mapred.map.tasks="50" \ 17 | -jobconf mapred.job.reduce.capacity="50" \ 18 | -jobconf mapred.reduce.tasks="50" \ 19 | -inputformat org.apache.hadoop.mapred.lib.NLineInputFormat \ 20 | -file comment_strategy.py \ 21 | -file weibocomment.py \ 22 | -file weibouser.py \ 23 | -file red.sh \ 24 | -cacheArchive /user/ccdb/rd/chenguodong02/python.tgz#. \ 25 | -mapper "cat" \ 26 | -reducer "red.sh" 27 | -------------------------------------------------------------------------------- /SourceProject/dataprocess/nlp_process.py: -------------------------------------------------------------------------------- 1 | #! /usr/bin/python3 2 | 3 | from snownlp import SnowNLP 4 | 5 | if __name__ == '__main__': 6 | data = open('result') 7 | for line in data: 8 | snow = SnowNLP(line) 9 | print(line) 10 | print(snow.words) 11 | print(snow.sentiments) 12 | -------------------------------------------------------------------------------- /SourceProject/dataprocess/weibocomment.py: -------------------------------------------------------------------------------- 1 | weibomodel/weibocomment.py -------------------------------------------------------------------------------- /SourceProject/dataprocess/weibomodel/weibocomment.py: -------------------------------------------------------------------------------- 1 | from weibouser import WeiboUser 2 | 3 | class WeiboComment: 4 | def __init__(self, cid=None, source=None, user=None, text=None): 5 | self.cid = cid 6 | self.source = source 7 | self.user = user 8 | self.text = text 9 | 10 | 11 | def toJson(self): 12 | juser = {} 13 | jcomment = {} 14 | juser.update(self.user.__dict__) 15 | jcomment.update(self.__dict__) 16 | jcomment["user"] = juser 17 | return jcomment 18 | 19 | 20 | def fromJson(self, data): 21 | self.cid = data["cid"] 22 | self.source = data["source"] 23 | self.text = data["text"] 24 | 25 | user=WeiboUser() 26 | user.fromJson(data["user"]) 27 | self.user = user 28 | 29 | 30 | def toString(self): 31 | print("cid:" + str(self.cid)) 32 | print("source:" + self.source) 33 | print("text:" + self.text) 34 | print("user:") 35 | self.user.toString() 36 | 37 | 38 | if __name__ == '__main__': 39 | info = \ 40 | "{ \ 41 | \"cid\":\"123\", \ 42 | \"source\":\"xiaomi\", \ 43 | \"text\":\"hello\", \ 44 | \"user\": \ 45 | { \ 46 | \"uid\":\"456\", \ 47 | \"name\":\"linukey\", \ 48 | \"verified\":\"false\", \ 49 | \"profileUrl\":\"haha\", \ 50 | \"profileImageUrl\":\"xixi\" \ 51 | } \ 52 | }" 53 | 54 | import json 55 | 56 | jsonData = json.loads(info) 57 | comment = WeiboComment() 58 | comment.fromJson(jsonData) 59 | comment.toString() 60 | -------------------------------------------------------------------------------- /SourceProject/dataprocess/weibomodel/weibouser.py: -------------------------------------------------------------------------------- 1 | class WeiboUser: 2 | def __init__(self, uid=None, name=None, verified=None, profileUrl=None, profileImageUrl=None): 3 | self.name = name 4 | self.uid = uid 5 | self.verified = verified 6 | self.profileUrl = profileUrl 7 | self.profileImageUrl = profileImageUrl 8 | 9 | 10 | def toJson(self): 11 | juser = {} 12 | juser.update(self.__dict__) 13 | return juser 14 | 15 | 16 | def fromJson(self, data): 17 | self.name = data["name"] 18 | self.uid = data["uid"] 19 | self.verified = data["verified"] 20 | self.profileUrl = data["profileUrl"] 21 | self.profileImageUrl = data["profileImageUrl"] 22 | 23 | 24 | def toString(self): 25 | print("uid:" + str(self.uid)) 26 | print("name:" + self.name) 27 | print("verified:" + str(self.verified)) 28 | print("prifileUrl:" + self.profileUrl) 29 | print("profileImageUrl:" + self.profileImageUrl) 30 | -------------------------------------------------------------------------------- /SourceProject/dataprocess/weibouser.py: -------------------------------------------------------------------------------- 1 | weibomodel/weibouser.py -------------------------------------------------------------------------------- /SourceProject/proxymanager/cpp/Makefile: -------------------------------------------------------------------------------- 1 | all : libproxy.a demo 2 | 3 | .PHONY : all 4 | 5 | libproxy.a : src/proxymanager.cpp 6 | g++ -c src/proxymanager.cpp -std=c++11 -lpython3.5 7 | ar -crv libproxy.a proxymanager.o 8 | rm proxymanager.o 9 | 10 | demo : src/proxymanager.cpp demo.cpp 11 | g++ demo.cpp src/proxymanager.cpp -o demo -lpython3.5 -std=c++11 12 | 13 | clean: 14 | rm demo 15 | rm libproxy.a 16 | -------------------------------------------------------------------------------- /SourceProject/proxymanager/cpp/demo.cpp: -------------------------------------------------------------------------------- 1 | #include "include/proxymanager.h" 2 | 3 | using namespace std; 4 | using namespace linukey::proxy; 5 | 6 | int main(){ 7 | ProxyManager proxy(5, 8 | 2, 9 | "/home/linukey/WorkSpace/DataMining-And-Social-Sentiment-Analysis-Based-On-Weibo/SourceProject/proxymanager/proxyfile", 10 | "/home/linukey/WorkSpace/DataMining-And-Social-Sentiment-Analysis-Based-On-Weibo/SourceProject/proxymanager/py"); 11 | 12 | proxy.update_proxyfile(); 13 | proxy.init_proxypool(); 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /SourceProject/proxymanager/cpp/include/proxymanager.h: -------------------------------------------------------------------------------- 1 | #ifndef __UPDATE_PROXY_H__ 2 | #define __UPDATE_PROXY_H__ 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace linukey{ 9 | namespace proxy{ 10 | 11 | class ProxyManager{ 12 | private: 13 | /* construct */ 14 | int proxy_num; 15 | int proxy_min; 16 | std::string proxyfile_path; 17 | std::string pymodel_path; 18 | 19 | std::deque proxypool; 20 | // key=client_id value=proxy 21 | std::map client_proxy_pool; 22 | // key=client_id value=live_time 23 | std::map clientmanager_pool; 24 | 25 | public: 26 | int update_proxyfile(); 27 | int init_proxypool(); 28 | int get_proxypool_size(); 29 | bool proxypool_exists(std::string proxy); 30 | std::string get_ip(const std::string& client_id); 31 | bool set_ip(std::string proxy); 32 | ProxyManager(int proxy_num, int proxy_min, std::string proxyfile_path, std::string py_model_path); 33 | }; 34 | 35 | }// namespace proxy 36 | }// namespace linukey 37 | 38 | #endif 39 | -------------------------------------------------------------------------------- /SourceProject/proxymanager/proxyfile: -------------------------------------------------------------------------------- 1 | 49.85.7.228:25906 2 | -------------------------------------------------------------------------------- /SourceProject/server-tool/Makefile: -------------------------------------------------------------------------------- 1 | run_server:control/*.cpp 2 | g++ control/*.cpp -o run_server -lboost_system -L lib -lwebserver -L ../proxymanager/cpp -lproxy -L ../spidermanager -lspidermanager -lpthread -std=c++11 -lpython3.5 3 | 4 | clean: 5 | rm run_server 6 | -------------------------------------------------------------------------------- /SourceProject/server-tool/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | sh ./clean.sh 4 | echo 5 | echo 6 | echo "\033[33m[========================building proxymanager======================]\033[0m" 7 | make -C ../proxymanager/cpp 8 | echo "\033[33m[===================================================================]\033[0m" 9 | echo 10 | echo 11 | echo "\033[33m[========================building spidermanager======================]\033[0m" 12 | make -C ../spidermanager 13 | echo "\033[33m[===================================================================]\033[0m" 14 | echo 15 | echo 16 | echo "\033[33m[========================building webserver=========================]\033[0m" 17 | make 18 | echo "\033[33m[===================================================================]\033[0m" 19 | echo 20 | echo 21 | -------------------------------------------------------------------------------- /SourceProject/server-tool/clean.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | echo "\033[33m[=============================clean=================================]\033[0m" 4 | make -C ../proxymanager/cpp clean 5 | make -C ../spidermanager clean 6 | make clean 7 | rm run_server 8 | echo must to delete the ld_config in the $HOME/.bashrc by yourself 9 | echo "\033[33m[===================================================================]\033[0m" 10 | -------------------------------------------------------------------------------- /SourceProject/server-tool/lib/include/http.h: -------------------------------------------------------------------------------- 1 | #ifndef __LINUKEY_WEBSERVER_REQUEST__ 2 | #define __LINUKEY_WEBSERVER_REQUEST__ 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | using std::string; 10 | using std::map; 11 | using std::vector; 12 | using std::set; 13 | 14 | namespace linukey{ 15 | namespace webserver{ 16 | namespace http{ 17 | 18 | struct Request{ 19 | map headers; 20 | map datas; 21 | 22 | string host; 23 | string method; 24 | string url; 25 | string protocol; 26 | }; 27 | 28 | enum REQUEST_METHOD{ 29 | GET = 0, 30 | POST 31 | }; 32 | 33 | static vector REQUEST_METHOD_STR = { 34 | "get", 35 | "post" 36 | }; 37 | 38 | enum REQUEST_HEADERS{ 39 | CONTENT_LENGTH = 0, 40 | }; 41 | 42 | static vector REQUEST_HEADERS_STR = { 43 | "content-length", 44 | }; 45 | 46 | static const string HEADER = "HTTP/1.1 200 OK\r\n" \ 47 | "Connection: close\r\n" \ 48 | "Access-Control-Allow-Origin: *\r\n" \ 49 | "\r\n"; 50 | 51 | // help tools 52 | void extract_header(const string& headers, const string& key, string& value); 53 | void extract_datas(const string& req_datas, map& datas); 54 | void extract_request(const string& headers, Request* req); 55 | void extract_request_line(const string& headers, map& req_line); 56 | 57 | } 58 | } 59 | } 60 | 61 | #endif 62 | -------------------------------------------------------------------------------- /SourceProject/server-tool/lib/include/log.h: -------------------------------------------------------------------------------- 1 | /* 2 | author: linukey 3 | time: 2017.11.12 4 | ps: 5 | */ 6 | 7 | #ifndef __LINUKEY_LOG_H__ 8 | #define __LINUKEY_LOG_H__ 9 | 10 | #include 11 | #include 12 | 13 | namespace linukey{ 14 | namespace log{ 15 | 16 | enum LOG_LEVEL{ 17 | TRACE = 0, 18 | DEBUG, 19 | INFO, 20 | WARN, 21 | ERROR, 22 | FATAL 23 | }; 24 | 25 | const vector LOG_LEVEL_STR{ 26 | "TRACE", 27 | "DEBUG", 28 | "INFO", 29 | "WARN", 30 | "ERROR", 31 | "FATAL" 32 | }; 33 | 34 | const std::string positive_log_file="webserver.log1"; 35 | const std::string negative_log_file="webserver.log2"; 36 | 37 | static void LOGOUT(LOG_LEVEL level, std::string message) { 38 | std::string log_file; 39 | switch (level){ 40 | case TRACE: 41 | case DEBUG: 42 | case INFO: 43 | log_file = positive_log_file; 44 | break; 45 | 46 | case WARN: 47 | case ERROR: 48 | case FATAL: 49 | log_file = negative_log_file; 50 | break; 51 | 52 | default: 53 | log_file = negative_log_file; 54 | }; 55 | 56 | std::ofstream fout(log_file, std::ios::app); 57 | 58 | if (!fout.is_open()) { 59 | std::cerr << "open log file fatal!" << std::endl; 60 | } 61 | 62 | time_t rawtime; 63 | time(&rawtime); 64 | std::string time_str(ctime(&rawtime)); 65 | 66 | fout << LOG_LEVEL_STR[level] << ":" << message << " " << time_str; 67 | fout.close(); 68 | } 69 | 70 | } 71 | } 72 | 73 | #endif 74 | -------------------------------------------------------------------------------- /SourceProject/server-tool/lib/include/webserver.h: -------------------------------------------------------------------------------- 1 | /* 2 | author: linukey 3 | time: 2017.11.12 4 | ps: 5 | */ 6 | 7 | #ifndef __LINUKEY_WEBSERVER_H__ 8 | #define __LINUKEY_WEBSERVER_H__ 9 | 10 | #include 11 | #include 12 | #include 13 | #include "http.h" 14 | 15 | namespace linukey{ 16 | namespace webserver{ 17 | 18 | typedef std::shared_ptr shared_socket; 19 | typedef boost::system::error_code e_code; 20 | 21 | class WebServer{ 22 | public: 23 | WebServer(); 24 | boost::asio::io_service SERVICE; 25 | boost::asio::ip::tcp::acceptor ACCEPTOR; 26 | 27 | // 响应 28 | void response(shared_socket sock, std::string message); 29 | // 启动 30 | void run(); 31 | 32 | private: 33 | const int buffer_size = 1024; 34 | 35 | void accept_handle(shared_socket sock, const e_code& err); 36 | void write_handle(const e_code& err, size_t size); 37 | void read_handle(linukey::webserver::http::Request* req, shared_socket sock, char *buff, const e_code& err, size_t size); 38 | size_t read_complete(linukey::webserver::http::Request* req, char *buff, const e_code& err, size_t size); 39 | 40 | // 应用方自定义 41 | protected: 42 | 43 | // 路由 44 | virtual void router(linukey::webserver::http::Request* req, shared_socket sock); 45 | }; 46 | 47 | } // namespace webserver 48 | } // namespace linukey 49 | 50 | #endif 51 | -------------------------------------------------------------------------------- /SourceProject/server-tool/lib/libwebserver.a: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linukey/DataMining-And-Social-Sentiment-Analysis-Based-On-Weibo/a9ee213873b78b34beb26ed5cfa54ab304b7d970/SourceProject/server-tool/lib/libwebserver.a -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/.bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", 4 | "keywords": [ 5 | "css", 6 | "js", 7 | "less", 8 | "mobile-first", 9 | "responsive", 10 | "front-end", 11 | "framework", 12 | "web" 13 | ], 14 | "homepage": "http://getbootstrap.com", 15 | "license": "MIT", 16 | "moduleType": "globals", 17 | "main": [ 18 | "less/bootstrap.less", 19 | "dist/js/bootstrap.js" 20 | ], 21 | "ignore": [ 22 | "/.*", 23 | "_config.yml", 24 | "CNAME", 25 | "composer.json", 26 | "CONTRIBUTING.md", 27 | "docs", 28 | "js/tests", 29 | "test-infra" 30 | ], 31 | "dependencies": { 32 | "jquery": "1.9.1 - 3" 33 | }, 34 | "version": "3.3.7", 35 | "_release": "3.3.7", 36 | "_resolution": { 37 | "type": "version", 38 | "tag": "v3.3.7", 39 | "commit": "0b9c4a4007c44201dce9a6cc1a38407005c26c86" 40 | }, 41 | "_source": "https://github.com/twbs/bootstrap.git", 42 | "_target": "^3.3.7", 43 | "_originalSource": "bootstrap", 44 | "_direct": true 45 | } -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | Bootstrap uses [GitHub's Releases feature](https://github.com/blog/1547-release-your-software) for its changelogs. 2 | 3 | See [the Releases section of our GitHub project](https://github.com/twbs/bootstrap/releases) for changelogs for each release version of Bootstrap. 4 | 5 | Release announcement posts on [the official Bootstrap blog](http://blog.getbootstrap.com) contain summaries of the most noteworthy changes made in each release. 6 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/Gemfile: -------------------------------------------------------------------------------- 1 | source 'https://rubygems.org' 2 | 3 | group :development, :test do 4 | gem 'jekyll', '~> 3.1.2' 5 | gem 'jekyll-sitemap', '~> 0.11.0' 6 | end 7 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/Gemfile.lock: -------------------------------------------------------------------------------- 1 | GEM 2 | remote: https://rubygems.org/ 3 | specs: 4 | addressable (2.4.0) 5 | colorator (0.1) 6 | ffi (1.9.14-x64-mingw32) 7 | jekyll (3.1.6) 8 | colorator (~> 0.1) 9 | jekyll-sass-converter (~> 1.0) 10 | jekyll-watch (~> 1.1) 11 | kramdown (~> 1.3) 12 | liquid (~> 3.0) 13 | mercenary (~> 0.3.3) 14 | rouge (~> 1.7) 15 | safe_yaml (~> 1.0) 16 | jekyll-sass-converter (1.4.0) 17 | sass (~> 3.4) 18 | jekyll-sitemap (0.11.0) 19 | addressable (~> 2.4.0) 20 | jekyll-watch (1.4.0) 21 | listen (~> 3.0, < 3.1) 22 | kramdown (1.11.1) 23 | liquid (3.0.6) 24 | listen (3.0.8) 25 | rb-fsevent (~> 0.9, >= 0.9.4) 26 | rb-inotify (~> 0.9, >= 0.9.7) 27 | mercenary (0.3.6) 28 | rb-fsevent (0.9.7) 29 | rb-inotify (0.9.7) 30 | ffi (>= 0.5.0) 31 | rouge (1.11.1) 32 | safe_yaml (1.0.4) 33 | sass (3.4.22) 34 | 35 | PLATFORMS 36 | x64-mingw32 37 | 38 | DEPENDENCIES 39 | jekyll (~> 3.1.2) 40 | jekyll-sitemap (~> 0.11.0) 41 | 42 | BUNDLED WITH 43 | 1.12.5 44 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/ISSUE_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | Before opening an issue: 2 | 3 | - [Search for duplicate or closed issues](https://github.com/twbs/bootstrap/issues?utf8=%E2%9C%93&q=is%3Aissue) 4 | - [Validate](http://validator.w3.org/nu/) and [lint](https://github.com/twbs/bootlint#in-the-browser) any HTML to avoid common problems 5 | - Prepare a [reduced test case](https://css-tricks.com/reduced-test-cases/) for any bugs 6 | - Read the [contributing guidelines](https://github.com/twbs/bootstrap/blob/master/CONTRIBUTING.md) 7 | 8 | When asking general "how to" questions: 9 | 10 | - Please do not open an issue here 11 | - Instead, ask for help on [StackOverflow, IRC, or Slack](https://github.com/twbs/bootstrap/blob/master/README.md#community) 12 | 13 | When reporting a bug, include: 14 | 15 | - Operating system and version (Windows, Mac OS X, Android, iOS, Win10 Mobile) 16 | - Browser and version (Chrome, Firefox, Safari, IE, MS Edge, Opera 15+, Android Browser) 17 | - Reduced test cases and potential fixes using [JS Bin](https://jsbin.com) 18 | 19 | When suggesting a feature, include: 20 | 21 | - As much detail as possible for what we should add and why it's important to Bootstrap 22 | - Relevant links to prior art, screenshots, or live demos whenever possible 23 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2011-2016 Twitter, Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "bootstrap", 3 | "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", 4 | "keywords": [ 5 | "css", 6 | "js", 7 | "less", 8 | "mobile-first", 9 | "responsive", 10 | "front-end", 11 | "framework", 12 | "web" 13 | ], 14 | "homepage": "http://getbootstrap.com", 15 | "license": "MIT", 16 | "moduleType": "globals", 17 | "main": [ 18 | "less/bootstrap.less", 19 | "dist/js/bootstrap.js" 20 | ], 21 | "ignore": [ 22 | "/.*", 23 | "_config.yml", 24 | "CNAME", 25 | "composer.json", 26 | "CONTRIBUTING.md", 27 | "docs", 28 | "js/tests", 29 | "test-infra" 30 | ], 31 | "dependencies": { 32 | "jquery": "1.9.1 - 3" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linukey/DataMining-And-Social-Sentiment-Analysis-Based-On-Weibo/a9ee213873b78b34beb26ed5cfa54ab304b7d970/SourceProject/server-tool/resource/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linukey/DataMining-And-Social-Sentiment-Analysis-Based-On-Weibo/a9ee213873b78b34beb26ed5cfa54ab304b7d970/SourceProject/server-tool/resource/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linukey/DataMining-And-Social-Sentiment-Analysis-Based-On-Weibo/a9ee213873b78b34beb26ed5cfa54ab304b7d970/SourceProject/server-tool/resource/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linukey/DataMining-And-Social-Sentiment-Analysis-Based-On-Weibo/a9ee213873b78b34beb26ed5cfa54ab304b7d970/SourceProject/server-tool/resource/bower_components/bootstrap/dist/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/dist/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linukey/DataMining-And-Social-Sentiment-Analysis-Based-On-Weibo/a9ee213873b78b34beb26ed5cfa54ab304b7d970/SourceProject/server-tool/resource/bower_components/bootstrap/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linukey/DataMining-And-Social-Sentiment-Analysis-Based-On-Weibo/a9ee213873b78b34beb26ed5cfa54ab304b7d970/SourceProject/server-tool/resource/bower_components/bootstrap/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linukey/DataMining-And-Social-Sentiment-Analysis-Based-On-Weibo/a9ee213873b78b34beb26ed5cfa54ab304b7d970/SourceProject/server-tool/resource/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/linukey/DataMining-And-Social-Sentiment-Analysis-Based-On-Weibo/a9ee213873b78b34beb26ed5cfa54ab304b7d970/SourceProject/server-tool/resource/bower_components/bootstrap/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/grunt/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "extends" : "../js/.jshintrc", 3 | "asi" : false, 4 | "browser" : false, 5 | "es3" : false, 6 | "node" : true 7 | } 8 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/grunt/bs-commonjs-generator.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grunt task for the CommonJS module generation 3 | * http://getbootstrap.com 4 | * Copyright 2014-2015 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | 'use strict'; 9 | 10 | var fs = require('fs'); 11 | var path = require('path'); 12 | 13 | var COMMONJS_BANNER = '// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.\n'; 14 | 15 | module.exports = function generateCommonJSModule(grunt, srcFiles, destFilepath) { 16 | var destDir = path.dirname(destFilepath); 17 | 18 | function srcPathToDestRequire(srcFilepath) { 19 | var requirePath = path.relative(destDir, srcFilepath).replace(/\\/g, '/'); 20 | return 'require(\'' + requirePath + '\')'; 21 | } 22 | 23 | var moduleOutputJs = COMMONJS_BANNER + srcFiles.map(srcPathToDestRequire).join('\n'); 24 | try { 25 | fs.writeFileSync(destFilepath, moduleOutputJs); 26 | } catch (err) { 27 | grunt.fail.warn(err); 28 | } 29 | grunt.log.writeln('File ' + destFilepath.cyan + ' created.'); 30 | }; 31 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/grunt/bs-glyphicons-data-generator.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grunt task for Glyphicons data generation 3 | * http://getbootstrap.com 4 | * Copyright 2014-2015 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | 'use strict'; 9 | 10 | var fs = require('fs'); 11 | 12 | module.exports = function generateGlyphiconsData(grunt) { 13 | // Pass encoding, utf8, so `readFileSync` will return a string instead of a 14 | // buffer 15 | var glyphiconsFile = fs.readFileSync('less/glyphicons.less', 'utf8'); 16 | var glyphiconsLines = glyphiconsFile.split('\n'); 17 | 18 | // Use any line that starts with ".glyphicon-" and capture the class name 19 | var iconClassName = /^\.(glyphicon-[a-zA-Z0-9-]+)/; 20 | var glyphiconsData = '# This file is generated via Grunt task. **Do not edit directly.**\n' + 21 | '# See the \'build-glyphicons-data\' task in Gruntfile.js.\n\n'; 22 | var glyphiconsYml = 'docs/_data/glyphicons.yml'; 23 | for (var i = 0, len = glyphiconsLines.length; i < len; i++) { 24 | var match = glyphiconsLines[i].match(iconClassName); 25 | 26 | if (match !== null) { 27 | glyphiconsData += '- ' + match[1] + '\n'; 28 | } 29 | } 30 | 31 | // Create the `_data` directory if it doesn't already exist 32 | if (!fs.existsSync('docs/_data')) { 33 | fs.mkdirSync('docs/_data'); 34 | } 35 | 36 | try { 37 | fs.writeFileSync(glyphiconsYml, glyphiconsData); 38 | } catch (err) { 39 | grunt.fail.warn(err); 40 | } 41 | grunt.log.writeln('File ' + glyphiconsYml.cyan + ' created.'); 42 | }; 43 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/grunt/bs-raw-files-generator.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap Grunt task for generating raw-files.min.js for the Customizer 3 | * http://getbootstrap.com 4 | * Copyright 2014-2015 Twitter, Inc. 5 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 6 | */ 7 | 8 | 'use strict'; 9 | 10 | var fs = require('fs'); 11 | var btoa = require('btoa'); 12 | var glob = require('glob'); 13 | 14 | function getFiles(type) { 15 | var files = {}; 16 | var recursive = type === 'less'; 17 | var globExpr = recursive ? '/**/*' : '/*'; 18 | glob.sync(type + globExpr) 19 | .filter(function (path) { 20 | return type === 'fonts' ? true : new RegExp('\\.' + type + '$').test(path); 21 | }) 22 | .forEach(function (fullPath) { 23 | var relativePath = fullPath.replace(/^[^/]+\//, ''); 24 | files[relativePath] = type === 'fonts' ? btoa(fs.readFileSync(fullPath)) : fs.readFileSync(fullPath, 'utf8'); 25 | }); 26 | return 'var __' + type + ' = ' + JSON.stringify(files) + '\n'; 27 | } 28 | 29 | module.exports = function generateRawFilesJs(grunt, banner) { 30 | if (!banner) { 31 | banner = ''; 32 | } 33 | var dirs = ['js', 'less', 'fonts']; 34 | var files = banner + dirs.map(getFiles).reduce(function (combined, file) { 35 | return combined + file; 36 | }, ''); 37 | var rawFilesJs = 'docs/assets/js/raw-files.min.js'; 38 | try { 39 | fs.writeFileSync(rawFilesJs, files); 40 | } catch (err) { 41 | grunt.fail.warn(err); 42 | } 43 | grunt.log.writeln('File ' + rawFilesJs.cyan + ' created.'); 44 | }; 45 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/grunt/configBridge.json: -------------------------------------------------------------------------------- 1 | { 2 | "paths": { 3 | "customizerJs": [ 4 | "../assets/js/vendor/autoprefixer.js", 5 | "../assets/js/vendor/less.min.js", 6 | "../assets/js/vendor/jszip.min.js", 7 | "../assets/js/vendor/uglify.min.js", 8 | "../assets/js/vendor/Blob.js", 9 | "../assets/js/vendor/FileSaver.js", 10 | "../assets/js/raw-files.min.js", 11 | "../assets/js/src/customizer.js" 12 | ], 13 | "docsJs": [ 14 | "../assets/js/vendor/holder.min.js", 15 | "../assets/js/vendor/ZeroClipboard.min.js", 16 | "../assets/js/vendor/anchor.min.js", 17 | "../assets/js/src/application.js" 18 | ] 19 | }, 20 | "config": { 21 | "autoprefixerBrowsers": [ 22 | "Android 2.3", 23 | "Android >= 4", 24 | "Chrome >= 20", 25 | "Firefox >= 24", 26 | "Explorer >= 8", 27 | "iOS >= 6", 28 | "Opera >= 12", 29 | "Safari >= 6" 30 | ], 31 | "jqueryCheck": [ 32 | "if (typeof jQuery === 'undefined') {", 33 | " throw new Error('Bootstrap\\'s JavaScript requires jQuery')", 34 | "}\n" 35 | ], 36 | "jqueryVersionCheck": [ 37 | "+function ($) {", 38 | " 'use strict';", 39 | " var version = $.fn.jquery.split(' ')[0].split('.')", 40 | " if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {", 41 | " throw new Error('Bootstrap\\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')", 42 | " }", 43 | "}(jQuery);\n\n" 44 | ] 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/grunt/sauce_browsers.yml: -------------------------------------------------------------------------------- 1 | [ 2 | # Docs: https://saucelabs.com/docs/platforms/webdriver 3 | 4 | { 5 | browserName: "safari", 6 | platform: "OS X 10.10" 7 | }, 8 | { 9 | browserName: "chrome", 10 | platform: "OS X 10.10" 11 | }, 12 | { 13 | browserName: "firefox", 14 | platform: "OS X 10.10" 15 | }, 16 | 17 | # Mac Opera not currently supported by Sauce Labs 18 | 19 | { 20 | browserName: "internet explorer", 21 | version: "11", 22 | platform: "Windows 8.1" 23 | }, 24 | { 25 | browserName: "internet explorer", 26 | version: "10", 27 | platform: "Windows 8" 28 | }, 29 | { 30 | browserName: "internet explorer", 31 | version: "9", 32 | platform: "Windows 7" 33 | }, 34 | { 35 | browserName: "internet explorer", 36 | version: "8", 37 | platform: "Windows 7" 38 | }, 39 | 40 | # { # Unofficial 41 | # browserName: "internet explorer", 42 | # version: "7", 43 | # platform: "Windows XP" 44 | # }, 45 | 46 | { 47 | browserName: "chrome", 48 | platform: "Windows 8.1" 49 | }, 50 | { 51 | browserName: "firefox", 52 | platform: "Windows 8.1" 53 | }, 54 | 55 | # Win Opera 15+ not currently supported by Sauce Labs 56 | 57 | { 58 | browserName: "iphone", 59 | platform: "OS X 10.10", 60 | version: "9.2" 61 | }, 62 | 63 | # iOS Chrome not currently supported by Sauce Labs 64 | 65 | # Linux (unofficial) 66 | { 67 | browserName: "chrome", 68 | platform: "Linux" 69 | }, 70 | { 71 | browserName: "firefox", 72 | platform: "Linux" 73 | } 74 | 75 | # Android Chrome not currently supported by Sauce Labs 76 | 77 | # { # Android Browser (super-unofficial) 78 | # browserName: "android", 79 | # version: "4.0", 80 | # platform: "Linux" 81 | # } 82 | ] 83 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/js/.jscsrc: -------------------------------------------------------------------------------- 1 | { 2 | "disallowEmptyBlocks": true, 3 | "disallowKeywords": ["with"], 4 | "disallowMixedSpacesAndTabs": true, 5 | "disallowMultipleLineStrings": true, 6 | "disallowMultipleVarDecl": true, 7 | "disallowQuotedKeysInObjects": "allButReserved", 8 | "disallowSpaceAfterPrefixUnaryOperators": ["++", "--", "+", "-", "~", "!"], 9 | "disallowSpaceBeforeBinaryOperators": [","], 10 | "disallowSpaceBeforePostfixUnaryOperators": ["++", "--"], 11 | "disallowSpacesInFunctionDeclaration": { "beforeOpeningRoundBrace": true }, 12 | "disallowSpacesInNamedFunctionExpression": { "beforeOpeningRoundBrace": true }, 13 | "disallowSpacesInsideArrayBrackets": true, 14 | "disallowSpacesInsideParentheses": true, 15 | "disallowTrailingComma": true, 16 | "disallowTrailingWhitespace": true, 17 | "requireCamelCaseOrUpperCaseIdentifiers": true, 18 | "requireCapitalizedConstructors": true, 19 | "requireCommaBeforeLineBreak": true, 20 | "requireDollarBeforejQueryAssignment": true, 21 | "requireDotNotation": true, 22 | "requireLineFeedAtFileEnd": true, 23 | "requirePaddingNewLinesAfterUseStrict": true, 24 | "requirePaddingNewLinesBeforeExport": true, 25 | "requireSpaceAfterBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="], 26 | "requireSpaceAfterKeywords": ["if", "else", "for", "while", "do", "switch", "return", "try", "catch"], 27 | "requireSpaceAfterLineComment": true, 28 | "requireSpaceBeforeBinaryOperators": ["+", "-", "/", "*", "=", "==", "===", "!=", "!==", ">", "<", ">=", "<="], 29 | "requireSpaceBetweenArguments": true, 30 | "requireSpacesInAnonymousFunctionExpression": { "beforeOpeningCurlyBrace": true, "beforeOpeningRoundBrace": true }, 31 | "requireSpacesInConditionalExpression": true, 32 | "requireSpacesInForStatement": true, 33 | "requireSpacesInFunctionDeclaration": { "beforeOpeningCurlyBrace": true }, 34 | "requireSpacesInFunctionExpression": { "beforeOpeningCurlyBrace": true }, 35 | "requireSpacesInNamedFunctionExpression": { "beforeOpeningCurlyBrace": true }, 36 | "requireSpacesInsideObjectBrackets": "allButNested", 37 | "validateAlignedFunctionParameters": true, 38 | "validateIndentation": 2, 39 | "validateLineBreaks": "LF", 40 | "validateNewlineAfterArrayElements": true, 41 | "validateQuoteMarks": "'" 42 | } 43 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/js/.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "asi" : true, 3 | "browser" : true, 4 | "eqeqeq" : false, 5 | "eqnull" : true, 6 | "es3" : true, 7 | "expr" : true, 8 | "jquery" : true, 9 | "latedef" : true, 10 | "laxbreak" : true, 11 | "nonbsp" : true, 12 | "strict" : true, 13 | "undef" : true, 14 | "unused" : true 15 | } 16 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/js/alert.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: alert.js v3.3.7 3 | * http://getbootstrap.com/javascript/#alerts 4 | * ======================================================================== 5 | * Copyright 2011-2016 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // ALERT CLASS DEFINITION 14 | // ====================== 15 | 16 | var dismiss = '[data-dismiss="alert"]' 17 | var Alert = function (el) { 18 | $(el).on('click', dismiss, this.close) 19 | } 20 | 21 | Alert.VERSION = '3.3.7' 22 | 23 | Alert.TRANSITION_DURATION = 150 24 | 25 | Alert.prototype.close = function (e) { 26 | var $this = $(this) 27 | var selector = $this.attr('data-target') 28 | 29 | if (!selector) { 30 | selector = $this.attr('href') 31 | selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7 32 | } 33 | 34 | var $parent = $(selector === '#' ? [] : selector) 35 | 36 | if (e) e.preventDefault() 37 | 38 | if (!$parent.length) { 39 | $parent = $this.closest('.alert') 40 | } 41 | 42 | $parent.trigger(e = $.Event('close.bs.alert')) 43 | 44 | if (e.isDefaultPrevented()) return 45 | 46 | $parent.removeClass('in') 47 | 48 | function removeElement() { 49 | // detach from parent, fire event then clean up data 50 | $parent.detach().trigger('closed.bs.alert').remove() 51 | } 52 | 53 | $.support.transition && $parent.hasClass('fade') ? 54 | $parent 55 | .one('bsTransitionEnd', removeElement) 56 | .emulateTransitionEnd(Alert.TRANSITION_DURATION) : 57 | removeElement() 58 | } 59 | 60 | 61 | // ALERT PLUGIN DEFINITION 62 | // ======================= 63 | 64 | function Plugin(option) { 65 | return this.each(function () { 66 | var $this = $(this) 67 | var data = $this.data('bs.alert') 68 | 69 | if (!data) $this.data('bs.alert', (data = new Alert(this))) 70 | if (typeof option == 'string') data[option].call($this) 71 | }) 72 | } 73 | 74 | var old = $.fn.alert 75 | 76 | $.fn.alert = Plugin 77 | $.fn.alert.Constructor = Alert 78 | 79 | 80 | // ALERT NO CONFLICT 81 | // ================= 82 | 83 | $.fn.alert.noConflict = function () { 84 | $.fn.alert = old 85 | return this 86 | } 87 | 88 | 89 | // ALERT DATA-API 90 | // ============== 91 | 92 | $(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close) 93 | 94 | }(jQuery); 95 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/js/transition.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: transition.js v3.3.7 3 | * http://getbootstrap.com/javascript/#transitions 4 | * ======================================================================== 5 | * Copyright 2011-2016 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 14 | // ============================================================ 15 | 16 | function transitionEnd() { 17 | var el = document.createElement('bootstrap') 18 | 19 | var transEndEventNames = { 20 | WebkitTransition : 'webkitTransitionEnd', 21 | MozTransition : 'transitionend', 22 | OTransition : 'oTransitionEnd otransitionend', 23 | transition : 'transitionend' 24 | } 25 | 26 | for (var name in transEndEventNames) { 27 | if (el.style[name] !== undefined) { 28 | return { end: transEndEventNames[name] } 29 | } 30 | } 31 | 32 | return false // explicit for ie8 ( ._.) 33 | } 34 | 35 | // http://blog.alexmaccaw.com/css-transitions 36 | $.fn.emulateTransitionEnd = function (duration) { 37 | var called = false 38 | var $el = this 39 | $(this).one('bsTransitionEnd', function () { called = true }) 40 | var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 41 | setTimeout(callback, duration) 42 | return this 43 | } 44 | 45 | $(function () { 46 | $.support.transition = transitionEnd() 47 | 48 | if (!$.support.transition) return 49 | 50 | $.event.special.bsTransitionEnd = { 51 | bindType: $.support.transition.end, 52 | delegateType: $.support.transition.end, 53 | handle: function (e) { 54 | if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) 55 | } 56 | } 57 | }) 58 | 59 | }(jQuery); 60 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/.csslintrc: -------------------------------------------------------------------------------- 1 | { 2 | "adjoining-classes": false, 3 | "box-sizing": false, 4 | "box-model": false, 5 | "compatible-vendor-prefixes": false, 6 | "floats": false, 7 | "font-sizes": false, 8 | "gradients": false, 9 | "important": false, 10 | "known-properties": false, 11 | "outline-none": false, 12 | "qualified-headings": false, 13 | "regex-selectors": false, 14 | "shorthand": false, 15 | "text-indent": false, 16 | "unique-headings": false, 17 | "universal-selector": false, 18 | "unqualified-attributes": false 19 | } 20 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/alerts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: @alert-padding; 11 | margin-bottom: @line-height-computed; 12 | border: 1px solid transparent; 13 | border-radius: @alert-border-radius; 14 | 15 | // Headings for larger alerts 16 | h4 { 17 | margin-top: 0; 18 | // Specified for the h4 to prevent conflicts of changing @headings-color 19 | color: inherit; 20 | } 21 | 22 | // Provide class for links that match alerts 23 | .alert-link { 24 | font-weight: @alert-link-font-weight; 25 | } 26 | 27 | // Improve alignment and spacing of inner content 28 | > p, 29 | > ul { 30 | margin-bottom: 0; 31 | } 32 | 33 | > p + p { 34 | margin-top: 5px; 35 | } 36 | } 37 | 38 | // Dismissible alerts 39 | // 40 | // Expand the right padding and account for the close button's positioning. 41 | 42 | .alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0. 43 | .alert-dismissible { 44 | padding-right: (@alert-padding + 20); 45 | 46 | // Adjust close link position 47 | .close { 48 | position: relative; 49 | top: -2px; 50 | right: -21px; 51 | color: inherit; 52 | } 53 | } 54 | 55 | // Alternate styles 56 | // 57 | // Generate contextual modifier classes for colorizing the alert. 58 | 59 | .alert-success { 60 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); 61 | } 62 | 63 | .alert-info { 64 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); 65 | } 66 | 67 | .alert-warning { 68 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); 69 | } 70 | 71 | .alert-danger { 72 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); 73 | } 74 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/badges.less: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: @font-size-small; 12 | font-weight: @badge-font-weight; 13 | color: @badge-color; 14 | line-height: @badge-line-height; 15 | vertical-align: middle; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: @badge-bg; 19 | border-radius: @badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | 26 | // Quick fix for badges in buttons 27 | .btn & { 28 | position: relative; 29 | top: -1px; 30 | } 31 | 32 | .btn-xs &, 33 | .btn-group-xs > .btn & { 34 | top: 0; 35 | padding: 1px 5px; 36 | } 37 | 38 | // Hover state, but only for links 39 | a& { 40 | &:hover, 41 | &:focus { 42 | color: @badge-link-hover-color; 43 | text-decoration: none; 44 | cursor: pointer; 45 | } 46 | } 47 | 48 | // Account for badges in navs 49 | .list-group-item.active > &, 50 | .nav-pills > .active > a > & { 51 | color: @badge-active-color; 52 | background-color: @badge-active-bg; 53 | } 54 | 55 | .list-group-item > & { 56 | float: right; 57 | } 58 | 59 | .list-group-item > & + & { 60 | margin-right: 5px; 61 | } 62 | 63 | .nav-pills > li > a > & { 64 | margin-left: 3px; 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/bootstrap.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Bootstrap v3.3.7 (http://getbootstrap.com) 3 | * Copyright 2011-2016 Twitter, Inc. 4 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 5 | */ 6 | 7 | // Core variables and mixins 8 | @import "variables.less"; 9 | @import "mixins.less"; 10 | 11 | // Reset and dependencies 12 | @import "normalize.less"; 13 | @import "print.less"; 14 | @import "glyphicons.less"; 15 | 16 | // Core CSS 17 | @import "scaffolding.less"; 18 | @import "type.less"; 19 | @import "code.less"; 20 | @import "grid.less"; 21 | @import "tables.less"; 22 | @import "forms.less"; 23 | @import "buttons.less"; 24 | 25 | // Components 26 | @import "component-animations.less"; 27 | @import "dropdowns.less"; 28 | @import "button-groups.less"; 29 | @import "input-groups.less"; 30 | @import "navs.less"; 31 | @import "navbar.less"; 32 | @import "breadcrumbs.less"; 33 | @import "pagination.less"; 34 | @import "pager.less"; 35 | @import "labels.less"; 36 | @import "badges.less"; 37 | @import "jumbotron.less"; 38 | @import "thumbnails.less"; 39 | @import "alerts.less"; 40 | @import "progress-bars.less"; 41 | @import "media.less"; 42 | @import "list-group.less"; 43 | @import "panels.less"; 44 | @import "responsive-embed.less"; 45 | @import "wells.less"; 46 | @import "close.less"; 47 | 48 | // Components w/ JavaScript 49 | @import "modals.less"; 50 | @import "tooltip.less"; 51 | @import "popovers.less"; 52 | @import "carousel.less"; 53 | 54 | // Utility classes 55 | @import "utilities.less"; 56 | @import "responsive-utilities.less"; 57 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: @breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: @breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: (@font-size-base * 1.5); 9 | font-weight: @close-font-weight; 10 | line-height: 1; 11 | color: @close-color; 12 | text-shadow: @close-text-shadow; 13 | .opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: @close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | .opacity(.5); 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | // See https://developer.mozilla.org/en-US/docs/Web/Events/click#Safari_Mobile 27 | button& { 28 | padding: 0; 29 | cursor: pointer; 30 | background: transparent; 31 | border: 0; 32 | -webkit-appearance: none; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/code.less: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and block) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | kbd, 9 | pre, 10 | samp { 11 | font-family: @font-family-monospace; 12 | } 13 | 14 | // Inline code 15 | code { 16 | padding: 2px 4px; 17 | font-size: 90%; 18 | color: @code-color; 19 | background-color: @code-bg; 20 | border-radius: @border-radius-base; 21 | } 22 | 23 | // User input typically entered via keyboard 24 | kbd { 25 | padding: 2px 4px; 26 | font-size: 90%; 27 | color: @kbd-color; 28 | background-color: @kbd-bg; 29 | border-radius: @border-radius-small; 30 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); 31 | 32 | kbd { 33 | padding: 0; 34 | font-size: 100%; 35 | font-weight: bold; 36 | box-shadow: none; 37 | } 38 | } 39 | 40 | // Blocks of code 41 | pre { 42 | display: block; 43 | padding: ((@line-height-computed - 1) / 2); 44 | margin: 0 0 (@line-height-computed / 2); 45 | font-size: (@font-size-base - 1); // 14px to 13px 46 | line-height: @line-height-base; 47 | word-break: break-all; 48 | word-wrap: break-word; 49 | color: @pre-color; 50 | background-color: @pre-bg; 51 | border: 1px solid @pre-border-color; 52 | border-radius: @border-radius-base; 53 | 54 | // Account for some code outputs that place code tags in pre tags 55 | code { 56 | padding: 0; 57 | font-size: inherit; 58 | color: inherit; 59 | white-space: pre-wrap; 60 | background-color: transparent; 61 | border-radius: 0; 62 | } 63 | } 64 | 65 | // Enable scrollable blocks of code 66 | .pre-scrollable { 67 | max-height: @pre-scrollable-max-height; 68 | overflow-y: scroll; 69 | } 70 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/component-animations.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | .transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | 21 | &.in { display: block; } 22 | tr&.in { display: table-row; } 23 | tbody&.in { display: table-row-group; } 24 | } 25 | 26 | .collapsing { 27 | position: relative; 28 | height: 0; 29 | overflow: hidden; 30 | .transition-property(~"height, visibility"); 31 | .transition-duration(.35s); 32 | .transition-timing-function(ease); 33 | } 34 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Grid system 3 | // -------------------------------------------------- 4 | 5 | 6 | // Container widths 7 | // 8 | // Set the container width, and override it for fixed navbars in media queries. 9 | 10 | .container { 11 | .container-fixed(); 12 | 13 | @media (min-width: @screen-sm-min) { 14 | width: @container-sm; 15 | } 16 | @media (min-width: @screen-md-min) { 17 | width: @container-md; 18 | } 19 | @media (min-width: @screen-lg-min) { 20 | width: @container-lg; 21 | } 22 | } 23 | 24 | 25 | // Fluid container 26 | // 27 | // Utilizes the mixin meant for fixed width containers, but without any defined 28 | // width for fluid, full width layouts. 29 | 30 | .container-fluid { 31 | .container-fixed(); 32 | } 33 | 34 | 35 | // Row 36 | // 37 | // Rows contain and clear the floats of your columns. 38 | 39 | .row { 40 | .make-row(); 41 | } 42 | 43 | 44 | // Columns 45 | // 46 | // Common styles for small and large grid columns 47 | 48 | .make-grid-columns(); 49 | 50 | 51 | // Extra small grid 52 | // 53 | // Columns, offsets, pushes, and pulls for extra small devices like 54 | // smartphones. 55 | 56 | .make-grid(xs); 57 | 58 | 59 | // Small grid 60 | // 61 | // Columns, offsets, pushes, and pulls for the small device range, from phones 62 | // to tablets. 63 | 64 | @media (min-width: @screen-sm-min) { 65 | .make-grid(sm); 66 | } 67 | 68 | 69 | // Medium grid 70 | // 71 | // Columns, offsets, pushes, and pulls for the desktop device range. 72 | 73 | @media (min-width: @screen-md-min) { 74 | .make-grid(md); 75 | } 76 | 77 | 78 | // Large grid 79 | // 80 | // Columns, offsets, pushes, and pulls for the large desktop device range. 81 | 82 | @media (min-width: @screen-lg-min) { 83 | .make-grid(lg); 84 | } 85 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/jumbotron.less: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding-top: @jumbotron-padding; 8 | padding-bottom: @jumbotron-padding; 9 | margin-bottom: @jumbotron-padding; 10 | color: @jumbotron-color; 11 | background-color: @jumbotron-bg; 12 | 13 | h1, 14 | .h1 { 15 | color: @jumbotron-heading-color; 16 | } 17 | 18 | p { 19 | margin-bottom: (@jumbotron-padding / 2); 20 | font-size: @jumbotron-font-size; 21 | font-weight: 200; 22 | } 23 | 24 | > hr { 25 | border-top-color: darken(@jumbotron-bg, 10%); 26 | } 27 | 28 | .container &, 29 | .container-fluid & { 30 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container 31 | padding-left: (@grid-gutter-width / 2); 32 | padding-right: (@grid-gutter-width / 2); 33 | } 34 | 35 | .container { 36 | max-width: 100%; 37 | } 38 | 39 | @media screen and (min-width: @screen-sm-min) { 40 | padding-top: (@jumbotron-padding * 1.6); 41 | padding-bottom: (@jumbotron-padding * 1.6); 42 | 43 | .container &, 44 | .container-fluid & { 45 | padding-left: (@jumbotron-padding * 2); 46 | padding-right: (@jumbotron-padding * 2); 47 | } 48 | 49 | h1, 50 | .h1 { 51 | font-size: @jumbotron-heading-font-size; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/labels.less: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 75%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: @label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // Add hover effects, but only for links 18 | a& { 19 | &:hover, 20 | &:focus { 21 | color: @label-link-hover-color; 22 | text-decoration: none; 23 | cursor: pointer; 24 | } 25 | } 26 | 27 | // Empty labels collapse automatically (not available in IE8) 28 | &:empty { 29 | display: none; 30 | } 31 | 32 | // Quick fix for labels in buttons 33 | .btn & { 34 | position: relative; 35 | top: -1px; 36 | } 37 | } 38 | 39 | // Colors 40 | // Contextual variations (linked labels get darker on :hover) 41 | 42 | .label-default { 43 | .label-variant(@label-default-bg); 44 | } 45 | 46 | .label-primary { 47 | .label-variant(@label-primary-bg); 48 | } 49 | 50 | .label-success { 51 | .label-variant(@label-success-bg); 52 | } 53 | 54 | .label-info { 55 | .label-variant(@label-info-bg); 56 | } 57 | 58 | .label-warning { 59 | .label-variant(@label-warning-bg); 60 | } 61 | 62 | .label-danger { 63 | .label-variant(@label-danger-bg); 64 | } 65 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/media.less: -------------------------------------------------------------------------------- 1 | .media { 2 | // Proper spacing between instances of .media 3 | margin-top: 15px; 4 | 5 | &:first-child { 6 | margin-top: 0; 7 | } 8 | } 9 | 10 | .media, 11 | .media-body { 12 | zoom: 1; 13 | overflow: hidden; 14 | } 15 | 16 | .media-body { 17 | width: 10000px; 18 | } 19 | 20 | .media-object { 21 | display: block; 22 | 23 | // Fix collapse in webkit from max-width: 100% and display: table-cell. 24 | &.img-thumbnail { 25 | max-width: none; 26 | } 27 | } 28 | 29 | .media-right, 30 | .media > .pull-right { 31 | padding-left: 10px; 32 | } 33 | 34 | .media-left, 35 | .media > .pull-left { 36 | padding-right: 10px; 37 | } 38 | 39 | .media-left, 40 | .media-right, 41 | .media-body { 42 | display: table-cell; 43 | vertical-align: top; 44 | } 45 | 46 | .media-middle { 47 | vertical-align: middle; 48 | } 49 | 50 | .media-bottom { 51 | vertical-align: bottom; 52 | } 53 | 54 | // Reset margins on headings for tighter default spacing 55 | .media-heading { 56 | margin-top: 0; 57 | margin-bottom: 5px; 58 | } 59 | 60 | // Media list variation 61 | // 62 | // Undo default ul/ol styles 63 | .media-list { 64 | padding-left: 0; 65 | list-style: none; 66 | } 67 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------------------------------- 3 | 4 | // Utilities 5 | @import "mixins/hide-text.less"; 6 | @import "mixins/opacity.less"; 7 | @import "mixins/image.less"; 8 | @import "mixins/labels.less"; 9 | @import "mixins/reset-filter.less"; 10 | @import "mixins/resize.less"; 11 | @import "mixins/responsive-visibility.less"; 12 | @import "mixins/size.less"; 13 | @import "mixins/tab-focus.less"; 14 | @import "mixins/reset-text.less"; 15 | @import "mixins/text-emphasis.less"; 16 | @import "mixins/text-overflow.less"; 17 | @import "mixins/vendor-prefixes.less"; 18 | 19 | // Components 20 | @import "mixins/alerts.less"; 21 | @import "mixins/buttons.less"; 22 | @import "mixins/panels.less"; 23 | @import "mixins/pagination.less"; 24 | @import "mixins/list-group.less"; 25 | @import "mixins/nav-divider.less"; 26 | @import "mixins/forms.less"; 27 | @import "mixins/progress-bar.less"; 28 | @import "mixins/table-row.less"; 29 | 30 | // Skins 31 | @import "mixins/background-variant.less"; 32 | @import "mixins/border-radius.less"; 33 | @import "mixins/gradients.less"; 34 | 35 | // Layout 36 | @import "mixins/clearfix.less"; 37 | @import "mixins/center-block.less"; 38 | @import "mixins/nav-vertical-align.less"; 39 | @import "mixins/grid-framework.less"; 40 | @import "mixins/grid.less"; 41 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/mixins/alerts.less: -------------------------------------------------------------------------------- 1 | // Alerts 2 | 3 | .alert-variant(@background; @border; @text-color) { 4 | background-color: @background; 5 | border-color: @border; 6 | color: @text-color; 7 | 8 | hr { 9 | border-top-color: darken(@border, 5%); 10 | } 11 | .alert-link { 12 | color: darken(@text-color, 10%); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/mixins/background-variant.less: -------------------------------------------------------------------------------- 1 | // Contextual backgrounds 2 | 3 | .bg-variant(@color) { 4 | background-color: @color; 5 | a&:hover, 6 | a&:focus { 7 | background-color: darken(@color, 10%); 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/mixins/border-radius.less: -------------------------------------------------------------------------------- 1 | // Single side border-radius 2 | 3 | .border-top-radius(@radius) { 4 | border-top-right-radius: @radius; 5 | border-top-left-radius: @radius; 6 | } 7 | .border-right-radius(@radius) { 8 | border-bottom-right-radius: @radius; 9 | border-top-right-radius: @radius; 10 | } 11 | .border-bottom-radius(@radius) { 12 | border-bottom-right-radius: @radius; 13 | border-bottom-left-radius: @radius; 14 | } 15 | .border-left-radius(@radius) { 16 | border-bottom-left-radius: @radius; 17 | border-top-left-radius: @radius; 18 | } 19 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/mixins/buttons.less: -------------------------------------------------------------------------------- 1 | // Button variants 2 | // 3 | // Easily pump out default styles, as well as :hover, :focus, :active, 4 | // and disabled options for all buttons 5 | 6 | .button-variant(@color; @background; @border) { 7 | color: @color; 8 | background-color: @background; 9 | border-color: @border; 10 | 11 | &:focus, 12 | &.focus { 13 | color: @color; 14 | background-color: darken(@background, 10%); 15 | border-color: darken(@border, 25%); 16 | } 17 | &:hover { 18 | color: @color; 19 | background-color: darken(@background, 10%); 20 | border-color: darken(@border, 12%); 21 | } 22 | &:active, 23 | &.active, 24 | .open > .dropdown-toggle& { 25 | color: @color; 26 | background-color: darken(@background, 10%); 27 | border-color: darken(@border, 12%); 28 | 29 | &:hover, 30 | &:focus, 31 | &.focus { 32 | color: @color; 33 | background-color: darken(@background, 17%); 34 | border-color: darken(@border, 25%); 35 | } 36 | } 37 | &:active, 38 | &.active, 39 | .open > .dropdown-toggle& { 40 | background-image: none; 41 | } 42 | &.disabled, 43 | &[disabled], 44 | fieldset[disabled] & { 45 | &:hover, 46 | &:focus, 47 | &.focus { 48 | background-color: @background; 49 | border-color: @border; 50 | } 51 | } 52 | 53 | .badge { 54 | color: @background; 55 | background-color: @color; 56 | } 57 | } 58 | 59 | // Button sizes 60 | .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { 61 | padding: @padding-vertical @padding-horizontal; 62 | font-size: @font-size; 63 | line-height: @line-height; 64 | border-radius: @border-radius; 65 | } 66 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/mixins/center-block.less: -------------------------------------------------------------------------------- 1 | // Center-align a block level element 2 | 3 | .center-block() { 4 | display: block; 5 | margin-left: auto; 6 | margin-right: auto; 7 | } 8 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/mixins/clearfix.less: -------------------------------------------------------------------------------- 1 | // Clearfix 2 | // 3 | // For modern browsers 4 | // 1. The space content is one way to avoid an Opera bug when the 5 | // contenteditable attribute is included anywhere else in the document. 6 | // Otherwise it causes space to appear at the top and bottom of elements 7 | // that are clearfixed. 8 | // 2. The use of `table` rather than `block` is only necessary if using 9 | // `:before` to contain the top-margins of child elements. 10 | // 11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/ 12 | 13 | .clearfix() { 14 | &:before, 15 | &:after { 16 | content: " "; // 1 17 | display: table; // 2 18 | } 19 | &:after { 20 | clear: both; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /SourceProject/server-tool/resource/bower_components/bootstrap/less/mixins/forms.less: -------------------------------------------------------------------------------- 1 | // Form validation states 2 | // 3 | // Used in forms.less to generate the form validation CSS for warnings, errors, 4 | // and successes. 5 | 6 | .form-control-validation(@text-color: #555; @border-color: #ccc; @background-color: #f5f5f5) { 7 | // Color the label and help text 8 | .help-block, 9 | .control-label, 10 | .radio, 11 | .checkbox, 12 | .radio-inline, 13 | .checkbox-inline, 14 | &.radio label, 15 | &.checkbox label, 16 | &.radio-inline label, 17 | &.checkbox-inline label { 18 | color: @text-color; 19 | } 20 | // Set the border and box shadow on specific inputs to match 21 | .form-control { 22 | border-color: @border-color; 23 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.075)); // Redeclare so transitions work 24 | &:focus { 25 | border-color: darken(@border-color, 10%); 26 | @shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 6px lighten(@border-color, 20%); 27 | .box-shadow(@shadow); 28 | } 29 | } 30 | // Set validation states also for addons 31 | .input-group-addon { 32 | color: @text-color; 33 | border-color: @border-color; 34 | background-color: @background-color; 35 | } 36 | // Optional feedback icon 37 | .form-control-feedback { 38 | color: @text-color; 39 | } 40 | } 41 | 42 | 43 | // Form control focus state 44 | // 45 | // Generate a customized focus state and for any input with the specified color, 46 | // which defaults to the `@input-border-focus` variable. 47 | // 48 | // We highly encourage you to not customize the default value, but instead use 49 | // this to tweak colors on an as-needed basis. This aesthetic change is based on 50 | // WebKit's default styles, but applicable to a wider range of browsers. Its 51 | // usability and accessibility should be taken into account with any change. 52 | // 53 | // Example usage: change the default blue border and shadow to white for better 54 | // contrast against a dark gray background. 55 | .form-control-focus(@color: @input-border-focus) { 56 | @color-rgba: rgba(red(@color), green(@color), blue(@color), .6); 57 | &:focus { 58 | border-color: @color; 59 | outline: 0; 60 | .box-shadow(~"inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px @{color-rgba}"); 61 | } 62 | } 63 | 64 | // Form control sizing 65 | // 66 | // Relative text size, padding, and border-radii changes for form controls. For 67 | // horizontal sizing, wrap controls in the predefined grid classes. `