Tuesday, April 4, 2017

Remove duplicate entries from ArrayList or List without using collection

Remove duplicate entries from ArrayList or List without using collection.


package testMavProject;

import java.util.ArrayList;

public class removeDuplicate {

public static void main(String[] args) {
// Create a ArrayList type of Integer or other datatype.
ArrayList<Integer> aList=new ArrayList<Integer>();
aList.add(5);
aList.add(7);
aList.add(5);
aList.add(6);
for(int i=0;i<aList.size();i++){
for(int j=i+1;j<aList.size();j++)
{
//Check for duplicate value using if condition
//If you are comparing Integer then you could use "==" sign; if you have string values then user equals method instead of ==. 
if(aList.get(i)==(aList.get(j)))
{
//if values matched then remove the value from J index and back your J index to previous index J--
aList.remove(aList.get(j));
j--;
}
}
}
//Print your list without duplicate value.
System.out.println(aList);
}

}

How to optimize SQL query?

How to optimize SQL query?

  • Use Indexes Properly.
  • Only retrieve the data you really need.(prefer using where clause)
  • Avoid the use of functions in where clause.
  • Avoid using SQL subqueries or nested queries. Use JOINS instead.
  • Avoid Wildcard characters at the beginning of the LIKE statement.





Saturday, March 18, 2017

Maloom na tha itna kuchh hai bechne ko ghar me

معلوم نہ تھا اتنا کچھ ہے بچنے کو گھر مے 
زمیں سے لیکر ضمیر تک سب بک رہا ہے

Maloom na tha itna kuchh hai bechne ko ghar me
Zamin se lekar Zameer tak sab bik raha hai

 Mirza Ghalib



Sunday, March 12, 2017

A tree 🌲 without leaf 🍃 🍂 #tree #leaf #branches #withoutrain #dry #jorvee

A tree 🌲 without leaf 🍃 🍂

Autumn session is going on, trees are dropping their leaves and becoming undressed and nacked, but intresting this is also like a new birth for trees, where trees will get new leaves as their new dress. :) 

A tree without leaf


 #tree #leaf #branches #withoutrain #dry #jorvee via Instagram

Sunday, March 5, 2017

Don't be Shock, when these politicians win in upcoming poll. Hindustan Times, 5th March 2017 #warofpolitics #politics #politicians #battlefield #Jorvee

Don't be Shock, when these politicians win in upcoming poll.

the world is becoming against the muslims and Islam. In every satate in world have a political party who are gainst the Islam and hate the people on the name of their religion. 
And the intresing thing is that they are winning the match in arena of politics. So in 2017 so many countires are ready for poll, let see what will be the result and outcome, whom society will elect.

We have some politician like that in Netherlands, Germany, France and Bulgaria.

 Hindustan Times, 5th March 2017

 #warofpolitics #politics #politicians #battlefield #Jorvee via Instagram

Monday, February 20, 2017

How to set ReadLimits and terminate a slow query in AEM/CQ5

When we execute a query using query builder in AEM/CQ5 and for that query system is not able to return any output and you found that it is still executing. 
Then you went to error log file and find the error:"consider creating an index or changing the query [time stamp] *WARN* [qtp1617436028-18416] org.apache.jackrabbit.oak.spi.query.Cursors$TraversingCursor Traversed 987000 nodes with filter Filter(query=#)", it means your query is still running and will keep running till the time it completed maximum read limit. 
If you want to stop this query to run which is unnecessary consuming performance of your system then follow the following steps.

1. Go to http://localhost:4503/system/console/jmx 
2. Find the type "QueryEngineSettings" and name settings.
3. Open settings. 

4. Then change the ReadLimit to either 1 or 2.

5. save and refresh the page. Now go and check the error log file you will not find that query anymore in the execution.

For more detail you can read the following links:
[1] http://jackrabbit.apache.org/oak/docs/query/query-engine.html
[2] https://docs.adobe.com/docs/en/cq/5-6-1/core/administering/jmx-console.html
[3] https://docs.adobe.com/docs/en/cq/5-6-1/core/administering/jmx-console.html#Using the JMX Console
[4] http://tech.ethomasjoseph.com/2015/03/tuning-your-jcr-queries-for-aem.html

Sunday, February 12, 2017

All Men are created equal but only the #legends are born in #March. For those who born in March

All Men are created equal but only the #legends are born in #March. For those who born in March. 


Dont be shocked if you didnt born in month of March. This is only the a quote for those who born in March. People are born equal and always will be, but when we explore the histroy we will find most of the great prosnality and legends of this world are born in the month of March.
Thats why I changed my DOB as well, actually I born in the month of August but I dont know why my teacher change my birth month to March. I an thankful to my teacher who done this. Thank You!


#Jorvee via Instagram

Sunday, February 5, 2017

Discrimination Law

Indian laws on employee and workplace discrimination and harassment

India, the world’s second most populated country, possibly has the most varied cultures, religions and languages. At the same time, and unlike several developed countries, India lacks a comprehensive antidiscrimination law that can tackle all forms of discrimination. This article provides an overview of the basic laws in India that domestic and multinational companies need to know while dealing with employee discrimination and harassment issues in the workplace.

Anti-discrimination provisions under the Constitution of India

The advocacy for anti-discrimination can be traced to the innate provisions in the Indian Constitution. Article 15 prohibits the state from discriminating on the grounds of religion, race, caste, sex and place of birth in various day-to-day activities, including when it comes to providing equal employment opportunities. The Constitution does not, however, prevent positive discrimination or affirmative action that is based on discrepancies in gender, social or financial background or traditional caste-based disadvantage. It is for this reason that Article 15 also provides that the state can make special reservation for women and socially and educationally backward classes of citizens including scheduled castes/tribes in educational institutions.1 Further, Article 16 empowers the state to make reservations with respect to appointment for posts in favour of any backward classes of citizens if the state is of the opinion that such classes are under-privileged. The socio-economic rights under Article 39 in Part IV of the Constitution also urges the state to ensure that citizens, men and women equally, have the right to an adequate means of livelihood,  right to shelter, food, education and work.

Protection under the Equal Remuneration Act

The Equal Remuneration Act, 1976 (ERA) addresses employee discrimination issues with respect to recruitment, wages, worktransfers and promotion. It provides for payment of equal remuneration to men and women workers, for same work or work of similar nature and for the prevention of discrimination against women in the matters of employment.2 Taking up the recruitment process, section 5 of the ERA prohibits the employer from devising a hiring process that puts women at a disadvantage on account of their gender. This is specifically in reference to work that is the same or similar to that which is offered to men and even in respect of transfers and promotions. The ERA also discourages the reduction of wages on purpose in order to fulfil the condition of equal remuneration.

Prohibition of sexual harassment against female employees

In 1997, the Supreme Court of India took it upon itself to lay down the Guidelines against Sexual Harassment at the Workplace (the ‘Guidelines’) in Vishaka and Others v State of Rajasthan and Others. 9 The Guidelines categorically lay down what constituted ‘sexual harassment’ and vest an obligation upon the employer (or other responsible persons) to provide for measures and procedures that will prevent and deter acts of sexual harassment done not only by persons within the establishments but third parties as well. The employer is also obligated to devise dispute resolution mechanisms and means to prosecute offensive acts. The Guidelines also specify that women must be provided with ‘appropriate work conditions’ in the areas of work, leisure, health and hygiene. In the absence of an inclusive codified law that covers prevention of sexual harassment of women at the workplace, the Guidelines have come to be regarded as a law in this respect. It is worth mentioning that, in December 2010, The Protection of Women Against Sexual Harassment at the Workplace Bill (the ‘Bill’) was tabled in Parliament and was eventually sent to the Parliamentary Standing Committee for discussions. The Bill seeks to provide a safe, secure and enabling environment, free from all forms of sexual harassment to every woman, irrespective of her age or employment status (other than domestic workers).10 Once enacted, it is hoped that this will soon fill up the void of a codified law on sexual harassment of women.

Protection under criminal law

Certain offences against women are treated as crimes and are subject to actions under the Indian Penal Code, 1860 (IPC). Section 354 of IPC specifies that outraging the modesty of a woman either through words or gestures will attract serious consequences such as imprisonment of up to two years or a fine or both. The victim has to prove that the accused assaulted the woman (or used criminal force) with the intention of outraging her modesty. Another penal provision is section 509 that deals with insulting the modesty of a woman. This may be through any words, gestures, sounds or exhibition of objects done with the intention of insulting her modesty. An offence under these provisions will make the offender liable to imprisonment of one year or a fine or both. Further, section 294 of the IPC deals with the issue of harassment due to the use of obscene language or gestures. As per the provision, an individual who, to the annoyance of others, does any obscene act in any public place, or sings, recites or utters any obscene song, ballad or words, in or near any public place, may be punished with imprisonment for a term of up to three months, or with a fine, or with both. 


Ref: http://www.nishithdesai.com/fileadmin/user_upload/pdfs/Indian_laws_on_employee_and_workplace_discrimination_and_harassment.pdf

HOW TO FILE A COMPLAINT IN UNITED STATE OF AMERICA

HOW TO FILE A COMPLAINT



The Civil Rights Division enforces civil rights laws in a wide variety of contexts. You may use the information on this page to find the appropriate way to submit a complaint or report of a potential civil rights violation. If you are not sure which Section is the appropriate one to receive your complaint, you may contact the Civil Rights Division at (888) 736-5551 or (202) 514-3847.
Criminal SectionHousing and Civil
Enforcement Section
Disability Rights Section
Educational Opportunities SectionSpecial Litigation Section
Employment Litigation SectionVoting Section
Federal Coordination and Compliance
Please let us know if you have trouble understanding English or need help communicating with the Civil Rights Division. Ask for an interpreter or if translated material is available when you contact us. If you can, please tell us your language (or dialect).
Availability of Language Assistance Services   (English)
توافر خدمات المساعدة اللغوية – قسم الحقوق المدنية   (Arabic)
语言协助服务现成可用   (Simplified Chinese)
語言協助服務現成可用   (Traditional Chinese)
Magagamit na Mga Paglilingkod Ukol sa Tulong na Pangwikain — Sangay sa Mga Karapatang Sibil   (Filipino)
Disponibilité de services d'aide linguistique   (French)
[언어 지원 서비스 이용 – 인권국   (Korean)
Disponibilidade de Serviços de Assistência Linguística – Divisão dos Direitos Civis   (Portuguese)
Управление по делам о нарушениях гражданских прав   (Russian)
Disponibilidad de servicios de asistencia lingüística   (Spanish)
Sự Sẵn Sàng của Dịch Vụ Hỗ Trợ Ngôn Ngữ   (Vietnamese)

ALABAMA'S IMMIGRATION LAW H.B. 56

To report potential civil rights concerns related to the impact of Alabama's immigration law H.B. 56, please contact 1-855-353-1010 or hb56@usdoj.gov
Email links icon
.

CRIMINAL 

Contact your local FBI field office to report incidents of:
You can find your local office here:
http://www.fbi.gov/contact/fo/fo.htm
Please include as many details of the incident as possible, such as the dates and times; names of possible witnesses; and supporting documents, such as police and medical reports, or photographs.
You may also mail a written copy of the complaint and materials you submitted to the FBI to the Criminal Section at:
US Department of Justice
950 Pennsylvania Avenue, NW
Civil Rights Division
Criminal Section – PHB
Washington, DC 20530

DISABILITY RIGHTS 

You can file an Americans with Disabilities Act complaint alleging disability discrimination against a State or local government or a public accommodation (including, for example, a restaurant, doctor's office, retail store, hotel, etc.) by mail or online. To learn more about filing an ADA complaint, visit www.ada.gov/filing_complaint.htm). To file an ADA complaint you may send the information requested at www.ada.gov/fact_on_complaint.htm to:

US Department of Justice 950 Pennsylvania Avenue, NW
Civil Rights Division
Disability Rights Section 1425 NYAV
Washington, D.C. 20530
Fax: (202) 307-1197
You may also file a complaint online at www.ada.gov/complaint/.
If you have questions about filing an ADA complaint, please call:
ADA Information Line: 800-514-0301 (voice) or 800-514-0383 (TTY).

Main Section Telephone Number: 202-307-0663 (voice and TTY)

EDUCATIONAL OPPORTUNITIES 

The Educational Opportunities Section enforces federal laws that protect students from harassment or discrimination. The Section is responsible for enforcing Title IV of the Civil Rights Act of 1964, which prohibits discrimination on the basis of race, color, national origin, sex, and religion in public schools and institutions of higher learning; the Equal Educational Opportunities Act of 1974 which, among other things, requires states and school districts to provide English Language Learner (ELL) students with appropriate services to overcome language barriers; and the Americans with Disabilities Act, which prohibits disability discrimination. The Section also plays a significant role in enforcing Title VI of the Civil Rights Act of 1964 (prohibiting discrimination on the basis of race, color, and national origin by recipients of federal funds); Title IX of the Educational Amendments of 1972 (prohibiting discrimination on the basis of sex by recipients of federal funds); and Section 504 of the Rehabilitation Act and the Individuals with Disabilities Education Act (both of which address disability discrimination and appropriate disability-related services).
The Educational Opportunities Section accepts complaints of potential violations:
  • By e-mail to education@usdoj.gov
    Email links icon
  • By telephone at (202) 514-4092 or 1-877-292-3804 (toll-free)
  • By facsimile at (202) 514-8337
  • By letter to the following address:
U.S. Department of Justice Civil Rights Division
950 Pennsylvania Avenue, N.W.
Educational Opportunities Section, PHB
Washington, D.C. 20530
In order to properly respond to a complaint, the Section requests that complainants provide their name, address, and the name of the school/school district/university where the alleged discrimination occurred. Additional information regarding how to file a complaint is available here.

EMPLOYMENT LITIGATION 

Individual Complaints of Employment Discrimination:

Title VII of the Civil Rights Act of 1964 (“Title VII”) prohibits discrimination, including harassment and retaliation, based on race, sex, color, religion, and national origin. If you believe you have been unlawfully denied an employment opportunity or otherwise discriminated against by an employer in violation of Title VII, you should contact the Equal Employment Opportunity Commission (EEOC). The EEOC may be contacted by calling 1-800-669-4000 or 1-800-669-6820 (TTY).

The EEOC maintains a website with information on how to file a complaint.

Complaints of Employment Discrimination involving a Group
or Class of Individuals:

Title VII of the Civil Rights Act of 1964 (“Title VII”) prohibits discrimination, including harassment and retaliation, based on race, sex, color, religion, and national origin.

Under Title VII, the Attorney General has authority to bring suit against a state or local government employer where there is reason to believe that a "pattern or practice" of discrimination exists. Generally, these are factually and legally complex cases that seek to alter an employment practice, such as recruitment, hiring, assignment and promotions, which have the purpose or effect of denying employment or promotional opportunities to a class of individuals.

If you have reason to believe that a state or local government employer has unlawfully denied an employment opportunity or otherwise discriminated against a class of individuals by creating a "pattern or practice" of discrimination in violation of Title VII, you should contact the Department of Justice (DOJ). The DOJ may be contacted by calling (202) 514-3831 or (202) 514-6780 (TTY).

Complaints of Employment Discrimination
involving Service Members:

If you believe you have been discriminated against in employment because of your military service or you have been denied your right to return to your job after deployment, you may seek the assistance of the Employer Support of the Guard and Reserve (“ESGR”). You may contact the ESGR about your employment situation by calling toll-free 1 (800) 336-4590.

If you choose to file a USERRA claim with the Department of Labor (DOL), you may submit a signed hard copy of Form 1010 or electronically file. To submit a hard copy, you can download Form 1010 to your computer, complete the items on the form that are relevant to your claim, sign and date the form, and mail it to the nearest VETS office. Second, you may file a Form 1010 electronically via the Intranet by completing and submitting the online form. It is important that you file with DOL or consult with a private attorney as soon as possible.

You also may retain a private attorney to handle your claim and file directly with a court of competent jurisdiction.

FEDERAL COORDINATION AND COMPLIANCE 

If you believe you or an individual that you or your organization represents has been discriminated against because of your race, color, or national origin, including limited English proficiency (LEP), by programs or activities receiving federal financial assistance, you may contact the Federal Coordination and Compliance Section. If you believe that you or an individual that you or your organization represents has been be excluded from participation in, denied the benefits of, or subjected to discrimination on the basis of your sex by any education program or activity receiving federal financial assistance, you may contact the Federal Coordination and Compliance Section.

For information on language assistance services available, click here.

To file a complaint alleging discrimination in programs or activities of entities that receive federal assistance, please print and fill out the appropriate complaint form:

English: Complaint and Consent/Release Form - English (PDF) 
Español: Formulario de Denuncia / Formulario de Consentimiento (PDF) 
Chinese: 投訴表 / 投訴人同意書/授權協議書
Korean: 이의 제기 양식 / 이의 제기자 정보 공개 동의서 
Vietnamese: MẪU ĐƠN KHIẾU NẠI / MẪU CHẤP THUẬN/TIẾT LỘ THÔNG TIN CỦA NGƯỜI KHIẾU NẠI

Please mail the complaint to the following address:

Federal Coordination and Compliance Section - NWB
Civil Rights Division
U.S. Department of Justice
950 Pennsylvania Avenue, N.W.
Washington, D.C. 20530
Should you need assistance, our phone numbers are:
(888) 848-5306 - English and Spanish (ingles y español)
(202) 307-2222 (voice)
(202) 307-2678 (TDD)

HOUSING AND CIVIL ENFORCEMENT 

Housing Discrimination:

Individuals who believe that they have been victims of housing discrimination may file a complaint with the Department of Housing and Urban Development [HUD] or file their own lawsuit in federal or state court. You must file the complaint with HUD within one year of the incident you believe to be housing discrimination. You have two years to file your own lawsuit in federal court.

Credit Discrimination:

Individuals who believe that they have been victims of housing discrimination regarding credit, such as the denial of a mortgage, may file a complaint with HUD. Individual complaints of discrimination in credit that are not housing-related are handled by the agencies who regulate the individual creditor.

Discrimination in Public Accommodation:

Individuals who believe that they have been victims of housing discrimination in public accommodations, such as a restaurant or hotel, may contact the Housing and Civil Enforcement Section. You may file your own lawsuit in federal court or state court and may have some rights under other federal laws, state laws, or local ordinance. You should consult with your local or state civil rights enforcement agency.
U.S. Department of Justice
Civil Rights Division
950 Pennsylvania Avenue, N.W.
Housing and Civil Enforcement Section, NWB
Washington, D.C. 20530
(202) 514-4713

Discrimination in Religious Land Use:

Individuals or entities who believe that they have been victims of discrimination against religious assemblies and institutions may contact the Housing and Civil Enforcement Section. Individuals may also file a lawsuit in federal court.
U.S. Department of Justice
Civil Rights Division
950 Pennsylvania Avenue, N.W.
Housing and Civil Enforcement Section, NWB
Washington, D.C. 20530
(202) 514-4713

Discrimination against Servicemembers:

Individuals who believe that their rights as servicemembers have been violated should consult the military legal assistance office locator. Dependents of servicemembers can also contact or visit local military legal assistance offices where they reside.

IMMIGRANT AND EMPLOYEE RIGHTS SECTION 

The Immigrant and Employee Rights Section enforces the anti-discrimination provision of the Immigration and Nationality Act, which prohibits discrimination based on an individual’s national origin or citizenship status in hiring, firing, or recruitment or referral for a fee. The statute also prohibits unfair documentary practices, or “document abuse,” during the employment eligibility verification (e.g. Form I-9 and/or E-Verify) process, and retaliation or intimidation.
IERcharge forms are available in English, Spanish, Arabic, Chinese, French, Haitian Creole, Korean, Portuguese, Russian, Tagalog, and Vietnamese. To view and print these forms, click the links below. For more detailed instructions on how to file a charge, including how to file a charge electronically, please visit IER's Charge Page

Immigrant and Employee Rights Section
U.S. Department of Justice
Civil Rights Division
950 Pennsylvania Avenue, N.W. (NYA)
Washington, D.C. 20530
Worker Hotline: 1-800-255-7688 [Voice] or 1-800-237-2515 [TTY]
Employer Hotline: 1-800-255-8155 [Voice] or 1-800-237-2515 [TTY]
Direct Office Line: 1-202-616-5594 [Voice] or 1-202-616-5525 [TTY]
Fax: (202) 616-5509
Email: ier@usdoj.gov
Email links icon

SPECIAL LITIGATION 

To file a complaint, write the Special Litigation Section (SPL) explaining the situation about which you are complaining, with as much detail as possible. If you are aware of similar incidents involving others, please include that information as well. SPL does not have legal authority to represent individuals. In most of SPL’s work, a single incident of mistreatment will not be sufficient to start an investigation. The Religious Land Use and Institutionalized Persons Act (RLUIPA) and the Freedom of Access to Clinic Entrances Act (FACE) are exceptions to this general rule, and single incidents may be sufficient to start an investigation. Please include information on how to contact you if we need further information (such as an address, telephone number and e-mail address). Also, do not include original documents as we cannot guarantee their safe return. You can send information to:

Special Litigation Section
U.S. Department of Justice
Civil Rights Division
950 Pennsylvania Avenue, NW
Special Litigation Section
Washington, D.C. 20530
The Section can be reached by telephone: (202) 514-6255 or toll-free at (877) 218-5228.

VOTING 

The Voting Section enforces the civil provisions of the federal laws that protect the right to vote, including the Voting Rights Act, the Uniformed and Overseas Citizens Absentee Voting Act, the National Voter Registration Act, the Help America Vote Act and the Civil Rights Acts.

The Voting Section accepts complaints about possible violations of the federal voting rights laws -
Voting Section
Civil Rights Division
U.S. Department of Justice
Room 7254 - NWB
950 Pennsylvania Ave., N.W.
Washington, DC 20530


Ref: https://www.justice.gov/crt/how-file-complaint

Popular Posts