text:
// C++ General Utility Library (mailto:cgul@zethes.com)
// Copyright (C) 2012-2014, Joshua Brookover and Amber Thrall
// All rights reserved.

/** @file Window.cpp
 */

#include "Window.hpp"
#include "../Utility/Memory.hpp"
#include "../Exceptions/WindowException.hpp"
#include <cstdio>
#include <sstream>

#include <limits.h>

#ifdef CGUL_MACOS
#   import "MacOS/Application.hpp"
#endif

#ifdef CGUL_USE_OPENGL
#   include "../OpenGL/Context.hpp"
#endif

static CGUL::Vector< CGUL::Window* >* __windows = NULL;

#ifdef CGUL_WINDOWS
LRESULT CALLBACK CGUL::Window::WindowProcedure(HWND handle, UINT message, WPARAM wParam, LPARAM lParam)
{
    LONG_PTR ptr = GetWindowLongPtr(handle, GWLP_USERDATA);
    Window* window = (Window*)ptr;
    if (ptr != 0)
    {
        //window->getOnMessage()();
    }
    switch (message)
    {
        case WM_CLOSE:
        if (window != 0)
        {
            window->Close();
            return 0;
        }
        case WM_KEYDOWN:
        {
            if (window->onKeyButton.HasEvents())
            {
                WindowKeyButtonEvent event;
                event.pressed = true;
                event.key = TranslateKey(wParam);
                window->onKeyButton.Trigger(event);
            }
            return 0;
        }
        case WM_KEYUP:
        {
            if (window->onKeyButton.HasEvents())
            {
                WindowKeyButtonEvent event;
                event.pressed = false;
                event.key = TranslateKey(wParam);
                window->onKeyButton.Trigger(event);
            }
            return 0;
        }
        case WM_LBUTTONDOWN:
        {
            if (window->onMouseButton.HasEvents())
            {
                WindowMouseButtonEvent event;
                event.pressed = true;
                event.button = 0;
                window->onMouseButton.Trigger(event);
            }
            return 0;
        }
        case WM_LBUTTONUP:
        {
            if (window->onMouseButton.HasEvents())
            {
                WindowMouseButtonEvent event;
                event.pressed = false;
                event.button = 0;
                window->onMouseButton.Trigger(event);
            }
            return 0;
        }
        case WM_RBUTTONDOWN:
        {
            if (window->onMouseButton.HasEvents())
            {
                WindowMouseButtonEvent event;
                event.pressed = true;
                event.button = 1;
                window->onMouseButton.Trigger(event);
            }
            return 0;
        }
        case WM_RBUTTONUP:
        {
            if (window->onMouseButton.HasEvents())
            {
                WindowMouseButtonEvent event;
                event.pressed = false;
                event.button = 1;
                window->onMouseButton.Trigger(event);
            }
            return 0;
        }
        case WM_MBUTTONDOWN:
        {
            if (window->onMouseButton.HasEvents())
            {
                WindowMouseButtonEvent event;
                event.pressed = true;
                event.button = 2;
                window->onMouseButton.Trigger(event);
            }
            return 0;
        }
        case WM_MBUTTONUP:
        {
            if (window->onMouseButton.HasEvents())
            {
                WindowMouseButtonEvent event;
                event.pressed = false;
                event.button = 2;
                window->onMouseButton.Trigger(event);
            }
            return 0;
        }
        case WM_DESTROY:
        {
            PostQuitMessage(0);
            return 0;
        }
    }
    return DefWindowProc(handle, message, wParam, lParam);
}
#endif

#ifdef CGUL_LINUX
std::map<Window, CGUL::Window*> CGUL::Window::windowMap;
Display* CGUL::Window::display;
bool CGUL::Window::initialized = false;

static int __jatta_windows_error_handler(Display* display, XErrorEvent* event)
{
    // TODO: handle x11 errors (throw exception?)
    return 0;
}
#endif

_CGUL_EXPORT CGUL::Window::Window(const Window& copy)
{
    /* deleted */
}

#ifdef CPP_HAS_MOVE_CONSTRUCTOR
_CGUL_EXPORT CGUL::Window::Window(Window&& move)
{
    /* deleted */
}
#endif

_CGUL_EXPORT void CGUL::Window::InternalUpdate()
{
#   ifdef CGUL_WINDOWS
    POINT cursor;
    GetCursorPos(&cursor);

    SCoord32 mousePosition(cursor.x, cursor.y);
    mousePosition -= GetPosition();
    mousePosition.y = GetHeight() - mousePosition.y;

    if (mousePosition != lastMousePosition)
    {
        WindowMouseMoveEvent event;
        event.location = mousePosition;
        onMouseMove.Trigger(event);
        lastMousePosition = mousePosition;
    }
#   endif

#   ifdef CGUL_MACOS
    [handle internalUpdate: this];
#   endif
}

/** @details The operating system usually handles windows under the same application in bulk.  For
 *  this reason, it is only necessary to call update once for every window.  It is still important
 *  to update a window's input manually, however.
 *  @see UpdateInput
 */
_CGUL_EXPORT void CGUL::Window::Update()
{
#   ifdef CGUL_WINDOWS
    MSG Msg;
    while (PeekMessage(&Msg, NULL, 0, 0, PM_REMOVE) > 0)
    {
        TranslateMessage(&Msg);
        DispatchMessage(&Msg);
    }
#   endif

#   ifdef CGUL_LINUX
    if (display)
    {
        while (XPending(display))
        {
            XEvent event;
            XNextEvent(display, &event);
            ::Window handle = event.xany.window;
            std::map< ::Window, Window* >::iterator it = windowMap.find(handle);
            if (it == windowMap.end())
            {
                break;
            }
            Window* window = it->second;
            switch (event.type)
            {
                case 33:
                    XDestroyWindow(display, handle);
                case DestroyNotify:
                {
                    window->Close();
                    return;
                }
                case KeyPress:
                {
                    WindowKeyButtonEvent cgulEvent;
                    cgulEvent.pressed = true;
                    cgulEvent.key = TranslateKey(event.xkey.keycode);
                    window->onKeyButton.Trigger(cgulEvent);
                    break;
                }
                case KeyRelease:
                    bool released = true;
                    if (XEventsQueued(display, QueuedAfterReading))
                    {
                        XEvent nextEvent;
                        XPeekEvent(display, &nextEvent);
                        if (nextEvent.type == KeyPress && nextEvent.xkey.time == event.xkey.time && nextEvent.xkey.keycode == event.xkey.keycode)
                        {
                            released = false;
                        }
                    }
                    if (released)
                    {
                        WindowKeyButtonEvent cgulEvent;
                        cgulEvent.pressed = false;
                        cgulEvent.key = TranslateKey(event.xkey.keycode);
                        window->onKeyButton.Trigger(cgulEvent);
                    }
                    break;
            }
        }
    }
#   endif

#   ifdef CGUL_MACOS
    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];

    //[[Application sharedApplication] updateWindows];
    [[Application sharedApplication] update];

    // Free anything we've autoreleased on the Obj-C side
    [pool drain];
#   endif

    // Update each window
    if (__windows)
    {
        for (Vector< Window* >::iterator itr = __windows->begin(), itrEnd = __windows->end(); itr != itrEnd; itr++)
        {
            (*itr)->InternalUpdate();
        }
    }
}

/**
 */
_CGUL_EXPORT CGUL::Window::Window()
{
#   ifdef CGUL_USE_OPENGL
    context = NULL;
#   endif

#   ifdef CGUL_LINUX
    if (!initialized)
    {
        XSetErrorHandler(__jatta_windows_error_handler);
        initialized = true;
    }
#   endif

#   ifdef CGUL_MACOS
    handle = [WindowDelegate alloc];
#   endif
}

/**
 */
_CGUL_EXPORT CGUL::Window::~Window()
{
    Close();
#   ifdef CGUL_MACOS
    //[handle release];
#   endif
}

#ifdef CGUL_WINDOWS
_CGUL_EXPORT HWND CGUL::Window::_GetHandle() const
{
    return handle;
}
#endif

#ifdef CGUL_LINUX
_CGUL_EXPORT Display* CGUL::Window::_GetDisplay() const
{
    return display;
}

_CGUL_EXPORT ::Window CGUL::Window::_GetHandle() const
{
    return handle;
}
#endif

#if defined(CGUL_BUILD) && defined(CGUL_MACOS)
WindowDelegate* CGUL::Window::_GetHandle() const
{
    return handle;
}
#endif

/** @details See the tutorial on @ref create_window.
 */
_CGUL_EXPORT void CGUL::Window::Create(const WindowStyle& style)
{
#   ifdef CGUL_WINDOWS
    // Generate a unique class name for this window
    static int windowCounter = 0;
    wcscpy(className, L"CGUL_");
    wsprintf((LPSTR)(className + 5), (LPCSTR)(L"%d"), windowCounter++);

    // Create the window class
    WNDCLASSEX wc;
    wc.cbSize = sizeof(WNDCLASSEX);
    wc.style = 0;
    wc.lpfnWndProc = WindowProcedure;
    wc.cbClsExtra = 0;
    wc.cbWndExtra = 0;
    wc.hInstance = GetModuleHandle(NULL);
    wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
    wc.hCursor = LoadCursor(NULL, IDC_ARROW);
    //wc.hbrBackground = CreateSolidBrush(RGB(style.backgroundColor.r, style.backgroundColor.g, style.backgroundColor.b)); // TODO: createsolidbrush leaks, needs to be deleted with DeleteObject
    wc.lpszMenuName = NULL;
    wc.lpszClassName = (LPCSTR)className;
    wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION);

    backgroundBrush = CreateSolidBrush(RGB(style.backgroundColor.r, style.backgroundColor.g, style.backgroundColor.b)); // TODO: createsolidbrush leaks, needs to be deleted with DeleteObject
    wc.hbrBackground = (HBRUSH)backgroundBrush;

    // Register the window class
    if (!RegisterClassEx(&wc))
    {
        throw WindowException(WindowExceptionCode::FAILED_CREATE_WINDOW, WindowExceptionReason::FAILED_REGISTER_CLASS);
    }

    // Setup the window style
    DWORD windowStyle = WS_TILEDWINDOW;//WS_OVERLAPPEDWINDOW;

    // Adjust the window rectangle to account for border sizes
    RECT windowRect = {0, 0, (long)style.size.x, (long)style.size.y};
    AdjustWindowRectEx(&windowRect, windowStyle, false, WS_EX_CLIENTEDGE);

    // Create the window
    if (style.centerWindow)
    {
        SCoord32 screenMiddle = SCoord32(GetSystemMetrics(SM_CXSCREEN), GetSystemMetrics(SM_CYSCREEN)) / 2;
        SCoord32 windowHalfSize = SCoord32((SInt32)style.size.x / 2, (SInt32)style.size.y / 2);
        SCoord32 windowPos = screenMiddle - windowHalfSize + style.position;
        handle = CreateWindowEx(WS_EX_CLIENTEDGE,
                                wc.lpszClassName,
                                (LPCSTR)style.title._ToWideString().c_str(),
                                windowStyle,
                                windowPos.x,
                                windowPos.y,
                                windowRect.right - windowRect.left,
                                windowRect.bottom - windowRect.top,
                                NULL,
                                NULL,
                                GetModuleHandle(NULL),
                                NULL);
    }
    else
    {
        handle = CreateWindowEx(WS_EX_CLIENTEDGE,
                                wc.lpszClassName,
                                (LPCSTR)style.title._ToWideString().c_str(),
                                windowStyle,
                                style.position.x,
                                style.position.y,
                                windowRect.right - windowRect.left,
                                windowRect.bottom - windowRect.top,
                                NULL,
                                NULL,
                                GetModuleHandle(NULL),
                                NULL);
    }

    // Check for errors
    if (handle == NULL)
    {
        throw WindowException(WindowExceptionCode::FAILED_CREATE_WINDOW, WindowExceptionReason::FAILED_CREATE_WINDOW_CALL);
    }

    // Set the window's user-data to a pointer to this object
    SetWindowLongPtr(handle, GWLP_USERDATA, (LONG_PTR)this);

    // Present the window onto the screen
    ShowWindow(handle, SW_SHOW);
#   endif

#   ifdef CGUL_LINUX
    if (!display)
    {
        display = XOpenDisplay(NULL);
        if (!display)
        {
            throw WindowException(WindowExceptionCode::FAILED_CREATE_WINDOW, WindowExceptionReason::FAILED_OPEN_X_DISPLAY);
        }
    }

    int screen = DefaultScreen(display);
    Visual* visual = DefaultVisual(display, screen);
    int depth = DefaultDepth(display, screen);
    XSetWindowAttributes attributes;
    attributes.background_pixel = style.backgroundColor.b | (style.backgroundColor.g << 8) | (style.backgroundColor.r << 16);//XWhitePixel(display, screen);
    attributes.border_pixel = XBlackPixel(display, screen);
    attributes.override_redirect = 0;
    this->handle = XCreateWindow(display, XRootWindow(display, screen), 200, 200, style.size.x, style.size.y, 5, depth, InputOutput, visual, CWBackPixel | CWBorderPixel | CWOverrideRedirect, &attributes);
    Atom wmDelete = XInternAtom(display, "WM_DELETE_WINDOW", true);
    XSetWMProtocols(display, this->handle, &wmDelete, 1);
    XSelectInput(display, this->handle, ExposureMask | ButtonPressMask | ButtonReleaseMask | KeyPressMask | KeyReleaseMask);
    XMapWindow(display, this->handle);
    XFlush(display);
    windowMap.insert(std::make_pair(this->handle, this));

#   endif

#   ifdef CGUL_MACOS
    // Create an autorelease pool
    // There won't be many things in it from start to finish (since most everything is C++ side),
    // but it's still here for those few things that should be autoreleased!
    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];

    // Create the Cocoa application
    [[Application sharedApplication] run];

    handle = [handle init: style];

    // Create our delegate as defined earlier in this file!
    //AppDelegate* appDelegate = [[[AppDelegate alloc] init] autorelease];

    // Set the application delegate and run the application
    //[application setDelegate: appDelegate];

    //[application run];

    /*while (true)
    {
        [[Application sharedApplication] update];
    }*/

    // Free anything we've autoreleased on the Obj-C side
    [pool drain];
#   endif

    SetStyle(style);

    if (__windows == NULL)
    {
        __windows = new CGUL::Vector< CGUL::Window* >;
    }
    __windows->push_back(this);
}

/**
 */
_CGUL_EXPORT void CGUL::Window::Close()
{
#   ifdef CGUL_USE_OPENGL
    if (context)
    {
        context->Destroy();
    }
#   endif

    if (__windows)
    {
        for (Vector< Window* >::iterator itr = __windows->begin(), itrEnd = __windows->end(); itr != itrEnd; itr++)
        {
            if (*itr == this)
            {
                __windows->erase(itr);
                break;
            }
        }
        if (__windows->size() == 0)
        {
            delete __windows;
            __windows = NULL;

#           ifdef CGUL_LINUX
            XDestroyWindow(display, handle);
            XCloseDisplay(display);
            display = NULL;
#           endif
        }
    }

#   ifdef CGUL_WINDOWS
    if (IsWindow(handle))
    {
        DestroyWindow(handle);
    }
    handle = 0;
#   endif

#   ifdef CGUL_LINUX
    handle = 0;
#   endif

#   ifdef CGUL_MACOS
    if (IsOpen())
    {
        [handle close];
    }
#   endif
}

/** @details This method acts a little bit differently on each operating system.  It is important to
 *  call this every tick for every window.
 */
_CGUL_EXPORT void CGUL::Window::HandleMessages()
{
    if (!IsOpen())
    {
        return;
    }

#   ifdef CGUL_LINUX
    //::Window root, child;
    //int rootX, rootY, winX, winY;
    //unsigned int mask;

    /*XQueryPointer(display, handle, &root, &child, &rootX, &rootY, &winX, &winY, &mask);
    GetInput()->mousePos.x = winX;
    GetInput()->mousePos.y = winY;*/
#   endif
}

/** @param style The style structure.
 *  @details This method will reset all elements within the WindowStyle, not only those which have
 *  changed.  It can be used to "backup" a window at a given state and then reset to it later.
 *  Alternatively, it is possible to grab the current style with GetStyle and then modify individual
 *  elements, and pass it back into SetStyle.
 */
_CGUL_EXPORT void CGUL::Window::SetStyle(const WindowStyle& style)
{
    if (!IsOpen())
    {
        return;
    }

    SetTitle(style.title);
    SetBackgroundColor(style.backgroundColor);
    SetSize(style.size);
    SetResizable(style.resizable);
    SetAlwaysOnTop(style.alwaysOnTop);
}

/** @returns A WindowStyle structure.
 */
_CGUL_EXPORT CGUL::WindowStyle CGUL::Window::GetStyle() const
{
    WindowStyle style;
    style.title = GetTitle();
    style.backgroundColor = GetBackgroundColor();
    style.size = GetSize();
    style.resizable = GetResizable();
    style.centerWindow = false;
    style.position = GetPosition();
    style.alwaysOnTop = GetAlwaysOnTop();
    return style;
}

/** @param title The new title string.
 */
_CGUL_EXPORT void CGUL::Window::SetTitle(const String& title)
{
    if (!IsOpen())
    {
        return;
    }

#   ifdef CGUL_WINDOWS
    SetWindowText(handle, (LPCSTR)title._ToWideString().c_str());
#   endif

#   ifdef CGUL_LINUX
    XChangeProperty(display, handle, XInternAtom(display, "_NET_WM_NAME", false), XInternAtom(display, "UTF8_STRING", false), 8, PropModeReplace, (unsigned char*)title.GetData().c_str(), title.GetSize());
#   endif

#   ifdef CGUL_MACOS
    [handle setTitle: title];
#   endif
}

/** @returns The window title.
 */
_CGUL_EXPORT CGUL::String CGUL::Window::GetTitle() const
{
    if (!IsOpen())
    {
        return "";
    }

#   ifdef CGUL_WINDOWS
    int size = GetWindowTextLength(this->handle) + 1;
    wchar_t* buffer = new wchar_t[size];
    GetWindowText(this->handle, (LPSTR)buffer, size);
    CGUL::String title;
    title._FromWideString(buffer);
    delete[] buffer;
    return title;
#   endif

#   ifdef CGUL_LINUX
    Atom nameAtom = XInternAtom(display, "_NET_WM_NAME", false);
    Atom utf8Atom = XInternAtom(display, "UTF8_STRING", false);
    Atom type;
    int format;
    unsigned long nitems, after;
    unsigned char* data = 0;

    if (Success == XGetWindowProperty(display, this->handle, nameAtom, 0, 65536, false, utf8Atom, &type, &format, &nitems, &after, &data))
    {
        if (data)
        {
            CGUL::String title((char*)data);
            XFree(data);
            return title;
        }
    }
    return "";
#   endif

#   ifdef CGUL_MACOS
    return [handle getTitle];
#   endif

    return "";
}

/** @param color The new background color.
 */
_CGUL_EXPORT void CGUL::Window::SetBackgroundColor(const Color& color)
{
    if (!IsOpen())
    {
        return;
    }

#   ifdef CGUL_WINDOWS
    if (backgroundBrush)
    {
        DeleteObject(backgroundBrush);
        backgroundBrush = NULL;
    }
    backgroundBrush = CreateSolidBrush(RGB(color.r, color.g, color.b));
    SetClassLongPtr(handle, GCLP_HBRBACKGROUND, (LONG)backgroundBrush);

    // Redraw the window
    InvalidateRect(handle, NULL, true);
    UpdateWindow(handle);
#   endif

#   ifdef CGUL_LINUX
    XSetWindowBackground(display, this->handle, color.b | (color.g << 8) | (color.r << 16));
    XClearWindow(display, this->handle);
    XFlush(display);
    backgroundColor = color;
#   endif

#   ifdef CGUL_MACOS
    [handle setBackgroundColor: color];
#   endif
}

/** @returns The window's background color.
 */
_CGUL_EXPORT CGUL::Color CGUL::Window::GetBackgroundColor() const
{
    if (!IsOpen())
    {
        return CGUL::Color(0, 0, 0, 0);
    }

#   ifdef CGUL_WINDOWS
    HGDIOBJ brush = (HGDIOBJ)GetClassLongPtr(handle, GCLP_HBRBACKGROUND);
    LOGBRUSH lb;
    GetObject(brush, sizeof(LOGBRUSH), &lb);
    return Color((lb.lbColor & 255), ((lb.lbColor >> 8) & 255), ((lb.lbColor >> 16) & 255), 255);
#   endif

#   ifdef CGUL_LINUX
    return backgroundColor;
#   endif

#   ifdef CGUL_MACOS
    return [handle getBackgroundColor];
#   endif
    return Color(0, 0, 0);
}

/** @param width The new width of the window.
 */
_CGUL_EXPORT void CGUL::Window::SetWidth(UInt32 width)
{
#   ifdef CGUL_WINDOWS
    RECT rect = {(LONG)0, (LONG)0, (LONG)width, (LONG)GetHeight()};
    AdjustWindowRectEx(&rect, GetWindowLongPtr(this->handle, GWL_STYLE), false, WS_EX_CLIENTEDGE);
    SetWindowPos(handle, 0, 0, 0, rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER | SWP_NOMOVE);
#   endif

#   ifdef CGUL_LINUX
    if (GetResizable())
    {
        XResizeWindow(display, this->handle, width, GetHeight());
    }
    else
    {
        XSizeHints hints;
        hints.flags = PMinSize | PMaxSize;
        hints.min_width = width; hints.min_height = GetHeight();
        hints.max_width = width; hints.max_height = GetHeight();
        XSetWMNormalHints(display, this->handle, &hints);
    }
#   endif

#   ifdef CGUL_MACOS
    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
    [handle setWidth: width];
    [pool drain];
#   endif
}

/** @returns The width of the window.
 */
_CGUL_EXPORT CGUL::UInt32 CGUL::Window::GetWidth() const
{
    if (!IsOpen())
    {
        return 0;
    }

#   ifdef CGUL_WINDOWS
    RECT rect = {0, 0, 0, 0};
    AdjustWindowRectEx(&rect, GetWindowLongPtr(this->handle, GWL_STYLE), false, WS_EX_CLIENTEDGE);
    int borders = -rect.left + rect.right;
    GetWindowRect(handle, &rect);
    return rect.right - rect.left - borders;
#   endif

#   ifdef CGUL_LINUX
    XWindowAttributes attributes;
    XGetWindowAttributes(display, handle, &attributes);
    return attributes.width;
#   endif

#   ifdef CGUL_MACOS
    return [handle getWidth];
#   endif
}

/** @param height The new height of the window.
 */
_CGUL_EXPORT void CGUL::Window::SetHeight(UInt32 height)
{
#   ifdef CGUL_WINDOWS
    RECT rect = {(LONG)0, (LONG)0, (LONG)GetWidth(), (LONG)height};
    AdjustWindowRectEx(&rect, GetWindowLongPtr(this->handle, GWL_STYLE), false, WS_EX_CLIENTEDGE);
    SetWindowPos(handle, 0, 0, 0, rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER | SWP_NOMOVE);
#   endif

#   ifdef CGUL_LINUX
    if (GetResizable())
    {
        XResizeWindow(display, this->handle, GetWidth(), height);
    }
    else
    {
        XSizeHints hints;
        hints.flags = PMinSize | PMaxSize;
        hints.min_width = GetWidth(); hints.min_height = height;
        hints.max_width = GetWidth(); hints.max_height = height;
        XSetWMNormalHints(display, this->handle, &hints);
    }
#   endif

#   ifdef CGUL_MACOS
    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
    [handle setHeight: height];
    [pool drain];
#   endif
}

/** @returns The height of the window.
 */
_CGUL_EXPORT CGUL::UInt32 CGUL::Window::GetHeight() const
{
    if (!IsOpen())
    {
        return 0;
    }

#   ifdef CGUL_WINDOWS
    RECT rect = {0, 0, 0, 0};
    AdjustWindowRectEx(&rect, GetWindowLongPtr(this->handle, GWL_STYLE), false, WS_EX_CLIENTEDGE);
    int borders = -rect.top + rect.bottom;
    GetWindowRect(handle, &rect);
    return rect.bottom - rect.top - borders;
#   endif

#   ifdef CGUL_LINUX
    XWindowAttributes attributes;
    XGetWindowAttributes(display, handle, &attributes);
    return attributes.height;
#   endif

#   ifdef CGUL_MACOS
    return [handle getHeight];
#   endif
}

/** @returns The new size of the window.
 */
_CGUL_EXPORT void CGUL::Window::SetSize(const UCoord32& size) const
{
#   ifdef CGUL_WINDOWS
    RECT rect = {(LONG)0, (LONG)0, (LONG)size.x, (LONG)size.y};
    AdjustWindowRectEx(&rect, GetWindowLongPtr(this->handle, GWL_STYLE), false, WS_EX_CLIENTEDGE);
    SetWindowPos(handle, 0, 0, 0, rect.right - rect.left, rect.bottom - rect.top, SWP_NOZORDER | SWP_NOMOVE);
#   endif

#   ifdef CGUL_LINUX
    if (GetResizable())
    {
        XResizeWindow(display, this->handle, size.x, size.y);
    }
    else
    {
        XSizeHints hints;
        hints.flags = PMinSize | PMaxSize;
        hints.min_width = size.x; hints.min_height = size.y;
        hints.max_width = size.x; hints.max_height = size.y;
        XSetWMNormalHints(display, this->handle, &hints);
    }
#   endif

#   ifdef CGUL_MACOS
    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
    [handle setSize: size];
    [pool drain];
#   endif
}

/** @returns The size of the window.
 */
_CGUL_EXPORT CGUL::UCoord32 CGUL::Window::GetSize() const
{
    if (!IsOpen())
    {
        return CGUL::UCoord32(0, 0);
    }

#   ifdef CGUL_WINDOWS
    return UCoord32(GetWidth(), GetHeight());
#   endif

#   ifdef CGUL_LINUX
    XWindowAttributes attributes;
    XGetWindowAttributes(display, handle, &attributes);
    return UCoord32(attributes.height, attributes.width);
#   endif

#   ifdef CGUL_MACOS
    return UCoord32([[[handle Window] contentView] frame].size.width, [[[handle Window] contentView] frame].size.height);
#   endif
}

/** @param position The new position of the window.
 */
_CGUL_EXPORT void CGUL::Window::SetPosition(const SCoord32& position)
{
#   ifdef CGUL_WINDOWS
    // TODO
#   endif

#   ifdef CGUL_MACOS
    [handle setPosition: position];
#   endif
}

/** @returns The position of the window.
 */
_CGUL_EXPORT CGUL::SCoord32 CGUL::Window::GetPosition() const
{
#   ifdef CGUL_WINDOWS
    RECT rect, borderSize;
    GetWindowRect(handle, &rect);
    Memory::ZeroData(&borderSize, sizeof(borderSize));
    AdjustWindowRectEx(&borderSize, GetWindowLongPtr(this->handle, GWL_STYLE), false, WS_EX_CLIENTEDGE);

    return SCoord32((SInt32)(rect.left - borderSize.left), (SInt32)(rect.top - borderSize.top));
#   endif

#   ifdef CGUL_MACOS
    return [handle getPosition];
#   endif
}

/** @param resizable True for resizable, false otherwise.
 */
_CGUL_EXPORT void CGUL::Window::SetResizable(Boolean resizable)
{
    if (!IsOpen())
    {
        return;
    }

#   ifdef CGUL_WINDOWS
    // Capture the current size of the window
    RECT windowRect = {(LONG)0, (LONG)0, (LONG)GetWidth(), (LONG)GetHeight()};

    // Turn on or off the bits for a resizable window
    LONG_PTR style = GetWindowLongPtr(this->handle, GWL_STYLE);
    if (resizable)
    {
        style |= WS_THICKFRAME;
        style |= WS_MAXIMIZEBOX;
    }
    else
    {
        style &= ~WS_THICKFRAME;
        style &= ~WS_MAXIMIZEBOX;
    }

    // Change the window style
    SetWindowLongPtr(this->handle, GWL_STYLE, style);

    // Update the window size
    AdjustWindowRectEx(&windowRect, style, false, WS_EX_CLIENTEDGE);
    SetWindowPos(handle, 0, 0, 0, windowRect.right - windowRect.left, windowRect.bottom - windowRect.top, SWP_NOZORDER | SWP_NOMOVE | SWP_SHOWWINDOW);
#   endif

#   ifdef CGUL_LINUX
    XSizeHints hints;
    hints.flags = PMinSize | PMaxSize;
    if (resizable)
    {
        hints.min_width = 1;       hints.min_height = 1;
        hints.max_width = INT_MAX; hints.max_height = INT_MAX;
    }
    else
    {
        hints.min_width = GetWidth(); hints.min_height = GetHeight();
        hints.max_width = GetWidth(); hints.max_height = GetHeight();
    }
    XSetWMNormalHints(display, handle, &hints);
#   endif

#   ifdef CGUL_MACOS
    [handle setResizable: resizable];
#   endif
}

/** @returns True if resizable, false otherwise.
 */
_CGUL_EXPORT CGUL::Boolean CGUL::Window::GetResizable() const
{
    if (!IsOpen())
    {
        return false;
    }

#   ifdef CGUL_WINDOWS
    return ((GetWindowLongPtr(this->handle, GWL_STYLE) & WS_THICKFRAME) || (GetWindowLongPtr(this->handle, GWL_STYLE) & WS_MAXIMIZEBOX));
#   endif

#   ifdef CGUL_LINUX
    XSizeHints hints;
    long hintsSupplied;
    XGetWMNormalHints(display, this->handle, &hints, &hintsSupplied);
    if (((hintsSupplied & PMinSize) == 0) || ((hintsSupplied & PMaxSize) == 0))
    {
        return false;
    }
    return (hints.min_width != hints.max_width || hints.min_height != hints.max_height);
#   endif

#   ifdef CGUL_MACOS
    return [handle getResizable];
#   endif
    return false;
}

/** @param alwaysOnTop True for always on top, false otherwise.
 */
_CGUL_EXPORT void CGUL::Window::SetAlwaysOnTop(Boolean alwaysOnTop)
{
    // TODO: Window::SetAlwaysOnTop for Linux

#   ifdef CGUL_WINDOWS
    SetWindowPos(this->handle, (alwaysOnTop ? HWND_TOPMOST : HWND_NOTOPMOST), 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
#   endif

#   ifdef CGUL_MACOS
    [handle setAlwaysOnTop: alwaysOnTop];
#   endif
}

/** @returns True if always on top, false otherwise.
 */
_CGUL_EXPORT CGUL::Boolean CGUL::Window::GetAlwaysOnTop() const
{
    // TODO: Window::GetAlwaysOnTop for Linux

#   ifdef CGUL_WINDOWS
    DWORD style = ::GetWindowLong(this->handle, GWL_EXSTYLE);
    return ((style & WS_EX_TOPMOST) != 0);
#   endif

#   ifdef CGUL_MACOS
    return [handle getAlwaysOnTop];
#   endif

    return false;
}

/** @returns A vector containing the border extents.
 */
_CGUL_EXPORT CGUL::URect32 CGUL::Window::GetFrameSize() const
{
    if (!IsOpen())
    {
        return CGUL::URect32(0, 0, 0, 0);
    }

#   ifdef CGUL_WINDOWS
    RECT rect = {0, 0, 0, 0};
    AdjustWindowRectEx(&rect, GetWindowLongPtr(this->handle, GWL_STYLE), false, WS_EX_CLIENTEDGE);
    return URect32((UInt32)Math::Abs(rect.left), (UInt32)Math::Abs(rect.top), (UInt32)Math::Abs(rect.right), (UInt32)Math::Abs(rect.bottom));
#   endif

#   ifdef CGUL_LINUX
    Atom netFrameExtents = XInternAtom(display, "_NET_FRAME_EXTENTS", False);
    Atom actualType;
    int actualFormat;
    unsigned long items, bytesAfter;
    long* data = NULL;
    if (Success == XGetWindowProperty(display, handle, netFrameExtents, 0L, 4, False, AnyPropertyType, &actualType, &actualFormat, &items, &bytesAfter, (unsigned char**)&data) && data)
    {
        URect32 result((UInt32)data[0], (UInt32)data[2], (UInt32)data[1], (UInt32)data[3]);
        XFree(data);
        return result;
    }
    return URect32(0, 0, 0, 0);
#   endif

#   ifdef CGUL_MACOS
    return [handle getFrameSize]; // TODO: fix this
#   endif
}

/** @returns False if the window has been closed, true if it is still open.
 */
_CGUL_EXPORT bool CGUL::Window::IsOpen() const
{
#   ifdef CGUL_WINDOWS
    return IsWindow(handle) == TRUE;
#   endif

#   ifdef CGUL_LINUX
    return display && handle;
#   endif

#   ifdef CGUL_MACOS
    if (handle == nil)
    {
        return false;
    }
    if (![[Application sharedApplication] keepRunning])
    {
        return false;
    }
    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];
    bool result = ([handle isOpen] == 1);
    [pool drain];
    return result;
#   endif
}

/** @warning Can be weird on Mac when running an application from the console.  Macs have two forms
 *  of focus and when an application is launced through a terminal it gets a little wonky.
 *  @returns True if the window is focused, false otherwise.
 */
_CGUL_EXPORT CGUL::Boolean CGUL::Window::IsFocused() const
{
    if (!IsOpen())
    {
        return false;
    }

#   ifdef CGUL_WINDOWS
    return (handle == GetForegroundWindow());
#   endif

#   ifdef CGUL_LINUX
    Atom netActiveWindow = XInternAtom(display, "_NET_ACTIVE_WINDOW", False);

    ::Window activeWindow = None;
    Atom actualType;
    int actualFormat;
    unsigned long items, bytesAfter;
    unsigned char *propReturn = NULL;

    if (Success == XGetWindowProperty(display, XRootWindow(display, 0), netActiveWindow, 0L, sizeof(Window), False, XA_WINDOW, &actualType, &actualFormat, &items, &bytesAfter, &propReturn) && propReturn)
    {
        activeWindow = *(::Window*)propReturn;
        XFree(propReturn);
    }

    return activeWindow == handle;
#   endif

#   ifdef CGUL_MACOS
    return [handle isFocused];
#   endif
}

_CGUL_EXPORT void CGUL::Window::SetMousePosition(SCoord32 mousePosition)
{
#   ifdef CGUL_WINDOWS
    SCoord32 pos = GetPosition() + mousePosition;
    SetCursorPos(pos.x, pos.y);
#   endif
}

// @brief Sets if the cursor is visible in the window or not.
_CGUL_EXPORT void CGUL::Window::SetCursorShow(bool show)
{
#   ifdef CGUL_WINDOWS
    // TODO: make this per-window?
    ShowCursor(show);
#   endif
}


HIMSS Analytics announced Concord Hospital has achieved Stage 6 on the EMR Adoption ModelSM (EMRAM) and Concord Hospital Medical Group has achieved Stage 6 on the Outpatient EMR Adoption ModelSM (OEMRAM).
HIMSS Analytics developed the EMR Adoption Model in 2005 and the Outpatient EMR Adoption Model in 2012 as methodology for evaluating the progress and impact of electronic medical record systems for hospitals and ambulatory facilities in the HIMSS Analytics® LOGIC™. Tracking their progress in completing eight stages (0-7), hospitals and ambulatory sites can review the implementation and utilization of information technology applications with the intent of reaching Stage 7, which represents an advanced electronic patient record environment.
Stage 6 hospitals/organizations also have achieved a significant advancement in their IT capabilities that positions them to successfully address many of the current industry transformations, such as meaningful use criteria in the American Recovery and Reinvestment Act, claims attachments for the Health Insurance Portability and Accountability Act, pay for performance and government quality reporting programs.
HIMSS Analytics is a global healthcare advisor, providing guidance and market intelligence solutions that move the industry forward with insight to enable better health through the use of IT. As a trusted healthcare research and advisory firm, the industry depends on HIMSS Analytics' resources, benchmarks, predictive models and assessment tools to improve decision making regarding their IT strategic roadmap and market strategy. HIMSS Analytics is uniquely positioned and differentiated through its industry-focused offerings, which include its Healthcare IT market intelligence tool, Healthcare IT insights and Healthcare IT benchmarks and services. The LOGIC market intelligence tool has the largest technology data set with unmatched breadth and depth needed for guiding healthcare IT strategies. HIMSS Analytics research and advisory consultants uncover unique insights on how to optimally use IT to tackle today's healthcare challenges faced by both healthcare delivery organizations and IT companies. Its EMR Adoption Model (EMRAM) provides a strategic roadmap and guidance along an 8-stage model with comparisons to healthcare organizations in the same country and around the world.


text:
Home » Table of Contents » Understanding Whole Systems
That's the technical term for everyplace outside the Earth's atmosphere. It's a political term. From now on It's a political reality.
Twenty-five pages of this issue are devoted to design details of Space Colony development as worked out by physicist Gerard O'Neill and colleagues. So far no one has successfully challenged the scale, the engineering, the budget, or the schedule of the scheme.
You are invited to find the fatal flaw, or to participate in the design and speculation.
One speculation I would make is to anticipate something like what happened in Europe when America was being colonized. Intellectual ferment.
New lands meant new possibilities; new possibilities meant new ideas. If you can try things, you think up things to try.
Give your imagination a Space Colony of 1,000,000 inhabitants, each of whom has five acres of land. Know that it's readily possible — maybe inevitable — by 2000 AD. Any thoughts about how to organize its economy, politics, weather, land use, education, ' culture?
O'Neill notes that the ends of the enormous rotating cylinders could be mountain ranges, with the interesting property that as you climb higher your weight decreases. Near the top, at.lg (1/10 of Earth gravity) you can don wings and take flight. Or you may want to take a long slow plunge into a swimming pool. Or watch someone else's slow-motion splash. At the foot of the mountains you might have a round river, allowing you to canoe downstream several miles past the other two "valleys" and back to your home.
O'Neill expects that the colonies, once they begin to proliferate, would make themselves as appealing as possible to attract immigrants from Earth. Since the cylinders are big enough to have blue skies and weather, you might design a cylinder pair to have a Hawaiian climate in one and New England in the other, with the usual traffic of surf boards and skis between them (travel in Space is CHEAP — no gravity, no friction).
In all this there are some important distinctions from the experience of colonizing North America. One is the absence of natives — no conquering, no exploitation, no guilt this time. Warfare in general may be obsolete in Space. There is too vastly much free energy, materials, parking Space, and access — thousands of times what is on Earth — to be worth fighting over any part of it.
Free Space becomes what the oceans have ceased to be — the outlaw area, too big and dilute for national control.
Curious premonitions of all this are already under way. Grade-school children, I'm told by teachers, have been assuming for years that they would be living in Space. Russia and America have had Space programs all their lives.
In Russian-U.S. relations something funny is going on. One of the reasons (insiders tell me) that Kennedy gave the big push to Apollo - "We will land a man on the moon in this decade" — was economic. Missile development had peaked and we needed to keep those engineers employed. Last month America and Russia staged a joint space effort with the Apollo-Soyuz that seemed scientifically and even politically pointless. It is until you notice that the U.S. Space Shuttle program has lots of vehicles and little payload planned, and the Russian program has an ambitious Space station and no vehicles in the works. Both are counting on cooperation that the respective governments haven't acknowledged or possibly even expected yet.
When the cooperation becomes operational, what happens, to the Arms Race? Every economic and political reason for it moves over to Space Colonies. There's a common ecological sequence from intimate competition to obligate mutualism.
The next steps now are mostly political. As Space Colonies becomes a generic subject — something that everyone knows about and has an opinion on, like Civil Rights, Women's Lib, Inflation — then it becomes part of political campaigns. Once a President or a Congress get into office with Space Colonies in their platform, or get the fever while they're in office, only then does the 15-year construction begin.
I think the voters will be interested enough to approve the requisite $100 billion, one-tenth the cost of Project Independence; 10 times the return in energy alone).
Space Colonies show promise of being able to solve, in order, the Energy Crisis, the Food Crisis, the Arms Race, and the Population Problem. Space Colonies are exciting — more interesting than war these days. And whether you like them or hate them, there's reason to support them.
I spoke at length about the Space Colonies to a gathering of 70 soft-tech freaks at Goddard College this summer. The subject polarized them hard. About two-thirds were disbelieving and resentful — not happy that I had taken away the Apocalypse they were organizing their self-discipline around. But they liked the idea that high technology and technologists and accompanying hazards might be sent off the Earth, out of our atmosphere. "Good riddance."
The other third was electrified at the possibilities, personal possibilities. "If we can get involved in the design now, maybe humankind could walk gently in the Universe."
Both critics and enthusiasts noted that Space Colonies could make terrible mistakes and not threaten Earth — they are separate systems — and that Earth could somehow blow it and perish but life would continue in Space.
I think the voters will be interested enough to approve the requisite $100 billion (one-tenth the cost of Project Independence; 10 times the return in energy alone).
My own conviction is that both the idea and reality of Space Colonies serve the realization of cultural/biological balance on Earth — exactly as the photographs of Earth from Space served the Ecology Movement. Space is part of the wildness in which lies "the preservation of the world."
Think for a while about cows and fences and grazing. The grass IS greener on the other side
of the fence.
Think for a while about cows and fences and grazing. The grass IS greener on the other side of the fence.

redpajama_set_name: RedPajamaCommonCrawl


text:
Jean Hiriart-Urruty, aussi connu sous le pseudonyme "Manex", né le  et mort le  à Hasparren, est un prêtre, professeur et journaliste basque français.

Jean Hiriart-Urruty, par son travail, a jeté les bases du journalisme en langue basque. Il sera par conséquent un précurseur et un modèle pour les auteurs des générations futures ("Oxobi", "Zerbitzari", Jean Etxepare , "Larreko" , etc) et comme le décrit Koldo Mitxelena "un maître de la prose".

Biographie
Formé à l'école des Frères, à Larressore et Bayonne, Jean Hiriart-Urruty est ordonné prêtre en 1881. Un an plus tôt, il commença à travailler en tant que professeur au séminaire de Larressore, avec le directeur du centre Arnaud d'Abbadie, le frère d'Antoine. Il y travaille près de trente ans et y enseigne les langues classiques (latin et grec) et modernes (français et allemand). Il est également préoccupé pour l'avenir de la langue basque, et participe aux conférences sur l'[[Basque unifié|unification de leuskara]] qui ont lieu en 1901 et 1902, respectivement à Fontarrabie et Hendaye.

Pour comprendre les écrits de Jean Hiriart-Urruty, il est essentiel de tenir compte des débats qui ont surgi sur la religion à la fin du XIX et au début du . C'est un moment difficile pour l'Église, car les autorités de l'État n'arrêtent pas de fixer des limites, des ordres et des restrictions qui entravent le travail quotidien des hommes d'église.

En 1886, il crée la revue bilingue Le Réveil Basque à Bayonne, une maison d'édition religieuse et contraire à l'institution ecclésiastique. Précisément, voulant contrecarrer ce projet, Louis Etcheverry crée un nouveau hebdomadaire : Eskualduna. La publication remplit amplement sa mission, et Le Réveil Basque disparait peu de temps après.

Parlant d'''Eskualduna, la référence à Jean Hiriart-Urruty est essentielle, car qui plus est, il en dirige la publication, et sera chargé d'écrire le premier article de chaque numéro pendant environ vingt-cinq ans. Eskualduna a commencé à publier tous les quinze jours mais compte tenu de son succès, la revue devient hebdomadaire.

Le hazpandarra publie rien de plus que des articles de journaux. En 1944, Piarres Lafitte (directeur de Herria, revue héritière dEskualduna) prépare la première compilation d'articles de Hiriart-Urruty, paru sous le titre Zer eta zer. En 1971, Jean Hiriart Urruty publie Mintzaira, aurpegia: Gizon!, et un an plus tard, il publie Zezenak errepublikan. Les deux livres ont été publiés dans Jakin.

Vingt ans plus tard, Iñaki Camino prépara une nouvelle anthologie de ses textes publiée sous le titre Gontzetarik jalgiaraziak.

La collection la plus complète à ce jour est celle de Xabier Altzibar: Ni kazeta-egilea naiz. Artikulu, berri, istorio publiée par Ikastegia Labayru en 2004. Après une introduction d'environ 100 pages, Altzibar y compile les articles d'opinion, des rapports, des textes informatifs sur la société, la langue basque et la basquitude, des critiques de livres, etc. Par son travail, Hiriart-Urruty a jeté les bases du journalisme en langue basque. Il mélangera et s'inspirera des modèles étrangers (Venillot, Sainte-Beuve, La Bruyère et Bossuet, par exemple) et de la tradition basque (il admirait profondément le travail réalisé par Jean-Pierre Duvoisin dans Laborantzarako liburua et les auteurs tels que Axular, Oihenart, Ithurry, Elizanburu ou Diharassarri).

En 1907, à la mort de Gratien Adema dit "Zaldubi", Jean Hiriart-Urruty est nommé chanoine de la cathédrale de Bayonne. Il meurt huit ans plus tard, en 1915, dans sa ville natale.

 Articles
 Mintzaira, aurpegia: gizon! (1971, Jakin)
 Zezenak Errepublikan'' (1972, Jakin)

Notes et références

Liens externes

  Jean Hiriart-Urruti sur Auñamendi Eusko Entziklopedia
  Jean Hiriart-Urruti, Literaturaren Zubitegian.

Écrivain de langue basque
Naissance en janvier 1859
Naissance à Hasparren
Naissance dans les Basses-Pyrénées
Décès en novembre 1915
Décès dans les Basses-Pyrénées
Religieux catholique lié aux Pyrénées-Atlantiques
Prêtre catholique français du XIXe siècle
Prêtre catholique français du XXe siècle
Décès à 56 ans
Décès à Hasparren

redpajama_set_name: RedPajamaWikipedia


text:
Best Of The High Country 2021
Veterans Corner
The Healthy Living Page
Victor Happenings
Sports Page
TMJ Distribution Centers
The Mountain Jackpot News
Home CR Chambers The 1st Cavalry Division in Cripple Creek
CR Chambers
The 1st Cavalry Division in Cripple Creek
chambersphoto1
Jim Druck, Owner of "BIG JIM's Casino, Cripple Creek Colorado. Hosting the group on the 3rd floor "Hall of Hero's in his casino.
Ret. COL Bill Mcphereson seen here receiving a gift from the group he was hosting in Cripple Creek, Colorado last Friday Feb. 2nd….
Photos by CR Chambers
Retired Colonel Bill McPherson was heading off the gathering of warriors of the 1st Cavalry Division that served in Viet Nam last Saturday, February 2nd. A little about the first Cav is as follows: Within 90 days of becoming the Army's first air mobile division, the First Team was back in combat as the first fully committed division of the Vietnam War. Their first real combat test came during the Pleiku campaign ; 35 days of continuous air mobile operations beginning October 29, 1965. The troopers destroyed two of the three regiments of a North Vietnamese Division, earning the first Presidential Unit Citation given to a division in Vietnam. The division began 1968 by terminating Operation Pershing, the longest of the 1st Cav's Vietnam actions. For nearly a year the division scoured the Bong Son plain, An Lo valley and the hills of coastal II Corps, seeking out enemy units and their sanctuaries. When the operation ended on January 21, the enemy had lost 5,401 soldiers and 2,400 enemy soldiers had been detained. Some 1,300 individual and 137 crew served weapons had been captured or destroyed. Moving to I Corps, Vietnam's northern most tactical zone, the division set up Camp Evans for their new base camp. In late January, the enemy launched the Tet Offensive, a major effort to overrun South Vietnam. Some 7,000 enemy, primarily well equipped, crack NVA regulars blasted their way into the imperial city of Hue and Quang Tri, the capital of Vietnam's northern most province. The Cav went on the move and by February 1, Quang Tri was liberated followed by Hue. After shattering the enemy's dreams of a Tet victory, the 1st Cavalry Division "Sky-troopers" moved to relieve the besieged Marine Base at Khe Sann. In May 1970, the First Team was "First into Cambodia," hitting what was previously a Communist sanctuary. Troopers deprived the enemy of much needed supplies and ammunition, scattering the enemy forces. The division's Vietnam service ended in 1972 when its last brigade began withdrawing. The 1st Cav had been the first division to go, and the last to leave. "Firsts" had become the trademark of the First Team. General Creighton Abrams, while commander of all U.S. Forces in Southeast Asia, said of the 1st Cav, "The big yellow patch does something to an individual that makes him a better soldier, a better team member, and a better American than he otherwise would have been."
I couldn't have been more honored to photograph these hero's. Who in my opinion got a little short changed when they came home from battle. I thank all of you 1st Cavalry for your service.
Previous articleTragic Accident Takes Life of Divide Teen
Next articleWoodland Officers Involved In Shooting Return To Work
Habitat For Humanity of Teller Embarks on Mega Workforce Housing Project
Tweed's Holiday Home Tour Serves as Big Success Story in Pandemic Era
Teller's Anti-Coronavirus Combat Attack In Flux


text:
//
//  UIViewController+FCModelPresentation.m
//  FCModelPresentationSample
//
//  Created by Harley.xk on 14/12/25.
//  Copyright (c) 2014年 Flycent. All rights reserved.
//

#import "UIViewController+FCModelPresentation.h"
#import "FCModelPresentationCenter.h"
#import <objc/runtime.h>

@implementation UIViewController (FCModelPresentation)

- (CGSize)fc_modelPresentationSize
{
    NSValue *value = objc_getAssociatedObject(self, @selector(fc_modelPresentationSize));
    if (!value) {
        return self.view.frame.size;
    }
    return [value CGSizeValue];
}

- (void)setFc_modelPresentationSize:(CGSize)fc_modelPresentationSize
{
    objc_setAssociatedObject(self, @selector(fc_modelPresentationSize), [NSValue valueWithCGSize:fc_modelPresentationSize], OBJC_ASSOCIATION_RETAIN_NONATOMIC);
}

- (void)fc_modelPresentViewController:(UIViewController*)controller animated:(BOOL)animated completion:(void (^)(void))completion
{
    [[FCModelPresentationCenter sharedCenter] presentViewController:controller animated:animated completion:completion];
}

- (void)fc_dismissModelViewControllerAnimated:(BOOL)animated completion:(void (^)(void))completion
{
    [[FCModelPresentationCenter sharedCenter] dismissViewControllerAnimated:animated completion:completion];
}

@end

/**
 *  自定义连线,实现在StoryBoard中使用segue操作
 */
@implementation FCModelPresentationSegue : UIStoryboardSegue

- (void)perform
{
    UIViewController *destinationViewController = self.destinationViewController;
    [[FCModelPresentationCenter sharedCenter] presentViewController:destinationViewController animated:YES completion:nil];
}

@end

redpajama_set_name: RedPajamaGithub


text:
Impact of New Apple IDFS Identifier for Advertisers Policy on Facebook
Facebook gamers now have a choice to refrain from participating in advertisers' efforts to gather data for their online advertising campaigns.
The impact on Facebook has been catastrophic for the company which had already been dealing with a devastating six-hour outage and the fallout over allegations that it encourages hate speech. Facebook recently published a blogpost in which it detailed the damage that it is experiencing by Apple's App Tracking Transparency (ATT) feature.
The feature was launched in conjunction with the release of iOS 14 and prevents Facebook, or any other platform, from tracking a user's searches, posts and interactions UNLESS that user actively opts IN to tracking.
Now, advertisers including clothing manufacturers, appliance and tech companies and online casino sites with no deposit bonus codes will be forced to gather information elsewhere in order to effectively target their advertising campaigns effectively.
The Identifier for Advertisers (IDFA) is a device identifier assigned to a device by Apple. The device is used by advertisers to track data about potential customers which allows them to deliver customized advertising.
By identifying and tracking users (without revealing personal information about each individual user) the advertiser can discover data that allows them to see which mobile advertising campaigns receive the greatest number of interactions, find out which in-app events are triggered by the greatest number of users, and which ads generate the greatest number of conversions.
In general, the advertisers are given a general picture of what happens by monitoring users' interactions with mobile ads.
Up until now, the IDFA has been applicable to iOS devices across the board so advertisers can track the IDFAs within a campaign to discover relevant information about the people who respond to their advertising campaigns. IDFAs offer users privacy because the IDFA's depersonalization of user data ensures data protection for individual users.
There's an Android equivalent to the Identifier for Advertisers -- GPS ADID (Google Play Services ID for Android). Android users have access to their GPS ADID in their settings menu under 'Google - Ads' which allows them to reset the ID and opt-out of ad personalization. Apple's new IDFA, on the other hand, gives users the choice of opting INTO the tracking service.
The IDFAs have been a precise and tool for advertisers to track a mobile advertising campaign on iOS but lately users have been opting out of it in larger numbers through the LAT Limit Ad Tracking tool that ensured that users wouldn't be shown targeted ads. Currently 20% of iOS users have enabled LAT so they can't be tracked using IDFA.
A large percentage of iPhone users have decided to forgo IDFA tracking and Facebook is paying the price. With Facebook tracking turned off, advertisers are having trouble measuring their campaigns effectively because without the IDFA, they can't see how many users clicked on an ad, did a search for the company and then converted that interaction with a sale.
On its blogpost Facebook admitted that it was finding it difficult to measure iPhone ad performance and the results of a number of campaigns were being under-reported.
Effectivity
Criticism has been leveled at Apple's ATT feature which, the Washington Post reports. Is "functionally useless." One criticism involves the fact that the feature relates only to specific types of IDFA tracking which leaves compliance of the rest in the hands of app developers.
But how well the new app tracking rules work may be a moot point. In a new study, carried out by the Washington Post and the Lockdown ad blocking app, many apps are able to continue to identify and track users even after they opt out – or refrain from opting in.
In general, the study found that iPhone apps aren't accessing devices' Apple IDFA when directed to refrain. However, some popular apps are simply flipping a toggle switch to override user tracking preferences which allows them to continue to send identifying combinations to third-party tracking companies.
By scrutinizing the data and permissions transfer of frequently-downloaded apps (including App Store "must play" games), researchers found that the apps were allowing users to opt out and were informing users that the app would like to use the IDFA to serve personalized ads and gather information about device activity.
However, the apps continue to collect data points in the background which identifies the end users, similarly to the way that IDFA operates. Some can't track the users on their own but, when combined, they can pinpoint an individual user as s/he browses or moves to different apps in the same advertising network with a high degree of accuracy.
Some apps access the device name while others, such as an app that does device fingerprinting, might combine the user's cellular carrier, language settings, time zone, audio settings, preferred screen brightness, iPhone model and total storage space on device to create a profile.
Apple's iOS 14 app tracking rules expressly forbade tracking through device fingerprinting. But as long as those app developers refrain from accessing the IDFA, enforcement remains lax. Apple relies on user reporting and flagging to identify apps that might be evading the rules. But since the fingerprinting process is often not evident to the user, it's hard to identify, much less stop.


Located off Highway 41, the Sheffield Woods Subdivision is a single-family home development in Clarksville TN (Montgomery County). Other nearby Clarksville subdivisions include Copperstone Subdivision, Azalea Trace Subdivision, Savannah Chase Subdivision, Poplar Hill Subdivision, Savannah Lakes Subdivision, Welchview Subdivision, Villages Subdivision, Wilson Green Subdivision and Woodford Estates Subdivision.
View our selection of available properties in the Sheffield Woods Subdivision area.
Get to know Sheffield Woods Subdivision better with our featured images and videos.


The power of the future starts here.
At KLA, we push the leading edge of applied science. It's an exciting time to join us as we show the world the power of the invisible nanoscale.
But before you get started, please log in and download your required new hire forms. We'll need these on your first day, so make sure to fill them in completely and bring them with you.
We're looking forward to working together — and proving how brilliant the future can be.
Please login to download new hire documents.


No cavity areas to hold debris as in other patio roof systems. The continuous insulated foam interface makes the design of the panel extremely energy efficient.
Originally, we created our Insulated Patio Roof Kits for the DIYers in South Florida ... different options for your project such as panel size, post size and fan beam.


Thing 1 and Thing 2 Cupcakes with Wild Blue Hair make this a fun party idea for any Dr. Suess or Think 1 and 2 birthday. Here are some tips on how to make them.
Just prepare your cupcakes as directed on the box or your favorite recipe. Let cool and frost. Add a dollop of frosting to the center of the cupcake and add the blue cotton candy to the top. Make Add a little extra because once the cotton candy touches the frosting, it will start to melt. The more you add, the fluffier it will stay.
Find a picture online or make your own and print out Thing 1 and 2. Cut your circles out with your Thing 1 and Thing 2 messages on them. Use a small dot of quick drying thick Tacky craft glue or glue dots in order to secure them to the outside of the cupcake wrapper. Regular glue or tape just won't hold with many cupcake liners.
These Thing 1 and 2 cupcakes are perfect for a birthday party, celebrating Dr. Seuss or just for fun. Or perfect for a classroom activity. Read Cat in the Hat and serve these fun cupcakes after.
A Wilton "grass/hair" decorating tip was used for the blue "hair". The labels were printed on the computer. 3-D glue dots were used to attach them to the cupcake wrappers.
Special thanks to Allison for sharing this creative version of Thing 1 and 2 cupcakes!


Resources, News & Information for Law School Professors.
Blog by Jerry Lawson providing advice for lawyers marketing through blogs.
Blog discussing and dealing with abuses in the legal system and by attorneys.
What's going on in the legal world related to video games? Check it out here.
Keep up with everything related to election law in the United States.
A divorce lawyer�s blog about family law, child custody, child & spousal support, property division & more.
Weblog by economist Gary Becker and appellate judge Richard Posner.
Disability law blog written by a former specialist with the U.S. social security administration.


Home » Blog » Personal Injury » Will Work Zone Awareness Week Help Decrease Deadly Accidents On Indiana Highways?
There's no motorist in Indiana that isn't familiar with highway work zones. To many they can be an annoyance, something slowing you down on your way to work or to school. But for the men and women who are working in these zones, they are very dangerous, a place where on any given day an accident could change their life forever.
That's what makes Work Zone Awareness Week so important. It's start on the 23rd and will go through the 27th. This is commonly considered to be the beginning of construction season in Indiana, so there's no better time to get people thinking about highway work zone safety.
Just last year, eleven people lost their lives in car accidents in highway work zones. On top of that, another six hundred were injured according to the Indiana Department of Transportation. As personal injury lawyers in Indianapolis we know that worker and motorist safety has never been more important than it is right now.
So what should we be thinking about going into Work Zone Awareness Week?
Most deaths and injuries that occur in work zones are rear-end collisions, caused by improper lane changes or following too close.
There is no room for distractions in work zones. Always slow down and always pay close attention to your surroundings.
Never use a cellphone while driving through a work zone. Those talking on the phone are 4 times more likely to be in a wreck.
During this week and beyond Indiana State Police will be stepping up patrols in work zones. Speeding through a work zone could get you a fine of up to $1,000, $5,000 for reckless driving, and even up to eight years in prison if you take the life or injure a roadside worker.
The Ken Nunn Law Office serves accident victims throughout Indiana whether in a work zone or not. Contact our Indianapolis personal injury attorneys to find out how they can serve you.


Network marketing is actually a reputable business. Primary, it's according to supplying individuals with genuine, legit products and solutions they require and desire for a good cost. While many people make a great deal of money as being a network marketing professional , their economic advantage is definitely the outcome of their devoted endeavours in setting up a company that offers real goods and services. Network marketing is essentially whenever a corporation outsources its sales and marketing to people. They think that the individual focusing on their own will have the ability to achieve new clients and enable them to build their business. At the same time that each is building their own business. He's the opportunity to have a good product and develop a career from it. Also, he will get to work for themself that has several benefits.
Network marketing is not about making use of your buddies and relatives. Merely a couple of years back, network marketing is designed selling to, and signing up individuals from, your "list" of potential customers. Even though talking about the services or products as well as the opportunity with those you're associated with continues to be important basis of the business, right now we come across far more network marketing professional applying innovative marketing strategies such as the Internet, conference calling along with other cross country sponsoring approaches to prolong their circle around the world.


text:
Александр Бовин: Бовин, Александр Евгеньевич (1930—2004) — советский и российский политолог, журналист, публицист и дипломат.
 Бовин, Александр Иванович (1905—1991) — советский государственный деятель, министр лесного хозяйства СССР.


text:
Q: JS is not rendered in Liquid section I have started working on Liquid a couple of weeks ago.
Either I write
popup-navigation.liquid

{% javascript %}
    console.log("coucou")
    console.log("{{ section.settings.type }}")
{% endjavascript %}

or
popup-navigation.liquid

doesn't log in the console.
How should I correct this?
Thank you !

redpajama_set_name: RedPajamaStackExchange


Where old friends gather and new ones are made.
Where locally-grown herbs elevate refreshing cocktails, alongside ambrosial wines and delicious beers. Where riveting stories and delectable snacks are shared. A warm, inspired atmosphere, inside and out; a place to gather and sip...welcome.


Boy backpacks for back to school. Cool blue multi-color bold stripes create an amazing look that transforms this backpack into a modern finish. The bag is large and spacious, ideal for all those items you need for a day. The eye-catching backpack features a front zip pocket for small items, side gusset pockets for water bottle or cell phone and a spacious interior. Lightweight for school, overnight or travel.
Personalized and embroidered unisex striped backpack measures 17"H x 13"W x 5" across bottom. Lined with padded over the shoulder carry straps or hand carry handle. Zipper closure.


text:
Matt Leinart Q&A: From signal caller to…
Matt Leinart Q&A: From signal caller to studio analyst
Former USC QB and Heisman winner Matt Leinart, center, on the set of Fox Sports 1's College Football show. (Photo courtesy Fox Sports 1)
Leinart says what Steve Sarkisian did was a mistake. "He knows it ... But I don't think it'll be a distraction to the team." (Photo courtesy Fox Sports 1)
By Tom Hoffarth | tomhoffarth1@gmail.com | Daily News
PUBLISHED: September 1, 2015 at 3:20 p.m. | UPDATED: August 28, 2017 at 6:49 a.m.
Matt Leinart may not be as hip as he used to be.
Toward the end of his NFL career, an arthritic hip condition flared up. Doctors tell him he may need replacement surgery sooner rather than later. It doesn't really deter him from playing pick-up basketball games around the South Bay, taking the court for beach volleyball or goofing off with his 8-year-old son Cole.
"I was playing in Matt Barnes' charity flag football game the other day at UCLA — the first time I competitively threw a football in a long time," the 32-year-old Leinart admitted over a bowl of oatmeal at a Manhattan Beach breakfast place recently. "It got my juices flowing. But I couldn't move my arm the next day."
Although he's more than 10 years removed from a Heisman Trophy season and three seasons past his last pro snap in Oakland, the former USC quarterback can still sidestep the blitz when necessary.
Leinart is immersed again in the college game more than he has in the past decade, primarily as a studio analyst for Fox Sports' college football coverage, starting with this opening weekend. He also co-hosts a Sirius XM radio show and flies up to San Francisco for appearances on the Pac-12 Network.
All of a sudden, he's a go-to guy when people want hot takes about what's going on in Trojan Nation with coach Steve Sarkisian under heavy media scrutiny.
Who knows this Hollywood Two-Minute Drill better than Leinart? He explained:
Q: You had a pretty good relationship with the media, with some bumps in the road. What feelings do you have being labeled a 'media guy' now? Do you even think you are?
A: I don't really think I am. The first time it really kind of sunk in was when I was at the Pac-12 Media Day and I was sitting there with all the other reporters. 'Oh, man, I'm a media member now … I'm on this side now (laughing).' But you know, I still have such a players' mentality. When I played, I was the most PC player you could imagine at times. I was often told, 'Don't say that,' when I was asked certain things, but eventually, toward the end of (playing in the NFL with) Arizona, I finally started saying what I really thought, and it felt really good. That's new to me. I'm fair about what I say. I'm not out to get someone or backstab. But now is the first time I feel, with this platform, I can be more opinionated and not worry about what others will say.
Q: Aside from the hip, which parts of your body still hurt?
A: The knees, ankles, shoulders — the head — it's all great, and I'm thankful for that.
Q: Is the hip the reason why you eventually didn't want to keep playing in the NFL?
A: Toward the end of my career, I was so mentally out of it. I just didn't have the desire to play in the NFL. Physically, I could still throw.
Q: You have no comeback designs?
A: I have no desire at all. I don't miss it. I don't think about it. I can watch it, but I needed four to five months away from it after I left, then I started thinking about working in broadcasting and what I wanted to do next. I can't sit still. I didn't have a lot of patience.
Q: UCLA may have to be patient. It has a situation where it's using a freshman, Josh Rosen, as its starting quarterback. Any advice you could give him?
A: I think he's actually in a perfect situation to play now with the team he has around him. The number one this is be yourself, don't overthink. He doesn't have to carry this team. The team will carry him until the point when he's ready to take over. It's actually similar to Brad Kaaya (at the University of Miami, a true freshman last year out of Calabasas High), who had a lot of NFL-caliber guys around him. He just had to drive the car. This is one of the best teams Jim Mora has ever had. It's a smart move to throw him into the fire now. He's got the pedigree. He doesn't need to throw for 400 yards and five touchdowns.
I never played as a true freshman. I sat for two years. But my first season, my first game (at Auburn in 2003, a national TV audience and 86,000 at Jordan-Hare Stadium, a 23-0 win), I was so wet behind the ears. I only threw 180 yards and one touchdown and didn't turn the ball over. The team had my back. In week four, we lost to Cal (34-31 in OT), and I had three picks and three touchdowns. That's when it started happening for me. I felt I was making plays when we needed it, and I put our team in bad situations, but we got through it (USC ended up 12-1 and won the Rose Bowl and AP national title).
Q: Cody Kessler, starting his senior year as the USC quarterback, is probably someone you can relate to as far as the media attention. How do you size him up?
A: I've been close with him for a couple of years now. We had a sit-down at USC watching film together, and he's really got a good head on his shoulders. He's very mature, media savvy, knows the drill. He gets it. Some don't. He can handle it. Last year he was a bit under the radar, but he's a name now and rightfully so. It'll be hard to duplicate the numbers from last year, but he's shown that he's a great leader. He's humble, hungry, not one ounce of arrogance, which I really appreciate.
Q: Reading a Grantland story on Kessler reflected on the USC quarterback lineage, what he could learn from that. Your name came up, and the line was: "It may be unfair to say Leinart was brought down by his own celebrity, but this is the outsider's view of his career. To this day, the perception remains he got sucked into the Hollywood vortex and never really reemerged." Is that something you feel is true and if so can you help counsel Kessler on that kind of TMZ mentality?
A: It's such a different time for the kids playing college now. They are immersed in social media. You can't do anything without someone seeing it. Maybe some are more mature because they've had Twitter since they were 14. When I played, it felt like it was just USC and the Lakers. UCLA wasn't competitive. And there are no camera phones. I didn't have Facebook and I had a dial-up modem. So Pete Carroll embraced all that, as long as we handled our business. Otherwise, he would have cut it off. He established that culture. That was the allure of USC — in L.A., Hollywood, Snoop Dogg, Will Ferrell … man.
So as this team comes out of sanctions, I know Sark and Pat Haden would like to sort of bring that back, because it made USC special. Going through those sanctions has forced them to be a certain way so (the players) don't know any different. But there are some bumps in the road. They have to start winning again, and that's what it's starting to feel like. Maybe USC's back. But they have to prove it.
Q: With what Sarkisian has had to answer to recently, social media does amp things up. You've lived through some of those 'caught on tape' moments. Can you speak to how that works?
A: I've been there. Sure, it's a little different. He's a head coach at a major football program. But I'll go on record — I love Sark. He's a great friend of mine. What he did was a mistake. Everyone knows that he should have handled himself differently. Knowing what happens this day in age, what type of event it is, a social gathering with wine and beer, the alumni having a party. I wasn't there. But in the context of it, he had to understand he is the head coach and he had to speak. I know he's going through a difficult time personally. And, listen, we all make mistakes. I've made mistakes. It's not acceptable. He knows it. If anything, his leash is shorter to win, win now, and he'd be the first to admit he's made things harder on himself. But I don't think it'll be a distraction to the team. They want to move forward.
Q: Will the media — and you being part of that media — keep coming back to this?
A: Only if they lose. They might say winning cures everything, but this situation is a little different if there's a legitimate problem he has to deal with. If you win games, you produce, you're competitive, everyone loves you. I've been in those situations as a quarterback. 'Leinart stinks … we want the next guy.' I come back the next week and win? 'Leinart, we knew you could do it.' That's the nature of the beast.
Q: When you played, college or the NFL, did the media overstep in covering things about you, publicly or privately?
A: Yeah, there's always something. I'm not going to name names. But there are things where the media stretched the truth. And I'm thinking: Why would you report that? I get it when you're in the spotlight, it comes with the territory. I totally understand it. But there's a time and place when you respect my life and respect what I do outside my job. But again, a lot might not care.
Q: So maybe you're in a position you can explain that better to viewers?
A: Yeah. I understand. It's unfortunately negative stories sell. We always say, 'There are so many good people doing great things that don't get talked about.' Then the minute something bad happens that's the number-one story. Is it unfair? Sure, you get used to it and somehow you do your best.
Q: But how do you get used to it? How do you explain that to your son?
A: It's hard (laughing). My son is at the age when he asks a lot of questions. Maybe that's why we don't watch the news on TV, since it feels like it's all negative. He doesn't need to know that. I'd rather him know what's good, then introduce him to real-life things. They are teaching moments. Those are the hardest times as a dad. I'm open and honest with him, but I also pick and choose what I tell him and what I know he'll learn more about when he's older. Kids are already overexposed to so many things.
Q: You majored in sociology. Doesn't that come into play? Although you'd think most remember you as a ballroom dancing major.
A: (Laughing) I have vivid memories of that class. Mark Sanchez was a freshman in that class. My son's mother (USC basketball player Brynn Cameron) was there. Our teacher was a choreographer for the movie "Dirty Dancing." But I had these two credits to finish and it was either that or Art 101. I liked drawing.
Q: Like Todd Marinovich?
A: I was never that great an artist. He's amazing.
Q: How far could you even get with ballroom dancing knowledge?
A: I don't know if you remember, but I ended up on "Jimmy Kimmel Live" once, and the producer said "We're gonna surprise Jimmy and have you dance with him." This was after I graduated. The first ever time he danced on his show was with me, and we did the box step, holding hands and everything. They were dying laughing.
Q: No future on 'Dancing with the Stars?'
A: I don't know physically if I could do it. Although a lot of football guys have done well. I would make a fool of myself.
More Q-and-A with Leinart about how he preps for broadcasting and what led him there at www.insidesocal.com/tomhoffarth
Matt Leinart
Steve Sarkisian
Tom Hoffarth | columnist
Tom Hoffarth is a freelancer. He had been with the Daily News/Southern California News Group since 1992 as a general assignment sports reporter, columnist and specialist in the sports media. He has been honored by the Associated Press for sports columnists and honored by the Southern California Sports Broadcasters Association for his career work. His favorite sportscaster of all time: Vin Scully, for professional and personal reasons. He considers watching Zenyatta win the Breeders' Cup 2009 Classic to be the most memorable sporting event he has covered in his career. Go figure that.
tomhoffarth1@gmail.com
Follow Tom Hoffarth	@TomHoffarth


I asked her to send in her pictures and she did. Yay!
Zucchini, cucumber, grapes (in the freezer), 15 lbs.-ish of tomatoes (already in sauce), yellow squash, red onions, broccoli, sweet potatoes, asparagus, corn.
Small deli containers of various cut fruit and veggies (17 total, some have been eaten already, some went into the spag. sauce), large containers of cut fruit and veggies (a couple had already been sent to my parents and his work, retail on the bigger ones is around $30!!!!), in the bowl was a batch of your chocolate brownie cookies..omg so good, bundles of spinach, romaine, kale, and a couple of bunches of radishes underneath.
Banana box FULL (halfway through these..some frozen whole for smoothies, others mashed for recipes), over 2 dozen bags of spinach and romaine hearts, 2 bags of red potatoes, 9 heads of lettuce.
Not pictured: a bushel of green beans (Yes, a full bushel), half a watermelon, 18 packages of mushrooms, 2 heads of cabbage, 9 bags of regular carrots, 10 bags of shredded carrots (TOTALLY making your carrot cake jam as soon as I buy some more sugar!), 3 bags of apple slices, 2 containers of salsa that weren't even expired???, and…I think that's it lol. Thanks for letting me share!!!
Wahooo! Way to go Mika.
Thanks for sending in your pictures.
Just remember, the worst thing anyone can ever do is tell you no. So if this type of thing appeals to you, go for it. You'll never know unless you try.
HOLY CHICKENS!!!!! I am so happy for you.
I'm completely overwhelmed thinking about the fact that this (throwing away large quantities of edible food) is going on in nearly even grocery store across the country, every day.
And Mika, I see you have vintage Pyrex. I <3 Pyrex so much!
I HEART vintage pyrex and have a relatively large stash of it lol…that bowl and the others with that pattern are my all time favorite though. Loved that pattern since I was a little girl!
I post all my thrifty finds on my blog every week!
I have the same bowl! They're my favorites.
This is great, I am so happy that people are making the most of 'garbage'. I wish we were also allowed here to take them. Good for you Mika!
It is so heartening to hear that the grocery store let Mika and her family have this food, and so great that she is putting it to good use. Personally, I haven't talked to my local grocery stores yet – still getting up my nerve.
Thanks, Mavis and Mika, for sharing your wonderful bounty.
So who do i talk to? The produce man? the store manager? the checkout cashier?
I wish I knew where to go to do this. I don't think we can do this here in Portland, Or. I saw someone post that it goes to the Ore Food Bank a while back.
Sometimes I can get stuff at discounted prices at one of the farms here in town but I have to get there early to get the goods. I work in the mornings so sometimes I can't get there.
I think Portland is one of the most forward thinking cities out there. Here they can't give it to charities because they said they'll get sued. So ridiculous.
Safeway here used to have that policy. I'll have to check tomorrow.
But some of the restaurants in town give their extra food to the food bank.
Back in the 90's they passed a law (kind of like the Good Samaritan Act for first responders) that protects retailers and farmers from being sued when they give their leftover foods to charities. I think it was one of the few things that those on the Right and Left side of the political spectrum agreed upon. It's amazing that so many stores still use "we'll get sued" as an excuse. Totally awesome though that it worked out for you and your family to get all of this food!
Thanks for the photos! It really brings into perspective how much food this is.
I admire both of you for being such good stewards of these resources. It takes time and energy to process all those goodies- but is so worth it!!
Do you mind me asking what you said when you asked to get this food and which store it was for? I'd love to know how to do it!!
I told the produce manager I have chickens (which I do) and was curious what they did with their expired produce, as I'd love to have it to help our feed bill. He said they couldn't give it away because of Health Code reasons, but he thought that was a ridiculous policy so he made sure that all items were carefully set outside by the dumpster so he was "throwing it away" like he was supposed to, but if I were to come by and pick it up, no one would say a word. We chit chatted for a few minutes and that was that. He was VERY nice and I found I really shouldn't have been as nervous as I was! LOL!
That is so amazing that you got all of that food! What a blessing.
Seeing all those bananas, have you tried banana cake? Not bread, but cake. I love doing that, mostly because it makes use of the brown mushy bananas.
Less waste on the counter, more waist on me (sorry, really bad pun).
I JUST pinned Mavis' recipe she posted to try it!!!
I have a cousin who works in the office of a local grocery store. After reading this post about Minka and her free produce, I got up the guts to ask my cousin what their store does with the expired produce because I buy produce for my rabbit, tortoise and guinea pig each week. I was surprised when she said that they do give away some to customers who have birds, so she asked the produce guy for me and he said I can come in tomorrow morning and he'll give me some and see what I prefer to get IN THE FUTURE! YES!!
I am curious if people are getting this produce from local small grocery stores or big box stores like Raleys? I live in an area where there aren't any really small grocery stores, just mostly the big places. Has anyone tried those and had any success?
I got all this from a big chain store.


You look Beautiful! Good luck, Morgan!
You are an amazing young lady! Smart, beautiful and kindhearted! You make us so proud to know you. Good Luck sweetie!
What a remarkable young lady you've grown up to be. Good luck with the 2018 Miss Rodeo Wyoming contest! I know you will do an outstanding job representing Wyoming!
Good Luck Morgan! So excited to see you continuing to pursue your passions and dreams! Continue to shine and do great things! Sending well wishes from Colorado!
Best of luck to you, beautiful!


text:
Lisa Barnard (born 1967) is a documentary photographer, political artist, and a reader in photography at University of South Wales. She has published the books Chateau Despair (2012), Hyenas of the Battlefield, Machines in the Garden (2014) and The Canary and the Hammer (2019). Her work has been shown in a number of solo and group exhibitions and she is a recipient of the Albert Renger-Patzsch Award.

Life and work
Barnard graduated with a BA in Photography from the University of Brighton in 2005. She gained an MA in Photography with Critical Theory.

Her first book, Chateau Despair, explores the disused Conservative Campaign Headquarters of the UK Conservative Party at 32 Smith Square, Westminster, London – nicknamed Chateau Despair, the scene of many televised historic moments in Conservative history from Margaret Thatcher's victory rallies to Iain Duncan Smith's resignation. "Barnard's images speak of the fleeting nature of political power and the often makeshift working environments that lurk beyond the gaze of the TV camera or the official portrait." Chateau Despair was included in critic Sean O'Hagan's list of "The best independent photobooks of 2013" in The Guardian and New Statesman made it their Picture Book Of The Week.

In the group exhibition Theatres of War, curated by Mark Power in 2007, "Barnard documented the tragically tacky 'care packages' dispatched to American troops stationed abroad". Peter Conrad, reviewing the exhibition in The Guardian explained Barnard's photographs by asking "how can soldiers who ask their families to send them Beanie Babies and whoopee cushions hope to understand the gangs of Islamic insurgents they are fighting?".

Barnard's "complicated and intriguing multimedia project" Virtual Iraq "examines the use of interactive media by the US army to recruit, train and treat military personnel before and after they embark on a tour of duty to the Middle East. It [...] explores the relationship between the US army, virtual reality and the gaming industry" in their Flatworld project. Barnard filmed it at the Institute for Creative Technologies, "a research centre also funded by the military to create training applications using virtual reality in advanced technologies." Gordon MacDonald, reviewing Virtual Iraq in Photoworks Biannual, said "Barnard's project does not aim to direct you towards the ridiculous aspects of Flatworld or to point out the serious moral questions its existence raises. It achieves more than this by simply removing Flatworld from its context and holding all of its contradictions still to be viewed."

Her second book, Hyenas of the Battlefield, Machines in the Garden, examines the use of drones in the War on Terror.

Barnard was senior lecturer on documentary photography at University of South Wales, then a reader in photography there from 2017.

Publications by Barnard
Chateau Despair. London: Gost, 2012. . Essays by Sarah James ("Maggie and the Fairytale of the Free Market") and Jeremy Till ("Six Inches of Power"). Edition of 500 copies.
Hyenas of the Battlefield, Machines in the Garden. London: Gost, 2014. . Essays by Julian Stallabrass ("The Missile and the Paperclip") and Eugénie Shinkle ("Drone Aesthetics"). Edition of 750 copies.
The Canary and the Hammer. London: Mack, 2019. .

Publications with contributions by Barnard
Bringing the War Home. Bradford, England: Impressions Gallery, 2010. Foreword by Hilary Roberts, essay by Pippa Oldfield. Accompanied the exhibition Bringing the War Home.
9213. Brighton, England: University of Brighton, 2013. Edition of 300. Two books in a slipcase with work by 35 University of Brighton alumni in one and that of graduates of 2013 in the other.

Awards
2003: Winner, Daily Telegraph/Novartis Visions of Science award, People category.
2005: Runner-up, Photographer of the Year, Guardian Student Media Award.
2008: Danny Wilson Memorial Award, Brighton Photo Fringe, Brighton, England, for Virtual Iraq.
2012: Albert Renger-Patzsch Award 2012, Dietrich Oppenberg Foundation, Museum Folkwang, Essen, Germany. €25000 for her book Hyenas of the Battlefield, Machines in the Garden.
2015: First prize, Prestige Grant, Getty Images. USD$15000 for her Sweat of the Sun project.

Exhibitions

Solo exhibitions
2009: Virtual Iraq, Phoenix Place, Lewes, England. Part of Brighton Photo Fringe during Brighton Photo Biennial.
2010: Maggie, Coop building, Brighton Photo Fringe, Brighton, England. Shown during Brighton Photo Biennial alongside The Election Project by Simon Roberts.
 2014: Artist of the Day, selected by Simon Norfolk, Flowers Gallery, London.
2015: Hyenas of the Battlefield, Machines in the Garden, Grande Halle, Parc des Ateliers, Rencontres d'Arles, Arles, France, 6 July – 20 September 2015.

Collaborative exhibitions
2006: Permanent display of holograms of the Children's Laureates (Quentin Blake, Anne Fine, Michael Morpurgo and Jacqueline Wilson), Unicorn Theatre for Children, London. Collaboration with holographic artist Rob Munday.
2008: Once Upon a Moment in Time, University of Brighton, Brighton, England, 3 October – 16 November 2008. Collaboration with Annis Joslin.
2009: Polska by the Sea, Eastbourne train station, Eastbourne, England. Part of Eastbourne Festival 2009. Photographs by Barnard, text transcriptions of interviews by Mark Hewitt.

Group exhibitions
2007: Theatres of War, Kraków Month of Photography, Schindler Factory, Kraków, Poland. Curated by Mark Power. Also included photographs by Luc Delahaye, Geert van Kesteren, Christopher Stewart and Donovan Wylie.
2010: Bringing the War Home, Impressions Gallery, Bradford, England, 17 September – 14 November 2010. Curated by Pippa Oldfield. Also included photographs by Peter van Agtmael, Sama Alshaibi, Farhad Ahrarnia, Adam Broomberg & Oliver Chanarin, Edmund Clark, Kay May, Asef Ali Mohammad and Christopher Sims.
2011: Maggie, Photo50, London Art Fair, London. Curated by Celia Davis for Photoworks with David Spero.
2011: Collateral Damage, Look 11 photography festival, Liverpool. Curated by Paul Lowe and Harry Hardie. Included photographs from Barnard's Virtual Iraq as well as photographs by Mishka Henner, Simon Norfolk, Tim Hetherington, Ziyah Gafić, Paul Lowe, Edmund Clark, Ashley Gilbertson, Brett Van Ort, Adam Broomberg & Oliver Chanarin.
2011: XXI: Conflicts in a New Century, Oak Cliff Cultural Center, Dallas, TX. Co-curated by Charles Dee Mitchell and Cynthia Mulcahy with images by Barnard, Stephanie Sinclair, James Nachtwey, Chris Anderson, Jamel Shabazz, Eugene Richards, Christopher Morris, Lori Grinker, Rania Matar, Kael Alford and Thorne Anderson, Tim Hetherington, Gary Knight, Natan Dvir, Akintunde Akinleye, Guy Tillim and Fatagoma Silue.
2013: Engines of War, Gasser and Grunert, New York. Curated by Charles Dee Mitchell and Cynthia Mulcahy with images by Barnard, David Cotterrell, Jamel Shabazz, Benjamin Lowy, Ghaith Abdul-Ahad, Eugene Richards, Anthony Suau, Christopher Morris, Teun Voeten and Heather Ainsworth.
2015: Whiplash Transition, Exposure, Format International Photography Festival, Derby, UK, March–April 2015.

Notes

References

External links

'Study in blue: from Conservative party centre to Chateau Despair – in pictures'

Living people
1967 births
Welsh photographers
English women photographers
Political artists
20th-century British photographers
20th-century women photographers
20th-century English women
20th-century English people


text:
01480 416410 aburridge@nhs.net
HCCN – The Charity
Making Donations
HCCN Vacancies
What We Offer You
Marion's Blog
Ellington Drop In
Patient To Person
Sleep Course
Patients' Perspectives
HCCN Membership
Drop In & Meet Us
Meet The Nursing Team
Background and Development
History of The Organisation
Managing Cancer Positively
Cancer Management Appointment
Self managed care
End of treatment Q&A
Bowel Cancer Care
Late Effects of Cancer
The Cancer Carer
Benefits Guidance
Cancer Diet
Men, Cancer and Sexuality
Women, Cancer and Sexuality
Special Sexual Concerns with Cancer
Hunts Community Cancer Network Charity: Registered Charity No 1163051. HMRC registration reference EW23930
Working together with the nursing service, our aim is to help people who are recovering from or living with cancer in the Hunts area to take back control of their lives and play an active part in managing their health.
Our goal is to encourage a more objective view of cancer and to help people understand the trajectory of cancer is ever changing. Increasingly cancer can be lived with in the same way as other long-term conditions such as heart disease, diabetes and asthma, particularly when individuals are actively involved in managing their health.
There are 2 million people in England with a diagnosis of cancer. This number is likely to grow by more than 3% per year, reflecting the increasing incidence of cancer and better survival rates.
By 2030 there are likely to be around 4 million cancer survivors in UK.
Evidence shows that the current model of cancer follow-up is not meeting people's needs and will not cope if the number of people living with cancer increases at the expected rate.
While the NHS funds the nursing service through CCG funding (Clinical Commissioning Groups which replaced Primary Care Trusts), everyone involved in running the charity volunteers their time freely and we strive to keep our costs low.
Our Forthcoming AGM:
Our 2019 AGM is on 21st June, 11.45am to 13.00pm at the Holiday Inn, Huntingdon Racecourse, Media Room.
Please click on documents below:
TRUSTEE REPORT
Our Trustees:
Jan Davis – Chair of Trustees
Jan's career was spent as a senior Human Resources leader, specialising in developing managers in in complex, global environments. She has worked both in the UK and Internationally, mostly in oil, gas and mining companies. Taking early retirement, Jan set out to find worthwhile ways of giving back – as a park ranger on the South Downs, developing people policies at Gilbert White's house in Hampshire, and facilitating leadership development courses for a charitable trust in Windsor. Jan moved to East Northants in 2015 and reconnected with Susan – a lifelong friend and colleague from shared time in British Telecom. Jan was keen to get involved with HCCN as she could see that the charity made a real difference to people's lives. Jan brings to HCCN her experience of leading and implementing projects and programmes, and currently acts as Chair of HCCN.
Susan Moore – Trustee
Susan has had a varied career. She has worked as a progress chaser in a factory setting and then for the Birmingham Coroner before finally realising that her passion was people and her skill supporting their development.
After completing an MBA she joined British Telecom, initially to act as a management trainer but ultimately to work as a talent spotter and management development specialist identifying people with senior management capability and supporting their growth within the company.
She retired from full time working in 1999 and planned for a long and full retirement. However, in November 2010 she was diagnosed with an incurable rare blood cancer. As a result of this diagnosis she met Gini Melesi, a haematology specialist nurse, who was to go on to found Hunts Community Cancer Network. Liking the plan to support people long after treatment had ended and believing that her workplace experience could be valuable to the development of the project, they joined forces to create the charity.
Two such different personalities joined by a common aim they started to raise money to offer free support.
Today Susan acts as a Trustee of the charity and carries out the day to day management roles that are necessary to keep things running smoothly. Her development background allows her to work on the design of new activities and to plan events like conference. She often acts as spokesperson, along with colleagues.
The skills she uses most in support of the charity are her "can do" attitude; her ability to spot and nurture the good ideas that others bring and her determination that people know what's best for themselves but they just need a little help sometimes.
Amanda Orchard – Trustee
Amanda Orchard has worked for several years in the field of Marketing and Communications on consumer brands: She had headed up marketing teams in larger FMCG corporate businesses, where she has led teams working on brands such as Loyd Grossman sauces & Jeyes Fluid, involved with developing & leading strategic marketing plans on new product development programmes and large scale marketing campaigns involving TV and digital media.
She has also owned bridal shops & a local events business, driving the businesses forward locally, with a much envied reputation of quality and dedication.
She currently works as a marketing consultant on various national and international projects bringing her wealth of expertise and knowledge to different business environments.
She complements her busy working & family life, with some local volunteering & is chair of a local patient association as well as being a trustee on several other local community projects.
Amanda was keen to get involved with HCCN following a close friend's battle with cancer, where she could see that the charity made a real difference to peoples lives.
She's passionate about making a difference to people who are affected by cancer as it can affect anyone, at any age, & is driven to ensure everyone locally finds out how lucky we all are to have access to services provided by HCCN.
Karen Moseley – Lead Nurse & Trustee
Karen qualified as a nurse in 2000 and started her career on a busy medical ward before moving into Accident & Emergency. After a few years she took a leap and went to work in the community where she developed her skills and went on to study for her degree in Primary and Community care. She worked in the Huntingdon area as a District Nurse Sister and enjoyed this work. The GP practice approached her about working with them and she took the Lead Nurse post at a GP practice in Huntingdon and it was whilst here that she studied for her prescribing qualification. She worked at the practice for 9 years and during this time her personal life changed. Karen got married to Stuart in 2008 and now has 2 children Ava and Thomas. In her spare time she enjoys spending time with her family, running and attending the gym.
In 2015, Karen decided she needed a change and saw a job advertised to work with HCCN. She spoke to Gini Melesi, who was the Lead Nurse at that time and it was her passion and commitment to HCCN that spurred Karen on to apply for the job which she was successful for. Karen started working within the HCCN team as it was just being expanded after the Pilot stage. After Gini left to work for NHS England, Karen continued her work as Lead Nurse for the team.
The charity is governed as a Charitable Incorporated Organisation (CIO) meaning our wider membership (other than trustees) have voting rights, usually at the AGM. Our members contribute to the charity through their voluntary efforts and other contributions, often financial. Having people helped by the charity as members enables us to take account of their views. Member rights include the:
Power to select, appoint and remove the board of trustees, or parts of it
Control of changes in the constitution
Power to direct the board of trustees to do things
Become a HCCN Member
HCCN member benefits include regular newsletter to keep in contact, communication news and opportunities to get involved as well as conference participation. A well-maintained database is essential for good membership management. Data protection requirements mean we will ask you for permission to contact you, and to give your details to third parties. Our members typically are people affected by a cancer – either as patient, partner, carer or friend – who support our purpose. While having a large membership, the organisation is not seeking an unlimited membership. Members can be involved in the governance of the charity by taking an active part in selection and appointment of the trustees. Our members provide expertise and knowledge, funds, volunteer efforts and influence. And becoming a member is so easy. Just click on the button below and complete the form. There is no charge and, once approved, you have the right to vote at our AGM. Should you wish to resign your membership at any time just tell us in the same way.
Contact Us About HCCN – The Charity: You can email us on susan@hccnthecharity.org
Other pages in this section
Fundraising Pictures & Stories
Business Links & Support
Charity Vacancies
Keep up to date with the latest info from us
Help us continue to raise funds:
Help us raise funds whilst shopping: