Why does trunc() return 0?

Unit test fails even though values are equal I was stuck in the above problem. While trying to solve that, I wrote the following listing. I expect it to keep two digits after the decimal point. #include "simulation.hpp" #include <cstdio> typedef double real; double truncate_(double f) { return std::trunc(f * 100.0); } int main() {… Read More Why does trunc() return 0?

Extract number after dot google sheets

I have this Google sheets example. with a column of digits Input 37.39850912456523, 176.84092312542114 37.39850912456523, 17.84092312542115 37.39850912456523, 1.84092312542116 37.39850912456523, 176.84092312542117 3.39850912456523, 176.84092312542118 07.39850912456523, 176.84092312542119 3.39850912456523, 176.84092312542120 3.39850912456523, 6.84092312542121 I attempted this formula to get the progress table. =ArrayFormula(REGEXEXTRACT(A2:A9, "\d{1,3}\.(\d*), \d{1,3}\.(.{5})")) And when trying to get the 5 digits after the dot on the first capture… Read More Extract number after dot google sheets

Select and Convert bytes object from a list

I have tried everything in my mind but wasn’t successfull. Can anybody help me to select bytes object from a list bellow? [(‘uid=xxxxxx,o=center’, {‘userCertificate;binary’: [b’0\x82\x07q0\x82\x05Y\xa0\x03\x02\x01\x02\x02\x10`\ …..’]})] This is the result from a openldap search and I want to select the userCertificate part of the entry and convert it to a base64 text. When I manually… Read More Select and Convert bytes object from a list

"401 Error Code" using google script app fetch post

Hi everyone recently i have been trying to do a fetch post in app script, from an api called salesbinder(inventory system), i have managed to fetch and pulls all inventory data down, however i have been struggling to post and add document to it and received an error code -> "Truncated server response: {"message":"Unauthorized","url":"\/api\/2.0\/documents.json","code":401}" since… Read More "401 Error Code" using google script app fetch post