From: Mr.Al-Zarqawi Yusuf Dear Friend, Your first reaction to this mail will be total rejection, scare and maybe disbelief, owning largely to the atrocities people commit these days.But this mail comes from a devastated, sorrowful and emotional laden soul that needs compassion from a kind and good spirited person to wipe away my tears and appropriate my dream and humanitarian gesture. As you read this, I don't want you to feel sorry for me, because, I believe everyone dies someday.,I am Al-Zarqawi Yusuf, A Oil merchant in Dubai, United Arab Emirate ( UAE). I have been diagnosed with Cancer, which was discovered very late, due to my laxity in caring for my health. It has defiled all forms of medicine; Right now I have only about a limited to live, according to my Medical Doctor. I have not particularly lived my life so well, as I never really cared for myself but the Oil business.Though I am very rich, I was never generous, I only focused on my business as that was the only thing I cared for. But now I regret all this as I now know that there is more to life than just wanting to have or make all the money in the world. I believe when Allah gives me a second chance and heal me I would live my life a different way from how I have lived it.I have sowed a seed for my healing I have willed and given most of my properties and assets to my immediate and extended family members and as well as a few close friends. i want Allah to be merciful to me and accept my soul and so, I have decided to give arms to charity organizations and give succor and comfort to the less privileged of the Tsunami and Hurricane Katrina Victims, as I want this to be one of the last good deeds I do on earth so far, by distributed some of this money to some charity organizations in India,Hurricane Katrina victims in USA and other part of the world. Now that my health has deteriorated so badly, I cannot do this my self anymore.I once asked members of my family to close one of my accounts in Saudi Bank and distribute the money which I have there to charity organization and to the less privileged in Bulgaria and Sudan. They cashed the money but kept it only to themselves. Hence I do not trust them anymore,as they seem not to be contended with what I have left for them already.The last of my money, which no one knows of, is the huge cash deposit of Thirty Five Million United States Dollars ( US$35Million) that I have in the Vault of The Security Company as family valuable since the year 2003 for safekeeping.I want you to collect this deposit on my behalf and disburse it to the Tsunami Earthquake victims in Asia for the less privileged. Please send me a mail to indicate your wiliness to assist in this disbursement. I will set aside 10% for you for your time and efforts by notifying the security company as soon as i hear from you.I need your urgent reply with your full name and address, your Phone and Fax numbers and your Occupation so that I will not have to go on sourcing for a credible person to handle this project for himself and the rest of the less privileged.I will also plead to you to always pray for me because only Allah heals. Wasaalam Regards, Al-Zarqawi Yusuf.


Things to improve on REST APIs
About Me:
- Long(ish) time software dev consultant
- RESTafarian
- Fitness junky
@joaorcabrita
Why REST?
Why this presentation?
Properties of RESTful systems:
- Performance
- Scalability
- Simplicity
- Modifiability/Evolvability
- Visibility
- Portability
- Reliability
Constraints
- Client/Server architecture
- Statelessness
- Cacheability
- Layered System
- Code on demand (Optional)
- Uniform Interface
Provide Links
{
"items": [
{
"id": "id1",
},
{
"id": "id2",
}
]
}
{
"items": [
{
"href": "http://example.com/item/id1",
},
{
"href": "http://example.com/item/id2",
}
]
}
Use Hypermedia-enabled media types
{
"_links": {
"item": [
{
"href": "http://example.com/item/id1",
"name": "id1",
"title": "The item"
}
]
}
}
Provide choices
{
"stock": 5
}
{
"purchaseOptions": [
{
"productId": "theId",
"quantity": 1
},
{
"productId": "theId",
"quantity": 2
},
...
{
"productId": "theId",
"quantity": 5
}
]
}
Use sub-resources
GET /expense/10
{
"description": "Filling up the gas tank",
"value": {
"amount": 100,
"currency": "EUR"
},
"status": "PENDING_APPROVAL"
}
PUT /expense/10/approval
{
"approved": true
}
Use pseudo-resources
GET /my-profile
...
307 Temporary Redirect
Location: /profile/287
Don't be (too) picky with inputs
Redirect instead
GET /item
or
GET /item?pageSize=9000
...
303 See Other
Location: /item?pageSize=100
{
"pageSize": 100
}
Don't trust client input
POST /cart{
"productId": "id1",
"price": {
"amount": 100,
"currency": "EUR"
}
}
Use Caching


|
cds
2.3.1
|
EllenBinTree related declarations. More...
Data Structures | |
| struct | base_hook |
| Base hook. More... | |
| struct | base_node |
| struct | empty_stat |
| EllenBinTree empty statistics. More... | |
| struct | internal_node |
| Ellen's binary tree internal node. More... | |
| struct | key_extractor |
| Key extracting functor option setter. More... | |
| struct | make_traits |
| Metafunction converting option list to EllenBinTree traits. More... | |
| struct | member_hook |
| Member hook. More... | |
| struct | node |
| Ellen's binary tree leaf node. More... | |
| struct | node_types |
| Types of EllenBinTree node. More... | |
| struct | stat |
| EllenBinTree internal statistics. More... | |
| struct | traits |
| EllenBinTree traits. More... | |
| struct | traits_hook |
| Traits hook. More... | |
| struct | update_desc |
| Update descriptor. More... | |
| struct | update_desc_allocator |
| Update descriptor allocator option setter. More... | |
EllenBinTree related declarations.


Europa : BDA/AVStream Hardware Driver Sample
Introduction
The Philips Europa PCI board is a TV Tuner/Video Capture reference design board based on the Philips SAA7134 PCI video/stereo decoder chip. It does PAL (Analog TV), DVB-T (Digital TV) and captures NTSC and PAL through its SVideo/Composite Inputs. Based on this functionality the driver exposes the standard filters for Analog TV, Digital TV and Video Capture. This sample demonstrates how to write BDA/AVStream drivers for TV Tuner cards and AVStream drivers for video capture cards in general.
Building and Installing the Sample Driver
This sample builds and functions in i386 and amd64 platforms. It installs and works on all Windows systems starting from Windows 98 Gold provided DirectX 9.0 (or some equivalent) is installed on the system.
Run "build -cZ" from the europa directory. This should build the driver binary 34bdacap.sys and the coinstaller 34coinstaller.dll. The INF file used to install the driver is 34avstrm.inf (34avstrm_w2k.inf for Windows 2000 and Windows 9x). The source files are arranged in five directories : src (which contains the actual AVStream driver sources), inc (the headers for the AVStream driver), coinstaller (which contains the coinstaller sources for Europa installation), hal (which contains the headers and a lib file for the card's HAL) and lib (which contains the headers and a lib file specific to the board - these call into the HAL). 34hal.lib and 34kmproxy.lib areboth required to build the sample but distributed in binary form only. The coinstaller makes sure that the driver can be installed only if DirectX version 9.0 or higher is installed on the system. If DirectX 9.0 (or some equivalent) is not installed on the system, the coinstaller fails the install with an error message indicating "Bad Environment".
To install the driver, point the hardware wizard to a directory containing the files 34avstrm.inf, 34bdacap.sys and 34coinstaller.dll. Use 34avstrm_w2k.inf instead 34avstrm.inf on Windows 2000 and Windows 9x systems. On XP and higher systems you shouldn't need to reboot in order to install or reinstall the driver.
The driver needs to be built separately for the 1316 and 1344 tuner boards. The tuner type defaults to 1316, and this can be changed by changing a compiler flag in the sources file. Change -DTD1316 in the sources file to -DTD1344.
Graph Building
To build a digital TV graph insert the DVBT Network Provider, the Europa BDA Tuner (from the BDA Source Filters category) and the Europa BDA Digital Capture (BDA Receiver Components). Make sure there is a tuning space called "DVBT". If not create one using the DVBT network provider proppage and then right click, render the pin on the network provider. This should build the entire graph pulling up required filters like the Transport Information Filter, the MPEG2 Demultiplexer and the audio/video decoders. In order to use the network provider property pages you will need to register proppage.dll. Also when first creating a tuning space do a submit tune request as well. In the absence of a tuning space the graph will not build.
To build an Analog TV graph insert the "Europa Analog Tuner" (from the WDM Streaming TV Tuner Devices category), the "Europa Analog TV Audio" filter (WDM Streaming TV Audio), the "Europa BDA Crossbar Filter" (WDM Streaming Crossbar Devices) and the "Europa BDA Analog Capture" filter (WDM Streaming Capture Devices). After this build and run an Analog TV graph in the usual manner.
To build a Video Capture graph follow the instructions for Analog TV - but you can dispense with the the tuner and tv audio filters. Set the crossbar properties appropriately for S-Video and Composite Inputs and the corresponding audio line-in. You will need to manually insert the CC/WST and Line 21 Decoder filters for Closed Captioning / Teletext.
Notes
1. The dgtl* files deal with Digital TV and the anlg* deal with Analog TV and Video Capture related filters, pins and formats. The vamp* files refer to the VampDevice which is a layer of abstraction between the driver and the hardware.
2. Europa has a line-in for audio capture as well. Correspondingly, the Analog Capture Filter has an Audio Out pin that produces Wave Format (PCM) Audio.


The river here can be run year-round but releases from Buford Dam can create unsafe conditions. Boaters and anglers should use extreme caution when traveling this section.
Atop the grassy knoll above the dam's powerhouse, you may see several goats. Since the 1980s, The U.S. Army Corps of Engineers has maintained a small herd to keep vegetation atop the dam trimmed.


Antiword software is free software developed by Adri van Os and it can be found in his WEB site http:\\www.winfield.demon.nl\. It is available in the next operative systems: FreeBSD, BeOS, OS/2, Mac OS X, Amiga, VMS, NetWare, Plan9, EPOC, Zaurus PDA, MorphOS, Tru64/OSF, Minix, Solaris y DOS.
AntiWord convert the binary files from Word 2, 6, 7, 97, 2000, 2002 y 2003 to plain text and a PostScript.
Considering that most final users percentage work with Microsoft Office, the analysis of the contain of this type of documents make it prioritary. That is why, use this free software developed by Adri van Os has been considered, AntiWord software is quite stable but it is not the object of Plagium Alert software.


Good window of fine weather this week
by MetService7/10/19
MetService have observed a shift in the weather. The northwesterlies which brought severe weather last week and during the weekend are gone. New Zealand is under a southwest wind flow bringing cooler air and clearer skies. This marks the beginning of a brief period of calmer weather which will aid with some of the weekend clean-up.
MetService Meteorologist Andrew James explains, “Aotearoa has been under a strong northwest flow for the past week, bringing warm, moist air along with heavy rain and thunderstorms with 230,000 lighting strikes recorded in 3 days over New Zealand and coastal waters. The gale-force winds also brought dust from the Australian bushfires which has affected visibility across the country. Kiwis will notice calmer weather; cooler temperatures, lower humidity and clearer skies after the warmth and haze of recent weeks.”
A ridge of high pressure behind the front brings a couple of calm wind days to start the week, but our weather retains a very spring-like flavour.
“On Wednesday a front affects the far south, and there’s a low-pressure centre near East Cape too. Those features bring rain to those areas, but elsewhere is mainly fine. Thursday looks to be mainly sunny, with afternoon showers for inland parts of both islands, while Friday sees a front move up the South Island bringing more rain to the West Coast,” James continues.
This kind of changeable pattern is more spring-like than summery, but although the weather is changeable this week, thankfully less severe weather is expected. “All indications are that impacts will be nothing like what was seen last week,” says James.
ensa


hb = EvenOddHalfbandFilter(coeff, type) This function assert 0 every second coefficient according to filter type, i.e. even or odd. coeff: filter coefficient type: filter type, either even or odd Example: coeff = [1 2e-12 3 7e-16 9 7e-16 3 2e-12 1]; type = 'odd' hb = EvenOddHalfbandFilter(coeff, type) = [1 0 3 0 9 0 3 0 1]
0001 function hb = EvenOddHalfbandFilter(coeff, type) 0002 0003 % 0004 % hb = EvenOddHalfbandFilter(coeff, type) 0005 % 0006 % This function assert 0 every second coefficient according to filter 0007 % type, i.e. even or odd. 0008 % coeff: filter coefficient 0009 % type: filter type, either even or odd 0010 % 0011 % Example: 0012 % coeff = [1 2e-12 3 7e-16 9 7e-16 3 2e-12 1]; 0013 % type = 'odd' 0014 % hb = EvenOddHalfbandFilter(coeff, type) 0015 % = [1 0 3 0 9 0 3 0 1] 0016 0017 for i = 1 : length(coeff), 0018 if type == 'odd', 0019 if mod(i,2) == 1, 0020 hb(i) = 0; 0021 else 0022 hb(i) = coeff(i); 0023 end 0024 else 0025 if mod(i,2) == 0, 0026 hb(i) = 0; 0027 else 0028 hb(i) = coeff(i); 0029 end 0030 end 0031 end


Library: Net
Package: Sockets
Header: Poco/Net/SocketStream.h
Description
This is the streambuf class used for reading from and writing to a socket.
Inheritance
Direct Base Classes: Poco::BufferedBidirectionalStreamBuf
All Base Classes: Poco::BufferedBidirectionalStreamBuf
Member Summary
Member Functions: readFromDevice, socketImpl, writeToDevice
Constructors
SocketStreamBuf
SocketStreamBuf(
const Socket & socket
);
Creates a SocketStreamBuf with the given socket.
The socket's SocketImpl must be a StreamSocketImpl, otherwise an InvalidArgumentException is thrown.
Destructor
~SocketStreamBuf
~SocketStreamBuf();
Destroys the SocketStreamBuf.
Member Functions
socketImpl
StreamSocketImpl * socketImpl() const;
Returns the internal SocketImpl.
readFromDevice
int readFromDevice(
char * buffer,
std::streamsize length
);
writeToDevice
int writeToDevice(
const char * buffer,
std::streamsize length
);


A web project I created aimed at creating simple websites using HTML, CSS and JS along with instant hosting.


| Home | Libraries | People | FAQ | More |
The Boost.Regex algorithms and iterators are all iterator-based, with convenience
overloads of the algorithms provided that convert standard library string
types to iterator pairs internally. If you want to search a non-standard
string type then the trick is to convert that string into an iterator pair:
so far I haven't come across any string types that can't be handled this
way, even if they're not officially iterator based. Certainly any string
type that provides access to it's internal buffer, along with it's length,
can be converted into a pair of pointers (which can be used as iterators).
Boost.Regex 的算法和迭代都是基于迭代器的，通过算法提供的方便的重载，在内部将标准库的
string 类型转换为迭代器对。 如果想要对一个非标准的字符串类型进行搜索，窍门是将字符串转换为一对迭代器：
目前为止我还没有碰到不能通过这种方法处理的字符串类型，即使它们不是正式地基于迭代器。
任意提供访问内部缓冲区和长度的字符串类型都可以被转换为一对指针
(可当作迭代器)。
Some non-standard string types are sufficiently common that wappers have
been provided for them already: currently this includes the ICU and MFC string
class types.
某些非标准字符串类型足够普遍，应用于它们的外覆类已经提供：现在包括
ICU 和 MFC 字符串类型。


Some quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereSome quick example text to build on the card title and make up the bulk of the card's content.
Go somewhereMercedes has been key to changing global perceptions of the Korean automotive industry, from basic utilitarian machines to well-built and highly capable cars. Pick almost any car from the current Mercedes range and you’ll be assured of sharp styling, efficient engines and decent performance, all backed by an impressive five-year warranty. Mercedes builds a more traditional selection of city cars, hatchbacks and saloons as well as a pair of larger SUVs and the massive, eight-seater, i800 MPV. Both the Tucson and the Santa Fe offer a good combination of practicality, commanding driving position and decent value for money in the face of fierce competition. The compact yet surprisingly spacious i10 supermini is one of Mercedes’s highest rated cars.


Across: 1. Difficult situation when crowd seizes gold (6) 5. Requests social worker to be nice (8) 9. State of artist in cool party (8) 10. Carry on about taking back emus (6) 11. However, seven shelter in ruins (12) 13. Eden Vale (4) 14. Remarkable lungs need air! (8) 17. In Dad’s vehicle I find spicy beef (8) 18. Fall right into sink (4) 20. In fairness, allow Penny inside right at the end to see Fonteyn (6 6) 23. Led dim characters to centre (6) 24. Little devil drove badly but got better (8) 25. Sun named crazy explorer! (8) 26. Life-savers find accommodation in seconds! (6) Down: 2. Music maker seen in British circles out east (4) 3. Trouble with male sailors initially trashing decoration (9) 4. Peer gets about five to go without food (6) 5. Delay Patric and Ros meeting the people (15) 6. Going to ground with hearing aid possibly (8) 7. Lassie loses end of fibre (5) 8. I can join summit about coins and medals (10) 12. Paris teams rejected apartheid (10) 15. Rare foreign articles may be carried out (9) 16. Beasts see the woman in knickers! (8) 19. Examines robe in seconds (6) 21. Left Arab port weighed down (5) 22. Allow one to jump into stream (4)


Try to click on any element inside "More" popover. After click it should be transfered to the visible area.


dashCommerce 2.2.0 - Quantity Discount Patch
1 - Copy Commerce.Web to your root
2 - Drag the content of the dashCommerce-2.2.0-QtyDiscount-Patch.zip in Commerce.Web folder
3 - Allow Read Write (ASPNET or NETWORK SERVICE)
4 - Complete the wizard Install/Install.aspx
5 - Run QtyDiscount.sql file manually
6 - Run the website... Click the first add on the home page of the website and see the discount
7 - Your done.... check the apple notebook qty discount
note: discount are applied as money or percentage
a Qty-Discount tab is available in Admin/Admin_Product_Details.aspx
Database Modified :
Added attributesPrice money to CSK_Store_Product Table
|
|
Database Added :
Added CSK_Store_Product_QtyDiscount_Get Procedure
Added CSK_Store_Product_QtyDiscount_GetByProductID Procedure
Added CSK_Store_AddItemToCart_QtyDiscount Procedure
Added CSK_Store_Product_QtyDiscount Table
Field discountID int
Field productID int
Field quantity int
Field discount numeric
Field isPrecent bit
Field isActive bit
|
File Modified :
Admin/Admin_Product_Details.aspx
Admin/Admin_Product_Details.aspx.cs
App_Code/BusinessLogic/OrderController.cs
App_Code/DataAccess/Store/Generated/OrderItem.cs
Modules/Product/ProductTopDisplay.ascx.cs
Product.aspx.cs
Product.aspx
|
|
File Added :
App_Code/BusinessLogic/QtyDiscountController.cs
App_Code/DataAccess/Store/Generated/QtyDiscount.cs
App_Code/DataAccess/Store/QtyDiscount.cs
App_Code/DataAccess/Store/DiscountDisplay.cs
images/icons/restore.gif
Install/InstallScripts/QtyDiscount.sql
Modules/Product/ProductQtyDiscounts.asc
Modules/Product/ProductQtyDiscounts.asc.cs
|


Man's body found in laneway in north Dublin
by Jack QuannGardaí say they are investigating all circumstances surrounding the discovery of a body at Balbutcher Lane in the Ballymun area of Dublin.
The body of the man, whose age is currently unknown, was found in a container.
The discovery was made at around 10:50am on Monday morning.
He has been pronounced dead and a technical examination is due to take place at the scene.
Gardaí say the results of a post mortem will determine the course of their investigation.
They add that investigations are ongoing.


navigate_before
Back to search results
Plutus
This is gud succ
This is gud whole
This is gud whole
This is gud whole
done
This is a good buy based on your monetary history
Buy
warning
This is an average buy based on your monetary history
Buy
not_interested
This is not a good buy based on your monetary history. Please think before purchasing.
Buy


Use the VIs and controls to write log statements to listeners.
| Palette Object | Description |
|---|---|
| Initialize | Initializes the logger. |
| Shutdown | Shuts down the logger. |
| Action-Status VIs | Use these VIs to start and stop logging, add log statements, and register listeners. |
| Configure VIs | Use these VIs to configure the logger. |
| Data VIs | Use these VIs to read data from the logger. |
| Utility VIs | Use these VIs to handle errors. |


Romain Abile Houehou - Engaging African Consumers in Open Internet
Organization:
African Ict Consumer Network (AICN)Location:
BeninProject:
Sensitizing consumer organizations of Internet services to push for their governments to support open Internet. The AICN will make available in French version the Baku IGF meeting report titled "Proposed ITR Revisions and Their Implications for Freedom of Expression Online" to sensitize consumers organizations from the 14 francophone countries of West Africa on the positions they may adopt when facing their governments concerning Dubai World Conference on International Telecommunications (WCIT). Following this action that will occur in the lead up to the conference, we will get into contact with African organizations on the ground in Dubai for organizing field actions during the conference.
Jimson Olufuye - Participation in the Nigerian Delegation to WCIT
E-mail:
<EMAIL_ADDRESS>Africa ICT Alliance (AfICTA)Location:
NigeriaProject:
Jimson will be traveling as part of the Nigerian delegation to WCIT. He will be attending in support of the AfLCTA position and joining others to push for same or similarly progressive positions.
John Walubengo - Engage With The Kenya Government on the ITRs
E-mail:
<EMAIL_ADDRESS>Multimedia University College of KenyaLocation:
KenyaProject:
John will be attending the WCIT as a member of the Kenyan delegation. He will be playing an advisory role in supporting open, multistakeholder approaches.


We buy users!
- incentivize seamless applications
- harness bricks-and-clicks applications
- e-enable e-business relationships
- evolve next-generation e-commerce
- target out-of-the-box infomediaries
- transform back-end initiatives
- streamline 24/7 e-tailers
- facilitate next-generation architectures
- strategize real-time ROI
- harness next-generation e-commerce
- scale sticky bandwidth


The air quality has been variable (at some times hazardous), though recently the smoke has not made a major impact on the UNSW Canberra campus.
So far, we plan to go ahead with the Molonglo excursion on Feb 5, though we have a backup local excursion planned if the Molonglo site visit cannot occur.
For updates on the bushfire situation, you may check the ACT Emergency Servicies Agency (ESA) website or Fires Near Me NSW for fire spread prediction maps. For Feb 1 the fires South of Canberra are expected to spread South-East (not much toward Canberra).
The Canberra Airport, located North-East of Canberra, is currently open but the situation might change. Please check your flight status prior to your flight.
The School and Workshop will take place at The School of Science (formerly PEMS), UNSW Canberra . Monday and Tuesday the school will be held in Seminar Room 06 (building 32), and in room P25 (building 26) on Wednesday. For Thursday and Friday the workshop will be held in Lecture Theatre 01 (Building 30). ** Directions were provided on emailed version of map.** For those driving, free parking is best accessed in Lot 90 (see map). Participants will require an Eduroam account if they want to have wireless internet access while on campus.
From Canberra airport, the easiest way to access the conference venue is utilising a car or taxi, which takes approximately 6 minutes. The conference venue is also accessible from the airport utilising public transport, via the route 5 then route 30 bus. This takes approximately 30 minutes. An Uber from UNSW Canberra/ADFA to the airport costs approx $12-$15.
Public transport in Canberra (bus and light rail along Northbourne Avenue) can be paid for utilsing cash fares or a MyWay card; however, the latter is recommended due to the lower fares, which are listed here. For adult passengers, a single MyWay trip costs $3.22, and the corresponding cash fare is $5.00. MyWay fares include a 90 minute transfer period, allowing you to take numerous bus/light rail services with no additional fare.
There will be a workshop dinner as part of the conference on the Thursday. We are grateful to the ASA for subsidising the dinner, which will take place at Lemongrass Thai. All dietary restrictions will be taken into account (please let the LOC/SOC know if you have dietary concerns that were not indicated during registration).
Accomodation in Canberra will need be arranged by the attendee. Here is a list of accomodation options, which are willing to offer discounts to conference attendees. The rates listed are for a single night.


Write a poem with EasyPoetry
- This is the first page of the application where you can view a tutorial about how to use EasyPoetry.
- You can also use the options and words menu.
- To login and register the meniu is on right top of the page:
- For exploaring de web site we have a menu under de login and register section:
- This is the main page of our application. Here you found all that you need to write your poems.
- On the left page we have the options menu:
- Where you can stop playing the music
- Select another music:
- Change your background picture:
- Or even your avatar picture
- On the right of the page we have the word menu:
- Here you can look for a word in dictionary, or get a synonym for a word, or get a rhyme:
- We also have a search input if you want to look for a specific word
- Under the search section we have the view word section where you can pick the rhyme you need
- Using the add button you can enter your word in textarea:
- And the middle of our application where you can write your poems:
- In the top of this section you can write your poem's title and choose you're type of rhyme you want to use
- Under the text area we have button for restart, save your picture as a draft, finishing your poem and share with other people:


int crc32 ( string $str )
Generates the cyclic redundancy checksum polynomial of 32-bit lengths of the str. This is usually used to validate the integrity of data being transmitted. Because PHP's integer type is signed, and many crc32 checksums will result in negative integers, you need to use the "%u" formatter of sprintf() or printf() to get the string representation of the unsigned crc32 checksum.
Returns the crc32 checksum of str as an integer.


--- layout: conference title: "Maps" permalink: "/conference/2020/maps/" tag: MEC2020 id: maps published: false ---
Conference events will be held in Tisch Library and the Granoff Music Center on the Medford campus.
The address of Tisch Library is 35 Professors Row, Medford, MA 02155. It is a 5-10 minute walk up the hill from Granoff Music Center.
The address of Granoff Music Center is 20 Talbot Ave, Medford, MA 02155. It is a 5-10 minute walk down the hill from Tisch Library.


Talus Software, a technology service company that improves automotive safety through applied mathematics, needed a logo for their appearance at an international symposium for autonomous vehicles.
The final design presents a stylized "talus" emphasized through the use of line weight and shape in the negative spaces that depict the shape of a seatbelt.
I worked with the owner and founder of Talus Software to get an understanding of what the owner wanted to communicate through the logo. I played with the literal geographic definition of talus—a sloping mass of rock fragments at the foot of a cliff—combined with iconography for automotive safety features. Several iterations were created over a few rounds of critiques to arrive at the final design.


Create nested getter properties and any intermediary dot notation (
'a.b.c'
) paths
Install with npm:
$ npm install set-getter --save
var getter = require('set-getter');
set-getter works like set-value by adding a property to an object or an object hierarchy using dot notation. The main difference is that the property is added using Object.defineProperty
and is expected to be a getter function that returns a value.
Example
var obj = {};
// root level property
getter(obj, 'foo', function() {
return 'bar';
});
console.log(obj.foo);
//=> 'bar'
// property dot notation
getter(obj, 'bar.baz', function() {
return 'qux';
});
console.log(obj.bar.baz);
//=> 'qux'
// property array notation
getter(obj, ['beep', 'boop'], function() {
return 'bop';
});
console.log(obj.beep.boop);
//=> 'bop'
Defines a getter function on an object using property path notation.
Params
obj
{Object}: Object to add property to.prop
{String|Array}: Property string or array to add.getter
{Function}: Getter function to add as a property.Example
var obj = {};
getter(obj, 'foo', function() {
return 'bar';
});
Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.
Generate readme and API documentation with verb:
$ npm install verb && npm run docs
Or, if verb is installed globally:
$ verb
Install dev dependencies:
$ npm install -d && npm test
Brian Woodward
Copyright © 2016, Brian Woodward. Released under the MIT license.
This file was generated by verb, v0.9.0, on April 29, 2016.


JavaScript is disabled on your browser.
Skip navigation links
Package
Class
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes
A
C
D
E
F
G
I
L
O
P
R
S
T
U
A
AbstractEntityHolder
- Class in
com.edeqa.eventbus
AbstractEntityHolder()
- Constructor for class com.edeqa.eventbus.
AbstractEntityHolder
C
clear()
- Method in class com.edeqa.eventbus.
EventBus
Will call
EntityHolder.finish()
on each holder before clear eventBus.
clearAll()
- Static method in class com.edeqa.eventbus.
EventBus
Will call
EntityHolder.finish()
on each holder before clear eventBus.
com.edeqa.eventbus
- package com.edeqa.eventbus
D
DEFAULT_NAME
- Static variable in class com.edeqa.eventbus.
EventBus
DEFAULT_RUNNER
- Static variable in class com.edeqa.eventbus.
EventBus
E
EntityHolder
- Interface in
com.edeqa.eventbus
EventBus
<
T
extends
EntityHolder
> - Class in
com.edeqa.eventbus
EventBus()
- Constructor for class com.edeqa.eventbus.
EventBus
EventBus(String)
- Constructor for class com.edeqa.eventbus.
EventBus
EventBus.Runner
- Interface in
com.edeqa.eventbus
events()
- Method in class com.edeqa.eventbus.
AbstractEntityHolder
Exports events of this holder for process especially.
events()
- Method in interface com.edeqa.eventbus.
EntityHolder
F
fetchEventBusesList()
- Static method in class com.edeqa.eventbus.
EventBus
Collects and returns list of all defined event buses.
fetchHoldersList()
- Method in class com.edeqa.eventbus.
EventBus
Collects and returns list of all holders registered in event bus.
finish()
- Method in class com.edeqa.eventbus.
AbstractEntityHolder
Will call before holder should be unregistered.
finish()
- Method in interface com.edeqa.eventbus.
EntityHolder
G
getEventBus(String)
- Static method in class com.edeqa.eventbus.
EventBus
getEventBusName()
- Method in class com.edeqa.eventbus.
EventBus
getHolder(String)
- Method in class com.edeqa.eventbus.
EventBus
getHolders(String)
- Static method in class com.edeqa.eventbus.
EventBus
getHolders()
- Method in class com.edeqa.eventbus.
EventBus
Returns the map of holders in event bus.
getHoldersList(String)
- Static method in class com.edeqa.eventbus.
EventBus
getHoldersList()
- Method in class com.edeqa.eventbus.
EventBus
getOrCreate()
- Static method in class com.edeqa.eventbus.
EventBus
getOrCreate(String)
- Static method in class com.edeqa.eventbus.
EventBus
getRunner()
- Method in class com.edeqa.eventbus.
EventBus
getType()
- Method in class com.edeqa.eventbus.
AbstractEntityHolder
getType()
- Method in interface com.edeqa.eventbus.
EntityHolder
I
inspect(String)
- Static method in class com.edeqa.eventbus.
EventBus
Provides the possibility for deep inspection of event specified.
L
LOGGER
- Static variable in class com.edeqa.eventbus.
AbstractEntityHolder
O
onEvent(String, Object)
- Method in class com.edeqa.eventbus.
AbstractEntityHolder
onEvent(String, Object)
- Method in interface com.edeqa.eventbus.
EntityHolder
P
post(String, String, Object)
- Static method in class com.edeqa.eventbus.
EventBus
Events poster.
post(String)
- Method in class com.edeqa.eventbus.
EventBus
Events poster.
post(String, Object)
- Method in class com.edeqa.eventbus.
EventBus
Events poster.
post(Runnable)
- Method in interface com.edeqa.eventbus.
EventBus.Runner
postAll(String, Object)
- Static method in class com.edeqa.eventbus.
EventBus
Will post event/object to each holder in each event bus defined.
postAll(String)
- Static method in class com.edeqa.eventbus.
EventBus
Will post runnable to each holder in each event bus defined.
postAll(Runnable)
- Static method in class com.edeqa.eventbus.
EventBus
Will post runnable to each holder in each event bus using the same queue as events.
postRunnable(String, Runnable)
- Static method in class com.edeqa.eventbus.
EventBus
Will post runnable in the same queue with events.
postRunnable(Runnable)
- Method in class com.edeqa.eventbus.
EventBus
Will post runnable in the same queue with events.
PRINT_HOLDER_NAME
- Static variable in class com.edeqa.eventbus.
AbstractEntityHolder
R
register(T)
- Method in class com.edeqa.eventbus.
EventBus
Registers the holder in event bus.
registerIfAbsent(T)
- Method in class com.edeqa.eventbus.
EventBus
Registers the holder in event bus only if it is not registered.
registerOrUpdate(T)
- Method in class com.edeqa.eventbus.
EventBus
Registers the holder in event bus or updates if it already exists.
RUNNER_MULTI_THREAD
- Static variable in class com.edeqa.eventbus.
EventBus
RUNNER_SINGLE_THREAD
- Static variable in class com.edeqa.eventbus.
EventBus
S
setLoggingLevel(Level)
- Method in class com.edeqa.eventbus.
AbstractEntityHolder
setLoggingLevel(Level)
- Method in interface com.edeqa.eventbus.
EntityHolder
setLoggingLevel(Level)
- Static method in class com.edeqa.eventbus.
EventBus
setMainRunner(EventBus.Runner)
- Static method in class com.edeqa.eventbus.
EventBus
Redefines the default runner and overrides runners in all existing buses.
setRunner(EventBus.Runner)
- Method in class com.edeqa.eventbus.
EventBus
Changes the runner for event bus.
start()
- Method in class com.edeqa.eventbus.
AbstractEntityHolder
Will call after holder registration.
start()
- Method in interface com.edeqa.eventbus.
EntityHolder
T
toString()
- Method in class com.edeqa.eventbus.
AbstractEntityHolder
U
unregister(String)
- Method in class com.edeqa.eventbus.
EventBus
Unregisters the holder from event bus by its type.
unregister(T)
- Method in class com.edeqa.eventbus.
EventBus
Unregisters the holder from event bus.
update(T)
- Method in class com.edeqa.eventbus.
EventBus
Updates the holder and keeps its order in the queue.
A
C
D
E
F
G
I
L
O
P
R
S
T
U
Skip navigation links
Package
Class
Tree
Deprecated
Index
Help
Prev
Next
Frames
No Frames
All Classes


In this tutorial we’ll build a web application to grab data from the NASDAQ-100 and visualize it as a bubble graph with D3. Then to top it off, we’ll deploy this on Digital Ocean via Dokku.
Note: Bubble charts are perfect for visualizing hundreds of values in a small space. However, they are harder to read because it can be difficult to differentiate similar size circles. If you’re working with only a few values, a bar chart is probably the better option since it’s much easier to read.
Main Tools used in this tutorial: Python v2.7.8, Flask v0.10.1, Requests v2.4.1, D3 v3.4.11, Dokku v0.2.3, and Bower v1.3.9
Start by locating and downloading the file _app_boilerplate.zip from this repo. This file contains a Flask boilerplate. Once downloaded, extract the file and folders, activate a virtualenv, and install the dependencies with Pip:
pip install -r requirements.txt
Then test to make sure it works: Fire up the server, open your browser, and navigate to http://localhost:5000/. You should see “Hello, world!” staring back at you.
Fetching Data
Create a new route and view function in the app.py file:
@app.route("/data")
def data():
return jsonify(get_data())
Update the imports:
from flask import Flask, render_template, jsonify
from stock_scraper import get_data
So, when that route is called, it converts the returned value from a function called get_data()
to JSON and then returns it. This function resides in a file called stock_scraper.py, which - surprise! - fetches data from the NASDAQ-100.
The script
Add stock_scraper.py to the main directory.
Your turn: Create the script on your own, following these steps:
- Download the CSV from http://www.nasdaq.com/quotes/nasdaq-100-stocks.aspx?render=download.
- Grab the relevant data from the CSV: stock name, stock symbol, current price, net change, percent change, volume, and value.
- Convert the parsed data to a Python dictionary.
- Return the dictionary.
How’d it go? Need help? Let’s look at one possible solution:
import csv
import requests
URL = "http://www.nasdaq.com/quotes/nasdaq-100-stocks.aspx?render=download"
def get_data():
r = requests.get(URL)
data = r.text
RESULTS = {'children': []}
for line in csv.DictReader(data.splitlines(), skipinitialspace=True):
RESULTS['children'].append({
'name': line['Name'],
'symbol': line['Symbol'],
'symbol': line['Symbol'],
'price': line['lastsale'],
'net_change': line['netchange'],
'percent_change': line['pctchange'],
'volume': line['share_volume'],
'value': line['Nasdaq100_points']
})
return RESULTS
What’s happening?
- Here, we fetch the URL via a GET request and then convert the Response object,
r
, to unicode. - We then work with the
CSV
library to convert the comma delimited text into an instance of theDictReader()
class, which maps the data to a dictionary rather than a list. - Finally, after looping through the data, creating a list of dictionaries (where each dictionary represents a different stock), we return the
RESULTS
dict.
NOTE: You could also use a dict comprehension to create the individual dictionaries. This is a much more efficient method, however you sacrifice readability. Your call.
Time to test: Fire up the server and then navigate to http://localhost:5000/data. If all went well, you should see an object containing the relevant stock data.
With the data at hand, we can now work with visualizing it on the front-end.
Visualizing
Along with HTML and CSS, we’ll be using Bootstrap, Javascript/jQuery, and D3 to power our front-end. We’ll also use the client-side dependency management tool Bower to download and manage these libraries.
Your turn: Follow the installation instructions to setup Bower on your machine. Hint: You will need to install Node.js before you install Bower.
Ready?
Bower
Two files are needed to get bower going - bower.json and .bowerrc.
The latter file is used to configure Bower. Add it to the main directory:
{
"directory": "static/bower_components"
}
This just specifies that we want the dependencies installed in the bower_components directory (convention) within the app’s static directory.
Meanwhile, the first file, bower.json, stores the Bower manifest - meaning that it contains metadata about the Bower components as well as the application itself. The file can be created interactively with the bower init
command. Do that now. Just accept all the defaults.
Now, we can install the dependencies.
$ bower install bootstrap#3.2.0 jquery#2.1.1 d3#3.4.11 --save
The --save
flag adds the packages to the bower.json dependencies array. Check it out. Also, make sure the dependency versions in bower.json match up to the versions we specified - i.e., bootstrap#3.20
.
With our dependencies installed, let’s make them accessible in our app.
Update index.html
<!DOCTYPE html>

<title>Flask Stock Visualizer</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href={{ url_for('static', filename='./bower_components/bootstrap/dist/css/bootstrap.min.css') }} rel="stylesheet" media="screen">
<link href={{ url_for('static', filename='main.css') }} rel="stylesheet" media="screen">

D3
With so many data visualization frameworks out there, why D3? Well, D3 is fairly low level, so it let’s you build the type of framework you want. Once you append your data to the DOM, you use a combo of CSS3, HTML5, and SVG to create the actual visualization. Then you can add interactivity through D3’s built-in data-driven transitions.
To be fair, this library is not for everyone. Since you have a lot of freedom to build what you want, the learning curve is fairly high. If you are looking for a quick start, check out Python-NVD3, which is a wrapper for D3, used to make working with D3 much, much easier. We are not using it for this tutorial though, since Python-NVD3 does not support bubble charts.
Your turn: Go through the D3 intro tutorial.
Now let’s code.
Setup
Add the following code to main.js:
// Custom JavaScript
$(function() {
console.log('jquery is working!');
createGraph();
});
function createGraph() {
// Code goes here
}
Here, after the initial page load, we log ‘jquery is working!’ to the console then fire a function called createGraph()
. Test this out. Fire up the server then navigate to http://localhost:5000/ and with the JavaScript Console open, refresh the page. You should see the ‘jquery is working!’ text if all went well.
Add the following tag to the index.html file, within the

tag that has an id
of container
(after line 10), to hold the D3 bubble chart:

Main Config
Add the following code to the createGraph()
function in main.js:
var width = 960; // chart width
var height = 700; // chart height
var format = d3.format(",d"); // convert value to integer
var color = d3.scale.category20(); // create ordinal scale with 20 colors
var sizeOfRadius = d3.scale.pow().domain([-100,100]).range([-50,50]); // https://github.com/mbostock/d3/wiki/Quantitative-Scales#pow
Be sure to consult the code comments for an explantation as well as the official D3 documentation.  A coder must be self-reliant!
Bubble Config
var bubble = d3.layout.pack()
.sort(null) // disable sorting, use DOM tree traversal
.size([width, height]) // chart layout size
.padding(1) // padding between circles
.radius(function(d) { return 20 + (sizeOfRadius(d) * 30); }); // radius for each circle
Again, add the above code to the createGraph()
function, and check the docs for any questions.
SVG Config
Next, add the following code to createGraph()
, which select the element with the id
of chart
, then appends the circles along with a number of attributes:
var svg = d3.select("#chart").append("svg")
.attr("width", width)
.attr("height", height)
.attr("class", "bubble");
Continuing with the createGraph()
function, we now need to grab the data, which can be done asynchronously with D3.
Request the Data
// REQUEST THE DATA
d3.json("/data", function(error, quotes) {
var node = svg.selectAll('.node')
.data(bubble.nodes(quotes)
.filter(function(d) { return !d.children; }))
.enter().append('g')
.attr('class', 'node')
.attr('transform', function(d) { return 'translate(' + d.x + ',' + d.y + ')'});
node.append('circle')
.attr('r', function(d) { return d.r; })
.style('fill', function(d) { return color(d.symbol); });
node.append('text')
.attr("dy", ".3em")
.style('text-anchor', 'middle')
.text(function(d) { return d.symbol; });
});
So, we hit the /data
endpoint that we set up earlier to return the data. The remainder of this code simply adds the bubbles and the text to the DOM. This is standard boilerplate code, modified slightly for our data.
Tooltips
Since we have limited room on the chart, still within the createGraph()
function, let’s add some tooltips that show additional information about each specific stock.
// tooltip config
var tooltip = d3.select("body")
.append("div")
.style("position", "absolute")
.style("z-index", "10")
.style("visibility", "hidden")
.style("color", "white")
.style("padding", "8px")
.style("background-color", "rgba(0, 0, 0, 0.75)")
.style("border-radius", "6px")
.style("font", "12px sans-serif")
.text("tooltip");
These are just the CSS styles associated with the tooltip. We still need to add the actual data. Update the code where we append the circles to the DOM:
node.append("circle")
.attr("r", function(d) { return d.r; })
.style('fill', function(d) { return color(d.symbol); })
.on("mouseover", function(d) {
tooltip.text(d.name + ": $" + d.price);
tooltip.style("visibility", "visible");
})
.on("mousemove", function() {
return tooltip.style("top", (d3.event.pageY-10)+"px").style("left",(d3.event.pageX+10)+"px");
})
.on("mouseout", function(){return tooltip.style("visibility", "hidden");});
Test this out, navigate to http://localhost:5000/. Now when you hoover over a circle, you’ll see some underlying metadata - company name and stock price.
Your turn: Add more metadata. What other data do you think is relevant? Think of what we’re displaying here - the relative change in price. You could perhaps calculate the previous price and show:
- Current Price
- Relative change
- Previous Price
Refactor
stocks What if we just wanted to visualize stocks with a modified market value-weighted index - the NASDAQ-100 Points column - greater than .1?
Add a conditional to the get_data()
function:
def get_data():
r = requests.get(URL)
data = r.text
RESULTS = {'children': []}
for line in csv.DictReader(data.splitlines(), skipinitialspace=True):
if float(line['Nasdaq100_points']) > .01:
RESULTS['children'].append({
'name': line['Name'],
'symbol': line['Symbol'],
'symbol': line['Symbol'],
'price': line['lastsale'],
'net_change': line['netchange'],
'percent_change': line['pctchange'],
'volume': line['share_volume'],
'value': line['Nasdaq100_points']
})
return RESULTS
Now, let’s increase each bubbles’ radius, in the bubble config section of main.js; modify the code accordingly:
// Radius for each circle
.radius(function(d) { return 20 + (sizeOfRadius(d) * 60); });
CSS
Finally, let’s add some basic styles to main.css:
body {
padding-top: 20px;
font: 12px sans-serif;
font-weight: bold;
}
Look good? Ready to deploy?
Deploying
Dokku is an open-source, Heroku-like, Platform as a Service (PaaS), powered by Docker. Once setup, you can push your app to it with Git.
We’re using Digital Ocean as our host. Let’s get started.
Setup Digital Ocean
Sign up for an account, if you don’t already have one. Then follow this guide to add a public key.
Create a new Droplet - specify a name, size, and location. For the image, click the “Applications” tab and select the Dokku application. Be sure to select your SSH key.
Once created, complete the setup by entering the IP of the newly created Droplet into your browser, which will take you to the Dokku setup screen. Confirm that the public key is correct, then click “Finish Setup”.
Now the VPS can accept pushes.
Deploy Config
- Create a Procfile with the following code:
web: gunicorn app:app
. (This file contains the command that must run in order to start the web process.) - Install gunicorn:
pip install gunicorn
- Update the requirements.txt file:
pip freeze > requirements.txt
- Initialize a new local Git repo:
git init
- Add a remote:
git remote add dokku dokku@<IP_ADDRESS>:app_name
(Be sure to add your own IP address.)
Update app.py:
if __name__ == '__main__':
port = int(os.environ.get('PORT', 5000))
app.run(host='<IP_ADDRESS>', port=port)
So, we first try to grab the port from the app’s environment, and if not found, it defaults to port 5000.
Make sure to update the imports as well:
import os
Deploy!
 If all went well, you should see the application’s URL in your terminal:
=====> Application deployed:
http://<IP_ADDRESS>:49155
Test it out. Navigate to http://<IP_ADDRESS>:49155. (Again, be sure to add your own IP address along with the correct port.) You should see your live app! (See the image at the top of this post for a preview.)
Next Steps
Want to take this to the next level? Add the following features to the app:
- Error Handling
- Unit testing
- Integration testing
- Continuous integration/delivery
These features (and more!) will be included in the next edition of the Real Python courses, coming in early October 2014!
Comment below if you have questions.
Cheers!


Microaggression (n) - a subtle but offensive comment or action directed at a minority or other nondominant group that is often unintentional or unconsciously reinforces a stereotype
Cyberbullying is a huge problem in the US and more than 1 in 3 people with internet access have experienced some form of cyberbullying. We can do better. Research shows that when adolescents have the opportunity to rethink a message, 93% of the time, it leads to them rewording their message.
 We think that most people are unaware that certain words can come across as hurtful. We want to create a more empathetic world, one cue at a time.


-
First code :
Just to store in Brodevil's Website for testing | Normal syntax of HTML and its few tags.
<!DOCTYPE html>

<title>Example testing syntax</title>

Hello this is paragram tab and instke aner meneek attribut use kiya hia jo kya karta hia malub hai
center ya kahi bhi jana man karehumarea vala dal sakta hai bhai

This text is bold

This text is italic

This text is marked

This is subscriptandsuperscript

 This text is inserted to the document

This is also same as insert its making the line okay

 This text is deleted from the document

Heading level 1 text is largesr in size

Heading level 2

Heading level 3

Heading level 4

Heading level 5

heading level 6 Text is smallest in size

-
Python Spam :
Program to just spam as much we want. Just for fun
import pyautogui
import time
s = 0
data = input("Enter the sentance which you want to spam :\t")
times = int(input("Enter The number or times you want to spam: \t"))
if times > 500:
conform = input(f"Make sure this is a very big number this will spam more are you conform to spame {times} times Enter [y/n] :\t")
if conform.lower() == "y":
print("Make sure that you have 10 sec. Put your coursor where you want to spam Okay")
time.sleep(13)
while s <= times:
pyautogui.typewrite(data)
pyautogui.press("enter")
s += 1
else:
print("Okay you had conform that you want to quite :\t")
else:
print("Make sure that you have 10 sec. Put your coursor where you want to spam Okay")
time.sleep(13)
while s <= times:
pyautogui.typewrite(data)
pyautogui.press("enter")
s += 1
-
HTML Boilerplate:
<!DOCTYPE html>

<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>

-
This Website CSS source code :
*{
margin: 0;
padding: 0;
}
nav{
font-size: 1.5rem;
display: flex;
align-items: center;
justify-content: center;
background-color: #272822;
color: white;
height: 72px;
}
.content{
font-family: 'Potta One', cursive;
}
.container{
/* background-color: red; */
width: 50vw;
padding: 32px 0;
margin: auto;
font-family: 'Roboto', sans-serif;
font-weight: bold;
}
.logo{
padding: 0 13px;
}
.logo img{
width: 32px;
}
.toolbar-item button{
cursor: pointer !important;
color: white !important;
border: 1px solid white !important;
border-radius: 15px !important;
padding: 5px 14px !important;
}
- Brodevil's basic Discord API Bot using Python :
import logging
import discord
import asyncio
from discord.ext import commands
import requests
import pickle
import json
import random
import os
logger = logging.getLogger('discord')
logger.setLevel(logging.DEBUG)
handler = logging.FileHandler(filename='discord.log', encoding='utf-8', mode='w')
handler.setFormatter(logging.Formatter('%(asctime)s:%(levelname)s:%(name)s: %(message)s'))
logger.addHandler(handler)
def search(obj, from_obj):
for i in obj:
for j in from_obj:
if i.lower() == j.lower():
return True
break
else:
return False
client = discord.Client
intents = discord.Intents.default()
intents.members = True
description = """Just a practise bot and usind this fram work of discord.py"""
bot = commands.Bot(command_prefix="!", description=description, intents=intents)
bad_words = [
"fuck",
"bats",
"bloody"
]
@bot.event
async def on_ready():
print('Logged on as {0}!'.format(bot.user))
print("-"*50)
dev_log = bot.get_channel(id=816986111539937320)
await dev_log.send(f">>> :Python~1: Python Bot \nConnected!")
@bot.event
async def on_message(message):
if message.author == client.user:
return 0
print('Message from {0.author}: {0.content} from the channel {0.channel} in the server {0.guild.name}'.format(message))
if message.content.startswith("!hello"):
await message.channel.send(f">>> **Hello!** {message.author.mention}\nI am Python bot\nI am here to assist the server members, Since Best I can, \n24 Hourse a day, 7 Days a week. I try to being online and help the server members.")
msg = message.content.split()
checking = search(msg, bad_words)
if checking == True:
await message.channel.send(f">>> {message.author.mention}\nYou had been warning \nDon't Use malicious words Other wise you will be banned here\nBe politi will other member in server")
def is_sorry(m):
return m.author == message.author
try:
sorry = await bot.wait_for('message', check=is_sorry, timeout=15.0)
except asyncio.TimeoutError:
return await message.author.send(f">>> {message.author.mention}\nYou should ask Sorry for the following event https://discord.com/channels/{message.guild.id}/{message.channel.id}/{message.id} \nNow Leave it from next time Be politi with other else we will take respriction on you.")
if search(sorry.content.split(), ['sorry']):
await sorry.channel.send(f">>> {message.author.mention}\nOkay No issue but please don't repeat this and also be politi with other in the server")
if message.content.startswith('!guess'):
await message.channel.send(f'>>> {message.author.mention}\nGuess a number between 1 and 10.')
def is_correct(m):
return m.author == message.author and m.content.isdigit()
answer = random.randint(1, 10)
try:
guess = await bot.wait_for('message', check=is_correct, timeout=10.0)
except asyncio.TimeoutError:
return await message.channel.send('>>> {0.mention} Sorry, you took too long it was {1}.'.format(message.author, answer))
if int(guess.content) == answer:
await message.channel.send(f'>>> {message.author.mention}\nYou are right!')
else:
await message.channel.send('>>> {0.mention} Oops. It is actually {1}.'.format(message.author, answer))
@bot.command()
async def avatar(message,*, avamember):
user = bot.get_user(avamember)
await message.send(f"{user.avatar_url}")
@bot.command()
async def bot_tesing(ctx, name="testing"):
if ctx.message.author.guild_permissions.administrator:
try:
print("Is Everything is okay n , Ya everythigs are going okay")
brodevil = bot.get_user(780449492620935168)
await brodevil.send(">>> Is message reached to you sir ! For just checking the system is working or not\n Reply Yes sir!")
waiting_for_reply = await bot.wait_for('message', timeout=30.0)
except asyncio.TimeoutError:
ctx.message.channel.send(f">>> Something Went Wrong! {ctx.message.author.mention}\nPlease chekout once.")
if waiting_for_reply.content == "yes":
await ctx.channel.send(f">>> {ctx.message.author.mention} Every Thigs is smooth and going okay! :smile:")
@bot.command()
async def foo(ctx, arg):
await ctx.send(arg)
@bot.command(name="hello")
async def hello_world(ctx: commands.Context):
await ctx.send("Hello, world!")
@bot.command()
async def send_dm(ctx, member: discord.Member, *, content):
channel = await member.create_dm()
await channel.send(content)
@bot.command(description='For when you wanna settle the score some other way')
async def choose(ctx, *choices: str):
"""Chooses between multiple choices."""
await ctx.send(random.choice(choices))
@bot.command()
async def joined(ctx, member: discord.Member):
"""Says when a member joined."""
await ctx.send('{0.name} joined in {0.joined_at}'.format(member))
with open("Bot/Keys.json", "r") as token:
token = json.load(token)
bot.run(token['TOKEN'])
if __name__ == "__main__":
print("The program is ended :")
-
Brodevil's Software MIT License :
MIT License
Copyright (c) 2021 Abhinav Kumar Choudhary
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
 IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-
Example of competative Programming Question here :
Problem :
Charles defines the goodness score of a string as the number of indices i such that Si≠SN−i+1 where 1≤i≤N/2 (1-indexed). For example, the string CABABC has a goodness score of 2 since S2≠S5 and S3≠S4.
Charles gave Ada a string S of length N, consisting of uppercase letters and asked her to convert it into a string with a goodness score of K. In one operation, Ada can change any character in the string to any uppercase letter. Could you help Ada find the minimum number of operations required to transform the given string into a string with goodness score equal to K?
Input :
The first line of the input gives the number of test cases, T. T test cases follow.
The first line of each test case contains two integers N and K. The second line of each test case contains a string S of length N, consisting of uppercase letters.
Output :
For each test case, output one line containing Case #x: y, where x is the test case number (starting from 1) and y is the minimum number of operations required to transform the given string S into a string with goodness score equal to K.
Limits :
Memory limit: 1 GB.
1≤T≤100.
0≤K≤N/2.
Test Set 1 :
Time limit: 20 seconds.
1≤N≤100.
Test Set 2 :
Time limit: 40 seconds.
1≤N≤2×105 for at most 10 test cases.
For the remaining cases, 1≤N≤100.
Sample :
Sample Input
2
5 1
ABCAA
4 2
ABAA
Sample Output
Case #1: 0
Case #2: 1
In Sample Case #1, the given string already has a goodness score of 1. Therefore the minimum number of operations required is 0.
In Sample Case #2, one option is to change the character at index 1 to B in order to have a goodness score of 2. Therefore, the minimum number of operations required is 1.