- Explained: How Does L1 Regularization Perform Feature Selection?
- llama.cpp: Writing A Simple C++ Inference Program for GGUF LLM Models
- Building On-Device Face Recognition In Android
- From Python To Android: HF Sentence Transformers (Embeddings)
- On-Device Machine Learning In Android: Frameworks and Ecosystem
- Using C/C++ in Android: A Comprehensive Guide For Beginners
- [Building A Cross-Pl
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Presentation pres = new Presentation("write-protected-presentation.pptx"); | |
| try { | |
| pres.getProtectionManager().removeWriteProtection(); | |
| pres.save("write-protection-removed.pptx", SaveFormat.Pptx); | |
| } finally { | |
| if (pres != null) pres.dispose(); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import org.apache.commons.io.IOUtils; | |
| import java.io.File; | |
| import java.io.FileOutputStream; | |
| import java.io.IOException; | |
| import java.io.InputStream; | |
| import java.nio.file.Files; | |
| import java.util.ArrayList; | |
| import java.util.List; |
Based on this blogpost.
Install with Homebrew:
$ brew install postgresql@14(The version number 14 needs to be explicitly stated. The @ mark designates a version number is specified. If you need an older version of postgres, use postgresql@13, for example.)
Source: AndroidDev
To get call history programmatically first add read contact permission in Manifest file:
<uses-permission android:name="android.permission.READ_CONTACTS" />
Create xml file. Add the below code in xml file:
<Linearlayout android:layout_height="fill_parent"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /** | |
| * Navigates only if this is safely possible; when this Fragment is still the current destination. | |
| */ | |
| fun Fragment.navigateSafe( | |
| @IdRes resId: Int, | |
| args: Bundle? = null, | |
| navOptions: NavOptions? = null, | |
| navigatorExtras: Navigator.Extras? = null | |
| ) { | |
| if (mayNavigate()) findNavController().navigate( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function sendSms($phone, $message){ | |
| // required headers | |
| $stkheader = array('Content-Type:application/json','Cache-Control:no-cache'); | |
| // url to post the data | |
| $url = 'https://oyaa.co.ke/api/SendSms/'; | |
| # initiating curl | |
| $curl = curl_init(); | |
| // set curl url |
// Add other Interceptors
httpClient.addInterceptor(new Interceptor() {
@Override
public Response intercept(Interceptor.Chain chain) throws IOException {
Request original = chain.request();
Request request = original.newBuilder()
.header("Authorization", token_type + " " + access_token)
.method(original.method(), original.body())
.build();NewerOlder