Skip to content

Instantly share code, notes, and snippets.

View shivaluma's full-sized avatar
🏠
Working from home

Nguyen Viet Thanh shivaluma

🏠
Working from home
View GitHub Profile
@shivaluma
shivaluma / docker-compose.yml
Created April 23, 2023 09:24
Kafka cluster using conduktor with kafka connect and ksqldb
version: '2.1'
services:
zoo1:
image: confluentinc/cp-zookeeper:7.3.2
hostname: zoo1
container_name: zoo1
ports:
- "2181:2181"
environment:
@shivaluma
shivaluma / avg.js
Last active August 2, 2024 06:31
Tinh diem trung binh hcmus
// tinh diem trung binh hcmus, vao trang diem va paste vao console.
// khong tinh anh van, quoc phong, the duc va nhung mon rot
var tinchi = document.querySelectorAll("td:nth-child(3)");
var monhoc = document.querySelectorAll("td:nth-child(2)");
var diem = document.querySelectorAll("td:nth-child(6)");
var tongdiem = 0,
tongtinchi = 0;
fun drawPath(src: LatLng, dest: LatLng) {
addMarker(mGoogleMap,src,"My location",R.drawable.ic_startpoint)
addMarker(mGoogleMap,dest,"Destination",R.drawable.ic_endpoint)
doAsync {
val path: MutableList<List<LatLng>> = ArrayList()
val urlDirections = "https://maps.googleapis.com/maps/api/directions/json?origin=${src.latitude},${src.longitude}&destination=${dest.latitude},${dest.longitude}&key=${Constant.ggMapApiKey}"
val directionsRequest = object : StringRequest(Request.Method.GET, urlDirections, Response.Listener<String> {
response ->
val jsonResponse = JSONObject(response)
// Get routes
<service
android:name=".service.FirebaseMessagingService">
<intent-filter>
<action android:name="com.google.firebase.MESSAGING_EVENT"/>
</intent-filter>
</service>
public class MyFirebaseService extends FirebaseMessagingService {
private static final String TAG = "MyFirebaseService";
@Override
public void onMessageReceived(RemoteMessage remoteMessage) {
// handle a notification payload.
if (remoteMessage.getNotification() != null) {
Log.d(TAG, "Message Notification Body: " + remoteMessage.getNotification().getBody());
sendNotification(remoteMessage.getNotification().getBody());
#include <linux/module.h> /* Needed by all kernel modules */
#include <linux/kernel.h> /* Needed for loglevels (KERN_WARNING, KERN_EMERG, KERN_INFO, etc.) */
#include <linux/init.h> /* Needed for __init and __exit macros. */
#include <linux/moduleparam.h>
#include <linux/unistd.h> /* sys_call_table __NR_* system call function indices */
#include <linux/fs.h> /* filp_open */
#include <linux/slab.h> /* kmalloc */
#include <asm/paravirt.h> /* write_cr0 */
#include <asm/uaccess.h> /* get_fs, set_fs */

Keybase proof

I hereby claim:

  • I am shivaluma on github.
  • I am sshiro (https://keybase.io/sshiro) on keybase.
  • I have a public key ASCWBC6rSsb35UHNnlXh67c4QhTciRdpRLWPrIO6WCOO4go

To claim this, I am signing this object:

BacThang := proc (A) local hang, cot, i, j, k, d, check; hang := rowdim(A); cot := coldim(A); i := 1; j := 1; while i <= hang and j <= cot do if A[i, j] <> 0 then for k from i+1 to cot do addrow(A, i, k, -A[k, j]/A[i, j]) end do; i := i+1; j := j+1 else check := false; for d from i+1 to m do if A[d, j] <> 0 then check := true; swaprow(A, d, i); break end if end do; if check = false then j := j+1 end if end if end do; return A end proc