rajansoft1
BAN USER
- 3of 3 votes
Answerscreate a grid and show data, they have provided some JSON file for it. we should be able to configure sorting anf fitering for some coumns. paging is also required. we need to make it in pure JS.
- rajansoft1 in India| Report Duplicate | Flag | PURGE
Payu Software Engineer JavaScript
function findLength(n){
var arr = [];
while(n > 9)
{
var no = n%10;
arr.push(no);
n = n/10;
n = parseInt(n);
}
arr.push(n);
return arr.length;
}
function find2(n){
var l = findLength(n);
if(l == 1){
if(n > 1)
return 1;
return 0;
}
var f = parseInt(n/ (Math.pow(10, l-1)));
var two = Math.pow(10, l-2) * (l-1);
var count = 0;
if(f == 2){
count = 2 * two + (n - 2 *(Math.pow(10,l-1))) + 1;
}
else{
if(f < 2){
count = two;
}
if(f >= 3){
count = ((f ) * two) + (Math.pow(10, l-1));
}
}
count = count + find2(n % (Math.pow(10, (l-1))));
return count;
}
function find2Test(n){
var c = 0;
var i = 2;
function count2(number){
while(number > 1)
{
var no = number%10;
if(no == 2){
c++;
}
number = number/10;
number = parseInt(number);
}
}
while(i <= n){
count2(i);
i++;
}
return c;
//console.log(c);
}
function executeBoth(n){
console.log(find2 (n),find2Test(n));
}
function runTest(n){
return find2(n) == find2Test(n);
}
RepColaraJoshi, Floor manager at Thomes
By profession, I am Floor manager in the Thomes store. I am passionate about astrology and read tronto cards, horoscopes ...
RepPacheTanley, Associate at Adobe
Hi , I am Conference service coordinator for the KB Toys company. I Build and maintain relationships with meeting planners and ...
RepJe suis Kirsten. Je travaille dans un magasin en tant que responsables de la chaîne d'approvisionnement pour promouvoir la ...
Reptracyremly, Anesthesiologist at Ness
I am Tracy, working as an Anesthesiologist handles surgical patients and their pain relief during procedures.Rather than my job ...
Repgeraldgloria02, Android test engineer at Achieve Internet
I am a personal trainer. I design programs and provide nutritional advice and coaching. I wanted to share my knowledge ...
RepI am Risk managers that advise organizations on any potential risks to the profitability, safety, security or existence of the ...
RepI'm from India, 26 years old. I want to travel, I want a job where I can earn money ...
Reprobinroi335, Android test engineer at ABC TECH SUPPORT
I believe the deepest changes you can make to improve your quality of life. how to break a family curse ...
RepErmanStern, Applications Developer at ADP
I am Erman . I am metal finishing-, plating- and coating-machine operators operate and monitor equipment which finishes, plates and coats ...
RepLaylaLee, abc at AMD
Creative and dedicated photo editor with experience in photojournalism and marketing material development. I like to explore Best tantrik in ...
Repsamuelcsmith700, Accountant at Absolute Softech Ltd
Je suis chef d'équipe de support Office dans une entreprise Action Auto. Je suis également rédacteur de blog. J ...
Repreiviasmith, Malwarebytes customer service at ABC TECH SUPPORT
I am Reivia an outgoing and motivated Travel Consultant with over 5 years of experience in delivering professional travel related ...
Repdubinalinda4, Animator at Apache Design
Hello, I am a school librarian from Lewistown USA. I work in public or private schools at elementary, middle and ...
Repnasliebaker, Solutions Engineer at Edinprotechnologies
Je suis Naslie , un chercheur interdisciplinaire et collaboratif axé sur l'amélioration de la santé humaine et le mentorat de ...
RepJanie Margreta, Android Engineer at Achieve Internet
JanieMargreta works as a plant operator, an employee who supervises the operation of an industrial plant. Where I have to ...
Repbarrietrosado, abc at ABC TECH SUPPORT
Hi, I am Barrie, from Ualapue USA. I believe that every challenge has a solution - and I take great satisfaction ...
Repgradyjvierra, Animator at Alliance Global Servies
Je suis Grady de Phoenix USA. Je travaille en tant que technicien de laboratoire clinique dans la société Samuels Men ...
Repjacksonbetty625, Accountant at 247quickbookshelp
My work is specialized help, regardless of whether on the telephone, face to face, or distantly, identified with PC frameworks ...
Repjimmybdepuy, Front-end Software Engineer at Arista Networks
Hi, I am Jimmy from los Angeles. I am a painter. I have Knowledge of different types and shades of ...
Repberrysvickers, Associate at Absolute Softech Ltd
Spent 2001-2004 developing strategies for country Luxury Car Rental Miami. Had some great experience building robots for the underprivileged. Have ...
Repharrytallh, Web Developer at Realty Depot
I am working as a Web developer . Here I create and maintain websites. Here I handle many responsibilities where I ...
Repanitajrouse, Kuwait airways reservations at American Airlines
I am Anita from Hastings USA. I am working as a manager in Sofa Express company. I Managed the schedules ...
Repameliahill344, abc at Detail Oriented
Professionally licensed Architect with a Master’s degree in Architecture and more than 4 years experience designing commercial buildings, offices ...
Repritahmixon, Analyst at ADP
Hi, I am a physiotherapy to help people handle everyday problems. I also assist peoples who have issues caused by ...
RepHenryLee, Accountant at AMD
I am a creative and 5 years experienced beautician. I have experience with most cosmetology tools, including razors, nail clippers ...
RepFanieGoode, Consultant at Achieve Internet
I am a Media Library Assistant that provides integrated support for two popular “Multi Language/ Multilingual/ Internationalization” plugins; WPML and ...
Replisachndi, Backend Developer at Adjetter Media Network Pvt Ltd.
I am the manager of health services. I work in managing medical and health services in hospitals, community health institutions ...
RepGalateeLabrie, Accountant at ABC TECH SUPPORT
Bonjour, je suis organisateur de congrès. toutes mes études terminées depuis la france. et je suis actuellement en train de ...
}
- rajansoft1 May 16, 2015