How to use `styled.div` in expo-web? - styled-components

trying to use styled.div in expo-web
styled-components version is 4.4.1
runtime-error on usage: TypeError: undefined is not a function (near '...styled_components_web__WEBPACK_IMPORTED_MODULE_7__["default"].div...')

Related

module 'torch' has no attribute 'linalg'

I am getting this error AttributeError: module 'torch' has no attribute 'linalg' when updating the parameters using optimizer.step(model.closure).
I am using Pytorch version 1.4.0.
linalg was introduced to pytorch only on a later version (1.7.0). Update pytorch and try again.

getting error on build in package name.ratson.cordova.admob;

I created new project using ionic capacitor sync android and was trying to sign apk key for the app
After running build I'm getting below error in package name.ratson.cordova.admob; inside capacitor-cordova-android-plugins.
Can someone please guide me on where am I going wrong?
> Task :capacitor-cordova-android-plugins:compileReleaseJavaWithJavac
D:\app\android\capacitor-cordova-android-plugins\src\main\java\name\ratson\cordova\admob\AbstractExecutor.java:3: error: package com.google.android.gms.ads does not exist
import com.google.android.gms.ads.AdRequest;
^
D:\app\android\capacitor-cordova-android-plugins\src\main\java\name\ratson\cordova\admob\AdMob.java:5: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
^
D:\app\android\capacitor-cordova-android-plugins\src\main\java\name\ratson\cordova\admob\AdMob.java:8: error: package com.google.ads.mediation.admob does not exist
import com.google.ads.mediation.admob.AdMobAdapter;
^
D:\app\android\capacitor-cordova-android-plugins\src\main\java\name\ratson\cordova\admob\AdMob.java:9: error: package com.google.android.gms.ads does not exist
import com.google.android.gms.ads.AdRequest;
.
.
.
.
D:\app\android\capacitor-cordova-android-plugins\src\main\java\org\apache\cordova\camera\CameraLauncher.java:800: error: cannot find symbol
Uri tmpFile = FileProvider.getUriForFile(cordova.getActivity(),
^
symbol: variable FileProvider
location: class CameraLauncher
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
86 errors
> Task :capacitor-cordova-android-plugins:compileReleaseJavaWithJavac FAILED
Thanks in advance.

Library Linking errors in Linux: symbol lookup error :RegisterGlobalAtExitNotification

I get the following runtime error on Linux.
/opt/intel/opencl-1.2-6.4.0.25/lib64/libclang_compiler.so: error: symbol lookup error: undefined symbol: RegisterGlobalAtExitNotification (fatal)
Which library should I link with to resolve these errors?

opencv nodejs _handle error while requiring it in js page

I have installed the opencv using npm, but when I require it in my js page like this:
var cv = require('opencv');
I get an error
Uncaught TypeError: cannot read property '_handle' of undefined

AttributeError: 'module' object has no attribute 'sift'

I want to use sift() in python &openCV
here is my environment:
python:2.7.6
os:ubuntu 14.04
opencv:2.4.9
After several hours hard-work, now i seem to successfully install opencv,because i can do as below:
import cv2
print cv2.version ---- 2.4.9
now my problem is that when i want to call cv2.sift(),it says AttributeError: 'module' object has no attribute 'sift'
If i download opencv_contrib from github and use cmake -DOPENCV_EXTRA_MODULES_PATH=/modules , the compiling will fail , it says:
Module opencv_xfeatures2d disabled because opencv_shape dependency can't be resolved!
someone else even says the opencv_contrib can only work with opencv3
then how can i solve this problem? I need your help~

Resources