I was writing a small piece of code for a Proof of Concept, and required to write an equals method and was wondering if I had given thought to it in my career of 8 years. Yes I know it, but do I really know it enough. This was the revision exercise I did, which I thought of sharing as an simplistic article with everyone.
These are two very important methods that all Java developers are well aware of. And it is such a basic topic, but may be due to the simplicity of the concept, and also due to the fact that IDEs that we use today generate them very nicely, we tend to forget or overlook it. So I thought of documenting some details around it.
One of the best chapters I have read about these two methods and few others were in Chapter 03
of the book Effective Java
by Joshua Bloch
.
In this article, I capture some of the important aspects of these two methods that I have learned.
Equals - Covering Basics
Lets start with Equality of Objects in Java. We know that equality of objects is evaluated using the equals
method. By default, in Java, we say that two objects are equal, if the Object References (let’s say obj1 and obj2) are referring to the same object (in memory). Now we know Java Object
class provides an implementation to this.
1
2
3
public boolean equals(Object obj) {
return (this == obj);
}
Pretty straight forward. But this does not suffice our needs in most cases when we exercise Object Oriented Programming. Given that equality of instances of classes must be defined by their attributes and not based on the memory locations where they are stored, we must override this method.
However, there are few rules that we need to be aware in doing this.
Just the basics first. Know and understand what equality means. It is important that we ensure that all the below properties of equality are maintained by our implementation.
-
Reflexive - For any object reference
obj
, obj.equals(obj) must betrue
-
Symmetric - For any two equal objects,
obj1
andobj2
, obj1.equals(obj2) and obj2.equals(obj1) both must returntrue
. -
Transitive - For
obj1
obj2
andobj3
if obj1.equals(obj2) is true, and obj2.equals(obj3) is true, then obj1.equal(obj3) must betrue
. -
Consistent - Given that attributes that are part of the equality logic remains unchanged, all subsequent equals() invocation of the same equal objects must continue to return
true
.
Equals - Ways to Implement
Codified Way - Every Java Developer Must Know
The following is a hand coded implementation for equals
method on Passport
class.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
/**
* Assume that passports are equal only if their number and name matches.
*/
public class Passport {
private String number;
private String name;
private String country;
@Override
public boolean equals(Object o) {
// Shallow Check
if (this == o) return true;
// if not from same class, not equal.
if (o == null || !o.getClass().equals(Passport.class)) return false;
Passport passport = (Passport) o;
// NOTE: Null safe equality check using Objects.equal().
// If any of the value is null, it will return false,
// if both are null, it will return true.
return Objects.equals(number, passport.number) && Objects.equals(name, passport.name);
}
....
}
The same can be generated by IDEs such as Intelij, however, probably in an interview or a situation where you don’t have that luxury, it is important that you are on top of this.
- Using an Utility Library
Also, common utility libraries such as Apache Commons
provides builders to implement it easily.
ex: Using Apache Commons (which uses reflections to perform equal check using attributes of the object. This could be the default implementation of a base class (BaseDto
, BaseModel
or BaseEntity
))
1
2
3
public boolean equals(Object obj) {
return EqualsBuilder.reflectionEquals(this, obj);
}
- Using
Lombok
to generate the code
Now, if you are using Java, but hate boilerplate, probably you are already a fan of lombok
. It provides a nice annotations called @EqualsAndHashCode
which can use the generate both equals
and hashCode
methods automatically.
- If you use
kotlin
, usedata
classes that generatesequals
andhashCode
Data classes are one of those syntax sugar conveniences that makes us fall in love with the Kotlin
. What Lombok does with Java, Data classes does it automatically in Kotlin. It generates equals / hashCode() pair based on the attributes defined in the primary
constructor.
ex:
1
data class User(val name: String, val age: Int)
equals() and hashCode() for the above will be generated based on name
and age
attributes.
Now lets talk about the contract between equals()
and hashCode()
. The moment we change the logic of the equality operation, we need to ensure that hashCode() method contract still stands.
HashCode - Covering Basics
Why is hashCode() method so important?
As we all know, hashCode() is used in Java’s Collections that uses Hashing
mechanism as a way to minimize the performance cost of operations such as add, get, remove and etc. Examples are HashTable, HashMap and HashSet.
What is the contract between hashCode() and equals() ?
If two objects are equal, their hashCode() value must be the same. This the rule of thumb. However, if hashCode() values of two objects are the same, it does not mean that those two objects must be equal. It could be, but does not have to be. It all depends on how the developers have implemented the hashCode() method.
Now the Rule of Thumb prescribed above is so important. Because if you don’t abide to this rule, it could lead to inconsistent results specially when you use HashSet like implementations.
Example below:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
/**
* Assume that passports are equal only if their number and name matches.
*/
public class Passport {
private String number;
private String name;
private String country;
public Passport(String number, String name) {
this.number = number;
this.name = name;
}
@Override
public final boolean equals(Object o) {
// Shallow Check
if (this == o) return true;
// if not from same class, not equal.
if (o == null || !o.getClass().equals(Passport.class)) return false;
Passport passport = (Passport) o;
// NOTE: Null safe equality check using Objects.equal().
// If any of the value is null, it will return false, // if both are null, it will return true. return Objects.equals(number, passport.number) && Objects.equals(name, passport.name);
}
public static void demoImportanceOfHashMap(){
Passport p1 = new Passport("123", "Chinthaka");
Passport p2 = new Passport("123", "Chinthaka");
// Prove that they are equal
System.out.println(p1.equals(p2)); // returns true.
// Lets add them to a HashSet Set<Passport> set = new HashSet<>();
set.add(p1);
set.add(p2);
System.out.println("P1 HashCode:" + p1.hashCode());
System.out.println("P2 HashCode:" + p2.hashCode());
// Assumption is the size should be 1
System.out.println("Set Size: " + set.size());
}
public static void main(String[] args) {
demoImportanceOfHashMap();
}
}
The output was:
1
2
3
4
true
P1 HashCode:356573597
P2 HashCode:1735600054
Set Size: 2
As you see, even if two objects are equal, but their hash codes are not the same, they will not be considered equal in an HashSet
(because hashCode()
is invoked first and based on that only, an equals()
operation will be executed IF there are multiple elements in a particular hash bucket) and therefore you would see duplicates. This is catastrophic.
Another code smell of a hashCode() is when there are too much hash collisions. As written in HashMap
Java Documentation, having too many different Objects (unequal) returning the same hash code is a sure way for reducing performance as it increases the number of elements of a particular Hash Bucket where the object is stored.
Refer the below snippet from Java HashMap.getNode(int hash, Object key)
implementation.
1
2
3
4
5
6
7
do {
if (e.hash == hash &&
((k = e.key) == key || (key != null && key.equals(k))))
return e;
} while ((e = e.next) != null);
Java Object
class provides a default implementation for the hashCode()
method. How does Java implement hashCode?
1
public native int hashCode();
The native
keyword here indicates that this is not a Java implementation, it is written using low level language (C) and then injected to Java using JNI (Java Native Interface) technique. So we will not be able to see how the implementation looks like here.
The default implementation of the hashCode() is based on the memory address of the Object. Reading through the native code (provided in the reference below), it further proves that it is uses different techniques such as MD5, CRC32, DES/AES and XOR Shifting to generate the hash code value based on the memory address. Knowing what really goes beneath our JVM, though it is tough to fully perceive, is certainly interesting. Refer to the links I have provided below.
So how do we override and implement the hashCode() properly for a class which already has a custom equals() implementation.
Codified Way - Every Java Developer Must Know
This is based on the guidance provided by Joshua Bloch
in Chapter 03
of Effective Java
book.
For the hash code to be distinctive as possible across different objects making it an effective hashCode() implementation, the following steps needs to be followed.
- Store a non-zero value as the result. (Any random number)
- Then for each field that is considered in the equals() implementation, calculate their hashcode and them to the multiplication of current result by 31.
Refer an implementation of it below for the Passport
class.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/**
*
* Instead of generating the hash code on based on the Object's Memory Reference (JNI),
* generate it based on the attributes that are involved in the equality check.
*
* @return
*/
@Override
public int hashCode() {
int result = 17;
result = 31 * result + number == null? 0: number.hashCode();
result = 31 * result + name == null? 0: name.hashCode();
return result;
}
why a random number at the start? Zero cannot be used as it would lead to collisions. Specially when the hash code of the fields that are participating in this would also return 0 in their hash code calculation. For Example, boolean false value would generally have 0 as the hash code. Also if a particular field is null, typically 0 is returned (as depicted in the code). Having a non-zero number as the initial seed reduces the potential conflicts due to that reason.
NOTE: However Boolean
Java class does not return 0 (false) or 1 (true) for hashCode. Instead arbitrary numbers of 1231
and 1237
are used.
Why multiply by number 31?
The reason is that it makes the hashCode() calculation depend on the order of the fields. Great example from Effective Java
book that I like to quote here is:
“For example, if the multiplication were omitted from a String
hash function, all anagrams would have identical hash codes.”
I wondered why number 31 and the good reason that I found from that chapter is, multiplication by 31 can be replaced by a Shift and a Subtraction (31 * i == (i << 5) - i
) and modern VMs seems to do this optimization for us.
Using Objects.hash(Object... values)
This is an utility method provided in Java Objects
library which takes cares of generating a hashCode following the above mentioned techniques applied with all the participating fields.
Also, as mentioned above, Lombok
for Java would auto-generate this for you with EqualsAndHashCode
annotation. Similarly in Kotlin, Data Classes automatically generate this for you.
As Java programmers, we no longer may really pay too much attention this. But the importance of equals() and hashCode() method combination remains the same, specially when you are building frameworks and components that other teams will rely on in the future.
References
-
Apache Commons EqualsBuilder - https://commons.apache.org/proper/commons-lang/apidocs/org/apache/commons/lang3/builder/EqualsBuilder.html
-
Lombok - https://projectlombok.org/features/EqualsAndHashCode
-
Kotlin Data Classes - https://kotlinlang.org/docs/data-classes.html
- Good Discussion on Java’s HashCode implementation
- https://stackoverflow.com/questions/13602501/whats-the-implementation-of-hashcode-in-java-object
-
Found source code for Java Native Hash Code Implementation here - https://stackoverflow.com/questions/10578764/why-are-hashcode-and-getclass-native-methods
- C Code for Java’s HashCode Implementation
- http://hg.openjdk.java.net/jdk7/jdk7/hotspot/file/tip/src/share/vm/prims/jvm.cpp (JVM_ENTRY(jint, JVM_IHashCode…), line 504)
- http://hg.openjdk.java.net/jdk7/jdk7/hotspot/file/tip/src/share/vm/runtime/synchronizer.cpp (FastHashCode, Line 576 and get_next_hash, line 530)


| |
|
LETTER FROM THE CHAIR
|
| |
| |
Dear Friends of the Department of Germanic Languages & Literatures,
After months of varying degrees of isolation and social distancing, it’s easy to forget that we were having an excellent year until three weeks before the end of the winter term.
Among our faculty, Anna Shternshis led the field with a Guggenheim Fellowship and a President’s Impact Award, Christine Lehleiter won a Humboldt Research Fellowship, and Willi Goetschel was distinguished with the 2020 Moses Mendelssohn Prize. Erol Boran walked away with the Canadian Association for University Teachers of German’s Innovate German Award and collaborated with Hang-Sun Kim on a successful application to the International Student Experience Fund for an innovative project to support third-language learning in our classes. John Zilcosky saw the publication of The Allure of Sports in Western Culture, which he co-edited with Marlo Burks.
Our students, too, excelled in customary fashion, winning research awards, presenting at conferences, participating in internships at schools in Toronto and organizations abroad, collaborating on faculty research endeavours and pursuing their own thesis work. A highlight on the graduate level this year was a well-attended, student-led interdisciplinary conference, “Deviance | Am Rande seiner selbst,” which offered a scholarly platform for presenters from Canada and abroad.
We can also boast of real successes during the height of the pandemic this summer. Although travel restrictions derailed our plans to send the next crop of iPRAKTIKUM interns to Germany, Student Placement Coordinator Helena Juenger secured virtual placements for four students, who are currently working for cutting-edge startups in Berlin and Freiburg in the areas of social innovation, urban mobility and sustainability.
One of our interns is researching the impact of COVID-19 on urban cycling policy in German and abroad. How cool is that!
Thanks to the efforts of interim Language Coordinator Stefana Gargova and an intrepid group of graduate student instructors, our online summer German courses have gotten us off to a fantastic start for the fall. Enrolments were higher than ever, and we learned important lessons for teaching German online. It has been a busy and demanding summer for many of us. Administrators and departmental officers have been working hard to anticipate and prepare for the various scenarios that may await in 2020-21, graduate students have been contending with poor access to research materials and difficulties finding summer work, and faculty have been learning to work with new digital teaching tools in preparation online instruction. All the while, many of us have been attending to vulnerable friends and family members, volunteering in the community, home-schooling our children and trying to stay connected to loved ones we cannot visit.
We bid farewell to three colleagues this year. Mike Hager, founder of our Business German program and author of important works in the field, is retiring. We wish him all the best for this new phase of life. Nicola Vöhringer completed her term as DAAD Visiting Professor and will be pursuing new opportunities in Germany. Her tireless work for our students made a real difference. There was also a change in our financial office this year; Dale Gebhardt, after years of providing us with expert support, has moved to the Department of French full-time. Our new financial officer, Nina Duras, has hit the ground running and comes to us with experience from the School of Cities and Geography.
Welcome, Nina!
I would like to thank everyone for their extraordinary efforts to prepare for the coming year. I would like to recognize in particular our officers and administrators, who have been keeping us up and running under highly challenging conditions: Gayle Grisdale, Helena Juenger and Nina Duras in the undergraduate, graduate and financial offices; Associate Chairs Erol Boran (Undergraduate) and Christine Lehleiter (Graduate); and Language Coordinators Hang-Sun Kim (fall) and Stefana Gargova (winter).
I am very pleased to welcome back this year Angelica Fenner to the role of associate chair graduate and extend my thanks to Christine Lehleiter, who served a one-year term in that role. I am very pleased that Hang-Sun Kim has agreed to serve as acting associate chair undergraduate and that we will be able to count on Stefana Gargova’s expert language coordinating again in 2020-21.
Stefan Soldovieri
Chair of Germanic Languages & Literatures, Associate Professor of German
|
| |
|
NEWSLETTER 2020/21
|
| |
| |
The day the world became fantastic and fantasy literature much more real
by Professor Erol Boran, Associate Chair, Undergraduate Studies
Our job as literature instructors has not become easier over the years. In this age of Facebook and Twitter, I have noticed that attention spans have shortened and that we can no longer take it for granted that students come equipped to decipher complex literary texts. This unfortunate trend also manifests itself in lower enrolment numbers in literature courses. And yet, today it is more essential than ever to learn to read critically, to be able to distinguish between fact and fake (news) and to develop one’s own informed opinion.
Read more...
|
|
|
Supporting graduate students
by Professor Christine Lehleiter, Associate Chair, Graduate Studies
As in past years, several of our doctoral students have secured merit-based scholarship awards, including John Evjen with an OGS, and Eli Jany and Miriam Borden, the SSHRC Canada Graduate Scholarship-Doctoral for doctoral studies with a Yiddish concentration. Yet the COVID-19 pandemic also brought disruptions to research and deferral of diverse ambitions: a stay at an archive in Germany cancelled, a planned visit to a research site in the U.S. now in question, participation at an international conference moved online, and access to workspace and materials in the library limited until further notice.
Read more...
|
|
|
|
|
Undergraduate Profile: Bridging literary studies and neuroscience
by India James-Licher
I came to the University of Toronto to pursue a specialist degree in Neuroscience and return to the city in which I was born. My interest in human experience and its relationship to language motivated me to study all things related to the mind and the complex processes that enable certain behaviours and thoughts. After one semester, however, I was itching to read a thought-provoking book and engage in fruitful discussions, as I had done in my literature classes back home in Switzerland.
Read more...
|
|
|
|
|
Graduate Profile: Toward a genealogy of gullibility in German literature and thought
by Rita Laszlo
I’m a curious creature, and if it’s important for me to think about something then I think about it, and that, in itself, is a privilege. I share this attitude with Ágnes Heller, a philosopher and social theorist at the New School for Social Research. Her words of wisdom and effrontery have profoundly influenced my academic endeavours. She got me thinking about gullibility in 2013, when I encountered her essay, Elmélkedések a hiszékenységről, a precious gem among her lesser known writings. In 2017 I translated this from the Hungarian as Reflections on Gullibility for the critical theoretical journal Telos, which remains one of my proudest accomplishments.
Read more...
|
|
|
|
|
A sheynem Dank to all Yiddish students!
by Dr. Sasha Hoffman
All innovations to our program that are worthy of note this year are attributable to the hard work of our students. In first year Yiddish, we were able to use In eynem, a new textbook being piloted by the Yiddish Book Center in Amherst, Massachusetts. Miriam Borden, a PhD candidate in the department, participated in pedagogical workshops at the centre and launched the textbook in our program last fall. When I took over the continuing class in the winter semester, I was immediately impressed with students’ confidence of expression and comprehension. In eynem is the first Yiddish textbook to implement a communicative approach. Since we often have a variety of levels in one classroom, including auditors who still recall some Yiddish from childhood, this approach works very well to empower each student to contribute according to their abilities and to learn from one another.
Read more...
|
|
|
|
|
Summer film Seminar “Posthuman Intimacies”
by Professor Angelica Fenner
This summer seminar for advanced graduate students, postdocs and faculty was coordinated by Dr. Angelica Fenner, associate professor in German and Cinema Studies, and hosted at the Munk School for Global Affairs & Public Policy, July 31 to August 4, 2020. Fourteen participants from U of T, the University of Waterloo, the University of Florida, the Free University of Berlin and Bremen University read and debated pre-circulated readings and shared research in progress on cross-species entanglements in European cinema. Under rubrics such as “The Human Animal,” “Cross-Species Kinship” and “Posthuman Worldmaking,” the seminar explored the symbiosis between human and other animals, and possibilities for moving beyond exploitation, dependency or humanistic anthropomorphism toward more complex understandings of subjectivity, sentience and vital matter.
Read more...
|
|
|
|
|
Shivhei Shternshis: a year of accolades for Professor Anna Shternshis
by Miriam Borden
“It’s been a good year for Yiddish,” says Professor Anna Shternshis, laughing. Between the extended Broadway run of the new Yiddish version of the stage musical Fiddler on the Roof and Dr. Shternshis’ own recent award-winning project Yiddish Glory: The Lost Songs of World War II, she’s not wrong.
Yiddish Glory is an album of WWII-era Yiddish songs built upon Professor Shternshis’ research at the Verdansky National Library of Ukraine in the early 2000s, when she discovered a cache of unknown, unpublished Yiddish songs collected by ethnomusicologist Moisei Beregovsky, a victim of Stalin’s postwar antisemitic purges. Professor Shternshis revived the songs, finding partners to turn the songs into a full-length album and touring Yiddish Glory as a lecture-concert with a group of extraordinary performers (including Toronto-based jazz singer Sophie Milman).
Read more...
|
|
|
|
|
Graduate conference builds community, awareness, and understanding
by André Flicker
Our second annual graduate conference, “Deviance | Am Rande seiner selbst,” took place September 28 and 29, 2019 at the Munk School of Global Affairs and Public Policy. The theme gained momentum from our previous gathering in spring 2018, when we deemed it important to stand up for our ideas and regularly organize such meetings to raise public awareness about injustices of all kinds. We drew inspiration from Celan’s words on the value of communication and exchange: “Das Gedicht heute behauptet sich am Rande seiner selbst; es ruft und holt sich, um bestehen zu können, unausgesetzt aus seinem Schon-nicht-mehr in sein Immer-noch zurück. Das Gedicht ist einsam. Es ist einsam und unterwegs. Das Gedicht will zu einem Andern, es braucht dieses Andere, es braucht ein Gegenüber. Es sucht es auf, es spricht sich ihm zu.”
Read more...
|
|
|
|
|
5th annual DAAD German language teaching and learning workshop
by Professor Hang-Sun Kim
German language programs form the backbone of German studies in North American universities, since it is through language courses that we attract potential majors and minors in the field. In most German departments, graduate students play a key role as instructors in the language program. Thanks to the continued support of the DAAD, we held our Fifth Annual German Language Teaching and Learning Workshop, a one-and-a-half-day professional development conference on the theory and practice of second language pedagogy, which brought together graduate students and language specialists from McGill and Queen's Universities, Universities of Toronto and Waterloo, and University of California, Los Angeles.
 Of this, though of not much else, I was certain. At 55 (there’s a reason they call it Freedom 55), I found the chance to gracefully exit my business career and embark on my academic journey, or more colloquially, got my behind out of the office chair and into the classroom. Emboldened by the encouragement of several mentors, including Professor Anna Shternshis, I applied to — and was thankfully accepted into — the master’s program of the Department of Germanic Languages & Literatures.
Read more...
|
|
|
|
|
Teaching Yiddish with iPRAKTIKUM
by Tianna Voort
Through the iPRAKTIKUM Yiddish in the City program, I had the opportunity to work at Bialik Hebrew Day School teaching Yiddish. I was placed with Ester Klimitz, an exceptionally talented and gifted Yiddish teacher. Together we taught five Yiddish classes to grades 3 and 4 students.
It was so wonderful to see young children who were enthusiastic about learning the language. Not only did kids learn how to have basic conversations in Yiddish, they also learned about the culture that surrounds the Yiddish language. We taught classes about Yiddish in Toronto and the history of the language. I think this is something so special about Yiddish; it is not only a language, but also a part of culture.
Read more...
|
|
|
|
|
Faculty editor: Angelica Fenner
Graphic design: Helena Jünger
|
The University of Toronto respects your privacy.
We do not rent, trade or sell our mailing lists.
Copyright © 2020 University of Toronto. All rights reserved. This e-mail was sent to ##SubscriberEmail##.
##OptionalParameter3##
##TrackImpression##
|
|


-
cannot save pagemaker default file
Best Acne Treatment - Kate Somerville
Best Acne Treatment - Kate Somerville much loved product line of acne skin care treatments, heal blemishes, lighten post-acne scars, prevent future breakouts .
http://www.katesomerville.com/best-acne-treatment
-
trascend 4gb micro sd
Acne Medication | Murad Acne Solutions | Best Acne Medications
Murad acne treatment products make you better every day by treating the source of blemishes deep beneath the surface instead of just over-drying your skin.
http://www.murad.com/acne-medications
-
free diablo 2 dupe hack
Over-the-counter acne products: What works and why - Mayo Clinic
Acne products an overview of effective over-the-counter acne treatments. . they differ, what main ingredients to look for and how to use these products for best results. . Graber E. Treatment of acne vulgaris. http://www.uptodate.com/ index.
http://www.mayoclinic.com/health/acne-products/SN00039
-
how to add my own ringtones
Treat Adult Acne - The Best Acne Treatments - ELLE
Sep 14, 2011 . ELLE has scoured the market for the best acne treatments and expert advice. . " Gentle enough to use daily," Burt's Bees Natural Acne Solutions Targeted Spot . I'm using and loving the facial products at stopacnefast.com.
http://www.elle.com/beauty/makeup-skin-care/how-to-cure-adult-acne-580446
-
oak forest fest 2009
Acnezine Reviews -- Best Acne Treatment from Revitol ... - YouTube
Feb 28, 2013 . Best acne treatment, acnezine reviews, buy acnezine, acnezine review, acnezine side effects, acnezine acne treatment, best acne products, top .
http://www.youtube.com/watch?v=vFT0ZWQObGg
-
9235 ft volcanic mountain in philippines
Best Acne Treatment Approach For Your Skin In 2012
In no way does this general advice help finding the best acne treatment. Most people who have acne benefit from one or more acne products, but the same set of .
http://www.facingacne.com/
-
chihuahua puppies teacup tiny
BIOSKINFORTE - The strongest natural acne treatment product
This item: BIOSKINFORTE - The strongest natural acne treatment product by . review); Amazon Best Sellers Rank: #109,888 in Beauty (See Top 100 in Beauty) .
http://www.amazon.com/BIOSKINFORTE-strongest-natural-treatment-product/dp/B007C8X5NM
-
mail and paper boxes combination
All About Acne: Acne: Skin Care Advice: Cosmetics Cop Expert Advice
Yet, shockingly, countless anti-acne products contain ingredients that cause . Spot-treating tends to work best for those whose breakouts are infrequent . over- the-counter choice for a topical antibacterial agent in the treatment of blemishes.
http://www.paulaschoice.com/expert-advice/acne/_/all-about-acne
-
zip codes ulster county ny
Acne Treatment Products in the Yahoo! Directory
www.myacnetreatmentreview.com; Acne Treatments, Inc. Read reviews of the best rated products for acne treatment. Clear pores with natural acne treatment .
http://dir.yahoo.com/business_and_economy/shopping_and_services/personal_care/skin_care/acne/
-
movie theater wichita ks
Acne Treatments 2013 - Reviewed and Ranked
There are many acne products available for you to choose from. Some are proven to . Does the cost of the acne treatment represent good value for your dollar?
http://www.topconsumerreviews.com/acne/
-
9235 ft volcanic mountain in philippines
Top Picks - Best Overall Acne Fighting Products
Top Picks for teens - Best Overall Acne Fighting Products - version 3.0, from . The gentle scent of lavender acts as an aromatherapy treatment for stress and the .
http://teenadvice.about.com/library/weekly/aatp102301a.htm
-
new bungalows in kitchener waterloo
Probiotic Acne Cream: Probiotic Action | Adult Acne Treatments
When choosing the best acne cream for teenage or adult acne treatment, ingredients matter. . Most adult acne treatment products bypass the targeted areas of .
http://www.probioticaction.com/
-
extinct mammals from australia
Natural Acne Treatment - Natural Remedies for Acne from Burt's Bees
Burt's Bees acne treatment collection offers natural acne solutions for clear, . We offer our best natural acne products including: purifying cleanser, pore scrub, .
http://www.burtsbees.com/product-line/natural-acne-treatments/
-
pennsylvania vehicle code 4310 ornamental
Sephora - EradiKate Acne Treatment customer reviews - product ...
I found the best acne spot treatment here! The only con of this product is the smell it left on my face, even after I washed it off. But it's not a deal breaker as long .
http://reviews.sephora.com/8723/P232903/reviews.htm
-
fairy tales lesson plans for kindergarted
Clinique - Acne Solutions Spot Healing Gel customer reviews ...
Mar 7, 2013 . Clinique product reviews and customer ratings for Acne Solutions Spot Healing Gel. Read and . "i love his product it has ben my best buy .
http://reviews.clinique.com/3813/5762/clinique-acne-solutions-spot-healing-gel-reviews/reviews.htm
-
job burn out syptoms
Best Acne Treatment Products of 2013
Before choosing any acne treatment products, make sure to read our indepth reviews on acne treatments. Know which ane products work and which are waste .
http://wikiacne.com/
-
what's the population of virginia
Best Acne Treatment | Teenage Boys
Teenage boys may also have a more difficult time hiding their acne as they search the market for the best acne treatment products to permanently clear their skin .
http://www.exposedskincare.com/acne-treatment/acne-teenage-boys.html
-
star trek borg introduction
Top Acne Solution Products | LIVESTRONG.COM
Apr 25, 2010 . Top Acne Solution Products. Acne vulgaris, commonly referred to as pimples, is a common skin condition that affects adults as well as .
http://www.livestrong.com/article/112044-top-acne-solution-products/
-
pennsylvania vehicle code 4310 ornamental
How To Get Rid Of Acne Scars Fast and Permanently
Nov 12, 2012 . There are numerous acne treatment products available in the market that . to be the best and most effective anti-acne solutions in the industry.
http://guidetoskincare.com/how-to-get-rid-of-acne/
-
cherokee county tax data base
10 Acne Treatments That Really Work - Daily Makeover
Top 5 Spring Clutches · "Girls" Style: Get Marnie's Aqua Dress and Matching Makeup . This Web Site (the Web Site) is operated by Makeover Solutions, Inc. , . In the event you wish to purchase or to subscribe for any of these products or .
http://www.dailymakeover.com/trends/slideshow/acne-skin-care-product-reviews/


- a - Variable in class warlock.graphic.Color
-
- ABOVE_LEVEL - Static variable in class warlock.constant.ZLayers
-
- ackBitAsArray() - Method in class warlock.network.Packet
-
- add(AttributeType) - Static method in class warlock.attribute.AttributeHandler
-
Add a new attributeType to the handler.
- add(Vector) - Method in class warlock.phys.Vector
-
Add a vector to this and return result
- addDeathListener(DeathListener) - Method in class warlock.object.warlock.Warlock
-
Add a death listener to notify when the warlock gets KO'd
- addInteractable(Interactable) - Method in class warlock.lobby.Lobby
-
Add an interactable to the lobby
- addInteractable(Interactable) - Method in class warlock.menu.Menu
-
Add an interactable to the menu
- addItem(ShopItem) - Method in class warlock.shop.ShopColumn
-
Add an item to this column at the bottom
- addItem(ShopItem) - Static method in class warlock.shop.ShopHandler
-
Add an item to the list of items available for purchase
- addListener(StatusEffectListener) - Method in class warlock.attribute.StatusEffect
-
Add a statusEffectListener that listens to when status effect ends.
- addListener(InteractableListenerSlim) - Method in class warlock.hud.interactable.Interactable
-
Adds a listener to this interactable to notify when an event fires on this interactable
- addMessage(String) - Method in class warlock.hud.ObserverHud
-
Add a message to display to the hud
- addMessage(String) - Method in class warlock.hud.PlayHud
-
Append a message to the messages displayed on the hud
- addObject(LevelObject) - Method in class warlock.level.Level
-
Add an object to the level
- addObject(LevelObject, Player) - Method in class warlock.level.Level
-
Add an object to the level, and set owner of the object to "owner"
- addObjectRandomPosition(LevelObject, Player) - Method in class warlock.level.Level
-
Add an object at a random position on the level inside solid ground area.
- addPlayer(Player) - Method in class warlock.game.Game
-
Add a player to the game as a player
- addPlayerToLobby() - Method in class warlock.lobby.Lobby
-
Add a new player to the lobby as an observer (newly connected)
- addSpell(SpellShortcut, Spell) - Method in class warlock.object.warlock.Warlock
-
Add spell to shortcut
- AIMode - Class in warlock.player.ai
-
- AIMode(AIPlayer) - Constructor for class warlock.player.ai.AIMode
-
Creates a new ai mode.
- AIModeCircleTarget - Class in warlock.player.ai
-
- AIModeCircleTarget(AIPlayer, Warlock) - Constructor for class warlock.player.ai.AIModeCircleTarget
-
Create a new AIModeCircleTarget
- AIModeDissengage - Class in warlock.player.ai
-
- AIModeDissengage() - Constructor for class warlock.player.ai.AIModeDissengage
-
- AIModeFleeing - Class in warlock.player.ai
-
- AIModeFleeing(AIPlayer) - Constructor for class warlock.player.ai.AIModeFleeing
-
Create a new AIModeFleeing
- AIPlayer - Class in warlock.player.ai
-
- AIPlayer(int, Color, Color) - Constructor for class warlock.player.ai.AIPlayer
-
Create a new AIPlayer.
- angleBetween(Vector) - Method in class warlock.phys.Vector
-
- applyForce(Vector) - Method in class warlock.object.warlock.Warlock
-
Add momentum to this warlock
- attr(String) - Method in class warlock.object.warlock.Warlock
-
Returns an attribute on the warlock if tag exists
- attrBaseVal(String) - Method in class warlock.object.warlock.Warlock
-
Return the base value of an attribute
- Attribute - Class in warlock.attribute
-
- Attribute(AttributeType, double, double) - Constructor for class warlock.attribute.Attribute
-
Create a new individual instance of an attribute a warlock can have.
- Attribute(AttributeType, double) - Constructor for class warlock.attribute.Attribute
-
- AttributeHandler - Class in warlock.attribute
-
- AttributeHandler() - Constructor for class warlock.attribute.AttributeHandler
-
- AttributeType - Class in warlock.attribute
-
- AttributeType(String, String, String, double) - Constructor for class warlock.attribute.AttributeType
-
Create a new AttributeType.
- attrVal(String) - Method in class warlock.object.warlock.Warlock
-
Returns the current value of an attribute


Aaron Ramsey warns he has unfinished business at Euro 2020 with Wales
Wales booked their place in next summer's Euros with victory over Hungary at the Cardiff City Stadium on Tuesday night thanks to two goals from Aaron Ramsey
by James Nursey, https://www.mirror.co.uk/authors/james-nursey/Aaron Ramsey admits he has “unfinished business” at the Euros after firing Wales back to the tournament in memorable style.
Ramsey returned to the Welsh team to score in each half as they beat Hungary 2-0 in Cardiff to clinch second spot in Group E.
The Euro 2016 semi-finalists are now waiting for next Saturday's draw to learn their opponents in the summer.
No-one is more fired up than Ramsey who was in the team of the tournament last time but had to sit out the semi-final loss to Portugal with suspension.
Asked if he had unfinished business at the Euros, attacking midfielder Ramsey, 28, replied: “Yes.
“It was a disappointing ending to the Euros for me by missing out on the semi-final.
“Now I have the opportunity to go out there and express myself again and hopefully we can have another successful run like we did last time.
“To experience this again now is going to be some journey. We're looking forward to it.”
Ramsey missed the 2–0 exit to Portugal in France after successive bookings in the knock-out stages to Northern Ireland and Belgium.
He returned with a bang on his first competitive start for Wales since September 2018 with a brace to climb to joint seventh in the nation's all-time scorers list with 16 goals.
Ramsey reckons returning to the Euros has helped cushion the blow of Wales failing to make the 2018 World Cup after losing their last qualifier at home to Ireland.
Ramsey, who has 60 caps, added: “To do back-to-back Euros is something special.
“It was very disappointing not to make the World Cup.
“But we learned from that experience of that night to bring it back here and to win in the manner that we did was a nice experience.”
Ramsey quit Arsenal after 11 years this summer on a free to move to Italian giants Juventus .
He has only made eight appearances for them and four starts amid injury but he insisted: "I'm enjoying my time over there at the moment.”


...
component are function defining the object myOb
a property inside the object MyX
a function inside the object myFun
in your program creating the object myObject = new myObject


Nasus1795.github.io
Used Machinery GPC12/200 Furnace - Carbolite, Tool room and Bench Top Furnaces - Surface Treatment, Finishing Plant Equipment, ALDRIDGE, WALSALL, - United Kingdom - Machines by dealer RILEY INDUSTRIES LTD OW1638.
Carbolite GPC General Purpose Chamber Furnaces - This furnace reaches a temperature of 1200 degrees Celsius, holds up to 36 liters, and has a 9000W power supply.
GPC 12/65 We can sell the products of CARBOLITE at a Advantage price. Guang Zhou Lai Jie Electric Co.,LTD. Please contact with “Tommy” for the price.
Installation, Operation Maintenance Instructions 1200°C - 1300°C Chamber Furnaces GPC models This manual is for the guidance of operators of the above Carbolite products. GPC 12/65 - gzlaijie-resolver.com. Manuali di istruzione Please select your Carbolite Gero product, model and controller from the operating manual database to find the complete operating manual If you are looking for the manual of a discontinued model, please contact. Installation, Operation Maintenance Instructions. Carbolite GPC 12/200 The Carbolite GPC 12/200 general purpose chamber furnace is a free standing furnace with a 1200°C, temperature range and an internal 200 litre capacity.
Manuali di istruzione Carbolite. Carbolite GPC 12/200 The Carbolite GPC 12/200 general purpose chamber furnace is a free standing furnace with a 1200°C, temperature range and an internal 200 litre capacity. Applications in general industry include:. Carbolite - GPC12/200 Furnace Tool room and Bench. Carbolite GPC 12/200 Handbücher. Carbolite GPC12/200 Furnace - Riley Surface World. Please select your Carbolite Gero product, model and controller from the operating manual database to find the complete operating manual. If you are looking for the manual of a discontinued model, please contact.
Used Carbolite for sale. Top quality machinery listings. Operating manual / instructions download - Carbolite. Carbolite GPC General Purpose Chamber Furnaces - Spectra.
Search for used carbolite. Find Carbolite for sale on Machinio.


Software Engineer.Currently working in Microsoft co-operation.
My name is . An amateur programmer who writes code every day and watches movies every day.


| 10 Aug 1628 |
To assist in the war with Poland, Swedish King Gustavus Adolphus builds a magnificent warship, the Vasa, with 64 bronze cannon on two tiers. But on its maiden voyage, the lower gunports are accidentally left open, and the ship immediately sinks to the bottom of Stockholm harbor. The ship remains submerged until it is raised in 1961 to become a tourist attraction. |
| 16 Mar 1792 |
King Gustav III of Sweden shot in the back by Jacob Johan Anckarström at a costume ball, Royal Opera, Stockholm. Lingers from his wound until the 29th of March. |
| 17 Jan 1945 |
Raoul Wallenberg disappears while in Soviet custody. |
| 18 Sep 1961 |
Swedish diplomat and Secretary-General of the United Nations, Dag Hammarskjöld killed in an airplane crash in the Congo. |
| 10 Aug 1972 |
Paul McCartney and his wife Linda are arrested in Sweden after postal officials intercept a parcel of hashish addressed to their band, Wings. |
| 28 Feb 1986 |
Olof Palme, Prime Minister of Sweden, assassinated leaving a Stockholm movie theater, by an unknown assailant. |
| 11 Sep 2003 |
Swedish Foreign Minister Anna Lindh assassinated by an unknown assailant, stabbed while shopping in a Stockholm department store. Lindh was the one of the main figures in the plebiscite to decide whether or not to adopt the Euro, which was held several days after the assassination. |


With Mobile phones being the new king of personal communication it is crucial for your website to work more like and application and less like a centralised portal. It is crucial to work in an online/offline world.
SocketStream has until now had an event based Router. In 0.5 this is being replaced. Routing will come back in some other form in 1.0
The aim is to push assets and content to edge caches and ideally directly onto the client devices. This means that the content of your application must be identified so it can be push out before it is needed, so the traditional Connect/Express model pulls you in the wrong direction.
That being said the paradigm of defining REST resources is a very good one and fits into where the we is and will be going with HTTP version 2. So you should continue to define your content with URL semantics. Go ahead and base your implementation on Connect/Express middleware. We've prepared some examples for you for Express and Connect.
In the future Express apps will be extended with semantics for real-time endpoints. Permissions will be span both HTTP, streaming and client side semantics.
For this reason the use of middlewares are likely to change. ss.http.middleware
still mostly works but is deprecated.


HOT RESTAURANT
CURRENT RESERVATION AND WAITING LIST
Make a Reservation
Current Reservations
Waiting List
API Tables
|
API Waitlist
|
Clear Table


{{ post.title }}
{{ post.excerpt }}
Read More
--- layout: default ---
Well, here we are! This place exists now.
The primary reason you might be here is because of a pdf of "Advisories" that I released some time ago, but you might have also been drawn in as a result of one of the informational surveys I've put out.


¢0.0007
per second of a busy CPU
Usually, they charge you per hour, whether your site is working hard or is idle. We're the only platform in the world that charges per CPU usage.
You pay per second of CPU usage, not per hour or per month. If your app is silent, you pay nothing. Once you get the traffic and your containers consume more CPU time, you pay proportionally more.
The number of containers is scaled automatically. We monitor your CPU usage and start more containers when needed. Once your application slows down, we shut down unnecessary containers. All this happens behind the scene.
We fully support green/blue deployment strategy, out of the box. When a new version of your app is ready for deployment, we attempt to start new containers for it, check their readiness, and then we shut down the old version. End-users experience zero down-time.
Unlike many other PaaS providers, we support all technologies that can run on Linux, including Java, Ruby, Go, Python, PHP, etc. Thanks to Docker, you have full control of your app configuration.


(Almost) another new year by Jewish calendar. What do I wish for the following year?
- World peace
- Good health to all
- Relaxed GTID constraints
I'm still not using GTID, and still see operational issues with working with GTID. As a latest example, our new schema migration solution, gh-ost, allows us to test migrations in production, on replicas. The GTID catch? gh-ost
has to write something to the binary log. Thus, it "corrupts" the replica with a bogus GTID entry that will never be met in another server, thus making said replica unsafe to promote. We can work around this, but...
I understand the idea and need for the Executed GTID Set
. It will certainly come in handy with multi-writer InnoDB Cluster. However for most use cases GTID poses a burden. The reason is that our topologies are imperfect, and we as humans are imperfect, and operations are most certainly imperfect. We may wish to operate on a replica: test something, by intention or mistake. We may wish to use a subchain as the seed for a new cluster split. We may wish to be able to write to downstream replicas. We may use a 3rd party tool that issues a flush tables with read lock
without disabling sql_log_bin
. Things just happen.
For that, I would like to suggest GTID control levels, such as:
- Strict: same as Oracle's existing implementation. Executed sets, purged sets, whatnot.
- Last executed: a mode where the only thing that counts is the last executed GTID value. If I repoint replica, all it needs to check is "hey this is my last executed GTID entry, give me the coordinates of yours. And, no, I don't care about comparing executed and purged sets, I will trust you and keep running from that point on"
- Declarative: GTIDs are generated, are visible in each and every binary log entry, but are completely ignored.
I realize Oracle MySQL GTID is out for some over 3 years now, but I'm sorry - I still have reservations and see use cases where I fear it will not serve me right.
How about my previous years wishes? World peace and good health never came through, however:
- My 2015 wish for "decent, operations friendly built in online table refactoring" was unmet, however
gh-ost
is a thing now and exceeds my expectations. No, really. Please come see Tom & myself present gh-ost and how it changed our migration paradigm. - My 2012 wish for "decent, long waited for, implementation of Window Functions (aka Analytic Functions) for MySQL" was met by MariaDB's window functions.
Not strictly Window Functions, but Oracle MySQL 8.0 will support CTE (hierarchial/recursive), worth a mention.
See you in Amsterdam!
comments powered by Disqus


Chapter SummaryC++ provides a fairly limited number of statements. Most of these affect the flow of control within a program:
There is also a return statement, which will be covered in Chapter 7. In addition, there are expression statements and declaration statements. An expression statement causes the subject expression to be evaluated. Declarations and definitions of variables were described in Chapter 2. |


The purpose of this Vignette is to show you how to correctly load and work with an XGBoost model that has been dumped to JSON. XGBoost internally converts all data to 32-bit floats, and the values dumped to JSON are decimal representations of these values. When working with a model that has been parsed from a JSON file, care must be taken to correctly treat:
For the purpose of this tutorial we will load the xgboost, jsonlite,
and float packages. We’ll also set digits=22
in our options
in case we want to inspect many digits of our results.
require(xgboost)
require(jsonlite)
## Loading required package: jsonlite
require(float)
## Loading required package: float
options(digits=22)
We will create a toy binary logistic model based on the example first provided here, so that we can easily understand the structure of the dumped JSON model object. This will allow us to understand where discrepancies can occur and how they should be handled.
<- c(20180130, 20180130, 20180130,
dates 20180130, 20180130, 20180130,
20180131, 20180131, 20180131,
20180131, 20180131, 20180131,
20180131, 20180131, 20180131,
20180134, 20180134, 20180134)
<- c(1, 1, 1,
labels 1, 1, 1,
0, 0, 0,
0, 0, 0,
0, 0, 0,
0, 0, 0)
<- data.frame(dates = dates, labels=labels)
data
<- xgboost(
bst data = as.matrix(data$dates),
label = labels,
nthread = 2,
nrounds = 1,
objective = "binary:logistic",
missing = NA,
max_depth = 1
)
## [1] train-logloss:0.505253
We will now dump the model to JSON and attempt to illustrate a variety of issues that can arise, and how to properly deal with them.
First let’s dump the model to JSON:
<- xgb.dump(bst, with_stats = FALSE, dump_format='json')
bst_json <- fromJSON(bst_json, simplifyDataFrame = FALSE)
bst_from_json <- bst_from_json[[1]]
node cat(bst_json)
## [
## { "nodeid": 0, "depth": 0, "split": "f0", "split_condition": 20180132, "yes": 1, "no": 2, "missing": 1 , "children": [
## { "nodeid": 1, "leaf": 0.360000014 },
## { "nodeid": 2, "leaf": -0.450000018 }
## ]}
## ]
The tree JSON shown by the above code-chunk tells us that if the data is less than 20180132, the tree will output the value in the first leaf. Otherwise it will output the value in the second leaf.  What happened?
At this stage two things happened:
When working with imported JSON, all data must be converted to 32-bit floats
To explain this, let’s repeat the comparison and round to two decimals:
round(bst_preds_logodds,2) == round(bst_from_json_logodds,2)
## [1] TRUE TRUE TRUE TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE
## [13] FALSE FALSE FALSE TRUE TRUE TRUE
If we round to two decimals, we see that only the elements related to
data values of 20180131
don’t agree. If we convert the data
to floats, they agree:
# now convert the dates to floats first
<- ifelse(fl(data$dates)<node$split_condition,
bst_from_json_logodds $children[[1]]$leaf,
node$children[[2]]$leaf)
node
# test that values are equal
round(bst_preds_logodds,2) == round(bst_from_json_logodds,2)
## [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [16] TRUE TRUE TRUE
What’s the lesson? If we are going to work with an imported JSON model, any data must be converted to floats first. In this case, since ‘20180131’ cannot be represented as a 32-bit float, it is rounded up to 20180132, as shown here:
fl(20180131)
## # A float32 vector: 1
## [1] 20180132
All JSON parameters stored as floats must be converted to floats.
 What happened? Although we’ve converted the data to 32-bit floats, we also need to convert the JSON parameters to 32-bit floats. Let’s do this:
# now convert the dates to floats first
<- ifelse(fl(data$dates)<fl(node$split_condition),
bst_from_json_logodds as.numeric(fl(node$children[[1]]$leaf)),
as.numeric(fl(node$children[[2]]$leaf)))
# test that values are equal
== bst_from_json_logodds bst_preds_logodds
## [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [16] TRUE TRUE TRUE
All equal. What’s the lesson? If we are going to work with an imported JSON model, any JSON parameters that were stored as floats must also be converted to floats first.
Always use 32-bit numbers and operators
We were able to get the log-odds to agree, so now let’s manually calculate the sigmoid of the log-odds.  What is going on here? Well, since we
are using the value 1
in the calculations, we have
introduced a double into the calculation. Because of this, all float
values are promoted to 64-bit doubles and the 64-bit version of the
exponentiation operator exp
is also used. On the other
hand, xgboost uses the 32-bit version of the exponentiation operator in
its sigmoid
function.
How do we fix this? We have to ensure we use the correct data types everywhere and the correct operators. If we use only floats, the float library that we have loaded will ensure the 32-bit float exponentiation operator is applied.
# calculate the predictions casting doubles to floats
<- ifelse(fl(data$dates)<fl(node$split_condition),
bst_from_json_preds as.numeric(fl(1)/(fl(1)+exp(fl(-1)*fl(node$children[[1]]$leaf)))),
as.numeric(fl(1)/(fl(1)+exp(fl(-1)*fl(node$children[[2]]$leaf))))
)
# test that values are equal
== bst_from_json_preds bst_preds
## [1] TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE
## [16] TRUE TRUE TRUE
All equal. What’s the lesson? We have to ensure that all calculations are done with 32-bit floating point operators if we want to reproduce the results that we see with xgboost.


INDIAN INSTITUTE OF INFORMATION TECHNOLOGY KALYANI
Login
Home
Events
Sports
Singing
JobFair
TechFest
About
Facalty
Academics
Antiragging
Contacts
HOME
|
CONTACT US
2018 Indian Institute of Information Technology, Kalyani.All Rights Reserved.


Job Application Form
What Position are you applying for?
-- Select --
Software Developer
Recruitment Lead
Data Science Engineer
Test Automation Engineer
Mobile Application Developer
Field Officer
Infrustructure Manager
First Name
Middle Name
Last Name
Phone Number
Email Address
Please Department
Logistics
Innovation
Field Operations
Corp-Ops
Human Resource
Communications
Street Address Line1
Street Address Line2
City
City
Postal/Zip Code
Postal/Zip Code
State/Province
State/Province
Country
Country
Job Experience
Position
Start Date
End Date
Responsibilities
Highest Level of Education
Resume Attachment
Sample Work Attachment
Salary Expectations
Where did you hear about this job?
-- select --
Career Point
Linkedin
Job Web Kenya
Brighter Monday
A Friend
Others
Submit Application


Finally I've decided to start blogging !
For sometime I've been procrastinating to start writing down my thoughts, experiments & experiences
--- giving myself excuses of busy schedule. But being unable to do something due to lack of time is
most probably sign of time mis-management.
So I started planning how I'm going to spend my week long time --- just as sprint planning, where I sketch
out what're the things I'm going to do this week, with day level granularity, on each Saturday evening. After following
this ritual for last 5 months I've discovered it's not only easy to accomodate lots of tasks in 86,400 seconds
but also accomplish 100% if planned properly. I see this planning as an art, where there's nothing optimal, rather
it's a gradual progression towards betterment, where failure is a friendly teacher ✅.
When I started following this ritual, I used to sketch whole plan in my head. After few weeks I decided to use pencil & paper
and was able to do better planning where I was accomplishing >90% of what I planned.
During this period, I taught myself how to wake up early morning. All it takes --- keeping alarm away
from bed's reach, so that I'm forced to get out of bed & stop the alarm, rather than snoozing it.
In last 5 months, I've worked on 3 large-scale production-grade open-source software systems. May be some otherday I'll
talk about them. Reading more blogs; listening to podcasts; reading books are among the things
I've become better at doing. I've seen improvement in the way I manage my tasks at workspace --- completing more
good quality tasks in lesser timespan. Empowered by better time management, I've seen improvement
in my relationship with other human beings & nature ( it's important 😉 ).
But more important part is understanding that, scheduling is an art --- where everyday collecting
feedback; accumulating them over week & on Saturday evening sitting down for making a better
plan --- is an infinite loop.
I noticed getting inside infinite loop is hard, but once you're in, it's beautiful here 🥰.
I'd speak from my heart, as I'm writing this, I feel writing is indeed impactful.
Have a great time !


Capacitor features a native iOS bridge that enables developers to communicate between JavaScript and Native Swift or Objective-C code.
Capacitor iOS apps are configured and managed through Xcode, with dependencies managed by CocoaPods.
Building iOS apps requires some iOS development dependencies to be installed, including Xcode 9 and the Xcode command line tools.
Note: It's possible to develop and build iOS apps without a mac, such as by using Ionic Appflow's Package service. Consult your service of choice for more information.
By default, an iOS project is created for every Capacitor project. If you are adding Capacitor to an existing project, you can manually add the iOS project using
npx cap add ios
npx cap sync
The sync
command updates dependencies, and copies any web assets to your project. You can also run
npx cap copy
To copy web assets only, which is faster if you know you don't need to update native dependencies.
To open the project in Xcode, run
npx cap open ios
Once Xcode is open, just click the Play button to run your app on a Simulator or Device.
If your app ran you are now ready to continue developing and building your app. Use the various APIs available, Capacitor or Cordova plugins, or custom native code to build our the rest of your app.
Follow these guides for more information on each topic:


I am a fullstack Javascript developer. I love working with Node.js, Express, React-Redux, Postgres, and SQL (to name a few). I have experience in NoSQL, Graph databases, and Typescript. And I am inspired to learn Go, Solidity, and Electron Development. I enjoy working in web development because there is always something new just around the corner.
I love both writing code for computers and words for humans. Originally an English major, I enjoy reading good books. I also love exploring in the outdoors, climbing, and kayaking. My most recent professional work has included working as a Teaching Assistant at Fullstack Academy of Code in Chicago, and as a Javascript developer at CFX Trading.


{% extends "base.html" %} {% block content %}
{{ profile_user.username }} has not uploaded a profile picture
{{ notebook.description }}
Publish a notebook by by klicking here!


Try out our Premium Member services: Virtual Legal Assistant, Query Alert Service and an ad-free experience. Free for one month and pay only if you like it.
IN THE HIGH COURT OF JUDICATURE AT PATNA Civil Writ Jurisdiction Case No.5409 of 2016 ====================================================== Dheeraj Kumar ... ... Petitioner/s Versus The State of Bihar & Ors ... ... Respondent/s ====================================================== Appearance : For the Petitioner/s : Mrs. Shama Sinha, Advocate For Pollution Control Board: Mr. Shivendra Kishore, Sr. Advocate Ms. Binita Singh, Advocate ====================================================== CORAM: HONOURABLE THE CHIEF JUSTICE and HONOURABLE MR. JUSTICE RAJEEV RANJAN PRASAD ORAL ORDER
(Per: HONOURABLE THE CHIEF JUSTICE) 16 12-04-2018 In this Public Interest Litigation filed, two issues have been raised, one is with regard to the drainage problem in the city of Darbhanga and the second is with regard to removal of bio waste and other medical waste which is accumulated in the city and contending that the same is not being looked into according to the statutory provision i.e. the Prevention of Pollution Control Act, the petition has been filed in public interest.
As far as addressing the problem of drainage is concerned, the Darbhanga Municipal Corporation, the Railway administration and the State Government have filed their separate affidavit and on going through the affidavits we find that each is blaming the other for the delay in completing certain Patna High Court CWJC No.5409 of 2016(16) dt.12-04-2018 2/3 works pertaining to construction of bridge, allocation of land, alignment etc. and with regard to the bio medical waste removal also the Pollution Control Board points out that they have given the recommendation and pursuant thereto tenders have been issued for allotting the work of dealing with the bio waste to a particular company.
On going through the detailed counter affidavit filed by all the three wings of the State, namely, the Railway administration, the Municipal Corporation, Darbhanga and the State, we find that it is a case where the left hand does not know what is the right hand is doing. There is no coordination between the departments and each department is working on its own as a consequence thereof the projects which are to be implemented are being delayed and the ultimate sufferer is the citizens of the town.
Taking note of the manner in which the three departments are working, it is directed that the Chief Secretary of the State of Bihar shall constitute a committee consisting of all the three departments which shall monitor the execution of the work in question and submit a report to this Court. The Chief Secretary to constitute a committee and inform this Court with regard to the committee constituted for execution of the Patna High Court CWJC No.5409 of 2016(16) dt.12-04-2018 3/3 work in question.
List the matter after two weeks to enable the Chief Secretary to constitute a committee and submit his affidavit in the matter. After the committed is constituted, we shall proceed in the matter and monitor the execution of the work after consultation with the Committee.
(Rajendra Menon, CJ) (Rajeev Ranjan Prasad, J) P.K.P./-
U


Welcome {{ user.profile }}!
Total posts
{{ posts_count }}0% Since last month
Total researcher
{{ user_count }}0% Since last month
Total labs
{{ labs_count }}0% Since last month
New users
{{ user_count }}0% Since last month
Overview
Posts count
-
Performance
New Users
-
Performance
New Users
Star Contributors
| Contributor | Domain | Post count |
|---|---|---|
| User 1 | artificial intelligence | 340 |


A new co-op in South Philadelphia founded by food makers for social change.
DonateWe have a mission to provide a seat at our table for all our neighbors. 1149 is a space that proactively includes and involves black folks, folks of color, folks with disabilities, immigrants, women, queer and trans people, and everyone with intersections of these identities. Your inclusion is at the center of what we do.
The front of 1149 has room for a collective gallery, community apothecary, and ongoing events. The back of the co-op has room for creators in the food justice movement to incubate their own businesses and collaborate on the 1149 lunch menu.
By pooling our resources, activists and artists can create a home for visionary work in Philly. In a moment when most of the city has been impacted by a removal of its history through gentrification, we can hold the legacy of El Compadre (1149’s predecessor) through the community building and organizing that’s happening here. That’s a torch we strive to carry.
Jena Harris, who runs foodeveryonedeserves (f.e.d.): a catering company that frequently works with and supports community organizing and social justice projects.
Ailbhe "Al" Pascal, of Fikira Bakery: a bike-powered bread CSA known for seasonal vegetable breads and other sliding-scale offerings.
A cooperative kitchen space we hope collaborators will use for community-oriented food projects and events.
A democratic event space for social justice and art.
A safe place for organizers to gather.
"At 1149, a mission-driven caterer and bike-powered baker will serve lunch and seek collaborators to use the space for community-oriented food projects and events."
Read the full article.
We'd love to hear from you! Send us an email + we'll get back to you as soon as we can!
1149 S. 9th Street Philadelphia, PA 19147


|
Contiki 2.5
|
Usb Device Descriptor. More...
#include </cygdrive/e/share/contiki/cpu/avr/dev/usb/usb_descriptors.h>
Data Fields | |
| U8 | bLength |
| Size of this descriptor in bytes. | |
| U8 | bDescriptorType |
| DEVICE descriptor type. | |
| U16 | bscUSB |
| Binay Coded Decimal Spec. release. | |
| U8 | bDeviceClass |
| Class code assigned by the USB. | |
| U8 | bDeviceSubClass |
| Sub-class code assigned by the USB. | |
| U8 | bDeviceProtocol |
| Protocol code assigned by the USB. | |
| U8 | bMaxPacketSize0 |
| Max packet size for EP0. | |
| U16 | idVendor |
| Vendor ID. ATMEL = 0x03EB. | |
| U16 | idProduct |
| Product ID assigned by the manufacturer. | |
| U16 | bcdDevice |
| Device release number. | |
| U8 | iManufacturer |
| Index of manu. string descriptor. | |
| U8 | iProduct |
| Index of prod. string descriptor. | |
| U8 | iSerialNumber |
| Index of S.N. string descriptor. | |
| U8 | bNumConfigurations |
| Number of possible configurations. |
Usb Device Descriptor.
Definition at line 323 of file usb_descriptors.h.


fun parseEmojis(input: String): List<String>
only need to consider 'custom' emoji which are alphanumeric strings, no longer than 15
Parses a string of input for all contained emojis of the form ':input:'.
input
- the type of a member in this group.
Return
the list of emoji's found


Home
Create New Simulation
Visualize Existing Simulation
Create New Experiment
Export Experiment Data
Speed:
observers only
contains beacon
wanted beacon
empty
Wanted beacon's Id:
Pause
Real Board
Estimated Board


Create an Admin Account
First name
Middle name
Last name
Email
What Department
None
Customer Service
Marketting
Sales
Advertising
Bankvegelism
Select Image


{% extends 'help/base.html' %} {% block breadcrumb_content %}
This is the help page for our Integrated Search feature. Access it here .
The Data Portal hosts many different datasets. The largest and most commonly used is our Specimens Collection , but there are {{ h.SI_number_span(stats.dataset_count - 1) }} others. Previously, you could only search in one resource (one file within a dataset) at a time, but integrated search allows you to search multiple resources at the same time.
We've also made the search a lot more powerful by adding advanced features such as boolean logic (AND, OR, and NOT) and number-based range queries (greater than, less than), with more planned in the future.
If you still want to use the old search, we haven't removed anything. Just view the resource you want to search in and everything should be exactly the same as before.
| Free-text search | Search all fields for the specified text. |
|---|---|
| Search button | Run the current query. |
| Helpful buttons (search) |
Help: takes you to this help page.
Advanced: hides/shows the filters (shown by default).
Query: shows the JSON query that will be submitted to the API; useful if you
need to troubleshoot or want to use the search programmatically.
Reset: clears all the filters and free-text search.
Resources: view/edit the list of resources being searched by the current query.
|
| Helpful buttons (results) |
Cite: generates a DOI for this search.
Share: generates a memorable link for social sharing.
Download: download the results.
|
| Filter terms | Filters on specific fields. |
| Filter group | Groups of filter terms (useful for advanced logic, e.g. OR or NOT queries). |
| Result view switcher | Change how the results are displayed; defaults to table. |
| Results | Records matching the current query, displayed using the current view type (e.g. table, list, or gallery). |
The integrated search can search across multiple resources (individual sets of records within datasets) simultaneously.
Clicking on Resources will bring up a dialog similar to this one:
To include a resource in your search, tick the box next to its name. You can
select/deselect all the resources within a dataset by clicking the dataset name in green
above it, and select/deselect all resources in the list using the "select all" checkbox
at the top of the list. To deselect everything except the resources in one
particular dataset, hold the alt
key and click the dataset name.
To dismiss the dialog and save your changes, click outside the box.
The free-text search box allows you to search all fields in your chosen resource list. For example, the free-text search "linnaeus" will find records where "Linnaeus" is in scientificName and those where "Linnaeus" is in determinationNames.
Below the free-text search is the filter builder. Filter can refer to any part of this: a whole group of multiple items, or a single item. Each of the smallest items are referred to as terms, and they are linked together in groups. For example:
There are two terms in this filter: kingdom = animalia and collectionCode = zoo. They are linked together in an AND (all) group.
To add a filter term or group, click the icon in the filter builder, then select the option you need.
A term filters on field names (i.e. it will be applied to every field with that name in every resource in the query - case-insensitively). Terms are the basic units of filtering.
To add a new term, click the icon and click "new term". This will bring up the term editor.
On the left side, select the fields to search in. Typing in the textbox will filter the list; you can then select a field by clicking on it. To remove a field name, click the icon.
On the right side, specify the details of your query: field type, comparison type, and values.
Field type is the data type that the field will be read as. Most queries will use the default "Text" type, but more complex queries may use the "Number" or "Geo" types. A fourth type, "Any", only has one comparison type ("exists") and just checks if the field has any content at all.
Comparison type describes how the field value will be compared to the query/comparison value. Each field type has different comparison types available.
Comparison value is the value to which the field values will be compared.
Display name is entirely optional, but may be useful for especially complex queries with many terms: it allows you to set a "friendly" display name for the term, so it will be shown in a more memorable way.
A number range query: matching fields will contain a number between one and five. (Click the angle brackets to toggle equality comparisons).
A geo point query: matching records will have coordinates within five miles of the specified coordinates.
NB: geo queries do not use field names. They are based on longitude and latitude points that are set elsewhere by the resource maintainer.
A geo polygon query: matching records will have coordinates inside the specified area.
You can continue adding as many terms as necessary to your query:
Groups allow you to link terms and use some boolean logic in your queries. You can have three types of group: AND (aka 'all of'), OR (aka 'any of'), and NOT (aka 'none of'). To change the group type, click the name in the top left corner. In the groups below, the terms are the same but the group type has changed. This drastically changes the records found.
Groups can also be nested under the top level:
This query would search for either botany records from 2000 or palaeontology records from 2008.
NB: when you're using the user interface, the whole query is wrapped in a hidden "and" group.
Presets are predefined filter terms that are commonly used and/or need to be dynamically set. There are currently very few of these, but more can be added later. Please {% link_for _('contact us'), named_route='contact.form' %} if you need one of these presets added.
There are two types of presets: static and dynamic. These are both found in the same place, so the difference is explained here for interest/clarity's sake more than anything else.
A static preset contains the same information every time, e.g. the Birdwing
Butterfly Digitisation will always add a term where project = Birdwing
Butterfly Digitisation
.
Dynamic presets change their value dependent on other factors in the query at
the time they are added. Once added, they act like every other filter term, so try
to add these last if possible. An example is the Has Image preset, which
extracts image fields from the current list of resources and adds an
"exists
" term that checks if these fields have content in them.
In this example, multiple resources with an image field are being searched, so multiple image fields are added to the term. Not every resource will have an image field set, and those that do may share field names with other resources, so the list is likely to be much shorter than the actual list of resources.
In contrast to the previous image, in this example only one resource with an image field is being searched (or, all the resources being searched have the same image field name), so only one field is selected.
The results of a search can be displayed in different ways, termed "views". To change the view, click the name of the view above the results (see Result View Switcher in 1. UI Overview).
The fields shown in some views (i.e. Table and List) are dynamically selected via an API method that attempts to guess the "most relevant" fields.
The table view is the default view. It displays the results in tabular form.
The list view displays a short summary of each record individually, along with thumbnails of any associated images (if there are any).
Clicking on an image brings up the viewer overlay, which displays a larger version and offers an option to download the image.
The gallery view displays all the images associated with records in the search. It does not show records separately, but simply lists out all available images for each page of results.
Clicking on an image brings up the viewer overlay, which displays a larger version and offers an option to download the image.
The cite button generates a digital object identifier (DOI) for the search, allowing you to easily cite the results in publications.
Similarly to the cite button, the share button also generates a link to the search; but it is intended for more informal use, such as when sharing a search with a colleague. It uses three random words to create a memorable short link (with the option to include the page and view) that can then be shared.
The download button allows you to request a full download of the set of results in CSV format. The record data will be automatically packaged up and sent to your email address when ready.
This is a good place to start for fixing any UI issues, e.g. menus not loading or popup boxes dismissing as soon as you click them.
CTRL
+F5
.
As always, if you have any further issues, questions, or suggestions, please {% link_for _('contact us'), named_route='contact.form' %}. We are also available on Gitter and Twitter .
{% endblock %}


| revision-up-to: | 8961 (1.0) |
|---|
Django’s chock-full of shortcuts to make web developer’s lives easier, but all those tools are of no use if you can’t easily deploy your sites. Since Django’s inception, ease of deployment has been a major goal. There’s a number of good ways to easily deploy Django:
Deploying under mod_python is the recommended deployment method; start there if you’re not sure which path you’d like to go down.
See also
Aug 31, 2012


I'm a public speaker. I deliver presentations where the audience does not fall asleep, learn actionable insights and provide good feedback about the conference after.
All my presentations are based on the real experience of leading tech teams and building products in mobile and gaming industries. I know how to make talk interesting for newbies as well as experts. On the stage, I can wake up an audience in the morning or save the presentation if a projector fails.
My goal is to bring the quality of TED talks to the technical presentations.
Reach me if you need a memorable keynote speaker or a presentation where the audience will learn things that are not possible to find in documentation or Stack Overflow. Also, I run workshops to train people how to become a better speaker.


It is the number of people at your company using Slack. Luno is designed to work with any size team, so we don't have any limits on your Slack team size.
We bill monthly, so you'll be charged for your plan at the end of your free trial. Your subscription will automatically renew on that day every month until you change your plan or cancel your account.
An FAQ Answer is anything you train Luno to reply with. Your team can bug Luno for FAQ Answers in Slack as often as they want.
Sure, you can change your plan at any time. You'll be charged the new monthly rate on your next scheduled payment date.
A Bot Traier is anyone who can access to your Luno Admin Dashboard to add and edit FAQ Answers.
14 days. If you need more time, send an email to<EMAIL_ADDRESS>A bot in Slack looks like a real user in your Slack team, except it can be trained with automated tasks and replies.
We're happy to help — Contact Us.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
©lfi/photoshot (6); © photoshot/collection christophel (3); © af archive/alamy stock photo (4); © face to face/photoshot; © moviestore collection ltd/alamy stock photo (2); © photoshot;© moviestore collection ltd/alamy stock photo
1. Divergent (2014) & Insurgent (2015)
2. Contagion (2011)
3. Sense and Sensibility (1995)
4. The Reader (2008)
Won Oscar for best actress.
5. All the King's Men (2006)
6. The Life of David Gale (2003)
7. Revolutionary Road (2008)
Winslet recruited Leonardo DiCaprio to star with her.
8. Titanic (1997)
Winslet’s highest-grossing film; Oscar nomination for best actress.
9. The Holiday (2006)
10. Finding Neverland (2004)
11. Eternal Sunshine of the Spotless Mind (2004)
12. Labor Day (2013)
13. Iris (2001)
14. Holy Smoke (1999)
15. Hideous Kinky (1998)
Set on which she met her first husband.
16. Enigma (2001)
17. Little Children (2006)
18. Quills (2000)
19. Heavenly Creatures (1994)
Her big-screen debut. One reviewer wrote, “Winslet is a bright-eyed ball of fire, lighting up every scene she’s in.”
20. A Little Chaos (2014)
21. Carnage (2011)
22. Hamlet (1996)
23. Jude (1996)


How about heading back to the homepage instead? It's nice there and there are lots of things to click on.
If you think there is supposed to be something here that isn't let us know via the Issues page.
But don't worry we're probably on the case. In the meantime you could try refreshing the page, if that doesn't work let us know by creating an issue on the Issues page.
{{/is_500}}


strtotime
(PHP 4, PHP 5, PHP 7)
strtotime — 将任何英文文本的日期时间描述解析为 Unix 时间戳
说明
int strtotime ( string $time [, int $now = time() ] )
本函数预期接受一个包含美国英语日期格式的字符串并尝试将其解析为 Unix 时间戳（自
January 1 1970 00:00:00 GMT 起的秒数），其值相对于 now 参数给出的时间，如果没有
提供此参数则用系统当前时间。
本函数将使用 TZ 环境变量（如果有的话）来计算时间戳。自 PHP 5.1.0 起有更容易的方
法来定义时区用于所有的日期／时间函数。此过程在 date_default_timezone_get() 函数
页面中有说明。
参数
time
日期/时间字符串。正确格式的说明详见日期与时间格式。
now
用来计算返回值的时间戳。
返回值
成功则返回时间戳，否则返回 FALSE。在 PHP 5.1.0 之前本函数在失败时返回 -1。
错误／异常
在每次调用日期/时间函数时，如果时区无效则会引发 E_NOTICE 错误，如果使用系统设定
值或 TZ 环境变量，则会引发 E_STRICT 或 E_WARNING 消息。参见
date_default_timezone_set()。
更新日志
版本 说明
5.3.0 在 PHP 5.3.0 之前， 24:00 不是一个有效的格式，并且 strtotime() 会返回
FALSE。
In PHP 5 prior to 5.2.7, requesting a given occurrence of a given weekday
5.2.7 in a month where that weekday was the first day of the month would
incorrectly add one week to the returned timestamp. This has been
corrected in 5.2.7 and later versions.
5.1.0 失败时返回 FALSE，不再是 -1。
5.1.0 现在发布 E_STRICT 和 E_NOTICE 时区错误。
5.0.2 在 PHP 5 中到 5.0.2 之前，"now" 和其它相对时间从今天午夜起错误计算了。这
和正确从当前时间起计算的其它版本不同。
5.0.0 Microseconds began to be allowed, but they are ignored.
4.4.0 在 PHP 4.4 之前，"next" 被错误计算为 +2。对此通常的解决方法是用 "+1"。
范例
Example #1 strtotime() 例子
Example #2 失败检查
注释
Note:
如果给定的年份是两位数字的格式，则其值 0-69 表示 2000-2069，70-100 表示
1970-2000。 See the notes below for possible differences on 32bit systems
(possible dates might end on 2038-01-19 03:14:07).
Note:
有效的时间戳通常从 Fri, 13 Dec 1901 20:45:54 GMT 到 Tue, 19 Jan 2038
03:14:07 GMT（对应于 32 位有符号整数的最小值和最大值）。不是所有的平台都支
持负的时间戳，那么日记范围就被限制为不能早于 Unix 纪元。这意味着在 1970 年
1 月 1 日之前的日期将不能用在 Windows，一些 Linux 版本，以及几个其它的操作
系统中。不过 PHP 5.1.0 及更新的版本克服了此限制。
For 64-bit versions of PHP, the valid range of a timestamp is effectively
infinite, as 64 bits can represent approximately 293 billion years in
either direction.
Note:
Dates in the m/d/y or d-m-y formats are disambiguated by looking at the
separator between the various components: if the separator is a slash (/),
then the American m/d/y is assumed; whereas if the separator is a dash (-)
or a dot (.), then the European d-m-y format is assumed.
To avoid potential ambiguity, it's best to use ISO 8601 (YYYY-MM-DD) dates
or DateTime::createFromFormat() when possible.
Note:
Using this function for mathematical operations is not advisable. It is
better to use DateTime::add() and DateTime::sub() in PHP 5.3 and later, or
DateTime::modify() in PHP 5.2.
参见
• Date and Time Formats
• DateTime::createFromFormat() - Returns new DateTime object formatted
according to the specified format
• checkdate() - 验证一个格里高里日期
• strptime() - 解析由 strftime 生成的日期／时间
User Contributed Notes 44 notes
===============================================================================
I've had a little trouble with this function in the past because (as some
people have pointed out) you can't really set a locale for strtotime. If you're
American, you see 11/12/10 and think "12 November, 2010". If you're Australian
(or European), you think it's 11 December, 2010. If you're a sysadmin who reads
in ISO, it looks like 10th December 2011.
The best way to compensate for this is by modifying your joining characters.
Forward slash (/) signifies American M/D/Y formatting, a dash (-) signifies
European D-M-Y and a period (.) signifies ISO Y.M.D.
Observe:
Hope this helps someone!
===============================================================================
UK dates (eg. 27/05/1990) won't work with strotime, even with timezone properly
set.
/*
However, if you just replace "/" with "-" it will work fine.
*/
[red., derick]: What you instead should do is:
That does not make it a timestamp, but a DateTime object, which is much more
versatile instead.
===============================================================================
WARNING when using "next month", "last month", "+1 month", "-1 month" or any
combination of +/-X months. It will give non-intuitive results on Jan 30th and
31st.
As described at : http://derickrethans.nl/obtaining-the-next-month-in-php.html
modify( 'next month' );
echo $d->format( 'F' ), "\n";
?>
In the above, using "next month" on January 31 will output "March" even though
you might want it to output "February". ("+1 month" will give the same result.
"last month", "-1 month" are similarly affected, but the results would be seen
at beginning of March.)
The way to get what people would generally be looking for when they say "next
month" even on Jan 30 and Jan 31 is to use "first day of next month":
modify( 'first day of next month' );
echo $d->format( 'F' ), "\n";
?>
modify( 'first day of +1 month' );
echo $d->format( 'F' ), "\n";
?>
===============================================================================
The "+1 month" issue with strtotime
===================================
As noted in several blogs, strtotime() solves the "+1 month" ("next month")
issue on days that do not exist in the subsequent month differently than other
implementations like for example MySQL.
===============================================================================
For negative UNIX timestamps, strtotime seems to return the literal you passed
in, or it may try to deduct the number of seconds from today's date.
To work around this behaviour, it appears that the same behaviour as described
in the DateTime classes applies:
http://php.net/manual/en/datetime.construct.php
Specifically this line here (in the EN manual):
> The $timezone parameter and the current timezone are ignored when the $time
parameter either is a UNIX timestamp (e.g. @946684800) or specifies a timezone
(e.g. 2010-01-28T15:00:00+02:00).
Therefore strtotime('@-1000') returns 1000 seconds before the epoch.
Hope this helps.
===============================================================================
A useful testing tool for strtotime() and unix timestamp conversion:
http://strtotime.co.uk/
===============================================================================
strtotime() also returns time by year and weeknumber. (I use PHP 5.2.8, PHP 4
does not support it.) Queries can be in two forms:
- "yyyyWww", where yyyy is 4-digit year, W is literal and ww is 2-digit
weeknumber. Returns timestamp for first day of week (for me Monday)
- "yyyy-Www-d", where yyyy is 4-digit year, W is literal, ww is 2-digit
weeknumber and dd is day of week (1 for Monday, 7 for Sunday)
Weeknumbers are (probably) computed according to ISO-8601 specification, so
doing date('W') on given timestamps should return passed weeknumber.
===============================================================================
I was having trouble parsing Apache log files that consisted of a time entry
(denoted by %t for Apache configuration). An example Apache-date looks like:
[21/Dec/2003:00:52:39 -0500]
Apache claims this to be a 'standard english format' time. strtotime() feels
otherwise.
I came up with this function to assist in parsing this peculiar format.
Hope it helps anyone else seeking such a conversion.
===============================================================================
Adding a note to an already long page:
Try to be as specific as you can with the string you pass in. For example
is not specific enough. Depending on the day of the month, you may get a
different response. For a non-leap year, you'll get March if the _current day
of the month_ is the 29th, 30th or 31st. If it's a leap year, you'll get March
on the 30th or 31st of the month. The same thing will happen on the 31st of
any month when you pass in the name of any month with less than 31 days. This
happens because the strtotime() function will fill in missing parts from the
current day.
Assuming today is July 31, the timestamp returned by strtotime('February') will
ultimately be seen as February 31 (non-existant obviously), which then is
interpreted as March 3, thus giving a month name of March.
Interestingly, adding the year or the day will give you back the expected
month.
===============================================================================
You are not restricted to the same date ranges when running PHP on a 64-bit
machine. This is because you are using 64-bit integers instead of 32-bit
integers (at least if your OS is smart enough to use 64-bit integers in a
64-bit OS)
The following code will produce difference output in 32 and 64 bit
environments.
var_dump(strtotime('1000-01-30'));
32-bit PHP: bool(false)
64-bit PHP: int(-30607689600)
This is true for php 5.2.* and 5.3
Also, note that the anything about the year 10000 is not supported. It appears
to use only the last digit in the year field. As such, the year 10000 is
interpretted as the year 2000; 10086 as 2006, 13867 as 2007, etc
===============================================================================
Be aware that if you are running 5.2.8, there is a memory leak with this
function and it could cost someone valuable time finding out what the problem
was. Per usual, running the latest (minor) version tends to be a good idea.
See here: http://bugs.php.net/bug.php?id=46889
===============================================================================
This function DOES NOT work from left-to-right as one would think. This
function parses the string as a whole, then applies the intervals by size
(year, month, ...). Take the following example:
";
echo date('n/j/Y', strtotime('+7 days, +1 year', $Date)); // add 7 days and 1
year, but this also prints 2/29/2012
echo "
";
echo date('n/j/Y', strtotime('+1 year', strtotime('+7 days', $Date))); // this
prints 3/1/2012, what the 2nd would do if it was left-to-right
?>
===============================================================================
strtotime is awesome for converting dates.
in this example i will make an RSS date, an
ATOM date, then convert them to a human
readable m/d/Y dates.
".$atom."
".$human1."
".$human2;
?>
===============================================================================
Strtotime() can be used to loop through date range.
as follows
===============================================================================
[red.: This is a bug, and should be fixed. I have file an issue]
This comment apply to PHP5+
We can now do thing like this with strtotime:
However this works based on a week starting Sunday. I do not know if we can
tweak this PHP behavior, anyone know?
If you want the timestamp of the start of the ISO Week (i.e. on Monday) as
defined by ISO 8601, you can use this one liner:
You can also find out the start of week of any time and format it into an ISO
date with another one liner like this:
For more information about ISO-8601 and ISO week date:
http://en.wikipedia.org/wiki/ISO_8601#Week_dates
http://en.wikipedia.org/wiki/ISO_week_date
===============================================================================
If you want to confront a date stored into mysql as a date field (not a
datetime) and a date specified by a literal string, be sure to add "midnight"
to the literal string, otherwise they won't match:
===============================================================================
NOTE: strtotime returns different values when the Week day does not match the
date.
Simple example:
Sometime I found RSS feeds that contains week days that do not match the date.
A possible solution is to remove useless week day before passing the date
string into strtotime, example:
===============================================================================
strtotime() produces different output on 32 and 64 bit systems running PHP
5.3.3 (as mentioned previously). This affects the "zero date" ("0000-00-00
00:00:00") as well as dates outside the traditional 32 date range.
strtotime("0000-00-00 00:00:00") returns FALSE on a 32 bit system.
strtotime("0000-00-00 00:00:00") returns -62169955200 on a 64 bit system.
===============================================================================
Here is a list of differences between PHP 4 and PHP 5 that I have found
(specifically PHP 4.4.2 and PHP 5.2.3).
===============================================================================
Be carefull with weekdays names
returns something like "Thu, 17 Mar 2016 01:15:00 +0200"
but
returns "Thu, 17 Mar 2016 09:15:00 +0200".
So "s" at end mean "+8 hours".
===============================================================================
You should play around with strtotime() before you decide what it can't do.
for example:
===============================================================================
// small function auto detect to convert date
function formatDate($date)
{
if (strpos($date,'/') !== false) :
$date = str_replace('/', '-', $date);
$date = date('Y-m-d h:i:s', strtotime($date));
else :
$date = date('d-m-Y h:i:s', strtotime($date));
$date = str_replace('-', '/', $date);
endif;
return $date;
}
===============================================================================
returns the monday of 5 weeks ago.
===============================================================================
Unlike "yesterday 14:00", "14:00 yesterday" will return 00:00 of yesterday.
===============================================================================
when using PHP 5.3, you must use date_default_timezone_set() to set the time
zone otherwise you will get warning similar to this (if you have display_errors
=On)—
Warning: date() [function.date]: It is not safe to rely on the system's
timezone settings. You are *required* to use the date.timezone setting or the
date_default_timezone_set() function. In case you used any of those methods and
you are still getting this warning, you most likely misspelled the timezone
identifier. We selected 'Asia/Dubai' for '4.0/no DST' instead in path/to/php/
script.php
on line ##
Example:
date_default_timezone_set('Indian/Mauritius');
For a list of supported timezones in PHP, see http://www.php.net/manual/en/
timezones.php
===============================================================================
It took me a while to notice that strtotime starts searching from just after
midnight of the first day of the month. So, if the month starts on the day you
search for, the first day of the search is actually the next occurrence of the
day.
In my case, when I look for first Tuesday of the current month, I need to
include a check to see if the month starts on a Tuesday.
This month starts on a Tuesday. Use \"$thisMonth $thisYear\" to
check for first Tuesday.
This month does not start on a Tuesday. Use \"first tuesday $thisMonth $thisYear\" to check for first Tuesday.
\n"; } ?> =============================================================================== Observed date formats that strtotime expects, it can be quite confusing, so hopefully this makes things a little clearer for some. mm/dd/yyyy - 02/01/2003 - strtotime() returns : 1st February 2003 mm/dd/yy - 02/01/03 - strtotime() returns : 1st February 2003 yyyy/mm/dd - 2003/02/01 - strtotime() returns : 1st February 2003 dd-mm-yyyy - 01-02-2003 - strtotime() returns : 1st February 2003 yy-mm-dd - 03-02-01 - strtotime() returns : 1st February 2003 yyyy-mm-dd - 2003-02-01 - strtotime() returns : 1st February 2003 =============================================================================== Be aware that you cannot rely on this function alone to validate a date, as it will accept insane dates like the 31st of February. Also, the '... week' functionality by itself may not do what you expect. If used on a Sunday, 'next week' will not return a timestamp of the next Monday, but of the Monday after that. Similarly, a timestamp for the Monday of the current week is returned when 'previous/last week' is used and 'this week' returns a stamp of the Monday of the next week (i.e. the following day). This is not the 'week starts on Sunday' effect, as that would mean all the timestamps returned would have to be on a Sunday and none of them are. =============================================================================== strtotime() seems to treat dates delimited by slashes as m/d/y and dates delimited by dashes are treated as d-m-y. returns 2008-06-08 while returns 2008-08-06 Using PHP 5.2.6 =============================================================================== Here's a hack to make this work for MS SQL's datetime junk, since strtotime() has issues with fractional seconds. =============================================================================== There is a change in the strtotime function... =============================================================================== To get the start of the current week this code works fine when the week starts on Sundays. To get the timestamp of the start of a week starting on Mondays (as defined by ISO 8601) this shoud do the trick. =============================================================================== This date is interpreted as American date (MM/DD/YYYY): $date = "06/10/2011 14:28"; // Oct 10, 2011 This date is interpreted as European date (DD/MM/YYYY): $otherDate = "06-10-2011 14:28"; // Jun 10, 2011 That's why you see those differences. =============================================================================== Actually the top-voted comment from 'sam at frontiermedia dot net dot au' is not quite right, as is the documentation Note. The correct assumptions made by strtotime() are: Forward slashes (/) assume US formatted dates, e.g mm/dd/yy Periods (.) assume Non-US dates, e.g dd.mm.yy Hypens (-) assume ISO 8601 (ATOM) formatted dates, e.g yy-mm-dd =============================================================================== If you look for function to convert date from RSS pubDate, always make sure to check correct input format, found that for date("r") or "D, d M o G:i:s T" strtotime may return wrong result. =============================================================================== The following might produce something different than you might expect: "; echo date('l, F jS Y', strtotime("third sunday", strtotime("2006-01-01"))); ?> Produces: Wednesday, November 22nd 2006 Sunday, January 22nd 2006 The problem stems from strtotime when the requested day falls on the date passed to strtotime. If you look at your calendar you will see that they should return: Wednesday, November 15th 2006 Sunday, January 15th 2006 Because the date falls on the day requested it skips that day. =============================================================================== I needed to generate timestamps for specific days of the week in a month (e.g. the 2nd wednesday or the 3rd friday). After messing about with different syntax, I found this works pretty consistently: This is helping me considerably in parsing ical spec's RRULE sets for example. =============================================================================== I was doing work with cisco phone systems, and thy record their times as NTP Format. strtotime() doesnt process the whole NTP timestamp, off the bat, so if you want a quick function to work I bashed this together pretty quickly, there are probably more efficent ways of processing this, but it gets the job done. Enjoy. [code] [/code] =============================================================================== Another way to get the last day of a given month is to use date('t'); =============================================================================== Seems in PHP5 there are new values that can be passed to the function: '; echo strtotime('noon'); echo '