text:
How a C++ compiler implements exception handling
One of the revolutionary features of C++ over traditional languages is its support for exception handling. It provides a very good alternative to traditional techniques of error handling which are often inadequate and error-prone. The clear separation between the normal code and the error handling code makes programs very neat and maintainable. This article discusses what it takes to implement exception handling by the compiler. General understanding of the exception handling mechanism and its syntax is assumed. I implemented exception handling library for VC++ that is accompanied with this article. To replace the exception handler provided by VC++ with my handler, call the following function:
After this point, any exception that occurs with in the program - from throwing an exception to stack unwinding, calling the catch block and then resuming the execution - is processed by my exception handling library.
The C++ standard, like any other feature in C++, doesn't say anything about how exception handling should be implemented. This means that every vendor is free to use any implementation as he sees fit. I will describe how VC++ implements this feature, but it should be a good study material for those as well who use other compilers or Operating Systems [1]. VC++ builds its exception handling support on top of structured exception handling (SEH) provided by Windows operating system [2].
Structure exception handling - Overview
For this discussion, I will consider exceptions to be those that are explicitly thrown or occur due to conditions like divide by zero or null pointer access. When exception occurs, interrupt is generated and control is transferred to the operating system. Operating System, in turn, calls the exception handler that inspects the function call sequence starting from the current function from where the exception originated, and performs its job of stack unwinding and control transfer. We can write our own exception handler and register it with the operating system that it would call in the event of an exception.
Windows defines a special structure for registration, called EXCEPTION_REGISTRATION
struct EXCEPTION_REGISTRATION
EXCEPTION_REGISTRATION *prev;
DWORD handler;
To register your own exception handler, create this structure and store its address at offset zero of the segment pointed to by FS register, as the following pseudo assembly language instruction shows:
mov FS:[0], exc_regp
prev field signifies linked list of EXCEPTION_REGISTRATION
structures. When we register EXCEPTION_REGISTRATION
structure, we store the address of the previously registered structure in prev field.
So how does the exception call back function look like? Windows requires that the signature of exception handler, defined in EXCPT.h, be like:
Collapse | Copy CodeEXCEPTION_DISPOSITION (*handler)( _EXCEPTION_RECORD *ExcRecord, void * EstablisherFrame, _CONTEXT *ContextRecord, void * DispatcherContext);
You can ignore all the parameters and return type for now. The following program registers exception handler with the Operating System and generates an exception by attempting to divide by zero. This exception is caught by the exception handler which does not do much. It just prints a message and exits.
Collapse | Copy Code#include <iostream>  #include <windows.h>  using std::cout; using std::endl; struct EXCEPTION_REGISTRATION { EXCEPTION_REGISTRATION *prev; DWORD handler; }; EXCEPTION_DISPOSITION myHandler( _EXCEPTION_RECORD *ExcRecord, void * EstablisherFrame, _CONTEXT *ContextRecord, void * DispatcherContext) { cout << "In the exception handler" << endl; cout << "Just a demo. exiting..." << endl; exit(0); return ExceptionContinueExecution; //will not reach here } int g_div = 0; void bar() { //initialize EXCEPTION_REGISTRATION structure EXCEPTION_REGISTRATION reg, *preg = ® reg.handler = (DWORD)myHandler; //get the current head of the exception handling chain DWORD prev; _asm { mov EAX, FS:[0] mov prev, EAX } reg.prev = (EXCEPTION_REGISTRATION*) prev; //register it! _asm { mov EAX, preg mov FS:[0], EAX } //generate the exception int j = 10 / g_div; //Exception. Divide by 0. } int main() { bar(); return 0; } /*-------output------------------- In the exception handler Just a demo. exiting... ---------------------------------*/
Please note that Windows strictly enforces one rule: EXCEPTION_REGISTRATION structure should be on the stack and it should be at a lower memory address than its previous node. Windows will terminate the process if it does not find such to be the case.
Functions and Stack
Stack is a contiguous area of memory which is used for storing local objects of a function. More specifically, each function has an associated stack frame that houses all the local objects of the function as well as any temporaries generated by the expressions with in the function. Please note that this is a typical picture. In reality, the compiler may store all or some of the objects in internal registers for faster access. Stack is a notion that is supported at the processor level. Processor provides internal registers and special instructions to manipulate it.
Figure 2 shows how a typical stack may look like when function foo calls function bar and bar calls function widget. Please note that in this case the stack grows downwards. This means that the next item to be pushed on the stack would be at lower memory address than the previous item.
The compiler uses EBP register to identify the current active stack frame. In current case, widget is being executed and as the figure shows, EBP register points at widget's stack frame. Function accesses its local objects relative to the frame pointer. The compiler resolves at compile time all the local object names to some fixed offset from frame pointer. For instance, widget would typically access its local variable as some fixed number of bytes below the frame pointer, say EBP-24.
The figure also shows the ESP register, stack pointer that points at the last item in the stack, or in current case, ESP points at the end of widget's frame. Next frame would be created after this location.
Processor supports two operations for the stack: push and pop. Consider:
pop EAX
means read 4 bytes from the location where ESP is pointing and increment (remember, stack grows downwards in our case) ESP by 4 (in 32 bit processors). Similarly,
push EBP
means decrement ESP by 4 and then write the contents of EBP register at the location where ESP is pointing.
When compiler compiles a function, it adds some code in the beginning of the function called prologue that creates and initializes the stack frame of the function. Similarly, it adds code at the end of the function called epilogue to pop the stack frame of the exiting function.
Compiler typically generates the following sequence for the prologue:
Collapse | Copy CodePush EBP ; save current frame pointer on stack Mov EBP, ESP ; Activate the new frame Sub ESP, 10 ; Subtract. Set ESP at the end of the frame
The first statement saves the current frame pointer EBP on the stack. The second statement activates the frame for the callee by setting EBP register at the location where it stored the EBP of the caller. And the third statement sets the ESP register at the end of the current frame by subtracting ESP's value with the total size of all the local objects and the temporaries that the function will create. Compiler knows at compile time the type and size of all the local objects of a function, so it effectively knows the frame size.
The epilogue does the reverse of the prologue, It has to remove the current frame from the stack:
Collapse | Copy CodeMov ESP, EBP Pop EBP ; activate caller's frame Ret ; return to the caller
It sets ESP at the location where its caller's frame pointer is saved (which is at the location where callee's frame pointer points), pops it off in EBP thus activating its caller's stack frame and then executes return.
When processor encounters return instruction, it does the following: it pops off the return address from the stack and transfer's control at that address. The return address was put on the stack when its caller executed call instruction to call it. Call instruction first pushes the address of the next instruction where control should be returned and then jumps to the beginning of the callee. Figure 3 shows a more detailed view of the stack at runtime. As the figure shows, function parameters are also part of the stack frame of the function. The caller pushes callee's arguments on the stack. When the function returns, the caller removes the callee's arguments from the stack by adding the size of the arguments to the ESP which is known at compile time:
Add ESP, args_size
Alternatively, callee can also remove the parameters by specifying the total parameter size in return instruction which again is known at compile time. The instruction below removes 24 bytes from the stack before returning to the caller, assuming total parameter size is 24:
Ret 24
Only one of these schemes is used at a time depending upon callee's calling convention. Please note that every thread in a process has its own associated stack.
C++ and Exceptions
Recall that I had talked about EXCEPTION_REGISTRATION
structure in the first section. It is used to register the exception callback with the operating system that it calls when exception occurs.
VC++ extends the semantics of this function by adding two more fields at the end:
Collapse | Copy Codestruct EXCEPTION_REGISTRATION { EXCEPTION_REGISTRATION *prev; DWORD handler; int id; DWORD ebp; };
VC++, with few exceptions, creates EXCEPTION_REGISTRATION
structure for every function as its local variable [3]. The last field of the structure overlaps the location where frame pointer EBP points. Function's prologue creates this structure on its stack frame and registers it with the operating system. The epilogue restores theEXCEPTION_REGISTRATION
of the caller. I will discuss the significance of the id field in the next sections.
When VC++ compiles a function, it generates two set of data for the function:
a) Exception callback function.
b) A data structure that contains important information about the function like the catch blocks, their addresses, the type of exception they are interested in catching etc. I will refer to this structure as funcinfo
and talk more about it in the next section.
Figure 4 shows a broader picture of how things look like at runtime when considering exception handling. Widget's exception callback is at the head of the exception chain pointed to by FS:[0] (which was set by widget's prologue). Exception handler passes widget's funcinfo
structure's address to __CxxFrameHandler
function, which inspects this data structure to see if there is any catch block in the function interested in catching the current exception. If it does not find any, it returns ExceptionContinueSearch
value back to the operating system. Operating system gets the next node off the exception handling list and calls its exception handler (which is the handler for the caller of the current function).
This continues until the exception handler finds the catch block interested in catching the exception in which case it does not return back to the operating system. But before it calls the catch block (it knows the address of the catch block from funcinfo
structure, see figure 4), it must perform stack unwinding: cleaning up the stack frames of the functions below this function's frame. Cleaning of the stack frame involves nice little intricacy: The exception handler must find all the local objects of the function alive on the frame at the time of the exception and call their destructors. I will discuss more about it in a later section.
The exception handler delegates the task of cleaning the frame to the exception handler associated with that frame. It starts from the beginning of the exception handling list pointed to by FS:[0] and calls the exception handler at each node, telling it that the stack is being unwound. In response, the handler calls destructor for all the local objects on the frame and returns. This continues until it arrives at the node that corresponds to itself.
Since catch block is part of a function, it uses the stack frame of the function to which it belongs. Hence the exception handler needs to activate its stack frame before calling the catch block. Secondly, every catch block accepts exactly one parameter, its type being the type of exception it is willing to catch. Exception handler should copy the exception object or its reference to catch block's frame. It knows where to copy the exception from funcinfo
structure. The compiler is generous enough to generate this information for it.
After copying the exception and activating the frame, exception handler calls the catch block. Catch block returns it the address where control should be transferred in the function after try-catch block. Please note that at this moment, even though the stack unwinding has occurred and frames have been cleaned up, they have not been removed and they still physically occupy the space on the stack. This is because the exception handler is still executing and like any other normal function, it also uses the stack for its local objects, its frame present below the last function's frame from where the exception originated. When catch block returns it needs to destroy the exception. It is after this point that the exception handler removes all the frames including its own by setting the ESP at the end of the function's frame (to which it has to transfer the control) and transfers control at the end of try-catch block. How does it know where the end of function's frame is? It has no way of knowing. That's why the compiler saves it (through function's prologue) on function's stack frame for the exception handler to find it. See figure 4. It is sixteen bytes below the stack frame pointer EBP.
The catch block may itself throw a new exception or rethrow the same exception. Exception handler has to watch for this situation and take appropriate action. If catch block throws a new exception, the exception handler has to destroy the old exception. If catch block specifies a rethrow, then the exception handler has to propagate the old exception.
There is one important point to note here: Since every thread has its own stack, this means that every thread has its own list of EXCEPTION_REGISTRATION structures pointed to by FS:[0].
C++ and Exceptions - 2
Figure 5 shows the layout of funcinfo
structure. Please note that the names may vary from the actual names used by VC++ compiler and I have only shown the relevant fields. Structure of unwind table is discussed in the next section.
When exception handler has to search for a catch block in a function, the first thing it has to determine is whether the point from where the exception originated from within a function has an enclosing try block or not. If it does not find any try block, then it returns back. Otherwise, it searches the list of catch blocks associated with the enclosing try block.
First, let's see how it goes about finding the try block. At compile time, the compiler assigns each try block a start id and end id. These id's are also accessible to exception handler through funcinfo structure. See > figure 5. The compiler generates tryblock data structure for each try block with in the function.
In the previous section, I had talked about VC++ extending the EXCEPTION_REGISTRATION
structure to include id field. Recall, this structure is present on function's stack frame. See figure 4. At the time of exception, the exception handler reads this id from the frame and checks the tryblock structure to see if the id is equal to or falls in between its start id and end id. If it does, then the exception originated from with in this try block. Otherwise, it looks at the next tryblock structure in tryblocktable.
Who writes the id value on the stack and what should be written there? The compiler adds statements in the function at various points that update id value to reflect the current runtime state. For instance, the compiler will add a statement in the function at the point where try block is entered that will write the start id of the try block on the stack frame.
Once exception handler finds the try block, it can traverse the catchblock table associated with the try block to see if any catch block is interested in catching the exception. Please note that in case of nested try blocks, the exception that originated from inner try block also originated from outer try block. The exception handler should first look for the catch blocks for the inner try block. If none is found, then it looks for the catch blocks of the outer try block. While laying the structures in tryblock table, VC++ puts inner try block structure before the outer try block.
How is the exception handler going to determine (from catchblock structure) if a catch block is interested in catching the current exception? It does so by comparing the type of the exception with the type of the catch block's parameter. Consider:
Collapse | Copy Codevoid foo() { try { throw E(); } catch(H) { //. } }
The catch block catches the exception if H and E are the exact same type. The exception handler has to compare the types at runtime. Normally, languages like C provide no facility to determine object's type at runtime. C++ provides run time type identification mechanism (RTTI) and has a standard way of comparing types at runtime. It defines a classtype_info
, defined in standard header <typeinfo>
that represents a type at runtime. The second field of the catchblock structure (see figure 5) is a pointer to the type_info
structure that represents the type of the catch block's parameter at runtime. type_info
has operator ==
that tells whether the two types are of exact same class or not. So, all the exception handler has to do is to compare (call operator ==
) the type_info
of the catch block's parameter (available through catchblock structure) with the type_info
of the exception to determine if the catch block is interested in catching the current exception.
The exception handler knows about the type of the catch block's parameter from funcinfo
structure, but how does it know about the type_info
of the exception? When compiler encounters a statement like
throw E();
It generates excpt_info
strcuture for the exception thrown. See figure 6. Please note that the names may vary from the actual names used by VC++ compiler and I have only shown the relevant fields. As shown in the figure, exception'stype_info
is available through excpt_info
structure. At some point of time, exception handler needs to destroy the exception (after the catch block is invoked). It may also need to copy the exception (before invoking the catch block). To help exception handler do these tasks, compiler makes available exception's destructor, copy constructor and size to the exception handler through excpt_info
If the catch block's parameter type is a base class and the exception is its derived class, the exception handler should still invoke that catch block. However, comparing the typeinfo's of the two in this case would yield false as they are not the same type. Neither does class type_info
provide any member function or operator that tells if one class is base class of the other. And yet, the exception handler has to invoke this catch block. To help it do so, the compiler has generated more information for the handler. If the exception is a derived class, then etypeinfo_table
(available through excpt_info
structure) contains etype_info
(extended type_info, my name) pointer for all the classes in the hierarchy. So the exception handler compares the type_info
of the catch block's parameter with all the type_info's available through the excpt_info
structure. If any match is found then the catch block will be invoked.
Before I wrap up this section, one last point: How does the exception handler become aware of the exception and the excpt_info structure? I will attempt to answer this question in the following discussion.
VC++ translates throw statement into something like:
Collapse | Copy Code//throw E(); //compiler generates excpt_info structure for E. E e = E(); //create exception on the stack _CxxThrowException(&e, E_EXCPT_INFO_ADDR);
passes control to the operating system (through software interrupt, see functionRaiseException
) passing it both of its parameters. The operating system packages these two parameters in_EXCEPTION_RECORD
structure in its preparation to call the exception callback. It starts from the head of theEXCEPTION_REGISTRATION
list pointed to by FS:[0] and calls the exception handler at that node. The pointer to thisEXCEPTION_REGISTRATION
is also the second parameter of the exception handler. Recall that in VC++, every function creates its own EXCEPTION_REGISTRATION
on its stack frame and registers it. Passing the second parameter to the exception handler makes important information available to it like EXCEPTION_REGISTRATION's id field (important for finding the catch block). It also makes the exception handler aware of the function's stack frame (useful for cleaning the stack frame) and the position of the EXCEPTION_REGISTRATION
node on the exception list (useful for stack unwinding). The first parameter is the pointer to the _EXCEPTION_RECORD
structure through which the exception pointer and its excpt_info
structure is available. The signature of the exception handler defined in EXCPT.H is:
EXCEPTION_DISPOSITION (*handler)( _EXCEPTION_RECORD *ExcRecord, void * EstablisherFrame, _CONTEXT *ContextRecord, void * DispatcherContext);
You can ignore the last two parameters. The return type is an enumeration (see EXCPT.H). As I discussed before, if the exception handler cannot find catch block, it returns ExceptionContinueSearch
value back to the system. For this discussion, other values are not important. _EXCEPTION_RECORD
structure is defined in WINNT.H as:
struct _EXCEPTION_RECORD { DWORD ExceptionCode; DWORD ExceptionFlags; _EXCEPTION_RECORD *ExcRecord; PVOID ExceptionAddress; DWORD NumberParameters; DWORD ExceptionInformation[15]; } EXCEPTION_RECORD;
The number and kind of entries in the ExceptionInformation
array depends upon the ExceptionCode
field. If theExceptionCode
represents C++ (Exception code is 0xe06d7363) exception (which will be the case if the exception occurs due to throw), then ExceptionInformation
array contains pointer to the exception and the excpt_info
structure. For other kind of exceptions, it almost never has any entry. Other kind of exceptions can be divide by zero, access violation etc and their values can be found in WINNT.H.
Exception handler looks at the ExceptionFlags
field of the _EXCEPTION_RECORD
structure to determine what action to take. If the value is EH_UNWINDING
(defined in Except.inc), that is an indication to the exception handler that the stack is being unwound and it should clean its stack frame and return. Cleaning up involves finding all the local objects alive on the frame at the time of the exception and calling their destructors. The next section discusses this. Otherwise, exception handler has to search for the catch block in the function and invoke it if it is found.
Stack Frame Cleanup
C++ standard says that when the stack is being unwound, destructor for all the local objects alive at the time of exception should be called. Consider:
Collapse | Copy Codeint g_i = 0; void foo() { T o1, o2; { T o3; } 10/g_i; //exception occurs here T o4; //... }
When exception occurs, local objects o1 and o2 exists on foo's frame while o3 has completed its lifetime. O4 was never created. Exception handler should be aware of this fact and should call destructor for o1 and o2.
As I wrote before, the compiler adds code to the function at various special points that register the current runtime state of the function as execution proceeds. It assigns id's to these special regions in the function. For instance, try block entry point is a special region. As discussed before, the compiler will add statement in the function at the point when try block is entered that will write the start id of the try block on function's frame.
The other special region in the function is where the local object is created or destroyed. In other words, the compiler assigns each local object a unique id. When compiler encounters object definition like:
Collapse | Copy Codevoid foo() { T t1; //. }
It adds statement after the definition (after the point when object will be created) to write its id value on the frame:
Collapse | Copy Codevoid foo() { T t1; _id = t1_id; //statement added by the compiler //. }
The compiler creates a hidden local variable (designated in the above code as _id) that overlaps with the id
field of theEXCEPTION_REGISTRATION
structure. Similarly, it adds statement before calling the destructor for the object to write the id of the previous region.
When exception handler has to clean up the frame, it reads the id value from the frame (id
field of theEXCEPTION_REGISTRATION
structure or 4 bytes below the frame pointer, EBP). This id is an indication that the code in the function up to the point to which current id corresponds executed without any exception. All the objects above this point were created. Destructors for all or some of the objects above this point need to be called. Please note that some of these objects may have been destroyed if they are part of a sub block. Destructor for these should not be called.
Compiler generates yet another data structure for the function, unwindtable
(my name), which is an array of unwind structures. This table is available through funcinfo structure. See figure 5. For every special region in the function, there is one unwind structure. The structure entries appear in the unwindtable in the same order as their corresponding regions appear in the function. unwind structure corresponding to objects is of interest (remember, each object definition denotes special region and has id associated with it). It contains information to destroy the object. When compiler encounters object definition, it generates a short routine that knows about the object's address on the frame (or its offset from the frame pointer) and destroys this object. One of the fields of unwind structure contains the address of this routine:
typedef void (*CLEANUP_FUNC)(); struct unwind { int prev; CLEANUP_FUNC cf; };
unwind structure for try block has a value of zero for the second field. prev field signifies that the unwintable is also a linked list of unwind structures. When exception handler has to cleanup the frame, it reads the current id from the frame and uses it as an index into the unwind table. It reads the unwind structure at that index and calls the clean up function as specified by the second field of the structure. This destroys the object corressponding to this id. The handler then reads the previous unwind structure from unwind table at an index as specified by prev field. This continues until end of list is reached (prev is -1). Figure 7 shows how a unwind table may look like for the function in the figure.
Consider case of the new operator:
T* p = new T();
The system first allocates memory for T and then calls the constructor. If constructor throws an exception, then the system must free up the memory allocated for this object. To achieve this, VC++ also assigns id to each new operator for a type that has a non-trivial constructor. There is corresponding entry in the unwind table, the cleanup routine frees the space allocated. Before calling the constructor, it stores id for the allocation in EXCEPTION_REGISTRATION
structure. After constructor returns successfully, it restores the id of the previous special region.
Furthermore, the object may have been partially constructed when the constructor throws exception. If it has member sub objects or base class sub objects and some of them had been constructed at the time of exception, destructor for those objects must be called. Compiler generates same set of data for a constructor as for any normal function to perform these tasks.
Please note that the exception handler calls the user-defined destructors while unwinding the stack. It is possible for the destructor to throw an exception. The C++ standard says that while the stack is unwinding, the destructor may not throw an exception. If it does, the system calls std::terminate.
This section talks about three topics that have not been discussed above:
a) Installing the exception handler.
b) Catch block rethrowing the exception or throwing a new exception.
c) Per thread exception handling support.
Please look at the Readme.txt file in the source distribution for build instructions [1]. It also includes a demo project.
The first task is to install the exception handling library, or in other words, replace the library provided by VC++. From the above discussion, it is clear that VC++ provides __CxxFrameHandler
function that is the entry point for the all the exceptions. For each function, the compiler generates exception handling routine that is called if the exception occurs with in this function. This routine passes funcinfo pointer to the __CxxFrameHandler
function inserts code at the beginning of __CxxFrameHandler
that jumps tomy_exc_handler()
. But __CxxFrameHandler
resides in readonly code page. Any attempt to write to it would cause access violation. So the first step is to change the access of the page to read-write using VirtualProtectEx
function provided by Windows API. After writing to the memory, we restore the old protection of the page. The function writes the contents of jmp_instr structure at the beginning of __CxxFrameHandler
//install_my_handler.cpp #include <windows.h>  #include "install_my_handler.h"  //C++'s default exception handler extern "C" EXCEPTION_DISPOSITION __CxxFrameHandler( struct _EXCEPTION_RECORD *ExceptionRecord, void * EstablisherFrame, struct _CONTEXT *ContextRecord, void * DispatcherContext ); namespace { char cpp_handler_instructions[5]; bool saved_handler_instructions = false; } namespace my_handler { //Exception handler that replaces C++'s default handler. EXCEPTION_DISPOSITION my_exc_handler( struct _EXCEPTION_RECORD *ExceptionRecord, void * EstablisherFrame, struct _CONTEXT *ContextRecord, void * DispatcherContext ) throw(); #pragma pack(1) struct jmp_instr { unsigned char jmp; DWORD offset; }; #pragma pack() bool WriteMemory(void * loc, void * buffer, int size) { HANDLE hProcess = GetCurrentProcess(); //change the protection of pages containing range of memory //[loc, loc+size] to READ WRITE DWORD old_protection; BOOL ret; ret = VirtualProtectEx(hProcess, loc, size, PAGE_READWRITE, &old_protection); if(ret == FALSE) return false; ret = WriteProcessMemory(hProcess, loc, buffer, size, NULL); //restore old protection DWORD o2; VirtualProtectEx(hProcess, loc, size, old_protection, &o2); return (ret == TRUE); } bool ReadMemory(void *loc, void *buffer, DWORD size) { HANDLE hProcess = GetCurrentProcess(); DWORD bytes_read = 0; BOOL ret; ret = ReadProcessMemory(hProcess, loc, buffer, size, &bytes_read); return (ret == TRUE && bytes_read == size); } bool install_my_handler() { void * my_hdlr = my_exc_handler; void * cpp_hdlr = __CxxFrameHandler; jmp_instr jmp_my_hdlr; jmp_my_hdlr.jmp = 0xE9; //We actually calculate the offset from __CxxFrameHandler+5 //as the jmp instruction is 5 byte length. jmp_my_hdlr.offset = reinterpret_cast<char*>(my_hdlr) - (reinterpret_cast<char*>(cpp_hdlr) + 5); if(!saved_handler_instructions) { if(!ReadMemory(cpp_hdlr, cpp_handler_instructions, sizeof(cpp_handler_instructions))) return false; saved_handler_instructions = true; } return WriteMemory(cpp_hdlr, &jmp_my_hdlr, sizeof(jmp_my_hdlr)); } bool restore_cpp_handler() { if(!saved_handler_instructions) return false; else { void *loc = __CxxFrameHandler; return WriteMemory(loc, cpp_handler_instructions, sizeof(cpp_handler_instructions)); } } }
The #pragma pack(1)
directive at the definition of jmp_instr
structure tells the compiler to layout the members of the structure without any padding between them. Without this directive, size of this structure is eight bytes. It is five bytes when we define this directive.
Going back to exception handling, when the exception handler calls the catch block, the catch block may rethrow the exception or throw a completely new exception. If catch block throws a new exception, then the exception handler has to destroy the previous exception before moving ahead. If the catch block decides to rethrow, the exception handler has to propagate the current exception. At this moment, the exception handler has to tackle with two questions: how does the exception handler know that the exception originated from with in a catch block and how does it keep track of the old exception? The way I solved this problem is that before the handler calls the catch block, it stores the current exception in exception_storage
object and registers a special purpose exception handler, catch_block_protector. The exception_storage object is available by calling get_exception_storage()
exception_storage* p = get_exception_storage(); p->set(pexc, pexc_info); register catch_block_protector call catch block //....
If exception is (re)thrown from within a catch block, the control goes to catch_block_protector. Now this function can extract the previous exception from exception_storage object and destroy it if catch block threw new exception. If the catch block did a rethrow (which it can find out by inspecting first two entries of ExceptionInformation
array, both are zero. See code below), then the handler needs to propagate the current exception by copying it inExceptionInformation
array. The following snippet shows catch_block_protector()
//------------------------------------------------------------------- // If this handler is calles, exception was (re)thrown from catch // block. The exception handler (my_handler) registers this // handler before calling the catch block. Its job is to determine // if the catch block threw new exception or did a rethrow. If // catch block threw a new exception, then it should destroy the // previous exception object that was passed to the catch block. If // the catch block did a rethrow, then this handler should retrieve // the original exception and save in ExceptionRecord for the // exception handlers to use it. //------------------------------------------------------------------- EXCEPTION_DISPOSITION catch_block_protector( _EXCEPTION_RECORD *ExceptionRecord, void * EstablisherFrame, struct _CONTEXT *ContextRecord, void * DispatcherContext ) throw() { EXCEPTION_REGISTRATION *pFrame; pFrame = reinterpret_cast<EXCEPTION_REGISTRATION*> (EstablisherFrame);if(!(ExceptionRecord->ExceptionFlags & ( _EXCEPTION_UNWINDING | _EXCEPTION_EXIT_UNWIND))) { void *pcur_exc = 0, *pprev_exc = 0; const excpt_info *pexc_info = 0, *pprev_excinfo = 0; exception_storage *p = get_exception_storage(); pprev_exc= p->get_exception(); pprev_excinfo= p->get_exception_info();p->set(0, 0); bool cpp_exc = ExceptionRecord->ExceptionCode == MS_CPP_EXC; get_exception(ExceptionRecord, &pcur_exc); get_excpt_info(ExceptionRecord, &pexc_info); if(cpp_exc && 0 == pcur_exc && 0 == pexc_info) //rethrow {ExceptionRecord->ExceptionInformation[1] = reinterpret_cast<DWORD> (pprev_exc);ExceptionRecord->ExceptionInformation[2] = reinterpret_cast<DWORD>(pprev_excinfo); } else { exception_helper::destroy(pprev_exc, pprev_excinfo); } } return ExceptionContinueSearch; }
Consider one possible implementation of get_exception_storage() function:
Collapse | Copy Codeexception_storage* get_exception_storage() { static exception_storage es; return &es; }
This would be a perfect implementation except in a multithreaded world. Consider more than one thread getting hold of this object and trying to store exception object in it. This will be disasterous. Every thread has its own stack and own exception handling chain. What we need is a thread specific exception_storage object. Every thread has its own object which is created when the thread begins its life and destroyed when the threads ends. Windows provides thread local storage for this purpose. Thread local storage enables each object to have its own private copy of an object accesible through a global key. It provides TLSGetValue()
and TLSSetValue()
functions for this purpose.
Excptstorage.cpp file defines get_exception_storage()
function. This file is built as a DLL. This is due to the fact that it enables us to know whenever a thread is created or destroyed. Every time a thread is created or destroyed, Windows calls every DLL's (that is loaded in this process's address space) DllMain()
function. This function is called in the thread that is created. This gives us a chance to initialize thread specific data, exception_storage
object in our case.
//excptstorage.cpp #include "excptstorage.h"  #include <windows.h>  namespace { DWORD dwstorage; } namespace my_handler { __declspec(dllexport) exception_storage* get_exception_storage() throw() { void *p = TlsGetValue(dwstorage); return reinterpret_cast<exception_storage*>(p); } } BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved ) { using my_handler::exception_storage; exception_storage *p; switch(ul_reason_for_call) { case DLL_PROCESS_ATTACH: //For the first main thread, this case also contains implicit //DLL_THREAD_ATTACH, hence there is no DLL_THREAD_ATTACH for //the first main thread. dwstorage = TlsAlloc(); if(-1 == dwstorage) return FALSE; p = new exception_storage(); TlsSetValue(dwstorage, p); break; case DLL_THREAD_ATTACH: p = new exception_storage(); TlsSetValue(dwstorage, p); break; case DLL_THREAD_DETACH: p = my_handler::get_exception_storage(); delete p; break; case DLL_PROCESS_DETACH: p = my_handler::get_exception_storage(); delete p; break; } return TRUE; }
As discussed above, the C++ compiler and the runtime exception library, with support from the Operating System, cooperate to perform exception handling.
Notes and References
- As of this discussion, Visual Studio 7.0 is released. I compiled and tested the exception handling library primarily with VC++ 6.0 on Windows 2000 running on pentium processors. I also tested it with VC++ 5.0 and VC++ 7.0 beta release. There is small difference between 6.0 and 7.0. 6.0 first copies the exception (or its reference) on catch block's frame and then performs stack unwinding before calling the catch block. 7.0 library first performs stack unwinding. The behavior of my library is similar to 6.0 library in this respect.
- See excellent article on MSDN by Matt Pietrek on structured exception handling.
- The compiler may not generate any exception related data for a function that does not have a try block and does not define any object that has a non-trivial destructor.


text:
2. Coral & Lavender- My favorite Color Combo for sure!! Ranging from different shades and hues of the two colors are completely acceptable and recommended! I've loved both colors throughout my life and found out recently combining the two is pure magic!!
3. Skirts & Dresses Please!- I am a huge fan of skirts and dresses for the simple fact that you can walk around in them freely! The only pants I ever wear are jeans. But my legs are more comfortable in the latter for sure!
4. Skydiving- My junior year of college I took the plunge and went skydiving!! Best adrenaline rush ever!! There's nothing else like it and you just can't explain the experience...MUST DO! PERIOD!
5. Movies Alone- I'm that girl who goes to the movies by herself. Silly to most, lame to others..I know. Sometimes I go solo because nobody else can go or just because I want that time to think and be entertained by myself. I am a strong believer in doing certain things all on my own. Who says you can't be entertained in a theater by yourself? And more times than none I grab my favorite theater treat: buttered popcorn, raisinete's and Cherry Coke!!
6. No Picky Eater Here!- I can say without a doubt that I like every kind of food there is. If I don't, I want to fight the pickiness and try it til I like it! haha I'm sure glad I sucked it up because I can't see how I ever lived without guacamole, blue cheese, olives and brussels sprouts!
7. Closet Singer- I love to sing! A LOT! Not for the sound of the voice but the feelings I get and the stress I relieve when I sing. I've played around and recorded on tapes since I was 12. Since then, I've sang at an open mic show and my sisters wedding. Other than that, if I know you, you probably won't hear me sing. Unless you're lucky. I'm incredibly shy when singing in front of people I know. So secretly in my room and driving in my car are the only places my music glands will ever let loose!
(Come up with 7 things about yourself that someone might not know about you and then send the award along to your favorite 3 Stylish Bloggers!)

subset: commoncrawl


text: Entropy House Productions brings to the big screen epic adventure as it has never been presented before. Come with us on a quest to defeat darkness, to save the world from the menace of unsleeping evil. The Dark Lord Sauron needs but a trifle, a golden ring, to fold Middle-Earth into eternal night. It is given to one small person, Frodo of the Shire, to carry the Ring through many perils to destroy it in the fires of Mount Doom… All content © 2002 Entropy House, except of course any characters and concepts that may be the intellectual property of the Tolkien estate or Peter Jackson, New Line, and co., or assorted other geniuses over the ages, hopefully none of whom will sue us for our humble parody. Peeps are a product of Just Born. Dedicated to author Helen Cresswell, whose Bagthorpes encouraged us to always go overboard. |


text:
A few changes are planned for Oracle Application Express 5.0.
Beginning with Oracle Application Express 5.0, the minimum database version for Oracle Application Express will be Oracle Database 18.104.22.168. Extended Support for Oracle Database 18.104.22.168 ends in August 2015, per the Lifetime Support Policy, and while only roughly 10% of our APEX customers are still using Oracle Database 11.1, this is still considered a supported product for those customers on Extended Support.
Also beginning with Oracle Application Express 5.0, running APEX-built applications using Internet Explorer 6 will no longer be supported. This was primarily precipitated by the inclusion of jQuery UI 1.10.3 in Oracle Application Express 5.0, but quite honestly, the rest of the world is moving on, and so must Oracle Application Express.
We are also considering dropping support for Internet Explorer 7 to develop applications in the Application Builder, but this is still being evaluated and no final determination has been made. Feel free to sound off if you believe this would cause you or your customers any significant pain.


text:
Press release Utrecht University - May 2, 2013
Insect numbers have been declining in recent years. Research by Utrecht University has found a link between the super insecticide imidacloprid and a decline in abundance of insects and other invertebrates in surface-water. Scientists are ringing international alarm bells. "Stricter standards alone are not enough. This insecticide is so harmful and remains in the environment for so long that an international ban is definitely warranted."
Insecticide impacts on surface waters
In just over ten years, imidacloprid has become the most widely used insecticide in the world. Some 20,000 tons are produced annually and used on agricultural land and gardens to combat pests and insects that transmit plant diseases. However, the insecticide is used so widely, leaches so easily and is so poisonous and broad-acting that its lethal effect is not restricted to pests in fields and gardens. Research by Utrecht University's Copernicus Institute of Sustainable Development has found the use of imidacloprid to have a highly adverse impact on insect abundance in and around surface waters.
Smartly combining monitoring data
Utrecht University scientists were the first to combine two long-term sets of monitoring data in a smart way to study the impact of imidacloprid on aquatic life in Dutch surface-water. As Jeroen van der Sluijs explains, "We see a strong link between situations in which imidacloprid levels in surface water exceed the standards and reduced abundance of aquatic insects." The pesticide was found to have adverse effects on surface-water ecosystems. The concentration of imidacloprid in the water was too high in almost half the sites monitored in the Netherlands in the past eight years. "On average we found three times less invertebrates in these locations than in water that meets the standard."
International ban
The ecological impacts of imidacloprid have led to wide-ranging debates in many other European countries, as well as in the US and Japan, where a possible ban on neonicotiniode insecticides is being discussed. Europe decided earlier this week to restrict its use in crops attractive to bees. As Van der Sluijs explains, "We hope that the clear and convincing evidence that our study provides promotes the insight that this far too broad-acting poison is severely affecting our planet's insect wealth. We are risking far too much to combat a few insect pests that might threaten agriculture. That is why this substance should be phased out internationally as soon as possible."
The paper written by Tessa van Dijk, Marja van Staalduinen and Jeroen van der Sluijs on their research has been published in PLOS ONE. The research was financed by a grant from the Triodos Foundation, which has set up a special fund for independent research on this controversial group of insecticides.
More information
• Jeroen van der Sluijs
• Powerpoint presentation of key findings
• Read the PLOS ONE article online


text:
Big Mac Index 2011
Big Mac Index 2011
The Big Mac Index 2011 is a simple economic measure used to provide a view into the extent by which currencies are under or overvalued. The Big Mac Index 2011 provided on this page was calculated for the year 2011.
How the Big Mac Index 2011 works
The Big Mac index 2011 shows how much currencies have deviated in 2011 from their true values. The Big Mac Index 2011 is based on the principle of the Law of One Price and relates to the theory of the Purchasing Power Parity. Based on the Law of One Price, identical goods sold in two markets should sell for the same price. That being said, the "goods sold" in the case of the Big Mac Index 2011 is a single product, the Mc Donald's Big Mac hamburger.
The Purchasing Power Parity (= the exchange rate that equates the price of a Big Mac in two countries) is calculated by comparing the price of a Big Mac sold in the foreign country and expressed in local currency to the price of a Big Mac in US dollars sold in the USA.
The base point of the 2011 Big Mac Index model is the US dollar. After converting the price of a Big Mac sold in the foreign country to the USA dollar (using the actual USA dollar exchange rate), we can determine the extent to which the USA dollar is undervalued or overvalued.
More information about how the Big Mac index is calculated (including the formula that you can use to calculate the values) can be found here: Big Mac Index.
The Big Mac Index 2011 XLS
The Big Mac Index 2011 estimate is available in two formats. You can find the Big Mac Index 2011 table below, or as a courtesy to our visitors, Maxi-Pedia also provides an estimate of the 2011 Big Mac Index in Excel (XLS) format. Big Mac Index 2011 values in XLS Excel spreadsheet can be downloaded here: Big Mac Index 2011 XLS. (Right click - Save Target As - save the XML file - open the XML file in Excel)The Big Mac Index 2011
The following table provides the Big Mac Index values for the year 2011.
The base point for the calculations is the US dollar.
With the introduction of the McWrap product into the Mc Donalds portfolio, the McWrap being the more luxurious product, hopefuly we also might be able to calculate the Lorenz Curve, the Gini Coefficient, and the Robin Hood Index next year (measures of relative inequality).
Older Big Mac Index values
Big Mac Index 2010
Big Mac Index 2009
Big Mac Index 2008
Older values and more details can be found here: Big Mac Index
It is easy, just include the code provided below into your HTML code.


text:
Which types of Microphone Are Used with PA systems?
It is often taught that "sound is vibrations in the air." We are able to enjoy music because we sense these vibrations in the air as sound.
Microphones convert these vibrations into electrical signals. Here are the two main types of microphone:
Microphone Types
It is often taught that "sound is vibrations in the air." We are able to enjoy music because we sense these vibrations in the air as sound.
Microphones convert these vibrations into electrical signals. Here are the two main types of microphone:
(1) Dynamic microphones
Construction is simple and comparatively sturdy. No power supply is required. Relatively inexpensive.
(2) Condenser microphones
Good sensitivity at all frequencies. Power supply is required. Vulnerable to structural vibration and humidity.
<Reference> Which type of microphone should I choose?
Condenser microphones may have greater appeal because they have "good sensitivity at all frequencies". However, they are not always the most practical choice.
Often during recording, a "pop shield" filter is required to protect against noise caused by the vocalist's breath hitting the condenser microphone. This is because condenser microphones are able to react to more subtle sounds. On the other hand, condenser microphones are not suited for high-volume recording, so dynamic microphones are mainly used in situations where loud audio is to be picked up.
Condenser microphones are used with PA systems in cases where a wide band of frequencies, ranging from low to high, is to be picked up for choir vocals, acoustic pianos, hi-hat cymbals (which are known for their sensitive and high frequency), or for use "overhead" to pick up sounds from the entire drum set.
Microphones have directionality that indicates from which direction they best pick up sound. Microphones that do not have any specific directionality (called "omnidirectional" microphones) will pick up sounds from all directions, thus sounds other than those of the intended instruments will go into the microphone. Particularly with PA systems, many instruments will often be played together on a stage, so it is necessary to have a good understanding of directionality. Some microphones have switches to select the preferred directional pattern.
(1) Unidirectional
This type of microphone features directionality to the front only and is also known as "cardioid" (because of its heart shaped directional pattern). Cardioid mics are most often used with PA systems for vocals, instruments, etc. In the diagram, 0°indicates the front of the microphone.
(2) Bidirectional
This type of microphone features directionality to the front and rear. Because bidirectional microphones will also pick up audio to the rear, they are rarely used with PA systems. They are often used to record audio between two people who are face to face, such as during radio interviews.
(3) Omnidirectional
As mentioned above, this microphone type has no directionality. "Omni" mics are used to pick up all or wide range audio. For example, they are used for choirs, when many instruments are played at once, or to pick up all audio on the stage.
<Reference> What directionality should I choose?
A unidirectional microphone is generally used when picking up vocal and instrument performances with a PA system. Only choose an omnidirectional microphone when picking up vocals or performances from many people, or all sounds from the stage. However, omnidirectional microphones have a wide directionality, so they will also pick up sounds from the main speakers and monitor speakers on the stage, and feedback can easily occur. Therefore, use caution with the placement and volume of these microphones.
<Tips> If the microphone is covered, feedback will occur more easily: don't cover the grille with your hand
When a squealing or howling kind of feedback occurs at karaoke or other amateur singing events, some people cover the microphone instinctively. However, this actually has the opposite effect: If a microphone is covered, even a unidirectional microphone will behave like an omnidirectional microphone. It will pick up more sound from the speakers around it and cause more feedback. There are also some people who hold the microphone at the tip, but be careful because this, too, will increase the risk of feedback.
Selecting a microphone
This section has explained that dynamic microphones are generally used with PA systems, and that unidirectional microphones are the most suitable in this case. It also explained that condenser microphones are used with hi-hat cymbals and as drum kit overheads. Now, let's consider the actual selection of microphones for PA systems, including the microphones discussed above.
Other microphones
Here are two other types of microphone, each designed for specific uses.
(1) Wireless microphones
Wireless microphones can be moved around freely, without the cables getting in the way. These microphones require a transmitter and a receiver in order to broadcast sound. In general, handheld wireless microphones contain a built-in transmitter, whereas headset and clip-on microphones include a cable that attaches to the belt-pack transmitter.
The transmitters for both types are powered by batteries (either dry-cell or rechargeable), so always make sure that ample battery power is available.
It's also necessary to set the transmitter of the broadcasting microphone and the receiver to the same channel. Make sure that when you are using more than one wireless microphone, the transmitting and receiving channels are set differently for each microphone.
(2) Headsets and lapel microphones
Microphones worn on one's head are called headsets, while microphones worn on clothing not far from one's mouth are called lapel (or lavalier) microphones. Either can be used so that both hands are free. Headsets are often used while singing or dancing, while lapel microphones are often used by presenters on television. These headsets and lapel microphones are often used wirelessly.
<Note> Many headset and lapel microphones are omnidirectional, so extreme caution should be applied when using them with PA systems. Try using a unidirectional headset microphone to reduce the risk of feedback.


text:
Key enzyme regulating early growth of breast cancer cells indentified
New University of Georgia research, published this week in the early online edition of the journal Proceedings of the National Academy of Sciences, has found that blocking the action of an enzyme called GnT-V significantly delays the onset and spread of tumors in mice with cancer very similar to many cases of human breast cancer.
When the GnT-V enzyme activity in the cells was increased in mammary gland cells, they increased proliferation and began to take on many characteristics of cancer cells. Using a mouse model of human breast cancer, tumors appeared when the enzyme was deleted, but onset was delayed an average of 10 weeks in the mice.
"In human terms," said Michael Pierce, director of the UGA Cancer Center and study co-author, "the corresponding delay would be many months and maybe years. You basically are slowing everything down and keeping the cancer from forming and progressing very early." Slowing the pace of the cancer could eliminate its spread to other organs, keeping it localized where it could be treated successfully, Pierce explained.
The researchers, lead by Hua-Bei Guo, assistant research scientist in the department of biochemistry and molecular biology in the Franklin College of Arts and Sciences, stimulated breast cancer formation in mouse mammary glands by over-expressing a her-2 protein that is a growth receptor on the cell surface. The researchers note that over-expression of her-2 is associated with 25 to 30 percent of human breast cancers.
The GnT-V enzyme makes glycans, which are sugars on the cell surface that change in defined ways when the cell becomes cancerous. Glycans are released from the cell as glycoproteins, making them a promising early-detection marker in blood. The researchers studied a glycan made by GnT-V that appears when normal breast cells become cancerous. The GnT-V glycan product is found on her-2 and other receptors and acts to regulate the number of cancer stem cells in the tissue. The number of these cancer stem cells determines how rapidly the cancer will form and develop.
"Glycans often are ignored by scientists, because they're very complicated and present unusual problems to identify and understand," said Pierce. "This study is an example of how particular glycans that are present on various cell receptors can actually modulate the onset of tumor formation. That may give us new drug targets and new ways to kill the cancer cells specifically."
The finding of Guo and the research team at UGA's Complex Carbohydrate Research Center that the elimination of a glycan-synthesizing enzyme significantly reduced the population of breast cancer stem cells is unprecedented, they note.
"That population of cells appears to drive breast tumor formation in many cases," said Pierce, who also is UGA's Mudter Professor in Cancer Research, "and our research suggests that glycans may be potential targets to kill them selectively."
Pierce likened the cancerous stem cells to the queen of an ant colony. "You can try to get rid of the anthill, but it will just come back if you don't kill the queen," Pierce said. "If we can target those cancer stem cells for elimination, that would be the most effective treatment."
Source: University of Georgia


text:
created December 3, 2002 · complexity basic · author Luc Hermitte · version -
This tip does not only concern Vim, but any native win32 application (NWA) we may want to run from cygwin.
Note: I call a "native win32 application", any program that has not been specifically compiled to run on cygwin.
Typical examples are internet explorer, yap, acrobat reader, ... and of course the win32 version of Vim available on this site or on http://cream.sourceforge.net.
The problem with running NWAs from cygwin comes from the fact that paths in cygwin can be expressed in ways that NWAs can't understand. Indeed from cygwin, we can also:
- Express paths as *nix-like paths ; e.g. /etc/profile
- Use paths that, as a matter of fact, are symbolic links.
- Use absolute paths expressed in the Windows form
> gvim c:/bar/foo.txt
- Use multiple-level of indirections through symbolic links
> ln -s foo1 somepath > ln -s foo2 foo1 > ... > gvim foon
- Use symbolic links pointing to absolute paths expressed in the Windows form
> ln -s foo c:/bar/foo.txt > gvim foo
So, to come around this issue, here is a shell script that can be used to define aliases: cyg-wrapper.sh More help is available on the script page
All you have to do is to drop it into one directory from your $PATH, and define into your .profile something like:
alias gvim='cyg-wrapper.sh "C:/Progra~1/Edition/vim/vim61/gvim.exe" -c'
- under MsWindows 9x, I had to write the path to gvim.exe in the Windows short form
- the '-c' is here to tell cyg-wrapper.sh that: when calling Vim, the parameter following '-c' is not a path.
- This enables us to write:
gvim -c '/^$/' foo.xxx
Regarding the use of *nix-like paths from win32-Vim, check Johannes Zellner's plugin (cygwin.vim) that will convert *nix paths into MsWindows paths on file-opening -- there are different autocommand to add, but it will give you the main idea.
Last point, the win32 version of Vim can not expand paths expressed in the *nix way. For example, ':sp /etc/pr<tab>' won't expand.
Just to announce the ver 2.2 of cyg-wrapper.sh.
It is quicker than the version 1.x, the options are correctly supported and we can ask for a non forking program to fork (thanks to Jonathon M. Merz)
- A light and faster script in some cases, though does not provide much options
- http://vim.wikia.com/wiki/Use_cygwin_shell
- --Siddhant, 25 Feb 2010
The new syntax to use it with gvim is:
alias gvim='cyg-wrapper.sh "C:/Progra~1/Edition/vim/vim61/gvim.exe" --binary-opt=-c,--cmd,-T,-t,--servername,--remote-send,--remote-expr --fork=1'
Check 'cyg-wrapper.sh --help | less' for help.
Note: This version requires cygUtils and more precisally realpath.exe --Luc Hermitte, December 5, 2002 10:35
> Last point, the win32 version of Vim can not expand paths expressed in the *nix way ; > e.g. ':sp /etc/pr<tab>' won't expand.
- 'shellslash' has almost nothing to do with that problem.
- On Cygwin, "/etc/something" refers in fact to "c:\Cygwin\etc\something" (assuming Cygwin has been installed into "c:\Cygwin").
- Vim is not able to translate *nix paths into plain MsWindows paths -- a conversion layer needs to be introduced if we want to use paths in such form.
- --Luc Hermitte, February 6, 2003 5:13
I've detected a tiny flaw: if You want to use netrw (eg. gvim scp://somehost/somefile) from the commandline You loose. Here's the patch to recognise url syntax and handle it properly:
--- /DownLoad/vim/cyg-wrapper.sh 2003-10-22 14:49:25.084774400 +0200 +++ /opt/bin/cyg-wrapper.sh 2003-10-22 14:55:04.392675200 +0200 @@ -254,6 +254,9 @@ else ptransl="$1" fi + elif [ `expr "$1" : "[a-z]*://.*"` -gt 0 ] ; then + # some netrw protocol like http://host or ftp://host : leave as is + ptransl="$1" else # Convert pathname "$1" to absolute path (*nix form) and resolve # all the symbolic links
--Matthias.Morche October 22, 2003 6:00
- Matthias patch has been taken into account. --Luc Hermitte 19:51, 5 June 2007 (UTC)
This is just what I was looking for!
However, in the off chance I want to use win style path, e.g.,
gvim c:\Mydir\IOAPP.C
gvim run but tries to open file c:\MydirIOAPP.C and says it's a new file. It drops the 2nd backslash. Should this work or is it a bug in the cyg-wrapper.sh?
- As far as I understand Cygwin, this can not work.
- Backslashes have to be doubled or written within a pair of quotes.
- --Luc Hermitte, February 26, 2004 15:17
It seems current version(1.42) of cygpath is not working properly when used with -wl alongside non existent filename.
$ cygpath -w /home/username/foo c:\cygwin\home\username\foo
$ cygpath -wl /home/username/foo c:\cygwin\ho ??? sername\foo (??? is some random characters)
Please substitute 'cygpath -w' for 'cygpath -wl'; there are three instances. =)
- AFAIK, this issue in cygpath hasn't been fixed yet
- --Luc Hermitte 19:51, 5 June 2007 (UTC)
Option to "read text from stdin" doesn't work.
I'm using version 2.18 of the cyg-wrapper.sh script and I've set up my gvim() bash function as follows:
function gvim() { opt='' if [ `expr "$*" : '.*tex\>'` -gt 0 ] ; then opt='--servername LATEX ' fi cyg-wrapper.sh "C:/Program Files (x86)/Vim/vim74/gvim.exe" --binary-opt=-c,--cmd,-T,-t,--servername,--remote-send,--remote-expr --cyg-verbose=1 --fork=1 --cmd "cd $(cygpath -w "$(pwd)")" $opt "$@" }
And the command that I am trying to get working would be something like the following:
$ cat $somefile | gvim - # using the bash function defined above, not the executable.
Because it is not function as expected, I end up using the gvim.bat script distributed by vim:
$ cat $somefile | gvim.bat -
This works as expected, so I've assigned an alias just for this case
$ alias gv='gvim.bat -'
Any assistance with this issue would be greatly appreciated.
Thank you.


text:
NHS and social care staff burnout reaches 'emergency' level
In a highly critical report, the Health and Social Care Committee called for immediate action to support exhausted staff who have worked throughout the Covid-19 pandemic.
Hide AdAdvertisement
Hide AdHowever, it also pointed to long-standing, unresolved issues even before the pandemic.
The Royal College of Nursing (RCN) told MPs that, prior to the onset of the pandemic, there were 50,000 nursing vacancies in the UK, while the Royal College of Psychiatrists has said a lack of staff is one of the biggest causes of workforce burnout in mental health services.
The report also says that the level of burnout for staff could pose a risk to the future of services.
What the report said
In their new report, the MPs said: "The emergency that workforce burnout has become will not be solved without a total overhaul of the way the NHS does workforce planning.
Hide AdAdvertisement
Hide Ad"After the pandemic, which revealed so many critical staff shortages, the least we can do for staff is to show there is a long-term solution to those shortages, ultimately the biggest driver of burnout."
The MPs said that, while issues such as excessive workloads may not be solved overnight, staff should be given the confidence that a long-term solution is in place.
"The way that the NHS does workforce planning is at best opaque and at worst responsible for the unacceptable pressure on the current workforce which existed even before the pandemic," the study said.
"It is clear that workforce planning has been led by the funding envelope available to health and social care rather than by demand and the capacity required to service that demand."
Hide AdAdvertisement
Hide AdThe MPs said that without a proper public statement on the staffing needs for the next decade, "the shortages in the health and care workforce will endure, to the detriment of both the service provision and the staff".
They said they "recommend again" that Health Education England publishes "objective, transparent and independently-audited" annual reports on workforce needs for health and social care that cover the next five to 20 years.
'Workforce burnout presents dangerous risk to services'
Tory MP and former health secretary, Jeremy Hunt, who is chairman of the committee, said: "Workforce burnout across the NHS and care systems now presents an extraordinarily dangerous risk to the future functioning of both services.
"An absence of proper, detailed workforce planning has contributed to this, and was exposed by the pandemic with its many demands on staff.
"However, staff shortages existed long before Covid-19.
Hide AdAdvertisement
Hide Ad"Staff face unacceptable pressure with chronic excessive workload identified as a key driver of workforce burnout.
"It will simply not be possible to address the backlog caused by the pandemic unless these issues are addressed.
"Achieving a long-term solution demands a complete overhaul of workforce planning.
"Those plans should be guided by the need to ensure that the long-term supply of doctors, nurses and other clinicians is not constrained by short-term deficiencies in the number trained.
"Failure to address this will lead to not just more burnout but more expenditure on locum doctors and agency nurses."


text:
With all the debate about health care reform (which is NOT what is going on...see below), the epidemic of American idiocy is being totally ignored. The debate about the state of health care serves to demonstrate how economic overlords have completely destroyed the average American's ability to think critically or to see the obvious. American's are fooled into being their own worst enemies on so many levels. But when it comes to the debate on health care, it is absolutely frightening to see how stupid this nation has become.
Let's talk reality here...Health Care Reform...
Let me make one thing clear right off the bat...there is no health care reform taking place in this nation. What is going in is health INSURANCE and PROFIT reform! All the reform that is being debated by politicians and echoed by the media has nothing to do with health, - it is all about the money! That's it. It is in no way "health care" reform as the media would have you believe. In reality, the only thing being debated is "medical industry finance reform!"
Health Care...
Let me first correct the definition of this misleading and overused phrase. The "health care" industry is not about health, it is about medical treatment and medical sales. So called "health care" providers, institutions and professionals, for the most part, are in the medical service business and supply the application and distribution venues needed by that business. Your "health" is not an issue with these people. Your symptoms, illnesses, defects, syndromes, diseases, flaws, shortcomings and problems in general, are their "business."
Ass Backwards Capitalism
The criminals in the corporate media tell you that any form of national medical care is evil. They frighten you by telling you that if health care changes in this nation you will have to deal with terrible conditions like having to wait in waiting rooms for many long hours at a time. And, of course, the average American simply believes what is said and repeats this mantra over and over. Bravo, FOX News...you have trained the people well. But what never gets discussed are the realities of health care for profit, which is what American health care. excuse me, medical goods and services, are all about. I want you to really think about a few things here.
Understand that the United States has a so-called health industry that has every reason in the world to keep you sick and not one incentive at all to cure any diseases, reduce the frequency and quantity of your medical problems and issues, or keep you from having medical problems in the first place. Medical costs are out of control because the American medical industry is a for-profit business where the profits of investors and owners come before the fundamental ethics and mission of medical professionals. It is a system perverted by predatory capitalism and has grown into the most exploitative industry on this planet.
Argue all you want, call me all the names in the world, like commie, liberal, even though you probably don't know the definitions of those terms or what aspects of those terms apply here...but the hard fact is that medicine for profit is simply vile and shameful, but worse, it is counter productive. I am not saying that doctors, nurses, EMTs, and everyone in the medical industry do not deserve to be financially rewarded handily, but the system that exists now, here in America is immoral. Nurses and first responders don't drive up health costs, - investors and executives do! And do not for a moment leave out Big Pharma...the evil among evil...where even drug salespeople earn more than E.R. nurses. If you don't see a problem with that you should check your soul.
Imagine standing on a dock and falling into a river. You scream for help to a person on the dock who is holding a life preserver, and that person asks for payment before throwing it to you Or, imagine that person telling you that you can't have the life preserver at all because he does not accept your insurance. Or, imagine that you can have the life preserver, but you will owe them everything you have in the world. Well there it is...American 'health care'. The only thing missing in this story is the fact that you were pushed into the river, and the guy with the life preserver knows all about the gangs who push people into the rivers but it really does not help his business to acknowledge or address that little reality. That's America.
Getting Your Business - What Makes You Sick?
The truth is that Americans are sicker than ever. We have more problems, more diagnosable diseases, and take more medicine than ever. Nobody asks why? Well, the regular readers of TvNewsLIES.org do, as so many of us in the reality based world...you know...the ones who don't live in the fantasy world created by the establishment media.
There are 2 reasons why Americans are sicker than ever.
- We are being poisoned. Any toxin or health threat that can be thought up or invented is being ushered into our lives without our consent. From the detonation of nuclear weapons (over 2000 have been detonated on our planet), to adding deadly neurotoxins and undisclosed chemicals into our drinking water (can you say "fluoride and hydrofracking?), to genetically modifying our food supply, to bombarding us with every kind of cellular, radio and microwave transmission...our bodies are under attack down to their DNA levels...and the terrorists attacking us are corporations and their government accomplices.
- Wordsmithing. Redefining "symptoms" as diseases has allowed the medical industry to prescribe treatments and medications where no real single identifiable medical issue can be found. Natural age-related problems are now diseases, as are symptoms that can not be linked to any real disease. These new conditions are given nice marketable names and acronyms and sold to society in a way that is intended to make you feel abnormal for not being ill. COPD is just one example. By the way...how is "your RA?" Did you get your RA Fit Kit? If not you can ask UCB Inc for one...they are behind the My RA campaign. And don't forget to tell your doctor to prescribe that pretty purple pill and never mind the deadly side effects. We need your money.
Keeping Your Business - Treat, Don't Cure - How can anyone expect a system, or a business (like the medical industry) to work when accomplishing the objective results in less profits and possible ruin? How can anyone in the cold and flu industry sincerely work towards a cure when finding one would put them out of business? The same can be said about every single illness and condition. ALL the incentives to treat patients with profitable medications and procedure ensure that cures are never found.
Not Good For Business - The business model of the medical industry requires that it keeps you sick. It is like any business...if a car company made a car that lasts a lifetime you would never need to buy a new one, buy new parts, or pay for regular service and repairs. Businesses can never consider the consumer's true best interests because it is in direct conflict with business interests and a threat to it's own survival. The so called "health care industry" is a business, designed to create more business, and that's all it is.
Destroy Competition From Mother Nature - The Mafia-like enforcer for the medical industry, the FDA, has made sure that mother nature has nothing to do with your health and well being. According to them, any natural food or substance that can improve or maintain good health is considered a drug and falls under their jurisdiction. It is amazing that they have not declared water to be a drug because it cures dehydration. Give them time...they will.
Let's take cholesterol as a typical example. There are two major reasons so many Americans have 'bad' cholesterol problems:
- Bad diet.
- We kill our livers. Unnatural foods and virtually ALL medications destroy or burden our livers. Your liver is the key organ involved in blood health. One important function (among many others) of the liver is regulating cholesterol . It produces cholesterol and purges the body of bad and excess cholesterol. The problem is that when harmful cholesterol is purged (via bile pumped out of our gall bladders into our intestines), it does not make it out of the body fast enough and gets reabsorbed as it sits in the large intestine. Fiber absorbs cholesterol like a sponge and carries it out of your body...quickly. This is why Cheerios, among other healthy foods, lowers cholesterol. The FDA has warned the makers of Cheerios about letting the public know about this. The FDA is claiming jurisdiction over the natural workings and health of your body when it comes to nutrition and nature. As a result, Americans are assaulted with ads for Lipitor, and Big Pharma makes out like the bandits they are.
No Profit, No Product - Stop running for the cure, stop sponsoring your friends walk-a-thons, stop donating to research and the MD telethons. Here is the deal: if, for the first time in history, one of these "charitable" organizations actually used the money to find a cure for something...for anything...(and they never have), who do you think will benefit? Not the patients. They will still have to hope that they can afford the cure or have the right insurance or be lucky enough to have access to the treatments. Your cash will help the investors and owners of the drug company or medical body that has the rights to the cure. And you can be certain that they will exploit their knowledge to no end.
Here is another little reality...if a cure or treatment for something is showing promise, and the active compounds (or approach in general), can not be patented, it will never see the light of day. Very simply, if you discover that the common spice called turmeric, kills cancer cells on contact (throat cancer), it will never be used, applied, subscribed, or suggested for use until some way to manipulate it into a unique patentable form is achieved. A cheap, real, working, widely available substance that cures or helps deal with a disease or medical ailment will never be permitted under the system that exists. No profits...then you can't have it, especially if it interferes with the profits of existing treatments.
Cancer Free? Then We Will Try to Give You Cancer - Imagine, the primary screening process for diagnosing cancer, along with one of the primary treatments...GIVE YOU CANCER! How on earth, with all of our technology (MRI's), do we allow ourselves to be exposed to diagnostic techniques that use cancer causing radiation for the purpose of finding cancer? Are we all insane? Am I wrong ,or are MRI's the state of the art medical imaging technology? Why are we not using MRIs to detect cancer? At least they don't use radiation! Why are we regularly exposed to radiation? And why are we told to screen more often starting at a younger age! Are we nuts?
The answer, of course, is money. Insurance companies will not pay for expensive, safer diagnostic measures until all less expensive forms of diagnosis have been exhausted. For example: the cost of a radiation emitting mammogram is around $250.00. The national average cost of a one breast MRI is $5,100..00. Why the hell does medical imaging cost this much? Who is making all the money on this technology? What are the profit margins? Why is this not discussed anywhere?
I don't care how much you trust your doctors...their entire approach towards "health" has been taught to them by the same people who sell you this nonsense. Who do you think funds medical learning institutions in the first place? The same people who own this planet...and this planet is nothing more than a business to them.
Quack a Doodle Doo - According to the FDA, and most medical business institutions, anyone who makes a claim regarding a health breakthrough or discovery, that does not fall in line with the profit business model (no cure, only treatment, patentable), is a quack. People who talk about natural remedies, preventive health practices or cures and treatments to diseases that can not be patented, can not produce huge profits, or pose a threat to the profits of an existing medical treatment industry, are quacks. Regardless of the results...if you are helping people live, and your method for doing so threatens the establishment, you will be attacked relentlessly by the medical establishment.
Flex Spending Accounts (FSAs) - Another Way to Rob You - How do we not see the entire flex spending accounts program as a vile exploitative immoral practice? You are supposed to gamble your money against your future health costs? If you get too sick you lose because you did not gamble enough money and will therefore not be able to get a tax break on your costs. And if you are healthy and don't need the money that year...YOU LOSE YOUR MONEY! What the fuck!!! Why not make all medical costs tax exempt. Or just set a limit as to how much can be tax exempt...why make us risk losing our money at all? Why make us hope that we will neither lose our money or our tax break? How did we allow this to even come into existence? The existence of FSAs is a prime example of how stupid Americans are. We are schmucks for falling for this idiocy.
- You are supposed to estimate what your out of pocket medical costs will be for the next year.
- If you spend all the money you estimated, and you have no additional medical costs, you win.
- If you spend less...SOME COMPANY GETS TO KEEP YOUR MONEY...and then you have to put more money down to play again next year.
- If you have unforeseen medical expenses (and they are almost ALWAYS UNFORESEEN), and you have to spend more than you had deducted from your salary, you are out of luck and you have to still pay taxes on your hard earned money (another scam in itself.)
I mean really folks...this is nothing more than a Las Vegas gambling game where, as it is always the case in Vegas, the odds overwhelmingly favor the house and the players always lose.
Those Socialistic Waiting Lists and Waiting Lines - So the bastards who call themselves mainstream media news casters help to scare you into fearing changes in the health care system by telling you that you have to wait in long lines for health care in other nations. Here are some questions about THIS NATION for you frightened folks...
- When was the last time you tried to get an appointment with a doctor in this nation? How long did you have to wait for an appointment? Weeks? Months?
- How long did you wait in the waiting room when appointment day arrived?
- Have you been to an emergency room lately? How long did you have to wait until you were actually tended to? Was your answer given in minutes, hours or days? In NYC you better be on your way to dying or you will be waiting a VERY long time...and I am talking about nice rich hospitals in great neighborhoods like Park Slope or the upper east side.
- Were you able to see any doctor you wanted to, or just those who accept your insurance?
- Did you ever try to get an alternative treatment only to be told that it is not covered?
- When you were waiting in the waiting room, and it is two hours and fifteen minutes past your appointment time, and a well dressed pharmaceutical sales person walks in and hands a business card to the reception person...what are the odds that you will get in to see the doctor before the drug pushing pharma-hooker?
- Are you the 1% of the public who can actually afford to go to any doctor you want and get any treatment you prefer? If so...stop reading this...you are probably part of the problem with society. Reading this won't help you anyway.
Our medical care, for the majority of Americans, is dictated by the death panels known as the insurance companies. And this has been made possible by the death panel co-conspirator known as Congress.
Vermin - Actors Selling Medicine - There are a lot of bad people in society. There are a lot of people who prey on the poor, helpless, hopeless and less intelligent. The list of these people is endless, and their goal is all the same, to take your money. And I can think of no more shameful vermin than one who pretends to be a doctor or a patient on television in order to sell you drugs. An actor to pretending to be an ill person for the sake of selling drugs is simply vile. You can thank Ronald Regan for this byproduct of transposing the practice of medical arts into nothing more than a business.
We are told every day, by actors, to ASK OUR DOCTORS if the drugs they are selling are right for us. Aren't the doctors supposed to know what is right for us? Aren't the doctors supposed to TELL US what the BEST ways to treat our ailments are? We have lost our minds people...this is outrageous. Every other nation in the world laughs at us when it comes to this...this one is so obvious...prescription drugs advertised on TV!!! Shameless...and shameless is American.
American Pride - Embarrassing. - Americans continually insult the world with the insensitive and insulting claim of being the greatest nation in the world (how do you think other proud people around the world feel when you, or a US president says that?) Yet we are embarrassingly stupid people. We are blind to the most obvious disconnect between what is claimed and what actually is. Our health care industry has so obviously been completely taken over by profit driven parties yet we allow our leaders to continue this farce. We watch medical costs climb yet we ask not who is raising the prices and what exactly is costing so much? American pride has blinded this nation to almost all of reality. Words need not match facts or history. The flag remains religiously draped over the eyes of our nation as the people continue eat the rancid garbage that is fed to them daily.
SO WHAT IS THE ANSWER? Here is one thought...When a country is established, one of the first things it does is set up an organized militia, or military. Why? To protect the people from harm and keep them safe from those who would seek to harm them. Well, isn't that the mission of the true medical professional? Shouldn't the nation set up a national medical establishment that dedicates itself to the well being of the citizens, to protect their lives, just like the military? I think it should. We should have a health care "foundation", not industry.
If the "health care" industry was really about health care...the people would want it to serve them to their best ability. The people would want all the brilliant minds to work together to combine efforts for maximum results. We would not want to have to speculate about guarded secrets and hidden cures that may interfere with profits. Could you imagine what could be accomplished if all of the medical professionals combined efforts? This can be said for lots of things, not just health care!
A real health care foundation would also protect us by objecting to the things that harm us in the first place. They would fight against pollution, nuclear power, food DNA manipulation, messing with our planet and eco-systems. They would very simply care for our health. And by the way, it would not be an industry...it would be a foundation of society, as it should be.
And any real health care foundation would stand wholeheartedly against a government taking part in any type of bio-weapons programs where threats to life on earth could be accidentally or purposely set loose on civilization.
The goal of a real health care foundation would be to keep people out of hospitals, off medications and free of their medical problems. The American system however, thrives on the sick, and needs more customers all the time. It's a bad model for the citizens, a good model for the business owners.
It is just a shame that Americans have been conditioned for generations to shut down their own critical thinking mechanisms and simply accept supposed truths (or nonsense), from authority figures. You can thank religion for that - for it is the first and foremost tool in the destruction of critical thinking, conditioning your mind to accept all truth from some designated authority, regardless of how little reality supports that "truth."
What is obvious is that Americans can not see the obvious. And because of that they have in large part become their own worst enemies, supporting those who use and abuse them, simply because their authority figures convince them that all is well. Well folks...it is time to see reality for what it is...and finally realize that the authority figures you trust are simply the owners of the businesses for which you are the unwitting customer.
Think about it.
Jesse Richard - Founder, TvNewsLIES.org


text:
Notebook | Elephant Poo | Elephants | Dark Green | Large
Students and non-students take note! These one-of-a-kind, eco-friendly, hardcover notebooks from Mr. Ellie Pooh are perfect for your writing needs. Write, sketch, and join the fight to save the elephants!
Details: Our large, unlined notebooks have approximately 50 pages and measure 7.5" x 6".
Attributes: Eco-Friendly | Handmade | Social Good | Woman-Owned | Small Batch
Vendor: Dr. Karl Wald went over to Sri Lanka 12 years ago. His job as a scientist was to shadow an elephant veterinarian, do trunk washes and test domestic elephants for tuberculosis. During that time, he learned about the raging human/elephant conflict in Sri Lanka and became friends with a fellow animal activist, and paper maker Thusitha Ranasinghe. Together, they began Mr. Ellie Pooh.


text:
One in three Britons believes in aliens
A new survey has found that a staggering one in three Britons believe in aliens and nearly half think they have already landed on Earth.
The survey, conducted by cinema chain Vue to mark the release of Independence Day: Resurgence, asked 2,000 people around the country what they thought about the potential for extraterrestrial life and came up with some startling results.
Hide AdAdvertisement
Hide AdTen per cent of people in the East Midlands claim to have seen a UFO and a third of them think flying saucers have landed in the UK before now. Overall, 41 per cent of those survey said they thought little grey men have landed their craft on Earth and in London the figures were even higher, with 51 per cent of people saying they believed aliens had landed here.
Most people believe that alien visitors would come in peace but many seem to have a contingency plan just in case things turn more like the first Independence Day movie. A quarter would head for the countryside if UFOs appeared above the planet, with the Scottish Highlands deemed the safest spot to start a new life. Glasgow didn't fare so well, with only 1 per cent of people opting to head there.
And never mind photo albums, pets or a treasured reminder of a loved one recently vapourised by an alien death ray, what most Britons would save in the event of an invasion is their mobile phone. Presumably so they can stream their escape live on Periscope.
Proving that TV really can be bad for you, the survey found that most people cited The X-Files as the biggest influencer of their opinions on extraterrestrials. What's more most bought into the ever-popular image of aliens as human-like creatures with huge eyes and telepathic powers rather than the skeletal bug-headed xenomorph from Alien.


text:
Having Surgery and Vending WeHo Pride! Shipping Resumes 6/10!
♡ 365 Days of Putting Up With My Annoying Ass ♡
These Cards Are...
♡ Printed on Premium Cardstock
♡ A2 Card (4.25 x 5.5)
♡ Comes with a 100% Recycled Kraft Envelope
♡ Delivered in a Compostable Cello Sleeve to Keep Cards Clean
♡ Designed by Page's Peaches LGBTQIA+ Artists
♡ Made in the USA
♡ ♡ ♡
Please feel free to contact me for custom sizes and any other needs/requests.
♡Page's Peaches is LGBTQIA+ Owned♡
Copyright © 2023 Page's Peaches, LLC. All rights reserved
♡ ♡ ♡
♡Dimensions may vary ∓ 0.15"
♡Page's Peaches is LGBTQ+ Owned♡
♡Copyright © 2023 Page Peaches LLC. All rights reserved
small biz
made leauxcal
homo owned
responsible packaging
employs a former tumblr lesbian
We use cookies on our website to give you the best shopping experience. By using this site, you agree to its use of cookies.


text:
The secret to your business growth - Call Center India!
- We ensure that you are always customer centric
- We ensure that you always grow in business
- We ensure that you always succeed!
We are the leading Contact Center Solutions provider. We offer optimum web enabled services, back office services, and contact center services to our clients spread across the globe.
We are their preferred vendors because we deliver excellence to them, each time. This gives us the distinction of being one of the most reputed Call Center Outsourcing Company in India.
We always align our goals with that of our clients and customize our services to suit their exact requirement. Stepping into our clients' shoes is the first thing we do. We suggest them what only what will truly yield them profit, even if it means selling a little less of our services. We will not impose a dedicated agent, when your actual need is of a shared agent, and we will not impose a data mining service when you just need to data entry. And you get the best outsource call center pricing with us.
And this is why our clients have given us the prestigious title as the 'Profitability Partners'!


text:
An audiovisual aide for conservative student group Turning Point USA was fired this week after President Donald Trump appeared on a stage in front of a parody image of the presidential seal at its Teen Student Action Summit.
As the President took the stage Tuesday morning before a sea of 1,500 teenage cell phones, a screen behind him showed a fake presidential seal featuring a two-headed eagle -- which bore similarity to the State seal of the Russian Federation -- clutching a set of golf clubs in its talons. The seal was visible for a short time behind Trump, who stood behind a podium affixed with the official (and un-doctored) presidential seal for the duration of his speech.
TPUSA apologized for the incident, telling CNN there was "zero malicious intent" behind the imagery.
"We're sorry for the mix-up and meant no disrespect to the White House or the President or the advance team," the TPUSA source said.
The individual responsible, a member of TPUSA's AV team, was let go in the wake of the incident. According to a source familiar with the event, the incident was just a terrible Google search mistake. TPUSA had event branding on the screens, but during a run through ahead of Trump's remarks a few hours before the event, the team was told they had to change the branding to a presidential seal, prompting a search for a high quality image.
"One of our video team members did a Google Image search for a high-res png (file) presidential seal," a source familiar with the incident said, adding that the individual "did the search and with the pressure of the event, didn't notice that it is a doctored seal."
The seal's eagle evokes imagery of the Russian coat of arms.
Trump's relationship with Russia has cast somewhat of a pall over his presidency.
Former special counsel Robert Mueller condemned efforts by the Trump campaign to seek help from Russians in 2016, but the investigation did not establish a conspiracy between Trump's campaign and the Kremlin. The President has said his campaign never colluded with Russia, but has at times sided with Russian President Vladimir Putin over US intelligence agencies , confounding even some of his allies.
A White House official soundly pointed the finger at TPUSA for the mix-up.
"We never saw the seal in question before it appeared in the video. For anything further, you would need to contact Turning Point -- it was their event," the official told CNN.
TPUSA was responsible for the event's production, including the video. The President was there as an invited guest of the group.
But another source familiar suggested it was a failure of the President's advance team, as well, which is responsible for all the details for any presidential appearance.
"Ultimately, both TPUSA and White House advance are at fault. TPUSA and their production crew were responsible for putting the wrong graphic up. But the advance office should have provided the official seal and/or approved everything that was put out," the source said.
™ & © 2019 Cable News Network, Inc., a Time Warner Company. All rights reserved.


text:
Calling the church sex abuse scandal a "leprosy in our house," Pope Francis tells an Italian newspaper that 1 in 50 Catholic clerics are pedophiles.
In an interview with Eugenio Scalfari, the 90-year-old founder of La Repubblica, Francis is quoted as saying that advisers in the Church "reassure me" that the problem amounts to "about 2 percent."
"This data should hearten me but I have to tell you that it does not hearten me at all. In fact, I think that it is very grave," he was quoted by the newspaper as saying, according to a translation used by Reuters.
Most pedophilia takes place in family situations, but "even we have this leprosy in our house" he is quoted as saying of the Roman Catholic Church.
The Church must "weep and make reparation" for its crimes, he is quoted as saying.
Scalfari also quotes Francis as noting thatthe requirement of celibacy in the priesthood is a "problem," and that "there are solutions and I will find them."
The pope said that celibacy was instituted "900 years after Our Lord's death" and that in some Eastern Churches under the Vatican's purview, priests were already allowed to marry.
Reuters says the La Repubblica article was a reconstruction of an hour-long conversation between the pope and Scalfari.
The Vatican, in a statement said that Scalfari — the country's best-known journalist who is also a prominent atheist — normally conducts long interviews with public figures without taking notes, quoting them later from memory.
Papal spokesman Father Federico Lombardi said that the quote on celibacy, as well as another in which Francis says cardinals were among the sex abusers, are inaccurate. Lombardi accused La Repubblica of trying to "manipulate naive readers," according to Reuters.
NPR's Sylvia Poggioli, reporting from Rome, notes, "This is not the first time Francis' off-the-cuff remarks have caused problems for his spokespeople."
Indeed, Francis has called atheists "precious allies" in building peace and even suggested that non-believers could go to heaven, a position his Vatican handlers quickly sought to clarify.
A few months later, in a discussion of homosexuality in the Church, Francis proclaimed: "If someone is gay and he searches for the Lord and has good will, who am I to judge?"
And, despite the Vatican's suggestion that the pope's comments on celibacy are not accurately quoted, they are largely in line with a message transmitted by the Vatican's secretary of state, Archbishop Pietro Parolin, in September.
Copyright 2021 NPR. To see more, visit https://www.npr.org.