text:
<!DOCTYPE html>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta name="viewport" content="width=device-width">

        <title>
            AngularJS - Genoverse directive
        </title>
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
        <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
        <link rel="stylesheet" href="lib/Genoverse/css/genoverse.css">
        <link rel="stylesheet" href="lib/Genoverse/css/controlPanel.css">
        <link rel="stylesheet" href="lib/Genoverse/css/fileDrop.css">
        <link rel="stylesheet" href="lib/Genoverse/css/karyotype.css">
        <link rel="stylesheet" href="lib/Genoverse/css/resizer.css">
        <link rel="stylesheet" href="lib/Genoverse/css/trackControls.css">
        <link rel="stylesheet" href="lib/Genoverse/css/tooltips.css">

 Genome browser

                         Explore sequences
                        alongside genes and transcripts from Ensembl
                        / Ensembl Genomes

                            Species
                            <select id="genomic-species-select" class="form-control" ng-options="genome as (genome | urldecodeSpecies) for genome in genomeNames" ng-model="genome">
                            </select>

                            Chromosome
                            <input type="text" class="form-control" id="chromosome-input" placeholder="Enter chromosome" ng-model="chromosome">

                            Start
                            <input type="number" class="form-control" id="genomic-start-input" placeholder="Enter start" ng-model="start">

                            End
                            <input type="number" class="form-control" id="genomic-end-input" placeholder="Enter end" ng-model="end">

                View in {{ getGenomeObject(genome, genomes).division }}
                |
                    UCSC

            <genoverse genome="genome" chr="chromosome" start="start" end="end" example-locations="exampleLocations">
                <genoverse-track name="'Sequence'" model="Genoverse.Track.Model.Sequence.Ensembl" view="Genoverse.Track.View.Sequence" controller="Genoverse.Track.Controller.Sequence" url="urls.sequence" resizable="'auto'" auto-height="true" hide-empty="false" extra="{100000: false}"></genoverse-track>
                <genoverse-track name="'Genes'" labels="true" info="'Ensembl API genes'" model="Genoverse.Track.Model.Gene.Ensembl" view="Genoverse.Track.View.Gene.Ensembl" url="urls.genes" resizable="'auto'" auto-height="true" hide-empty="false"></genoverse-track>
                <genoverse-track name="'Transcripts'" labels="true" info="'Ensembl API transcripts'" model="Genoverse.Track.Model.Transcript.Ensembl" view="Genoverse.Track.View.Transcript.Ensembl" url="urls.transcripts" resizable="'auto'" auto-height="true" hide-empty="false"></genoverse-track>
            </genoverse>


text:
package sshdemo.web.controller;

import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import sshdemo.entity.Father;
import sshdemo.service.FlushService;

@Controller
public class TestFlush {

    @Autowired
    @Qualifier("FlushService")
    protected FlushService flushService;

    @RequestMapping("/testFlush.action")
    public void hello(HttpServletResponse resp) {

        Father f = new Father();
        f.setName("spring");
        flushService.execute(f);

        try {
            resp.setContentType("text/html; charset=UTF-8");
            resp.getWriter().write("test success");
        } catch (Exception e) {
            e.printStackTrace();
        }

    }
}

redpajama_set_name: RedPajamaGithub


text:
<?php

namespace AppBundle\Controller;

use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use AppBundle\Entity\Product;
use AppBundle\Entity\Category;
use AppBundle\Form\ProductType;
use Symfony\Component\HttpFoundation\JsonResponse;

class ProductsController extends Controller
{
    /**
     * @Route("/showProducts", name="showProducts")
     */
     public function showProductsAction(Request $request)
     {
        try {

            $products = $this->getDoctrine()->getRepository(Product::class)->findAll();
            // replace this example code with whatever you need
            if($products){
                return $this->render('admin/pages/products/admin-show-product-page.html.twig',array('products' => $products ));
            }
            // foreach($products as $product){
            //     $poduct->nameCategory = $this->getDoctrine()->getRepository(Category::class)->find($product->getCategory())->getName();
            // }
            return $this->render('admin/pages/products/admin-show-product-page.html.twig',array('products' => '' ));
        } catch (Exception $e) {
            echo "try to resolve... connection ".$e->getMessage();
        }
     }

     /**
     * @Route("/showCategories", name="showCategories")
     */
    public function showCategoriesAction(Request $request)
    {
       try {
           $categories = $this->getDoctrine()->getRepository(Category::class)->findAll();
           // replace this example code with whatever you need
           foreach ($categories as $category) {
                $response[] = array(
                    'id' => $category->getId(),
                    'name' => $category->getName()
                );
            }
            if($response){
                return new JsonResponse($response);
            }
            $response = "....";
            new JsonResponse($response);
       } catch (Exception $e) {
           echo "try to resolve... connection ".$e->getMessage();
       }
    }

     /**
     * @Route("/createProduct", name="createProduct")
     */
     public function createProductAction(Request $request)
     {
        $product = new Product();
        $form = $this->createForm(ProductType::class, $product);
        $form->handleRequest($request);
        if ($form->isSubmitted() && $form->isValid()) {
            // $file stores the uploaded PDF file
            /** @var Symfony\Component\HttpFoundation\File\UploadedFile $file */
            $file = $product->getImg();

            // Generate a unique name for the file before saving it
            $fileName = md5(uniqid()).'.'.$file->guessExtension();

            // Move the file to the directory where brochures are stored
            $file->move(
                $this->getParameter('brochures_directory'),
                $fileName
            );

            // Update the 'brochure' property to store the PDF file name
            // instead of its contents
            $product->setImg($fileName);
            // ... persist the $product variable or any other work
            $nameCategory = $form->get('category')->getData();
            //si existe obtener la categoria
            $em = $this->getDoctrine()->getManager();
            $category = $this->getDoctrine()->getRepository('AppBundle:Category')->findOneByName($nameCategory);
            if(! $category){
                $category = new Category;
                $category->setName($nameCategory);
            }

            $product->setCategory($category);

            $em = $this->getDoctrine()->getManager();
            $em->persist($product);
            $em->flush();
            return $this->redirectToRoute('createProduct',array("id" => $product->getImg()));
        }
        return $this->render('admin/pages/products/admin-products-page.html.twig',array('form' => $form->createView()));
     }

     /**
     * @Route("/showAllProduct", name="showAllProduct")
     */
    public function showAllProduct(Request $request)
    {
        //mostrar solo 12 profuctos
       try {

           $products = $this->getDoctrine()->getRepository(Product::class)->findAll();
           // replace this example code with whatever you need
           if($products){
               return $this->render('client/pages/products/all-product.html.twig',array('products' => $products ));
           }
           // foreach($products as $product){
           //     $poduct->nameCategory = $this->getDoctrine()->getRepository(Category::class)->find($product->getCategory())->getName();
           // }
           return $this->render('client/pages/products/all-product.html.twig',array('products' => '' ));
       } catch (Exception $e) {
           echo "try to resolve... connection ".$e->getMessage();
       }
    }

}


text:
  //kimonoAPIkey: "da9ae03d1f22eeee1d359b0db1fb2851",
  //worldcupAPIurl: "http://worldcup.kimonolabs.com/api/",

  //// for daily updating of stats:
  //// only player stats, team stats, and match stats need to be updated
  //updateStats: function() {
    //WorldCup.updatePlayerStats();
    //WorldCup.updateTeamStats();
    //WorldCup.updateMatchStats();
  //},

  //// for running once, to initially populate the database with data
  //populateData: function() {
    //WorldCup.updatePlayerStats();
    //WorldCup.updateTeamStats();
    //WorldCup.updateClubStats();
    //WorldCup.updateMatchStats();
    //WorldCup.updatePlayerSeasonStats();
  //},

  //updatePlayerStats: function() {
    //console.log("Updating player stats...\n")

    //var stats = WorldCup.getPlayerStats();
    //if (!(stats.data && stats.data.length)) {
      //throw "No data returned from API call.";
    //}

    //for (i = 0; i < stats.data.length; i++) {
      //var player = stats.data[i];
      //if (player.firstName && player.lastName && player.birthDate) {
        //Players.upsert(
          //{firstName: player.firstName, lastName: player.lastName, birthDate: player.birthDate},
          //player
        //);
        //console.log("Updated player: " + player.firstName + " " + player.lastName + "\n");
      //}
    //}
  //},

  //getPlayerStats: function() {
    //// grab all the players, including their clubs and teams
    //return Meteor.http.get(
      //WorldCup.worldcupAPIurl + "players?" +
      //"apikey=" + WorldCup.kimonoAPIkey +
      //"&includes=team,club&limit=1000"
    //);
  //},

  //updateTeamStats: function() {
    //console.log("Updating team stats...\n");

    //var stats = WorldCup.getTeamStats();
    //if (!(stats.data && stats.data.length)) {
      //throw "No data returned from API call.";
    //}

    //for (i = 0; i < stats.data.length; i++) {
      //var team = stats.data[i];
      //if (team.name) {
        //Teams.upsert(
          //{name: team.name},
          //team
        //);
        //console.log("Updated team: " + team.name + "\n");
      //}
    //}
  //},

  //getTeamStats: function() {
    //// grab all the teams
    //return Meteor.http.get(
      //WorldCup.worldcupAPIurl + "teams?" +
      //"apikey=" + WorldCup.kimonoAPIkey +
      //"&limit=1000"
    //);
  //},

  //updateClubStats: function() {
    //console.log("Updating club stats...\n");

    //var stats = WorldCup.getClubStats();
    //if (!(stats.data && stats.data.length)) {
      //throw "No data returned from API call.";
    //}

    //for (i = 0; i < stats.data.length; i++) {
      //var club = stats.data[i];
      //if (club.name) {
        //Clubs.upsert(
          //{name: club.name},
          //club
        //);
        //console.log("Updated club: " + club.name + "\n");
      //}
    //}
  //},

  //getClubStats: function() {
    //// grab all the clubs
    //return Meteor.http.get(
      //WorldCup.worldcupAPIurl + "clubs?" +
      //"apikey=" + WorldCup.kimonoAPIkey +
      //"&limit=1000"
    //);
  //},

  //updateMatchStats: function() {
    //console.log("Updating match stats...\n");

    //var stats = WorldCup.getMatchStats();
    //if (!(stats.data && stats.data.length)) {
      //throw "No data returned from API call.";
    //}

    //for (i = 0; i < stats.data.length; i++) {
      //var match = stats.data[i];
      //if (match.venue && match.startTime) {
        //Matches.upsert(
          //{venue: match.venue, startTime: match.startTime},
          //match
        //);
        //console.log("Updated match: " + match.startTime + " at " + match.venue + "\n");
      //}
    //}
  //},

  //getMatchStats: function() {
    //// grab all the clubs
    //return Meteor.http.get(
      //WorldCup.worldcupAPIurl + "matches?" +
      //"apikey=" + WorldCup.kimonoAPIkey +
      //"&limit=1000"
    //);
  //},

  //updatePlayerSeasonStats: function() {
    //console.log("Updating player season stats...\n");

    //var stats = WorldCup.getPlayerSeasonStats();
    //if (!(stats.data && stats.data.length)) {
      //throw "No data returned from API call.";
    //}

    //for (i = 0; i < stats.data.length; i++) {
      //var playerSeason = stats.data[i];
      //if (playerSeason.playerId) {
        //PlayerSeasonStats.upsert(
          //{playerId: playerSeason.playerId},
          //playerSeason
        //);
        //console.log("Updated player season stats for: " + playerSeason.playerId + "\n");
      //}
    //}
  //},

  //getPlayerSeasonStats: function() {
    //// grab all the clubs
    //return Meteor.http.get(
      //WorldCup.worldcupAPIurl + "player_season_stats?" +
      //"apikey=" + WorldCup.kimonoAPIkey +
      //"&includes=player,club&limit=1000"
    //);
  //},
//}


text:
using extensions::Extension;

// ChromeLauncherController::Item ----------------------------------------------

ChromeLauncherController::Item::Item()
    : item_type(TYPE_TABBED_BROWSER),
      controller(NULL) {
}

ChromeLauncherController::Item::~Item() {
}

// ChromeLauncherController ----------------------------------------------------

// static
ChromeLauncherController* ChromeLauncherController::instance_ = NULL;

ChromeLauncherController::ChromeLauncherController(Profile* profile,
                                                   ash::LauncherModel* model)
    : model_(model),
      profile_(profile),
      activation_client_(NULL) {
  if (!profile_) {
    // Use the original profile as on chromeos we may get a temporary off the
    // record profile.
    profile_ = ProfileManager::GetDefaultProfile()->GetOriginalProfile();
  }
  instance_ = this;
  model_->AddObserver(this);
  ShellWindowRegistry::Get(profile_)->AddObserver(this);
  app_tab_helper_.reset(new LauncherAppTabHelper(profile_));
  app_icon_loader_.reset(new LauncherAppIconLoader(profile_, this));

  notification_registrar_.Add(this,
                              chrome::NOTIFICATION_EXTENSION_LOADED,
                              content::Source<Profile>(profile_));
  notification_registrar_.Add(this,
                              chrome::NOTIFICATION_EXTENSION_UNLOADED,
                              content::Source<Profile>(profile_));
  pref_change_registrar_.Init(profile_->GetPrefs());
  pref_change_registrar_.Add(prefs::kPinnedLauncherApps, this);
  pref_change_registrar_.Add(prefs::kShelfAlignment, this);
  pref_change_registrar_.Add(prefs::kShelfAutoHideBehavior, this);
}

ChromeLauncherController::~ChromeLauncherController() {
  ShellWindowRegistry::Get(profile_)->RemoveObserver(this);
  model_->RemoveObserver(this);
  for (IDToItemMap::iterator i = id_to_item_map_.begin();
       i != id_to_item_map_.end(); ++i) {
    model_->RemoveItemAt(model_->ItemIndexByID(i->first));
  }
  if (instance_ == this)
    instance_ = NULL;
  if (activation_client_)
    activation_client_->RemoveObserver(this);

  for (WindowToIDMap::iterator i = window_to_id_map_.begin();
       i != window_to_id_map_.end(); ++i) {
    i->first->RemoveObserver(this);
  }

  if (ash::Shell::HasInstance())
    ash::Shell::GetInstance()->RemoveShellObserver(this);
}

void ChromeLauncherController::Init() {
  // TODO(xiyuan): Remove migration code and kUseDefaultPinnedApp after M20.
  // Migration cases:
  // - Users that unpin all apps:
  //   - have default pinned apps
  //   - kUseDefaultPinnedApps set to false
  //   Migrate them by setting an empty list for kPinnedLauncherApps.
  //
  // - Users that have customized pinned apps:
  //   - have non-default non-empty pinned apps list
  //   - kUseDefaultPinnedApps set to false
  //   Nothing needs to be done because customized pref overrides default.
  //
  // - Users that have default apps (i.e. new user or never pin/unpin):
  //   - have default pinned apps
  //   - kUseDefaultPinnedApps is still true
  //   Nothing needs to be done because they should get the default.
  if (profile_->GetPrefs()->FindPreference(
          prefs::kPinnedLauncherApps)->IsDefaultValue() &&
      !profile_->GetPrefs()->GetBoolean(prefs::kUseDefaultPinnedApps)) {
    ListPrefUpdate updater(profile_->GetPrefs(), prefs::kPinnedLauncherApps);
    updater.Get()->Clear();
  }

  UpdateAppLaunchersFromPref();

  // TODO(sky): update unit test so that this test isn't necessary.
  if (ash::Shell::HasInstance()) {
    SetShelfAutoHideBehaviorFromPrefs();
    SetShelfAlignmentFromPrefs();

    activation_client_ =
        aura::client::GetActivationClient(
            ash::Shell::GetInstance()->GetPrimaryRootWindow());
    activation_client_->AddObserver(this);

    ash::Shell::GetInstance()->AddShellObserver(this);
  }
}

ash::LauncherID ChromeLauncherController::CreateTabbedLauncherItem(
    BrowserLauncherItemController* controller,
    IncognitoState is_incognito,
    ash::LauncherItemStatus status) {
  ash::LauncherID id = model_->next_id();
  DCHECK(id_to_item_map_.find(id) == id_to_item_map_.end());
  id_to_item_map_[id].item_type = TYPE_TABBED_BROWSER;
  id_to_item_map_[id].controller = controller;

  ash::LauncherItem item;
  item.type = ash::TYPE_TABBED;
  item.is_incognito = (is_incognito == STATE_INCOGNITO);
  item.status = status;
  model_->Add(item);
  return id;
}

ash::LauncherID ChromeLauncherController::CreateAppLauncherItem(
    BrowserLauncherItemController* controller,
    const std::string& app_id,
    ash::LauncherItemStatus status) {
  return InsertAppLauncherItem(controller, app_id, status,
                               model_->item_count());
}

void ChromeLauncherController::SetItemStatus(ash::LauncherID id,
                                             ash::LauncherItemStatus status) {
  int index = model_->ItemIndexByID(id);
  DCHECK_GE(index, 0);
  ash::LauncherItem item = model_->items()[index];
  item.status = status;
  model_->Set(index, item);
}

void ChromeLauncherController::LauncherItemClosed(ash::LauncherID id) {
  DCHECK(id_to_item_map_.find(id) != id_to_item_map_.end());
  id_to_item_map_.erase(id);
  model_->RemoveItemAt(model_->ItemIndexByID(id));
}

void ChromeLauncherController::Unpin(ash::LauncherID id) {
  DCHECK(id_to_item_map_.find(id) != id_to_item_map_.end());
  DCHECK(!id_to_item_map_[id].controller);

  if (ShellWindowRegistry::Get(profile_)->GetShellWindowsForApp(
      id_to_item_map_[id].app_id).size() > 0) {
    int index = model_->ItemIndexByID(id);
    ash::LauncherItem item = model_->items()[index];
    item.type = ash::TYPE_PLATFORM_APP;
    model_->Set(index, item);
  } else {
    LauncherItemClosed(id);
  }
  if (CanPin())
    PersistPinnedState();
}

void ChromeLauncherController::Pin(ash::LauncherID id) {
  DCHECK(id_to_item_map_.find(id) != id_to_item_map_.end());
  DCHECK(!id_to_item_map_[id].controller);

  int index = model_->ItemIndexByID(id);
  ash::LauncherItem item = model_->items()[index];

  if (item.type != ash::TYPE_PLATFORM_APP)
    return;

  item.type = ash::TYPE_APP_SHORTCUT;
  model_->Set(index, item);

  if (CanPin())
    PersistPinnedState();
}

bool ChromeLauncherController::IsPinned(ash::LauncherID id) {
  int index = model_->ItemIndexByID(id);
  ash::LauncherItemType type = model_->items()[index].type;
  return type == ash::TYPE_APP_SHORTCUT;
}

void ChromeLauncherController::TogglePinned(ash::LauncherID id) {
  if (id_to_item_map_.find(id) == id_to_item_map_.end())
    return;  // May happen if item closed with menu open.

  if (IsPinned(id))
    Unpin(id);
  else
    Pin(id);
}

bool ChromeLauncherController::IsPinnable(ash::LauncherID id) const {
  int index = model_->ItemIndexByID(id);
  if (index == -1)
    return false;

  ash::LauncherItemType type = model_->items()[index].type;
  return ((type == ash::TYPE_APP_SHORTCUT || type == ash::TYPE_PLATFORM_APP) &&
          CanPin());
}

void ChromeLauncherController::Open(ash::LauncherID id, int event_flags) {
  if (id_to_item_map_.find(id) == id_to_item_map_.end())
    return;  // In case invoked from menu and item closed while menu up.

  BrowserLauncherItemController* controller = id_to_item_map_[id].controller;
  if (controller) {
    controller->window()->Show();
    ash::wm::ActivateWindow(controller->window());
  } else {
    DCHECK_EQ(TYPE_APP, id_to_item_map_[id].item_type);

    // Do nothing for pending app shortcut.
    if (GetItemStatus(id) == ash::STATUS_IS_PENDING)
      return;

    OpenAppID(id_to_item_map_[id].app_id, event_flags);
  }
}

void ChromeLauncherController::OpenAppID(
    const std::string& app_id,
    int event_flags) {
  ash::LauncherID launcher_id = GetLauncherIDForAppID(app_id);
  // Check if this item has any windows in the activation list.
  for (WindowList::const_iterator i = platform_app_windows_.begin();
       i != platform_app_windows_.end(); ++i) {
    if (window_to_id_map_[*i] == launcher_id) {
      (*i)->Show();
      ash::wm::ActivateWindow(*i);
      return;
    }
  }

  // Check if there are any open tabs for this app.
  AppIDToTabContentsListMap::iterator i =
      app_id_to_tab_contents_list_.find(app_id);

  if (i != app_id_to_tab_contents_list_.end()) {
    DCHECK(!i->second.empty());
    TabContents* tab = i->second.front();
    Browser* browser = browser::FindBrowserWithWebContents(
        tab->web_contents());
    TabStripModel* tab_strip = browser->tab_strip_model();
    int index = tab_strip->GetIndexOfTabContents(tab);
    DCHECK_NE(TabStripModel::kNoTab, index);
    tab_strip->ActivateTabAt(index, false);
    browser->window()->Show();
    ash::wm::ActivateWindow(browser->window()->GetNativeWindow());
  } else {
    const Extension* extension =
        profile_->GetExtensionService()->GetInstalledExtension(app_id);
    extension_utils::OpenExtension(GetProfileForNewWindows(),
                                   extension,
                                   event_flags);
  }
}

void ChromeLauncherController::Close(ash::LauncherID id) {
  if (id_to_item_map_.find(id) == id_to_item_map_.end())
    return;  // May happen if menu closed.

  if (!id_to_item_map_[id].controller)
    return;  // TODO: maybe should treat as unpin?

  views::Widget* widget = views::Widget::GetWidgetForNativeView(
      id_to_item_map_[id].controller->window());
  if (widget)
    widget->Close();
}

bool ChromeLauncherController::IsOpen(ash::LauncherID id) {
  return id_to_item_map_.find(id) != id_to_item_map_.end() &&
      id_to_item_map_[id].controller != NULL;
}

extensions::ExtensionPrefs::LaunchType ChromeLauncherController::GetLaunchType(
    ash::LauncherID id) {
  DCHECK(id_to_item_map_.find(id) != id_to_item_map_.end());

  return profile_->GetExtensionService()->extension_prefs()->GetLaunchType(
      id_to_item_map_[id].app_id, extensions::ExtensionPrefs::LAUNCH_DEFAULT);
}

std::string ChromeLauncherController::GetAppID(TabContents* tab) {
  return app_tab_helper_->GetAppID(tab);
}

ash::LauncherID ChromeLauncherController::GetLauncherIDForAppID(
    const std::string& app_id) {
  for (IDToItemMap::const_iterator i = id_to_item_map_.begin();
       i != id_to_item_map_.end(); ++i) {
    if (i->second.app_id == app_id)
      return i->first;
  }
  return 0;
}

void ChromeLauncherController::SetAppImage(const std::string& id,
                                           const gfx::ImageSkia& image) {
  // TODO: need to get this working for shortcuts.

  for (IDToItemMap::const_iterator i = id_to_item_map_.begin();
       i != id_to_item_map_.end(); ++i) {
    if (i->second.app_id != id)
      continue;

    // Panel items may share the same app_id as the app that created them,
    // but they set their icon image in
    // BrowserLauncherItemController::UpdateLauncher(), so do not set panel
    // images here.
    if (i->second.controller &&
        i->second.controller->type() ==
        BrowserLauncherItemController::TYPE_EXTENSION_PANEL) {
      continue;
    }

    int index = model_->ItemIndexByID(i->first);
    ash::LauncherItem item = model_->items()[index];
    item.image = image;
    model_->Set(index, item);
    // It's possible we're waiting on more than one item, so don't break.
  }
}

bool ChromeLauncherController::IsAppPinned(const std::string& app_id) {
  for (IDToItemMap::const_iterator i = id_to_item_map_.begin();
       i != id_to_item_map_.end(); ++i) {
    if (IsPinned(i->first) && i->second.app_id == app_id)
      return true;
  }
  return false;
}

void ChromeLauncherController::PinAppWithID(const std::string& app_id) {
  if (CanPin())
    DoPinAppWithID(app_id);
  else
    NOTREACHED();
}

void ChromeLauncherController::SetLaunchType(
    ash::LauncherID id,
    extensions::ExtensionPrefs::LaunchType launch_type) {
  if (id_to_item_map_.find(id) == id_to_item_map_.end())
    return;

  return profile_->GetExtensionService()->extension_prefs()->SetLaunchType(
      id_to_item_map_[id].app_id, launch_type);
}

void ChromeLauncherController::UnpinAppsWithID(const std::string& app_id) {
  if (CanPin())
    DoUnpinAppsWithID(app_id);
  else
    NOTREACHED();
}

bool ChromeLauncherController::IsLoggedInAsGuest() {
  return ProfileManager::GetDefaultProfileOrOffTheRecord()->IsOffTheRecord();
}

void ChromeLauncherController::CreateNewIncognitoWindow() {
  chrome::NewEmptyWindow(GetProfileForNewWindows()->GetOffTheRecordProfile());
}

bool ChromeLauncherController::CanPin() const {
  const PrefService::Preference* pref =
      profile_->GetPrefs()->FindPreference(prefs::kPinnedLauncherApps);
  return pref && pref->IsUserModifiable();
}

void ChromeLauncherController::SetAutoHideBehavior(
    ash::ShelfAutoHideBehavior behavior) {
  ash::Shell::GetInstance()->SetShelfAutoHideBehavior(behavior);
  const char* value = NULL;
  switch (behavior) {
    case ash::SHELF_AUTO_HIDE_BEHAVIOR_DEFAULT:
      value = ash::kShelfAutoHideBehaviorDefault;
      break;
    case ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS:
      value = ash::kShelfAutoHideBehaviorAlways;
      break;
    case ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER:
      value = ash::kShelfAutoHideBehaviorNever;
      break;
  }
  profile_->GetPrefs()->SetString(prefs::kShelfAutoHideBehavior, value);
}

void ChromeLauncherController::RemoveTabFromRunningApp(
    TabContents* tab,
    const std::string& app_id) {
  tab_contents_to_app_id_.erase(tab);
  AppIDToTabContentsListMap::iterator i_app_id =
      app_id_to_tab_contents_list_.find(app_id);
  if (i_app_id != app_id_to_tab_contents_list_.end()) {
    TabContentsList* tab_list = &i_app_id->second;
    tab_list->remove(tab);
    if (tab_list->empty()) {
      app_id_to_tab_contents_list_.erase(i_app_id);
      i_app_id = app_id_to_tab_contents_list_.end();
      ash::LauncherID id = GetLauncherIDForAppID(app_id);
      if (id > 0)
        SetItemStatus(id, ash::STATUS_CLOSED);
    }
  }
}

void ChromeLauncherController::UpdateAppState(TabContents* tab,
                                              AppState app_state) {
  std::string app_id = GetAppID(tab);

  // Check the old |app_id| for a tab. If the contents has changed we need to
  // remove it from the previous app.
  if (tab_contents_to_app_id_.find(tab) != tab_contents_to_app_id_.end()) {
    std::string last_app_id = tab_contents_to_app_id_[tab];
    if (last_app_id != app_id)
      RemoveTabFromRunningApp(tab, last_app_id);
  }

  if (app_id.empty())
    return;

  tab_contents_to_app_id_[tab] = app_id;

  if (app_state == APP_STATE_REMOVED) {
    // The tab has gone away.
    RemoveTabFromRunningApp(tab, app_id);
  } else {
    TabContentsList& tab_list(app_id_to_tab_contents_list_[app_id]);
    if (app_state == APP_STATE_INACTIVE) {
      TabContentsList::const_iterator i_tab =
          std::find(tab_list.begin(), tab_list.end(), tab);
      if (i_tab == tab_list.end())
        tab_list.push_back(tab);
    } else {
      tab_list.remove(tab);
      tab_list.push_front(tab);
    }
    ash::LauncherID id = GetLauncherIDForAppID(app_id);
    if (id > 0) {
      // If the window is active, mark the app as active.
      SetItemStatus(id, app_state == APP_STATE_WINDOW_ACTIVE ?
          ash::STATUS_ACTIVE : ash::STATUS_RUNNING);
    }
  }
}

void ChromeLauncherController::CreateNewTab() {
  Browser* last_browser = browser::FindTabbedBrowser(
      GetProfileForNewWindows(), true);

  if (!last_browser) {
    CreateNewWindow();
    return;
  }

  chrome::NewTab(last_browser);
  aura::Window* window = last_browser->window()->GetNativeWindow();
  window->Show();
  ash::wm::ActivateWindow(window);
}

void ChromeLauncherController::CreateNewWindow() {
  chrome::NewEmptyWindow(GetProfileForNewWindows());
}

void ChromeLauncherController::ItemClicked(const ash::LauncherItem& item,
                                           int event_flags) {
  DCHECK(id_to_item_map_.find(item.id) != id_to_item_map_.end());
  BrowserLauncherItemController* controller =
      id_to_item_map_[item.id].controller;
  if (controller) {
    views::Widget* widget =
        views::Widget::GetWidgetForNativeView(controller->window());
    if (widget && widget->IsActive()) {
      widget->Minimize();
      return;
    }
    // else case, fall through to show window.
  }
  Open(item.id, event_flags);
}

int ChromeLauncherController::GetBrowserShortcutResourceId() {
  return IDR_PRODUCT_LOGO_32;
}

string16 ChromeLauncherController::GetTitle(const ash::LauncherItem& item) {
  DCHECK(id_to_item_map_.find(item.id) != id_to_item_map_.end());
  BrowserLauncherItemController* controller =
      id_to_item_map_[item.id].controller;
  if (controller) {
    if (id_to_item_map_[item.id].item_type == TYPE_TABBED_BROWSER) {
      return controller->tab_model()->GetActiveTabContents() ?
          controller->tab_model()->GetActiveTabContents()->web_contents()->
          GetTitle() : string16();
    }
    // Fall through to get title from extension.
  }
  const Extension* extension = profile_->GetExtensionService()->
      GetInstalledExtension(id_to_item_map_[item.id].app_id);
  return extension ? UTF8ToUTF16(extension->name()) : string16();
}

ui::MenuModel* ChromeLauncherController::CreateContextMenu(
    const ash::LauncherItem& item) {
  return new LauncherContextMenu(this, &item);
}

ui::MenuModel* ChromeLauncherController::CreateContextMenuForLauncher() {
  return new LauncherContextMenu(this, NULL);
}

ash::LauncherID ChromeLauncherController::GetIDByWindow(
    aura::Window* window) {
  for (IDToItemMap::const_iterator i = id_to_item_map_.begin();
       i != id_to_item_map_.end(); ++i) {
    if (i->second.controller && i->second.controller->window() == window)
      return i->first;
  }
  return 0;
}

bool ChromeLauncherController::IsDraggable(const ash::LauncherItem& item) {
  return item.type == ash::TYPE_APP_SHORTCUT ? CanPin() : true;
}

void ChromeLauncherController::LauncherItemAdded(int index) {
}

void ChromeLauncherController::LauncherItemRemoved(int index,
                                                   ash::LauncherID id) {
}

void ChromeLauncherController::LauncherItemMoved(
    int start_index,
    int target_index) {
  ash::LauncherID id = model_->items()[target_index].id;
  if (id_to_item_map_.find(id) != id_to_item_map_.end() && IsPinned(id))
    PersistPinnedState();
}

void ChromeLauncherController::LauncherItemChanged(
    int index,
    const ash::LauncherItem& old_item) {
  if (model_->items()[index].status == ash::STATUS_ACTIVE &&
      old_item.status == ash::STATUS_RUNNING) {
    ash::LauncherID id = model_->items()[index].id;
    if (id_to_item_map_[id].controller) {
      aura::Window* window_to_activate =
          id_to_item_map_[id].controller->window();
      if (window_to_activate && ash::wm::IsActiveWindow(window_to_activate))
        return;
      window_to_activate->Show();
      ash::wm::ActivateWindow(window_to_activate);
    }
  }
}

void ChromeLauncherController::Observe(
    int type,
    const content::NotificationSource& source,
    const content::NotificationDetails& details) {
  switch (type) {
    case chrome::NOTIFICATION_EXTENSION_LOADED: {
      UpdateAppLaunchersFromPref();
      break;
    }
    case chrome::NOTIFICATION_EXTENSION_UNLOADED: {
      const content::Details<extensions::UnloadedExtensionInfo> unload_info(
          details);
      const Extension* extension = unload_info->extension;
      if (IsAppPinned(extension->id())) {
        if (unload_info->reason == extension_misc::UNLOAD_REASON_UPDATE)
          MarkAppPending(extension->id());
        else
          DoUnpinAppsWithID(extension->id());
      }
      break;
    }
    case chrome::NOTIFICATION_PREF_CHANGED: {
      const std::string& pref_name(
          *content::Details<std::string>(details).ptr());
      if (pref_name == prefs::kPinnedLauncherApps)
        UpdateAppLaunchersFromPref();
      else if (pref_name == prefs::kShelfAlignment)
        SetShelfAlignmentFromPrefs();
      else if (pref_name == prefs::kShelfAutoHideBehavior)
        SetShelfAutoHideBehaviorFromPrefs();
      else
        NOTREACHED() << "Unexpected pref change for " << pref_name;
      break;
    }
    default:
      NOTREACHED() << "Unexpected notification type=" << type;
  }
}

void ChromeLauncherController::OnShellWindowAdded(ShellWindow* shell_window) {
  aura::Window* window = shell_window->GetNativeWindow();
  ash::LauncherItemStatus status = ash::wm::IsActiveWindow(window) ?
      ash::STATUS_ACTIVE : ash::STATUS_RUNNING;
  window->AddObserver(this);
  const std::string app_id = shell_window->extension()->id();
  ash::LauncherID id = 0;
  for (IDToItemMap::const_iterator i = id_to_item_map_.begin();
       i != id_to_item_map_.end(); ++i) {
    if (i->second.app_id == app_id) {
      id = i->first;
      SetItemStatus(id, status);
      break;
    }
  }
  if (id == 0)
    id = CreateAppLauncherItem(NULL, app_id, status);
  window_to_id_map_[window] = id;
  if (status == ash::STATUS_ACTIVE)
    platform_app_windows_.push_front(window);
  else
    platform_app_windows_.push_back(window);
}

void ChromeLauncherController::OnShellWindowRemoved(ShellWindow* shell_window) {
  // Window removal is handled in OnWindowRemovingFromRootWindow() below.
}

void ChromeLauncherController::OnWindowActivated(aura::Window* active,
                                                 aura::Window* old_active) {
  if (window_to_id_map_.find(active) != window_to_id_map_.end()) {
    ash::LauncherID active_id = window_to_id_map_[active];
    platform_app_windows_.remove(active);
    platform_app_windows_.push_front(active);
    if (window_to_id_map_.find(old_active) != window_to_id_map_.end() &&
        window_to_id_map_[old_active] == active_id) {
      // Old and new windows are for the same item. Don't change the status.
      return;
    }
    SetItemStatus(active_id, ash::STATUS_ACTIVE);
  }
  if (window_to_id_map_.find(old_active) != window_to_id_map_.end())
    SetItemStatus(window_to_id_map_[old_active], ash::STATUS_RUNNING);
}

void ChromeLauncherController::OnWindowRemovingFromRootWindow(
    aura::Window* window) {
  window->RemoveObserver(this);
  DCHECK(window_to_id_map_.find(window) != window_to_id_map_.end());
  ash::LauncherID id = window_to_id_map_[window];
  window_to_id_map_.erase(window);

  DCHECK(id_to_item_map_.find(id) != id_to_item_map_.end());
  platform_app_windows_.remove(window);
  ShellWindowRegistry::ShellWindowSet remaining_windows =
      ShellWindowRegistry::Get(profile_)->GetShellWindowsForApp(
      id_to_item_map_[id].app_id);

  // We can't count on getting called before or after the ShellWindowRegistry.
  if (remaining_windows.size() > 1 ||
      (remaining_windows.size() == 1 &&
          (*remaining_windows.begin())->GetNativeWindow() != window)) {
    return;
  }

  // Close or remove item.
  int index = model_->ItemIndexByID(id);
  DCHECK_GE(index, 0);
  ash::LauncherItem item = model_->items()[index];
  if (item.type == ash::TYPE_APP_SHORTCUT)
    SetItemStatus(id, ash::STATUS_CLOSED);
  else
    LauncherItemClosed(id);
}

void ChromeLauncherController::OnShelfAlignmentChanged() {
  const char* pref_value = NULL;
  switch (ash::Shell::GetInstance()->GetShelfAlignment()) {
    case ash::SHELF_ALIGNMENT_BOTTOM:
      pref_value = ash::kShelfAlignmentBottom;
      break;
    case ash::SHELF_ALIGNMENT_LEFT:
      pref_value = ash::kShelfAlignmentLeft;
      break;
    case ash::SHELF_ALIGNMENT_RIGHT:
      pref_value = ash::kShelfAlignmentRight;
      break;
  }
  profile_->GetPrefs()->SetString(prefs::kShelfAlignment, pref_value);
}

void ChromeLauncherController::PersistPinnedState() {
  // It is a coding error to call PersistPinnedState() if the pinned apps are
  // not user-editable. The code should check earlier and not perform any
  // modification actions that trigger persisting the state.
  if (!CanPin()) {
    NOTREACHED() << "Can't pin but pinned state being updated";
    return;
  }

  // Set kUseDefaultPinnedApps to false and use pinned apps list from prefs
  // from now on.
  profile_->GetPrefs()->SetBoolean(prefs::kUseDefaultPinnedApps, false);

  // Mutating kPinnedLauncherApps is going to notify us and trigger us to
  // process the change. We don't want that to happen so remove ourselves as a
  // listener.
  pref_change_registrar_.Remove(prefs::kPinnedLauncherApps, this);
  {
    ListPrefUpdate updater(profile_->GetPrefs(), prefs::kPinnedLauncherApps);
    updater->Clear();
    for (size_t i = 0; i < model_->items().size(); ++i) {
      if (model_->items()[i].type == ash::TYPE_APP_SHORTCUT) {
        ash::LauncherID id = model_->items()[i].id;
        if (id_to_item_map_.find(id) != id_to_item_map_.end() &&
            IsPinned(id)) {
          base::DictionaryValue* app_value = ash::CreateAppDict(
              id_to_item_map_[id].app_id);
          if (app_value)
            updater->Append(app_value);
        }
      }
    }
  }
  pref_change_registrar_.Add(prefs::kPinnedLauncherApps, this);
}

void ChromeLauncherController::SetAppTabHelperForTest(AppTabHelper* helper) {
  app_tab_helper_.reset(helper);
}

void ChromeLauncherController::SetAppIconLoaderForTest(AppIconLoader* loader) {
  app_icon_loader_.reset(loader);
}

Profile* ChromeLauncherController::GetProfileForNewWindows() {
  return ProfileManager::GetDefaultProfileOrOffTheRecord();
}

ash::LauncherItemStatus ChromeLauncherController::GetItemStatus(
    ash::LauncherID id) const {
  int index = model_->ItemIndexByID(id);
  DCHECK_GE(index, 0);
  const ash::LauncherItem& item = model_->items()[index];
  return item.status;
}

void ChromeLauncherController::MarkAppPending(const std::string& app_id) {
  for (IDToItemMap::const_iterator i = id_to_item_map_.begin();
       i != id_to_item_map_.end(); ++i) {
    if (i->second.item_type == TYPE_APP && i->second.app_id == app_id) {
      if (GetItemStatus(i->first) == ash::STATUS_CLOSED)
        SetItemStatus(i->first, ash::STATUS_IS_PENDING);

      break;
    }
  }
}

void ChromeLauncherController::DoPinAppWithID(const std::string& app_id) {
  // If there is an item, do nothing and return.
  if (IsAppPinned(app_id))
    return;

  // Otherwise, create an item for it.
  CreateAppLauncherItem(NULL, app_id, ash::STATUS_CLOSED);
  if (CanPin())
    PersistPinnedState();
}

void ChromeLauncherController::DoUnpinAppsWithID(const std::string& app_id) {
  for (IDToItemMap::iterator i = id_to_item_map_.begin();
       i != id_to_item_map_.end(); ) {
    IDToItemMap::iterator current(i);
    ++i;
    if (current->second.app_id == app_id && IsPinned(current->first))
      Unpin(current->first);
  }
}

void ChromeLauncherController::UpdateAppLaunchersFromPref() {
  // Construct a vector representation of to-be-pinned apps from the pref.
  std::vector<std::string> pinned_apps;
  const base::ListValue* pinned_apps_pref =
      profile_->GetPrefs()->GetList(prefs::kPinnedLauncherApps);
  for (base::ListValue::const_iterator it(pinned_apps_pref->begin());
       it != pinned_apps_pref->end(); ++it) {
    DictionaryValue* app = NULL;
    std::string app_id;
    if ((*it)->GetAsDictionary(&app) &&
        app->GetString(ash::kPinnedAppsPrefAppIDPath, &app_id) &&
        std::find(pinned_apps.begin(), pinned_apps.end(), app_id) ==
            pinned_apps.end() &&
        app_tab_helper_->IsValidID(app_id)) {
      pinned_apps.push_back(app_id);
    }
  }

  // Walk the model and |pinned_apps| from the pref lockstep, adding and
  // removing items as necessary. NB: This code uses plain old indexing instead
  // of iterators because of model mutations as part of the loop.
  std::vector<std::string>::const_iterator pref_app_id(pinned_apps.begin());
  int index = 0;
  for (; index < model_->item_count() && pref_app_id != pinned_apps.end();
       ++index) {
    // If the next app launcher according to the pref is present in the model,
    // delete all app launcher entries in between.
    if (IsAppPinned(*pref_app_id)) {
      for (; index < model_->item_count(); ++index) {
        const ash::LauncherItem& item(model_->items()[index]);
        if (item.type != ash::TYPE_APP_SHORTCUT)
          continue;

        IDToItemMap::const_iterator entry(id_to_item_map_.find(item.id));
        if (entry != id_to_item_map_.end() &&
            entry->second.app_id == *pref_app_id) {
          // Current item will be kept. Reset its pending state and ensure
          // its icon is loaded since it has to be valid to be in |pinned_apps|.
          if (item.status == ash::STATUS_IS_PENDING) {
            SetItemStatus(item.id, ash::STATUS_CLOSED);
            app_icon_loader_->FetchImage(*pref_app_id);
          }

          ++pref_app_id;
          break;
        } else {
          LauncherItemClosed(item.id);
          --index;
        }
      }
      // If the item wasn't found, that means id_to_item_map_ is out of sync.
      DCHECK(index < model_->item_count());
    } else {
      // This app wasn't pinned before, insert a new entry.
      ash::LauncherID id = InsertAppLauncherItem(NULL, *pref_app_id,
                                                 ash::STATUS_CLOSED, index);
      index = model_->ItemIndexByID(id);
      ++pref_app_id;
    }
  }

  // Remove any trailing existing items.
  while (index < model_->item_count()) {
    const ash::LauncherItem& item(model_->items()[index]);
    if (item.type == ash::TYPE_APP_SHORTCUT)
      LauncherItemClosed(item.id);
    else
      ++index;
  }

  // Append unprocessed items from the pref to the end of the model.
  for (; pref_app_id != pinned_apps.end(); ++pref_app_id)
    CreateAppLauncherItem(NULL, *pref_app_id, ash::STATUS_CLOSED);
}

void ChromeLauncherController::SetShelfAutoHideBehaviorFromPrefs() {
  const std::string behavior_value(
      profile_->GetPrefs()->GetString(prefs::kShelfAutoHideBehavior));
  ash::ShelfAutoHideBehavior behavior =
      ash::SHELF_AUTO_HIDE_BEHAVIOR_DEFAULT;
  if (behavior_value == ash::kShelfAutoHideBehaviorNever)
    behavior = ash::SHELF_AUTO_HIDE_BEHAVIOR_NEVER;
  else if (behavior_value == ash::kShelfAutoHideBehaviorAlways)
    behavior = ash::SHELF_AUTO_HIDE_BEHAVIOR_ALWAYS;
  ash::Shell::GetInstance()->SetShelfAutoHideBehavior(behavior);
}

void ChromeLauncherController::SetShelfAlignmentFromPrefs() {
  if (!CommandLine::ForCurrentProcess()->HasSwitch(
          switches::kShowLauncherAlignmentMenu))
    return;

  const std::string alignment_value(
      profile_->GetPrefs()->GetString(prefs::kShelfAlignment));
  ash::ShelfAlignment alignment = ash::SHELF_ALIGNMENT_BOTTOM;
  if (alignment_value == ash::kShelfAlignmentLeft)
    alignment = ash::SHELF_ALIGNMENT_LEFT;
  else if (alignment_value == ash::kShelfAlignmentRight)
    alignment = ash::SHELF_ALIGNMENT_RIGHT;
  ash::Shell::GetInstance()->SetShelfAlignment(alignment);
}

TabContents* ChromeLauncherController::GetLastActiveTabContents(
    const std::string& app_id) {
  AppIDToTabContentsListMap::const_iterator i =
      app_id_to_tab_contents_list_.find(app_id);
  if (i == app_id_to_tab_contents_list_.end())
    return NULL;
  DCHECK_GT(i->second.size(), 0u);
  return *i->second.begin();
}

ash::LauncherID ChromeLauncherController::InsertAppLauncherItem(
    BrowserLauncherItemController* controller,
    const std::string& app_id,
    ash::LauncherItemStatus status,
    int index) {
  ash::LauncherID id = model_->next_id();
  DCHECK(id_to_item_map_.find(id) == id_to_item_map_.end());
  id_to_item_map_[id].item_type = TYPE_APP;
  id_to_item_map_[id].app_id = app_id;
  id_to_item_map_[id].controller = controller;

  ash::LauncherItem item;
  if (!controller) {
    if (status == ash::STATUS_CLOSED)
      item.type = ash::TYPE_APP_SHORTCUT;
    else
      item.type = ash::TYPE_PLATFORM_APP;
  } else if (controller->type() ==
             BrowserLauncherItemController::TYPE_APP_PANEL ||
             controller->type() ==
             BrowserLauncherItemController::TYPE_EXTENSION_PANEL) {
    item.type = ash::TYPE_APP_PANEL;
  } else {
    item.type = ash::TYPE_TABBED;
  }
  item.is_incognito = false;
  item.image = Extension::GetDefaultIcon(true);
  if (item.type == ash::TYPE_APP_SHORTCUT &&
      !app_tab_helper_->IsValidID(app_id)) {
    item.status = ash::STATUS_IS_PENDING;
  } else {
    TabContents* active_tab = GetLastActiveTabContents(app_id);
    if (active_tab) {
      Browser* browser = browser::FindBrowserWithWebContents(
          active_tab->web_contents());
      DCHECK(browser);
      if (browser->window()->IsActive())
        status = ash::STATUS_ACTIVE;
      else
        status = ash::STATUS_RUNNING;
    }
    item.status = status;
  }
  model_->AddAt(index, item);

  if (!controller || controller->type() !=
      BrowserLauncherItemController::TYPE_EXTENSION_PANEL) {
    if (item.status != ash::STATUS_IS_PENDING)
      app_icon_loader_->FetchImage(app_id);
  }
  return id;
}


text:
import {Injectable} from '@angular/core';
import {
    IOAutoCompleteComponent,
    IOCheckboxComponent,
    IODatePickerComponent,
    IODefaultComponent,
    IOSelectComponent
} from '@ngcms/inputs';
import {INgInput} from '@ngcms/form';

@Injectable()
export class InputsFactory {

    private types: { [name: string]: any } = {
        number: {component: IODefaultComponent, params: {type: 'number'}},
        string: {component: IODefaultComponent, params: {type: 'text'}},
        boolean: {component: IOCheckboxComponent, value: false},
        date: {component: IODatePickerComponent},
        select: {component: IOSelectComponent},
        model: {component: IOAutoCompleteComponent},
        models: {component: IOAutoCompleteComponent, params: {multiple: true}},
        // html: {component: IOTinymceComponent},
        // file: {component: IOMediaComponent},
    };

    createInput(typeName: string, name: string, params: any = {}): INgInput {

        const type: any = this.types.hasOwnProperty(typeName)
            ? this.types[typeName]
            : {};

        return {
            name: name,
            value: type.value ? type.value : null,
            component: type.component ? type.component : IODefaultComponent,
            params: type.params ? Object.assign({}, type.params, params) : params
        };
    }
}


text:
#include "scheduler/thread_local_scheduler.hpp"

namespace m3bp {

ThreadLocalScheduler::ThreadLocalScheduler()
	: m_stealable_tasks()
	, m_unstealable_tasks()
{ }

void ThreadLocalScheduler::push_stealable_task(PhysicalTaskPtr task){
	m_stealable_tasks.push_front(std::move(task));
}
void ThreadLocalScheduler::push_unstealable_task(PhysicalTaskPtr task){
	m_unstealable_tasks.push_front(std::move(task));
}

ThreadLocalScheduler::PhysicalTaskPtr
ThreadLocalScheduler::pop_stealable_task(){
	return m_stealable_tasks.pop_front();
}
ThreadLocalScheduler::PhysicalTaskPtr
ThreadLocalScheduler::pop_unstealable_task(){
	return m_unstealable_tasks.pop_front();
}

ThreadLocalScheduler::PhysicalTaskPtr
ThreadLocalScheduler::steal_task(){
	return m_stealable_tasks.pop_back();
}

}


text:
[![Build Status][ci-image]][ci-url]
[![Coverage Status][cov-img]][cov-url]
[![WinCI status][win-ci-img]][win-ci-url]
[![Dependencies][dep-img]][dep-url]

# maxmind-geolite-mirror

Mirror maxmind GeoIP databases from geolite.maxmind.com. Geolite version 1 and version 2 databases are mirrored.

## Install

    npm install -g maxmind-geolite-mirror
    mkdir -p /usr/local/share/GeoIP
    /usr/local/bin/maxmind-geolite-mirror

The last command will download all the databases to the GeoIP share directory.

## Update databases

    /usr/local/bin/maxmind-geolite-mirror

Set this to run once a week or so. Downloads will only happen if the remote
file is newer than the local version.

## Custom path to store maxmind database

If access to /usr/local/share/GeoIP is unavailable, the following environment
variable is available: MAXMIND_DB_DIR. E.g.

    export MAXMIND_DB_DIR=/home/example/maxmind-db

## Contributions

Contributions are welcome, especially if they include tests. See [DEVELOP.md](DEVELOP.md)

### Contributors

- Carl Banbury

### badges

[![NPM][npm-image]][npm-url]

[ci-image]: https://travis-ci.org/msimerson/maxmind-geolite-mirror.svg
[ci-url]:  https://travis-ci.org/msimerson/maxmind-geolite-mirror
[dep-img]: https://david-dm.org/msimerson/maxmind-geolite-mirror.svg
[dep-url]: https://david-dm.org/msimerson/maxmind-geolite-mirror
[cov-img]: https://codecov.io/github/msimerson/maxmind-geolite-mirror/coverage.svg?branch=master
[cov-url]: https://codecov.io/github/msimerson/maxmind-geolite-mirror?branch=master
[npm-image]: https://nodei.co/npm/maxmind-geolite-mirror.png?downloads=true&stars=true
[npm-url]: https://nodei.co/npm/maxmind-geolite-mirror/
[win-ci-img]: https://ci.appveyor.com/api/projects/status/1e2vtbq1ekfvvwl7/branch/master?svg=true
[win-ci-url]: https://ci.appveyor.com/project/msimerson/maxmind-geolite-mirror/branch/master


text:
package de.greenrobot.dao.identityscope;

public final class IdentityScopeType extends Enum
{

    private static final IdentityScopeType $VALUES[];
    public static final IdentityScopeType None;
    public static final IdentityScopeType Session;

    private IdentityScopeType(String s, int i)
    {
        super(s, i);
    }

    public static IdentityScopeType valueOf(String s)
    {
        return (IdentityScopeType)Enum.valueOf(de/greenrobot/dao/identityscope/IdentityScopeType, s);
    }

    public static IdentityScopeType[] values()
    {
        return (IdentityScopeType[])$VALUES.clone();
    }

    static
    {
        Session = new IdentityScopeType("Session", 0);
        None = new IdentityScopeType("None", 1);
        IdentityScopeType aidentityscopetype[] = new IdentityScopeType[2];
        aidentityscopetype[0] = Session;
        aidentityscopetype[1] = None;
        $VALUES = aidentityscopetype;
    }
}


text:
package org.opensaml.xml.signature.validator;

import org.opensaml.xml.BaseXMLObjectValidatorTestCase;
import org.opensaml.xml.signature.CryptoBinary;

/**
 * Tests CryptoBinaryValidator.
 */
public class CryptoBinarySchemaValidatorTest extends BaseXMLObjectValidatorTestCase {

    /**
     * Constructor.
     *
     */
    public CryptoBinarySchemaValidatorTest() {
        targetQName = CryptoBinary.TYPE_NAME;
        validator = new CryptoBinarySchemaValidator();
    }

    /** {@inheritDoc} */
    protected void populateRequiredData() {
        super.populateRequiredData();
        CryptoBinary cryptoBinary = (CryptoBinary) target;
        cryptoBinary.setValue("ABCDabcd");
    }

    /**
     *  Test empty content.
     */
    public void testEmpty() {
        CryptoBinary cryptoBinary = (CryptoBinary) target;

        cryptoBinary.setValue(null);
        assertValidationFail("Content was null, should raise a Validation Exception");

        cryptoBinary.setValue("");
        assertValidationFail("Content was empty, should raise a Validation Exception");

        cryptoBinary.setValue("   ");
        assertValidationFail("Content was all whitespace, should raise a Validation Exception");
    }
}


text:
@charset "utf-8";

body .admin .panel .right-group-list li
{
    padding-left: 40px;
    background-repeat: no-repeat;
    background-position: 10px 50%;
    background-image: url("/images/common/icons/plus.png");
}

body .admin .panel .right-group-list li.selected
{
    background-image: url("/images/common/icons/minus.png");
}

body .admin .page .grant-rights
{
    font-size: smaller;
    margin: -19px -15px 0px -15px;
}

body .admin .page .grant-rights .right-group h4
{
    color: #000000;
    background: #f4f4f4;
    border-color: #d3d4d9;
    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0, #ffffff), color-stop(1, #e8e8e8));
    background-image: -webkit-linear-gradient(top, #ffffff 0%, #e8e8e8 100%);
    background-image: -moz-linear-gradient(top, #ffffff 0%, #e8e8e8 100%);
    background-image: -ms-linear-gradient(top, #ffffff 0%, #e8e8e8 100%);
    background-image: -o-linear-gradient(top, #ffffff 0%, #e8e8e8 100%);
    background-image: linear-gradient(to bottom, #ffffff 0%, #e8e8e8 100%);
}

.js-browser-gradient-filter .admin .page .grant-rights .right-group h4
{
    zoom: 1;
    -ms-filter: "progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#FFFFFF',EndColorStr='#E8E8E8')";
    filter: progid:DXImageTransform.Microsoft.Gradient(GradientType=0,StartColorStr='#FFFFFF',EndColorStr='#E8E8E8');
}

body .admin .page .grant-rights .right-group h4.ui-state-active
{
    color: #ffffff;
    background: #424242;
    border-color: #424242;
    -ms-filter: none;
    filter: none;
}

body .admin .page .grant-rights .right-group h4.ui-state-hover
{
    color: #ffffff;
    background: #4d7cee;
    border-color: #4d7cee;
    -ms-filter: none;
    filter: none;
}

body .admin .page .grant-rights .right-group h4 .ui-icon.ui-icon-carat-1-n
{
    background-position: 50% 50%;
    background-image: url("/images/common/icons/carat-up.png");
}

body .admin .page .grant-rights .right-group h4 .ui-icon.ui-icon-carat-1-s
{
    background-position: 50% 50%;
    background-image: url("/images/common/icons/carat-down.png");
}

body .admin .page .grant-rights .right-group dl
{
    margin: 0px;
    border: 0px none;
    padding: 0px 0px 10px 0px;
}

body .admin .page .grant-rights .right-group dl dt
{
    margin: 10px 50px;
    font-weight: bold;
}

body .admin .page .grant-rights .right-group dl dt.label
{
    padding: 5px;
    background: #e8e8e8;
}

body .admin .page .grant-rights .right-group dl dt.check-all
{
    margin: 10px 20px 20px 20px;
}

body .admin .page .grant-rights .right-group dl dd
{
    margin: 0px 80px;
}

body .admin .page .grant-rights .right-group dl dt,
body .admin .page .grant-rights .right-group dl dd
{
    float: none;
    width: auto;
    text-align: left;
}

body .admin .page .grant-rights .right-group dl dd.input label
{
    margin: 0px;
    padding: 3px;
    border-top: 1px solid #e8e8e8;
}

body .admin .page .grant-rights .right-group dl dd.input label:first-child
{
    border-top: none;
}

body .admin .page .grant-rights .right-group dl dd.inherited-from
{
    float: right;
    font-weight: bold;
    text-align: center;
    margin: -35px 100px 0px 0px;
}

body .admin .page .grant-rights .right-group dl dd.inherited-from .group
{
    color: #507ffe;
    font-style: italic;
}

body .admin .page .grant-rights .right-group dl dd label.inherited:before
{
    float: right;
    margin-right: 70px;
    content: url("/images/common/checkbox.png");
}

body .admin .page .grant-rights ~ .submits
{
    margin: 0px;
    padding: 10px 0px 0px 0px;
}

body .admin .page .grant-rights ~ .submits .save
{
    float: right;
}


text:
using namespace std;

class Individuo {
    private:
        int numGens;
        int rFitness;
        int posInPoblation;
        vector<int> cromosoma;
    public:
        Individuo();
        Individuo(int numGens);
        Individuo(int numGens, int postPobl, int vFitness);
        Individuo(vector<int> gens);
        vector<int> getCromosoma();
        void setCromosoma(vector<int> gens);
        int getNumGens();
        void printCromosoma();
        void eraseCromosoma();
        int getFitness();
        void setFitness(int valueF);
        int getPosInPoblation();
        void setPosInPoblation(int valuesPos);
};

#endif //P2_INDIVIDUO_H


text:
o2.systemModel = {};

o2.systemModel.deleteField = function(link, fieldName) {
  if (confirm( o2.lang.getString("System.Model.confirmDeleteField", {fieldName : fieldName}) )) {
    document.location.href = link.getAttribute("href");
  }
}

o2.systemModel.deleteBaseClass = function(link) {
  if (confirm( o2.lang.getString("System.Model.confirmDeleteBaseClass") )) {
    document.location.href = link.getAttribute("href");
  }
}

o2.systemModel.deleteClass = function(link) {
  if (confirm( o2.lang.getString("System.Model.confirmDeleteClass") )) {
    var href = link.getAttribute("href");
    if (confirm( o2.lang.getString("System.Model.confirmDeleteDatabaseTable") )) {
      href += "&deleteDbTable=1";
    }
    if (confirm( o2.lang.getString("System.Model.confirmDeleteObjects") )) {
      href += "&deleteObjects=1";
    }
    document.location.href = href;
  }
}

o2.systemModel.toggleDisplay = function(elm, visibleDisplayType) {
  elm.style.display = elm.style.display === visibleDisplayType  ?  "none"  :  visibleDisplayType;
}


text:
package org.jboss.aerogear.unifiedpush.message.windows;

/**
 * The type of message to send toast, raw, badge or tile.
 * From more info about the types
 */
public enum Type {
    badge,
    raw,
    tile,
    toast
}


text:
<script>
'use strict';
var PageBehaviors = PageBehaviors || {}; // namespace

/*
 * This behaviour helps to manage a page's button and event listeners lifecycle.
 *
 * When opening a page event listeners can be added on demand using
 * this._attachTempListener(element, event, function)
 *
 * When closing all added page listeners can be removed using
 * this._deattachTempListeners()
 *
 */

PageBehaviors.ButtonListeners = {

	properties: {
		_tempListeners: {
      		type: Array,
      		value: []
    	},
    	_isActivated: {
      		type: Boolean,
      		value: false
    	},
    	_dontHideIds: {
    		type: Array,
    		value: ["mainToolbar"]
    	}
	},

	activateButtons : function(buttonArray, buttonFunctionArray) {
		if(!this._isActivated && buttonArray.length===buttonFunctionArray.length) {
			console.log(this.localName + " activate toolbar buttons");
			var button, func;
			var i = buttonArray.length;
			while(i--) {
				button = buttonArray[i];
				func = buttonFunctionArray[i];
				if(button && func) {
					if(!button.classList.contains("concealed")) {
						button.removeAttribute("hidden");
					}
					console.log("show button:" + button);
					this._attachTempListener(button, "click", func);
				} else {
					console.log("error could not attach button listener with " + this.localName);
				}
			}
			this._isActivated = true;
		}
	},

	deactivateButtons : function(buttonArray) {
		if(this._isActivated) {
			console.log(this.localName + " deactivate toolbar buttons");
			var button;
			var i = buttonArray.length;
			while (i--) {
				button = buttonArray.pop();
				if(button && this._dontHideIds.indexOf(button.id)==-1) {
					button.setAttribute("hidden", true);
				}
			}
			this._deattachTempListeners();
			this._isActivated = false;
		}
	},

	_attachTempListener : function(element, event, func) {
  		element.addEventListener(event, func);
  		this.push('_tempListeners', {element:element,event:event,func:func} );
	},

	_deattachTempListeners : function() {
		var tl;
		var i = this._tempListeners.length;
    	while (i--) {
    		tl = this.pop('_tempListeners');
    		tl.element.removeEventListener(tl.event, tl.func);
    		console.log("- removed temp listener: " + tl.event);
    	}
    	console.log("- clear " + this._tempListeners.length);
	 	this.set('_tempListeners',[]);
	}

};
</script>


text:
define(['exports', './ons-back-button', './ons-icon', './ons-input', './ons-navigator', './ons-range', './ons-select', './ons-switch', './ons-tab', './ons-tabbar', 'aurelia-pal', 'aurelia-history-browser', './ons-router', 'aurelia-router', 'aurelia-templating-router', 'aurelia-route-recognizer'], function (exports, _onsBackButton, _onsIcon, _onsInput, _onsNavigator, _onsRange, _onsSelect, _onsSwitch, _onsTab, _onsTabbar, _aureliaPal, _aureliaHistoryBrowser, _onsRouter, _aureliaRouter, _aureliaTemplatingRouter, _aureliaRouteRecognizer) {
  'use strict';

  Object.defineProperty(exports, "__esModule", {
    value: true
  });
  exports.OnsTabbar = exports.OnsTab = exports.OnsSwitch = exports.OnsSelect = exports.OnsRange = exports.OnsNavigator = exports.OnsInput = exports.OnsIcon = exports.OnsBackButton = undefined;
  Object.defineProperty(exports, 'OnsBackButton', {
    enumerable: true,
    get: function () {
      return _onsBackButton.OnsBackButton;
    }
  });
  Object.defineProperty(exports, 'OnsIcon', {
    enumerable: true,
    get: function () {
      return _onsIcon.OnsIcon;
    }
  });
  Object.defineProperty(exports, 'OnsInput', {
    enumerable: true,
    get: function () {
      return _onsInput.OnsInput;
    }
  });
  Object.defineProperty(exports, 'OnsNavigator', {
    enumerable: true,
    get: function () {
      return _onsNavigator.OnsNavigator;
    }
  });
  Object.defineProperty(exports, 'OnsRange', {
    enumerable: true,
    get: function () {
      return _onsRange.OnsRange;
    }
  });
  Object.defineProperty(exports, 'OnsSelect', {
    enumerable: true,
    get: function () {
      return _onsSelect.OnsSelect;
    }
  });
  Object.defineProperty(exports, 'OnsSwitch', {
    enumerable: true,
    get: function () {
      return _onsSwitch.OnsSwitch;
    }
  });
  Object.defineProperty(exports, 'OnsTab', {
    enumerable: true,
    get: function () {
      return _onsTab.OnsTab;
    }
  });
  Object.defineProperty(exports, 'OnsTabbar', {
    enumerable: true,
    get: function () {
      return _onsTabbar.OnsTabbar;
    }
  });
  exports.configure = configure;

  _aureliaRouter.Router.isNavigatingFirst;
  _aureliaRouter.Router.isNavigatingNew;
  _aureliaRouter.Router.isNavigatingForward;
  _aureliaRouter.Router.isNavigatingBack;
  _aureliaRouter.Router.isNavigatingRefresh;
  _aureliaRouter.Router.currentNavigationTracker;

  _aureliaRouter.Router.prototype.reset = function () {
    var _this = this;

    this.viewPorts = {};
    this.routes = [];
    this.baseUrl = '';
    this.isConfigured = false;
    this.isNavigating = false;
    this.isExplicitNavigation = false;
    this.isExplicitNavigationBack = false;
    this.isNavigatingFirst = false;
    this.isNavigatingNew = false;
    this.isNavigatingRefresh = false;
    this.isNavigatingForward = false;
    this.isNavigatingBack = false;
    this.navigation = [];
    this.currentInstruction = null;
    this._fallbackOrder = 100;
    this._recognizer = new _aureliaRouteRecognizer.RouteRecognizer();
    this._childRecognizer = new _aureliaRouteRecognizer.RouteRecognizer();
    this._configuredPromise = new Promise(function (resolve) {
      _this._resolveConfiguredPromise = resolve;
    });
  };

  var routeStripper = /^#?\/*|\s+$/g;
  var rootStripper = /^\/+|\/+$/g;
  var trailingSlash = /\/$/;
  var absoluteUrl = /^([a-z][a-z0-9+\-.]*:)?\/\//i;

  function updateHash(location, fragment, replace) {
    if (replace) {
      var href = location.href.replace(/(javascript:|#).*$/, '');
      location.replace(href + '#' + fragment);
    } else {
      location.hash = '#' + fragment;
    }
  }

  _aureliaHistoryBrowser.BrowserHistory.prototype.setState = function (key, value) {
    var state = Object.assign({}, this.history.state);
    state[key] = value;
    this.history.replaceState(state, null, null);
  };

  _aureliaHistoryBrowser.BrowserHistory.prototype.getState = function (key) {
    var state = Object.assign({}, this.history.state);
    return state[key];
  };

  _aureliaHistoryBrowser.BrowserHistory.prototype.activate = function (options) {
    if (this._isActive) {
      throw new Error('History has already been activated.');
    }

    var wantsPushState = !!options.pushState;

    this._isActive = true;
    this.options = Object.assign({}, { root: '/' }, this.options, options);

    this.root = ('/' + this.options.root + '/').replace(rootStripper, '/');

    this._wantsHashChange = this.options.hashChange !== false;
    this._hasPushState = !!(this.history && this.history.pushState);
    this._usePushState = !!(this._hasPushState && this.options.pushState);

    var eventName = void 0;
    if (this._hasPushState) {
      eventName = 'popstate';
    } else if (this._wantsHashChange) {
      eventName = 'hashchange';
    }

    _aureliaPal.PLATFORM.addEventListener(eventName, this._checkUrlCallback);

    if (this._wantsHashChange && wantsPushState) {
      var loc = this.location;
      var atRoot = loc.pathname.replace(/[^\/]$/, '$&/') === this.root;

      if (!this._usePushState && !atRoot) {
        this.fragment = this._getFragment(null, true);
        this.location.replace(this.root + this.location.search + '#' + this.fragment);

        return true;
      } else if (this._usePushState && atRoot && loc.hash) {
        this.fragment = this._getHash().replace(routeStripper, '');
        this.history.replaceState({}, _aureliaPal.DOM.title, this.root + this.fragment + loc.search);
      }
    }

    if (!this.fragment) {
      this.fragment = this._getFragment();
    }

    this.linkHandler.activate(this);

    if (!this.options.silent) {
      return this._loadUrl();
    }
  };

  _aureliaHistoryBrowser.BrowserHistory.prototype.navigate = function (fragment) {
    var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},
        _ref$trigger = _ref.trigger,
        trigger = _ref$trigger === undefined ? true : _ref$trigger,
        _ref$replace = _ref.replace,
        replace = _ref$replace === undefined ? false : _ref$replace;

    if (fragment && absoluteUrl.test(fragment)) {
      this.location.href = fragment;
      return true;
    }

    if (!this._isActive) {
      return false;
    }

    fragment = this._getFragment(fragment || '');

    if (this.fragment === fragment && !replace) {
      return false;
    }

    this.fragment = fragment;

    var url = this.root + fragment;

    if (fragment === '' && url !== '/') {
      url = url.slice(0, -1);
    }

    if (this._hasPushState) {
      url = url.replace('//', '/');
      if (!this._usePushState) {
        url = '#' + url;
      }
      this.history[replace ? 'replaceState' : 'pushState']({}, _aureliaPal.DOM.title, url);
    } else if (this._wantsHashChange) {
      updateHash(this.location, fragment, replace);
    } else {
      return this.location.assign(url);
    }

    if (trigger) {
      return this._loadUrl(fragment);
    }
  };

  _aureliaHistoryBrowser.BrowserHistory.prototype._getFragment = function (fragment, forcePushState) {
    var root = void 0;

    if (!fragment) {
      if (this._usePushState || !this._wantsHashChange || forcePushState) {
        fragment = this.location.pathname + this.location.search;
        root = this.root.replace(trailingSlash, '');
        if (!fragment.indexOf(root)) {
          fragment = fragment.substr(root.length);
        }
      } else {
        fragment = this._getHash();
      }
    }

    return '/' + fragment.replace(routeStripper, '');
  };

  _aureliaHistoryBrowser.BrowserHistory.prototype._checkUrl = function (event) {
    var current = this._getFragment();
    if (current !== this.fragment) {
      if (event.type === 'popstate') {
        this.history.replaceState(event.state, null);
      }
      this._loadUrl();
    }
  };

  function configure(config) {
    config.singleton(_aureliaRouter.RouteLoader, _aureliaTemplatingRouter.TemplatingRouteLoader).singleton(_aureliaRouter.Router, _onsRouter.OnsRouter).globalResources([_aureliaPal.PLATFORM.moduleName('./ons-back-button'), _aureliaPal.PLATFORM.moduleName('./ons-icon'), _aureliaPal.PLATFORM.moduleName('./ons-input'), _aureliaPal.PLATFORM.moduleName('./ons-navigator'), _aureliaPal.PLATFORM.moduleName('./ons-range'), _aureliaPal.PLATFORM.moduleName('./ons-select'), _aureliaPal.PLATFORM.moduleName('./ons-switch'), _aureliaPal.PLATFORM.moduleName('./ons-tab'), _aureliaPal.PLATFORM.moduleName('./ons-tabbar'), _aureliaPal.PLATFORM.moduleName('aurelia-templating-router/router-view'), _aureliaPal.PLATFORM.moduleName('aurelia-templating-router/route-href')]);

    config.container.registerAlias(_aureliaRouter.Router, _onsRouter.OnsRouter);
  }
});


text:
/*
The squeeze functions do enhanced LZ77 compression by optimal parsing with a
cost model, rather than greedily choosing the longest length or using a single
step of lazy matching like regular implementations.

Since the cost model is based on the Huffman tree that can only be calculated
after the LZ77 data is generated, there is a chicken and egg problem, and
multiple runs are done with updated cost models to converge to a better
solution.
*/

#ifndef ZOPFLI_SQUEEZE_H_
#define ZOPFLI_SQUEEZE_H_

#include "lz77.h"

/*
Calculates lit/len and dist pairs for given data.
If instart is larger than 0, it uses values before instart as starting
dictionary.
*/
void LZ77Optimal(BlockState *s,
                 const unsigned char* in, size_t instart, size_t inend,
                 LZ77Store* store);

/*
Does the same as LZ77Optimal, but optimized for the fixed tree of the deflate
standard.
The fixed tree rarely gives the best compression. But this gives the best
possible LZ77 encoding possible with the fixed tree.
This does not create or output any fixed tree, only LZ77 data optimized for
using with a fixed tree.
If instart is larger than 0, it uses values before instart as starting
dictionary.
*/
void LZ77OptimalFixed(BlockState *s,
                      const unsigned char* in, size_t instart, size_t inend,
                      LZ77Store* store);

#endif  /* ZOPFLI_SQUEEZE_H_ */


text:
package com.microsoft.azure.management.compute;

/**
 * Describes a Encryption Settings for a Disk.
 */
public class DiskEncryptionSettings {
    /**
     * The disk encryption key which is a Key Vault Secret.
     */
    private KeyVaultSecretReference diskEncryptionKey;

    /**
     * The key encryption key which is Key Vault Key.
     */
    private KeyVaultKeyReference keyEncryptionKey;

    /**
     * Specifies whether disk encryption should be enabled on the virtual
     * machine.
     */
    private Boolean enabled;

    /**
     * Get the diskEncryptionKey value.
     *
     * @return the diskEncryptionKey value
     */
    public KeyVaultSecretReference diskEncryptionKey() {
        return this.diskEncryptionKey;
    }

    /**
     * Set the diskEncryptionKey value.
     *
     * @param diskEncryptionKey the diskEncryptionKey value to set
     * @return the DiskEncryptionSettings object itself.
     */
    public DiskEncryptionSettings withDiskEncryptionKey(KeyVaultSecretReference diskEncryptionKey) {
        this.diskEncryptionKey = diskEncryptionKey;
        return this;
    }

    /**
     * Get the keyEncryptionKey value.
     *
     * @return the keyEncryptionKey value
     */
    public KeyVaultKeyReference keyEncryptionKey() {
        return this.keyEncryptionKey;
    }

    /**
     * Set the keyEncryptionKey value.
     *
     * @param keyEncryptionKey the keyEncryptionKey value to set
     * @return the DiskEncryptionSettings object itself.
     */
    public DiskEncryptionSettings withKeyEncryptionKey(KeyVaultKeyReference keyEncryptionKey) {
        this.keyEncryptionKey = keyEncryptionKey;
        return this;
    }

    /**
     * Get the enabled value.
     *
     * @return the enabled value
     */
    public Boolean enabled() {
        return this.enabled;
    }

    /**
     * Set the enabled value.
     *
     * @param enabled the enabled value to set
     * @return the DiskEncryptionSettings object itself.
     */
    public DiskEncryptionSettings withEnabled(Boolean enabled) {
        this.enabled = enabled;
        return this;
    }

}


text:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<TITLE>
Constant Field Values
</TITLE>

<META NAME="date" CONTENT="2014-02-06">

<LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">

      Package
      Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes

Constant Field Values

Contents

com.microsoft.*

com.microsoft.*

com.microsoft.office365.files.BuildConfig

public static final boolean
DEBUG
true

com.microsoft.office365.files.FileConstants

public static final java.lang.String
FILE_CREATE
"{ \'__metadata\': { \'type\': \'MS.FileServices.File\' }, Name : \'%s\'}"

public static final java.lang.String
FILE_CREATED_BY
"CreatedBy"

public static final java.lang.String
FILE_ETAG
"ETag"

public static final java.lang.String
FILE_ID
"Id"

public static final java.lang.String
FILE_LAST_MODIFIED_BY
"LastModifiedBy"

public static final java.lang.String
FILE_NAME
"Name"

public static final java.lang.String
FILE_SIZE
"Size"

public static final java.lang.String
FILE_TIME_CREATED
"TimeCreated"

public static final java.lang.String
FILE_TIME_LAST_MODIFIED
"LastTimeModified"

public static final java.lang.String
FILE_URL
"Url"

public static final java.lang.String
FOLDER_CREATE
"{ \'__metadata\': { \'type\': \'MS.FileServices.Folder\' }, Name : \'%s\'}"

      Package
      Class
      Use
      Tree
      Deprecated
      Index
      Help

 PREV
 NEXT

  FRAMES
 NO FRAMES

  All Classes


text:
print("foobar".startswith("foo"))
print("foobar".startswith("Foo"))
print("foobar".startswith("foo1"))
print("foobar".startswith("foobar"))
print("foobar".startswith(""))

print("1foobar".startswith("foo", 1))
print("1foo".startswith("foo", 1))
print("1foo".startswith("1foo", 1))
print("1fo".startswith("foo", 1))
print("1fo".startswith("foo", 10))

try:
    "foobar".startswith(1)
except TypeError:
    print("TypeError")


text:
/*

    This file is part of VIPS.

    VIPS is free software; you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with this program; if not, write to the Free Software
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

 */

/*

    These files are distributed with VIPS - http://www.vips.ecs.soton.ac.uk

 */

#ifdef HAVE_CONFIG_H
#include <config.h>
#endif /*HAVE_CONFIG_H*/
#include <vips/intl.h>

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <sys/types.h>
#include <sys/stat.h>
#ifdef HAVE_SYS_FILE_H
#include <sys/file.h>
#endif /*HAVE_SYS_FILE_H*/
#include <fcntl.h>

#include <vips/vips.h>
#include <vips/internal.h>
#include <vips/debug.h>

#ifdef WITH_DMALLOC
#include <dmalloc.h>
#endif /*WITH_DMALLOC*/

/* Open mode for write ... on some systems, have to set BINARY too.
 */
#ifdef BINARY_OPEN
#define MODE (O_WRONLY | O_CREAT | O_TRUNC | O_BINARY)
#else
#define MODE (O_WRONLY | O_CREAT | O_TRUNC)
#endif /*BINARY_OPEN*/

/**
 * im_setupout:
 * @im: image to prepare for writing
 *
 * This call gets the #IMAGE ready for scanline-based writing with
 * im_writeline(). You need to have set all the image fields, such as @Xsize
 * and @BandFmt, before calling this.
 *
 * See also: im_writeline(), im_generate(), im_initdesc(), im_cp_desc().
 *
 * Returns: 0 on success, or -1 on error.
 */
int
im_setupout( IMAGE *im )
{
	g_assert( !im_image_sanity( im ) );

	if( im->Xsize <= 0 || im->Ysize <= 0 || im->Bands <= 0 ) {
		im_error( "im_setupout",
			"%s", _( "bad dimensions" ) );
		return( -1 );
	}

	/* We don't use this, but make sure it's set in case any old binaries
	 * are expectiing it.
	 */
	im->Bbits = im_bits_of_fmt( im->BandFmt );

	if( im->dtype == IM_PARTIAL ) {
		/* Make it into a im_setbuf() image.
		 */
#ifdef DEBUG_IO
		printf( "im_setupout: old-style output for %s\n",
			im->filename );
#endif /*DEBUG_IO*/

		im->dtype = IM_SETBUF;
	}

	switch( im->dtype ) {
	case IM_MMAPINRW:
	case IM_SETBUF_FOREIGN:
		/* No action.
		 */
		break;

	case IM_SETBUF:
		/* Allocate memory.
		 */
		if( im->data ) {
			/* Sanity failure!
			 */
			im_error( "im_setupout",
				"%s", _( "called twice!" ) );
			return( -1 );
		}
		if( !(im->data = im_malloc( NULL,
			IM_IMAGE_SIZEOF_LINE( im ) * im->Ysize )) )
			return( -1 );

		break;

	case IM_OPENOUT:
	{
		/* Don't use im->sizeof_header here, but we know we're
		 * writing a VIPS image anyway.
		 */
		unsigned char header[IM_SIZEOF_HEADER];

		if( (im->fd = open( im->filename, MODE, 0666 )) < 0 ) {
	                im_error( "im_setupout",
				_( "unable to write to \"%s\"" ),
				im->filename );
			return( -1 );
		}
		if( im__write_header_bytes( im, header ) ||
			im__write( im->fd, header, IM_SIZEOF_HEADER ) )
			return( -1 );

		break;
	}

	default:
		im_error( "im_setupout",
			"%s", _( "bad image descriptor" ) );
		return( -1 );
	}

	return( 0 );
}


text:
import EmberRouter from "ember-routing/system/router";
import { forEach } from "ember-metal/enumerable_utils";

var Router;

QUnit.module("Ember Router DSL", {
  setup() {
    Router = EmberRouter.extend();
  },
  teardown() {
    Router = null;
  }
});

QUnit.test("should fail when using a reserved route name", function() {
  var reservedNames = ['array', 'basic', 'object', 'application'];

  expect(reservedNames.length * 2);

  forEach(reservedNames, function(reservedName) {

    expectAssertion(function() {
      Router = EmberRouter.extend();

      Router.map(function() {
        this.route(reservedName);
      });

      var router = Router.create();
      router._initRouterJs();
    }, "'" + reservedName + "' cannot be used as a route name.");

    expectAssertion(function() {
      Router = EmberRouter.extend();

      Router.map(function() {
        this.resource(reservedName);
      });

      var router = Router.create();
      router._initRouterJs();
    }, "'" + reservedName + "' cannot be used as a resource name.");

  });
});

QUnit.test("should reset namespace if nested with resource", function() {
  Router = Router.map(function() {
    this.resource('bleep', function() {
      this.resource('bloop', function() {
        this.resource('blork');
      });
    });
  });

  var router = Router.create();
  router._initRouterJs();

  ok(router.router.recognizer.names['bleep'], 'nested resources do not contain parent name');
  ok(router.router.recognizer.names['bloop'], 'nested resources do not contain parent name');
  ok(router.router.recognizer.names['blork'], 'nested resources do not contain parent name');
});

QUnit.test("should retain resource namespace if nested with routes", function() {
  Router = Router.map(function() {
    this.route('bleep', function() {
      this.route('bloop', function() {
        this.route('blork');
      });
    });
  });

  var router = Router.create();
  router._initRouterJs();

  ok(router.router.recognizer.names['bleep'], 'parent name was used as base of nested routes');
  ok(router.router.recognizer.names['bleep.bloop'], 'parent name was used as base of nested routes');
  ok(router.router.recognizer.names['bleep.bloop.blork'], 'parent name was used as base of nested routes');
});

// jscs:disable validateIndentation
if (Ember.FEATURES.isEnabled("ember-routing-named-substates")) {

QUnit.test("should add loading and error routes if _isRouterMapResult is true", function() {
  Router.map(function() {
    this.route('blork');
  });

  var router = Router.create();
  router._initRouterJs(true);

  ok(router.router.recognizer.names['blork'], 'main route was created');
  ok(router.router.recognizer.names['blork_loading'], 'loading route was added');
  ok(router.router.recognizer.names['blork_error'], 'error route was added');
});

QUnit.test("should not add loading and error routes if _isRouterMapResult is false", function() {
  Router.map(function() {
    this.route('blork');
  });

  var router = Router.create();
  router._initRouterJs(false);

  ok(router.router.recognizer.names['blork'], 'main route was created');
  ok(!router.router.recognizer.names['blork_loading'], 'loading route was not added');
  ok(!router.router.recognizer.names['blork_error'], 'error route was not added');
});

}
// jscs:enable validateIndentation


text:
title: "My Wi-Fi access point revisited"
tagline: "RIP Linksys and Ubiquiti"
category: linux
tags: [linux, networking, wifi, ath9k, core]
---

No more consumer routers!
-------------------------

A while ago I dumped my consumer NAT router in favor of using my desktop router.  I do most of my work at my apartment on my desktop, so why not make it my router and file server?  Great question, great choice.  No longer am I restricted by buggy firmware, half implemented DHCP or DNS servers, NAT limitations, etc.  I demoted by Linksys WRT54G running DD-WRT to just AP roles which lasted for a few more years before the hardware finally died.  RIP WRT54G, you outlived your useful life while delivering above and beyond my expectations.

My Linux desktop / server with an additional Intel PCIe NIC and Linux NAT capabilities make a pretty awesome combination.  Add dnsmasq for simple DHCP, DNS and sometimes TFTP capabilities.  No more consumer routers, the last thing I need is more stuff to configure.

Enter the Ubiquiti PicoStation2
-------------------------------

I read alot of good things about Ubiquiti a while ago when I was planning to build a quad copter and do cool things with Linux + Pandaboard.  The Picostation2 was supposed to be the high powered radio to control the who thing.  Life happened.  The quad never got built, but I didn't give up until after I bought a few pieces such as the Picostation2.  After my Linksys WRT54G died, the Picostation2 was put into action.  I was impressed by the polish of the AirOS web interface.  The Linux SDK seemed cool (until I learned how /old/ the kernel actually was).  But, all my devices (Mac Book Retina Pro, Nexus 4, Lenovo Thinkpad, etc) all had issues with the AP just not working that well.  The connection would just die.  I attempted to reconfigure it and fix it thinking it was my fault, but my attempts were in vain.

A work project demanded Wi-Fi access for some testing at home and the PicoStation2 was making this more difficult.  The PictionStation2 was then retired back to the drawer.

Linksys EA6400
--------------

I bought a Linksys EA6400 on sale thinking I could just replace my AP and be done.  Nope, never that simple.  Linksys created this "Smart Wi-Fi" feature that makes it a major pain to configure.  Just Google "Linksys Smart Wi-Fi" and see what people have to say about the "502 Bad Gateway" error the router constantly threw me whenever I tried to use it as a bridging access point.

Apparently Smart Wi-Fi phones home to Linksys's cloud to allow you to configure it from the web.  What if the Internet connection isn't configured?  Oh, use the included CD for Windows.  I don't even have an optical drive reader or easy access to Windows.  I did some tricks and got it to "kind of work" but not really.

I shipped it back several days later.  I'm done with Linksys and will likely never buy a Linksys product if this is the route they are going.  That's too bad, I loved my old WRT54G and was hoping the EA6400 would be similar.  I was wrong.

Linux + HostAPd + TL-WDN4800
----------------------------

Linux wireless is a lot more stable then it was several years ago, and host/software access points now work quite well.  This coupled with the idea that my desktop / server already runs my NAT, DNS, DHCP and this is a no brainer.  I looked in to buying a PCIe Wi-Fi card.

I settled on the TP-Link TL-WDN4800 card.  It features an Atheros AR9380 that can do 3 spatial streams, Short-GI, 2.4 GHz, 5 GHz, and HT40 (40 MHz channels).  When configured as a 5 GHz AP my rMBP connects to with a linksys of 450 Mbps.  I can't ask for any more.  Speed tests show over 100 Mb/s actual data rate.  Beyond that I didn't test much.  If I need speed faster then that I'll use gigabit Ethernet.  My Nexus 4 has only 1 spatial stream, and negotiates a bitrate of 72 Mbps, which is the fastest the device can do.  Did I mention the card was only $45 and the Ubuntu 12.10 + development Linux 3.9 kernel just works after a little hostapd config?  I paid 3x this for the EA6400 that barely worked (even though it was dual simultaneous band and had 802.11ac).

Back to Reality
---------------

While the 450 Mbps bitrate of 5 GHz + HT40 + Short-GI was nice, it didn't work with all my devices.  As a result I had to fall back to 2.4 GHz channels and HT20.  My rMBP now gets link speed of 217 Mb/s which is still pretty good.  Most of the time it will do in excess of 50 Mb/s of real world data throughput.  Plenty fast for web surfing.  My Nexus 4 is still happy at 72 Mb/s.

I also chose to create a separate subnet for my Wi-Fi clients.  This reduced broadcast traffic from my wired devices and helps keep the Wi-Fi channel a little quieter and improves performance slightly.  I also believe that people are ignorant and simply bridge devices because they don't understand routing and firewall rules.... but that's just me. :)

Configuration
-------------

For people interested in my configuration files see below.  Don't forget to enable the hostapd service update-rc.d hostapd enable.

#### hostapd.conf ####

	interface=wlan0
	driver=nl80211
	ssid=<your ssid>
	macaddr_acl=0
	auth_algs=1
	ignore_broadcast_ssid=0
	wpa=2
	wpa_passphrase=<your passphrass>
	wpa_key_mgmt=WPA-PSK
	wpa_pairwise=TKIP
	rsn_pairwise=CCMP

	#country_code=US
	#ieee80211d=1

	ieee80211n=1
	wmm_enabled=1
	ht_capab=[HT40-][HT40+][SHORT-GI-20][SHORT-GI-40][TX-STBC][RX-STBC1][DSSS_CCK-40][LDPC]

    # 5 GHz
	#hw_mode=a
	#channel=149
	#channel=157

    # 2.4 GHz
	hw_mode=g
	# 70.7 Mbit/s
	#channel=1

	# 62.6 Mbit/s + jitter
	#channel=2

	# 57.4 Mbits/s
	channel=7

#### /etc/network/interfaces ####

	...

	auto wlan0
	iface wlan0 inet static
			address 192.168.11.10
			netmask 255.255.255.0

#### iw phy0 info ####

	$ iw phy0 info
	Wiphy phy0
		Band 1:
			Capabilities: 0x11ef
				RX LDPC
				HT20/HT40
				SM Power Save disabled
				RX HT20 SGI
				RX HT40 SGI
				TX STBC
				RX STBC 1-stream
				Max AMSDU length: 3839 bytes
				DSSS/CCK HT40
			Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
			Minimum RX AMPDU time spacing: 8 usec (0x06)
			HT TX/RX MCS rate indexes supported: 0-23
			Frequencies:
				* 2412 MHz [1] (20.0 dBm)
				* 2417 MHz [2] (20.0 dBm)
				* 2422 MHz [3] (20.0 dBm)
				* 2427 MHz [4] (20.0 dBm)
				* 2432 MHz [5] (20.0 dBm)
				* 2437 MHz [6] (20.0 dBm)
				* 2442 MHz [7] (20.0 dBm)
				* 2447 MHz [8] (20.0 dBm)
				* 2452 MHz [9] (20.0 dBm)
				* 2457 MHz [10] (20.0 dBm)
				* 2462 MHz [11] (20.0 dBm)
				* 2467 MHz [12] (20.0 dBm)
				* 2472 MHz [13] (20.0 dBm)
				* 2484 MHz [14] (disabled)
			Bitrates (non-HT):
				* 1.0 Mbps
				* 2.0 Mbps (short preamble supported)
				* 5.5 Mbps (short preamble supported)
				* 11.0 Mbps (short preamble supported)
				* 6.0 Mbps
				* 9.0 Mbps
				* 12.0 Mbps
				* 18.0 Mbps
				* 24.0 Mbps
				* 36.0 Mbps
				* 48.0 Mbps
				* 54.0 Mbps
		Band 2:
			Capabilities: 0x11ef
				RX LDPC
				HT20/HT40
				SM Power Save disabled
				RX HT20 SGI
				RX HT40 SGI
				TX STBC
				RX STBC 1-stream
				Max AMSDU length: 3839 bytes
				DSSS/CCK HT40
			Maximum RX AMPDU length 65535 bytes (exponent: 0x003)
			Minimum RX AMPDU time spacing: 8 usec (0x06)
			HT TX/RX MCS rate indexes supported: 0-23
			Frequencies:
				* 5180 MHz [36] (23.0 dBm)
				* 5200 MHz [40] (23.0 dBm)
				* 5220 MHz [44] (23.0 dBm)
				* 5240 MHz [48] (23.0 dBm)
				* 5260 MHz [52] (23.0 dBm) (passive scanning, no IBSS, radar detection)
				* 5280 MHz [56] (23.0 dBm) (passive scanning, no IBSS, radar detection)
				* 5300 MHz [60] (23.0 dBm) (passive scanning, no IBSS, radar detection)
				* 5320 MHz [64] (23.0 dBm) (passive scanning, no IBSS, radar detection)
				* 5500 MHz [100] (disabled)
				* 5520 MHz [104] (disabled)
				* 5540 MHz [108] (disabled)
				* 5560 MHz [112] (disabled)
				* 5580 MHz [116] (disabled)
				* 5600 MHz [120] (disabled)
				* 5620 MHz [124] (disabled)
				* 5640 MHz [128] (disabled)
				* 5660 MHz [132] (disabled)
				* 5680 MHz [136] (disabled)
				* 5700 MHz [140] (disabled)
				* 5745 MHz [149] (30.0 dBm)
				* 5765 MHz [153] (30.0 dBm)
				* 5785 MHz [157] (30.0 dBm)
				* 5805 MHz [161] (30.0 dBm)
				* 5825 MHz [165] (30.0 dBm)
			Bitrates (non-HT):
				* 6.0 Mbps
				* 9.0 Mbps
				* 12.0 Mbps
				* 18.0 Mbps
				* 24.0 Mbps
				* 36.0 Mbps
				* 48.0 Mbps
				* 54.0 Mbps
		max # scan SSIDs: 4
		max scan IEs length: 2257 bytes
		Coverage class: 0 (up to 0m)
		Supported Ciphers:
			* WEP40 (00-0f-ac:1)
			* WEP104 (00-0f-ac:5)
			* TKIP (00-0f-ac:2)
			* CCMP (00-0f-ac:4)
			* CMAC (00-0f-ac:6)
		Available Antennas: TX 0x7 RX 0x7
		Configured Antennas: TX 0x7 RX 0x7
		Supported interface modes:
			 * IBSS
			 * managed
			 * AP
			 * AP/VLAN
			 * WDS
			 * monitor
			 * mesh point
			 * P2P-client
			 * P2P-GO
		software interface modes (can always be added):
			 * AP/VLAN
			 * monitor
		valid interface combinations:
			 * #{ managed, WDS, P2P-client } <= 2048, #{ AP, mesh point, P2P-GO } <= 8,
			   total <= 2048, #channels <= 1, STA/AP BI must match
		Supported commands:
			 * new_interface
			 * set_interface
			 * new_key
			 * new_beacon
			 * new_station
			 * new_mpath
			 * set_mesh_params
			 * set_bss
			 * authenticate
			 * associate
			 * deauthenticate
			 * disassociate
			 * join_ibss
			 * join_mesh
			 * remain_on_channel
			 * set_tx_bitrate_mask
			 * action
			 * frame_wait_cancel
			 * set_wiphy_netns
			 * set_channel
			 * set_wds_peer
			 * Unknown command (82)
			 * Unknown command (81)
			 * Unknown command (84)
			 * Unknown command (87)
			 * Unknown command (85)
			 * Unknown command (89)
			 * Unknown command (92)
			 * testmode
			 * connect
			 * disconnect
		Supported TX frame types:
			 * IBSS: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
			 * managed: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
			 * AP: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
			 * AP/VLAN: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
			 * mesh point: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
			 * P2P-client: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
			 * P2P-GO: 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
			 * Unknown mode (10): 0x00 0x10 0x20 0x30 0x40 0x50 0x60 0x70 0x80 0x90 0xa0 0xb0 0xc0 0xd0 0xe0 0xf0
		Supported RX frame types:
			 * IBSS: 0x40 0xb0 0xc0 0xd0
			 * managed: 0x40 0xd0
			 * AP: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
			 * AP/VLAN: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
			 * mesh point: 0xb0 0xc0 0xd0
			 * P2P-client: 0x40 0xd0
			 * P2P-GO: 0x00 0x20 0x40 0xa0 0xb0 0xc0 0xd0
			 * Unknown mode (10): 0x40 0xd0
		Device supports RSN-IBSS.
		WoWLAN support:
			 * wake up on disconnect
			 * wake up on magic packet
			 * wake up on pattern match, up to 6 patterns of 1-256 bytes
		HT Capability overrides:
			 * MCS: ff ff ff ff ff ff ff ff ff ff
			 * maximum A-MSDU length
			 * supported channel width
			 * short GI for 40 MHz
			 * max A-MPDU length exponent
			 * min MPDU start spacing
		Device supports TX status socket option.
		Device supports HT-IBSS.

#### Kernel Info ####

	$ uname -a
	Linux core 3.9.0-999-generic #201303290406 SMP Fri Mar 29 08:07:25 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

	$ modinfo ath9k
	filename:       /lib/modules/3.9.0-999-generic/kernel/drivers/net/wireless/ath/ath9k/ath9k.ko
	license:        Dual BSD/GPL
	description:    Support for Atheros 802.11n wireless LAN cards.
	author:         Atheros Communications
	srcversion:     FCAC5F4D12AA0733811B1B7
	alias:          platform:qca955x_wmac
	alias:          platform:ar934x_wmac
	alias:          platform:ar933x_wmac
	alias:          platform:ath9k
	alias:          pci:v0000168Cd00000036sv*sd*bc*sc*i*
	alias:          pci:v0000168Cd00000037sv*sd*bc*sc*i*
	alias:          pci:v0000168Cd00000034sv*sd*bc*sc*i*
	alias:          pci:v0000168Cd00000033sv*sd*bc*sc*i*
	alias:          pci:v0000168Cd00000032sv*sd*bc*sc*i*
	alias:          pci:v0000168Cd00000030sv*sd*bc*sc*i*
	alias:          pci:v0000168Cd0000002Esv*sd*bc*sc*i*
	alias:          pci:v0000168Cd0000002Dsv*sd*bc*sc*i*
	alias:          pci:v0000168Cd0000002Csv*sd*bc*sc*i*
	alias:          pci:v0000168Cd0000002Bsv*sd*bc*sc*i*
	alias:          pci:v0000168Cd0000002Asv*sd*bc*sc*i*
	alias:          pci:v0000168Cd00000029sv*sd*bc*sc*i*
	alias:          pci:v0000168Cd00000027sv*sd*bc*sc*i*
	alias:          pci:v0000168Cd00000024sv*sd*bc*sc*i*
	alias:          pci:v0000168Cd00000023sv*sd*bc*sc*i*
	depends:        ath9k_hw,ath9k_common,mac80211,ath,cfg80211
	intree:         Y
	vermagic:       3.9.0-999-generic SMP mod_unload modversions
	parm:           debug:Debugging mask (uint)
	parm:           nohwcrypt:Disable hardware encryption (int)
	parm:           blink:Enable LED blink on activity (int)
	parm:           btcoex_enable:Enable wifi-BT coexistence (int)
	parm:           enable_diversity:Enable Antenna diversity for AR9565 (int)

#### Other commands that may be useful for testing setups ####

*  Dump info about channels: iw dev wlan0 survey dump
*  Dump info about connected stations: iw dev wlan0 station dump


text:
package com.jeesuite.springboot.autoconfigure;

import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;

import com.jeesuite.springweb.SpringContextManager;

@Configuration
@Order(Ordered.HIGHEST_PRECEDENCE)
public class SpringContextManagerConfig extends SpringContextManager{

}


text:
package com.hideto0710.scalack.builders

import com.hideto0710.scalack.Scalack
import com.hideto0710.scalack.Scalack.Auth

sealed trait BuilderMethods {
  type ChannelCalled <: TBoolean
}

object ChannelsHistory {

  type UnusedBuilder = BuilderMethods {type ChannelCalled = TFalse}

  case class Builder[M <: BuilderMethods](
    _channel: Option[String],
    _latest: Option[Long],
    _oldest: Option[Long],
    _inclusive: Option[Int],
    _count: Option[Int]
  ) {

    private def get(implicit a:Auth) = {
      Scalack._channelsHistory(Scalack.makeUri(
        "channels.history",
        "token" -> a.token,
        "channel" -> _channel,
        "latest" -> _latest,
        "oldest" -> _oldest,
        "inclusive" -> _inclusive,
        "count" -> _count
      ))
    }

    def channel(channel: String): Builder[M {type ChannelCalled = TTrue}] =
      this.copy(_channel = Some(channel))

    def latest(latest: Long): Builder[M] = this.copy(_latest = Some(latest))
    def oldest(oldest: Long): Builder[M] = this.copy(_oldest = Some(oldest))
    def inclusive(inclusive: Int): Builder[M] = this.copy(_inclusive = Some(inclusive))
    def count(count: Int): Builder[M] = this.copy(_count = Some(count))

    def syncExecute(implicit a: Auth, t: M#ChannelCalled =:= TTrue) = Scalack.syncRequest(get)
    def execute(implicit a: Auth, t: M#ChannelCalled =:= TTrue) = get
  }

  val builder = Builder[UnusedBuilder](None, None, None, None, None)
}


text:
<!DOCTYPE html>

    <meta charset="UTF-8">
    <title>Test Case for 'console.log'</title>

Please wait to be closed.