barriers / 阅读 / 详情

jqurey 遍历 div内的所有input单选复选按钮并判断是否选中?

2023-07-23 09:21:39
共1条回复
LocCloud
js可这样判断是否选中
$(".votesubject").find("input").each(function () {
if ($(this).prop("checked", true)) {
alert($(this).prop("value"))
}
});

也可这样
$("input[name=votetitle]").each(function () {
//if (this.checked) {
// alert($(this).val());
//}
var radios = $(this);
for (i = 0; i < radios.length; i++) {
if (radios[i].checked) {
votenum = parseInt(radios[i].value)+1;
votes += votenum + "@";
ids+=$(this).attr("id")+"@"
ischeck = false;
}
}
});

我需要的功能js方法:

$(window).ready(function () {
$("#tj").click(function () {
//$(".votesubject").find("input").each(function () {
// if ($(this).prop("checked", true)) {
// alert($(this).prop("value"))
// }
// });
var ids = "";
var votes = "";
var votenum;
var ischeck = true;
$("input[name=votetitle]").each(function () {
//if (this.checked) {
// alert($(this).val());
//}
var radios = $(this);
for (i = 0; i < radios.length; i++) {
if (radios[i].checked) {
votenum = parseInt(radios[i].value)+1;
votes += votenum + "@";
ids+=$(this).attr("id")+"@"
ischeck = false;
}
}
});
if (ischeck) {
alert("请勾选选项后再进行提交");
return false;
}
if (!ischeck) {
if (ids.length > 1) {
ids = ids.substring(0, ids.length - 1);
}
if (votes.length > 1) {
votes = votes.substring(0, votes.length - 1);
}
$("#votenum").val(votes);
$("#ids").val(ids);
alert("感谢您的参与。");
$("#form1").submit();
}
});
$("#ck").click(function () {
window.location = "voteview?cid= " + $("#classid").val() + "&id=" + $("#vid").val() + " ";
});
});

附上相关选中的写法
$("[name="checkbox"]").attr("checked",true);//全选
$("[name="checkbox"]").removeAttr("checked");//取消全选

$("#checkbox").attr("checked"); 返回的是checked或者是undefined解决办法
JQ1.6之后,可以通过attr方法去获得属性,通过prop方法去获得特性

$("#cb").attr("tagName"); //undefined
$("#cb").prop("tagName"); //INPUT

相关推荐

Had Paul received six more votes in the last election,he would have been our chairman now.

would have been 改为 would be
2023-07-23 05:46:334

C语言选举代表问题

错误的地方比较多。首先,字符串的存储一个汉字要占两个字节的位置,所以两个汉字就要用了4个字节,另外再加上一个字符串的结束服务,表示两个字的姓名,就需要至少需要五个字符。另外,比较致富串是否相等,应该要使用头文件string.h。下面比较字符串是否相等,要使用其中的字符串比较函数strcmp。具体的程序已经修改完成,并且运行测试通过。#include#include main(){ int i,k; char j[5]; //两个汉字至少要5,三个汉字至少要7 struct person { int votes; char j[5]; } zhang= {0,"张三"},zhao= {0,"赵六"},wang= {0,"王二"},li= {0,"李四"},liu= {0,"刘五"}; for(i=1;; i++) { printf("请输入支持人的姓名,结束请输入## "); scanf("%s",j); if(strcmp(j,zhang.j)==0) zhang.votes++; if(strcmp(j,wang.j)==0) wang.votes++; if(strcmp(j,zhao.j)==0) zhao.votes++; if(strcmp(j,liu.j)==0) liu.votes++; if(strcmp(j,li.j)==0) li.votes++; if(strcmp(j,"##")==0) { break; } } printf("1 %s %d ",zhang.j,zhang.votes); printf("2 %s %d ",wang.j,wang.votes); printf("3 %s %d ",zhao.j,zhao.votes); printf("4 %s %d ",liu.j,liu.votes); printf("5 %s %d ",li.j,li.votes);}
2023-07-23 05:46:481

用java做一个简单的投票系统,有三名表演者,代号,1.2.3。观众依次投票,已数字0结束,然后还

import java.io.BufferedReader;import java.io.InputStreamReader;public class Vote {public static void main(String args[]) {try {String[] persons = new String[]{"1","2","3"};Integer[] votes = new Integer[]{0,0,0};BufferedReader sin = new BufferedReader(new InputStreamReader(System.in));String readline;System.out.println("================投票开始===============");System.out.println("请按1,2,3投票,Enter确认");System.out.println("按0-->Enter结束投票,公布结果 ");readline = sin.readLine(); // 从系统标准输入读入一字符串while (!readline.equals("0")) {String voteStr = readline;if(persons[0].equals(voteStr)){votes[0] +=1;}else if(persons[1].equals(voteStr)){votes[1] +=1;}else if(persons[2].equals(voteStr)){votes[2] +=1;}else{System.out.println("无效的投票!");}readline = sin.readLine(); // 从系统标准输入读入一字符串} // 继续循环System.out.println("================投票结束===============");System.out.println("================结果公布===============");System.out.println(persons[0]+"================"+persons[1]+"==============="+persons[2]);System.out.println(votes[0]+"================"+votes[1]+"==============="+votes[2]);} catch (Exception e) {System.out.println("Error" + e); // 出错,则打印出错信息}}}
2023-07-23 05:47:121

这个c语言程序怎么改???if(strcmp(na,can[i].name)==0)这个是错的吗???

strcmp是c的库函数,功能是把()中的形参指针指向的字符串比较一下,按对应字符的ascii码大小确定返回值:前者大于后者时返回1,相等时返回0,前者小于后者时返回-1。strcmp(name,eng[i].name)的意思就是比较name和eng[i].name指向的字符串谁大谁小或相等。
2023-07-23 05:47:312

英语翻译: 我们将要选取10个幸运观众,然后从他们当中发起投票,获得最多选票的两个人将获胜

We will pick out ten lucky audiences and then initiate a vote among them, the two lucky audiences with highest votes would be the winners.
2023-07-23 05:47:395

java servlet写投票系统,用数据库统计票数问题

对,1L说了。
2023-07-23 05:47:532

豆瓣和imdb的评分哪个专业点

简单的说imdb更具有客观性,豆瓣更适合国人的口味,时光网评分普遍偏高不具有参考价值。我觉得这么问,目的在于这个评分是否对于我们有参考价值,是否能影响我们买票走进电影院,所以我觉得需要从几个方面来看待这个问题。首先,votes。imdb分数并不能完全反映电影的水平,同时需要考虑vote数,比如>1000 votes或者>2000 votes。有些片分高,但是votes数很少,这样就没有参考价值,一般超过1w的votes就能正确反映片子的水平了。这个到豆瓣上同样适用,基数越大,分数越具有参考价值。另外亚洲的片子在imdb上普遍votes太少,基本上不具有参考价值,亚洲的电影还是参考国内的评分比较好。其次,地域文化差异的问题。众所周知,由于天朝的GFW,国内用户是没办法直接访问imdb的,需要翻墙或者把域名改成ip地址。因此imdb的评分大部分只代表了欧美用户的口味,并不一定适合于国人的口味。有很多片子在国外评价很差票房很烂,国内引进却能获得不错的票房和口碑。上段说到亚洲电影普通votes太少,也是欧美大众很少有机会接触到亚洲的电影,华语电影就更难了,很多日韩港片几乎没有imdb链接,因此这些imdb的评分完全不具有参考价值。再次,评分机制。imdb的评分是可以选1--10分的,而豆瓣只能选1到5星,这种差异也会造成不同分数的差异,比如我在imdb上很少给片子10分的,因为我认为很少有一部电影能够达到10分,往往很不错的我就给9分了,而在豆瓣上5星表示力荐,9分的电影我觉得已经足够力荐所以我当然会给5星。这也是分数有差别的一个原因。普遍来说,一部公认的好片在豆瓣上分还是会高一点的。次次,在imdb上,会有刷分的问题。就是说top50,top10的电影是相对固定的,每年顶多1到2部电影能进入到top50里面,而top10的电影也是有一批固定的粉丝的,他们对于自己喜欢的电影是无法忍受被其他新进来的电影刷下去的。比如当初TDK被粉丝们刷到TOP1的时候,肖申克救赎的影迷和教父的影迷就无法忍受了,于是刷分就开始,把后两部评分往上刷把TDK往下刷,最终TDK的评分在8.9,No.8。所以一般一部电影上映之后1年分数和排名才会较为稳定。最后,说到底电影的评价完全在个人。一百个人眼中有一百个哈姆雷特,这和你自己的口味以及人生阅历是有关系的,分数只是一个简单的参考,只是影响你买票走进电影院的一个因素而已。很多动作片分不高6分,但是也可以一看;有些文艺片7分,也不一定看的很舒服;有些片快8分了你也不一定能看懂。也有很多人看片只要是大片就看,也有人只要有自己喜欢的明星就行,也有人只喜欢看某种类型的片。当然,如果你只是一位为了没事放松自己进电影院看一部电影的话,我觉得你可以综合imdb和豆瓣的评分来决定是否要买票进入电影院。
2023-07-23 05:48:191

篮球运动员英文

basketballplayer
2023-07-23 05:48:304

英语强人帮我翻译下这段文字了.先谢谢了

有一个不同的问题有关的现任署长提名谁不能赢得选举。根据所谓的缓缴规则,失去现任署长提名继续担任董事职位,直至取代,除非这类现任董事辞职。因此,实施多数表决将影响甚微,没有变更为缓缴规则。但是, 简单地消除缓缴规则将导致在该问题上面列出。 累积投票应有别于多元性和多数表决。而多元性和多数表决涉及到的门槛要求,为打赢主任选举,累积投票涉及到的选票数目1 股东可投在选举中。与累积投票,每一股进行很多票由于有空缺有待填补,和股东可能会分发选票,为所有该等股份之间的主任被提名人以任何方式想要的。 累积投票是普遍旨在促进少数股东的影响力,在这方面的大股东或股东集团是不放心,能够填补每名董事席位与自己的提名。某些倡议者大多数投票的标准认为应该有一个雕刻出-让多数投票-公司有累积投票。 累积投票制是不是一个新概念,在美国。累积投票长期以来一直使用的美国的公司,以此确保少数股东权益是听取和代表嘿嘿!电脑翻译的 不太准确
2023-07-23 05:49:091

寻IMDB评分的详细资料,他的权威性如何?

1楼已经很详细了~
2023-07-23 05:49:241

错误 1 无法将类型“int?”隐式转换为“int”。存在一个显式转换(是否缺少强制转换?)

var votes = (from v in db.VoteItem where v.TitleID == (Int32)Parse(Request.QueryString["titleid"].ToString()) select v.ItemCount).Sum();
2023-07-23 05:49:322

The outcome of the election was announce before all of the votes had been counted. 语法问题

The outcome of the election was announce before all of the votes had been counted.这里announce是名词, before all the votes是announce的介词短语做定语,修饰名词announce。announce before all of the votes had been counted.是一个完整的表语从句。
2023-07-23 05:49:391

statutory voting system到底是什么样的投票方式?

What is "Statutory Voting"Statutory voting is a corporate voting procedure in which each shareholder is entitled to one vote per share and votes must be divided evenly among the candidates or issues being voted on. Statutory voting, sometimes known as straight voting, is one of two stockholder voting procedures and the more common option. In statutory voting, if you owned 50 shares and were voting on six board positions, you could cast 50 votes for each board member, for a total of 300 votes. You could not cast 20 votes for each of five board members and 200 for the sixth.
2023-07-23 05:49:482

投票英语怎么说

"我已经投票了"英语怎么翻译 我已经投票了 I have already voted 投票给我 英语怎么说 1 Remember to vote for me 2 I remember to cast 5 votes/Please remember to vote for him 3 I need 5 tickets, can monitor the election 4 Do you know how many people voted for you? 5 Have you got how many tickets? 6 Y耽u cannot vote。 下面的以后的明天或后天 投票英语怎么说 vote 投票数用英语怎么说 Votes 投票用英语怎么说 投票这个词语属于一般现在时,应该是:voteding “投票”的英文怎么写? vote 投票赞成某人 / 投票 反对某人 英语 1 支持和反对 支持support; stand by 反对opposite 投票支持xx: vote for xx 投票反对xx: vote against xx 2 我属虎 I was born in the year of tiger. I was born in the tiger year in China. I was born in xx俯x, it was a tiger year in Chinese horoscope. horoscope 星相学 希望回答对你有帮助
2023-07-23 05:50:331

这道题什么意思,怎么做?

1, 4000x30%=1200 votes (票)2,20%未决定的人,即有:4000x20%=800 votes3,这800人中,按3:5分配,即:8分之3投给A,8分之5投给B4, 所以投给A的就是:800x3/8=300 votes3,所以A得最后得票是:1200+300=1500 votes答案是:B
2023-07-23 05:50:421

IMDB评分是什么意思呀?

imdb就是环球电影数据库的英文首字母缩写www.imdb.com就是它的官方网站,如果英文还可以的话,可以自己去看看
2023-07-23 05:50:524

Here is a message to every man and woman _____ A who voe B who votes 选那个,为啥?

应该选择B,因为前面的先行词被every所修饰,所以主语应该被看作是第三人称单数
2023-07-23 05:51:111

《机动部队》系列电影的顺序?

除了第一部和同胞是连得可以看,其余的劝你别看很恶心,粗制滥造的山寨版
2023-07-23 05:51:285

求一篇有关环境的英语新闻报道,其中有对话采访!

Britain Enters Final Day of Campaigning Before ElectionsBritain"s top party leaders are taking full advantage of their last day of campaigning before Britons go to the polls. Late Wednesday night, Labor leader Gordon Brown visited steel workers on an overnight shift. "I don"t need to tell you that this election is about the future," said Brown. "It"s about the future of our industry, the future of our jobs, the future of our young people." Mr. Brown is facing a tight election. The Conservative Party, led by David Cameron, has topped the latest opinion polls. And, the Liberal Democrats -- traditionally a marginalized party in what has largely been a two-party system -- are scoring high in opinion polls.Rodney Barker is a political academic and professor at the London School of Economics. "The three candidates have been up to making themselves as busy as possible," explained Barker. "David Cameron, the Conservative leader, so visible that he"s even worked through the night -- he hasn"t slept."Barker says this last day of campaigning is crucial, because so many Britons still have not made up their mind. A survey published by the research group ComRes Tuesday said 2.5 million people who say they are certain to vote say they are still undecided who to vote for and more than a third of voters said it was "quite possible" they would change their mind on who to vote for by the time the polls open Thursday morning. Rodney Barker says it is all up in the air."The one thing which one can say about this election -- and we haven"t been able to say this for any election within living memory -- is that the only certain thing is that we cannot predict the outcome, even on the day before the poll," added Barker.The ComRes poll shows the Conservatives winning 37 percent of votes, Labor on 29 percent and the Liberal Democrats on 26 percent.With the votes split this way, no single party would win a majority of seats in parliament. In that case, the shape of Britain"s future government will depend on coalitions. The balance is likely to be tipped by the Liberal Democrats, but so far their leader, Nick Clegg, has refused to say whether his party would side with the Conservatives or Labor. Barker says what this means is that it could be weeks before the composition of Britain"s future government becomes clear. "Even when we know the result of the election, we may not know what the result is in terms of government -- who will successfully make a deal with who to make what sort of government," noted Barker.If no single party is able to win a majority of parliament seats, current Prime Minister Gordon Brown would have the right to stay in office until a new government can be formed.
2023-07-23 05:52:081

The suggestion he put forward was adopted with 16 votes _____ and 15 against it.

答案A 试题分析:短语辨析。A支持,赞成;B回应;C纪念…;D关于;句意:他在会议上提出的建议有16票支持,15票反对。故A正确。 考点:考查短语辨析。 点评:本题的短语都是与介词In连用的,要在上下文语境中加以辨析,在平时加强识记。 查看原帖>>
2023-07-23 05:52:151

请问各位英语高手

We must accept finite disappointment, but we must never lose infinite hope.
2023-07-23 05:52:341

简单多数/绝对多数 用英语怎么说?

the most
2023-07-23 05:52:443

many candidates for parliament were afraid to support abolition______they should lose votes。

意为:国会议员都不敢支持废奴议案唯恐失去选票。lest为唯恐、以免、担心。选because意思就不对了。
2023-07-23 05:52:522

求一部美国经典的电影,就是一个富商生日,他弟弟送他一个生日礼物,就是找人杀他.......

剧情不错 我也想看看那个说致命游戏 我看过的一个叫致命游戏的怎么不是这剧情啊 我看致命游戏是 角色在游戏中怎么牺牲的 现实中也那么牺牲
2023-07-23 05:53:021

IMDb权威认证是什么

IMDB 基于网友的个性海量评分,其核心排名算法如下: The formula for calculating the Top Rated 250 Titles gives a true Bayesian estimate:   weighted rating (WR) = (v ÷ (v+m)) × R + (m ÷ (v+m)) × C      where:   R = average for the movie (mean) = (Rating)   v = number of votes for the movie = (votes)   m = minimum votes required to be listed in the Top 250 (currently 3000)   C = the mean vote across the whole report (currently 6.9)      for the Top 250, only votes from regular voters are considered.http://movie.douban.com/doulist/1518184/如果有兴趣可收藏此豆列,录有最新的IMDB TOP250
2023-07-23 05:53:371

如何查询一部电影在IMDB中的具体排名?

环球电影资料库里有,几乎所有的电影资料都能在上面找到.也有IMDB排名.参考资料:http://www.mov6.com/IMDB评分方法IMDB是目前全球互联网中最大的一个电影资料库,里面包括了几乎所有的电影,以及1982年以后的电视剧集。IMDB的资料中包括了影片的众多信息,演员,片长,内容介绍,分级,评论等,就个人买碟而言,很大程度上也是参考IMDB的得分。而IMDB的得分又是如何来的呢?它的可靠性又有多少呢?让我们通过《魔戒1:护戒使者》来做具体分析吧,先看上图:这张图就是魔戒1的所有评分者的分数的一个条状统计图。从中我们可以看到各个分数段的大致比例,比如这儿就可以发现,超过一半的人是打满分的。根据IMDB网站上公布的TOP250评分标准:imdb top 250用的是贝叶斯统计的算法得出的加权分(Weighted Rank-WR),公式如下:weighted rank (WR) = (v ÷ (v+m)) × R + (m ÷ (v+m)) × C其中:R = average for the movie (mean) = (Rating)(是用普通的方法计算出的平均分)v = number of votes for the movie = (votes)(投票人数,需要注意的是,只有经常投票者才会被计算在内,这个下面详细解释)m = minimum votes required to be listed in the top 250 (currently 1250)(进入imdb top 250需要的最小票数,只有三两个人投票的电影就算得满分也没用的)C = the mean vote across the whole report (currently 6.9)(目前所有电影的平均得分)另外重点来了,根据这个注释:note: for this top 250, only votes from regular voters are considered.只有‘regular voters‘的投票才会被计算在IMDB top 250之内,这就是IMDB防御因为某种电影的fans拉票而影响 top 250结果,把top 250尽量限制在资深影迷投票范围内的主要方法。regular voter的标准不详,估计至少是“投票电影超过xxx 部以上”这样的水平,搞不好还会加上投票的时间分布,为支持自己的心爱电影一天内给N百部电影投票估计也不行。因此,细心的人可以注意到,列入IMDB top 250的电影,其主页面上的分数与250列表中的分数是不同的。以魔戒1为例,它在自己的页面[url]http://www.imdb.com/title/tt0120737/[/url]中的分数是8.8,而列表中是8.7。一般 250表中的得分都会低于自己页面中的得分,越是娱乐片差距越大。这大概是因为regular voter对于电影的要求通常较高的关系。
2023-07-23 05:53:451

不少好莱坞动画电影的豆瓣评分远高于imdb评分,是什么原因导致了这一情况?

水军多吧
2023-07-23 05:53:533

求一篇JAMES在NBA获得MVP的英文介绍?

JAMES NBA regular season MVP awardThe NBA regular season individual awards season, the highest honor - the most valuable player (MVP) yesterday go in the "Little Emperor" James name. In this way, the Cavaliers headed into NBA players in the history of the tenth player award in consecutive seasons. Earlier in the award selection, a total of nine players for two consecutive seasons was crowned the regular season MVP. They are superstars Russell, Wilt Chamberlain, Kareem Abdul-Jabbar, Malone, Bird, "Magic" Johnson, Michael Jordan, Tim Duncan and Steve Nash, of which Russell, Chamberlain and Bird superior, had three consecutive seasons of "value the highest. " The same day, James"s University in his hometown of Akron received the blessing of more than 3000 fans. Career when he won the second MVP trophy, the right high school teammates, coaches and his mother, thanked his girlfriend, and finally he invited, including O"Neill, Williams and other Cavaliers teammates came to power, and his share the joy of winning. "My name can be carved on this trophy," James said, "but they paid a lot of teammates." In this season"s regular season, James field team contributions are 29.7 points, 7.3 rebounds, 8.6 assists. In the James led the Cavaliers in the record, following last season ranked full league standings after the first, with 61 wins this season ranks all 21 league negative to the first. James made the selection in a landslide victory, winning total of 123 media workers from the United States and Canada and 116 in the hands of global fans first-place votes, total points over 1205 points. The poll is the second integral thunder team Durant (4 first-place votes), while the Lakers Kobe Bryant points came in third, but he did not get a first-place votes the judges. Orlando ranked fourth star Howard scored three first-place votes. MVP Award this season, a step towards innovation - the first time fans can be voted MVP. Web site by logging NBA fans, selected from five candidates for their own favorite MVP. However, the sum of all the fans to vote the final vote only in the official vote count a ballot paper. Not surprisingly, James has also gained fans to vote first 中文 来源:新华社
2023-07-23 05:54:121

They were the only men who received votes ______me.

选D,意思是他们是除我之外唯一得到选票的人。
2023-07-23 05:54:211

Had Paul received six more votes in the last election,he would have been our chairman now. 改错

很简单:Had Paul received six more votes in the last election,he would be our chairman now.后一个从句指现在,所以虚拟语气只能用would be,而不是用于过去时的would have been.保证答案正确,请及时采纳.祝学习...
2023-07-23 05:54:281

django项目 makemigrations时出现django.db.migrations.graph.nodenotfounderror错误。

1. 创建项目运行下面命令就可以创建一个 django 项目,项目名称叫 mysite :$ django-admin.py startproject mysite创建后的项目目录如下:mysite├── manage.py└── mysite ├── __init__.py ├── settings.py ├── urls.py └── wsgi.py1 directory, 5 files说明:__init__.py :让 Python 把该目录当成一个开发包 (即一组模块)所需的文件。 这是一个空文件,一般你不需要修改它。manage.py :一种命令行工具,允许你以多种方式与该 Django 项目进行交互。 键入python manage.py help,看一下它能做什么。 你应当不需要编辑这个文件;在这个目录下生成它纯是为了方便。settings.py :该 Django 项目的设置或配置。urls.py:Django项目的URL路由设置。目前,它是空的。wsgi.py:WSGI web 应用服务器的配置文件。更多细节,查看 How to deploy with WSGI接下来,你可以修改 settings.py 文件,例如:修改 LANGUAGE_CODE、设置时区 TIME_ZONESITE_ID = 1LANGUAGE_CODE = "zh_CN"TIME_ZONE = "Asia/Shanghai"USE_TZ = True 上面开启了 [Time zone]() 特性,需要安装 pytz:$ sudo pip install pytz2. 运行项目在运行项目之前,我们需要创建数据库和表结构,这里我使用的默认数据库:$ python manage.py migrateOperations to perform: Apply all migrations: admin, contenttypes, auth, sessionsRunning migrations: Applying contenttypes.0001_initial... OK Applying auth.0001_initial... OK Applying admin.0001_initial... OK Applying sessions.0001_initial... OK然后启动服务:$ python manage.py runserver你会看到下面的输出:Performing system checks...System check identified no issues (0 silenced).January 28, 2015 - 02:08:33Django version 1.7.1, using settings "mysite.settings"Starting development server at Quit the server with CONTROL-C.这将会在端口8000启动一个本地服务器, 并且只能从你的这台电脑连接和访问。 既然服务器已经运行起来了,现在用网页浏览器访问 。你应该可以看到一个令人赏心悦目的淡蓝色 Django 欢迎页面它开始工作了。你也可以指定启动端口:$ python manage.py runserver 8080以及指定 ip:$ python manage.py runserver 0.0.0.0:80003. 创建 app前面创建了一个项目并且成功运行,现在来创建一个 app,一个 app 相当于项目的一个子模块。在项目目录下创建一个 app:$ python manage.py startapp polls如果操作成功,你会在 mysite 文件夹下看到已经多了一个叫 polls 的文件夹,目录结构如下:polls├── __init__.py├── admin.py├── migrations│ └── __init__.py├── models.py├── tests.py└── views.py1 directory, 6 files4. 创建模型每一个 Django Model 都继承自 django.db.models.Model在 Model 当中每一个属性 attribute 都代表一个 database field通过 Django Model API 可以执行数据库的增删改查, 而不需要写一些数据库的查询语句打开 polls 文件夹下的 models.py 文件。创建两个模型:import datetimefrom django.db import modelsfrom django.utils import timezoneclass Question(models.Model): question_text = models.CharField(max_length=200) pub_date = models.DateTimeField("date published") def was_published_recently(self): return self.pub_date >= timezone.now() - datetime.timedelta(days=1)class Choice(models.Model): question = models.ForeignKey(Question) choice_text = models.CharField(max_length=200) votes = models.IntegerField(default=0)然后在 mysite/settings.py 中修改 INSTALLED_APPS 添加 polls:INSTALLED_APPS = ( "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", "polls",)在添加了新的 app 之后,我们需要运行下面命令告诉 Django 你的模型做了改变,需要迁移数据库:$ python manage.py makemigrations polls你会看到下面的输出日志:Migrations for "polls": 0001_initial.py: - Create model Choice - Create model Question - Add field question to choice你可以从 polls/migrations/0001_initial.py 查看迁移语句。运行下面语句,你可以查看迁移的 sql 语句:$ python manage.py sqlmigrate polls 0001输出结果:BEGIN;CREATE TABLE "polls_choice" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "choice_text" varchar(200) NOT NULL, "votes" integer NOT NULL);CREATE TABLE "polls_question" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "question_text" varchar(200) NOT NULL, "pub_date" datetime NOT NULL);CREATE TABLE "polls_choice__new" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "choice_text" varchar(200) NOT NULL, "votes" integer NOT NULL, "question_id" integer NOT NULL REFERENCES "polls_question" ("id"));INSERT INTO "polls_choice__new" ("choice_text", "votes", "id") SELECT "choice_text", "votes", "id" FROM "polls_choice";DROP TABLE "polls_choice";ALTER TABLE "polls_choice__new" RENAME TO "polls_choice";CREATE INDEX polls_choice_7aa0f6ee ON "polls_choice" ("question_id");COMMIT;你可以运行下面命令,来检查数据库是否有问题:$ python manage.py check再次运行下面的命令,来创建新添加的模型:$ python manage.py migrateOperations to perform: Apply all migrations: admin, contenttypes, polls, auth, sessionsRunning migrations: Applying polls.0001_initial... OK总结一下,当修改一个模型时,需要做以下几个步骤:修改 models.py 文件运行 python manage.py makemigrations 创建迁移语句运行 python manage.py migrate,将模型的改变迁移到数据库中你可以阅读 django-admin.py documentation,查看更多 manage.py 的用法。创建了模型之后,我们可以通过 Django 提供的 API 来做测试。运行下面命令可以进入到 python shell 的交互模式:$ python manage.py shell下面是一些测试:>>> from polls.models import Question, Choice # Import the model classes we just wrote.# No questions are in the system yet.>>> Question.objects.all()[]# Create a new Question.# Support for time zones is enabled in the default settings file, so# Django expects a datetime with tzinfo for pub_date. Use timezone.now()# instead of datetime.datetime.now() and it will do the right thing.>>> from django.utils import timezone>>> q = Question(question_text="What"s new?", pub_date=timezone.now())# Save the object into the database. You have to call save() explicitly.>>> q.save()# Now it has an ID. Note that this might say "1L" instead of "1", depending# on which database you"re using. That"s no biggie; it just means your# database backend prefers to return integers as Python long integer# objects.>>> q.id1# Access model field values via Python attributes.>>> q.question_text"What"s new?">>> q.pub_datedatetime.datetime(2012, 2, 26, 13, 0, 0, 775217, tzinfo=<UTC>)# Change values by changing the attributes, then calling save().>>> q.question_text = "What"s up?">>> q.save()# objects.all() displays all the questions in the database.>>> Question.objects.all()[<Question: Question object>]打印所有的 Question 时,输出的结果是 [<Question: Question object>],我们可以修改模型类,使其输出更为易懂的描述。修改模型类:from django.db import modelsclass Question(models.Model): # ... def __str__(self): # __unicode__ on Python 2 return self.question_textclass Choice(models.Model): # ... def __str__(self): # __unicode__ on Python 2 return self.choice_text接下来继续测试:>>> from polls.models import Question, Choice# Make sure our __str__() addition worked.>>> Question.objects.all()[<Question: What"s up?>]# Django provides a rich database lookup API that"s entirely driven by# keyword arguments.>>> Question.objects.filter(id=1)[<Question: What"s up?>]>>> Question.objects.filter(question_text__startswith="What")[<Question: What"s up?>]# Get the question that was published this year.>>> from django.utils import timezone>>> current_year = timezone.now().year>>> Question.objects.get(pub_date__year=current_year)<Question: What"s up?># Request an ID that doesn"t exist, this will raise an exception.>>> Question.objects.get(id=2)Traceback (most recent call last): ...DoesNotExist: Question matching query does not exist.# Lookup by a primary key is the most common case, so Django provides a# shortcut for primary-key exact lookups.# The following is identical to Question.objects.get(id=1).>>> Question.objects.get(pk=1)<Question: What"s up?># Make sure our custom method worked.>>> q = Question.objects.get(pk=1)# Give the Question a couple of Choices. The create call constructs a new# Choice object, does the INSERT statement, adds the choice to the set# of available choices and returns the new Choice object. Django creates# a set to hold the "other side" of a ForeignKey relation# (e.g. a question"s choice) which can be accessed via the API.>>> q = Question.objects.get(pk=1)# Display any choices from the related object set -- none so far.>>> q.choice_set.all()[]# Create three choices.>>> q.choice_set.create(choice_text="Not much", votes=0)<Choice: Not much>>>> q.choice_set.create(choice_text="The sky", votes=0)<Choice: The sky>>>> c = q.choice_set.create(choice_text="Just hacking again", votes=0)# Choice objects have API access to their related Question objects.>>> c.question<Question: What"s up?># And vice versa: Question objects get access to Choice objects.>>> q.choice_set.all()[<Choice: Not much>, <Choice: The sky>, <Choice: Just hacking again>]>>> q.choice_set.count()3# The API automatically follows relationships as far as you need.# Use double underscores to separate relationships.# This works as many levels deep as you want; there"s no limit.# Find all Choices for any question whose pub_date is in this year# (reusing the "current_year" variable we created above).>>> Choice.objects.filter(question__pub_date__year=current_year)[<Choice: Not much>, <Choice: The sky>, <Choice: Just hacking again>]# Let"s delete one of the choices. Use delete() for that.>>> c = q.choice_set.filter(choice_text__startswith="Just hacking")>>> c.delete()>>> 上面这部分测试,涉及到 django orm 相关的知识,详细说明可以参考 Django中的ORM。5. 管理 adminDjango有一个优秀的特性, 内置了Django admin后台管理界面, 方便管理者进行添加和删除网站的内容.新建的项目系统已经为我们设置好了后台管理功能,见 mysite/settings.py:INSTALLED_APPS = ( "django.contrib.admin", #默认添加后台管理功能 "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", "mysite",)同时也已经添加了进入后台管理的 url, 可以在 mysite/urls.py 中查看:url(r"^admin/", include(admin.site.urls)), #可以使用设置好的url进入网站后台接下来我们需要创建一个管理用户来登录 admin 后台管理界面:$ python manage.py createsuperuserUsername (leave blank to use "june"): adminEmail address:Password:Password (again):Superuser created successfully.总结最后,来看项目目录结构:mysite├── db.sqlite3├── manage.py├── mysite│ ├── __init__.py│ ├── settings.py│ ├── urls.py│ ├── wsgi.py├── polls│ ├── __init__.py│ ├── admin.py│ ├── migrations│ │ ├── 0001_initial.py│ │ ├── __init__.py│ ├── models.py│ ├── templates│ │ └── polls│ │ ├── detail.html│ │ ├── index.html│ │ └── results.html│ ├── tests.py│ ├── urls.py│ ├── views.py└── templates └── admin └── base_site.htm 通过上面的介绍,对 django 的安装、运行以及如何创建视 图和模型有了一个清晰的认识,接下来就可以深入的学习 django 的自动化测试、持久化、中间件、国 际 化等知识。
2023-07-23 05:54:371

求英语语法高手解惑,..题目如下

同意上面对28,29,34的回答。其它有不同看法:30题答案应该为B.otherwise,otherwise是副词,意为“否则的话”,全句意为:他应该是在工作,否则的话是在忙着。如果用else一般跟or的后面,而but的后面常跟otherwise31.全面有having received...,表明此动作在前,故后面不用to have been33.整个句子都是逗号,所以答案应该是which,其它答案均错,从语法上是不成立的。
2023-07-23 05:54:472

IMDB到底是如何评分和排名的?

我这几年下来已经投了快550本电影的票了,不知道算不算regular voters,估计他们看到注册地是中国大陆的就直接无视了
2023-07-23 05:54:552

有一部电影是杨千华和梁朝伟演的,梁朝伟扮演一个算命的人,叫赖料布,请问这部电影叫什么名字

me too
2023-07-23 05:55:055

请问什么是IMDB评分?

IMDB是目前全球互联网中最大的一个电影资料库,里面包括了几乎所有的电影,以及1982年以后的电视剧集。IMDB的资料中包括了影片的众多信息,演员,片长,内容介绍,分级,评论等,就个人买碟而言,很大程度上也是参考IMDB的得分。 而IMDB的得分又是如何来的呢?它的可靠性又有多少呢?让我们通过《魔戒1:护戒使者》来做具体分析吧,先看上图: 这张图就是魔戒1的所有评分者的分数的一个条状统计图。 从中我们可以看到各个分数段的大致比例,比如这儿就可以发现,超过一半的人是打满分的。 根据IMDB网站上公布的TOP250评分标准: imdb top 250用的是贝叶斯统计的算法得出的加权分(Weighted Rank-WR),公式如下: weighted rank (WR) = (v ÷ (v+m)) × R + (m ÷ (v+m)) × C 其中: R = average for the movie (mean) = (Rating) (是用普通的方法计算出的平均分) v = number of votes for the movie = (votes)(投票人数,需要注意的是,只有经常投票者才会被计算在内,这个下面详细解释) m = minimum votes required to be listed in the top 250 (currently 1250) (进入imdb top 250需要的最小票数,只有三两个人投票的电影就算得满分也没用的) C = the mean vote across the whole report (currently 6.9) (目前所有电影的平均得分) 另外重点来了,根据这个注释: note: for this top 250, only votes from regular voters are considered. 只有‘regular voters‘的投票才会被计算在IMDB top 250之内,这就是IMDB防御因为某种电影的fans拉票而影响 top 250结果,把top 250尽量限制在资深影迷投票范围内的主要方法。regular voter的标准不详,估计至少是“投票电影超过xxx 部以上”这样的水平,搞不好还会加上投票的时间分布,为支持自己的心爱电影一天内给N百部电影投票估计也不行。 因此,细心的人可以注意到,列入IMDB top 250的电影,其主页面上的分数与250列表中的分数是不同的。以魔戒1为例,它在自己的页面http://www.imdb.com/title/tt0120737/中的分数是8.8,而列表中是8.7。一般 250表中的得分都会低于自己页面中的得分,越是娱乐片差距越大。这大概是因为regular voter对于电影的要求通常较高的关系。
2023-07-23 05:55:331

share怎么读

山若
2023-07-23 05:55:425

If paul had received six more votes in the last election,he?

A 首先在A和B两个选项中选,因为题目已经确定是虚拟句所以肯定是过去时态,而从句是过去完成时态,主句是表示的"现在",所以就是过去时态了.(根据虚拟句的法则,是过去的事情那么从句就用过去的过去即过去完成时态)而B选项的意思是"本该```"的意思,如:you should have finished your homework before supper.你本该在晚饭前完成作业.,2,a 条件句过去时虚拟语气 主句现代时虚拟语气 结构:would + do,2,A 很简单,用不着一堆语法解释。条件句是对过去的假设,主句是对现在的假设,都是虚拟的,就都按照正常时态倒退一个时态就好了。,2,D,2,答案 是 B 因为是对过去条件的 假设 是虚拟语气句型,2,B,2,选择B,过去将来时,俺是凭语感得出答案的,不用说了,你问问老外,肯定是B 如果paul在上次的投票中得到多于6票的选票,那他现在就应该是我们的主席了 这样看看,选什么?,1,A 这是个混合虚拟语气,从句是对过去的虚拟所以用的是had received,而主句是对现在情况的虚拟(用了时间状语now),所以用的是would be。,0,If paul had received six more votes in the last election,he ______ our chairman now. A.would be B.would have been C.will be D.must have been. 请说出选择的理由. 可是我的语感告诉我是B。 我很难理解A的感觉!
2023-07-23 05:56:041

急求c语言 dev c++) 利用结构体做一个小系统,为什么直接无法编译运行?

调用mistake函数,不需要加上void
2023-07-23 05:56:212

Lo-Pro的《Fuel》 歌词

歌曲名:Fuel歌手:Lo-Pro专辑:Lo-ProArtist - CatatoniaAlbum - Paper Scissors StoneLyrics - Fuel我爱摇滚和唐慧QQ;1015762832Go tell the captainThere"s no waters leftTo navigateI sailed them all for you...Go tell the engine roomStop stoking up the fireWe"re out of fuel...Doom looms large on my horizonMountain toxic, river poisonFools get votes in a democracy...We"ll build new ring roadsTo go nowhere in particularNow you"ve passed your Highway CodeAnd make new inroadsInto plundering the EarthFor some more fuel...Doom looms large on my horizonMountain toxic, river poisonFools get votes in a democracy...Go ask the GovernmentYou voted in on trustWhere is our fuel?...Doom looms large on my horizonMountain toxic, river poisonFools get votes in a democracy...Doom looms large on my horizonMountain toxic, river poisonFools get votes in a democracy...http://music.baidu.com/song/8045620
2023-07-23 05:56:391

几道英语选折题 帮帮忙

A B D B A A C B应该是这样的吧!^-^
2023-07-23 05:56:493

如何创建一个Django网站

本文演示如何创建一个简单的 django 网站,使用的 django 版本为1.7。1. 创建项目运行下面命令就可以创建一个 django 项目,项目名称叫 mysite :$ django-admin.py startproject mysite创建后的项目目录如下:mysite├── manage.py└── mysite ├── __init__.py ├── settings.py ├── urls.py └── wsgi.py1 directory, 5 files说明:__init__.py :让 Python 把该目录当成一个开发包 (即一组模块)所需的文件。 这是一个空文件,一般你不需要修改它。manage.py :一种命令行工具,允许你以多种方式与该 Django 项目进行交互。 键入python manage.py help,看一下它能做什么。 你应当不需要编辑这个文件;在这个目录下生成它纯是为了方便。settings.py :该 Django 项目的设置或配置。urls.py:Django项目的URL路由设置。目前,它是空的。wsgi.py:WSGI web 应用服务器的配置文件。更多细节,查看 How to deploy with WSGI接下来,你可以修改 settings.py 文件,例如:修改 LANGUAGE_CODE、设置时区 TIME_ZONESITE_ID = 1LANGUAGE_CODE = "zh_CN"TIME_ZONE = "Asia/Shanghai"USE_TZ = True 上面开启了 [Time zone](https://docs.djangoproject.com/en/1.7/topics/i18n/timezones/) 特性,需要安装 pytz:$ sudo pip install pytz2. 运行项目在运行项目之前,我们需要创建数据库和表结构,这里我使用的默认数据库:$ python manage.py migrateOperations to perform: Apply all migrations: admin, contenttypes, auth, sessionsRunning migrations: Applying contenttypes.0001_initial... OK Applying auth.0001_initial... OK Applying admin.0001_initial... OK Applying sessions.0001_initial... OK然后启动服务:$ python manage.py runserver你会看到下面的输出:Performing system checks...System check identified no issues (0 silenced).January 28, 2015 - 02:08:33Django version 1.7.1, using settings "mysite.settings"Starting development server at http://127.0.0.1:8000/Quit the server with CONTROL-C.这将会在端口8000启动一个本地服务器, 并且只能从你的这台电脑连接和访问。 既然服务器已经运行起来了,现在用网页浏览器访问 http://127.0.0.1:8000/。你应该可以看到一个令人赏心悦目的淡蓝色 Django 欢迎页面它开始工作了。你也可以指定启动端口:$ python manage.py runserver 8080以及指定 ip:$ python manage.py runserver 0.0.0.0:80003. 创建 app前面创建了一个项目并且成功运行,现在来创建一个 app,一个 app 相当于项目的一个子模块。在项目目录下创建一个 app:$ python manage.py startapp polls如果操作成功,你会在 mysite 文件夹下看到已经多了一个叫 polls 的文件夹,目录结构如下:polls├── __init__.py├── admin.py├── migrations│ └── __init__.py├── models.py├── tests.py└── views.py1 directory, 6 files4. 创建模型每一个 Django Model 都继承自 django.db.models.Model在 Model 当中每一个属性 attribute 都代表一个 database field通过 Django Model API 可以执行数据库的增删改查, 而不需要写一些数据库的查询语句打开 polls 文件夹下的 models.py 文件。创建两个模型:import datetimefrom django.db import modelsfrom django.utils import timezoneclass Question(models.Model): question_text = models.CharField(max_length=200) pub_date = models.DateTimeField("date published") def was_published_recently(self): return self.pub_date >= timezone.now() - datetime.timedelta(days=1)class Choice(models.Model): question = models.ForeignKey(Question) choice_text = models.CharField(max_length=200) votes = models.IntegerField(default=0)然后在 mysite/settings.py 中修改 INSTALLED_APPS 添加 polls:INSTALLED_APPS = ( "django.contrib.admin", "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", "polls",)在添加了新的 app 之后,我们需要运行下面命令告诉 Django 你的模型做了改变,需要迁移数据库:$ python manage.py makemigrations polls你会看到下面的输出日志:Migrations for "polls": 0001_initial.py: - Create model Choice - Create model Question - Add field question to choice你可以从 polls/migrations/0001_initial.py 查看迁移语句。运行下面语句,你可以查看迁移的 sql 语句:$ python manage.py sqlmigrate polls 0001输出结果:BEGIN;CREATE TABLE "polls_choice" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "choice_text" varchar(200) NOT NULL, "votes" integer NOT NULL);CREATE TABLE "polls_question" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "question_text" varchar(200) NOT NULL, "pub_date" datetime NOT NULL);CREATE TABLE "polls_choice__new" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "choice_text" varchar(200) NOT NULL, "votes" integer NOT NULL, "question_id" integer NOT NULL REFERENCES "polls_question" ("id"));INSERT INTO "polls_choice__new" ("choice_text", "votes", "id") SELECT "choice_text", "votes", "id" FROM "polls_choice";DROP TABLE "polls_choice";ALTER TABLE "polls_choice__new" RENAME TO "polls_choice";CREATE INDEX polls_choice_7aa0f6ee ON "polls_choice" ("question_id");COMMIT;你可以运行下面命令,来检查数据库是否有问题:$ python manage.py check再次运行下面的命令,来创建新添加的模型:$ python manage.py migrateOperations to perform: Apply all migrations: admin, contenttypes, polls, auth, sessionsRunning migrations: Applying polls.0001_initial... OK总结一下,当修改一个模型时,需要做以下几个步骤:修改 models.py 文件运行 python manage.py makemigrations 创建迁移语句运行 python manage.py migrate,将模型的改变迁移到数据库中你可以阅读 django-admin.py documentation,查看更多 manage.py 的用法。创建了模型之后,我们可以通过 Django 提供的 API 来做测试。运行下面命令可以进入到 python shell 的交互模式:$ python manage.py shell下面是一些测试:>>> from polls.models import Question, Choice # Import the model classes we just wrote.# No questions are in the system yet.>>> Question.objects.all()[]# Create a new Question.# Support for time zones is enabled in the default settings file, so# Django expects a datetime with tzinfo for pub_date. Use timezone.now()# instead of datetime.datetime.now() and it will do the right thing.>>> from django.utils import timezone>>> q = Question(question_text="What"s new?", pub_date=timezone.now())# Save the object into the database. You have to call save() explicitly.>>> q.save()# Now it has an ID. Note that this might say "1L" instead of "1", depending# on which database you"re using. That"s no biggie; it just means your# database backend prefers to return integers as Python long integer# objects.>>> q.id1# Access model field values via Python attributes.>>> q.question_text"What"s new?">>> q.pub_datedatetime.datetime(2012, 2, 26, 13, 0, 0, 775217, tzinfo=<UTC>)# Change values by changing the attributes, then calling save().>>> q.question_text = "What"s up?">>> q.save()# objects.all() displays all the questions in the database.>>> Question.objects.all()[<Question: Question object>]打印所有的 Question 时,输出的结果是 [<Question: Question object>],我们可以修改模型类,使其输出更为易懂的描述。修改模型类:from django.db import modelsclass Question(models.Model): # ... def __str__(self): # __unicode__ on Python 2 return self.question_textclass Choice(models.Model): # ... def __str__(self): # __unicode__ on Python 2 return self.choice_text接下来继续测试:>>> from polls.models import Question, Choice# Make sure our __str__() addition worked.>>> Question.objects.all()[<Question: What"s up?>]# Django provides a rich database lookup API that"s entirely driven by# keyword arguments.>>> Question.objects.filter(id=1)[<Question: What"s up?>]>>> Question.objects.filter(question_text__startswith="What")[<Question: What"s up?>]# Get the question that was published this year.>>> from django.utils import timezone>>> current_year = timezone.now().year>>> Question.objects.get(pub_date__year=current_year)<Question: What"s up?># Request an ID that doesn"t exist, this will raise an exception.>>> Question.objects.get(id=2)Traceback (most recent call last): ...DoesNotExist: Question matching query does not exist.# Lookup by a primary key is the most common case, so Django provides a# shortcut for primary-key exact lookups.# The following is identical to Question.objects.get(id=1).>>> Question.objects.get(pk=1)<Question: What"s up?># Make sure our custom method worked.>>> q = Question.objects.get(pk=1)# Give the Question a couple of Choices. The create call constructs a new# Choice object, does the INSERT statement, adds the choice to the set# of available choices and returns the new Choice object. Django creates# a set to hold the "other side" of a ForeignKey relation# (e.g. a question"s choice) which can be accessed via the API.>>> q = Question.objects.get(pk=1)# Display any choices from the related object set -- none so far.>>> q.choice_set.all()[]# Create three choices.>>> q.choice_set.create(choice_text="Not much", votes=0)<Choice: Not much>>>> q.choice_set.create(choice_text="The sky", votes=0)<Choice: The sky>>>> c = q.choice_set.create(choice_text="Just hacking again", votes=0)# Choice objects have API access to their related Question objects.>>> c.question<Question: What"s up?># And vice versa: Question objects get access to Choice objects.>>> q.choice_set.all()[<Choice: Not much>, <Choice: The sky>, <Choice: Just hacking again>]>>> q.choice_set.count()3# The API automatically follows relationships as far as you need.# Use double underscores to separate relationships.# This works as many levels deep as you want; there"s no limit.# Find all Choices for any question whose pub_date is in this year# (reusing the "current_year" variable we created above).>>> Choice.objects.filter(question__pub_date__year=current_year)[<Choice: Not much>, <Choice: The sky>, <Choice: Just hacking again>]# Let"s delete one of the choices. Use delete() for that.>>> c = q.choice_set.filter(choice_text__startswith="Just hacking")>>> c.delete()>>> 上面这部分测试,涉及到 django orm 相关的知识,详细说明可以参考 Django中的ORM。5. 管理 adminDjango有一个优秀的特性, 内置了Django admin后台管理界面, 方便管理者进行添加和删除网站的内容.新建的项目系统已经为我们设置好了后台管理功能,见 mysite/settings.py:INSTALLED_APPS = ( "django.contrib.admin", #默认添加后台管理功能 "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", "mysite",)同时也已经添加了进入后台管理的 url, 可以在 mysite/urls.py 中查看:url(r"^admin/", include(admin.site.urls)), #可以使用设置好的url进入网站后台接下来我们需要创建一个管理用户来登录 admin 后台管理界面:$ python manage.py createsuperuserUsername (leave blank to use "june"): adminEmail address:Password:Password (again):Superuser created successfully.总结最后,来看项目目录结构:mysite├── db.sqlite3├── manage.py├── mysite│ ├── __init__.py│ ├── settings.py│ ├── urls.py│ ├── wsgi.py├── polls│ ├── __init__.py│ ├── admin.py│ ├── migrations│ │ ├── 0001_initial.py│ │ ├── __init__.py│ ├── models.py│ ├── templates│ │ └── polls│ │ ├── detail.html│ │ ├── index.html│ │ └── results.html│ ├── tests.py│ ├── urls.py│ ├── views.py└── templates └── admin └── base_site.htm 通过上面的介绍,对 django 的安装、运行以及如何创建视 图和模型有了一个清晰的认识,接下来就可以深入的学习 django 的自动化测试、持久化、中间件、国 际 化等知识。
2023-07-23 05:56:581

如何解决Django 1.8在migrate时失败

1. 创建项目运行下面命令就可以创建一个 django 项目,项目名称叫 mysite :$ django-admin.py startproject mysite创建后的项目目录如下:mysite├── manage.py└── mysite├── __init__.py├── settings.py├── urls.py└── wsgi.py1 directory, 5 files说明:__init__.py :让 Python 把该目录当成一个开发包 (即一组模块)所需的文件。 这是一个空文件,一般你不需要修改它。manage.py :一种命令行工具,允许你以多种方式与该 Django 项目进行交互。 键入python manage.py help,看一下它能做什么。 你应当不需要编辑这个文件;在这个目录下生成它纯是为了方便。settings.py :该 Django 项目的设置或配置。urls.py:Django项目的URL路由设置。目前,它是空的。wsgi.py:WSGI web 应用服务器的配置文件。更多细节,查看 How to deploy with WSGI接下来,你可以修改 settings.py 文件,例如:修改 LANGUAGE_CODE、设置时区 TIME_ZONESITE_ID = 1LANGUAGE_CODE = "zh_CN"TIME_ZONE = "Asia/Shanghai"USE_TZ = True 上面开启了 [Time zone](https://docs.djangoproject.com/en/1.7/topics/i18n/timezones/) 特性,需要安装 pytz:$ sudo pip install pytz2. 运行项目在运行项目之前,我们需要创建数据库和表结构,这里我使用的默认数据库:$ python manage.py migrateOperations to perform:Apply all migrations: admin, contenttypes, auth, sessionsRunning migrations:Applying contenttypes.0001_initial... OKApplying auth.0001_initial... OKApplying admin.0001_initial... OKApplying sessions.0001_initial... OK然后启动服务:$ python manage.py runserver你会看到下面的输出:Performing system checks...System check identified no issues (0 silenced).January 28, 2015 - 02:08:33Django version 1.7.1, using settings "mysite.settings"Starting development server at http://127.0.0.1:8000/Quit the server with CONTROL-C.这将会在端口8000启动一个本地服务器, 并且只能从你的这台电脑连接和访问。 既然服务器已经运行起来了,现在用网页浏览器访问 http://127.0.0.1:8000/。你应该可以看到一个令人赏心悦目的淡蓝色 Django 欢迎页面它开始工作了。你也可以指定启动端口:$ python manage.py runserver 8080以及指定 ip:$ python manage.py runserver 0.0.0.0:80003. 创建 app前面创建了一个项目并且成功运行,现在来创建一个 app,一个 app 相当于项目的一个子模块。在项目目录下创建一个 app:$ python manage.py startapp polls如果操作成功,你会在 mysite 文件夹下看到已经多了一个叫 polls 的文件夹,目录结构如下:polls├── __init__.py├── admin.py├── migrations│ └── __init__.py├── models.py├── tests.py└── views.py1 directory, 6 files4. 创建模型每一个 Django Model 都继承自 django.db.models.Model在 Model 当中每一个属性 attribute 都代表一个 database field通过 Django Model API 可以执行数据库的增删改查, 而不需要写一些数据库的查询语句打开 polls 文件夹下的 models.py 文件。创建两个模型:import datetimefrom django.db import modelsfrom django.utils import timezoneclass Question(models.Model):question_text = models.CharField(max_length=200)pub_date = models.DateTimeField("date published")def was_published_recently(self):return self.pub_date >= timezone.now() - datetime.timedelta(days=1)class Choice(models.Model):question = models.ForeignKey(Question)choice_text = models.CharField(max_length=200)votes = models.IntegerField(default=0)然后在 mysite/settings.py 中修改 INSTALLED_APPS 添加 polls:INSTALLED_APPS = ("django.contrib.admin","django.contrib.auth","django.contrib.contenttypes","django.contrib.sessions","django.contrib.messages","django.contrib.staticfiles","polls",)在添加了新的 app 之后,我们需要运行下面命令告诉 Django 你的模型做了改变,需要迁移数据库:$ python manage.py makemigrations polls你会看到下面的输出日志:Migrations for "polls":0001_initial.py:- Create model Choice- Create model Question- Add field question to choice你可以从 polls/migrations/0001_initial.py 查看迁移语句。运行下面语句,你可以查看迁移的 sql 语句:$ python manage.py sqlmigrate polls 0001输出结果:BEGIN;CREATE TABLE "polls_choice" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "choice_text" varchar(200) NOT NULL, "votes" integer NOT NULL);CREATE TABLE "polls_question" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "question_text" varchar(200) NOT NULL, "pub_date" datetime NOT NULL);CREATE TABLE "polls_choice__new" ("id" integer NOT NULL PRIMARY KEY AUTOINCREMENT, "choice_text" varchar(200) NOT NULL, "votes" integer NOT NULL, "question_id" integer NOT NULL REFERENCES "polls_question" ("id"));INSERT INTO "polls_choice__new" ("choice_text", "votes", "id") SELECT "choice_text", "votes", "id" FROM "polls_choice";DROP TABLE "polls_choice";ALTER TABLE "polls_choice__new" RENAME TO "polls_choice";CREATE INDEX polls_choice_7aa0f6ee ON "polls_choice" ("question_id");COMMIT;你可以运行下面命令,来检查数据库是否有问题:$ python manage.py check再次运行下面的命令,来创建新添加的模型:$ python manage.py migrateOperations to perform:Apply all migrations: admin, contenttypes, polls, auth, sessionsRunning migrations:Applying polls.0001_initial... OK总结一下,当修改一个模型时,需要做以下几个步骤:修改 models.py 文件运行 python manage.py makemigrations 创建迁移语句运行 python manage.py migrate,将模型的改变迁移到数据库中你可以阅读 django-admin.py documentation,查看更多 manage.py 的用法。创建了模型之后,我们可以通过 Django 提供的 API 来做测试。运行下面命令可以进入到 python shell 的交互模式:$ python manage.py shell下面是一些测试:>>> from polls.models import Question, Choice # Import the model classes we just wrote.# No questions are in the system yet.>>> Question.objects.all()[]# Create a new Question.# Support for time zones is enabled in the default settings file, so# Django expects a datetime with tzinfo for pub_date. Use timezone.now()# instead of datetime.datetime.now() and it will do the right thing.>>> from django.utils import timezone>>> q = Question(question_text="What"s new?", pub_date=timezone.now())# Save the object into the database. You have to call save() explicitly.>>> q.save()# Now it has an ID. Note that this might say "1L" instead of "1", depending# on which database you"re using. That"s no biggie; it just means your# database backend prefers to return integers as Python long integer# objects.>>> q.id1# Access model field values via Python attributes.>>> q.question_text"What"s new?">>> q.pub_datedatetime.datetime(2012, 2, 26, 13, 0, 0, 775217, tzinfo=<UTC>)# Change values by changing the attributes, then calling save().>>> q.question_text = "What"s up?">>> q.save()# objects.all() displays all the questions in the database.>>> Question.objects.all()[<Question: Question object>]打印所有的 Question 时,输出的结果是 [<Question: Question object>],我们可以修改模型类,使其输出更为易懂的描述。修改模型类:from django.db import modelsclass Question(models.Model):# ...def __str__(self): # __unicode__ on Python 2return self.question_textclass Choice(models.Model):# ...def __str__(self): # __unicode__ on Python 2return self.choice_text接下来继续测试:>>> from polls.models import Question, Choice# Make sure our __str__() addition worked.>>> Question.objects.all()[<Question: What"s up?>]# Django provides a rich database lookup API that"s entirely driven by# keyword arguments.>>> Question.objects.filter(id=1)[<Question: What"s up?>]>>> Question.objects.filter(question_text__startswith="What")[<Question: What"s up?>]# Get the question that was published this year.>>> from django.utils import timezone>>> current_year = timezone.now().year>>> Question.objects.get(pub_date__year=current_year)<Question: What"s up?># Request an ID that doesn"t exist, this will raise an exception.>>> Question.objects.get(id=2)Traceback (most recent call last):...DoesNotExist: Question matching query does not exist.# Lookup by a primary key is the most common case, so Django provides a# shortcut for primary-key exact lookups.# The following is identical to Question.objects.get(id=1).>>> Question.objects.get(pk=1)<Question: What"s up?># Make sure our custom method worked.>>> q = Question.objects.get(pk=1)# Give the Question a couple of Choices. The create call constructs a new# Choice object, does the INSERT statement, adds the choice to the set# of available choices and returns the new Choice object. Django creates# a set to hold the "other side" of a ForeignKey relation# (e.g. a question"s choice) which can be accessed via the API.>>> q = Question.objects.get(pk=1)# Display any choices from the related object set -- none so far.>>> q.choice_set.all()[]# Create three choices.>>> q.choice_set.create(choice_text="Not much", votes=0)<Choice: Not much>>>> q.choice_set.create(choice_text="The sky", votes=0)<Choice: The sky>>>> c = q.choice_set.create(choice_text="Just hacking again", votes=0)# Choice objects have API access to their related Question objects.>>> c.question<Question: What"s up?># And vice versa: Question objects get access to Choice objects.>>> q.choice_set.all()[<Choice: Not much>, <Choice: The sky>, <Choice: Just hacking again>]>>> q.choice_set.count()3# The API automatically follows relationships as far as you need.# Use double underscores to separate relationships.# This works as many levels deep as you want; there"s no limit.# Find all Choices for any question whose pub_date is in this year# (reusing the "current_year" variable we created above).>>> Choice.objects.filter(question__pub_date__year=current_year)[<Choice: Not much>, <Choice: The sky>, <Choice: Just hacking again>]# Let"s delete one of the choices. Use delete() for that.>>> c = q.choice_set.filter(choice_text__startswith="Just hacking")>>> c.delete()>>> 上面这部分测试,涉及到 django orm 相关的知识,详细说明可以参考 Django中的ORM。5. 管理 adminDjango有一个优秀的特性, 内置了Django admin后台管理界面, 方便管理者进行添加和删除网站的内容.新建的项目系统已经为我们设置好了后台管理功能,见 mysite/settings.py:INSTALLED_APPS = ("django.contrib.admin", #默认添加后台管理功能"django.contrib.auth","django.contrib.contenttypes","django.contrib.sessions","django.contrib.messages","django.contrib.staticfiles","mysite",)同时也已经添加了进入后台管理的 url, 可以在 mysite/urls.py 中查看:url(r"^admin/", include(admin.site.urls)), #可以使用设置好的url进入网站后台接下来我们需要创建一个管理用户来登录 admin 后台管理界面:$ python manage.py createsuperuserUsername (leave blank to use "june"): adminEmail address:Password:Password (again):Superuser created successfully.总结最后,来看项目目录结构:mysite├── db.sqlite3├── manage.py├── mysite│ ├── __init__.py│ ├── settings.py│ ├── urls.py│ ├── wsgi.py├── polls│ ├── __init__.py│ ├── admin.py│ ├── migrations│ │ ├── 0001_initial.py│ │ ├── __init__.py│ ├── models.py│ ├── templates│ │ └── polls│ │ ├── detail.html│ │ ├── index.html│ │ └── results.html│ ├── tests.py│ ├── urls.py│ ├── views.py└── templates└── admin└── base_site.htm
2023-07-23 05:57:061

foreach使用方法

foreach语句的一般语法格式如下:foreach(数据类型标识符in表达式){循环体2}。foreach语句为数组或对象集合中的每个元素重复一个嵌入语句组。foreach语句用于循环访问集合以获取所需信息,但不应用于更改集合内容以避免产生不可预知的副作用。能够应用的编程语言类别:Java、C#、PHP、D语言(Phobos库)。foreach语句是c#中新增的循环语句,他对于处理数组及集合等数据类型特别方便。扩展资料:形式:此语句的形式如下:foreach(typeidentifierinexpression)statement其中:type:identifier的类型。identifier:表示集合元素的迭代变量。如果迭代变量为值类型,则无法修改的只读变量也是有效的。expression:对象集合或数组表达式。集合元素的类型必须可以转换为identifier类型。请不要使用计算为null的表达式。而应计算为实现IEnumerable的类型或声明GetEnumerator方法的类型。在后一种情况中,GetEnumerator应该返回实现IEnumerator的类型或声明IEnumerator中定义的所有方法。statement:要执行的嵌入语句。参考资料来源:百度百科-foreach
2023-07-23 05:49:181

NO.39《刀锋》【英国】毛姆

前言:看完了毛姆的《月亮与六便士》和《面纱》,便开始刷毛姆的第三本书。看小伙伴的推荐,好像这个书里的“拉里”这个人做事风格有点像我,便在周日花了一天刷完了这本书。《刀锋》这本书,最吸引我的莫过于这句话:“剃刀锋利,越之不易;智者有云,得渡人稀。”英文版本是:”The sharp edge of a razor is difficult to pass over, thus the wise say the path to Salvation is hard.”这句话意味颇深,很难懂,以至于我读完整本书,也不知道毛姆的这本小说为什么叫《刀锋》。看了其他人的书评,才知道这句话的意思:“一把刀的锋刃不容易越过;因此智者说得救之道是困难的。”正文:这本书讲述的故事是发生在第一次世界大战前后。美国青年拉里因为亲眼目睹了自己的好友为营救自己而牺牲在战争中,因此当他从战争中归来后,他对人生感到前所未有的迷惘。他不懂世界上为什么有罪恶、痛苦和不幸。他丢下未婚妻,辗转欧洲寻找生命的意义。大量的阅读,艰苦的体力劳动,基督修道院清修都未能让他获得心灵的平静。直到他扬帆远行东方,在印度吠陀经哲学中找到了安生立命之道。在追寻的过程中他和未婚妻解除婚约,放弃获得俗世成功的一切机会,散尽家财。而故事的最后,拉里并没有成佛成家或者遁入空门,他只是带着他所获得的感悟隐入喧嚣的人海中。 “我笔下的主人翁并非名人,可能永远默默无名;他的生命走到尽头,或许不会留下什么痕迹,犹如掷入河中的石子,不过暂时溅起水面涟漪;故本书若承读蒙读者青睐,只会读到故事本身的趣味。不过,有鉴于他服膺的生活方式,以及刚强与亲和兼具的奇特性格,对同袍的影响或将与日俱增,后世的人也将发觉,这时代曾有一位奇人。”毛姆在这本《刀锋》一开始便如是写道。 看过《刀锋》的人应当知道,没有什么绝对正确哲学观点,更没有什么绝对正确的人生。而生活的精彩恰恰就在于它的丰富,不同的人有不同的理想生活,没有哪一种人生是我们所有人都要或者都应该奉行的。但不论你想过哪一种生活,它都不会使你毫无烦恼、称心如意。 一心想挤进上层社会的艾略特终身被上层社会所看不起,沉醉于纸醉迷金的伊莎贝尔寻不到自己精神的伴侣拉里,哪怕是作者最欣赏的拉里为了寻求自己的人生意义也历经磨难。毛姆没有贬低任何人的生活,荒唐如艾略特他也写出了他热爱家人的可爱之处,虚荣如伊莎贝尔他也写到了她高贵、优雅的动人气质,就算对拉里那种寻得人生意义的成圣之道,也只是发出了欣赏烟花时的赞美。毛姆没有给出人生应该怎样过的答案,却让读的人想去寻找答案。 《刀锋》中的每一个人,都已经得偿所愿。艾略特成为了社交名人;伊莎贝尔过着优渥的生活;格雷找到了赚钱的工作,有了自己的事务所;苏珊u2022鲁维埃选择嫁人;索菲一死了之;拉里找到了自己向往的“道”。 的确,在一个人功成名就之时,往往年龄也到达人生的迟暮,如果年轻便看尽繁华,那么他依然会将人生阅历整合,形成不朽的创作。有朝一日,他会继续回想自己写作的初衷,算是复盘人生的所见所闻,创造一个看似随性的人物,一个多彩的生活,涵盖了这些年的所有生活和思考。如此算得上功德圆满,了无遗憾。 也许,我们生命中最好的结局就是如此。人,生而志向不同,活成自己喜欢的模样,过自己向往的生活,那是多么美好的事情。想来是因为人生最好的这段岁月,应该去追寻真理及真我,即使最后一无所获也没有什么可以后悔的。 如同拉里说的“我认为一个人能够追求的最高理想是自我的完善。”追寻本身就是一种自我完善。 结尾作者对拉里的总结那段我非常喜欢:“他没有野心,对名利也毫无欲念;无论成为何种社会名流都令他厌恶;于是,他或许很满足自己选择的生活,只做好他自己就已足够。他谦逊得不愿意做他人的榜样;可或许,他觉得会有些许彷徨的人,像飞蛾扑火那样受到他的吸引,终将向他走来,分享他那熠熠生辉的信仰:人生的极乐只存于精神,人循着无私与弃绝之念走在自我修行的道路上,便将能善司其职,就像他写书或是游说众生那样。 尽管追寻的一路,要历经多少艰难险阻,就像作者所说“剃刀锋利,越之不易”,但好在还是有一些人可以跨越,无论以何种形式,他们都是幸运的。 无论能否越过刀锋,愿你我也能得到自己想要的生活。
2023-07-23 05:49:211

毛滴虫的症状是什么,怎样预防与治疗?

最常见引呼吸系统疾病的寄生虫是毛滴虫(TRICHOMONAS,CANKER)。毛滴虫属原虫类单细胞微生物,有水和葡萄糖存在,它就可以生长。应该说几乎所有的鸽子都感染过毛滴虫,但鸽子体内并不能产生免疫抵抗力。轻、中度的感染几乎没有临床症状。毛滴虫感染鼻、咽、喉后,一般不通过气管感染肺部,可能是因为肺部的湿度不利于其生长。毛滴虫顺食道感染素囊,在那里大量繁殖,偶有穿过囊壁溃疡面感染内脏(主要为肝脏)的病例发生。毛滴虫感染造成大量粘性分泌物产生,偶有病鸽出现黄色奶酪样增生质,机械性堵塞呼吸管道。赛鸽感染毛滴虫后,鸽体抵抗力下降,加上粘膜表层受损,很容易发生继发性(其他病原体)感染。临床症状 轻、中度感染几乎没有症状。细仔观察可以发现口腔液粘度增加,有粘丝。赛鸽常莫名其妙地张张口。眼睛周围有小气泡(鼻泪管不通畅所致)。最好的确诊方法是作显微镜检查。任何显微镜(包括玩具显微镜)都可以看到虫体。预防与治疗 保持鸽舍通风、干净,减少粉尘是最有效的预防措施。饮水水源是交叉传染的主要传染源。勤换水,盛水容器应该每天清洗。 甲硝唑(Metronidazole)是我唯一选用治毛滴虫的药。除此之外,我别无选择。剂量:25-50MG/鸽/天,疗程三到五天。非水溶性药物,不适合加入饮水中作群体治疗。 替硝唑(Tinidazole)、噢硝唑(Ornidazole)为两种较新的抗滴虫药,价钱较前者高许多,剂量和用法相同。
2023-07-23 05:49:213

大连海事大学的保研情况是怎样的?

目前并没有公开的大连海事大学保研率数据,因为保研是一项相对私密的信息。1、什么是保研?保研即“保送研究生”,指的是在本科阶段表现优秀的学生可以豁免考研,并直接进入硕士研究生学习。由于研究生招生除了通过考试方式外还有通过推荐、自主招生等渠道招收研究生的方式,因此,“保研”实际上是“推荐研究生”。2、大连海事大学保研政策大连海事大学设立保送研究生名额,每个培养单位根据实际情况确定保送人数。根据学校保研政策,学生需要达到一定绩点和智育成绩要求,待定性考核合格。同时,还需要经过严格的筛选和面试。3、如何提高被保研的可能性?若想具备被保研的资格,首先需要表现出优异的绩点成绩和专业能力。此外,还应该积极参加校内外各类比赛和项目相关实践活动,展示个人的能力和综合素质。此外,获得导师的认可和推荐是取得保研资格的重要因素之一。4、其他相当考神学校保研率如何?大多数综合性高校保研都是需要填写信息、写论文或申请书,转专业删档,导师调剂等环节后,参加复试的形式。全国各大高校保研率都不是很高,根据具体情况而定。例如北京大学、清华大学一般每年有十分之一左右的比例可以保研。5、保研和考研之间应该如何选择?保研难度高于考研,但成果也更为明显,因此选择保研或考研应视个人情况而定,需要衡量个人能力和专业发展。如果自己的成绩十分优秀,并且对某个领域特别感兴趣,可以考虑保研;如果觉得自己准备不足或者想尝试不同的专业或院校,可以选择通过考研进入研究生阶段。
2023-07-23 05:49:231

大连海事大学海事英语研究生就业方向是什么

听名字也是一般啊,去海事学英语,还是去读研,不现实啊!呵呵。。。本人就是海事毕业的。我们学校的学语言不是强项。慎重
2023-07-23 05:49:162

跪求SJ Happy Together歌词(中文、罗马音译)

uc624ub298ub3c4 ub0a0 uae30ub2e4ub824uc900 ub124 ubaa8uc2b5 ub09c uae30uc5b5ud574o"neul"do" nal" gi"da"ryeo"jun" ne" mo"seub" nan" gi"eog"hae"uac00ub054uc529 ud798uc774 ub4e4 ub54cuba74 ub09c ud56duc0c1 ub110 uc0dduac01ud574ga"ggeum"ssig" i" deul" ddae"myeon" nan" hang"sang" neol" saeng"gag"hae" uace0ub9c8uc6cc uae30uc060 ub54cuba74 ub2e4uac19uc774 uc6c3uace0go"ma"weo" gi"bbeul" ddae"myeon" da"gat"i" us"go" uc5b8uc81cub098 uc0acub791ud558ub294 ub9d8 ucda9ubd84ud574 eon"je"na" sa"rang"ha"neun" mam" cung"bun"hae" uadf8uc800 ubc1buae30ub9cc ud588ub358 ub108uc758 ub9c8uc74c uc774uc820 ub2e4 ub3ccub824uc904uac8cgeu"jeo" bad"gi"man" haess"deon" neo"yi" ma"eum" i"jen" da" dol"ryeo"jul"ge" uc870uae08 ub354 uac00uae4cuc774 uc0acub791 ub108uc640 ub0b4uac00 jo"geum" deo" ga"gga"i" sa"rang" neo"wa" nae"ga"uc9c0uae08 uc774ub300ub85c ud56duc0c1 ub108ub97c uc9c0ucf1cuc904uac8cji"geum" i"dae"ro" hang"sang" neo"reul" ji"kyeo"jul"ge" ub54cub85cub294 uc9c0uccd0uc11c uc544ud504uace0 ud798ub4e4uba74 ddae"ro"neun" ji"cyeo"seo" a"peu"go" deul"myeon"uadf8uc800 ub10c uae30ub300uba74 ub3fc uc601uc6d0ud788 HAPPY TOGETHERgeu"jeo" neon" gi"dae"myeon" dwae" yeong"weon"weon" HAPPY TOGETHER uc870uae08ub9cc ub2e4ub97c ubfd0uc778ub370 ucc28uac00uc6b4 uadf8 uc2dcuc120ub4e4jo"geum"man" da"reul" bbun"in"de" ca"ga"un" geu" si"seon"deul" uadf8 ub204uac00 ubb50ub77c ud55cub370ub3c4 ub108ub9ccuc740 ubcc0uce58 uc54auae38.. geu" nu"ga" mweo"ra" han"de"do" neo"man"eun" byeon"ci" anh"gil".. uace0ub9c8uc6cc ud798ub4e4 ub54cuba74 ub2e4uac19uc774 uc6b8uace0go"ma"weo" deul" ddae"myeon" da"gat"i" ul"go" uc5b8uc81cub098 ud568uaed8ud558uba70 uc9c0ucf1cuc918uc11c eon"je"na" ham"gge"ha"myeo" ji"kyeo"jweo"seo"uadf8uc800 ubc1buae30ub9cc ud588ub358 ub108uc758 ub9c8uc74c uc774uc820 ub2e4 ub3ccub824uc904uac8c geu"jeo" bad"gi"man" haess"deon" neo"yi" ma"eum" i"jen" da" dol"ryeo"jul"ge" uc870uae08 ub354 uac00uae4cuc774 uc0acub791 ub108uc640 ub0b4uac00jo"geum" deo" ga"gga"i" sa"rang" neo"wa" nae"ga" uc9c0uae08 uc774ub300ub85c ud56duc0c1 ub108ub97c uc9c0ucf1cuc904uac8cji"geum" i"dae"ro" hang"sang" neo"reul" ji"kyeo"jul"ge" ub54cub85cub294 uc9c0uccd0uc11c uc544ud504uace0 ud798ub4e4uba74ddae"ro"neun" ji"cyeo"seo" a"peu"go" deul"myeon" uadf8uc800 ub10c uae30ub300uba74 ub3fc uc601uc6d0ud788 HAPPY TOGETHER geu"jeo" neon" gi"dae"myeon" dwae" yeong"weon"weon" HAPPY TOGETHER uc138uc0c1uc5d0 uac00ub824uc9c4 ub208ubb3c ud758ub9acuace0 uc788uc744 ub54cub3c4 se"sang"e" ga"ryeo"jin" nun"mul" heul"ri"go" iss"eul" ddae"do" ub208ubd80uc2e0 uadf8ub300uac00 uc788uc5b4 nun"bu"sin" geu"dae"ga" iss"eo"ud798ub0b4uc5b4 uc6c3uc744 uc218 uc788ub294 ud56duc0c1 HAPPY TOGETHERnae"eo" us"eul" su" iss"neun" hang"sang" HAPPY TOGETHERub10c ub098uc758 uc804ubd80uc57c ub10c ub098uc758 ucd5cuace0uc57cneon" na"yi" jeon"bu"ya" neon" na"yi" coe"go"ya" ub0b4 uc0acub78c uadf8ub300 ub204uac00 ubb50ub798ub3c4 ub0b4 uc0acub791~~~ nae" sa"ram" geu"dae" nu"ga" mweo"rae"do" nae" sa"rang"~~~ uc870uae08 ub354 uac00uae4cuc774 uc0acub791 ub108uc640 ub0b4uac00 jo"geum" deo" ga"gga"i" sa"rang" neo"wa" nae"ga" uc9c0uae08 uc774ub300ub85c uc5b8uc81cub77cub3c4 uacc1uc5d0 uc788uc5b4ji"geum" i"dae"ro" eon"je"ra"do" gyeot"e" iss"eo" ub54cub85cub294 uc9c0uccd0uc11c uc544ud504uace0 ud798ub4e4uba74ddae"ro"neun" ji"cyeo"seo" a"peu"go" deul"myeon" uadf8uc800 ub10c uae30ub300uba74 ub3fc Uhh~ geu"jeo" neon" gi"dae"myeon" dwae" Uhh~(uc0acub791 ud589ubcf5)uc548 ub41cub2e4uace0 ub9d0uace0(uc9c0uae08ubd80ud130)uc2e4ud328ud55cub2e4 ub9d0uace0 (sa"rang" haeng"bog")an" doen"da"go" mal"go"(ji"geum"bu"teo")sil"pae"han"da" mal"go" (uc0acub791 ud589ubcf5)ub204uac00 ubab0ub77cuc918ub3c4(uc601uc6d0ud1a0ub85d)uadf8ub304 ud560 uc218 uc788uc8e0 (sa"rang" haeng"bog")nu"ga" mol"ra"jweo"do"(yeong"weon"to"rog")geu"daen" hal" su" iss"jyo"(uc0acub791 ud589ubcf5)uc774uc820 ubcc0uce58 ub9d0uace0(ub108uc640 ub0b4uac00)ud568uaed8 uc6c3uc5b4ubd10uc694(sa"rang" haeng"bog")i"jen" byeon"ci" mal"go"(neo"wa" nae"ga")ham"gge" us"eo"bwa"yo" (uc0acub791 ud589ubcf5)uc5ecuae30 uc788ub294 ubaa8ub450(ud568uaed8 ud558uae30)ud56duc0c1 ud589ubcf5ud558uae30 (sa"rang" haeng"bog")yeo"gi" iss"neun" mo"du"(ham"gge" ha"gi")hang"sang" haeng"bog"ha"gi" uc601uc6d0ud788 HAPPY TOGETHERyeong"weon"weon" HAPPY TOGETHER
2023-07-23 05:49:153

The Journey 歌词

歌曲名:The Journey歌手:Shakra专辑:EverestShakra - The JourneyEverything is frighteningEverything"s averseNo one gives a reasonFor this aggrieving curseNo one gives you shelterOr just a helping handWho cares about your troublesTrapped in your own worldNeeded just a piece of meNow you go your own wayNeeded one great thought in lifeTo make you strong to carry onStrive on, grab your wings and fly onOpen up your eyesAnd realise there"s skiesCarry on and strive on,Though the world gets you wrongCease with your own lies,It"s worth to pay the priceGrab your wings and fly on (fly on), strive onOnce you were a winnerUnattainableYou"d climb the highest mountainAbsurd to think you"d fallNothing last foreverBut everybody triesThe journey is your fortuneThe path is your main goalNeeded just a piece of meNow you go your own wayNeeded one great thought in your lifeTo make you strong to carry onStrive on, grab your wings and fly onOpen up your eyesAnd realise there"s skiesCarry on and strive onThough the world gets you wrongCease with your own lies,It"s worth to pay the priceGrab your wings and fly on (fly on), strive onNeeded just a piece of meNow you go your own wayNeeded just one thought in your lifeI tried to give you more than thisN" you took more and moreYou sucked all my energyTo make you strong to carry onStrive on, grab your wings and fly onOpen up your eyesAnd realise there"s skiesCarry on and strive on,Though the world gets you wrongCease with your own lies,It"s worth to pay the priceCarry on and strive onGrab your wings and fly onOpen up your eyesAnd realise there"s skiesCarry on and strive on,Though the world gets you wrongCease with your own lies,It"s worth to pay the priceGrab your wings and fly on (fly on), strive onFly on (fly on), strive onhttp://music.baidu.com/song/54885245
2023-07-23 05:49:141

伪无菌小鼠构建方法

伪无菌小鼠构建方法如下:伪无菌小鼠一般用SPF级小鼠处理后获得,饲养条件理论上也需要SPF级的动物房,比方说温度为18~29℃,日温差≤3℃,相对湿度达40%~70%,新鲜空气换气次数l0次/h,气流速度≤0.18m/s,压差25Pa,洁净度一万级,氨浓度l5mg/m_,噪音≤60dB,照度150~300Lux等等。考虑到小鼠的性成熟时间是在6-7周龄,所以疾病建模的时间一般会尽量避开这个时间点,但是建伪无菌小鼠模型不受此影响。在建模前务必先把小鼠适应性喂养1-2周,小鼠的胆子太小,换了环境马上开始造模的话小鼠的死亡率会增加,所以造模不差这一周,先让小鼠适应一下环境。清除小鼠肠道细菌的方法很简单粗暴,给老鼠疯狂的服用多种抗生素,连着吃,不怕细菌死不了。给小鼠服用的抗生素种类并不固定,每个课题组都有自己的偏好,目前用的比较多的是四联广谱抗生素( vancomycin, ampicillin, neomycin, 和metronidazole)。稀释抗生素的终浓度为 vancomycin (0.5 g /l), ampicillin(1 g /l), neomycin (1 g /l), metronidazole (1 g /l)。有老师反应万古霉素有点儿小贵,如果经费紧张的老师也可以找找其他替代品(可参考本章文献中的抗生素)。将抗生素按照比例添加到老鼠的饮水中,只要它喝水,抗生素就能进去,而且喝得越多抗生素吃得越多,不用担心万一哪只老鼠不喝水的情况,老鼠没那么聪明。连续喂养4-6周,肠道中的细菌基本上就被消灭的差不多了。也有文献说连续喂14天即可,具体喂养时间没有严格的要求,只要肠道中细菌的清除比例能达到90%以上就行。在粪菌移植的过程中,小鼠可能会有一定比例的死亡(小鼠粪便移植给小鼠死亡率低,人的粪便移植给小鼠死亡率高),预估死亡率在20-30%,在建模前需要把死亡率计算在里面。假设最终需要每组保留6只小鼠的话,可以在买老鼠的时候就把每组设置为9只。伪无菌小鼠是否搭建成功是需要通过检测来评估的,目前常用的评估方法是培养和定量。
2023-07-23 05:49:121