JSDoc, an alternative to TypeScript?

Many developers prefer using TypeScript because of its type checking capabilities. However, this requires an additional translation step, which can cause trouble and waste time. This article will show you how to use JSDoc to get the same type of control, while using pure JavaScript for the fastest development times and better documentation! JavaScript has […]

android ANativeWindow rotation rendering angle

android ANativeWindow rotation rendering angle MediaCodec rotation angle reference videoExtractor opens an angled video file mediaFormat.getInteger(MediaFormat.KEY_ROTATION); gets the angle MediaFormat mediaFormat = videoExtractor.getTrackFormat(j); String mime = mediaFormat.getString(MediaFormat.KEY_MIME); if (mime.startsWith(KEY_VIDEO)) {//Match the track corresponding to the video videoExtractor.selectTrack(j);//Select the track corresponding to the video long duration = mediaFormat.getLong(MediaFormat.KEY_DURATION); int width = mediaFormat.getInteger(MediaFormat.KEY_WIDTH); int height = mediaFormat.getInteger(MediaFormat.KEY_HEIGHT); […]

React technical principles and code development practice: navigation and routing in React Native

Author: Zen and the Art of Computer Programming 1. Background Introduction In React Native applications, navigation is the main way to switch between different views of the user interface. The core idea is to use the stack data structure to combine different components to achieve smooth transition between pages. In React Native, the Navigator component […]

The first IDE developed by AOSP in history (supports Java/Kotlin/C++/Jni/Native/Shell/Python)

ASFP Study The first IDE developed by AOSP in history (supports Java/Kotlin/C++/Jni/Native/Shell/Python) Similar to Android Studio, it can be used to develop Android system source code. Android studio for platform, referred to as asfp (Falling in Love with a Rich Woman). Background & amp;Download & amp;Use Background Because the Android system source code is too […]

Android JNI (Java Native Interface) technology (used in conjunction with NDK (Native Development Kit)) Java interacts with C++, and Java calls the C++ interface

What is the interaction between Java and C++ (or other languages)? Under what circumstances is jni needed? “Interaction between Java and C++” refers to the fact that the two languages can call each other’s methods and operate each other’s data. For example, you can call C++ functions in Java code, and you can also call […]

hadoop mapreduce api calls WordCount native and cluster code

Run code natively package com.example.hadoop.api.mr; import org.apache.hadoop.fs.Path; import org.apache.hadoop.io.IntWritable; import org.apache.hadoop.io.LongWritable; import org.apache.hadoop.io.Text; import org.apache.hadoop.mapreduce.Job; import org.apache.hadoop.mapreduce.Mapper; import org.apache.hadoop.mapreduce.Reducer; import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; import java.io.IOException; public class WordCount { /** * Text: refers to StringWritable * (LongWritable, Text) Input on the map side: these two parameters will never change, Text: text data, LongWritable: offset (offset […]

react-native debugging

1. Debug page js code I used a real device for debugging. When the phone shakes, a page will appear. Click debug. After clicking debug, the page will appear. Click the prompt operation shortcut key to display the developer tools. Note: You cannot directly see the App user interface in Chrome, but can only provide […]

pcl+vtk (9) QVTKOpenGLNativeWidget displays point cloud and model at the same time

1. Load point cloud pcl::PointCloud<pcl::PointXYZ>::Ptr cloud(new pcl::PointCloud<pcl::PointXYZ>); //Create point cloud pointer QString fileName = QFileDialog::getOpenFileName(this, “Open PointCloud”, “.”, “Open PCD files(*.pcd)”); if(fileName == “”) return; pcl::io::loadPCDFile(fileName.toStdString(),*cloud); vtkSmartPointer<vtkPoints> points = vtkSmartPointer<vtkPoints>::New(); vtkSmartPointer<vtkCellArray> vertices = vtkSmartPointer<vtkCellArray>::New(); for (int i = 0; i<cloud->size(); i + + ) { vtkIdType pid[1]; pid[0] = points->InsertNextPoint(cloud->at(i).x, cloud->at(i).y, cloud->at(i).z); vertices->InsertNextCell(1, pid); } […]