text:
Happy drinkers!
To help Beverly sleep through the night, we usually cut off her access to water around 6 p.m. That means the first drink of the day is such a happy occasion! She's glad to share the bowl with Darby, who's visiting this week. I love to see how long and enthusiastically those two tails wag:

My Movie from Jeannette De Wyze on Vimeo</a>.

By jdewyzein Everyday puppy life July 28, 2016 July 28, 2016 103 WordsLeave a comment
Kindergarten pup
We finally succeeded in getting Beverly to a puppy kindergarten class last night. (She attended once before when she was being fostered while we were traveling, but this was our first time together.) It takes some mental gear-shifting for us to get to the baby class, as it starts so early. We have to leave the house a bit before 5 p.m. and slog through downtown traffic to get there by 5:30. Last night we arrived late. But we found a congenial group assembled, including Keegan from our neighborhood, Target/Tarzhay (Cyndy Carlton's handsome black boy), and two adorable babies — Weasley (whom Beverly was beating up at last Saturday's play group) and a fluff ball named Vienna, being raised by first-timers.
Vienna seems like a party animal.
Beverly barked once or twice, but for the most part she watched the proceedings and cradled calmly.
She didn't try to rub her halter off during her turns to walk around the group. I had to lead her into the Down command, but once there (and rewarded with a microscopic piece of jerky treat), she obeyed my "Stay" command nicely. Staying comes naturally to Beverly. She eats even tiny bits of food slowly and thoughtfully, preferably while lying down.
It felt like we were off to a good start.
By jdewyzein Everyday puppy life July 26, 2016 225 Words1 Comment
Beverly has a problem. Our sweet, calm, sleepy little girl is a growler! This is only happening when she a) is awake and b) has the opportunity to wrestle or play with some other dog. That doesn't happen often, and it doesn't happen every time. But she's the first CCI pup we've raised who's ever gotten so vocal when playing — something that's discouraged by the Puppy-raising Powers that Be. Kyndall and Kora would play, silently, for hours. Even wild, rambunctious Dionne never growled.
Here's what it sounded like just a few minute ago, when Beverly got going with Darby (one of our former CCI trainees who was released and now lives with good friends. We're hosting her while they're on vacation.):

Growler</a> from Jeannette De Wyze on Vimeo</a>.

Kind of creepy, no?
I took Beverly and Darby to the twice-monthly puppy play session at Cyndy Carlton's yesterday, and I asked some of the more experienced folks if they had ever had this problem and how they handled it. One advised me to have my squirt bottle at hand and use it often. One suggested time-outs, when the growling got too intense. A couple shrugged it off, pointing out that it was a very natural thing for young dogs to do while playing. I know that, of course, and have only been feeling concerned because of the CCI puppy's mission. But I felt reassured to hear about a couple of other initial growlers who eventually graduated.
Another interesting aspect to the play session was that a new puppy joined us. His name is Weasley, and he's only 8 weeks old. But feisty. Beverly seemed to immediately recognize that this was the only creature smaller than her, and she loved pinning him down non-stop, prompting Weasley's puppy raiser to intervene several times. I just stood by, taking mental notes.
Beverly says, "Good times!"
By jdewyzein Everyday puppy life July 24, 2016 360 Words3 Comments
Place mat
We got a lovely surprise the other day, when Cyndy Carlton stopped by with her young puppy (Target). She presented us with a beautiful little quilt that she made, explaining that it was a place mat — a portable cozy place to bring along for a puppy like Bev to curl up on. Cyndy is Beverly's human "grandmother," having raised Beverly's real granddam, Emerald, but even with that connection, it seemed to us an extraordinarily generous gift. Beverly, for her part, is taking all the injunctions on the quilt to heart. Especially the third.
By jdewyzein Everyday puppy life July 23, 2016 96 Words5 Comments
Society girl
When we first learned about the opportunity to raise Beverly, one of my biggest concerns was that Steve and I had long ago committed to attending a conference in Las Vegas in the middle of July. We couldn't take a 3-month-old puppy with us to it, and it's not the easiest thing to find puppy-sitters, even within CCI, for dogs that young. But this was one of the many times the CCI village stepped up. With assurances from various individuals, Steve and I took the plunge. And last week Beverly got an early taste of how interesting life as a CCI trainee can be.
First we heard from Lisa Matthews, who's raising Kora (the former best friend of our last CCI pup, Kyndall). Being 6 months younger than Kyndall, Kora won't enter advanced training until November. But Lisa gamely welcomed Beverly into the 2-bedroom, upper-story condo she shares with Kora. Although I've written a lot already about how sleepy Beverly often is, Lisa reported (after the visit) that being in Kora's presence electrified our little girl. "She would run across the room and dive-bomb Kora." Apparently Kora took this abuse in good humor; the two wrestled and played for hours on end.
Amazingly, puppies are undeterred by being less than a third the size of their attack victims.
Lisa also bravely took both girls on outings — with the aid of our puppy stroller.
Happily, puppies who play hard together ultimately crash together.
Because Lisa had a social commitment that would take her out of the house for several hours Saturday and Sunday, I turned to two other devoted CCI puppy-sitters, Susan Miller and Frank Novick of Rancho Bernardo. Susan and Frank have helped us with several previous pups, and they are unfazed even by little ones. They picked up Beverly from Lisa on Friday afternoon, texting me, "We have the package. She is certainly a beauty." In succeeding texts, they let me know that things were going well. Beverly slept Saturday morning until 6:30 a.m. — a new record for her.
The social whirl doubtless helped to tire her out.
We collected her from Susan and Frank Sunday afternoon. But more fun arrived Monday morning, in the form of a visit from Cyndy Carlton and her current trainee, Target (aka Tar-zhay). Targe is the 11th puppy Cyndy has raised, and Beverly finds him entrancing. (In the puppy-raising world, Cyndy is sort of Beverly's surrogate grandmother — having raised her real grandmother, Emerald.)
He's my buddy!
Target only stayed for about an hour. But more fun will be coming to our doorstep tomorrow, when Steve and I will host one of our former trainees, Darby, for a week-long stay while her family vacations in Hawaii. In preparation for that, Beverly is resting up.
The worst possible puppy class
We were looking forward to seeing how Beverly would react last night to her first puppy class. But it couldn't have been worse. When we arrived, the gate was locked and the classroom dark. I called another puppy raiser and learned that our instructor apparently posted a notice on Facebook around noon yesterday, stating that he wouldn't be showing up (and apologizing for the last minute announcement). That's the first time I'd heard about this page (or had any clue it should be checked to confirm the classes would proceed as scheduled). We weren't the only folks who were clueless. I got a call an hour later from another puppy-raiser with an older dog who had just arrived downtown for the Advanced class — to find no one there.
We felt particularly bad about the cancellation because we had given a ride to some new puppy-raisers who livenear us; this would have been their very first class in San Diego. Their pup is a lanky young male named Keegan, just one month older than Beverly. We transported the two of them in side-by-side kennels, but when we arrived and learned the bad news, we let Beverly and Keegan sniff each other. If anything, he seems a calmer and milder-mannered fellow than Beverly (who's pretty gentle herself). It will be interesting to see how they play — but there was no place to do that last night.
Later last night, I gave Beverly an A+ in Nocturnal Puppy Behavior. Steve and I turned out the lights around 10 pm and she slept well until 5:30, when she began rustling in her kennel and I got up to take her out. The milestone was that for the very first time, I did NOT carry her down the stairs but let her walk down them on a leash, and then out to the lower level of the yard. She waited until she was all the way back there before relieving herself. Today she got the third of her four sets of puppy shots, and we learned that she weighs 25 pounds. So if the days of carrying her are over, my back and I both are very, very happy.
By jdewyzein Everyday puppy life, Milestones July 12, 2016 364 WordsLeave a comment
Three months old!
Beverly was three months old on Saturday. This Wednesday, we will have had her for four weeks. During that time she's changed
from this:
She's more than doubled in weight, and she's having new experiences daily. Some are not so great. She had her first case of diarrhea Saturday (God knows why), and that combined with a rare accident in her kennel prompted us to subject her to her first bath.
Although she's perking up a bit, she continues to amaze us with her sleepiness. Previous puppies have jumped to their feet and bounded out of their kennel whenever we opened the door, but if Beverly is snoozing, this is what typically happens even after we open the door:
She ignores us and sleeps on.
She's now big enough that she can lie down in the stroller and rest her chin on the opening. When we walked with her yesterday, she appeared to like that.
Tonight, however, she won't be able to curl up for an after-dinner nap. For the first time, we'll take her to puppy class. We're curious to see whether THAT keeps her awake.
By jdewyzein Everyday puppy life, Milestones July 11, 2016 189 Words1 Comment


Looking for the cheapest car insurance in Devils Lake, North Dakota? We can help you compare the best deals. Simply enter your Zip Code in the form above and you will be on your way to finding cheap Devils Lake, ND auto insurance quotes from the best providers in North Dakota.
One of the most important types of insurance that you can have if you are an adult is car insurance. It is legally required for all adult drivers. The type of insurance that you get can differ on each vehicle that you own. It depends upon whether or not you are making payments, or if you own the vehicle outright. Older vehicles will only need some form of liability insurance, whereas brand-new vehicles will need liability, collision, and comprehensive coverage. It can be very expensive if you own multiple vehicles, and if your rates have recently increased, it is definitely time to look for better premiums and coverage from a different provider. Here are a few of the best cheaper vehicle insurance coverage online tips that you can use as you are searching the web for the best rates available in Ramsey county.
There are two ways to purchasing car insurance policies. You can go on the internet and get prices and consider the most affordable one particular. But this will probably be insurance via a contact heart. If you want a experience to face relationship with your agent, you will want to get rates from firms that have nearby places of work.
To make certain your insurance policy addresses you like it should, make sure you know how to file a claim and maintain the paper function related to your insurance policies coverage useful. When anything occurs, do not wait to file a declare. Make contact with your insurance policy appropriate away so that they can aid you out rapidly.
Possessing automobile insurance policy is a needed and essential thing. However there are factors that you can do to assist maintain your fees down so that you have the very best deal whilst still currently being risk-free. Verify out different insurance policy companies to assess their rates. Reading the fine print in your plan will help you to keep observe of whether or not phrases have transformed or if anything in your situation has altered.
To preserve cash on car insurance, be positive to consider your young children off of your plan as soon as they have moved out on their own. If they are still at college, you could be ready to get a price reduction by means of a distant student credit. These can implement when your kid is attending college a certain distance from residence.
Conserve cash by evaluating your car insurance coverage needs and boost your personalized finance. The far more your auto expenses, the a lot more your insurance policies will value. With so many variables in insurance policies, deciding on what you require compared to not needing can be hard. Nonetheless, 1 that you might want to contemplate cutting is the collision injury portion. If your automobile is in undesirable form then there is naturally no need to have to have that sort of coverage.
Be part of an car club to get better costs and unique discount rates. Many of these clubs partner with various insurance policies organizations, so if you can sign up for 1, you can experience the rewards. Make confident to point out to your agent that you are a member of these golf equipment. Even if your business does not associate with them, they could nonetheless give you a reduced charge.
Do not settle for the initial auto insurance policy company that you locate. You might be lacking out on unique discounts or benefits. For instance, some insurance coverage organizations provide discounted premiums for accident-free of charge motorists, or for men and women of particular professions. Some even give special discounts to university pupils who maintain great grades.
Your insurance must not be way too high-priced if you generate considerably less than 7500 miles a 12 months. You can drive considerably less by taking community transportation as an alternative, or by sharing rides with your coworkers. Make confident you can give a evidence to your insurance coverage business that you push beneath 7500 miles a calendar year.
Figure out how many miles you travel in a yr before you get a automobile insurance policies quotation. This is an additional huge factor in automobile insurance coverage rates, so you want to make confident the business has an precise estimation of the amount of time you devote on the road. This could insert up to large personal savings on your estimate.
Shopping for car insurance coverage often feels mind-boggling to a lot of folks, but it want not be a stressful knowledge. By taking the time to educate your self on auto insurance policies and the several choices accessible to you, you will be in a position to make the option that is appropriate for you and your demands.


The Annual Graduate Studies Research Day took place on April 13, 2016 at the Faculty of Aerospace Engineering in the main entrance area of the Faculty building.
The Faculty graduate students' research was exhibited in poster format to undergraduate and graduate students, Faculty members, candidates for graduate studies and industry representatives.
The first prize (1000 NIS) in the Master's category was awarded to Anton Ronis, under the supervision of Assistant Professor Yigal Kronhaus.
The second prize (500 NIS) in the Master's category was awarded to Arseny Livshitz, under the supervision of Associate Professor Moshe Idan.
The first prize (1000 NIS) in the Doctoral category was awarded to Gershon Kats, under the supervision of Professor Barry Greenberg.
The second prize (500 NIS) in the Doctoral category was awarded to Michael Weidenfeld, under the supervision of Assistant Professor Avshalom Manela.
Last but not least, the winner of the "people's choice" poster, based on ballot voting by attendees at the Research Day, was Yafim Yavlochkin, under the supervision of Assistant Professor Beni Cukurel.


BRYAN EATON/Staff photo. Area emergency personnel, politicians, community members, active and retired military converged at Amesbury Chevrolet to write Valentine cards for area veterans who live at home and those who are in VA hospitals, part of the Heart to Heart program. Writing cards for veterans who live at home are reserve US Army Ssgt. Joseph LeBlance of Amesbury and retired US Navy veteran Hank Cross of Merrimac. School children in are towns created the cards that are to be delivered to the VA Hospitals in Massachusetts.


text:
// Copyright 2018 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include <linux/input.h>
#include <wayland-server.h>

#include <memory>
#include <string>
#include <vector>

#include "base/bind.h"
#include "base/containers/contains.h"
#include "base/containers/flat_set.h"
#include "base/pickle.h"
#include "base/strings/utf_string_conversions.h"
#include "base/test/bind.h"
#include "build/chromeos_buildflags.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/base/clipboard/clipboard_constants.h"
#include "ui/base/clipboard/clipboard_format_type.h"
#include "ui/base/clipboard/file_info.h"
#include "ui/base/cursor/cursor.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/base/dragdrop/mojom/drag_drop_types.mojom.h"
#include "ui/base/dragdrop/os_exchange_data.h"
#include "ui/base/dragdrop/os_exchange_data_provider_factory.h"
#include "ui/events/base_event_utils.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/ozone/platform/wayland/host/wayland_connection.h"
#include "ui/ozone/platform/wayland/host/wayland_data_device.h"
#include "ui/ozone/platform/wayland/host/wayland_data_device_manager.h"
#include "ui/ozone/platform/wayland/host/wayland_data_drag_controller.h"
#include "ui/ozone/platform/wayland/host/wayland_data_source.h"
#include "ui/ozone/platform/wayland/host/wayland_window.h"
#include "ui/ozone/platform/wayland/test/mock_surface.h"
#include "ui/ozone/platform/wayland/test/test_data_device.h"
#include "ui/ozone/platform/wayland/test/test_data_device_manager.h"
#include "ui/ozone/platform/wayland/test/test_data_offer.h"
#include "ui/ozone/platform/wayland/test/test_data_source.h"
#include "ui/ozone/platform/wayland/test/test_keyboard.h"
#include "ui/ozone/platform/wayland/test/test_wayland_server_thread.h"
#include "ui/ozone/platform/wayland/test/wayland_drag_drop_test.h"
#include "ui/ozone/platform/wayland/test/wayland_test.h"
#include "ui/ozone/public/platform_clipboard.h"
#include "ui/platform_window/platform_window_init_properties.h"
#include "ui/platform_window/wm/wm_drag_handler.h"
#include "ui/platform_window/wm/wm_drop_handler.h"
#include "url/gurl.h"

using ::testing::_;
using ::testing::Eq;
using ::testing::Mock;
using ::testing::Values;
using ui::mojom::DragEventSource;
using ui::mojom::DragOperation;

namespace ui {
namespace {

constexpr char kSampleTextForDragAndDrop[] =
    "This is a sample text for drag-and-drop.";
constexpr char16_t kSampleTextForDragAndDrop16[] =
    u"This is a sample text for drag-and-drop.";

constexpr FilenameToURLPolicy kFilenameToURLPolicy =
    FilenameToURLPolicy::CONVERT_FILENAMES;

template <typename StringType>
PlatformClipboard::Data ToClipboardData(const StringType& data_string) {
  auto* begin = reinterpret_cast<typename std::vector<uint8_t>::const_pointer>(
      data_string.data());
  std::vector<uint8_t> result(
      begin,
      begin + (data_string.size() * sizeof(typename StringType::value_type)));
  return scoped_refptr<base::RefCountedBytes>(
      base::RefCountedBytes::TakeVector(&result));
}

}  // namespace

class MockDragHandlerDelegate : public WmDragHandler::Delegate {
 public:
  MOCK_METHOD1(OnDragLocationChanged, void(const gfx::Point& location));
  MOCK_METHOD1(OnDragOperationChanged, void(DragOperation operation));
  MOCK_METHOD1(OnDragFinished, void(DragOperation operation));
  MOCK_METHOD0(GetDragWidget, absl::optional<gfx::AcceleratedWidget>());
};

class MockDropHandler : public WmDropHandler {
 public:
  MockDropHandler() = default;
  ~MockDropHandler() override = default;

  MOCK_METHOD0(MockOnDragEnter, void());
  MOCK_METHOD3(MockDragMotion,
               int(const gfx::PointF& point, int operation, int modifiers));
  MOCK_METHOD0(MockOnDragDrop, void());
  MOCK_METHOD0(OnDragLeave, void());

  void SetOnDropClosure(base::RepeatingClosure closure) {
    on_drop_closure_ = closure;
  }

  void SetPreferredOperations(int preferred_operations) {
    preferred_operations_ = preferred_operations;
  }

  OSExchangeData* dropped_data() { return dropped_data_.get(); }

  int available_operations() const { return available_operations_; }

 protected:
  void OnDragEnter(const gfx::PointF& point,
                   std::unique_ptr<ui::OSExchangeData> data,
                   int operation,
                   int modifiers) override {
    dropped_data_ = std::move(data);
    MockOnDragEnter();
  }
  void OnDragDrop(std::unique_ptr<OSExchangeData> data,
                  int modifiers) override {
    MockOnDragDrop();
    on_drop_closure_.Run();
    on_drop_closure_.Reset();
  }

  int OnDragMotion(const gfx::PointF& point,
                   int operation,
                   int modifiers) override {
    available_operations_ = operation;
    MockDragMotion(point, operation, modifiers);
    return preferred_operations_;
  }

 private:
  base::RepeatingClosure on_drop_closure_;

  std::unique_ptr<OSExchangeData> dropped_data_;
  int preferred_operations_ = ui::DragDropTypes::DRAG_COPY;
  int available_operations_ = ui::DragDropTypes::DRAG_NONE;
};

class WaylandDataDragControllerTest : public WaylandDragDropTest {
 public:
  WaylandDataDragControllerTest() = default;
  ~WaylandDataDragControllerTest() override = default;

  void SetUp() override {
    WaylandDragDropTest::SetUp();

    drag_handler_delegate_ = std::make_unique<MockDragHandlerDelegate>();
    drop_handler_ = std::make_unique<MockDropHandler>();
    SetWmDropHandler(window_.get(), drop_handler_.get());
  }

  WaylandDataDragController* drag_controller() const {
    return connection_->data_drag_controller();
  }

  WaylandDataDevice* data_device() const {
    return connection_->data_device_manager()->GetDevice();
  }

  MockDropHandler* drop_handler() { return drop_handler_.get(); }

  MockDragHandlerDelegate* drag_handler() {
    return drag_handler_delegate_.get();
  }

  wl::MockSurface* GetMockSurface(uint32_t id) {
    return server_.GetObject<wl::MockSurface>(id);
  }

  WaylandConnection* connection() { return connection_.get(); }

  WaylandWindow* window() { return window_.get(); }

  std::u16string sample_text_for_dnd() const {
    return kSampleTextForDragAndDrop16;
  }

  void RunMouseDragWithSampleData(WaylandWindow* origin_window,
                                  int operations) {
    ASSERT_TRUE(origin_window);
    OSExchangeData os_exchange_data;
    os_exchange_data.SetString(sample_text_for_dnd());
    origin_window->StartDrag(
        os_exchange_data, operations, DragEventSource::kMouse, /*cursor=*/{},
        /*can_grab_pointer=*/true, drag_handler_delegate_.get());
    Sync();
  }

  std::unique_ptr<WaylandWindow> CreateTestWindow(
      PlatformWindowType type,
      const gfx::Size& size,
      MockPlatformWindowDelegate* delegate,
      gfx::AcceleratedWidget context) {
    DCHECK(delegate);
    PlatformWindowInitProperties properties{gfx::Rect(size)};
    properties.type = type;
    properties.parent_widget = context;
    EXPECT_CALL(*delegate, OnAcceleratedWidgetAvailable(_)).Times(1);
    auto window = WaylandWindow::Create(delegate, connection_.get(),
                                        std::move(properties));
    SetWmDropHandler(window.get(), drop_handler_.get());
    EXPECT_NE(gfx::kNullAcceleratedWidget, window->GetWidget());
    Sync();
    return window;
  }

  void ScheduleDragCancel() {
    ScheduleTestTask(base::BindOnce(
        [](WaylandDataDragControllerTest* self) {
          self->SendDndCancelled();

          // DnD handlers expect DragLeave to be sent before DragFinished when
          // drag sessions end up with no data transfer (cancelled). Otherwise,
          // it might lead to issues like https://crbug.com/1109324.
          EXPECT_CALL(*self->drop_handler(), OnDragLeave).Times(1);
          // If DnD was cancelled, or data was dropped where it was not
          // accepted, the operation result must be None (0).
          // Regression test for https://crbug.com/1136751.
          EXPECT_CALL(*self->drag_handler(),
                      OnDragFinished(DragOperation::kNone))
              .Times(1);

          self->Sync();
        },
        base::Unretained(this)));
  }

  void FocusAndPressLeftPointerButton(WaylandWindow* window,
                                      MockPlatformWindowDelegate* delegate) {
    SendPointerEnter(window, delegate);
    SendPointerButton(window, delegate, BTN_LEFT, /*pressed=*/true);
    Sync();
  }

  MockPlatformWindowDelegate* delegate() { return &delegate_; }

 protected:
  std::unique_ptr<MockDropHandler> drop_handler_;
  std::unique_ptr<MockDragHandlerDelegate> drag_handler_delegate_;
};

TEST_P(WaylandDataDragControllerTest, StartDrag) {
  const bool restored_focus = window_->has_pointer_focus();
  FocusAndPressLeftPointerButton(window_.get(), &delegate_);

  auto test = [](WaylandDataDragControllerTest* self) {
    // Now the server can read the data and give it to our callback.
    base::RunLoop run_loop(base::RunLoop::Type::kNestableTasksAllowed);
    auto read_callback = base::BindOnce(
        [](base::RunLoop* loop, std::vector<uint8_t>&& data) {
          std::string result(data.begin(), data.end());
          EXPECT_EQ(kSampleTextForDragAndDrop, result);
          loop->Quit();
        },
        &run_loop);
    self->ReadData(kMimeTypeTextUtf8, std::move(read_callback));
    run_loop.Run();

    self->SendDndCancelled();
    self->Sync();
  };

  // Post test task to be performed asynchronously once the dnd-related protocol
  // objects are ready.
  ScheduleTestTask(base::BindOnce(test, base::Unretained(this)));

  RunMouseDragWithSampleData(
      window_.get(), DragDropTypes::DRAG_COPY | DragDropTypes::DRAG_MOVE);

  // Ensure drag delegate it properly reset when the drag loop quits.
  EXPECT_FALSE(data_device()->drag_delegate_);

  window_->SetPointerFocus(restored_focus);
}

TEST_P(WaylandDataDragControllerTest, StartDragWithWrongMimeType) {
  bool restored_focus = window_->has_pointer_focus();
  FocusAndPressLeftPointerButton(window_.get(), &delegate_);

  // The client starts dragging offering data with |kMimeTypeHTML|
  OSExchangeData os_exchange_data;
  os_exchange_data.SetHtml(sample_text_for_dnd(), {});
  int operations = DragDropTypes::DRAG_COPY | DragDropTypes::DRAG_MOVE;
  drag_controller()->StartSession(os_exchange_data, operations,
                                  DragEventSource::kMouse);
  Sync();

  // The server should get an empty data buffer in ReadData callback when trying
  // to read it with a different mime type.
  base::RunLoop run_loop;
  auto callback = base::BindOnce(
      [](base::RunLoop* loop, std::vector<uint8_t>&& data) {
        std::string result(data.begin(), data.end());
        EXPECT_TRUE(result.empty());
        loop->Quit();
      },
      &run_loop);
  data_device_manager_->data_source()->ReadData(kMimeTypeText,
                                                std::move(callback));
  run_loop.Run();
  window_->SetPointerFocus(restored_focus);
}

// Ensures data drag controller properly offers dragged data with custom
// formats. Regression test for a bunch of bugs, such as:
//  - https://crbug.com/1236708
//  - https://crbug.com/1207607
//  - https://crbug.com/1247063
TEST_P(WaylandDataDragControllerTest, StartDragWithCustomFormats) {
  bool restored_focus = window_->has_pointer_focus();
  FocusAndPressLeftPointerButton(window_.get(), &delegate_);
  OSExchangeData data(OSExchangeDataProviderFactory::CreateProvider());
  ClipboardFormatType kCustomFormats[] = {
      ClipboardFormatType::WebCustomDataType(),
      ClipboardFormatType::GetType("chromium/x-bookmark-entries"),
      ClipboardFormatType::GetType("xyz/arbitrary-custom-type")};
  for (auto format : kCustomFormats)
    data.SetPickledData(format, {});

  // The client starts dragging offering pickled data with custom formats.
  drag_controller()->StartSession(data, DragDropTypes::DRAG_MOVE,
                                  DragEventSource::kMouse);
  Sync();

  ASSERT_TRUE(data_device_manager_->data_source());
  auto mime_types = data_device_manager_->data_source()->mime_types();
  EXPECT_EQ(3u, mime_types.size());

  for (auto format : kCustomFormats) {
    EXPECT_TRUE(base::Contains(mime_types, format.GetName()))
        << "Format '" << format.GetName() << "' should be offered.";
  }

  window_->SetPointerFocus(restored_focus);
}

TEST_P(WaylandDataDragControllerTest, StartDragWithText) {
  bool restored_focus = window_->has_pointer_focus();
  FocusAndPressLeftPointerButton(window_.get(), &delegate_);

  // The client starts dragging offering text mime type.
  OSExchangeData os_exchange_data;
  os_exchange_data.SetString(sample_text_for_dnd());
  int operations = DragDropTypes::DRAG_COPY | DragDropTypes::DRAG_MOVE;
  drag_controller()->StartSession(os_exchange_data, operations,
                                  DragEventSource::kMouse);
  Sync();

  // The server should get a "text" representation in ReadData callback when
  // trying to read it as mime type other than |kMimeTypeText| and
  // |kTextMimeTypeUtf8|.
  base::RunLoop run_loop;
  auto callback = base::BindOnce(
      [](base::RunLoop* loop, std::vector<uint8_t>&& data) {
        std::string result(data.begin(), data.end());
        EXPECT_EQ(kSampleTextForDragAndDrop, result);
        loop->Quit();
      },
      &run_loop);
  data_device_manager_->data_source()->ReadData(kMimeTypeMozillaURL,
                                                std::move(callback));
  run_loop.Run();
  window_->SetPointerFocus(restored_focus);
}

TEST_P(WaylandDataDragControllerTest, StartDragWithFileContents) {
  bool restored_focus = window_->has_pointer_focus();
  FocusAndPressLeftPointerButton(window_.get(), &delegate_);

  // The client starts dragging offering text mime type.
  OSExchangeData os_exchange_data;
  os_exchange_data.SetFileContents(
      base::FilePath(FILE_PATH_LITERAL("t\\est\".jpg")),
      kSampleTextForDragAndDrop);
  int operations = DragDropTypes::DRAG_COPY | DragDropTypes::DRAG_MOVE;
  drag_controller()->StartSession(os_exchange_data, operations,
                                  DragEventSource::kMouse);
  Sync();

  base::RunLoop run_loop;
  auto callback = base::BindOnce(
      [](base::RunLoop* loop, std::vector<uint8_t>&& data) {
        std::string result(data.begin(), data.end());
        EXPECT_EQ(kSampleTextForDragAndDrop, result);
        loop->Quit();
      },
      &run_loop);
  data_device_manager_->data_source()->ReadData(
      "application/octet-stream;name=\"t\\\\est\\\".jpg\"",
      std::move(callback));
  run_loop.Run();
  EXPECT_EQ(1u, data_device_manager_->data_source()->mime_types().size());
  EXPECT_EQ("application/octet-stream;name=\"t\\\\est\\\".jpg\"",
            data_device_manager_->data_source()->mime_types().front());
  window_->SetPointerFocus(restored_focus);
}

TEST_P(WaylandDataDragControllerTest, ReceiveDrag) {
  auto* data_offer =
      data_device_manager_->data_device()->CreateAndSendDataOffer();
  data_offer->OnOffer(kMimeTypeText,
                      ToClipboardData(std::string(kSampleTextForDragAndDrop)));

  gfx::Point entered_point(10, 10);
  // The server sends an enter event.
  data_device_manager_->data_device()->OnEnter(
      1002, surface_->resource(), wl_fixed_from_int(entered_point.x()),
      wl_fixed_from_int(entered_point.y()), data_offer);

  Sync();

  int64_t time =
      (EventTimeForNow() - base::TimeTicks()).InMilliseconds() & UINT32_MAX;
  gfx::Point motion_point(11, 11);

  // The server sends an motion event.
  data_device_manager_->data_device()->OnMotion(
      time, wl_fixed_from_int(motion_point.x()),
      wl_fixed_from_int(motion_point.y()));

  Sync();

  auto callback = base::BindOnce([](PlatformClipboard::Data contents) {
    std::string result;
    EXPECT_TRUE(contents);
    result.assign(contents->front_as<char>(), contents->size());
    EXPECT_EQ(kSampleTextForDragAndDrop, result);
  });

  // The client requests the data and gets callback with it.
  data_device()->RequestData(drag_controller()->data_offer_.get(),
                             kMimeTypeText, std::move(callback));
  Sync();

  data_device_manager_->data_device()->OnLeave();
}

TEST_P(WaylandDataDragControllerTest, DropSeveralMimeTypes) {
  auto* data_offer =
      data_device_manager_->data_device()->CreateAndSendDataOffer();
  data_offer->OnOffer(kMimeTypeText,
                      ToClipboardData(std::string(kSampleTextForDragAndDrop)));
  data_offer->OnOffer(
      kMimeTypeMozillaURL,
      ToClipboardData(std::u16string(u"https://sample.com/\r\nSample")));
  data_offer->OnOffer(
      kMimeTypeURIList,
      ToClipboardData(std::string("file:///home/user/file\r\n")));

  EXPECT_CALL(*drop_handler_, MockOnDragEnter()).Times(1);
  gfx::Point entered_point(10, 10);
  data_device_manager_->data_device()->OnEnter(
      1002, surface_->resource(), wl_fixed_from_int(entered_point.x()),
      wl_fixed_from_int(entered_point.y()), data_offer);
  // Here we are expecting three data items, so there will be three roundtrips
  // to the Wayland and back.  Hence Sync() three times.
  Sync();
  Sync();
  Sync();

  EXPECT_CALL(*drop_handler_, MockOnDragDrop()).Times(1);
  base::RunLoop loop;
  drop_handler_->SetOnDropClosure(loop.QuitClosure());
  data_device_manager_->data_device()->OnDrop();

  Sync();
  loop.Run();
  Mock::VerifyAndClearExpectations(drop_handler_.get());

  ASSERT_NE(drop_handler_->dropped_data(), nullptr);
  EXPECT_TRUE(drop_handler_->dropped_data()->HasString());
  EXPECT_TRUE(drop_handler_->dropped_data()->HasFile());
  EXPECT_TRUE(drop_handler_->dropped_data()->HasURL(kFilenameToURLPolicy));

  data_device_manager_->data_device()->OnLeave();
}

// Tests URI validation for text/uri-list MIME type.  Log warnings rendered in
// the console when this test is running are the expected and valid side effect.
TEST_P(WaylandDataDragControllerTest, ValidateDroppedUriList) {
  const struct {
    std::string content;
    base::flat_set<std::string> expected_uris;
  } kCases[] = {{{}, {}},
                {"file:///home/user/file\r\n", {"/home/user/file"}},
                {"# Comment\r\n"
                 "file:///home/user/file\r\n"
                 "file:///home/guest/file\r\n"
                 "not a filename at all\r\n"
                 "https://valid.url/but/scheme/is/not/file/so/invalid\r\n",
                 {"/home/user/file", "/home/guest/file"}}};

  for (const auto& kCase : kCases) {
    auto* data_offer =
        data_device_manager_->data_device()->CreateAndSendDataOffer();
    data_offer->OnOffer(kMimeTypeURIList, ToClipboardData(kCase.content));

    EXPECT_CALL(*drop_handler_, MockOnDragEnter()).Times(1);
    gfx::Point entered_point(10, 10);
    data_device_manager_->data_device()->OnEnter(
        1002, surface_->resource(), wl_fixed_from_int(entered_point.x()),
        wl_fixed_from_int(entered_point.y()), data_offer);
    Sync();

    EXPECT_CALL(*drop_handler_, MockOnDragDrop()).Times(1);
    base::RunLoop loop;
    drop_handler_->SetOnDropClosure(loop.QuitClosure());
    data_device_manager_->data_device()->OnDrop();

    Sync();
    loop.Run();
    Mock::VerifyAndClearExpectations(drop_handler_.get());

    if (kCase.expected_uris.empty()) {
      EXPECT_FALSE(drop_handler_->dropped_data()->HasFile());
    } else {
      EXPECT_TRUE(drop_handler_->dropped_data()->HasFile());
      std::vector<FileInfo> filenames;
      EXPECT_TRUE(drop_handler_->dropped_data()->GetFilenames(&filenames));
      EXPECT_EQ(filenames.size(), kCase.expected_uris.size());
      for (const auto& filename : filenames)
        EXPECT_EQ(kCase.expected_uris.count(filename.path.AsUTF8Unsafe()), 1U);
    }

    EXPECT_CALL(*drop_handler_, OnDragLeave()).Times(1);
    data_device_manager_->data_device()->OnLeave();
    Sync();
    Mock::VerifyAndClearExpectations(drop_handler_.get());
  }
}

// Tests URI validation for text/x-moz-url MIME type.  Log warnings rendered in
// the console when this test is running are the expected and valid side effect.
TEST_P(WaylandDataDragControllerTest, ValidateDroppedXMozUrl) {
  const struct {
    std::u16string content;
    std::string expected_url;
    std::u16string expected_title;
  } kCases[] = {
      {{}, {}, {}},
      {u"http://sample.com/\r\nSample", "http://sample.com/", u"Sample"},
      {u"http://title.must.be.set/", {}, {}},
      {u"url.must.be.valid/and/have.scheme\r\nInvalid URL", {}, {}},
      {u"file:///files/are/ok\r\nThe policy allows that",
       "file:///files/are/ok", u"The policy allows that"}};

  for (const auto& kCase : kCases) {
    auto* data_offer =
        data_device_manager_->data_device()->CreateAndSendDataOffer();
    data_offer->OnOffer(kMimeTypeMozillaURL, ToClipboardData(kCase.content));

    EXPECT_CALL(*drop_handler_, MockOnDragEnter()).Times(1);
    gfx::Point entered_point(10, 10);
    data_device_manager_->data_device()->OnEnter(
        1002, surface_->resource(), wl_fixed_from_int(entered_point.x()),
        wl_fixed_from_int(entered_point.y()), data_offer);
    Sync();

    EXPECT_CALL(*drop_handler_, MockOnDragDrop()).Times(1);
    base::RunLoop loop;
    drop_handler_->SetOnDropClosure(loop.QuitClosure());
    data_device_manager_->data_device()->OnDrop();

    Sync();
    loop.Run();
    Mock::VerifyAndClearExpectations(drop_handler_.get());

    const auto* const dropped_data = drop_handler_->dropped_data();
    if (kCase.expected_url.empty()) {
      EXPECT_FALSE(dropped_data->HasURL(kFilenameToURLPolicy));
    } else {
      EXPECT_TRUE(dropped_data->HasURL(kFilenameToURLPolicy));
      GURL url;
      std::u16string title;
      EXPECT_TRUE(
          dropped_data->GetURLAndTitle(kFilenameToURLPolicy, &url, &title));
      EXPECT_EQ(url.spec(), kCase.expected_url);
      EXPECT_EQ(title, kCase.expected_title);
    }

    EXPECT_CALL(*drop_handler_, OnDragLeave()).Times(1);
    data_device_manager_->data_device()->OnLeave();
    Sync();
    Mock::VerifyAndClearExpectations(drop_handler_.get());
  }
}

// Verifies the correct delegate functions are called when a drag session is
// started and cancelled within the same surface.
TEST_P(WaylandDataDragControllerTest, StartAndCancel) {
  const bool restored_focus = window_->has_pointer_focus();
  FocusAndPressLeftPointerButton(window_.get(), &delegate_);

  // Schedule a wl_data_source::cancelled event to be sent asynchronously
  // once the drag session gets started.
  ScheduleDragCancel();

  RunMouseDragWithSampleData(window_.get(), DragDropTypes::DRAG_COPY);

  window_->SetPointerFocus(restored_focus);
}

TEST_P(WaylandDataDragControllerTest, ForeignDragHandleAskAction) {
  auto* data_offer =
      data_device_manager_->data_device()->CreateAndSendDataOffer();
  data_offer->OnOffer(kMimeTypeText,
                      ToClipboardData(std::string(kSampleTextForDragAndDrop)));
  data_offer->OnSourceActions(WL_DATA_DEVICE_MANAGER_DND_ACTION_MOVE |
                              WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY);
  data_offer->OnAction(WL_DATA_DEVICE_MANAGER_DND_ACTION_ASK);

  gfx::Point entered_point(10, 10);
  // The server sends an enter event.
  data_device_manager_->data_device()->OnEnter(
      1002, surface_->resource(), wl_fixed_from_int(entered_point.x()),
      wl_fixed_from_int(entered_point.y()), data_offer);
  Sync();

  int64_t time = 1;
  gfx::Point motion_point(11, 11);

  // Verify ask handling with drop handler preferring "copy" operation.
  drop_handler_->SetPreferredOperations(ui::DragDropTypes::DRAG_COPY);
  data_device_manager_->data_device()->OnMotion(
      time, wl_fixed_from_int(motion_point.x()),
      wl_fixed_from_int(motion_point.y()));
  Sync();

  EXPECT_EQ(WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY,
            data_offer->preferred_action());
  EXPECT_EQ(WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY,
            data_offer->supported_actions());

  data_device_manager_->data_device()->OnLeave();
}

// Verifies entered surface destruction is properly handled.
// Regression test for https://crbug.com/1143707.
TEST_P(WaylandDataDragControllerTest, DestroyEnteredSurface) {
  auto* window_1 = window_.get();
  const bool restored_focus = window_1->has_pointer_focus();
  FocusAndPressLeftPointerButton(window_1, &delegate_);

  ASSERT_EQ(PlatformWindowType::kWindow, window_1->type());

  auto test = [](WaylandDataDragControllerTest* self) {
    // Init and open |target_window|.
    MockPlatformWindowDelegate delegate_2;
    auto window_2 =
        self->CreateTestWindow(PlatformWindowType::kWindow, gfx::Size(80, 80),
                               &delegate_2, gfx::kNullAcceleratedWidget);

    // Leave |window_1| and enter |window_2|.
    self->SendDndLeave();
    self->SendDndEnter(window_2.get(), gfx::Point(20, 20));
    self->Sync();

    // Destroy the entered window at client side and emulates a
    // wl_data_device::leave to ensure no UAF happens.
    window_2->PrepareForShutdown();
    window_2.reset();
    self->SendDndLeave();
    self->Sync();

    // Emulate server sending an wl_data_source::cancelled event so the drag
    // loop is finished.
    self->SendDndCancelled();
    self->Sync();
  };

  // Post test task to be performed asynchronously once the drag session gets
  // started.
  ScheduleTestTask(base::BindOnce(test, base::Unretained(this)));

  RunMouseDragWithSampleData(window_.get(), DragDropTypes::DRAG_COPY);

  window_1->SetPointerFocus(restored_focus);
}

// Verifies that early origin surface destruction is properly handled.
// Regression test for https://crbug.com/1143707.
TEST_P(WaylandDataDragControllerTest, DestroyOriginSurface) {
  auto* window_1 = window_.get();
  const bool restored_focus = window_1->has_pointer_focus();
  window_1->SetPointerFocus(false);
  ASSERT_EQ(PlatformWindowType::kWindow, window_1->type());

  auto test = [](WaylandDataDragControllerTest* self,
                 std::unique_ptr<WaylandWindow>* origin) {
    // Leave origin surface and enter |window_|.
    self->SendDndLeave();
    self->SendDndEnter(self->window(), gfx::Point(20, 20));
    self->Sync();

    // Shutdown and destroy the popup window where the drag session was
    // initiated, which leads to the drag loop to finish.
    (*origin)->PrepareForShutdown();
    origin->reset();
  };

  // Init and open |target_window|.
  MockPlatformWindowDelegate delegate_2;
  auto window_2 =
      CreateTestWindow(PlatformWindowType::kPopup, gfx::Size(80, 80),
                       &delegate_2, window_1->GetWidget());
  FocusAndPressLeftPointerButton(window_2.get(), &delegate_);

  // Post test task to be performed asynchronously once the drag session gets
  // started.
  ScheduleTestTask(base::BindOnce(test, base::Unretained(this),
                                  base::Unretained(&window_2)));

  // Request to start the drag session, which spins a nested run loop.
  OSExchangeData os_exchange_data;
  os_exchange_data.SetString(sample_text_for_dnd());
  window_2->StartDrag(os_exchange_data, DragDropTypes::DRAG_COPY,
                      DragEventSource::kMouse, {}, true,
                      drag_handler_delegate_.get());
  Sync();

  // Send wl_data_source::cancelled event. The drag controller is then
  // expected to gracefully reset its internal state.
  SendDndLeave();
  SendDndCancelled();
  Sync();

  window_1->SetPointerFocus(restored_focus);
}

// Ensures drag/drop events are properly propagated to non-toplevel windows.
TEST_P(WaylandDataDragControllerTest, DragToNonToplevelWindows) {
  auto* origin_window = window_.get();
  const bool restored_focus = origin_window->has_pointer_focus();
  FocusAndPressLeftPointerButton(origin_window, &delegate_);

  auto test = [](WaylandDataDragControllerTest* self,
                 PlatformWindowType window_type,
                 gfx::AcceleratedWidget context) {
    // Init and open |target_window|.
    MockPlatformWindowDelegate aux_window_delegate;
    auto aux_window = self->CreateTestWindow(window_type, gfx::Size(100, 40),
                                             &aux_window_delegate, context);

    // Leave |origin_window| and enter non-toplevel |aux_window|.
    self->SendDndLeave();
    EXPECT_CALL(*self->drop_handler(), OnDragLeave).Times(1);
    self->Sync();

    self->SendDndEnter(aux_window.get(), {});
    EXPECT_CALL(*self->drop_handler(), MockOnDragEnter()).Times(1);
    EXPECT_CALL(*self->drop_handler(), MockDragMotion(_, _, _)).Times(1);
    self->Sync();

    // Goes back to |origin_window|, as |aux_window| is going to get destroyed
    // once this test task finishes.
    self->SendDndLeave();
    EXPECT_CALL(*self->drop_handler(), OnDragLeave).Times(1);
    self->Sync();

    self->SendDndEnter(self->window(), {});
    EXPECT_CALL(*self->drop_handler(), MockOnDragEnter()).Times(1);
    EXPECT_CALL(*self->drop_handler(), MockDragMotion(_, _, _)).Times(1);
    self->Sync();
  };

  // Post test tasks, for each non-toplevel window type, to be performed
  // asynchronously once the dnd-related protocol objects are ready.
  constexpr PlatformWindowType kNonToplevelWindowTypes[]{
      PlatformWindowType::kPopup, PlatformWindowType::kMenu,
      PlatformWindowType::kTooltip, PlatformWindowType::kBubble};
  for (auto window_type : kNonToplevelWindowTypes) {
    ScheduleTestTask(base::BindOnce(test, base::Unretained(this), window_type,
                                    window_type == PlatformWindowType::kBubble
                                        ? gfx::kNullAcceleratedWidget
                                        : origin_window->GetWidget()));
  }

  // Post a wl_data_source::cancelled notifying the client to tear down the drag
  // session.
  ScheduleDragCancel();

  // Request to start the drag session, which spins a nested run loop.
  RunMouseDragWithSampleData(origin_window, DragDropTypes::DRAG_COPY);

  origin_window->SetPointerFocus(restored_focus);
}

// Ensures that requests to create a |PlatformWindowType::kPopup| during drag
// sessions return xdg_popup-backed windows.
TEST_P(WaylandDataDragControllerTest, PopupRequestCreatesPopupWindow) {
  auto* origin_window = window_.get();
  const bool restored_focus = origin_window->has_pointer_focus();
  FocusAndPressLeftPointerButton(origin_window, &delegate_);

  std::unique_ptr<WaylandWindow> popup_window;

  ScheduleTestTask(base::BindLambdaForTesting([&]() {
    MockPlatformWindowDelegate delegate;
    popup_window =
        CreateTestWindow(PlatformWindowType::kPopup, gfx::Size(100, 40),
                         &delegate, origin_window->GetWidget());
    popup_window->Show(false);
    Sync();
  }));

  // Post a wl_data_source::cancelled notifying the client to tear down the drag
  // session.
  ScheduleDragCancel();

  // Request to start the drag session, which spins a nested run loop.
  RunMouseDragWithSampleData(origin_window, DragDropTypes::DRAG_MOVE);

  Sync();
  ASSERT_TRUE(popup_window.get());
  auto* surface = GetMockSurface(popup_window->root_surface()->GetSurfaceId());
  ASSERT_TRUE(surface);
  EXPECT_NE(nullptr, surface->xdg_surface()->xdg_popup());

  origin_window->SetPointerFocus(restored_focus);
}

// Ensures that requests to create a |PlatformWindowType::kMenu| during drag
// sessions return xdg_popup-backed windows.
TEST_P(WaylandDataDragControllerTest, MenuRequestCreatesPopupWindow) {
  auto* origin_window = window_.get();
  const bool restored_focus = origin_window->has_pointer_focus();
  FocusAndPressLeftPointerButton(origin_window, &delegate_);

  auto test = [](WaylandDataDragControllerTest* self,
                 gfx::AcceleratedWidget context) {
    MockPlatformWindowDelegate delegate;
    auto menu_window = self->CreateTestWindow(
        PlatformWindowType::kMenu, gfx::Size(100, 40), &delegate, context);
    menu_window->Show(false);
    self->Sync();

    auto* surface =
        self->GetMockSurface(menu_window->root_surface()->GetSurfaceId());
    ASSERT_TRUE(surface);
    EXPECT_EQ(nullptr, surface->sub_surface());
  };

  ScheduleTestTask(
      base::BindOnce(test, base::Unretained(this), origin_window->GetWidget()));

  // Post a wl_data_source::cancelled notifying the client to tear down the drag
  // session.
  ScheduleDragCancel();

  // Request to start the drag session, which spins a nested run loop.
  RunMouseDragWithSampleData(origin_window, DragDropTypes::DRAG_COPY);

  origin_window->SetPointerFocus(restored_focus);
}

// Regression test for https://crbug.com/1209269.
//
// Emulates "quick" wl_pointer.button release events being sent by the
// compositor, and processed by the ozone/wayland either (1) before or (2) just
// after WaylandWindow::StartDrag is called. The drag start happens in
// reposponse to sequence of input events. Such event processing may take some
// time, for example, when they happen in web contents, which involves async
// browser <=> renderer IPC, etc. In both cases, drag controller is expected to
// gracefully reset state and quit drag loop as if the drag session was
// cancelled as usual.
TEST_P(WaylandDataDragControllerTest, AsyncNoopStartDrag) {
  const bool restored_focus = window_->has_pointer_focus();
  OSExchangeData os_exchange_data;
  os_exchange_data.SetString(sample_text_for_dnd());

  // 1. Send wl_pointer.button release before drag start.
  FocusAndPressLeftPointerButton(window_.get(), &delegate_);
  SendPointerButton(window_.get(), &delegate_, BTN_LEFT, /*pressed=*/false);
  Sync();

  EXPECT_CALL(*this, MockStartDrag(_, _, _)).Times(0);

  // Attempt to start drag session and ensure it fails.
  bool result_1 = window_->StartDrag(os_exchange_data, DragDropTypes::DRAG_COPY,
                                     DragEventSource::kMouse, /*cursor=*/{},
                                     /*can_grab_pointer=*/true,
                                     drag_handler_delegate_.get());
  EXPECT_FALSE(result_1);
  Mock::VerifyAndClearExpectations(drop_handler_.get());
  Mock::VerifyAndClearExpectations(this);
  EXPECT_FALSE(drag_controller()->origin_window_);
  EXPECT_FALSE(drag_controller()->nested_dispatcher_);

  // 2. Send wl_pointer.button release just after drag start.
  FocusAndPressLeftPointerButton(window_.get(), &delegate_);
  Sync();

  // Schedule a wl_pointer.button up, attempt to start drag session and ensure
  // it exits with cancellation status.
  ScheduleTestTask(base::BindLambdaForTesting([&]() {
    SendPointerButton(window_.get(), &delegate_, BTN_LEFT, /*pressed=*/false);

    EXPECT_CALL(*drop_handler_, OnDragLeave).Times(1);
    EXPECT_CALL(*drag_handler_delegate_,
                OnDragFinished(Eq(DragOperation::kNone)))
        .Times(1);
    Sync();
  }));
  EXPECT_CALL(*this, MockStartDrag(_, _, _)).Times(1);
  bool result_2 = window_->StartDrag(os_exchange_data, DragDropTypes::DRAG_COPY,
                                     DragEventSource::kMouse, /*cursor=*/{},
                                     /*can_grab_pointer=*/true,
                                     drag_handler_delegate_.get());
  // TODO(crbug.com/1022722): Double-check if this should return false instead.
  EXPECT_TRUE(result_2);
  Mock::VerifyAndClearExpectations(drop_handler_.get());
  Mock::VerifyAndClearExpectations(drag_handler_delegate_.get());
  Mock::VerifyAndClearExpectations(this);
  EXPECT_FALSE(drag_controller()->origin_window_);
  EXPECT_FALSE(drag_controller()->nested_dispatcher_);

  window_->SetPointerFocus(restored_focus);
}

// Regression test for https://crbug.com/1175083.
TEST_P(WaylandDataDragControllerTest, StartDragWithCorrectSerial) {
  const bool restored_focus = window_->has_pointer_focus();

  FocusAndPressLeftPointerButton(window_.get(), &delegate_);
  uint32_t mouse_press_serial = current_serial_;

  // Emulate a wl_keyboard.key press event being processed by the compositor
  // before the drag starts. In this case, the client is expected to send the
  // correct serial value when starting the drag session (ie: the one received
  // with wl_pointer.button).
  auto* keyboard = server_.seat()->keyboard();
  ASSERT_TRUE(keyboard);
  struct wl_array empty;
  wl_array_init(&empty);
  wl_keyboard_send_enter(keyboard->resource(), 1, surface_->resource(), &empty);
  wl_array_release(&empty);
  wl_keyboard_send_key(keyboard->resource(), NextSerial(), 0, 30 /* a */,
                       WL_KEYBOARD_KEY_STATE_PRESSED);
  Sync();

  // Post a wl_data_source::cancelled notifying the client to tear down the drag
  // session.
  ScheduleDragCancel();

  // Request to start the drag session, which spins a nested run loop, and
  // ensure correct serial (mouse button press) is sent to the server with
  // wl_data_device.start_drag request.
  EXPECT_CALL(*this, MockStartDrag(_, _, Eq(mouse_press_serial))).Times(1);
  RunMouseDragWithSampleData(window_.get(), DragDropTypes::DRAG_COPY);
  Mock::VerifyAndClearExpectations(drop_handler_.get());
  Mock::VerifyAndClearExpectations(this);

  window_->SetPointerFocus(restored_focus);
}

// Check drag session is correctly started when there are both mouse button and
// a touch point pressed.
TEST_P(WaylandDataDragControllerTest, StartDragWithCorrectSerialForDragSource) {
  const bool pointer_focus = window_->has_pointer_focus();
  const bool touch_focus = window_->has_touch_focus();
  OSExchangeData os_exchange_data;
  os_exchange_data.SetString(sample_text_for_dnd());

  auto* const window_manager = connection_->wayland_window_manager();
  ASSERT_FALSE(window_manager->GetCurrentPointerFocusedWindow());
  ASSERT_FALSE(window_manager->GetCurrentTouchFocusedWindow());

  FocusAndPressLeftPointerButton(window_.get(), &delegate_);
  uint32_t mouse_press_serial = current_serial_;
  ASSERT_EQ(window_.get(), window_manager->GetCurrentPointerFocusedWindow());
  ASSERT_FALSE(window_manager->GetCurrentTouchFocusedWindow());

  // Check drag does not start when requested with kTouch drag source, even when
  // there is a mouse button pressed (ie: kMousePress serial available).
  EXPECT_CALL(*this, MockStartDrag(_, _, _)).Times(0);
  bool drag_started = window_->StartDrag(
      os_exchange_data, DragDropTypes::DRAG_COPY, DragEventSource::kTouch,
      /*cursor=*/{}, /*can_grab_pointer=*/true, drag_handler_delegate_.get());
  EXPECT_FALSE(drag_started);
  Mock::VerifyAndClearExpectations(drop_handler_.get());
  Mock::VerifyAndClearExpectations(this);

  SendTouchDown(window_.get(), &delegate_, 1, {30, 30});
  Sync();
  ASSERT_EQ(window_.get(), window_manager->GetCurrentTouchFocusedWindow());
  ASSERT_EQ(window_.get(), window_manager->GetCurrentPointerFocusedWindow());

  // Schedule dnd session cancellation so that the drag loop gracefully exits.
  ScheduleDragCancel();

  // Check drag is started with correct serial value, as per the drag source
  // passed in, even when it is not the most recent serial, ie: touch down
  // received after mouse button press.
  EXPECT_CALL(*this, MockStartDrag(_, _, Eq(mouse_press_serial))).Times(1);
  bool success = window_->StartDrag(
      os_exchange_data, DragDropTypes::DRAG_COPY, DragEventSource::kMouse,
      /*cursor=*/{}, /*can_grab_pointer=*/true, drag_handler_delegate_.get());
  EXPECT_TRUE(success);
  Mock::VerifyAndClearExpectations(drop_handler_.get());
  Mock::VerifyAndClearExpectations(this);

  // Restore window's focus state.
  window_->SetPointerFocus(pointer_focus);
  window_->set_touch_focus(touch_focus);
}

INSTANTIATE_TEST_SUITE_P(XdgVersionStableTest,
                         WaylandDataDragControllerTest,
                         Values(wl::ServerConfig{
                             .shell_version = wl::ShellVersion::kStable}));

INSTANTIATE_TEST_SUITE_P(XdgVersionV6Test,
                         WaylandDataDragControllerTest,
                         Values(wl::ServerConfig{
                             .shell_version = wl::ShellVersion::kV6}));

}  // namespace ui

redpajama_set_name: RedPajamaGithub


When it comes to busy queues and FreePBX, it often results in requests for help in the forums and to our support department because of overloaded systems or certain functions that do not seem work right. FreePBX was designed to be an SMB PBX concentrating on feature rich capabilities at the expense of complex dialplan and AGI scripts, all of which take their toll when you setup a reasonable size call center and start throwing lots of simultaneous calls at a group of queue members. This Technical Corner post will discuss some of the advancements introduced in FreePBX over the years to help accommodate systems that make extensive use of queues. These same changes will have positive impact on low power appliances and any other system that uses queues.
Throughout the article we will refer to FreePBX Queue Agents as members to be consistent with the Asterisk naming convention. FreePBX commonly refers to any queue member as a Queue Agent which is someone who answers calls destined for the queue and does not specifically refer to the Asterisk agents.conf agents.
Before going into the solutions we will frame the problem and describe why FreePBX runs into issues that other Asterisk configurations may not. The root cause of the issues described in this article hinge on two fundamentals that are employed by FreePBX. First of all, FreePBX abstracts extensions from the device(s) they are associated with. You can read more about this in a past article FreePBX Devices and Users Under the Hood. As a result, queue members are not dialed by calling the device directly but instead are sent down the Asterisk dialplan through the Local channel. This allows the extension to be called in the same way that they would be dialed by another user on the system. It also enables all possible features such as call forwarding, follow-me, etc. It further allows arbitrary external phone numbers to be treated as members in addition to other creative uses. This leads to the second fundamental, all internal calls in FreePBX employ the use of the dialparties.agi AGI script along with other AGI scripts when making calls. As a result, calling a queue member is a "heavy" operation (as is calling any extension on the system). In the case of a queue, this is multiplied when employing a ringall strategy (very common) because every queue call that is dispatched ends up in simultaneous calls to every member, and thus a barrage of heavy dialplan and AGI scripts are launched, often just to find out that most of the members are currently in use and should not have their phones rung anyhow.
Aside from overloading the system when many members are present, the most common side effect of using the Local channel when making calls is encountered when a member transfers their received call elsewhere. When this occurs in conjunction with the Asterisk queues configuration of ringinuse=no (see below), that member remains "Busy" until that transferred call is terminated. This occurs because of the nature of the Local channel. This means that the member is now free but will not receive any calls from the queue.
Allow only extensions to be dialed, and send them down a special context that puts further restrictions on them. Certain safe guards are removed from the queue calls that normally help block calls from hitting member voicemails since the special context handles that. As a result, this mode is also safe for direct device dialing.
Occupied members will have new queue calls presented to them.
Same situation as above with the addition of the queues.conf setting of ringinuse=no. With no patches and standard Local channel members, this will result in calls not being dispatched to busy members from this queue including those who subsequently transferred their calls elsewhere (an undesirable side effect). With the patch below installed, this side effect goes away.
Without the patch below, this will result in the queue not sending calls to members currently on calls from this or another queue. It has the same side effects as the previous case. If there are no queue calls the call will be dispatched and if the member is on their phone with a non-queue call, their phone will still ring with this call (unless they have call waiting disabled). When the patch is introduced, this setting is functionally equivalent to the previous one.
These settings provide various levels of filtering to avoid undesirable features such as different Call Forward and Follow-Me features, or multi-line phones ringing additional queue calls when members are busy on existing calls.
or something similar. So once the queue sends a call down to that member, even if the call is subsequently transfered, the original Local channel is still busy and the queue application does not have any more information to determine the state of that member, so they remain busy and no additional calls are sent to that member if the Asterisk queue configuration ringinuse=no is set. The Asterisk team recognized the limitation in version 1.6 and introduced some additional parameters to the member assignment. They introduced the ability to associate a different device state with the queue member. They also recognized the limitation as enough of an issue that they made a rare move and added the new "feature" as a back port starting in Asterisk 1.4.25. This was a great move however the solution was incomplete and does not become complete until Asterisk 1.8 (unless enough of you complain). Adding the ability to use the state of a device is nice, but it misses the fact that the state of an extension is not solely based on a device state. It is based on the state of the "hint" associated with that extension and could include multiple devices as well as custom extension state information (such as a server side DND feature). Since all extensions in FreePBX are abstracted and use such hints to determine their state, this new ability can not be employed without patching asterisk to make their solution complete. (A hint in Asterisk is what is used to provide status to telephone BLF buttons and implement more sophisticated dialplan, see Asterisk documentation for more information on the hint priority).
Now back to the overloaded queue situation discussed earlier. The crux of the issue occurs when you don't set Skip Busy Agent to Yes + (ringinuse=no) or Queue Calls Only (ringinuse=no). Doing options other than these two tells the queue to try all members regardless of whether they are on the phone or not. Without the above patch, this gets around the "member transferred call" issue but results in all members being called whether or not they are busy. The underlying dialplan still blocks the member's phone from ringing in dialparties.agi, however the system can be loaded heavily because of the barrage of dialplan and AGI scripts being run. When the above patch is applied, you now remove that barrier resulting in a solution that addresses both issues. By setting either of these two settings in conjunction with the member hint information supplied by the patch, the queue will not overload the system with attempted calls to any member seen as in use based on their hint information. This can take a tremendous load off the system while maintaining proper state information and avoiding in use members from receiving calls that will just be rejected by dialparties.agi. Now if the Asterisk team would recognize the limitation of their original fix and back port the "HINT:" solution to 1.4 and 1.6 we could all benefit from this ability without the need to patch Asterisk!
This new Asterisk capability in conjunction with the required patch solves the "transfer" problem and reduces the number of members being called to those who are actually available to take a call. That is often enough to solve the problem on heavily loaded systems since in most call center environments members who are not available will either have their phones set to DND or use the Dynamic Member ability of queues and logout when they should not be taking calls. However, for those members who are busy, a call is still sent down the Local channel for each member which results in heavy dialplan and the dialparties.agi script being run for each member. This may still be a problem in some environments so more extreme actions may be necessary.
If the above solutions are not adequate for some installations, or patching Asterisk is not an option, there are two new capabilities that have were introduced in FreePBX 2.7. These are designed for advanced users who are ready to thoroughly test their installations to assure that other system functions are not compromised. The first one is the ability to use device in place of extensions for queue members. The ability to represent an extension as "Annn" has existed for a few years and results in the the queue agent referencing channel Agent/nnn. This has always been an experimental ability with known limitations and no GUI support to configure the required agents.conf configuration file. Asterisk has deprecated the channel Agent in 1.4 and no longer supports it in 1.6. FreePBX 2.7 has introduced syntax that allows SIP, IAX2, DAHDI and ZAP devices to be referenced directly. This is achieved by prefacing the member number with S, X, D or Z respectively. This capability is only available for static members. When this is done the queue calls are dispatched direct to the specified device completely bypassing the FreePBX dialplan. In the past, doing this resulted in broken features such as subsequent transfers to voicemail hanging up on the caller. By setting "Agent Restrictions" to "Extensions Only" this problem is now eliminated. This results in all of the dialplan including the heavy use of dialparties.agi being avoided. It should be understood that avoiding the dialplan also means that features will also be avoided, such as an extension that is set to always record calls will not have the calls recorded unless other settings ultimately enable this.
The device specific members are limited to Static Agents and may not be desirable for this or other reasons. We have thus introduced an experimental macro that is ultimately targeted for general release in FreePBX 2.8 but accessible in 2.7 with some magic settings. This macro, macro-dial-one, serves as a replacement for macro-dial + dialparties.agi in all cases where a single extensions is being called. This is always the case when the queue is dispatching calls. We have included the macro in 2.7 in order to get early testing since we plan it to replace macro-dial + dialparties.agi for single extension dialing in 2.8. Enabling the macro has two requirements. First, you must set the magic variable USEDIALONE=true in amportal.conf. Secondly, if running Asterisk 1.4 you must have the 1.4 back port of the function EXTENSION_STATE() that is not officially available until 1.6. The advantage of this macro is the elimination of the dialparties.agi script which results in a forked process and relatively heavy php environments being run for each member that is being called. The call is still sent down the Local channel and results in a fair amount of Asterisk dialplan executing but avoids the heavy system load created by expensive process forking and php AGI scripts. More details and a copy of the func_extstate.c can be obtained in the macro-dial-one trac ticket. It should be stressed that the macro is at an alpha level. We hope people will test it and report issues or patches to address bugs as they are discovered to help prepare this for the 2.8 release. Setting USEDIALONE=true results in all single extension dialing to use this macro, not just the queue.
There have been many other enhancements included with queues and not listed here to improve the overall capabilities and flexibilities of the Queue Module as well as other articles written in this Technical Corner series about queues. For now, we hope the information presented is useful for those of you who have busy queues and are looking for ways to optimize your environment as well as those of you who are just interested in knowing more about the inner workings of FreePBX + Asterisk and what makes it all tick!


Time to slay in this killer black two piece set. Made of the BEST FITTING bandage ribbed fabric to hold and mold your body into an hourglass. Features a tank style crop top and matching high waist capris with a wide waistband to cinch in your waist.
I absolutely love the quality and fit of this leggings set it looks amazing on me. I am 5"9' and the pant was at my knee, the top was a bit short but I'm going to blame that on my 32 DDD cup size. Overall it's a great piece. Can't wait to wear it.


Bruno Associates is led by the father-son team, Bob Bruno, Sr. and Sean Bruno. Bob is the former president and CEO of Bruno Machinery Corporation with over 40 years of press experience. Sean Bruno was the VP of Manufacturing, and he has nearly 15 years of sales and management experience.
Bob Bruno, Sr. started the BRUNO press line in 1972 – which includes mechanical, hydraulic-mechanical, and direct-acting presses for die cutting, embossing and mold-and-trimming.
Over 900 BRUNO presses have been manufactured for companies cutting non-metallic parts throughout the world – prominently in the automotive, carpet, puzzle, toy, gasket, furniture and many other industries. BRUNO presses are always made in the USA.
Bruno will continue to design, manufacture and service our own product line of die cutting, embossing, stamping and molding presses. Our commitment to quality, performance and placing the customer first has given Bruno a reputation as one of the top manufacturers of presses in the world. The quality and diversification of Bruno products has allowed our customers the accuracy and performance to succeed in today's competitive markets.
Our reputation and commitment to quality, performance and service is too important to ever be compromised. In the years to come, we will continue to expand our customer base and product line…but never at the expense of lowering our standards for product quality and customer service.
1. The customer is our reason for being here.
2. It takes months to find a customer, seconds to lose one.
3. Always be courteous and polite during each customer contact.
4. The best surprise is…no surprise.
5. Continually look for ways to improve quality and value to our customers.
Bruno Associates is a world-class OEM of hydraulic, mechanical, and hydraulic-mechanical presses that convert many different materials in a large variety of industries.
The factory staff is made up of engineering, assembly and purchasing. They take pride in designing, building and delivering high-quality, on time products.
Bruno Associates is a sales and manufacturing company headed by Bob Bruno, Sr. and Sean Bruno. Since 2006, they have established a strong network of sales, engineering, fabricating, manufacturing and service companies. Read more.
Bruno Associates warrants that we are the sole owner of the intellectual property associated with the manufacturing, parts and service of all Bruno presses. Such intellectual property cannot legally be used for any purpose without written consent of Bruno Associates.


text:
This page explains the role and constitution of Treasury Council, appointed by a Council Vote of the Open Council.
The role of the Treasury Council is to steer the Muellners Foundation's various initiatives with fund appropriations, and governance rules on co-operative owned fund management.
Treasury Council members are generally individuals of industry wide reputation, having had persistent success in steering and contributing to the humankind, with major sustainable impact. They can be successful bankers, investment fund managers, wealth managers, senior financial analysts, scheduled and chartered auditors, accountants, members with background on tax compliances, and public grants.
The members of the Treasury Council have voluntarily chosen to actively contribute to projects maintained by the Muellners Foundation.
These members contribute to Open Bank's Fund appropriation, allocation and provisioning to different projects of the Foundation. Treasury Council members also participate in presenting Foundation's agenda in local industry forums and chamber networks, build strategic relationships with Hedge Funds, Venture Capital and Private Equity and Crpto Asset Holding Financial Services companies.
The members to the Treasury Council generally stay on the Committee for a fixed period.
The members from the Treasury Council work with following guidelines:
1. The Treasury Council members shall meet the Executive Council on an ongoing basis: 1.1 Generally recorded on a monthly basis through an electronic meeting with the Executive Council, either exclusively or
1.2 When recorded through the member's presence in the Foundation's monthly Council meetings, or
1.3 When participating through the Independent Board's private mailing list on any Open Council vote, atleast once in a month.
Treasury Council plays a central role in fund appropriation, and representing Foundation's investment and Fiscal host relationships. Treasury Council contributes to actively steering Foundation's roadmap and advocacy of its guiding principles. Therefore, a vote of confidence may be scheduled to register attendance of the Treasury Council members.
The members of the Treasury Council shall also nominate members to Steward Group.
2. The Treasury Council may convene to meet the Executive Council or other members through an electronic meeting, in addition to the monthly Council meetings, to contribute to their roles and responsibilities.
3. Treasury Council may convene an electronic meeting, inviting all the Open Council members or all the Foundation's members, to conduct an independent documented review of the Foundation's project and initiatives.
The meeting minutes from any convened "Treasury Council meeting" shall be released to the Executive Council within 14 days of the meeting.
The Executive Council reserves the right to reject or release the meeting minutes and documented reviews of this council to the other members of the Foundation.
Open Constitution Governance Framework:
4. Muellners Foundation runs itself with a decentralised open governance system. Each open governance decision shall be recorded on the Open Constitution ledger.
Treasury Council works with all the Open Council members with respect to the Foundation's open source projects.
The Executive Council ratifies the Treasury Council's Resolutions.
The Independent Board then ensures ratification of any amendments to the open constitution, governance of Open Bank, based on Executive Council's public reports.
The chair of Treasury Council may also get elected to an Open Tribunal, registered on Open Constitution Governance System for arbitrations between disputing members of the Foundation.
Consideration:
5. Appointment to this Treasury Council is pro bono and voluntary in nature. Appointments are generally made for an election period of atleast 1 year and atmost 3 years.
Appointment, Nomination, Removal and Resignation:
Appointment:
6.1 Following members can officially nominate a new or existing member of the Foundation to the Treasury Council:
6.1 a. An elected member of the Executive Council or of the Treasury Council or of the Advisory Council.
6.1 b. An individual member can also request a nomination and the action of nomination shall be officially filed by the only members mentioned in above 6.1 "a".
6.2 Self nomination by an existing member of one of the Open Council bodies for his/her/their appointment to the Treasury Council is not acceptable.
Self nomination by an existing non Council member of the Foundation, for his/her/their appointment to the Treasury Council is not acceptable. Please read more. 6.3 Once the nomination is accepted by the Nominee, Nominee or the member nominating the nominee, shall file supporting information such as nominee's literature, publications, demonstration of social activities on Foundation's Membership Registry.
A Council Resolution "Vote IN" is then scheduled on the Council's mailing list.
Electoral Process for "Vote IN" is conditional to a quorum.
a. Quorum is achieved when a minimum of half of all the Open Council members, participate in the Council Resolution - "Vote IN". b. A decision is received in favour of the Council Resolution - "Vote IN", when majority of all the participating members of the Open Council, vote "+1". E.g: Let's say there are 21 Open Council members.
Atleast 11 members shall participate in the Council Resolution for the "Vote IN" to achieve quorum. This is the qualifying state for the Council Resolution to be logged on Open Constitution public ledger. For the appointment to be electorally approved, the "Vote IN" should receive atleast half of the total votes(required for quorum), in the favour of this Council Resolution. So, in this example, six (+1) votes of the participating 11 Council members will do the job.😒
6.4 Appointment to the Treasury Council is published on the public facing records of the Muellners Foundation.
Removal Proceedings:
7.1 Members of the Executive Council or of the Treasury Council can only officially nominate removal of a member from the Treasury Council.
7.2 Open Council Resolution - "Vote OUT" is considered to be active on the Open Constitution system, once it is initiated on the Council's private mailing list.
Electoral Process for "Vote OUT" is conditional to a quorum. a. Quorum is achieved when a minimum of half of all the Open Council members participate in the Council Resolution "Vote OUT". b. A decision is received in favour of the "Vote OUT", when majority of all the participating members of the Open Council, vote "+1". E.g: Let's say there are 21 Open Council members.
Atleast 11 members shall participate in the Council Resolution for "Vote OUT" to achieve quorum. This is the qualifying state for the Council Resolution to be locked on Open Constitution public ledger. For the removal to be electorally approved for next stage, the "Vote OUT" should receive at least half of the total votes(required for quorum), in the favour of this Council Resolution. So, in this example, six (+1) votes of the participating 11 Council members will do the job.😒
A strong reason for violation of Muellners Foundation's governing policies and directives must be provided by member(s) initiating the resolution, to support the Council resolution "Vote OUT".
7.3 Community Referendum: Final removal of a member from the Treasury Council is subject to a community referendum on the passed Council resolution "Vote OUT", stated in 7.1 & 7.2 above.
Community Referendum is generally accessible by all members of the Muellners Foundation - both Council, its CWC members and non Council members.
Quorum on the Community Referendum for the Council Resolution - "Vote Out" is achieved when 33% (more than 1/3rd) of all the voluntarily organised subscribed members participate. Of the minimum participating members, the Community Referendum stands as Decided when majority of the quorum populace votes in favour of the stated Council resolution "Vote OUT".
E.g: Let's say there are 1000 Foundation members.
A minimum of 333 members are required to participate in the Community Referendum to achieve quorum. The decision of the Community Referendum depends on a majority(167/333) in favour of, or against the subject of the Referendum. This is the qualifying state for the Referendum to get locked on Open Constitution public ledger.
8. A member may serve on more than one Open Council bodies. Each Council body membership reserves additional voting rights.
If a member happens to serve on two Open Council bodies, then this effectively means that two votes are counted for the same member for the Foundation's Council Vote based decision proceedings, including but not limited to the governing protocols for appointment of members or their removal to the Open Council.
Resignation:
9. A member's self resignation from the Treasury Committee is a voluntary action.
A member may resign from the Treasury Committee by stating the reasons for resignation. The announcement of resignation can be done via electronic email on the Council's mailing list; [email protected]
10. The Independent Board reserves the right to update the terms and conditions, statutes from time to time, in compliance with the existing rules and regulations of the association, including reserving the right to terminate the appointment to this Council at any time, without notice and without the due electoral process of removal, in the following scenario:
If the member is found convicted of criminal, civil and financial crimes, in any court of competent jurisdiction, across the world, where Foundation has an active presence, either through a legal body representation or an affiliate network.
Read more on the guiding principles & diversity statement of the Foundation here.
Read more about the Foundation's Code of Conduct here.
11. The statutes of the Foundation and terms and conditions governing its functioning can be found here. The Independent Board reserves the right to dissolve the whole Treasury Council and initiate constitution of a new Treasury Council.
12. The Foundation members communicate via cryptographic electronic communications systems, and technology tools. In connection to the electronic meetings convened by members of this council, Foundation's IT infrastructure shall be used.
If the meeting took place outside the Foundation's communications infrastructure, then the meeting minutes must be brought back to the notice of the Executive Council.
Upon a successful nomination and having received a passed Council Resolution "Vote IN", a new Open Council member should file their supporting documents to Open Constitution Membership Registry. A private link is generated by Open Constitution system.
Custodian: Election Council
Media CWC
Next - Association of Natural Persons

redpajama_set_name: RedPajamaCommonCrawl


← A Quick Update…Adding New Art!
What a fun way to brighten your kitchen wall; add a "pop of color" in a small nook or any part of your home! They are small yet fun pieces of art that can be added anywhere without breaking the bank. We never knew how popular they would become, so we are going to continue adding more to the collection.
I was born and raised on the border and have always enjoyed the bright colors, history and culture of Mexican folk art. Juan and I try to capture that in our funky eclectic art. Simple, colorful….FUN!
I tried to take the best pictures, however, if you need additional info, photos, questions or comments, please email me shawn@urban-hobo.com.
To see some of the sweet treats we deliver, be sure to head to our website Urban Hobo!


We are manufacturer and exporter and suppliers of all metal handicrafts items specially brass, aluminum, iron, steel and copper metal in casted as well as in sheet. Please feel free if you have any requirement. This is aluminum metal casted dish with enameled. Which is available in different colors . Please contact us for more detail about any item.


Reducing carbohydrate intake is a key component to optimizing health and weight. If you trying to reduce your carbohydrate intake and you're missing bread… This recipe is for you! It is high in healthy fat and moderate protein.
-Gather all ingredients and let's sit out at room temperature.


Prime Minister Narendra Modi today appealed to the four million employees of the Indian IT industry to contribute towards the cause of nation building.
Addressing a townhall of chiefs and employees of technology companies and start-ups, Modi launched an app and portal called Self4Society which is aimed at pooling the resources that corporates put in towards social causes and aligning them with the initiatives of the government such as Swatchh Bharat, Skill India etc.
Addressing the gathering which was attended physically by over 2000 people and virtually by several lakhs, Modi said even though the government is putting a lot of effort and money towards social causes, everyone needs to contribute. "To take the country ahead, we need participation of all 125 crore Indians." He added that through this joint effort the country will make a place for itself in the world despite the challenges.
Modi also said that since India has already become the third largest in terms of the start-up, social start-ups should become an intrinsic part of the ecosystem. He explained that the line is very thin between what is a business model and what is a social start-up model and touched upon areas such as electric vehicles which will serve both the purposes.
Top leaders such as Sudha Murthy, chairperson of the Infosys Foundation and Anand Mahindra, chairman of the Mahindra Group participated in the discussion. Mahindra said that he pledges the group's support towards the initiative and will immediately join it. Others present during the townhall included Tech Mahindra CEO CP Gurnani, Nasscom president Debjani Ghosh, first CEO of TCS FC Kohli, Snapdeal co-founder Kunal Bahl, among others.
Union minister for electronics and IT, Ravi Shankar Prasad appealed to the industry to bring their technology edge to this space in a same way as they have done globally. "Our endeavour should be to help the last man in the queue, the marginalised and the deprived... You have made most of the Fortune 500 companies capable, you are home to 4 million direct employees, one-third of whom are women," he said.
The platform has been developed by MyGov. Modi said that some of areas which require participation are saving natural resources such as water, agriculture, climate change etc. "In projects such as Swatchh Bharat, the question is how do we use technology to make is sustainbale and how to monitor it better."


text:
It's my best season yet, says Valverde
Movistar rider says he could attempt all three Grand Tours in 2015
Alejandro Valverde takes another second place (Image credit: Sirotti)
Alejandro Valverde (Spain) is accustomed to this by now. He has three bronze medals from the last three years (Image credit: Tim de Waele/TDWSport.com)
Alberto Contador (Tinkoff-Saxo), Alejandro Valverde (Movistar) and Joaquim Rodríguez (Katusha) (Image credit: Tim de Waele/TDWSport.com)
Alejandro Valverde (Movistar) wins Clasica San Sebastian (Image credit: Tim de Waele/TDWSport.com)
For Alejandro Valverde (Movistar), finishing the 2014 season at the top of the WorldTour rankings was the cherry on the top of an already accomplished season. After taking 11 victories and stepping on the podium at Liège-Bastogne-Liège, Il Lombardia and the world championships and signing a new three-year contract with Movistar, the Spaniard went as far as to say it was the best of his 12-year career. "By a mile. No doubts about that.
Movistar set with Valverde and Quintana through 2017
Worlds: Rodriguez puts past behind him and allies with Valverde
Valverde moves into WorldTour lead after Lombardia
Valverde, Movistar and Spain top final WorldTour rankings
"I'm more than satisfied with what I achieved this season - I would be more than happy to repeat that in 2015."
Valverde beat fellow Spaniard Alberto Contador by 66 points to end the year as world number one for the third time in his career – after winning the ProTour rankings in 2006 and 2008. "It's extremely important for me," Valverde said of the victory.
"Finishing on top of the rankings is a reward to the whole work I did before and during the season. It means that my season was really good, that I always kept up doing well throughout the season, constant and consistent."
The title race between Valverde and Contador almost went down to the wire. The Tinkoff-Saxo rider went into Il Lombardia with a 14 point-lead over Valverde. However, the Movistar rider was able to reverse the order by making the podium while Contador failed to score any after crashing out in the finale.
With more than a hundred points still available both riders were prepared to extend their season an extra week, and race at the Tour of Beijing to seal the deal. However, with Valverde's wife only recently giving birth to their second child the 34-year-old was relieved to say the least when he didn't have to fly out to China.
"Though we were both about to board on the plane to China, we decided that it was better to stay home," said Valverde. "It's true that I asked him after his crash in Italy if he was going to Beijing, because I didn't have that race on my calendar either and, above all, what I wanted in that moment was enjoying my newborn baby. Eventually, I had both things."
Valverde hit the ground running in 2014 with overall victory and three stage wins at the Vuelta a Andalucía. Wins followed at his home Vuelta a Murcia, Roma Maxima and GP Miguel Indurain. His form continued through to the Ardennes Classics at the end of April where he won Flèche Wallonne and finished second to Simon Gerrans at Liège. Among his other successes was the Spanish national time trial title, Clásica San Sebastián and a podium at the Vuelta a España.
It wasn't all sunshine and rainbows for the Movistar rider. He had hoped to make the podium at the Tour de France for the first time in his career, but faded in the final week and finished fourth. While it was his best result at the French Grand Tour, he still laments at what could have been.
"It was my highest GC finish in France, but it left me a bitter taste after having the podium on my hands. Losing it was the worst moment of my season."
After achieving a number of big goals this season, Valverde is looking to expand his horizons in 2015. He may not have been included in the Tinkov €1 million challenge, but the Spaniard hinted that a tilt at all three Grand Tours in a season is something that whets his appetite.
"The Giro is a race I've never taken part in, and I already said in other times I would like to give it a try - I'm already well experienced in both the Tour and the Vuelta. Riding all three Grand Tours? Why not," said Valverde. "It's a challenge that I like and it's in my mind, too, though I haven't still spoken to Eusebio."


text:
Q: Creating a simple Python contact form new to Python.
I am trying to make a contact form for my portfolio site using Python. The form has 4 input fields - first_name, last_name, email, and message. My website is hosted by hostgator.com.
I want the form when submitted to simply send me the info supplied in the 4 fields to my specified email.
After lots of searching I see a lot of Django tuts but I just want a simple form using Python.
Any help would be greatly appreciated! - Mike Rossi
#!/usr/bin/python

# Import modules from CGI handling
import cgi, cgitb, smtplib

cgitb.enable()

# Create instance of FieldStorage
form = cgi.FieldStorage()
print("")

# Get data from fields
first_name = form.getvalue("first_name")
last_name = form.getvalue("last_name")
email = form.getvalue("email")
message = form.getvalue("message")

to = "mike.jacob.rossi@gmail.com"
subject = "Comment from MikeTheDev.com"
mfrom msg['To']
to msg['Subject']
form['subject'].value

print("Thanks for contacting me! Get back to you soon,%s. ") % cgi.escape(first_name)

A: Due to the OP posting this 3 years ago, I came across this question in my attempt to set up a contact page on my portfolio website.
After coming across this question I found this link: https://code.tutsplus.com/tutorials/intro-to-flask-adding-a-contact-page--net-28982.
This should answer your question.

redpajama_set_name: RedPajamaStackExchange


The personal's instruction that will deal with Patriot systems takes place on 9-13th of July; at the activity will also participate the producers representatives of the racket systems- the american company Raytheon and some trainers from the United States Army Europe (USAREUR), says MAPN (National Defence Ministry).
After the treaty made with the US Government, Romania's army forces will receive the latest configuration of the Patriot system, the 3+configuration that includes hardware and software elements conceived in 2017.
The Patriot system is the most advanced anti-aerial and anti-racket defence racket system with high speed in the world, being tested and perfectly made in fight in the 20 years since the first version entered in the operational service, with over 3000 ground tests, 1500 fly tests and multiple operational actions that registered over 100 real fight interceptions.


We are a Factory installer offering 10-30 year Factory warranties!
H&L Roofing specializes in ISO Tapered Insulation Systems. Not only does the insulation result in energy savings, the tapered panels also provide added drainage to eliminate many problems inherent with flat roofs.
Visit the Mule-Hide products page to find out about the product options that we offer for flat roofs.


Following the vote to leave the EU in June 2016, economists set about forecasting what Brexit meant for the future of the British economy.
But how accurate did those forecasts end up being?
This can't tell us whether current forecasts for the future are likely to be correct or not. But we can look at whether forecasts for economic growth until 2018 came to pass.
In October this year the Institute for Fiscal Studies (IFS) looked at a variety of economic analyses produced both before the referendum (under the assumption we would stay in the EU), and post-referendum when it became clear we were leaving.
It found the average pre-referendum analysis forecasted GDP growth to accelerate, amounting to 6.5% from 2015-2018. The average post-referendum analysis still forecasted GDP to grow, albeit more slowly at 4.4% over that period.
In fact the economy grew by 4.9%, meaning overall economists were fairly accurate when they revised down economic growth following the referendum—though they were slightly pessimistic about the fall.
However what the forecasts were less accurate at predicting was GDP growth in each year. The forecasts analysed by the IFS all predicted that GDP growth would fall sharply in 2017 and then rebound in 2018.
So forecasts shortly after the referendum were fairly accurate over the medium term, but not from year to year.
On the flipside, the Office for Budget Responsibility (OBR), which provides independent forecasts to the Treasury, weren't pessimistic enough about the effect the referendum on GDP growth.
Economic forecasts often get a lot of criticism for being inaccurate. We've written before about the OBR's consistently over-optimistic forecasts and also how employment rose post-referendum in contrast with the Treasury's forecast employment would fall.
But it does seem that once it became clear we were leaving the EU, economists forecasted the impact of the referendum vote on GDP fairly accurately over the space of two years―although the difference in how quickly economic growth slowed down is still important.