Currently enrolled in the Bachelor of Computer Science (2nd degree) program at the University of British Columbia (UBC). My 1st degree was in Pharmacology, where I cultivated my primary interests in drug development and drug testing. Presently, I am interested in using computers to model and discover new drug candidates that can reverse degenerative diseases such as diabetes and multiple sclerosis.
GPA: (3.96/4.00)
GPA: (3.87/4.00)
Aharoni-Simon M, Shumiatcher R, Yeung A, Shih AZ, Luciani DS. Anti-Apoptotic Bcl-2 Regulates Mitochondrial Proton Leak, Redox-Balance, and Function in Pancreatic Beta-Cells. Contributed to an abstract for “Diabetes and Metabolic Dysfunction”, Keystone Symposia on Molecular and Cellular Biology. January 2015. Sante Fe, New Mexico. PMID: 27070098
Yeung A, Ly PT, Marwaha A, Pallen CJ. The Role of PTPα-dependent Akt Signalling in Oligodendrocyte Differentiation. Poster presented at the annual “CFRI Summer Student Research Program Poster Day”, July 2015. Child and Family Research Institute, Vancouver, BC.
My secondary interest is in education. For the past 5 years, I have designed and taught English classes, ice skating lessons, outdoor programs, and science workshops for children and adults. I ran these programs with a team or independently, and I constantly self-reflect and ask for feedback to continue increasing program quality. Through these experiences, I also learned how to interact with people of varying socio-demographic backgrounds, including immigrants, children, and adults.
Outside of school and work, I enjoy taking photos, videos, hiking, and camping around the world. I recently trekked the famous 75km West Coast Trail on Vancouver Island, the Canadian Rockies, and went on a caving expedition in central Vietnam.
$350 scholarship awarded to students based on the recommendation of the Faculty of Science.
A $4725 studentship awarded to the top 17 ranked students based on scholarly achievement and scientific merit of proposed project.
$1500 Scholarship offered to UBC students in the top 5% of their undergraduate year, faculty, and school.
A $1000 scholarship awarded in recognition of a hockey player’s academic achievement and community/school service combined with hockey participation


A lot of times I run into quotes that just stick with me. Whether they be funny, inspirational, or just memorable in some way. This is a collection of these quotes in no particular order. I'll be updating them as I experience life more!
“Life moves pretty fast. If you don’t stop and look around once in awhile, you could miss it.” -Ferris Bueller’s Day Off
The Starfish Story
Once upon a time, there was an old man who used to go to the ocean to do his writing. He had a habit of walking on the beach every morning before he began his work. Early one morning, he was walking along the shore after a big storm had passed and found the vast beach littered with starfish as far as the eye could see, stretching in both directions.
Off in the distance, the old man noticed a small boy approaching. As the boy walked, he paused every so often and as he grew closer, the man could see that he was occasionally bending down to pick up an object and throw it into the sea.
The boy came closer still and the man called out, “Good morning! May I ask what it is that you are doing?”
The young boy paused, looked up, and replied “Throwing starfish into the ocean. The tide has washed them up onto the beach and they can’t return to the sea by themselves.
The old man replied, “But there must be tens of thousands of starfish on this beach. I’m afraid you won’t really be able to make much of a difference.”
The boy bent down, picked up yet another starfish and threw it as far as he could into the ocean. Then he turned, smiled and said, “It made a difference to that one.”
“I know very little about anything, but what I do know is that if you can live your life without an audience, you should do it.” -Bo Burnham
“Quotes are for dumb people who can’t think of something intelligent to say on their own.” -Bo Burnham
“One day I will find the right words, and they will be simple.”― Jack Kerouac
“Whatever you do in this life, it's not legendary, unless your friends are there to see it.” -Barney
“It’s a bad day, not a bad life.”
“The real voyage of discovery consists not in seeking new landscapes, but in having new eyes.” -Marcel Proust
“I hope you’ll look back and remember today as the day you decided to make every one count, to relish each hour as if there would never be another. And when you get the choice to sit it out or dance, I hope you dance.”
“To go wrong in one's own way is better than to go right in someone else's.” -Dostoevsky
“I live in danger, Suit.” -Mozzie
“If you want a happy ending, that depends, of course, on where you stop your story.” -Mozzie
“Time is money, money is power, power is pizza, pizza is knowledge.” – April Ludgate
“Sometimes you gotta work a little, so you can ball a lot.” -Tom Haverford
“Don’t start chasing applause and acclaim. That way lies madness.” – Ron Swanson
“The way I see it, every life is a pile of good things and bad things. The good things don’t always soften the bad things, but vice versa, the bad things don’t always spoil the good things and make them unimportant.” — The Doctor, Season 5, Episode 10
“We’re all stories, in the end. Just make it a good one, eh?” — The Doctor, Season 5, Episode 13
“Letting it get to you. You know what that’s called? Being alive. Best thing there is. Being alive right now is all that counts.” — The Doctor, Season 6, Episode 4
"Some people live more in twenty years than others do in eighty. It's not the time that matters, it's the person." -The Doctor


Alok Singh Accounts Executive - BOBBY GARMENTS
Howrah, West Bengal - Email me on Indeed: indeed.com/r/Alok-Singh/2a1733000e5bbfe1
WORK EXPERIENCE
Accounts Executive BOBBY GARMENTS - Kolkata, West Bengal - July 2012 to Present
Promoted to Executive accounts payable for BOBBY GARMENTS preparing and analyzing accountings records and Financial statements reports. Facilitated "no-fault" internal and external audits as a result of sound recordkeeping and thorough documentation. Composed effective accounting and handling Petty Cash for Office Expenses.
BOBBY GARMENTS (Manufacturing Company. ) Key Results: • Passing Journal entries, Ledger posting, recording Expenses & payment transactions in Cash Book and Bank Book in effective accounting standard. • Recording the payment transactions in accurate and proper way within the Time Frame & prepare Income and financials statement (Profit & Loss A/C), Balance Sheet. • Valuation of company assets and liabilities. • A quick learner with the ability to works in as a team, flexible and organizes things with optimistic way for the betterment of the organization. • Consistently maintained accuracy in calculating figures and amounts such as discounts, interest, commissions, proportions and percentages.
Chartered Accountant AGARWAL ANIL KUMAR & CO - Dalhousie, Himachal Pradesh - April 2011 to May 2012
For employers, handled daily Audit programming and planning of activities to ensure completion of tax audits within the time frame. Analyzing books of Accounts, proper & accurate checking of invoices, Purchase Challans, Sales Challans, expense reports, credit memos and payment transactions and Opening Ledger Balances Verification & cross verification of Ledger posting & prepare Income and financials statement (Profit & Loss A/C), Balance Sheet and Valuation of Closing Stock on FIFO Basis.
Key Results: • Conducting the accurate and proper auditing of Books of Account within the Time Frame & prepare Income and financials statement (Profit & Loss A/C), Balance Sheet. • Prepare BRS, VAT & CST Summary, Relative Payment, and Summary of Capital account, TDS Chart, Expenses Details (Salary, Rent & Telephone Bills) & Stock Summary. • Verifying Opening Ledger Balances, VAT Returns, CST Returns, Unsecured Loan Account, Fixed Assets TDS Returns. • Cross checking Of Ledger Posting and Cash Book Scrutiny • Accurate checking of invoices, Purchase Challans, Sales Challans, expense reports, credit memos and payment transactions & Stock Valuation on FIFO basis • Consistently maintained accuracy in calculating figures and amounts such as discounts, interest, commissions, proportions and percentages
EDUCATION
Bachelor of Commerce in W.B.C.H.S.E CALCUTTA UNIVERSITY - Kolkata, West Bengal 2009
industrial Accountant Institute of Computer Accounts 2004
ADDITIONAL INFORMATION
Key Skills
• Invoices/Expense Reports/Payment Transactions. • Tax Auditing & Analyzing Books of Account. • Maintaining Books of Account in Computerized System & Manually system. • Ledger & Cash Book Scrutiny Calculating Sales Tax Liability.
• Preparing Income Statement, (Profit & Loss A/C) Balance Sheet & Trial Balance. • Journal Entries, Ledger Posting & BRS. • Stock Summary & Stock Valuation. • Handling Properly Petty Cash.


The best place to find the best bots bots for your server
7.6k Servers
An epic bot made by Danny#0007
. Enjoy features such as high quality auto-mod, safe anti-raid and anti-spam!
7.6k Servers
An epic bot made by Danny#0007
. Enjoy features such as high quality auto-mod, safe anti-raid and anti-spam!
7.6k Servers
An epic bot made by Danny#0007
. Enjoy features such as high quality auto-mod, safe anti-raid and anti-spam!


Log in to Game Jolt, or sign up, to vote on games!
Nice try, my friend, but you can't vote on your own game!
The jam organizers have restricted voting to jam participants.
Vote for this game by rating it in each of the categories below. If a particular category doesn't apply for this game, please choose n/a
. For example, it would be appropriate to choose n/a
for a "Graphics" category when rating a text-based game.
Votes must be entered during the voting period, which will end . You can change your vote at any time before then, but after voting has ended, your decision will be finalized. You can vote for as many games as you wish.


Uptake aggregates, analyzes, and presents consumer travel reviews
Uptake is a high volume (> 1mm visitors/month) travel website. They were in need of some design work to help drive conversion and reduce churn.
I was ommissioned to help redesign the product page with a goal of reducing drive-by traffic. This project is ongoing ...


privatesuitemag.com
requires modern JavaScript capabilities in order to function properly. If you're feeling a tad paranoic, you can check out our totally harmless source code at
https://github.com/privatesuite/privy
Home
About
Issues
Podcast
Suite Regulars
Subscribe


The Ties that Band
This article first appeared in The Magazine, Issue 8.
Back in November, I decided to try my luck with a pitch to The Magazine. I had an idea I thought would work well, and the experience to write the story. Glenn and Marco liked the idea. Here is the full article as it appeared in Issue 8.
The Ties That Band
Toby is struggling. In rehearsal after rehearsal, Toby can’t seem to pull it together. He’s not keeping his toes up, not keeping his back straight, not playing the right notes. It seems like a lot to remember, but he will have to achieve it all in order to march in the Pride of Clarkston Marching Band and Color Guard.
The staff takes turns following him from set to set, helping him count as he tries to play the music from memory; there are no music stands attached to instruments in a competition band. His shoulders slump, his instrument bell dips to one side.
Toby’s my project. There are always a few. As assistant director of the marching band, I need to help Toby (a composite of many students I’ve worked with) and all 70-some other marchers break through their difficulties.
“…17, 18, 19, 20!” I shout, as we near the next transition. In this move, Toby has to change direction from forward to backward. It sounds easy, but the body control required takes immense focus, especially for a 14-year-old high school freshman. Timing must be precise, with the size of each step measured and equal. Any variation can undermine the integrity of the drill design. The smallest error means judges take points off in the marching and maneuvering category.
Director Bill Legg stops the band, and I catch up with Toby. An iPhone glows in my hand with the drill set’s series of overlapping arcs. I point to Toby’s coordinate. “Did you see that?” I ask. “Twenty-four counts, prep, and go. You got that part right. Next time you have to keep playing. And keep your bell up. And smaller steps, so that you hit your mark.”
We do the move a few more times. The first is a disaster for Toby; now he’s thinking too hard. Music, step size, counting — it all falls apart. But we rehearse it again and again. The fourth time, it’s much better. His feet lock into position with the authority of a drill sergeant, and I cheer him on.
“That’s perfect. You nailed it that time!”
Toby grins. Yeah, it’s better.
Band, Ten-Hut!
The Pride of Clarkston, an 80-piece marching band from a small-town high school in southeastern Washington, has competed around the state for more than 30 years. Band traditions date back decades — more than a century for marching bands — but two years ago, ours took a decidedly modern turn. I began using my iPhone to manage drill-charts and count sequences. Now, iOS devices are the staff’s primary tools for recording, monitoring, tuning, and teaching the band’s students.
During the summer, the band retreats to Camp Wooten, a wooded site along the waters of the Tucannon River, where for 33 years the season’s first rehearsals have taken place. During a three-day stint at camp, the band learns how to march (it’s not just walking in time), how to find their coordinates (the precise locations in which they should stand to create legible shapes for the audience), and how to move between those points, all while playing an instrument and focusing their eyes on the stands rather than the ground beneath their feet. Some make an easy start of it, but most will stumble and recover. Nearly all come away with an invigorating sense of accomplishment and teamwork.
Only three years ago, the Pride had a blanket “no cellphone” policy during rehearsals, be it during camp or back home. Screens meant distraction and disconnect from the unity of the group. Today, when the phones come out, they have a different purpose: They’re tools instead of toys.
During the summer retreat, the army of volunteers affectionately dubbed “the Band Parents” gets involved, too. Pacing up and down formations with iPads, iPods, and iPhones — and possibly some Android devices — parents and staff spend the day capturing clips of the Pride’s performers in action. Later, on the screen set up at the back of the tin-roofed mess hall, student after student marches past. Some are splendid examples and others not so much.
The band members watch with rapt attention as their digital selves glide over the field. They critique their own posture and execution while applauding newcomers to whom marching seems like second nature. At the next rehearsal, groups of students are on the field early, working to improve what they’ve seen in the video. Again the staff and parents film, and again the students watch, and again the band improves.
Forward, Glide
Back in Clarkston, I squint and angle the phone screen away from my face. It’s bright out, but I can still read the conversation. It’s from the Band Instructors Facebook group, where our preparations for rehearsal often begin. Everyone agrees: We have a march-style problem to solve.
March-style is the specific set of rules that the band uses to define how each member should traverse the field. For instance, Clarkston uses a rolled-toe forward march and an on-the-toes backward march. When a performer moves across the field, his or her shoulders must stay parallel to the sideline while feet point in the direction of travel — imagine a tank’s turret versus its tracks. Marchers’ posture must be straight-backed, with their weight forward and their instrument elevated so that they appear to be playing into the stadium press box instead of the sideline.
All bands have a march-style problem; it’s part of learning the skill. However, this rehearsal has particular challenges. Not only do we have march style to fix, we have music memorization, musicality, choreography, and a lot of cleaning up to make sure that the shapes on the field look like arcs and lines instead of illegible blobs.
We break the rehearsal into blocks, deciding how much time we should spend on each technique as well as on each section of the show. The schedule goes into our smartphones so that each staff member has quick access to what will be happening next, and so we don’t get mired in any one section or technique. With the schedule finished, it’s out to the field for rehearsal.
Dress Set, Dress
Over the three months following camp, the band learns an entire show, performs it in front of an audience or a panel of judges (or both), and then takes the critique back to the practice field to make improvements. The band’s staff members rely on phones and tablets and laptops to support almost every adjustment we make.
Near the end of the season, the band visits Auburn, Washington, for its final competition. After the daylong bus ride, the students scurry out at the Westfield Southcenter in Tukwila. From a seat in a newly opened burrito eatery, the staff adds one last iOS touch to an already heavy touchscreen season: a scavenger hunt.
Using a group-texting app, students exchange messages with the staff. First to take a photo of an item costing more than $100? A shot from the neighboring Guitar Center comes back. Okay, then. First photo of an item over $5000? A picture appears from the Smart car display in front of the food court. How about video of the most students doing the ballad choreography? Three videos pop out, one with the students in flying V formation and a conductor leading them. They lean and sway, slide and bow, click their heels, and sing the music as confused shoppers pass by.
It’s all in fun and brings the students together even when they are spread out across hundreds of thousands of square feet. The scavenger hunt is what they’ll remember, but the staff knows the real reason for the texts: Every student must be with a group that has a smartphone. Almost all of them have one; those who don’t pair up with those who do. When it comes time to gather the scattered students, a text goes out. Everyone gets to the bus, and no one has to stand around waiting.
We hope to find even more ways to use the technology, from sound mixing to rehearsal tracks to synthetic sounds. The Band Parents want to buy a high-quality audio system to bring Clarkston further into the modern era of marching band. Many schools already use electronic instruments in their pit percussion sections, and one or two of the Pride’s higher-division competitors even mix and sample sounds using iPads. When the new system arrives, there will be an iPad at the ready in Clarkston.
Band, Dismissed
After finishing their final competition performance of the year, the Pride exits the field with smiles on their faces and light in their eyes. One of the smiles is Toby’s. His step size was perfect, with his toes rolling on forward march and his heels high in backward march. He and the rest of the band have just performed the best version of the show to date, and they can feel it. The crowd can feel it, too. For the second time in three years, the Pride wins the Spirit of Auburn People’s Choice Award at the Veterans Day Marching Band Championships. On the way to the photography area, students high-five and embrace in teary-eyed hugs.
When they climb the bleachers, one voice rises from the group, singing a steady, muffled note. Another adds to the sound, and then another. Soon, the whole band is singing a major chord. One senior, the band’s drum major, sings the original note two octaves higher in a lilting falsetto. When the photographer cuts them off, the band grins back for the camera. Singing isn’t usually scored in marching band, but togetherness is. Smartphones still aren’t allowed in performance uniforms, and so the moment remains in memories alone. Some things were meant to stay analog.


CountLibraryFunctions()
Syntax
Result = CountLibraryFunctions(#Library)Description
Counts the number of functions available in a library. The library must be open when this function is called.
Parameters
#Library The number of the library which contains the functions to count. This number must be identical to that used previously with OpenLibrary().
Return value
Returns the number of functions available in the library.
Supported OS
Windows, Linux


This section did not provide instructions for all of the available packages in the KDE5 Software Compilation. The included packages were selected based on what most people would want to use on a standard desktop computer.
For a full list of available packages, have a look on the KDE5 servers at http://download.kde.org/stable/release-service/19.12.2/src.
Some packages, such as kde-baseapps, kde-runtime, and kmag listed in the link above are only for the older KDE4 and cannot be used with KF5.
Some additional packages worth mentioning are:
Juk: A lightweight music player.
Dragon: A video player.
Kcalc: A scientific calculator.
Kaccessible: Integration of accessibility utilities.
Kwalletmanager: A credentials management application.
Marble: A global map program.
A variety (about 40) of KDE games including: kpat, kfourinline, and kmines.
Some packages will require additional dependencies. To determine what dependencies are needed, run from the top of the source tree:
cmake -Wno-dev -L .
Most of these packages can be built with the standard KDE5 instructions:
mkdir build && cd build && cmake -DCMAKE_INSTALL_PREFIX=$KF5_PREFIX \ -DCMAKE_BUILD_TYPE=Release \ -DBUILD_TESTING=OFF \ -Wno-dev .. && make
And as the root
user:
make install
Last updated on 2020-03-08 05:20:09 -0500


Phillip Schofield suggests I'm A Celeb time 'created drama' with 90-sec trial
Phillip Schofield has weighed in on the I’m A Celebrity Bushtucker trial that caused drama on Sunday night.
In order to win roast dinners for camp, James Haskell and Roman Kemp had to lie on a bed filled with snakes and try to unscrew stars from one side of the bed and screw them onto the other side.
Each star was in a box filled with critters and animals, including a crab that put a spanner in the works and meant they were unable to complete the trial in the 90-second time.
Advertisement Advertisement
Viewers who tuned in were convinced the trial was ‘impossible’ to do in 90 seconds, but hosts Ant and Dec tweeted that it was successfully completed within the time during the dry run.
James and Roman’s failure meant that three celebs – Ian Wright, Cliff Parisi and Andy Whyment – would miss out on the delicious dinner.
Speaking on Monday’s This Morning, Phillip felt that the show had stirred things up to create drama for the celebs.
He told ex camp mates Georgia ‘Toff’ Toffolo and Stanley Johnson: ‘The last [trial], it’s not possible in 90 seconds.’
‘If they’d gone the other end with the spiders first they would have got it easy,’ Holly said.
Phil went on: ‘The thing is if they’d all done it as well – because they don’t seem to be squeamish all of them – if they’d done that really quickly everyone would have been fed, and where’s the fun in that?
‘So now we have three people at the bottom of that who don’t get their roast dinner.’
Advertisement Advertisement
Holly added: ‘Including Ian who’s a right grumpy grump at the moment, isn’t he?’
We don’t think Ian, Cliff or Andy are going to be happy bunnies when they return to camp.
The Love Island-themed trial also saw some celebs have to pass pig testicles between them using their mouths, while other gulped down disgusting milkshakes made of blended cockroaches or vomit fruit.
I’m A Celebrity Get Me Out Of Here airs daily at 9pm on ITV.
Got a showbiz story?
If you've got a celebrity story, video or pictures get in touch with the Metro.co.uk entertainment team by emailing us<EMAIL_ADDRESS>calling 020 3615 2145 or by visiting our Submit Stuff page - we'd love to hear from you.


Features
Spend less time on tedious experiment setups and more time conducting your experiments. Whether it is replicating an experiment conducted by another researcher before or reusing a particular network topology, it all can be done with a click of the mouse.
NCL enables increased research speeds by providing researchers with the necessary tools and resources to conduct their experiments in the cloud. We provide compute clusters on demand without large capital investments.
 From data ranging from internet traffic data to mobile app data, find and use what you want to conduct and validate your research.
As a cybersecurity lab, security is of our utmost concern. All experiment session are encrypted and carried out in a contained environment, separated from other experiments, as well as the internet.
With plans of federation with other testbed networks, more research opportunities will arise.


View the status of your Victor Smart Kill rat trap in the browser, without using the mobile app. More information can be found on Github.
You must provide the email and password of your Victor Smart Kill account. They are required to view your trap information and will be sent directly to Victor. For convenience, credentials can be saved in your browser for future visits.


set x|y|z|t|e val1 <val2>
This sets one dimension of the dimension environment using grid
coordinates. You may use whatever coordinates are convenient to you.
Issuing set lon
is equivalent to issuing set x
,
both set the x
dimension. The difference is only the units
you wish to use when entering the command.
When you enter just one value, that dimension is said to be "fixed". When you enter two values, that dimension is said to be "varying". The combination of fixed and varying dimensions defines the dimension environment.
The 'set e' command is only available in GrADS version 2.0+, when the ensemble dimension was introduced.
An important note: When you enter dimensions in grid coordinates, they are always converted to world coordinates. This conversion requires some knowledge of what scaling is in use for grid to world conversions. The scaling that is used in all cases (except one) is the scaling of the DEFAULT FILE. The exception is when you supply a dimension expression within a variable specification.
If you are setting the T or E dimension using grid coordinates, the value given in val1
or
val2
may be the word "last" to set the dimension to the max value of that grid coordinate.
set t 1
This sets time to the first time in the data set -- using
grid coordinates. T is now a fixed
dimension.
set z 1 4
This sets the vertical dimension to vary between the first and the fourth levels in the data set -- using
grid coordinates. Z is now a varying
dimension.
set t 1 last
This sets time to vary between the first and the last time in the data set -- using
grid coordinates. T is now a varying
dimension.
set e last
This sets the ensemble to the final member in the data set. E is now a fixed
dimension.


Welcome to Sanppo.kr
Who we are.
A Software and Service Company for Users' Convenience.
What does the name [Sanppo] mean?
The word [Sanppo] is a pronunciation of korean word [산보] and japanese word [散歩]. Same pronunciation, Same meaning.
In english, it means [Stroll] or [Walk]
We wish to work like [Sappo] with contemplation. We wish to make useful, comfortable and joyful things like [Sappo]
Authors and Contributors
@dullfrog of Sanppo Inc.
Support or Contact
Need help? Please contact with js.jee@sanppo.kr


--- title: "Pardon our hiatus" date: 2013-05-01T03:48:13Z topic: nsidr mood: hey featureImage: "https://static.nsidr.com/images/inline/img-440-inline.jpg" shouldMoveFeatureImage: true twitter: "https://twitter.com/nsidr/status/329474964715622401" authors: - Cory Faller tags: - hiatus - n-sider reactions: laugh: 1 ---
I swear it's coincidence, but N-Sider seems to echo Nintendo's strategies more often than not. Similarities between the 2013 Wii U lineup and our editorial output are easy to make! Ha ha it's because neither of them exist. Oh man.
I'm starting to find that when it comes to hobbies, it's best not to push them. When an enjoyable outlet starts to feel more like a responsibility, it's time to take a step back. Brandon was carrying the site pretty much all by himself for a looong time there, and that's something a person can only keep up for so long. I've been torturing myself mentally for upwards of eight (wow ugh) years now on getting a fresh version of the site put together and launched, and while this interim site was a small victory, it's far from the planned end result.
The site I want to make, and the site we want to write for, changes as we ourselves change. Five years ago it was a labyrinthine and art-filled database to end all databases. These days it's a site that can get out of the way, self-maintain, and fit into our lives when we feel like we need an outlet. People get older, priorities evolve.
With that in mind, N-Sider's officially taking a break. It's not really a huge change considering this is the fourth post in four months, but it's mostly for our own peace of mind. N-Sider is something we want to do, but it's also something that preys on our minds when it feels like promised content has been left lingering. So we're gonna take some time to recharge, and work on these projects on whatever timescale feels good for us.
Hang with us on the freshly reopened-to-registrations [and regrettably now re-closed due to spammers] N-Forums, and look forward to the day when we finally complete incubating some of the sweet ideas we've been sitting on.
N-Sider will return.


Question
link
Given a string, find the number of distinct substrings of the string. Example:
input = “aaaa”,
output = 4 (the 4 substrings are “a”, “aa”, “aaa”, “aaaa”)
input = “abcd”,
output = 10 (“a”, “b”, “c”, “d”, “ab”, “bc”, “cd”, “abc”, “bcd”, “abcd”)
input = “banana”,
output = 15 (“a”, “an”, “ana”, “anan”, “anana”, “b”, “ba”, “ban”, “bana”, “banan”, “banana”, “n”, “na”, “nan”, “nana”)
This is also a question on SPOJ.
Solution
This is a very good question, which tests Suffix tree, LCP and string manipulation knowledges.
The solution is to build a suffix tree. This is because:
If you look through the prefixes of each suffix of a string, you have covered all substrings of that string.
There are 2 implementations. First one is slightly simpler.
Implementation 1
Suffix array + LCP (longest common prefix). Take “Banana” as input, then the suffixes:
0) BANANA
1) ANANA
2) NANA
3) ANA
4) NA
5) A
Sort it:
5) A
3) ANA
1) ANANA
0) BANANA
4) NA
2) NANA
Then we start calculate number of substring (that is prefixes of suffix). After removing duplicated prefix, the count is:
5) A - 1
3) ANA - 2
1) ANANA - 2
0) BANANA - 6
4) NA - 2
2) NANA - 2
Total number is:
1 + 2 + 2 + 6 + 2 + 2 = 15
But wait, realize something? “A” is simply duplicate substring in “ANA”, which appers in “ANANA”. Keep this in mind, cuz we need to observe this in the 2nd implementation, too.
Finally, the total number is calculated like this:
for each suffix
ans += length(suffix) - LCP(suffix, previous suffix)
For more details, read here.
Implementation 2
Build a suffix tree, like this:
Number of substrings is simply the sum of levels of each leaf. For the 3 branches of the suffix tree, number of levels are: 6, 5 and 4 respectively. Total = 15.


CS 518 Networked Entertainment - Fall 2015Reading ListRTCP-Based IPTV Fault Isolation and Diagnostics (Due Nov. 19th)
eMBMS: LTE Multimedia Broadcast/Multicast Services (Due Nov. 26th)
Recommendation Engines (Due Nov. 26th)
Social TV (Due Dec. 3rd)
Multi-Screen Delivery (Due Dec. 3rd)
Audience Measurements/Analytics (Due Dec. 10th)
Video Ads and User Engagement (Due Dec. 10th)
|
Last Update: March 07, 2023 |


microShop
New Purchase
Choose a product...
Dog
Food
Add to Cart
Submit
Cart
1
Water
2
Tomatoes
3
Eggs
List of Purchases
Product 01
Total: $9.99
New Item
Submit
Inventory List
Item 01
$4.99
Edit
Delete
Customers


Vibe will offer a “2⁄3” option soon, so you can remove any one item from your provision.
We love Tea too, and will be offering a Tea option very soon.
Decaf is awesome! You can specify your preference for decaffeinated coffee beans when you subscribe.
There will be a few frequency options, including the standard monthly delivery, a Double Shot option (2 provisions per month), Slow Motion (1x provision every 2 months / 2 deliveries per quarter).
Of course, just contact us<EMAIL_ADDRESS>in advance and we’ll make it happen.
Yessir! In 1996 California voters passed Prop 215 legalizing medical marijuana, and then in 2016 California voters (finally) passed Prop 64 legalizing recreational use of marijuana for adults.
Nope. The coffee and chocolate offerings are all natural, sourced from the best roasters and chocolate makers. We keep it simple.
**Edibles are awesome, we will occasionally include tasty cannabis infused treats.
You betcha!  If you can help us grow and thrive please reach out at<EMAIL_ADDRESS>Let’s chat - please reach out to<EMAIL_ADDRESS>Reach out anytime at<EMAIL_ADDRESS>or @vibeltd


Services
What we offer
Site Design
Web Hosting
Graphic design, logos, custom work
Site maintenance and updates
Domain visibility
Ad banners


Spotify Web Playback SDK Quick Start Tutorial
Open your console log:
View > Developer > JavaScript Console
Play
Pause
PAUSE


Project Listings
Project: Smart Camera;
Description: Design a smart camera that can track a certain object with certain API.;
Reward: $1200
Due Date:11/7/2019
MedData
Project: Auto Database
Description: Design a database with user-friendly interface for them to upload information
Reward: $300
Due Date: 11/5/2019
Microsoft
Project: Multi-threadead Web Crawler
Description: Create and implement a Multi-threaded web crawler to crawl all links that are under the same hostname
Reward: $500
Due Date:11/11/2019
Workday
Project: Data Visualization Improvement
Description: Given a app with inferior visualization quality, try to improve it for the users
Reward: $800
Due Date: 11/25/2019
Cisco
Project: Feedback Collection
Description: Design a feedback collection system that gather user feedbacks, and store it based into the database
Reward: $600
Due Date: 12/1/2019
Ultimate Software
Project: Search Autocomplete System
Description: Design a search autocomplete system for a search engine.
Reward: $350
Due Date: 11/15/2019


|
SUBJECT INDEX Anthropology Architecture Art Black Studies Business Ecology Economics Education Film Healthcare History Law Linguistics Literature Mass Media Medicine Music Philosophy Political Science Psychology Religion Science Shakespeare Sociology Sports Recreation Urban Studies Women's Studies |
Mass Media: PrintTo order a specific paper, click the Catalog Number button next to the Paper Title of interest. Send comments to<EMAIL_ADDRESS>Last Updated: 12/21/96 Copyright ©1996 ASM Communications, Inc. All Rights Reserved. |


Fair City's Johnny Ward hints he may find love in 2020 after splitting with girlfriend
The Dancing With The Stars pin-up recently split up with Rachel after six years together
by Jim GallagherSoap star Johnny Ward has hinted 2020 may be the year his love life blossoms - after losing his girlfriend of six years.
The actor’s career has gone into overdrive, meaning he’s been much too busy for romance.
But he reckons next year that could change.
The Dancing With The Stars pin-up, who has shot down suggestions he’s seeing his former dance partner Emily Barker, said: “Maybe I will meet someone in 2020. Who knows what will happen?”
The Fair City and Love/Hate actor added: “I’ve had no time for a love life.”
The 32-year-old star surprised fans earlier this year when he and girlfriend Rachel split up after six years.
It came after the death of his beloved father John while he was taking part in DWTS and then his mother Kathy suffered a heart attack.
Johnny added: “With myself and Rachel, it was just really unfortunate. But my relationship and that of my two sisters all ended.
“Since my father passed it was like something came into the house and ripped everything apart.
“I never saw it coming. I was very, very happy and I would love to be able to tell you all these horrible things about Rachel but I can’t because she is an absolutely incredible person.
“She is someone who I would love to still have contact with but I haven’t spoken to her in a very long time and we didn’t end on bad terms at all.
“I just needed to move back in with my mum and be there for her and it was just a very difficult time.
“I suppose that thing with my father – he made me promise that no matter what happened, I had to stay in the competition and do it for him – made it very difficult. I think I became slightly obsessed with it.
“Everyone else seemed to enjoy it but I didn’t because that’s all I was thinking about and I just needed to be on my own for a long time. It’s still a bit like that.
“I would love to say I’m back out dating but I’ve had no time. I went straight into the show, Copper Face Jacks, after double jobbing with Fair City and Dancing With the Stars rehearsals.
“It’s been so busy but I wouldn’t have it any other way. It’s a good distraction and now I’m preparing for the panto, Aladdin, in Limerick University Concert Hall.

The star revealed over the weekend that he was not seeing his 22-year-old dance partner Emily and that he looked on her like his “little sister”.
How to follow the Irish Mirror on social media
You can like our main Facebook page here.
Our Irish Mirror Sports page - which brings you all your Irish and UK sports news - can be found here.
You can also check out our Irish Mirror GAA sports page.
The Irish Mirror Twitter account is @IrishMirror while our sports account is @MirrorSportIE.
Our Instagram account can be found here.


The cloud service provides a private IaaS cloud resource for users
Use your Federal ID credentials to automatically sign in to the cloud interface.
If you are a new user, you will be asked to answer a few questions and apply for access before you can get started.
Use a certificate issued by an authorised certificate authority to sign in to the cloud interface.
This method is not currently available.


Ariana Grande Feels Much Sicker, Cancels Kentucky Concert
Ariana Grande has unfortunately had to cancel her Sunday night (November 17) concert in Lexington, Ky.
The 26-year-old “get well soon” singer has been feeling under the weather for the past month and shared the latest on how she’s feeling.
“Okay, so I woke up kind of ten times worse and it hurts SO bad to swallow. I’m not really sure what’s going on, but I unfortunately don’t think I will be able to push through tonight and I’m SO upset and sorry,” Ariana says in the video through tearful eyes.
“Ugh. I’m so upset, but of course, obviously you’ll be refunded and etc. I’m just really devastated. Thank you for understanding and sending love, etc whatever. I’ll keep you posted as soon as I know what’s going with my body, but thank you for understanding, and I am SO sorry,” she added.
Ariana‘s fans also got #GetWellSoonAriana trending on Twitter, sharing their love and understanding, and sending get well wishes.


I can't think of only one challenge, but what I do when i stand infront of a challange depends of the challenge itself. For example, if I cannot see the solution easily (speaking about code, but also in real life) I will write and make sure that I can see the problem and the goal clearly in front of me.
I will use Pseudocode or just a paper and pen to draw myself to the solution. This guides me towards the right direction, as I can see the steps I need to take on paper/pseudocode, before I'll start working on the real deal.
Another problem solving skill I'm very comfortable with is "trying something". So, after I have a clear understanding of the challenge, I will create a rough plan with a rough structure.
I'll try different paths to find a solution. On the way I'll always ask my great friend "Duck Duck" Go : ) and look for answers on https://www.w3schools.com/ thefreecodecamp, developer.mozilla...
When this doesn't help, I'll start talking to myself : ) or to my dog. This is not a sign of insanity, but smart problem solving. I'll talk to try to find understanding in the actual question I have. Furthermore, I reflect on the way in hope to find a solution in my own words.
I also enjoy "Reading error messages" which provide me with a great step by step guidance. It is so nice to work that way, as I can celebrate the success on a step by step basis.
"Console.log" is also a great support.
And when all these options don't help, I'll ask my amazing peers for help - and I have to say, that they are always extremely helpful.
Sometimes, I'll also ask my mentor for help. But that's the last resource, as I know that she's super busy : )
Yes, I do like to reflect a lot (especially on paper) - That's how I make sense of the world & Code & myself.


public class ICommand<T> implements ICommandExecutable<T>
An abstract class which represents a command. All commands implement interface ICommandExecutable
as their main
executing method or function.
interface ICommandExecutable
| Constructor and Description |
|---|
ICommand(CommandProperties props)
Constructor requiring a
class CommandProperties instance. |
ICommand(java.lang.String prefix,
java.lang.String uniqueName,
java.lang.String description,
java.lang.String usage,
boolean execWithSubcommands,
boolean isDisabled,
java.lang.String aliases)
Constructor which takes in values for
class CommandProperties directly. |
ICommand(java.lang.String prefix,
java.lang.String uniqueName,
java.lang.String description,
java.lang.String usage,
boolean execWithSubcommands,
boolean isDisabled,
java.util.Set<java.lang.String> aliases)
Constructor which takes in values for
class CommandProperties directly. |
| Modifier and Type | Method and Description |
|---|---|
ICommand<T> |
addSubcommand(ICommand<?> subCommand)
Adds a provided command as a subcommand to this command.
|
void |
deleteSubcommands()
Removes all subcommands associated to this command. This clears the subCommandMap map and subCommands set.
|
boolean |
equals(java.lang.Object other)
Equals comparator takes into account the props and subCommands set.
|
CommandProperties |
getProps()
The command properties.
|
java.util.Map<java.lang.String,com.github.kvnxiao.kommandant.command.ICommand> |
getSubCommandMap()
A sorted map of String to
class ICommand which maps all subcommand aliases to the respective commands. |
java.util.Set<com.github.kvnxiao.kommandant.command.ICommand> |
getSubCommands()
A set containing all subcommands registered to this command.
|
boolean |
hasSubcommands()
Checks whether this command has subcommands.
|
int |
hashCode()
Hashcode takes into account the props and subCommands set.
|
void |
setProps(CommandProperties p)
The command properties.
|
java.lang.String |
toString()
Overrided toString method returns the CommandProperties.uniqueName.
|
execute
public ICommand(CommandProperties props)
Constructor requiring a class CommandProperties
instance.
props
- The command properties.class CommandProperties
public ICommand(java.lang.String prefix, java.lang.String uniqueName, java.lang.String description, java.lang.String usage, boolean execWithSubcommands, boolean isDisabled, java.lang.String aliases)
Constructor which takes in values for class CommandProperties
directly.
class CommandProperties
public ICommand(java.lang.String prefix, java.lang.String uniqueName, java.lang.String description, java.lang.String usage, boolean execWithSubcommands, boolean isDisabled, java.util.Set<java.lang.String> aliases)
Constructor which takes in values for class CommandProperties
directly.
class CommandProperties
public java.util.Map<java.lang.String,com.github.kvnxiao.kommandant.command.ICommand> getSubCommandMap()
A sorted map of String to class ICommand
which maps all subcommand aliases to the respective commands.
class ICommand
public java.util.Set<com.github.kvnxiao.kommandant.command.ICommand> getSubCommands()
A set containing all subcommands registered to this command.
public ICommand<T> addSubcommand(ICommand<?> subCommand)
Adds a provided command as a subcommand to this command.
subCommand
- The subcommand to add.class ICommand
The current command (NOT the subcommand!).public boolean hasSubcommands()
Checks whether this command has subcommands.
public void deleteSubcommands()
Removes all subcommands associated to this command. This clears the subCommandMap map and subCommands set.
public java.lang.String toString()
Overrided toString method returns the CommandProperties.uniqueName.
class CommandProperties
public boolean equals(java.lang.Object other)
Equals comparator takes into account the props and subCommands set.
public int hashCode()
Hashcode takes into account the props and subCommands set.
public CommandProperties getProps()
The command properties.
public void setProps(CommandProperties p)
The command properties.
p
- The command properties.


Large Form
If you have a large form with many fields you can render the form in a variety of ways. There is no difference how you position HTML.
The w2form object binds to the fields that you specify.
There are several helper classes for variable width for labels and fields.
In the exampble below you can see w2ui-span4 and w2ui-span5 classes, where w2ui-span4 = 80px and w2ui-span5 = 100px. There
are w2ui-span1, ..., w2ui-span10, where each step is 20px.


--- bg: "icecave.jpeg" layout: default crawlertitle: "Yi Lian's Personal Website" title: "Yi Lian" summary: "About" ---
I am a PhD student in Biostatistics in the Department of Epidemiology, Biostatistics and Occupational Health at McGill University, Montréal, Canada.
I received my undergraduate degrees in Pharmacology and Statistics and my Master's degree in Epidemiology from McGill.
I will be doing my postdoc


syp/stories/login-prediction.story
Narrative:
In order to share what I think with other people
As a user
I want to login into the system
Scenario: Login with valid data
Given I am on Share your predictions home page
When I login as merlo2013 with password merlo2013
Then I must see the button Log Out
And Your Lists screen must be opened with name Your Lists
And I click on logout button
When I login as merlo2013 with password merlo2013
Then I must see the button Log Out
And Your Lists screen must be opened with name Your Lists
And I click on logout button
When I login as leandro with password 1234567
Then I must see the button Log Out
And Your Lists screen must be opened with name Your Lists
And I click on logout button
When I login as brunotx1 with password 12345678
Then I must see the button Log Out
And Your Lists screen must be opened with name Your Lists
And I click on logout button
Scenario: Login with invalid login
Given I am on Share your predictions home page
When I login as merlonetti2013 with password merlo2013
Then I must see the login error message Please try again.
When I login as merlonetti with password merlo2013
Then I must see the login error message Please try again.
When I login as merlone with password merlo2013
Then I must see the login error message Please try again.
When I login as merlo2014 with password merlo2013
Then I must see the login error message Please try again.
Scenario: Login with invalid password
Given I am on Share your predictions home page
When I login as merlo2013 with password merloXXXX
Then I must see the login error message Please try again.
When I login as merlo2013 with password merlo20133
Then I must see the login error message Please try again.
When I login as merlo2013 with password merloBarbosa
Then I must see the login error message Please try again.
When I login as merlo2013 with password merlonet
Then I must see the login error message Please try again.


SQLAlchemy provides abstractions for most common database data types, and a mechanism for specifying your own custom data types.
The methods and attributes of type objects are rarely used directly. Type objects are supplied to Table definitions and can be supplied as type hints to functions for occasions where the database driver returns an incorrect type.
>>> users = Table('users', metadata,
... Column('id', Integer, primary_key=True)
... Column('login', String(32))
... )
SQLAlchemy will use the Integer and String(32) type information when issuing a CREATE TABLE statement and will use it again when reading back rows SELECTed from the database. Functions that accept a type (such as Column()) will typically accept a type class or instance; Integer is equivalent to Integer() with no construction arguments in this case.
Generic types specify a column that can read, write and store a particular type of Python data. SQLAlchemy will choose the best database column type available on the target database when issuing a CREATE TABLE statement. For complete control over which column type is emitted in CREATE TABLE, such as VARCHAR see SQL Standard Types and the other sections of this chapter.
Bases: sqlalchemy.types.Integer
A type for bigger int integers.
Typically generates a BIGINT in DDL, and otherwise acts like a normal Integer on the Python side.
Bases: sqlalchemy.types.TypeEngine, sqlalchemy.types.SchemaType
A bool datatype.
Boolean typically uses BOOLEAN or SMALLINT on the DDL side, and on the Python side deals in True or False.
Construct a Boolean.
| Parameters: |
|
|---|
Bases: sqlalchemy.types._DateAffinity, sqlalchemy.types.TypeEngine
A type for datetime.date() objects.
Bases: sqlalchemy.types._DateAffinity, sqlalchemy.types.TypeEngine
A type for datetime.datetime() objects.
Date and time types return objects from the Python datetime module. Most DBAPIs have built in support for the datetime module, with the noted exception of SQLite. In the case of SQLite, date and time types are stored as strings which are then converted back to datetime objects when rows are returned.
Bases: sqlalchemy.types.String, sqlalchemy.types.SchemaType
Generic Enum Type.
The Enum type provides a set of possible string values which the column is constrained towards.
By default, uses the backend’s native ENUM type if available, else uses VARCHAR + a CHECK constraint.
See also
ENUM - PostgreSQL-specific type, which has additional functionality.
Construct an enum.
Keyword arguments which don’t apply to a specific backend are ignored by that backend.
| Parameters: |
|
|---|
Issue CREATE ddl for this type, if applicable.
Issue DROP ddl for this type, if applicable.
Bases: sqlalchemy.types.Numeric
A type for float numbers.
Returns Python float objects by default, applying conversion as needed.
Construct a Float.
| Parameters: |
|
|---|
Bases: sqlalchemy.types._DateAffinity, sqlalchemy.types.TypeEngine
A type for int integers.
Bases: sqlalchemy.types._DateAffinity, sqlalchemy.types.TypeDecorator
A type for datetime.timedelta() objects.
The Interval type deals with datetime.timedelta objects. In PostgreSQL, the native INTERVAL type is used; for others, the value is stored as a date which is relative to the “epoch” (Jan. 1, 1970).
Note that the Interval type does not currently provide date arithmetic operations on platforms which do not support interval types natively. Such operations usually require transformation of both sides of the expression (such as, conversion of both sides into integer epoch values first) which currently is a manual procedure (such as via func).
Construct an Interval object.
| Parameters: |
|
|---|
See TypeEngine.coerce_compared_value() for a description.
Bases: sqlalchemy.types._Binary
A type for large binary byte data.
The Binary type generates BLOB or BYTEA when tables are created, and also converts incoming values using the Binary callable provided by each DB-API.
Construct a LargeBinary type.
| Parameters: | length – optional, a length for the column for use in DDL statements, for those BLOB types that accept a length (i.e. MySQL). It does not produce a small BINARY/VARBINARY type - use the BINARY/VARBINARY types specifically for those. May be safely omitted if no CREATE TABLE will be issued. Certain databases may require a length for use in DDL, and will raise an exception when the CREATE TABLE DDL is issued. |
|---|
Bases: sqlalchemy.types._DateAffinity, sqlalchemy.types.TypeEngine
A type for fixed precision numbers.
Typically generates DECIMAL or NUMERIC. Returns decimal.Decimal objects by default, applying conversion as needed.
Note
The cdecimal library is a high performing alternative to Python’s built-in decimal.Decimal type, which performs very poorly in high volume situations. SQLAlchemy 0.7 is tested against cdecimal and supports it fully. The type is not necessarily supported by DBAPI implementations however, most of which contain an import for plain decimal in their source code, even though some such as psycopg2 provide hooks for alternate adapters. SQLAlchemy imports decimal globally as well. The most straightforward and foolproof way to use “cdecimal” given current DBAPI and Python support is to patch it directly into sys.modules before anything else is imported:
import sys
import cdecimal
sys.modules["decimal"] = cdecimal
While the global patch is a little ugly, it’s particularly important to use just one decimal library at a time since Python Decimal and cdecimal Decimal objects are not currently compatible with each other:
>>> import cdecimal
>>> import decimal
>>> decimal.Decimal("10") == cdecimal.Decimal("10")
False
SQLAlchemy will provide more natural support of cdecimal if and when it becomes a standard part of Python installations and is supported by all DBAPIs.
Construct a Numeric.
| Parameters: |
|
|---|
When using the Numeric type, care should be taken to ensure that the asdecimal setting is apppropriate for the DBAPI in use - when Numeric applies a conversion from Decimal->float or float-> Decimal, this conversion incurs an additional performance overhead for all result columns received.
DBAPIs that return Decimal natively (e.g. psycopg2) will have better accuracy and higher performance with a setting of True, as the native translation to Decimal reduces the amount of floating- point issues at play, and the Numeric type itself doesn’t need to apply any further conversions. However, another DBAPI which returns floats natively will incur an additional conversion overhead, and is still subject to floating point data loss - in which case asdecimal=False will at least remove the extra conversion overhead.
Bases: sqlalchemy.types.TypeDecorator
Holds Python objects, which are serialized using pickle.
PickleType builds upon the Binary type to apply Python’s pickle.dumps() to incoming objects, and pickle.loads() on the way out, allowing any pickleable Python object to be stored as a serialized binary field.
To allow ORM change events to propagate for elements associated with PickleType, see Mutation Tracking.
Construct a PickleType.
| Parameters: |
|
|---|
alias of LargeBinary
Bases: sqlalchemy.events.SchemaEventTarget
Mark a type as possibly requiring schema-level DDL for usage.
Supports types that must be explicitly created/dropped (i.e. PG ENUM type) as well as types that are complimented by table or schema level constraints, triggers, and other rules.
SchemaType classes can also be targets for the DDLEvents.before_parent_attach() and DDLEvents.after_parent_attach() events, where the events fire off surrounding the association of the type object with a parent Column.
Issue CREATE ddl for this type, if applicable.
Issue DROP ddl for this type, if applicable.
Bases: sqlalchemy.types.Integer
A type for smaller int integers.
Typically generates a SMALLINT in DDL, and otherwise acts like a normal Integer on the Python side.
Bases: sqlalchemy.types.Concatenable, sqlalchemy.types.TypeEngine
The base for all string and character types.
In SQL, corresponds to VARCHAR. Can also take Python unicode objects and encode to the database’s encoding in bind params (and the reverse for result sets.)
The length field is usually required when the String type is used within a CREATE TABLE statement, as VARCHAR requires a length on most databases.
Create a string-holding type.
| Parameters: |
|
|---|
Bases: sqlalchemy.types.String
A variably sized string type.
In SQL, usually corresponds to CLOB or TEXT. Can also take Python unicode objects and encode to the database’s encoding in bind params (and the reverse for result sets.) In general, TEXT objects do not have a length; while some databases will accept a length argument here, it will be rejected by others.
Bases: sqlalchemy.types._DateAffinity, sqlalchemy.types.TypeEngine
A type for datetime.time() objects.
Bases: sqlalchemy.types.String
A variable length Unicode string type.
The Unicode type is a String subclass that assumes input and output as Python unicode data, and in that regard is equivalent to the usage of the convert_unicode flag with the String type. However, unlike plain String, it also implies an underlying column type that is explicitly supporting of non-ASCII data, such as NVARCHAR on Oracle and SQL Server. This can impact the output of CREATE TABLE statements and CAST functions at the dialect level, and can also affect the handling of bound parameters in some specific DBAPI scenarios.
The encoding used by the Unicode type is usually determined by the DBAPI itself; most modern DBAPIs feature support for Python unicode objects as bound values and result set values, and the encoding should be configured as detailed in the notes for the target DBAPI in the Dialects section.
For those DBAPIs which do not support, or are not configured to accommodate Python unicode objects directly, SQLAlchemy does the encoding and decoding outside of the DBAPI. The encoding in this scenario is determined by the encoding flag passed to create_engine().
When using the Unicode type, it is only appropriate to pass Python unicode objects, and not plain str. If a plain str is passed under Python 2, a warning is emitted. If you notice your application emitting these warnings but you’re not sure of the source of them, the Python warnings filter, documented at http://docs.python.org/library/warnings.html, can be used to turn these warnings into exceptions which will illustrate a stack trace:
import warnings
warnings.simplefilter('error')
For an application that wishes to pass plain bytestrings and Python unicode objects to the Unicode type equally, the bytestrings must first be decoded into unicode. The recipe at Coercing Encoded Strings to Unicode illustrates how this is done.
See also:
UnicodeText - unlengthed textual counterpart to Unicode.
Bases: sqlalchemy.types.Text
An unbounded-length Unicode string type.
See Unicode for details on the unicode behavior of this object.
Like Unicode, usage the UnicodeText type implies a unicode-capable type being used on the backend, such as NCLOB, NTEXT.
The SQL standard types always create database column types of the same name when CREATE TABLE is issued. Some types may not be supported on all databases.
Bases: sqlalchemy.types.BigInteger
The SQL BIGINT type.
Bases: sqlalchemy.types._Binary
The SQL BINARY type.
Bases: sqlalchemy.types.LargeBinary
The SQL BLOB type.
Bases: sqlalchemy.types.Boolean
The SQL BOOLEAN type.
Bases: sqlalchemy.types.String
The SQL CHAR type.
Bases: sqlalchemy.types.Text
The CLOB type.
This type is found in Oracle and Informix.
Bases: sqlalchemy.types.Date
The SQL DATE type.
Bases: sqlalchemy.types.DateTime
The SQL DATETIME type.
Bases: sqlalchemy.types.Numeric
The SQL DECIMAL type.
Bases: sqlalchemy.types.Float
The SQL FLOAT type.
Bases: sqlalchemy.types.Integer
The SQL INT or INTEGER type.
Bases: sqlalchemy.types.Unicode
The SQL NCHAR type.
Bases: sqlalchemy.types.Unicode
The SQL NVARCHAR type.
Bases: sqlalchemy.types.Numeric
The SQL NUMERIC type.
Bases: sqlalchemy.types.Float
The SQL REAL type.
Bases: sqlalchemy.types.SmallInteger
The SQL SMALLINT type.
Bases: sqlalchemy.types.Text
The SQL TEXT type.
Bases: sqlalchemy.types.Time
The SQL TIME type.
Bases: sqlalchemy.types.DateTime
The SQL TIMESTAMP type.
Bases: sqlalchemy.types._Binary
The SQL VARBINARY type.
Bases: sqlalchemy.types.String
The SQL VARCHAR type.
Database-specific types are also available for import from each database’s dialect module. See the sqlalchemy.dialects_toplevel reference for the database you’re interested in.
For example, MySQL has a BIGINT type and PostgreSQL has an INET type. To use these, import them from the module explicitly:
from sqlalchemy.dialects import mysql
table = Table('foo', metadata,
Column('id', mysql.BIGINT),
Column('enumerates', mysql.ENUM('a', 'b', 'c'))
)
Or some PostgreSQL types:
from sqlalchemy.dialects import postgresql
table = Table('foo', metadata,
Column('ipaddress', postgresql.INET),
Column('elements', postgresql.ARRAY(String))
)
Each dialect provides the full set of typenames supported by that backend within its __all__ collection, so that a simple import * or similar will import all supported types as implemented for that backend:
from sqlalchemy.dialects.postgresql import *
t = Table('mytable', metadata,
Column('id', INTEGER, primary_key=True),
Column('name', VARCHAR(300)),
Column('inetaddr', INET)
)
Where above, the INTEGER and VARCHAR types are ultimately from sqlalchemy.types, and INET is specific to the Postgresql dialect.
Some dialect level types have the same name as the SQL standard type, but also provide additional arguments. For example, MySQL implements the full range of character and string types including additional arguments such as collation and charset:
from sqlalchemy.dialects.mysql import VARCHAR, TEXT
table = Table('foo', meta,
Column('col1', VARCHAR(200, collation='binary')),
Column('col2', TEXT(charset='latin1'))
)
A variety of methods exist to redefine the behavior of existing types as well as to provide new ones.
A frequent need is to force the “string” version of a type, that is the one rendered in a CREATE TABLE statement or other SQL function like CAST, to be changed. For example, an application may want to force the rendering of BINARY for all platforms except for one, in which is wants BLOB to be rendered. Usage of an existing generic type, in this case LargeBinary, is preferred for most use cases. But to control types more accurately, a compilation directive that is per-dialect can be associated with any type:
from sqlalchemy.ext.compiler import compiles
from sqlalchemy.types import BINARY
@compiles(BINARY, "sqlite")
def compile_binary_sqlite(type_, compiler, **kw):
return "BLOB"
The above code allows the usage of types.BINARY, which will produce the string BINARY against all backends except SQLite, in which case it will produce BLOB.
See the section Changing Compilation of Types, a subsection of Custom SQL Constructs and Compilation Extension, for additional examples.
The TypeDecorator allows the creation of custom types which add bind-parameter and result-processing behavior to an existing type object. It is used when additional in-Python marshaling of data to and from the database is required.
Note
The bind- and result-processing of TypeDecorator is in addition to the processing already performed by the hosted type, which is customized by SQLAlchemy on a per-DBAPI basis to perform processing specific to that DBAPI. To change the DBAPI-level processing for an existing type, see the section Replacing the Bind/Result Processing of Existing Types.
Bases: sqlalchemy.types.TypeEngine
Allows the creation of types which add additional functionality to an existing type.
This method is preferred to direct subclassing of SQLAlchemy’s built-in types as it ensures that all required functionality of the underlying type is kept in place.
Typical usage:
import sqlalchemy.types as types
class MyType(types.TypeDecorator):
'''Prefixes Unicode values with "PREFIX:" on the way in and
strips it off on the way out.
'''
impl = types.Unicode
def process_bind_param(self, value, dialect):
return "PREFIX:" + value
def process_result_value(self, value, dialect):
return value[7:]
def copy(self):
return MyType(self.impl.length)
The class-level “impl” attribute is required, and can reference any TypeEngine class. Alternatively, the load_dialect_impl() method can be used to provide different type classes based on the dialect given; in this case, the “impl” variable can reference TypeEngine as a placeholder.
Types that receive a Python type that isn’t similar to the ultimate type used may want to define the TypeDecorator.coerce_compared_value() method. This is used to give the expression system a hint when coercing Python objects into bind parameters within expressions. Consider this expression:
mytable.c.somecol + datetime.date(2009, 5, 15)
Above, if “somecol” is an Integer variant, it makes sense that we’re doing date arithmetic, where above is usually interpreted by databases as adding a number of days to the given date. The expression system does the right thing by not attempting to coerce the “date()” value into an integer-oriented bind parameter.
However, in the case of TypeDecorator, we are usually changing an incoming Python type to something new - TypeDecorator by default will “coerce” the non-typed side to be the same type as itself. Such as below, we define an “epoch” type that stores a date value as an integer:
class MyEpochType(types.TypeDecorator):
impl = types.Integer
epoch = datetime.date(1970, 1, 1)
def process_bind_param(self, value, dialect):
return (value - self.epoch).days
def process_result_value(self, value, dialect):
return self.epoch + timedelta(days=value)
Our expression of somecol + date with the above type will coerce the “date” on the right side to also be treated as MyEpochType.
This behavior can be overridden via the coerce_compared_value() method, which returns a type that should be used for the value of the expression. Below we set it such that an integer value will be treated as an Integer, and any other value is assumed to be a date and will be treated as a MyEpochType:
def coerce_compared_value(self, op, value):
if isinstance(value, int):
return Integer()
else:
return self
Construct a TypeDecorator.
Arguments sent here are passed to the constructor of the class assigned to the impl class level attribute, assuming the impl is a callable, and the resulting object is assigned to the self.impl instance attribute (thus overriding the class attribute of the same name).
If the class level impl is not a callable (the unusual case), it will be assigned to the same instance attribute ‘as-is’, ignoring those arguments passed to the constructor.
Subclasses can override this to customize the generation of self.impl entirely.
Produce an “adapted” form of this type, given an “impl” class to work with.
This method is used internally to associate generic types with “implementation” types that are specific to a particular dialect.
“Given a bind value (i.e. a BindParameter instance), return a SQL expression in its place.
This is typically a SQL function that wraps the existing bound parameter within the statement. It is used for special data types that require literals being wrapped in some special database function in order to coerce an application-level value into a database-specific format. It is the SQL analogue of the TypeEngine.bind_processor() method.
The method is evaluated at statement compile time, as opposed to statement construction time.
Note that this method, when implemented, should always return the exact same structure, without any conditional logic, as it may be used in an executemany() call against an arbitrary number of bound parameter sets.
See also:
Provide a bound value processing function for the given Dialect.
This is the method that fulfills the TypeEngine contract for bound value conversion. TypeDecorator will wrap a user-defined implementation of process_bind_param() here.
User-defined code can override this method directly, though its likely best to use process_bind_param() so that the processing provided by self.impl is maintained.
| Parameters: | dialect – Dialect instance in use. |
|---|
This method is the reverse counterpart to the result_processor() method of this class.
Suggest a type for a ‘coerced’ Python value in an expression.
By default, returns self. This method is called by the expression system when an object using this type is on the left or right side of an expression against a plain Python object which does not yet have a SQLAlchemy type assigned:
expr = table.c.somecolumn + 35
Where above, if somecolumn uses this type, this method will be called with the value operator.add and 35. The return value is whatever SQLAlchemy type should be used for 35 for this particular operation.
Specify those Python types which should be coerced at the expression level to “IS <constant>” when compared using == (and same for
IS NOT in conjunction with !=.
For most SQLAlchemy types, this includes NoneType, as well as bool.
TypeDecorator modifies this list to only include NoneType, as typedecorator implementations that deal with boolean types are common.
Custom TypeDecorator classes can override this attribute to return an empty tuple, in which case no values will be coerced to constants.
Given a SELECT column expression, return a wrapping SQL expression.
This is typically a SQL function that wraps a column expression as rendered in the columns clause of a SELECT statement. It is used for special data types that require columns to be wrapped in some special database function in order to coerce the value before being sent back to the application. It is the SQL analogue of the TypeEngine.result_processor() method.
The method is evaluated at statement compile time, as opposed to statement construction time.
See also:
Given two values, compare them for equality.
By default this calls upon TypeEngine.compare_values() of the underlying “impl”, which in turn usually uses the Python equals operator ==.
This function is used by the ORM to compare an original-loaded value with an intercepted “changed” value, to determine if a net change has occurred.
Produce a string-compiled form of this TypeEngine.
When called with no arguments, uses a “default” dialect to produce a string result.
| Parameters: | dialect – a Dialect instance. |
|---|
Produce a copy of this TypeDecorator instance.
This is a shallow copy and is provided to fulfill part of the TypeEngine contract. It usually does not need to be overridden unless the user-defined TypeDecorator has local state that should be deep-copied.
Return a dialect-specific implementation for this TypeEngine.
Return the DBAPI type object represented by this TypeDecorator.
By default this calls upon TypeEngine.get_dbapi_type() of the underlying “impl”.
Return a TypeEngine object corresponding to a dialect.
This is an end-user override hook that can be used to provide differing types depending on the given dialect. It is used by the TypeDecorator implementation of type_engine() to help determine what type should ultimately be returned for a given TypeDecorator.
By default returns self.impl.
Receive a bound parameter value to be converted.
Subclasses override this method to return the value that should be passed along to the underlying TypeEngine object, and from there to the DBAPI execute() method.
The operation could be anything desired to perform custom behavior, such as transforming or serializing data. This could also be used as a hook for validating logic.
This operation should be designed with the reverse operation in mind, which would be the process_result_value method of this class.
| Parameters: |
|
|---|
Receive a result-row column value to be converted.
Subclasses should implement this method to operate on data fetched from the database.
Subclasses override this method to return the value that should be passed back to the application, given a value that is already processed by the underlying TypeEngine object, originally from the DBAPI cursor method fetchone() or similar.
The operation could be anything desired to perform custom behavior, such as transforming or serializing data. This could also be used as a hook for validating logic.
| Parameters: |
|
|---|
This operation should be designed to be reversible by the “process_bind_param” method of this class.
Return the Python type object expected to be returned by instances of this type, if known.
Basically, for those types which enforce a return type, or are known across the board to do such for all common DBAPIs (like int for example), will return that type.
If a return type is not defined, raises NotImplementedError.
Note that any type also accommodates NULL in SQL which means you can also get back None from any type in practice.
Provide a result value processing function for the given Dialect.
This is the method that fulfills the TypeEngine contract for result value conversion. TypeDecorator will wrap a user-defined implementation of process_result_value() here.
User-defined code can override this method directly, though its likely best to use process_result_value() so that the processing provided by self.impl is maintained.
| Parameters: |
|
|---|
This method is the reverse counterpart to the bind_processor() method of this class.
Return a dialect-specific TypeEngine instance for this TypeDecorator.
In most cases this returns a dialect-adapted form of the TypeEngine type represented by self.impl. Makes usage of dialect_impl() but also traverses into wrapped TypeDecorator instances. Behavior can be customized here by overriding load_dialect_impl().
Produce a new type object that will utilize the given type when applied to the dialect of the given name.
e.g.:
from sqlalchemy.types import String
from sqlalchemy.dialects import mysql
s = String()
s = s.with_variant(mysql.VARCHAR(collation='foo'), 'mysql')
The construction of TypeEngine.with_variant() is always from the “fallback” type to that which is dialect specific. The returned type is an instance of Variant, which itself provides a with_variant() that can be called repeatedly.
| Parameters: |
|
|---|
New in version 0.7.2.
A few key TypeDecorator recipes follow.
A common source of confusion regarding the Unicode type is that it is intended to deal only with Python unicode objects on the Python side, meaning values passed to it as bind parameters must be of the form u'some string' if using Python 2 and not 3. The encoding/decoding functions it performs are only to suit what the DBAPI in use requires, and are primarily a private implementation detail.
The use case of a type that can safely receive Python bytestrings, that is strings that contain non-ASCII characters and are not u'' objects in Python 2, can be achieved using a TypeDecorator which coerces as needed:
from sqlalchemy.types import TypeDecorator, Unicode
class CoerceUTF8(TypeDecorator):
"""Safely coerce Python bytestrings to Unicode
before passing off to the database."""
impl = Unicode
def process_bind_param(self, value, dialect):
if isinstance(value, str):
value = value.decode('utf-8')
return value
Some database connectors like those of SQL Server choke if a Decimal is passed with too many decimal places. Here’s a recipe that rounds them down:
from sqlalchemy.types import TypeDecorator, Numeric
from decimal import Decimal
class SafeNumeric(TypeDecorator):
"""Adds quantization to Numeric."""
impl = Numeric
def __init__(self, *arg, **kw):
TypeDecorator.__init__(self, *arg, **kw)
self.quantize_int = -(self.impl.precision - self.impl.scale)
self.quantize = Decimal(10) ** self.quantize_int
def process_bind_param(self, value, dialect):
if isinstance(value, Decimal) and \
value.as_tuple()[2] < self.quantize_int:
value = value.quantize(self.quantize)
return value
Receives and returns Python uuid() objects. Uses the PG UUID type when using Postgresql, CHAR(32) on other backends, storing them in stringified hex format. Can be modified to store binary in CHAR(16) if desired:
from sqlalchemy.types import TypeDecorator, CHAR
from sqlalchemy.dialects.postgresql import UUID
import uuid
class GUID(TypeDecorator):
"""Platform-independent GUID type.
Uses Postgresql's UUID type, otherwise uses
CHAR(32), storing as stringified hex values.
"""
impl = CHAR
def load_dialect_impl(self, dialect):
if dialect.name == 'postgresql':
return dialect.type_descriptor(UUID())
else:
return dialect.type_descriptor(CHAR(32))
def process_bind_param(self, value, dialect):
if value is None:
return value
elif dialect.name == 'postgresql':
return str(value)
else:
if not isinstance(value, uuid.UUID):
return "%.32x" % uuid.UUID(value)
else:
# hexstring
return "%.32x" % value
def process_result_value(self, value, dialect):
if value is None:
return value
else:
return uuid.UUID(value)
This type uses simplejson to marshal Python data structures to/from JSON. Can be modified to use Python’s builtin json encoder:
from sqlalchemy.types import TypeDecorator, VARCHAR
import json
class JSONEncodedDict(TypeDecorator):
"""Represents an immutable structure as a json-encoded string.
Usage::
JSONEncodedDict(255)
"""
impl = VARCHAR
def process_bind_param(self, value, dialect):
if value is not None:
value = json.dumps(value)
return value
def process_result_value(self, value, dialect):
if value is not None:
value = json.loads(value)
return value
Note that the ORM by default will not detect “mutability” on such a type - meaning, in-place changes to values will not be detected and will not be flushed. Without further steps, you instead would need to replace the existing value with a new one on each parent object to detect changes. Note that there’s nothing wrong with this, as many applications may not require that the values are ever mutated once created. For those which do have this requirment, support for mutability is best applied using the sqlalchemy.ext.mutable extension - see the example in Mutation Tracking.
Most augmentation of type behavior at the bind/result level is achieved using TypeDecorator. For the rare scenario where the specific processing applied by SQLAlchemy at the DBAPI level needs to be replaced, the SQLAlchemy type can be subclassed directly, and the bind_processor() or result_processor() methods can be overridden. Doing so requires that the adapt() method also be overridden. This method is the mechanism by which SQLAlchemy produces DBAPI-specific type behavior during statement execution. Overriding it allows a copy of the custom type to be used in lieu of a DBAPI-specific type. Below we subclass the types.TIME type to have custom result processing behavior. The process() function will receive value from the DBAPI cursor directly:
class MySpecialTime(TIME):
def __init__(self, special_argument):
super(MySpecialTime, self).__init__()
self.special_argument = special_argument
def result_processor(self, dialect, coltype):
import datetime
time = datetime.time
def process(value):
if value is not None:
microseconds = value.microseconds
seconds = value.seconds
minutes = seconds / 60
return time(
minutes / 60,
minutes % 60,
seconds - minutes * 60,
microseconds)
else:
return None
return process
def adapt(self, impltype):
return MySpecialTime(self.special_argument)
As seen in the sections Augmenting Existing Types and Replacing the Bind/Result Processing of Existing Types, SQLAlchemy allows Python functions to be invoked both when parameters are sent to a statement, as well as when result rows are loaded from the database, to apply transformations to the values as they are sent to or from the database. It is also possible to define SQL-level transformations as well. The rationale here is when only the relational database contains a particular series of functions that are necessary to coerce incoming and outgoing data between an application and persistence format. Examples include using database-defined encryption/decryption functions, as well as stored procedures that handle geographic data. The Postgis extension to Postgresql includes an extensive array of SQL functions that are necessary for coercing data into particular formats.
Any TypeEngine, UserDefinedType or TypeDecorator subclass can include implementations of TypeEngine.bind_expression() and/or TypeEngine.column_expression(), which when defined to return a non-None value should return a ColumnElement expression to be injected into the SQL statement, either surrounding bound parameters or a column expression. For example, to build a Geometry type which will apply the Postgis function ST_GeomFromText to all outgoing values and the function ST_AsText to all incoming data, we can create our own subclass of UserDefinedType which provides these methods in conjunction with func:
from sqlalchemy import func
from sqlalchemy.types import UserDefinedType
class Geometry(UserDefinedType):
def get_col_spec(self):
return "GEOMETRY"
def bind_expression(self, bindvalue):
return func.ST_GeomFromText(bindvalue, type_=self)
def column_expression(self, col):
return func.ST_AsText(col, type_=self)
We can apply the Geometry type into Table metadata and use it in a select() construct:
geometry = Table('geometry', metadata,
Column('geom_id', Integer, primary_key=True),
Column('geom_data', Geometry)
)
print select([geometry]).where(
geometry.c.geom_data == 'LINESTRING(189412 252431,189631 259122)')
The resulting SQL embeds both functions as appropriate. ST_AsText is applied to the columns clause so that the return value is run through the function before passing into a result set, and ST_GeomFromText is run on the bound parameter so that the passed-in value is converted:
SELECT geometry.geom_id, ST_AsText(geometry.geom_data) AS geom_data_1
FROM geometry
WHERE geometry.geom_data = ST_GeomFromText(:geom_data_2)
The TypeEngine.column_expression() method interacts with the mechanics of the compiler such that the SQL expression does not interfere with the labeling of the wrapped expression. Such as, if we rendered a select() against a label() of our expression, the string label is moved to the outside of the wrapped expression:
print select([geometry.c.geom_data.label('my_data')])
Output:
SELECT ST_AsText(geometry.geom_data) AS my_data
FROM geometry
For an example of subclassing a built in type directly, we subclass postgresql.BYTEA to provide a PGPString, which will make use of the Postgresql pgcrypto extension to encrpyt/decrypt values transparently:
from sqlalchemy import create_engine, String, select, func, \
MetaData, Table, Column, type_coerce
from sqlalchemy.dialects.postgresql import BYTEA
class PGPString(BYTEA):
def __init__(self, passphrase, length=None):
super(PGPString, self).__init__(length)
self.passphrase = passphrase
def bind_expression(self, bindvalue):
# convert the bind's type from PGPString to
# String, so that it's passed to psycopg2 as is without
# a dbapi.Binary wrapper
bindvalue = type_coerce(bindvalue, String)
return func.pgp_sym_encrypt(bindvalue, self.passphrase)
def column_expression(self, col):
return func.pgp_sym_decrypt(col, self.passphrase)
metadata = MetaData()
message = Table('message', metadata,
Column('username', String(50)),
Column('message',
PGPString("this is my passphrase", length=1000)),
)
engine = create_engine("postgresql://scott:tiger@localhost/test", echo=True)
with engine.begin() as conn:
metadata.create_all(conn)
conn.execute(message.insert(), username="some user",
message="this is my message")
print conn.scalar(
select([message.c.message]).\
where(message.c.username == "some user")
)
The pgp_sym_encrypt and pgp_sym_decrypt functions are applied to the INSERT and SELECT statements:
INSERT INTO message (username, message)
VALUES (%(username)s, pgp_sym_encrypt(%(message)s, %(pgp_sym_encrypt_1)s))
{'username': 'some user', 'message': 'this is my message',
'pgp_sym_encrypt_1': 'this is my passphrase'}
SELECT pgp_sym_decrypt(message.message, %(pgp_sym_decrypt_1)s) AS message_1
FROM message
WHERE message.username = %(username_1)s
{'pgp_sym_decrypt_1': 'this is my passphrase', 'username_1': 'some user'}
New in version 0.8: Added the TypeEngine.bind_expression() and TypeEngine.column_expression() methods.
See also:
SQLAlchemy Core defines a fixed set of expression operators available to all column expressions. Some of these operations have the effect of overloading Python’s built in operators; examples of such operators include ColumnOperators.__eq__() (table.c.somecolumn == 'foo'), ColumnOperators.__invert__() (~table.c.flag), and ColumnOperators.__add__() (table.c.x + table.c.y). Other operators are exposed as explicit methods on column expressions, such as ColumnOperators.in_() (table.c.value.in_(['x', 'y'])) and ColumnOperators.like() (table.c.value.like('%ed%')).
The Core expression constructs in all cases consult the type of the expression in order to determine the behavior of existing operators, as well as to locate additional operators that aren’t part of the built in set. The TypeEngine base class defines a root “comparison” implementation TypeEngine.Comparator, and many specific types provide their own sub-implementations of this class. User-defined TypeEngine.Comparator implementations can be built directly into a simple subclass of a particular type in order to override or define new operations. Below, we create a Integer subclass which overrides the ColumnOperators.__add__() operator:
from sqlalchemy import Integer
class MyInt(Integer):
class comparator_factory(Integer.Comparator):
def __add__(self, other):
return self.op("goofy")(other)
The above configuration creates a new class MyInt, which establishes the TypeEngine.comparator_factory attribute as referring to a new class, subclassing the TypeEngine.Comparator class associated with the Integer type.
Usage:
>>> sometable = Table("sometable", metadata, Column("data", MyInt))
>>> print sometable.c.data + 5
sometable.data goofy :data_1
The implementation for ColumnOperators.__add__() is consulted by an owning SQL expression, by instantiating the TypeEngine.Comparator with itself as the expr attribute. The mechanics of the expression system are such that operations continue recursively until an expression object produces a new SQL expression construct. Above, we could just as well have said self.expr.op("goofy")(other) instead of self.op("goofy")(other).
New methods added to a TypeEngine.Comparator are exposed on an owning SQL expression using a __getattr__ scheme, which exposes methods added to TypeEngine.Comparator onto the owning ColumnElement. For example, to add a log() function to integers:
from sqlalchemy import Integer, func
class MyInt(Integer):
class comparator_factory(Integer.Comparator):
def log(self, other):
return func.log(self, other)
Using the above type:
>>> print sometable.c.data.log(5)
log(:log_1, :log_2)
Unary operations are also possible. For example, to add an implementation of the Postgresql factorial operator, we combine the UnaryExpression construct along with a custom_op to produce the factorial expression:
from sqlalchemy import Integer
from sqlalchemy.sql.expression import UnaryExpression
from sqlalchemy.sql import operators
class MyInteger(Integer):
class comparator_factory(Integer.Comparator):
def factorial(self):
return UnaryExpression(self.expr,
modifier=operators.custom_op("!"),
type_=MyInteger)
Using the above type:
>>> from sqlalchemy.sql import column
>>> print column('x', MyInteger).factorial()
x !
See also:
New in version 0.8: The expression system was enhanced to support customization of operators on a per-type level.
The UserDefinedType class is provided as a simple base class for defining entirely new database types. Use this to represent native database types not known by SQLAlchemy. If only Python translation behavior is needed, use TypeDecorator instead.
Bases: sqlalchemy.types.TypeEngine
Base for user defined types.
This should be the base of new types. Note that for most cases, TypeDecorator is probably more appropriate:
import sqlalchemy.types as types
class MyType(types.UserDefinedType):
def __init__(self, precision = 8):
self.precision = precision
def get_col_spec(self):
return "MYTYPE(%s)" % self.precision
def bind_processor(self, dialect):
def process(value):
return value
return process
def result_processor(self, dialect, coltype):
def process(value):
return value
return process
Once the type is made, it’s immediately usable:
table = Table('foo', meta,
Column('id', Integer, primary_key=True),
Column('data', MyType(16))
)
Suggest a type for a ‘coerced’ Python value in an expression.
Default behavior for UserDefinedType is the same as that of TypeDecorator; by default it returns self, assuming the compared value should be coerced into the same type as this one. See TypeDecorator.coerce_compared_value() for more detail.
Changed in version 0.8: UserDefinedType.coerce_compared_value() now returns self by default, rather than falling onto the more fundamental behavior of TypeEngine.coerce_compared_value().
Bases: sqlalchemy.sql.visitors.Visitable
Base for all types - not needed except for backwards compatibility.
Bases: sqlalchemy.types.AbstractType
Base for built-in types.
Bases: sqlalchemy.sql.expression._DefaultColumnComparator
Base class for custom comparison operations defined at the type level. See TypeEngine.comparator_factory.
The public base class for TypeEngine.Comparator is ColumnOperators.
Support implementations that were passing arguments
Produce an “adapted” form of this type, given an “impl” class to work with.
This method is used internally to associate generic types with “implementation” types that are specific to a particular dialect.
“Given a bind value (i.e. a BindParameter instance), return a SQL expression in its place.
This is typically a SQL function that wraps the existing bound parameter within the statement. It is used for special data types that require literals being wrapped in some special database function in order to coerce an application-level value into a database-specific format. It is the SQL analogue of the TypeEngine.bind_processor() method.
The method is evaluated at statement compile time, as opposed to statement construction time.
Note that this method, when implemented, should always return the exact same structure, without any conditional logic, as it may be used in an executemany() call against an arbitrary number of bound parameter sets.
See also:
Return a conversion function for processing bind values.
Returns a callable which will receive a bind parameter value as the sole positional argument and will return a value to send to the DB-API.
If processing is not necessary, the method should return None.
| Parameters: | dialect – Dialect instance in use. |
|---|
Suggest a type for a ‘coerced’ Python value in an expression.
Given an operator and value, gives the type a chance to return a type which the value should be coerced into.
The default behavior here is conservative; if the right-hand side is already coerced into a SQL type based on its Python type, it is usually left alone.
End-user functionality extension here should generally be via TypeDecorator, which provides more liberal behavior in that it defaults to coercing the other side of the expression into this type, thus applying special Python conversions above and beyond those needed by the DBAPI to both ides. It also provides the public method TypeDecorator.coerce_compared_value() which is intended for end-user customization of this behavior.
Given a SELECT column expression, return a wrapping SQL expression.
This is typically a SQL function that wraps a column expression as rendered in the columns clause of a SELECT statement. It is used for special data types that require columns to be wrapped in some special database function in order to coerce the value before being sent back to the application. It is the SQL analogue of the TypeEngine.result_processor() method.
The method is evaluated at statement compile time, as opposed to statement construction time.
See also:
A TypeEngine.Comparator class which will apply to operations performed by owning ColumnElement objects.
The comparator_factory attribute is a hook consulted by the core expression system when column and SQL expression operations are performed. When a TypeEngine.Comparator class is associated with this attribute, it allows custom re-definition of all existing operators, as well as definition of new operators. Existing operators include those provided by Python operator overloading such as operators.ColumnOperators.__add__() and operators.ColumnOperators.__eq__(), those provided as standard attributes of operators.ColumnOperators such as operators.ColumnOperators.like() and operators.ColumnOperators.in_().
Rudimentary usage of this hook is allowed through simple subclassing of existing types, or alternatively by using TypeDecorator. See the documentation section Redefining and Creating New Operators for examples.
New in version 0.8: The expression system was enhanced to support customization of operators on a per-type level.
alias of Comparator
Compare two values for equality.
Produce a string-compiled form of this TypeEngine.
When called with no arguments, uses a “default” dialect to produce a string result.
| Parameters: | dialect – a Dialect instance. |
|---|
Return a dialect-specific implementation for this TypeEngine.
Return the corresponding type object from the underlying DB-API, if any.
This can be useful for calling setinputsizes(), for example.
Flag, if False, means values from this type aren’t hashable.
Used by the ORM when uniquing result lists.
Return the Python type object expected to be returned by instances of this type, if known.
Basically, for those types which enforce a return type, or are known across the board to do such for all common DBAPIs (like int for example), will return that type.
If a return type is not defined, raises NotImplementedError.
Note that any type also accommodates NULL in SQL which means you can also get back None from any type in practice.
Return a conversion function for processing result row values.
Returns a callable which will receive a result row column value as the sole positional argument and will return a value to return to the user.
If processing is not necessary, the method should return None.
| Parameters: |
|
|---|
Produce a new type object that will utilize the given type when applied to the dialect of the given name.
e.g.:
from sqlalchemy.types import String
from sqlalchemy.dialects import mysql
s = String()
s = s.with_variant(mysql.VARCHAR(collation='foo'), 'mysql')
The construction of TypeEngine.with_variant() is always from the “fallback” type to that which is dialect specific. The returned type is an instance of Variant, which itself provides a with_variant() that can be called repeatedly.
| Parameters: |
|
|---|
New in version 0.7.2.
Bases: object
A mixin that marks a type as supporting ‘concatenation’, typically strings.
x.__init__(...) initializes x; see help(type(x)) for signature
Bases: sqlalchemy.types.TypeEngine
An unknown type.
NullTypes will stand in if Table reflection encounters a column data type unknown to SQLAlchemy. The resulting columns are nearly fully usable: the DB-API adapter will handle all translation to and from the database data type.
NullType does not have sufficient information to particpate in a CREATE TABLE statement and will raise an exception if encountered during a create() operation.
Bases: sqlalchemy.types.TypeDecorator
A wrapping type that selects among a variety of implementations based on dialect in use.
The Variant type is typically constructed using the TypeEngine.with_variant() method.
New in version 0.7.2.
Return a new Variant which adds the given type + dialect name to the mapping, in addition to the mapping present in this Variant.
| Parameters: |
|
|---|
Construct a new Variant.
| Parameters: |
|
|---|


EBD - Easton Bible DIctionary
Jochebed
JOCHEBED
"JOCHEBED" Jehovah is her glory, the wife of Amram, and the mother of Miriam, Aaron, and Moses (
Numbers 26:59
). She is spoken of as the sister of Kohath, Amram’s father (
Exodus 6:20
; comp. 16, 18;
2:1-10
).
 She is spoken of as the sister of Kohath, Amram’s father (Exodus 6:20; comp. 16, 18; 2:1-10).


d4730a92-3e07-48dd-b8cd-cb356ba3fd0f
com.atlassian.confluence.plugins.confluence-knowledge-base:kb-troubleshooting-article-blueprint
Add troubleshooting article
d4730a92-3e07-48dd-b8cd-cb356ba3fd0f
com.atlassian.confluence.plugins.confluence-knowledge-base:kb-troubleshooting-article-blueprint
kb-troubleshooting-article
Provide solutions for commonly encountered problems.
Troubleshooting article
Add troubleshooting article
kb-troubleshooting-article


This is a game, created for you.
The rules are simple, arrange the figures so that they form a straight line, one line eguals a certain point and you will be rewarded with points for every finished line.
If you play your cards right, your name will appear on the top ten players.
Good luck.


Our goals is to create regular laboratories and free events to aim the people to increase their digital and web skills at all the interaction levels. Today, is extremely important that all people have the opportunity to acquire more awareness about the Internet technologies.
For this goal, Mozilla, the proudly non-profit champions of the Internet, helps to keep it healthy, open and accessible to all. In local, we of the Mozilla Cagliari Club have decided to make some free activities to aim the people to learn how read, write, participate on the web.