IT SOLUTIONS
DANBAN applies a modernized business strategy to ensure your technology is secure and sized appropriately for your business requirements. With us, you won’t have to stress about an IT disaster since your business will be fully safeguarded through IT expert and reliable IT solutions.
OUTSOURCING
Do you worry about your company’s IT system throughout your business day? Have you had difficulties with your IT in the past? Perhaps you’re overwhelmed by the many options available on the market. The impact on a company's revenue recognition and the delivered savings are decisive when a company is choosing to outsource to us.
EXPERT RECRUITING
We're more than just a recruitment agency. From meeting tight deadlines to managing peak seasons, staffing needs can be unpredictable. That’s why DANBANG provides businesses in Denmark with flexible service options. Looking for a more effective staffing strategy? A top candidate for a full-time hire? A last minute fill in? DANBANG can help you.
About Us
DANBANG is an IT Expert Recruiting, IT Services, Consulting, System Integration & Software Outsourcing Company located in Denmark that provides Nearshore Software Outsourcing Services and Custom Software Development and Expert recruiting from Bangladesh which is recognized as top talent outsourcing providing country.
REDUCE TIME
We have over 100 software developer experts using a large variety of platforms, tools, programming languages and frameworks.
COST SAVINGS
The impact on a company’s revenue recognition and the delivered savings are decisive when a company is choosing us
TTOP QUALITY
We are a reliable partner, managing dedicated teams for software development with high quality.
Services
A dedicated research team closely monitors market and industry trends and provides the best services
IT Support
IT services are designed to support growing companies by offering fully managed technology solutions at an affordable cost.
Our approach is to implement a lean, scalable solution with a proactive approach to problem solving that keeps your systems operating at peak performance .
Operational Support
User Management ,Security Monitoring & Response ,Software License Management, 24/7 System Monitoring, Software Deployment & Updates, Hardware Inventory System Usage/Reliability & Reporting
Offshore Outsourcing
Our main areas of expertise covers: Web applications, Web design, Mobile applications, Database management systems, Big data solutions, Multi-tier architectures, Cloud-enabled solutions, E-Commerce solutions, Content Management Systems, Business Intelligence and R&D.
Project Management
Our Project Management Services help organizations apply project management and PMO practices to improve business performance.Plan, staff, manage, budget, forecast, bill, and analyse projects
Security & Complience
GDRP, ISO 270X , risk management, risk mitigration, valnurability assesment,pentratin testingbackup and disaster recovery, email/spam protection, internet protection, business data protection, privacy and confidendiality.
Sourcing as a Service
Custom lists of passive candidate profiles:We combine technology, data science and human expertise to help you build target lists of candidate profiles with speed and accuracy – allowing you to focus on pitching and closing potential candidates.
WHY SHOULD CHOOSE US
A world where time, talent, and challenges are expertly tied together. With a strong, organized IT infrastructure, you’ll be able to maximize internal productivity by letting the professionals address your IT system while you focus on what you’re good at. DANBAN offers IT Solutions, EXPERT recruiting, outsourcing, and complience services to implement the technology your business depends on. IT consulting includes risk management, backup and disaster recovery, email/spam protection, internet protection, computer repair, business data protection.
Facts
It is beneficial for both Danish IT organizations and Bangladeshi IT experts and their outsourcing services
Clients
Projects
Hours Of Support
Hard Workers
Our Portfolio
- All
- Complience & Security
- ADF & DATA
- Web & MOBILE
App 1
App
Web 3
Web
App 2
App
Security Management
Security Management
Web 2
Web
App 3
App
Complience
Complience
Java ADF
Application Framework
Web 1
Web
Our Clients
Testimonials
H.E. Mr. Muhammad Abdul Muhith
Bangladesh Ambassador to Denmark
The Danish IT company can get reliable,high quality and prominent services with good price from us. Furthermore, it helps them to save money, time and reduces organizational works. On the other hand, Bangladeshi IT experts and their valuable services earn foreign remittance. It boom Bangladeshi IT sector and will make a significant role in economy.
H.E. Mr. Muhammad Abdul Muhith
Bangladesh Ambassador to Denmark
The Danish IT company can get reliable,high quality and prominent services with good price from us. Furthermore, it helps them to save money, time and reduces organizational works. On the other hand, Bangladeshi IT experts and their valuable services earn foreign remittance. It boom Bangladeshi IT sector and will make a significant role in economy.
Team
We have most experienced and reliable talent IT Professional
Mohammad R. Karim
Project ManagerBhuyan Motalib Hossain
FounderAbdul Quyum
Web DeveloperAmanda Jepson
AccountantContact Us
We are happy to contact us


We have program for all levers
of ability and coach and
mentor in place to help you
Training refers to the teaching and learning activities carried on for the primary purpose of helping members of an organization acquire and apply the knowledge, skills, abilities
Since it’s first edition in 2003, the Standard Chartered Nairobi Marathon has grown tremendously and has earned recognition
Run and interact with the best in athletics during our warm-up races within Nairobi! We will also explore and educate on the need to conserve our green spaces
Special thanks goes to our partners: Nairobi City County, Ministry of Sports, Athletics Kenya, AAR Healthcare, Dimension Data, Coca-Cola Beverages Africa, Subaru Kenya, .
Our goal is to raise 50 million USD by 2023 to tackle inequality and promote economic inclusion for our younger generation.
Our programs put you in the best position to get from point A to point B, whether the distance between points be 3 miles or 50
If you've ever completed a marathon and thought, "Well, that just wasn't long enough," we have good news!
This program focuses on distances and runs beyond 26.2. Find your inner grit, embrace the burn, and love the run.


Debug
Tachyons comes with two convenient modules to help debug layout issues you might be having.
The debug_children module allows you to use a class called "debug" on any element. That element along with any child node will have an outline of 1px solid gold placed on it.
The debug module is commented out at the bottom of the src/tachyons.css file. If you uncomment it a 1px outline will be placed on every element on the page. Each element has a different color outline. The purpose of this is to help distinguish elements that are close together by giving them different colors. This has been helpful at times when the outlines are overlapping by 1 or 2 pixels and it's hard to tell where one element ends and the other begins.
This debug module is commented out by default in src/tachyons.css
.
To use it, uncomment out that line and then run node run build
from the root of the project.


| Course Number | Course Title | Semester Taken |
|---|---|---|
| For Credit | ||
| 6.813 | User Interface Design | Spring 2014 |
| 6.034 | Artificial Intelligence | Fall 2013 |
| 6.006 | Introduction to Algorithms | Fall 2013 |
| Listener | ||
| 6.867 | Machine Learning | Fall 2013 |
| 6.830 | Database Systems | Fall 2012 |


{% extends 'base.html' %} {% import 'bootstrap/wtf.html' as wtf%} {% block content%}
Share and Inspire others


Humbled to talk to anyone about all the nerdy stuff I've done over the years.
'Giving the Gift of Metal' - Bandcamp Daily
'Industry Spotlight: Seth Werkheiser (Skull Toaster)' - Haulix
'The Constant Conversations Podcast' - Blerd Radio
'Episode 5: Seth Werkheiser' - First, Last and Always Podcast
Interview with Nikki - Everything and the Kitchen Sink
'Profile: Seth Werkheiser' - Nine Circles
Interview with Billy Power - Urban Achiever Podcast
'Profiles are back…the Bike Nerd' - Bike Blog NYC
'Seth Werkheiser Interview | Part 1, His Life' - Simple Black Coffee
'Seth Werkheiser Interview | Part 2, His Bike' - Simple Black Coffee


FROM: MR. Jackson Khumalo JOHANNESBURG-SOUTH AFRICA Private email<EMAIL_ADDRESS>ATTN: PRESIDENT/ CEO, DIRECTOR, DELIVERY/OPERATIONS RE: TRANSFER OF US$25 MILLION FOR INVESTMENT. I am Mr. Jackson khumalo, the Director of Delivery/Operations in a security company here in South Africa. Our firm is a security company of high repute with years of outstanding service to the people of Africa especially top government officials and military leaders in the world. I have resolved to contact you through this medium based on Business proposal that will be of mutual benefit to both of us. I have not discussed this transaction with anybody because it is of top secret. To be explicit and straight to the point, a reputable client of ours deposited a consignment in our company's Vault for safekeeping. And since then our client has failed to come forward to claim his consignment, which has accumulated a considerable amount of money in demurrage. Consequently, in our bide to contact this client to redeem the demurrage which his Consignment had accumulated I discovered that our client was the former Late Prime Minister of Lebanon, Mr. Rafik Hariri, PROFILE of the Late Minister of Lebanon: Rafik Bahaa Edine Hariri {November 1, 1944 � February 14, 2005} married to Nazek Audi Hariri, was a Lebanese self � made billionaire and business tycoon, and was former Prime Minister of Lebanon {1992 � 1998 and 2000 � 2004} before his late resignation from office on October 20, 2004. The late Rafik Hariri died on February 14, 2005 when explosives equivalent to around 300 kg of C4 were detonated as his motorcade drove past the Saint George Hotel in the Lebanese capital, for more information please log on to {http://www.hariri.info}. After in the same year the consignment was entrusted into our care. Since the death of our client Late Prime Minister of Lebanon,Mr. Rafik Hariri,none of his benefactors has come forward to claim the consignment with us, which means that non of his relatives or Aids had any knowledge of this consignment. Hence out of curiosity I decided to secretly open the box that our client deposited in our vault. And to my surprise I discovered that the metal box that were registered as treasures by our client actually contained a considerable amount of money in United States Dollars amounting to about US$25Million US Dollar. Since this development I have been nursing plans secretly. I also found out from enquiries and the foreign media that our late client siphoned a lot of money from his country while he was in office as Prime Minister, It is my conviction that the consignment in our vault was part of the money that our client siphoned and now that he is dead there is no trace to this money in our care. After going through his (WILL) I Found that he stated that the treasure should be used to support (Islamic race). Finally, I am now soliciting your noble assistance to assist me in transferring this money out of South Africa to your country for immediate investment. I have also decided that you will generously be entitled to 40% of the total amount. Upon my receipt of your reply confirming your willingness to assist me of this transaction, I Will immediately arrange and transfer all the rights of ownership of this consignment to your name to facilitate your easy clearance and transfer of the complete funds to your country for onwards investment. This transaction is 100% risk free. Please maintain absolute confidentiality on this matter. Please reply on my private mail<EMAIL_ADDRESS>I await your most prompt response. Yours faithfully, Mr. Jackson khumalo


You can load CSS files if you need for particular modules. Since you are loading this css file with the module, it implies that it is not global styles, but rather styles for the particular module.
The css file is loaded in, then a unique id is generated for the css file based off of some of its file characteristics. This unique id is then prepended to each rule, and then the containing element gets the class with the id. The css is then inserted into the head with a style tag. This helps to scope the styles to the particular module instead of globablly.
Here is an example with three different css files, but with the same html.
Example 1 | Example 2 | Example 3


--- title: Israel shot 115 date: 2004-04-25T00:00:00.000Z filepathOriginal: photos/IMG0118.jpg filepathThumbnail: photos/IMG0118.thumbnail.jpg filepathPreview: photos/IMG0118.preview.jpg ---
In an attempt to solve the wet feet problem, Raf commands the waters to split before him


Actions
Font
Font Type
Off
Focus Mode
Image Veil
Enable to focus on text better.
Highlight Words
Highlight words as you read.
Safe Browsing
Malicious Links
Enable to highlight malicious links.
Predict toxic behaviour
Select a text to get started.
Font Color
Font Color
Off
Magnifier
Magnifier
Hover to magnify images.
Magnifier Size
Magnification
Font Size
Font Size
Off
Color Blind
Emphasize Links
Add multi-color underline to hyperlinks.
Text Stroke Color
Text Stroke
Cursor
Cursor Type
Off
Print Screen
Print the current page.
Screenshot
Screenshot
Take a screenshot of the current page.
Enable text to speech
Convert speech to text
Select a text to get started.


This is the main page.
To go to a page without a title, go here.
To go to a page with a title, go here.


edu.iu.dsc.tws.executor.comms.batch
Classes
AllGatherBatchOperation
AllReduceBatchOperation
AllReduceBatchOperation.ReduceFnImpl
BroadcastBatchOperation
DirectBatchOperation
GatherBatchOperation
JoinBatchOperation
KeyedGatherBatchOperation
KeyedPartitionBatchOperation
KeyedReduceBatchOperation
PartitionBatchOperation
ReduceBatchOperation
ReduceBatchOperation.ReduceFnImpl


This Certificate is issued under the of regulation I/9 of STCW conversion, 1978, as amended.
| Nama : | Date of brithday : | |||
| SEX : | Nasinality | |||
| Height : | cm | urinalisys | albunim | |
| weight : | kg | sugar | ||
| abdominal circumference | cm | blod type | ||
| breathing capacity | cm | |||
| physical ability | blood presure | Systolic : Diastolic : |
||
| color vision | abnormal | Blood Gluecose | ||
| Distance Vision unaided Distance vision aided |
Right ( ) left ( ) combine ( ) |
Blood lipid exam |
LDL cholestrole | |
| trilyceride | ||||
| HDL cholestrole |


Fans furious after Simon Cowell announces that he wants to create a rival to K-pop with 'UK-pop'
by sl278Some K-pop fans are furious at producer and music mogul Simon Cowell after he announced that he wants to create a rival to K-pop through creating a "UK-pop" group.
The producer uploaded a video in which he stated that he would be trying to find the next stars of his UK-pop group through 'The X Factor'. In the video, Simon Cowell says, "Right now K-Pop you could argue is ruling the world. Now it's time for UK-Pop."
Many fans have accused the producer of whitewashing a cultural phenomenon and taking away credit from groups such as BTS and BLACKPINK for their achievements.
What do you think of this issue?


## pygame - Python Game Library ## Copyright (C) 2000-2003, 2007 Pete Shinners ## (C) 2004 Joe Wreschnig ## This library is free software; you can redistribute it and/or ## modify it under the terms of the GNU Library General Public ## License as published by the Free Software Foundation; either ## version 2 of the License, or (at your option) any later version. ## ## This library is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## Library General Public License for more details. ## ## You should have received a copy of the GNU Library General Public ## License along with this library; if not, write to the Free ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## ## Pete Shinners ##<EMAIL_ADDRESS>"""pygame module with basic game object classes This module contains several simple classes to be used within games. There are the main Sprite class and several Group classes that contain Sprites. The use of these classes is entirely optional when using Pygame. The classes are fairly lightweight and only provide a starting place for the code that is common to most games. The Sprite class is intended to be used as a base class for the different types of objects in the game. There is also a base Group class that simply stores sprites. A game could create new types of Group classes that operate on specially customized Sprite instances they contain. The basic Sprite class can draw the Sprites it contains to a Surface. The Group.draw() method requires that each Sprite have a Surface.image attribute and a Surface.rect. The Group.clear() method requires these same attributes and can be used to erase all the Sprites with background. There are also more advanced Groups: pygame.sprite.RenderUpdates() and pygame.sprite.OrderedUpdates(). Lastly, this module contains several collision functions. These help find sprites inside multiple groups that have intersecting bounding rectangles. To find the collisions, the Sprites are required to have a Surface.rect attribute assigned. The groups are designed for high efficiency in removing and adding Sprites to them. They also allow cheap testing to see if a Sprite already exists in a Group. A given Sprite can exist in any number of groups. A game could use some groups to control object rendering, and a completely separate set of groups to control interaction or player movement. Instead of adding type attributes or bools to a derived Sprite class, consider keeping the Sprites inside organized Groups. This will allow for easier lookup later in the game. Sprites and Groups manage their relationships with the add() and remove() methods. These methods can accept a single or multiple group arguments for membership. The default initializers for these classes also take a single group or list of groups as argments for initial membership. It is safe to repeatedly add and remove the same Sprite from a Group. While it is possible to design sprite and group classes that don't derive from the Sprite and AbstractGroup classes below, it is strongly recommended that you extend those when you create a new Sprite or Group class. Sprites are not thread safe, so lock them yourself if using threads. """ ##todo ## a group that holds only the 'n' most recent elements. ## sort of like the GroupSingle class, but holding more ## than one sprite ## ## drawing groups that can 'automatically' store the area ## underneath so they can "clear" without needing a background ## function. obviously a little slower than normal, but nice ## to use in many situations. (also remember it must "clear" ## in the reverse order that it draws :]) ## ## the drawing groups should also be able to take a background ## function, instead of just a background surface. the function ## would take a surface and a rectangle on that surface to erase. ## ## perhaps more types of collision functions? the current two ## should handle just about every need, but perhaps more optimized ## specific ones that aren't quite so general but fit into common ## specialized cases. import pygame from pygame import Rect from pygame.time import get_ticks from operator import truth # Python 3 does not have the callable function, but an equivalent can be made # with the hasattr function. if 'callable' not in dir(__builtins__): callable = lambda obj: hasattr(obj, '__call__') # Don't depend on pygame.mask if it's not there... try: from pygame.mask import from_surface except: pass class Sprite(object): """simple base class for visible game objects pygame.sprite.Sprite(*groups): return Sprite The base class for visible game objects. Derived classes will want to override the Sprite.update() method and assign Sprite.image and Sprite.rect attributes. The initializer can accept any number of Group instances that the Sprite will become a member of. When subclassing the Sprite class, be sure to call the base initializer before adding the Sprite to Groups. """ def __init__(self, *groups): self.__g = {} # The groups the sprite is in if groups: self.add(*groups) def add(self, *groups): """add the sprite to groups Sprite.add(*groups): return None Any number of Group instances can be passed as arguments. The Sprite will be added to the Groups it is not already a member of. """ has = self.__g.__contains__ for group in groups: if hasattr(group, '_spritegroup'): if not has(group): group.add_internal(self) self.add_internal(group) else: self.add(*group) def remove(self, *groups): """remove the sprite from groups Sprite.remove(*groups): return None Any number of Group instances can be passed as arguments. The Sprite will be removed from the Groups it is currently a member of. """ has = self.__g.__contains__ for group in groups: if hasattr(group, '_spritegroup'): if has(group): group.remove_internal(self) self.remove_internal(group) else: self.remove(*group) def add_internal(self, group): self.__g[group] = 0 def remove_internal(self, group): del self.__g[group] def update(self, *args): """method to control sprite behavior Sprite.update(*args): The default implementation of this method does nothing; it's just a convenient "hook" that you can override. This method is called by Group.update() with whatever arguments you give it. There is no need to use this method if not using the convenience method by the same name in the Group class. """ pass def kill(self): """remove the Sprite from all Groups Sprite.kill(): return None The Sprite is removed from all the Groups that contain it. This won't change anything about the state of the Sprite. It is possible to continue to use the Sprite after this method has been called, including adding it to Groups. """ for c in self.__g: c.remove_internal(self) self.__g.clear() def groups(self): """list of Groups that contain this Sprite Sprite.groups(): return group_list Returns a list of all the Groups that contain this Sprite. """ return list(self.__g) def alive(self): """does the sprite belong to any groups Sprite.alive(): return bool Returns True when the Sprite belongs to one or more Groups. """ return truth(self.__g) def __repr__(self): return "<%s sprite(in %d groups)>" % (self.__class__.__name__, len(self.__g)) class DirtySprite(Sprite): """a more featureful subclass of Sprite with more attributes pygame.sprite.DirtySprite(*groups): return DirtySprite Extra DirtySprite attributes with their default values: dirty = 1 If set to 1, it is repainted and then set to 0 again. If set to 2, it is always dirty (repainted each frame; flag is not reset). If set to 0, it is not dirty and therefore not repainted again. blendmode = 0 It's the special_flags argument of Surface.blit; see the blendmodes in the Surface.blit documentation source_rect = None This is the source rect to use. Remember that it is relative to the top left corner (0, 0) of self.image. visible = 1 Normally this is 1. If set to 0, it will not be repainted. (If you change visible to 1, you must set dirty to 1 for it to be erased from the screen.) _layer = 0 0 is the default value but this is able to be set differently when subclassing. """ def __init__(self, *groups): self.dirty = 1 self.blendmode = 0 # pygame 1.8, referred to as special_flags in # the documentation of Surface.blit self._visible = 1 self._layer = getattr(self, '_layer', 0) # Default 0 unless # initialized differently. self.source_rect = None Sprite.__init__(self, *groups) def _set_visible(self, val): """set the visible value (0 or 1) and makes the sprite dirty""" self._visible = val if self.dirty < 2: self.dirty = 1 def _get_visible(self): """return the visible value of that sprite""" return self._visible visible = property(lambda self: self._get_visible(), lambda self, value: self._set_visible(value), doc="you can make this sprite disappear without " "removing it from the group,\n" "assign 0 for invisible and 1 for visible") def __repr__(self): return "<%s DirtySprite(in %d groups)>" % \ (self.__class__.__name__, len(self.groups())) class AbstractGroup(object): """base class for containers of sprites AbstractGroup does everything needed to behave as a normal group. You can easily subclass a new group class from this or the other groups below if you want to add more features. Any AbstractGroup-derived sprite groups act like sequences and support iteration, len, and so on. """ # dummy val to identify sprite groups, and avoid infinite recursion _spritegroup = True def __init__(self): self.spritedict = {} self.lostsprites = [] def sprites(self): """get a list of sprites in the group Group.sprite(): return list Returns an object that can be looped over with a 'for' loop. (For now, it is always a list, but this could change in a future version of pygame.) Alternatively, you can get the same information by iterating directly over the sprite group, e.g. 'for sprite in group'. """ return list(self.spritedict) def add_internal(self, sprite): self.spritedict[sprite] = 0 def remove_internal(self, sprite): r = self.spritedict[sprite] if r: self.lostsprites.append(r) del self.spritedict[sprite] def has_internal(self, sprite): return sprite in self.spritedict def copy(self): """copy a group with all the same sprites Group.copy(): return Group Returns a copy of the group that is an instance of the same class and has the same sprites in it. """ return self.__class__(self.sprites()) def __iter__(self): return iter(self.sprites()) def __contains__(self, sprite): return self.has(sprite) def add(self, *sprites): """add sprite(s) to group Group.add(sprite, list, group, ...): return None Adds a sprite or sequence of sprites to a group. """ for sprite in sprites: # It's possible that some sprite is also an iterator. # If this is the case, we should add the sprite itself, # and not the iterator object. if isinstance(sprite, Sprite): if not self.has_internal(sprite): self.add_internal(sprite) sprite.add_internal(self) else: try: # See if sprite is an iterator, like a list or sprite # group. self.add(*sprite) except (TypeError, AttributeError): # Not iterable. This is probably a sprite that is not an # instance of the Sprite class or is not an instance of a # subclass of the Sprite class. Alternately, it could be an # old-style sprite group. if hasattr(sprite, '_spritegroup'): for spr in sprite.sprites(): if not self.has_internal(spr): self.add_internal(spr) spr.add_internal(self) elif not self.has_internal(sprite): self.add_internal(sprite) sprite.add_internal(self) def remove(self, *sprites): """remove sprite(s) from group Group.remove(sprite, list, or group, ...): return None Removes a sprite or sequence of sprites from a group. """ # This function behaves essentially the same as Group.add. It first # tries to handle each argument as an instance of the Sprite class. If # that failes, then it tries to handle the argument as an iterable # object. If that failes, then it tries to handle the argument as an # old-style sprite group. Lastly, if that fails, it assumes that the # normal Sprite methods should be used. for sprite in sprites: if isinstance(sprite, Sprite): if self.has_internal(sprite): self.remove_internal(sprite) sprite.remove_internal(self) else: try: self.remove(*sprite) except (TypeError, AttributeError): if hasattr(sprite, '_spritegroup'): for spr in sprite.sprites(): if self.has_internal(spr): self.remove_internal(spr) spr.remove_internal(self) elif self.has_internal(sprite): self.remove_internal(sprite) sprite.remove_internal(self) def has(self, *sprites): """ask if group has a sprite or sprites Group.has(sprite or group, ...): return bool Returns True if the given sprite or sprites are contained in the group. Alternatively, you can get the same information using the 'in' operator, e.g. 'sprite in group', 'subgroup in group'. """ return_value = False for sprite in sprites: if isinstance(sprite, Sprite): # Check for Sprite instance's membership in this group if self.has_internal(sprite): return_value = True else: return False else: try: if self.has(*sprite): return_value = True else: return False except (TypeError, AttributeError): if hasattr(sprite, '_spritegroup'): for spr in sprite.sprites(): if self.has_internal(spr): return_value = True else: return False else: if self.has_internal(sprite): return_value = True else: return False return return_value def update(self, *args): """call the update method of every member sprite Group.update(*args): return None Calls the update method of every member sprite. All arguments that were passed to this method are passed to the Sprite update function. """ for s in self.sprites(): s.update(*args) def draw(self, surface): """draw all sprites onto the surface Group.draw(surface): return None Draws all of the member sprites onto the given surface. """ sprites = self.sprites() surface_blit = surface.blit for spr in sprites: self.spritedict[spr] = surface_blit(spr.image, spr.rect) self.lostsprites = [] def clear(self, surface, bgd): """erase the previous position of all sprites Group.clear(surface, bgd): return None Clears the area under every drawn sprite in the group. The bgd argument should be Surface which is the same dimensions as the screen surface. The bgd could also be a function which accepts the given surface and the area to be cleared as arguments. """ if callable(bgd): for r in self.lostsprites: bgd(surface, r) for r in self.spritedict.values(): if r: bgd(surface, r) else: surface_blit = surface.blit for r in self.lostsprites: surface_blit(bgd, r, r) for r in self.spritedict.values(): if r: surface_blit(bgd, r, r) def empty(self): """remove all sprites Group.empty(): return None Removes all the sprites from the group. """ for s in self.sprites(): self.remove_internal(s) s.remove_internal(self) def __nonzero__(self): return truth(self.sprites()) def __len__(self): """return number of sprites in group Group.len(group): return int Returns the number of sprites contained in the group. """ return len(self.sprites()) def __repr__(self): return "<%s(%d sprites)>" % (self.__class__.__name__, len(self)) class Group(AbstractGroup): """container class for many Sprites pygame.sprite.Group(*sprites): return Group A simple container for Sprite objects. This class can be subclassed to create containers with more specific behaviors. The constructor takes any number of Sprite arguments to add to the Group. The group supports the following standard Python operations: in test if a Sprite is contained len the number of Sprites contained bool test if any Sprites are contained iter iterate through all the Sprites The Sprites in the Group are not ordered, so the Sprites are drawn and iterated over in no particular order. """ def __init__(self, *sprites): AbstractGroup.__init__(self) self.add(*sprites) RenderPlain = Group RenderClear = Group class RenderUpdates(Group): """Group class that tracks dirty updates pygame.sprite.RenderUpdates(*sprites): return RenderUpdates This class is derived from pygame.sprite.Group(). It has an enhanced draw method that tracks the changed areas of the screen. """ def draw(self, surface): spritedict = self.spritedict surface_blit = surface.blit dirty = self.lostsprites self.lostsprites = [] dirty_append = dirty.append for s in self.sprites(): r = spritedict[s] newrect = surface_blit(s.image, s.rect) if r: if newrect.colliderect(r): dirty_append(newrect.union(r)) else: dirty_append(newrect) dirty_append(r) else: dirty_append(newrect) spritedict[s] = newrect return dirty class OrderedUpdates(RenderUpdates): """RenderUpdates class that draws Sprites in order of addition pygame.sprite.OrderedUpdates(*spites): return OrderedUpdates This class derives from pygame.sprite.RenderUpdates(). It maintains the order in which the Sprites were added to the Group for rendering. This makes adding and removing Sprites from the Group a little slower than regular Groups. """ def __init__(self, *sprites): self._spritelist = [] RenderUpdates.__init__(self, *sprites) def sprites(self): return list(self._spritelist) def add_internal(self, sprite): RenderUpdates.add_internal(self, sprite) self._spritelist.append(sprite) def remove_internal(self, sprite): RenderUpdates.remove_internal(self, sprite) self._spritelist.remove(sprite) class LayeredUpdates(AbstractGroup): """LayeredUpdates Group handles layers, which are drawn like OrderedUpdates pygame.sprite.LayeredUpdates(*spites, **kwargs): return LayeredUpdates This group is fully compatible with pygame.sprite.Sprite. New in pygame 1.8.0 """ _init_rect = Rect(0, 0, 0, 0) def __init__(self, *sprites, **kwargs): """initialize an instance of LayeredUpdates with the given attributes You can set the default layer through kwargs using 'default_layer' and an integer for the layer. The default layer is 0. If the sprite you add has an attribute _layer, then that layer will be used. If **kwarg contains 'layer', then the passed sprites will be added to that layer (overriding the sprite._layer attribute). If neither the sprite nor **kwarg has a 'layer', then the default layer is used to add the sprites. """ self._spritelayers = {} self._spritelist = [] AbstractGroup.__init__(self) self._default_layer = kwargs.get('default_layer', 0) self.add(*sprites, **kwargs) def add_internal(self, sprite, layer=None): """Do not use this method directly. It is used by the group to add a sprite internally. """ self.spritedict[sprite] = self._init_rect if layer is None: try: layer = sprite._layer except AttributeError: layer = sprite._layer = self._default_layer elif hasattr(sprite, '_layer'): sprite._layer = layer sprites = self._spritelist # speedup sprites_layers = self._spritelayers sprites_layers[sprite] = layer # add the sprite at the right position # bisect algorithmus leng = len(sprites) low = mid = 0 high = leng - 1 while low <= high: mid = low + (high - low) // 2 if sprites_layers[sprites[mid]] <= layer: low = mid + 1 else: high = mid - 1 # linear search to find final position while mid < leng and sprites_layers[sprites[mid]] <= layer: mid += 1 sprites.insert(mid, sprite) def add(self, *sprites, **kwargs): """add a sprite or sequence of sprites to a group LayeredUpdates.add(*sprites, **kwargs): return None If the sprite you add has an attribute _layer, then that layer will be used. If **kwarg contains 'layer', then the passed sprites will be added to that layer (overriding the sprite._layer attribute). If neither the sprite nor **kwarg has a 'layer', then the default layer is used to add the sprites. """ if not sprites: return if 'layer' in kwargs: layer = kwargs['layer'] else: layer = None for sprite in sprites: # It's possible that some sprite is also an iterator. # If this is the case, we should add the sprite itself, # and not the iterator object. if isinstance(sprite, Sprite): if not self.has_internal(sprite): self.add_internal(sprite, layer) sprite.add_internal(self) else: try: # See if sprite is an iterator, like a list or sprite # group. self.add(*sprite, **kwargs) except (TypeError, AttributeError): # Not iterable. This is probably a sprite that is not an # instance of the Sprite class or is not an instance of a # subclass of the Sprite class. Alternately, it could be an # old-style sprite group. if hasattr(sprite, '_spritegroup'): for spr in sprite.sprites(): if not self.has_internal(spr): self.add_internal(spr, layer) spr.add_internal(self) elif not self.has_internal(sprite): self.add_internal(sprite, layer) sprite.add_internal(self) def remove_internal(self, sprite): """Do not use this method directly. The group uses it to add a sprite. """ self._spritelist.remove(sprite) # these dirty rects are suboptimal for one frame r = self.spritedict[sprite] if r is not self._init_rect: self.lostsprites.append(r) # dirty rect if hasattr(sprite, 'rect'): self.lostsprites.append(sprite.rect) # dirty rect del self.spritedict[sprite] del self._spritelayers[sprite] def sprites(self): """return a ordered list of sprites (first back, last top). LayeredUpdates.sprites(): return sprites """ return list(self._spritelist) def draw(self, surface): """draw all sprites in the right order onto the passed surface LayeredUpdates.draw(surface): return Rect_list """ spritedict = self.spritedict surface_blit = surface.blit dirty = self.lostsprites self.lostsprites = [] dirty_append = dirty.append init_rect = self._init_rect for spr in self.sprites(): rec = spritedict[spr] newrect = surface_blit(spr.image, spr.rect) if rec is init_rect: dirty_append(newrect) else: if newrect.colliderect(rec): dirty_append(newrect.union(rec)) else: dirty_append(newrect) dirty_append(rec) spritedict[spr] = newrect return dirty def get_sprites_at(self, pos): """return a list with all sprites at that position LayeredUpdates.get_sprites_at(pos): return colliding_sprites Bottom sprites are listed first; the top ones are listed last. """ _sprites = self._spritelist rect = Rect(pos, (0, 0)) colliding_idx = rect.collidelistall(_sprites) colliding = [_sprites[i] for i in colliding_idx] return colliding def get_sprite(self, idx): """return the sprite at the index idx from the groups sprites LayeredUpdates.get_sprite(idx): return sprite Raises IndexOutOfBounds if the idx is not within range. """ return self._spritelist[idx] def remove_sprites_of_layer(self, layer_nr): """remove all sprites from a layer and return them as a list LayeredUpdates.remove_sprites_of_layer(layer_nr): return sprites """ sprites = self.get_sprites_from_layer(layer_nr) self.remove(*sprites) return sprites #---# layer methods def layers(self): """return a list of unique defined layers defined. LayeredUpdates.layers(): return layers """ return sorted(set(self._spritelayers.values())) def change_layer(self, sprite, new_layer): """change the layer of the sprite LayeredUpdates.change_layer(sprite, new_layer): return None The sprite must have been added to the renderer already. This is not checked. """ sprites = self._spritelist # speedup sprites_layers = self._spritelayers # speedup sprites.remove(sprite) sprites_layers.pop(sprite) # add the sprite at the right position # bisect algorithmus leng = len(sprites) low = mid = 0 high = leng - 1 while low <= high: mid = low + (high - low) // 2 if sprites_layers[sprites[mid]] <= new_layer: low = mid + 1 else: high = mid - 1 # linear search to find final position while mid < leng and sprites_layers[sprites[mid]] <= new_layer: mid += 1 sprites.insert(mid, sprite) if hasattr(sprite, 'layer'): sprite.layer = new_layer # add layer info sprites_layers[sprite] = new_layer def get_layer_of_sprite(self, sprite): """return the layer that sprite is currently in If the sprite is not found, then it will return the default layer. """ return self._spritelayers.get(sprite, self._default_layer) def get_top_layer(self): """return the top layer LayeredUpdates.get_top_layer(): return layer """ return self._spritelayers[self._spritelist[-1]] def get_bottom_layer(self): """return the bottom layer LayeredUpdates.get_bottom_layer(): return layer """ return self._spritelayers[self._spritelist[0]] def move_to_front(self, sprite): """bring the sprite to front layer LayeredUpdates.move_to_front(sprite): return None Brings the sprite to front by changing the sprite layer to the top-most layer. The sprite is added at the end of the list of sprites in that top-most layer. """ self.change_layer(sprite, self.get_top_layer()) def move_to_back(self, sprite): """move the sprite to the bottom layer LayeredUpdates.move_to_back(sprite): return None Moves the sprite to the bottom layer by moving it to a new layer below the current bottom layer. """ self.change_layer(sprite, self.get_bottom_layer() - 1) def get_top_sprite(self): """return the topmost sprite LayeredUpdates.get_top_sprite(): return Sprite """ return self._spritelist[-1] def get_sprites_from_layer(self, layer): """return all sprites from a layer ordered as they where added LayeredUpdates.get_sprites_from_layer(layer): return sprites Returns all sprites from a layer. The sprites are ordered in the sequence that they where added. (The sprites are not removed from the layer. """ sprites = [] sprites_append = sprites.append sprite_layers = self._spritelayers for spr in self._spritelist: if sprite_layers[spr] == layer: sprites_append(spr) elif sprite_layers[spr] > layer:# break after because no other will # follow with same layer break return sprites def switch_layer(self, layer1_nr, layer2_nr): """switch the sprites from layer1_nr to layer2_nr LayeredUpdates.switch_layer(layer1_nr, layer2_nr): return None The layers number must exist. This method does not check for the existence of the given layers. """ sprites1 = self.remove_sprites_of_layer(layer1_nr) for spr in self.get_sprites_from_layer(layer2_nr): self.change_layer(spr, layer1_nr) self.add(layer=layer2_nr, *sprites1) class LayeredDirty(LayeredUpdates): """LayeredDirty Group is for DirtySprites; subclasses LayeredUpdates pygame.sprite.LayeredDirty(*spites, **kwargs): return LayeredDirty This group requires pygame.sprite.DirtySprite or any sprite that has the following attributes: image, rect, dirty, visible, blendmode (see doc of DirtySprite). It uses the dirty flag technique and is therefore faster than pygame.sprite.RenderUpdates if you have many static sprites. It also switches automatically between dirty rect updating and full screen drawing, so you do no have to worry which would be faster. As with the pygame.sprite.Group, you can specify some additional attributes through kwargs: _use_update: True/False (default is False) _default_layer: default layer where the sprites without a layer are added _time_threshold: treshold time for switching between dirty rect mode and fullscreen mode; defaults to updating at 80 frames per second, which is equal to 1000.0 / 80.0 New in pygame 1.8.0 """ def __init__(self, *sprites, **kwargs): """initialize group. pygame.sprite.LayeredDirty(*spites, **kwargs): return LayeredDirty You can specify some additional attributes through kwargs: _use_update: True/False (default is False) _default_layer: default layer where the sprites without a layer are added _time_threshold: treshold time for switching between dirty rect mode and fullscreen mode; defaults to updating at 80 frames per second, which is equal to 1000.0 / 80.0 """ LayeredUpdates.__init__(self, *sprites, **kwargs) self._clip = None self._use_update = False self._time_threshold = 1000.0 / 80.0 # 1000.0 / fps self._bgd = None for key, val in kwargs.items(): if key in ['_use_update', '_time_threshold', '_default_layer']: if hasattr(self, key): setattr(self, key, val) def add_internal(self, sprite, layer=None): """Do not use this method directly. It is used by the group to add a sprite internally. """ # check if all needed attributes are set if not hasattr(sprite, 'dirty'): raise AttributeError() if not hasattr(sprite, 'visible'): raise AttributeError() if not hasattr(sprite, 'blendmode'): raise AttributeError() if not isinstance(sprite, DirtySprite): raise TypeError() if sprite.dirty == 0: # set it dirty if it is not sprite.dirty = 1 LayeredUpdates.add_internal(self, sprite, layer) def draw(self, surface, bgd=None): """draw all sprites in the right order onto the given surface LayeredDirty.draw(surface, bgd=None): return Rect_list You can pass the background too. If a self.bgd is already set to some value that is not None, then the bgd argument has no effect. """ # speedups _orig_clip = surface.get_clip() _clip = self._clip if _clip is None: _clip = _orig_clip _surf = surface _sprites = self._spritelist _old_rect = self.spritedict _update = self.lostsprites _update_append = _update.append _ret = None _surf_blit = _surf.blit _rect = Rect if bgd is not None: self._bgd = bgd _bgd = self._bgd init_rect = self._init_rect _surf.set_clip(_clip) # ------- # 0. decide whether to render with update or flip start_time = get_ticks() if self._use_update: # dirty rects mode # 1. find dirty area on screen and put the rects into _update # still not happy with that part for spr in _sprites: if 0 < spr.dirty: # chose the right rect if spr.source_rect: _union_rect = _rect(spr.rect.topleft, spr.source_rect.size) else: _union_rect = _rect(spr.rect) _union_rect_collidelist = _union_rect.collidelist _union_rect_union_ip = _union_rect.union_ip i = _union_rect_collidelist(_update) while -1 < i: _union_rect_union_ip(_update[i]) del _update[i] i = _union_rect_collidelist(_update) _update_append(_union_rect.clip(_clip)) if _old_rect[spr] is not init_rect: _union_rect = _rect(_old_rect[spr]) _union_rect_collidelist = _union_rect.collidelist _union_rect_union_ip = _union_rect.union_ip i = _union_rect_collidelist(_update) while -1 < i: _union_rect_union_ip(_update[i]) del _update[i] i = _union_rect_collidelist(_update) _update_append(_union_rect.clip(_clip)) # can it be done better? because that is an O(n**2) algorithm in # worst case # clear using background if _bgd is not None: for rec in _update: _surf_blit(_bgd, rec, rec) # 2. draw for spr in _sprites: if 1 > spr.dirty: if spr._visible: # sprite not dirty; blit only the intersecting part if spr.source_rect is not None: # For possible future speed up, source_rect's data # can be prefetched outside of this loop. _spr_rect = _rect(spr.rect.topleft, spr.source_rect.size) rect_offset_x = spr.source_rect[0] - _spr_rect[0] rect_offset_y = spr.source_rect[1] - _spr_rect[1] else: _spr_rect = spr.rect rect_offset_x = -_spr_rect[0] rect_offset_y = -_spr_rect[1] _spr_rect_clip = _spr_rect.clip for idx in _spr_rect.collidelistall(_update): # clip clip = _spr_rect_clip(_update[idx]) _surf_blit(spr.image, clip, (clip[0] + rect_offset_x, clip[1] + rect_offset_y, clip[2], clip[3]), spr.blendmode) else: # dirty sprite if spr._visible: _old_rect[spr] = _surf_blit(spr.image, spr.rect, spr.source_rect, spr.blendmode) if spr.dirty == 1: spr.dirty = 0 _ret = list(_update) else: # flip, full screen mode if _bgd is not None: _surf_blit(_bgd, (0, 0)) for spr in _sprites: if spr._visible: _old_rect[spr] = _surf_blit(spr.image, spr.rect, spr.source_rect, spr.blendmode) _ret = [_rect(_clip)] # return only the part of the screen changed # timing for switching modes # How may a good threshold be found? It depends on the hardware. end_time = get_ticks() if end_time-start_time > self._time_threshold: self._use_update = False else: self._use_update = True ## # debug ## print " check: using dirty rects:", self._use_update # emtpy dirty rects list _update[:] = [] # ------- # restore original clip _surf.set_clip(_orig_clip) return _ret def clear(self, surface, bgd): """use to set background Group.clear(surface, bgd): return None """ self._bgd = bgd def repaint_rect(self, screen_rect): """repaint the given area LayeredDirty.repaint_rect(screen_rect): return None screen_rect is in screen coordinates. """ if self._clip: self.lostsprites.append(screen_rect.clip(self._clip)) else: self.lostsprites.append(Rect(screen_rect)) def set_clip(self, screen_rect=None): """clip the area where to draw; pass None (default) to reset the clip LayeredDirty.set_clip(screen_rect=None): return None """ if screen_rect is None: self._clip = pygame.display.get_surface().get_rect() else: self._clip = screen_rect self._use_update = False def get_clip(self): """get the area where drawing will occur LayeredDirty.get_clip(): return Rect """ return self._clip def change_layer(self, sprite, new_layer): """change the layer of the sprite LayeredUpdates.change_layer(sprite, new_layer): return None The sprite must have been added to the renderer already. This is not checked. """ LayeredUpdates.change_layer(self, sprite, new_layer) if sprite.dirty == 0: sprite.dirty = 1 def set_timing_treshold(self, time_ms): """set the treshold in milliseconds set_timing_treshold(time_ms): return None Defaults to 1000.0 / 80.0. This means that the screen will be painted using the flip method rather than the update method if the update method is taking so long to update the screen that the frame rate falls below 80 frames per second. """ self._time_threshold = time_ms class GroupSingle(AbstractGroup): """A group container that holds a single most recent item. This class works just like a regular group, but it only keeps a single sprite in the group. Whatever sprite has been added to the group last will be the only sprite in the group. You can access its one sprite as the .sprite attribute. Assigning to this attribute will properly remove the old sprite and then add the new one. """ def __init__(self, sprite=None): AbstractGroup.__init__(self) self.__sprite = None if sprite is not None: self.add(sprite) def copy(self): return GroupSingle(self.__sprite) def sprites(self): if self.__sprite is not None: return [self.__sprite] else: return [] def add_internal(self, sprite): if self.__sprite is not None: self.__sprite.remove_internal(self) self.remove_internal(self.__sprite) self.__sprite = sprite def __nonzero__(self): return self.__sprite is not None def _get_sprite(self): return self.__sprite def _set_sprite(self, sprite): self.add_internal(sprite) sprite.add_internal(self) return sprite sprite = property(_get_sprite, _set_sprite, None, "The sprite contained in this group") def remove_internal(self, sprite): if sprite is self.__sprite: self.__sprite = None if sprite in self.spritedict: AbstractGroup.remove_internal(self, sprite) def has_internal(self, sprite): return self.__sprite is sprite # Optimizations... def __contains__(self, sprite): return self.__sprite is sprite # Some different collision detection functions that could be used. def collide_rect(left, right): """collision detection between two sprites, using rects. pygame.sprite.collide_rect(left, right): return bool Tests for collision between two sprites. Uses the pygame.Rect colliderect function to calculate the collision. It is intended to be passed as a collided callback function to the *collide functions. Sprites must have "rect" attributes. New in pygame 1.8.0 """ return left.rect.colliderect(right.rect) class collide_rect_ratio: """A callable class that checks for collisions using scaled rects The class checks for collisions between two sprites using a scaled version of the sprites' rects. Is created with a ratio; the instance is then intended to be passed as a collided callback function to the *collide functions. New in pygame 1.8.1 """ def __init__(self, ratio): """create a new collide_rect_ratio callable Ratio is expected to be a floating point value used to scale the underlying sprite rect before checking for collisions. """ self.ratio = ratio def __call__(self, left, right): """detect collision between two sprites using scaled rects pygame.sprite.collide_rect_ratio(ratio)(left, right): return bool Tests for collision between two sprites. Uses the pygame.Rect colliderect function to calculate the collision after scaling the rects by the stored ratio. Sprites must have "rect" attributes. """ ratio = self.ratio leftrect = left.rect width = leftrect.width height = leftrect.height leftrect = leftrect.inflate(width * ratio - width, height * ratio - height) rightrect = right.rect width = rightrect.width height = rightrect.height rightrect = rightrect.inflate(width * ratio - width, height * ratio - height) return leftrect.colliderect(rightrect) def collide_circle(left, right): """detect collision between two sprites using circles pygame.sprite.collide_circle(left, right): return bool Tests for collision between two sprites by testing whether two circles centered on the sprites overlap. If the sprites have a "radius" attribute, then that radius is used to create the circle; otherwise, a circle is created that is big enough to completely enclose the sprite's rect as given by the "rect" attribute. This function is intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" and an optional "radius" attribute. New in pygame 1.8.0 """ xdistance = left.rect.centerx - right.rect.centerx ydistance = left.rect.centery - right.rect.centery distancesquared = xdistance ** 2 + ydistance ** 2 if hasattr(left, 'radius'): leftradius = left.radius else: leftrect = left.rect # approximating the radius of a square by using half of the diagonal, # might give false positives (especially if its a long small rect) leftradius = 0.5 * ((leftrect.width ** 2 + leftrect.height ** 2) ** 0.5) # store the radius on the sprite for next time setattr(left, 'radius', leftradius) if hasattr(right, 'radius'): rightradius = right.radius else: rightrect = right.rect # approximating the radius of a square by using half of the diagonal # might give false positives (especially if its a long small rect) rightradius = 0.5 * ((rightrect.width ** 2 + rightrect.height ** 2) ** 0.5) # store the radius on the sprite for next time setattr(right, 'radius', rightradius) return distancesquared <= (leftradius + rightradius) ** 2 class collide_circle_ratio(object): """detect collision between two sprites using scaled circles This callable class checks for collisions between two sprites using a scaled version of a sprite's radius. It is created with a ratio as the argument to the constructor. The instance is then intended to be passed as a collided callback function to the *collide functions. New in pygame 1.8.1 """ def __init__(self, ratio): """creates a new collide_circle_ratio callable instance The given ratio is expected to be a floating point value used to scale the underlying sprite radius before checking for collisions. When the ratio is ratio=1.0, then it behaves exactly like the collide_circle method. """ self.ratio = ratio def __call__(self, left, right): """detect collision between two sprites using scaled circles pygame.sprite.collide_circle_radio(ratio)(left, right): return bool Tests for collision between two sprites by testing whether two circles centered on the sprites overlap after scaling the circle's radius by the stored ratio. If the sprites have a "radius" attribute, that is used to create the circle; otherwise, a circle is created that is big enough to completely enclose the sprite's rect as given by the "rect" attribute. Intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" and an optional "radius" attribute. """ ratio = self.ratio xdistance = left.rect.centerx - right.rect.centerx ydistance = left.rect.centery - right.rect.centery distancesquared = xdistance ** 2 + ydistance ** 2 if hasattr(left, "radius"): leftradius = left.radius * ratio else: leftrect = left.rect leftradius = ratio * 0.5 * ((leftrect.width ** 2 + leftrect.height ** 2) ** 0.5) # store the radius on the sprite for next time setattr(left, 'radius', leftradius) if hasattr(right, "radius"): rightradius = right.radius * ratio else: rightrect = right.rect rightradius = ratio * 0.5 * ((rightrect.width ** 2 + rightrect.height ** 2) ** 0.5) # store the radius on the sprite for next time setattr(right, 'radius', rightradius) return distancesquared <= (leftradius + rightradius) ** 2 def collide_mask(left, right): """collision detection between two sprites, using masks. pygame.sprite.collide_mask(SpriteLeft, SpriteRight): bool Tests for collision between two sprites by testing if their bitmasks overlap. If the sprites have a "mask" attribute, that is used as the mask; otherwise, a mask is created from the sprite image. Intended to be passed as a collided callback function to the *collide functions. Sprites must have a "rect" and an optional "mask" attribute. New in pygame 1.8.0 """ xoffset = right.rect[0] - left.rect[0] yoffset = right.rect[1] - left.rect[1] try: leftmask = left.mask except AttributeError: leftmask = from_surface(left.image) try: rightmask = right.mask except AttributeError: rightmask = from_surface(right.image) return leftmask.overlap(rightmask, (xoffset, yoffset)) def spritecollide(sprite, group, dokill, collided=None): """find Sprites in a Group that intersect another Sprite pygame.sprite.spritecollide(sprite, group, dokill, collided=None): return Sprite_list Return a list containing all Sprites in a Group that intersect with another Sprite. Intersection is determined by comparing the Sprite.rect attribute of each Sprite. The dokill argument is a bool. If set to True, all Sprites that collide will be removed from the Group. The collided argument is a callback function used to calculate if two sprites are colliding. it should take two sprites as values, and return a bool value indicating if they are colliding. If collided is not passed, all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision. """ if dokill: crashed = [] append = crashed.append if collided: for s in group.sprites(): if collided(sprite, s): s.kill() append(s) else: spritecollide = sprite.rect.colliderect for s in group.sprites(): if spritecollide(s.rect): s.kill() append(s) return crashed elif collided: return [s for s in group if collided(sprite, s)] else: spritecollide = sprite.rect.colliderect return [s for s in group if spritecollide(s.rect)] def groupcollide(groupa, groupb, dokilla, dokillb, collided=None): """detect collision between a group and another group pygame.sprite.groupcollide(groupa, groupb, dokilla, dokillb): return dict Given two groups, this will find the intersections between all sprites in each group. It returns a dictionary of all sprites in the first group that collide. The value for each item in the dictionary is a list of the sprites in the second group it collides with. The two dokill arguments control if the sprites from either group will be automatically removed from all groups. Collided is a callback function used to calculate if two sprites are colliding. it should take two sprites as values, and return a bool value indicating if they are colliding. If collided is not passed, all sprites must have a "rect" value, which is a rectangle of the sprite area that will be used to calculate the collision. """ crashed = {} SC = spritecollide if dokilla: for s in groupa.sprites(): c = SC(s, groupb, dokillb, collided) if c: crashed[s] = c s.kill() else: for s in groupa: c = SC(s, groupb, dokillb, collided) if c: crashed[s] = c return crashed def spritecollideany(sprite, group, collided=None): """finds any sprites in a group that collide with the given sprite pygame.sprite.spritecollideany(sprite, group): return sprite Given a sprite and a group of sprites, this will return return any single sprite that collides with with the given sprite. If there are no collisions, then this returns None. If you don't need all the features of the spritecollide function, this function will be a bit quicker. Collided is a callback function used to calculate if two sprites are colliding. It should take two sprites as values and return a bool value indicating if they are colliding. If collided is not passed, then all sprites must have a "rect" value, which is a rectangle of the sprite area, which will be used to calculate the collision. """ if collided: for s in group: if collided(sprite, s): return s else: # Special case old behaviour for speed. spritecollide = sprite.rect.colliderect for s in group: if spritecollide(s.rect): return s return None


Founded in 2015, we are comprised of different Minecraft railway operators, working together to construct and operate rail transit systems in the Country of Batcave.
Stagecoach Station
Railway City Station
Shimakaze City Station
Stagecoach Station
Railway City Station
Shimakaze City Station


PayPal to acquire price-comparison app Honey for US$4B
by Julie VerhagePayPal Holdings Inc. will acquire Honey Science Corp. for about US$4 billion, adding a popular browser extension used to compare prices at online shopping sites.
Honey was profitable in 2018 and has 17 million people using the service each month, PayPal said in a statement. The 7-year-old startup will keep its base in Los Angeles, and the founders will continue to run the business. PayPal shares fell as much as 2.3 per cent in extended trading after the news.
Honey is the payment company’s first major acquisition this year, after a string of deals last year that included Hyperwallet, IZettle and Simility. PayPal has more than US$10 billion of cash, and executives recently had been signaling the company’s openness to acquisitions.
“You can expect us to be acquisitive going forward,” Dan Schulman, the chief executive officer, said on a conference call with analysts this summer. PayPal looks at hundreds of potential deals every quarter, he said, describing acquisitions as “a part of who we are on an ongoing basis.”


Image Region Selection
Select and classify image regions
Click here to image upload
View Classifiers
Classifiers


Login
Continue shopping
Please Login
Invalid username and password.
You have been logged out.
Username
Password
Log in


Zachary Holly
I am experienced in object oriented design supporting data analysis and functional programming. Currently, finishing my bachelors of Computer Science at Seattle University
I am experienced in object oriented design supporting data analysis and functional programming. Currently, finishing my bachelors of Computer Science at Seattle University
Developed robot using Java to have human operated and autonomous modes. Competitive robot that challenged teams all over the world and achieved ﬁnals at World Championship. Designed, built and fabricated by collaborating in a small team environment. FRC program included time limitation constraints, including 6 weeks to build a robot and 6 weeks of competition.
Utilizing discord.js library and commando framework, built a bot to help organize personal discord servers and promote halo lore. Dynamic command structure allows for rapid development and deployment of new commands. Utilizing various libraries and APIs to play music and search the web.
Teach and supervise the programming of a small team of students that are participating in a competitive robotics challenge. Utilizing knowledge of Git, Object oriented design and Java, all in an environment to get more girls engaged with STEM.
During this unprecedented time we can all struggle with connecting with others. Leading with 3 other bussiness majors with no programming experience my team set out to launch a webapp that allows you to connect with others. Utilizing Google's firebase I was able to launch a real time chat application. Along with building the front end of the whole website. Backend is done with Node.Js and front end is HTML/CSS.
 During the school year, my friends and I travel throughout the city trying new restuarants and falling into tourist traps.
When the Seattle weather turns sour, I follow a number of sci-fi and action genre movies and television shows, I am an aspiring dessert chef, and I spend majority of my time from August to March, volunteering with FIRSTWA and mentoring a High School robotics teams.


Toggle navigation
Menu
FAU
Home
Application
Login
Processing an AJAX Form
First Name:
Email:
Phone number:
Submit
Cancel


"Building Technology for an Early Stage SaaS Company" is a write up of the lessons that I learnt while building QGraph and before that while working at Vizury.
Part didactic and part memoir, I hope you enjoy reading it as much as I enjoyed writing it! It might even be useful to you!
Buy it! Read it online.


 Multi-user, Scalable 3D Object Detection in AR Cloud. In CVPR Workshop on Computer Vision for Augmented and Virtual Reality, Seattle, WA, 2020. [bibtex] |
A new experimental feature in the @magicleap OS 0.98.10 update; Found Objects. Developers can access this information which makes me want to make a bridge-building game across my living room. #magicleapdevs. pic.twitter.com/Zc9aSVz3dE
— Josh Naylor (@JoshNaylor) March 30, 2020
Acknowledgements |


Muhammed Furkan AYDIN
I am working with Nodejs and MongoDb. I am working on Startup projects. In addition, i am studying business at Istanbul University.
Send a MessageI am working with Nodejs and MongoDb. I am working on Startup projects. In addition, i am studying business at Istanbul University.
Send a Message


Oh snap!
Something went wrong... Please make sure you're uploading correct file and try again.
Go back


Thank you for contacting me! I appreciate your interest in communication. Messages may be received in response.
I am an emerging web programmer and fiction writer. The bulk of my work comes to life through creating on a team. Whether I'm with my development classmates or fellow young creatives at Open Center, I take time to ask questions, listen, and continually learn.


Close ×
Home
Register an Account
View All Accounts
View Printer Stock
View Toner Stock
☰
Log Out
EN/FR
New Username:
First Name:
Last Name:
New Email:
New Password:
Re-Type Password:
Submit Changes


Contribute Code¶
We sincerely appreciate your contributions. You can use fork and pull request workflow to merge your code.
Code Requirements¶
- Your code comments must be fully documented by Doxygen style.
- Make sure the compiler option
WITH_STYLE_CHECK
is on and the compiler passes the code style check. - All code must have unit test.
- Pass all unit tests.
The following tutorial guides you into submitting your contibution.
Creating a Fork¶
Just head over to the GitHub page and click the “Fork” button. It’s just that simple.
Create a local branch¶
Paddle is currently using Git-flow branching model.
All feature and bug fix development work should be done on a new branch, generally create new branch from develop
branch .
➜ git checkout -b my-cool-stuff
Before the checkout, you need to keep the current branch directory clean, otherwise the untracked file will be brought to the new branch, which can be inspected by git status
.
Using pre-commit
hook¶
Paddle developers use pre-commit tool to manage git
pre-commit hooks. It can help us format source codes (cpp, python), check some
basic thing before commit (only one EOL for each file, do not add a huge file
in git). pre-commit
tests is a part of unit tests in Travis-CI now, every
PR doesn’t fit hook can not be merged into Paddle.
To use pre-commit, you should install it by
pip install pre-commit
, and currently, Paddle uses clang-format
to format
c/cpp sources. Please make sure clang-format 3.8+ installed.
Install and run it as follow:
➜ pip install pre-commit
➜ pre-commit install
When you commit your code, the pre-commit hook will check the local code if there is anything not suitable to commit, and so on.
Start to develop¶
In this tutorial, I delete a line in README.md and created a new file.
We can use git status
to inspect the changes of current directory, git diff
to see difference.
➜ git status
On branch test
Changes not staged for commit:
(use "git add <file>..." to update what will be committed)
(use "git checkout -- <file>..." to discard changes in working directory)
modified: README.md
Untracked files:
(use "git add <file>..." to include in what will be committed)
test
no changes added to commit (use "git add" and/or "git commit -a")
Build and Test¶
We package PaddlePaddle’s compile environment into a Docker image, called the develop image named paddle:dev
, it contains all compiling tools that PaddlePaddle needs.
If you want to build the develop image, just run:
➜ docker build -t paddle:dev .
Then we can use the develop image to build PaddlePaddle source. For example:
➜ docker run -v $(pwd):/paddle -e "WITH_GPU=OFF" -e "WITH_AVX=ON" -e "WITH_TEST=ON" paddle:dev
The above command will compile PaddlePaddle and create a Dockerfile for building production image. All the generated files are in the build directory. “WITH_GPU” controls if the generated production image supports GPU. “WITH_AVX” controls if the generated production image supports AVX. “WITH_TEST” controls if the unit test will be generated.
Then we can generate the production image by copying the compiled PaddlePaddle program into the image by
➜ docker build -t paddle:prod -f build/Dockerfile .
Run unit test finally:
➜ docker run -it -v $(pwd):/paddle paddle:dev bash -c "cd /paddle/build && ctest"
For more details, you can read this doc.
Commit¶
Next we cancel the changes to the README.md file and then commit our changes by following command lines:
➜ git checkout -- README.md
➜ git status
On branch test
Untracked files:
(use "git add <file>..." to include in what will be committed)
test
nothing added to commit but untracked files present (use "git add" to track)
➜ git add test
We should write a description of each commit by git commit
to allow others to know
the changes in these files.
➜ git commit
CRLF end-lines remover...............................(no files to check)Skipped
yapf.................................................(no files to check)Skipped
Check for added large files..............................................Passed
Check for merge conflicts................................................Passed
Check for broken symlinks................................................Passed
Detect Private Key...................................(no files to check)Skipped
Fix End of Files.....................................(no files to check)Skipped
clang-formater.......................................(no files to check)Skipped
[my-cool-stuff c703c041] add test file
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 233
Keeping Fork Up to Date¶
Before pull your request, you should sync your code from the latest PaddlePaddle. To do this, you’ll need to add a remote at first:
➜ git remote add upstream https://github.com/PaddlePaddle/Paddle
➜ git remote
origin
upstream
Update your fork with the latest upstream changes:
➜ git fetch upstream
➜ git pull upstream develop
Now, your local master branch is up-to-date with everything modified upstream.
Push to GitHub¶
# push to your repository in Github
➜ git push origin my-cool-stuff
Create an issue and a Pull Request¶
Create an Issue to describe the problem and record its number.
Go to the page for your fork on GitHub, select your development branch,
and click the New pull request
.
Then select the target branch:
We can add resolve #Issue number
in PR description to close the issue automatically after the PR is merge. More details in https://help.github.com/articles/closing-issues-via-commit-messages/.
Then wait for review, if there need to modify, refer to the above steps to update the corresponding origin branch.
Delete origin branch¶
After the PR is merge into the main repository, we can delete the remote branch on the PR page.
Or just run:
➜ git push origin :my-cool-stuff
Delete local branch¶
Finally, we delete local branch:
➜ git checkout develop
# delete my-cool-stuff branch
➜ git branch -D my-cool-stuff


Welcome Thomas
Flights Scheduled By Day
Customer Satisfaction
Forecasted Revenue
Revenue Per Plane
Insightful Information
Current Growth
Forecasted Profit
Gross Sales MtoM
Airport Preformance
Forecasted Revenue Vs Gross Revenue
Staff Sickness
Under-preforming Teams


Provides a web based(remote) File browsing/uplaoding etc.. impl. This provides a web based navigator/file explorer of the server Which features are available and what folder are allowed is completely configurable.


{% extends 'base/rows.html' %} {% block content %} {% load gojuon %}
Kana (仮名) are Japanese syllabic scripts.
Each character of the kana corresponds to a sound following either a consonant-vowel pattern or a single vowel pattern. There is one exception to this: the sound most similar to a Western N sound.
Traditional Japanese text is presented in gojuon order: top-down, right to left. This will be the method used for the following charts.
There are also several blank tiles in the charts. For these blanks, there are no provided written or spoken sounds - either they do not exist, or they have been excluded due to modern usage. There are also a few sounds that are vocalized slightly differently than the normal pattern would suggest; take note of these special cases.
Dakuten (濁点) characters are variants of standard kana characters used to indicated that the consonant of the character should be voiced in its alternative form.
Handakuten (半濁点) are very similar to Dakuten, with the exception that they are applied only to the H consonant stemmed characters to form a P sound.
{% render_as_chart dakuten kana %}Youon (拗音), or yōon, characters are special patterns in which an I tailed character is combined with a Y consonant stemmed character.
{% if kana == 'hiragana' %}In hiragana, as opposed to katakana, the Y-characters are written with a slightly smaller script. While this change is subtle, in cases where only context would lend to the distinction between homonyms, the written form indicates the intended word.
{% endif %} {% render_as_chart youon kana %}


Events Tests
Running Tests
To run a test case, click on start, click each numbered instruction
and click finished. If the test passed, you will see the message
Test Passed.
Mouse Events
click event
- click here
remove handler
- click here
- click above link again
mouse buttons
- click here with the left button
- now click on the above link with the middle button
- now click on the above link with the right button
mouse wheel on document
- Scroll the mouse wheel up one click.
- Scroll the mouse wheel down one click.
mouse wheel on element
- Scroll the mouse wheel up one click in the following box:
- Scroll the mouse wheel down one click in the following box:
mouseover and mouseout
- Move the mouse from the bottom box to the top box, and then back to the bottom box:
Keyboard Events
simple keypresses
- Press a selection of keys on your keyboard and check
that the correct characters/keys are displayed:
keypress
- charCode:
- char:
- keyCode:
- key:
keydown
- charCode:
- char:
- keyCode:
- key:
keyup
- charCode:
- char:
- keyCode:
- key:
key manager


An event callback script can query the event parameters using the
java::event command. Usually, there is only one event parameter
-- the event object, which stores various information about the
event as its properties. For example, when the mouseClicked
event occurs inside an AWT Button, the x and y properties
of the event object contains the location of the mouse cursor. The
following script prints out the location of the mouse cursor:
Example:
package require java
set f [java::new java.awt.Frame]
$f setSize 100 100
$f show
java::bind $f mouseClicked {
puts "mouse click at ([java::event x],[java::event y])"
}


Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.
For the best experience please use the latest Chrome, Safari 0r Firefox browser.


Peter Pallen, Web Developer
Summary of qualifications
Experience as a web developer
IT Manager
ExperiencedSAP MM analyst
Education
Employment