text:
What security is there against arbitrary government?John Gardner
Vol. 28 No. 5 · 9 March 2006
What security is there against arbitrary government?
Rhetoric and the Rule of Law: A Theory of Legal Reasoning
by Neil MacCormick.
Oxford, 287 pp., £40, July 2005, 0 19 826878 5Show More
The government of Securitania deports some supposed enemies of the people and puts others under house arrest; public scrutiny of these measures in the ordinary courts is denied. Disruptive people against whom no crime can be proved are subjected to orders obtained from magistrates on hearsay evidence that make it a crime in future for them to do ordinary things (such as going shopping) that would not be a crime if done by anyone else. A man thought to be acting suspiciously is shot dead by plainclothes police officers; the immediate reaction of the police chief is to obstruct the routine criminal investigation of the killing. Legislation is underway to criminalise the 'glorification' of those using force to resist oppressive policies at home and repressive regimes abroad; objections to the breadth and vagueness of the measure are met with the response that the authorities can be trusted to ensure that those engaging in legitimate debate will not be prosecuted. Do any of these developments make the people of Securitania more secure? Probably not. But in one way they clearly make them a lot less secure: the people of Securitania are progressively being deprived of the rudimentary security of living under the rule of law.
The rule of law is an ideal of good government. By calling it an ideal, I am not suggesting it is utopian. I mean only that it is a cluster of principles from which isolated departures may be inevitable even in a decent regime, but substantial and committed compliance with which is one key determinant of a regime's decency. The most basic principle is this: when we live under the rule of law, the agents of the state are legally and publicly accountable in the courts like everyone else, and the courts are independent enough of the (other) organs of state to make this accountability a significant check on state power. The government of Securitania does not ignore this principle. On the contrary, it uses its de facto control of the legislative assembly to secure the passage of laws that license it to do most of the things it does. Rarely does it actually break the law. But that is because it only rarely needs to break the law. The laws that it steers through the legislative assembly provide it with generous cover for most of the things that it is inclined to do. The result is that it becomes increasingly difficult for people in Securitania to rely on the law in advance of their actions to predict how they will fare in the event that their actions come to the attention of the authorities. The law gives the authorities extensive leeway to act against people or not as they choose. Those acted against have few and difficult legal avenues for complaint about their official treatment, and there is always a risk that the government will find some technically legal way to frustrate whatever complaints are launched through the courts. Therefore, people generally have to rely on the patronage or forbearance of petty officials to provide them with whatever security they enjoy against governmental abuses of power.
This goes to show that the rule of law is not only an ideal for government; it is also an ideal for law. The government of Securitania cannot pride itself on respecting the rule of law merely by ensuring that it and its officials always act within the law. If Securitanians are to live under the rule of law, the law itself must also live up to certain standards. It must be such as to give Securitanians reliable guidance in advance about where the line falls between what is permitted and what is proscribed, and to enable them to work out what will be the likely official reaction to their failure to stay on the right side of the line. The law therefore needs to be open, clear, stable, general, consistent and not retroactive, and must be complied with impartially (without fear or favour) by the officials charged with administering it. Without law that lives up to these standards, acting within the law is a hollow achievement for the government and a constant struggle for the population.
Failing to live up to the ideal of the rule of law represents one important way in which the law can be bad; but living up to the ideal is not enough by itself to make the law good. There are other important values for it to pursue apart from the reliability of its own guidance. Sometimes these values conflict with the rule of law and warrant departures from it. But it is not just a simple matter of weighing the rule of law against other ideals. That is because of what Bernard Williams called the 'Basic Legitimation Demand': government and law lose their legitimacy if they resort to using terror themselves in their efforts to protect us from terror – if they become, as Williams puts it, 'part of the problem'. The government is clearly becoming part of the problem in Securitania. But we should not lean so far in the opposite direction that we regard the law's ability to provide accessible guidance in advance as the be-all and end-all of legal policy. The tendency among lawyers to elevate 'legal certainty' to this position is one thing that has given the rule of law a bad name in progressive circles, and hence given succour to governments that look on themselves as progressive but have little commitment to the rule of law. Such governments regard the law, as filtered through the ideology of lawyers, as an obstacle to the pursuit of progressive social policies. Neil MacCormick's Rhetoric and the Rule of Law: A Theory of Legal Reasoning aims to moderate both poles in this debate: to temper the lawyer's enthusiasm for legal certainty, while insisting on the very great importance of the rule of law as an ideal – for government and law – that should animate and constrain progressive governments no less than others.
The book forms the second volume of MacCormick's grand project on 'Law, State and Practical Reason', of which the first volume, Questioning Sovereignty, was published in 1999. The project as a whole – intended to fill four volumes – addresses the most persistent general problems in the theory of law as they intersect with problems concerning state power. This second volume reprises a range of topics that MacCormick originally tackled in his 1978 classic, Legal Reasoning and Legal Theory. In the new book, he responds to his critics and to other relevant writings that have appeared in the meantime, and draws attention to the lessons that he has learned from his friends. MacCormick is constantly welcoming of new ideas and gives credit freely to others for seeing things that he missed. He sees insight and inspiration in everyone else's work, sometimes to a fault. For example, the book begins with the claim that it is 'a contribution to the "new rhetoric" pioneered by my late friend and respected senior colleague Chaim Perelman, along with Lucie Olbrechts-Tyteca'. This explains the reference to 'rhetoric' in the book's title, but in the end nothing turns on this conceptualisation of the book's project, and one wonders whether, apart from the opportunity for a kindness, the book would have lost anything by making no mention at all of rhetoric, new or otherwise.
The upshot of the book's wide range of reference and graciousness towards others is that it does not entirely work as a self-contained study of legal reasoning. In many cases one needs to trace the arguments backwards to see why the protagonists, including MacCormick, are saying what they are saying. It is partly to lend some unity to the many fragments of debate thus collected that MacCormick foregrounds the ideal of the rule of law. He deftly represents the main debates about the nature of legal reasoning as debates about the way legal reasoning is affected by the demands that the rule of law places on it. The rule of law requires that the law not be retroactive; but surely judges often arrive at new rulings which make a retroactive change in the law applicable to the parties appearing before them? The rule of law requires that the law be consistent; but surely legal reasoning often points in at least two inconsistent directions, so that either side in a dispute might reasonably expect to win? The rule of law requires that the law be stable and clear; but isn't it a 'commonplace', as MacCormick says, that 'the law on any point is perennially arguable'? As MacCormick brilliantly illustrates with case-law from several countries, such tensions are inevitable in any developed legal system, and cannot but be confronted by its lawyers and judges every day. Whatever the rule of law ideally expects the law to be like, it cannot expect absolute consistency, stability, clarity, generality and so on. Such absolutes would be irreconcilable with various characteristic and (up to a point) desirable features of legal reasoning itself.
What makes these features of legal reasoning desirable? Often, as MacCormick points out, they are made desirable by other aspects of the ideal of the rule of law. In many cases, in other words, the desiderata of the rule of law conflict among themselves, and insisting on one of them cannot but be at the expense of another. MacCormick offers a good example. Because the stakes are especially high, the rule of law demands that criminal laws be especially stable and predictable in their application. Yet it also insists on the right of the defence in a criminal trial to challenge all aspects of the prosecution case, including the interpretation of the law. 'There is no security against arbitrary government,' MacCormick observes, 'unless such challenges are freely permitted.' Such challenges tend, however, to destabilise the criminal law and make its application less predictable. So the rule of law is not just the rule of stability and predictability. So-called legal certainty 'is not the only value of, or present in, the rule of law, though it is one benefit which people rightly look to legislators and judges to confer on them so far as possible'. 'So far as possible' here means something like 'so far as the other desiderata of the rule of law allow'. MacCormick's point, reprised several times, is that the tensions endemic in legal reasoning – between generality and specificity, between stability and flexibility, between clarity and arguability, and so forth – often turn out to reflect conflicts not between the rule of law and some other ideal of legal policy, but between different demands of the rule of law itself. So the demands cannot possibly be interpreted as absolute: the rule of law needs to be understood as capable of compromising with itself.
MacCormick gives particular attention, and particularly lively attention, to the question of how much generality in legal reasoning the rule of law demands. The Securitanian trick of inventing special criminal offences for named individuals strays a long way from the acceptable. On the other hand, judges do need to be able to make rulings applicable to specific named individuals, and sometimes in the process they need to adapt the law to suit the unanticipated facts of a novel case. MacCormick sets the scene for this topic with Solomon's famous judgment in the 'Whose baby?' case. The case is problematic as an illustration of the special dilemmas of legal reasoning because it arguably involves no law at all. Arguably, Solomon in the story is not a judge but an arbitrator, free to decide on the raw merits of the case. Judges, as MacCormick notes, are never quite that free. They are always bound by at least some relevant law and (to add to their woes) the rulings they issue in particular cases often yield new law that will bind future judges. Modern case-law reveals the plight of judges trying to cope with Solomonic questions complicated by the fact that they are acting as both receivers and givers of law.
MacCormick points, by way of example, to the contortions of the Court of Appeal in the famous conjoined twins case of five years ago. When doctors must end the life of one conjoined twin to save the life of the other, does the law license the killing? The court struggled to decide the case within the existing law of murder without making any ruling that would be generalisable to other future cases. But how could it do so? Any exception to the general law of murder must be capable of some rational explanation, or else the court has no business making it. But if the exception is capable of rational explanation, the rational explanation is necessarily capable of re-application to any future case that falls under it, involving other people and other incidents. There is nothing that can properly be done to avoid that. There is no legitimate way for judges to avoid getting entangled with the generalisation of their rulings. The rule of law, to put it another way, requires rulings affecting named individuals to constitute applications of general rules affecting indefinite numbers of possible individuals. The Securitanian magistrates defy this principle by ruling that it will be a crime for some named person to go shopping, without explaining how going shopping is an instance of some more general crime that could be committed by other people.
It may be said that this has little to do with the rule of law. It just reflects a general principle of rational intelligibility, applicable to all realms of life. It applies no less to relations between friends or to the appreciation of the arts. 'What do you like about me?' 'What do you see in the work of Jasper Johns?' These are requests for further explanation of someone's reactions to specific people and objects. The answer, to be satisfactory, needs to cite facts about those people and objects which could in principle be repeated across an indefinite number of further objects and people. True, it is an interim answer to these questions to say: 'I don't know, it's just the way I feel.' This is an interim answer because it puts the absence of a further explanation down to ignorance. On the other hand, 'nothing' is not even an interim answer. If there is nothing about me that you like – no fact or combination of facts that grounds your liking, and hence that could in principle ground your liking of someone else – then you have no business liking me. Your position is unintelligible as the position of a reasonable human being. The law is no different. Never mind the rule of law: the law should be rationally intelligible.
Thinking along similar lines, MacCormick occasionally finds himself troubled by the thought that there is nothing special about legal reasoning. He writes, for example, that 'any commitment to impartiality between different individuals and different cases entails requiring that the grounds of judgment in this case be deemed repeatable in future cases,' and he makes clear that this requirement applies equally outside the law: 'There is . . . no justification without universalisation.' But these remarks are apt to mislead the unwary reader. As MacCormick goes on to point out, the rule of law demands much more in the way of impartiality and much more in the way of generality than is required by the ethics of ordinary non-legal life. Under the heading of impartiality, it requires judges who are not only open to reason, but also willing to stand up for the law without fear or favour; and that applies equally when the fear itself is reasonable, such that non-judges (politicians, police officers, members of the public) might naturally be expected to submit to it. Under the heading of generality, the rule of law requires not only rationally intelligible explanations for particular rulings, but also rationally intelligible explanations for particular rulings in terms of rules, considerations that could not only be used by other judges but can also bind them.
So it is never sufficient for the government of Securitania to point out that its proposed courses of action would be reasonable were it not for the law, with the implication that the law should be bending to the government's will rather than vice versa. If the country is to live under the rule of law – thereby meeting the Basic Legitimation Demand – then the law exists to make a difference to what can reasonably be done, and the judges and lawyers are there to insist on the law's making that difference even in the face of government hostility and pressure. (Hence the grave fears about the Legislative and Regulatory Reform Bill currently before Parliament. This outrageous bill would allow major changes to Parliamentary legislation to be undertaken directly by the government.)
The whole of this line of thought is present in MacCormick's book. But it is not present as a line of thought, and it is not conspicuous. It takes shape in fits and starts, almost fortuitously, as the book is pulled this way and that by the uneven and sometimes tangential interventions of other thinkers to whom the ever generous MacCormick feels impelled to respond. The result, although a subtle and thoughtful work by any standard, is a less luminous explanation of the nature of legal reasoning, and a less powerful defence of the rule of law, than we might have hoped for and expected from one of our most publicly engaged legal theorists.
It is not only in Securitania that the rule of law is under threat. Rarely has it been more important for the arguments of the ideal's ablest defenders to be well marshalled. In this respect Rhetoric and the Rule of Law disappoints: its excellent arguments are not as well marshalled as they could be.
John Gardner is the professor of jurisprudence at Oxford, and a fellow of University College.
How to Be a Good Judge: The Rule of Law
More by John Gardner


text:
Netflix Goes Disc-Free on PS3 Today, Adds Dolby 5.1
Posted by Evan Narcisse on October 18th
When Netflix's Watch Instantly library came to the Xbox 360 in 2008, the rental service extended its reach exponentially and helped Microsoft achieve part of their oft-stated goals to have the console be an all-purpose entertainment device.
For more than a year, the 360 was the only gaming console that let you access Netflix's streaming content. Then, last year, partnerships with Sony and Nintendo were announced to bring the same functionality to the Playstation 3 and the Wii. But, the catch with those consoles was that a special disc was needed to stream what you wanted from the Internet.
Now, Netflix is rolling out native support for the PS3 and the Wii with embedded applications that live in the interfaces of the two game machines. And the burlier technology of the PS3 makes this a monster update. As the video below shows, PS3 owners will now also get Dolby 5.1 Surround Sound and full HD 1080p resolution:
Meanwhile, Nintendo alone claims to have added 3 million Netflix users on the Wii, which highlights the biggest, best thing about Netflix's presence on these game consoles. The potential to grow movie appreciation amongst households is huge. As expected, you can find tons of action fare–"Crank 2: High Voltage" and "Gamer"–aimed at 18-to-34 males, but there's more than that. Criterion editions of classics like "Rashomon " and "The 400 Blows" are on Instant Watch, too, and certain TV shows make streamable versions of just-aired episodes within the same week.. Even better, the Xbox version of Netflix has an exclusive function where you can voice chat and watch a movie in sync with your friends. Granted, you're not getting the extras that you would on a DVD nor will it replicate everything you get from a multiplex. But, there's a lot to be said for being able to discover or recommend a great new film on a game console.

redpajama_set_name: RedPajamaCommonCrawl


Summerstay Sunday concerts at the cemetery St. Petrusbanden.
In the months of August and September there are no concerts at the St. Petrus Banden cemetery in the Netherlands. holidays.
On 7 October, 4 November and 2 December there are again wonderful concerts in collaboration with students from the Conservatory The Hague.
You do not have to sign up for the concerts.
Sunday morning September 30 there is a reflection morning under the guidance of philosophical practitioner Ties Ament. Walk-in at 10.30. Sign up via Astrid Oranje a.g.oranje@paxrkb.nl.


After concluding my Sacred Geometry exhibition of the Standing Stones of the Scottish Isles at Photospace and Carter Observatory they have now come home to rest and they would now be most happy to see prospective buyers who wish to view them. These images are of powerful megaliths that are over 5000 years old and would make a handsome statement on your wall !
I have put a range of photos of gorgeous babies and their families around the walls of the great local baby shop Infantesimal in Island Bay. You should have a look!
Sadly I Lost my companion of five and a half years, my staunch tabby cat Tiber this April. Isn't it just as well that we record the memories of our pets to look back on.
There are now some interesting new images of the standing stones in the Scottish Isles up on the travel page. Daylight in the Scottish winter was limited from 9am to 3pm so a lot of these images were taken at sunrise and sunset… in varying weather conditions. Sometimes when we got back for breakfast it took a good half an hour for our hands to thaw out, as the temperature was often well below freezing. However, the beautiful light that these conditions presented us with made our frozen fingers well worth it.
After a wondrous but rather savage time weather wise in the isles of Scotland, I return home to gorgeous warm Wellington weather.
Come the warmth of our New Zealand summer, I will be heading off cameras packed to the Orkney Isles in the middle of their snowy winter!
I'll put up more information in the next day or so.
After much uploading, decisions, and driving Shane nuts, I now have my brand new website up!!
Welcome to Jo's new blog.
This is soon to be the news and updates section of Jo's website.


text:
Q: Finding a number that is both a prime number and a palindrome I' fairly new to java. I have code in which a use inputs a number and the program check every number from 1 to n and outputs every number that is both a prime number and a palindrome. However my code doesn't output anything for some reason. There are no errors in the code, so I'm not sure what's wrong exactly. Here's my code:
import java.util.*;
public class Lab5
{
    public static void main (String[] args)  {
        Scanner scanner = new Scanner(System.in);
        System.out.println("Enter a value:");  //Asking the user to input     the value n
        int n =scanner.nextInt();
        for (int y=2; y<=n; y++) { //For every number from 2 to n
            prime(y);                     //the prime number is checked
            pal(y);                         //and so is the palindrome
            if ((prime(y)==true) && (pal(y)==true)) { //if a number is both a prime AND a palindrome (both methods are being compared here)
                System.out.println(y);                          //it is printed out
            }
    }
    }
    public static boolean prime(int n) { //the method for finding the prime number
        int x = 2;
        while (n%x>0) {
        x+=1;
        } if (x==n) {
            return true;
    } else {
            return false;
        }
    }

public static boolean pal(int n) { //the method for finding a palindrome
    int rev = 0;
    int rmd = 0;
    while (n>0) {
        rmd = n%10;
        rev = rev*10 + rmd;
        n = n/10;
    } if (rev==n) {
        return true;
    } else {
        return false;
    }
}

}

A: Your palindrome method is returning wrong result.
You are modifying n and after then comparing with reversed number.
First save that value then compare after while loop
int number = n;
If(rev == number)  return true;

A: You are mistaking in your pal() function. Your n variable is getting 0 and you are comparing it to reverse no.
Assign that variable to a temp variable and then compare. I made some changes to your code and it working great.
import java.util.*;
public class A
{
    public static void main (String[] args)  {
        Scanner scanner = new Scanner(System.in);
        System.out.println("Enter a value:");  //Asking the user to input     the value n
        int n =scanner.nextInt();
        for(int i=2;i<=n;i++){
            if (prime(i) && pal(i)) { //if a number is both a prime AND a palindrome (both methods are being compared here)
                System.out.println(i);                          //it is printed out
            }
        }
    }
    public static boolean prime(int n) { //the method for finding the prime number
        int x = 2;
        while (n%x>0) {
            x+=1;
        } if (x==n) {
            return true;
        } else {
            return false;
        }
    }
    public static boolean pal(int n) { //the method for finding a palindrome
        int rev = 0;
            int rmd = 0;
        int temp = n;
            while (n>0) {
                rmd = n%10;
                rev = rev*10 + rmd;
                n = n/10;
            }
        if (rev==temp){
                return true;
            }else{
                return false;
            }
    }
}

Output :

redpajama_set_name: RedPajamaStackExchange


text:
using base::StringPiece;
using std::min;
using testing::CreateFunctor;
using testing::InSequence;
using testing::Invoke;
using testing::Return;
using testing::SaveArg;
using testing::StrictMock;
using testing::WithArgs;
using testing::_;

namespace net {
namespace test {
namespace {

const char kData1[] = "FooAndBar";
const char kData2[] = "EepAndBaz";
const size_t kDataLen = 9;
const bool kIsServer = true;
const bool kShouldProcessData = true;

class TestStream : public ReliableQuicStream {
 public:
  TestStream(QuicStreamId id,
             QuicSession* session,
             bool should_process_data)
      : ReliableQuicStream(id, session),
        should_process_data_(should_process_data) {}

  virtual uint32 ProcessRawData(const char* data, uint32 data_len) OVERRIDE {
    EXPECT_NE(0u, data_len);
    DVLOG(1) << "ProcessData data_len: " << data_len;
    data_ += string(data, data_len);
    return should_process_data_ ? data_len : 0;
  }

  virtual QuicPriority EffectivePriority() const OVERRIDE {
    return QuicUtils::HighestPriority();
  }

  using ReliableQuicStream::WriteOrBufferData;
  using ReliableQuicStream::CloseReadSide;
  using ReliableQuicStream::CloseWriteSide;
  using ReliableQuicStream::OnClose;

 private:
  bool should_process_data_;
  string data_;
};

class ReliableQuicStreamTest : public ::testing::TestWithParam<bool> {
 public:
  ReliableQuicStreamTest()
      : initial_flow_control_window_bytes_(kMaxPacketSize),
        zero_(QuicTime::Delta::Zero()),
        supported_versions_(QuicSupportedVersions()) {
    headers_[":host"] = "www.google.com";
    headers_[":path"] = "/index.hml";
    headers_[":scheme"] = "https";
    headers_["cookie"] =
        "__utma=208381060.1228362404.1372200928.1372200928.1372200928.1; "
        "__utmc=160408618; "
        "GX=DQAAAOEAAACWJYdewdE9rIrW6qw3PtVi2-d729qaa-74KqOsM1NVQblK4VhX"
        "hoALMsy6HOdDad2Sz0flUByv7etmo3mLMidGrBoljqO9hSVA40SLqpG_iuKKSHX"
        "RW3Np4bq0F0SDGDNsW0DSmTS9ufMRrlpARJDS7qAI6M3bghqJp4eABKZiRqebHT"
        "pMU-RXvTI5D5oCF1vYxYofH_l1Kviuiy3oQ1kS1enqWgbhJ2t61_SNdv-1XJIS0"
        "O3YeHLmVCs62O6zp89QwakfAWK9d3IDQvVSJzCQsvxvNIvaZFa567MawWlXg0Rh"
        "1zFMi5vzcns38-8_Sns; "
        "GA=v*2%2Fmem*57968640*47239936%2Fmem*57968640*47114716%2Fno-nm-"
        "yj*15%2Fno-cc-yj*5%2Fpc-ch*133685%2Fpc-s-cr*133947%2Fpc-s-t*1339"
        "47%2Fno-nm-yj*4%2Fno-cc-yj*1%2Fceft-as*1%2Fceft-nqas*0%2Fad-ra-c"
        "v_p%2Fad-nr-cv_p-f*1%2Fad-v-cv_p*859%2Fad-ns-cv_p-f*1%2Ffn-v-ad%"
        "2Fpc-t*250%2Fpc-cm*461%2Fpc-s-cr*722%2Fpc-s-t*722%2Fau_p*4"
        "SICAID=AJKiYcHdKgxum7KMXG0ei2t1-W4OD1uW-ecNsCqC0wDuAXiDGIcT_HA2o1"
        "3Rs1UKCuBAF9g8rWNOFbxt8PSNSHFuIhOo2t6bJAVpCsMU5Laa6lewuTMYI8MzdQP"
        "ARHKyW-koxuhMZHUnGBJAM1gJODe0cATO_KGoX4pbbFxxJ5IicRxOrWK_5rU3cdy6"
        "edlR9FsEdH6iujMcHkbE5l18ehJDwTWmBKBzVD87naobhMMrF6VvnDGxQVGp9Ir_b"
        "Rgj3RWUoPumQVCxtSOBdX0GlJOEcDTNCzQIm9BSfetog_eP_TfYubKudt5eMsXmN6"
        "QnyXHeGeK2UINUzJ-D30AFcpqYgH9_1BvYSpi7fc7_ydBU8TaD8ZRxvtnzXqj0RfG"
        "tuHghmv3aD-uzSYJ75XDdzKdizZ86IG6Fbn1XFhYZM-fbHhm3mVEXnyRW4ZuNOLFk"
        "Fas6LMcVC6Q8QLlHYbXBpdNFuGbuZGUnav5C-2I_-46lL0NGg3GewxGKGHvHEfoyn"
        "EFFlEYHsBQ98rXImL8ySDycdLEFvBPdtctPmWCfTxwmoSMLHU2SCVDhbqMWU5b0yr"
        "JBCScs_ejbKaqBDoB7ZGxTvqlrB__2ZmnHHjCr8RgMRtKNtIeuZAo ";
  }

  void set_supported_versions(const QuicVersionVector& versions) {
    supported_versions_ = versions;
  }

  void Initialize(bool stream_should_process_data) {
    connection_ =
        new StrictMock<MockConnection>(kIsServer, supported_versions_);
    session_.reset(new StrictMock<MockSession>(connection_));

    // New streams rely on having the peer's flow control receive window
    // negotiated in the config.
    QuicConfigPeer::SetReceivedInitialFlowControlWindow(
        session_->config(), initial_flow_control_window_bytes_);
    QuicConfigPeer::SetReceivedInitialStreamFlowControlWindow(
        session_->config(), initial_flow_control_window_bytes_);

    stream_.reset(new TestStream(kHeadersStreamId, session_.get(),
                                 stream_should_process_data));
    write_blocked_list_ =
        QuicSessionPeer::GetWriteBlockedStreams(session_.get());
  }

  bool fin_sent() { return ReliableQuicStreamPeer::FinSent(stream_.get()); }
  bool rst_sent() { return ReliableQuicStreamPeer::RstSent(stream_.get()); }

  void set_initial_flow_control_window_bytes(uint32 val) {
    initial_flow_control_window_bytes_ = val;
  }

  bool HasWriteBlockedStreams() {
    return write_blocked_list_->HasWriteBlockedCryptoOrHeadersStream() ||
           write_blocked_list_->HasWriteBlockedDataStreams();
  }

 protected:
  MockConnection* connection_;
  scoped_ptr<MockSession> session_;
  scoped_ptr<TestStream> stream_;
  SpdyHeaderBlock headers_;
  QuicWriteBlockedList* write_blocked_list_;
  uint32 initial_flow_control_window_bytes_;
  QuicTime::Delta zero_;
  QuicVersionVector supported_versions_;
};

TEST_F(ReliableQuicStreamTest, WriteAllData) {
  Initialize(kShouldProcessData);

  size_t length = 1 + QuicPacketCreator::StreamFramePacketOverhead(
      connection_->version(), PACKET_8BYTE_CONNECTION_ID, !kIncludeVersion,
      PACKET_6BYTE_SEQUENCE_NUMBER, 0u, NOT_IN_FEC_GROUP);
  QuicConnectionPeer::GetPacketCreator(connection_)->set_max_packet_length(
      length);

  EXPECT_CALL(*session_, WritevData(kHeadersStreamId, _, _, _, _, _)).WillOnce(
      Return(QuicConsumedData(kDataLen, true)));
  stream_->WriteOrBufferData(kData1, false, NULL);
  EXPECT_FALSE(HasWriteBlockedStreams());
}

TEST_F(ReliableQuicStreamTest, NoBlockingIfNoDataOrFin) {
  Initialize(kShouldProcessData);

  // Write no data and no fin.  If we consume nothing we should not be write
  // blocked.
  EXPECT_DFATAL(stream_->WriteOrBufferData(StringPiece(), false, NULL), "");
  EXPECT_FALSE(HasWriteBlockedStreams());
}

TEST_F(ReliableQuicStreamTest, BlockIfOnlySomeDataConsumed) {
  Initialize(kShouldProcessData);

  // Write some data and no fin.  If we consume some but not all of the data,
  // we should be write blocked a not all the data was consumed.
  EXPECT_CALL(*session_, WritevData(kHeadersStreamId, _, _, _, _, _))
      .WillOnce(Return(QuicConsumedData(1, false)));
  stream_->WriteOrBufferData(StringPiece(kData1, 2), false, NULL);
  ASSERT_EQ(1u, write_blocked_list_->NumBlockedStreams());
}

TEST_F(ReliableQuicStreamTest, BlockIfFinNotConsumedWithData) {
  Initialize(kShouldProcessData);

  // Write some data and no fin.  If we consume all the data but not the fin,
  // we should be write blocked because the fin was not consumed.
  // (This should never actually happen as the fin should be sent out with the
  // last data)
  EXPECT_CALL(*session_, WritevData(kHeadersStreamId, _, _, _, _, _))
      .WillOnce(Return(QuicConsumedData(2, false)));
  stream_->WriteOrBufferData(StringPiece(kData1, 2), true, NULL);
  ASSERT_EQ(1u, write_blocked_list_->NumBlockedStreams());
}

TEST_F(ReliableQuicStreamTest, BlockIfSoloFinNotConsumed) {
  Initialize(kShouldProcessData);

  // Write no data and a fin.  If we consume nothing we should be write blocked,
  // as the fin was not consumed.
  EXPECT_CALL(*session_, WritevData(kHeadersStreamId, _, _, _, _, _))
      .WillOnce(Return(QuicConsumedData(0, false)));
  stream_->WriteOrBufferData(StringPiece(), true, NULL);
  ASSERT_EQ(1u, write_blocked_list_->NumBlockedStreams());
}

TEST_F(ReliableQuicStreamTest, WriteOrBufferData) {
  Initialize(kShouldProcessData);

  EXPECT_FALSE(HasWriteBlockedStreams());
  size_t length = 1 + QuicPacketCreator::StreamFramePacketOverhead(
      connection_->version(), PACKET_8BYTE_CONNECTION_ID, !kIncludeVersion,
      PACKET_6BYTE_SEQUENCE_NUMBER, 0u, NOT_IN_FEC_GROUP);
  QuicConnectionPeer::GetPacketCreator(connection_)->set_max_packet_length(
      length);

  EXPECT_CALL(*session_, WritevData(_, _, _, _, _, _)).WillOnce(
      Return(QuicConsumedData(kDataLen - 1, false)));
  stream_->WriteOrBufferData(kData1, false, NULL);
  EXPECT_TRUE(HasWriteBlockedStreams());

  // Queue a bytes_consumed write.
  stream_->WriteOrBufferData(kData2, false, NULL);

  // Make sure we get the tail of the first write followed by the bytes_consumed
  InSequence s;
  EXPECT_CALL(*session_, WritevData(_, _, _, _, _, _)).
      WillOnce(Return(QuicConsumedData(1, false)));
  EXPECT_CALL(*session_, WritevData(_, _, _, _, _, _)).
      WillOnce(Return(QuicConsumedData(kDataLen - 2, false)));
  stream_->OnCanWrite();

  // And finally the end of the bytes_consumed.
  EXPECT_CALL(*session_, WritevData(_, _, _, _, _, _)).
      WillOnce(Return(QuicConsumedData(2, true)));
  stream_->OnCanWrite();
}

TEST_F(ReliableQuicStreamTest, WriteOrBufferDataWithFecProtectAlways) {
  Initialize(kShouldProcessData);

  // Set FEC policy on stream.
  ReliableQuicStreamPeer::SetFecPolicy(stream_.get(), FEC_PROTECT_ALWAYS);

  EXPECT_FALSE(HasWriteBlockedStreams());
  size_t length = 1 + QuicPacketCreator::StreamFramePacketOverhead(
      connection_->version(), PACKET_8BYTE_CONNECTION_ID, !kIncludeVersion,
      PACKET_6BYTE_SEQUENCE_NUMBER, 0u, IN_FEC_GROUP);
  QuicConnectionPeer::GetPacketCreator(connection_)->set_max_packet_length(
      length);

  // Write first data onto stream, which will cause one session write.
  EXPECT_CALL(*session_, WritevData(_, _, _, _, MUST_FEC_PROTECT, _)).WillOnce(
      Return(QuicConsumedData(kDataLen - 1, false)));
  stream_->WriteOrBufferData(kData1, false, NULL);
  EXPECT_TRUE(HasWriteBlockedStreams());

  // Queue a bytes_consumed write.
  stream_->WriteOrBufferData(kData2, false, NULL);

  // Make sure we get the tail of the first write followed by the bytes_consumed
  InSequence s;
  EXPECT_CALL(*session_, WritevData(_, _, _, _, MUST_FEC_PROTECT, _)).
      WillOnce(Return(QuicConsumedData(1, false)));
  EXPECT_CALL(*session_, WritevData(_, _, _, _, MUST_FEC_PROTECT, _)).
      WillOnce(Return(QuicConsumedData(kDataLen - 2, false)));
  stream_->OnCanWrite();

  // And finally the end of the bytes_consumed.
  EXPECT_CALL(*session_, WritevData(_, _, _, _, MUST_FEC_PROTECT, _)).
      WillOnce(Return(QuicConsumedData(2, true)));
  stream_->OnCanWrite();
}

TEST_F(ReliableQuicStreamTest, WriteOrBufferDataWithFecProtectOptional) {
  Initialize(kShouldProcessData);

  // Set FEC policy on stream.
  ReliableQuicStreamPeer::SetFecPolicy(stream_.get(), FEC_PROTECT_OPTIONAL);

  EXPECT_FALSE(HasWriteBlockedStreams());
  size_t length = 1 + QuicPacketCreator::StreamFramePacketOverhead(
      connection_->version(), PACKET_8BYTE_CONNECTION_ID, !kIncludeVersion,
      PACKET_6BYTE_SEQUENCE_NUMBER, 0u, NOT_IN_FEC_GROUP);
  QuicConnectionPeer::GetPacketCreator(connection_)->set_max_packet_length(
      length);

  // Write first data onto stream, which will cause one session write.
  EXPECT_CALL(*session_, WritevData(_, _, _, _, MAY_FEC_PROTECT, _)).WillOnce(
      Return(QuicConsumedData(kDataLen - 1, false)));
  stream_->WriteOrBufferData(kData1, false, NULL);
  EXPECT_TRUE(HasWriteBlockedStreams());

  // Queue a bytes_consumed write.
  stream_->WriteOrBufferData(kData2, false, NULL);

  // Make sure we get the tail of the first write followed by the bytes_consumed
  InSequence s;
  EXPECT_CALL(*session_, WritevData(_, _, _, _, MAY_FEC_PROTECT, _)).
      WillOnce(Return(QuicConsumedData(1, false)));
  EXPECT_CALL(*session_, WritevData(_, _, _, _, MAY_FEC_PROTECT, _)).
      WillOnce(Return(QuicConsumedData(kDataLen - 2, false)));
  stream_->OnCanWrite();

  // And finally the end of the bytes_consumed.
  EXPECT_CALL(*session_, WritevData(_, _, _, _, MAY_FEC_PROTECT, _)).
      WillOnce(Return(QuicConsumedData(2, true)));
  stream_->OnCanWrite();
}

TEST_F(ReliableQuicStreamTest, ConnectionCloseAfterStreamClose) {
  Initialize(kShouldProcessData);

  stream_->CloseReadSide();
  stream_->CloseWriteSide();
  EXPECT_EQ(QUIC_STREAM_NO_ERROR, stream_->stream_error());
  EXPECT_EQ(QUIC_NO_ERROR, stream_->connection_error());
  stream_->OnConnectionClosed(QUIC_INTERNAL_ERROR, false);
  EXPECT_EQ(QUIC_STREAM_NO_ERROR, stream_->stream_error());
  EXPECT_EQ(QUIC_NO_ERROR, stream_->connection_error());
}

TEST_F(ReliableQuicStreamTest, RstAlwaysSentIfNoFinSent) {
  // For flow control accounting, a stream must send either a FIN or a RST frame
  // before termination.
  // Test that if no FIN has been sent, we send a RST.

  Initialize(kShouldProcessData);
  EXPECT_FALSE(fin_sent());
  EXPECT_FALSE(rst_sent());

  // Write some data, with no FIN.
  EXPECT_CALL(*session_, WritevData(kHeadersStreamId, _, _, _, _, _))
      .WillOnce(Return(QuicConsumedData(1, false)));
  stream_->WriteOrBufferData(StringPiece(kData1, 1), false, NULL);
  EXPECT_FALSE(fin_sent());
  EXPECT_FALSE(rst_sent());

  // Now close the stream, and expect that we send a RST.
  EXPECT_CALL(*session_, SendRstStream(_, _, _));
  stream_->OnClose();
  EXPECT_FALSE(fin_sent());
  EXPECT_TRUE(rst_sent());
}

TEST_F(ReliableQuicStreamTest, RstNotSentIfFinSent) {
  // For flow control accounting, a stream must send either a FIN or a RST frame
  // before termination.
  // Test that if a FIN has been sent, we don't also send a RST.

  Initialize(kShouldProcessData);
  EXPECT_FALSE(fin_sent());
  EXPECT_FALSE(rst_sent());

  // Write some data, with FIN.
  EXPECT_CALL(*session_, WritevData(kHeadersStreamId, _, _, _, _, _))
      .WillOnce(Return(QuicConsumedData(1, true)));
  stream_->WriteOrBufferData(StringPiece(kData1, 1), true, NULL);
  EXPECT_TRUE(fin_sent());
  EXPECT_FALSE(rst_sent());

  // Now close the stream, and expect that we do not send a RST.
  stream_->OnClose();
  EXPECT_TRUE(fin_sent());
  EXPECT_FALSE(rst_sent());
}

TEST_F(ReliableQuicStreamTest, OnlySendOneRst) {
  // For flow control accounting, a stream must send either a FIN or a RST frame
  // before termination.
  // Test that if a stream sends a RST, it doesn't send an additional RST during
  // OnClose() (this shouldn't be harmful, but we shouldn't do it anyway...)

  Initialize(kShouldProcessData);
  EXPECT_FALSE(fin_sent());
  EXPECT_FALSE(rst_sent());

  // Reset the stream.
  const int expected_resets = 1;
  EXPECT_CALL(*session_, SendRstStream(_, _, _)).Times(expected_resets);
  stream_->Reset(QUIC_STREAM_CANCELLED);
  EXPECT_FALSE(fin_sent());
  EXPECT_TRUE(rst_sent());

  // Now close the stream (any further resets being sent would break the
  // expectation above).
  stream_->OnClose();
  EXPECT_FALSE(fin_sent());
  EXPECT_TRUE(rst_sent());
}

TEST_F(ReliableQuicStreamTest, StreamFlowControlMultipleWindowUpdates) {
  ValueRestore<bool> old_flag(&FLAGS_enable_quic_stream_flow_control_2, true);
  set_initial_flow_control_window_bytes(1000);

  Initialize(kShouldProcessData);

  // If we receive multiple WINDOW_UPDATES (potentially out of order), then we
  // want to make sure we latch the largest offset we see.

  // Initially should be default.
  EXPECT_EQ(
      initial_flow_control_window_bytes_,
      QuicFlowControllerPeer::SendWindowOffset(stream_->flow_controller()));

  // Check a single WINDOW_UPDATE results in correct offset.
  QuicWindowUpdateFrame window_update_1(stream_->id(), 1234);
  stream_->OnWindowUpdateFrame(window_update_1);
  EXPECT_EQ(
      window_update_1.byte_offset,
      QuicFlowControllerPeer::SendWindowOffset(stream_->flow_controller()));

  // Now send a few more WINDOW_UPDATES and make sure that only the largest is
  // remembered.
  QuicWindowUpdateFrame window_update_2(stream_->id(), 1);
  QuicWindowUpdateFrame window_update_3(stream_->id(), 9999);
  QuicWindowUpdateFrame window_update_4(stream_->id(), 5678);
  stream_->OnWindowUpdateFrame(window_update_2);
  stream_->OnWindowUpdateFrame(window_update_3);
  stream_->OnWindowUpdateFrame(window_update_4);
  EXPECT_EQ(
      window_update_3.byte_offset,
      QuicFlowControllerPeer::SendWindowOffset(stream_->flow_controller()));
}

TEST_F(ReliableQuicStreamTest, StreamFlowControlShouldNotBlockInLessThanQ017) {
  // TODO(rjshade): Remove this test when we no longer have any versions <
  //                QUIC_VERSION_17.
  ValueRestore<bool> old_flag(&FLAGS_enable_quic_stream_flow_control_2, true);

  // Make sure we are using a version which does not support flow control.
  QuicVersion kTestQuicVersions[] = {QUIC_VERSION_16};
  QuicVersionVector versions;
  for (size_t i = 0; i < arraysize(kTestQuicVersions); ++i) {
    versions.push_back(kTestQuicVersions[i]);
  }
  set_supported_versions(versions);

  // Peer is not talking QUIC_VERSION_17 so assumes that it can send a zero
  // length flow control receive window with no consequences.
  set_initial_flow_control_window_bytes(0);

  Initialize(kShouldProcessData);

  // The stream should _not_ be flow control blocked, because we are not talking
  // a version which has flow control enabled.
  EXPECT_FALSE(stream_->flow_controller()->IsBlocked());
}

void SaveProxyAckNotifierDelegate(
    scoped_refptr<QuicAckNotifier::DelegateInterface>* delegate_out,
    QuicAckNotifier::DelegateInterface* delegate) {
  *delegate_out = delegate;
}

TEST_F(ReliableQuicStreamTest, WriteOrBufferDataWithQuicAckNotifier) {
  Initialize(kShouldProcessData);

  scoped_refptr<MockAckNotifierDelegate> delegate(
      new StrictMock<MockAckNotifierDelegate>);

  const int kDataSize = 16 * 1024;
  const string kData(kDataSize, 'a');

  const int kFirstWriteSize = 100;
  const int kSecondWriteSize = 50;
  const int kLastWriteSize = kDataSize - kFirstWriteSize - kSecondWriteSize;

  // Set a large flow control send window so this doesn't interfere with test.
  stream_->flow_controller()->UpdateSendWindowOffset(kDataSize + 1);
  if (FLAGS_enable_quic_connection_flow_control_2) {
    session_->flow_controller()->UpdateSendWindowOffset(kDataSize + 1);
  }

  scoped_refptr<QuicAckNotifier::DelegateInterface> proxy_delegate;

  EXPECT_CALL(*session_, WritevData(kHeadersStreamId, _, _, _, _, _))
      .WillOnce(DoAll(WithArgs<5>(Invoke(CreateFunctor(
                          &SaveProxyAckNotifierDelegate, &proxy_delegate))),
                      Return(QuicConsumedData(kFirstWriteSize, false))));
  stream_->WriteOrBufferData(kData, false, delegate.get());
  EXPECT_TRUE(HasWriteBlockedStreams());

  EXPECT_CALL(*session_,
              WritevData(kHeadersStreamId, _, _, _, _, proxy_delegate.get()))
      .WillOnce(Return(QuicConsumedData(kSecondWriteSize, false)));
  stream_->OnCanWrite();

  // No ack expected for an empty write.
  EXPECT_CALL(*session_,
              WritevData(kHeadersStreamId, _, _, _, _, proxy_delegate.get()))
      .WillOnce(Return(QuicConsumedData(0, false)));
  stream_->OnCanWrite();

  EXPECT_CALL(*session_,
              WritevData(kHeadersStreamId, _, _, _, _, proxy_delegate.get()))
      .WillOnce(Return(QuicConsumedData(kLastWriteSize, false)));
  stream_->OnCanWrite();

  // There were two writes, so OnAckNotification is not propagated
  // until the third Ack arrives.
  proxy_delegate->OnAckNotification(1, 2, 3, 4, zero_);
  proxy_delegate->OnAckNotification(10, 20, 30, 40, zero_);

  // The arguments to delegate->OnAckNotification are the sum of the
  // arguments to proxy_delegate OnAckNotification calls.
  EXPECT_CALL(*delegate, OnAckNotification(111, 222, 333, 444, zero_));
  proxy_delegate->OnAckNotification(100, 200, 300, 400, zero_);
}

// Verify delegate behavior when packets are acked before the
// WritevData call that sends out the last byte.
TEST_F(ReliableQuicStreamTest, WriteOrBufferDataAckNotificationBeforeFlush) {
  Initialize(kShouldProcessData);

  scoped_refptr<MockAckNotifierDelegate> delegate(
      new StrictMock<MockAckNotifierDelegate>);

  const int kDataSize = 16 * 1024;
  const string kData(kDataSize, 'a');

  const int kInitialWriteSize = 100;

  // Set a large flow control send window so this doesn't interfere with test.
  stream_->flow_controller()->UpdateSendWindowOffset(kDataSize + 1);
  if (FLAGS_enable_quic_connection_flow_control_2) {
    session_->flow_controller()->UpdateSendWindowOffset(kDataSize + 1);
  }

  scoped_refptr<QuicAckNotifier::DelegateInterface> proxy_delegate;

  EXPECT_CALL(*session_, WritevData(kHeadersStreamId, _, _, _, _, _))
      .WillOnce(DoAll(WithArgs<5>(Invoke(CreateFunctor(
                          &SaveProxyAckNotifierDelegate, &proxy_delegate))),
                      Return(QuicConsumedData(kInitialWriteSize, false))));
  stream_->WriteOrBufferData(kData, false, delegate.get());
  EXPECT_TRUE(HasWriteBlockedStreams());

  // Handle the ack of the first write.
  proxy_delegate->OnAckNotification(1, 2, 3, 4, zero_);
  proxy_delegate = NULL;

  EXPECT_CALL(*session_, WritevData(kHeadersStreamId, _, _, _, _, _)).WillOnce(
      DoAll(WithArgs<5>(Invoke(CreateFunctor(
                &SaveProxyAckNotifierDelegate, &proxy_delegate))),
            Return(QuicConsumedData(kDataSize - kInitialWriteSize, false))));
  stream_->OnCanWrite();

  // Handle the ack for the second write.
  EXPECT_CALL(*delegate, OnAckNotification(101, 202, 303, 404, zero_));
  proxy_delegate->OnAckNotification(100, 200, 300, 400, zero_);
}

// Verify delegate behavior when WriteOrBufferData does not buffer.
TEST_F(ReliableQuicStreamTest, WriteAndBufferDataWithAckNotiferNoBuffer) {
  Initialize(kShouldProcessData);

  scoped_refptr<MockAckNotifierDelegate> delegate(
      new StrictMock<MockAckNotifierDelegate>);

  scoped_refptr<QuicAckNotifier::DelegateInterface> proxy_delegate;

  EXPECT_CALL(*session_, WritevData(kHeadersStreamId, _, _, _, _, _))
      .WillOnce(DoAll(WithArgs<5>(Invoke(CreateFunctor(
                          &SaveProxyAckNotifierDelegate, &proxy_delegate))),
                      Return(QuicConsumedData(kDataLen, true))));
  stream_->WriteOrBufferData(kData1, true, delegate.get());
  EXPECT_FALSE(HasWriteBlockedStreams());

  // Handle the ack.
  EXPECT_CALL(*delegate, OnAckNotification(1, 2, 3, 4, zero_));
  proxy_delegate->OnAckNotification(1, 2, 3, 4, zero_);
}

// Verify delegate behavior when WriteOrBufferData buffers all the data.
TEST_F(ReliableQuicStreamTest, BufferOnWriteAndBufferDataWithAckNotifer) {
  Initialize(kShouldProcessData);

  scoped_refptr<MockAckNotifierDelegate> delegate(
      new StrictMock<MockAckNotifierDelegate>);

  scoped_refptr<QuicAckNotifier::DelegateInterface> proxy_delegate;

  EXPECT_CALL(*session_, WritevData(kHeadersStreamId, _, _, _, _, _))
      .WillOnce(Return(QuicConsumedData(0, false)));
  stream_->WriteOrBufferData(kData1, true, delegate.get());
  EXPECT_TRUE(HasWriteBlockedStreams());

  EXPECT_CALL(*session_, WritevData(kHeadersStreamId, _, _, _, _, _))
      .WillOnce(DoAll(WithArgs<5>(Invoke(CreateFunctor(
                          &SaveProxyAckNotifierDelegate, &proxy_delegate))),
                      Return(QuicConsumedData(kDataLen, true))));
  stream_->OnCanWrite();

  // Handle the ack.
  EXPECT_CALL(*delegate, OnAckNotification(1, 2, 3, 4, zero_));
  proxy_delegate->OnAckNotification(1, 2, 3, 4, zero_);
}

// Verify delegate behavior when WriteOrBufferData when the FIN is
// sent out in a different packet.
TEST_F(ReliableQuicStreamTest, WriteAndBufferDataWithAckNotiferOnlyFinRemains) {
  Initialize(kShouldProcessData);

  scoped_refptr<MockAckNotifierDelegate> delegate(
      new StrictMock<MockAckNotifierDelegate>);

  scoped_refptr<QuicAckNotifier::DelegateInterface> proxy_delegate;

  EXPECT_CALL(*session_, WritevData(kHeadersStreamId, _, _, _, _, _))
      .WillOnce(DoAll(WithArgs<5>(Invoke(CreateFunctor(
                          &SaveProxyAckNotifierDelegate, &proxy_delegate))),
                      Return(QuicConsumedData(kDataLen, false))));
  stream_->WriteOrBufferData(kData1, true, delegate.get());
  EXPECT_TRUE(HasWriteBlockedStreams());

  EXPECT_CALL(*session_, WritevData(kHeadersStreamId, _, _, _, _, _))
      .WillOnce(DoAll(WithArgs<5>(Invoke(CreateFunctor(
                          &SaveProxyAckNotifierDelegate, &proxy_delegate))),
                      Return(QuicConsumedData(0, true))));
  stream_->OnCanWrite();

  // Handle the acks.
  proxy_delegate->OnAckNotification(1, 2, 3, 4, zero_);
  EXPECT_CALL(*delegate, OnAckNotification(11, 22, 33, 44, zero_));
  proxy_delegate->OnAckNotification(10, 20, 30, 40, zero_);
}

// Verify that when we receive a packet which violates flow control (i.e. sends
// too much data on the stream) that the stream sequencer never sees this frame,
// as we check for violation and close the connection early.
TEST_F(ReliableQuicStreamTest,
       StreamSequencerNeverSeesPacketsViolatingFlowControl) {
  ValueRestore<bool> old_stream_flag(
      &FLAGS_enable_quic_stream_flow_control_2, true);
  ValueRestore<bool> old_connection_flag(
      &FLAGS_enable_quic_connection_flow_control_2, true);

  Initialize(kShouldProcessData);

  // Receive a stream frame that violates flow control: the byte offset is
  // higher than the receive window offset.
  QuicStreamFrame frame(stream_->id(), false,
                        kInitialSessionFlowControlWindowForTest + 1,
                        MakeIOVector("."));
  EXPECT_GT(frame.offset, QuicFlowControllerPeer::ReceiveWindowOffset(
                              stream_->flow_controller()));

  // Stream should not accept the frame, and the connection should be closed.
  EXPECT_CALL(*connection_,
              SendConnectionClose(QUIC_FLOW_CONTROL_RECEIVED_TOO_MUCH_DATA));
  EXPECT_FALSE(stream_->OnStreamFrame(frame));
}

TEST_F(ReliableQuicStreamTest, FinalByteOffsetFromFin) {
  Initialize(kShouldProcessData);

  EXPECT_FALSE(stream_->HasFinalReceivedByteOffset());

  QuicStreamFrame stream_frame_no_fin(stream_->id(), false, 1234,
                                      MakeIOVector("."));
  stream_->OnStreamFrame(stream_frame_no_fin);
  EXPECT_FALSE(stream_->HasFinalReceivedByteOffset());

  QuicStreamFrame stream_frame_with_fin(stream_->id(), true, 1234,
                                        MakeIOVector("."));
  stream_->OnStreamFrame(stream_frame_with_fin);
  EXPECT_TRUE(stream_->HasFinalReceivedByteOffset());
}

TEST_F(ReliableQuicStreamTest, FinalByteOffsetFromRst) {
  Initialize(kShouldProcessData);

  EXPECT_FALSE(stream_->HasFinalReceivedByteOffset());
  QuicRstStreamFrame rst_frame(stream_->id(), QUIC_STREAM_CANCELLED, 1234);
  stream_->OnStreamReset(rst_frame);
  EXPECT_TRUE(stream_->HasFinalReceivedByteOffset());
}

}  // namespace
}  // namespace test
}  // namespace net

redpajama_set_name: RedPajamaGithub


text:
require 'spec_helper'
describe 'check_mk::agent::service', :type => :class do

  context 'all' do
    it { should contain_class('check_mk::agent::service') }
    it { should contain_service('xinetd').with({
           :ensure => 'running',
           :enable => true,
       })
    }
  end

  context 'Debian 7' do
    let :facts do
      {
          :operatingsystem           => 'Debian',
          :operatingsystemmajrelease => '7',
      }
    end
    it { should contain_class('check_mk::agent::service') }
    it { should contain_service('xinetd').with({
          :ensure    => 'running',
          :enable    => true,
          :hasstatus => false,
      })
    }
  end

end


Is this the end of any freedom?
ROCKIT is now facing a bizarre situation set off by a simple video you can find here on the right side of the homepage.
The use of the expression Do It Yourself by the journalist, vj and writer Carlo Pastore has created a real fuss about the role of this MTV vj who is not alleged- critics say- to express an indie concept as he works for a commercial network.
Fans, journalists and musicians have created a huge discussion on this theme which regards a wider field: the democracy of speaking.
Here below all the links concerning this controversy.


Explore the Wild West with this lesson, which accompanies four Houghton-Mifflin stories ("A Boy Called Slow," "Pioneer Girl," "Black Cowboy, Wild Horses," and "Elena"). Learners practice making applications to the text, as well as drawing conclusions and persuading others. This includes three differentiated levels of vocabulary lists and sentence frames, which reinforce grammar skills.


text:
EINSTEIN, ALBERT (1879-1955).
Theoretical physicist. The most outstanding physicist of modern times, Albert Einstein was almost as revered for his honesty, humility, and humanitarianism as for his theories about the nature of the universe. Born in Ulm, Germany, he received his scientific education in Switzerland, where he was naturalized in 1901. While working at the Patent Office in Berne, he prepared four scientific papers that gained him international acclaim before he was 26. In the years that followed, Einstein lectured and taught in Prague, Zurich, Leyden, and Berlin. In 1916, he published his famous general theory of relativity, which has been described as "the greatest intellectual revolution since Newton"; six years later he was awarded the Nobel Prize for his work on photoelectric effects. With the rise of Hitler to power in 1933, he left Berlin, where he had held a distinguished position since 1914, and settled in the U.S. From 1933 until his death in 1955, he served as professor of theoretical physics at Princeton's Institute of Advanced Studies.
In 1939, Einstein called the attention of President Franklin D. Roosevelt to the possibilities of atomic warfare; his own theories played a crucial part in unbinding the energies of the atom. It was, in fact, the great irony of Einstein's life that his work for the advancement of human understanding of the world had also advanced human capacity for deadly warfare. Having experienced antisemitism early in life and realizing the evils of Prussian militarism, Einstein had early become a crusader for peace and harmony in human relations. He did not hesitate to speak out against injustice. After World War I, he headed the International Committee for Intellectual Cooperation of the League of Nations, withdrawing in protest against the League's failure to take strong measures against Italian Fascism. As the clouds of Nazism gathered over Germany, Einstein spoke out against antisemitism and the Nazi threat to intellectual freedom. In the U. S., too, Einstein was an outspoken defender of freedom of thought. To the end, he advocated international cooperation, and even world government, in the hope that the human race might learn to live in peace. He devoted much energy during the last decade of his life to making the world aware of the great dangers threatening it, as the result of his own work in discovering the destructive potential of atomic power.
Einstein was never a practicing Jew. From the 1920's onward, however, he expressed his devotion to his people by dedicating considerable effort to Zionism and especially to the development of the Hebrew University in Jerusalem. He first visited the U.S. in 1921 on a tour with Chaim Weizmann on behalf of the university, and sat on its board of governors until his death. After the death of Weizmann, Einstein was proposed as a candidate for the presidency of the State of Israel; Einstein refused on the ground that he was not qualified to fill the position.
Filed under: EA-EM by admin


text:
Kim Woo Bin spiffies up as a new model for menswear brand Sieg Fahrenheit
Model-actor Kim Woo Bin is suiting up as Seig Fehrenheit's newest model alongside its currently standing model, 2PM's Ok Taecyeon.
South Korean menswear brand Sieg Fahrenheit announced on January 27th that Kim Woo Bin has become the newest face of their clothing brand along with Ok Taecyeon, their current campaign model.
Creative director Jung Doo Young of Sieg Fahrenheit stated that with both Kim Woo Bin and Ok Taecyeon as models for the new upcoming season, a more diverse, variety-filled, and newly-attempted trend will begin.
Director Jung also stated that the model-actor was chosen on behalf of the brand's image due to his sky-rocketing fame that has soared even higher after the recent release of his movie Criminal Designer. Kim Woo Bin was also chosen as the new model as he was originally a fashion model before debuting as an actor, giving him a rather chameleon-like charm and skill in which he can blend into any outfit and style easily.
"We are very honored and excited to be working with a star like Kim Woo Bin who earns love from all men, women, children, and elders," director Jung stated, "We ask that you look out for, anticipate, and support the new 2015 S/S season brand that both Kim Woo Bin and Ok Taecyeon will be representing."
Source: E Today


Mary Kate Malone is seventeen and bitterly unhappy that her father has married again after the death of her mother. On her last day at school, she decides to leave home in Tarabeg on the west coast of Ireland and head for Liverpool to find her mother's sister, Aunt Bee.
But absolutely nothing goes to plan. Within hours of disembarking, she finds herself penniless and alone, with no place to stay and no idea how she will survive.
Meanwhile, back in Ireland, where old sins cast long shadows, a long-buried secret is about to come to light and a day of reckoning, in the shape of a stranger from America, will set an unstoppable chain of events in motion.
This is an epic story; with romance, lies and a lot of secrets, told between USA and Ireland this book will captivate your heart.
Even if the book is called Mary Kate, she is not the only main character of the story, there's another interesting character, an American called Joe Malone who inherited something in Tarabeg, Ireland… their paths will not cross in this book, but both characters will make the life of Tarabeg change completely… ready?
In the beginning it was a little bit difficult to follow the story, there were so many characters to follow and all of them with their own problems… but as we start entering to the book, we understand that all these characters make the story real and interesting, a living book.
This is the second part of the Tarabeg stories, but I can't wait to read the next book to discover another chapter of the story!
Ready to take a trip to a little village in Ireland?
Mid-Bedfordshire since 2005 and has three daughters.


Mamelodi Sundowns are in search for more silverware as they host Bloemfontein Celtic in the first round of the Telkom Knockout on Saturday.
Mamelodi Sundowns kick off their Telkom Knockout campaign with a clash against last season's runners-up Bloemfontein Celtic at Lucas Moripe Stadium on Saturday.
The defending league champions last hoisted the trophy three years ago, and suffered a first-round exit in last year's edition when they were knocked out by Chippa United at Nelson Mandela Bay Stadium.
Having avoided the potential banana peel of playing away from home this time around, coach Pitso Mosimane welcomed the prospect of kicking off their campaign in front of their vocal home crowd.
"It's good to be playing at home. I like playing at home. You should understand the mentality of the game at home, our supporters love trophies. You can't say that we're prioritising the Champions League," he said.
Mosimane comes up against a wily old character in Steve Komphela, who has hit the ground running since his appointment at Celtic, going unbeaten in his first five league games before encountering a sticky period which saw his charges lose two and draw one in their last three matches.
That stalemate came against Saturday's opponents, as it ended goalless at Dr Molemela Stadium earlier this month.
The former Kaizer Chiefs coach is optimistic that his club can overcome the big hurdle they are facing first up in the competition.
"Not that it's tricky. The quality at Sundowns we all know and in a situation where teams are seeded you have no choice – you are going to get a top dog," Komphela said.
"We need to go through the Sundowns hurdle first, the big one. We don't want to look at the end when in the beginning you are facing a cement wall. We need to go through Sundowns and then take baby steps.
Despite their last two clashes ending goalless, this fixture has often not failed produce a plethora of goals in recent years.
Their first meeting last season saw five goals in the first half, but nothing in the second, as Mamelodi Sundowns ran off 4-1 winners, while Bloemfontein Celtic have also put their more fancied opponents to the sword, twice on their own turf, winning 5-0 in 2015 before dropping 3-1 on them the following year.
However, those two victories remain the Free State outfit's only wins against the reigning league champions in the last ten encounters, as the men from Pretoria have prevailed six times, with the rest ending goalless.


Anyone celebrating Mardi Gras/Fat Tuesday today/tonight? I have to say that I am not, I kinda forgot about Mardi Gras this year... Oops! If I was still living in Indianapolis I would be celebrating Mardi Gras by enjoying the most delicious Chili Cheese Etouffee, from the best Cajun Creole restaurant, Yats! If you live in Indianapolis you know what I am talking about!
But alas, no Chili Cheese Etouffee for this girl! But I do have some pretty delicious monster cookies sitting around my house! These cookies are a spin off of my White Chocolate Peanut Butter Oatmeal Cookies! My Monster Cookies are packed full of peanut butter goodness, and loaded with chocolate! You might want to make a double batch, because these cookies won't be around for long!
3- In another bowl combine your dry ingredients; Oats, flour, and baking soda. Stir until combined.
4- Slowly add your dry ingredients into your wet ingredients. Use your hand mixer and mix until wet and dry ingredients are combined. Set hand mixer aside and stir in chocolate chips and M&M's.
5- Role dough into 1" balls and place on an un-greased cookie sheet. Bake for 8 minutes. Remove from oven and smash cookies with the bottom of a glass. Remember to press just enough to flatten the cookies, be careful. Return cookies to oven and bake for another 6 minutes. Allow cookies to cool on pan before removing. Repeat with the remaining dough.
**Note, store cookies in and air tight container.
I think my daughter would be all about these if they didn't have the PB. She's afraid if SHE eats PB she might inadvertently set off someone's peanut allergy the next day...crazy, but I appreciate her sacrifice for the safety of others. Did you ever make them without the peanut butter? Would you add more butter?
Hello - I have not tried to make these without peanut butter, but I am sure you could use any nut butter you like, or any spread for that matter (like cookie butter from Trader Joe's). I think adding more butter would work! Let me know if you try it and how it works!! Thanks for stopping by!


text:
TEAMS LOOK TO START FAST IN CONFERENCE PLAY
Daniel, SCS.com Staff Writer Contact Daniel
When college football�s national championship concludes Monday night, the 2007 season will finally come to an end, which is a bit of a depressing thought. After all, for the past four months, college football has been a staple of our Saturdays. The good news is that even though football may be over, college basketball now enters the best part of the entire season. Conference play begins in full force this week, with games on all week that will make you forget about football.
Starting this week, ESPN is back with its patented Big Monday, Super Tuesday, ACC Wednesday, and Throwdown Thursday matchups. Maybe it�s a bit ridiculous, but what basketball fan doesn�t love to watch hoops every night of the week? Although through November and December this column covered games spanning the entire week, including the weekend, with college basketball entering the spotlight, I�ll now be splitting the preview into two weekly portions. Today, find out what to watch Monday through Thursday, and check back on Friday for a preview of the weekend�s games.
Washington State at Southern California
Thursday 10:00 PM CST Fox Sports Net
Fans love basketball games played at a high-tempo, with full court action and a score in the 90s. It�s simply an exciting style of basketball to watch. This game will have a different type of excitement to it, but do not mistake these two teams� methodical, slow-it-down styles with boring basketball. In fact, when Washington State and USC get together, the two teams will produce a game as electric as a fast-paced game between North Carolina and Memphis would. Don�t expect a lot of offense in this one, but it is not because neither team can score. The defensive intensity will be incredibly high, and it would be stunning if either team scores more than 60 points. Stifling defense and 35 second possessions may not be the type of style fans associate with exciting basketball, but Thursday�s game will be a whole lot of fun.
Southern Cal�s non-conference schedule was brutal. The Trojans went on the road and beat a solid Miami (OH) team, beat Oklahoma at home, and then faced two of the nation�s top teams in Kansas and Memphis, suffering extremely close losses in both of those games. Still, USC entered Pac-10 play with a 9-3 mark, battle tested and prepared for one of the nation�s toughest conferences. The conference season has not started of well for Tim Floyd, though, whose team has now dropped two straight road games to California and Stanford. Both teams should be competing for an NCAA tournament bid in March, so neither loss is a disaster, but the Trojans certainly do not want to begin 0-3 in their conference.
On the other side, Washington State finds itself ranked inside the top five, the highest ranking in school history. Tony Bennett, against all odds, has created a powerhouse in Pullman, something that seemed unattainable until last season�s success. The Cougars are doing it with physical play and fantastic guard play. Even though their non-conference schedule was modest, Washington State remains undefeated at 14-0, thanks largely to the consistent play of guards Derrick Low and Kyle Weaver. Big man Aron Baynes is making the most of more playing time this season, teaming with Robbie Cowgill to provide balance between the backcourt and frontcourt.
The game will be physical. Possessions will be long. But this one will be a 40 minute battle, and most likely very close until the end of the game. Washington State proved with last season�s results and this season�s 14-0 start that its top five ranking is no fluke. You will not find many teams as balanced, disciplined, and tough as the Cougars. USC does have an advantage playing at home and boasts more firepower than Washington State, led by freshmen O.J. Mayo and Davon Jefferson. Southern Cal�s youth will be to their detriment against the experienced Cougars, however.
Prediction: Washington State 56, USC 50
MUST-SEE MATCHUPS
Rhode Island at Dayton
Wednesday 6:00 PM CST
In November, who could have predicted this game would be a match-up of two ranked squads? Two Atlantic-10 teams garnering little to no attention in the pre-season are now battling each other in one of the week�s best games, and both teams deserve their lofty rankings. Rhode Island has lost just one game this season, against Boston College, and claimed wins over three Big East opponents in South Florida, Syracuse and Providence. Dayton has terrorized the Big East as well, taking a game from Rick Pitino and Louisville at Freedom Hall, and crushing Pittsburgh at home in a complete blowout. Dayton�s only loss game to George Mason, and the Flyers have reeled off 11 straight victories.
Both teams are led by a few star players. Dayton�s Brian Roberts has enjoyed a fantastic season, and Rhode Island is led by forward Will Daniels and sharpshooter and coach�s son Jimmy Baron. In addition to the star power, both teams have great depth and a strong supporting cast. The Atlantic 10 looks like it may be nearly as strong as even a traditional power conference, with Xavier and Massachusetts also competing for the conference�s top spot. The conference is wide open at this point, and a win here for either team would be a great start to the conference season. If you watched Dayton�s game against Pittsburgh, you may have noticed the raucous atmosphere. With a ranked conference foe coming in Wednesday, the same fans will be out in full force again at University of Dayton Arena. With such an evenly matched contest, it could prove to be the difference for the Flyers.
Prediction: Dayton 76, Rhode Island 74
Mississippi at Tennessee
Mississippi validated its hot start with a win against Clemson, vaulting it into the top 25 and setting up a showdown with the Tennessee Volunteers. Rebels� guard Chris Warren is quietly putting together a fine freshman campaign, but fans have likely heard more about Tennessee�s players, which include All-American Chris Lofton. The Volunteers have not been mentioned as one of the nation�s elite teams, but besides a loss to Texas, Tennessee has been superb. At 12-1 with wins over West Virginia, Xavier, and Gonzaga, Bruce Pearl seems to have a team capable of exceeding last season�s accomplishments. Mississippi�s only notable victory came against Clemson, but beating Tennessee in this game could change people�s perception of the Rebels.
Tennessee�s athleticism and explosiveness is the reason it is ranked in the top 10. Mississippi has some talent of their own, though, and this game should be a blast to watched. With two of the SEC�s top teams facing off, this early conference game is critical for both teams. UM has been a nice surprise and a great story, but the Volunteers are the better team. But that doesn�t mean the Rebels will go down without a fight.
Prediction: Tennessee 85, Mississippi 79
California at Oregon
Thursday 8:00 PM CST
Just when you thought Oregon was down after losing early games to St. Mary�s, Nebraska, Oakland and Arizona State, the Ducks stunned Arizona on its home floor this past weekend. Tajuan Porter has not broken out of his slump yet, but Malik Hairston went off for 29 points against the Wildcats. Before the season began, the question was whether the Ducks could win without departed point guard Aaron Brooks. The answer seemed to be �no,� until Saturday�s win, which has spawned new hope for the Oregon faithful this season. California could be a surprise in the Pac-10 this season, and the Bears recently notched a big win against USC to open the conference season.
California�s powerful frontcourt tandem of Ryan Anderson and Devon Hardin may prove to be too much force in the paint for Oregon, whose only real presence down low is Maarty Leunan. Even he is more of a versatile big man instead of a physical player. The Ducks have some fantastic guards though, and even if Porter is still struggling, Hairston and fellow senior Bryce Taylor can pick him up. Oregon has new life after stealing a road win against Arizona, but the Ducks need to win this game on their home court. It will not be easy though, and in the end, Oregon will not have an answer for Anderson and Hardin.
Prediction: California 75, Oregon 64
OTHER GAMES OF INTEREST
Washington at UCLA
Thursday 9:30 PM CST FSN Prime Ticket
UCLA�s one loss to Texas pushed them below the top tier of teams consisting of North Carolina, Memphis, and Kansas. This team was my pre-season number one team and I still believe the Bruins should be in the conversation as one of the top teams in the country. After I announced in my last column that Stanford had no shot of beating UCLA, the Bruins made me proud and allowed me to avoid an embarrassment by beating the Cardinal. To its credit, Stanford battled UCLA for most of the game. Washington suffered a rough non-conference season but surprisingly competed with Washington State, nearly knocking them off at home, so at least a glimmer of hope exists for this team to pull off a colossal upset. Most likely though, UCLA will roll at Pauley Pavilion.
Prediction: UCLA 74, Washington 59
Georgetown at DePaul
Tuesday 8:00 PM CST ESPNU
The Blue Demons� non-conference season could not have gone any worse. Not only did they go 4-9, but they also dropped games to North Carolina A&T and Illinois-Chicago. It was this performance that made DePaul�s recent two game Big East winning streak even more surprising. These two wins were not against the depths of the conference, either, but instead against Villanova and Providence. So which team is the real DePaul? The last two games, or the previous 13 games? If the Blue Demons even compete at all with Georgetown, it may be a sign Jerry Wainwright�s rebuilding job may be completed more quickly than originally thought. Villanova and Providence are not on the level of Georgetown, and the Hoyas should dispatch of DePaul with ease.
Prediction: Georgetown 70, DePaul 56
Seton Hall at Marquette
Tuesday 8:00 PM CST
Seton Hall finds itself in a similar position to the several middling Big East teams, looking desperately for something to separate itself from the pack. The Pirates� non-conference season did not produce any quality victories besides a win against Virginia, so Seton Hall needs to finish above .500 in the Big East and pick up a few marquee wins along the way to be considered for the NCAA tournament. Winning on the road against Marquette would be a huge resume-builder. Last week, Marquette destroyed Providence, which seems to be about on the same level as Seton Hall. The Golden Eagles could not win at West Virginia though, losing by double digits, so they are certainly beatable.
Prediction: Marquette 87, Seton Hall 77
Purdue at Michigan State
Tuesday 8:00 PM CST Big Ten Network
Had Tom Izzo�s team not allowed UCLA to come back after facing a large deficit in the CBE Classic Championship, Michigan State would be undefeated right now. As one of the favorites to win the Big 10, along with Indiana, the Spartans� Raymar Morgan has taken over as one of the team�s best players. Along with Morgan, the Spartans have a lot of talent at the guard position, and as Izzo�s teams always do, they play tough defense and rebound very well.
Purdue�s chances of going into East Lansing and coming out victorious are slim, especially considering how young the Boilermakers are. Matt Painter�s starting lineup consists of four freshmen and one sophomore, making them the youngest starting lineup in Division I basketball. They may not have much experience, but these freshmen were some of the most highly touted players in the country coming out of high school. As the season progresses, Purdue will continue to improve, and this team will have its high points and low points. Their trip into the Izzone on Tuesday most likely won�t be one of Painter�s high points this season, but his team may at least provide a little resistance to Michigan State.
Prediction: Michigan State 72, Purdue 60
Florida at Alabama
Tuesday 8:00 PM CST ESPN
The Gators 13-2 start is severely misleading. The only two good teams on Florida�s schedule, Ohio State and Florida State, beat the Gators by double digits. Alabama�s 11-4 record is also not indicative of the type of team it is, with its best win coming against Iowa State, one of the Big 12�s lesser teams. Both teams would love to start SEC play with a win, and whichever team wins will have its best win to date. Alabama has at least played tough competition, which is more than Florida can say. Billy Donovan brought in a lot of fine players this season, but this team is too young to seriously compete in the SEC this season. The Crimson Tide really miss point guard Ronald Steele, but their roster is more experienced than Florida�s. Even though this game does not feature the best the SEC has to offer, the game should still be competitive, with the game coming right down to the wire.
Prediction: Alabama 81, Florida 78
West Virginia at Louisville
Thursday 6:00 PM CST ESPN2
Congratulations, Louisville! You avenged a home loss to Cincinnati by beating up on the mighty Kentucky Wildcats! This would have meant a lot in the past, but it means nothing this year. What usually is a great out-of-conference match-up was a snoozer, with both Louisville and Kentucky struggling so far this year. The Cardinals are in a much better position than Kentucky, and even though their season has not gone as planned, there is still a lot of basketball left. Getting a win at home against West Virginia Thursday is critical for Rick Pitino�s club. An 0-2 start would put Louisville, a team that was expected to challenge for the Big East regular season title, in an early hole.
While the Cardinals have not met expectations, Bob Huggins and West Virginia were the surprise of the league through the first two months. Two straight losses to Oklahoma and Notre Dame knocked the Mountaineers back to earth, but they came on strong with a big win over Marquette Sunday afternoon. Although this game may not be as important to Huggins as it is to Pitino, following the Marquette win with a loss would not be encouraging to the Mountaineers. Louisville is better than it has played thus far. At Freedom Hall, look for the Cardinals to use the momentum from the Kentucky game to get back on track.
Prediction: Louisville 68, West Virginia 65
Illinois at Wisconsin
Thursday 8:00 PM CST ESPN
Never underestimate Bo Ryan. After losing so much from last year�s team, he has somehow found a way to crack the polls again and create a buzz around the program. Now 2-0 in the Big 10, Wisconsin put itself back on the map with an upset of Texas. After Indiana and Michigan State, the conference is wide open, which means the Badgers may be able to finish as high as third in the Big 10. Illinois� season has been a nightmare so far. It was bad when the Illini lost to Duke, Maryland, Arizona, and Miami (OH). It got worse when they lost to Tennessee State, and the spiral continued when Illinois lost to Ohio State last week. On Sunday, Penn State put the Illini in an even deeper hole with a 68-64 victory. The Nittany Lions are probably one of the Big 10�s weaker teams, so imagine what Wisconsin may do to Illinois at the Kohl Center.
Prediction: Wisconsin 68, Illinois 51


The Grand Canyon State boasts immense natural beauty — including Petrified Forest and Saguaro National Park — phenomenal food, and great places to live, from high-end communities such as Scottsdale to up-and-coming, affordable towns such as Buckeye.
Does the town have good public schools? We measured schools' academic performance with ratings from GreatSchools. This nonprofit compares a given school's standardized test scores to the state average to obtain a rating on a scale from 1 through 10 (with 10 representing the highest score). Higher ratings led to a higher overall score.
Is the town affordable? We looked at both average home values in each town and ongoing monthly home costs, including mortgage payments, real estate taxes, insurance costs, utilities, fuel and other bills. Lower costs led to a higher overall score.
Is the town growing and prospering? We assessed a town's economy by looking at average household income and income growth over the previous decade. Higher income and greater growth led to a higher overall score.
Check out our cost of living calculator and mortgage rates calculator for more information. Don't miss our 2015 rankings of this study.
Oro Valley is a dynamic center of education and research. The town is home to a dozen technology firms, emerging as a regional center for the biotech industry and providing for lucrative employment opportunities. Oro Valley is distinguished by a median household income that is nearly 50% higher than the U.S. median, the top FBI safety ranking in the state of Arizona and an excellent school district. Oro Valley's BASIS Charter School is regularly ranked as one of the top 10 high school programs in the country. Its students consistently excel on both the statewide and national levels.
Scottsdale is home to some of the country's most gorgeous golf courses, an excellent school district and fantastic shopping. A number of its schools have earned top honors from the state government: Arcadia High School, for example, was deemed "excelling" by the Arizona Department of Education. Beyond its great schools, Scottsdale is known as a vacation hot spot. The city is fourth after only New York City, Las Vegas and Atlanta for the most five-diamond hotels in the country and boasts the highest number of destination spas per capita of any city in the U.S. Residents enjoy the city's abundance of upscale restaurants, nightlife, art galleries and luxury shopping.
As one of the fastest-expanding suburbs over the past decade, Buckeye seemed to pop up overnight, with exponential economic growth and 22 master-planned communities, expected to house more than 400,000 people by 2030. Family life today is already bright, too. Buckeye celebrates Countryfest in the fall, Pioneer Days in the spring, and a Fourth of July party in the summer. The town is also committed to maintaining its green spaces, with tree-planting initiatives, therefore earning the title of Tree City USA from the National Arbor Day Foundation.
A major suburb of Phoenix, Peoria is considered a city with potential for advancement. It is home to Lake Pleasant and its accompanying regional park, boasting 10,000 acres of water, two marinas and boat and watercraft rentals galore. The park provides for exceptional recreational opportunities, including an extensive trail system for biking, camping and hiking, as well as archaeological sites. Additionally, the city has an eye on glamorous high-end waterfront development and has already gained recognition as an educational destination thanks to the Challenger Space Center, which hosts stargazing events and space-flight simulations.
Chandler is a prominent suburb of the Phoenix metro area, with an impressive draw for high-tech career seekers. Its advanced computer-manufacturing industry, with Intel as Chandler's top employer, attracts skilled workers from the area's top universities and stimulates city growth and a healthy economy. Apart from its job opportunities, Chandler is also famous for its Ostrich Festival. During the 1910s, the city's economy was sustained on ostrich farms to fulfill a demand for plumes used in women's hats. Although that demand has now dwindled, Chandler commemorates its quirky origins with an annual celebration.
True to its name, which translates to "mountain view," Sierra Vista is a haven for hikers, campers and nature lovers. Bordering the city are the Huachuca Mountains, rising nearly 10,000 feet above sea level, and the Miller Peak Wilderness area, which provides spectacular views. Other outdoor attractions include the Kartchner Caverns, the Coronado National Forest and the Ramsey Canyon Preserve, a famous bird-watching attraction. In fact, Sierra Vista carries the nickname Hummingbird Capital of the United States since bird watchers from all around the world flock to observe and photograph hundreds of bird species.
A popular tourist destination year-round, it seems that Lake Havasu City has something for everyone. In the spring, college students seek out the city's calm waters and warm beaches. Due to its lakeside location, Lake Havasu City is home to an abundance of water sports and boating competitions, including the International Jet Sports Boating Association World Finals. Additionally, many events center around the city's central attraction, the London Bridge — a bridge that was actually imported from London in 1971. The bridge makes for the perfect viewpoint for the Havasu Balloon Festival and Fair.
The town of Gilbert boasts a small-town feel with big-city appeal — its friendly community and safe neighborhoods are complemented by its progressive school districts and general appreciation for education. The Gilbert Public Schools District, for instance, employs the highest number of National Board Certified teachers in the state: that's 104 teachers who are recognized for their excellence and commitment to their profession.
Prescott's downtown has regularly been recognized for its beauty. Its Courthouse Plaza stands alongside Central Park and Santa Monica Beach as one of the Great Public Spaces in the United States, according to the American Planning Association. Seven out of eight of Prescott Unified schools earned a letter grade of "B" or higher on the Department of Education's statewide assessment of Arizona schools. Education for adults is just as top-notch, too. Northern Arizona University maintains a Prescott campus that offers degrees in fields like education and public administration, while Embry-Riddle Aeronautical University offers bachelor's, master's and doctorate degrees in a number of sciences, from aviation to electrical engineering.
Sahuarita prides itself on its natural beauty and its strong educational system, for children and adults alike. The town boasts 7,000 acres of natural space, including pecan groves and agricultural fields. Sahuarita High's music department recently got a big boost: the Grammy Foundation awarded the program $5,500 in grant money to support fine art education at the school. Furthermore, both the University of Arizona and Pima Community College have partnered with the school district to bring more higher education opportunities to the city.
Scroll right to see all data categories.
GreatSchools city ratings are calculated by averaging the weighted overall rating for each school in the city, weighted by the number of students enrolled at the school.
Median home value is from the 2011 American Community Survey, a division of the U.S. Census Bureau.
Monthly homeowner costs are from the 2011 American Community Survey.
Median annual household income is from the 2011 American Community Survey.
Income change from 1999 to 2011 is from the U.S. Census Bureau.
In all, 64 Arizona cities and towns with a population over 10,000 were considered.


The European Fortissimo Project has issued its Second Call for Proposals. Fortissimo is a collaborative project that enables European SMEs to be more competitive globally through the use of simulation services running on High Performance Computing Cloud infrastructure.
This call for proposals targets the augmentation of the application experiments currently being carried out within Fortissimo and Fortissimo 2 focusing on modeling and simulation of coupled physical processes and high-performance data analytics (HPDA) and in all cases targeting benefits for engineering and manufacturing SMEs and Mid-caps. For the purpose of the Fortissimo 2 Call-2 a "Mid-cap" is defined as a company with a maximum of 2000 employees and an annual turnover below € 400 M. Details on coupled processes are given in the FAQ. Priority will be given to experiments driven by the requirements of first-time HPC users. Experiments should develop clear exploitation paths ensuring business impact and wider subsequent use of the services and technologies developed. They may also optionally investigate subsequent service deployment in the Fortissimo Marketplace.
Funding for Call-2: The indicative total funding budget is € 3 M of which the indicative funding budget for Third Parties is € 2.25 M.
An outcome of the Fortissimo project is to establish a Fortissimo Marketplace, which will provide SMEs cost-effective access to advanced stimulation and modelling services operating on a Cloud infrastructure of HPC resources, software applications, expertise, and tools. The Fortissimo Marketplace will offer a self-service of resources (software, hardware and support) to SMEs allowing them to benefit from advanced simulation and modelling service on an HPC Cloud, to improve company competitiveness through the use of the HPC to deliver new or improved products or services. A prototype of the Marketplace was released a few months ago and work has been continuing to validate the approach and add features. An updated version, intended to fully support the services being developed by the experiments, will be launched in the near future.
Submissions are due December 7, 2016.


text:
BUILDDIR = build
SOURCEDIR = source
EXTERNALDIR = external

all: fab
	cp $(EXTERNALDIR)/*.dll $(BUILDDIR)

fab: options filehash
	mcs -t:exe -out:$(BUILDDIR)/fab.exe -r:$(EXTERNALDIR)/Newtonsoft.Json.dll -r:$(BUILDDIR)/Mono.Options.dll -r:$(BUILDDIR)/FileHash.dll $(SOURCEDIR)/target.cs $(SOURCEDIR)/fab.cs

filehash:
	mcs -t:library -out:$(BUILDDIR)/FileHash.dll $(EXTERNALDIR)/FileHash.cs

options:
	mcs -t:library -out:$(BUILDDIR)/Mono.Options.dll $(EXTERNALDIR)/Options.cs

clean:
	rm -f $(BUILDDIR)/*.dll
	rm -f $(BUILDDIR)/*.exe
	rm -f $(BUILDDIR)/*.mdb


There is no denying on the fact that in this world, there is nothing arguably as good and pure as the love between a brother and a sister. In order to celebrate this special bond, no other occasion would be so apt than Raksha Bandhan. Thus, celebrate this eternal bond of love and care with the mind-blowing collection of Rakhis and hampers available exclusively online from Archies. If your brother lives far away in Mumbai, then all you need is to browse through our eye-popping range of beautiful keepsakes and send Rakhi gifts to Mumbai, Thane, Navi Mumbai or anywhere in the city.
As much as tying a Rakhi is an important part of the festival, exchanging gifts is also an integral part of Raksha Bandhan as it is a symbol of love and affection. Mind you, for elders it may be a festival but for brothers and sisters it is a time to see what the other person is gifting so that it can be flaunted in front of others. Keeping this thing in consideration, Archiesonline is here with plethora of thoughtful gifts online such as personalized gifts, sweets hampers, chocolates, Rakhi hampers and many more, which are totally apt for both sisters and brothers living far in Mumbai.
Surf through our range of hampers and gift them through our quick online delivery services to Mumbai. We make sure that your sibling will get the best surprise of his/her life. So, hurry! Shop for these beautiful rakhi gifts today and send pleasant surprises to your sibling living in Mumbai.


EYES ON THE PRIZE Both Greg Peck of Mundelein and Chris Soper of New Trier have their sights set on qualifying for the state tournament this weekend.
Over the next 24 hours, we will be previewing each of the 16 sectional sites to get everyone prepared for the exciting water polo action that will take place from Wednesday through Saturday in Illinois.
More than 115 boys and girls teams will begin their quest for a chance to advance to the state tournament, starting with the girls' first round games on Wednesday night. We will take a closer look at all of the matchups, including what players to watch, what teams have a chance to pull off a major upset, and much more information relating to each sectional.


text:
Diddy Named in $20M Sexual Assault Lawsuit Against Trey Songz
A post shared by The Neighborhood Talk, LLC (@theneighborhoodtalk)
Trey Songz has been hit with his second sexual assault in two months. This time around it implicates fellow musician, Diddy.
Legal documents obtained from the legal claim alleges that the victim, Jauhara Jefferies, met Trey Songz at Diddy's house during his New Year's Eve party on Star Island, and afterward, the R&B singer invited her to hang out with him at the VIP section of his party at E11EVEN nightclub in Miami. According to the legal documents, the Grammy Nominated singer "sexually violated her with his fingers" while she was on the sofa.
The suit claims that once Jauhara Jeffries and her friends made it back to Trey Songz's vehicle after they finished clubbing, the singer began to take his shirt off. At that point, she began to record the incident out of fear for her safety. When the singer tried to snatch the phone from her hands, she refused. So, in response, Trey Songz instructed his driver to halt his vehicle so that he could forcibly remove Jeffries from his presence. Upon shoving her out of his vehicle, Jauhara Jefferies claims that Trey Songz threw water in her face.
Jauhara Jefferies is seeking more than $20 million in damages for medical expenses, lost wages, and emotional distress. She has named Trey Songz, Diddy, and E11EVEN in her lawsuit.
Diddy was not present during this physical altercation and his representatives have declined to comment. A representative for Trey Songz has denied the allegations but refused to issue a statement. E11EVEN is seeking to be removed from the lawsuit
For more on this story, click the link below.
Nevada Woman Accused of Killing Husband While He Was on Video Call
Influencer Jay Mazini Accused of Stealing $2.5M In Bitcoin From Followers
Jackson State Football Player Arrested for Fraud in COVID Relief Scheme
Brothers Charged in Fatal Shooting of Chicago Police Officer
Chicago Projects Parkway Gardens, aka O-Block, Reportedly Put Up for Sale
Jay-Z Laughs Off Nets Co-Owner Making Him Spill Drink in His Lap During Game
Sada Baby Catches Backlash for Wishing Death on Lil Nas X
FBI Agent Who Investigated Child Sex Crimes Arrested on Similar Charges
MLB All-Star Felipe Vazquez Found Guilty of Having Sex with a 13-Year-Old Girl
Uber Driver Rushes Drive-By Shooting Victim To Chicago Hospital
Man arrested for attack on Asian woman; He was on parole for killing his mom
U.S. Hits Record High Drug Overdose Deaths in 1 Year with More Than 100K
2 Florida Women Face Felony Charges After Attacking Man with Glitter
California Man Arrested for Allegedly Selling Fake COVID-19 Vaccination Cards
6IX9INE – ZAZA [Music Video]


Thank you for considering donating a portion of your PFD to Alaskans Together For Equality. It has been a busy year for Alaskans Together and we know you may have noticed. Your support is vital in helping us move the needle forward on LGBTQ equality issues in Alaska.
Educating the public about transgender Alaskans.
Educating the public about local, state, and federal legislation that impacts LGBTQ Alaskans and their families.
Organizing and training LGBT Equality Advocates across the state.
Supporting pro-LGBTQ legislation at the local, state, and federal level.
Supporting and developing an engaged LGBTQ community that is connected and ready to mobilize and support each other.
Thank you for donating a part of your PFD for Equality. It makes a big difference during this challenging environment when every day is different and we need to be ready to respond.


text:
Q: MySQL Spatial Object for multiple polygons that may or may not be connected I have a set of of polygons. Sometimes they are completely disconnected (like separate patches). Other times, two sides of two polygons may touch each other (when the polygons are adjacent like on a chess board). The polygons never cross each other. In other words, their intersection is always empty.
I need to check if a point is contained in any one of those polygons. Is there a way I can build a single geometry using these polygons and check if the point is in it?
Currently I'm building a long WHERE close with OR conditions and do something like the below:
st_contains(st_GeomFromText('POLYGON(("+polygon+"))'), st_GeomFromText(CONCAT('POINT()')))

Thanks.


text:
Q: Visual Studio 2010 include files in the exe i have a simple question: I am using Visual Studio 2010 (I need this version for a special framework that does not work with a newer version) and i'd like to generate a standalone-exe without any extra files.
The project itself includes some small images as PNG-files and a few other files.
When i compile the program, there is a content-directory with all my files inside. I tried to search the options for any options but i was not successful

A: Add your files as an embedded resource and you will have them inside the exe.
Right click on the file in the Solution Explorer -> Properties -> Build Action -> Embedded Resource.
Also you can check this MSDN article: http://support.microsoft.com/kb/319292


text:
Q: How to apply potion effects only in a certain radius, without applying it to yourself? I'm trying to apply potion effects to mobs in a certain radius of me without applying it to myself as well, is this possible to do with the current state of commands in Minecraft 1.17?

A: You can use type=!player to exclude players.
If you want to only exclude yourself, this works:
/execute as @e[distance=..<distance>] unless entity @s[name=<your name here>] run effect give <effect>

A: /effect give @e[distance=0.01..R] <Effect>

Where R is the radius of the effect. It simply means, Every entity that is from 0.01 up to R meters and since the commands in being ran by you, the distance from you to you is 0, which is outside the range given. Considering there is push back, no mob will ever be 0 distance from you.
In case you want to run this from a command block, you will need to use /execute at <target> run ... to get the target's pos (You, in this case). If any questions about execute appear, visit the Wiki or ask another question here in Arqade.