Categories
Ask English Speaking

superlative or comparison

I have a question about a sentence. John is better than Sarah and Mary. or John is the best. I want to know which is correct? If I’m comparing 3 things (John, Sarah, Mary), Why am i using a comparative adjective? Should I be using a superlative? Are both correct?

Categories
Ask English Speaking

Do you say “Namaste, you”, “Namaste, Grandpa”, “Namaste, Daddy”, “Namaste, Sirs”, “Namaste, Boss” or “Namaste, + [proper name]”?

Namaste (exclamation) (Indian English) ​a polite greeting said when giving a namaskar (= with the hands placed together as in prayer and the head bent forwards) ​(also namaskar) [uncountable] a way of greeting somebody in which the hands are placed together as in prayer and the head is bent forwards In English we say, “Hello […]

Categories
Mastering Development

Change only duplicate items but not the original one

I am trying to change only the duplicate elements of the list and not the original ones but i am not sure how it’s done. What I need is only the duplicate elements of a list to change through the dictionary but not the original that appears first. The way I did it below, the […]

Categories
Mastering Development

How is this Map of String to String possible as a Map of String to a list of String in Groovy?

Saw some working code in a project that is like the one below (of course that’s just an example) but I’m extremely confused at how this is possible as a Map<String, String> and not Map<String, List<String>>? Looked it up in the Groovy doc but I didn’t see anything that explains this concept. Could someone explain […]

Categories
Mastering Development

Parsing tagged lists in r

Assuming I have the following list, created from a JSON file: library(jsonlite) data <- read_json(“animals.json”) print(data) $animals 1. $name rocko $type dog 2. $name mary $type sheep Is there a way to print each attribute in a tag, such that a list of lists is created without the tags? for example, if I would like […]

Categories
Development

Python How to get the class object from a value within the object

Imagine i have a list of classes like this: people = [[john, 18], [mary, 17], [joe, 13]] And i want to find if there is a person that is 13 years old in my list of class objects and return their name. How would i do this? I found some code to return true if […]

Categories
Development

Comparing other rows with current row and do conditional sum in R

Sample data is shown below. data <- data.frame(Name=c(‘John’,’John’,’John’,’Mary’,’Mary’),First_value=c(1,3,2,4,5),Second_value=c(3,4,2,7,5),To_sum=c(1,2,3,4,5)) # Name First_value Second_value To_sum # John 1 3 1 # John 3 4 2 # John 2 2 3 # Mary 4 7 4 # Mary 5 5 5 I would like to first group by name, and for each group, sum the column ‘To_sum’ for […]

Categories
Development

Get array of all words (splitted sentences) inlcuded in another array

i have this array: this.places = [{“full_name”:”joe”,”title1″:”teacher”,”description”:”the best teacher”}, {“full_name”:”mary”,”title1″:”student”,”description”:”great student”}]; i need to get this: this.items = [{“word”:”joe”},{“word”:”teacher”},{“word”:”the”},{“word”:”best”},{“word”:”teacher”}, {“word”:”mary”},{“word”:”student”},{“word”:”great”},{“word”:”student”} ]; i have this now: this.places.forEach(item => { this.items = results.concat(item.full_name.toLocaleLowerCase().split(” “)) .concat(item.title1.toLocaleLowerCase().split(” “)) .concat(item.description.toLocaleLowerCase().split(” “)); }); result: [“joe”,”teacher”,”the”,”best”,”teacher”,”mary”,”student”,”great”,”student”]; can you help me to get the complete final desired array?

Categories
Development

What does “

I’m trying to understand exactly how the following code works, in particular what “< T >” means in the following code. I don’t even know the terminology as to what this is, so I wasn’t able to google it, so hoping someone here can help explain. To be more specific, I’m don’t understand 2 things […]

Categories
API Cryptocurrency Development Ethereum

I am trying to use Trulioo API,but stuck in Callback url step using node js

For a Document Verification the call has to be made asynchronously. In order to do this with Trulioo’s API you need to send a value for the CallBackUrl field: The CallBackUrl parameter must be a valid URL. Trulioo recommends setting up your own server and URL so you can receive all the necessary information to […]