|
Panda3D
|
A global object that maintains the set of ConfigVariables (actually, ConfigVariableCores) everywhere in the world, and keeps them in sorted order. More...
Public Member Functions | |
| int | getNumVariables () |
| Returns the current number of active ConfigVariableCores in the world. More... | |
| ConfigVariableCore | getVariable (int n) |
| Returns the nth active ConfigVariableCore in the world. More... | |
| str | getVariableName (int n) |
| Returns the name of the nth active ConfigVariable in the list. More... | |
| list | getVariables () |
| bool | isVariableUsed (int n) |
| Returns true if the nth active ConfigVariable in the list has been used by code, false otherwise. More... | |
| listDynamicVariables () | |
| Writes a list of all the "dynamic" variables that have been declared somewhere in code, along with a brief description. More... | |
| listUnusedVariables () | |
| Writes a list of all the variables that have been defined in a prc file without having been declared somewhere in code. More... | |
| listVariables () | |
| Writes a list of all the variables that have been declared somewhere in code, along with a brief description. More... | |
| ConfigVariableCore | makeVariable (str name) |
| Creates and returns a new, undefined ConfigVariableCore with the indicated name; or if a variable with this name has already been created, returns that one instead. More... | |
| ConfigVariableCore | makeVariableTemplate (str pattern, ConfigFlags::ValueType type, str default_value, str description, int flags) |
| Defines a variable "template" to match against dynamically-defined variables that may or may not be created in the future. More... | |
| output (Ostream out) | |
| write (Ostream out) | |
| writePrcVariables (Ostream out) | |
| Writes all of the prc-set config variables, as they appear in a prc file somewhere, one per line, very concisely. More... | |
Static Public Member Functions | |
| static ConfigVariableManager | getGlobalPtr () |
Public Attributes | |
| ConfigVariableCore | variables [] |
| Returns the nth active ConfigVariableCore in the world. More... | |
A global object that maintains the set of ConfigVariables (actually, ConfigVariableCores) everywhere in the world, and keeps them in sorted order.
|
static |
| int getNumVariables | ( | ) |
Returns the current number of active ConfigVariableCores in the world.
| ConfigVariableCore getVariable | ( | int | n | ) |
Returns the nth active ConfigVariableCore in the world.
| str getVariableName | ( | int | n | ) |
Returns the name of the nth active ConfigVariable in the list.
| list getVariables | ( | ) |
| bool isVariableUsed | ( | int | n | ) |
Returns true if the nth active ConfigVariable in the list has been used by code, false otherwise.
| listDynamicVariables | ( | ) |
Writes a list of all the "dynamic" variables that have been declared somewhere in code, along with a brief description.
This is a (usually large) list of config variables that are declared with a generated variable name.
| listUnusedVariables | ( | ) |
Writes a list of all the variables that have been defined in a prc file without having been declared somewhere in code.
| listVariables | ( | ) |
Writes a list of all the variables that have been declared somewhere in code, along with a brief description.
| ConfigVariableCore makeVariable | ( | str | name | ) |
Creates and returns a new, undefined ConfigVariableCore with the indicated name; or if a variable with this name has already been created, returns that one instead.
| ConfigVariableCore makeVariableTemplate | ( | str | pattern, |
| ConfigFlags::ValueType | type, | ||
| str | default_value, | ||
| str | description, | ||
| int | flags | ||
| ) |
Defines a variable "template" to match against dynamically-defined variables that may or may not be created in the future.
The template consists of a glob pattern, e.g. "notify-level-*", which will be tested against any config variable passed to a future call to make_variable(). If the pattern matches, the returned ConfigVariableCore is copied to define the new variable, instead of creating a default, empty one.
This is useful to pre-specify default values for a family of variables that all have similar properties, and all may not be created at the same time. It is especially useful to avoid cluttering up the list of available variables with user-declared variables that have not been defined yet by the application (e.g. "egg-object-type-*").
This method basically pre-defines all variables that match the specified glob pattern.
| output | ( | Ostream | out | ) |
| write | ( | Ostream | out | ) |
| writePrcVariables | ( | Ostream | out | ) |
Writes all of the prc-set config variables, as they appear in a prc file somewhere, one per line, very concisely.
This lists the dominant value in the prc file; it does not list shadowed values, and it does not list locally-set values.
This is mainly intended for generating a hash of the input config file state.
| ConfigVariableCore variables[] |
Returns the nth active ConfigVariableCore in the world.


Before Change
- `tensorflow.models.rnn.ptb.reader <https://github.com/tensorflow/tensorflow/tree/master/tensorflow/models/rnn/ptb>`_
with tf.gfile.GFile(filename, "r") as f:
return f.read().replace(*replace).split()
def read_analogies_file(eval_file="questions-words.txt", word2id={}):
Reads through an analogy question file, return its id format.
After Change
- `tensorflow.models.rnn.ptb.reader <https://github.com/tensorflow/tensorflow/tree/master/tensorflow/models/rnn/ptb>`_
with tf.gfile.GFile(filename, "r") as f:
try: // python 3.4 or older
context_list = f.read().replace(*replace).split()
except: // python 3.5
f.seek(0)
replace = [x.encode("utf-8") for x in replace]
context_list = f.read().replace(*replace).split()
return context_list
def read_analogies_file(eval_file="questions-words.txt", word2id={}):
Reads through an analogy question file, return its id format.


Synergy 3.2.1 Latest "Stable" Release Issues or Known Issues with Leopard 10.5.6
-
atort13
I recently installed Synergy 3.2.1 on my Mac Pro Tower and am running 10.5.6 version of Leopard and am experiencing some instability issues and having applications such as my finder crashing on me for some reason and these types of things are getting logged in my Log Console....2/4/09 1:16:49 AM Feb. 4, 2009 Synergy[119] Error executing AppleScript (audioscrobblerTimerFired:)
Does anyone know what to make of this or has there been any known issues with Leopard that I should be aware of? Also, is the Finder crashing a possibility from something Synergy has installed on the system? Any info will be appreciated.
Thank you.
@.
-
Greg Hurrell
There are no known issues in the 3.2 series.
Mac OS X uses protected memory so a normal application like Synergy cannot make any other application (such as the Finder crash). In any case, Synergy makes no attempt to even communicate with or touch the Finder; the only other application it tries to interact with is iTunes, and it does that via AppleScript (and there too the protected memory means that all applications are isolated from all other applications and one process should not be able to make another process crash).
As for the error messages in the log, could you post a full excerpt so that we can see what's going on?
Reply
This topic is now closed.


{% if b.metadata.about.access != 'private' %}
Too many sources to display. Download the sources.csv file for a complete list.


| I l@ve RuBoard |
As mentioned in Chapter 4, PythonWin is a framework that exposes much of the Microsoft Foundation Classes (MFC) to Python. MFC is a C++ framework that provides an object-based model of the Windows GUI API, as well as a number of services useful to applications.
The term PythonWin is a bit of a misnomer. PythonWin is really an application written to make use of the extensions that expose MFC to Python. This means PythonWin actually consists of two components:
Python modules that provide the raw MFC functionality
Python code that uses these modules to provide the PythonWin application
We focus primarily on the MFC functionality exposed to Python so we can build a fully functional GUI application.
As PythonWin mirrors MFC, it's important to understand key MFC concepts to understand how PythonWin hangs together. Although we don't have room for a complete analysis of MFC, an introduction to its concepts is in order.
The Microsoft Foundation Classes are a framework for developing complete applications in C++. MFC provides two primary functions:
An object-oriented wrapper for the native Windows user-interface API
Framework facilities that remove much of the grunge work involved in making a complete, standalone Windows application
The object-oriented wrapping is straightforward. Many Windows API functions take a "handle" as their first parameter; for example, the function SendMessage() takes a handle to a window (an HWND), DrawText() takes a handle to a device context (an HDC) and so forth. MFC wraps most of these handles in objects and thus provides CWnd and CDC classes, both of which have the relevant methods.
So, instead of writing your C++ code as:
HWND hwnd = CreateWindow(...); // Create a handle to the window... EnableWindow(hwnd); // and enable it.
You may write code similar to:
CWnd wnd; // Create a window object. wnd.CreateWindow(...); // Create the Window. wnd.EnableWindow();// And enable it.
There are a large number of objects, including generic window objects, frame windows, MDI child windows, property pages, fonts, dialogs, etc. It's a large object model, so a good MFC text or the MFC documentation is recommended for anything more than casual use from Python.
The framework aspects of MFC provides some useful utility classes, both for structuring your application and performing many of the mundane tasks a good Windows application should do. The mundane but useful tasks it performs include automatic creation of tool-tip text and status-bar text for menus and dockable toolbars, reading and writing preferences in the registry, maintaining the "recently used files" list, and so forth.
MFC also provides a useful application/template/document/view architecture. You create an application object, then add one or more document templates to the application. A document template knows how to create a specific document, meaning your application can work with many documents. A "document" is a general concept; it holds the data for the object your application manages, but doesn't provide any user interface for viewing that data. The last link in the chain is the view object that's responsible for the user interaction. Each view defines a way of looking at your data. For example, you may have a graphical view and also a tabular view. Included in all of this are many utility functions for managing these objects. For example, when a view notifies its document that data has been changed, the document automatically notifies all other views, so they can be kept up-to-date.
If your application doesn't fit this model, don't be alarmed: you can customize almost all this behavior. But there is no doubt that utilizing this framework is the simplest way to use MFC.
Think of PythonWin as composed of two distinct portions. The win32ui module is a Python extension that provides access to the raw MFC classes. For many MFC objects, there is an equivalent win32ui object. For example, the functionality of the MFC CWnd object is provided by a PyCWnd Python object; an MFC CDocument object by a PyCDocument object, etc. For a full list, see the PythonWin reference (on the PythonWin help menu).
For the MFC framework to be useful, you need to be able to override default methods in the MFC object hierarchy; for example, the method CView::OnDraw() is generally overridden to draw the screen for a view. But the objects exposed by the win32ui module are technically Python types (they aren't classes) and a quirk in the Python language prevents these Python types from having their methods overridden.
To this end, the win32ui module provides a mechanism to "attach" a Python class instance object to a win32ui type. When MFC needs to call an overridden method, it then calls the method on the attached Python object.
What this means for the programmer is that you can use natural Python classes to extend the types defined in win32ui.
The pywin.mfc package provides Python base classes that interface with many of the win32ui objects. These base classes handle the interaction with win32ui and allow you to use Python subclassing to get your desired behavior.
This means that when you use a PythonWin object, there are two Python objects involved (the object of a win32ui type and the Python class instance), plus an underlying MFC C++ object.
Let's see what this means in practice. We will examine a few of these objects from the PythonWin interactive window and create a dialog object using one of the standard PythonWin dialogs:
>>> import win32ui >>> from pywin.mfc.dialog import Dialog >>> d=Dialog(win32ui.IDD_SIMPLE_INPUT)
Looking at the object, you can see it's indeed an instance of a Python class:
>>> d <pywin.mfc.dialog.Dialog instance at 1083c80>
And you can see the underlying win32ui object:
>>> d._obj_ object 'PyCDialog' - assoc is 010820C0, vf=True, notify=0,ch/u=0/0, mh=1, kh=0 >>>
It says that the C++ object is at address 0x010820c0 and also some other internal, cryptic properties of the object. You can use any of the underlying win32ui methods automatically on this object:
>>> d.CreateWindow() >>> button=d.GetDlgItem(win32ui.IDC_PROMPT1) >>> button.SetWindowText("Hello from Python") >>>
The prompt in the dialog should now read "Hello from Python."
During the rest of this section, we will develop a sample application using PythonWin. This will lead us through many of the important MFC and PythonWin concepts, while also leveraging the dynamic nature of PythonWin.
MFC itself has a tutorial/sample called Scribble, which delivers a basic drawing application. We will develop a version of Scribble written in Python.
We will make use of some of the features of PythonWin to demonstrate how rapidly you can create such an application. Specifically, we will develop the Scribble framework first to run under the existing PythonWin framework, then make changes to it so it can run standalone. This is in contrast to the traditional technique of developing MFC applications, where the application object is often one of the first entities defined. A key benefit in using the PythonWin application object is that you get the full benefits of the PythonWin IDE, including error handling and reporting in the interactive window. This makes development much easier before we finally plug in our custom application object.
The general design of the Scribble application is simple. Define the document object to keep a list of strokes. A stroke is the start and end coordinates of a line. The document object also can load and store this list of strokes to a file. A view object is also defined that can render these strokes onto a Window.
The first step in the sample is to provide a placeholder for the document template, document, and view objects. Once this skeleton is working, we fill out these objects with a useful implementation.
Our first step is to develop a simple framework with placeholders for the major objects.
We define three objects: a ScribbleTemplate, a ScribbleDocument, and a ScribbleView. These objects derive their implementation from objects in the pywin.mfc.docview module. The ScribbleTemplate object remains empty in this implementation. The ScribbleDocument object has a single method, OnNew-Document() , which is called as a document object is initialized; the implementation defines an empty list of strokes. The view object is based on a PyCScrollView (i.e., an MFC CScrollView) and defines a single method OnInitialUpdate() . As the name implies, this method is called the first time a view object is updated. This method places the view in the correct mapping mode and disables the scrollbars. For more information on mapping modes and views, see the MFC documentation.
The final part of the skeleton registers the new document template with the MFC framework. This registration process is simple, just a matter of calling AddDocTemplate() on the application object. In addition, this code associates some doc strings with the template. These doc strings tell the MFC framework important details about the document template, such as the file extensions for the documents, the window title for new documents, etc. For information on these doc strings, see the PythonWin Reference for the function PyCDocTemplate.SetDocStrings().
|
A final note before we look at the code. This application has no special requirement for a frame window. The standard MFC/PythonWin Frame windows are perfectly suitable for the application. Therefore, we don't define a specific Frame window for the sample.
Let's look at the example application with the described functionality:
# scribble1.py # # The starting framework for our scribble application. import win32ui import win32con import pywin.mfc.docview class ScribbleTemplate(pywin.mfc.docview.DocTemplate): pass class ScribbleDocument(pywin.mfc.docview.Document): def OnNewDocument(self): """Called whenever the document needs initializing. For most MDI applications, this is only called as the document is created. """ self.strokes = [] return 1 class ScribbleView(pywin.mfc.docview.ScrollView): def OnInitialUpdate(self): self.SetScrollSizes(win32con.MM_TEXT, (0, 0)) # Now we do the work to create the document template, and # register it with the framework. # For debugging purposes, we first attempt to remove the old template. # This is not necessary once our app becomes stable! try: win32ui.GetApp().RemoveDocTemplate(template) except NameError: # haven't run this before - that's ok pass # Now create the template object itself... template = ScribbleTemplate(None, ScribbleDocument, None, ScribbleView) # Set the doc strings for the template. docs='\nPyScribble\nPython Scribble Document\nScribble documents (*.psd)\n.psd' template.SetDocStrings(docs) # Then register it with MFC. win32ui.GetApp().AddDocTemplate(template)
Notice there's some code specifically for debugging. If you execute this module multiple times, you'd potentially create multiple document templates, but all for the same class of documents (i.e., the ScribbleDocument). To this end, each time you execute this module, try to remove the document template added during the previous execution.
What does this sample code do? It has registered the ScribbleTemplate with MFC, and MFC is now capable of creating a new document. Let's see this in action. To register the template in PythonWin, perform the following steps:
Start PythonWin.
Open the sample code in PythonWin using the File menu and select Open.
From the File menu, select Import. This action executes the module in the PythonWin environment.
To test this skeleton, select New from the File menu. You will see a list of all the document templates registered in PythonWin. The list should look something like Figure 20.4.
You can now select the Python ScribbleDocument and see what happens. You should see a new Frame window, with the title PyScribble1. MFC has given the new document a default name based on the doc strings you supplied the template.
Because you haven't added any code for interacting with the user, your application won't actually do anything yet! We will now develop this skeleton into a usable Scribble application.
Although MFC and PythonWin support multiple document templates, there's a slight complication that isn't immediately obvious. When MFC is asked to open a document file, it asks each registered DocumentTemplate in turn if it can handle this document type. The default implementation for DocumentTemplates is to report that it "can possibly open this document." Thus, when you're asked to open a Scribble document, one of the other DocumentTemplate objects (e.g., the Python editor template) may be asked to handle it, rather than your ScribbleTemplate. This wouldn't be a problem if this application handled only one document template, but since PythonWin already has some of its own, it could be a problem.
Therefore, it's necessary to modify the DocumentTemplate so that when asked, it answers "I can definitely open this document." MFC then directs the open request to the template.
You provide this functionality by overriding the MFC method MatchDocType() . It's necessary for this function to first check if a document of that name is already open; this prevents users from opening the document multiple times. The document template code now looks like:
class ScribbleTemplate(pywin.mfc.docview.DocTemplate): def MatchDocType(self, fileName, fileType): doc = self.FindOpenDocument(fileName) if doc: return doc ext = string.lower(os.path.splitext(fileName)[1]) if ext =='.psd': return win32ui.CDocTemplate_Confidence_yesAttemptNative return win32ui.CDocTemplate_Confidence_noAttempt
As you can see, you check the extension of the filename, and if it matches, tell MFC that the document is indeed yours. If the extension doesn't match, tell MFC you can't open the file.
As mentioned previously, this ScribbleDocument object is responsible only for working with the document data, not for interacting with the user. This makes the ScribbleDocument quite simple. The first step is to add some public methods for working with the strokes. These functions look like:
class ScribbleDocument(pywin.mfc.docview.Document): ... def AddStroke(self, start, end, fromView): self.strokes.append((start, end)) self.SetModifiedFlag() self.UpdateAllViews( fromView, None ) def GetStrokes(self): return self.strokes
The first function appends the new stroke to the list of strokes. It also sets the document's "modified flag." This flag is used by MFC to automatically prompt the user to save the document as the program exits. It also automatically enables the File/Save option for the document.
The last thing the document must do is to load and save the data from a file. MFC itself handles displaying of the Save As, etc., dialogs, and calls Document functions to perform the actual save. The function names are OnOpenDocument() and OnSaveDocument() respectively.
As the strokes are a simple list, you can use the Python pickle module. The functions become quite easy:
def OnOpenDocument(self, filename): file = open(filename, "rb") self.strokes = pickle.load(file) file.close() win32ui.AddToRecentFileList(filename) return 1 def OnSaveDocument(self, filename): file = open(filename, "wb") pickle.dump(self.strokes, file) file.close() self.SetModifiedFlag(0) win32ui.AddToRecentFileList(filename) return 1
OnOpenDocument() loads the strokes from the named file. In addition, it places the filename to the most recently used (MRU) list. OnSaveDocument() dumps the strokes to the named file, updates the document status to indicate it's no longer modified, and adds the file to the MRU list. And that is all you need to make your document fully functional.
The View object is the most complex object in the sample. The View is responsible for all interactions with the user, which means the View must collect the strokes as the user draws them, and also draw the entire list of strokes whenever the window requires repainting.
The collection of the strokes is the most complex part. To collect effectively, you must trap the user pressing the mouse button in the window. Once this occurs, enter a drawing mode, and as the mouse is moved, draw a line to the current position. When the user releases the mouse button, they have completed the stroke, so add the stroke to the document. The key steps to coax this behavior are:
The View must hook the relevant mouse messages: in this case, the LBUTTONDOWN, LBUTTONUP, and MOUSEMOVE messages.
When a LBUTTONDOWN message is received, remember the start position and enter a drawing mode. Also capture the mouse, to ensure that you get all future mouse messages, even when the mouse leaves the window.
If a MOUSEMOVE message occurs when you are in drawing mode, draw a line from the remembered start position to the current mouse position. In addition, erase the previous line drawn by this process. This gives a "rubber band" effect as you move the mouse.
When a LBUTTONUP message is received, notify the document of the new, completed stroke, release the mouse capture, and leave drawing mode.
After adding this logic to the sample, it now looks like:
class ScribbleView(pywin.mfc.docview.ScrollView): def OnInitialUpdate(self): self.SetScrollSizes(win32con.MM_TEXT, (0, 0)) self.HookMessage(self.OnLButtonDown,win32con.WM_LBUTTONDOWN) self.HookMessage(self.OnLButtonUp,win32con.WM_LBUTTONUP) self.HookMessage(self.OnMouseMove,win32con.WM_MOUSEMOVE) self.bDrawing = 0 def OnLButtonDown(self, params): assert not self.bDrawing, "Button down message while still drawing" startPos = params[5] # Convert the startpos to Client coordinates. self.startPos = self.ScreenToClient(startPos) self.lastPos = self.startPos # Capture all future mouse movement. self.SetCapture() self.bDrawing = 1 def OnLButtonUp(self, params): assert self.bDrawing, "Button up message, but not drawing!" endPos = params[5] endPos = self.ScreenToClient(endPos) self.ReleaseCapture() self.bDrawing = 0 # And add the stroke to the document. self.GetDocument().AddStroke( self.startPos, endPos, self ) def OnMouseMove(self, params): # If Im not drawing at the moment, I don't care if not self.bDrawing: return pos = params[5] dc = self.GetDC() # Setup for an inverting draw operation. dc.SetROP2(win32con.R2_NOT) # "undraw" the old line dc.MoveTo(self.startPos) dc.LineTo(self.lastPos) # Now draw the new position self.lastPos = self.ScreenToClient(pos) dc.MoveTo(self.startPos) dc.LineTo(self.lastPos)
Most of this code should be quite obvious. It's worth mentioning that you tell Windows to draw the line using a NOT mode. This mode is handy; if you draw the same line twice, the second draw erases the first. Thus, to erase a line you drew previously, all you need is to draw the same line again.
Another key point is that the mouse messages all report the position in "Screen Coordinates" (i.e., relative to the top-left corner of the screen) rather than in "Client Coordinates" (i.e., relative to the top-left corner of our window). You use a member function PyCWnd.ScreenToClient() to transform these coordinates.
The final step to complete the View is to draw all your strokes whenever the window requires updating. This code is simple: you iterate over the list of strokes for the document, drawing lines between the coordinates. To obtain this behavior, use the code:
def OnDraw(self, dc): # All we need to is get the strokes, and paint them. doc = self.GetDocument() for startPos, endPos in doc.GetStrokes(): dc.MoveTo(startPos) dc.LineTo(endPos)
And that's it! You now have a fully functional drawing application, capable of loading and saving itself from disk.
The simplest way to create an application object for Scribble is to subclass one of the standard application objects. The PythonWin application object is implemented in pywin.framework.intpyapp , and it derives from the CApp class in pywin.framework.app. This base class provides much of the functionality for an application, so we too will derive our application from CApp.
This makes the application object small and simple. You obviously may need to enhance certain aspects; in this case, you should use the pywin.framework modules as a guide. The minimal application object looks like:
# scribbleApp.py # # The application object for Python. from pywin.framework.app import CApp class ScribbleApplication(CApp): def InitInstance(self): # All we need do is call the base class, # then import our document template. CApp.InitInstance(self) import scribble2 # And create our application object. ScribbleApplication()
To run this, use the following command line:
C:\Scripts> start pythonwin /app scribbleApp.py
An instance of Pythonwin.exe now starts, but uses the application object you defined. Therefore, there'a no Interactive Window, the application doesn't offer to open .py files, etc. The Scribble application should look like Figure 20.5.
There is also a technique to avoid this command line, but you need a copy of a resource editor (such as Microsoft Visual C++). You can take a copy of Pythonwin.exe (name it something suitable for your application), then open the .exe in the resource editor and locate an entry in the string table with the value pywin.framework.startup. This is the name of a module executed to boot the PythonWin application; the default script parses the "/app" off the command line and loads that application. You can change this to any value you like, and PythonWin then loads your startup script. See startup.py in the PythonWin distribution for an example of a startup script.
As we've discussed, MFC provides a framework architecture, and much of this architecture is tied together by resource IDs, integers that identify Windows resources in a DLL or executable.
For example, when you define a DocumentTemplate, you specify a resource ID. The previous example doesn't specify a resource ID, so the default of win32ui.IDR_PYTHONTYPE is used. When a document is created, MFC uses the resource ID in the following ways:
The menu with the ID is loaded and used for the document's frame. This allows each document supported in an application to have a unique set of menus as is common in MDI applications.
The icon with the ID is loaded and used for the document's frame.
The accelerator with that ID is loaded, providing document-specific shortcut keys to many of the menu functions.
Another example of the reliance on resource IDs is in the processing and definition of menu and toolbar items. Each command in the application is assigned an ID. When you define menu or toolbar items, you specify the menu text (or toolbar bitmap) and the command ID. When MFC displays a menu item, it uses a string defined with the same ID and places this text automatically in the application's status bar. When the mouse hovers over a toolbar item, MFC again looks for a string with the specified ID and uses it for the tooltip-text for the button. This architecture has a number of advantages:
Hooking the various pieces of your application together becomes simple. You define an icon, menu, accelerators, strings, and so forth with the same resource ID, and MFC automatically ties all these together for your application.
If you are working with an existing MFC or C++ application, there's a good chance you already use resources in a similar fashion, so PythonWin often fits naturally when embedded in these applications.
When you need to respond to a GUI command, specify the command ID. The same code then handles the command regardless of whether it was sourced from the keyboard, toolbar or menu.
Localizing your application for other languages becomes simpler. You define new resources in the new language but use the same IDs, and the application still works regardless of the particular resources in use at the time.
However, it also has a number of disadvantages:
Python doesn't have a technique for defining resources, such as dialogs, menus, toolbars, or strings. So while this scheme works well using MFC from Microsoft Visual C++ (which does provide this facility), it doesn't work as well from Python.
It's a pain to move beyond the MFC-provided framework. As soon as you begin manually defining and managing these resources, you aren't much better off than if you simply had used the raw Windows GUI API.
PythonWin can use resources from arbitrary DLLs, thus you can define your own DLL containing only resources. PythonWin makes it easy to use these resources; just load the DLL (using win32ui.LoadLibrary()), and PythonWin locates and uses the resources in this DLL.
If you are writing a large application, you'll probably find it worthwhile to define your own resource DLL when using PythonWin. The benefits offered by the framework make it worth the pain of initially setting everything up. On the other hand, it does make PythonWin somewhat cumbersome for defining these applications purely from Python code.
For the vast majority of Python users in Windows, PythonWin will never be more than an interesting IDE environment for developing Python applications. But many other Windows developers are beginning to use PythonWin to develop Windows applications. When comparing the three GUI toolkits available in this book, you will probably come to the conclusion that PythonWin is the least suitable for simple, small GUI applications written in Python, and this would be fair. However, depending on your particular circumstances (usually either because you have an existing MFC investment or it's important to use some user-interface features offered only by PythonWin), it may be a good choice.
PythonWin suffers from a lack of decent documentation. A Windows help file is included that contains a reference guide for all of the objects and methods exposed by PythonWin, but PythonWin doesn't include a comprehensive overview of the MFC framework. There are many good MFC books available, so a specific recommendation is impossible. Information from Microsoft on MFC can be found at http://msdn.microsoft.com/visualc/.
| I l@ve RuBoard |


WITNESS LIST Jurisprudence Committee July 10, 2003 - 1:00P Redistricting ON: Herbert, J. Gerald (Texas Congressional Democrats), Alexandria, VA Hicks, Renea (Democratic Congressional Delegation), Austin, TX SB 10 FOR: Barnhill, John (Harris County Attorney), Houston, TX AGAINST: Bullard, Joe (Tandem Energy Corporation), Montgomery, TX Dyer, Billy (Self), Houston, TX Hotze, Bruce (Self), Houston, TX Montague, Dixon (Self), Houston, TX ON: Block, Gary (Self), Houston, TX Davidson, Mark (Self), Houston, TX Registering, but not testifying: For: Emal, Matthew (City of Houston), Houston, TX Radack, Steve Commissioner (Harris County Precinct 3), Houston, TX Against: Bolton, David (Self), Austin, TX Brochstein, Raymond (Self), Houston, TX Hoaglund, W. Allyn (Self), Houston, TX


|
SystemC
2.3.3
Accellera SystemC proof-of-concept library
|
#include <sysc/utils/sc_pq.h>
Public Member Functions | |
| sc_ppq (int sz, compare_fn_t cmp) | |
| ~sc_ppq () | |
| T | top () const |
| T | extract_top () |
| void | insert (T elem) |
| Public Member Functions inherited from sc_core::sc_ppq_base | |
| sc_ppq_base (int sz, compare_fn_t cmp) | |
| ~sc_ppq_base () | |
| void * | top () const |
| void * | extract_top () |
| void | insert (void *elem) |
| int | size () const |
| bool | empty () const |
Additional Inherited Members | |
| Public Types inherited from sc_core::sc_ppq_base | |
| typedef int(* | compare_fn_t) (const void *, const void *) |
| Protected Member Functions inherited from sc_core::sc_ppq_base | |
| int | parent (int i) const |
| int | left (int i) const |
| int | right (int i) const |
| void | heapify (int i) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |


MOONRAKER A film review by Steve Rhodes Copyright 1998 Steve Rhodes
RATING (0 TO ****): ** 1/2
"Houston calling, Houston calling," a frustrated NASA ground controller says, trying reach James Bond and his female CIA companion out in space. Well, devotees of the series can guess their compromising positions, so when the controller announces he is about to initiate a live video feed directly into the White House and Buckingham Palace, the audience knows that we are about to have some embarrassed world leaders. Bond, on the other hand, remains typically unfazed. He's used to having his affairs being interrupted and observed. Another hard day in the life of the planet's most famous secret agent.
In the opening to 1979's MOONRAKER, the American space shuttle of the same name is stolen from the top of the 747 on which it is being carried to Britain. In a spectacular action sequence, the shuttle blasts away, turning the 747 into a fireball.
The maker of the shuttle and several others like it is a wealthy industrialist named Mr. Drax (Michel Lonsdale). He lives in California in an enormous French chateau, which he had brought over stone by stone from France. (He purchased the Eiffel Tower as well, but the inhospitable French wouldn't give him an export permit.)
When the British government enlists the aid of its best agent to investigate the shuttle's disappearance, James starts his inquiries at Mr. Drax's home and laboratories. With complete lack of subtly, the nefarious Mr. Drax sends his henchman, Chang, played without much energy by Toshiro Suga, to see that Mr. Bond's visit isn't a pleasant one. "Take care of Mr. Bond," Drax instructs Chang. "See that some harm comes to him."
In his fourth outing as James Bond and now firmly entrenched in his role as the superspy, Roger Moore seems comfortable in his perfectly tailored blue suit as he charms every female character. One of them, CIA agent Holly Goodhead, played by Lois Chiles from BROADCAST NEWS, has a knockout body and her own little bag of spy gadgets that rivals Bond's.
From France set in California, James hops the globe to Venice in pursuit of Dr. Goodhead -- she's in disguise as a member of Drax's space institute. And to the serenity of the peach colored stone walls of the Venetian canals, Bond and those chasing him bring powerboats, machine guns and gondolas that go on land as well as water. There's even a knife-wielding corpse who pops out of a gasket during a funeral procession through the Venetian waterways.
On the next stop in our spy adventure cum travelogue we take the supersonic Concorde to Rio de Janeiro as Bond follows a lead on an ultra-poisonous gas. Like any tourist James relaxes a bit. His version of casual dress is to trade his blue suit in briefly for a white one. His informality doesn't last long. Soon he's decked out in a formal tuxedo, in which, as in everything he wears; he looks straight out of a GQ fashion shoot.
Jaws (Richard Kiel), the man with a mouth of metal from THE SPY WHO LOVED ME, returns again to try to thwart our hero. Although his metal may make mincemeat of his victims, we do learn some of its downsides, clearing security's metal detectors at airports being one. Why Bond and Dr. Goodhead choose to engage a seven-foot giant like Jaws in hand-to-hand combat rather than just plugging him is one of the story's many mysteries. But just as you're not supposed to question the logic of cartoons, neither should you waste too much time pondering the likelihood of Bond's predicaments and their resolutions.
The bad guy's plan this time is suitably dastardly. Our megalomaniac plans on ending civilization on the earth, it's a complete annihilation with repopulation by carefully selected humans. With shades of the ark, the space shuttles carry young couples who look like the cast of STARSHIP TROOPERS.
The space odyssey scenes, although fresh, slow down the pacing of a story already having trouble keeping up its momentum. And although the fight with a big rubber snake, I mean a man-crushing python, isn't much, the battle with the green-light laser weapons does have good visuals even if it looks lifted straight out of STAR WARS.
Besides, any movie where the lead wears a coat and a tie in a centrifuge is clearly one that doesn't need to be taken too seriously. Just kick back and enjoy it.
MOONRAKER runs a little long at 2:06. It is rated PG for comic violence and sexual innuendo and would be fine for kids around 9 and up.
My son Jeffrey, almost 9, said he thought it was a good movie, and he ended up liking Jaws, whom he hated in the last episode. He especially liked the scenes in space with all of the super-lasers shooting at each other. His favorite weapon was Bond's "flick of the wrist gun."
The review above was posted to the
rec.arts.movies.reviews newsgroup (de.rec.film.kritiken for German reviews).
The Internet Movie Database accepts no responsibility for the contents of the
review and has no editorial control. Unless stated otherwise, the copyright
belongs to the author.
Please direct comments/criticisms of the review to relevant newsgroups.
Broken URLs inthe reviews are the responsibility of the author.
The formatting of the review is likely to differ from the original due
to ASCII to HTML conversion.
Related links: index of all rec.arts.movies.reviews reviews


Cache Simulator
Louis P. Santillán
EE547A
Winter 2006
Get Trace from URL:
Get Trace from local file:
Cache Type:
Direct Mapped
Set Associative
Fully Associative
Cache Size (Bytes):
64
128
256
Block Size (words per block):
1
2
4
Associativity:
1-way
2-way
4-way
8-way
16-way
16-bit hexadecimal addresses and 4-byte words assumed in all cases for trace file
Trace:
Results:


Machine Learning, neural networks, hyperspectral image processing, inverse problem, Communication systems
Chao Zhou received his B.S. degree in Communication Engineering from Wuhan University of Technology, Wuhan, China, in 2015, M.S. degree in Communication and Information Systems from University of Electronic Science and Technology of China, Chengdu, China, in 2018. Chao is currently pursuing his PhD with Dept. of Electronic and Electrical Engineering at University College London.


Status
History
×
Error!
Success!
—
Files
Add file
—
Edit defaults
Rsync
Source
Destination
Run hours
Priority
Last synced
Configuration
File edit
×
Logs
×
Are you sure
Do you want to proceed?


We provide actionable strategic planning services that help our clients drive their data transformation goals
We assess demand and design custom data services that enable businesses to rapidly deploy and scale delivery
We manage data delivery across the supply chain using real time and on-demand cloud based microservices.


Interactive Ænigma's
These are web versions of a few of Pavel's Adalogical Ænigmas.
Warning
After the example they tend to be quite hard. If you have trouble or find a bug please see contact information on the bottom of each Ænigma
-
-
Help neighbors take an ideal walk.
-
A forest-themed puzzle.
(not as full-featured)
-
A puzzle in the style of golf.
-
Liars and truth tellers must be found in this puzzle.
-
-
-
A masyu puzzle


Serial Logger Service is a Windows NT/2000/XP service that records all data received on a serial port to a file on a disk or to an ODBC data source. It was originally designed to record telephone traffic data from a phone system (PBX) for later analysis. For this reason, it was designed to be very robust and includes features to notify an administrator if no data is received in a certain amount of time. However, Serial Logger Service is generic enough to be useful whenever one-way serial traffic needs to be recorded.
Now Serial Logger Service has the capability to run multiple instances simultaneously so that multiple ports can be logged.
Unlike most other serial logging applications, Serial Logger Service runs as a service so that it starts as soon as the operating system starts and doesn't require a user to log in and run it. It will continue to run even as users logon and logoff the workstation. Since services are an advanced operating system feature, Serial Logger Service does not run on Windows 95/98/Me.
After you have successfully installed Serial Logger Service, use the following simple steps to configure and run it.


Simple Switch Sample
The 'default' can be anywhere
Multiple case statements
Forget a break
Strict comparison
Block-level scope problem
Block-level scope resolution


September 2015
Burundi is a landlocked country at the heart of Africa’s Great Lakes Region, located between the meridians 29°00’-30°25 East and parallels 2°20°-4°25’ South. It has an area of 27,834 km² and belongs to two major river basins: the NileBasin, accounting for 13,800 km² of the country’s territory, and the CongoBasin, covering 14,034 km². Its mostly rural population, with an urbanization rate of around 10.4%, was estimated at 8,053,574 at the time of the 2008 census, with an average density of 310 inhabitants/km².
The Burundian economy is dominated by the primary sector, which accounts for nearly half of its gross domestic product (GDP) and close to 80% of its export income; the secondary sector (industry and handicraft) represents just 17-18% of GDP, and the tertiary sector, only about one third of GDP. The current production structure, dominated by subsistence farming, makes the economy very vulnerable and fragile due to its dependency on climate conditions.
Electrical power consumption in Burundi, amounting to 25 kWh/person/year, represents just 4% of the energy balance.
In Burundi, activities relating to climate change were marked in particular by the development and publication of the first and second national communications under the UNFCCC. At the same time, Burundi also prepared its National Adaptation Programme of Action to climate change (NAPA). The actions identified in the NAPA covered the key sectors of the Burundian economy. As various sectoral adaptation and vulnerability assessment studies have shown, climate change affects every sector of the country’s economy, particularly agriculture.
The prospects for sustainable ecological growth were defined through Burundi Vision 2025 and translated into a short term action plan as part of the Growth and Poverty Reduction Strategic Framework covering the period of 2012-2015. In the medium to long term, the Government plans to engage in a transition toward a green economy. Burundi Vision 2025 makes a firm commitment to prioritizing the country’s protection and rational management of the environment such that Burundians can live in a protected, properly managed setting.
The Government has stated itsvision of the fight against climate change as follows: "A State that promotes development that is resilient to the harmful effects of climate change".
At the institutional level, the Ministry of Water, the Environment, Land Management and Urban Planning, with its departments and personalized institutionssuch asIGEBU and OBPE, handles matters relating to climate change. For the fulfilment of its mission, the Ministry enjoys the support of frameworks for dialogue such as the National Environment Commission, the Sectoral Group on Water, Sanitation and the Environment (GSEAE), the National Water Partnership (PNE-Bu), and the National Platform for Risk Prevention and Disaster Management.
In the framework of its Intended Nationally Determined Contribution (INDC), Burundi intends to reaffirm its determination to contribute to global efforts to reduce greenhouse gas emissions and to strengthen its resilience to climate change while continuing to meet its own development challenges.
Studies conducted for the initial national communication on climate change and the evolution of climate parameters in Burundi through 2050, based on the general circulation model, show that the average annual temperature will increase by 1°C to 3°C. Rainfall will rise by roughly 10%, and the precipitation regime will be disrupted such that there will only be two seasons remaining, each lasting six months: a rainy season from November to April, followed by a dry season.
These climate changes will engender a large number of risks associated with the following phenomena: (i) season creep; (ii) flooding of swamps and lowlands; (iii) land degradation and loss of soil fertility; (iv) shortage of groundwater resources; (v) extreme weather events (hail, violent showers, heavy winds, etc.); (vi) changes to the growing seasons of crops and forests; and (vii) unpredictable movements of pests.
According to an integrated analysis of Burundi’s vulnerability, conducted as part of the ACCES (Climate Change Adaptation for Soil and Water Resources Conservation) Project, it was found that the country’s “hotspots of vulnerability” are located in the north and northwest. The slope of the ridge (and not the ridge itself) leading to the Imbo Plain to the west, the topographical structures to the north and the central plateau are the regions most vulnerable to erosion. The main causes are the highly variable relief and the pronounced sensitivity of those regions to climate variability.
Table 1: Major impacts relating to climate change in Burundi (Source: NAPA 2007)
| Sector | Impacts |
|---|---|
| Water |
|
| Energy |
|
| Agriculture and livestock farming |
|
| Health |
|
| Landscapes |
|
| Terrestrial ecosystems (forests) |
|
To reduce Burundi’s vulnerability and boost its resilience, the country’s needs have been identified. These relate to human, institutional, technical and financial capacity- building, as well as technology transfers.
The country needs to:
| Need | Objectives and Description |
|---|---|
| Key measure: Development of access to water while enhancing the efficiency of its use | |
| Water resources control and management |
|
| Key measure: Promotion of intensified water-efficient agriculture | |
| Intensification and diversification of agricultural production |
|
| Key measure: Security for animal and fishing production, and promotion of associations | |
| Security for livestock farming and support for the association of agriculture and livestock |
|
| Support for the exploitation of fishing resources |
|
| Key measure: Support for facilities that use renewable energy sources | |
| Improvement of the population’s well-being |
|
| Key measure: Communications on climate risks and adaptation scenarios | |
| Knowledge of spatial and temporal changes to the environment |
|
Specifically concerning adaptation to climate change, the priorities are outlined in the following documents:
Table 2: Sectoral policies and strategies in place for adaptation to climate change
| Sector | Current Policy and Strategy Document | Priorities |
|---|---|---|
| Water |
|
|
| Energy |
|
|
| Forestry | National Forestry Policy of Burundi (2012) |
|
| Agriculture & Livestock |
|
|
The following programmes were identified as part of the National Strategy and Action Plan on Climate Change (2012):
| Programme name | Components |
|---|---|
| Climate risk adaptation and management | Integrated water resources management by a small hydrological unit Integrated management of climate risk and forecasts over time (by means of probabilities and forward-looking studies) so as to be able to take action in advance Protection of aquatic and land-based ecosystems Coaching of the population to develop their resilience to climate change Development of institutional and operational capacities to coordinate programmes that are resilient to climate change Research on the vulnerability and adaptation of socioeconomic sectors to climate change Establishment of functional monitoring and evaluation mechanisms for climate change, as well as knowledge management and information mechanisms Research and extension of drought-resistant forest species Promotion of climate-smart agriculture (agrometeorology) |
| Capacity-building, knowledge management and communication | Enhancement of data and information management and distribution mechanisms Reinforcement of climate change impact tracking systems by means of observations and investigations Improvement of scientific and technological research on adapting to climate change, supported by climate observations Improvement of the legislative and regulatory framework for handling climate change as part of investment programmes and the promotion of public-private partnerships Strengthening of the information and data communication and exchange system |
In terms of mitigation, the desired INDC for Burundi should make it possible to meet the sustainability objectives defined in national policies and strategies.
| Expected rate of reduction | ||
|---|---|---|
| Type of contribution | Unconditional contribution | Reduction of greenhouse gas emissions by 3% compared to the business-as-usual (BAU) scenario for 2030 |
| Conditional contribution | Reduction of greenhouse gas emissions by 20%, beginning in 2016, compared to the business-as-usual scenario for 2030 | |
| Baseline year | 2005 | |
| Target year | 2030 | |
| Total reduction in emissions by 2030 | 1,958 Gg CO2e for the unconditional objective and 14,897 Gg CO2e for the conditional objective |
The table below presents the emissions for the baseline year and the business-as- usual (BAU) scenario, the emissions for the unconditional objective and the emissions for the conditional objective, whose implementation will depend on the financial support of the international community.
Under the National Reforestation Programme, Burundi has undertaken to increase its carbon dioxide gas well through 4,000 hectares of annual reforestation over the course of 15 years, beginning in 2016.
In the energy sector, Burundi is in the process of building three hydroelectric power plants. This programme will increase the country’s electrification rate to 35%.
Table 3: Emissions by mitigation objective
| OBJECTIVE | Percentage | CO2e emissions (Gg) |
|---|---|---|
| Unconditional objective (2030) % | 3% | 1,958 |
| Conditional objective (2030) % | 20% | 14,897 |
| Unconditional objective (2025) % | 2% | 1,305 |
| Conditional objective (2025) % | 17% | 9,897 |
| Unconditional objective (2020) % | 1% | 653 |
| Conditional objective (2020) % | 11% | 4,897 |
Table 4: Scope and scale of the contribution
| Sector | Gas(es) | Sub-sector(s) | Geographic scope |
|---|---|---|---|
| Energy | CO2, CH4 and N2O | Fuel combustion activities | Nationwide |
| Agriculture & livestock | CH4 and N2O | Agricultural soils | Nationwide |
| Land use and forestry | CO2 | Forestland | Nationwide |
The choice of assumptions is guided by the development planning orientations defined in Burundi Vision 2025 and the national operationalization policies and strategies for the Vision.
The GHG inventories were performed on five modules identified by the IPCC: Industrial Processes, Energy, Agriculture, Land Use, Land Use Change and Forestry (LULUCF), as well as the Waste module.
100 years of GWP values were used for the conversion to CO2 equivalents (IPCC Assessment Report). These numbers were 21 for CH4 and 310 for N2O.
The policy documents thattake GHG emissions generating activities into consideration - and that were used to formulate the assumptions and objectives - appear in Table 5.
Table 5: Documents used to formulate assumptions and objectives
| Sector | Current Policy and Strategy Documents |
|---|---|
| Energy | Sectoral Strategy for the Energy Sector in Burundi (2011) National Environment Strategy (SNEB, 1997) |
| Land use and forestry | National Forestry Policy of Burundi (2012) National Strategy and Action Plan for Biodiversity (2013-2020) |
| Agriculture | National Agricultural Strategy, 2008-2015 (2008) National Sustainable Land Use Strategy (2007) National Action Programme to Fight Land Degradation (2005) National Strategy and Action Plan to Fight Soil Degradation (2011-2016) National Agricultural Investment Plan (2012-2017) |
| Vision Burundi 2025 Strategic Framework for Growth (2012) | |
| All sectors | First and second national communications on climate change (2001 and 2010) National Adaptation Planof Action to climate change (2007) Summary report on greenhouse gas inventories (2009) Summary report on GHG emissions mitigation studies (2009) National Climate Change Policy (2013) National Strategy and Action Plan on Climate Change (2013) |
In terms of compensation for any loss of revenue or for the restriction of certain economic activities due to the implementation of the INDC programme, Burundi will rely on international greenhouse gas emissions compensation mechanisms and on current national legislation.
In terms of forestry in particular, the plan is to promote the development of ecosystem services.
Concerning carbon counting and verification methods, Burundi will conform to the IPCC’s guidelines.
Limiting the rise in GHG emissions presents a major challenge for Burundi, in view of its national context. Economically, Burundi is ranked a least developed country (LDC), with per capita GDP ofUS $282 (in 2012).
Burundi also has significant structural vulnerability due in particular to the country’s landlocked status and its exposure to weather and natural hazards. According to United Nations statistics, Burundi’s economic vulnerability index is 56.81 compared with an average of 45.7 in 2012 across all of the least developed countries. Faced with these development challenges, Burundi’s contribution is an ambitious one, as it plans for a 3% reduction in its emissions by 2030 for the unconditional scenario, and by 20% by that same year for its conditional objective.
The Government of Burundi will implement the INDC through the Ministry of the Environment, which is the government institution in charge of ensuring the implementation of international conventions relating to the environment. It will used its customized departments and institutions like IGEBU and the OBPE, which handle questions associated with climate change, but also frameworks for dialogue such as the National Environment Commission, the Sectoral Group on Water, Sanitation and the Environment (GSEAE), the National Water Partnership (PNE-Bu), and the National Platform for Risk Prevention and Disaster Management.
Despite the non-negligible step already taken to create and build capacities, national experts are still insufficient and have not yet acquired significant proficiency in the tools and methodologies available to produce GHG emissions inventories, climate change vulnerability and adaptation studies, and GHG emissions mitigation studies, as well as solid proficiency in the procedures used to compile financing applications for the available funding mechanisms. As a result, capacity-building will be needed to offset the following:
Burundi does not have the technical resources to do research and development in the field of climate change and has no national programme on the subject. As part of the INDC’s implementation, Burundi’s technology transfer actions will pertain to:
Gender, youth and vulnerable groups are concerns that have not always been taken into account in Burundi’s national and sectoral socioeconomic development plans. In its Vision 2025, the Government of Burundi considers these to be cross-cutting issues to be incorporated into all development programmes. The same will apply to implementation of the INDC.
As was underscored above, most of the climate change adaptation actions identified in previously developed national and sectoral action plans have not yet been implemented for want of the financial means to do so. The table below summarizes the financial needs for implementation of the INDC in the form of programmes.
Table 6: Programmes and costs associated with implementation of the INDC (Source: National Strategy and Action Plan on Climate Change, 2012)
| Programme Name | Components | Cost (in US$K) |
|---|---|---|
| Climate risk adaptation and management |
|
3,719 |
| Mitigation of greenhouse gas emissions and low carbon developments |
|
1,446,118 |
| Promotion of research & development and technology transfers |
|
25,787 |
| Capacity-building, knowledge management and communication |
|
3,465 |
| Reforestation and agroforestry[1] |
|
10,000 |
| Extension of improved kilns[1] |
|
1,500 |
| Extension of improved domestic and artisanal ovens[1] |
|
3,000 |
ACCES: Climate Change Adaptation for Soil and Water Resources Conservation Project
CC: Climate change
CDM: Clean Development Mechanism
CO2e: Carbon dioxide equivalent
GDP: Gross domestic product
Gg CO2e: Gigagram of carbon dioxide equivalent
Gg: Gigagram
GHGI: Greenhouse gas inventory
GSEAE: Sectoral Group on Water, Sanitation and the Environment
IGEBU: Geographic Institute of Burundi
INDC: Intended Nationally Determined Contribution
INECN: National Institute for the Environment and Nature Conservation
IPCC: Intergovernmental Panel on Climate Change
LULUCF: Land use, land use change and forestry
MEEATU: Ministry of Water, Environment, Land Management and Urban Planning
NAPA: National Adaptation Programme of Action
OBPE: Burundian Office for the Protection of the Environment
SFPR: Strategy Framework for Poverty Reduction
UNFCCC: United Nations Framework Convention on Climate Change
1. Communal forest management plan (MEEATU/PPCDR, 2013). ↩ ↩ ↩


Visualiser
Visualiser
Select a Country
New Zealand
Cook Islands
Other
Select number of populations
1
2
3
4
Select a geographic type
National
Sub-National
Select a sub-national type
Regional
TLA
DHB
Rohe
Select an age grouping
Total
5-year bands
Other
Select a standard type
External
Internal
Select a standard type
WHO
Segi
Maori 13 Census
Standard population
Population 1 (default)
Standard population
Population 1 (default)
Population 2
Standard population
Population 1 (default)
Population 2
Population 3
Standard population
Population 1 (default)
Population 2
Population 3
Population 4
Select a baseline
Population 1 (default)
Select a baseline
Population 1 (default)
Population 2
Select a baseline
Population 1 (default)
Population 2
Population 3
Select a baseline
Population 1 (default)
Population 2
Population 3
Population 4
Population 1:
Select a mortality cause
Total Mortality
Gastric Death
Gastric Incidence
Select an ethnicity
Total
Maori
Non-Maori
Select a gender
Total
Male
Female
Population 2:
Select a mortality cause
Total Mortality
Gastric Death
Gastric Incidence
Select an ethnicity
Total
Maori
Non-Maori
Select a gender
Total
Male
Female
Population 3:
Select a mortality cause
Total Mortality
Gastric Death
Gastric Incidence
Select an ethnicity
Total
Maori
Non-Maori
Select a gender
Total
Male
Female
Population 4:
Select a mortality cause
Total Mortality
Gastric Death
Gastric Incidence
Select an ethnicity
Total
Maori
Non-Maori
Select a gender
Total
Male
Female
Table
Graph 1
Graph 2


Hadley Wickham’s excellent book on R Packages includes a great chapter on Git and GitHub. While the chapter (and book) is focused on R packages specifically, the guidance in this chapter would apply to any R Project directory under version control, whether or not the R Project is for a package. This book is available free online or as a print version through O’Reilly (and carried at many Barnes & Nobles).
If you’re using git a lot for R projects, it’s helpful to have some resources available with more on using git through a Bash Shell. I like the book Pragmatic Guide to Git by Travis Swicegood for a quick, short reference and Git in Practice by Mike McQuaid if I’m trying to dig a bit deeper and figure out how git works. I have also heard good things about Pro Git by Scott Chacon and Ben Straub, which is available for free online.
However, these resources are all geared to those using git for its original purpose of tracking changes in software development projects. When you use git to track files for a research project (rather than, for example, for a repository for an R package you’re writing), you may have some needs that don’t come up under software development. A few articles have come out recently that give advice on using git specifically to track research projects—these provide helpful advice specific to this use of git, which you won’t find in books about git, including one by RStudio’s Jenny Bryan (Bryan 2018Bryan, Jennifer. 2018. “Excuse Me, Do You Have a Moment to Talk About Version Control?” The American Statistician 72 (1): 20–27.).
StackOverflow is also invaluable to quickly look up how to do something in git. There are many tasks in git where I never remember the command, but I do remember enough about what the functionality is called to be able to quickly use Google to find a StackOverflow thread that gives me the call. Reading through a book or tutorial on git, even if you don’t remember the commands you learn, can help you learn some of the vocabulary11 Some good git-related words to know to help you search for calls for rarer tasks: “commit”, “branch”, “merge”, “revert”, “push”, “pull”, “merge conflict”, “remote”, “origin”, “master”, “fork”, “clone”, “pull request”., and knowing that vocabulary will help you search for answers when you need them.
Finally, if you can find a way to do it, I think the best and easiest way to learn to use git and GitHub with R is to collaborate with someone who’s used these tools before. Most of the time, these tools are very easy to use, but the small percent of the time that they’re not, it can be significant stumbling blocks (in terms of the time it takes to figure out the fix) the first few times you use the tools, while someone familiar with them and working on the project can diagnose and get you over those bumps as you learn the ropes.


{% extends 'layout.html' %} {% block content %}
|
Hi {{ template_data.get('name', '')|title }}, Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. |


Ruby Classes
8/9/15
Creating a class in Ruby allows programmers to group methods together into a single bundle. This is convenient because it allows us to quickly create objects that behave the exact same way. Every individual object created by a class is referred to as an "instance" of a class. Here is an example of a simple class in Ruby:
class Car
def initialize(brand, name)
@brand = brand
@name = name
end
def vroom
puts 'Vroooom!'
end
def details
puts "This fine car is a #{@brand} <EMAIL_ADDRESS>end
end
Let's start from the top. A class is defined like this: class ClassName
. In my example Car
is the class which must be written in CamelCase. Within the class Car
are 3 methods: initialize
, vroom
, and details
. All three methods create the behaviors of the class Car
. initialize
is a class method while vroom
and details
are instance methods. Let's go over the differences between class methods and instance methods.
Class Methods vs. Instance Methods
Class methods are only called on the class name while instance methods are only called on instances of a class. This may sound confusing but I promise it is simple. Let's use some more code as an example:
my_car = Car.new("toyota", "camry")
The class method initialize
is being ran on the class Car
and accepts two arguments. Since my_car
is a new instance of the Car
class, instance methods may be called upon it.
my_car.vroom
will puts Vroooom
my_car.details
will puts This fine car is a toyota camry.


ADC
Teensy 3.0, 3.1, 3.2, LC, 3.5, 3.6, and 4 ADC implementation library created by Pedro Villanueva.
See examples folder and documentation.
Documentation:If you download the library from here, also install the latest Teensyduino version at https://www.pjrc.com/teensy/td_download.html.
This thread in the Teensy forum also has information: http://forum.pjrc.com/threads/25532-ADC-library-update-now-with-support-for-Teensy-3-1
License
Teensy 4.x, 3.x, LC ADC library
https://github.com/pedvide/ADC
Copyright (c) 2020 Pedro Villanueva
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
 IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


This page contains resources meant for third party programs. They will be accessed via various APIs and are not meant to be downloaded directly by web viewing consumers.
I will advise that you head to my repositories directly instead if you came here from the web.


Seven KZN teachers expelled for sexual misconduct
The provincial department of education says the staff were given a fair disciplinary hearing before they were expelled.
by News24WireFile image.

This was announced by the department’s spokesperson Kwazi Mshengu in a statement on Friday, citing the expulsions as part of “a continuous effort of cleansing” the department. The decision comes after the department had “exhausted all internal disciplinary processes”, according to the statement.
“It is important to mention that the majority of teachers in KwaZulu-Natal are role models to learners, and they inspire and encourage learners to strive for greatness and fullest potential. We do, however, have a few educators who continue to disappoint in terms of their behaviour in as far as sexual misconduct is concerned.”
The staff were given a fair disciplinary hearing before they were expelled, the statement read.
Mshengu adds: “Children should be safe at school and with their teachers. Teachers and other adults supervising young people build up trust through their close contact every day. So, it is particularly damaging when that trust is abused or broken, and sexually inappropriate behaviour takes place.”


XSTDCMAP(1) XSTDCMAP(1) NAME xstdcmap - X standard colormap utility SYNOPSIS xstdcmap [-all] [-best] [-blue] [-default] [-delete map] [-display dis‐ play] [-gray] [-green] [-help] [-red] [-verbose] DESCRIPTION The xstdcmap utility can be used to selectively define standard colormap properties. It is intended to be run from a user's X startup script to create standard colormap definitions in order to facilitate sharing of scarce colormap resources among clients. Where at all possible, col‐ ormaps are created with read-only allocations. OPTIONS The following options may be used with xstdcmap: -all This option indicates that all six standard colormap properties should be defined on each screen of the display. Not all screens will support visuals under which all six standard colormap prop‐ erties are meaningful. xstdcmap will determine the best alloca‐ tions and visuals for the colormap properties of a screen. Any previously existing standard colormap properties will be replaced. -best This option indicates that the RGB_BEST_MAP should be defined. -blue This option indicates that the RGB_BLUE_MAP should be defined. -default This option indicates that the RGB_DEFAULT_MAP should be defined. -delete map This option specifies that a specific standard colormap property, or all such properties, should be removed. map may be one of: default, best, red, green, blue, gray, or all. -display display This option specifies the host and display to use; see X(7). -gray This option indicates that the RGB_GRAY_MAP should be defined. -green This option indicates that the RGB_GREEN_MAP should be defined. -help This option indicates that a brief description of the command line arguments should be printed on the standard error. This will be done whenever an unhandled argument is given to xstdcmap. -red This option indicates that the RGB_RED_MAP should be defined. -verbose This option indicates that xstdcmap should print logging informa‐ tion as it parses its input and defines the standard colormap properties. ENVIRONMENT DISPLAY to get default host and display number. SEE ALSO X(7) AUTHOR Donna Converse, MIT X Consortium X Version 11 xstdcmap 1.0.2 XSTDCMAP(1)


An R package for classifying Twitter accounts as bot or not
.
In order to avoid confusion, the package was renamed from “botrnot” to “tweetbotornot” in June 2018. This package should not be confused with the botornot application.
Uses machine learning to classify Twitter accounts as bots or not bots. The default model is 93.53% accurate when classifying bots and 95.32% accurate when classifying non-bots. The fast model is 91.78% accurate when classifying bots and 92.61% accurate when classifying non-bots.
Overall, the default model is correct 93.8% of the time.
Overall, the fast model is correct 91.9% of the time.
There’s one function botornot()
. Give it a vector of screen names or user IDs and let it go to work.
## load package
library(tweetbotornot)
## select users
users <- c("realdonaldtrump", "netflix_bot",
"kearneymw", "dataandme", "hadleywickham",
"ma_salmon", "juliasilge", "tidyversetweets",
"American__Voter", "mothgenerator", "hrbrmstr")
## get botornot estimates
data <- botornot(users)
## arrange by prob ests
data[order(data$prob_bot), ]
#> # A tibble: 11 x 3
#> screen_name user_id prob_bot
#> <chr> <chr> <dbl>
#> 1 mothgenerator 69133574 0.00542
#> 2 hadleywickham 25073877 0.00963
#> 3 American__Voter<PHONE_NUMBER> 0.0345
#> 4 ma_salmon<PHONE_NUMBER> 0.0744
#> 5 realDonaldTrump 13074042 0.318
#> 6 hrbrmstr 5685812 0.330
#> 7 dataandme<PHONE_NUMBER> 0.361
#> 8 kearneymw<PHONE_NUMBER> 0.978
#> 9 tidyversetweets<PHONE_NUMBER>78691328 0.997
#> 10 netflix_bot<PHONE_NUMBER> 0.998
#> 11 juliasilge<PHONE_NUMBER>25597184 1.000
The botornot()
function also accepts data returned by rtweet functions.
## load rtweet
library(rtweet)
## get most recent 100 tweets from each user
tmls <- get_timelines(users, n = 100)
## pass the returned data to botornot()
data <- botornot(tmls)
## arrange by prob ests
data[order(data$prob_bot), ]
#> # A tibble: 11 x 3
#> screen_name user_id prob_bot
#> <chr> <chr> <dbl>
#> 1 mothgenerator 69133574 0.00542
#> 2 hadleywickham 25073877 0.00963
#> 3 American__Voter<PHONE_NUMBER> 0.0345
#> 4 ma_salmon<PHONE_NUMBER> 0.0744
#> 5 realDonaldTrump 13074042 0.318
#> 6 hrbrmstr 5685812 0.330
#> 7 dataandme<PHONE_NUMBER> 0.361
#> 8 kearneymw<PHONE_NUMBER> 0.978
#> 9 tidyversetweets<PHONE_NUMBER>78691328 0.997
#> 10 netflix_bot<PHONE_NUMBER> 0.998
#> 11 juliasilge<PHONE_NUMBER>25597184 1.000
fast = TRUE
The default [gradient boosted] model uses both users-level (bio, location, number of followers and friends, etc.) and tweets-level (number of hashtags, mentions, capital letters, etc. in a user’s most recent 100 tweets) data to estimate the probability that users are bots. For larger data sets, this method can be quite slow. Due to Twitter’s REST API rate limits, users are limited to only 180 estimates per every 15 minutes.
To maximize the number of estimates per 15 minutes (at the cost of being less accurate), use the fast = TRUE
argument. This method uses only users-level data, which increases the maximum number of estimates per 15 minutes to 90,000! Due to losses in accuracy, this method should be used with caution!
## get botornot estimates
data <- botornot(users, fast = TRUE)
## arrange by prob ests
data[order(data$prob_bot), ]
#> # A tibble: 11 x 3
#> screen_name user_id prob_bot
#> <chr> <chr> <dbl>
#> 1 mothgenerator 69133574 0.00185
#> 2 American__Voter<PHONE_NUMBER> 0.0415
#> 3 ma_salmon<PHONE_NUMBER> 0.0661
#> 4 dataandme<PHONE_NUMBER> 0.0965
#> 5 realDonaldTrump 13074042 0.121
#> 6 hrbrmstr 5685812 0.157
#> 7 hadleywickham 25073877 0.368
#> 8 kearneymw<PHONE_NUMBER> 0.978
#> 9 tidyversetweets<PHONE_NUMBER>78691328 0.998
#> 10 netflix_bot<PHONE_NUMBER> 0.999
#> 11 juliasilge<PHONE_NUMBER>25597184 0.999


A density plot is a representation of the distribution of a numeric variable. Comparing the distribution of several variables with density charts is possible. Here are a few examples with their ggplot2 implementation.
A multi density chart is a density chart where several groups are represented. It allows to compare their distribution. The issue with this kind of chart is that it gets easily cluttered: groups overlap each other and the figure gets unreadable.
An easy workaround is to use transparency. However, it won’t solve the issue completely and is is often better to consider the examples suggested further in this document.
# Libraries
library(ggplot2)
library(hrbrthemes)
library(dplyr)
library(tidyr)
library(viridis)
# The diamonds dataset is natively available with R.
# Without transparency (left)
p1 <- ggplot(data=diamonds, aes(x=price, group=cut, fill=cut)) +
geom_density(adjust=1.5) +
theme_ipsum()
#p1
# With transparency (right)
p2 <- ggplot(data=diamonds, aes(x=price, group=cut, fill=cut)) +
geom_density(adjust=1.5, alpha=.4) +
theme_ipsum()
#p2
Here is an example with
another dataset
where it works much better. Groups have very distinct distribution, it
is easy to spot them even if on the same chart. Note that it is much
better to add group name next to their distribution instead of having a
legend beside the chart.
# Load dataset from github
data <- read.table("https://raw.githubusercontent.com/zonination/perceptions/master/probly.csv", header=TRUE, sep=",")
data <- data %>%
gather(key="text", value="value") %>%
mutate(text = gsub("\\.", " ",text)) %>%
mutate(value = round(as.numeric(value),0))
# A dataframe for annotations
annot <- data.frame(
text = c("Almost No Chance", "About Even", "Probable", "Almost Certainly"),
x = c(5, 53, 65, 79),
y = c(0.15, 0.4, 0.06, 0.1)
)
# Plot
data %>%
filter(text %in% c("Almost No Chance", "About Even", "Probable", "Almost Certainly")) %>%
ggplot( aes(x=value, color=text, fill=text)) +
geom_density(alpha=0.6) +
scale_fill_viridis(discrete=TRUE) +
scale_color_viridis(discrete=TRUE) +
geom_text( data=annot, aes(x=x, y=y, label=text, color=text), hjust=0, size=4.5) +
theme_ipsum() +
theme(
legend.position="none"
) +
ylab("") +
xlab("Assigned Probability (%)")
facet_wrap()
Using small multiple is often the best option in my opinion. Distribution of each group gets easy to read, and comparing groups is still possible if they share the same X axis boundaries.
# Using Small multiple
ggplot(data=diamonds, aes(x=price, group=cut, fill=cut)) +
geom_density(adjust=1.5) +
theme_ipsum() +
facet_wrap(~cut) +
theme(
legend.position="none",
panel.spacing = unit(0.1, "lines"),
axis.ticks.x=element_blank()
)
Another solution is to stack the groups. This allows to see what group is the most frequent for a given value, but it makes it hard to understand the distribution of a group that is not on the bottom of the chart.
Visit data to viz for a complete explanation on this matter.


Technology allows nations to gain improved units and abilities. Nations must spend time and money
on research before new technologies become accessible. When using the "Official 1900-2030" Ruleset, all players begin the
game with a level of technology roughly equivalent to the year 1900; the only aircraft are zeppelins,
internal combustion is relatively new, tanks have not been created, and ships still run on steam power.
Nations can learn new technologies such as flight, radar, and electronics. New technologies will ultimately allow nations
to build drone aircraft, supercarriers, and nuclear weapons.
Related Topics:
"Official 1900-2030" Ruleset Technology


{% include criticalCSS.html %} {% include symbol-defs.svg %}
{{site.name}}
A collection of free spaces to work online around {{page.city}} city centre
Submit a space
Belfast
Dublin
{{ content }}


PRIME TIME
What is Prime Time
Prime Time Is an event were all the students of the Blue Hill HarborSchool show thier best work
Prime Time Intro/Past Projects
The Prime Time Intro is used to intraduce the students and thier projects
The Prime Time Team


This page outlines my background
Education
Bachelor of Business Management-Marketing
Diploma-Business management
Digital marketing proficiency course
Experience
Moniq has worked in various institutions over the last ten years
BBK Kenya
ICEA LION Group
Rustic Range Farmhouse
This is NOT a Drill Entertainment


Custom Loading Error
Sorry, we are unable to load this page at this time. Here is a custom error page though.


PomPom
30:00
Full
Break
Mini
Start
Stop
Current:
30-Minute Session
×
Session Complete
Your
session
is complete!
Press 'Break' to take a 5-minute break, or 'Snooze' if you need a little extra time.
Your
session
is complete!
Press 'Start' to start a 30-minute session, or 'Snooze' if you need a little extra time.


public class ResizeRecord extends Stream
PDBFile pdb = new PDBFile("Name.Crtr.Type",PDBFile.CREATE); ResizeRecord rs = new ResizeRecord(pdb,512); DataStream ds = new DataStream(rs); rs.startRecord(); ds.writeStringArray(aStringArray); rs.endRecord();PS: if you dont call startRecord, writeBytes will simply call PDBFile.writeBytes and will not resize the record!
skipBuffer
| Constructor and Description |
|---|
ResizeRecord(PDBFile cat,
int initialSize)
Constructs the resize stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
closes the PDBFile
|
void |
endRecord()
Must be called after the record is finished so it can be properly resized.
|
protected void |
finalize() |
Stream |
getStream()
Returns the stream attached to this stream (which is always a PDBFile).
|
int |
readBytes(byte[] buf,
int start,
int count)
Reads bytes from the stream.
|
boolean |
restartRecord(int pos)
Restart writing to the given record pos, overwritting the current record.
|
void |
startRecord()
Appends a new record to the PDBFile.
|
void |
startRecord(int pos)
Inserts the record at the specified index in the PDBFile.
|
int |
writeBytes(byte[] buf,
int start,
int count)
Writes bytes to the stream.
|
asInputStream, asOutputStream, asStream, asStream, skipBytes, wrapInputStream, wrapInputStreamToStream, write, writeBytes, writeBytes, writeBytes
public ResizeRecord(PDBFile cat, int initialSize)
cat
- The PDBFile associatedinitialSize
- The initial size of the record. CANNOT BE 0!public void startRecord(int pos) throws IOException
pos
- The position where to insert the record. If greater or equal to the record count, the record is
appended.IOException
startRecord()
,
restartRecord(int)
,
endRecord()
public void startRecord() throws IOException
IOException
restartRecord(int)
,
startRecord(int)
,
endRecord()
public boolean restartRecord(int pos) throws IOException
pos
- The position to overwrite. If pos is lower than 0 or greater than the
number of records of the PDBFile, the record is appended.IOException
startRecord()
,
startRecord(int)
,
endRecord()
public void endRecord() throws IOException
IOException
startRecord()
,
restartRecord(int)
,
startRecord(int)
public int readBytes(byte[] buf, int start, int count) throws IOException
Stream
readBytes
in class Stream
buf
- the byte array to read data intostart
- the start position in the arraycount
- the number of bytes to readIOException
public int writeBytes(byte[] buf, int start, int count) throws IOException
Stream
IOException
if an error prevented the write
operation from occurring.writeBytes
in class Stream
buf
- the byte array to write data fromstart
- the start position in the byte arraycount
- the number of bytes to writeIOException
public void close() throws IOException
close
in interface java.io.Closeable
close
in interface totalcross.lang.AutoCloseable
IOException
public Stream getStream()
protected void finalize()
finalize
in class totalcross.lang.Object


Upsurge - The Entrepreneurship Summit
Upsurge 2018 – The Entrepreneurship Summit of RCC Institute of Information Technology is a 3-day event involving talks from eminent entrepreneurs and investors, workshops on educating topics relating to entrepreneurship and startups, and competition to give the attendees a real to life experience of being an entrepreneur and being a part of startups.
The aim of the event is to motivate the students of the college to bring out their passion of entrepreneurship in whichever field they want so that they can disrupt their chosen field in a better way and become the leaders of the future.
We also aim to connect our students with the potential investors and entrepreneurs of the region with whom they can discuss their upcoming projects and ideas and get them validated.
Also, we introduce the freshers to the concept of entrepreneurship by engaging them in all the events and competitions and creating special events for them.
Speakers for Upsurge 2018
Pitch It Up!
Get the experience of how to pitch your ideas to the investors: Pitch It Up!
Gets you into entrepreneurs’ shoes and challenges you to present your idea in the most convincing way possible. The participating teams will consist of a maximum of 2 members each and they will be asked to make a product in a given field and then pitch that in front of the judges.
The selected teams get a free pass for the E-Summit, IIT BOMBAY – one of the largest entrepreneurship fest in the country
Book your tickets for THE UPSURGE 2018 here!
Schedule
DAY 1 – 4th of January 2018
Talk session 1: 11:00- 12:00
Workshop on Product Design: 13:00 – 14:00
Talk session 2 (Opportunities of Startup in West Bengal): 14:00-15:00
Workshop on Know Your Customers: 15:20 – 16:30
DAY 2 – 5th of JANUARY 2018
Talk Session ('Envoyage' in partnership with E-cell, IIT BOMBAY): 11:30-13:30
PITCH IT UP (Competition): 14:15 – 15:15
Workshop on Rounds of Investment, Finance and revenue: 15:30 – 16:30
DAY 3 – 6th of JANUARY 2018
Talk Session 3: 11:00-12:00
Talk Session 4: 13:00-14:00
Talk on Job vs. Entrepreneurship vs. Higher studies: 14:15-15:15


PNAES Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | PNAES.h |
Overview
Encryption works with native Foundation objects which internally will be translated to JSON object. Decryption process will return Foundation object in response on Base64 encoded string.
@author Sergey Mamontov
Data encryption
+ encrypt:withKey:
Encrypt \c data content and encode into Base64 string.
+ (NSString *)encrypt:(NSData *)data withKey:(NSString *)key
Parameters
data |
Reference on \a NSData object which should be encrypted. |
|---|---|
key |
Reference on key which should be used to encrypt data basing on it. |
Return Value
Encrypted Base64-encoded string received from Foundation object. \c nil will be returned in case of failure.
Availability
4.0
Discussion
Input \c data for example can be output of \a NSJSONSerialization or data created from \a NSString with UTF-8 encoding.
Declared In
PNAES.h
+ encrypt:withKey:andError:
Encrypt \c data content and encode into Base64 string.
+ (NSString *)encrypt:(NSData *)data withKey:(NSString *)key andError:(NSError *__autoreleasing *)error
Parameters
data |
Reference on \a NSData object which should be encrypted. |
|---|---|
key |
Reference on key which should be used to encrypt data basing on it. |
error |
Reference on pointer into which encryption error will be stored in case of encryption failure. Error can be related to JSON string serialization as well as encryption itself. |
Return Value
Encrypted Base64-encoded string received from Foundation object. \c nil will be returned in case of failure.
Availability
4.0
Discussion
Input \c data for example can be output of \a NSJSONSerialization or data created from \a NSString with UTF-8 encoding. @code @endcode Extension to \c encrypt:withKey: and allow to specify pointer where encryption error can be passed.
Declared In
PNAES.h
Data decryption
+ decrypt:withKey:
Transform encrypted Base64 encoded string to \a NSData instance.
+ (NSData *)decrypt:(NSString *)object withKey:(NSString *)key
Parameters
object |
Reference on previously encrypted Base64-encoded string which should be decrypted. |
|---|---|
key |
Reference on key which should be used to decrypt data. |
Return Value
Initial \a NSData which has been encrypted earlier. \c nil will be returned in case of decryption error.
Availability
4.0
Discussion
Received data for example can be used with \a NSJSONSerialization to convert it’s content to Foundation objects.
Declared In
PNAES.h
+ decrypt:withKey:andError:
Transform encrypted Base64 encoded string to \a NSData instance.
+ (NSData *)decrypt:(NSString *)object withKey:(NSString *)key andError:(NSError *__autoreleasing *)error
Parameters
object |
Reference on previously encrypted Base64-encoded string which should be decrypted. |
|---|---|
key |
Reference on key which should be used to decrypt data. |
error |
Reference on pointer into which decryption error will be stored in case of decryption failure. Error can be related to JSON string deserialization as well as decryption itself. |
Return Value
Initial \a NSData which has been encrypted earlier. \c nil will be returned in case of decryption error.
Availability
4.0
Discussion
Received data for example can be used with \a NSJSONSerialization to convert it’s content to Foundation objects. @code @endcode Extension to \c decrypt:withKey: and allow to specify pointer where decryption error can be passed.
Declared In
PNAES.h
Extension Methods
+ processedDataFrom:withKey:forOperation:andStatus:
Data processing method which basing on configuration able to encrypt or decrypt provided \c data.
+ (NSData *)processedDataFrom:(NSData *)data withKey:(NSString *)cipherKey forOperation:(CCOperation)operation andStatus:(CCCryptorStatus *)status
Parameters
data |
Reference on initial data which depending from \c operation will be encrypted or decrypted. |
|---|---|
cipherKey |
Reference on key which should be used during encryption/decryption process to get expected results. |
operation |
Encryption (\c kCCEncrypt) or decryptuib (\c kCCDecrypt) operation type. |
status |
Data processing resulting status (one of \c CCCryptorStatus fields). |
Return Value
Output from processed \c data using provided \c cipherKey for concrete \c operation.
Availability
4.0
Declared In
PNAES.m
+ errorFor:
Compose error instance depending on error status which has been passed from CCCryptor operation.
+ (NSError *)errorFor:(CCCryptorStatus)status
Parameters
status |
Data processing resulting status (one of \c CCCryptorStatus fields). |
|---|
Return Value
Created and ready to use \a NSError instance.
Availability
4.0
Declared In
PNAES.m


Emotional Intelligence
Findings of Search inside yourselfand what you can do in 120 seconds
24 August 2018
Search inside yourself
Search inside yourself is about how mindfulness can help you be a better you in and outside the workplace. This book assists with explaining some of the techniques you can do to perform mindfullness but also the process behind these actions.
Learnings from chapter 1
Emotional intelligence help people being better leaders and can help us find happiness/be in a better state of being. Emotional and intellectual competencies go hand in hand when it comes to how "well" someone is performing, some of these competencies are:
- Strong achievement drive and high achievement standard
- Ability to influence
- Conceptual thinking
- Analytical ability
- Initiave in taking on challenges
- Self confidence
To be able to be more self aware and see yourself from a third perspective requires a high attention span that can be trained. Once this has been completed we can start training on "reading" our body better and how emotions are being processed (generally we feel emotions through the body rather then thinking about it. Think of when you are nervous/anxious for a particular event, a gut- feeling).
How did you find the two minutes of mindfulness?
I have to be honest, I didn't feel much? it might be the case I need to work a lot more on the attention span which I am doing by using "Headspace". What is interesting that there are so many things that try and grab your attention in daily life.


---
layout: archive
title: Lean Prover Zulip Chat Archive
permalink: 116395maths/36146CarlosSimpsonandVHS.html
---
The archive URL format has changed. Please find this page at:
https://leanprover-community.github.io/archive/stream/116395-maths/topic/Carlos.20Simpson.20and.20VHS.html


|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.w3c.tidy.TidyUtils
public final class TidyUtils
Utility class with handy methods, mainly for String handling or for reproducing c behaviours.
| Method Summary | |
|---|---|
static boolean |
findBadSubString(java.lang.String s,
java.lang.String p,
int len)
Return true if substring s is in p and isn't all in upper case. |
static char |
foldCase(char c,
boolean tocaps,
boolean xmlTags)
Fold case of a char. |
static byte[] |
getBytes(java.lang.String str)
Should always be able convert to/from UTF-8, so encoding exceptions are converted to an Error to avoid adding throws declarations in lots of methods. |
static java.lang.String |
getString(byte[] bytes,
int offset,
int length)
Should always be able convert to/from UTF-8, so encoding exceptions are converted to an Error to avoid adding throws declarations in lots of methods. |
static boolean |
isCharEncodingSupported(java.lang.String name)
Is the given character encoding supported? |
static boolean |
isDigit(char c)
Is the given char a digit? |
static boolean |
isLetter(char c)
Is the given char a letter? |
static boolean |
isLower(char c)
Determines if the specified character is a lowercase character. |
static boolean |
isNamechar(char c)
Is the given char valid in name? (letter, digit or "-", ".", ":", "_") |
static boolean |
isUpper(char c)
Determines if the specified character is a uppercase character. |
static boolean |
isWhite(char c)
Determines if the specified character is whitespace. |
static int |
lastChar(java.lang.String str)
Return the last char in string. |
static char |
toLower(char c)
Maps the given character to its lowercase equivalent. |
static char |
toUpper(char c)
Maps the given character to its uppercase equivalent. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static boolean findBadSubString(java.lang.String s, java.lang.String p, int len)
s
- substringp
- full stringlen
- how many chars to check in p
public static byte[] getBytes(java.lang.String str)
str
- String
String.getBytes()
public static java.lang.String getString(byte[] bytes, int offset, int length)
bytes
- byte arrayoffset
- starting offset in byte arraylength
- length in byte array starting from offset
new String(bytes, offset, length, "UTF8")
public static int lastChar(java.lang.String str)
str
- String
public static boolean isWhite(char c)
c
- char
true
if char is whitespace.public static boolean isDigit(char c)
c
- char
true
if the given char is a digitpublic static boolean isLetter(char c)
c
- char
true
if the given char is a letterpublic static boolean isNamechar(char c)
c
- char
true
if char is a name char.public static boolean isLower(char c)
c
- char
true
if char is lower case.public static boolean isUpper(char c)
c
- char
true
if char is upper case.public static char toLower(char c)
c
- char
public static char toUpper(char c)
c
- char
public static char foldCase(char c, boolean tocaps, boolean xmlTags)
c
- chartocaps
- convert to capsxmlTags
- use xml tags? If true no change will be performed
public static boolean isCharEncodingSupported(java.lang.String name)
name
- character encoding name
true
if encoding is supported, false otherwhise.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |


New
Duplicate
Merge Down
Flatten
0
normal
multiply
screen
overlay
darken
lighten
color-dodge
color-burn
hard-light
soft-light
difference
exclusion
hue
saturation
color
luminosity
Mirrored Drawing
Show Grid
Canvas Width:
Canvas Height:
Resample
Crop


Information, resources about children of incarcerated parents
Where to learn more about children of incarcerated parents:
“Shared Sentence,” Annie E. Casey Foundation, 2016
“Collateral Costs,” Pew Charitable Trusts, 2010
“Parents Behind Bars,” Child Trends, 2015
San Francisco Children of Incarcerated Parents Partnership
American Bar Foundation, White House parental incarceration workshop 2013


Hardware and Temperatures and Final Fantasy (Oh my!)
February 21 & 22, 2015
Participated in Hackster.io's Hack To The Future hackathon.
Our team created a device which reads the temperature of its immediate surroundings. If the temperature rises too high, a "battle theme" tune from the Final Fantasy RPG franchise (programmed into the hardware) plays. If the temperature lowers to a certain level, the Final Fantasy "victory theme" tune plays instead.
We used an Intel Edison and related software developer kit, and a seeed Studio Grove starter kit (temperature sensing, speaker, button, and LED display modules).
Summary of contributions:
- Googling music midi files and translating pieces into individual notes and beats/rest timing, as well as the frequencies required to play specific notes within the code
- Using sample JavaScript code (further modified by team members) to program in the timing of rests and notes for each tune to match source music files
- Other team members did much of the initial hardware configuration and programming, as I was unfamiliar with JavaScript at the time. I was later mentored in a pair programming setting in how to code the songs.


$68
per month
Minimum spend $816 over 12 months
$99
Minimum spend $1,188 over 12 months
$250
Minimum spend $3000 over 12 months


You are viewing an historical archive of past issues. Please
report new issues to the appropriate project issue tracker on
GitHub.
Comments
-
Greg Hurrell
Created an attachment (id=78) i386 crash log
Add a comment
Comments are now closed for this issue.


Jekyll Github Pages Site Documentation Github Pages Jekyll Using Jekyll with Bundler Make sure Ruby is installed on your system Install Bundler Jekyll With Bundler To Start Jekyll Open a terminal Run bundle exec jekyll serve Extras Command Line Usage


{% extends '_form_container.html' %} {% load bootstrap4 %} {% block overwrite_spacer %}{% endblock %} {% block form %}
Every app that ablator manages belongs to an organization.
Once you create an organization, you become its first administrator and can invite more people.
Register an Organization