==
==
second task
convert a string of numbers to a sentnce .e ach number represents a aletter. numbers in the string are seperated by aspace. and words in the sentence are seperated by a plus characterf/
conversion table:
1 = A
2 =B
--
26 = Z
example numbe to letters (`20 15 19 20+4 15 13 5) should return 'test dome'
echo numberToLetters('20 5 19 10+4 15 13 5');
===============================
implement the get view count method .it should accept a json
a string and sum all vie wcount fields inside the json will alwyas hav ethe same structure as int he example case
for example calling get view count should return 88270796 for the following $jsonstring
{
"apiVersion": "2.1",
"videos": [
{
"id": "253",
"category": "music",
"title": "Jingle Bells",
"duration": 457,
"viewCount": 88270796
}
]
}
===
writea a function that removes all items that are not integers from the array the function should modify the existing aarray,nmot create a nbew one.
for example, if the input array containes values [1,'a,'b',2], after processing, the array will contain only values [1,2]
==============
an education magazine pulbishee rankings of strudnetns and theire colleges in a acompetitoion in building unmmaned aerial vehical dornes. students whoi participated in the competion in different yeres, their ranking in the competion, and their colleges are contained inthe following tables;
table colleges
id integer primary key
name varchar(50) not null
table students
id integer primary key
name varchar(50) not null
collegeid integer
foreighn key (collegeid) references colleges(id)
table rankings
studentid integer
ranking integer not null
year integer not null
foreign key (studentid) references students(id)
write a query that lists all collges that have atleast one student with a ranking between 1 and 3 ( both inclusive) for the year 2015. the query should return
the college name,
the rank of their best rnaking studnet for 21015.;
the numer of students who had rankings between 1 and 3 ( both inclusive) for the year 2015
rank 1 is the best rank, rank 2 is the second best an dso on . more than one student can tie for a rank in a ayear
=
=
As part of a data processing pipeline, complete the implementation of the make_pipeline method:
- The make_pipeline method should accept a variable number of functions, and it should return a new function that accepts one parameter $arg.
- The returned function should call the first function in make_pipeline with the parameter $arg, and call the second function with the result of the first function.
- The returned function should continue calling each function in make_pipeline in order, following the same pattern, and return the value from the last function.
For example, calling make_pipeline(function($x) { return $x * 3; }, function($x) { return $x + 1; }, function($x) { return $x / 2; }), and then calling the returned function with 3 should return 5.
===
App usage data are kept in the following table:
TABLE sessions id INTEGER PRIMARY KEY, userId INTEGER NOT NULL, duration DECIMAL NOT NULL
Write a query that selects userId and average session duration for each user who has more than one session.
=
questions:
what is abstract and what is interface
why we use abstaract
what is difference
why do we interface
wht is static method
where can use static, where can we declare static
solid principles
design pattern
whtis service container and service provider
array methods
what type of array in php supports
session and cookie
what is http only cookie
what is break and continue
how can we handle exceptions
what is finally in php
whatr is composer
what is composer.lock
how to update the pacakge
how can we update teh specific pakage
life cycke method in vuejs
how to bind the data
what is v-model
event emitters
what is props and data functions
hwo can we declare a method in vuejs
what is pure function in javascript
set time out and set interval
how to stop the setinterval
hosting in javascript
waht is closure in javacript
sql
what are join in sql
what is self join
what is inner join
what is group by
what is indexing mechanism
what is composite index
aany experience in version control system and what is the workf low
No comments:
Post a Comment