'ClientRect' is deprecated

Advertisements I’m working on some old TypeScript projects made by someone else and they used ClientRect like this: type CallbackFn = (rect: ClientRect) => void; TypeScript is saying that ‘ClientRect’ is deprecated. What is the alternative? >Solution : ClientRect inherits from DOMRect, so you can use DOMRect. /** @deprecated */ interface ClientRect extends DOMRect {… Read More 'ClientRect' is deprecated

"deprecated" vs "Field requires API level 30 (current min is 21)"

Advertisements If I write: bmp.compress(Bitmap.CompressFormat.WEBP_LOSSLESS, 80, image) Android Studio shows an error message: Field requires API level 30 (current min is 21) And if I write: bmp.compress(Bitmap.CompressFormat.WEBP, 80, image) says: WEBP is deprecated. Deprecated in Java. Should I do this?: if(android.os.Build.VERSION.SDK_INT >= 30) { bmp.compress(Bitmap.CompressFormat.WEBP_LOSSLESS, 80, image) }else{ bmp.compress(Bitmap.CompressFormat.WEBP, 80, image) } In this case,… Read More "deprecated" vs "Field requires API level 30 (current min is 21)"

Uncaught Error: Call to undefined function each()

Advertisements I’m wondering if you guys can give me an idea about how to replace this each function: while(list($key,$val) = each($_SESSION[‘cart’][$i])) { if ($key=="product_name"){ $product_name=$val; }else if($key=="units"){ $units=$val; }else if($key=="packing_size"){ $packing_size=$val; }else if($key=="grade"){ $grade=$val; }else if($key=="length"){ $length=$val; }else if($key=="quantity"){ $quantity=$val; } } echo $product_name."".$units."".$packing_size."".$grade."".$length."".$quantity; echo "<br>"; } Thanks! I’ve try to use foreach, but isn’t… Read More Uncaught Error: Call to undefined function each()

Flutter AppBarTheme Class Constructor Deprecated

Advertisements In beginning to learn Flutter cross-platform application development, I am following along Nick Manning’s Flutter Course – Full Tutorial for Beginners (Build iOS and Android Apps). However, at 43:47 of the video, I am getting the following error. Essentially, the App class is the class called by the runApp() method of Main’s runApp method.… Read More Flutter AppBarTheme Class Constructor Deprecated

Google Play Billing Library 5.0 deprecation warnings

Advertisements Since I’ve upgraded the BillingClient to version 5.0.0: googleImplementation ‘com.android.billingclient:billing:5.0.0’ I get these unique deprecation warnings: warning: [deprecation] getSkus() in Purchase has been deprecated warning: [deprecation] getSkus() in PurchaseHistoryRecord has been deprecated warning: [deprecation] SkuType in BillingClient has been deprecated warning: [deprecation] SkuDetailsResponseListener in com.android.billingclient.api has been deprecated warning: [deprecation] SkuDetailsParams in com.android.billingclient.api has… Read More Google Play Billing Library 5.0 deprecation warnings

GLM linking in CMakeLists.txt

Advertisements I cannot link glm library with my executable. I tried link via ${GLM_INCLUDE_DIRS}, ${GLM_LIBRARIES} and ${GLM_LIBRARY_DIRS} cmake variables but it does not work. How can I link libraries and inludes of glm with my executable? I am using find_package() method : find_package(glm REQUIRED PATHS "${GLM_BINARY_DIR}" NO_DEFAULT_PATH) And does not have any problem with find_package()… Read More GLM linking in CMakeLists.txt