Skip to content

Instantly share code, notes, and snippets.

Public Function IsConnectionAvailable() As Boolean
Dim objUrl As New System.Uri("http://google.com")
Dim objWebReq As System.Net.WebRequest
objWebReq = System.Net.WebRequest.Create(objUrl)
Dim objresp As System.Net.WebResponse
Try
objresp = objWebReq.GetResponse
objresp.Close()
objresp = Nothing
public bool IsConnectionAvailable()
{
System.Uri objUrl = new System.Uri("http://google.com");
System.Net.WebRequest objWebReq = default(System.Net.WebRequest);
objWebReq = System.Net.WebRequest.Create(objUrl);
System.Net.WebResponse objresp = default(System.Net.WebResponse);
try {
objresp = objWebReq.GetResponse;
objresp.Close();
Imports System.IO
Imports System.String
Imports System.Net
Imports CefSharp
Imports CefSharp.WinForms
Public Class Form1
Dim sReader As String
Dim sPath As String
Dim browser As ChromiumWebBrowser
<?xml version="1.0" encoding="utf-8" ?>
<set
xmlns:android="http://schemas.android.com/apk/res/android"
android:shareInterpolator="false">
<rotate
android:fromDegrees="0"
android:toDegrees="360"
android:pivotX="50%"
android:pivotY="50%"
android:duration="2000" />
ImageView ivLogo = (ImageView) findViewById(R.id.ivLogo);
Animation rotate = AnimationUtils.loadAnimation(this,R.anim.custom_anim);
ivLogo.startAnimation(rotate);
public void funSetPass(String code) {
SharedPreferences settings = getSharedPreferences("Protectdata",
MODE_PRIVATE);
SharedPreferences.Editor prefEditor = settings.edit();
prefEditor.putString("com.tech4mm.businesssms.PASS_CODE", code);
prefEditor.commit();
}
public String funGetPass() {
// Do something in response to button
@AungWinnHtut
AungWinnHtut / multiform_multiscreen.cs
Created August 14, 2016 03:15
multiform control in multi screen
Screen[] screens = Screen.AllScreens;
Rectangle bounds = screens[0].Bounds;
this.SetBounds(bounds.X, bounds.Y, bounds.Width, bounds.Height);
this.StartPosition = FormStartPosition.CenterScreen;
@AungWinnHtut
AungWinnHtut / multiform_multiscreen.cs
Created August 14, 2016 03:15
multiform control in multi screen
Screen[] screens = Screen.AllScreens;
Rectangle bounds = screens[0].Bounds;
this.SetBounds(bounds.X, bounds.Y, bounds.Width, bounds.Height);
this.StartPosition = FormStartPosition.CenterScreen;
package com.engineer4myanmar.intakebook;
import java.util.ArrayList;
import java.util.List;
import android.content.Context;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
/**
* @author manish.s
* Updat by Dr. Aung Win Htut
#include <Wire.h>
#include <Adafruit_MCP23017.h>
#include <Adafruit_RGBLCDShield.h>
Adafruit_RGBLCDShield lcd = Adafruit_RGBLCDShield();
#define RED 0x1
#define YELLOW 0x3
#define GREEN 0x2
#define TEAL 0x6