Why my colors doesn’t show in all terminals?

I have the following piece of code. bold=” reset=$(echo -en ‘\033[0m’) black=$(echo -en ‘\e[1;30m’) magenta=$(echo -en ‘\033[00;35m’) blue=$(echo -en ‘\e[1;34m’) cyan=$(echo -en ‘\e[1;36m’) green=$(echo -en ‘\e[1;32m’) orange=$(echo -en ‘\e[1;33m’) purple=$(echo -en ‘\e[1;35m’) red=$(echo -en ‘\e[1;31m’) white=$(echo -en ‘\e[1;37m’) yellow=$(echo -en ‘\e[1;33m’) lime_yellow=$(echo -en ‘\e[1;33m’) power_blue=$(echo -en ‘\e[1;34m’) blink=$(echo -en ‘\e[1;31m’) reverse=$(echo -en ‘\e[1;31m’) underline=$(echo -en…

Details

Apollo breaking when trying to add headers to ApolloClient

I am trying to add an auth token to each Apollo request but I receive the following error when trying to run my project. I followed the recommended implementation here Apollo Auth. I am using React, @apollo/client “^3.0.0-beta.19”, “@apollo/react-hooks”: “^3.1.3”: TypeError: Object(…) is not a functionindex_bundle.js line 902 > eval:52:77 Policies webpack:///./node_modules/@apollo/client/cache/inmemory/policies.js?:52 InMemoryCache webpack:///./node_modules/@apollo/client/cache/inmemory/inMemoryCache.js?:39 <anonymous>…

Details

Derive from shared_ptr

I have a strange compilation problem that I can’t understand. //I know, you should never derive from the STL Library template<class T> class SharedClass : private shared_ptr<T> { public: template<class T2> SharedClass(T2&& t2) : shared_ptr<T>(make_shared<T>(move(t2))) {} virtual ~SharedClass() {} }; class A { public: typedef function<void(SharedClass<A>)> Callback; A(Callback callback) { } }; main.cpp SharedClass<A> shared([](SharedClass<A>){…

Details

Pandas groupby column not found

I have code that looks like this: import pandas as pd df=pd.read_csv(“averaged.txt”,sep=”,”) df.groupby(“year”)[“tavg”].mean() but I get this error: File “/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pandas/core/base.py”, line 268, in getitem raise KeyError(“Column not found: {key}”.format(key=key)) KeyError: ‘Column not found: tavg’ The first few lines of averaged.txt look like this: year,tavg 1941,2990.0 1942,2909.1666666666665 1943,-292.25 1944,2930.0 1945,2686.3636363636365 1946,2661.6666666666665 1947,2714.1666666666665 1948,2681.6666666666665 1949,2616.6666666666665 1950,2666.6666666666665 1951,2733.3333333333335…

Details