text:
» A83 Rest and Be Thankful update - December 7
A83 Rest and Be Thankful update - December 7
This page contains archived news material that may no longer be accurate. Please bear this in mind when referring to this page or using any information on it to access council services. Read our current news.
The closure of the A83 at Rest and Be Thankful during the hours of darkness will be reassessed tomorrow (Thursday December 8).
Scotland TranServ said the decision to keep the current restrictions in place in the meantime was based on public safety issues.
A landslip last Thursday morning saw some 120 tonnes of mud and boulders slide onto the road. On Friday evening, work to clear the carriageway and clean the road surface and drainage systems was completed.
Since Saturday, the A83 at Rest and be Thankful has been open to emergency vehicles around the clock, and open to general traffic during daylight hours (8.30am-4pm) only. Diversions remain in place during the hours of darkness.
The decision to maintain this arrangement for the time being was taken following surveys on the slopes above the road by geotechnical experts. However, the recent heavy and prolonged snow fall since has severely hindered detailed monitoring of the soils on the slope.
Following a review by Transport Scotland, Scotland TranServ and Transport Research Laboratories (TRL), it was decided that the only option was to continue with the current arrangements until a further assessment can be made.
Geotechnical expert Dr Mike Winter from TRL said: "Visual monitoring of the hillside is continuing during the day, but given the current snow cover it is simply not possible to closely monitor the hillside soils during the hours of darkness.
"Further weather reports from the Met Office show it likely that further detailed observations may be possible on Thursday when it is hoped the soils will be visible. This will allow a detailed assessment of any movement on the hillside to be evaluated and to determine stability and safety."
Minister for Housing and Transport, Keith Brown added: "It is evident that in light of events last week and the additional poor weather since, we have been left with no option but to continue with the present arrangement.
"It is designed first and foremost to protect the safety of drivers using the road and road workers, whilst accommodating the needs for people to go about their business. I would stress we are doing everything we can to minimise the impact on the local community and get the road fully open as soon as is practically possible."
The situation will be reviewed again tomorrow (Thursday 8th) and a decision on whether to fully re-open the road will be made then.
Argyll and Bute's spokesperson for transport and infrastructure, Councillor Duncan MacIntyre, said: "This is a very difficult situation which is having a significant impact on the residents of and visitors to Argyll and Bute, and we are obviously working very closely with the other parties involved in a bid to get the road reopened as quickly as possible.
"However, the over-riding priority for all concerned is public safety. Drivers have been extremely patient and understanding over the last six days, and I would ask that they continue their co-operation while the situation is properly evaluated."
For real time roads information visit www.trafficscotland.org.

redpajama_set_name: RedPajamaCommonCrawl


text:
if callfunc == 'initialize':

  settimer(2, exitall,())
  try:
    # To unit test this, I need to know a host that won't let me complete the
    # openconn.   How do I get this?
    sockobj = openconn("128.208.3.202",12345,timeout=1)
  except:
    pass
  else:
    sockobj.close()

  print "next"

redpajama_set_name: RedPajamaGithub


text:
On constitutional disobedience, Louis Michael Seidman
The Resource On constitutional disobedience, Louis Michael Seidman
The item On constitutional disobedience, Louis Michael Seidman represents a specific, individual, material embodiment of a distinct intellectual or artistic creation found in Biddle Law Library.
Seidman, Louis Michael
"What would the Framers of the Constitution make of multinational corporations? Nuclear weapons? Gay marriage? They led a preindustrial country, much of it dependent on slave labor, huddled on the Atlantic seaboard. The Founders saw society as essentially hierarchical, led naturally by landed gentry like themselves. Yet we still obey their commands, two centuries and one civil war later. According to Louis Michael Seidman, it's time to stop. In On Constitutional Disobedience, Seidman argues that, in order to bring our basic law up to date, it needs benign neglect. This is a highly controversial assertion. The doctrine of "original intent" may be found on the far right, but the entire political spectrum--left and right--shares a deep reverence for the Constitution. And yet, Seidman reminds us, disobedience is the original intent of the Constitution. The Philadelphia convention had gathered to amend the Articles of Confederation, not toss them out and start afresh. The "living Constitution" school tries to bridge the gap between the framers and ourselves by reinterpreting the text in light of modern society's demands. But this attempt is doomed, Seidman argues. One might stretch "due process of law" to protect an act of same-sex sodomy, yet a loyal-but-contemporary reading cannot erase the fact that the Constitution allows a candidate who lost the popular election to be seated as president. And that is only one of the gross violations of popular will enshrined in the document. Seidman systematically addresses and refutes the arguments in favor of Constitutional fealty, proposing instead that it be treated as inspiration, not a set of commands. The Constitution is, at its best, a piece of poetry to liberty and self-government. If we treat it as such, the author argues, we will make better progress in achieving both"--
"In On Constitutional Disobedience, Seidman argues that, in order to bring our basic law up to date, it needs benign neglect. This is a highly controversial assertion. The doctrine of "original intent" may be found on the far right, but the entire political spectrum--left and right--shares a deep reverence for the Constitution. And yet, Seidman reminds us, disobedience is the original intent of the Constitution. The Philadelphia convention had gathered to amend the Articles of Confederation, not toss them out and start afresh. The "living Constitution" school tries to bridge the gap between the framers and ourselves by reinterpreting the text in light of modern society's demands. But this attempt is doomed, Seidman argues. One might stretch "due process of law" to protect an act of same-sex sodomy, yet a loyal-but-contemporary reading cannot erase the fact that the Constitution allows a candidate who lost the popular election to be seated as president. And that is only one of the gross violations of popular will enshrined in the document. Seidman systematically addresses and refutes the arguments in favor of Constitutional fealty, proposing instead that it be treated as inspiration, not a set of commands. The Constitution is, at its best, a piece of poetry to liberty and self-government. If we treat it as such, the author argues, we will make better progress in achieving both"--
Oxford UK | New York, Oxford University Press, USA, 2012
On constitutional disobedience
Louis Michael Seidman
Constitutional law -- United States -- Philosophy
Inalienable rights series
Includes bibliographical references (p. [149]-157) and index
(hbk. : alk. paper)

 Data from On constitutional disobedience, Louis Michael Seidman - Biddle Law Library

Data Citation of the Item On constitutional disobedience, Louis Michael Seidman
http://link.law.upenn.edu/portal/On-constitutional-disobedience-Louis-Michael/pwKddYnJqbo/
http://library.link/portal/On-constitutional-disobedience-Louis-Michael/pwKddYnJqbo/


text:
Social entrepreneurship students compete to win $1M Hult Prize
Shraysi Tandon
@ShraysiTandon
Published November 28, 2014 at 8:41 PM
It's no secret that tech startups have become one of today's most lucrative business ventures. Another industry that's gaining momentum is social entrepreneurship, creating companies that aim to solve some of the world's toughest challenges. CCTV Ameirca's Shraysi Tandon reported on one program aimed at students.
It's no secret that tech startups have become one of today's most lucrative business ventures. Another industry that's gaining momentum is social entrepreneurship, creating companies that aim to solve some of the world's toughest challenges. CCTV Ameirca's Shraysi Tandon reported on one program aimed at students.
Create a business to tackle a global issue and win $1 million — that's the promise of Hult Prize.
It's the world's largest startup program directed at university students across the world. Every year, thousands of students from the U.S., India, U.K. and China compete at starting a business aiming at solving a global issue.
The finalists pitch their business idea at the annual Clinton Meetings in New York, where the winning team from one university walks away with $1 million in seed money.
"The opportunity for a startup, irrespective of sector, in my opinion is the social development space where you've got this massive market, which by 2020 will represent nearly $1.5 trillion of annual spent," said Ahmad Ashkar, the CEO of Hult Prize Foundation.
"Actually, bringing innovative products and services to the world's poorest allows the world's poorest to get themselves out of poverty. So it's a win-win for the world."
Last year, students had to devise a business plan targeted at solving the global food crisis. This year, the challenge was solving non-communicable disease. The challenge for 2015 is early childhood education in the urban slum.
Experts said a growing number of youth is interested in creating social impact businesses.
"I've seen a really substantial impact not just in the U.S., but also in India of interests in social impact entrepreneurship. I think that comes from realization from a new generation from the people in India that the country's problems won't be solved by government, and they are going to have to be solved by free enterprise," said Arun Sundarajan, a professor from New York University's Stern School of Business.
Critics of social impact businesses said it's not moral to extract profits from the poor. But experts in the field refuted it saying both profit and competition are necessary for success.
"My argument back to anybody challenging us, saying you can't extract profits from their market segment, is to question whether or not we want real and tangible products brought to this segment. If we want real products, then we need competition. Competition is required. It drives down costs, and it can only exist when profits are a motive," said Ashkar.
Why the US isn't a top spot for Chinese travelers »
More Global Business
U.S. tariffs impact Scotch whisky
U.S. outdoor industry wants all tariffs lifted soon
The future of Boeing
CES 2020: Chinese tech giant TCL's new products
All Global Business...


text:
Q: How to create authentication (email-token/digest) link when two models are involved? I've been following railstutorial.org. In this tutorial we a.o. learn how to create a token/digest together with a mailer for account activation. It saves a digest to the db and sends an email with a link that contains a token + email address. An authentication controller method then checks the email-token combination against the digest in the db.
Now I have a similar situation but with a complicating factor: There are users and organizations. My use case is that an organization can invite a user to become a member of that organization. The user will need to confirm this using an authentication link, before the user actually becomes a member of that organization.
Below is my current setup, which consists of a digest being saved to the User table and a link with the user's email address and token. The problem is that if the user clicks the authentication link, the authentication method still does not know to which organization it should add the user. It only has an email address and token.
How can I achieve that it is known which organization sent the invitation? Also, we of course don't want the user to be able to manipulate the link in such a way that the user can add himself to a different organization than the one the user was invited for.

Controller method:
def request
  @organization = current_organization
  @user = User.find(email: params[:user][:email])
  @user.send_invitation(@organization)
end

Model method:
def send_invitation(organization)
  create_invite_digest  # Uses other model method to create digest and token.
  update_columns(invite_digest: self.invite_digest)
  UserMailer.add_user(self, organization).deliver_now
end

Mailer method:
def add_user(user, organization)
  @user = user
  @organization = organization
  mail to: user.email, subject: "Please confirm"
end

Mailer View:
<%= adduser_url(@user.invite_token, email: @user.email) %>

Controller method to authenticate:
def adduser
  user = User.find_by(email: params[:email])
  if user && user.authenticated?(:invite, params[:id])
    user.add_role(organization)  # Should add user to organization, but then it needs to know which organization
    flash[:success] = "User added"
    redirect_to root_path
  end
end

Model method to add user: requires information about the organization to add the user to.
def add_role(organization)
end

A: Probably the easiest thing to do would be to create an Invitation model of some sort that contains the token, user_id and organization_id. This will help you keep track of the references, and allow for flexibility in the future.
You could also add extra meta that way too (e.g. accepted_at), and possibly add the ability for the invite to only be valid for a certain amount of time (by using the invitation created_at, for example).

A: For a project I had that was similar, I had an invitation model and participant model (a membership is also a good name for this).
The invitation had a user_email, organization_id, and token.  It had a related mailer that was created when the invitation was created.
The user then would receive the invitation by email and click to see it on the site, using the token for the invitation as the find parameter.  The invitation had the opportunity to "accept", which was really the ability to create a participant record (user_id, organization_id).  The user would have to be logged in for this, which may be a new registration or sign in.  The participant would be created only if the invitation token was valid (exists and not yet used).  I have a date on the invitation "accepted_at" which is used to know its state and if it can be used to create a participant or not.  Users are not required to use a particular email address for registration, they just have to have access to the invitation to be able to accept it.  Users can be a participant only once in an organization.  The role on the participant is determined by the controller.
This all works really well for me.  I am also planning to add a participant_request model that will allow the logged in user to request to be a participant of an organization.  The organization would then have the option to view requests and "accept" or "deny" them - create the participant or decline the request.  Datetimes will be on the request to know its state.
If you want more model details, I can give those.  This may be enough to work from.

redpajama_set_name: RedPajamaStackExchange


text:
Georgi Borisovich Takhokhov (; born 26 September 1970) is a Tajikistani former professional footballer.

Club career
In 1992, he moved from Pamir Dushanbe to FC Spartak Vladikavkaz.

Career statistics

International

Statistics accurate as of 1 March 2016

References

External links

1970 births
Living people
Soviet footballers
Tajikistani footballers
Association football forwards
Tajikistani expatriate footballers
Tajikistan international footballers
Russian Premier League players
FC Spartak Vladikavkaz players
CSKA Pamir Dushanbe players
Expatriate footballers in Russia
Tajikistani football managers
FC Slavyansk Slavyansk-na-Kubani players

redpajama_set_name: RedPajamaWikipedia


WOMEN IN MINING JUNE 2018 • E&MJ 75 www.e-mj.com executive for fear of the rumor mill among her peers. Finding the solution will require open communication and transparency. Execu- tives will have to walk the talk. Likewise, women will have to seek sponsorship oppor- tunities and set themselves up for success. Overcoming Challenges The outgoing WAAIME Chair Rebecca Siwale, a metallurgist of African descent who also serves as a process engineer for FLSmidth, welcomed everyone to the breakfast. Before she introduced Boyt, she gave the customary safety share, acknowl- edged the panel members and shared her story. "We are here this morning to cele- brate and highlight the commitment [the panel members] have given to inclusion and diversity, and we need more champi- ons in the mining industry," Siwale said. Siwale's mining career started 19 years ago in Zambia. Her father was a miner and she was raised in a mining town. "My parents told me I could do and be anything I wanted," Siwale said. Explaining why she is involved with WAA- IME, she said she wanted to offer encour- agement and be an inspiration to young professionals entering mining or those already working in the field. Siwale was the first female metallurgist to work for the Glencore mines in Zambia. Mining at that time was not a role en- couraged for women, she explained. She pursued a chemical engineering degree and after she graduated, she started her first job with Mopani copper mines. She recalled that first day with clarity. After welcoming her and all the formal intro- ductions, her supervisor called her into his office and said, "We have a small problem. We have no toilets for women." After her first day, she spoke with her father and told him that the new job was going good, but they have no toilets for women. He re- minded her that she was an engineer and engineers solve problems, telling her to go solve this problem and she did. And, she went on to solve many more problems. Management was reluctant to let her serve on the night shift. To manage the entire operation, she felt she needed the evening shift experience and continued to press for it. She was eventually given the chance. "When you enter any man - agement relationship, such as this where they had never had a female metallurgist, it was strange at first, but over time what was strange became normal," Siwale said. "I had an amazing crew of operators and technicians who showed me what I needed to know and do to run an opera- tion. I had peers and managers that sup - ported and challenged me along the way." Siwale's parting messages as WAAIME chair: We will have challenges along the way. We will overcome them. These are the lessons we learn. "Always remember that there are people around you willing to help," Siwale said. "Don't let opportu- nities slip. Forge ahead. Always remem- ber, you are paving the way for the little girls in kindergarten, the high school girls and the young ladies in college." Siwale said she keeps a list of people, mostly women with whom she has interacted, who have coached, supervised or served as role models throughout her career, and then she welcomed Boyt to the stage. Positioning Yourself for Success Boyt opened the session by talking about three female CEOs of Fortune 500 com- panies, saying each rose to their respec- tive levels because they were brilliant, hardworking and manage their careers well. And each of these female CEOs attributed their success to sponsors. A sponsor, according to Boyt, is a mentor on steroids. "A sponsor advocates for you when you are not in the room," Boyt said. "They put your name in the hat for pro- motions. They push you. A sponsor takes people with them to the top." If there is secret sauce for getting into leadership, sponsorship is it. Sponsored employees get 30% more pay raises, pro- motions and stretch assignments, Boyt explained. By definition, a stretch assign- ment is a project or task given to employ- ees, which is beyond their current knowl- edge or skills level to "stretch" employees developmentally. The stretch assignment challenges people by placing them in un- comfortable situations to learn and grow. "People that have sponsors say they are happier with their careers and the pro- gression of their careers," Boyt said. "The downside is that men have four times as many sponsors as women. Women need to understand why and how this happens to break the cycle." Boyt said women first have to deal with their own issues. She quoted research say- ing that women feel like sponsorships are cheating. "Ladies, this is the way the game is played and these are the rules of engage- Outgoing WAAIME Chair Rebecca Siwale shares stories about her career as a metallurgist.


Head coach-in-waiting Mark Ferrante has to be smiling.
Villanova has received a verbal commitment from Kyle McCloskey, who becomes the first Class of 2017 commit.
Per HERO Sports' Brian McLaughlin, McCloskey gave his verbal on Tuesday. He will be a part of the first recruiting class to arrive at Villanova to start the post-Andy Talley era.
McCloskey, a 6-4, 205 pound quarterback from Germantown Academy (Pa.), chose Villanova over offers from FBS schools like Buffalo, Ohio University, Bowling Green, and Toledo. He also had offers from a few Ivies–Harvard, Dartmouth, Penn, and Princeton, as well as a handful of other FCS schools.
He was offered by the Wildcats in late May and after visiting the school on Tuesday, he made it official.
247 sports lists him as a three-star prospect and as the 31st best prospect in the state of Pennsylvania.
He is a lefty pro-style quarterback and is comfortable in the spread offense, working well as a passer out of the shotgun formation at Germantown. McCloskey can also scramble out of danger if needed.
He will add depth at the quarterback position, as redshirt sophomore Zach Bednarczyk should have the starting spot locked down after taking over for an injured John Robertson last season. Villanova also has Adeyemi Da Silva, Jackson Bradley, and Peter Burkly as signal callers.


text:
'use strict';

var util = require('util');
var msRest = require('ms-rest');
var msRestAzure = require('ms-rest-azure');
var ServiceClient = msRest.ServiceClient;
var WebResource = msRest.WebResource;

var models = require('../models');

/**
 * @class
 * Paging
 * __NOTE__: An instance of this class is automatically created for an
 * instance of the AutoRestPagingTestService.
 * Initializes a new instance of the Paging class.
 * @constructor
 *
 * @param {AutoRestPagingTestService} client Reference to the service client.
 */
function Paging(client) {
  this.client = client;
}

/**
 * A paging operation that finishes on the first call without a nextlink
 * @param {object} [options]
 *
 * @param {object} [options.customHeaders] headers that will be added to
 * request
 *
 * @param {function} callback
 *
 * @returns {Stream} The Response stream
 */
Paging.prototype.getSinglePages = function (options, callback) {
  var client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }

  // Construct URL
  var requestUrl = this.client.baseUri +
                   '//paging/single';
  var queryParameters = [];
  if (queryParameters.length > 0) {
    requestUrl += '?' + queryParameters.join('&');
  }
  // trim all duplicate forward slashes in the url
  var regex = /([^:]\/)\/+/gi;
  requestUrl = requestUrl.replace(regex, '$1');

  // Create HTTP transport objects
  var httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.headers = {};
  httpRequest.url = requestUrl;
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  httpRequest.body = null;
  httpRequest.headers['Content-Length'] = 0;
  if(options) {
    for(var headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  // Send Request
  return client.pipeline(httpRequest, function (err, response, responseBody) {
    if (err) {
      return callback(err);
    }
    var statusCode = response.statusCode;
    if (statusCode !== 200) {
      var error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = httpRequest;
      error.response = response;
      if (responseBody === '') responseBody = null;
      var parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        error.body = parsedErrorResponse;
        if (error.body !== null && error.body !== undefined) {
          error.body = client._models['CloudError'].deserialize(error.body);
        }
      } catch (defaultError) {
        error.message = util.format('Error "%s" occurred in deserializing the responseBody - "%s" for the default response.', defaultError, responseBody);
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    var result = new msRest.HttpOperationResponse();
    result.request = httpRequest;
    result.response = response;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      var parsedResponse;
      try {
        parsedResponse = JSON.parse(responseBody);
        result.body = parsedResponse;
        if (result.body !== null && result.body !== undefined) {
          result.body = client._models['ProductResult'].deserialize(result.body);
        }
      } catch (error) {
        var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
        deserializationError.request = httpRequest;
        deserializationError.response = response;
        return callback(deserializationError);
      }
    }

    return callback(null, result);
  });
};

/**
 * A paging operation that includes a nextLink that has 10 pages
 * @param {object} [options]
 *
 * @param {object} [options.customHeaders] headers that will be added to
 * request
 *
 * @param {function} callback
 *
 * @returns {Stream} The Response stream
 */
Paging.prototype.getMultiplePages = function (options, callback) {
  var client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }

  // Construct URL
  var requestUrl = this.client.baseUri +
                   '//paging/multiple';
  var queryParameters = [];
  if (queryParameters.length > 0) {
    requestUrl += '?' + queryParameters.join('&');
  }
  // trim all duplicate forward slashes in the url
  var regex = /([^:]\/)\/+/gi;
  requestUrl = requestUrl.replace(regex, '$1');

  // Create HTTP transport objects
  var httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.headers = {};
  httpRequest.url = requestUrl;
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  httpRequest.body = null;
  httpRequest.headers['Content-Length'] = 0;
  if(options) {
    for(var headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  // Send Request
  return client.pipeline(httpRequest, function (err, response, responseBody) {
    if (err) {
      return callback(err);
    }
    var statusCode = response.statusCode;
    if (statusCode !== 200) {
      var error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = httpRequest;
      error.response = response;
      if (responseBody === '') responseBody = null;
      var parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        error.body = parsedErrorResponse;
        if (error.body !== null && error.body !== undefined) {
          error.body = client._models['CloudError'].deserialize(error.body);
        }
      } catch (defaultError) {
        error.message = util.format('Error "%s" occurred in deserializing the responseBody - "%s" for the default response.', defaultError, responseBody);
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    var result = new msRest.HttpOperationResponse();
    result.request = httpRequest;
    result.response = response;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      var parsedResponse;
      try {
        parsedResponse = JSON.parse(responseBody);
        result.body = parsedResponse;
        if (result.body !== null && result.body !== undefined) {
          result.body = client._models['ProductResult'].deserialize(result.body);
        }
      } catch (error) {
        var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
        deserializationError.request = httpRequest;
        deserializationError.response = response;
        return callback(deserializationError);
      }
    }

    return callback(null, result);
  });
};

/**
 * A paging operation that fails on the first call with 500 and then retries
 * and then get a response including a nextLink that has 10 pages
 * @param {object} [options]
 *
 * @param {object} [options.customHeaders] headers that will be added to
 * request
 *
 * @param {function} callback
 *
 * @returns {Stream} The Response stream
 */
Paging.prototype.getMultiplePagesRetryFirst = function (options, callback) {
  var client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }

  // Construct URL
  var requestUrl = this.client.baseUri +
                   '//paging/multiple/retryfirst';
  var queryParameters = [];
  if (queryParameters.length > 0) {
    requestUrl += '?' + queryParameters.join('&');
  }
  // trim all duplicate forward slashes in the url
  var regex = /([^:]\/)\/+/gi;
  requestUrl = requestUrl.replace(regex, '$1');

  // Create HTTP transport objects
  var httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.headers = {};
  httpRequest.url = requestUrl;
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  httpRequest.body = null;
  httpRequest.headers['Content-Length'] = 0;
  if(options) {
    for(var headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  // Send Request
  return client.pipeline(httpRequest, function (err, response, responseBody) {
    if (err) {
      return callback(err);
    }
    var statusCode = response.statusCode;
    if (statusCode !== 200) {
      var error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = httpRequest;
      error.response = response;
      if (responseBody === '') responseBody = null;
      var parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        error.body = parsedErrorResponse;
        if (error.body !== null && error.body !== undefined) {
          error.body = client._models['CloudError'].deserialize(error.body);
        }
      } catch (defaultError) {
        error.message = util.format('Error "%s" occurred in deserializing the responseBody - "%s" for the default response.', defaultError, responseBody);
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    var result = new msRest.HttpOperationResponse();
    result.request = httpRequest;
    result.response = response;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      var parsedResponse;
      try {
        parsedResponse = JSON.parse(responseBody);
        result.body = parsedResponse;
        if (result.body !== null && result.body !== undefined) {
          result.body = client._models['ProductResult'].deserialize(result.body);
        }
      } catch (error) {
        var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
        deserializationError.request = httpRequest;
        deserializationError.response = response;
        return callback(deserializationError);
      }
    }

    return callback(null, result);
  });
};

/**
 * A paging operation that includes a nextLink that has 10 pages, of which the
 * 2nd call fails first with 500. The client should retry and finish all 10
 * pages eventually.
 * @param {object} [options]
 *
 * @param {object} [options.customHeaders] headers that will be added to
 * request
 *
 * @param {function} callback
 *
 * @returns {Stream} The Response stream
 */
Paging.prototype.getMultiplePagesRetrySecond = function (options, callback) {
  var client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }

  // Construct URL
  var requestUrl = this.client.baseUri +
                   '//paging/multiple/retrysecond';
  var queryParameters = [];
  if (queryParameters.length > 0) {
    requestUrl += '?' + queryParameters.join('&');
  }
  // trim all duplicate forward slashes in the url
  var regex = /([^:]\/)\/+/gi;
  requestUrl = requestUrl.replace(regex, '$1');

  // Create HTTP transport objects
  var httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.headers = {};
  httpRequest.url = requestUrl;
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  httpRequest.body = null;
  httpRequest.headers['Content-Length'] = 0;
  if(options) {
    for(var headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  // Send Request
  return client.pipeline(httpRequest, function (err, response, responseBody) {
    if (err) {
      return callback(err);
    }
    var statusCode = response.statusCode;
    if (statusCode !== 200) {
      var error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = httpRequest;
      error.response = response;
      if (responseBody === '') responseBody = null;
      var parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        error.body = parsedErrorResponse;
        if (error.body !== null && error.body !== undefined) {
          error.body = client._models['CloudError'].deserialize(error.body);
        }
      } catch (defaultError) {
        error.message = util.format('Error "%s" occurred in deserializing the responseBody - "%s" for the default response.', defaultError, responseBody);
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    var result = new msRest.HttpOperationResponse();
    result.request = httpRequest;
    result.response = response;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      var parsedResponse;
      try {
        parsedResponse = JSON.parse(responseBody);
        result.body = parsedResponse;
        if (result.body !== null && result.body !== undefined) {
          result.body = client._models['ProductResult'].deserialize(result.body);
        }
      } catch (error) {
        var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
        deserializationError.request = httpRequest;
        deserializationError.response = response;
        return callback(deserializationError);
      }
    }

    return callback(null, result);
  });
};

/**
 * A paging operation that receives a 400 on the first call
 * @param {object} [options]
 *
 * @param {object} [options.customHeaders] headers that will be added to
 * request
 *
 * @param {function} callback
 *
 * @returns {Stream} The Response stream
 */
Paging.prototype.getSinglePagesFailure = function (options, callback) {
  var client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }

  // Construct URL
  var requestUrl = this.client.baseUri +
                   '//paging/single/failure';
  var queryParameters = [];
  if (queryParameters.length > 0) {
    requestUrl += '?' + queryParameters.join('&');
  }
  // trim all duplicate forward slashes in the url
  var regex = /([^:]\/)\/+/gi;
  requestUrl = requestUrl.replace(regex, '$1');

  // Create HTTP transport objects
  var httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.headers = {};
  httpRequest.url = requestUrl;
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  httpRequest.body = null;
  httpRequest.headers['Content-Length'] = 0;
  if(options) {
    for(var headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  // Send Request
  return client.pipeline(httpRequest, function (err, response, responseBody) {
    if (err) {
      return callback(err);
    }
    var statusCode = response.statusCode;
    if (statusCode !== 200) {
      var error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = httpRequest;
      error.response = response;
      if (responseBody === '') responseBody = null;
      var parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        error.body = parsedErrorResponse;
        if (error.body !== null && error.body !== undefined) {
          error.body = client._models['CloudError'].deserialize(error.body);
        }
      } catch (defaultError) {
        error.message = util.format('Error "%s" occurred in deserializing the responseBody - "%s" for the default response.', defaultError, responseBody);
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    var result = new msRest.HttpOperationResponse();
    result.request = httpRequest;
    result.response = response;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      var parsedResponse;
      try {
        parsedResponse = JSON.parse(responseBody);
        result.body = parsedResponse;
        if (result.body !== null && result.body !== undefined) {
          result.body = client._models['ProductResult'].deserialize(result.body);
        }
      } catch (error) {
        var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
        deserializationError.request = httpRequest;
        deserializationError.response = response;
        return callback(deserializationError);
      }
    }

    return callback(null, result);
  });
};

/**
 * A paging operation that receives a 400 on the second call
 * @param {object} [options]
 *
 * @param {object} [options.customHeaders] headers that will be added to
 * request
 *
 * @param {function} callback
 *
 * @returns {Stream} The Response stream
 */
Paging.prototype.getMultiplePagesFailure = function (options, callback) {
  var client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }

  // Construct URL
  var requestUrl = this.client.baseUri +
                   '//paging/multiple/failure';
  var queryParameters = [];
  if (queryParameters.length > 0) {
    requestUrl += '?' + queryParameters.join('&');
  }
  // trim all duplicate forward slashes in the url
  var regex = /([^:]\/)\/+/gi;
  requestUrl = requestUrl.replace(regex, '$1');

  // Create HTTP transport objects
  var httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.headers = {};
  httpRequest.url = requestUrl;
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  httpRequest.body = null;
  httpRequest.headers['Content-Length'] = 0;
  if(options) {
    for(var headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  // Send Request
  return client.pipeline(httpRequest, function (err, response, responseBody) {
    if (err) {
      return callback(err);
    }
    var statusCode = response.statusCode;
    if (statusCode !== 200) {
      var error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = httpRequest;
      error.response = response;
      if (responseBody === '') responseBody = null;
      var parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        error.body = parsedErrorResponse;
        if (error.body !== null && error.body !== undefined) {
          error.body = client._models['CloudError'].deserialize(error.body);
        }
      } catch (defaultError) {
        error.message = util.format('Error "%s" occurred in deserializing the responseBody - "%s" for the default response.', defaultError, responseBody);
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    var result = new msRest.HttpOperationResponse();
    result.request = httpRequest;
    result.response = response;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      var parsedResponse;
      try {
        parsedResponse = JSON.parse(responseBody);
        result.body = parsedResponse;
        if (result.body !== null && result.body !== undefined) {
          result.body = client._models['ProductResult'].deserialize(result.body);
        }
      } catch (error) {
        var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
        deserializationError.request = httpRequest;
        deserializationError.response = response;
        return callback(deserializationError);
      }
    }

    return callback(null, result);
  });
};

/**
 * A paging operation that receives an invalid nextLink
 * @param {object} [options]
 *
 * @param {object} [options.customHeaders] headers that will be added to
 * request
 *
 * @param {function} callback
 *
 * @returns {Stream} The Response stream
 */
Paging.prototype.getMultiplePagesFailureUri = function (options, callback) {
  var client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }

  // Construct URL
  var requestUrl = this.client.baseUri +
                   '//paging/multiple/failureuri';
  var queryParameters = [];
  if (queryParameters.length > 0) {
    requestUrl += '?' + queryParameters.join('&');
  }
  // trim all duplicate forward slashes in the url
  var regex = /([^:]\/)\/+/gi;
  requestUrl = requestUrl.replace(regex, '$1');

  // Create HTTP transport objects
  var httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.headers = {};
  httpRequest.url = requestUrl;
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  httpRequest.body = null;
  httpRequest.headers['Content-Length'] = 0;
  if(options) {
    for(var headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  // Send Request
  return client.pipeline(httpRequest, function (err, response, responseBody) {
    if (err) {
      return callback(err);
    }
    var statusCode = response.statusCode;
    if (statusCode !== 200) {
      var error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = httpRequest;
      error.response = response;
      if (responseBody === '') responseBody = null;
      var parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        error.body = parsedErrorResponse;
        if (error.body !== null && error.body !== undefined) {
          error.body = client._models['CloudError'].deserialize(error.body);
        }
      } catch (defaultError) {
        error.message = util.format('Error "%s" occurred in deserializing the responseBody - "%s" for the default response.', defaultError, responseBody);
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    var result = new msRest.HttpOperationResponse();
    result.request = httpRequest;
    result.response = response;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      var parsedResponse;
      try {
        parsedResponse = JSON.parse(responseBody);
        result.body = parsedResponse;
        if (result.body !== null && result.body !== undefined) {
          result.body = client._models['ProductResult'].deserialize(result.body);
        }
      } catch (error) {
        var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
        deserializationError.request = httpRequest;
        deserializationError.response = response;
        return callback(deserializationError);
      }
    }

    return callback(null, result);
  });
};

/**
 * A paging operation that finishes on the first call without a nextlink
 * @param {String} [nextLink] NextLink from the previous successful call to List operation.
 *
 * @param {object} [options]
 *
 * @param {object} [options.customHeaders] headers that will be added to
 * request
 *
 * @param {function} callback
 *
 * @returns {Stream} The Response stream
 */
Paging.prototype.getSinglePagesNext = function (nextLink, options, callback) {
  var client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }
  // Validate
  try {
    if (nextLink === null || nextLink === undefined) {
      throw new Error('\'nextLink\' cannot be null');
    }
    if (nextLink !== null && nextLink !== undefined && typeof nextLink !== 'string') {
      throw new Error('nextLink must be of type string.');
    }
  } catch (error) {
    return callback(error);
  }

  // Construct URL
  var requestUrl = '{nextLink}';
  requestUrl = requestUrl.replace('{nextLink}', nextLink);
  // trim all duplicate forward slashes in the url
  var regex = /([^:]\/)\/+/gi;
  requestUrl = requestUrl.replace(regex, '$1');

  // Create HTTP transport objects
  var httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.headers = {};
  httpRequest.url = requestUrl;
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  httpRequest.body = null;
  httpRequest.headers['Content-Length'] = 0;
  if(options) {
    for(var headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  // Send Request
  return client.pipeline(httpRequest, function (err, response, responseBody) {
    if (err) {
      return callback(err);
    }
    var statusCode = response.statusCode;
    if (statusCode !== 200) {
      var error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = httpRequest;
      error.response = response;
      if (responseBody === '') responseBody = null;
      var parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        error.body = parsedErrorResponse;
        if (error.body !== null && error.body !== undefined) {
          error.body = client._models['CloudError'].deserialize(error.body);
        }
      } catch (defaultError) {
        error.message = util.format('Error "%s" occurred in deserializing the responseBody - "%s" for the default response.', defaultError, responseBody);
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    var result = new msRest.HttpOperationResponse();
    result.request = httpRequest;
    result.response = response;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      var parsedResponse;
      try {
        parsedResponse = JSON.parse(responseBody);
        result.body = parsedResponse;
        if (result.body !== null && result.body !== undefined) {
          result.body = client._models['ProductResult'].deserialize(result.body);
        }
      } catch (error) {
        var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
        deserializationError.request = httpRequest;
        deserializationError.response = response;
        return callback(deserializationError);
      }
    }

    return callback(null, result);
  });
};

/**
 * A paging operation that includes a nextLink that has 10 pages
 * @param {String} [nextLink] NextLink from the previous successful call to List operation.
 *
 * @param {object} [options]
 *
 * @param {object} [options.customHeaders] headers that will be added to
 * request
 *
 * @param {function} callback
 *
 * @returns {Stream} The Response stream
 */
Paging.prototype.getMultiplePagesNext = function (nextLink, options, callback) {
  var client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }
  // Validate
  try {
    if (nextLink === null || nextLink === undefined) {
      throw new Error('\'nextLink\' cannot be null');
    }
    if (nextLink !== null && nextLink !== undefined && typeof nextLink !== 'string') {
      throw new Error('nextLink must be of type string.');
    }
  } catch (error) {
    return callback(error);
  }

  // Construct URL
  var requestUrl = '{nextLink}';
  requestUrl = requestUrl.replace('{nextLink}', nextLink);
  // trim all duplicate forward slashes in the url
  var regex = /([^:]\/)\/+/gi;
  requestUrl = requestUrl.replace(regex, '$1');

  // Create HTTP transport objects
  var httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.headers = {};
  httpRequest.url = requestUrl;
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  httpRequest.body = null;
  httpRequest.headers['Content-Length'] = 0;
  if(options) {
    for(var headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  // Send Request
  return client.pipeline(httpRequest, function (err, response, responseBody) {
    if (err) {
      return callback(err);
    }
    var statusCode = response.statusCode;
    if (statusCode !== 200) {
      var error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = httpRequest;
      error.response = response;
      if (responseBody === '') responseBody = null;
      var parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        error.body = parsedErrorResponse;
        if (error.body !== null && error.body !== undefined) {
          error.body = client._models['CloudError'].deserialize(error.body);
        }
      } catch (defaultError) {
        error.message = util.format('Error "%s" occurred in deserializing the responseBody - "%s" for the default response.', defaultError, responseBody);
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    var result = new msRest.HttpOperationResponse();
    result.request = httpRequest;
    result.response = response;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      var parsedResponse;
      try {
        parsedResponse = JSON.parse(responseBody);
        result.body = parsedResponse;
        if (result.body !== null && result.body !== undefined) {
          result.body = client._models['ProductResult'].deserialize(result.body);
        }
      } catch (error) {
        var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
        deserializationError.request = httpRequest;
        deserializationError.response = response;
        return callback(deserializationError);
      }
    }

    return callback(null, result);
  });
};

/**
 * A paging operation that fails on the first call with 500 and then retries
 * and then get a response including a nextLink that has 10 pages
 * @param {String} [nextLink] NextLink from the previous successful call to List operation.
 *
 * @param {object} [options]
 *
 * @param {object} [options.customHeaders] headers that will be added to
 * request
 *
 * @param {function} callback
 *
 * @returns {Stream} The Response stream
 */
Paging.prototype.getMultiplePagesRetryFirstNext = function (nextLink, options, callback) {
  var client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }
  // Validate
  try {
    if (nextLink === null || nextLink === undefined) {
      throw new Error('\'nextLink\' cannot be null');
    }
    if (nextLink !== null && nextLink !== undefined && typeof nextLink !== 'string') {
      throw new Error('nextLink must be of type string.');
    }
  } catch (error) {
    return callback(error);
  }

  // Construct URL
  var requestUrl = '{nextLink}';
  requestUrl = requestUrl.replace('{nextLink}', nextLink);
  // trim all duplicate forward slashes in the url
  var regex = /([^:]\/)\/+/gi;
  requestUrl = requestUrl.replace(regex, '$1');

  // Create HTTP transport objects
  var httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.headers = {};
  httpRequest.url = requestUrl;
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  httpRequest.body = null;
  httpRequest.headers['Content-Length'] = 0;
  if(options) {
    for(var headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  // Send Request
  return client.pipeline(httpRequest, function (err, response, responseBody) {
    if (err) {
      return callback(err);
    }
    var statusCode = response.statusCode;
    if (statusCode !== 200) {
      var error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = httpRequest;
      error.response = response;
      if (responseBody === '') responseBody = null;
      var parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        error.body = parsedErrorResponse;
        if (error.body !== null && error.body !== undefined) {
          error.body = client._models['CloudError'].deserialize(error.body);
        }
      } catch (defaultError) {
        error.message = util.format('Error "%s" occurred in deserializing the responseBody - "%s" for the default response.', defaultError, responseBody);
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    var result = new msRest.HttpOperationResponse();
    result.request = httpRequest;
    result.response = response;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      var parsedResponse;
      try {
        parsedResponse = JSON.parse(responseBody);
        result.body = parsedResponse;
        if (result.body !== null && result.body !== undefined) {
          result.body = client._models['ProductResult'].deserialize(result.body);
        }
      } catch (error) {
        var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
        deserializationError.request = httpRequest;
        deserializationError.response = response;
        return callback(deserializationError);
      }
    }

    return callback(null, result);
  });
};

/**
 * A paging operation that includes a nextLink that has 10 pages, of which the
 * 2nd call fails first with 500. The client should retry and finish all 10
 * pages eventually.
 * @param {String} [nextLink] NextLink from the previous successful call to List operation.
 *
 * @param {object} [options]
 *
 * @param {object} [options.customHeaders] headers that will be added to
 * request
 *
 * @param {function} callback
 *
 * @returns {Stream} The Response stream
 */
Paging.prototype.getMultiplePagesRetrySecondNext = function (nextLink, options, callback) {
  var client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }
  // Validate
  try {
    if (nextLink === null || nextLink === undefined) {
      throw new Error('\'nextLink\' cannot be null');
    }
    if (nextLink !== null && nextLink !== undefined && typeof nextLink !== 'string') {
      throw new Error('nextLink must be of type string.');
    }
  } catch (error) {
    return callback(error);
  }

  // Construct URL
  var requestUrl = '{nextLink}';
  requestUrl = requestUrl.replace('{nextLink}', nextLink);
  // trim all duplicate forward slashes in the url
  var regex = /([^:]\/)\/+/gi;
  requestUrl = requestUrl.replace(regex, '$1');

  // Create HTTP transport objects
  var httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.headers = {};
  httpRequest.url = requestUrl;
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  httpRequest.body = null;
  httpRequest.headers['Content-Length'] = 0;
  if(options) {
    for(var headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  // Send Request
  return client.pipeline(httpRequest, function (err, response, responseBody) {
    if (err) {
      return callback(err);
    }
    var statusCode = response.statusCode;
    if (statusCode !== 200) {
      var error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = httpRequest;
      error.response = response;
      if (responseBody === '') responseBody = null;
      var parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        error.body = parsedErrorResponse;
        if (error.body !== null && error.body !== undefined) {
          error.body = client._models['CloudError'].deserialize(error.body);
        }
      } catch (defaultError) {
        error.message = util.format('Error "%s" occurred in deserializing the responseBody - "%s" for the default response.', defaultError, responseBody);
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    var result = new msRest.HttpOperationResponse();
    result.request = httpRequest;
    result.response = response;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      var parsedResponse;
      try {
        parsedResponse = JSON.parse(responseBody);
        result.body = parsedResponse;
        if (result.body !== null && result.body !== undefined) {
          result.body = client._models['ProductResult'].deserialize(result.body);
        }
      } catch (error) {
        var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
        deserializationError.request = httpRequest;
        deserializationError.response = response;
        return callback(deserializationError);
      }
    }

    return callback(null, result);
  });
};

/**
 * A paging operation that receives a 400 on the first call
 * @param {String} [nextLink] NextLink from the previous successful call to List operation.
 *
 * @param {object} [options]
 *
 * @param {object} [options.customHeaders] headers that will be added to
 * request
 *
 * @param {function} callback
 *
 * @returns {Stream} The Response stream
 */
Paging.prototype.getSinglePagesFailureNext = function (nextLink, options, callback) {
  var client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }
  // Validate
  try {
    if (nextLink === null || nextLink === undefined) {
      throw new Error('\'nextLink\' cannot be null');
    }
    if (nextLink !== null && nextLink !== undefined && typeof nextLink !== 'string') {
      throw new Error('nextLink must be of type string.');
    }
  } catch (error) {
    return callback(error);
  }

  // Construct URL
  var requestUrl = '{nextLink}';
  requestUrl = requestUrl.replace('{nextLink}', nextLink);
  // trim all duplicate forward slashes in the url
  var regex = /([^:]\/)\/+/gi;
  requestUrl = requestUrl.replace(regex, '$1');

  // Create HTTP transport objects
  var httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.headers = {};
  httpRequest.url = requestUrl;
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  httpRequest.body = null;
  httpRequest.headers['Content-Length'] = 0;
  if(options) {
    for(var headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  // Send Request
  return client.pipeline(httpRequest, function (err, response, responseBody) {
    if (err) {
      return callback(err);
    }
    var statusCode = response.statusCode;
    if (statusCode !== 200) {
      var error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = httpRequest;
      error.response = response;
      if (responseBody === '') responseBody = null;
      var parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        error.body = parsedErrorResponse;
        if (error.body !== null && error.body !== undefined) {
          error.body = client._models['CloudError'].deserialize(error.body);
        }
      } catch (defaultError) {
        error.message = util.format('Error "%s" occurred in deserializing the responseBody - "%s" for the default response.', defaultError, responseBody);
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    var result = new msRest.HttpOperationResponse();
    result.request = httpRequest;
    result.response = response;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      var parsedResponse;
      try {
        parsedResponse = JSON.parse(responseBody);
        result.body = parsedResponse;
        if (result.body !== null && result.body !== undefined) {
          result.body = client._models['ProductResult'].deserialize(result.body);
        }
      } catch (error) {
        var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
        deserializationError.request = httpRequest;
        deserializationError.response = response;
        return callback(deserializationError);
      }
    }

    return callback(null, result);
  });
};

/**
 * A paging operation that receives a 400 on the second call
 * @param {String} [nextLink] NextLink from the previous successful call to List operation.
 *
 * @param {object} [options]
 *
 * @param {object} [options.customHeaders] headers that will be added to
 * request
 *
 * @param {function} callback
 *
 * @returns {Stream} The Response stream
 */
Paging.prototype.getMultiplePagesFailureNext = function (nextLink, options, callback) {
  var client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }
  // Validate
  try {
    if (nextLink === null || nextLink === undefined) {
      throw new Error('\'nextLink\' cannot be null');
    }
    if (nextLink !== null && nextLink !== undefined && typeof nextLink !== 'string') {
      throw new Error('nextLink must be of type string.');
    }
  } catch (error) {
    return callback(error);
  }

  // Construct URL
  var requestUrl = '{nextLink}';
  requestUrl = requestUrl.replace('{nextLink}', nextLink);
  // trim all duplicate forward slashes in the url
  var regex = /([^:]\/)\/+/gi;
  requestUrl = requestUrl.replace(regex, '$1');

  // Create HTTP transport objects
  var httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.headers = {};
  httpRequest.url = requestUrl;
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  httpRequest.body = null;
  httpRequest.headers['Content-Length'] = 0;
  if(options) {
    for(var headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  // Send Request
  return client.pipeline(httpRequest, function (err, response, responseBody) {
    if (err) {
      return callback(err);
    }
    var statusCode = response.statusCode;
    if (statusCode !== 200) {
      var error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = httpRequest;
      error.response = response;
      if (responseBody === '') responseBody = null;
      var parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        error.body = parsedErrorResponse;
        if (error.body !== null && error.body !== undefined) {
          error.body = client._models['CloudError'].deserialize(error.body);
        }
      } catch (defaultError) {
        error.message = util.format('Error "%s" occurred in deserializing the responseBody - "%s" for the default response.', defaultError, responseBody);
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    var result = new msRest.HttpOperationResponse();
    result.request = httpRequest;
    result.response = response;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      var parsedResponse;
      try {
        parsedResponse = JSON.parse(responseBody);
        result.body = parsedResponse;
        if (result.body !== null && result.body !== undefined) {
          result.body = client._models['ProductResult'].deserialize(result.body);
        }
      } catch (error) {
        var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
        deserializationError.request = httpRequest;
        deserializationError.response = response;
        return callback(deserializationError);
      }
    }

    return callback(null, result);
  });
};

/**
 * A paging operation that receives an invalid nextLink
 * @param {String} [nextLink] NextLink from the previous successful call to List operation.
 *
 * @param {object} [options]
 *
 * @param {object} [options.customHeaders] headers that will be added to
 * request
 *
 * @param {function} callback
 *
 * @returns {Stream} The Response stream
 */
Paging.prototype.getMultiplePagesFailureUriNext = function (nextLink, options, callback) {
  var client = this.client;
  if(!callback && typeof options === 'function') {
    callback = options;
    options = null;
  }
  if (!callback) {
    throw new Error('callback cannot be null.');
  }
  // Validate
  try {
    if (nextLink === null || nextLink === undefined) {
      throw new Error('\'nextLink\' cannot be null');
    }
    if (nextLink !== null && nextLink !== undefined && typeof nextLink !== 'string') {
      throw new Error('nextLink must be of type string.');
    }
  } catch (error) {
    return callback(error);
  }

  // Construct URL
  var requestUrl = '{nextLink}';
  requestUrl = requestUrl.replace('{nextLink}', nextLink);
  // trim all duplicate forward slashes in the url
  var regex = /([^:]\/)\/+/gi;
  requestUrl = requestUrl.replace(regex, '$1');

  // Create HTTP transport objects
  var httpRequest = new WebResource();
  httpRequest.method = 'GET';
  httpRequest.headers = {};
  httpRequest.url = requestUrl;
  // Set Headers
  httpRequest.headers['Content-Type'] = 'application/json; charset=utf-8';
  httpRequest.body = null;
  httpRequest.headers['Content-Length'] = 0;
  if(options) {
    for(var headerName in options['customHeaders']) {
      if (options['customHeaders'].hasOwnProperty(headerName)) {
        httpRequest.headers[headerName] = options['customHeaders'][headerName];
      }
    }
  }
  // Send Request
  return client.pipeline(httpRequest, function (err, response, responseBody) {
    if (err) {
      return callback(err);
    }
    var statusCode = response.statusCode;
    if (statusCode !== 200) {
      var error = new Error(responseBody);
      error.statusCode = response.statusCode;
      error.request = httpRequest;
      error.response = response;
      if (responseBody === '') responseBody = null;
      var parsedErrorResponse;
      try {
        parsedErrorResponse = JSON.parse(responseBody);
        error.body = parsedErrorResponse;
        if (error.body !== null && error.body !== undefined) {
          error.body = client._models['CloudError'].deserialize(error.body);
        }
      } catch (defaultError) {
        error.message = util.format('Error "%s" occurred in deserializing the responseBody - "%s" for the default response.', defaultError, responseBody);
        return callback(error);
      }
      return callback(error);
    }
    // Create Result
    var result = new msRest.HttpOperationResponse();
    result.request = httpRequest;
    result.response = response;
    if (responseBody === '') responseBody = null;
    // Deserialize Response
    if (statusCode === 200) {
      var parsedResponse;
      try {
        parsedResponse = JSON.parse(responseBody);
        result.body = parsedResponse;
        if (result.body !== null && result.body !== undefined) {
          result.body = client._models['ProductResult'].deserialize(result.body);
        }
      } catch (error) {
        var deserializationError = new Error(util.format('Error "%s" occurred in deserializing the responseBody - "%s"', error, responseBody));
        deserializationError.request = httpRequest;
        deserializationError.response = response;
        return callback(deserializationError);
      }
    }

    return callback(null, result);
  });
};

module.exports = Paging;


text:
Q: Java String Constructor From the String class:
public String(byte[] bytes,
      int offset,
      int length)

Javadoc:

Constructs a new String by decoding the specified subarray of bytes using the platform's default charset.
The length of the new String is a function of the charset, and hence may not be equal to the length of the subarray.
The behavior of this constructor when the given bytes are not valid in the default charset is unspecified. The CharsetDecoder class should be used when more control over the decoding process is required.

What does the bold part mean?

A:
The length of the new String is a function of the charset, and hence may not be equal to the length of the subarray.

In some charsets, some or even all characters use more than than a single byte. So an array of a given length may produce a shorter string. Don't assume that one byte = 1 char.

The behavior of this constructor when the given bytes are not valid in the default charset is unspecified. The CharsetDecoder class should be used when more control over the decoding process is required.

If you're decoding the string using some charset and the byte array contains a value unknown to the charset you get undefined behavior. For example if a charset uses values between 0 and 127, and your array contains the value -5 you get undefined behavior.


text:
Q: NullPointerException with Linked List (Deleting an element) I am trying to create a function to delete an element from a linked list. However, I keep getting a NullPointerException. When I run the program, it states:
Exception in thread "main" java.lang.NullPointerException
    at ElephantList.delete(ElephantList.java:30)
    at BabyElephantWalk.main(BabyElephantWalk.java:15)

How can I delete an element from the linked list without having this exception thrown? Here is the code
BabyElephantWalk.java
public class BabyElephantWalk
{
    public static void main (String[] args)
    {

        ElephantList walk = new ElephantList();
        walk.add (new Elephant("Charlie"));
        walk.add (new Elephant("Donna"));
        walk.add (new Elephant("Chilli"));
        walk.add (new Elephant("Piper"));
        walk.add (new Elephant("Ziva"));

        walk.delete ("Charlie");
        System.out.println (walk);
    }
}

ElephantList.java
public class ElephantList
{
private ElephantNode head;
private ElephantNode list;
public ElephantList()
{
    list = null;
}//end ElephantList constructor

public void add(Elephant cat)
{
    ElephantNode node = new ElephantNode(cat);
    ElephantNode current;
    if (list == null)
        list = node;
    else
    {
        current = list;
        while (current.next != null)
            current = current.next;
        current.next = node;
    }
}//end add

public void delete(Object x)
{
    {
        if (head.data == x)
        {
            head = head.next;
        }
        else
        {
            ElephantNode temp = head;
            while (temp.next != null)
            {
                if (temp.next.data.equals(x))
                {
                    temp.next = temp.next.next;
                    break;
                }
                else
                {
                    temp = temp.next;
                }
            }
        }
    }
}

public String toString ()
{
    String result = "";
    ElephantNode current = list;
    while (current != null)
    {
        result += current.elephant + "\n";
        current = current.next;
    }
    return result;
}//end toString

private class ElephantNode
{
    public Elephant elephant;
    public ElephantNode next;
    public Object data;
    public ElephantNode(Elephant cat)
    {
        elephant = cat;
        next = null;
        data = null;
    }//end ElephantNode constructor
}//ElephantNode
}//end ElephantList

Elephant.java
public class Elephant
{
    private String title;
    public Elephant(String newname)
    {
        title = newname;
    }//end Elephant constructor
    public String toString ()
    {
        return title;
    }
}

A: In add method you work with 'list', in delete method you work with 'head'. Retain the only property and work with it:
public void delete(Object x)
{
    if (list.data.equals(x))   // <<= 'head' replaced with 'list'; == replaced with .equals
    {
        list = list.next; // <<= 'head' replaced with 'list'
    }
    else
    {
        ElephantNode temp = list; // <<= 'head' replaced with 'list'
        while (temp.next != null)
        {
            if (temp.next.data.equals(x))
            {
                temp.next = temp.next.next;
                break;
            }
            else
            {
                temp = temp.next;
            }
        }
    }
}


text:
Home Identity Politics Wally of the Week – Mayor Henriette Reker
Wally of the Week
Wally of the Week – Mayor Henriette Reker
David Hiscox
The week since the New Year has seen a scandal grow from bad to worse across Europe. It started in Cologne, Germany, but has since spread to German cities and into other cities in Europe. It concerns the groping, sexual assaults and rapes of hundreds of European women by thousands of muslim men on New Years Eve.
The obviousness of this fact is almost maddening, yet the response given by European officials, and the Mayor of Cologne, Henriette Reker, in particular, gives an insight into why this was allowed to occur in the first place.
Comments such as "There's always the possibility of keeping a certain distance of more than an arm's length — that is to say, to make sure yourself you don't look to be too close to people who are not known to you and to whom you don't have a trusting relationship," and the suggestion of a "code of conduct" for women in Cologne, ie implying that it is women's responsibility to avoid being raped, has confirmed what The XYZ, along with activists in both the West and the Middle East have been arguing for a very long time – that Western feminists and Western governments are prepared to push the rights of women under a bus in order to avoid offending islam.
These outrageously sexist comments, along with astonishing obfuscations to avoid acknowledging that the perpetrators were overwhelmingly of "North African or Arab descent," a fact to which video footage and eyewitness accounts testify, earn Henriette Reker an XYZ Wally of the Week, named after everybody's favourite Muslim apologist, Waleed Aly (TM). (Although technically the comments were made last week, the stupidity of the comments earned special carryover points.)
On a brighter note, the scale of the incident has meant that this has become, belatedly, too big for the world's media to ignore. Importantly, Cologne did see several protests, by feminists, against both the alleged crimes by the men, and the attempt to ignore or obfuscate the reality of the situation by government officials. In one, a naked performance artist stood in 4 degree celcius temperatures for about 20 minutes, holding a sign bearing the slogan "Respect us! We are no fair game, even when we are naked!!!" in the Cologne square where the attacks took place. A couple of days earlier, the protest in the video below was carried out by clothed feminists.
There is still hope.
Photo by Harold R Cologne
Henriette Reker
Previous articleTo do one's duty – the evacuation of Gallipoli a century later
Next articleCalls for Chris Gayle to be Crucified and Beheaded
https://xyz.net.au/
David has studied history and political science at Melbourne University. His thesis was written on how the utilisation of Missile Defence can help to achieve nuclear disarmament. His interest in history was piqued by playing a flight simulator computer game about the Battle of Britain, and he hopes to one day siphon the earnings from his political writings into funding the greatest prog-rock concept album the world has ever seen.
A history of aboriginal violence
Demographics and Delusion
Food For Thought – 2022 Was The Year Of No ECAJ Report Being Released


Taking a great shot may sound easy, after all it's estimated as a planet we upload 95 million images or videos each and every day. Which begs the question, how many are actually good?
You'll perhaps not be surprised to hear the answer is not many. Taking a fantastic shot is much harder than it looks, it's why photographers are paid good money to be photographers.
However, there are simple ways you can improve your images, and they aren't that tricky.
You'd be surprised by how many people don't use the Square mode on the mobile camera when snapping for Instagram. Don't take a shoot now, crop later approach, shoot for what you intend the image to be used for.
You'll be able to frame your shot better and prevent you from having to cut anything out you didn't want to afterwards, just so you can get it back to the correct shape for Instagram.
While we aren't suggesting the levels of airbrushing you'd see in a woman's magazine, there's nothing wrong with getting into an editing suite and playing around with your shots. Even the most novice of photographers can enjoy this, with dozens of great apps available to download straight to your phone.
Some of the best photo editors are the simplest, and you'll find plenty of photo editing software reviews online to help you make the right decision.
You'll be able to edit a number of things with an editor, from simple things such as composure, brightness and size, as well as sharpening colours, adding filters and removing any blemishes picked up by the camera.
It's always wise not to overdo it but making simple and minor tweaks will make all the difference. Alternatively, you can make some wacky edits and ensure your Instagram photos are really out there.
Grid mode is a fantastic tool that all good photographers use, allowing you to fully gage the rule of thirds theory.
The rule helps you create more balanced images, by placing interesting aspects of your shot at the interjecting points on the grid. It's a practice that all budding photographers should adhere too, at least until they've mastered it and want to go a little more off-piste anyway.
We tend to be quite automatic in our ways when taking photographs with our smartphone, but you can adjust your exposure just as your would with a digital camera.
If your shots are two light or dark, compensate for this with the exposure tool, as well as locking in your focus by tapping on the primary aspect of your shot.
These are two simple steps but will considerably improve your shots and in turn up the number of likes on your posts.


text:
Q: Unable to connect to the route in ajax I have been working on a laravel app. gonna go down to the problem straight... I have a like button which triggers the function likeit() in JS. In this function there is AJAX call which was suppose to send the post_id which is liked to the function postLikePost where it will execute the query.
Now for checking purpose since my route wasnt working... I linked the url to custom file like
url: 'addlike.php'
added db connection and mysqli query and it works fine. But I wanna go with the flow and want to do it through the controller and stuff.
Here is my AJAX Call:
    function like_function(post_id){
var urlLike = "{{ route('like') }}";
          event.preventDefault();
          $.ajax({
             method: 'POST',
             url: urlLike,
             data: {post_id: post_id},
             success: function(response)
             {
                alert(response);
             }
          });

My controller Where I want to add the postLikePost function

namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Post;
use App\User;
class HomeController extends Controller
{
    /**
     * Create a new controller instance.
     *
     * @return void
     */
    public function __construct()
    {
        $this->middleware('auth');
    }

    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Contracts\Support\Renderable
     */
    public function index()
    {
        $data = Post::orderBy('post_id','desc')->get();
        return view('home',['data'=>$data]);
    }
    public function postLikePost(){
        return "wow";
    }
}

       }

my web.php
<?php

use Illuminate\Support\Facades\Route;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/login','MainController@index');
Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');
Route::post('/like',[
    'uses' => 'HomeController@postLikePost',
    'as' => 'like',
]);


text:
Q: Can not set up clustered Vert.x environment from my JUnit test I have a junit test where I would like to set up a clustered vert.x environment. It works fine if I run the code in the setUp method from the public static void main() method but not if it is run from the setUpmethod.
The public void handle(AsyncResult<Vertx> res) method is never invoked!
Why?
@RunWith(VertxUnitRunner.class)
public class TestMyStuff {
    private Vertx vertx;

    @Before
    public void setUp(TestContext context) throws IOException {

        ClusterManager mgr = new HazelcastClusterManager();
        VertxOptions options = new VertxOptions().setClusterManager(mgr);
        Vertx.clusteredVertx(options, new Handler<AsyncResult<Vertx>>() {
            @Override
            public void handle(AsyncResult<Vertx> res) {
                if(res.succeeded()) {
                    vertx = res.result();

                    DeploymentOptions options = new DeploymentOptions()
                            .setConfig(new JsonObject().put("http.port", 8080)
                            );
                    vertx.deployVerticle(MyWebService.class.getName(), options, context.asyncAssertSuccess());
                    System.out.println("SUCCESS");
                } else {
                    System.out.println("FAILED");
                }
            }
        });
    }

    @Test
    public void printSomething(TestContext context) {
        System.out.println("Print from method printSomething()");
    }

"Print from method printSomething()" is beeing written but not "SUCCESS" or "FAILED" from the handle() method.
Why does not it work in the setUp method but from main()?

A: VertX does have its own function to handle multithreading and Asynchronous request.
Just use Async class in your Test function:
   @Test
   public void printSomething(TestContext context) {
        Async async = context.async();
        System.out.println("Print from method printSomething()");
        async.complete();
   }

Hope it helps some body in future.

A: The test isn't set up properly due to the asynchronous behaviour of VertX:

*

*The code inside @Before is starting VertX in an asynchronous way with Vertx.clusteredVertx(), but it simply doesn't have time to even start VertX

*The printSomething() method starts right after the clusteredVertx() call (without a running VertX), the test itself ends immediately so JUnit stops the whole test process, killing the not-even-started VertX

I have encountered this issue as well some time ago, so what you should do in this situation?
You should set up VertX properly and wait in your test method to finish the setup. I could accomplish this with a waiting-kind-of mechanism, using the Awaitility (https://github.com/jayway/awaitility).
The main points

*

*set up a variable to wait for the setup of vertx

*in the handler of the clusteredVertx call, set the variable to true

*and finally, wait for this variable to be set in the test method

I
@RunWith(VertxUnitRunner.class)
public class TestMyStuff {
   private Vertx vertx;

   final AtomicBoolean loaded = new AtomicBoolean(false);

   @Before
   public void setUp(TestContext context) throws IOException {
    ClusterManager mgr = new HazelcastClusterManager();
    VertxOptions options = new VertxOptions().setClusterManager(mgr);
    Vertx.clusteredVertx(options, new Handler<AsyncResult<Vertx>>() {
        @Override
        public void handle(AsyncResult<Vertx> res) {
            if (res.succeeded()) {
                vertx = res.result();

                DeploymentOptions options = new DeploymentOptions()
                        .setConfig(new JsonObject().put("http.port", 8080)
                        );
                //vertx.deployVerticle(MyWebService.class.getName(), options, context.asyncAssertSuccess());
                System.out.println("SUCCESS");
                loaded.set(true);
            } else {
                System.out.println("FAILED");
            }
         }
       });
   }

   @Test
   public void printSomething(TestContext context) {

    Awaitility.waitAtMost(Duration.ONE_MINUTE).await().untilTrue(loaded);
    System.out.println("Print from method printSomething()");
   }
}

I hope this helps to understand the main point, so you can find any other workaround as well!


Going back to the techies now, sorry everyone.
Can you clarify what you're trying to say please Zoue?
Ironically the forum is running well for me now, but I know at least one mod is pretty much totally locked out by errors. Right now the only suggestion I have is swearing at the screen, it's working for me!
The techies might be removing ads to see if that eases the problem. I don't know for sure if it's happening yet, but it's been suggested.
A few short term fixes have been implemented. The system seems faster, hopefully reliability is improved similarly.
Smooottthhhhh for the last few days.
Whatever you did, don't change it back.
I've noticed no ads at the top of the screen, guessing that could be linked?
Chrome on Android if that's of any relevance. Not as bad as it was though.
OK, will get back onto the techies.
None again this morning, maybe just a hiccup.
Has the forum ever considered implementing a "like" system for posts?
That would require changing the forum software which we're not able to do.
We're able to make client side changes, which is how I've done stuff like make the nested quotes collapseable, and I have just added a notification box for new Private Messages.
If we could, I'd give Toby's post a like, but then again, if we could there'd be no need for Toby to post the question in the first place I spose so yeah......there ya go.
Ah, the Terminator conundrum! Well done!
Loads of white pages for me.
Same for all of us, all I can tell you guys is that it has been passed on.
No need, you didn't cause this!
I've had white pages galore since just before the race started. Sorted by just refreshing the page again though.
I'm occasionally getting pages of an F1 forum on this error 500 website.
Bad case of whitepaginess today.
Got a few this morning as well.
Standard issue to report Moddies.
I've had a few as well earlier today, will pass it on.
Can only offer my apologies.
Can I change my user name without losing my post count?
I'm getting sick of it.


text:
Australia | About Us | Jobs | Contact Us | Help
You are here: Home Page > Arts & Humanities > Philosophy > Moral Philosophy > The Right to Be Loved
This item has an extended shipping time. The typical delivery time is 2 weeks.
The Right to Be Loved
S. Matthew Liao
The first book to make a sustained philosophical case for the right of children to be loved
Makes a unique contribution to the fast-growing literature on family ethics
Details the nature and distribution of the duty to love children
S. Matthew Liao argues here that children have a right to be loved. To do so he investigates questions such as whether children are rightholders; what grounds a child's right to beloved; whether love is an appropriate object of a right; and other philosophical and practical issues. His proposal is that all human beings have rights to the fundamental conditions for pursuing a good life; therefore, as human beings, children have human rights to the fundamental conditions for pursuing a good life. Since being loved is one of those fundamental conditions, children thus have a right to be loved. Liao shows that this claim need not be merely empty rhetoric, and that the arguments for this right can hang together as a coherent whole.
This is the first book to make a sustained philosophical case for the right of children to be loved. It makes a unique contribution to the fast-growing literature on family ethics, in particular, on children's rights and parental rights and responsibilities, and to the emerging field of the philosophy of human rights.
Chapter 1 Can Children Have Rights?
Chapter 2 Human Rights as Fundamental Conditions for a Good Life
Chapter 3 Being Loved as a Fundamental Condition for Children
Chapter 4 The Possibility of a Duty to Love
Chapter 5 The Duty to Love: Who Has It and To What Extent?
Chapter 6 Regulating Biological Parenting: The Problem of Possibly Inadequate Parents
Chapter 7 Children without Adequate Parents and the Duty to Adopt
S. Matthew Liao, Director of the Bioethics Program, Associate Professor in the Center for Bioethics, and Affiliated Professor in the Department of Philosophy, New York University
S. Matthew Liao is the Director of the Bioethics Program, Associate Professor in the Center for Bioethics, and Affiliated Professor in the Department of Philosophy at New York University. He is interested in a wide range of issues in ethics, epistemology, metaphysics, moral psychology, and bioethics, has two forthcoming edited volumes with Oxford University Press, Moral Brains: The Significance of Neuroscience for Morality and Philosophical Foundations for Human Rights (co-edited with R. Cruft and M. Renzo).
"The Right to be Loved will be a book of interest to philosophers and political theorists interested in grounding the rights of children." - Christian Perring, Metapsychology
"The Right to be Loved is a wide-ranging, novel, interesting and thought-provoking book. I found much to engage with in the book and I am sure others will find the book equally stimulating." - Liam Shields, Journal of Moral Philosophy
"A scholar of bioethics, Liao...addresses these questions in this pioneering work in the field of ethics and family life. Comprising seven interconnected essays on related themes, the book is lucid, well written, and compelling. By considering the fundamental conditions of human flourishing and what one needs to pursue a good life, the author makes a strong case for the right to be loved." - R. White, CHOICE
"...it is a worthy contribution to a vital debateLiao raises important questions, makes important arguments, and considers the views of others skillfully and fairly. Those interested in the issues discussed above will profit from reading this book." - George Rainbolt, Notre Dame Philosophical Reviews Online
The Idea of Human Rights
Charles R. Beitz
The Moral Dimensions of Human Rights
Carl Wellman
Ethics of Artificial Intelligence
Philosophy for Girls
Melissa M. Shew, Kimberly K. Garchar
Understanding Virtue
Jennifer Cole Wright, Michael T. Warren, Nancy E. Snow
Alan McHughen
Melissa Shew, Kimberly Garchar
Peter Toohey
The Biology of Death
Gary C. Howard
Moral Brains
Trust in a Polarized Age
Kevin Vallier
The Machinery of Government
Joseph Heath
Ethics and Epidemiology
Steven S. Coughlin
Dangerous Art
James Harold
Arts & Humanities > Philosophy > Moral Philosophy
Arts & Humanities > Philosophy > Practical Ethics
Science & Mathematics > Biological Sciences > Bioethics
Arts & Humanities > Society & Culture > Ethical Issues & Debates


The Belmont home decor is really suitable for the luxurious house. If you have the large area of the land, then you want to build the house in the large size, the luxury style should be recommended for you. We know that the main problem in the luxury house is how to manage the decoration so that it can look great. So, we come here to give you the tips related to the ways for making the decoration of the luxury house.
The luxury house usually has the luxurious bedding too. In making the good bedding, you have to pay attention to the size of the bedroom. If it is possible to apply the king size for the bed, you have to apply this large size. Of course it will take the large area of the bedroom. The Belmont decoration can be inserted to the big size of the bedroom too.
Because the Belmont home decor is for the luxurious house, of course the application of the items must be in the best style. In choosing the curtain, it is recommended for applying the best quality of the fabric. You have to be a clever buyer when you choose the fabric quality for the curtain. We suggest you to take the best color too.
How to Make a Great Home Decor on a Budget?


text:
Lucrecia Martel, a serious, bespectacled maker of socially conscious and subtly destabilizing dramas, is a shining star in the resurgent Argentine cinema. Her latest, The Headless Woman, is a mystery–not a conventional whodunit, but a challenging, loosely unwinding coil of questions. Driving home one day, a middle-aged woman (Maria Onetto) suddenly runs off the road. Did she hit something? A dog? A boy? Neither the camera nor anyone else has an answer, but the incident pulls her out of her comfortable daily routine. Entranced by it, she enters that opaque realm similar to the one inhabited by Kim Novak in Vertigo. Martel's film becomes both a subtle class commentary and a hauntingly subjective portrait of alienation along the lines of Polanski's Repulsion (minus the rape visions) and Coppola's The Conversation.
Martel's distinctive style–intimate angles, closely-cropped shots, precise soundtrack–is on full display in her third film, co-produced by Pedro Almodovar. "When I was a teenager, I recorded my family a lot, and by doing so I taught myself a lot about off-screen space, off-screen sound, the movement of people in the frame," she wrote (in Spanish) via email. She attributes the sense of unease that runs through her films to the horror movies on which she grew up. The Shining, along with Herk Harvey's Carnival of Souls, are some of her all-time favorites. As she recently told Reverse Shot, "I always work with some elements of horror. I love the dissolution of reality in horror films. The lack of certainty, and the lack of security. What are you seeing? What are you hearing?"
She's also considering working in other genres. She added, also via email, "At times I want to make a period film, simply for the pleasure of recreating people we only know through letters and written things," she said. "The scientific (or pseudoscientific) expeditions we've had on our continent, all those attempts to catalogue and measure, never cease to fascinate me."
Martel, who says that "the diversity" in today's Argentine cinema excites her more than anything else, says that she's working on a script for a fantasy genre, though she doesn't know it will ever actually be made into a film. Another mystery.
The Headless Woman opens August 19 at Film Forum in New York.