View Google Analytics PHP Sample ReadME
For service account auth include:
require_once __DIR__ . '/ServiceAccount.php';
For Oauth2 include:
require_once __DIR__ . '/Oauth2Authentication.php';
Note: To reset the auth for oauth to just unset the sessions
View MergeSort.java
/**
* Created by Linda Lawton on 6/29/2017.
*/
public class MergeSort {
public static void main(String[] args) throws Exception {
int[] data = new int[]{8, 3, 1, 7, 0};
System.out.print("Before Sort: ");
for (int i = 0; i < data.length; i++) System.out.print( data[i] + ",");
View GoogleAnalyticsReportingSample.java
import com.google.api.client.extensions.java6.auth.oauth2.AuthorizationCodeInstalledApp;
import com.google.api.client.extensions.jetty.auth.oauth2.LocalServerReceiver;
import com.google.api.client.auth.oauth2.Credential;
import com.google.api.client.googleapis.auth.oauth2.GoogleAuthorizationCodeFlow;
import com.google.api.client.googleapis.auth.oauth2.GoogleClientSecrets;
import com.google.api.client.googleapis.javanet.GoogleNetHttpTransport;
import com.google.api.client.http.HttpTransport;
import com.google.api.client.json.JsonFactory;
import com.google.api.client.json.jackson2.JacksonFactory;
import com.google.api.client.util.store.DataStoreFactory;
View DatabaseDatastore.cs
using Google.Apis.Json;
using Google.Apis.Util.Store;
using System;
using System.Data.Common;
using System.Threading.Tasks;
namespace GoogleAuthDataStores
{
/// <summary>
/// Database data store that implements <see cref="IDataStore"/>. This store creates a different row for each
View GoogleFloodBuster.cs
using System;
namespace GoogleDevTest
{
class Program
{
static void Main(string[] args)
{
// 10 requests within 1 second
var que = new GoogleDevTest.GoogleFloodBuster(new TimeSpan(0, 0, 1), 10);
View LogarithmicPeakFinding.cs
using System;
namespace CsharpCodeExamples
{
class Program
{
//Peak Finding in C# O(Log N)
//If we take a look at a set of numbers: { 1, 3, 4, 3, 2, 1, 3, 6 }
View MatricsRotation.cs
using System;
namespace CsharpCodeExamples
{
class Program
{
static void Main(string[] args)
{
var data = new int[,] { { 1, 1, 1, 1 },
{ 2, 2, 2, 2 },
View SimpleStack.cs
using System;
namespace CsharpCodeExamples
{
class Program
{
public class SimpleStack<T>
{
int top;
private T[] data;
View BinarySearch.cs
using System;
using System.Linq;
namespace CsharpCodeExamples
{
class Program
{
static void Main(string[] args)
{
View BubbleSort.cs
using System;
using System.Linq;
namespace CsharpCodeExamples
{
class Program
{
static void Main(string[] args)
{
// Quadratic Complexity the more data you have the more checks it has to make and the more time it will take to run.