Skip to content

Instantly share code, notes, and snippets.

View AnwarShahriar's full-sized avatar
🎱
Focusing

Md. Shahriar Anwar AnwarShahriar

🎱
Focusing
View GitHub Profile
package net.colaborativa.exampleapp.api;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
@AnwarShahriar
AnwarShahriar / RetrofitCachingExample.java
Created February 25, 2016 06:43 — forked from swankjesse/RetrofitCachingExample.java
Demonstrate HTTP caching with OkHttp and Retrofit.
/*
* Copyright (C) 2013 Square, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
using System;
using System.Text.RegularExpressions;
public class Example
{
public static void Main()
{
string pattern = @"^[a-z]([.]?[a-z0-9]+)+$";
string input = @"Aacch.aa.dssfsfs";
RegexOptions options = RegexOptions.IgnoreCase;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
final String regex = "^[a-z]([.]?[a-z0-9]+)+$";
final String string = "Aacch.aa.dssfsfs";
final Pattern pattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE | Pattern.UNICODE_CASE);
final Matcher matcher = pattern.matcher(string);
while (matcher.find()) {
{
"name": "example-app-name",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server"
},
"author": "",
"license": "ISC",
  • IETF communicaion protocols: RTCWEB, JSEP
  • W3C API standards: WebRTC, Media Capture and Streams
  • Media and communication stach: libjingle, VP8, OPUS
public class MainActivity extends AppCompatActivity {
User user;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
ActivityMainBinding binding = DataBindingUtil.setContentView(this, R.layout.activity_main);
user = new User();
binding.setUser(user);
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="me.anwarshahriar.twowayprimitive.MainActivity.User" />
<variable
name="user"
type="User" />
<?xml version="1.0" encoding="utf-8"?>
<layout xmlns:android="http://schemas.android.com/apk/res/android">
<data>
<import type="me.anwarshahriar.twowayprimitive.MainActivity.User" />
<variable
name="user"
type="User" />