Skip to content

Instantly share code, notes, and snippets.

View chayanforyou's full-sized avatar
🤖
Learning...

Chayan Mistry chayanforyou

🤖
Learning...
View GitHub Profile
  • Download the BIOS update from Acer site ZQ0_125.exe
  • Run the downloaded file, you will get an error like No battery or Low battery, Don't close the error dialogue (!)
  • Navigate to your current users temp directory (e.g. Users//AppData/Local/Temp), there should be somewhere a temporary directory containing the extracted files from the EXE file (for me it was 7zS8C43.tmp)
  • Copy the temp directory somewhere (then you can then close the error dialogue, the temp files will be removed)
  • Open the file platform.ini with a text editor and search for the key AC_Adapter
  • Change parameter BatteryCheck from 1 to 0 or just leave it empty (this disables battery check during BIOS update preparation!), save the file
  • Run InsydeFlash.exe in the same directory

It solved my issue and work beautifully..

It is a library that receives and returns the version of the application uploaded to the market. If it is different from the current version, you can write the code so that it can be updated after moving to the market.

We refine some methods on the Internet and distribute them in the form of a library. The original java source is also attached.

Be careful

How to parse and fetch the Google Market website It takes a lot of data

@chayanforyou
chayanforyou / Android MediaPlayer.md
Created December 25, 2021 04:32
Simplified example of Android MediaPlayer
package me.chayan.mediaplayerdemo;

import android.content.Context;
import android.content.res.AssetFileDescriptor;
import android.content.res.Resources;
import android.media.AudioFormat;
import android.media.AudioManager;
import android.media.AudioTrack;
import android.media.MediaPlayer;

Reason for Not Enough ROM error!:

There are several reasons for this. Also, there are solutions to them. Sometimes, little precaution will help reduce your time consumption for a project. Otherwise, it may take hours, days, weeks even months to find the problem and solve it. Let’s find the reason and ways to solve that.

1. Using too much ASCII values

Convert the ASCII into a constant value. And print each digit one by one. Let’s see!

void Lcd_COut(char row, char col, const char *cptr)
@chayanforyou
chayanforyou / bridging-react-native.md
Last active February 7, 2022 09:37 — forked from chourobin/0-bridging-react-native-cheatsheet.md
React Native Bridging Cheatsheet
@chayanforyou
chayanforyou / Missing Dock in Ubuntu.md
Created May 25, 2022 04:52
Restore Missing Ubuntu Dock
  1. First, install the Extensions tool (gnome-shell-extension-prefs), load it up and disable the "Ubuntu Dock" extension if it is not already disabled.
  2. Reset the configuration settings of Ubuntu Dock to the factory defaults with the following terminal command: dconf reset -f /org/gnome/shell/extensions/dash-to-dock/
  3. (Likely not needed, but to make sure: log out then back in)
  4. Reenable Ubuntu Dock in the "Extensions" tool. If you do not see Ubuntu Dock in the tool, try restarting first.

This will reset your personal dock configurations. An issue with the current configuration is most likely causing the problems. Ubuntu Dock is derived from the Dash to Dock extension, and shares the same configuration settings.

If problems persist, then there may be an issue at the system level. Then attempt a reinstall of the dock:

@chayanforyou
chayanforyou / WSL 2 requires an update to its kernel component.md
Created August 2, 2022 06:12
Error: 0x800701bc WSL 2 requires an update to its kernel component.

For WSL2 you will need 2 Windows components so make sure they are already enabled: Microsoft-Windows-Subsystem-Linux VirtualMachinePlatform

Also it seems some people have problems with the installer extracting the kernel. You can always extract it manually with: msiexec /a "wsl_update_x64.msi" /qb TARGETDIR="C:\temp" and then copy the kernel file from C:\temp to C:\Windows\System32\lxss\tools

Final version shouldn't have this problem since the install comes from Windows Update.

@chayanforyou
chayanforyou / AsyncTask.md
Last active February 2, 2025 16:37
Android AsyncTask is Deprecated: Here’s another way

According to the Android documentation AsyncTask was deprecated in API level 30 and it is suggested to use the standard java.util.concurrent or Kotlin concurrency utilities instead.

AsyncTasks.java

public abstract class AsyncTasks<Params, Result> {

    private final ExecutorService executors;

    public AsyncTasks() {
        this.executors = Executors.newSingleThreadExecutor();
@chayanforyou
chayanforyou / Discord auto start on Ubuntu.md
Created August 20, 2022 06:26
Make Discord auto start on Ubuntu 20.04 & 22.04

The Discord app on linux ubuntu desktop does not start the app. But you can make it auto start by following this steps.

  • Open Applications and search for Startup Applications

  • Then click Add an input box will open, put the following information and Save.
    Name: Discord
    

Command: /usr/bin/discord --tray

@chayanforyou
chayanforyou / SimpleStorage Save Image.md
Created August 27, 2022 17:19
Simplify Android Storage Access Framework for file management across API levels.

Simplify Android Storage Access Framework for file management across API levels. https://github.com/anggrayudi/SimpleStorage

fun saveFile(bitmap: Bitmap, context: Context) {
    val fileDesc = FileDescription("test_image.jpg", "MyFolder", "image/*")
    val image = DocumentFileCompat.createPictureWithMediaStoreFallback(context, fileDesc)

    val fos = image?.openOutputStream(context)
 fos?.use {