Skip to content

Instantly share code, notes, and snippets.

@aleksanderwozniak
aleksanderwozniak / main.dart
Created Oct 30, 2019
Flutter - providing dynamic data to TableCalendar widget
View main.dart
import 'dart:async';
import 'dart:math';
import 'package:flutter/material.dart';
import 'package:table_calendar/table_calendar.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
@joielechong
joielechong / hosts
Last active Feb 2, 2022 — forked from eyecatchup/hosts
Disable Skype ads: 1.) Add hosts to your hosts file 2.) Flush DNS resolver cache (ipconfig /flushdns)
View hosts
# On Windows 7, 8, 10 Hosts file is in c:\windows\system32\drivers\etc\hosts
#
# Block Skype ads
127.0.0.1 secure-sin.adnxs.com # On skype 7.*
127.0.0.1 *.adnxs.com # On skype 7.*
127.0.0.1 logi10.xiti.com # On skype 7.*
127.0.0.1 *.everesttech.net # On skype 7.*
127.0.0.1 pixel.everesttech.net # On skype 7.*
127.0.0.1 d.adroll.com # On skype 7.*
@grantland
grantland / post.md
Last active Feb 3, 2022
RecyclerView item onClick
View post.md

RecyclerView item onClick

RecyclerView does not have an OnItemClickListener like it's predecessor, ListView. However, detecting item clicks is pretty simple.

Set an OnClickListener in your ViewHolder creation:

private class MyAdapter extends RecyclerView.Adapter<MyAdapter.ViewHolder>  {

 public static class ViewHolder extends RecyclerView.ViewHolder
@ruario
ruario / latest-chrome.sh
Last active Sep 27, 2021
This script will find the latest Google Chrome binary package, download it and repackage it into Slackware format.
View latest-chrome.sh
#!/bin/bash
# latest-chrome Version 1.5
# This script will find the latest Google Chrome binary package,
# download it and repackage it into Slackware format.
# I don't use Chrome for regular browsing but it is handy for
# comparative tests against Vivaldi. :P
# Copyright 2018 Ruari Oedegaard, Oslo, Norway
@joshdholtz
joshdholtz / SomeFragment.java
Last active Dec 15, 2021
Android Google Maps V2 - MapView in XML
View SomeFragment.java
public class SomeFragment extends Fragment {
MapView mapView;
GoogleMap map;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View v = inflater.inflate(R.layout.some_layout, container, false);