|
Rendu
An OpenGL rendering engine for experimentations
|
Handles communication between the different game components (renderers, player, menus) and the player actions. More...
#include <Game.hpp>
Public Member Functions | |
| Game (RenderingConfig &config) | |
| void | draw () |
| Draw the game. | |
| Window::Action | update () |
| void | physics (double frameTime) |
| void | resize (unsigned int width, unsigned int height) |
| void | clean () |
| Cleanup resources. | |
Private Types | |
| enum | Status { MAINMENU, INGAME, PAUSED, DEAD, OPTIONS } |
| Game satte: either a specific menu or in-game. | |
| enum | ButtonAction : int { NEWGAME, OPTIONS, OPTIONS, QUIT, PAUSE, RESUME, BACKTOMENU, OPTION_FULLSCREEN, OPTION_VSYNC } |
| Action that can be performed by pressing a button or a key. | |
Private Member Functions | |
| Window::Action | handleButton (ButtonAction tag) |
Private Attributes | |
| RenderingConfig & | _config |
| Reference to the shared game configuration. | |
| std::unique_ptr< Player > | _player |
| The player state. | |
| GameRenderer | _inGameRenderer |
| In-game renderer. | |
| GameMenuRenderer | _menuRenderer |
| Menus renderer. | |
| std::unique_ptr< GaussianBlur > | _bgBlur |
| Blurring pass for the paused/dead menus background. | |
| const Program * | _finalProgram |
| Final upscaling program. | |
| Status | _status = Status::MAINMENU |
| Current game sattus (specific menu or in-game) | |
| std::map< Status, GameMenu > | _menus |
| Menus for each game status. | |
| double | _playTime = 0.0 |
| Current playtime. | |
| bool | _overrideTime = false |
| Debug pause. | |
Handles communication between the different game components (renderers, player, menus) and the player actions.
|
explicit |
Constructor
| config | the shared game configuration |
|
private |
For a given button action tag, perform the corresponding internal operations and indicates if any low-level action should be performed by the windowing system/hardware.
| tag | the action to perform |
| void Game::physics | ( | double | frameTime | ) |
Update the physic state of the player snake and items
| frameTime | delta time since last physics update |
| void Game::resize | ( | unsigned int | width, |
| unsigned int | height | ||
| ) |
Resize renderers based on new window size.
| width | new width |
| height | new height |
| Window::Action Game::update | ( | ) |
Perform once-per-frame update (button clicks, key presses).


Current Select: {{ select1 | json }}
Current Select: {{ select2 | json }}
Current Select: {{ select3 | json }}


{% extends "base.html" %} {% block title %}WattTime{% endblock %} {% block content %}
We are working to add new regions as soon as we can, and
we'll let you know when WattTime tools become available for your location.
In the meantime, poke around and see what we're up to!


To use Mushpup, first:
- Pick a Mushpup secret word (a master password only you remember)
- Pick a Mushpup number (between 8 and 16)
- Pick a Mushpup side (left, right, or middle)
You will want to use these by habit, so make picks that you will remember.
Then, to get a new password:
- Identify new site (e.g. github.com)
- Set your user name (e.g. klenwell)
- Set your site input based on site/user (e.g. github.com/klenwell)
Use the Mushpup form above when you register to a new site. Now is the time to use the confirm button to make sure you enter your secret word correctly.
Finally, to retrieve the password:
- Input site input and Mushpup secret word in the Mushpup form
- Using your Mushpup number and Mushpup side, copy your password
- Paste the password into the site login password field.
Now you can get you password any time you need it. In this way, by remembering a single password, you get a unique password for every site you use


zeharti wrote:Well if you can't make your own...you can go to bf4emblems.com or similar (Google it).....
When you go there you'll feel just like home....Just select the emblem and they'll tell you how to get it on your profile....literally the easiest method I'd say..


Index
A B C D E F G H I L M N O P R S T U V W X
All Classes|All Packages
All Classes|All Packages
All Classes|All Packages
P
- pair() - Method in class com.welie.blessed.bluez.BluezDevice
-
From bluez Documentation:
- Pair() - Method in interface org.bluez.Device1
-
From bluez documentation:
This method will connect to the remote device,
initiate pairing and then retrieve all SDP records
(or GATT primary services).
If the application has registered its own agent,
then that specific agent will be used. - PairingAgent - Class in com.welie.blessed.bluez
- PairingAgent(String, DBusConnection, PairingDelegate) - Constructor for class com.welie.blessed.bluez.PairingAgent
- PairingDelegate - Interface in com.welie.blessed.bluez
- parseXmlString(String) - Static method in class com.welie.blessed.bluez.XmlHelper
-
Create a new
Document
instance from the given string, disabling validation. - Pathloss - com.welie.blessed.bluez.DiscoveryFilter
- Pause() - Method in interface org.bluez.MediaControl1
-
Deprecated.
- Pause() - Method in interface org.bluez.MediaPlayer1
-
From bluez documentation:
Pause playback.
- PERMISSION_READ - Static variable in class com.welie.blessed.BluetoothGattCharacteristic
-
Characteristic read permission
- PERMISSION_READ - Static variable in class com.welie.blessed.BluetoothGattDescriptor
-
Descriptor read permission
- PERMISSION_READ_ENCRYPTED - Static variable in class com.welie.blessed.BluetoothGattCharacteristic
-
Characteristic permission: Allow encrypted read operations
- PERMISSION_READ_ENCRYPTED - Static variable in class com.welie.blessed.BluetoothGattDescriptor
-
Descriptor permission: Allow encrypted read operations
- PERMISSION_READ_ENCRYPTED_MITM - Static variable in class com.welie.blessed.BluetoothGattCharacteristic
-
Characteristic permission: Allow reading with man-in-the-middle protection
- PERMISSION_READ_ENCRYPTED_MITM - Static variable in class com.welie.blessed.BluetoothGattDescriptor
-
Descriptor permission: Allow reading with man-in-the-middle protection
- PERMISSION_WRITE - Static variable in class com.welie.blessed.BluetoothGattCharacteristic
-
Characteristic write permission
- PERMISSION_WRITE - Static variable in class com.welie.blessed.BluetoothGattDescriptor
-
Descriptor write permission
- PERMISSION_WRITE_ENCRYPTED - Static variable in class com.welie.blessed.BluetoothGattCharacteristic
-
Characteristic permission: Allow encrypted writes
- PERMISSION_WRITE_ENCRYPTED - Static variable in class com.welie.blessed.BluetoothGattDescriptor
-
Descriptor permission: Allow encrypted writes
- PERMISSION_WRITE_ENCRYPTED_MITM - Static variable in class com.welie.blessed.BluetoothGattCharacteristic
-
Characteristic permission: Allow encrypted writes with man-in-the-middle protection
- PERMISSION_WRITE_ENCRYPTED_MITM - Static variable in class com.welie.blessed.BluetoothGattDescriptor
-
Descriptor permission: Allow encrypted writes with man-in-the-middle protection
- PERMISSION_WRITE_SIGNED - Static variable in class com.welie.blessed.BluetoothGattCharacteristic
-
Characteristic permission: Allow signed write operations
- PERMISSION_WRITE_SIGNED - Static variable in class com.welie.blessed.BluetoothGattDescriptor
-
Descriptor permission: Allow signed write operations
- PERMISSION_WRITE_SIGNED_MITM - Static variable in class com.welie.blessed.BluetoothGattCharacteristic
-
Characteristic permission: Allow signed write operations with man-in-the-middle protection
- PERMISSION_WRITE_SIGNED_MITM - Static variable in class com.welie.blessed.BluetoothGattDescriptor
-
Descriptor permission: Allow signed write operations with man-in-the-middle protection
- PhonebookAccess1 - Interface in org.bluez.obex
-
File generated - 2018-07-25.
Based on bluez Documentation: obex-api.txt.
Service: org.bluez.obex
Interface: org.bluez.obex.PhonebookAccess1
Object path:
[Session object path]
Supported properties:
string Folder [readonly]
Current folder.
string DatabaseIdentifier [readonly, optional]
128 bits persistent database identifier.
Possible values: 32-character hexadecimal such
as A1A2A3A4B1B2C1C2D1D2E1E2E3E4E5E6
string PrimaryCounter [readonly, optional]
128 bits primary version counter.
Possible values: 32-character hexadecimal such
as A1A2A3A4B1B2C1C2D1D2E1E2E3E4E5E6
string SecondaryCounter [readonly, optional]
128 bits secondary version counter.
Possible values: 32-character hexadecimal such
as A1A2A3A4B1B2C1C2D1D2E1E2E3E4E5E6
bool FixedImageSize [readonly, optional]
Indicate support for fixed image size.
Possible values: True if image is JPEG 300x300 pixels
otherwise False.
- Play() - Method in interface org.bluez.MediaControl1
-
Deprecated.
- Play() - Method in interface org.bluez.MediaItem1
-
From bluez documentation:
Play item
- Play() - Method in interface org.bluez.MediaPlayer1
-
From bluez documentation:
Resume playback.
- PLX_SERVICE_UUID - Static variable in class testapp.BluetoothHandler
- post(Runnable) - Method in class com.welie.blessed.internal.Handler
- postDelayed(Runnable, long) - Method in class com.welie.blessed.internal.Handler
- Previous() - Method in interface org.bluez.MediaControl1
-
Deprecated.
- Previous() - Method in interface org.bluez.MediaPlayer1
-
From bluez documentation:
Previous item.
- primitiveToWrapper(Class<?>) - Static method in class com.welie.blessed.bluez.ClassUtils
-
Converts the specified primitive Class object to its corresponding wrapper Class object.
- Profile1 - Interface in org.bluez
-
File generated - 2018-07-25.
Based on bluez Documentation: profile-api.txt.
Service: unique name
Interface: org.bluez.Profile1
Object path:
freely definable
- ProfileManager1 - Interface in org.bluez
-
File generated - 2018-07-25.
Based on bluez Documentation: profile-api.txt.
Service: org.bluez
Interface: org.bluez.ProfileManager1
Object path:
/org/bluez
- PROPERTY_BROADCAST - Static variable in class com.welie.blessed.BluetoothGattCharacteristic
-
Characteristic proprty: Characteristic is broadcastable.
- PROPERTY_EXTENDED_PROPS - Static variable in class com.welie.blessed.BluetoothGattCharacteristic
-
Characteristic property: Characteristic has extended properties
- PROPERTY_INDICATE - Static variable in class com.welie.blessed.BluetoothGattCharacteristic
-
Characteristic property: Characteristic supports indication
- PROPERTY_NOTIFY - Static variable in class com.welie.blessed.BluetoothGattCharacteristic
-
Characteristic property: Characteristic supports notification
- PROPERTY_READ - Static variable in class com.welie.blessed.BluetoothGattCharacteristic
-
Characteristic property: Characteristic is readable.
- PROPERTY_SIGNED_WRITE - Static variable in class com.welie.blessed.BluetoothGattCharacteristic
-
Characteristic property: Characteristic supports write with signature
- PROPERTY_WRITE - Static variable in class com.welie.blessed.BluetoothGattCharacteristic
-
Characteristic property: Characteristic can be written.
- PROPERTY_WRITE_NO_RESPONSE - Static variable in class com.welie.blessed.BluetoothGattCharacteristic
-
Characteristic property: Characteristic can be written without response.
- Pull(String, String, Map<String, Variant<?>>) - Method in interface org.bluez.obex.PhonebookAccess1
-
From bluez documentation:
Given a vcard handle, retrieve the vcard in the current
phonebook object and store it in a local file.
If an empty target file is given, a name will be
automatically calculated for the temporary file.
The returned path represents the newly created transfer,
which should be used to find out if the content has been
successfully transferred or if the operation fails.
The properties of this transfer are also returned along
with the object path, to avoid a call to GetProperties.
Possbile filters: Format and Fields
- PullAll(String, Map<String, Variant<?>>) - Method in interface org.bluez.obex.PhonebookAccess1
-
From bluez documentation:
Return the entire phonebook object from the PSE server
in plain string with vcard format, and store it in
a local file.
If an empty target file is given, a name will be
automatically calculated for the temporary file.
The returned path represents the newly created transfer,
which should be used to find out if the content has been
successfully transferred or if the operation fails.
The properties of this transfer are also returned along
with the object path, to avoid a call to GetProperties.
Possible filters: Format, Order, Offset, MaxCount and
Fields
- PullBusinessCard(String) - Method in interface org.bluez.obex.ObjectPush1
-
From bluez documentation:
Request the business card from a remote device and
store it in the local file.
If an empty target file is given, a name will be
automatically calculated for the temporary file.
The returned path represents the newly created transfer,
which should be used to find out if the content has been
successfully transferred or if the operation fails.
The properties of this transfer are also returned along
with the object path, to avoid a call to GetProperties.
- pulse - Variable in class testapp.HeartRateMeasurement
- PulseOximeterContinuousMeasurement - Class in testapp
- PulseOximeterContinuousMeasurement(byte[]) - Constructor for class testapp.PulseOximeterContinuousMeasurement
- PulseOximeterSpotMeasurement - Class in testapp
- PulseOximeterSpotMeasurement(byte[]) - Constructor for class testapp.PulseOximeterSpotMeasurement
- pulseRate - Variable in class testapp.BloodPressureMeasurement
- PushMessage(String, String, Map<String, Variant<?>>) - Method in interface org.bluez.obex.MessageAccess1
-
From bluez documentation:
Transfer a message (in bMessage format) to the
remote device.
The message is transferred either to the given
subfolder of the current folder, or to the current
folder if folder is empty.
Possible args: Transparent, Retry, Charset
The returned path represents the newly created transfer,
which should be used to find out if the content has been
successfully transferred or if the operation fails.
The properties of this transfer are also returned along
with the object path, to avoid a call to GetAll.
- PutFile(String, String) - Method in interface org.bluez.obex.FileTransfer
-
From bluez documentation:
Copy the source file (from local filesystem) to the
target file (on remote device).
The returned path represents the newly created transfer,
which should be used to find out if the content has been
successfully transferred or if the operation fails.
The properties of this transfer are also returned along
with the object path, to avoid a call to GetProperties.
- PutPhonebook(String) - Method in interface org.bluez.obex.Synchronization1
-
From bluez documentation:
Send an entire Phonebook Object store to remote device.
The returned path represents the newly created transfer,
which should be used to find out if the content has been
successfully transferred or if the operation fails.
The properties of this transfer are also returned along
with the object path, to avoid a call to GetProperties.
All Classes|All Packages


Skip to Main Content
UCF Acronyms
UCF Information Technology
{{acronym.acro}}
: {{acronym.title}}
{{acronym.url}}
{{acronym.summary}}
Student Resources
Academic Calendar
Admissions
Financial Aid
Student Account Services
FAQ/Knowledge Base
Career Services
Faculty Resources
Human Resources
Faculty Excellence
FCTL
Webcourses Support
Service Desk
Phonebook
Staff Resources
Human Resources
Contract Management (Cobblestone)
Information Security
Compliance


This is a web apllication that takes users birthday and calculates the day of the week they were born. and then depending on their gender output their Akan Names


Docs
Setup
Try it out
Videos
Blog
Donate
Team
GitHub
Docs
Try it out
Videos
Blog
Donate
Team
GitHub
← Back to main menu
You need to enable JavaScript to run this app.


Put in a list of dates separated by linebreaks. You can change the input and output format manually or select from the examples. Tokens are similar to the LDML format. A list of available tokens can be found here: http://momentjs.com/docs/#/displaying/format/


Andrew H Potter
Democrat
I run a small marketing business called the Handit2 Network LLC, based in Evergreen CO. I currently have 5 employees. All lived in CO until one of them moved to Park City UT.
My undergraduate degree was in Geography, Dartmouth 1992. MBA, University of Virginia, 1999.
80439
My recent organizing has been focused on talent shows at my kids schools (started the Parmalee Elem talent show in 2015, ran it 5 years until my kids moved on to middle/high school). Pre-COVID I ran a talent show at West Jeff Middle School for one year (it will likely be canceled this year). From 2009-2013 I was on the board of the Evergreen Meadows HOA, and was president in 2013.
Andrew Yang Kirsten Gillibrand (I can dig if necessary, but offhand I can't think of other contributions I've made in the last 5 years)
West Jeff Middle School PTA Parmalee Elementary PTA Evergreen Nordic Skiing Alliance (now defunct) (Evergreen Meadows HOA President, 2013; other EMHA board roles 2009-13)
I want to serve on the commission because a) I think it is important to do it right (meaning impartially and logically), and I'd like to contribute my skills to that priority; b) I think my skills as a 'geographer' (dating back to my college days and my 'first career' as a cartographer in my 20s), plus my more current experience as a Colorado small business owner and marketer are highly relevant; and c) I think it will be fascinating to be part of the process, as it will expose me to the public sector in a very unique way that leverages some of my skill sets (I've been working in the private sector my entire career).
Have you ever been an HOA president? It is a ton of work, largely thankless, and all about building consensus as best as possible. In every community you have those people I call the 'spear throwers' who complain and do nothing to help. I've managed the helpers, and managed the spear throwers. I much prefer the helpers. :) In the case of this commission, it certainly is easier to build consensus with people who are being paid!!! Sort of like being a business owner, which I have been the past 13 years. When it comes to being fair,
My 'first career' after college was in mapping and GIS, including working for the current 'National Geographer' at National Geographic (Alex Tait) when he ran his own cartography business. During the summer of 1999, I spent my MBA internship working for Etak, an in-dash vehicle navigation company later sold to Tele Atlas/Tom Tom. (Etak's work was the precursor to much of the google maps navigation technology we are all using today). My focus there was on a geocoding plug-in used with ESRI's ArcView software. The past 20 years I have been working in the private sector with businesses that, among other things, use GIS for marketing purposes. I solve problems like 'fine me daycares nears King Soopers in neighborhoods that index high on Hispanics' This sort of project requires the collection of quality data, and the software necessary to analyze that data. I think that my experience building high quality datasets and using tools to analyze them will come in handy when analyzing congressional districts. [Note: I will not collect letters of recommendation at this stage unless I am told by someone reviewing this that it is important to my application. If it is important, I will likely reach out to one or more of the following people: Gary Justus, neighbor, EMHA president, fellow EMHA board member during my tenure; Ingrid Mielke, principal, Parmalee Elementary; possibly Alex Tait, National Geographer, National Geographic. Not sure Alex has the time though!)
male


--- layout: page title: 132 Breese subtitle: Blog & Episodes meta-title: "132 Breese Podcast" use-site-title: true bigimg: "/img/1200Cover_BreeseTerrace_Credit_Richard_Hurd.jpg" css: '/css/extend-home.css' --- Blog Podcast
We love to hear from Fellow Fans. You can send us a quick message using the form below:


CreateSprite()
语法
Result = CreateSprite(#Sprite, Width, Height [, Mode])概要
Creates an empty sprite with the specified dimensions. SpriteOutput() can be used to draw on the sprite.
参数
#Sprite A number to identify the new sprite. #PB_Any can be used to auto-generate this number. Width, Height The size of the new sprite (in pixels). Mode (optional) It can be a combination of the following values (with the '|' operator): #PB_Sprite_PixelCollision: Add special information to handle pixel collision trough SpritePixelCollision(). #PB_Sprite_AlphaBlending : Sprite is created with per pixel alpha-channel support, needed for DisplayTransparentSprite().
返回值
Nonzero if the sprite has been created, zero otherwise. If #PB_Any was used for the #Sprite parameter then the generated number is returned on success.
备注
CreateSprite() has to be called in the same thread where OpenScreen() was called.
参阅
SpriteOutput()
已支持操作系统
所有


A pokemon appears and you need to try to catch it! Choose a Pokeball to throw. The better the ball, the better your chances of catching it!


Data source:
https://github.com/owid/energy-data
, Our World in Data - Hannah Ritchie, Max Roser, Edouard Mathieu, Data used for the visualization on this website has been calculated by Our World in Data based on BP Statistical Review of World Energy and BP Statistical Review of World Energy and Ember
Data on country borders come from:
https://github.com/johan/world.geo.json
Close


| 310 |
0x0136 |
uint32 |
User uin |
|
| 320 |
0x0140 |
sstring |
User firstname |
|
| 330 |
0x014A |
sstring |
User lastname |
|
| 340 |
0x0154 |
sstring |
User nickname |
|
| 350 |
0x015E |
ecombo |
User email |
|
| 360 |
0x0168 |
acombo |
Age range to search |
|
| 370 |
0x0172 |
uint16 |
User age |
|
| 380 |
0x017C |
uint8 |
User gender |
|
| 390 |
0x0186 |
uint16 |
User spoken language |
|
| 400 |
0x0190 |
sstring |
User home city name |
|
| 410 |
0x019A |
sstring |
User home state abbr |
|
| 420 |
0x01A4 |
uint16 |
User home country code |
|
| 430 |
0x01AE |
sstring |
User work company name |
|
| 440 |
0x01B8 |
sstring |
User work department name |
|
| 450 |
0x01C2 |
sstring |
User work position (title) |
|
| 460 |
0x01CC |
uint16 |
User work ocupation code |
|
| 470 |
0x01D6 |
icombo |
User affilations node |
|
| 490 |
0x01EA |
icombo |
User interests node |
|
| 510 |
0x01FE |
icombo |
User past info node |
|
| 530 |
0x0212 |
icombo |
User homepage category/keywords |
|
| 531 |
0x0213 |
hcombo |
User homepage url |
|
| 550 |
0x0226 |
sstring |
Whitepages search keywords string |
|
| 560 |
0x0230 |
uint8 |
Search only online users flag |
|
| 570 |
0x023A |
bcombo |
User birthday info (year, month, day) |
|
| 600 |
0x0258 |
sstring |
User notes (about) text |
|
| 610 |
0x0262 |
sstring |
User home street address |
|
| 620 |
0x026C |
uint32 |
User home zip code |
|
| 630 |
0x0276 |
sstring |
User home phone number |
|
| 640 |
0x0280 |
sstring |
User home fax number |
|
| 650 |
0x028A |
sstring |
User home cellular phone number |
|
| 660 |
0x0294 |
sstring |
User work street address |
|
| 670 |
0x029E |
sstring |
User work city name |
|
| 680 |
0x02A8 |
sstring |
User work state name |
|
| 690 |
0x02B2 |
uint16 |
User work country code |
|
| 700 |
0x02BC |
uint32 |
User work zip code |
|
| 710 |
0x02C6 |
sstring |
User work phone number |
|
| 720 |
0x02D0 |
sstring |
User work fax number |
|
| 730 |
0x02DA |
sstring |
User work webpage url |
|
| 760 |
0x02F8 |
uint8 |
User 'show web status' permissions |
|
| 780 |
0x030C |
uint8 |
User authorization permissions |
|
| 790 |
0x0316 |
uint8 |
User GMT offset |
|
| 800 |
0x0320 |
sstring |
User originally from city |
|
| 810 |
0x032A |
sstring |
User originally from state |
|
| 820 |
0x0334 |
uint16 |
User originally from country (code) |
|


Input
Below gives the average price for the different available kinds of Ubers available from your starting location. Hover over a bar to view its low and high price. This will give you the range in which you can expect the charge to be. We will use the average cost for our comparisons. Click on a bar to select the Uber desired. UberX is the most typical uber of choice.


Bryan Guner’s bookmarks, page 1
7 Useful CSS Cheat Sheets to Improve Your Skills
(
2021-09-1 11:28 pm
)
Understanding Common Terms Associated to React JS
(
2021-08-31 2:17 pm
)
Notes I Wish I Had When I Started Learning Python
(
2021-08-30 6:48 pm
)
Data Structures & Algorithms Resource List Part 1
(
2021-08-30 6:48 pm
)
Graph Data Structure Interview Questions At A Glance
(
2021-08-30 6:47 pm
)
How To Implement Native(ES6) Data Structures Using Arrays & Objects
(
2021-08-30 6:16 pm
)
Fundamental Data Structures in JavaScript
(
2021-08-30 6:16 pm
)
Fundamental Data Structures In JavaScript
(
2021-08-30 6:15 pm
)
Here’s the expanded list:
(
2021-08-30 6:13 pm
)
My Personal Arsenal Of Convenience Scripts
(
2021-08-25 10:45 pm
)
Awesome List Of Github Repositories
(
2021-08-25 10:27 pm
)
Benchmarking the Best Way to Reverse a String in Python
(
2021-08-6 10:53 pm
)
Explanation about Iterators and Generators in Javascript ES6
(
2021-07-16 9:39 am
)
Open Ended Frontend Interview Questions You Should Answer Before Your Next Interview
(
2021-07-16 1:55 am
)
Life Saving Bash Scripts Part 2
(
2021-07-16 1:53 am
)
LSTMs for Music Generation
(
2021-07-2 4:36 pm
)
21 Best Practices for a Clean React Project
(
2021-06-20 10:51 pm
)
11 Productivity Tools Every Programmer Should Know
(
2021-06-20 10:50 pm
)
Top Front-End Development Trends You Should Follow in 2021
(
2021-06-19 3:03 pm
)
A Beginners Guide to Understanding Redux
(
2021-06-19 3:01 pm
)
Firebase & Google Cloud: What’s different with Cloud Firestore?
(
2021-06-19 3:18 am
)
How to record and play audio in JavaScript
(
2021-06-6 10:29 am
)
Data Structures… Under The Hood
(
2021-06-4 9:56 pm
)
Moving from JavaScript to TypeScript
(
2021-06-4 8:17 am
)
Announcing split-second static deploys for Firebase 🚀
(
2021-06-3 6:10 pm
)
Basics of Javascript · String · match() (method)
(
2021-06-3 2:25 pm
)
9 Different Ways to Embedded Code In Medium
(
2021-05-31 4:45 am
)
Music Genre Classification using Random Forest
(
2021-05-30 5:31 pm
)
MyDrive, Node.js/React Open Source Cloud Storage (A Google Drive Clone)
(
2021-04-7 1:56 am
)
Why you need to learn Linux.
(
2021-03-29 6:07 pm
)
Simple Recursive Navigation in React
(
2021-03-23 9:32 pm
)
Understanding Git (A Beginners Guide Containing Cheat Sheets & Resources)
(
2021-03-20 5:15 am
)
How to add full text search to your website
(
2021-03-19 7:50 pm
)
PostgreSQL Setup For Windows & WSL/Ubuntu
(
2021-03-13 5:33 am
)
Machine Learning in JavaScript
(
2021-03-12 6:32 pm
)


活动频道¶
On a Feathers server with a real-time transport (Primus) set up, event channels determine which connected clients to send real-time events to and how the sent data should look like.
This chapter describes:
Real-time Connections and how to access them
Channel usage and how to retrieve, join and leave channels
Publishing events to channels
重要
If you are not using a real-time transport server (e.g. when making a REST only API or using Feathers on the client), channel functionality is not going to be available.
Some examples where channels are used:
Real-time events should only be sent to authenticated users
Users should only get updates about messages if they joined a certain chat room
Only users in the same organization should receive real-time updates about their data changes
Only admins should be notified when new users are created
When a user is created, modified or removed, non-admins should only receive a “safe” version of the user object (e.g. only
email
,id
andavatar
)
Example¶
The example below shows the generated channels.js
file illustrating
how the different parts fit together:
module.exports = function(app) {
app.on('connection', connection => {
// On a new real-time connection, add it to the
// anonymous channel
app.channel('anonymous').join(connection);
});
app.on('login', (payload, { connection }) => {
// connection can be undefined if there is no
// real-time connection, e.g. when logging in via REST
if(connection) {
const { user } = connection;
// The connection is no longer anonymous, remove it
app.channel('anonymous').leave(connection);
// Add it to the authenticated user channel
app.channel('authenticated').join(connection);
// Channels can be named anything and joined on any condition
// E.g. to send real-time events only to admins use
// if(user.isAdmin) { app.channel('admins').join(connection); }
// If the user has joined e.g. chat rooms
// user.rooms.forEach(room => app.channel(`rooms/${room.id}`).join(connection))
}
});
// A global publisher that sends all events to all authenticated clients
app.publish((data, context) => {
return app.channel('authenticated');
});
};
Connections¶
A connection is an object that represents a real-time connection. It is
the same object as socket.feathers
in a
Socket.io and socket.request.feathers
in a
Primus middleware. You can add any kind of information
to it but most notably, when using
认证, it will contain the
authenticated user. By default it is located in connection.user
once
the client has authenticated on the socket (usually by calling
Feathers 客户端).
We can get access to the connection
object by listening to
app.on('connection', connection => {})
or
app.on('login', (payload, { connection }) => {})
.
注解
When a connection is terminated it will be automatically removed from all channels.
app.on(‘connection’)¶
app.on('connection', connection => {})
is fired every time a new
real-time connection is established. This is a good place to add the
connection to a channel for anonymous users (in case we want to send any
real-time updates to them):
app.on('connection', connection => {
// On a new real-time connection, add it to the
// anonymous channel
app.channel('anonymous').join(connection);
});
app.on(‘login’)¶
app.on('login', (payload, info) => {})
is sent by the
认证 and also contains
the connection in the info
object that is passed as the second
parameter. Note that it can also be undefined
if the login happened
through e.g. REST which does not support real-time connectivity.
This is a good place to add the connection to channels related to the user (e.g. chat rooms, admin status etc.)
app.on('login', (payload, { connection }) => {
// connection can be undefined if there is no
// real-time connection, e.g. when logging in via REST
if(connection) {
// The user attached to this connection
const { user } = connection;
// The connection is no longer anonymous, remove it
app.channel('anonymous').leave(connection);
// Add it to the authenticated user channel
app.channel('authenticated').join(connection);
// Channels can be named anything and joined on any condition `
// E.g. to send real-time events only to admins use
if(user.isAdmin) {
app.channel('admins').join(connection);
}
// If the user has joined e.g. chat rooms
user.rooms.forEach(room => {
app.channel(`rooms/${room.id}`).join(connection);
});
}
});
注解
(user, { connection })
is an ES6 shorthand for
(user, meta) => { const connection = meta.connection; }
, see
Destructuring
assignment.
app.on(‘logout’)¶
app.on('logout', (payload, info) => {})
is sent by the
认证 and also contains
the connection in the info
object that is passed as the second
parameter when a logout happens.
If the socket does not also disconnect at logout this is where users should be removed from their channels:
app.on('logout', (payload, { connection }) => {
if(connection) {
//When logging out, leave all channels before joining anonymous channel
app.channel(app.channels).leave(connection);
app.channel('anonymous').join(connection);
}
});
Channels¶
A channel is an object that contains a number of connections. It can be
created via app.channel
and allows a connection to join or leave it.
app.channel(…names)¶
app.channel(name) -> Channel
, when given a single name, returns an
existing or new named channel:
app.channel('admins') // the admin channel
app.channel('authenticated') // the authenticated channel
app.channel(name1, name2, ... nameN) -> Channel
, when given
multiples names, will return a combined channel. A combined channel
contains a list of all connections (without duplicates) and re-directs
channel.join
and channel.leave
calls to all its child channels.
// Combine the anonymous and authenticated channel
const combinedChannel = app.channel('anonymous', 'authenticated')
// Join the `anonymous` and `authenticated` channel
combinedChannel.join(connection);
// Join the `admins` and `chat` channel
app.channel('admins', 'chat').join(connection);
// Leave the `admins` and `chat` channel
app.channel('admins', 'chat').leave(connection);
// Make user with `_id` 5 leave the admins and chat channel
app.channel('admins', 'chat').leave(connection => {
return connection.user._id === 5;
});
app.channels¶
app.channels -> [string]
returns a list of all existing channel
names.
app.channel('authenticated');
app.channel('admins', 'users');
app.channels // [ 'authenticated', 'admins', 'users' ]
app.channel(app.channels) // will return a channel with all connections
This is useful to e.g. remove a connection from all channels:
// When a user is removed, make all their connections leave every channel
app.service('users').on('removed', user => {
app.channel(app.channels).leave(connection => {
return user._id === connection.user._id;
});
});
channel.join(connection)¶
channel.join(connection) -> Channel
adds a connection to this
channel. If the channel is a combined channel, add the connection to all
its child channels. If the connection is already in the channel it does
nothing. Returns the channel object.
app.on('login', (payload, { connection }) => {
if(connection && connection.user.isAdmin) {
// Join the admins channel
app.channel('admins').join(connection);
// Calling a second time will do nothing
app.channel('admins').join(connection);
}
});
channel.leave(connection|fn)¶
channel.leave(connection|fn) -> Channel
removes a connection from
this channel. If the channel is a combined channel, remove the
connection from all its child channels. Also allows to pass a callback
that is run for every connection and returns if the connection should be
removed or not. Returns the channel object.
// Make the user with `_id` 5 leave the `admins` channel
app.channel('admins').leave(connection => {
return connection.user._id === 5;
});
channel.filter(fn)¶
channel.filter(fn) -> Channel
returns a new channel filtered by a
given function which gets passed the connection.
// Returns a new channel with all connections of the user with `_id` 5
const userFive = app.channel(app.channels)
.filter(connection => connection.user._id === 5);
channel.send(data)¶
channel.send(data) -> Channel
returns a copy of this channel with
customized data that should be sent for this event. Usually this should
be handled by modifying either the service method result or setting
client “safe” data in context.dispatch
but in some cases it might
make sense to still change the event data for certain channels.
What data will be sent as the event data will be determined by the first available in the following order:
data
fromchannel.send(data)
context.dispatch
context.result
app.on('connection', connection => {
// On a new real-time connection, add it to the
// anonymous channel
app.channel('anonymous').join(connection);
});
// Send the `users` `created` event to all anonymous
// users but use only the name as the payload
app.service('users').publish('created', data => {
return app.channel('anonymous').send({
name: data.name
});
});
注解
If a connection is in multiple channels (e.g. users
and
admins
) it will get the data from the first channel that it is
in.
channel.connections¶
channel.connections -> [ object ]
contains a list of all connections
in this channel.
channel.length¶
channel.length -> integer
returns the total number of connections in
this channel.
Publishing¶
Publishers are callback functions that return which channel(s) to send
an event to. They can be registered at the application and the service
level and for all or specific events. A publishing function gets the
event data and context object ((data, context) => {}
) and returns a
named or combined channel, an array of channels or null
. Only one
publisher can be registered for one type. Besides the standard service event names an event name can also be a
custom event. context
is the
钩 from the service call or an object
containing { path, service, app, result }
for custom events.
service.publish([event,] fn)¶
service.publish([event,] fn) -> service
registers a publishing
function for a specific service for a specific event or all events if no
event name was given.
app.on('login', (payload, { connection }) => {
// connection can be undefined if there is no
// real-time connection, e.g. when logging in via REST
if(connection && connection.user.isAdmin) {
app.channel('admins').join(connection);
}
});
// Publish all messages service events only to its room channel
app.service('messages').publish((data, context) => {
return app.channel(`rooms/${data.roomId}`);
});
// Publish the `created` event to admins and the user that sent it
app.service('users').publish('created', (data, context) => {
return [
app.channel('admins'),
app.channel(app.channels).filter(connection =>
connection.user._id === context.params.user._id
)
];
});
// Prevent all events in the `password-reset` service from being published
app.service('password-reset').publish(() => null);
app.publish([event,] fn)¶
app.publish([event,] fn) -> app
registers a publishing function for
all services for a specific event or all events if no event name was
given.
app.on('login', (payload, { connection }) => {
// connection can be undefined if there is no
// real-time connection, e.g. when logging in via REST
if(connection) {
app.channel('authenticated').join(connection);
}
});
// Publish all events to all authenticated users
app.publish((data, context) => {
return app.channel('authenticated');
});
// Publish the `log` custom event to all connections
app.publish('log', (data, context) => {
return app.channel(app.channels);
});
Publisher precedence¶
The first publisher callback found in the following order will be used:
Service publisher for a specific event
Service publisher for all events
App publishers for a specific event
App publishers for all events
Keeping channels updated¶
Since every application will be different, keeping the connections assigned to channels up to date (e.g. if a user joins/leaves a room) is up to you.
In general, channels should reflect your persistent application data. This means that it normally isn’t necessary for e.g. a user to request to directly join a channel. This is especially important when running multiple instances of an application since channels are only local to the current instance.
Instead, the relevant information (e.g. what rooms a user is currently in) should be stored in the database and then the active connections can be re-distributed into the appropriate channels listening to the proper 活动.
The following example updates all active connections for a given user
when the user object (which is assumed to have a rooms
array being a
list of room ids the user has joined) is updated or removed:
// Join a channel given a user and connection
const joinChannels = (user, connection) => {
app.channel('authenticated').join(connection);
// Assuming that the chat room/user assignment is stored
// on an array of the user
user.rooms.forEach(room =>
app.channel(`rooms/${roomId}`).join(connection)
);
}
// Get a user to leave all channels
const leaveChannels = user => {
app.channel(app.channels).leave(connection =>
connection.user._id === user._id
);
};
// Leave and re-join all channels with new user information
const updateChannels = user => {
// Find all connections for this user
const { connections } = app.channel(app.channels).filter(connection =>
connection.user._id === user._id
);
// Leave all channels
leaveChannels(user);
// Re-join all channels with the updated user information
connections.forEach(connection => joinChannels(user, connection));
}
app.on('login', (payload, { connection }) => {
if(connection) {
// Join all channels on login
joinChannels(connection.user, connection);
}
});
// On `updated` and `patched`, leave and re-join with new room assignments
app.service('users').on('updated', updateChannels);
app.service('users').on('patched', updateChannels);
// On `removed`, remove the connection from all channels
app.service('users').on('removed', leaveChannels);
注解
The number active connections is usually one (or none) but unless you prevent it explicitly Feathers is not preventing multiple logins of the same user (e.g. with two open browser windows or on a mobile device).


Salmon Cookies Co
Home
Sales Center
Hours & Locations
Whatsamatta? It's Store Data!
New Store Form
Enter Store Location
Enter Minimum Customer Value
Enter Maximum Customer Value
Enter Average Cookies Per Customer
Submit


Totally-Real Photos of Our Facilities
Haunted Resort Directory
Homepage
Activities
Accommodations
Travel Arrangements
Contact Information


This template really has it all. It's up to you to customize it to your liking! It features some fresh photography courtesy of Death to the Stock Photo.
Did your navigation system shut down in the middle of that asteroid field? We can repair any dings and scrapes to your spacecraft!
Need to know how magnets work? Our problem solving solutions team can help you identify problems and conduct exploratory research.
Planning a time travel trip to the middle ages? Preserve the space time continuum by blending in with period accurate armor and weapons.
We've been voted the best pencil sharpening service for 10 consecutive years. If you have a pencil that feels dull, we'll get it sharp!


ping sweep for host discovery
for ip in 192.168.1.{1..10}; do ping -t 1 $ip > /dev/null && echo "${ip} is up"; done
ICMP (ping) exfiltration a few bytes at a time with the '-p' command [https://electricworry.net/tag/rbash/]


|
title$ - the title for the file requester
ext$ - a comma separated list of allowed file extensions save - an optional flag to indicate whether the file is for saving or opening. defname$ - the default filename (or directory) to use when the requester opens. |
|
Prompts the user for a file and returns the selected filename.
If no file was selected, an empty string is returned. The optional save flags defaults to false. Note: you can improve the requester by the use of the ";" separator in the exts$ parameter. See the example below. See also: RequestDir. |
|
filename$ = RequestFile("Select a filename to save as","png;*.jpg;*.bmp,*",True,"default.png")
success = SaveImage(myImage, filename$) If success Then Print "Image Saved" |


Let HAL 9000 build you an array. Just enter any number and HAL will create an array starting at 0 and ending at your number.
required


The average temperature is
AAA
°C and the hottest city is
HHH
City
Timestamp
(yyyy-mm-dd HH:MM)
Temperature
(°C)
Wind Speed
(KPH)
Visibility
(KM)
Refresh
Forecast for
HHH
on
DDD
:


[1]
the level in the resort was traditional rustic.
[2]
the level in the food was traditional rustic.


My name is Mingda and I am a firm believer of usable designs over beautiful designs. I am also a connoisseur of ancient Chinese history and a lover of Hip-Hop music and casual weightlifting.
I value perserverance and dilligence over pure intelligence. A strong mind is more powerful than an intelligent mind.
You can visit my design portfolio at https://www.mingda-tang.com/ to view my design process and experience.


| Author | Javier Martínez, Copyright © 2003, all rights reserved. |
| Adapted-by | Eur van Andel<EMAIL_ADDRESS>Joep Suijs, Rob Hamerling |
| Compiler | >=2.4g |
This library is used to scan a 4x3 or 4x4 keyboard. To use it, you need to define three variables: keydrive is the half port (_high or _low) with the cols connected. keydrive_direction is the related direction register. keyscan is the half port (_high or _low) with the rows connected. Example: var volatile byte keyscan is porta_low -- rows of keyboard var volatile byte keydrive is portb_low -- columns of keyboard var volatile byte keydrive_direction is portb_low_direction include keyboard Note: if you don't want keyboard.jal change the direction of your pins, make sure all keydrive pins are set to output before you call the library and define: var volatile byte keydrive_direction is keydrive The library has two functions to read the keyboard: getkey() returns the key pressed. getkey_once() returns a pressed key only once (and 'none', 0x10 until the next key is pressed) Hardware setup: connect the keyboard rows to a half port (higher or lower 4 bits of a port) and connect the cols to a half port. Put a pull-down resistor (10k - 47k) on each row pin. Adaptation: soldering your wires in the right order is a lot harder than you think. Make sure you keep the rows and cols together and connect them to right port. You could either adapt your wiring to match the default configuration or reconfigure the library by defining the next 8 constants before you include keyboard.jal, like: const row1 = 0b0000_0100 const row2 = 0b0000_0001 const row3 = 0b0000_0010 const row4 = 0b0000_1000 const col1 = 0b0000_1000 const col2 = 0b0000_0010 const col3 = 0b0000_0100 const col4 = 0b0000_0001 Connect the keyboard and press the buttons. Adapt the row and column constants so pressing the buttons give the right result. Note: you need to specify all 8 constants, even when you have a 4x3 keyboard. In this case you can specify: const col4 = 0b0000_0000 keyboard map (4x4, col4 is left out with 4x3 keyboard) 1 2 3 C row 1 4 5 6 D row 2 7 8 9 E row 3 * 0 # F row 4 col 1 2 3 4
[RobH] Added a 1 microsecond delay after changing keydrive to obtain reliable results with oscillator frequencies of 8 MHz and higher
No dependency found
var byte scan0, scan1, scan2, scan3
No documentation found
var byte lastkey = 0xff
No documentation found
getkey() return byte
getkey - return the key pressed (until it is released) return: 0 .. 9 numeric key pressed 0..9 10 * (or A) 11 # (or B) 12 .. 15 C, D, E, F 16 no key pressed. 17 error (more then one key pressed)
getkey_once() return byte
getkey_once - return the value of a key pressed only once returns: see getkey()
| 16f876a | 16f876a_rtc_timeset.jal |
| 16f876a | 16f876a_keyboard_lcd.jal |
| 16f877 | 16f877_keyboard.jal |
| 16f877a | 16f877a_keyboard_lcd.jal |
| 16f877a | 16f877a_rtc_timeset.jal |
| 16f877a | 16f877a_keyboard.jal |
| 18f26j11 | 18f26j11_rtcc_hw_kbd_lcd.jal |


Address Book
Add a Contact:
First Name
Last Name
Phone Number
Email Address
Address
Work:
Personal:
Street:
City:
State:
Zip code:
Add
Contacts:
First Name:
Last Name:
Phone Number:
Email Address:
Address:
Street:
City:
State:
Zip:


Pregnant women set for free swimming in South Gloucestershire
The scheme is expected to begin in a few months' time
by Andrew McQuarriePregnant women will soon be allowed to swim for free at South Gloucestershire leisure centres.
The Circadian Trust Board has approved a year-long pilot scheme expected to begin in early 2020.
The decision comes following a campaign by the Conservative parliamentary candidate for Thornbury and Yate, Luke Hall.
Mr Hall said: “As a father living in Yate, it is great news that we have been able to secure free swimming for pregnant women."
Mr Hall set up a petition calling for the scheme in response to a finding that women can boost their chances of a healthy pregnancy by keeping active.
Mum-of-three Liz Brennan branded the success of the campaign "amazing news".
The former swimming teacher said: "As a local mum, I think it is important for pregnant women to have access to vital exercise opportunities such as this.”
Free swims are expected to be introduced in January or February 2020, according to South Gloucestershire Council.
Mr Hall said: "I am grateful to everyone who took the time to sign my petition. This is a very exciting initiative and I am grateful for the overwhelming support this campaign has received."
For the latest news in and around Bristol, visit and bookmark Bristol Live's homepage .


|
SuperfundThe Superfund happened because of the events in a development called Love Canal in NY in the 1970's. A site that had previously contained toxic chemicals still had toxic chemicals, but they'd been "contained" and the land was sold for redevelopment as, of all things, a school. The group that owned the school had more of this toxic land left over after building on it, so they sold these extra land parcels to be used for homes. Chemical waste dumps now used as schools and homes: Welcome to America!People started getting sick in droves and this caused a major problem; how to pay for the cleanup. In the kind of forward-thinking and costly insanity that the government has become famous for, the Comprehensive Environmental Response, Compensation and Liability Act of 1980 (CERCLA) was passed, allocating an amount of money set aside for chemical cleanup in situations where the company who had originally polluted was gone. Of course, saying that it was "an amount of money set aside" is kind of like calling Montana "a patch of land": to date, over $30 billion dollars have gone into this project. Hence, it wasn't enough in the press to say it was a "fund", but to call it a "Superfund". Superfund means lots of different things to lots of people. To the Environmental Protection Agency, Superfund is a fantastic tool for Getting the Job Done: pour money into getting some toxic area clean, and then use more of the money to track down and sue/extract the cleanup costs from the offenders. To the Chemical and Manufacturing sector, Superfund is a gigantic out of control government mess, putting unrealistic retroactive standards upon sites that were legal decades and decades ago when they last left them.  Superfund was starting to get a little unhealthy in 1986, when it got a nice shot in the arm with the passage of the Superfund Amendments and Reauthorization Act (SARA), which really gave it some cash to work with. Superfund continues to this day, with the usual arguments and battles over who's doing what wrong, how inefficient or efficient the process is, and who gets to claim the credit when the occasional site actually gets somewhat cleaned up. (Out of tens of thousands of sites earmarked, of which a couple thousand are "priorities", about a hundred have ultimately been cleaned.) Of course, it took no time for the term "Superfund" to mean "this entire location is completely toxic beyond all reasonable measure", and to find out a plot of land was a "Superfund Site" meant doom for real estate values and the potential for dozens of lawsuits if any of your kids had so much as a sniffle. Just saying "Superfund" near a plot of land that once held some sort of factory will cause a housing glut within months; people know what's good for them. Luckily for Whitey, the vast majority of Superfund sites tend to be located in poor urban areas, where everyone already knew they were doomed. Superfund Fun Fact: The most priority Superfund sites are located in New Jersey, The Garden State. This should surprise, well, no one.... except for someone who's living on one of the sites. |


Enter STAC Item url
Apply
Assets
Allow assets composition
RGB
Layers
Color Map
Internal
CFastie
RPlumbo
Schwarzwald (elevation)
Viridis
Blue-Red
Blue-Green
Yellow-Green
Magma
Earth
Ocean
Terrain
Histogram min/max
Color Formula
Apply
Resampling Method
bilinear
cubic
nearest


General discussion about Komodo. For useful links and more info click the pinned messages to the right. DON'T DM @jl777
100 messages
Before 05-Dec-19 12:00 AM
Farullalla Fashuk04-Sep-18 03:40 PM
send to yourself? thx!
Cryptoon04-Sep-18 03:41 PM
press claim intrest
Nabob04-Sep-18 03:41 PM
Send to yourself for every two weeks or else use Agama claim button
Cryptoon04-Sep-18 03:41 PM
or send to self
Basically the same
Farullalla Fashuk04-Sep-18 03:41 PM
thx! so claiming means moving?
ok, got it. cheers
unquale04-Sep-18 04:29 PM
we don't have assetchain channel anymore ?
Cryptoon04-Sep-18 04:30 PM
@unquale which assetchain are you referring to? There is a whole subset of channels for ecosystem (3rd party) projects
unquale04-Sep-18 04:31 PM
@Cryptoon I want to build our own assetchain via komodo for #marmara(edited)
Nabob04-Sep-18 04:33 PM
@unquale If you have any use case, discuss about your coin #ask-jl777 , here, Our developers will help you to advice further(edited)
unquale04-Sep-18 04:33 PM
I was searching in the content of this channel, it's sad not to have it.
Thank you @Nabob
Nabob04-Sep-18 04:35 PM
Technically, on how you want to create asset chains you can refer to Pinned items and gets some hands on.(edited)
1
shak3nbak304-Sep-18 06:21 PM
i'm trying to download the DEX for OSX and I keep getting stuck around 72mb and then getting an download error
anyone else have this issue?
TonyL04-Sep-18 06:22 PM
@shak3nbak3 I had the same issue - think it's on GitHub side. Used iGetter multithread download manager app to struggle with this interruption
2
wget -c should help as well
shak3nbak304-Sep-18 06:24 PM
I'll try those sortly
Sdunbar04-Sep-18 06:34 PM
pump now, pullback later?
TonyL04-Sep-18 06:34 PM
@Sdunbar There is #talk-trading for pump'n'dumps stuff
bart05-Sep-18 02:52 AM
Hi, I'm trying barterdex for the first time. Apparently i need to enable etomic first if i want to exchange ethereum. When i want to do that i get the message "could not get etomic from faucet". Anyone who can help me out would be appreciated...
you mean i need to ask the question there?
bart05-Sep-18 03:05 AM
ok thx
Alecandro05-Sep-18 04:34 AM
Guys have you all seen the KMD whale that’s been accumulating 6M KMD over the last few months?? ($9M investment)
Makes me so excited
CHMEX05-Sep-18 05:10 AM
Might be an exchange cold store
Alecandro05-Sep-18 05:11 AM
Please explain
CHMEX05-Sep-18 05:17 AM
The wallet never claimed rewards. All the transactions going to that address are smaller sized uxtos which looks like a wallet sweep on a exchange.
Alecandro05-Sep-18 05:20 AM
Interesting.. so you do think it’s the same whale with the huge orders in the order book?
Komodo. Contribute to jl777/komodo development by creating an account on GitHub.
is an explanation of komodo smart contracts and how someone might build on top of them
TonyL05-Sep-18 03:55 PM
In general almost everything you can imagine can be built on CC smarts since they are Turing complete
danielkaye05-Sep-18 03:55 PM
haha I'll take a look @Alright - thanks for the info (and shiling lol)
@TonyL@Alright , could prolly do it but that would require a whole redesign of a lot of already done work
Ludom05-Sep-18 03:59 PM
Someone here is in Lisboa?
If you are in Lisboa, could you pm me?
cipi05-Sep-18 05:18 PM
@danielkaye please make sure your coin's wallet has BIP65 implemented (DASH has it, PIVX not)... grep -Ri checklock * in the source directory should show some results
kimmel (Pungo.io)05-Sep-18 06:32 PM
hi there, I remember there was a way when creating assetchains to avoid getting 0.000X coins created after ac_end=1 and with ac_reward=0
mmm maybe ac_reward=0.0001 & ac_end=1 ??
was it something like this?
Alright05-Sep-18 06:40 PM
Sorry, not sure I understand the question
what are you trying to accomplish? A chain with no block rewards?
kimmel (Pungo.io)05-Sep-18 06:41 PM
right
Alright05-Sep-18 06:41 PM
just ac_end=1
ac_reward can be anything
kimmel (Pungo.io)05-Sep-18 06:41 PM
mmm with ac_reward=0 it keeps adding coins every block
Alright05-Sep-18 06:41 PM
do ac_reward=1?
jl777c05-Sep-18 06:41 PM
ac_reward of non-zero
kimmel (Pungo.io)05-Sep-18 06:42 PM
yes thats what I thought
will try that thx
Alright05-Sep-18 06:43 PM
@kimmel (Pungo.io) if you want on-demand blocks you can omit ac_reward entirely
as in nodes will only mine blocks when there is a tx in the mempool
kimmel (Pungo.io)05-Sep-18 07:55 PM
done thx
kimmel (Pungo.io)05-Sep-18 08:16 PM
mmm I created a new one with ac_reward=0.0001 and during first 128 blocks (still on it) it keeps adding coins


| Class Summary | |
|---|---|
| Call | It is used by EventObject to parser the Events. |
| Click | It is used by EventObject to parser the Events. |
| ContentDeliveryMessage | Request used to send a content as a smart message free of charge for customer |
| ContentDeliveryMessage_Response | Response to a ContentDeliveryMessage request |
| CustomerCheck | Request used to return the full status of customer, if the port type is SUBSCRIPTION |
| CustomerCheck_Response | Response to a CustomerCheck request |
| CustomerGoodbye | Request used to unsubscribe a customer to a specific Port |
| CustomerGoodbye_Response | Response to a CustomerGoodbye request |
| CustomerWelcome | Request used to subscribe a customer to a specific Port |
| CustomerWelcome_Response | Response to a CustomerWelcome request |
| Detection | It is used by EventObject to parser the Events. |
| EventObject | It is used to parser the Events. |
| Listener | Gives information about an event posted by DropPay |
| Message | It is used by EventObject to parser the Events. |
| Mno | Indicates settings for which the payment port is enabled (see Mobile Network Code) |
| Port | Port configuration's properties |
| PortChallenge | Request used to challenge customer to confirm the telephone number in content provider initiated transaction |
| PortChallenge_Response | Response to a PortChallenge request |
| PortChargeOnDemandPurchases | Request used to charge customer with the previously defined price if port type is ONDEMAND |
| PortChargePurchases_Response | Response to a PortChargePurchases request |
| PortChargeSubscriptionPurchases | Request used to charge customer with the previously defined price if port type is SUBSCRIPTION |
| PortDescriptor | Request used to return the full Port configuration's properties |
| PortDescriptor_Response | Response to a PortDescriptor request |
| PortTrigger | Request used to charge all subscribed customers with the previously defined price |
| PortTrigger_Response | Response to a PortTrigger request |
| Subscriber | It is used by EventObject to parser the Events. |


The LGBT Center of Raleigh is a registered 501(c)3 not-for-profit organization. Donations are deductible to the fullest extent allowed by law.
EIN/Tax ID # 26-2998186
You can donate online or mail a check to324 South Harrington Street
Raleigh, North Carolina 27603
The LGBT Center of Raleigh is one of the most successful community centers in the country, attracting national attention for it’s programming and for it’s management.
Functioning as Raleigh’s LGBT community flagship organization, The Center is led by a 14-member board of directors, has two full time paid staff, and utilizes more than 400 community volunteers to ensure that all LGBT people in the Research Triangle have a voice. Our Center provides direct program services to the incredibly diverse community, including youth programs, SAGE Raleigh, HIV Testing and Counseling, and an amazing Transgender Initiative … just to name a few.
DONATESustain the Center by making a recurring payment
Your contribution of $5, $10, or $15 a month will help ensure that the LGBT Center of Raleigh can continue to...
At the LGBT Center of Raleigh, we rely on the generosity of our community, dedicated volunteers and amazing corporate sponsors to help us deliver our services. Whether it is providing a safe space for an LGBT Youth, finding a culturally competent health referral for a community member, providing over 15 different initiatives for our diverse community, or just offering guidance for coming out to friends or coworkers, the LGBT Center excels in providing top-notch programming for the Triangle. Your planned gift will help ensure that the Center will be able to consistently offer opportunities to the community in the present AND in the future.
Download the Planned Giving GuideHave you already designated the Center in your Planned Giving? LET US KNOW! We don’t want to have to wait to thank you for your future gift. Please download this form and send it back to us. Your dedication to our Center is what keeps us going.
Download Deferred Gift InformationKROGER GIVES
Go to the Kroger website and link your card to the LGBT Center of Raleigh.
AMAZON SMILE
Login to Amazon Smile and select LGBT Center of Raleigh as your charity. A percentage of your purchase goes to the Center.
AMAZON WISH LIST
Pick an item from our wish list
GOODSEARCH
Use Goodsearch.com as your search engine and select LGBT Center of Raleigh as your organization.
Your personal information that you share with The LGBT Center is always treated with respect for your privacy and your wishes. If you wish to be an anonymous donor, please make it clear on your method of payment. For checks, please put “anonymous” in the memo line, and for Credit Card transactions, the online form contains a question for you to answer. We want to respect all donor wishes.
A portion of proceeds will be going to the LGBT Center of Raleigh. Tito's Handmade Vodka will be matching those donations up to $10,000.


Shakti Singh
Gurgaon, India
Edit Profile
My Orders
Super Fine Dry Cleaners
Sec 23, Gurgaon
Delivered
| Items | 2 x Shirt, 2 x Jeans | |
|---|---|---|
| Date | February 29, 2019 at 07:45 PM | |
| Total Order | ₹ 250 | |
| Help | Rate this order | View Order |
Super Fine Dry Cleaners
Sec 23, Gurgaon
Cancelled
| Items | 2 x Shirt, 2 x Jeans | |
|---|---|---|
| Date | February 29, 2019 at 07:45 PM | |
| Total Order | ₹ 250 | |
| Help | View Order |
Manage Address
Manage Payments
Coupons & Offers
50% off
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Asperiores, optio!
FIRST50
more details
50% off
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Asperiores, optio!
FIRST50
more details
50% off
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Asperiores, optio!
FIRST50
more details
50% off
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Asperiores, optio!
FIRST50
more details


Guide to reproducible neuroimaging research¶
Do you want to improve your neuroimaging research’s reproducibility, but you don’t know where to start? Are you overwhelmed by the number of tools and approaches you can use to organize your reproducible research? If yes, you’re in the right place!
This guide presents you with pre-selected practical recommendations and useful resources on how to conduct a fully reproducible neuroimaging research project. The guide covers topics such as basics of reproducibility, preregistration, data/code organization and sharing, and building reproducible neuroimaging workflows.
We built this guide based on subjectively selected resources and experiences of the Computational Neuroimaging Team at Nicolaus Copernicus Univeristy in Toruń; thus, not all of our recommendations might be suitable for all labs. Let us know if you find that we missed something essential, or we can improve our workflow!
See documentation: <link to readthedocs>


AEW Full Gear Recap: Paste Discusses AEW's Latest Pay-Per-View
by Garrett MartinA couple of Saturdays ago All Elite Wrestling held its first pay-per-view since launching a weekly TV show on TNT. Full Gear was capped off by two main events, featuring Cody Rhodes challenging Chris Jericho for the AEW World Heavyweight title, and Jon Moxley squaring off with Kenny Omega in an unsanctioned lights out match. These two matches, vastly different in style and construction, show off both why AEW has been so warmly received by its fans, and how the company gives its performers more freedom to be themselves than the company’s main competition.
Paste Senior Editor and chief wrestling fan Garrett Martin recently discussed Full Gear with Elliott Garstin; together the two of them hosted a radio show in Athens, Ga., about pro wrestling back from 2000 to 2001. Find out what they think about the story of Cody and Jericho’s match and the killer post-show angle, as well as the surprisingly brutal deathmatch that Moxley and Omega took part in, by watching the video below. And tune in to AEW Dynamite on TNT on Wednesday nights at 8 p.m. ET.


{% extends "base.html" %} {% block container-content %}
{{ form.username.errors }}
Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.
{{ form.first_name.errors }}
{{ form.last_name.errors }}
{{ form.email.errors }}
{{ form.password1.errors }}
{{ form.password2.errors }}
Re-enter password for verification.


Esca is a website built with angular, angular material 2, angularfire2, and material icons. It allows for the storage, creation, and sharing of recipes.
It is still a work in progress; the github repository can be found here.


I would love to hear from you! Email me at<EMAIL_ADDRESS>or visit me on LinkedIn.
LINKEDIN | BEHANCE | GITHUB


Logistic Regression
December 24, 2017
Python pandas machine learning matplotlibThis post covers the second exercise from Andrew Ng’s Machine Learning Course on Coursera.
Logistic Regression
A logistic regression model will be implemented to predict whether a student gets admitted into a university. Historical data from previous applicants will be used as a training set. Each training example includes the applicant’s scores on two exams and the admissions decision. A classification model that estimates an applicant’s probability of admission based on the scores from those two exams will be built.
Read the data into a pandas dataframe.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import warnings
warnings.filterwarnings('ignore')
%matplotlib inline
data1 = pd.read_csv('ex2data1.txt', header=None, names=['Score1', 'Score2', 'Admitted'])
data1.head()
| Score1 | Score2 | Admitted | |
|---|---|---|---|
| 0 | 34.623660 | 78.024693 | 0 |
| 1 | 30.286711 | 43.894998 | 0 |
| 2 | 35.847409 | 72.902198 | 0 |
| 3 | 60.182599 | 86.308552 | 1 |
| 4 | 79.032736 | 75.344376 | 1 |
Visualizing the Data
Plot the data creating a figure, where the axes are the two exam scores, and the positive and negative examples are shown with different markers.
plt.figure(figsize=(8, 6))
plt.xlabel('Exam 1 score')
plt.ylabel('Exam 2 score')
plt.title('Scatter plot of training data')
plt.plot(data1['Score1'][data1['Admitted']==1],
data1['Score2'][data1['Admitted']==1], 'k+',
label='Admitted')
plt.plot(data1['Score1'][data1['Admitted']==0],
data1['Score2'][data1['Admitted']==0], 'yo',
label='Not Admitted')
plt.legend()
<matplotlib.legend.Legend at 0x10c97c320>
Implementation
Sigmoid Function
The logistic regression hypothesis is defined as:
$h_{\theta}(x) = g(\theta^{T} x)$
where function g is the sigmoid function. The sigmoid function is defined as:
$g(z) = \frac{1}{1+e^{-z}}$
The first step is to implement the sigmoid function. For large positive values of $x$
, the sigmoid should be close to 1, while for large negative values, the sigmoid should be close to 0. Evaluating sigmoid(0)
should give exactly 0.5. The code should also work with vectors and matrices. For a matrix, the function should perform the sigmoid function on every element.
# Create the sigmoid function.
def sigmoid(z):
"""
The sigmoid function.
Args:
z: float, vector, matrix
Returns:
sigmoid: float
"""
sigmoid = 1 / (1 + np.exp(-z))
return sigmoid
# Visualize the sigmoid function
x = np.arange(-10, 10, 0.1)
plt.axhline(y=0.5, c='black', ls=':')
plt.axvline(x=0, c='black', ls=':')
plt.annotate('(0, 0.5)', xy=(0, 0.5), xytext=(-3, 0.55))
plt.plot(x, sigmoid(x))
plt.title('Sigmoid Function')
plt.show()
print('Evaluate sigmoid(0) =', sigmoid(0))
Evaluate sigmoid(0) = 0.5
Cost Function and Gradient
Implement the cost function and gradient for logistic regression. The cost function in logistic regression is:
$J(\theta)=\frac{1}{m} \sum_{i=1}^m[-y^{(i)} log(h_\theta (x^{(i)})-(1-y^{(i)}) log(1-h_\theta (x^{(i)}))]$
and the gradient of the cost is a vector of the same length as $\theta$
where the $j^{th}$
element $(for\,j=0, 1,..., n)$
is defined as follows:
$\frac{\partial J(\theta)}{\partial \theta_j}=\frac{1}{m} \sum_{i=1}^m(h_\theta(x^{(i)})-y^{(i)})x_j^{(i)}$
While this gradient looks identical to the linear regression gradient, the formula is actually different because linear and logistic regression have different definitions of $h_{\theta}(x)$
.
# Get the number of features.
n = len(data1.columns)-1 # subtract 1 for the target column
# Create a function to pepare the data.
def prepareData(data, n):
"""
Add 1s column, convert to arrays,
initialize theta.
Args:
data: read the data file
n: int
Return:
x: a (m, n+1) array
y: a (m, 1) array
theta: a (n+1, 1) array
"""
# Add a column with 1s in the data set.
data.insert(0, 'Ones', 1)
# Define x and y, separating the data set.
x = data.iloc[:, 0:n+1]
y = data.iloc[:, n+1:n+2]
# Convert to arrays, so this function is
# compatible with scipy.optimize.fmin later.
# Initialize parameters theta to 0s.
# Theta is a (n+1, 1) array,
# where n is the number of features.
x = np.array(x.values)
y = np.array(y.values)
theta = np.zeros((n+1, 1))
return x, y, theta
x, y, theta = prepareData(data1, n)
print('Checking the dimensions of the matrices x, y, theta...')
print(x.shape, y.shape, theta.shape)
Checking the dimensions of the matrices x, y, theta...
(100, 3) (100, 1) (3, 1)
# Create a function to compute the cost.
# NOTE!!! The parameters must be in the right order!!!.
# The computeCost(theta, x, y) is the correct order,
# assuming that x and y in computeCost are meant
# to match with the args=(x, y) later in fmin function.
def computeCost(theta, x, y):
"""
Compute the cost function.
Args:
theta: array shape(n+1, 1)
x: array shape(m, n+1)
y: array shape(m, 1)
Returns:
cost: float
"""
m = len(x)
# Do matrix multiplication with numpy.dot
h_theta = sigmoid(np.dot(x, theta))
term1 = np.dot(-y.T, np.log(h_theta))
term2 = np.dot((1 - y).T, np.log(1 - h_theta))
cost = np.sum(term1 - term2) / m
return cost
print('The cost with initial θ equals to zeros, is:')
print(computeCost(theta, x, y))
The cost with initial θ equals to zeros, is:
0.69314718056
Learning Parameters Using the fmin
Algorithm
In the previous exercise 1, the optimal parameters of a linear regression model was computed by implementing gradient descent. This time, instead of taking gradient descent steps, a Python function called fmin
from scipy
will be used. This is the simplest way to minimize a function (unconstrained and constrained). For logistic regression, the objective is to optimize the cost function $J(\theta)$
with parameters $\theta$
. Concretely, fmin
will be applied to find the best parameters $\theta$
for the logistic regression cost function, given a fixed dataset (of $x$
and $y$
values). The following inputs will be passed to fmin
:
- The initial values of the parameters to be optimized.
- A function that, when given the training set and a particular
$\theta$
, computes the logistic regression cost and gradient with respect to$\theta$
for the dataset$(x,y)$
.
from scipy.optimize import fmin
def minimizeCost(computeCost, theta, x, y):
"""
Minimize the cost function.
Args:
computeCost: The function to be minimized
theta: initial guess, array shape(n+1, 1)
x: array shape(m, n+1)
y: array shape(m, 1)
Returns:
theta: array shape(n+1, 1), the parameters that minimize the cost
"""
min_cost = fmin(func=computeCost, x0=theta, args=(x, y))
return min_cost
theta = minimizeCost(computeCost, theta, x, y)
Optimization terminated successfully.
Current function value: 0.203498
Iterations: 157
Function evaluations: 287
# Print the optimal theta parameters and the cost.
print("Optimal theta parameters:")
print(theta)
print("\nCost of optimal theta:")
print(computeCost(theta, x, y))
Optimal theta parameters:
[-25.16130062 0.20623142 0.20147143]
Cost of optimal theta:
0.20349770159
Plot the Decision Boundary
Plot the decision boundary on the training data, using the optimal $\theta$
values. The boundary is exactly at sigmoid(0) = 0.5
:
$\frac{1}{1+e^{-(\theta_0+\theta_1x_1+\theta_2x_2)}}=0.5$
or
$\theta_0+\theta_1x_1+\theta_2x_2=0$
and with the following conversion
$x_2=-(\frac{\theta_0+\theta_1x_1}{\theta_2})$
the boundary decision can be graphically plotted.
Evaluating logistic regression
Use the model to predict whether a particular student will be admitted. For a student with an Exam 1 score of 45 and an Exam 2 score of 85, it is expected an admission probability of 0.776. Another way to evaluate the quality of the parameters is to see how well the learned model predicts on the training set. Create a predict function that will produce “1” or “0” predictions given a dataset and a learned parameter vector $\theta$
. Finally, report the training accuracy of the classifier by computing the percentage of examples it got correct.
# Only 2 points are required to define a line, e.g. min and max.
plot_x = np.array([np.min(x[:, 1]) - 2, np.max(x[:, 1] + 2)])
plot_y = -(theta[0] + theta[1] * plot_x) / theta[2]
plt.figure(figsize=(8, 6))
plt.xlabel('Exam 1 score')
plt.ylabel('Exam 2 score')
plt.title('Scatter plot of training data')
plt.plot(data1['Score1'][data1['Admitted']==1],
data1['Score2'][data1['Admitted']==1], 'k+',
label='Admitted')
plt.plot(data1['Score1'][data1['Admitted']==0],
data1['Score2'][data1['Admitted']==0], 'yo',
label='Not Admitted')
plt.plot(plot_x, plot_y, 'b:', label='Decision Boundary')
plt.plot(45, 85, 'rx', ms=10)
plt.annotate('(45, 85)', xy=(45, 85), xytext=(47, 84))
plt.legend()
plt.show()
probability = sigmoid(np.dot(np.array([1, 45, 85]), theta))
print('Admission probability for scores (45, 85)=', probability)
Admission probability for scores (45, 85)= 0.776291590411
# Create a predict function.
def predictAdmission(x, theta):
"""
Predict whether a student will be admitted.
Args:
x: array shape(m, n+1)
theta: ndarray, the optimal parameters of the cost function
Returns:
predicted: array shape(m,) of booleans
"""
probability = np.array(sigmoid(np.dot(x, theta)))
predicted = probability >= 0.5
return predicted
predicted = predictAdmission(x, theta)
correct = np.sum(predicted.astype(int) == y.reshape(100))
total = len(predicted)
print('Accuracy score: {}%'.format(100 * correct / total))
Accuracy score: 89.0%
Regularized Logistic Regression
A regularized logistic regression will be implemented to predict whether microchips from a fabrication plant passes quality assurance (QA). During QA, each microchip goes through various tests to ensure it is functioning correctly. A dataset of test results on past microchips will be used to build a logistic regression model. There are test results for some microchips on two different tests. From these two tests, it will be determined whether the microchips should be accepted or rejected.
Read the data into a pandas dataframe.
data2 = pd.read_csv('ex2data2.txt', header=None, names=['Test1', 'Test2', 'Accepted'])
data2.sample(n=5)
| Test1 | Test2 | Accepted | |
|---|---|---|---|
| 57 | -0.138820 | -0.27266 | 1 |
| 64 | 0.765550 | 0.50219 | 0 |
| 32 | -0.173390 | 0.64839 | 1 |
| 14 | 0.546660 | 0.48757 | 1 |
| 102 | -0.046659 | -0.57968 | 0 |
Visualizing the Data
Plot the data creating a figure, where the axes are the two test scores, and the positive ( $y=1$
, accepted) and negative ( $y=0$
, rejected) examples are shown with different markers.
plt.figure(figsize=(8, 6))
plt.xlabel('Microchip Test 1')
plt.ylabel('Microchip Test 2')
plt.title('Plot of training data')
plt.plot(data2['Test1'][data2['Accepted']==1],
data2['Test2'][data2['Accepted']==1], 'k+',
label='y = 1')
plt.plot(data2['Test1'][data2['Accepted']==0],
data2['Test2'][data2['Accepted']==0], 'yo',
label='y = 0')
plt.legend()
<matplotlib.legend.Legend at 0x1133ead68>
The scatter plot shows that the dataset cannot be separated into positive and negative examples by a straight-line through the plot. Therefore, a straightforward application of logistic regression will not perform well on this dataset since logistic regression will only be able to find a linear decision boundary.
Feature mapping
One way to fit the data better is to create more features from each data point, for example mapping the features into all polynomial terms of $x_1$
and $x_2$
up to the sixth power. As a result of this mapping, the matrix of two features (the scores on two QA tests) will be transformed into a 28-dimensional matrix. A logistic regression classifier trained on this higher-dimension feature matrix will have a more complex decision boundary and will appear nonlinear when drawn in the 2-dimensional plot. Note that while the feature mapping allows to build a more expressive classifier, it is also more susceptible to overfitting.
import copy
def mapFeature(data, features, degree):
"""
Feature mapping function to polynomial features.
Maps the features to quadratic features.
Returns a new df with more features, comprising of
x1, x2, x1^2, x2^2, x1*x2, x1*x2^2, etc...
Args:
df: a pandas df with index, features and target cols
features: int, the number of initial features
degree: int, the polynomial degree
Returns:
df: a pandas df with the new features
"""
# Create a copy of the data df.
df = copy.deepcopy(data)
degree = degree
# Insert a first column with ones.
df.insert(0, 'Ones', 1)
x = []
for n in range(1, features + 1):
x.append(df.iloc[:, n])
for i in range(1, degree + 1):
for j in range(0, i + 1):
df['x' + str(i) + str(j)] = np.power(x[0], i-j) * np.power(x[1], j)
# Drop unnecessary columns.
cols = [0, 1, 2]
df.drop(df.columns[cols], axis=1, inplace=True)
# Move target column to the end.
# Make a list of all of the columns.
cols = df.columns.tolist()
# Reorder columns.
cols = cols[1:] + [cols[0]]
# Commit the reordering.
df = df[cols]
return df
transformed_data = mapFeature(data2, features=2, degree=6)
transformed_data.shape
(118, 28)
Cost function and gradient
Implement code to compute the cost function and gradient for regularized logistic regression. The regularized cost function in logistic regression is
$J(\theta)=\frac{1}{m} \sum_{i=1}^m[-y^{(i)} log(h_\theta (x^{(i)})-(1-y^{(i)}) log(1-h_\theta (x^{(i)}))]+\frac{\lambda}{2m} \sum_{j=1}^n\theta_j^2$
Note that the parameter $\theta_0$
should not be regularized. The gradient of the cost function is a vector where the $j^{th}$
element is defined as follows:
$\frac{\partial J(\theta)}{\partial \theta_0}=\frac{1}{m} \sum_{i=1}^m(h_\theta(x^{(i)})-y^{(i)})x_j^{(i)}$ for $j=0$
and
$\frac{\partial J(\theta)}{\partial \theta_j}=\frac{1}{m} \sum_{i=1}^m(h_\theta(x^{(i)})-y^{(i)})x_j^{(i)}+\frac{\lambda}{m}\theta_j$ for $j\geq1$
# Get the number of features.
n = len(transformed_data.columns)-1 # subtract the target column
x, y, theta = prepareData(transformed_data, n)
print('Checking the dimensions of the matrices x, y, theta...')
print(x.shape, y.shape, theta.shape)
Checking the dimensions of the matrices x, y, theta...
(118, 28) (118, 1) (28, 1)
# Modify the computeCost function to
# include the regularization term.
def computeCost(theta, x, y, lambda_coef):
"""
Compute the cost function.
Args:
theta: array shape(n+1, 1)
x: array shape(m, n+1)
y: array shape(m, 1)
Returns:
cost: float
"""
m = len(x)
# Do matrix multiplication with numpy.dot
h_theta = sigmoid(np.dot(x, theta))
term1 = np.dot(-y.T, np.log(h_theta))
term2 = np.dot((1 - y).T, np.log(1 - h_theta))
# Exclude theta_0!!!
reg_term = (lambda_coef / (2 * m)) * np.sum(np.square(theta[1:]))
cost = (np.sum(term1 - term2) / m) + reg_term
return cost
print('The cost with initial θ equals to zeros, is:')
print(computeCost(theta, x, y, 0))
The cost with initial θ equals to zeros, is:
0.69314718056
Learning Parameters
Similar to the previous parts, an optimize function will be used to learn the optimal parameters $\theta$
. The fmin
was tested and it was found that cannot converge. The alternative minimize
function will be used.
from scipy.optimize import minimize
res = minimize(fun=computeCost, x0=theta, args=(x, y, 100))
print("Optimal theta parameters for lambda = 100:")
theta_opt = res.x
theta_opt
Optimal theta parameters for lambda = 100:
array([ 0.02188601, -0.01748169, 0.0057103 , -0.05516941, -0.01314889,
-0.03859921, -0.01846357, -0.00773237, -0.00892436, -0.02280492,
-0.04343876, -0.00235625, -0.01415632, -0.0034951 , -0.04143635,
-0.02100597, -0.00471925, -0.00359134, -0.00632237, -0.00502444,
-0.03197707, -0.03416353, -0.00107629, -0.00702625, -0.00038506,
-0.0079824 , -0.00154779, -0.04108711])
Plot the Decision Boundary
Plot the decision boundary on the training data, using the optimal $\theta$
values. Compute the classifier’s predictions on an evenly spaced grid and then draw a contour plot of where the predictions change from $y=0$
to $y=1$
.
Notice the changes in the decision boundary as $\lambda$
varies. With a small $\lambda$
, the classifier gets almost every training example correct, but draws a very complicated boundary, thus overfitting the data. This is not a good decision boundary: for example, it predicts that a point at $x = (−0.25, 1.5)$
is accepted $(y = 1)$
, which seems to be an incorrect decision given the training set.
With a larger $\lambda$
, the plot shows a simpler decision boundary which still separates the positives and negatives fairly well. However, if $\lambda$
is set too high, the resulting fit is not good and the decision boundary will not follow the data so well, thus underfitting the data.
# Create different cases of λ to plot the decision boundaries.
cases = {"No regularization (Overfitting) (λ = 0)": 0,
"Training data with decision boundary (λ = 1)": 1,
"Too much regularization (Underfitting) (λ = 100)": 100}
for k, v in cases.items():
print(60 * "-")
print()
print(k)
# Optimize the cost function.
res = minimize(fun=computeCost, x0=theta, args=(x, y, v))
theta_opt = res.x
# Compute the accuracy.
predicted = predictAdmission(x, theta_opt)
correct = np.sum(predicted.astype(int) == y.ravel())
total = len(predicted)
print('Accuracy score: {}%'.format(round((100 * correct / total), 1)))
# Reshape theta to (n, 1).
theta_opt = theta_opt.reshape(len(theta), 1)
# Create the meshgrid.
xs = np.linspace(-1, 1.5, 50)
ys = np.linspace(-1, 1.5, 50)
xx, yy = np.meshgrid(xs, ys)
# Note the input to np.zeros is a tuple!!!
zs = np.zeros((len(xs), len(ys)))
# Create the dataframe from the above columns.
data = pd.DataFrame({'xs': xx.ravel(),
'ys': yy.ravel(),
'zs': zs.ravel()})
# Transform the df.
transformed_data = mapFeature(data, 2, 6)
# Get the number of features.
n = len(transformed_data.columns)-1
# Prepare the data.
xx1, yy1, theta = prepareData(transformed_data, n)
# Compute the classifier’s predictions.
h_theta = sigmoid(np.dot(xx1, theta_opt))
h_theta = h_theta.reshape((50, 50))
plt.figure(figsize=(8, 6))
plt.xlabel('Microchip Test 1')
plt.ylabel('Microchip Test 2')
plt.title('Plot of training data')
plt.plot(data2['Test1'][data2['Accepted']==1],
data2['Test2'][data2['Accepted']==1], 'k+',
label='y = 1')
plt.plot(data2['Test1'][data2['Accepted']==0],
data2['Test2'][data2['Accepted']==0], 'yo',
label='y = 0')
plt.legend()
plt.contour(xx, yy, h_theta, [0.5])
plt.show()
------------------------------------------------------------
No regularization (Overfitting) (λ = 0)
Accuracy score: 89.0%
------------------------------------------------------------
Training data with decision boundary (λ = 1)
Accuracy score: 83.1%
------------------------------------------------------------
Too much regularization (Underfitting) (λ = 100)
Accuracy score: 61.0%


pips Red=74 White=85
(CorrectAnswer= 0/0, ErrorScore= 0)
My own match play has improved immeasurably over the last two years by playing and studying on the online site GridGammon. In that time I have played over two thousand matches and learnt a great deal along the way.
We have come a long way since one of the early backgammon authors, Georges Mabardi, said in his 1930 book, “Backgammon to Win”: “If two absolutely perfect players engaged in a match, there would never be an accepted double.” In fairness, doubling was only four years old at the time and so the understanding of the concepts involved were very much in their infancy.
The more you play matches rather than money backgammon the more you come to understand just how much influence the match score has on both checker plays and cube decisions. When at least one, and quite often both, players are within five points of the finish line that influence grows in significance.
Twenty years ago, with the score 3-away vs. 2-away and after the sequence Black 31: 8/5, 6/5; White 32: 24/22, 13/10 nobody would have considered doubling as Black and yet now that is standard practice - it would be a bad error for Black not to double. At 4-away vs. 2-away, and after the same sequence, not doubling would be a bad blunder.
Despite all that we have learnt the most common mistake that I still see is players making money cube decisions in match situations. This week’s position is taken from an early round match at the recent Gibraltar tournament between two of the world’s top players (who shall remain nameless!).
I was watching online when Black correctly doubled this position at 3-away vs. 4-away. For money this a comfortable take because White has a number of ways of winning but a take at this match score is a double blunder. A win for Black gets him to the Crawford game with his opponent on an odd number (ideal) and with 83% winning chances.
White does much better to pass and play from 4-away vs. 2-away where he has optimal cube leverage. White took this double after about a second’s thought so I assume he was playing on automatic. That’s another key point: at the end of a match always take longer over your doubling decisions – they are likely to be crucial so it is worth investing the time.
We have come a long way since one of the early backgammon authors, Georges Mabardi, said in his 1930 book, “Backgammon to Win”: “If two absolutely perfect players engaged in a match, there would never be an accepted double.” In fairness, doubling was only four years old at the time and so the understanding of the concepts involved were very much in their infancy.
The more you play matches rather than money backgammon the more you come to understand just how much influence the match score has on both checker plays and cube decisions. When at least one, and quite often both, players are within five points of the finish line that influence grows in significance.
Twenty years ago, with the score 3-away vs. 2-away and after the sequence Black 31: 8/5, 6/5; White 32: 24/22, 13/10 nobody would have considered doubling as Black and yet now that is standard practice - it would be a bad error for Black not to double. At 4-away vs. 2-away, and after the same sequence, not doubling would be a bad blunder.
Despite all that we have learnt the most common mistake that I still see is players making money cube decisions in match situations. This week’s position is taken from an early round match at the recent Gibraltar tournament between two of the world’s top players (who shall remain nameless!).
I was watching online when Black correctly doubled this position at 3-away vs. 4-away. For money this a comfortable take because White has a number of ways of winning but a take at this match score is a double blunder. A win for Black gets him to the Crawford game with his opponent on an odd number (ideal) and with 83% winning chances.
White does much better to pass and play from 4-away vs. 2-away where he has optimal cube leverage. White took this double after about a second’s thought so I assume he was playing on automatic. That’s another key point: at the end of a match always take longer over your doubling decisions – they are likely to be crucial so it is worth investing the time.
Cube analysis 2-ply cubeless equity +0.542 0.761 0.024 0.000 - 0.239 0.005 0.000 Cubeful equities: 1. Double, take +0.923 2. Double, pass +1.000 (+0.077) 3. No double +0.832 (-0.091) Proper cube action: Double, take


Still not really sure how this is going to work yet, but we're making progress!
Firebase SDK Loading…


Ethereum token viewer
View tokens developed with ethereum
ERC20 standard
Explore contract supply, sender, receiver, and amount of transaction in token units.
Look sample
transaction,
token,
address or search yours.
Do you need to view
custom data
or non-standart token?
Ask us.
Donation addresses:
ETH: 0x0dE0BCb0703ff8F1aEb8C892eDbE692683bD8030
BTC: 1MKVGqyJA9YkVRuDsGCvnYVJ6ivNtfe289


selenium-webdriver
Installation
Install the latest published version using npm
:
npm install selenium-webdriver
In addition to the npm package, you will to download the WebDriver
implementations you wish to utilize. As of 2.34.0, selenium-webdriver
natively supports the ChromeDriver.
Simply download a copy and make sure it can be found on your PATH
. The other
drivers (e.g. Firefox, Internet Explorer, and Safari), still require the
standalone Selenium server.
Running the tests
To run the tests, you will need to download a copy of the
ChromeDriver and make
sure it can be found on your PATH
.
npm test selenium-webdriver
To run the tests against multiple browsers, download the
Selenium server and
specify its location through the SELENIUM_SERVER_JAR
environment variable.
You can use the SELENIUM_BROWSER
environment variable to define a
comma-separated list of browsers you wish to test against. For example:
export SELENIUM_SERVER_JAR=path/to/selenium-server-standalone-2.33.0.jar
SELENIUM_BROWSER=chrome,firefox npm test selenium-webdriver
Usage
var webdriver = require('selenium-webdriver');
var driver = new webdriver.Builder().
withCapabilities(webdriver.Capabilities.chrome()).
build();
driver.get('http://www.google.com');
driver.findElement(webdriver.By.name('q')).sendKeys('webdriver');
driver.findElement(webdriver.By.name('btnG')).click();
driver.wait(function() {
return driver.getTitle().then(function(title) {
return title === 'webdriver - Google Search';
});
}, 1000);
driver.quit();
Documentation
Full documentation is available on the Selenium project wiki.
Issues
Please report any issues using the Selenium issue tracker.
License
Copyright 2009-2014 Software Freedom Conservancy
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


Python, being a very powerful programming language provides many different libraries to create GUIs or Graphic User Interfaces. Some of them are :-
We have a lot of options to choose from and in this guide we will be going through Tkinter. Tkinter is a powerful python library that allows users to develop GUIs in a very fast and effective way. It seems a bit tricky but i am sure if you go through this guide well, you will be able to understand all the basics and build your own GUIs. So lets get started.
Here's the command for anaconda distribution - install -c anaconda tk
Copy paste this in the command prompt and you are good to go.
Let's take a look at some basic but very important tkinter widgets which we will use later on in this guide to make some projects.
1) Window creation - Our very first step is creating a window in which we will be carrying out our different tasks.
We have successfully created the window with the “tk.Tk()” and the mainloop is something that runs in the background and helps in keeping the window open unless we close it manually. Our window looks like this -
2)Buttons - Now that we have our window, it's time to add some widgets in it to make it look a bit interactive. We will be adding a button to our window which won't do anything at the moment. Here's how you do it:-
The result looks something like this :-
Don’t get affected by the “.grid” method in the above photo, we will talk about what grids are and what they do later when we talk about alignment and other stuff. But until then we have our very basic button ready. It's not very attractive at the moment but it does the job. Next let's take a look at labels.
3)Labels - These act as a display box that can display one line messages or in some cases even images. Let's take a look at how to implement them -
So, above we define a method “displaymessage” in which we create a label that just displays text for us. We use the button that we created previously and pass the method displaymessage in it in order to make the label work and print our text. Command is what helps us pass the method in the button.
The results are as follows :-
4)Title and Window Icon - We want our window to have a title that we would like to see.So lets replace the “tk” and the icon in our window. That can be done as follows :-
We use the “.title” method to change our window title and we use the “iconbitmap” method to change the window icon. An important point to remember while changing the window icon/logo we need to use a “.ico” format image for it to work.
Here are the results:-
5)Entry - In this we will see how the input fields work in Tkinter and also look at the geometry of our window in order to get a better understanding of placement of our widgets. Let's first see how the Entry works -
Now it looks like there's a lot going on in this so let's break it down step by step. Here we are trying to create a simple login window. All it does is , takes input of username and password from the user and we can click the button to login. Easy. Alright , now let's take a look at the labels and entry. We have defined variables ‘label’ and ‘label1’ that display the message ‘username’ and ‘password’ respectively for the user to enter. We then defined variables ‘entry’ and ‘entry1’ to take the inputs from the user. ‘Entry’ is a method that helps us incorporate an input section in our window. And then we have our button which we have talked about previously. Now let's talk about the geometry of our window -
Frame - It's used to help us organise our widget in a container format.
Grid -It's very similar to frame as it also helps in organizing our widgets in our window but it works on the concepts of rows and columns. Visually it looks something like this :-
Now each box in here is a part of a row and column.So, the very first block is in row = 0 and column = 0. Similarly on moving from left to right, the row remains equal to 0 but the column number keeps incrementing . Hence in our example , the username and password are both in column 0 but their placement in rows is different. Similarly for our Entries.
Pack - This is also a very important geometrical alignment feature that we have, this feature organizes our widgets in block manner and occupies the complete available width.You can see the use of ‘.pack’ in the labels section.
So now that we are clear with our window geometry and placement of our widgets , let's take a look at the results of our simple login window.
6)Check-Button - These basically work as buttons that the user can toggle between. Its basically a check box. A user can choose multiple options at once. Here's how you can make your own checkbutton/checkbox -
And the final result looks something like this -
7)Menu - The last thing that we will take a look at is our Menu Bar that is functional. So here's how you make it.
The "add_cascade()" method creates a new menu by associating a given menu to a parent menu. The "add_command()" adds an item to the menu. The "add_separator()" method adds a separator line to the menu.
Here's the final Result -
Congratulations! These are pretty much all the methods that you need to know in order to make a fully functional GUI that actually does something. There are tons of other methods but to make a fully functional GUI these are sufficient.
Had some trouble understanding the above concepts? Here are some links to help you out.
Now that you are done with learning why not apply it? Head over to the Projects Section to do some projects and sharpen you tkinter skills.


Church facelift
by Norman CruzRev. Ricky Villar, OSA, director of San Agustin Museum, uses a Karcher high pressure washer in cleaning the facade of the San Agustin Church in Intramuros, Manila on Thursday. The church is scheduled for restorative cleaning as part of the cultural program that aims to preserve historic landmarks around the globe.