| GO term |
Description |
P-value |
FDR q-value |
Enrichment (N, B, n, b) |
Genes |
| GO:0051241 |
negative regulation of multicellular organismal process |
2.16E-6 |
1.15E-2 |
6.65 (889,43,28,9) |
[+] Show genes
RNF125 - ring finger protein 125, e3 ubiquitin protein ligase
GJA1 - gap junction protein, alpha 1, 43kda
HPGDS - hematopoietic prostaglandin d synthase
PPP3CA - protein phosphatase 3, catalytic subunit, alpha isozyme
CXADR - coxsackie virus and adenovirus receptor
EZR - ezrin
PRTG - protogenin
SPP1 - secreted phosphoprotein 1
PDE4B - phosphodiesterase 4b, camp-specific
|
| GO:0014070 |
response to organic cyclic compound |
6.55E-5 |
1.75E-1 |
7.62 (889,25,28,6) |
[+] Show genes
LOX - lysyl oxidase
GJA1 - gap junction protein, alpha 1, 43kda
EZR - ezrin
SRR - serine racemase
SPP1 - secreted phosphoprotein 1
PDE4B - phosphodiesterase 4b, camp-specific
|
| GO:0051239 |
regulation of multicellular organismal process |
7.55E-5 |
1.34E-1 |
3.26 (889,117,28,12) |
[+] Show genes
RNF125 - ring finger protein 125, e3 ubiquitin protein ligase
LOX - lysyl oxidase
HPGDS - hematopoietic prostaglandin d synthase
GJA1 - gap junction protein, alpha 1, 43kda
C1QTNF4 - c1q and tumor necrosis factor related protein 4
PPP3CA - protein phosphatase 3, catalytic subunit, alpha isozyme
CAMSAP2 - calmodulin regulated spectrin-associated protein family, member 2
CXADR - coxsackie virus and adenovirus receptor
EZR - ezrin
PRTG - protogenin
SPP1 - secreted phosphoprotein 1
PDE4B - phosphodiesterase 4b, camp-specific
|
| GO:0048869 |
cellular developmental process |
1.07E-4 |
1.43E-1 |
3.15 (889,121,28,12) |
[+] Show genes
FOSL2 - fos-like antigen 2
LOX - lysyl oxidase
STMN1 - stathmin 1
GJA1 - gap junction protein, alpha 1, 43kda
MLF1 - myeloid leukemia factor 1
PPP3CA - protein phosphatase 3, catalytic subunit, alpha isozyme
CXADR - coxsackie virus and adenovirus receptor
EZR - ezrin
NHSL1 - nhs-like 1
FERMT2 - fermitin family member 2
CSRP2 - cysteine and glycine-rich protein 2
SPP1 - secreted phosphoprotein 1
|
| GO:0055002 |
striated muscle cell development |
1.1E-4 |
1.17E-1 |
23.81 (889,4,28,3) |
[+] Show genes
LOX - lysyl oxidase
PPP3CA - protein phosphatase 3, catalytic subunit, alpha isozyme
CXADR - coxsackie virus and adenovirus receptor
|
| GO:0048747 |
muscle fiber development |
1.1E-4 |
9.78E-2 |
23.81 (889,4,28,3) |
[+] Show genes
LOX - lysyl oxidase
PPP3CA - protein phosphatase 3, catalytic subunit, alpha isozyme
CXADR - coxsackie virus and adenovirus receptor
|
| GO:1903532 |
positive regulation of secretion by cell |
2.24E-4 |
1.71E-1 |
11.55 (889,11,28,4) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
C1QTNF4 - c1q and tumor necrosis factor related protein 4
EZR - ezrin
SPP1 - secreted phosphoprotein 1
|
| GO:0055001 |
muscle cell development |
2.69E-4 |
1.8E-1 |
19.05 (889,5,28,3) |
[+] Show genes
LOX - lysyl oxidase
PPP3CA - protein phosphatase 3, catalytic subunit, alpha isozyme
CXADR - coxsackie virus and adenovirus receptor
|
| GO:0009888 |
tissue development |
2.88E-4 |
1.71E-1 |
5.95 (889,32,28,6) |
[+] Show genes
LOX - lysyl oxidase
EMP1 - epithelial membrane protein 1
GJA1 - gap junction protein, alpha 1, 43kda
PPP3CA - protein phosphatase 3, catalytic subunit, alpha isozyme
CSRP2 - cysteine and glycine-rich protein 2
SPP1 - secreted phosphoprotein 1
|
| GO:1903530 |
regulation of secretion by cell |
3.08E-4 |
1.64E-1 |
7.56 (889,21,28,5) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
C1QTNF4 - c1q and tumor necrosis factor related protein 4
PPP3CA - protein phosphatase 3, catalytic subunit, alpha isozyme
EZR - ezrin
SPP1 - secreted phosphoprotein 1
|
| GO:0051047 |
positive regulation of secretion |
3.29E-4 |
1.6E-1 |
10.58 (889,12,28,4) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
C1QTNF4 - c1q and tumor necrosis factor related protein 4
EZR - ezrin
SPP1 - secreted phosphoprotein 1
|
| GO:0048519 |
negative regulation of biological process |
3.79E-4 |
1.69E-1 |
2.31 (889,206,28,15) |
[+] Show genes
RNF125 - ring finger protein 125, e3 ubiquitin protein ligase
SHISA2 - shisa family member 2
STMN1 - stathmin 1
PPP3CA - protein phosphatase 3, catalytic subunit, alpha isozyme
CAMSAP2 - calmodulin regulated spectrin-associated protein family, member 2
EZR - ezrin
SPP1 - secreted phosphoprotein 1
GJA1 - gap junction protein, alpha 1, 43kda
HPGDS - hematopoietic prostaglandin d synthase
PCIF1 - pdx1 c-terminal inhibiting factor 1
MLF1 - myeloid leukemia factor 1
CXADR - coxsackie virus and adenovirus receptor
ITIH4 - inter-alpha-trypsin inhibitor heavy chain family, member 4
PRTG - protogenin
PDE4B - phosphodiesterase 4b, camp-specific
|
| GO:0050708 |
regulation of protein secretion |
4.65E-4 |
1.91E-1 |
9.77 (889,13,28,4) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
C1QTNF4 - c1q and tumor necrosis factor related protein 4
PPP3CA - protein phosphatase 3, catalytic subunit, alpha isozyme
EZR - ezrin
|
| GO:0051046 |
regulation of secretion |
4.87E-4 |
1.86E-1 |
6.90 (889,23,28,5) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
C1QTNF4 - c1q and tumor necrosis factor related protein 4
PPP3CA - protein phosphatase 3, catalytic subunit, alpha isozyme
EZR - ezrin
SPP1 - secreted phosphoprotein 1
|
| GO:0016202 |
regulation of striated muscle tissue development |
5.27E-4 |
1.87E-1 |
15.88 (889,6,28,3) |
[+] Show genes
LOX - lysyl oxidase
GJA1 - gap junction protein, alpha 1, 43kda
CXADR - coxsackie virus and adenovirus receptor
|
| GO:0048640 |
negative regulation of developmental growth |
5.27E-4 |
1.76E-1 |
15.88 (889,6,28,3) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
CXADR - coxsackie virus and adenovirus receptor
SPP1 - secreted phosphoprotein 1
|
| GO:0048634 |
regulation of muscle organ development |
5.27E-4 |
1.65E-1 |
15.88 (889,6,28,3) |
[+] Show genes
LOX - lysyl oxidase
GJA1 - gap junction protein, alpha 1, 43kda
CXADR - coxsackie virus and adenovirus receptor
|
| GO:0048523 |
negative regulation of cellular process |
5.48E-4 |
1.63E-1 |
2.36 (889,188,28,14) |
[+] Show genes
RNF125 - ring finger protein 125, e3 ubiquitin protein ligase
SHISA2 - shisa family member 2
STMN1 - stathmin 1
CAMSAP2 - calmodulin regulated spectrin-associated protein family, member 2
PPP3CA - protein phosphatase 3, catalytic subunit, alpha isozyme
EZR - ezrin
SPP1 - secreted phosphoprotein 1
GJA1 - gap junction protein, alpha 1, 43kda
HPGDS - hematopoietic prostaglandin d synthase
PCIF1 - pdx1 c-terminal inhibiting factor 1
MLF1 - myeloid leukemia factor 1
ITIH4 - inter-alpha-trypsin inhibitor heavy chain family, member 4
CXADR - coxsackie virus and adenovirus receptor
PRTG - protogenin
|
| GO:0032502 |
developmental process |
5.64E-4 |
1.59E-1 |
2.24 (889,213,28,15) |
[+] Show genes
EMP1 - epithelial membrane protein 1
LOX - lysyl oxidase
SHISA2 - shisa family member 2
STMN1 - stathmin 1
PPP3CA - protein phosphatase 3, catalytic subunit, alpha isozyme
EZR - ezrin
NHSL1 - nhs-like 1
FERMT2 - fermitin family member 2
SPP1 - secreted phosphoprotein 1
SRR - serine racemase
FOSL2 - fos-like antigen 2
GJA1 - gap junction protein, alpha 1, 43kda
MLF1 - myeloid leukemia factor 1
CXADR - coxsackie virus and adenovirus receptor
CSRP2 - cysteine and glycine-rich protein 2
|
| GO:0007010 |
cytoskeleton organization |
5.67E-4 |
1.51E-1 |
5.29 (889,36,28,6) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
STMN1 - stathmin 1
CAMSAP2 - calmodulin regulated spectrin-associated protein family, member 2
CXADR - coxsackie virus and adenovirus receptor
EZR - ezrin
CSRP2 - cysteine and glycine-rich protein 2
|
| GO:0010243 |
response to organonitrogen compound |
7.35E-4 |
1.87E-1 |
6.35 (889,25,28,5) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
PPP3CA - protein phosphatase 3, catalytic subunit, alpha isozyme
EZR - ezrin
SRR - serine racemase
PDE4B - phosphodiesterase 4b, camp-specific
|
| GO:0048638 |
regulation of developmental growth |
8.49E-4 |
2.06E-1 |
8.47 (889,15,28,4) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
CXADR - coxsackie virus and adenovirus receptor
EZR - ezrin
SPP1 - secreted phosphoprotein 1
|
| GO:0010721 |
negative regulation of cell development |
9.02E-4 |
2.09E-1 |
13.61 (889,7,28,3) |
[+] Show genes
PPP3CA - protein phosphatase 3, catalytic subunit, alpha isozyme
PRTG - protogenin
SPP1 - secreted phosphoprotein 1
|
| GO:1901861 |
regulation of muscle tissue development |
9.02E-4 |
2.01E-1 |
13.61 (889,7,28,3) |
[+] Show genes
LOX - lysyl oxidase
GJA1 - gap junction protein, alpha 1, 43kda
CXADR - coxsackie virus and adenovirus receptor
|
| GO:0050768 |
negative regulation of neurogenesis |
9.02E-4 |
1.93E-1 |
13.61 (889,7,28,3) |
[+] Show genes
PPP3CA - protein phosphatase 3, catalytic subunit, alpha isozyme
PRTG - protogenin
SPP1 - secreted phosphoprotein 1
|
| GO:0050714 |
positive regulation of protein secretion |
9.02E-4 |
1.85E-1 |
13.61 (889,7,28,3) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
C1QTNF4 - c1q and tumor necrosis factor related protein 4
EZR - ezrin
|
| GO:0060326 |
cell chemotaxis |
9.02E-4 |
1.78E-1 |
13.61 (889,7,28,3) |
[+] Show genes
LOX - lysyl oxidase
CXADR - coxsackie virus and adenovirus receptor
PDE4B - phosphodiesterase 4b, camp-specific
|
| GO:0002064 |
epithelial cell development |
9.58E-4 |
1.83E-1 |
31.75 (889,2,28,2) |
[+] Show genes
FOSL2 - fos-like antigen 2
EZR - ezrin
|
| GO:0045843 |
negative regulation of striated muscle tissue development |
9.58E-4 |
1.76E-1 |
31.75 (889,2,28,2) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
CXADR - coxsackie virus and adenovirus receptor
|
| GO:0055022 |
negative regulation of cardiac muscle tissue growth |
9.58E-4 |
1.7E-1 |
31.75 (889,2,28,2) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
CXADR - coxsackie virus and adenovirus receptor
|
| GO:0055026 |
negative regulation of cardiac muscle tissue development |
9.58E-4 |
1.65E-1 |
31.75 (889,2,28,2) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
CXADR - coxsackie virus and adenovirus receptor
|
| GO:0061117 |
negative regulation of heart growth |
9.58E-4 |
1.6E-1 |
31.75 (889,2,28,2) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
CXADR - coxsackie virus and adenovirus receptor
|
| GO:0048635 |
negative regulation of muscle organ development |
9.58E-4 |
1.55E-1 |
31.75 (889,2,28,2) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
CXADR - coxsackie virus and adenovirus receptor
|
| GO:0060044 |
negative regulation of cardiac muscle cell proliferation |
9.58E-4 |
1.5E-1 |
31.75 (889,2,28,2) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
CXADR - coxsackie virus and adenovirus receptor
|
| GO:0046621 |
negative regulation of organ growth |
9.58E-4 |
1.46E-1 |
31.75 (889,2,28,2) |
[+] Show genes
GJA1 - gap junction protein, alpha 1, 43kda
CXADR - coxsackie virus and adenovirus receptor
|


Click the button below to see dojo/request/script request recent pull requests for Dojo's GitHub repo.


Introducing the Handbook of Salsa Dance series. There are three books in this series:
-
Illustrated Handbook of Salsa Dance: Positions
-
Illustrated Handbook of Salsa Dance: Patterns
-
Illustrated Handbook of Salsa Dance: Butterfly Patterns
Handbook of Salsa Dance Series
This series covers beginner to intermediate level dance elements. This includes handholds, positions, patterns, and combinations.
A salsa dance combination is comprised of two or more salsa dance patterns, each pattern covering two bars of music. Every salsa dance pattern begins and ends in a dance position. One can view the salsa dance pattern as the artful transition from a start position to an end position over eight beats of music. Because salsa dance is made up of combinations, and combinations are made up of patterns, one can view salsa dance as an aesthetically pleasing progression through a series of dance positions over the course of a song. Expert salsa dancers know how to get into and out of myriad salsa dance positions in interesting ways. Knowing how to do this can help increase your salsa dance repertoire. This is facilitated by knowing your dance positions.
Learn how to break down elaborate salsa combinations into individual components by name. This allows you to pick up new patterns more quickly. It also makes it easier to remember a pattern or combination you learned previously. This will help you to learn from other dancers.
Each handbook contains links to free online lessons that demonstrate the techniques. The author researched hundreds of websites and online video lessons and curated the best 148 of them for beginner and intermediate students.
Illustrated Handbook of Salsa Dance: Positions
To best understand combinations and patterns, know your positions. To truly know your positions, be able to identify them and call them by name. This handbook will show you how to do that. The key insight is that every pattern begins with a start position, and finishes with an end position. This handbook enumerates those positions and teaches the names. Once you learn the position names you will be able to write down a combination in terms of its patterns, by giving the start and end position of each pattern in the combination.
Contents include a compendium of 68 salsa dance positions illustrated with 330 figures, an annotated curated list of 84 links to free online lessons from expert instructors, and a comprehensive dictionary of salsa dance terminology, packed into 387 pages. Each position is illustrated from multiple angles.
This handbook will help you identify common elements of salsa dance by name. When you have the vocabulary to describe the building blocks, you can understand what you see on the dance floor. You’ll be able to break down a combination into component patterns. You’ll be able to identify the positions that make up a pattern. Then you will then be able to compose new patterns of your own. Expert salsa dancers know how to get into and out of myriad salsa dance positions in interesting ways.
Salsa dance elements covered in this handbook include steps, handholds, turns, combs, arm and leg stylings, positions, patterns, and combinations. Handholds covered include left to right hold, right to left hold, parallel hold, handshake hold, reverse handshake hold, cross hold, and reverse cross hold. Turns covered include cross body lead, reverse cross body lead, single right turn, single left turn, inside turn, outside turn, and enchufa turn. Positions covered include apart positions, open position, closed position, half open position, handshake hold, hammerlock, half Hammerlock, cross hold, reverse cross hold, neck loop, arm hook, cuddle, butterfly, sombrero, and wraps.
This handbook also comes in an ebook version. The ebook version is ideally suited for referencing via smartphone.
Where to find :
Illustrated Handbook of Salsa Dance: Patterns
The second book in this series shows how to break down patterns into constituent dance elements. It also shows how to create combinations from patterns.
This Handbook provides a breakdown of common positions, holds, turns, and patterns. It contains 36 dance positions, 51 dance patterns, and 184 illustrations, all packed into 293 pages.
A salsa dance combination is comprised of two or more dance patterns, each pattern covering two bars of music. Every salsa dance pattern begins and ends in a dance position. One can view the salsa dance pattern as the artful transition from a start position to an end position over eight beats of music. Because salsa dance is made up of combinations, and combinations are made up of patterns, one can view salsa dance as an aesthetically pleasing progression through a series of dance patterns over the course of a song.
Those amazing dancers that you see on the dance floor seem to have an endless knowledge base of elaborate combinations. How can they memorize so many different combinations? The secret is that many of them tend to use a small collection of patterns. They know how to get into and out of a position. If they have a combination that begins with some particular start position, they also know an interesting way to get into that position. Each pattern they perform takes them from the start position to an end position. They know how to take that end position and turn it into a start position for the next pattern. They know how to mix and match patterns to create combinations that seem to be infinitely varied.
This handbook will help you get there.
This handbook is structured for quick reference. This handbook contains a compendium of basic positions and turns, a catalog of common salsa dance patterns, a collection of salsa pattern combinations composed of patterns defined here, and a guide to creating new pattern combinations of your own.
The patterns in this handbook can be used to create thousands of combinations. It is possible to combine these patterns into 227 combinations of length three without repeating a pattern within any of those 227 combinations. The number of combinations that can be created without repeating a pattern is even greater for longer combinations: 471 combinations of length 4, 952 combinations of length 5, and 1,820 combinations of length 6. Twelve combinations are provided to show how to create combinations using the patterns in the handbook.
Where to find :
Illustrated Handbook of Salsa Dance: Butterfly Patterns
The newest handbook in this series focuses on one type of salsa dance element: the butterfly position.
This is a comprehensive exploration of myriad butterfly positions. Whether you learn best from illustrations, diagrams, descriptions, or video, this handbook has you covered.
This handbook breaks down 5 categories of variations on butterfly patterns. Each set of variations combines common butterfly positions, holds, turns into patterns. Each focuses on a single objective, such as entering a butterfly position, exiting a butterfly position, and using a butterfly position in the middle part of a pattern. These variations comprise 20 dance positions, 40 dance patterns, 131 illustrations. This handbook shows how to combine these patterns into enough combinations to fill an entire night of dancing without once repeating.
Whereas the first two handbooks in this series take a breadth approach to learning, this handbook takes a depth approach. By mastering a single category of patterns you can accelerate your learning in areas. Instead of slowly learning everything across the board, diving deep into a single type of position and pattern takes your dancing to a new level. This handbook focuses on the Butterfly positions and their related patterns. It looks at what can be done using 9 butterfly positions. From these 9 positions it presents 20 patterns that use a butterfly position. It provides another 20 patterns that complement the butterfly combinations.
These 40 patterns can be combined to create hundreds of short combinations and thousands of longer combinations. These patterns can create 620 combinations of length three, and 2,349 combinations of length four, where each combination never uses any single pattern more than once. Based just on the patterns in this handbook, you could literally dance all night without repeating yourself.
This handbook provides 5 sets of variations that show how to get into and out of butterfly positions. You can devise many combinations of your own creation. This handbook shows how. To show how to combine patterns into combinations, 11 combinations are provided, of which 9 are linked to a video lesson. Each combination demonstrates how to combine the patterns presented into a pleasing sequence.


Ethernet
Ethernet Settings:
*Automatic
10Base-T Half-Duplex
10Base-T Full-Duplex
100Base-TX Half-Duplex
100Base-TX Full-Duplex
1000Base-T Full-Duplex
Current Ethernet Settings:
100Base-TX Full-Duplex
Machine Address:
9C:93:4E:2E:7F:84


---
layout: home
title: Aakash Bhatia
subtitle: M.S. Computer Science (Data Science and Engineering)
Stony Brook University
---
Hello and welcome to my website! My name is Aakash Bhatia. I am an aspiring Data Scientist with an interest in Natural Language Processing and Machine Learning.
I am currently pursuing a Master’s Degree in Computer Science with a specialisation in Data Science and Engineering at Stony Brook University, NY.
Prior to pursuing a Master’s Degree, I earned a Bachelor of Engineering degree in Computer Engineering from Thadomal Shahani Engineering College, Mumbai in 2016.
I have worked at Ernst & Young LLP, Mumbai as a Technology Risk professional for 3 years.
I am actively looking for full time opportunities in Data Science and Engineering. This website is a summary of my academic, professional and personal pursuits.


2 Chronicles 7:16
For now have I chosen and sanctified this house, that my name may be there for ever: and mine eyes and mine heart shall be there perpetually.


The DECODE function compares (a series of) 2 expressions and returns a specified or null value depending on the result of the comparison. It compares each expression2 to expression1. If expression1 is equal to expression2, or both expression1 and expression2 are null, the value of the specified result-expresssion is returned. If no expression2 matches expression1, the value of the else-expression is returned; otherwise a null value is returned.
The DECODE function is similar to the CASE expression except for the handling of null values:


JOBSITY
Bookshelf
Jakob Treml
MAIN
Quito
Cartagena
Medellín
Digital
YOUR BOOKS
Readings
History
Read Later
favorites
Quito
MOST READ BOOKS
Hooked: How to Build Habit-
The Inevitable: Understandin…
Lean In: Women, Work, and t…
Building a Business When Th…
How Google Works


import "github.com/ghetzel/go-stockutil/httputil"
Utilities for extracting and formatting data encountered in HTTP requests
| Filename | Size | SLOC | func |
type |
const |
var |
|---|---|---|---|---|---|---|
| client.go | 16KB | 409 | 34 | 2 | 3 | |
| client_test.go | 6KB | 173 | ||||
| codecs.go | 4KB | 114 | 4 | 7 | 1 | |
| context.go | 611B | 18 | 2 | |||
| context_test.go | 621B | 17 | ||||
| decoders.go | 1KB | 41 | 1 | |||
| decoders_test.go | 2KB | 1 | ||||
| logger.go | 965B | 41 | 2 | 2 | 6 | 1 |
| netrc.go | 982B | 25 | 1 | 1 | ||
| netrc_test.go | 844B | 30 | ||||
| querystrings.go | 4KB | 118 | 13 | |||
| querystrings_test.go | 1KB | 51 | ||||
| request_logger_middleware.go | 678B | 23 | 2 | 1 | ||
| responses.go | 5KB | 126 | 12 | 1 | 1 | |
| responses_test.go | 2KB | 54 | ||||
| types.go | 373B | 18 | 1 | 1 | 7 | |
| util.go | 4KB | 123 | 6 | |||
| util_test.go | 3KB | 76 |
const Debug = iota const Delete = `DELETE` const Error = const Fatal = const Get = `GET` const Head = `HEAD` const Info = const Notice = const Options = `OPTIONS` const Patch = `PATCH` const Post = `POST` const Put = `PUT` const Warning =
var DebugOutputBoxWidth = 60 var DefaultClient = MustClient(``) var DefaultMultipartFormFileField = `filename` var FormUnmarshalStructTag = `json` var Logger = logging.MustGetLogger(`httputil`) var NetrcFile = `~/.netrc` var WaitForPollInterval = time.Second
func AddQ(u *url.URL, key string, values ...interface{})
Appends a query string from then given url.URL
func AddQString(u string, key string, value interface{}) string
A version of AddQ that accepts a URL string and makes a best-effort to modify it.
Will return the modified URL or the original URL if an error occurred.
func DecodeResponse(response *http.Response) (io.Reader, error)
Takes an http.Response and returns an io.Reader that will return the contents
of the Response Body decoded according to the values (if any) of the Content-Encoding
response header.
func DelQ(u *url.URL, key string)
Deletes a query string from then given url.URL
func DelQString(u string, key string) string
A version of DelQ that accepts a URL string and makes a best-effort to modify it.
Will return the modified URL or the original URL if an error occurred.
func EncodeBasicAuth(username string, password string) string
Encode the username and password into a value than can be used in the Authorization HTTP header.
func GetBody(url string) ([]byte, error)
A simplified GET function using the package-level default client. Will return the
response body as bytes.
func Is1xx(code int) bool
Returns whether the given status code is 100 <= s <= 199
func Is2xx(code int) bool
Returns whether the given status code is 200 <= s <= 299
func Is3xx(code int) bool
Returns whether the given status code is 300 <= s <= 399
func Is4xx(code int) bool
Returns whether the given status code is 400 <= s <= 499
func Is5xx(code int) bool
Returns whether the given status code is 500 <= s <= 599
func IsHttpErr(err error) bool
func IsMediaType(req *http.Request, mediaTypes ...string) bool
Returns whether the Content-Type of the given request matches any of the supplied options.
The mediaTypes arguments may be either complete media types (e.g.: “text/html”, “application/javascript”)
or major type classes (e.g.: “text/”, “video/”). The trailing slash (/) indicates that any media type
that begins with that text will match.
func JSONDecoder(in io.Reader, out interface{}) error
func JSONEncoder(in interface{}) (io.Reader, error)
func LoadCertPool(filename string) (*x509.CertPool, error)
Loads certificates from the given file and returns a usable x509.CertPool
func MediaType(req *http.Request) string
Returns the media type from the request’s Content-Type.
func MultipartFormEncoder(in interface{}) (io.Reader, error)
Specifies that the given data should be encoded as a multipart/form-data request.
func NetrcCredentials(domain string) (string, string, bool)
Retreive the plaintext username and password from the netrc-formatted file in the
NetrcFile package variable. The final return argument will be true if and only if
the .netrc file exists, is readable, and the username OR password matched to the given
domain is non-empty.
func ParseFormRequest(req *http.Request, into interface{}) error
Parses the form values for a Request and unmarshals into the given value.
func ParseFormValues(formValues url.Values, into interface{}) error
Parses a set of values received from an HTML form (usually the value of the
http.Request.Form property) and unmarshals into the given value.
func ParseJSON(r io.Reader, into interface{}) error
Parses a given reader as a JSON document and unmarshals into the given value.
func ParseJSONRequest(req *http.Request, into interface{}) error
Parses the Request as JSON and unmarshals into the given value.
func ParseRequest(req *http.Request, into interface{}) error
Autodetect the Content-Type of the given request and unmarshals into the
given value.
func Q(req *http.Request, key string, fallbacks ...string) string
Parses the named query string from a request as a string.
func QBool(req *http.Request, key string, fallbacks ...bool) bool
Parses the named query string from a request as a boolean value.
func QDuration(req *http.Request, key string) time.Duration
Parses the named query string from a request as a duration string.
func QFloat(req *http.Request, key string, fallbacks ...float64) float64
Parses the named query string from a request as a float.
func QInt(req *http.Request, key string, fallbacks ...int64) int64
Parses the named query string from a request as an integer.
func QStrings(req *http.Request, key string, delimiter string, fallbacks ...string) []string
Parses the named query string from a request as a delimiter-separated string slice.
func QTime(req *http.Request, key string) time.Time
Parses the named query string from a request as a date/time value.
func RequestGetValue(req *http.Request, key string) typeutil.Variant
Retrieve an arbitrary value from the context of a given request.
func RequestSetValue(req *http.Request, key string, value interface{})
attach an arbitrary value to the context of a given request.
func RespondJSON(w http.ResponseWriter, data interface{}, status ...int)
Marshal the given data as a JSON document and write the output to the given ResponseWriter. If
a status is given, that will be used as the HTTP response status. If data is an error, and no
status is given, the status will be “500 Internal Server Error”; if data is nil, the status will
be “204 No Content”. The Content-Type of the response is “application/json”.
func SetContentTypeParser(contentType string, parser RequestParseFunc)
Sets a parser implementation for the given HTTP content type.
func SetQ(u *url.URL, key string, value interface{})
Sets a query string to the given value in the given url.URL
func SetQString(u string, key string, value interface{}) string
A version of SetQ that accepts a URL string and makes a best-effort to modify it.
Will return the modified URL or the original URL if an error occurred.
func SetRootCABundle(client *http.Client, caBundle string) error
Configures the given http.Client to accept TLS certificates validated by the given PEM-encoded CA bundle file
func UrlPathJoin(baseurl interface{}, path string) (*url.URL, error)
UrlPathJoin takes a string or *url.URL and joins the existing URL path component with the given path.
The new path may also contain query string values, which will be added to the base URL. Existing keys will
be replaced with new ones, except for repeated keys (e.g.: ?x=1&x=2&x=3). In this case, the new values will
be added to the existing ones. The *url.URL returned from this function is a copy, and the original URL (if
one is provided) will not be modified in any way.
func WaitForHTTP(url string, timeout time.Duration, c ...*http.Client) error
Periodically performs a GET request against the given URL, waiting up to timeout
for a 200-series HTTP response code.
func XMLDecoder(in io.Reader, out interface{}) error
type Client struct { // contains filtered or unexported fields }
func MustClient(baseURI string) *Client
func NewClient(baseURI string) (*Client, error)
func (self *Client) AppendTrustedRootCA(pemFilenamesOrData ...interface{}) error
Append one or more trusted certificates to the RootCA bundle that is consulted when performing HTTPS requests.
func (self *Client) ClearHeaders()
Remove all implicit HTTP request headers.
func (self *Client) ClearParams()
Remove all implicit querystring parameters.
func (self *Client) Client() *http.Client
Returns the HTTP client used to perform requests
func (self *Client) Decode(r io.Reader, out interface{}) error
Decode a response and, if applicable, automatically close the reader.
func (self *Client) Delete(path string, params map[string]interface{}, headers map[string]interface{}) (*http.Response, error)
func (self *Client) Encode(in interface{}) ([]byte, error)
func (self *Client) Get(path string, params map[string]interface{}, headers map[string]interface{}) (*http.Response, error)
func (self *Client) GetWithBody(path string, body interface{}, params map[string]interface{}, headers map[string]interface{}) (*http.Response, error)
func (self *Client) Headers() http.Header
Return the headers set on this client.
func (self *Client) Params() map[string]interface{}
Return the params set on this client.
func (self *Client) Post(path string, body interface{}, params map[string]interface{}, headers map[string]interface{}) (*http.Response, error)
func (self *Client) Put(path string, body interface{}, params map[string]interface{}, headers map[string]interface{}) (*http.Response, error)
func (self *Client) Request(method Method, path string, body interface{}, params map[string]interface{}, headers map[string]interface{}) (*http.Response, error)
Perform an HTTP request
func (self *Client) SetAutomaticLogin(on bool)
Specify that the NetrcFile (default: ~/.netrc) should be consulted before each
request to supply basic authentication. If a non-empty username or password is
found for the
func (self *Client) SetBasicAuth(username string, password string)
Set the username and password to be included in the Authorization header.
func (self *Client) SetClient(client *http.Client)
Replace the default HTTP client with a user-provided one
func (self *Client) SetDecoder(fn DecoderFunc)
Specify a decoder that will be used to deserialize data in the response body.
func (self *Client) SetEncoder(fn EncoderFunc)
Specify an encoder that will be used to serialize data in the request body.
func (self *Client) SetErrorDecoder(fn ErrorDecoderFunc)
Specify a different decoder used to deserialize non 2xx/3xx HTTP responses.
func (self *Client) SetHeader(name string, value interface{})
Add an HTTP request header by name that will be included in every request. If
value is nil, the named header will be removed instead.
func (self *Client) SetInitHook(fn InitRequestFunc)
Specify a function that will be called immediately before the first request is sent.
This function has an opportunity to read and modify the outgoing request, and
if it returns a non-nil error, the request will not be sent.
func (self *Client) SetInsecureTLS(insecure bool)
Set or unset insecure TLS requests that will proceed even if the peer certificate cannot be verified.
func (self *Client) SetParam(name string, value interface{})
Add a querystring parameter by name that will be included in every request. If
value is nil, the parameter will be removed instead.
func (self *Client) SetPostRequestHook(fn InterceptResponseFunc)
Specify a function tht will be called immediately after a response is received.
This function is given the first opportunity to inspect the response, and if it
returns a non-nil error, no additional processing (including the Error Decoder function)
will be performed.
func (self *Client) SetPreRequestHook(fn InterceptRequestFunc)
Specify a function that will be called immediately before a request is sent.
This function has an opportunity to read and modify the outgoing request, and
if it returns a non-nil error, the request will not be sent.
func (self *Client) SetRootCA(pemFilenamesOrData ...interface{}) error
Replace the existing RootCA bundle with an explicit set of trusted certificates.
func (self *Client) URI() *url.URL
Return the base URI for this client.
func (self *Client) WithDecoder(fn DecoderFunc) *Client
Return a copy of the current client that uses a different decoder.
func (self *Client) WithEncoder(fn EncoderFunc) *Client
Return a copy of the current client that uses a different encoder.
type DecoderFunc func(io.Reader, interface{}) error
type EncoderFunc func(interface{}) (io.Reader, error)
type ErrorDecoderFunc func(*http.Response) error
type InitRequestFunc func() error
type InterceptRequestFunc func(*http.Request) (interface{}, error)
type InterceptResponseFunc func(*http.Response, interface{}) error
type Literal []byte
type LogLevel int
type Method string
type MultipartFormFile struct { Filename string `json:"filename"` Data io.Reader `json:"data"` }
type RequestLogger struct{} // Deprecated: this type will go away in 1.9.x
func NewRequestLogger() *RequestLogger
func (self *RequestLogger) ServeHTTP(rw http.ResponseWriter, req *http.Request, next http.HandlerFunc)
type RequestParseFunc func(*http.Request, interface{}) error
type WritableLogger struct { // contains filtered or unexported fields }
func NewWritableLogger(level LogLevel, prefix ...string) *WritableLogger
func (self *WritableLogger) Write(p []byte) (int, error)


The advanced sensor technology and inder-the-skin sensor help patients reach unprecedented levels of wear time, leading to improved clinical outcomes.
overall a1c level
overall %
hours per day
overall %
overall %
For more information on Eversense’s safety and performance, download our Performance and Outcomes Data Sheet.


WITNESS LIST
Appropriations - S/C on Article III Committee
February 15, 2011 - 7:00 AM
House Budget Recommendations
On:
Bailey, Guy (Texas Tech University)
Banning, Tom (Tx Academy of Family Physicians)
Brunjes, Jim (Texas Tech University System)
Cigarroa, Francisco (The University of Texas System)
Daniel, David (The University of Texas at Dallas)
Garcia, Juliet (University of Texas at Brownsville and Texas Southmost College)
Gibson, Dana (Sam Houston State University)
Hance, Kent (Texas Tech University System)
Heldenfels IV, Fred (THECB)
Klotman, Paul (Baylor College of Medicine)
Mabry, Rodney (The University of Texas at Tyler)
Maestas, Ricardo (Self)
McCall, Brian (Texas State University System)
McDonald, Carol (Independent Colleges and Universities of Texas, Inc.)
Monroe, W. Sam (Lamar State College - Port Arthur)
Natalicio, Diana (Univ. of Texas at El Paso)
Nelsen, Robert (University of Texas Pan American)
Paredes, Raymund (THECB)
Powell, Gene (The University of Texas System)
Rallo, Joseph (Angelo State University)
Romo, Ricardo (UTSA)
Salinas, Nelson (Texas Association of Business)
Shahan, Michael (Lamar State College - Orange)
Shapiro, Marc (Baylor College of Medicine)
Simmons, James (Lamar University)
Spaniolo, James D. (UT Arlington)
Szuch, Paul (Lamar Institute of Technology Texas State University System)
Trauth, Denise (Texas State University -- San Marcos)
Watts, David (UT Permian Basin)
Weaver, Dan (TX Higher Education Coordinating Board)
Young, David (Self)
1


Install
this will install
Create Menu Link
Create Desktop Link
Install to:
(and copy ini file of current running app)
Had Installed!
Uninstall!
this will uninstall


|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
| Class Summary | |
| ChromosomeManager | ChromosomeManager manages the... |
| GaussianMutationOperator | This genetic operator performs Gaussian mutation across all genes in a given Chromosome. |
| GeneNeuralNetCodec | Serializes an array of JGAP Gene s to and
from a JOONE NeuralNet . |
| GenesScore | This simple class is used to track the activity of a given gene. |
| MeaningStrengthPair | A MeaningStrengthPair encapsulates
a 'meaning' (as defined by NeuralNetManager.getMeaningOfOutputNodeAt )
together with its strength of activation. |
| NaturallySelectFirstGenotype | NaturallySelectFirstGenotype extends Genotype to override
its evolve method, such that evolution takes
place by doing natural selection first, then
evolving the genotype. |
| NeuralNetManager | NeuralNetManager manages the... |
| RankedSelector | RankedSelector is a JGAP NaturalSelector that selects the top 'n' (as given by the Genotype) ranked Chromosomes to go on to the next population. |
| WeightGene | This Gene is used to model individual weights (or bias') in the neural network. |
| Exception Summary | |
| GeneNeuralNetCodec.NoSuchWeightException |
JOONEGAP has been deliberately kept small, with an easy learning curve. Its handful of classes form a basic framework that takes care of:
For such a simple problem as XOR, it is tempting to simply have one output node and assign discrete values to it based on whether it is, say, greater than or less than 0.5. However, for a broader set of problems (say, facial recognition), discrete values are more commonplace (say, each output node representing a person's name), so for the sake of example we adopt that latter approach here.
In addition to building an uninitialised '2,4,2' JOONE network, XORNeuralNetManager also defines a method to 'interpret' each of the two output nodes as either representing '0' or '1'. This is useful for the XORTest class.
Finally, XORNeuralNetManager employs an optional feature of the JOONEGAP framework: to initially train new neural networks using standard back-prop - in many cases, this can speed up how long it takes to find a genetically-evolved solution.
Of course, back-prop is pefectly capable of solving a broad set of problems on its own, so for this example we don't want the training to be too perfect! Instead, we train the network to output the XOR truth table but with the last value deliberately incorrect. It is this last value we shall try to train using our genetic algorithms.
It starts by setting up the Log4J logger and XORNeuralNetManager. Then it cycles forever, using NeuralNetManager's 'hold' and 'release' methods to grab hold of new neural networks, and tries each one against a standard set of XOR tests (note that it doesn't keep score itself, it lets the JOONEGAP framework do that). The first network that passes all the tests breaks out the loop and completes the 'main' method.
The beauty of the JOONEGAP framework is that simply calling 'NeuralNetManager.hold' is enough to...
To solve the NIM problem, only one class needs to be extended from the JOONEGAP framework (NIMNeuralNetManager, extends NeuralNetManager), and only one extra class needs to be written (NIMTest) to actually co-ordinate the test.
NIM is a very simple game, trivial for a game theorist, but it serves well as a test vehicle for simulated evolution. This version of NIM is as follows: Two players begin the game with 15 "beans". They take turns removing beans. On each turn a player may remove 1, 2 or 3 beans. He must remove at least one, and may not take more than 3. The player removing the last bean loses.
A player of NIM must be able to decide what to do when presented with 15, or 14, or 13, etc. beans down to two beans. This decision could be in the form of a simple table, and in fact the following table shows how to play the most perfect game possible:
| Remainder: | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 |
| Take away: | 2 | 1 | x | 3 | 2 | 1 | x | 3 | 2 | 1 | x | 3 | 2 | 1 |
A player following this strategy will always win if he has the first move. If the opponent has the first move, and if the opponent deviates from this table, then the player will also win. If both follow the table exactly the the player who goes first always wins. The x means that it doesn't matter; you will lose anyway.
In addition to building the uninitialised '1,30,3' JOONE network, NIMNeuralNetManager also defines the method to 'interpret' each of the output nodes. This is useful for the NIMTest class.
It starts by setting up the Log4J logger and NIMNeuralNetManager. Then it cycles forever, using NeuralNetManager's 'hold' and 'release' methods to grab hold of new neural networks, and plays each one against another.
In addition, NIMTest applies a general test to see if the 'perfect' NIM player has been evolved yet. The first network that reaches this stage breaks out the loop and completes the 'main' method.
Once each network has played 20 games (specified in NIMNeuralNetManager), the entire population of chromosomes (the Genotype) is evolved by JGAP. The beauty of the JOONEGAP framework is that this happens transparently to NIMTest!
|
||||||||||
| PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |


Obtain the latitude and longitude of a location within the map
This example displays a map of the world. Clicking on the map displays an alert box containing the latitude and longitude of the location pressed.
The tap
event holds the x and y screen coordinates of the location clicked.
These are converted to a latitude and longitude using the map.screenToGeo()
method.


States where the difference in poll numbers between Clinton and Trump is less than 5% are classed as 'toss-up' states, those with a difference of over 10% are classed as 'solid'. Maine (ME) and Nebraska use the congressional district method in which the winner of each district takes that district’s electoral vote.


Indian national charged with sexual assault while working in Afghanistan as US contractor: DOJ
by Bradford BetzAn Indian national is accused of committing sexual assault while working as a U.S. contractor in Afghanistan, the Department of Justice said Monday.
Lokesh Naik, 35, was charged earlier this month by a federal grand jury in the District of Columbia with two counts of aggravated sexual abuse and one count of abusive sexual contact, the DOJ said in a press release.
U.S. military authorities in Afghanistan arrested Naik on Nov. 8. He appeared before U.S. Magistrate Judge Harvey via video teleconference before being removed to the U.S., according to the DOJ.
Naik arrived at Joint Base McGuire-Dix-Lakehurst by a military transport aircraft on Sunday in the custody of Deputy U.S. Marshals.
MILITARY SEXUAL ASSAULTS RISE BY 44% AMONG FEMALES IN RANKS: PENTAGON REPORT
According to his indictment, Naik allegedly entered the room of a 24-year-old U.S. national and sexually assaulted her while he was working as an employee of a U.S. military contractor on Operating Base Fenty, Afghanistan.
CLICK HERE TO GET THE FOX NEWS APP
The case is being investigated by the U.S. Army Criminal Investigation Command and the FBI’s Washington Field Office.


Note:
You can only accept this task if you are from any of this
{{ task.type }} - {{ task.typeValue }}
TaskID: {{ task.id }}
Rating: This task takes
{{ task.rateTime }} day for creator to rate
Creator:
{{ task.user }}
Category:
{{ task.category }}
Reward: GHS{{
task.amount
}}.00
Position Available:
{{ task.position }}
Contact:
{{ task.phone_number }}
Title:
{{ task.jobTitle }}
Instruction:
Paste the source code or link to the source code in the field provided
below
Solution
If you accept a task from a location you are not supposed to, you wont
be paid


This application is just for processing the picture in the web with javascript. You can draw some easy line and orthers.


In this section, you will learn to make our own class. Before going further, let's look at an example:
#include <iostream>
using namespace std;
class Rectangle
{
public:
int length; //length of rectangle
int breadth; //breadth of rectangle
/* declaring member functions */
void setLength( int l );
void setBreadth( int b );
int getArea();
};
/* defining member functions */
void Rectangle::setLength( int l )
{
length = l;
}
void Rectangle::setBreadth( int b )
{
breadth = b;
}
int Rectangle::getArea()
{
return length * breadth;
}
int main()
{
Rectangle rt;
rt.setLength(7);
rt.setBreadth(4);
int area = rt.getArea();
cout << "Area : " << area << endl;
return 0;
}
Let's go through this code to understand how to make our own class.
Remember that the execution of any program begins with the main function. So while executing, the first statement of the main function will get executed first.
Rectangle rt; - This statement declares rt as an object of class Rectangle. It is the same as saying that 'rt' is a 'Rectangle'. For this, 'Rectangle' must be defined.
class Rectangle - We have defined our own class named 'Rectangle'. 'class' is a keyword which means that 'Rectangle' is a class.
Inside the Rectangle class, we declared two variables and three functions. These variables and functions belong to the class Rectangle since these are declared inside the class and thus are called members of the class. There are two types of members of a class:
- data members - In the class Rectangle, length and breadth are the data members since these store the information ( length and breadth ) of the objects of the class.
- member functions - setLength(), setBreadth and getArea() are the member functions of the Rectangle class.
Note that while defining the member functions, we have written Rectangle:: before the function name. This is to tell the compiler that the function belongs to the class Rectangle.
rt.setLength(7); - This statement will call the function setLength with the parameter value 7. To call any function, we use (.) DOT after the object and then call that function.
Since 'rt' is an object of the 'Rectangle' class, so 'rt.setLength' will call the function 'setLength' of 'Rectangle' class for 'rt'. This will set the value of length as 7 for 'rt'
Similarly, rt.setBreadth(4) will call the function setBreadth and will set the value of breadth as 4.
int area = rt.getArea(); - 'rt' will call the function getArea() which will return length * breadth which is 28 (since the value of length is 7 and that of braedth is 4). This value will get assigned to the variable area.
public: - We declared all the members of the class as public. public is a modifier which allows the members of a class to be accessed directly from outside the class.
Like public, there are other modifiers also like private and protected. We will study more about modifier later.
We can also define our member methods at the time it is declared in the function as in the following example.
#include <iostream>
using namespace std;
class Rectangle
{
public:
int length; //length of rectangle
int breadth; //breadth of rectangle
/* declaring member functions */
void setLength( int l )
{
length = l;
}
void setBreadth( int b )
{
breadth = b;
}
int getArea()
{
return length * breadth;
}
};
int main()
{
Rectangle rt;
rt.setLength(7);
rt.setBreadth(4);
int area = rt.getArea();
cout << "Area : " << area << endl;
return 0;
}
This was the same as the previous example but this time we defined the function at the time we declared it in the Rectangle class.
Access Modifiers
The access modifiers decide how the members of a class can be accessed. There are three types of access modifiers in C++.
- public
- private
- protected
Public
When we declare any class member as public, that variable becomes available everywhere in the program, even outside the function in which it was declared. Let's see an example to understand this.
#include <iostream>
using namespace std;
class Rectangle
{
public:
int length; //length of rectangle
int breadth; //breadth of rectangle
int getArea()
{
return length * breadth;
}
};
int main()
{
Rectangle rt;
rt.length = 7;
rt.breadth = 4;
int area = rt.getArea();
cout << "Area : " << area << endl;
return 0;
}
Since we declared the variables length and breadth as public, we directly accessed these and assigned them values.
rt.length = 7; - We directly accessed the data member 'length' by the object of the Rectangle class. Similarly, we assigned breadth to the Rectangle object by directly accessing it.
rt.getArea(); - We also accessed getArea() directly since it is also declared as public.
Thus we can access the members declared as public from anywhere.
Private
The member declared as private can only be accessed inside the class in which it is declared. Thus, the object of the class cannot directly access its members as we did in the case of public.
If we try to access a private member of any class from outside that class, we will get a compile time error. Let's see an example.
#include <iostream>
using namespace std;
class Rectangle
{
int length;
public:
int breadth;
void setLength( int l );
int getArea();
};
void Rectangle::setLength( int l )
{
length = l;
}
int Rectangle::getArea()
{
return length * breadth;
}
int main()
{
Rectangle rt;
rt.setLength(7);
rt.breadth = 4;
int area = rt.getArea();
cout << "Area : " << area << endl;
return 0;
}
In this example, breadth and the functions setLength and getArea are declared public. The data member length is private since all the members are private by default.
Since we cannot directly access any private member, therefore cannot access length directly. So, we declared another member function 'setLength' as public which assigned a value 7 to the length.
The rest of the members were directly accessed from the main function.
Though the data member 'length' is by default private, we can declare it private as well as shown below.
class Rectangle
{
private:
int length;
public:
int breadth;
void setLength( int l );
int getArea();
};
Protected
Protected is similar to private. Any member declared as protected cannot be accessed outside the class but can be accessed by any subclass of that class.
We will learn more about subclass in a later chapter.
Constructor
A constructor is a special member function of a class which is called automatically when an object of that class is called. It has the same name as that of the class and has no return type.
#include <iostream>
using namespace std;
class Rectangle
{
public:
int length;
int breadth;
Rectangle()
{
length = 10;
breadth = 10;
}
};
int main()
{
Rectangle rt;
cout << "length = " << rt.length << endl;
cout << "breadth = " << rt.breadth << endl;
return 0;
}
breadth = 10
In this example when we created the object rt of class Rectangle, the constructor Rectangle() automatically got called and initialized the data members for the object 'rt'. It initialized the length and breadth of rt to 10 each.
When the constructor was called, length and breadth were created and then in the body of the constructor, these member variables were assigned values.
Rectangle(){ };
Constructor having Parameters
We can also have constructors with parameters.
#include <iostream>
using namespace std;
class Rectangle
{
int length;
int breadth;
public:
Rectangle( int l, int b )
{
length = l;
breadth = b;
}
int getArea()
{
return length * breadth;
}
};
int main()
{
Rectangle rt( 7, 4 );
cout << "Area : " << rt.getArea() << endl;
return 0;
}
In this example, we have parameters in our constructor. As told earlier, a constructor is also a function which is executed at the time of creating an object and has the same name as that of its parent class. So, it will work like a function and assign values passed from Rectangle rt( 7, 4 ); to length and breadth.
Rectangle rt( 7, 4 );
It will create an object 'rt' of class 'Rectangle' and pass 7 to 'l' and 4 to 'b' ( 'l' and 'b' are used in the constructor of the class 'Rectangle' ).
Use of static
'static' is used to make access to any data variable or function without making an object of that class. It means that 'static' is used so that we can access any data variable or function without making an object of that class.
Let's see this:
#include <iostream>
using namespace std;
class Rectangle
{
public:
static void printArea( int l, int b )
{
cout << l*b << endl;
}
};
int main()
{
Rectangle::printArea(4,7);
return 0;
}
Our function 'printArea' is static. So, we directly used it on 'Rectangle' class, without making any object of it.
In this example, we made a member function static. Now let's see another example in which a data member is made static.
#include <iostream>
using namespace std;
class A
{
public:
static int a;
};
int A::a = 8;
int main()
{
cout << A::a << endl;
return 0;
}
Here, the variable a is made static and thus we directly accessed it in the main function.
Returning and passing object in a function
Yes, we can return or pass object(s) to a function. Let's see an example.
#include <iostream>
class Account{
public: int balance;
public: Account(){
balance = 0;
}
public: static Account getAcc(Account a, Account b){
Account ac;
ac.balance = a.balance+b.balance;
return ac;
}
};
int main(){
using namespace std;
Account a1;
a1.balance = 50;
Account a2;
a2.balance = 60;
Account b = Account::getAcc(a1,a2);
cout << b.balance << endl;
}
As you have seen, our method 'getAcc' is creating an 'Account' object by taking two 'Account' objects and returning it also.
b = Account.getAcc(); - 'getAcc' will create and return a new 'Account' object and 'b' will become equal to that object.
Even if we don't declare any constructor for a class, the compiler automatically declares a constructor which gets called when any object of that class is created and initializes its data members.
Suppose we made a class Vehicle without any constructor, then automatically its constructor will be created with nothing in its body as follows.
class Vehicle{
public:
Vehicle(){ }
}
Talent is good, Practice is better, and Passion is Best
-Frank Lloyd Wright