Skip to content

Instantly share code, notes, and snippets.

View prashantvc's full-sized avatar
:octocat:
Working

Prashant Cholachagudda prashantvc

:octocat:
Working
View GitHub Profile
void PrintNetworkInfo(){
using (var wifi = (WifiManager)GetSystemService (Context.WifiService)) {
using (var dhcp = wifi.DhcpInfo) {
var gateway = dhcp.Gateway;
var ip = dhcp.IpAddress;
Console.WriteLine (Formatter.FormatIpAddress (gateway));
Console.WriteLine (Formatter.FormatIpAddress (ip));
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace LinguisticTagger
{
// The UIApplicationDelegate for the application. This class is responsible for launching the
// User Interface of the application, as well as listening (and optionally responding) to
using System;
using Android.App;
using Android.Widget;
using Android.OS;
using Java.Lang;
namespace UnhandledCrash
{
[Activity (Label = "UnhandledCrash", MainLauncher = true)]
public class MainActivity : Activity
2014-01-14 12:16:04.235 MoPubSDKBindingTest[4248:60b] Delegate loaded
2014-01-14 12:16:04.296 MoPubSDKBindingTest[4248:60b] MOPUB: Interstitial controller is loading ad with MoPub server URL: http://ads.mopub.com/m/ad?v=8&udid=ifa:E6B06DE7-058B-4F9B-B91B-59FEFC9B0D09&id=a1c58c5ac9084eeca746af006c9b4d2c&nv=1.17.0.0&o=p&sc=2.0&z=+0530&mr=1&ct=2&av=1.0&cn=AirTel&iso=in&mnc=45&mcc=404&dn=iPhone6%2C2
2014-01-14 12:16:04.928 MoPubSDKBindingTest[4248:60b] MOPUB: Could not find custom event class named MPGoogleAdMobInterstitialCustomEvent
2014-01-14 12:16:04.930 MoPubSDKBindingTest[4248:60b] MOPUB: Interstatial ad view is fetching ad network type: admob_full
2014-01-14 12:16:04.931 MoPubSDKBindingTest[4248:60b] MOPUB: Interstitial controller is loading ad with MoPub server URL: http://ads.mopub.com/m/ad?v=8&udid=ifa:E6B06DE7-058B-4F9B-B91B-59FEFC9B0D09&id=a1c58c5ac9084eeca746af006c9b4d2c&nv=1.17.0.0&o=p&sc=2.0&z=+0530&mr=1&ct=2&av=1.0&cn=AirTel&iso=in&mnc=45&mcc=404&dn=iPhone6%2C2&request_id=89dc53de7ce711e3b00000259
using System.Collections.Generic;
using Android.App;
using Android.Views;
using Android.Widget;
using R = ClickEvents.Resource;
using Android.Text;
using System;
namespace ClickEvents
{
public class AirplaneModeService
{
public bool Toggle (Context context)
{
bool isEnabled = IsAirplaneModeOn (context);
// Toggle airplane mode.
SetSettings (context, isEnabled ? 1 : 0);
// Post an intent to reload.
Intent intent = new Intent (Intent.ActionAirplaneModeChanged);
intent.PutExtra ("state", !isEnabled);
using System;
using NUnit.Framework;
using System.ComponentModel;
namespace BindingListBug
{
[TestFixture]
public class BindingListBugTest
{
string changedPropertyName = string.Empty;
Cleaning: IQX.OneList.Mobile.iOS.IQX (Release|iPhone)
Removing output files...
Clean complete
Building: IQX.OneList.Mobile.Shared.iOS (Release)
Performing main compilation...
Skipping project since output files are up to date
Build complete -- 0 errors, 0 warnings
Building: IQX.OneList.Mobile.iOS.Shared (Release)
private Bitmap async GetImageBitmapFromUrl(string url)
{
Bitmap imageBitmap = null;
using (var webClient = new WebClient())
{
var imageBytes = await webClient.DownloadDataAsync(url);
if (imageBytes != null && imageBytes.Length > 0)
{
imageBitmap = BitmapFactory.DecodeByteArray(imageBytes, 0, imageBytes.Length);
using System;
using Android.App;
using Android.Content;
using Android.Widget;
using Android.OS;
using Android.Net;
using System.Threading.Tasks;
namespace NetworkCheck