


FAISS CGO throws 'undefined symbols for architecture arm64' when using libfaiss_c.a
php editor Zimo encountered a problem when using libfaiss_c.a, that is, FAISS CGO threw an "undefined symbol for architecture arm64" error. This error may be caused by missing some symbols when using libfaiss_c.a on 64-bit ARM architecture. To solve this problem, you can try to update or recompile libfaiss_c.a to make sure it is the version suitable for the arm64 architecture. Additionally, you can check that the correct compile and link options are used. I hope these solutions can help developers who encounter similar problems.
Question content
I'm trying to write a standalone go-faiss
wrapper to call FAISS's KMEANS function.
Warehouse: https://www.php.cn/link/4e4faae72b1c3cbd446a70e89e59d8fc
This approach is inspired by https://github.com/andyalm/faissmask/tree/master/FaissMask/runtimes
FAISS static librarylibfaiss_c.a
Build using -DBUILD_SHARED_LIBS=OFF
error log
# faiss-go/pkg/ivf.test /usr/local/go/pkg/tool/darwin_arm64/link: running clang failed: exit status 1 Undefined symbols for architecture arm64: "faiss::Clustering::Clustering(int, int)", referenced from: _faiss_Clustering_new in libfaiss_c.a(Clustering_c.cpp.o) "faiss::Clustering::Clustering(int, int, faiss::ClusteringParameters const&)", referenced from: _faiss_Clustering_new_with_params in libfaiss_c.a(Clustering_c.cpp.o) "faiss::kmeans_clustering(unsigned long, unsigned long, unsigned long, float const*, float*)", referenced from: _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) "faiss::ClusteringParameters::ClusteringParameters()", referenced from: _faiss_ClusteringParameters_init in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_new_with_params in libfaiss_c.a(Clustering_c.cpp.o) "std::exception_ptr::exception_ptr(std::exception_ptr const&)", referenced from: _faiss_get_last_error in libfaiss_c.a(error_impl.cpp.o) "std::exception_ptr::~exception_ptr()", referenced from: _faiss_get_last_error in libfaiss_c.a(error_impl.cpp.o) thread-local wrapper routine for faiss_last_exception in libfaiss_c.a(error_impl.cpp.o) _faiss_Clustering_new in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_new_with_params in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering.cold.1 in libfaiss_c.a(Clustering_c.cpp.o) ... "std::exception_ptr::operator=(std::exception_ptr const&)", referenced from: _faiss_Clustering_new in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_new_with_params in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering.cold.1 in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering.cold.2 in libfaiss_c.a(Clustering_c.cpp.o) "std::runtime_error::runtime_error(char const*)", referenced from: _faiss_Clustering_new in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_new_with_params in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) "std::runtime_error::runtime_error(std::runtime_error const&)", referenced from: std::exception_ptr std::make_exception_ptr[abi:v15006]<std::runtime_error>(std::runtime_error) in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) "std::runtime_error::~runtime_error()", referenced from: _faiss_Clustering_new in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<std::runtime_error>(std::runtime_error) in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_new_with_params in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering.cold.2 in libfaiss_c.a(Clustering_c.cpp.o) "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>::basic_string(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&)", referenced from: std::exception_ptr std::make_exception_ptr[abi:v15006]<faiss::FaissException>(faiss::FaissException) in libfaiss_c.a(Clustering_c.cpp.o) faiss::FaissException::FaissException(faiss::FaissException const&) in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) "std::exception::~exception()", referenced from: _faiss_Clustering_new in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<std::exception>(std::exception) in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_new_with_params in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering.cold.1 in libfaiss_c.a(Clustering_c.cpp.o) "std::exception::~exception()", referenced from: std::exception_ptr std::make_exception_ptr[abi:v15006]<faiss::FaissException>(faiss::FaissException) in libfaiss_c.a(Clustering_c.cpp.o) faiss::FaissException::FaissException(faiss::FaissException const&) in libfaiss_c.a(Clustering_c.cpp.o) faiss::FaissException::~FaissException() in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) "std::current_exception()", referenced from: std::exception_ptr std::make_exception_ptr[abi:v15006]<std::runtime_error>(std::runtime_error) in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<std::exception>(std::exception) in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<faiss::FaissException>(faiss::FaissException) in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) "std::rethrow_exception(std::exception_ptr)", referenced from: _faiss_get_last_error in libfaiss_c.a(error_impl.cpp.o) "std::terminate()", referenced from: ___clang_call_terminate in libfaiss_c.a(Clustering_c.cpp.o) "typeinfo for faiss::FaissException", referenced from: std::exception_ptr std::make_exception_ptr[abi:v15006]<faiss::FaissException>(faiss::FaissException) in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) GCC_except_table21 in libfaiss_c.a(Clustering_c.cpp.o) GCC_except_table28 in libfaiss_c.a(Clustering_c.cpp.o) GCC_except_table29 in libfaiss_c.a(Clustering_c.cpp.o) GCC_except_table31 in libfaiss_c.a(Clustering_c.cpp.o) ... "typeinfo for std::runtime_error", referenced from: std::exception_ptr std::make_exception_ptr[abi:v15006]<std::runtime_error>(std::runtime_error) in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) "typeinfo for std::exception", referenced from: GCC_except_table0 in libfaiss_c.a(error_impl.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<std::exception>(std::exception) in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) GCC_except_table21 in libfaiss_c.a(Clustering_c.cpp.o) GCC_except_table28 in libfaiss_c.a(Clustering_c.cpp.o) GCC_except_table29 in libfaiss_c.a(Clustering_c.cpp.o) ... "vtable for faiss::FaissException", referenced from: std::exception_ptr std::make_exception_ptr[abi:v15006]<faiss::FaissException>(faiss::FaissException) in libfaiss_c.a(Clustering_c.cpp.o) faiss::FaissException::FaissException(faiss::FaissException const&) in libfaiss_c.a(Clustering_c.cpp.o) faiss::FaissException::~FaissException() in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "vtable for std::exception", referenced from: _faiss_Clustering_new in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<std::exception>(std::exception) in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_new_with_params in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "operator delete(void*)", referenced from: _faiss_Clustering_new in libfaiss_c.a(Clustering_c.cpp.o) faiss::FaissException::~FaissException() in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_new_with_params in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) "operator new(unsigned long)", referenced from: _faiss_Clustering_new in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_new_with_params in libfaiss_c.a(Clustering_c.cpp.o) "___cxa_allocate_exception", referenced from: std::exception_ptr std::make_exception_ptr[abi:v15006]<std::runtime_error>(std::runtime_error) in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<std::exception>(std::exception) in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<faiss::FaissException>(faiss::FaissException) in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) "___cxa_begin_catch", referenced from: _faiss_get_last_error in libfaiss_c.a(error_impl.cpp.o) _faiss_Clustering_new in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<std::runtime_error>(std::runtime_error) in libfaiss_c.a(Clustering_c.cpp.o) ___clang_call_terminate in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<std::exception>(std::exception) in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<faiss::FaissException>(faiss::FaissException) in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_new_with_params in libfaiss_c.a(Clustering_c.cpp.o) ... "___cxa_end_catch", referenced from: _faiss_get_last_error in libfaiss_c.a(error_impl.cpp.o) _faiss_Clustering_new in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<std::runtime_error>(std::runtime_error) in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<std::exception>(std::exception) in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<faiss::FaissException>(faiss::FaissException) in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_new_with_params in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) ... "___cxa_free_exception", referenced from: std::exception_ptr std::make_exception_ptr[abi:v15006]<faiss::FaissException>(faiss::FaissException) in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) "___cxa_throw", referenced from: std::exception_ptr std::make_exception_ptr[abi:v15006]<std::runtime_error>(std::runtime_error) in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<std::exception>(std::exception) in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<faiss::FaissException>(faiss::FaissException) in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_train in libfaiss_c.a(Clustering_c.cpp.o) _faiss_kmeans_clustering in libfaiss_c.a(Clustering_c.cpp.o) "___gxx_personality_v0", referenced from: _faiss_get_last_error in libfaiss_c.a(error_impl.cpp.o) _faiss_Clustering_new in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<std::runtime_error>(std::runtime_error) in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<std::exception>(std::exception) in libfaiss_c.a(Clustering_c.cpp.o) std::exception_ptr std::make_exception_ptr[abi:v15006]<faiss::FaissException>(faiss::FaissException) in libfaiss_c.a(Clustering_c.cpp.o) faiss::FaissException::FaissException(faiss::FaissException const&) in libfaiss_c.a(Clustering_c.cpp.o) _faiss_Clustering_new_with_params in libfaiss_c.a(Clustering_c.cpp.o) ... ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
/* #cgo darwin LDFLAGS: -L${SRCDIR}/../../cgo/thirdparty/runtimes/osx-arm64/native -lfaiss_c #include <stdlib.h> #include <faiss/c_api/Clustering_c.h> #include <faiss/c_api/impl/AuxIndexStructures_c.h> #include <faiss/c_api/index_factory_c.h> #include <faiss/c_api/error_c.h> */
libfaiss_c.dylib using
-DBUILD_SHARED_LIBS=ON and add
libfaiss_c.dylib to
/usr/local/lib This CGO code works fine. The CGO header now looks like this
/* #cgo LDFLAGS: -lfaiss_c #include <stdlib.h> #include <faiss/c_api/Clustering_c.h> #include <faiss/c_api/impl/AuxIndexStructures_c.h> #include <faiss/c_api/index_factory_c.h> #include <faiss/c_api/error_c.h> */
*.a files with CGO from custom path.
When I have these files in
/usr/local/lib
These files written to
/usr/local/lib are created using the following make file
GIT_COMMAND ?= git FAISS_COMMIT ?= d87888b13e7eb339bb9c45825e9d20def6665171 all: faiss .PHONY: faiss faiss: if [ -e faiss ]; then \ cd faiss && ${GIT_COMMAND} fetch origin && git reset --hard $(FAISS_COMMIT); \ else \ ${GIT_COMMAND} clone https://github.com/facebookresearch/faiss.git && cd faiss && git reset --hard $(FAISS_COMMIT); \ fi cd faiss && \ export CMAKE_PREFIX_PATH=/opt/homebrew/opt/openblas:/opt/homebrew/opt/libomp:/opt/homebrew && \ cmake -B build -DFAISS_ENABLE_GPU=OFF -DFAISS_ENABLE_C_API=ON -DBUILD_SHARED_LIBS=ON -DFAISS_ENABLE_PYTHON=OFF . && \ make -C build && \ sudo make -C build install && \ sudo cp build/c_api/libfaiss_c.dylib /usr/local/lib/libfaiss_c.dylib
For go-rocks database library, https://github.com/linxGnu/grocksdb#build
They also recommend installing/building the rocksdb library locally and linking it with the cgo interface.
Is this method of independently building the static library "*.a" and providing it as an independent library valid?
Update 3
Go version
$ go version
go version go1.20 darwin/arm64
Copy after login
Operating system and processor architecture? $ go version go version go1.20 darwin/arm64
<p>$ go env
GO111MODULE="on"
GOARCH="arm64"
GOBIN=""
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="arm64"
GOHOSTOS="darwin"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64"
GOVCS=""
GOVERSION="go1.20"
GCCGO="gccgo"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/me/GolandProjects/0learning/faiss-cgo-kmeans/go.mod"
GOWORK=""
CGO_CFLAGS="-O2 -g"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-O2 -g"
CGO_FFLAGS="-O2 -g"
CGO_LDFLAGS="-O2 -g"
PKG_CONFIG="pkg-config"
Copy after login
Update 4<p>$ go env GO111MODULE="on" GOARCH="arm64" GOBIN="" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="arm64" GOHOSTOS="darwin" GOINSECURE="" GONOPROXY="" GONOSUMDB="" GOOS="darwin" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/darwin_arm64" GOVCS="" GOVERSION="go1.20" GCCGO="gccgo" AR="ar" CC="clang" CXX="clang++" CGO_ENABLED="1" GOMOD="/Users/me/GolandProjects/0learning/faiss-cgo-kmeans/go.mod" GOWORK="" CGO_CFLAGS="-O2 -g" CGO_CPPFLAGS="" CGO_CXXFLAGS="-O2 -g" CGO_FFLAGS="-O2 -g" CGO_LDFLAGS="-O2 -g" PKG_CONFIG="pkg-config"
refer to: https://stackoverflow.com/a/63321095/1609570
<code>➜ native git:(master) otool -L libfaiss_c.a Archive : libfaiss_c.a libfaiss_c.a(AutoTune_c.cpp.o): libfaiss_c.a(Clustering_c.cpp.o): libfaiss_c.a(IndexFlat_c.cpp.o): libfaiss_c.a(IndexIVFFlat_c.cpp.o): libfaiss_c.a(IndexIVF_c.cpp.o): libfaiss_c.a(IndexLSH_c.cpp.o): libfaiss_c.a(IndexPreTransform_c.cpp.o): libfaiss_c.a(VectorTransform_c.cpp.o): libfaiss_c.a(IndexShards_c.cpp.o): libfaiss_c.a(IndexReplicas_c.cpp.o): libfaiss_c.a(Index_c.cpp.o): libfaiss_c.a(IndexBinary_c.cpp.o): libfaiss_c.a(IndexScalarQuantizer_c.cpp.o): libfaiss_c.a(MetaIndexes_c.cpp.o): libfaiss_c.a(clone_index_c.cpp.o): libfaiss_c.a(error_impl.cpp.o): libfaiss_c.a(index_factory_c.cpp.o): libfaiss_c.a(index_io_c.cpp.o): libfaiss_c.a(AuxIndexStructures_c.cpp.o): libfaiss_c.a(distances_c.cpp.o): ➜ native git:(master) </code>
FAISS c_api depends on FAISS and static linking needs to include it as well.
After studying thec-rocksdb implementation of
CockroachDB, I found some additional flags that can help resolve the architecture arm64 error undefined symbols
/*
#cgo CPPFLAGS: -Ithirdparty/libfaiss-src/c_api
#cgo CFLAGS: -Ithirdparty/libfaiss-src/c_api
#cgo darwin LDFLAGS: -Lthirdparty/runtimes/osx-arm64/native -lfaiss_c -lfaiss -lomp
#cgo darwin LDFLAGS: -Wl,-undefined -Wl,dynamic_lookup
#cgo !darwin LDFLAGS: -Wl,-unresolved-symbols=ignore-all
#include <stdlib.h>
#include <Clustering_c.h>
#include <impl/AuxIndexStructures_c.h>
#include <index_factory_c.h>
#include <error_c.h>
*/
The complete code can be found
here.
Update 1https://www.php.cn/link/307eb8ee16198da891c521eca21464c1
https://www.php.cn/link/d585d095b00cd2f5b50acb64add23834
These projects are good reference points for static linking against external C libraries.The above is the detailed content of FAISS CGO throws 'undefined symbols for architecture arm64' when using libfaiss_c.a. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

Since its inception in 2009, Bitcoin has become a leader in the cryptocurrency world and its price has experienced huge fluctuations. To provide a comprehensive historical overview, this article compiles Bitcoin price data from 2009 to 2025, covering major market events, changes in market sentiment, and important factors influencing price movements.

1. First, right-click on the blank space of the taskbar at the bottom of Windows 11 and select [Taskbar Settings]. 2. Find [taskbarcorneroverflow] on the right in the taskbar settings. 3. Then find [clock] or [Clock] above it and select to turn it on. Method 2: 1. Press the keyboard shortcut [win+r] to call up run, enter [regedit] and press Enter to confirm. 2. Open the registry editor, find [HKEY_CURRENT_USERControlPanel] in it, and delete it. 3. After deletion, restart the computer and you will be prompted for configuration. When you return to the system, the time will be displayed.

Answer: The following community forums and discussion groups are available for Java functional programming questions: StackOverflow: The world's largest programming Q&A website with a community of Java functional programming experts. JavaFunctionalProgramming: A community forum focused on Java functional programming, providing discussions on concepts, language features, and best practices. Redditr/functionaljava: A subreddit focused on functional programming in Java, focusing on tools, libraries, and technologies. Discord: JavaFunctional Programming: Discord service that provides real-time discussion, code sharing and collaboration

How do I use other people's Python code? Find code repositories: Find the code you need on platforms like PyPI and GitHub. Installation code: Use pip or clone the GitHub repository to install. Import modules: Use the import statement in your script to import installed modules. Working with code: Access functions and classes in modules. (Optional) Adapt the code: Modify the code as needed to fit your project.

What should I do if the time on my win11 computer is always wrong? We all set the time or calendar when using win11 system, but many users are asking that the computer time is always wrong, so what is going on? Users can directly click on the taskbar below, and then find taskbarcorneroverflow to set it up. Let this site introduce to users in detail how to adjust the time error on Win11 computers. How to adjust the computer time error in Windows 11. Method 1: 1. We first right-click on the blank space of the taskbar below and select Taskbar Settings. Method 2: 1. Press the keyboard shortcut win+r to call up run, enter regedit and press Enter to confirm.

Common exception types and their repair measures in Java function development During the development of Java functions, various exceptions may be encountered, which affect the correct execution of the function. The following are common exception types and their repair measures: 1. NullPointerException Description: Thrown when accessing an object that has not been initialized. Fix: Make sure you check the object for non-null before using it. Sample code: try{Stringname=null;System.out.println(name.length());}catch(NullPointerExceptione){

overflow is a property of CSS that is used to control the display mode of element content when it exceeds the container. Available values include: visible: the content is visible, the overflow container is hidden: the overflow content is cut scroll: the scroll bar is displayed to view the overflow content auto: the browser automatically determines Whether to display the scroll bar inherit: inherit the overflow attribute of the parent element

As a world-renowned short video platform, Douyin has a huge user base and content creators. However, as the platform rules are constantly updated and improved, some users may encounter account bans. This has raised public questions about the transparency and fairness of platform management. This article will discuss the issue of Douyin account bans and whether users have ways to appeal after their accounts are banned. There may be many reasons for being banned on the Douyin platform, including but not limited to illegal content, violation of platform regulations, infringement of other people's rights, etc. In order to maintain the order of the platform and the interests of users, Douyin has set up a series of rules and review mechanisms. When some users violate the rules, their accounts may be banned. However, some users may question or be dissatisfied with the reasons for the ban
