Downloading videos list from Khan Academy library

Uncategorized
Question: I want a dump of all the video titles, description, topic hierarchy and their download URLs in the Khan Academy library. My aim is to post-process this into a library format where I will be having similar data from other educational web sites. I tried the topictree API from Khan Academy API explorer but, I am unable to interpret the results. I don't see the sample output from the API explorer match with the output I see. For example, I don't see the download_urls object. I am not sure, who exactly is the parent of a given children object. For example, the initial output has a number of {"kind" : "Topic", "id" : "xsomething"} objects. The API document mentions that, the topic tree output can be filtered using kind=Topic…
Read More

How to sum values of matching columns while merging two dataframes in r

Uncategorized
Question: I have two dataframes in r ship_no bay_1 bay_2 bay_3 bay_5 bay_6 ABC 0 10 15 20 30 DEF 10 20 0 25 10 ERT 0 10 0 10 0 ship_no bay_1 bay_2 bay_7 bay_5 bay_6 ABC 10 10 10 0 0 DEF 10 10 0 15 10 ERT 0 0 0 10 0 I want to add columns values while merging above two dataframes on column key ship_no My desired dataframe would be ship_no bay_1 bay_2 bay_3 bay_5 bay_6 bay_7 ABC 10 20 15 20 30 10 DEF 20 30 0 40 20 0 ERT 0 10 0 20 0 0 How can I do it in r? Answer: We can place the datasets in a list, use rbindlist to rbind the datasets, grouped by 'ship_no', get the…
Read More

How to use Bluetooth services using react-native for android and IOS devices?

Uncategorized
Question: Hi everyone I am trying to make a app that would interact with a Bluetooth and will be used to control LED lights.Basically first connect to the device and then send string values for the color code and the intensity of the color.I have made a similar app in android which works fine. Now I want to make a react-native app which would do the same for both android and IOS. I am new to the react community. Currently I am going through this https://github.com/rusel1989/react-native-bluetooth-serial repository on git hub. When I run my app using the command react-native run-android I get the following error:- java.lang.UnsupportedClassVersionError: com/android/build/gradle/AppPlugin : Unsupported major.minor version 52.0 Any help or suggestion is appreciated.Thank you. Answer: Read more
Read More

How to right justify the text of a button template in Facebook Messenger Platform API?

Uncategorized
Question: I have a button template and is trying to display about 550 characters of text for the button. It comes as left justified, but the language I am using needs to be right justified. Only option I see now if to do left padding which is very ugly. Any good ideas? Here is the output I get: Universal Nutrition Animal Cut... السعر من المصدر:36.27$ ولا بشمل سعر الشحن فى بلد المصدر وزن الشحن: 0.57كغم. وزن الشحن قد يكون أعلى من وزن القطعة الصنف: منتجات الأمريكية عمان: الجمرك 0.0% ،ضريبةالمبيعات %16.0 عقبة: الجمرك 0% وضريبةالمبيعات %7.0 It should be something like this: Universal Nutrition Animal Cut... السعر من المصدر:36.27$ ولا بشمل سعر الشحن فى بلد المصدر وزن الشحن: 0.57كغم. وزن الشحن قد يكون أعلى من وزن القطعة الصنف: منتجات الأمريكية…
Read More