a python package for converting markdown to reveal.js slides
Also, check the remark.js alternative as well: pyremark_slides. I am using this for my recent internal meeting presentations.
About two years ago, I wrote pyreveal to automate the conversion from MD to slides in html powered with reveal.js (with my own flavor of syntax). After that, I was busying on my researches and dissertation writing etc., thus abandoned this project for a while.
During the two years, I tried some other ways to generate slides. For my formal presentations (my defense and interviews) I used Google Slides, because it is more stable and easy to change (drag and drop etc). For some smaller discussion, I tried Marp (which is a great project). There are quite a lot of alternative out there. I love Marp and even thinking on writing my own theme to use with it. But then I realize that they stop the development and maintenances of Marp desktop app. They are moving forward to newer ecosystem, and the desktop app is part of the future product, i.e. currently no available. Their documentation on using the alternative cloud version is not that complete, I can't find an easy way to do it (like read the instruction and done by 10 mins), so I give up on them for now (and keep the discontinued Marp desktop app for some quick use situation).
GitPitch is another promising and seems like a very good piece of work. The cloud version works as simple as forking the example. But there is some confusion in the documentation. I am trying to use their so called "GitPitch Desktop Free Edition" that is listed under the "Free - The basic plan for everyone on GitHub, GitLab, and Bitbucket - $ 0. But I wasted 1 hour to read the doc and install docker blablabla.... and to find the GitPitch Desktop Access Management for to get the approval for downloading the docker image. After wasted 1 hour on it, I gave up on them. ALL desktop application leads to the subscribe on non-free plan. Well, I actually don't like so much on the docker way to start the desktop app also....
So, without other quick way to generate slides from MD for now, I back to my old project.
This time, I updated the reveal.js version, added some really nice plugin (menu, simple-menu, katex, verticator, pdfexport, and title-footer). The toc plugin is replaced by the menu and simple-menu. To use the simple-menu, I added a new way (syntax, i.e. ---chapter=) to name the chapter in the python script; to use the tex style equation, the katex needed to be copied to the current slide html dir; and of course fixed some small bugs.
One big change I have done this time is dropped the Phantom.js and decktape.js, to keep things as simple as possible (no need to npm install any thing now). I also copied the docdata into the pyreveal package, because I don't know why pip install docdata will lead to some weird situation. This would be more intuitive and less dependencies nightmare.
The current dependencies included:
Previously, I was(am) using jupyter to create a notebook with slides, and convert it using jupyter+nbconvert, and even wrote some codes to customize the output html file~~, and convert to pdf using phantomjs+decktape automatically~~. So, the nbconvert can do the conversion from notebook to reveal.js.
But, I don't understand why they keep the cell tags, which make it a pain while customizing the themes, and the custom.css, that following the tutorials or answers from stackoverflow to customize the reveal.js (the js), the codes will not work for the nbconvert version of slides.html.
Plus, the speaker notes function is still not working for jupyter+nbconvert. ~~not sure about this for now~~
One more thing, if you change the contents in the notebook cell, you will need to run the nbconvert command again to generate the static html file. What we need, is that the static html file can be generated automatically, and we can see the result as soon as we change the md file.
Therefore, I decided to write a converter that take a simple md, and convert it to reveal.js slides using jinja2.
a demo is here.
The codes that generate the demo slides is in the slide_dir directory.
```sh
git clone https://github.com/wcchin/pyreveal.git cd pyreveal pip install -e .
```
pyreveal will read the first several lines of the whatever.md file and get the metadata as the configs, using the docdata package .
```markdown
title: reveal.js The HTML Presentation Framework theme: black transition: concave cr_word: author - 2017 cr_color: rgba(205,205,205,0.0) toc: False to_pdf: false reveal_path: reveal.js
```
configs:
- title: will be put at the <title>
part of the <head>
of the html
- theme: available: black (default), white, league, sky, beige, simple, serif, blood, night, moon, solarized and... (THERE ARE MORE THEME FROM MY THEME DIR)
- transition: none(default), fade, slide, convex, concave, zoom, page
- cr_word: CopyRight word (optional), the words that appear at the footer
- cr_color: color for the cr_word (optional), default to 'rgba(205,205,205,0.0)'
- toc: use the table of content plugin (not tested yet)
- to_pdf: default to false, if true, will create a pdf version of the slides, using phantomjs. to use the to_pdf function, please check and install phantomjs following the decktape instruction and phantomjs instruction.
- reveal_path: optional, default to 'reveal.js'(the same directory as the output html)
pyreveal use a list of escape keyword to generate the function for reveal.js:
```markdown
---keyword
```
where, the keyword include: right, down, data, style, fragment, notes
there are two types of slides break:
```markdown
---right
```
the following slide will appear at right, i.e. a new slide (section).
OR,
```markdown
---down
```
the following slide will appear at bottom, i.e. a subslide.
```markdown
---data ---style
```
just same as the reveal.js, they use data-background or something similar to change the per-slide styles.
Therefore, pyreveal will check if there is a ---data-something, then it will put the data-something into and something like the
The same goes for style.
For more detail, check the corresponding demo.md file that generate something similar to the demo in the original reveal.js website.
for fragment, pyreveal also use something like this:
```markdown
---fragment this will appear after right or down is press ---fragment_grow this will grow next
```
pyreveal will just put the tag after the '---' (with replacing the '_' with a blank space) into the
. So all kind of fragment styles will be supported as they should be in the reveal.js.
Just some minor different, that shows in the demo file, the word "highlight" does not sit at there at first.
finally, the speaker notes.
the speaker notes should be put at the last of each slide, after the tag. ```markdown
---notes this is the speaker notes line 2 line 3
```
simple-menu is the links on top of the slide, check this plugin page: the plugin for a simple and nice top or bottom menu bar.
at the very top of the md file, add:
markdown
use_simplemenu: true
menu_bottom: false
or true if you want the menu at the bottom, change menu_bottom to: true
if the use_simplemenu is set to false, it will force the slide to ignore the chapter name and not showing them.
on each top slide, add
markdown
---chapter=some fancy title
the "some fancy title" will be on the top of the slide now
menu is the one that can be toggle by clicking the button at the bottom left, and it appear on the left hand side, as a slides tree. the plugin for slide-out menu for reveal.js.
to use this, simply add
markdown
use_menu: true
at the top setting area.
if there is any latex equation, remember to add
markdown
use_katex: true
at the top setting area. Katex for reveal.js plugin.
I just realize in the previous version, it is force to use the footer. So if not using it, remember to set:
markdown
cr_word: --
it is two dashes. This will be recognize as not using them, thus not showing the title as previous version will do.
run this and done.
```sh pyreveal -i whatever.md -w
```
The two arguments: - -i: take a markdown file that contain the slides content (i.e. what you have prepared using the guidelines). - -w: watch the change (optional), and rerun the function if any changes happened, this is very useful for making the slide. press ctrl+c to exit watch.
If the md file is in a sub-directory, simple use:
```sh pyreveal -i subdir/whatever.md -w
```
This will also work. And this is handy if the reveal path is set at the upper level (e.g. "../reveal.js") for share usage.
Same as the output of the nbconvert, the output of the pyreveal will also try to read a custom.css at the same directory of the output html file. So, it is possible and easy to change something for the slides, e.g. change the fonts.
Next thing to do should be try to read the jupyter notebook file, and convert the slides content from notebook to the reveal.js html.
Because I still hope that the
Recently, the material themes were dropped. Added a theme modified from league.css, file name: bstyle.css
Please try.


{% load manage_form_tags %} {% load i18n %}
{% blocktrans with field_count=field_order|length %} You may choose up to {{ field_count }} informational columns to customize the browsing view for your identifiers. {% endblocktrans %}


AMAZING PEOPLE ARE MAKING AMAZING DESIGN IN A FUN ENVIRONMENT
When you work with us, you you are part of a team of committed collaborators. All aspects of our softwaredevelopment process are integrated,interactive
and agile.
Our approach unifies design, development and product management to create an exceptional products
We start each project by understanding your business goals, the user's need and the product requirements
Then we help translate them into effective and elegamt solutions.
Before we sign a contract or write a line of code our team will spend the necessary time needed to understand your product vision
The outcome of this scoping session is proposal or high level statement of work.
based on your requirements,we can provide a complete offering or just a process you need.
Our design practice offers a full range of services
including brand strategy, interaction and visual design
and user experience testing.
Throughout your project, our designers create and
implement visual design and workflows, solicit user
feedback and work with you to make sure what gets built
is what is needed.
All engineers are fluent in the latest enterprise, mobile
and web development technologies.
They collaborate with your team to write, and improve
code on a daily basis, using proven practices such as
test-driven development and pair programming.
Planning and development is iterative. Because we are
constantly coding and testing, the products we build are
always ready to go live.
This iterative process allows for changes as business
requirements evolve.
PORTFOLIO
Blank Project
Ontario Project
Gold Diamonds Project
Activities Project
Daily Project
Buttons Project
Logo Project
Restaurant Project


Hi fellow visitor! You need some javascript to run this page. In case you have, you may need to wait a little bit.
Register
Profile
+
Login
Password
Will be able to login when connection established
login
register
Create or Join
OK


A Discussion on Compassion.
Compassion is the ability to see what needs doing right now and the willingness to do it right now - Brad Warner, Zen Priest.
It is not enough to espouse compassion, you have to act on it to make it real - Dalai Lama.
The whole idea of compassion is based on a keen awareness of the interdependence of all these living beings, which are all part of one another, and all involved in one another - Thomas Merton
We all live busy lives. We work at hard jobs often putting in more than 40 hours per week. Then there are all the other tasks that need doing: laundry, shopping, cooking, taking care of our kids or our parents. We unwind by watching a tv show or by surfing the web. Sometimes it seems that if we can live this modern life and just have a bit of happiness, that would be enough. We may be aware of compassion but don’t take time to consciously fit compassionate acts into our lives.
Just this past week I received email from a friend–a Zen priest who was ordained at the same ceremony I was. He said he was quitting his university job in Oregon and moving to Maryland with his wife and kids to live and work in a Catholic Worker intentional community that serves the homeless. That seems like a life focused on helping others. But what about the rest of us who are struggling with living, not in a monastic intentional community, but in modern urban life? Where does compassion and helping others fit in?
I would like to invite you to a discussion on Sunday 15 November at 2pm at Blackstone Coffee, 1113 Jefferson Davis Hwy (look for a ‘Zen’ sign on our table). The topics are 1) how can we be more compassionate in our daily lives and 2) what can we do as a small community to foster compassion. To seed this discussion, I have a few short videos and a few web links.
This first video (surprisingly, an insurance company advertisement) was discovered by Ted Pickett, one of our community members.
This next one is in a similar vein:
This last video is from an organization envisioned by the Dalai Lama called A Force For Good (There is a variety of information on their website and a short explanation at Daniel Goleman on the Dalai Lama’s Vision for Good)
Bernie Glassman (wikipedia article) authored a number of books about engaged buddhism. He offers three tenets:
Entering the stream of Socially Engaged Spirituality, I vow to live a life of:
Not-knowing, thereby giving up fixed ideas about ourselves and the universe
Bearing witness to the joy and suffering of the world
Doing Action arising from Not Knowing and Bearing Witness
There are some interesting short articles here, including A Day with Bernie Glassman and Bearing Witness- A Harvard Divinity School Talk (this last talk mentions a video about him which I could not find on the web).
If you have other videos or links you think relevant to the discussion please post them to our forum.
I hope to see you at the discussion!


now(@optional milliseconds)
Return an association list with the various components of time.
If milliseconds
is not provided, the current system time is returned.
Otherwise, milliseconds
is parsed to time components and returned.
now()
// [seconds:38, minute:29, hour:21, month_day:18, month:5, year:2016,
week_day:6, year_day:169, is_utc: false, is_dst:false]
now(now_seconds())
// [seconds:0, minute:2, hour:22, month_day:18, month:5, year:2016,
week_day:6, year_day:169, is_utc: false, is_dst:false]


{%extends 'neighbour/base.html'%} {% block content %} {{block.super}}
Email:{{business.email}}
phone_number:0{{business.phone_number}}


|
CS108 Xamarin Library
1.0.14
|
Selected tag parameters, configure this before any specific tag operation More...
Public Member Functions | |
| TagGeneralSelectedParms () | |
| constructor More... | |
Public Attributes | |
| SelectMaskFlags | flags = SelectMaskFlags.DISABLE_ALL |
| A mask that indicates current parameters enalbe or not. More... | |
| MemoryBank | bank = MemoryBank.EPC |
| memory bank More... | |
| S_MASK | epcMask = new S_MASK() |
| A buffer that contains a left-justified bit array that represents that bit pattern to match – i.e., the most significant bit of the bit array appears in the most-significant bit (i.e., bit 7) of the first byte of the buffer (i.e., mask[0]). All bits beyond count are ignored. For example, if the application wished to find tags with the following 16 bits 1011.1111.1010.0101, starting at offset 20 in the Electronic Product Code, then the fields would be set as follows: offset = 20 count = 16 mask[0] = 0xBF (1011.1111) mask[1] = 0xA5 (1010.0101) More... | |
| UInt32 | epcMaskLength = 0 |
| epc mask length in bit, e.g. epc = 0x3000, length = 4 * 8 = 32 bits, epc = 0x300, length = 3 * 8 = 24 bits More... | |
| UInt32 | epcMaskOffset = 0 |
| epc mask offset in bit, note : if enable PC mask, this parameter is ignored. More... | |
| byte [] | Mask |
| A buffer that contains a left-justified bit array that represents that bit pattern to match (use epcMask, if you select EPC) More... | |
| UInt32 | MaskLength = 0 |
| epc mask length in bit (use epcMaskLength, if you select EPC) More... | |
| UInt32 | MaskOffset = 0 |
| epc mask offset in bit (use epcMaskOffset, if you select EPC) More... | |
| bool | ParallelEncoding = false |
| UCODE 7 Parallel Encoding More... | |
Selected tag parameters, configure this before any specific tag operation
| CSLibrary.Structures.TagGeneralSelectedParms.TagGeneralSelectedParms | ( | ) |
constructor
| MemoryBank CSLibrary.Structures.TagGeneralSelectedParms.bank = MemoryBank.EPC |
memory bank
A buffer that contains a left-justified bit array that represents that bit pattern to match – i.e., the most significant bit of the bit array appears in the most-significant bit (i.e., bit 7) of the first byte of the buffer (i.e., mask[0]). All bits beyond count are ignored. For example, if the application wished to find tags with the following 16 bits 1011.1111.1010.0101, starting at offset 20 in the Electronic Product Code, then the fields would be set as follows: offset = 20 count = 16 mask[0] = 0xBF (1011.1111) mask[1] = 0xA5 (1010.0101)
| UInt32 CSLibrary.Structures.TagGeneralSelectedParms.epcMaskLength = 0 |
epc mask length in bit, e.g. epc = 0x3000, length = 4 * 8 = 32 bits, epc = 0x300, length = 3 * 8 = 24 bits
| UInt32 CSLibrary.Structures.TagGeneralSelectedParms.epcMaskOffset = 0 |
epc mask offset in bit, note : if enable PC mask, this parameter is ignored.
| SelectMaskFlags CSLibrary.Structures.TagGeneralSelectedParms.flags = SelectMaskFlags.DISABLE_ALL |
A mask that indicates current parameters enalbe or not.
| byte [] CSLibrary.Structures.TagGeneralSelectedParms.Mask |
A buffer that contains a left-justified bit array that represents that bit pattern to match (use epcMask, if you select EPC)
| UInt32 CSLibrary.Structures.TagGeneralSelectedParms.MaskLength = 0 |
epc mask length in bit (use epcMaskLength, if you select EPC)
| UInt32 CSLibrary.Structures.TagGeneralSelectedParms.MaskOffset = 0 |
epc mask offset in bit (use epcMaskOffset, if you select EPC)
| bool CSLibrary.Structures.TagGeneralSelectedParms.ParallelEncoding = false |
UCODE 7 Parallel Encoding


Overview
Updates the definition data for an activity
Summary
This endpoint will update the Process Definition activity identified by the
record
input parameter with the data provided in the request
payload.
Request Arguments
| Name |
Type |
Description |
Required |
| record |
String |
The value for the act_uid field in the pmse_bpmn_activity record |
True |
Request Payload
{
"data":
{
"act_field_module":"Accounts",
"act_fields":"[{\"name\":\"Assigned to\",\"field\":\"assigned_user_id\",\"value\":\"owner\",\"type\":\"user\",\"label\":\"Record owner\"}]"
}
}
Response Arguments
| Name |
Type |
Description |
| success |
Boolean |
The status of the update operation |
Response
{
"success":true
}


BuS
Mall
Bus Mall Market Research
Thank you for participating in our Bus Mall research group, we have the goods we know you'll want!
Please select which image you would prefer to buy:
Chart
List
Clear Local Storage


| I l@ve RuBoard |
Another GUI toolkit available for Python is called wxPython. The current incarnation is fairly new to the Python scene and is rapidly gaining popularity amongst Python developers. wxPython is a Python extension module that encapsulates the wxWindows C++ class library.
wxPython is a cross-platform GUI framework for Python that is quite mature on the Windows platform. It exposes the popular wxWindows C++ framework Python to provide an attractive alternative for GUI development.
wxWindows is a free C++ framework designed to make cross-platform programming child's play. Well, almost. wxWindows 2.0 supports Windows 3.1/95/98/NT, Unix with GTK/Motif/Lesstif, with a Mac version underway. Other ports are under consideration.
wxWindows is a set of libraries that allows C++ applications to compile and run on several different types of computers, with minimal source-code changes. There's one library per supported GUI (such as Motif, or Windows). As well as providing a common API for GUI functionality, it provides functionality for accessing some commonly used operating-system facilities, such as copying or deleting files. wxWindows is a framework in the sense that it provides a lot of built-in functionality, which the application can use or replace as required, thus saving a great deal of coding effort. Basic data structures such as strings, linked lists, and hash tables are also supplied.
Native versions of controls, common dialogs, and other window types are used on platforms that support them. For other platforms, suitable alternatives are created using wxWindows itself. For example, on Win32 platforms the native list control is used, but on GTK, a generic list control with similar capabilities was created for use in the wxWindows class library.
Experienced Windows programmers will feel right at home with the wxWindows object model. Many of the classes and concepts will be familiar. For example, the Multiple Document Interface, drawing on Device Contexts with GDI objects such as brushes, pens, and so on.
wxPython is a Python extension module that provides a set of bindings from the wxWindows library to the Python language. In other words, the extension module allows Python programers to create instances of wxWindows classes and to invoke methods of those classes.
The wxPython extension module attempts to mirror the class hierarchy of wxWindows as closely as possible. This means that there is a wxFrame class in wxPython that looks, smells, tastes, and acts almost the same as the wxFrame class in the C++ version.
wxPython is close enough to the C++ version that the majority of the wxPython documentation is actually annotations to the C++ documentation that describe the places where wxPython is different. There is also a series of sample programs included, and a series of documentation pages that assist the programmer in getting started with wxPython.
The latest version of wxPython can always be found at http://alldunn.com/wxPython/. From this site you can download a self-installer for Win32 systems that includes a prebuilt extension module, documentation in HTML help format, and a set of demos.
Also available from this site is a Linux RPM, wxPython sources, documentation in raw HTML, and pointers to other sites, mail lists, the wxPython FAQ, and so forth.
If you want to build wxPython from sources yourself, you also need the wxWindows sources, available from http://www.wxwindows.org/.
The remainder of this chapter gives a basic introduction to using wxPython, starting with a simple example teaching the basic structure of a wxPython application. We then build a more involved sample that touches on some of the more advanced features of the toolkit, using classes from the Doubletalk financial modeler you're already familiar with.
We've always found that the best way to learn is by doing and then experimenting and tweaking with what's been done. So download and install wxPython, fire up your favorite text editor[1] and get ready to play along as you read the next few sections.
[1] When getting started, you should probably avoid using PythonWin or IDLE for running wxPython programs, because the interactions between the various toolkits may have unexpected consequences.
Familiarize yourself with this little wxPython program, and refer back to it as you read through the explanations that follow:
from wxPython.wx import * class MyApp(wxApp): def OnInit(self): frame = wxFrame(NULL, -1, "Hello from wxPython") frame.Show(true) self.SetTopWindow(frame) return true app = MyApp(0) app.MainLoop()
When you run this code, you should see a Window appear similar to Figure 20.6.
The first thing to do is import the entire wxPython library with the from wxPython.wx import * statement. This is common practice for wxPython programs, but you can obviously perform more restrictive imports if you prefer.
Every wxPython application needs to derive a class from wxApp and provide an OnInit method for it. The framework calls this method as part of its initialization sequence, and the usual purpose of OnInit is to create the windows and essentials necessary for the program to begin operation. In the sample you created a frame with no parent, with a title of "Hello from wxPython" and then showed it. We could also have specified a position and size for the frame in its constructor, but since we didn't, defaults are used. The last two lines of the OnInit method will probably be the same for all applications; SetTopWindow method informs wxWindows that this frame is one of the main frames (in this case the only one) for the application, and you return true to indicate success. When all top-level windows have been closed, the application terminates.
The final two lines of the script again will probably be the same for all your wxPython applications. You create an instance of the application class and call its MainLoop method. MainLoop is the heart of the application: it's where events are processed and dispatched to the various windows, and it returns when the final window is closed. Fortunately, wxWindows insulates you from the differences in event processing in the various GUI toolkits.
Most of the time you will want to customize the main frame of the application, and so using the stock wxFrame isn't sufficient. As you might expect, you can derive your own class from wxFrame to begin customization. This next example builds on the last by defining a frame class and creating an instance in the application's OnInit method. Notice that except for the name of the class created in OnInit, the rest of the MyApp code is identical to the previous example. This code is displayed in Figure 20.7.
from wxPython.wx import * ID_ABOUT = 101 ID_EXIT = 102 class MyFrame(wxFrame): def __init__(self, parent, ID, title): wxFrame.__init__(self, parent, ID, title, wxDefaultPosition, wxSize(200, 150)) self.CreateStatusBar() self.SetStatusText("This is the statusbar") menu = wxMenu() menu.Append(ID_ABOUT, "&About", "More information about this program") menu.AppendSeparator() menu.Append(ID_EXIT, "E&xit", "Terminate the program") menuBar = wxMenuBar() menuBar.Append(menu, "&File"); self.SetMenuBar(menuBar) class MyApp(wxApp): def OnInit(self): frame = MyFrame(NULL, -1, "Hello from wxPython") frame.Show(true) self.SetTopWindow(frame) return true app = MyApp(0) app.MainLoop()
This example shows some of the built-in capabilities of the wxFrame class. For example, creating a status bar for the frame is as simple as calling a single method. The frame itself automatically manages its placement, size, and drawing. On the other hand, if you want to customize the status bar, create an instance of your own wxStatusBar-derived class and attach it to the frame.
Creating a simple menu bar and a drop-down menu is also demonstrated in this example. The full range of expected menu capabilities is supported: cascading submenus, checkable items, popup menus, etc.; all you have to do is create a menu object and append menu items to it. The items can be text as shown here, or other menus. With each item you can optionally specify some short help text, as we have done, which are shown in the status bar automatically when the menu item is selected.
The one thing that the last sample doesn't do is show how to make the menus actually do something. If you run the sample and select Exit from the menu, nothing happens. The next sample takes care of that little problem.
To process events in wxPython, any method (or standalone function for that matter) can be attached to any event using a helper function from the toolkit. wxPython also provides a wxEvent class and a whole bunch of derived classes for containing the details of the event. Each time a method is invoked due to an event, an object derived from wxEvent is sent as a parameter, the actual type of the event object depends on the type of the event; wxSizeEvent for when the window changes size, wxCommandEvent for menu selections and button clicks, wxMouseEvent for (you guessed it) mouse events, and so forth.
To solve our little problem with the last sample, all you have to do is add two lines to the MyFrame constructor and add some methods to handle the events. We'll also demonstrate one of the common dialogs, the wxMessageDialog. Here's the code, with the new parts in bold, and the running code shown in Figure 20.8:
from wxPython.wx import * ID_ABOUT = 101 ID_EXIT = 102 class MyFrame(wxFrame): def __init__(self, parent, ID, title): wxFrame.__init__(self, parent, ID, title, wxDefaultPosition, wxSize(200, 150)) self.CreateStatusBar() self.SetStatusText("This is the statusbar") menu = wxMenu() menu.Append(ID_ABOUT, "&About", "More information about this program") menu.AppendSeparator() menu.Append(ID_EXIT, "E&xit", "Terminate the program") menuBar = wxMenuBar() menuBar.Append(menu, "&File"); self.SetMenuBar(menuBar) EVT_MENU(self, ID_ABOUT, self.OnAbout) EVT_MENU(self, ID_EXIT, self.TimeToQuit) def OnAbout(self, event): dlg = wxMessageDialog(self, "This sample program shows off\n" "frames, menus, statusbars, and this\n" "message dialog.", "About Me", wxOK | wxICON_INFORMATION) dlg.ShowModal() dlg.Destroy() def TimeToQuit(self, event): self.Close(true) class MyApp(wxApp): def OnInit(self): frame = MyFrame(NULL, -1, "Hello from wxPython") frame.Show(true) self.SetTopWindow(frame) return true app = MyApp(0) app.MainLoop()
The EVT_MENU function called here is one of the helper functions for attaching events to methods. Sometimes it helps to understand what is happening if you translate the function call to English. The first one says, "For any menu item selection event sent to the window self with an ID of ID_ABOUT, invoke the method self.OnAbout."
There are many of these EVT_* helper functions, all of which correspond to a specific type of event, or events. Some popular ones are listed in Table 20.4. See the wxPython documentation for details.
Okay, now let's build something that's actually useful and learn more about the wxPython framework along the way. As has been shown with the other GUI toolkits, we'll build a small application around the Doubletalk class library that allows browsing and editing of transactions.
We're going to implement a Multiple Document Interface, where the child frames are different views of the transactional data, rather than separate "documents." Just as with previous samples, the first thing to do is create an application class and have it create a main frame in its OnInit method:
class DoubleTalkBrowserApp(wxApp): def OnInit(self): frame = MainFrame(NULL) frame.Show(true) self.SetTopWindow(frame) return true app = DoubleTalkBrowserApp(0) app.MainLoop()
Since we are using MDI, there is a special class to use for the frame's base class. Here is the code for the initialization method of the main application frame:
class MainFrame(wxMDIParentFrame): title = "Doubletalk Browser - wxPython Edition" def __init__(self, parent): wxMDIParentFrame.__init__(self, parent, -1, self.title) self.bookset = None self.views = [] if wxPlatform == '__WXMSW__': self.icon = wxIcon('chart7.ico', wxBITMAP_TYPE_ICO) self.SetIcon(self.icon) # create a statusbar that shows the time and date on the right sb = self.CreateStatusBar(2) sb.SetStatusWidths([-1, 150]) self.timer = wxPyTimer(self.Notify) self.timer.Start(1000) self.Notify() menu = self.MakeMenu(false) self.SetMenuBar(menu) menu.EnableTop(1, false) EVT_MENU(self, ID_OPEN, self.OnMenuOpen) EVT_MENU(self, ID_CLOSE, self.OnMenuClose) EVT_MENU(self, ID_SAVE, self.OnMenuSave) EVT_MENU(self, ID_SAVEAS,self.OnMenuSaveAs) EVT_MENU(self, ID_EXIT, self.OnMenuExit) EVT_MENU(self, ID_ABOUT, self.OnMenuAbout) EVT_MENU(self, ID_ADD, self.OnAddTrans) EVT_MENU(self, ID_JRNL, self.OnViewJournal) EVT_MENU(self, ID_DTAIL, self.OnViewDetail) EVT_CLOSE(self, self.OnCloseWindow)
Figure 20.9 shows the state of the application so far.
Obviously, we're not showing all the code yet, but we'll get to it all eventually as we go through piece by piece.
Notice the use of wxMDIParentFrame as the base class of MainFrame. By using this class you automatically get everything needed to implement MDI for the application without having to worry about what's really happening behind the scenes. The wxMDIParentFrame class has the same interface as the wxFrame class, with only a few additional methods. Often changing a single document interface program to a MDI program is as easy as changing the base classes the application's classes are derived from. There is a corresponding wxMDIChildFrame to be used for the document windows, as we'll see later. If you ever need to have access to the client area (or the background area) of the MDI parent, you can use the wxMDIClientWindow class. You might use this for placing a background image behind all the child windows.
The next thing the previous code does is create an icon and associate it with the frame. Normally Windows applications load items such as icons from a resource file that is linked with the executable. Since wxPython programs have no binary executable file, you create the icon by specifying the full path to a .ico file. Assigning the icon to the frame only requires calling the frame's SetIcon method.
You may have noticed from Figure 20.9 that the status bar has two sections, with the date and time displayed in the second one. The next bit of code in the initialization method handles that functionality. The frame's CreateStatusBar method takes an optional parameter specifying the number of sections to create, and SetStatusWidths can be given a list of integers to specify how many pixels to reserve for each section. The -1 means that the first section should take all the remaining space.
In order to update the date and time, you create a wxPyTimer object. There are two types of timer classes in wxPython. The first is the wxPyTimer used here, which accepts a function or method to use as a callback. The other is the wxTimer class, which is intended to be derived from and will call a required method in the derived class when the timer expires. In the example you specify that when the timer expires, the Notify method should be called. Then start the timer, telling it to expire every 1000 milliseconds (i.e., every second). Here is the code for the Notify method:
# Time-out handler def Notify(self): t = time.localtime(time.time()) st = time.strftime(" %d-%b-%Y %I:%M:%S", t) self.SetStatusText(st, 1)
You first use Python's time module to get the current time and format it in to a nice, human-readable formatted string. Then by calling the frame's SetStatus-Text method, you can put that string into the status bar, in this case in slot 1.
As you can see in the next bit of code, we have moved the building of the menu to a separate method. This is mainly for two reasons. The first is to help reduce clutter in the __init__ method and better organize the functionality of the class. The second reason has to do with MDI. As with all MDI applications, each child frame can have its own menu bar, automatically updated as the frame is selected.
The approach taken by our sample is to either add or remove a single item from the BookSet menu based on whether a view can select transactions for editing. Here's the code for the MakeMenu method. Notice how the parameter controls whether the Edit Transaction item is added to the menu. It might have made better sense to just enable or disable this item as needed, but then you wouldn't be able to see how wxPython changes the menus automatically when the active window changes. Also notice that you don't create the Window menu. The wxMDIParentFrame takes care of that for you:
def MakeMenu(self, withEdit): fmenu = wxMenu() fmenu.Append(ID_OPEN, "&Open BookSet", "Open a BookSet file") fmenu.Append(ID_CLOSE, "&Close BookSet", "Close the current BookSet") fmenu.Append(ID_SAVE, "&Save", "Save the current BookSet") fmenu.Append(ID_SAVEAS, "Save &As", "Save the current BookSet") fmenu.AppendSeparator() fmenu.Append(ID_EXIT, "E&xit", "Terminate the program") dtmenu = wxMenu() dtmenu.Append(ID_ADD, "&Add Transaction", "Add a new transaction") if withEdit: dtmenu.Append(ID_EDIT, "&Edit Transaction", "Edit selected transaction in current view") dtmenu.Append(ID_JRNL, "&Journal view", "Open or raise the journal view") dtmenu.Append(ID_DTAIL,"&Detail view", "Open or raise the detail view") hmenu = wxMenu() hmenu.Append(ID_ABOUT, "&About", "More information about this program") main = wxMenuBar() main.Append(fmenu, "&File") main.Append(dtmenu,"&Bookset") main.Append(hmenu, "&Help") return main
If you skip back to the __init__ method, notice that after you create the menu and attach it to the window, the EnableTop method of the menubar is called. This is how to disable the entire BookSet submenu. (Since there is no BookSet file open, you can't really do anything with it yet.) There is also an Enable method that allows you to enable or disable individual menu items by ID.
The last bit of the __init__ method attaches event handlers to the various menu items. We'll be going through them one by one as we explore the functionality behind those options. But first, here are some of the simpler ones:
def OnMenuExit(self, event): self.Close() def OnCloseWindow(self, event): self.timer.Stop() del self.timer del self.icon self.Destroy() def OnMenuAbout(self, event): dlg = wxMessageDialog(self, "This program uses the doubletalk package to\n" "demonstrate the wxPython toolkit.\n\n" "by Robin Dunn", "About", wxOK | wxICON_INFORMATION) dlg.ShowModal() dlg.Destroy()
The user selects Exit from the File menu, then the OnMenuExit method is called, which asks the window to close itself. Whenever the window wants to close, whether it's because its Close method was called or because the user clicks on the Close button in the titlebar, the OnCloseWindow method is called. If you want to prompt the user with an "Are you sure you want to exit?" type of message, do it here. If he decides not to quit, just call the method event.Veto(true).
Most programs will want to have a fancier About box than the wxMessageDialog provides, but for our purposes here it works out just fine. Don't forget to call the dialog's Destroy method, or you may leak memory.
Before doing anything with a BookSet, you have to have one opened. For this, use the common dialog wxFileDialog . This is the same File Open dialog you see in all your other Windows applications, all wrapped in a nice wxPython-compatible class interface.
Here's the event handler that catches the File Open menu event, and Figure 20.10 shows the dialog in action:
def OnMenuOpen(self, event): # This should be checking if another is already open, # but is left as an exercise for the reader... dlg = wxFileDialog(self) dlg.SetStyle(wxOPEN) dlg.SetWildcard("*.dtj") if dlg.ShowModal() == wxID_OK: self.path = dlg.GetPath() self.SetTitle(self.title + ' - ' + self.path) self.bookset = BookSet() self.bookset.load(self.path) self.GetMenuBar().EnableTop(1, true) win = JournalView(self, self.bookset, ID_EDIT) self.views.append((win, ID_JRNL)) dlg.Destroy()
Start off by creating the file dialog and tell it how to behave. Next show the dialog and give the user a chance to select a BookSet file. Notice that this time you're checking the return value of the ShowModal method. This is how the dialog says what the result was. By default, dialogs understand the wxID_OK and wxID_CANCEL IDs assigned to buttons in the dialog and do the right thing when they are clicked. For dialogs you create, you can also specify other values to return if you wish.
The first thing to do after a successful completion of the file dialog is ask the dialog what the selected pathname was, and then use this to modify the frame's title and to open a BookSet file.
Take a look at the next line. It reenables the BookSet menu since there is now a file open. It's really two statements in one and is equivalent to these two lines:
menu = self.GetMenuBar() menu.EnableTop(1, true)
Since it makes sense to actually let the user see something when they ask to open a file, you should create and show one of the views in the last bits of the OnMenuOpen handler above. We'll take a look at that next.
The Journal view consists of a wxListCtrl with a single-line summary for each transaction. It's placed inside a wxMDIChildFrame and since it's the only thing in the frame, don't worry about setting or maintaining the size, the frame does it automatically. (Unfortunately, since some platforms send the first resize event at different times, sometimes the window shows up without its child sized properly.) Here's a simple workaround:
class JournalView(wxMDIChildFrame): def __init__(self, parent, bookset, editID): wxMDIChildFrame.__init__(self, parent, -1, "") self.bookset = bookset self.parent = parent tID = wxNewId() self.lc = wxListCtrl(self, tID, wxDefaultPosition, wxDefaultSize, wxLC_REPORT) ## Forces a resize event to get around a minor bug... self.SetSize(self.GetSize()) self.lc.InsertColumn(0, "Date") self.lc.InsertColumn(1, "Comment") self.lc.InsertColumn(2, "Amount") self.currentItem = 0 EVT_LIST_ITEM_SELECTED(self, tID, self.OnItemSelected) EVT_LEFT_DCLICK(self.lc, self.OnDoubleClick) menu = parent.MakeMenu(true) self.SetMenuBar(menu) EVT_MENU(self, editID, self.OnEdit) EVT_CLOSE(self, self.OnCloseWindow) self.UpdateView()
Figure 20.11 shows the application is progressing nicely and starting to look like a serious Windows application.
The wxListCtrl has many personalities, but they should all be familiar to you. Underneath its wxPython wrappers, it's the same control used in Windows Explorer in the right side panel. All the same options are available: large icons, small icons, list mode, and the report mode used here. You define the columns with their headers and then set some events for the list control. You want to be able to edit the transactions when they are double-clicked, so why are both event handlers needed? The list control sends an event when an item is selected, but it doesn't keep track of double-clicks. The base wxWindow class, on the other hand, reports double-clicks, but it knows nothing about the list control. So by catching both events you can easily implement the functionality you need. Here is the code for the event handlers:
def OnItemSelected(self, event): self.currentItem = event.m_itemIndex def OnDoubleClick(self, event): self.OnEdit()
After creating and setting up the list control, you create a menubar for this frame. Here you call the menu-making method in the parent, asking it to add the Edit Transaction menu item.
The last thing the __init__ method does is call a method to fill the list control from the BookSet. We've split this into a separate method so it can be called independently whenever the BookSet data changes. Here's the UpdateView method:
def UpdateView(self): self.lc.DeleteAllItems() for x in range(len(self.bookset)): trans = self.bookset[x] self.lc.InsertStringItem(x, trans.getDateString()) self.lc.SetStringItem(x, 1, trans.comment) self.lc.SetStringItem(x, 2, str(trans.magnitude())) self.lc.SetColumnWidth(0, wxLIST_AUTOSIZE) self.lc.SetColumnWidth(1, wxLIST_AUTOSIZE) self.lc.SetColumnWidth(2, wxLIST_AUTOSIZE) self.SetTitle("Journal view - %d transactions" % len(self.bookset))
Putting data in a list control is fairly easy; just insert each item. For the report mode, you insert an item for the first column and then set values for the remaining columns. For each column in the example, just fetch some data from the transaction and send it to the list control. If you were using icons or combination of icons and text, there are different methods to handle that.
Now that there's data in the list control, you should resize the columns. You can either specify actual pixel widths or have the list auto-size the columns based on the widths of the data.
The last thing the JournalView class needs to do is to enable the editing of the transactions. We saw previously that when an item is double-clicked, a method named OnEdit is invoked. Here it is:
def OnEdit(self, *event): if self.currentItem: trans = self.bookset[self.currentItem] dlg = EditTransDlg(self, trans, self.bookset.getAccountList()) if dlg.ShowModal() == wxID_OK: trans = dlg.GetTrans() self.bookset.edit(self.currentItem, trans) self.parent.UpdateViews() dlg.Destroy()
This looks like what we did with the file dialog in the main frame, and indeed you will find yourself using this pattern quite often when using dialogs. The one item to notice here is the call to UpdateViews() in the parent window. This is how to manage keeping all the views of the BookSet up to date. Whenever a transaction is updated, this method is called and then loops through all open views, telling the views to update themselves with their UpdateView() method.
The next step is to build a dialog to edit a transaction. As you've seen, the transaction object is composed of a date, a comment, and a variable number of transaction lines each of which has an account name and an amount. We know that all the lines should add up to zero and that the date should be a valid date. In addition to editing the date and comment, you need to be able to add, edit, and delete lines. Figure 20.12 shows one possible layout for this dialog and the one used for this example.
Since there's quite a bit going on here, let's go through the initialization of this class step by step. Here's the first bit:
class EditTransDlg(wxDialog): def __init__(self, parent, trans, accountList): wxDialog.__init__(self, parent, -1, "") self.item = -1 if trans: self.trans = copy.deepcopy(trans) self.SetTitle("Edit Transaction") else: self.trans = Transaction() self.trans.setDateString(dates.ddmmmyyyy(self.trans.date)) self.SetTitle("Add Transaction")
This is fairly simple stuff. Just invoke the parent class's __init__ method, do some initialization, and determine if you're editing an existing transaction or creating a new one. If editing an existing transaction, use the Python copy module to make a copy of the object. You do this because you will be editing the transaction in-place and don't want to have any partially edited transactions stuck in the BookSet. If the dialog is being used to add a new transaction, create one, and then fix its date by truncating the time from it. The default date in the transaction includes the current time, but this dialog is equipped to deal only with the date portion.
If you review the sidebar wxPython Window Layout, you'll see a number of choices available, but we have chosen to use the brute-force mechanism for the Edit Transaction dialog:
# Create some controls wxStaticText(self, -1, "Date:", wxDLG_PNT(self, 5,5)) self.date = wxTextCtrl(self, ID_DATE, "", wxDLG_PNT(self, 35,5), wxDLG_SZE(self, 50,-1)) wxStaticText(self, -1, "Comment:", wxDLG_PNT(self, 5,21)) self.comment = wxTextCtrl(self, ID_COMMENT, "", wxDLG_PNT(self, 35, 21), wxDLG_SZE(self, 195,-1)
The code shows how to create the labels and the text fields at the top of the dialog. Notice the use of wxDLG_PNT and wxDLG_SZE to convert dialog units to a wxPoint and a wxSize, respectively. (The -1's used above mean that the default size should be used for the height.) Using dialog units instead of pixels to define the dialog means you are somewhat insulated from changes in the font used for the dialog, so you use dialog units wherever possible. The wxPoint and wxSize are always defined in terms of pixels, but these conversion functions allow the actual number of pixels used to vary automatically from machine to machine with different fonts. This makes it easy to move programs between platforms that have completely different window managers. Figure 20.13 shows this same program running on RedHat Linux 6.0, and you can see that for the most part, the controls are still spaced appropriately even though a completely different font is used on the form. It looks like the wxTextCtrl is a few dialog units taller on this platform, so perhaps there should be a bit more space between the rows. We leave this as an exercise for you.
The next control to be defined is the wxListCtrl that displays the account and amount lines:
self.lc = wxListCtrl(self, ID_LIST, wxDLG_PNT(self, 5,34), wxDLG_SZE(self, 225,60), wxLC_REPORT) self.lc.InsertColumn(0, "Account") self.lc.InsertColumn(1, "Amount") self.lc.SetColumnWidth(0, wxDLG_SZE(self, 180,-1).width) self.lc.SetColumnWidth(1, wxDLG_SZE(self, 40,-1).width)
It's important to note that the width of this control is 225 dialog units. Since this control spans the entire width of the dialog, you know the space you have to work with. You can use this value when deciding where to place or how to size the other controls.
Instead of auto-sizing the width of the list columns, let's now use explicit sizes. But you can still use dialog units to do it by extracting the width attribute from the wxSize object returned from wxDLG_SZE. We should mention the following points:
The balance field is disabled, as you only want to use it to display a value.
Use a wxStaticLine control for drawing the line across the dialog.
A wxComboBox is used for selecting existing account names from a list.
Use the standard IDs wxID_OK and wxID_CANCEL for OK and Cancel buttons, respectively, and force the OK button as the default button.
Call the base class Fit() method to determine the initial size of the dialog window. This function calculates the total required size based on the size information specified in each of the children.
Here's the rest of the code for creating the controls:
wxStaticText(self, -1, "Balance:", wxDLG_PNT(self, 165,100)) self.balance = wxTextCtrl(self, ID_BAL, "", wxDLG_PNT(self, 190,100), wxDLG_SZE(self, 40, -1)) self.balance.Enable(false) wxStaticLine(self, -1, wxDLG_PNT(self, 5,115), wxDLG_SZE(self, 225,-1)) wxStaticText(self, -1, "Account:", wxDLG_PNT(self, 5,122)) self.account = wxComboBox(self, ID_ACCT, "", wxDLG_PNT(self, 30,122), wxDLG_SZE(self, 130,-1), accountList, wxCB_DROPDOWN | wxCB_SORT) wxStaticText(self, -1, "Amount:", wxDLG_PNT(self, 165,122)) self.amount = wxTextCtrl(self, ID_AMT, "", wxDLG_PNT(self, 190,122), wxDLG_SZE(self, 40, -1)) btnSz = wxDLG_SZE(self, 40,12) wxButton(self, ID_ADD, "&Add Line", wxDLG_PNT(self, 52,140), btnSz) wxButton(self, ID_UPDT, "&Update Line", wxDLG_PNT(self, 97,140), btnSz) wxButton(self, ID_DEL, "&Delete Line", wxDLG_PNT(self, 142,140), btnSz) self.ok = wxButton(self, wxID_OK, "OK", wxDLG_PNT(self, 145,5), btnSz) self.ok.SetDefault() wxButton(self, wxID_CANCEL, "Cancel", wxDLG_PNT(self, 190,5), btnSz) # Resize the window to fit the controls self.Fit()
The last thing to do is set up some event handlers and load the dialog controls with data. The event handling for the controls is almost identical to the menu handling discussed previously, so there shouldn't be any surprises:
# Set some event handlers EVT_BUTTON(self, ID_ADD, self.OnAddBtn) EVT_BUTTON(self, ID_UPDT, self.OnUpdtBtn) EVT_BUTTON(self, ID_DEL, self.OnDelBtn) EVT_LIST_ITEM_SELECTED(self, ID_LIST, self.OnListSelect) EVT_LIST_ITEM_DESELECTED(self, ID_LIST, self.OnListDeselect) EVT_TEXT(self, ID_DATE, self.Validate) # Initialize the controls with current values self.date.SetValue(self.trans.getDateString()) self.comment.SetValue(self.trans.comment) for x in range(len(self.trans.lines)): account, amount, dict = self.trans.lines[x] self.lc.InsertStringItem(x, account) self.lc.SetStringItem(x, 1, str(amount)) self.Validate()
The last thing the code snippet does is call a Validate() method, which as you can probably guess, is responsible for validating the dialog data; in this case, validating the date and that all transaction lines sum to zero. Check the date when the field is updated (via the EVT_TEXT() call shown in the code) and check the balance any time a line is added or updated. If anything doesn't stack up, disable the OK button. Here is Validate:
def Validate(self, *ignore): bal = self.trans.balance() self.balance.SetValue(str(bal)) date = self.date.GetValue() try: dateOK = (date == dates.testasc(date)) except: dateOK = 0 if bal == 0 and dateOK: self.ok.Enable(true) else: self.ok.Enable(false)
Notice that the balance field is updated. The next thing we demonstrate is the Add Line functionality. To do this, you need to take whatever is in the account and amount fields, add them to the transaction, and also add them to the list control:
def OnAddBtn(self, event): account = self.account.GetValue() amount = string.atof(self.amount.GetValue()) self.trans.addLine(account, amount) # update the list control idx = len(self.trans.lines) self.lc.InsertStringItem(idx-1, account) self.lc.SetStringItem(idx-1, 1, str(amount)) self.Validate() self.account.SetValue("") self.amount.SetValue("")
You call Validate again to check if the transaction's lines are in balance. The event handlers for the Update and Delete buttons are similar and not shown here.
That's about all there is to it! wxPython takes care of the tab-traversal between fields, auto-completion on the Enter key, auto-cancel on Esc, and all the rest.
This small section has barely touched the surface of what wxPython is capable of. There are many more window and control types than what have been shown here, and the advanced features lend themselves to highly flexible and dynamic GUI applications across many platforms. Combined with the flexibility of Python, you end up with a powerful tool for quickly creating world-class applications.
For more information on wxPython, including extensive documentation and sample code, see the wxPython home page at http://alldunn.com/wxPython/.
For more information on the underlying wxWindows framework, please visit its home page at http://www.wxwindows.org/.
| I l@ve RuBoard |


## Hi, I'm HTML Decks
*Press the right arrow key on your keyboard or swipe to learn more about me.*
---
I'm a [free and open source way](https://github.com/vzvenyach/htmldecks) to host professional slide decks.
---
I'm built using [Reveal.JS](http://lab.hakim.se/reveal-js/) and inspired by [Biggie](https://github.com/tmcw/biggie).
---
To use me, write slides in [markdown](http://daringfireball.net/projects/markdown/syntax) and separate each slide with three dashes.
---
Like This!
![](/lib/img/slide_img.png)
---
It's that simple to create web presentations, like the one you're looking at right now.
---
If you want a robust tool, consider [Slides](https://slides.com).
---
But if you want to hack up a presentation real quick,
register for free here:
---


OVE @APP is an OVE App designed to run within OVE.
This instance of the OVE @APP is associated with an instance of OVE Core accessible at __OVEHOST__ - more information about OVE and how it has been configured is available there.
Each section running @APP has its own:
/control.html?oveSectionId=<sectionId>
/view.html?oveSectionViewId=<viewId>.<sectionId>
/api-docs/
route of the appropriate hostname.


{% load static %}
Home
Test page
About Page
Contributors
Sign up form
The Ninja Shop
Shop Totals:
Reset
Souvenirs
4-9 tickets
{% csrf_token %}
Purchase Souvenirs
Food
2-7 tickets
{% csrf_token %}
Purchase Food
T-Shirts
10-20 tickets
{% csrf_token %}
Purchase T-Shirts
Stuffed Animals
5-15 tickets
{% csrf_token %}
Purchase Stuffed Animals


Hookbox
password:
Sign on
overview
channels
users
Console Logs
Webhook Logs
Overview
Summary
Version:
Unknown
Users:
Channels:
Channels
(no channels)
Users
(no users)
Console Logs
Webhook Logs
Channels
>
History
Event Logs
Subscribers
Options
Publish
username
message (JSON)
publish
Users
(
Disconnected
)
Event Logs
Channels
(no channels)
Connections
Connection
id:
status:
user:
Connection cookie


On 12 November 2015, the National IHR Focal Point of Suriname notified PAHO/WHO of 4 additional cases of Zika virus infection. The cases were laboratory confirmed by the Caribbean Public Health Agency (CARPHA). Furthermore, one of two previously reported cases (see DON published on 11 November) was also re-confirmed by CARPHA.
Given the increased transmission of Zika virus in the Region of the Americas, PAHO/WHO recommends that its Member States establish and maintain the capacity to detect and confirm cases of Zika virus infection, prepare their health services for a potential additional burden at all levels of health care, and implement an effective public communications strategy to reduce the mosquitoes that transmit this disease, particularly in areas where this vector is present. The complete set of recommendations is available in the latest Epidemiological Update (see related links).


Metal
Spot
Gold
--
Silver
--
Platinum
--
Palladium
--
Loading...
Data from Zacks Investment Research, Inc.


Ventilation with bag and mask is the most important and effective way to help the baby who is not breathing or is gasping. Ventilation opens the lungs with air.
Begin to ventilate
Follow your facility’s routine for when to
clamp or tie and cut the cord
Cutting the cord should not delay the start of ventilation. Begin ventilation by 1 minute.
Place the baby on the area for ventilation
Use an area beside the mother if the cord is left intact. A skilled helper can clamp or tie and cut the cord if the baby is moved to a separate area.
Stand at the baby’s head
You will need to control the position of the head and look for movement of the chest.
Check that the mask size is correct
The mask should cover the chin, mouth, and nose, but not the eyes. The mask should make a tight seal on the face so air will enter the baby’s lungs.
A mask that is too large will not seal well on the face. Air will escape under the mask. A mask that is too small will not cover both the mouth and nose and may block the nose. Air will not enter the lungs freely.
Practice key skills
Practice in pairs
- Follow your facility’s routine for when to clamp or tie and cut the cord
- Place the baby on the area for ventilation
- Stand at the baby’s head
- Check that the mask size is correct
Check yourself
Mark the box beside the best answer


Phone Doctor application collects information about system events and crashes, device identification, log files, crash core dump and build ingredient versions. This information is used to improve Android platforms stability and accelerate stabilization phase.


RT @ag_dubs: hello. plz let me know if you'd like to hire me. i have recently become available.
4/23/2015, 8:49:19 PM
Favs: 0
Retweets: 0
link--- layout: tweet ---
RT @ag_dubs: hello. plz let me know if you'd like to hire me. i have recently become available.
4/23/2015, 8:49:19 PM
Favs: 0
Retweets: 0
link


You can have your items delivered to your home or office.
Shipment
You can have your items delivered to your home or office.
Once your order is shipped out, you will receive a shipment email which will include a copy of the receipt. Since shipments can go out on different days, and eials are sent when each shipment is sent for delivery, you may receive multiple emails on different days. Each receit will correspond to an individual charge on your method of payment for easy reconciliation.
Delivery is free on orders over $50 excluding GST and PST, coupons. The order is shipped pending credit approval and product availability. Orders under $50 are charged a $4.99 delivery fee.
Unfortunately, no. That said, we might ship your items separately based on availability. If you don't want all your items at the same time, we suggest putting in separate orders.
Unfortunately, we cannot deliver to P.O. Boxes.
We will be happy to place your delivery order within 1 metre inside the entrance of a residential home.
We apologize fot that inconvenience. If you're returning a defective item, we'll refund your shipping charges.


Bowling
This is how we roll
This is how we roll
Light up the night!
Tee up for some fun
It's all fun and games
Fuel up for more fun!
Celebrate with your friends
It is all about you! Our mission is to inspire your creativity and imagination while also providing an experience the entire family will enjoy. We pride ourselves on premier service and no customer should leave without a smile.
You can email us or follow us on our social media, we would love to talk to you!


基于Django的多人博客系统
Some quick example text to build on the card title and make up the bulk of the card's content. 完整内容
网名:牢记圣光
QQ:278554189


ActionTree¶
ActionTree is a Python (3.5+) library to execute (long) actions in parallel, respecting dependencies between those actions.
You create a dependency graph of actions to be executed and then call the execute
function on its root.
It’s licensed under the MIT license. It’s available on the Python package index. Its documentation and its source code are on GitHub.
Questions? Remarks? Bugs? Want to contribute? Open an issue!
Quick start¶
Install from PyPI:
$ pip install ActionTree
With dependencies to create Gantt charts and dependency graphs:
$ pip install 'ActionTree[dependency_graphs,gantt]'
Import:
>>> from ActionTree import execute
>>> from ActionTree.stock import CallSubprocess
Execute some action:
>>> link = CallSubprocess(["g++", "a.o", "b.o", "-o", "test"])
>>> link.add_dependency(CallSubprocess(["g++", "-c", "a.cpp", "-o", "a.o"]))
>>> link.add_dependency(CallSubprocess(["g++", "-c", "b.cpp", "-o", "b.o"]))
>>> report = execute(link)
And verify everything went well:
>>> report.is_success
True
>>> os.path.isfile("test")
True


3d unfold
3d unfold
You may put any HTML here. This is dummy copy. It is not meant to be read. It has been placed here solely to demonstrate the look and feel of finished, typeset text. Only for show. He who searches for meaning here will be sorely disappointed.
YLore jsdfhjdskfhl


This quiz website is the perfect destination for all those people who want to test their skills in basic front end development.
This site not only allows you to take a quiz but also keep track of your performances in the past so that you can see your growth.Apart from the existing subjects we will also try to add some new subjects and also add new questions to the existing subjects.
To make it more user friendly and popular we will also add levels so that people can test their expertise accordingly.


Preparation time
overnight
Cooking time
30 mins to 1 hour
Serves
Serves 2
Seared plaice served on softened butter beans, lightly spiced and fresh with the flavours of lemon, thyme and mint.
For the butterbeans, drain and rinse the pre-soaked beans and place in a deep saucepan, cover with fresh cold water then add the garlic and thyme and bring to a gentle simmer.
Cook gently for approximately 40 minutes, skimming off any scum that rises to the top of the pan, until the beans are just tender, then drain and set aside. Alternatively use canned cooked butter beans that have been drained and rinsed well.
Heat a large non-stick frying pan over a medium heat, add a splash of oil and sauté the diced red onion, chilli, ginger and garlic for one minute. Add the pre-cooked butterbeans (or tinned butterbeans) and lemon zest and cook for a further minute.
Add the chicken stock, increase the heat and simmer for a minute, then remove from the heat.
Add the mint, crème fraîche and half of the chopped dill. Mix well and season to taste with salt and freshly ground black pepper.
For the fish, prepare the plaice fillets. Using a sharp flexible knife trim the plaice of any skin and outer skirt pieces so you have three neat equally sized pieces of plaice per person.
Season the fillets with salt and black pepper.
Heat a large non-stick frying pan over a medium heat. Add a splash of oil then lay the fillets in the pan, presentation side down (which is the flesh side) and cook for two minutes.
Using a fish slice, turn the fillets over and cook for a further minute.
Turn off the heat, squeeze over a little lemon juice, then remove and drain onto kitchen paper.
To serve, arrange the butter beans and sauce in warm serving bowls and lay over the seared plaice. Scatter over the remaining dill and a drizzle of extra virgin olive oil.


App Engine Python SDK
v1.6.9 rev.445
The Python runtime is available as an experimental Preview feature.
google
appengine
datastore
datastore_v3_pb
TouchResponse
Public Member Functions
|
Public Attributes
|
Static Public Attributes
|
List of all members
google.appengine.datastore.datastore_v3_pb.TouchResponse Class Reference
Inheritance diagram for google.appengine.datastore.datastore_v3_pb.TouchResponse:
Public Member Functions
def
__init__
def
cost
def
mutable_cost
def
clear_cost
def
has_cost
def
MergeFrom
def
Equals
def
IsInitialized
def
ByteSize
def
ByteSizePartial
def
Clear
def
OutputUnchecked
def
OutputPartial
def
TryMerge
def
__str__
Public Attributes
lazy_init_lock_
has_cost_
Static Public Attributes
int
has_cost_
= 0
cost_
= None
int
kcost
= 1
The documentation for this class was generated from the following file:
code/googleappengine-read-only/python/google/appengine/datastore/datastore_v3_pb.py
Maintained by
tzmartin


12 DEC 12
2
Lorem Ipsum dolor sit amat velum
It is a long established fact that a reader will be distracted
by readable content of a page when looking at its layout.
The point of using Lorem Ipsum is that it has a more-or-less
normal distribution of letters, as opposed to using 'Content
here, content here', making it look like readable English.


The unique AquaDom lift can be seen at the Radisson SAS Hotel in Berlin. The main feature of the elevator is its unique design. It was equipped with a huge cylindrical aquarium with thousands of colorful fish. The height of the aquarium is 25 meters, and its circumference is about 900,000 liters. During the ascent and descent, the AquaDom Elevator literally moves inside the giant aquarium, so the people in it can watch the tropical fish.
Exotic
The exotic inhabitants of the aquarium lift need special care, so at the Hotel Berlins two divers who feed the fish every day. The huge aquarium of the cylindrical shape is made of acrylic glass. Its diameter is 11 meters. This impressive size makes AquaDom the real global leader - the world's largest acrylic glass cylinder.
Partnership
The strange elevator was opened in the hotel in 2003. It is the result of the joint project of the companies Rocket Elevators, International Concept Management Inc. and Reynolds Polymer Technology. According to the calculations, the construction of the elevator cost almost 13 million euros. The elevator in the chic hotel of Berlin is two-storey. From the beginning it should serve not only as a practical element of the building, but also to decorate the interior.


- Source:
Methods
(static) exports.eventCloseButton()
Triggers a event when the close button is clicked.
Note: emits the modalclose
event
- Source:
(static) exports.eventPlayButton()
Triggers a event when the play button is clicked.
Note: emits the modalopen
event
- Source:
(static) exports.eventStartButton()
Triggers a event when the start button is clicked.
Note: emits the modalstart
event
- Source:


Disease Detect Report
Detection results of the provided leaf image
| Leaf Disease |
Confidence |
| {{ first_prediction_key.title }} |
{{ first_prediction_value }} |
{% for label, result in prediction_results.items %} {% if label not in exclude_key %}
| {{ label.title }} |
{{ result }} |
{% endif %} {% endfor %}
About the Disease
{{ disease_description }}
Learn More


Our goal is to make the complex world of bioinformatics more accessible and fun for everyone
When you start learning new stuff, it's important to grasp all the key concepts easily and intuitively. Instead, the first thing you face as a newbie bioinformatician is a daunting stack of 20 different software packages you need to install on your computer. Afterwards, it turns out that you need to learn how to use Linux, how to compile C++ code, and how to write scripts in Python and R.
We value your time and move you straight to the most interesting part, extracting the information you need out of your raw data. With our automated pipelines, you will get the desired results quickly, in a clear and visualized way.
Enjoy a user-friendly introduction to bioinformatics, one of the most interesting disciplines in the world that you always wanted to know more about.
Start free trialBioinformatics relies on processing gigabytes of raw data, which usually can't be done efficiently on a typical client device. For instance, indexing a human genome and aligning the reads to it may take more than a day on a typical Macbook Air.
We empower you with an ability to run any pipeline job quickly and efficiently. To make in work, we use enterprise-class parallel computing technology stack (such as DC/OS, Docker Containers and Apache Mesos).
Speed up your data processing, and let us take care of the IT infrastructure for you.
We provide unlimited storage space for your input files upon request. This doesn't include the bulky reference genome data files and annotation databases, which we keep stored in our shared repository and available for you at any time.
You can run the pipeline jobs on these sample datasets or upload your own data to your file storage on our servers. After the pipeline job is completed, the output files can be downloaded to be further explored with any bioinformatics software you prefer.
We can also address your needs if you are a professional bioinformatician. Say, you have your own custom and tuned set of pipelines, but your hardware is insufficient to run them fast enough. Or you don't want to dig into details of how to parallelize your data processing within a cluster environment.
Send us a request with either your script or even simply a brief description of the steps you take when processing you data. We will implement your pipelines in our system making it accessible for you in a single click via your private account and executable on our servers.
Focus on your core area of expertise and let us take care about the rest
Contact usAll the basic information you need to know to get started
Learn how to get the reads from the raw data with Illumina
Understand how bioinformaticians store the raw data about nucleotides
Figure out who is the default homo sapiens we compare ourselves to
If you have any questions, please feel free to email or call us.
© 2016 NGS Pipeline
Use of this website constitutes acceptance of Privacy Policy and Terms of Service.


'ROSIE WAS LET DOWN'
Mum of cancer patient who died in scandal-hit Glasgow hospital brands facility as ‘sick’
by Kevin Duguid and Oliver NortonA CANCER treatment room at Glasgow’s crisis-hit Royal Hospital for Children has still not opened — more than four years after it was built.
And now the mum of a cancer patient who died at the scandal-hit hospital has branded the facility “sick”.
Donna-Louise Hurrell, 40, believes daughter Rosie Veronica Mitchell, who passed away in January aged seven, could have benefited from care at a hub designed to tackle neuroblastoma.
But we can reveal the MIBG cancer treatment room will not open until at least the spring at Glasgow’s Royal Hospital for Children — part of the Queen Elizabeth University campus plagued by infection outbreaks.
Donna-Louise, of Port Glasgow, Renfrewshire, claimed vital chemotherapy for Rosie was delayed at least twice after bug problems at the facility, which opened in June 2015.
The mum said: “Rosie fought as hard as she could but in the end she was let down.
“She was treated latterly in a ‘sick building’ where she was so busy having to deal with the effects of infection issues that she didn’t always have the energy or support needed to fight the cancer.”
Donna-Louise claims the lead-lined room is in ward 2A — one of two paediatric cancer wards at the Royal Hospital for Children.
The sites have been closed since last September following a string of infections and are not expected to reopen until at least March — along with the treatment room.
The mum said: “Rosie potentially could have benefited from it but instead had to go on the waiting list to get it elsewhere.
“Rosie was put on the waiting list in London. By the time she got there in January her cancer had progressed so far she couldn’t get the treatment.
“If that room had been available in that hospital she would have got treatment quicker. Would that have made a difference to her outcome?”
The £842million superhospital plunged into government control this week.
Donna-Louise blasted the lack of transparency and care by NHS Greater Glasgow and Clyde.
She said: “The health board are not being as open and transparent as they should be.
“I don’t think the Government are doing a good enough of holding them to account at all.
“Nobody has written to me to apologise for what Rosie had to go through in that hospital. It should never have happened.”
The MIBG room was built with the hospital in 2015. It will see nuclear medicine scans used to check for changes in the adrenal glands and surrounding tissues.
It’s understood that the therapy is only available currently at the University College Hospital and the Royal Marsden hospitals in London.
Rosie potentially could have benefited from it but instead had to go on the waiting list to get it elsewhere.Donna-Louise Hurrell
Another parent said the special room “has never been in use”. They claimed funding was approved last year to train staff and carry out work.
A source added: “The point of having it in the new hospital was so children wouldn’t have to travel to London for it. It would have reduced the waiting list for kids.”
Labour’s health spokeswoman Monica Lennon said: “The MIBG room must be fully resourced and the safe reopening of the children’s cancer wards should be the Government’s top priority.”
A spokeswoman for the health board said the MIBG room was built as a “potential new” service.
She added: “Work is under way to upgrade the MIBG room in readiness for the launch of the service in spring next year when wards 2A and 2B reopen.”
A Scottish Government spokesman said: “We understand NHS Greater Glasgow and Clyde are working to ensure that both the room and the surrounding environment are ready to admit patients both safely and as soon as possible.”


DRAWPOINT draw the point on the axis. drawPoint(X, Y); Draws points defined by coordinates X and Y. X and Y should be array the same size. drawPoint(COORD); Packs coordinates in a single [N*2] array. drawPoint(..., OPT); Draws each point with given option. OPT is a series of arguments pairs compatible with 'plot' model. H = drawPoint(...) also return a handle to each of the drawn points. Example drawPoint(10, 10); t = linspace(0, 2*pi, 20)'; drawPoint([5*cos(t)+10 3*sin(t)+10], 'r+'); See also points2d, clipPoints --------- author : David Legland INRA - TPV URPOI - BIA IMASTE created the 31/10/2003.


Cup
13/07/2015
to13/08/2015
| Team | Group | Matches played | Wins | Ties | Loses | Goals favor | Goals against | Goals average | Points |
|---|---|---|---|---|---|---|---|---|---|
| Spain | A | 3 | 2 | 0 | 1 | 8 | 3 | 5 | 6 |
| England | A | 2 | 1 | 0 | 1 | 5 | 2 | 3 | 4 |
| Germany | A | 3 | 2 | 0 | 1 | 8 | 3 | 5 | 6 |
| Sweden | A | 3 | 0 | 2 | 1 | 1 | 3 | -2 | 2 |
| # | Team | Group |
|---|---|---|
| 1 | Spain - England | A |
| 2 | Italy - Greece | B |
| 3 | Austria - Honduras | A |


Trader Eva Nwanya
| 0 positive feedbacks | 0 neutral feedbacks | 0 negative feedbacks |
Trader is not online now. Last seen 2 weeks ago . Thats mean if you make trade request maybe will take more than 30 minutes.
| 0 positive feedbacks | 0 neutral feedbacks | 0 negative feedbacks |


Gecode::Support::DynamicStack< T > Class Template Reference
[Support algorithms and datastructures]
#include <dynamic-stack.hh>
Detailed Description
template<class T>
class Gecode::Support::DynamicStack< T >
Stack with arbitrary number of elements.
Requires
#include "gecode/support/dynamic-stack.hh"
Definition at line 36 of file dynamic-stack.hh.
Public Member Functions | |
| DynamicStack (int n=64) | |
| Initialize stack with n elements. | |
| ~DynamicStack (void) | |
| Release memory. | |
| bool | empty (void) const |
| Test whether stack is empty. | |
| T | pop (void) |
| Pop topmost element from stack and return it. | |
| T & | top (void) |
| Return top of stack. | |
| void | push (T) |
| Push element on stack. | |
| int | entries (void) const |
| Return number of entries currently on stack. | |
| T & | operator[] (int i) |
| Return entry at position i. | |
| const T & | operator[] (int i) const |
| Return entry at position i. | |
| size_t | size (void) const |
| Return size of stack. |
Constructor & Destructor Documentation
|
|
Initialize stack with n elements.
Definition at line 94 of file dynamic-stack.hh. |
|
|
Release memory.
Definition at line 99 of file dynamic-stack.hh. |
Member Function Documentation
|
|
Test whether stack is empty.
Definition at line 125 of file dynamic-stack.hh. |
|
|
Pop topmost element from stack and return it.
Definition at line 105 of file dynamic-stack.hh. |
|
|
Return top of stack.
Definition at line 111 of file dynamic-stack.hh. |
|
|
Push element on stack.
Definition at line 117 of file dynamic-stack.hh. |
|
|
Return number of entries currently on stack.
Definition at line 131 of file dynamic-stack.hh. |
|
|
Return entry at position i.
Position 0 corresponds to the element first pushed, whereas position Definition at line 137 of file dynamic-stack.hh. |
|
|
Return entry at position i.
Position 0 corresponds to the element first pushed, whereas position Definition at line 143 of file dynamic-stack.hh. |
|
|
Return size of stack.
Definition at line 149 of file dynamic-stack.hh. |
The documentation for this class was generated from the following file:
- gecode/support/dynamic-stack.hh (Revision: 3514)


pthread_win32_getabstime_np
#include <pthread.h>
struct timespec * pthread_win32_getabstime_np (struct timespec * abstime, struct timespec * reltime);
Primarily to facilitate writing unit tests but exported for convenience. The struct timespec pointed to by the first parameter is modified to represent the current time plus an optional offset value struct timespec in a platform optimal way.
Returns the first parameter so is compatible as the struct timespec * parameter in POSIX timed function calls.
None.
This routine returns the first parameter (non-zero) on success, or NULL (0) if it fails.
None.
Ross Johnson for use with Pthreads4W.


index
|
up
|
prev
|
next
BidiClass Class
Definition at line
681
of
Unicode.hpp
Constructors
BidiClass
(
BidiClassId
id_,
const
std::string& shortName_,
const
std::string& longName_)
Member Functions
BidiClassId
Id
()
const
const
std::string&
LongName
()
const
const
std::string&
ShortName
()
const
Member Variables
BidiClassId
id
std::string
longName
std::string
shortName
Constructor Details
BidiClass Constructor
cmajor::unicode::BidiClass::BidiClass(
BidiClassId
id_,
const
std::string& shortName_,
const
std::string& longName_)
Definition at line
1521
of
Unicode.cpp
:
1521
:
id
(
id_
)
,
shortName
(
shortName_
)
,
longName
(
longName_
)
1522
{
1523
}
Declaration at line
684
of
Unicode.hpp
Member Function Details
Id Member Function
BidiClassId
cmajor::unicode::BidiClass::Id()
const
Definition at line
685
of
Unicode.hpp
:
685
{
return
id
;
}
Called by:
LongName Member Function
const
std::string& cmajor::unicode::BidiClass::LongName()
const
Definition at line
687
of
Unicode.hpp
:
687
{
return
longName
;
}
Called by:
ShortName Member Function
const
std::string& cmajor::unicode::BidiClass::ShortName()
const
Definition at line
686
of
Unicode.hpp
:
686
{
return
shortName
;
}
Called by:
index
|
up
|
prev
|
next


Which pet would you like to be?
What would you love to do in your spare time?
Your personality would be:
You match with Anne Hathaway!
You match with Emma Stone!
You match with Miley Cyrus!
You match with Adele!
You match with Beyonce!
You match with Taylor Swift!


A cool and asthetic template for you!
A single page portfolio, with everything from exeperience to your projects.
All in one Template!
Just the right mixture of designing and innovating!


Page maintained by Ke-Sen Huang.
If you have additions or changes, send an e-mail.
Note that when possible I link to the page containing the link to the actual PDF or PS of the preprint.
I prefer this as it gives some context to the paper and avoids possible copyright problems with direct linking.
Thus you may need to search on the page to find the actual document.
Changelog
Sampling & MLS
- Sampling Point-Set Implicits (PDF)
-
Joao Proenca,
Joaquim Jorge,
Mario Sousa
- Low-Discrepancy Point Sampling of Meshes for Rendering
-
Jonathan Quinn,
Frank Langbein,
Ralph Martin
- Direct Computing of Surface Curvatures for Point-Set Surfaces
-
Pinghai Yang,
Xiaoping Qian
Deformation
- Interactive Editing of Large Point Clouds
-
Michael Wand,
Alexander Berner,
Martin Bokeloh,
Arno Fleck,
Mark Hoffmann,
Philipp Jenke,
Benjamin Maier,
Dirk Staneker,
Andreas Schilling
- SIMOD: Making Freeform Deformation Size-Insensitive
-
Tamy Boubekeur,
Olga Sorkine,
Christophe Schlick
Animation
- Efficient Bounds for Point-Based Animations
-
Denis Steinemann,
Miguel A. Otaduy,
Markus Gross
- Efficient Refinement of Dynamic Point Data
-
Barbara Solenthaler,
Yanci Zhang,
Renato Pajarola
Geometry & Analysis
- Approximate Star-Shaped Decomposition of Point Set Data
-
Jyh-Ming Lien
- On the Use of Gromov-Hausdorff Distances for Shape Comparison
-
Facundo Memoli
- Topological Methods for the Analysis of High Dimensional Data Sets and 3D Object Recognition
-
Gurjeet Singh,
Facundo Memoli,
Gunnar Carlsson
Rendering
- Efficient Point-Based Rendering Using Image Reconstruction
-
Ricardo Marroquim,
Martin Kraus,
Paulo Roma Cavalcanti
- Surfel-Based Billboard Hierarchies for Fast Rendering of 3D-Objects
-
Mathias Holst,
Heidrun Schumann
Compression
- A Parallelly Decodeable Compression Scheme for Efficient Point-Cloud Rendering
-
Ruwen Schnabel,
Sebastian Moser,
Reinhard Klein
- Self-Similarity-Based Compression of Point Clouds with Application to Ray Tracing
-
Erik Hubo,
Tom Mertens,
Tom Haber,
Philippe Bekaert
kesen.huang@gmail.com


Introduction
This is a simple introduction about computer science. You can learn it on YouTube:
https://www.youtube.com/results?search_query=cs50+2018
- CS50 2018 - Lecture 0 - Computational Thinking, Scratch
- CS50 2018 - Lecture 1 - C
- CS50 2018 - Lecture 2 - Arrays
- CS50 2018 - Lecture 3 - Memory
- CS50 2018 - Lecture 4 - Data Structures
- CS50 2018 - Lecture 5 - HTTP, HTML, CSS
- CS50 2018 - Lecture 6 - Python
- CS50 2018 - Lecture 7 - Web Programming
- CS50 2018 - Lecture 8 - SQL
- CS50 2018 - Lecture 9 - Life after 50
And here is some code practices downloaded from my personal online CS50 IDE. You can register EDX and use it for free. They also provide a offline IDE edition for coders.
git clone https://github.com/lance-lh/learning-cs50.git
python name attribute
This is a typical example from stackoverflow.
When the Python interpreter reads a source file, it executes all of the code found in it.
Before executing the code, it will define a few special variables. For example, if the Python interpreter is running that module (the source file) as the main program, it sets the special
__name__
variable to have a value"__main__"
. If this file is being imported from another module,__name__
will be set to the module’s name.
foo = 1
def functionA():
print("Function A")
def functionB():
print("Function B")
if __name__ == '__main__':
functionA()
functionB()
print(foo)
Assume above python file called test.py
,
we run it by python test.py
and it will output the following:
Function A
Function B
1
And here is a python file called call_test.py
and has the following content:
import test
print(__name__)
print(test.__name__)
run python call_test.py
, it will get the following result:
__main__
test
As you can see now if statement in test
fails to execute because the value of __name__
is set to test
.
python argv
from sys import argv
if len(argv)==2:
print("Hello, ", argv[1])
else:
print("Hello, world") # the case happens when python argv0.py or python argv.py plus plus plus...
# plus plus separated by space
'''
no count 0 1 2 ...
python argv0.py lance this
'''
python print format
for i in range(3):
for h in range(3):
print("#",end="")
print()
another example can be seen below
float-point imprecision
if you want to have an infinite amount of precision all the way out, you need an infinite amount of memory. And no Mac or PC or phone has an infinite amount of memory. And so imprecision was the analog in the floating point world to overflow, recall, where if you only have a finite number of bits you can do really well up to a point. But eventually, the computer’s got to estimate that value for you because you can’t represent an infinite number of values. For precision need, you need to import sth that allows you to use as much as memory as you want more than just the default amount of memory.
from cs50 import get_float
x = get_float("x: ")
y = get_float("y: ")
z = x / y
print(f"x / y = {z:.50f}")
struct
from cs50 import get_string
students = []
for i in range(3):
name = get_string("Name: ")
dorm = get_string("Dorm: ")
# key:value
student = {"name": name, "dorm": dorm}
students.append(student)
for student in students:
print(f"{student['name']} is in dorm {student['dorm']}")
python simple swap
x = 1
y = 2
print(f"x is {x}, y is {y}")
x, y = y, x
print(f"x is {x}, y is {y}")
C swap
#include<stdio.h>
void swap(int *x, int *y);
int main(void)
{
int a = 1;
int b = 2;
printf("a is %i, b is %i\n",a,b);
swap(&a,&b);
printf("a is %i, b is %i\n",a,b);
}
void swap(int *x, int *y)
{
int temp;
temp = *x;
*x = *y;
*y = temp;
}
fontsize adjust
<!DOCTYPE html>
<html lang="en">
<head>
<title>
size
</title>
</head>
<body>
<p>
haha, this is a simple practice for javascript.
</p>
<select>
<option value="xx-large">xx-large</option>
<option value="x-large">x-large</option>
<option value="large">large</option>
<option selected value="initial">initial</option>
<option value="small">small</option>
<option value="x-small">x-small</option>
<option value="xx-small">xx-small</option>
</select>
<script>
document.querySelector("select").onchange = function() {
document.querySelector("body").style.fontSize = this.value;
};
</script>
</body>
</html>
C struct
struct.h
// represent a student
typedef struct
{
char *name; // string name
char *dorm; // string dorm
}
student;
struct.c
, and write the results to csv
.
#include<stdio.h>
#include<string.h>
#include<cs50.h>
#include "struct.h"
int main(void)
{
int enrollment = get_int("enrollment: ");
student students[enrollment];s
for (int i=0;i<enrollment;i++)
{
students[i].name = get_string("name: ");
students[i].dorm = get_string("dorm: ");
}
FILE *file = fopen("students.csv","w");
if (file)
{
for (int i=0;i<enrollment;i++)
{
fprintf(file, "%s,%s\n",students[i].name, students[i].dorm);
}
fclose(file);
}
}
C linked list
#include<cs50.h>
#include<stdio.h>
typedef struct node
{
int number;
struct node *next;
}
node;
int main()
{
// Memory for numbers
node *numbers = NULL;
// Prompt for numbers (until EOF)
while(true)
{
// Prompt for number
int number = get_int("Number: ");
// Check for EOF
if(number == INT_MAX)
{
break;
}
// Allocate space for number
node *n = malloc(sizeof(node));
if(!n) //if PC is out of memory, then malloc fails
{
return 1;
}
// Add number to list
n->number = number; // (*n).number, n is a pointer
n->next = NULL;
if(numbers) // error check, if(numbers!=NULL)
{
for(node *ptr = numbers; ptr!= NULL; ptr = ptr->next)
{
if(ptr->next == NULL) // if(!ptr->next), update ptr = ptr->next
{
ptr->next = n;
break;
}
}
}
else
{
numbers = n;
}
}
}
malloc and free
#include<stdio.h>
#include<stdlib.h> // the library contains malloc()
void f(void); // declaration
int main()
{
f();
}
void f(void)
{
int *x = malloc(10 * sizeof(int));
x[9] = 50;
printf("You inputted %i.\n",x[9]);
free(x);
}
summary of searching and sorting
| Algorithms | Conception | $O$ | $\Omega$ |
|---|---|---|---|
| Linear search | left to right search | $n$ | $1$ |
| Binary search | sorted array, half | $\log n$ | $1$ |
| Bubble sort | bubble swap adjacent pairs | $n^2$ | $n$ |
| Selection sort | find the smallest one, place change | $n^2$ | $n^2$ |
| Insertion sort | proceed the array from left to right, shift and insert | $n^2$ | $n$ |
| Merge sort | split and merge | $n log n$ | $n log n$ |


Sound navigation and ranging (Sonar) Sensors
Evolution in nature is influencing technology at large, it is no surprise then that field crickets have been an influence on localising technology that could be used in autonomous vehicles. After all, sound is one of the primary tools used by the emergency services to clear way on the road for them to pass and to keep nearby drivers safe.
Based on the reflection of sound waves we are able to calculate an estimate of the distance to objects and over time their speed and direction. Ultrasonic sound is used above ground on vehicles because, due to their high frequency, they're not able to be heard by humans or animals and have a range of about 8 metres.
Tesla's model S sedan uses ultrasonic detection, which they have managed to hide within the body of their vehicle in order to use SONAR technology without having the sensors mounted on the vehicle.
Radio detection and ranging (Radar) Sensors
Radar is identical to sonar in all ways except radio waves are used instead, which have a much larger range and can be altered to vary between accuracy at higher frequencies or range at lower ones.
Light detection and ranging (Lidar) Sensors
Light detection and ranging sensors are used in most autonomous packages in vehicles, they can use lasers to detect the distance to objects in a radial field around the sensor. This highly accurate system can be combined with reconstructive algorithms to produce 3 dimensional scenes of an environment.
One large drawback of these systems is the amount of resources required for them to run accurately in real time, resource usage can be reduced at the cost of accuracy which can impact safety and usability.
References
- McKinsey & Company
- Bicho, Mallet, and Schoner / Target Representation on an Autonomous Vehicle (May 2000)
- Self-localization of autonomous underwater vehicles with accurate sound travel time solutions
- Tesla UK
- US Patent US20170059697A1
- R. H. Rasshofer and K. Gresser / Automotive Radar and Lidar Systems for Next Generation Driver Assistance Functions (2005)
- Thorsten Luettel, Michael Himmelsbach, and Hans-Joachim Wuensche / Autonomous Ground Vehicles Concepts and a Path to the Future


Lore ipso Lore ipso Lore ipso Lore ipso Lore ipso
Lore lore lore ipso lore lore ipso
Engine optimization
Social media strategy
Real time and data
Online media management
Lore lore ipso lore ipso
Lore ipso lore ipso
Lore ipso lore ipso
Lore ipso lore ipso
Lore lore ipso lore ipso


Thoughtful entertainment
Menu
Shop
Read
Work
Diary
Subscribe
INTOO.STUDIO
Diary
*
indicates required
Email Address
*
First Name
Last Name
Birthday
/
( mm / dd )
We will not sell your data or spam your inbox.


Montana
Cyclocross Race Series Number One Results
Thanks
for everyone who updated the results and put up with the delay.
Men A
1- 9 Geoff Proctor B0048283 Montana
Velo
2- 419 Shane Mundt New Annual Montana Velo
3- 169 Mike Beltz B0080669
Northern Rockies
4- 3 Jason Mohr
B0108360 Northern Rockies
5- 4 Dave Hartman B0102725
Northern Rockies
6- 307 Tom Robertson B0068412 Northern Rockies
7- 194 Unknown
8- 191 Andy Fischer B0197580 Five Valley
Velo
9- 193 Shane McMillan One-Day Unattached
Men B
1- 187 Dale Bickell New Annual Five Valley Velo
2- 190 Jeff Bookwalter B0004226 Five Valley Velo
3- 406 Chad Latino B0191848
Five Valley Velo
Masters 35+
1- 192 Craig Pozega B0174250 Great
Divide
Master 45+
1- 248 John Coulthard B0007926 Highlands Cycling
2- Greg Hejtmanek
B0180658 Unattached
Women
1- 108 Kathleen Jones B0130008 Team Stampede
DNFs
12 Clint Muhlfeld
B0185552 Flathead Cycling
314 Tejay Van Garderen B0150610 Rio Grande


Welcome to NowBusking Website There are many crucial information of Nowbusking company If you want more info, click here


Our Current Developers:
Add a New Developer:
New Developer's Name:
Coding School Attended:
Programming Languages Learned:
Submit
Reset
Start Over


--- # DO NOT EDIT! # This file is automatically generated by get-members. If you change it, bad # things will happen. layout: default title: "Alistair Burt" house: commons ---
Alistair Burt is the MP for North East Bedfordshire.
What is a constituency?
Alistair Burt is an MP in the Conservative party.
What is a party?


Seabass can't get access token for Dropbox directly from within the app due to Ubuntu Touch security restrictions. You need to copy the token manually.
Your current dropbox token is:
Once authentication is complete you need to copy generated token, reopen Seabass and paste token into "Settings → Dropbox access token" field to complete authorization process.


PNStatus Class Reference
| Inherits from | PNResult : NSObject |
|---|---|
| Declared in | PNStatus.h |
Overview
In case of error this instance may contain service response in \c data. Also this object hold additional information about current client state.
@author Sergey Mamontov
Information
category
One of \b PNStatusCategory fields which provide information about for which status this instance has been created.
@property (nonatomic, readonly, assign) PNStatusCategory category
Return Value
Processing status category.
Availability
4.0
Declared In
PNStatus.h
error
Whether status object represent error or not.
@property (nonatomic, readonly, assign, getter=isError) BOOL error
Return Value
\c YES in case if status represent request processing error.
Availability
4.0
Declared In
PNStatus.h
automaticallyRetry
Autoretry configuration information.
@property (nonatomic, readonly, assign, getter=willAutomaticallyRetry) BOOL automaticallyRetry
Return Value
\c YES in case if request which represented with this failed status will be resent automatically or not.
Availability
4.0
Discussion
In most cases client will keep retry request sending till it won’t be successful or canceled with \c cancelAutomaticRetry method.
Declared In
PNStatus.h
Recovery
– retry
Try to resend request associated with processing status object.
- (void)retry
Availability
4.0
Discussion
Some operations which perform automatic retry attempts will ignore method call.
Declared In
PNStatus.h
– cancelAutomaticRetry
For some requests client try to resend them to \b PubNub for processing.
- (void)cancelAutomaticRetry
Availability
4.0
Discussion
This method can be performed only on operations which respond with \c YES on \c willAutomaticallyRetry property. Other operation types will ignore method call.
Declared In
PNStatus.h
Extension Methods
currentTimetoken
Stores reference on time token which has been used to establish current subscription cycle.
@property (nonatomic, strong) NSNumber *currentTimetoken
Availability
4.0
Declared In
PNStatus+Private.h
lastTimeToken
Stores reference on previous key which has been used in subscription cycle to receive \c currentTimetoken along with other events.
@property (nonatomic, strong) NSNumber *lastTimeToken
Availability
4.0
Declared In
PNStatus+Private.h
subscribedChannels
Stores reference on list of channels on which client currently subscribed.
@property (nonatomic, copy) NSArray *subscribedChannels
Availability
4.0
Declared In
PNStatus+Private.h
subscribedChannelGroups
Stores reference on channel group names list on which client currently subscribed.
@property (nonatomic, copy) NSArray *subscribedChannelGroups
Availability
4.0
Declared In
PNStatus+Private.h
retryBlock
Stores reference on block which can be used to retry request processing.
@property (nonatomic, copy) dispatch_block_t retryBlock
Availability
4.0
Discussion
This blocks provided only for requests which won’t be auto-restarted by client.
Declared In
PNStatus+Private.h
retryCancelBlock
Stores reference on block which can be used to cancel automatic retry on requests.
@property (nonatomic, copy) dispatch_block_t retryCancelBlock
Availability
4.0
Discussion
Usually requests resent by client \b 1 second late after failure and this is time when request can be canceled by user using \c cancelAutomaticRetry method.
Declared In
PNStatus+Private.h
+ statusForOperation:category:
Construct minimal object to describe state using operation type and status category information.
+ (instancetype)statusForOperation:(PNOperationType)operation category:(PNStatusCategory)category
Parameters
operation |
Type of operation for which this status report. |
|---|---|
category |
Operation processing status category. |
Return Value
Constructed and ready to use status object.
Availability
4.0
Declared In
PNStatus+Private.h
– initForOperation:category:
Initializr minimal object to describe state using operation type and status category information.
- (instancetype)initForOperation:(PNOperationType)operation category:(PNStatusCategory)category
Parameters
operation |
Type of operation for which this status report. |
|---|---|
category |
Operation processing status category. |
Return Value
Initialized and ready to use status object.
Availability
4.0
Declared In
PNStatus.m
– initForOperation:completedWithTaks:processedData:
Initialize result instance in response to successful task completion.
- (instancetype)initForOperation:(PNOperationType)operation completedWithTaks:(NSURLSessionDataTask *)task processedData:(NSDictionary *)processedData
Parameters
operation |
One of \b PNOperationType enum fields to describe what kind of operation has been processed. |
|---|---|
task |
Reference on data task which has been used to communicate with \b PubNub network. |
processedData |
Reference on data which has been loaded and pre-processed by corresponding parser. |
Return Value
Initialized and ready to use result instance.
Availability
4.0
Declared In
PNStatus.m
– categoryTypeFromStatusCode:
Try interpret response status code meaningful status object state.
- (PNStatusCategory)categoryTypeFromStatusCode:(NSInteger)statusCode
Parameters
statusCode |
HTTP response status code which should be used during interpretation. |
|---|
Availability
4.0
Declared In
PNStatus.m
– dictionaryRepresentation
Convert result object to dictionary which can be used to print out structured data
- (NSDictionary *)dictionaryRepresentation
Return Value
Object in dictionary representation.
Availability
4.0
Declared In
PNResult+Private.h


This is in the SSC. We've got all of the chrome and whatnot here, like normal.
...more Nationwide-controlled content...