几个星期前我开始了一个项目,我的gulpfile工作正常。我今天有时间,所以我想我会继续我的项目,但是我注意到我的所有gulp文件都没有用。我没有收到任何错误,我查看了我的文件似乎没问题。但是,当我尝试编译时,没有创建css文件。以下是我的代码。有人能告诉我我做错了吗?
if(isset($_POST['message']) && !empty($_POST['message'])){
$sender = $_GET['nation'];
$receiver = $_GET['receiver'];
$random_number = rand();
$message = $_POST['message'];
$type = $_GET['type'];
$check_con = mysql_query("SELECT `hash` FROM `message_group` WHERE (`user_one`='$sender' AND `user_two`='$receiver') OR (`user_one`='$receiver' AND `user_two`='$sender')");
if(mysql_num_rows($check_con) ===1){
$get_hash = mysql_fetch_assoc($check_con);
$hash = $get_hash['hash'];
mysql_query("INSERT INTO messages (group_hash, from_id, message, seen) VALUES('$hash','$sender','$message','0')");
echo "<p>Message Sent!</p>";
}else{
mysql_query("INSERT INTO message_group (user_one, user_two, hash) VALUES('$sender','$receiver','$random_number')");
mysql_query("INSERT INTO messages (group_hash, from_id, message, seen) VALUES('$random_number','$sender','$message','0')");
echo "<p>Conversation Started!</p>";
}
}
?>
<form method="POST" action="index.php?page=gc3025/send_beta.php&game=<?php echo $game; ?>&type=<?php echo $type; ?>&nation=<?php echo $nations_id; ?>&user=<?php echo $user_id; ?>&receiver=<?php echo $receiver_id; ?>">
<table>
Enter Message:
<tr>
<td></td>
<td><textarea name='message' rows='7' cols='60'></textarea></td>
</tr>
<td><input type='submit' value="Send Message" /></td>
</table>
</form>
这是我的文件夹结构: http://plnkr.co/edit/8QPYdzLD8qzEbdz5sesE?p=preview
编译时,我没有错误,但没有创建CSS文件夹或文件。
答案 0 :(得分:0)
//let a distribution D be a tuple N1,...,Nx of the current number of balls each bucket can accept
void DistributeColor(Distribution D, Color C) {
DistributeBucket(D,B1,C);
}
void DistributeBucket(Distribution D, Bucket B, Color C) {
if B.canAccept(C) {
for (int i = 0; i<= min(D[N],C.N); i++) {
//we put i balls of the color C in the bucket B
C.N-=i;
D.N-=i;
if (C.N == 0) {
//we got no more balls of this color
if (isLastColor(C)){
//this was the last color so it is a valid solution
save(D);
} else {
//this was not the last color, try next color
DistributeColor(D,nextColor(C))
}
} else {
//we still got balls
if (isNotLastBucket(B)) {
//This was not the last bucket let's try to fill the next one
DistributeBucket(D, nextBucket(B), C)
} else {
//this was the last bucket, so this distibution is not a solution. Let's do nothing (please don't kill yourself :/ )
}
}
//reset the balls for the next try
C.N+=i;
D.N+=i;
}
}
//it feel like déjà vu
if (isNotLastBucket(B)) {
//This was not the last bucket let's try to fill the next one
DistributeBucket(D, nextBucket(B), C)
} else {
//this was the last bucket, so this distribution is not a solution.
}
}
应该是......
gulp.src('scss/*.scss')