answer
stringlengths 15
1.25M
|
|---|
package interviews;
public class Yahoo {
}
Run Length Encoding for byte array
Input byte array [10, 10, 10, 255, 255, 0, 10] ==> output byte array [3, 10, 2, 255, 1, 0, 1, 10]
Class <API key> {
public byte[] encodeByteArray(byte[] input) {
int n = input.length;
if (n == 0) return new byte[];
Arraylist<Byte> out = Arraylist<Byte>();
byte prevByte = input[0];
byte prevCount = 1;
for (int i = 1; i < n; i++) {
if(prevByte == input[i] && prevCount != 255){
prevCount++;
} else {
out.add(prevCount);
out.add(prevByte);
prevByte = input[i];
prevCount = 1;
}
}
out.add(prevCount);
out.add(prevByte);
return out.toArray();
}
public static void main() {
}
}
// [1] ==> [1, 1]
// [1, 1, 1, 2, 2, 3] ==> [3, 1, 2, 2, 1, 3]
// [1 ... 300.....1] ==> [255, 1, 45, 1]
|
#include <ctype.h>
#include <i2string.h>
#include <std_types.h>
#include "type2name.h"
std::string type2name(const typet &type)
{
std::string result;
if(type.id()=="")
throw "Empty type encountered.";
else if(type.id()=="empty")
result+="V";
else if(type.id()=="signedbv")
result+="S" + type.width().as_string();
else if(type.id()=="unsignedbv")
result+="U" + type.width().as_string();
else if(type.is_bool())
result+="B";
else if(type.id()=="integer")
result+="I";
else if(type.id()=="real")
result+="R";
else if(type.id()=="complex")
result+="C";
else if(type.id()=="float")
result+="F";
else if(type.id()=="floatbv")
result+="F" + type.width().as_string();
else if(type.id()=="fixed")
result+="X";
else if(type.id()=="fixedbv")
result+="X" + type.width().as_string();
else if(type.id()=="natural")
result+="N";
else if(type.id()=="pointer")
result+="*";
else if(type.id()=="reference")
result+="&";
else if(type.is_code())
{
const code_typet &t = to_code_type(type);
const code_typet::argumentst arguments = t.arguments();
result+="P(";
for (code_typet::argumentst::const_iterator it = arguments.begin();
it!=arguments.end();
it++)
{
result+=type2name(it->type());
result+="'" + it->get_identifier().as_string() + "'|";
}
result.resize(result.size()-1);
result+=")";
}
else if(type.is_array())
{
const array_typet &t = to_array_type(type);
result+="ARR" + t.size().value().as_string();
}
else if(type.id()=="incomplete_array")
{
result+="ARR?";
}
else if(type.id()=="symbol")
{
result+="SYM#" + type.identifier().as_string() + "#";
}
else if(type.id()=="struct" ||
type.id()=="union")
{
if(type.id()=="struct") result +="ST";
if(type.id()=="union") result +="UN";
const struct_typet &t = to_struct_type(type);
const struct_typet::componentst &components = t.components();
result+="[";
for(struct_typet::componentst::const_iterator it = components.begin();
it!=components.end();
it++)
{
result+=type2name(it->type());
result+="'" + it->name().as_string() + "'|";
}
result.resize(result.size()-1);
result+="]";
}
else if(type.id()=="incomplete_struct")
result +="ST?";
else if(type.id()=="incomplete_union")
result +="UN?";
else if(type.id()=="c_enum")
result +="EN" + type.width().as_string();
else if(type.id()=="incomplete_c_enum")
result +="EN?";
else if(type.id()=="c_bitfield")
{
result+="BF" + type.size().as_string();
}
else
{
throw (std::string("Unknown type '") +
type.id().as_string() +
"' encountered.");
}
if(type.has_subtype())
{
result+="{";
result+=type2name(type.subtype());
result+="}";
}
if(type.has_subtypes())
{
result+="$";
forall_subtypes(it, type)
{
result+=type2name(*it);
result+="|";
}
result.resize(result.size()-1);
result+="$";
}
return result;
}
|
using System;
namespace <API key>.MOEX.FIX.Base.Field
{
public class PartyID
{
public const int Tag = 448;
public static readonly byte[] TagBytes;
static PartyID()
{
TagBytes = new byte[3];
TagBytes[0] = 52;
TagBytes[1] = 52;
TagBytes[2] = 56;
}
}
}
|
using GoBuddies.Server.Data;
using GoBuddies.Server.Data.DbModels;
using GoBuddies.Services;
using Microsoft.AspNetCore.Builder;
using Microsoft.AspNetCore.DataProtection;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Identity.EntityFrameworkCore;
using Microsoft.AspNetCore.OData.Extensions;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Swashbuckle.Swagger.Model;
using System;
using System.IO;
namespace GoBuddies.Server.WebApi
{
public class Startup
{
public Startup(IHostingEnvironment env)
{
var builder = new <API key>()
.SetBasePath(env.ContentRootPath)
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
.AddJsonFile($"appsettings.{env.EnvironmentName}.json", optional: true);
if (env.IsEnvironment("Development"))
{
// This will push telemetry data through Application Insights pipeline faster, allowing you to view results immediately.
//builder.<API key>(developerMode: true);
}
builder.<API key>();
Configuration = builder.Build();
}
public IConfigurationRoot Configuration { get; }
// This method gets called by the runtime. Use this method to add services to the container
public void ConfigureServices(IServiceCollection services)
{
// Add framework services.
/services.<API key>(Configuration);
// add ef
services.AddDbContext<<API key>>(options => options.UseInMemoryDatabase());
// add swagger
services.AddSwaggerGen();
services.ConfigureSwaggerGen(options =>
{
options.SingleApiVersion(new Info
{
Version = "v1",
Title = "Geo Search API",
Description = "A simple api to search using geo location in Elasticsearch",
TermsOfService = "None"
});
string pathToDoc = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "GoBuddies.Server.WebApi.XML");
options.IncludeXmlComments(pathToDoc);
options.<API key>();
});
// config identity
services.AddIdentity<ApplicationUser, IdentityRole>(options =>
{
options.Cookies.ApplicationCookie.<API key> = "ApplicationCookie";
options.Cookies.ApplicationCookie.CookieName = "Interop";
options.Cookies.ApplicationCookie.<API key> = <API key>.Create(new DirectoryInfo(@"C:\Identities"));
})
.<API key><<API key>>()
.<API key>();
services.AddMvc();
// Add application services.
services.AddTransient<IEmailSender, AuthMessageSender>();
services.AddTransient<ISmsSender, AuthMessageSender>();
}
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline
public void Configure(IApplicationBuilder app, IHostingEnvironment env, ILoggerFactory loggerFactory)
{
loggerFactory.AddConsole(Configuration.GetSection("Logging"));
loggerFactory.AddDebug();
/app.<API key>();
/app.<API key>();
app.UseMvc(routes =>
{
routes.MapRoute(
name: "default",
template: "{controller}/{action}/{id?}");
});
app.UseIdentity();
app.UseOData("odata");
app.UseSwagger();
app.UseSwaggerUi();
}
}
}
|
<?php
namespace ContainerFelbUiK;
use Symfony\Component\DependencyInjection\Argument\RewindableGenerator;
use Symfony\Component\DependencyInjection\Exception\RuntimeException;
/**
* @internal This class has been auto-generated by the Symfony Dependency Injection Component.
*/
class <API key> extends <API key>
{
/**
* Gets the private 'form.type_extension.form.validator' shared service.
*
* @return \Symfony\Component\Form\Extension\Validator\Type\<API key>
*/
public static function do($container, $lazyLoad = true)
{
include_once \dirname(__DIR__, 4).'/vendor/symfony/form/<API key>.php';
include_once \dirname(__DIR__, 4).'/vendor/symfony/form/<API key>.php';
include_once \dirname(__DIR__, 4).'/vendor/symfony/form/Extension/Validator/Type/<API key>.php';
include_once \dirname(__DIR__, 4).'/vendor/symfony/form/Extension/Validator/Type/<API key>.php';
return $container->privates['form.type_extension.form.validator'] = new \Symfony\Component\Form\Extension\Validator\Type\<API key>(($container->services['validator'] ?? $container->getValidatorService()));
}
}
|
package com.buschmais.xo.neo4j.test.id;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import java.util.Collection;
import com.buschmais.xo.api.XOManager;
import com.buschmais.xo.api.bootstrap.XOUnit;
import com.buschmais.xo.neo4j.test.<API key>;
import com.buschmais.xo.neo4j.test.id.composite.A;
import com.buschmais.xo.neo4j.test.id.composite.A2B;
import com.buschmais.xo.neo4j.test.id.composite.B;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@RunWith(Parameterized.class)
public class EqualsHashcodeIT extends <API key> {
public EqualsHashcodeIT(XOUnit xoUnit) {
super(xoUnit);
}
@Parameterized.Parameters
public static Collection<Object[]> getXOUnits() {
return xoUnits(A.class, B.class, A2B.class);
}
@Test
public void equalsHashcode() {
XOManager xoManager = getXOManager();
xoManager.currentTransaction().begin();
A a = xoManager.create(A.class);
int aHashCode = a.hashCode();
B b = xoManager.create(B.class);
int bHashCode = b.hashCode();
A2B a2b = xoManager.create(a, A2B.class, b);
int a2bHashCode = a2b.hashCode();
xoManager.currentTransaction().commit();
xoManager.currentTransaction().begin();
assertThat(a.equals(a), equalTo(true));
assertThat(b.equals(b), equalTo(true));
assertThat(a2b.equals(a2b), equalTo(true));
assertThat(a.hashCode(), equalTo(aHashCode));
assertThat(b.hashCode(), equalTo(bHashCode));
assertThat(a2b.hashCode(), equalTo(a2bHashCode));
xoManager.currentTransaction().commit();
}
}
|
package com.tle.configmanager;
import com.dytech.gui.ComponentHelper;
import com.thoughtworks.xstream.XStream;
import com.tle.common.Check;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
import java.io.<API key>;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.Reader;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.List;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JSeparator;
import net.miginfocom.swing.MigLayout;
import org.apache.commons.configuration.<API key>;
import org.apache.commons.io.FileUtils;
@SuppressWarnings({"serial", "nls"})
public class ConfigLauncherGUI extends JFrame implements ActionListener {
public static final String MANDATORY_CONFIG = "mandatory-config.properties";
public static final String OPTIONAL_CONFIG = "optional-config.properties";
public static final String HIBERNATE_CONFIG = "hibernate.properties";
public static final String LOGGING_CONFIG = "learningedge-log4j.properties";
public static final String IMAGEMAGICK_CONFIG =
"plugins/com.tle.core.imagemagick/config.properties.unresolved";
public static final String HIKARI_CONFIG = "hikari.properties";
private final String TITLE = "TLE Configuration Manager";
private final String PATH = "./configs/";
private final String ORACLE = "oracle";
private final String POSTGRESQL = "postgresql";
private final String MSSQL = "ms sql";
private final String source;
private final String destination;
private JLabel lblConfig;
private JComboBox<ConfigProfile> cmbConfigs;
private JButton btnNew, btnEdit, btnApply, btnDelete;
private JSeparator sep;
private List<ConfigProfile> configs;
public ConfigLauncherGUI(String source, String destination) {
setTitle(TITLE);
setupGUI();
setResizable(false);
<API key>(EXIT_ON_CLOSE);
this.source = source;
this.destination = destination;
// Set a minimum width...leave the height to the pack...
setMinimumSize(new Dimension(300, 0));
pack();
ComponentHelper.centreOnScreen(this);
// Updated combo box containing profiles
updateConfigs();
}
// Sets up the GUI for managing/loading the configuration profiles
private void setupGUI() {
Container contents = getContentPane();
contents.setLayout(new MigLayout("wrap 3", "[grow][grow][grow]"));
configs = new ArrayList<ConfigProfile>();
lblConfig = new JLabel("Configurations: ");
cmbConfigs = new JComboBox<ConfigProfile>();
btnNew = new JButton("New");
btnNew.addActionListener(this);
btnApply = new JButton("Apply Configuration");
btnApply.addActionListener(this);
btnEdit = new JButton("Edit");
btnEdit.addActionListener(this);
sep = new JSeparator();
btnDelete = new JButton("Delete");
btnDelete.addActionListener(this);
contents.add(lblConfig, "growx, spanx 3");
contents.add(cmbConfigs, "growx, spanx 3");
contents.add(btnNew, "growx, center");
contents.add(btnEdit, "growx, center");
contents.add(btnDelete, "growx, center");
contents.add(sep, "growx, spanx 3");
contents.add(btnApply, "center, growx, spanx 3");
}
// Updates the available configuration profiles
public void updateConfigs() {
File srcDir = new File(PATH);
File[] configFiles = srcDir.listFiles();
Reader rdr;
cmbConfigs.removeAllItems();
configs.clear();
if (configFiles != null) {
for (File f : configFiles) {
if (f.isFile()) {
XStream xstream = new XStream();
try {
rdr = new BufferedReader(new FileReader(f));
ConfigProfile prof = (ConfigProfile) xstream.fromXML(rdr);
configs.add(prof);
rdr.close();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
Collections.sort(
configs,
new Comparator<ConfigProfile>() {
@Override
public int compare(ConfigProfile o1, ConfigProfile o2) {
return o1.getProfName().compareToIgnoreCase(o2.getProfName());
}
});
for (ConfigProfile prof : configs) {
cmbConfigs.addItem(prof);
}
}
if (configs.isEmpty()) {
btnEdit.setEnabled(false);
btnApply.setEnabled(false);
btnDelete.setEnabled(false);
} else {
btnEdit.setEnabled(true);
btnApply.setEnabled(true);
btnDelete.setEnabled(true);
}
}
@Override
public void actionPerformed(ActionEvent e) {
if (e.getSource() == btnNew) {
addProfile();
} else if (e.getSource() == btnEdit) {
editProfile();
} else if (e.getSource() == btnDelete) {
deleteProfile();
} else if (e.getSource() == btnApply) {
try {
loadProfile();
} catch (Exception ex) {
JOptionPane.showMessageDialog(
null,
"Error loading configuration: \n" + ex.getMessage(),
"Load Failed",
JOptionPane.ERROR_MESSAGE);
}
}
}
// Adds a new profile which is either a clone of an existing profile or is
// blank
private void addProfile() {
ConfigEditorGUI confEd = null;
if (configs != null && cmbConfigs.getSelectedItem() != null) {
ConfigProfile selectedProf = (ConfigProfile) cmbConfigs.getSelectedItem();
int result =
JOptionPane.showConfirmDialog(
null,
"Do you want to clone the currently selected configuration?: "
+ selectedProf.getProfName(),
"Clone Confirmation",
JOptionPane.YES_NO_OPTION);
if (result == JOptionPane.YES_OPTION) {
confEd = new ConfigEditorGUI(selectedProf, "copy");
} else {
confEd = new ConfigEditorGUI();
}
} else {
confEd = new ConfigEditorGUI();
}
confEd.setModal(true);
confEd.setVisible(true);
if (confEd.getResult() == ConfigEditorGUI.RESULT_SAVE) {
updateConfigs();
}
}
// Edits and existing profile
private void editProfile() {
int index = cmbConfigs.getSelectedIndex();
ConfigProfile selectedProf = (ConfigProfile) cmbConfigs.getSelectedItem();
ConfigEditorGUI confEd = new ConfigEditorGUI(selectedProf);
confEd.setModal(true);
confEd.setVisible(true);
if (confEd.getResult() == ConfigEditorGUI.RESULT_SAVE) {
updateConfigs();
cmbConfigs.setSelectedIndex(index);
}
}
// Deletes a configuration profile
private void deleteProfile() {
ConfigProfile selectedProf = (ConfigProfile) cmbConfigs.getSelectedItem();
File toDel = new File(PATH + selectedProf.getProfName() + ".xml");
int result =
JOptionPane.showConfirmDialog(
null,
"Are you sure you want to delete this configuration?: " + selectedProf.getProfName(),
"Delete Confirmation",
JOptionPane.YES_NO_OPTION);
if (result == JOptionPane.YES_OPTION) {
boolean success = toDel.delete();
if (!success) {
JOptionPane.showMessageDialog(
null,
"Unable to delete configuration: " + selectedProf.getProfName(),
"Delete Failed",
JOptionPane.ERROR_MESSAGE);
}
}
updateConfigs();
}
// Loads a profile (SUPER HACKISH)
private void loadProfile() throws <API key>, IOException, <API key> {
ConfigProfile selectedProf = (ConfigProfile) cmbConfigs.getSelectedItem();
File srcDir = new File(source);
// Remove Current Configuration Files
File destDir = new File(destination);
FileUtils.deleteDirectory(destDir);
// Create Destination
destDir.mkdir();
// Copy Required Files (Database Specific)
boolean oracleSelected = selectedProf.getDbtype().equalsIgnoreCase(ORACLE);
if (oracleSelected) {
org.apache.commons.io.FileUtils.copyFile(
new File(srcDir + "/hibernate.properties.oracle"),
new File(destDir + "/hibernate.properties"));
} else if (selectedProf.getDbtype().equalsIgnoreCase(POSTGRESQL)) {
FileUtils.copyFile(
new File(srcDir + "/hibernate.properties.postgresql"),
new File(destDir + "/hibernate.properties"));
} else if (selectedProf.getDbtype().equalsIgnoreCase(MSSQL)) {
FileUtils.copyFile(
new File(srcDir + "/hibernate.properties.sqlserver"),
new File(destDir + "/hibernate.properties"));
}
// Mandatory / Optional / Logging
FileUtils.copyFile(
new File(srcDir + "/mandatory-config.properties"),
new File(destDir + "/mandatory-config.properties"));
FileUtils.copyFile(
new File(srcDir + "/optional-config.properties"),
new File(destDir + "/optional-config.properties"));
// Copy custom development logging file
FileUtils.copyFile(
new File("./learningedge-log4j.properties"),
new File(destDir + "/learningedge-log4j.properties"));
// Other Miscellaneous Files
FileUtils.copyFile(
new File(srcDir + "/en-stopWords.txt"), new File(destDir + "/en-stopWords.txt"));
FileUtils.copyFile(
new File(srcDir + "/" + HIKARI_CONFIG), new File(destDir + "/" + HIKARI_CONFIG));
// Plugins Folder
FileUtils.<API key>(new File(srcDir + "/plugins"), destDir);
// Edit Hibernate Properties
String hibProp = readFile(destination + "/" + HIBERNATE_CONFIG);
hibProp = hibProp.replace("${datasource/host}", selectedProf.getHost());
hibProp = hibProp.replace("${datasource/port}", selectedProf.getPort());
hibProp = hibProp.replace("${datasource/database}", selectedProf.getDatabase());
hibProp = hibProp.replace("${datasource/username}", selectedProf.getUsername());
hibProp = hibProp.replace("${datasource/password}", selectedProf.getPassword());
hibProp =
hibProp.replace(
"${datasource/schema}",
oracleSelected ? "hibernate.default_schema = " + selectedProf.getUsername() : "");
writeFile(destination + "/hibernate.properties", hibProp);
// Edit Mandatory Properties
PropertyEditor mandProps = new PropertyEditor();
mandProps.load(new File(destination + "/" + MANDATORY_CONFIG));
String http = selectedProf.getHttp();
String portFromUrl = selectedProf.getAdminurl().split(":")[1];
mandProps.setProperty(
"http.port",
!Check.isEmpty(http) ? http : !Check.isEmpty(portFromUrl) ? portFromUrl : "80");
String https = selectedProf.getHttps();
if (!Check.isEmpty(https)) {
mandProps.setProperty("https.port", https);
}
String ajp = selectedProf.getAjp();
if (!Check.isEmpty(https)) {
mandProps.setProperty("ajp.port", ajp);
}
mandProps.setProperty("filestore.root", selectedProf.getFilestore());
mandProps.setProperty("java.home", selectedProf.getJavahome());
mandProps.setProperty("admin.url", selectedProf.getAdminurl());
mandProps.setProperty("freetext.index.location", selectedProf.getFreetext());
mandProps.setProperty("freetext.stopwords.file", selectedProf.getStopwords());
String reporting = selectedProf.getReporting();
if (!Check.isEmpty(reporting)) {
mandProps.setProperty("reporting.workspace.location", reporting);
}
mandProps.setProperty("plugins.location", selectedProf.getPlugins());
mandProps.save(new File(destination + "/" + MANDATORY_CONFIG));
// Edit Optional Properties
String optProp = readFile(destination + "/" + OPTIONAL_CONFIG);
if (selectedProf.isDevinst()) {
optProp =
optProp.replace(
"#conversionService.disableConversion = false",
"conversionService.disableConversion = true");
optProp =
optProp.replace(
"conversionService.<API key> = ${install.path#t\\/}/conversion/conversion-service.jar",
"#conversionService.<API key> =");
optProp =
optProp.replace("#pluginPathResolver.wrappedClass", "pluginPathResolver.wrappedClass");
} else {
optProp =
optProp.replace(
"${install.path#t\\/}/conversion/conversion-service.jar",
selectedProf.getConversion());
}
writeFile(destination + "/optional-config.properties", optProp);
// Edit ImageMagik Properties (MORE HAX...)
File imgmgk = new File(destination + "/" + IMAGEMAGICK_CONFIG);
PropertyEditor magickProps = new PropertyEditor();
magickProps.load(imgmgk);
magickProps.setProperty("imageMagick.path", selectedProf.getImagemagick());
magickProps.save(new File((destination + "/" + IMAGEMAGICK_CONFIG).replace(".unresolved", "")));
imgmgk.delete();
JOptionPane.showMessageDialog(
null,
"The configuration: " + selectedProf.getProfName() + " has been successfully loaded.",
"Load Success",
JOptionPane.INFORMATION_MESSAGE);
}
// Reads a file into a string
private String readFile(String path) throws IOException {
StringBuilder contents = new StringBuilder();
BufferedReader br = new BufferedReader(new FileReader(path));
String line = null;
while ((line = br.readLine()) != null) {
contents.append(line);
contents.append(System.getProperty("line.separator"));
}
br.close();
return contents.toString();
}
// Writes a file from String
private void writeFile(String path, String contents) throws IOException {
BufferedWriter output = null;
output = new BufferedWriter(new FileWriter(new File(path)));
output.write(contents);
output.close();
}
}
|
<?php
final class <API key> extends <API key> {
public function handleRequest(AphrontRequest $request) {
$viewer = $request->getViewer();
$id = $request->getURIData('id');
$lease = id(new DrydockLeaseQuery())
->setViewer($viewer)
->withIDs(array($id))
-><API key>(true)
->executeOne();
if (!$lease) {
return new Aphront404Response();
}
$lease_uri = $this->getApplicationURI('lease/'.$lease->getID().'/');
$title = pht('Lease %d', $lease->getID());
$header = id(new PHUIHeaderView())
->setHeader($title);
if ($lease->isReleasing()) {
$header->setStatus('<API key>', 'red', pht('Releasing'));
}
$actions = $this->buildActionListView($lease);
$properties = $this-><API key>($lease, $actions);
$pager = new PHUIPagerView();
$pager->setURI(new PhutilURI($lease_uri), 'offset');
$pager->setOffset($request->getInt('offset'));
$logs = id(new DrydockLogQuery())
->setViewer($viewer)
->withLeaseIDs(array($lease->getID()))
-><API key>($pager);
$log_table = id(new DrydockLogListView())
->setUser($viewer)
->setLogs($logs)
->render();
$log_table->appendChild($pager);
$crumbs = $this-><API key>();
$crumbs->addTextCrumb($title, $lease_uri);
$locks = $this->buildLocksTab($lease->getPHID());
$commands = $this->buildCommandsTab($lease->getPHID());
$object_box = id(new PHUIObjectBoxView())
->setHeader($header)
->addPropertyList($properties, pht('Properties'))
->addPropertyList($locks, pht('Slot Locks'))
->addPropertyList($commands, pht('Commands'));
$log_box = id(new PHUIObjectBoxView())
->setHeaderText(pht('Lease Logs'))
->setTable($log_table);
return $this-><API key>(
array(
$crumbs,
$object_box,
$log_box,
),
array(
'title' => $title,
));
}
private function buildActionListView(DrydockLease $lease) {
$viewer = $this->getViewer();
$view = id(new <API key>())
->setUser($viewer)
->setObjectURI($this->getRequest()->getRequestURI())
->setObject($lease);
$id = $lease->getID();
$can_release = $lease->canRelease();
if ($lease->isReleasing()) {
$can_release = false;
}
$can_edit = <API key>::hasCapability(
$viewer,
$lease,
<API key>::CAN_EDIT);
$view->addAction(
id(new <API key>())
->setName(pht('Release Lease'))
->setIcon('fa-times')
->setHref($this->getApplicationURI("/lease/{$id}/release/"))
->setWorkflow(true)
->setDisabled(!$can_release || !$can_edit));
return $view;
}
private function <API key>(
DrydockLease $lease,
<API key> $actions) {
$viewer = $this->getViewer();
$view = new <API key>();
$view->setActionList($actions);
$view->addProperty(
pht('Status'),
DrydockLeaseStatus::getNameForStatus($lease->getStatus()));
$view->addProperty(
pht('Resource Type'),
$lease->getResourceType());
$owner_phid = $lease->getOwnerPHID();
if ($owner_phid) {
$owner_display = $viewer->renderHandle($owner_phid);
} else {
$owner_display = phutil_tag('em', array(), pht('No Owner'));
}
$view->addProperty(pht('Owner'), $owner_display);
$resource_phid = $lease->getResourcePHID();
if ($resource_phid) {
$resource_display = $viewer->renderHandle($resource_phid);
} else {
$resource_display = phutil_tag('em', array(), pht('No Resource'));
}
$view->addProperty(pht('Resource'), $resource_display);
$until = $lease->getUntil();
if ($until) {
$until_display = <API key>($until, $viewer);
} else {
$until_display = phutil_tag('em', array(), pht('Never'));
}
$view->addProperty(pht('Expires'), $until_display);
$attributes = $lease->getAttributes();
if ($attributes) {
$view->addSectionHeader(
pht('Attributes'), 'fa-list-ul');
foreach ($attributes as $key => $value) {
$view->addProperty($key, $value);
}
}
return $view;
}
}
|
using System;
using System.ComponentModel;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.InteropServices;
using System.Text;
namespace Microsoft.Web.Utility.PInvoke.Fusion
{
[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("<API key>")]
internal interface IAssemblyName
{
[PreserveSig()]
int SetProperty(
int PropertyId,
IntPtr pvProperty,
int cbProperty);
[PreserveSig()]
int GetProperty(
int PropertyId,
IntPtr pvProperty,
ref int pcbProperty);
[PreserveSig()]
int Finalize();
[PreserveSig()]
int GetDisplayName(
StringBuilder pDisplayName,
ref int pccDisplayName,
int displayFlags);
[PreserveSig()]
int Reserved(ref Guid guid,
Object obj1,
Object obj2,
String string1,
Int64 llFlags,
IntPtr pvReserved,
int cbReserved,
out IntPtr ppv);
[PreserveSig()]
int GetName(
ref int pccBuffer,
StringBuilder pwzName);
[PreserveSig()]
int GetVersion(
out int versionHi,
out int versionLow);
[PreserveSig()]
int IsEqual(
IAssemblyName pAsmName,
int cmpFlags);
[PreserveSig()]
int Clone(out IAssemblyName pAsmName);
}// IAssemblyName
[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("<API key>")]
internal interface IAssemblyCache
{
[PreserveSig()]
int UninstallAssembly(
int flags,
[MarshalAs(UnmanagedType.LPWStr)]
string assemblyName,
IntPtr refData,
out int disposition);
[PreserveSig()]
int QueryAssemblyInfo(
int flags,
[MarshalAs(UnmanagedType.LPWStr)]
string assemblyName,
ref AssemblyInfo assemblyInfo);
[PreserveSig()]
int Reserved(
int flags,
IntPtr pvReserved,
out object ppAsmItem,
[MarshalAs(UnmanagedType.LPWStr)]
string assemblyName);
[PreserveSig()]
int Reserved(out object ppAsmScavenger);
[PreserveSig()]
int InstallAssembly(
int flags,
[MarshalAs(UnmanagedType.LPWStr)]
string assemblyFilePath,
IntPtr refData);
}// IAssemblyCache
[StructLayout(LayoutKind.Sequential)]
internal struct AssemblyInfo
{
public int cbAssemblyInfo; // size of this structure for future expansion
public int assemblyFlags;
public long assemblySizeInKB;
[MarshalAs(UnmanagedType.LPWStr)]
public string currentAssemblyPath;
public int cchBuf; // size of path buf.
}
[Flags]
internal enum AssemblyCacheFlags
{
GAC = 2,
}
[ComImport, InterfaceType(ComInterfaceType.InterfaceIsIUnknown), Guid("<API key>")]
internal interface IAssemblyEnum
{
[PreserveSig()]
int GetNextAssembly(
IntPtr pvReserved,
out IAssemblyName ppName,
int flags);
[PreserveSig()]
int Reset();
[PreserveSig()]
int Clone(out IAssemblyEnum ppEnum);
}
[Flags]
internal enum <API key>
{
VERSION = 0x01,
CULTURE = 0x02,
PUBLIC_KEY_TOKEN = 0x04,
<API key> = 0x20,
RETARGETABLE = 0x80,
// This enum might change in the future to include
// more attributes.
ALL =
VERSION
| CULTURE
| PUBLIC_KEY_TOKEN
| <API key>
| RETARGETABLE
}
internal enum <API key>
{
CANOF_DEFAULT = 0,
<API key> = 1,
}
internal static class NativeMethods
{
[DllImport("fusion.dll")]
public static extern int CreateAssemblyCache(
out IAssemblyCache ppAsmCache,
int reserved);
[DllImport("fusion.dll")]
public static extern int CreateAssemblyEnum(
out IAssemblyEnum ppEnum,
IntPtr pUnkReserved,
IAssemblyName pName,
AssemblyCacheFlags flags,
IntPtr pvReserved);
[DllImport("fusion.dll")]
public static extern int <API key>(
out IAssemblyName ppAssemblyNameObj,
[MarshalAs(UnmanagedType.LPWStr)]
String szAssemblyName,
<API key> flags,
IntPtr pvReserved);
}
}
|
<!DOCTYPE HTML PUBLIC "-
<!--NewPage
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.4.2_11) on Sun Oct 15 22:02:21 CDT 2006 -->
<TITLE>
Uses of Interface org.hibernate.dialect.lock.LockingStrategy (Hibernate API Documentation)
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../jdstyle.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="Uses of Interface org.hibernate.dialect.lock.LockingStrategy (Hibernate API Documentation)";
}
</SCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<A NAME="navbar_top"></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="LockingStrategy.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<HR>
<CENTER>
<H2>
<B>Uses of Interface<br>org.hibernate.dialect.lock.LockingStrategy</B></H2>
</CENTER>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
Packages that use <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock">LockingStrategy</A></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><A HREF="#org.hibernate.dialect"><B>org.hibernate.dialect</B></A></TD>
<TD>
This package abstracts the SQL dialect of the underlying database. </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><A HREF="#org.hibernate.dialect.lock"><B>org.hibernate.dialect.lock</B></A></TD>
<TD> </TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><A HREF="#org.hibernate.persister.entity"><B>org.hibernate.persister.entity</B></A></TD>
<TD>
This package abstracts persistence mechanisms for
entities, and defines the Hibernate runtime
metamodel. </TD>
</TR>
</TABLE>
<P>
<A NAME="org.hibernate.dialect"></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
Uses of <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock">LockingStrategy</A> in <A HREF="../../../../../org/hibernate/dialect/package-summary.html">org.hibernate.dialect</A></FONT></TD>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="<API key>">
<TD COLSPAN=2>Classes in <A HREF="../../../../../org/hibernate/dialect/package-summary.html">org.hibernate.dialect</A> that implement <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock">LockingStrategy</A></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/hibernate/dialect/HSQLDialect.<API key>.html" title="class in org.hibernate.dialect">HSQLDialect.<API key></A></B></CODE>
<BR>
</TD>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="<API key>">
<TD COLSPAN=2>Methods in <A HREF="../../../../../org/hibernate/dialect/package-summary.html">org.hibernate.dialect</A> that return <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock">LockingStrategy</A></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock">LockingStrategy</A></CODE></FONT></TD>
<TD><CODE><B>TimesTenDialect.</B><B><A HREF="../../../../../org/hibernate/dialect/TimesTenDialect.html#getLockingStrategy(org.hibernate.persister.entity.Lockable, org.hibernate.LockMode)">getLockingStrategy</A></B>(<A HREF="../../../../../org/hibernate/persister/entity/Lockable.html" title="interface in org.hibernate.persister.entity">Lockable</A> lockable,
<A HREF="../../../../../org/hibernate/LockMode.html" title="class in org.hibernate">LockMode</A> lockMode)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock">LockingStrategy</A></CODE></FONT></TD>
<TD><CODE><B>RDMSOS2200Dialect.</B><B><A HREF="../../../../../org/hibernate/dialect/RDMSOS2200Dialect.html#getLockingStrategy(org.hibernate.persister.entity.Lockable, org.hibernate.LockMode)">getLockingStrategy</A></B>(<A HREF="../../../../../org/hibernate/persister/entity/Lockable.html" title="interface in org.hibernate.persister.entity">Lockable</A> lockable,
<A HREF="../../../../../org/hibernate/LockMode.html" title="class in org.hibernate">LockMode</A> lockMode)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock">LockingStrategy</A></CODE></FONT></TD>
<TD><CODE><B>PointbaseDialect.</B><B><A HREF="../../../../../org/hibernate/dialect/PointbaseDialect.html#getLockingStrategy(org.hibernate.persister.entity.Lockable, org.hibernate.LockMode)">getLockingStrategy</A></B>(<A HREF="../../../../../org/hibernate/persister/entity/Lockable.html" title="interface in org.hibernate.persister.entity">Lockable</A> lockable,
<A HREF="../../../../../org/hibernate/LockMode.html" title="class in org.hibernate">LockMode</A> lockMode)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock">LockingStrategy</A></CODE></FONT></TD>
<TD><CODE><B>MckoiDialect.</B><B><A HREF="../../../../../org/hibernate/dialect/MckoiDialect.html#getLockingStrategy(org.hibernate.persister.entity.Lockable, org.hibernate.LockMode)">getLockingStrategy</A></B>(<A HREF="../../../../../org/hibernate/persister/entity/Lockable.html" title="interface in org.hibernate.persister.entity">Lockable</A> lockable,
<A HREF="../../../../../org/hibernate/LockMode.html" title="class in org.hibernate">LockMode</A> lockMode)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock">LockingStrategy</A></CODE></FONT></TD>
<TD><CODE><B>HSQLDialect.</B><B><A HREF="../../../../../org/hibernate/dialect/HSQLDialect.html#getLockingStrategy(org.hibernate.persister.entity.Lockable, org.hibernate.LockMode)">getLockingStrategy</A></B>(<A HREF="../../../../../org/hibernate/persister/entity/Lockable.html" title="interface in org.hibernate.persister.entity">Lockable</A> lockable,
<A HREF="../../../../../org/hibernate/LockMode.html" title="class in org.hibernate">LockMode</A> lockMode)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock">LockingStrategy</A></CODE></FONT></TD>
<TD><CODE><B>FrontBaseDialect.</B><B><A HREF="../../../../../org/hibernate/dialect/FrontBaseDialect.html#getLockingStrategy(org.hibernate.persister.entity.Lockable, org.hibernate.LockMode)">getLockingStrategy</A></B>(<A HREF="../../../../../org/hibernate/persister/entity/Lockable.html" title="interface in org.hibernate.persister.entity">Lockable</A> lockable,
<A HREF="../../../../../org/hibernate/LockMode.html" title="class in org.hibernate">LockMode</A> lockMode)</CODE>
<BR>
</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock">LockingStrategy</A></CODE></FONT></TD>
<TD><CODE><B>Dialect.</B><B><A HREF="../../../../../org/hibernate/dialect/Dialect.html#getLockingStrategy(org.hibernate.persister.entity.Lockable, org.hibernate.LockMode)">getLockingStrategy</A></B>(<A HREF="../../../../../org/hibernate/persister/entity/Lockable.html" title="interface in org.hibernate.persister.entity">Lockable</A> lockable,
<A HREF="../../../../../org/hibernate/LockMode.html" title="class in org.hibernate">LockMode</A> lockMode)</CODE>
<BR>
Get a strategy instance which knows how to acquire a database-level lock
of the specified mode for this dialect.</TD>
</TR>
</TABLE>
<P>
<A NAME="org.hibernate.dialect.lock"></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
Uses of <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock">LockingStrategy</A> in <A HREF="../../../../../org/hibernate/dialect/lock/package-summary.html">org.hibernate.dialect.lock</A></FONT></TD>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="<API key>">
<TD COLSPAN=2>Classes in <A HREF="../../../../../org/hibernate/dialect/lock/package-summary.html">org.hibernate.dialect.lock</A> that implement <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock">LockingStrategy</A></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/hibernate/dialect/lock/<API key>.html" title="class in org.hibernate.dialect.lock"><API key></A></B></CODE>
<BR>
A locking strategy where the locks are obtained through select statements.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE> class</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../org/hibernate/dialect/lock/<API key>.html" title="class in org.hibernate.dialect.lock"><API key></A></B></CODE>
<BR>
A locking strategy where the locks are obtained through update statements.</TD>
</TR>
</TABLE>
<P>
<A NAME="org.hibernate.persister.entity"></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
Uses of <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock">LockingStrategy</A> in <A HREF="../../../../../org/hibernate/persister/entity/package-summary.html">org.hibernate.persister.entity</A></FONT></TD>
</TR>
</TABLE>
<P>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="<API key>">
<TD COLSPAN=2>Methods in <A HREF="../../../../../org/hibernate/persister/entity/package-summary.html">org.hibernate.persister.entity</A> that return <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock">LockingStrategy</A></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock">LockingStrategy</A></CODE></FONT></TD>
<TD><CODE><B><API key>.</B><B><A HREF="../../../../../org/hibernate/persister/entity/<API key>.html#generateLocker(org.hibernate.LockMode)">generateLocker</A></B>(<A HREF="../../../../../org/hibernate/LockMode.html" title="class in org.hibernate">LockMode</A> lockMode)</CODE>
<BR>
</TD>
</TR>
</TABLE>
<P>
<HR>
<A NAME="navbar_bottom"></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=3 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="<API key>"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../org/hibernate/dialect/lock/LockingStrategy.html" title="interface in org.hibernate.dialect.lock"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../index.html" target="_top"><B>FRAMES</B></A>
<A HREF="LockingStrategy.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!
if(window==top) {
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<HR>
</BODY>
</HTML>
|
package com.krealid.starter.adapters;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.util.TypedValue;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebChromeClient;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import com.krealid.starter.R;
import butterknife.ButterKnife;
public class ActuExpendedAdapter extends RecyclerView.Adapter<ActuExpendedAdapter.ViewHolder> {
private String text;
private Context context;
private View view;
public ActuExpendedAdapter(String text, Context context){
this.text = text;
this.context = context;
}
@Override
public ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
view = LayoutInflater
.from(parent.getContext())
.inflate(R.layout.actu_text, parent,false);
return new ViewHolder(view);
}
@Override
public void onBindViewHolder(ViewHolder holder, int position) {
String iframeLink;
if(this.text.contains("<iframe")){
String iframeStart = "<iframe src=\"";
String iframeEnd = "\" width=";
int indexToStartIframe = this.text.indexOf(iframeStart);
int indexToEndIframe = (this.text.substring(indexToStartIframe)).indexOf(iframeEnd);
String iframeHeight = "height=\"";
int <API key>= this.text.indexOf(iframeHeight);
String iframeHeightValue = this.text.substring(<API key> + iframeHeight.length(),
this.text.indexOf('"', <API key> + iframeHeight.length()));
iframeLink = this.text.substring(indexToStartIframe + iframeStart.length(),
indexToStartIframe + indexToEndIframe);
String articleText = this.text.substring(0, indexToStartIframe);
holder.text.loadData("<font style=\"text-align:justify;text-justify:inter-word;\">" +
articleText + "</font>", "text/html; charset=UTF-8", null);
final RelativeLayout layout = new RelativeLayout(this.context);
RelativeLayout.LayoutParams lprams = new RelativeLayout.LayoutParams(
RelativeLayout.LayoutParams.WRAP_CONTENT,
RelativeLayout.LayoutParams.MATCH_PARENT);
layout.setLayoutParams(lprams);
WebView web1 = new WebView(this.context);
web1.setWebChromeClient(new WebChromeClient());
web1.getSettings().<API key>(true);
web1.getSettings().<API key>(true);
web1.getSettings().setPluginState(WebSettings.PluginState.ON);
web1.loadUrl(iframeLink);
web1.setId(R.id.myWebView);
int height = (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP,
Integer.parseInt(iframeHeightValue),
this.context.getResources().getDisplayMetrics());
final RelativeLayout.LayoutParams webViewParams = new RelativeLayout.LayoutParams(
ViewGroup.LayoutParams.MATCH_PARENT, height);
layout.addView(web1, webViewParams);
holder.articleContainer.addView(layout);
} else {
holder.text.loadData("<font style=\"text-align:justify;text-justify:inter-word;\">" +
this.text + "</font>", "text/html; charset=UTF-8", null);
}
}
@Override
public int getItemCount() {
return 1;
}
public void stopVideo(){
ViewHolder holder = new ViewHolder(view);
WebView mWebView = (WebView) holder.articleContainer.findViewById(R.id.myWebView);
if(mWebView != null)
mWebView.loadUrl("about:blank");
}
public static class ViewHolder extends RecyclerView.ViewHolder {
public WebView text;
public LinearLayout articleContainer;
public ViewHolder(View itemView) {
super(itemView);
text = ButterKnife.findById(itemView, R.id.articleContent);
articleContainer = ButterKnife.findById(itemView, R.id.article_container);
}
}
}
|
// PBObjcWrapper.h
// AppBootstrap
#import <Foundation/Foundation.h>
#ifdef __cplusplus
#import <google/protobuf/message.h>
#endif
@protocol PBObjcWrapper <NSObject>
-(instancetype) <API key>:(NSData*) data;
#ifdef __cplusplus
-(instancetype) initWithProtocolObj:(google::protobuf::Message *)pbobj;
#endif
-(NSData*) getProtocolData;
-(NSMutableDictionary*) asDict;
@end
|
# AUTOGENERATED FILE
FROM balenalib/<API key>:cosmic-build
ENV NODE_VERSION 12.20.1
ENV YARN_VERSION 1.22.4
RUN for key in \
<API key> \
; do \
gpg --keyserver pgp.mit.edu --recv-keys "$key" || \
gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" ; \
done \
&& curl -SLO "http://nodejs.org/dist/v$NODE_VERSION/node-v$<API key>.tar.gz" \
&& echo "<SHA256-like> node-v$<API key>.tar.gz" | sha256sum -c - \
&& tar -xzf "node-v$<API key>.tar.gz" -C /usr/local --strip-components=1 \
&& rm "node-v$<API key>.tar.gz" \
&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz" \
&& curl -fSLO --compressed "https://yarnpkg.com/downloads/$YARN_VERSION/yarn-v$YARN_VERSION.tar.gz.asc" \
&& gpg --batch --verify yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& mkdir -p /opt/yarn \
&& tar -xzf yarn-v$YARN_VERSION.tar.gz -C /opt/yarn --strip-components=1 \
&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarn \
&& ln -s /opt/yarn/bin/yarn /usr/local/bin/yarnpkg \
&& rm yarn-v$YARN_VERSION.tar.gz.asc yarn-v$YARN_VERSION.tar.gz \
&& npm config set unsafe-perm true -g --unsafe-perm \
|
package storage
import (
"io/ioutil"
"log"
"os"
"path/filepath"
"testing"
)
func <API key>(t *testing.T) {
dir, err := ioutil.TempDir("", "example")
if err != nil {
log.Fatal(err)
}
defer os.RemoveAll(dir)
file := filepath.Join(dir, "temp.db")
store := &BoltDBStore{}
store.Open(file)
store.SetBinlogPosition(&BinlogInformation{File: "binlog001.log", Position: 1234567890})
binlogInfo, err := store.GetBinlogPosition()
if err != nil || binlogInfo.File != "binlog001.log" || binlogInfo.Position != 1234567890 {
t.Error("failed")
}
}
|
#include "grib_api_internal.h"
/*
This is used by make_class.pl
START_CLASS_DEF
CLASS = accessor
SUPER = <API key>
IMPLEMENTS = unpack_long
IMPLEMENTS = init
MEMBERS = const char* numberOfValues
MEMBERS = const char* bitsPerValue
MEMBERS = const char* offsetBeforeData
MEMBERS = const char* offsetAfterData
MEMBERS = const char* unusedBits
END_CLASS_DEF
*/
/* START_CLASS_IMP */
/*
Don't edit anything between START_CLASS_IMP and END_CLASS_IMP
Instead edit values between START_CLASS_DEF and END_CLASS_DEF
or edit "accessor.class" and rerun ./make_class.pl
*/
static int unpack_long(grib_accessor*, long* val,size_t *len);
static void init(grib_accessor*,const long, grib_arguments* );
static void init_class(grib_accessor_class*);
typedef struct <API key> {
grib_accessor att;
/* Members defined in gen */
/* Members defined in long */
/* Members defined in <API key> */
const char* numberOfValues;
const char* bitsPerValue;
const char* offsetBeforeData;
const char* offsetAfterData;
const char* unusedBits;
} <API key>;
extern grib_accessor_class* <API key>;
static grib_accessor_class <API key> = {
&<API key>, /* super */
"<API key>", /* name */
sizeof(<API key>), /* size */
0, /* inited */
&init_class, /* init_class */
&init, /* init */
0, /* post_init */
0, /* free mem */
0, /* describes himself */
0, /* get length of section */
0, /* get length of string */
0, /* get number of values */
0, /* get number of bytes */
0, /* get offset to bytes */
0, /* get native type */
0, /* get sub_section */
0, /* grib_pack procedures long */
0, /* grib_pack procedures long */
0, /* grib_pack procedures long */
&unpack_long, /* grib_unpack procedures long */
0, /* grib_pack procedures double */
0, /* grib_unpack procedures double */
0, /* grib_pack procedures string */
0, /* grib_unpack procedures string */
0, /* grib_pack procedures bytes */
0, /* grib_unpack procedures bytes */
0, /* pack_expression */
0, /* notify_change */
0, /* update_size */
0, /* preferred_size */
0, /* resize */
0, /* <API key> */
0, /* next accessor */
0, /* compare vs. another accessor */
0, /* unpack only ith value */
0, /* unpack a subarray */
0, /* clear */
};
grib_accessor_class* <API key> = &<API key>;
static void init_class(grib_accessor_class* c)
{
c->dump = (*(c->super))->dump;
c->next_offset = (*(c->super))->next_offset;
c->string_length = (*(c->super))->string_length;
c->value_count = (*(c->super))->value_count;
c->byte_count = (*(c->super))->byte_count;
c->byte_offset = (*(c->super))->byte_offset;
c->get_native_type = (*(c->super))->get_native_type;
c->sub_section = (*(c->super))->sub_section;
c->pack_missing = (*(c->super))->pack_missing;
c->is_missing = (*(c->super))->is_missing;
c->pack_long = (*(c->super))->pack_long;
c->pack_double = (*(c->super))->pack_double;
c->unpack_double = (*(c->super))->unpack_double;
c->pack_string = (*(c->super))->pack_string;
c->unpack_string = (*(c->super))->unpack_string;
c->pack_bytes = (*(c->super))->pack_bytes;
c->unpack_bytes = (*(c->super))->unpack_bytes;
c->pack_expression = (*(c->super))->pack_expression;
c->notify_change = (*(c->super))->notify_change;
c->update_size = (*(c->super))->update_size;
c->preferred_size = (*(c->super))->preferred_size;
c->resize = (*(c->super))->resize;
c-><API key> = (*(c->super))-><API key>;
c->next = (*(c->super))->next;
c->compare = (*(c->super))->compare;
c-><API key> = (*(c->super))-><API key>;
c-><API key> = (*(c->super))-><API key>;
c->clear = (*(c->super))->clear;
}
/* END_CLASS_IMP */
static void init(grib_accessor* a,const long l, grib_arguments* c)
{
int n=0;
<API key>* self = (<API key>*)a;
self->bitsPerValue = <API key>(a->parent->h,c,n++);
self->offsetBeforeData = <API key>(a->parent->h,c,n++);
self->offsetAfterData = <API key>(a->parent->h,c,n++);
self->unusedBits = <API key>(a->parent->h,c,n++);
self->numberOfValues = <API key>(a->parent->h,c,n++);
a->flags |= <API key>;
a->flags |= <API key>;
a->length=0;
}
static int unpack_long(grib_accessor* a, long* val, size_t *len)
{
int ret=GRIB_SUCCESS;
long bpv=0;
long offsetBeforeData=0,offsetAfterData=0,unusedBits=0,numberOfValues;
<API key>* self = (<API key>*)a;
if((ret = <API key>(a->parent->h, self->bitsPerValue,&bpv)) != GRIB_SUCCESS)
return ret;
if((ret = <API key>(a->parent->h, self->offsetBeforeData,&offsetBeforeData)) != GRIB_SUCCESS)
return ret;
if((ret = <API key>(a->parent->h, self->offsetAfterData,&offsetAfterData)) != GRIB_SUCCESS)
return ret;
if((ret = <API key>(a->parent->h, self->unusedBits,&unusedBits)) != GRIB_SUCCESS)
return ret;
if ( bpv != 0 ) {
grib_context_log(a->parent->h->context,GRIB_LOG_DEBUG,"<API key>: offsetAfterData=%ld offsetBeforeData=%ld unusedBits=%ld bpv=%ld\n",
offsetAfterData,offsetBeforeData,unusedBits,bpv);
*val=((<API key>)*8-unusedBits)/bpv;
} else {
if((ret = <API key>(a->parent->h, self->numberOfValues,&numberOfValues)) != GRIB_SUCCESS)
return ret;
*val=numberOfValues;
}
return ret;
}
|
#include "SkBigPicture.h"
#include "SkData.h"
#include "SkDrawable.h"
#include "SkLayerInfo.h"
#include "SkPictureRecorder.h"
#include "SkPictureUtils.h"
#include "SkRecord.h"
#include "SkRecordDraw.h"
#include "SkRecordOpts.h"
#include "SkRecorder.h"
#include "SkTypes.h"
SkPictureRecorder::SkPictureRecorder() {
fActivelyRecording = false;
fRecorder.reset(new SkRecorder(nullptr, SkRect::MakeWH(0, 0), &fMiniRecorder));
}
SkPictureRecorder::~SkPictureRecorder() {}
SkCanvas* SkPictureRecorder::beginRecording(const SkRect& cullRect,
SkBBHFactory* bbhFactory /* = nullptr */,
uint32_t recordFlags ) {
fCullRect = cullRect;
fFlags = recordFlags;
if (bbhFactory) {
fBBH.reset((*bbhFactory)(cullRect));
SkASSERT(fBBH.get());
}
if (!fRecord) {
fRecord.reset(new SkRecord);
}
SkRecorder::DrawPictureMode dpm = (recordFlags & <API key>)
? SkRecorder::<API key>
: SkRecorder::<API key>;
fRecorder->reset(fRecord.get(), cullRect, dpm, &fMiniRecorder);
fActivelyRecording = true;
return this->getRecordingCanvas();
}
SkCanvas* SkPictureRecorder::getRecordingCanvas() {
return fActivelyRecording ? fRecorder.get() : nullptr;
}
sk_sp<SkPicture> SkPictureRecorder::<API key>() {
fActivelyRecording = false;
fRecorder->restoreToCount(1); // If we were missing any restores, add them now.
if (fRecord->count() == 0) {
return fMiniRecorder.detachAsPicture(fCullRect);
}
// TODO: delay as much of this work until just before first playback?
SkRecordOptimize(fRecord);
SkAutoTUnref<SkLayerInfo> saveLayerData;
if (fBBH && (fFlags & <API key>)) {
saveLayerData.reset(new SkLayerInfo);
}
SkDrawableList* drawableList = fRecorder->getDrawableList();
SkBigPicture::SnapshotArray* pictList =
drawableList ? drawableList->newDrawableSnapshot() : nullptr;
if (fBBH.get()) {
SkAutoTMalloc<SkRect> bounds(fRecord->count());
if (saveLayerData) {
<API key>(fCullRect, *fRecord, bounds, pictList, saveLayerData);
} else {
SkRecordFillBounds(fCullRect, *fRecord, bounds);
}
fBBH->insert(bounds, fRecord->count());
// Now that we've calculated content bounds, we can update fCullRect, often trimming it.
// TODO: get updated fCullRect from bounds instead of forcing the BBH to return it?
SkRect bbhBound = fBBH->getRootBound();
SkASSERT((bbhBound.isEmpty() || fCullRect.contains(bbhBound))
|| (bbhBound.isEmpty() && fCullRect.isEmpty()));
fCullRect = bbhBound;
}
size_t subPictureBytes = fRecorder-><API key>();
for (int i = 0; pictList && i < pictList->count(); i++) {
subPictureBytes += SkPictureUtils::<API key>(pictList->begin()[i]);
}
return sk_make_sp<SkBigPicture>(fCullRect, fRecord.release(), pictList, fBBH.release(),
saveLayerData.release(), subPictureBytes);
}
sk_sp<SkPicture> SkPictureRecorder::<API key>(const SkRect& cullRect) {
fCullRect = cullRect;
return this-><API key>();
}
void SkPictureRecorder::partialReplay(SkCanvas* canvas) const {
if (nullptr == canvas) {
return;
}
int drawableCount = 0;
SkDrawable* const* drawables = nullptr;
SkDrawableList* drawableList = fRecorder->getDrawableList();
if (drawableList) {
drawableCount = drawableList->count();
drawables = drawableList->begin();
}
SkRecordDraw(*fRecord, canvas, nullptr, drawables, drawableCount, nullptr/*bbh*/, nullptr/*callback*/);
}
class SkRecordedDrawable : public SkDrawable {
SkAutoTUnref<SkRecord> fRecord;
SkAutoTUnref<SkBBoxHierarchy> fBBH;
SkAutoTDelete<SkDrawableList> fDrawableList;
const SkRect fBounds;
const bool fDoSaveLayerInfo;
public:
SkRecordedDrawable(SkRecord* record, SkBBoxHierarchy* bbh, SkDrawableList* drawableList,
const SkRect& bounds, bool doSaveLayerInfo)
: fRecord(SkRef(record))
, fBBH(SkSafeRef(bbh))
, fDrawableList(drawableList) // we take ownership
, fBounds(bounds)
, fDoSaveLayerInfo(doSaveLayerInfo)
{}
protected:
SkRect onGetBounds() override { return fBounds; }
void onDraw(SkCanvas* canvas) override {
SkDrawable* const* drawables = nullptr;
int drawableCount = 0;
if (fDrawableList) {
drawables = fDrawableList->begin();
drawableCount = fDrawableList->count();
}
SkRecordDraw(*fRecord, canvas, nullptr, drawables, drawableCount, fBBH, nullptr/*callback*/);
}
SkPicture* <API key>() override {
SkBigPicture::SnapshotArray* pictList = nullptr;
if (fDrawableList) {
// TODO: should we plumb-down the BBHFactory and recordFlags from our host
// PictureRecorder?
pictList = fDrawableList->newDrawableSnapshot();
}
SkAutoTUnref<SkLayerInfo> saveLayerData;
if (fBBH && fDoSaveLayerInfo) {
// TODO: can we avoid work by not allocating / filling these bounds?
SkAutoTMalloc<SkRect> scratchBounds(fRecord->count());
saveLayerData.reset(new SkLayerInfo);
<API key>(fBounds, *fRecord, scratchBounds, pictList, saveLayerData);
}
size_t subPictureBytes = 0;
for (int i = 0; pictList && i < pictList->count(); i++) {
subPictureBytes += SkPictureUtils::<API key>(pictList->begin()[i]);
}
// SkBigPicture will take ownership of a ref on both fRecord and fBBH.
// We're not willing to give up our ownership, so we must ref them for SkPicture.
return new SkBigPicture(fBounds, SkRef(fRecord.get()), pictList, SkSafeRef(fBBH.get()),
saveLayerData.release(), subPictureBytes);
}
};
sk_sp<SkDrawable> SkPictureRecorder::<API key>() {
fActivelyRecording = false;
fRecorder->flushMiniRecorder();
fRecorder->restoreToCount(1); // If we were missing any restores, add them now.
// TODO: delay as much of this work until just before first playback?
SkRecordOptimize(fRecord);
if (fBBH.get()) {
SkAutoTMalloc<SkRect> bounds(fRecord->count());
SkRecordFillBounds(fCullRect, *fRecord, bounds);
fBBH->insert(bounds, fRecord->count());
}
sk_sp<SkDrawable> drawable =
sk_make_sp<SkRecordedDrawable>(fRecord, fBBH, fRecorder->detachDrawableList(), fCullRect,
SkToBool(fFlags & <API key>));
// release our refs now, so only the drawable will be the owner.
fRecord.reset(nullptr);
fBBH.reset(nullptr);
return drawable;
}
|
using System;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.Text;
namespace gov.va.medora.mdo.dao
{
public interface IEncounterDao
{
Appointment[] getAppointments();
Appointment[] getAppointments(string pid);
Appointment[] <API key>();
Appointment[] <API key>(string pid);
Appointment[] getAppointments(int pastDays, int futureDays);
Appointment[] getAppointments(string pid, int pastDays, int futureDays);
Appointment[] <API key>();
string getAppointmentText(string apptId);
string getAppointmentText(string pid, string apptId);
Adt[] getInpatientMoves(string fromDate, string toDate);
Adt[] <API key>(string checkinId);
Adt[] getInpatientMoves();
Adt[] getInpatientMoves(string pid);
Adt[] getInpatientMoves(string fromDate, string toDate, string iterLength);
// Depreciate to <API key>
HospitalLocation[] lookupLocations(string target, string direction);
StringDictionary <API key>(string target);
string getLocationId(string locationName);
HospitalLocation[] getWards();
HospitalLocation[] getClinics(string target, string direction);
InpatientStay[] getStaysForWard(string wardId);
Drg[] getDRGRecords();
Visit[] getOutpatientVisits();
Visit[] getOutpatientVisits(string pid);
Visit[] getVisits(string fromDate, string toDate);
Visit[] getVisits(string pid, string fromDate, string toDate);
Visit[] getVisitsForDay(string theDate);
Visit[] <API key>();
InpatientStay[] getAdmissions();
InpatientStay[] getAdmissions(string pid);
string <API key>(string initialCategory, string locationIen, bool outpatient);
string <API key>(string fromDate, string toDate, int nrpts);
string <API key>(string pid, string fromDate, string toDate, int nrpts);
string getAdmissionsReport(string fromDate, string toDate, int nrpts);
string getAdmissionsReport(string pid, string fromDate, string toDate, int nrpts);
string <API key>(string fromDate, string toDate, int nrpts);
string <API key>(string pid, string fromDate, string toDate, int nrpts);
string getDischargesReport(string fromDate, string toDate, int nrpts);
string getDischargesReport(string pid, string fromDate, string toDate, int nrpts);
string getTransfersReport(string fromDate, string toDate, int nrpts);
string getTransfersReport(string pid, string fromDate, string toDate, int nrpts);
string <API key>(string fromDate, string toDate, int nrpts);
string <API key>(string pid, string fromDate, string toDate, int nrpts);
string <API key>(string fromDate, string toDate, int nrpts);
string <API key>(string pid, string fromDate, string toDate, int nrpts);
string <API key>(string fromDate, string toDate, int nrpts);
string <API key>(string pid, string fromDate, string toDate, int nrpts);
string getCareTeamReport();
string getCareTeamReport(string pid);
string <API key>(string fromDate, string toDate, int nrpts);
string <API key>(string pid, string fromDate, string toDate, int nrpts);
IcdReport[] <API key>(string fromDate, string toDate, int nrpts);
IcdReport[] <API key>(string pid, string fromDate, string toDate, int nrpts);
IcdReport[] getIcdSurgeryReport(string fromDate, string toDate, int nrpts);
IcdReport[] getIcdSurgeryReport(string pid, string fromDate, string toDate, int nrpts);
string getCompAndPenReport(string fromDate, string toDate, int nrpts);
string getCompAndPenReport(string pid, string fromDate, string toDate, int nrpts);
DictionaryHashList getSpecialties();
DictionaryHashList getTeams();
Adt[] <API key>(string pid);
InpatientStay[] <API key>(string fromDate, string toDate);
InpatientStay getStayMovements(string checkinId);
Site[] getSiteDivisions(string siteId);
PatientCareTeam <API key>(string station);
}
}
|
package org.webrtc;
@JNINamespace("webrtc::jni")
class VP8Decoder extends <API key> {
@Override
long createNativeDecoder() {
return nativeCreateDecoder();
}
static native long nativeCreateDecoder();
}
|
using System.Collections.Generic;
using Amazon.DynamoDBv2.Model;
using AwsTools;
using IndexBackend;
namespace SlideshowCreator.AwsAccess
{
class DynamoDbInsert
{
public const int BATCH_SIZE = 25;
public static Dictionary<string, List<WriteRequest>> GetBatchInserts<T>(List<T> pocoModels) where T : IModel, new()
{
var batchWrite = new Dictionary<string, List<WriteRequest>> { [new T().GetTable()] = new List<WriteRequest>() };
foreach (var pocoModel in pocoModels)
{
var dyamoDbModel = Conversion<T>.ConvertToDynamoDb(pocoModel);
var putRequest = new PutRequest(dyamoDbModel);
var writeRequest = new WriteRequest(putRequest);
batchWrite[new T().GetTable()].Add(writeRequest);
}
return batchWrite;
}
}
}
|
# Security Templates for AWS CloudFormation
Find the documentation here: http://templates.cloudonaut.io/en/stable/security/
## Developer notes
RegionMap
To update the region map execute the following lines in your terminal:
$ regions=$(aws ec2 describe-regions --query "Regions[].RegionName" --output text)
$ for region in $regions; do ami=$(aws --region $region ec2 describe-images --filters "Name=name,Values=amzn-ami-hvm-2017.03.1.20170623-x86_64-gp2" --query "Images[0].ImageId" --output "text"); printf "'$region':\n AMI: '$ami'\n"; done
## Premium Support
We offer Premium Support for our CloudFormation templates: setting up environments based on our templates, adopting templates to specific use cases, resolving issues in production environments. [Hire us!](https://widdix.net/)
## About
A [cloudonaut.io](https:
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_151) on Sat Mar 16 04:11:58 MST 2019 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Package org.wildfly.swarm.messaging (BOM: * : All 2.3.1.Final-SNAPSHOT API)</title>
<meta name="date" content="2019-03-16">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Package org.wildfly.swarm.messaging (BOM: * : All 2.3.1.Final-SNAPSHOT API)";
}
}
catch(err) {
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Use</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">Thorntail API, 2.3.1.Final-SNAPSHOT</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/wildfly/swarm/messaging/package-use.html" target="_top">Frames</a></li>
<li><a href="package-use.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.top">
</a></div>
<div class="header">
<h1 title="Uses of Package org.wildfly.swarm.messaging" class="title">Uses of Package<br>org.wildfly.swarm.messaging</h1>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../org/wildfly/swarm/messaging/package-summary.html">org.wildfly.swarm.messaging</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#org.wildfly.swarm.messaging">org.wildfly.swarm.messaging</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="org.wildfly.swarm.messaging">
</a>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation">
<caption><span>Classes in <a href="../../../../org/wildfly/swarm/messaging/package-summary.html">org.wildfly.swarm.messaging</a> used by <a href="../../../../org/wildfly/swarm/messaging/package-summary.html">org.wildfly.swarm.messaging</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Class and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colOne"><a href="../../../../org/wildfly/swarm/messaging/class-use/EnhancedServer.html#org.wildfly.swarm.messaging">EnhancedServer</a> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><a href="../../../../org/wildfly/swarm/messaging/class-use/<API key>.html#org.wildfly.swarm.messaging"><API key></a> </td>
</tr>
<tr class="altColor">
<td class="colOne"><a href="../../../../org/wildfly/swarm/messaging/class-use/MessagingFraction.html#org.wildfly.swarm.messaging">MessagingFraction</a> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><a href="../../../../org/wildfly/swarm/messaging/class-use/MessagingServer.html#org.wildfly.swarm.messaging">MessagingServer</a> </td>
</tr>
<tr class="altColor">
<td class="colOne"><a href="../../../../org/wildfly/swarm/messaging/class-use/RemoteConnection.html#org.wildfly.swarm.messaging">RemoteConnection</a>
<div class="block">Details for a remote message-queue connection.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colOne"><a href="../../../../org/wildfly/swarm/messaging/class-use/RemoteConnection.Consumer.html#org.wildfly.swarm.messaging">RemoteConnection.Consumer</a>
<div class="block">Configuration functional interface for container-supplied objects.</div>
</td>
</tr>
<tr class="altColor">
<td class="colOne"><a href="../../../../org/wildfly/swarm/messaging/class-use/RemoteConnection.Supplier.html#org.wildfly.swarm.messaging">RemoteConnection.Supplier</a>
<div class="block">Supplier functional interface for user-supplied object.</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</div>
<div class="bottomNav"><a name="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li class="navBarCell1Rev">Use</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-all.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">Thorntail API, 2.3.1.Final-SNAPSHOT</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/wildfly/swarm/messaging/package-use.html" target="_top">Frames</a></li>
<li><a href="package-use.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.bottom">
</a></div>
<p class="legalCopy"><small>Copyright &
</body>
</html>
|
<!DOCTYPE HTML>
<html>
<head>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<meta charset="utf-8">
<base href="../../../../../../">
<script src="resources/sap/ui/test/starter/runTest.js"
<API key>="test-resources/sap/ui/mdc/qunit/field/testsuite.field.qunit"
data-sap-ui-test="<API key>"></script>
</head>
<body>
<div id="qunit"></div>
<div id="content"></div>
</body>
</html>
|
package org.jboss.resteasy.test;
import org.jboss.resteasy.client.jaxrs.<API key>;
import org.jboss.resteasy.client.jaxrs.ResteasyWebTarget;
import org.jboss.resteasy.util.PortProvider;
import java.net.<API key>;
import java.net.URI;
import java.net.URL;
import javax.ws.rs.client.ClientBuilder;
/**
* Test utility class
*
* @author <a href="justin@justinedelson.com">Justin Edelson</a>
* @version $Revision$
*/
public class TestPortProvider
{
/**
* Creates a ResteasyWebTarget using base request path.
*/
public static ResteasyWebTarget createTarget(String path)
{
return (ResteasyWebTarget) ClientBuilder.newClient().target(generateURL(path));
}
/**
* Create a Resteasy client proxy with an empty base request path.
*
* @param clazz the client interface class
* @return the proxy object
*/
public static <T> T createProxy(Class<T> clazz)
{
return createProxy(clazz, generateBaseUrl());
}
/**
* Create a Resteasy client proxy.
*
* @param clazz the client interface class
* @return the proxy object
* @path the base request path
*/
public static <T> T createProxy(Class<T> clazz, String url)
{
ResteasyWebTarget target = (ResteasyWebTarget) <API key>.newClient().target(url);
return target.proxy(clazz);
}
/**
* Create a URI for the provided path, using the configured port
*
* @param path the request path
* @return a full URI
*/
public static URI createURI(String path)
{
return URI.create(generateURL(path));
}
/**
* Create a URL for the provided path, using the configured port
*
* @param path the request path
* @return a full URL
*/
public static URL createURL(String path) throws <API key>
{
return new URL(generateURL(path));
}
/**
* Generate a base URL incorporating the configured port.
*
* @return a full URL
*/
public static String generateBaseUrl()
{
return generateURL("");
}
/**
* Generate a URL incorporating the configured port.
*
* @param path the path
* @return a full URL
*/
public static String generateURL(String path)
{
return String.format("http://%s:%d%s", getHost(), getPort(), path);
}
/**
* Look up the configured port number, first checking an environment variable (RESTEASY_PORT),
* then a system property (org.jboss.resteasy.port), and finally the default port (8081).
*
* @return the port number specified in either the environment or system properties
*/
public static int getPort()
{
return PortProvider.getPort();
}
/**
* Look up the configured hostname, first checking an environment variable (RESTEASY_HOST),
* then a system property (org.jboss.resteasy.host), and finally the default hostname (localhost).
*
* @return the host specified in either the environment or system properties
*/
public static String getHost()
{
return PortProvider.getHost();
}
}
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_111) on Wed Jan 04 22:31:13 EST 2017 -->
<title><API key></title>
<meta name="date" content="2017-01-04">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="<API key>";
}
}
catch(err) {
}
var methods = {"i0":10,"i1":10,"i2":10,"i3":9,"i4":10,"i5":10,"i6":10,"i7":10};
var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/<API key>.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../org/drip/optimization/constrained/<API key>.html" title="class in org.drip.optimization.constrained"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/drip/optimization/constrained/<API key>.html" target="_top">Frames</a></li>
<li><a href="<API key>.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.top">
</a></div>
<div class="header">
<div class="subTitle">org.drip.optimization.constrained</div>
<h2 title="Class <API key>" class="title">Class <API key></h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.drip.optimization.constrained.<API key></li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="typeNameLabel"><API key></span>
extends java.lang.Object</pre>
<div class="block"><API key> holds the Array of the Fritz John/KKT Multipliers for the Array of the Equality and
the Inequality Constraints, one per each Constraint. The References are:
- Boyd, S., and L. van den Berghe (2009): Convex Optimization, Cambridge University Press, Cambridge UK.
- Eustaquio, R., E. Karas, and A. Ribeiro (2008): Constraint Qualification for Nonlinear Programming,
Technical Report, Federal University of Parana.
- Karush, A. (1939): Minima of Functions of Several Variables with Inequalities as Side Constraints,
M. Sc., University of Chicago, Chicago IL.
- Kuhn, H. W., and A. W. Tucker (1951): Nonlinear Programming, Proceedings of the Second Berkeley
Symposium, University of California, Berkeley CA 481-492.
- Ruszczynski, A. (2006): Nonlinear Optimization, Princeton University Press, Princeton NJ.</div>
<dl>
<dt><span class="simpleTagLabel">Author:</span></dt>
<dd>Lakshmi Krishnamurthy</dd>
</dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../org/drip/optimization/constrained/<API key>.html#<API key>:A-double:A-"><API key></a></span>(double <API key>,
double[] adblEquality,
double[] adblInequality)</code>
<div class="block"><API key> Constructor</div>
</td>
</tr>
</table>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="method.summary">
</a>
<h3>Method Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/drip/optimization/constrained/<API key>.html#<API key>--"><API key></a></span>()</code>
<div class="block">Indicate of the Multipliers constitute Valid Dual Feasibility</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code>double[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/drip/optimization/constrained/<API key>.html#<API key>--"><API key></a></span>()</code>
<div class="block">Retrieve the Array of the Equality Constraint Coefficients</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>double[]</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/drip/optimization/constrained/<API key>.html#<API key>--"><API key></a></span>()</code>
<div class="block">Retrieve the Array of the Inequality Constraint Coefficients</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>static <a href="../../../../org/drip/optimization/constrained/<API key>.html" title="class in org.drip.optimization.constrained"><API key></a></code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/drip/optimization/constrained/<API key>.html#<API key>:A-double:A-">KarushKuhnTucker</a></span>(double[] adblEquality,
double[] adblInequality)</code>
<div class="block">Construct a Standard KarushKuhnTucker (KKT) Instance of the Fritz John Multipliers</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/drip/optimization/constrained/<API key>.html#<API key>--"><API key></a></span>()</code>
<div class="block">Retrieve the Number of Equality Multiplier Coefficients</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/drip/optimization/constrained/<API key>.html#<API key>--"><API key></a></span>()</code>
<div class="block">Retrieve the Number of Inequality Multiplier Coefficients</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/drip/optimization/constrained/<API key>.html#<API key>--"><API key></a></span>()</code>
<div class="block">Retrieve the Number of Total KKT Multiplier Coefficients</div>
</td>
</tr>
<tr id="i7" class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../org/drip/optimization/constrained/<API key>.html#<API key>--"><API key></a></span>()</code>
<div class="block">Retrieve the Fritz John Objective Function Multiplier</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
</a>
<h3>Constructor Detail</h3>
<a name="<API key>:A-double:A-">
</a>
<ul class="blockListLast">
<li class="blockList">
<h4><API key></h4>
<pre>public <API key>(double <API key>,
double[] adblEquality,
double[] adblInequality)
throws java.lang.Exception</pre>
<div class="block"><API key> Constructor</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code><API key></code> - The Objective Function Coefficient</dd>
<dd><code>adblEquality</code> - Array of the Equality Constraint Coefficients</dd>
<dd><code>adblInequality</code> - Array of the Inequality Constraint Coefficients</dd>
<dt><span class="throwsLabel">Throws:</span></dt>
<dd><code>java.lang.Exception</code> - Thrown if the Inputs are Invalid</dd>
</dl>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="method.detail">
</a>
<h3>Method Detail</h3>
<a name="<API key>:A-double:A-">
</a>
<ul class="blockList">
<li class="blockList">
<h4>KarushKuhnTucker</h4>
<pre>public static final <a href="../../../../org/drip/optimization/constrained/<API key>.html" title="class in org.drip.optimization.constrained"><API key></a> KarushKuhnTucker(double[] adblEquality,
double[] adblInequality)</pre>
<div class="block">Construct a Standard KarushKuhnTucker (KKT) Instance of the Fritz John Multipliers</div>
<dl>
<dt><span class="paramLabel">Parameters:</span></dt>
<dd><code>adblEquality</code> - Array of the Equality Constraint Coefficients</dd>
<dd><code>adblInequality</code> - Array of the Inequality Constraint Coefficients</dd>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The KKT Instance of Fritz John Multipliers</dd>
</dl>
</li>
</ul>
<a name="<API key>
</a>
<ul class="blockList">
<li class="blockList">
<h4><API key></h4>
<pre>public double <API key>()</pre>
<div class="block">Retrieve the Fritz John Objective Function Multiplier</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The Fritz John Objective Function Multiplier</dd>
</dl>
</li>
</ul>
<a name="<API key>
</a>
<ul class="blockList">
<li class="blockList">
<h4><API key></h4>
<pre>public double[] <API key>()</pre>
<div class="block">Retrieve the Array of the Equality Constraint Coefficients</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The Array of the Equality Constraint Coefficients</dd>
</dl>
</li>
</ul>
<a name="<API key>
</a>
<ul class="blockList">
<li class="blockList">
<h4><API key></h4>
<pre>public double[] <API key>()</pre>
<div class="block">Retrieve the Array of the Inequality Constraint Coefficients</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The Array of the Inequality Constraint Coefficients</dd>
</dl>
</li>
</ul>
<a name="<API key>
</a>
<ul class="blockList">
<li class="blockList">
<h4><API key></h4>
<pre>public int <API key>()</pre>
<div class="block">Retrieve the Number of Equality Multiplier Coefficients</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The Number of Equality Multiplier Coefficients</dd>
</dl>
</li>
</ul>
<a name="<API key>
</a>
<ul class="blockList">
<li class="blockList">
<h4><API key></h4>
<pre>public int <API key>()</pre>
<div class="block">Retrieve the Number of Inequality Multiplier Coefficients</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The Number of Inequality Multiplier Coefficients</dd>
</dl>
</li>
</ul>
<a name="<API key>
</a>
<ul class="blockList">
<li class="blockList">
<h4><API key></h4>
<pre>public int <API key>()</pre>
<div class="block">Retrieve the Number of Total KKT Multiplier Coefficients</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>The Number of Total KKT Multiplier Coefficients</dd>
</dl>
</li>
</ul>
<a name="<API key>
</a>
<ul class="blockListLast">
<li class="blockList">
<h4><API key></h4>
<pre>public boolean <API key>()</pre>
<div class="block">Indicate of the Multipliers constitute Valid Dual Feasibility</div>
<dl>
<dt><span class="returnLabel">Returns:</span></dt>
<dd>TRUE - The Multipliers constitute Valid Dual Feasibility</dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="bottomNav"><a name="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/<API key>.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev Class</li>
<li><a href="../../../../org/drip/optimization/constrained/<API key>.html" title="class in org.drip.optimization.constrained"><span class="typeNameLink">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/drip/optimization/constrained/<API key>.html" target="_top">Frames</a></li>
<li><a href="<API key>.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor.summary">Constr</a> | </li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor.detail">Constr</a> | </li>
<li><a href="#method.detail">Method</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
</a></div>
</body>
</html>
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading.Tasks;
using Windows.Web.Syndication;
namespace DncShowcaseHub.DataModel
{
class FeedItemIterator
{
private SyndicationFeed feed;
private int index;
public FeedItemIterator()
{
this.feed = null;
this.index = 0;
}
public void AttachFeed(SyndicationFeed feed)
{
this.feed = feed;
this.index = 0;
}
public bool MoveNext()
{
if (feed != null && index < feed.Items.Count - 1)
{
index++;
return true;
}
return false;
}
public void MovePrevious()
{
if (feed != null && index > 0)
{
index
}
}
public bool HasElements()
{
return feed != null && feed.Items.Count > 0;
}
public string GetTitle()
{
// Nothing to return yet.
if (!HasElements())
{
return "(no title)";
}
if (feed.Items[index].Title != null)
{
return WebUtility.HtmlDecode(feed.Items[index].Title.Text);
}
return "(no title)";
}
public string GetContent()
{
// Nothing to return yet.
if (!HasElements())
{
return "(no value)";
}
if ((feed.Items[index].Content != null) && (feed.Items[index].Content.Text != null))
{
return feed.Items[index].Content.Text;
}
else if (feed.Items[index].Summary != null && !string.IsNullOrEmpty(feed.Items[index].Summary.Text))
{
return feed.Items[index].Summary.Text;
}
return "(no value)";
}
public string GetIndexDescription()
{
// Nothing to return yet.
if (!HasElements())
{
return "0 of 0";
}
return String.Format("{0} of {1}", index + 1, feed.Items.Count);
}
public Uri GetEditUri()
{
// Nothing to return yet.
if (!HasElements())
{
return null;
}
return feed.Items[index].EditUri;
}
public SyndicationItem GetSyndicationItem()
{
// Nothing to return yet.
if (!HasElements())
{
return null;
}
return feed.Items[index];
}
internal string GetAuthor()
{
if (feed.Items[index].Authors != null &&
feed.Items[index].Authors.Count > 0)
{
string authors = "";
foreach (var author in feed.Items[index].Authors)
{
authors += (author.NodeValue + ",");
}
return authors.TrimEnd(',');
}
return "";
}
internal string GetUrlPath()
{
if (feed.Items[index].Links != null &&
feed.Items[index].Links.Count > 0)
{
return feed.Items[index].Links[0].Uri.AbsoluteUri;
}
return "";
}
}
}
|
<?php
namespace db2eav\Classes;
class Value extends ValueBase {
public function __construct(){
}
public function __destruct(){
}
}
|
package com.xiaochen.progressroundbutton;
import android.animation.Animator;
import android.animation.AnimatorSet;
import android.animation.TimeInterpolator;
import android.animation.ValueAnimator;
import android.annotation.TargetApi;
import android.content.Context;
import android.content.res.TypedArray;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.LinearGradient;
import android.graphics.Paint;
import android.graphics.RectF;
import android.graphics.Shader;
import android.os.Build;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.v4.view.animation.<API key>;
import android.util.AttributeSet;
import android.widget.TextView;
public class <API key> extends TextView {
private Context mContext;
private Paint mBackgroundPaint;
private volatile Paint mTextPaint;
private Paint mDot1Paint;
private Paint mDot2Paint;
private int[] mBackgroundColor;
private int[] <API key>;
private int <API key>;
private int mTextColor;
private int mTextCoverColor;
private float mAboveTextSize = 50;
private float mProgress = -1;
private float mToProgress;
private int mMaxProgress;
private int mMinProgress;
private float mProgressPercent;
private float mButtonRadius;
private float mDot1transX;
private float mDot2transX;
private RectF mBackgroundBounds;
private LinearGradient mFillBgGradient;
private LinearGradient mProgressBgGradient;
private LinearGradient <API key>;
private AnimatorSet mDotAnimationSet;
private ValueAnimator mProgressAnimation;
private CharSequence mCurrentText;
public static final int NORMAL = 0;
public static final int DOWNLOADING = 1;
public static final int INSTALLING = 2;
private ButtonController mDefaultController;
private ButtonController mCustomerController;
private int mState;
public <API key>(Context context) {
this(context, null);
}
public <API key>(Context context, AttributeSet attrs) {
super(context, attrs);
if (!isInEditMode()) {
mContext = context;
initController();
initAttrs(context, attrs);
init();
setupAnimations();
}else {
initController();
}
}
private void initController() {
mDefaultController = new <API key>();
}
@Override
protected void <API key>() {
super.<API key>();
ButtonController buttonController = switchController();
if (buttonController.enablePress()) {
if (<API key> == null) {
<API key> = new int[2];
<API key>[0] = mBackgroundColor[0];
<API key>[1] = mBackgroundColor[1];
}
if (this.isPressed()) {
int pressColorleft = buttonController.getPressedColor(mBackgroundColor[0]);
int pressColorright = buttonController.getPressedColor(mBackgroundColor[1]);
if (buttonController.enableGradient()) {
initGradientColor(pressColorleft, pressColorright);
} else {
initGradientColor(pressColorleft, pressColorleft);
}
} else {
if (buttonController.enableGradient()) {
initGradientColor(<API key>[0], <API key>[1]);
} else {
initGradientColor(<API key>[0], <API key>[0]);
}
}
invalidate();
}
}
private void initAttrs(Context context, AttributeSet attrs) {
TypedArray a = context.<API key>(attrs, R.styleable.<API key>);
int bgColor = a.getColor(R.styleable.<API key>, Color.parseColor("#6699ff"));
initGradientColor(bgColor, bgColor);
<API key> = a.getColor(R.styleable.<API key>, Color.LTGRAY);
mButtonRadius = a.getFloat(R.styleable.<API key>, getMeasuredHeight() / 2);
mAboveTextSize = a.getFloat(R.styleable.<API key>, 50);
mTextColor = a.getColor(R.styleable.<API key>, bgColor);
mTextCoverColor = a.getColor(R.styleable.<API key>, Color.WHITE);
boolean enableGradient = a.getBoolean(R.styleable.<API key>, false);
boolean enablePress = a.getBoolean(R.styleable.<API key>, false);
((<API key>) mDefaultController).setEnableGradient(enableGradient).setEnablePress(enablePress);
if (enableGradient){
initGradientColor(mDefaultController.getLighterColor(mBackgroundColor[0]),mBackgroundColor[0]);
}
a.recycle();
}
private void init() {
mMaxProgress = 100;
mMinProgress = 0;
mProgress = 0;
mBackgroundPaint = new Paint();
mBackgroundPaint.setAntiAlias(true);
mBackgroundPaint.setStyle(Paint.Style.FILL);
mTextPaint = new Paint();
mTextPaint.setAntiAlias(true);
mTextPaint.setTextSize(mAboveTextSize);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {
setLayerType(LAYER_TYPE_SOFTWARE, mTextPaint);
}
mDot1Paint = new Paint();
mDot1Paint.setAntiAlias(true);
mDot1Paint.setTextSize(mAboveTextSize);
mDot2Paint = new Paint();
mDot2Paint.setAntiAlias(true);
mDot2Paint.setTextSize(mAboveTextSize);
//NORMAL
mState = NORMAL;
invalidate();
}
private int[] initGradientColor(int leftColor, int rightColor) {
mBackgroundColor = new int[2];
mBackgroundColor[0] = leftColor;
mBackgroundColor[1] = rightColor;
return mBackgroundColor;
}
private void setupAnimations() {
ValueAnimator dotMoveAnimation = ValueAnimator.ofFloat(0, 20);
TimeInterpolator pathInterpolator = <API key>.create(0.11f, 0f, 0.12f, 1f);
dotMoveAnimation.setInterpolator(pathInterpolator);
dotMoveAnimation.addUpdateListener(new ValueAnimator.<API key>() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
float transX = (float) animation.getAnimatedValue();
mDot1transX = transX;
mDot2transX = transX;
invalidate();
}
});
dotMoveAnimation.setDuration(1243);
dotMoveAnimation.setRepeatMode(ValueAnimator.RESTART);
dotMoveAnimation.setRepeatCount(ValueAnimator.INFINITE);
final ValueAnimator dotAlphaAnim = ValueAnimator.ofInt(0, 1243).setDuration(1243);
dotAlphaAnim.addUpdateListener(new ValueAnimator.<API key>() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
int time = (int) dotAlphaAnim.getAnimatedValue();
int dot1Alpha = <API key>(time);
int dot2Alpha = <API key>(time);
mDot1Paint.setColor(mTextCoverColor);
mDot2Paint.setColor(mTextCoverColor);
mDot1Paint.setAlpha(dot1Alpha);
mDot2Paint.setAlpha(dot2Alpha);
}
});
dotAlphaAnim.addListener(new Animator.AnimatorListener() {
@Override
public void onAnimationStart(Animator animation) {
mDot1Paint.setAlpha(0);
mDot2Paint.setAlpha(0);
}
@Override
public void onAnimationEnd(Animator animation) {
}
@Override
public void onAnimationCancel(Animator animation) {
}
@Override
public void onAnimationRepeat(Animator animation) {
}
});
dotAlphaAnim.setRepeatMode(ValueAnimator.RESTART);
dotAlphaAnim.setRepeatCount(ValueAnimator.INFINITE);
mDotAnimationSet = new AnimatorSet();
mDotAnimationSet.playTogether(dotAlphaAnim, dotMoveAnimation);
//ProgressBar
mProgressAnimation = ValueAnimator.ofFloat(0, 1).setDuration(500);
mProgressAnimation.addUpdateListener(new ValueAnimator.<API key>() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
float timepercent = (float) animation.getAnimatedValue();
mProgress = ((mToProgress - mProgress) * timepercent + mProgress);
invalidate();
}
});
}
private int <API key>(int time) {
int alpha;
if (0 <= time && time <= 83) {
double DAlpha = 255.0 / 83.0 * time;
alpha = (int) DAlpha;
} else if (83 < time && time <= 1000) {
alpha = 255;
} else if (1000 < time && time <= 1083) {
double DAlpha = -255.0 / 83.0 * (time - 1083);
alpha = (int) DAlpha;
} else if (1083 < time && time <= 1243) {
alpha = 0;
} else {
alpha = 255;
}
return alpha;
}
private int <API key>(int time) {
int alpha;
if (0 <= time && time <= 160) {
alpha = 0;
} else if (160 < time && time <= 243) {
double DAlpha = 255.0 / 83.0 * (time - 160);
alpha = (int) DAlpha;
} else if (243 < time && time <= 1160) {
alpha = 255;
} else if (1160 < time && time <= 1243) {
double DAlpha = -255.0 / 83.0 * (time - 1243);
alpha = (int) DAlpha;
} else {
alpha = 255;
}
return alpha;
}
private ValueAnimator <API key>(int i, Paint mDot1Paint, int i1, int i2, int i3) {
return new ValueAnimator();
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
if (!isInEditMode()) {
drawing(canvas);
}
}
private void drawing(Canvas canvas) {
drawBackground(canvas);
drawTextAbove(canvas);
}
private void drawBackground(Canvas canvas) {
mBackgroundBounds = new RectF();
if (mButtonRadius == 0) {
mButtonRadius = getMeasuredHeight() / 2;
}
mBackgroundBounds.left = 2;
mBackgroundBounds.top = 2;
mBackgroundBounds.right = getMeasuredWidth() - 2;
mBackgroundBounds.bottom = getMeasuredHeight() - 2;
ButtonController buttonController = switchController();
//color
switch (mState) {
case NORMAL:
if (buttonController.enableGradient()) {
mFillBgGradient = new LinearGradient(0, getMeasuredHeight() / 2, getMeasuredWidth(), getMeasuredHeight() / 2,
mBackgroundColor,
null,
Shader.TileMode.CLAMP);
mBackgroundPaint.setShader(mFillBgGradient);
} else {
if (mBackgroundPaint.getShader() != null) {
mBackgroundPaint.setShader(null);
}
mBackgroundPaint.setColor(mBackgroundColor[0]);
}
canvas.drawRoundRect(mBackgroundBounds, mButtonRadius, mButtonRadius, mBackgroundPaint);
break;
case DOWNLOADING:
if (buttonController.enableGradient()) {
mProgressPercent = mProgress / (mMaxProgress + 0f);
int[] colorList = new int[]{mBackgroundColor[0], mBackgroundColor[1], <API key>};
mProgressBgGradient = new LinearGradient(0, 0, getMeasuredWidth(), 0,
colorList,
new float[]{0, mProgressPercent, mProgressPercent + 0.001f},
Shader.TileMode.CLAMP
);
mBackgroundPaint.setShader(mProgressBgGradient);
} else {
mProgressPercent = mProgress / (mMaxProgress + 0f);
mProgressBgGradient = new LinearGradient(0, 0, getMeasuredWidth(), 0,
new int[]{mBackgroundColor[0], <API key>},
new float[]{mProgressPercent, mProgressPercent + 0.001f},
Shader.TileMode.CLAMP
);
mBackgroundPaint.setColor(mBackgroundColor[0]);
mBackgroundPaint.setShader(mProgressBgGradient);
}
canvas.drawRoundRect(mBackgroundBounds, mButtonRadius, mButtonRadius, mBackgroundPaint);
break;
case INSTALLING:
if (buttonController.enableGradient()) {
mFillBgGradient = new LinearGradient(0, getMeasuredHeight() / 2, getMeasuredWidth(), getMeasuredHeight() / 2,
mBackgroundColor,
null,
Shader.TileMode.CLAMP);
mBackgroundPaint.setShader(mFillBgGradient);
} else {
mBackgroundPaint.setShader(null);
mBackgroundPaint.setColor(mBackgroundColor[0]);
}
canvas.drawRoundRect(mBackgroundBounds, mButtonRadius, mButtonRadius, mBackgroundPaint);
break;
}
}
private void drawTextAbove(Canvas canvas) {
final float y = canvas.getHeight() / 2 - (mTextPaint.descent() / 2 + mTextPaint.ascent() / 2);
if (mCurrentText == null) {
mCurrentText = "";
}
final float textWidth = mTextPaint.measureText(mCurrentText.toString());
//color
switch (mState) {
case NORMAL:
mTextPaint.setShader(null);
mTextPaint.setColor(mTextCoverColor);
canvas.drawText(mCurrentText.toString(), (getMeasuredWidth() - textWidth) / 2, y, mTextPaint);
break;
case DOWNLOADING:
float coverlength = getMeasuredWidth() * mProgressPercent;
float indicator1 = getMeasuredWidth() / 2 - textWidth / 2;
float indicator2 = getMeasuredWidth() / 2 + textWidth / 2;
float coverTextLength = textWidth / 2 - getMeasuredWidth() / 2 + coverlength;
float textProgress = coverTextLength / textWidth;
if (coverlength <= indicator1) {
mTextPaint.setShader(null);
mTextPaint.setColor(mTextColor);
} else if (indicator1 < coverlength && coverlength <= indicator2) {
<API key> = new LinearGradient((getMeasuredWidth() - textWidth) / 2, 0, (getMeasuredWidth() + textWidth) / 2, 0,
new int[]{mTextCoverColor, mTextColor},
new float[]{textProgress, textProgress + 0.001f},
Shader.TileMode.CLAMP);
mTextPaint.setColor(mTextColor);
mTextPaint.setShader(<API key>);
} else {
mTextPaint.setShader(null);
mTextPaint.setColor(mTextCoverColor);
}
canvas.drawText(mCurrentText.toString(), (getMeasuredWidth() - textWidth) / 2, y, mTextPaint);
break;
case INSTALLING:
mTextPaint.setColor(mTextCoverColor);
canvas.drawText(mCurrentText.toString(), (getMeasuredWidth() - textWidth) / 2, y, mTextPaint);
canvas.drawCircle((getMeasuredWidth() + textWidth) / 2 + 4 + mDot1transX, y, 4, mDot1Paint);
canvas.drawCircle((getMeasuredWidth() + textWidth) / 2 + 24 + mDot2transX, y, 4, mDot2Paint);
break;
}
}
private ButtonController switchController() {
if (mCustomerController != null) {
return mCustomerController;
} else {
return mDefaultController;
}
}
public int getState() {
return mState;
}
public void setState(int state) {
if (mState != state) {
this.mState = state;
invalidate();
if (state == <API key>.INSTALLING) {
mDotAnimationSet.start();
} else if (state == NORMAL) {
mDotAnimationSet.cancel();
} else if (state == DOWNLOADING) {
mDotAnimationSet.cancel();
}
}
}
public void setCurrentText(CharSequence charSequence) {
mCurrentText = charSequence;
invalidate();
}
@TargetApi(Build.VERSION_CODES.KITKAT)
public void setProgressText(String text, float progress) {
if (progress >= mMinProgress && progress < mMaxProgress) {
mCurrentText = text + getResources().getString(R.string.downloaded, (int) progress);
mToProgress = progress;
if (mProgressAnimation.isRunning()) {
mProgressAnimation.start();
} else {
mProgressAnimation.start();
}
} else if (progress < mMinProgress) {
mProgress = 0;
} else if (progress >= mMaxProgress) {
mProgress = 100;
mCurrentText = text + getResources().getString(R.string.downloaded, (int) mProgress);
invalidate();
}
}
public float getProgress() {
return mProgress;
}
public void setProgress(float progress) {
this.mProgress = progress;
}
/**
* Sometimes you should use the method to avoid memory leak
*/
public void removeAllAnim() {
mDotAnimationSet.cancel();
mDotAnimationSet.removeAllListeners();
mProgressAnimation.cancel();
mProgressAnimation.removeAllListeners();
}
public void <API key>(int color){
initGradientColor(color, color);
}
public void <API key>(int color){
<API key> = color;
}
public float getButtonRadius() {
return mButtonRadius;
}
public void setButtonRadius(float buttonRadius) {
mButtonRadius = buttonRadius;
}
public int getTextColor() {
return mTextColor;
}
@Override
public void setTextColor(int textColor) {
mTextColor = textColor;
}
public int getTextCoverColor() {
return mTextCoverColor;
}
public void setTextCoverColor(int textCoverColor) {
mTextCoverColor = textCoverColor;
}
public int getMinProgress() {
return mMinProgress;
}
public void setMinProgress(int minProgress) {
mMinProgress = minProgress;
}
public int getMaxProgress() {
return mMaxProgress;
}
public void setMaxProgress(int maxProgress) {
mMaxProgress = maxProgress;
}
public void enabelDefaultPress(boolean enable) {
if (mDefaultController != null) {
((<API key>) mDefaultController).setEnablePress(enable);
}
}
public void <API key>(boolean enable) {
if (mDefaultController != null) {
((<API key>) mDefaultController).setEnableGradient(enable);
initGradientColor(mDefaultController.getLighterColor(mBackgroundColor[0]),mBackgroundColor[0]);
}
}
@Override
public void setTextSize(float size) {
mAboveTextSize = size;
mTextPaint.setTextSize(size);
}
@Override
public float getTextSize() {
return mAboveTextSize;
}
public <API key> <API key>(ButtonController customerController) {
mCustomerController = customerController;
return this;
}
@Override
public void <API key>(Parcelable state) {
SavedState ss = (SavedState) state;
super.<API key>(ss.getSuperState());
mState = ss.state;
mProgress = ss.progress;
mCurrentText = ss.currentText;
}
@Override
public Parcelable onSaveInstanceState() {
Parcelable superState = super.onSaveInstanceState();
return new SavedState(superState, (int) mProgress, mState, mCurrentText.toString());
}
public static class SavedState extends BaseSavedState {
private int progress;
private int state;
private String currentText;
public SavedState(Parcelable parcel, int progress, int state, String currentText) {
super(parcel);
this.progress = progress;
this.state = state;
this.currentText = currentText;
}
private SavedState(Parcel in) {
super(in);
progress = in.readInt();
state = in.readInt();
currentText = in.readString();
}
@Override
public void writeToParcel(Parcel out, int flags) {
super.writeToParcel(out, flags);
out.writeInt(progress);
out.writeInt(state);
out.writeString(currentText);
}
public static final Creator<SavedState> CREATOR = new Creator<SavedState>() {
@Override
public SavedState createFromParcel(Parcel in) {
return new SavedState(in);
}
@Override
public SavedState[] newArray(int size) {
return new SavedState[size];
}
};
}
}
|
# tc_divmod.rb
# Test case for the Bignum#divmod instance method.
require 'test/unit'
class <API key> < Test::Unit::TestCase
def setup
@num_int = 9223372036854775808
@den_int = 8589934593
@num_flt = 9223372036854775808.0
@den_flt = 8589934593.0
end
def test_divmod_basic
assert_respond_to(@num_int, :divmod)
<API key>{ @num_int.divmod(@den_int) }
assert_kind_of(Array, @num_int.divmod(@den_int))
end
def <API key>
assert_equal([1073741823, 7516192769.0], @num_int.divmod(@den_int))
assert_equal([0, 8589934593], @den_int.divmod(@num_int))
end
def <API key>
assert_equal([0.0, 8589934593.0], @den_flt.divmod(@num_int))
assert_equal([1073741823, 7516192769.0], @num_int.divmod(@den_flt))
end
def test_divmod_floats
assert_equal([1073741823, 7516192769.0], @num_flt.divmod(@den_flt))
assert_equal([0.0, 8589934593.0], @den_flt.divmod(@num_flt))
end
def <API key>
assert_raises(ArgumentError){ @num_int.divmod }
assert_raises(ZeroDivisionError){ @num_int.divmod(0) }
assert_raises(TypeError){ @num_int.divmod(nil) }
assert_raises(TypeError){ @num_int.divmod('test') }
assert_raises(TypeError){ @num_int.divmod(true) }
end
def teardown
@num_int = nil
@den_int = nil
@num_flt = nil
@den_flt = nil
end
end
|
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Reactive;
using Xamarin.Forms;
using RxObservable = System.Reactive.Linq.Observable;
using System.Reactive.Linq;
namespace RxApp.XamarinForms
{
public static class Bindings
{
public static IDisposable BindTo(
this IObservable<NavigationStack> This,
RxFormsApplication application,
Func<<API key>,Page> createPage)
{
var navigationPage = application.MainPage;
var popping = false;
var stack = This
.ObserveOnMainThread()
.Scan(Tuple.Create(RxApp.NavigationStack.Empty, RxApp.NavigationStack.Empty), (acc, navStack) => Tuple.Create(acc.Item2, navStack))
.SelectMany(async x =>
{
var previousNavStack = x.Item1;
var currentNavStack = x.Item2;
var currentPage = (navigationPage.CurrentPage as IReadOnlyViewFor);
var navPageModel = (currentPage != null) ? (currentPage.ViewModel as <API key>) : null;
var head = currentNavStack.FirstOrDefault();
if (currentNavStack.IsEmpty)
{
// Do nothing. Can only happen on Android. Android handles the stack being empty by
// killing the activity.
}
else if (head == navPageModel)
{
// Do nothing, means the user clicked the back button which we cant intercept,
// so we let forms pop the view, listen for the popping event, and then popped the view model.
}
else if (currentNavStack.Pop().Equals(previousNavStack))
{
var view = createPage(head);
await navigationPage.PushAsync(view, true);
}
else if (previousNavStack.Pop().Equals(currentNavStack))
{
// Programmatic back button was clicked
popping = true;
await navigationPage.PopAsync(true);
popping = false;
}
else if (previousNavStack.Up().Equals(currentNavStack))
{
// Programmatic up button was clicked
popping = true;
await navigationPage.PopToRootAsync(true);
popping = false;
}
return currentNavStack;
})
.Publish();
return Disposable.Compose(
stack.Where(x => x.IsEmpty).Subscribe(_ => application.SendDone()),
// Handle the user clicking the back button
RxObservable.FromEventPattern<NavigationEventArgs>(navigationPage, "Popped")
.Where(_ => !popping)
.Subscribe(e =>
{
var vm = ((e.EventArgs.Page as IReadOnlyViewFor).ViewModel as <API key>);
vm.Activate.Execute();
vm.Back.Execute();
vm.Deactivate.Execute();
}),
stack.Connect()
);
}
public static IDisposable BindTo<T, TView>(this IObservable<T> This, TView target, Expression<Func<TView, T>> property)
{
return This.BindTo(target, property, Scheduler.MainThreadScheduler);
}
public static IDisposable BindTo(this IObservable<Unit> This, Action action)
{
return This.ObserveOnMainThread().Subscribe(_ => action());
}
public static IDisposable BindTo<T>(this IObservable<T> This, Action<T> action)
{
return This.ObserveOnMainThread().Subscribe(action);
}
public static IDisposable Bind(this IRxCommand This, Button button)
{
return Disposable.Compose(
This.CanExecute.ObserveOnMainThread().Subscribe(x => button.IsEnabled = x),
RxObservable.FromEventPattern(button, "Clicked").InvokeCommand(This)
);
}
}
}
|
SET NAMES utf8;
SET FOREIGN_KEY_CHECKS = 0;
-- Table structure for `<API key>`
-- DROP TABLE IF EXISTS `<API key>`;
CREATE TABLE IF NOT EXISTS `<API key>` (
`EntityNumber` varchar(13) NOT NULL COMMENT '9999.999.999 of 9.999.999.999',
`ActivityGroup` varchar(6) NOT NULL COMMENT '(6)X',
`NaceVersion` enum('2003','2008') NOT NULL,
`NaceCode` varchar(9) NOT NULL COMMENT '(5)9 of (7)9',
`Classification` char(4) NOT NULL COMMENT 'XXXX',
PRIMARY KEY (`EntityNumber`,`ActivityGroup`,`NaceVersion`,`NaceCode`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- Table structure for `KBOOpenData_address`
-- DROP TABLE IF EXISTS `KBOOpenData_address`;
CREATE TABLE IF NOT EXISTS `KBOOpenData_address` (
`EntityNumber` varchar(13) NOT NULL COMMENT '9999.999.999 of 9.999.999.999',
`TypeOfAddress` char(4) NOT NULL COMMENT 'XXXX',
`CountryNL` varchar(100) DEFAULT NULL COMMENT '100(X)',
`CountryFR` varchar(100) DEFAULT NULL COMMENT '100(X)',
`Zipcode` varchar(20) DEFAULT NULL COMMENT '20(X)',
`MunicipalityNL` varchar(200) DEFAULT NULL COMMENT '200(X)',
`MunicipalityFR` varchar(200) DEFAULT NULL COMMENT '200(X)',
`StreetNL` varchar(200) DEFAULT NULL COMMENT '200(X)',
`StreetFR` varchar(200) DEFAULT NULL COMMENT '200(X)',
`HouseNumber` varchar(22) DEFAULT NULL COMMENT '22(X)',
`Box` varchar(20) DEFAULT NULL COMMENT '20(X)',
`ExtraAddressInfo` varchar(80) DEFAULT NULL COMMENT '80(X)',
`DateStrikingOff` char(10) NOT NULL COMMENT 'XX-XX-XXXX',
PRIMARY KEY (`EntityNumber`,`TypeOfAddress`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- Table structure for `KBOOpenData_code`
-- DROP TABLE IF EXISTS `KBOOpenData_code`;
CREATE TABLE IF NOT EXISTS `KBOOpenData_code` (
`Category` varchar(255) NOT NULL,
`Code` varchar(255) NOT NULL,
`Language` enum('DE','EN','FR','NL') NOT NULL,
`Description` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- Table structure for `KBOOpenData_contact`
-- DROP TABLE IF EXISTS `KBOOpenData_contact`;
CREATE TABLE IF NOT EXISTS `KBOOpenData_contact` (
`EntityNumber` varchar(13) NOT NULL COMMENT '9999.999.999 of 9.999.999.999',
`EntityContact` varchar(3) NOT NULL COMMENT '(3)X',
`ContactType` varchar(5) NOT NULL COMMENT '5(X)',
`Value` varchar(254) NOT NULL COMMENT '(254)X',
PRIMARY KEY (`EntityNumber`,`EntityContact`,`ContactType`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- Table structure for `<API key>`
-- DROP TABLE IF EXISTS `<API key>`;
CREATE TABLE IF NOT EXISTS `<API key>` (
`EntityNumber` varchar(13) NOT NULL COMMENT '9999.999.999 of 9.999.999.999',
`Language` char(1) NOT NULL COMMENT 'X',
`TypeOfDenomination` char(3) NOT NULL COMMENT 'XXX',
`Denomination` varchar(320) NOT NULL COMMENT '(320)X',
PRIMARY KEY (`EntityNumber`,`TypeOfDenomination`,`Language`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- Table structure for `<API key>`
-- DROP TABLE IF EXISTS `<API key>`;
CREATE TABLE IF NOT EXISTS `<API key>` (
`EnterpriseNumber` varchar(12) NOT NULL COMMENT '9999.999.999',
`Status` char(2) NOT NULL COMMENT 'XX',
`JuridicalSituation` char(3) NOT NULL COMMENT 'XXX',
`TypeOfEnterprise` char(1) NOT NULL COMMENT 'X',
`JuridicalForm` char(3) DEFAULT NULL COMMENT 'XXX',
`StartDate` char(10) NOT NULL COMMENT 'XX-XX-XXXX',
PRIMARY KEY (`EnterpriseNumber`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- Table structure for `<API key>`
-- DROP TABLE IF EXISTS `<API key>`;
CREATE TABLE IF NOT EXISTS `<API key>` (
`EstablishmentNumber` varchar(13) NOT NULL DEFAULT '' COMMENT '9.999.999.999',
`StartDate` char(10) NOT NULL COMMENT 'XX-XX-XXXX',
`EnterpriseNumber` varchar(12) NOT NULL COMMENT '9999.999.999',
PRIMARY KEY (`EstablishmentNumber`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- Table structure for `KBOOpenData_meta`
-- DROP TABLE IF EXISTS `KBOOpenData_meta`;
CREATE TABLE IF NOT EXISTS `KBOOpenData_meta` (
`Variable` varchar(255) NOT NULL,
`Value` varchar(255) DEFAULT NULL,
PRIMARY KEY (`Variable`),
UNIQUE KEY `metaUnique` (`Variable`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- Table structure for `<API key>`
-- DROP TABLE IF EXISTS `<API key>`;
CREATE TABLE IF NOT EXISTS `<API key>` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`tableName` varchar(64) NOT NULL,
`recordKey` varchar(32) NOT NULL,
`data_old` text,
`data_new` text,
`action` enum('insert','update','delete') NOT NULL,
`mutationTimestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=ARCHIVE AUTO_INCREMENT=64756 DEFAULT CHARSET=utf8;
|
package com.example.android.bluetoothlegatt.ble_service;
import java.util.Locale;
public class CountryUtils {
public static boolean <API key>() {
Locale locale = Locale.getDefault();
String lang = locale.getLanguage();
String contr = locale.getCountry();
if (lang == null || (!lang.equals("zh") && !lang.equals("ja") && !lang.equals("ko") && (!lang.equals("en") || contr == null || !contr.equals("US")))) {
return false;
}
return true;
}
public static boolean getLanguageFormate() {
String language = Locale.getDefault().getLanguage();
if (language == null || !language.equals("zh")) {
return false;
}
return true;
}
}
|
# coding=utf8
from django.views.generic import ListView, DetailView, CreateView
from django.db.models import Q
from django.http import JsonResponse, <API key>
from django.core.urlresolvers import reverse
from django.shortcuts import render
from pure_pagination.mixins import PaginationMixin
from django.contrib.auth.mixins import LoginRequiredMixin
from django.conf import settings
from books.models import Publish, Author, Book
from books.forms import PublishForm
import json
import logging
logger = logging.getLogger('opsweb')
class PublishListView(LoginRequiredMixin, PaginationMixin, ListView):
'''
getlist, create
'''
model = Publish
template_name = "books/publish_list.html"
context_object_name = "publish_list"
paginate_by = 5
keyword = ''
def get_queryset(self):
queryset = super(PublishListView, self).get_queryset()
self.keyword = self.request.GET.get('keyword', '').strip()
if self.keyword:
queryset = queryset.filter(Q(name__icontains=self.keyword) |
Q(address__icontains=self.keyword) |
Q(city__icontains=self.keyword))
return queryset
def get_context_data(self, **kwargs):
context = super(PublishListView, self).get_context_data(**kwargs)
context['keyword'] = self.keyword
return context
def post(self, request):
form = PublishForm(request.POST)
if form.is_valid():
form.save()
res = {'code': 0, 'result': ''}
else:
# form.errors
res = {'code': 1, 'errmsg': form.errors}
print form.errors
return JsonResponse(res, safe=True)
class PublishDetailView(LoginRequiredMixin, DetailView):
'''
getone, update, delete
'''
model = Publish
template_name = "books/publish_detail.html"
context_object_name = 'publish'
next_url = '/books/publishlist/'
def post(self, request, *args, **kwargs):
pk = kwargs.get('pk')
p = self.model.objects.get(pk=pk)
form = PublishForm(request.POST, instance=p)
if form.is_valid():
form.save()
res = {"code": 0, "result": "", 'next_url': self.next_url}
else:
res = {"code": 1, "errmsg": form.errors, 'next_url': self.next_url}
return render(request, settings.JUMP_PAGE, res)
# return <API key>(reverse('books:publish_detail',args=[pk]))
def delete(self, request, *args, **kwargs):
pk = kwargs.get('pk')
try:
obj = self.model.objects.get(pk=pk)
if not obj.book_set.all():
self.model.objects.filter(pk=pk).delete()
res = {"code": 0, "result": ""}
else:
res = {"code": 1, "errmsg": ","}
except:
res = {"code": 1, "errmsg": ""}
return JsonResponse(res, safe=True)
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_75) on Sat May 16 22:22:30 CEST 2015 -->
<title>StreamMessage.Type</title>
<meta name="date" content="2015-05-16">
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="StreamMessage.Type";
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar_top">
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Serializer.html" title="interface in org.apache.cassandra.streaming.messages"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/cassandra/streaming/messages/StreamMessage.Type.html" target="_top">Frames</a></li>
<li><a href="StreamMessage.Type.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#<API key>">Enum Constants</a> | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#<API key>">Enum Constants</a> | </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
</a></div>
<div class="header">
<div class="subTitle">org.apache.cassandra.streaming.messages</div>
<h2 title="Enum StreamMessage.Type" class="title">Enum StreamMessage.Type</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>java.lang.Enum<<a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html" title="enum in org.apache.cassandra.streaming.messages">StreamMessage.Type</a>></li>
<li>
<ul class="inheritance">
<li>org.apache.cassandra.streaming.messages.StreamMessage.Type</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable, java.lang.Comparable<<a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html" title="enum in org.apache.cassandra.streaming.messages">StreamMessage.Type</a>></dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.html" title="class in org.apache.cassandra.streaming.messages">StreamMessage</a></dd>
</dl>
<hr>
<br>
<pre>public static enum <span class="strong">StreamMessage.Type</span>
extends java.lang.Enum<<a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html" title="enum in org.apache.cassandra.streaming.messages">StreamMessage.Type</a>></pre>
<div class="block">StreamMessage types</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="<API key>">
</a>
<h3>Enum Constant Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Enum Constant Summary table, listing enum constants, and an explanation">
<caption><span>Enum Constants</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Enum Constant and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html#COMPLETE">COMPLETE</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html#FILE">FILE</a></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html#PREPARE">PREPARE</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html#RECEIVED">RECEIVED</a></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html#RETRY">RETRY</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><strong><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html#SESSION_FAILED">SESSION_FAILED</a></strong></code> </td>
</tr>
</table>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="field_summary">
</a>
<h3>Field Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Field Summary table, listing fields, and an explanation">
<caption><span>Fields</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Field and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Serializer.html" title="interface in org.apache.cassandra.streaming.messages">StreamMessage.Serializer</a><<a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.html" title="class in org.apache.cassandra.streaming.messages">StreamMessage</a>></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html#inSerializer">inSerializer</a></strong></code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Serializer.html" title="interface in org.apache.cassandra.streaming.messages">StreamMessage.Serializer</a><<a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.html" title="class in org.apache.cassandra.streaming.messages">StreamMessage</a>></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html#outSerializer">outSerializer</a></strong></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html#priority">priority</a></strong></code> </td>
</tr>
</table>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="method_summary">
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html" title="enum in org.apache.cassandra.streaming.messages">StreamMessage.Type</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html#get(byte)">get</a></strong>(byte type)</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html" title="enum in org.apache.cassandra.streaming.messages">StreamMessage.Type</a></code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html#valueOf(java.lang.String)">valueOf</a></strong>(java.lang.String name)</code>
<div class="block">Returns the enum constant of this type with the specified name.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html" title="enum in org.apache.cassandra.streaming.messages">StreamMessage.Type</a>[]</code></td>
<td class="colLast"><code><strong><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html#values()">values</a></strong>()</code>
<div class="block">Returns an array containing the constants of this enum type, in
the order they are declared.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="<API key>.lang.Enum">
</a>
<h3>Methods inherited from class java.lang.Enum</h3>
<code>clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="<API key>.lang.Object">
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="<API key>">
</a>
<h3>Enum Constant Detail</h3>
<a name="PREPARE">
</a>
<ul class="blockList">
<li class="blockList">
<h4>PREPARE</h4>
<pre>public static final <a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html" title="enum in org.apache.cassandra.streaming.messages">StreamMessage.Type</a> PREPARE</pre>
</li>
</ul>
<a name="FILE">
</a>
<ul class="blockList">
<li class="blockList">
<h4>FILE</h4>
<pre>public static final <a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html" title="enum in org.apache.cassandra.streaming.messages">StreamMessage.Type</a> FILE</pre>
</li>
</ul>
<a name="RECEIVED">
</a>
<ul class="blockList">
<li class="blockList">
<h4>RECEIVED</h4>
<pre>public static final <a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html" title="enum in org.apache.cassandra.streaming.messages">StreamMessage.Type</a> RECEIVED</pre>
</li>
</ul>
<a name="RETRY">
</a>
<ul class="blockList">
<li class="blockList">
<h4>RETRY</h4>
<pre>public static final <a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html" title="enum in org.apache.cassandra.streaming.messages">StreamMessage.Type</a> RETRY</pre>
</li>
</ul>
<a name="COMPLETE">
</a>
<ul class="blockList">
<li class="blockList">
<h4>COMPLETE</h4>
<pre>public static final <a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html" title="enum in org.apache.cassandra.streaming.messages">StreamMessage.Type</a> COMPLETE</pre>
</li>
</ul>
<a name="SESSION_FAILED">
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>SESSION_FAILED</h4>
<pre>public static final <a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html" title="enum in org.apache.cassandra.streaming.messages">StreamMessage.Type</a> SESSION_FAILED</pre>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="field_detail">
</a>
<h3>Field Detail</h3>
<a name="priority">
</a>
<ul class="blockList">
<li class="blockList">
<h4>priority</h4>
<pre>public final int priority</pre>
</li>
</ul>
<a name="inSerializer">
</a>
<ul class="blockList">
<li class="blockList">
<h4>inSerializer</h4>
<pre>public final <a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Serializer.html" title="interface in org.apache.cassandra.streaming.messages">StreamMessage.Serializer</a><<a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.html" title="class in org.apache.cassandra.streaming.messages">StreamMessage</a>> inSerializer</pre>
</li>
</ul>
<a name="outSerializer">
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>outSerializer</h4>
<pre>public final <a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Serializer.html" title="interface in org.apache.cassandra.streaming.messages">StreamMessage.Serializer</a><<a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.html" title="class in org.apache.cassandra.streaming.messages">StreamMessage</a>> outSerializer</pre>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="method_detail">
</a>
<h3>Method Detail</h3>
<a name="values()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>values</h4>
<pre>public static <a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html" title="enum in org.apache.cassandra.streaming.messages">StreamMessage.Type</a>[] values()</pre>
<div class="block">Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
<pre>
for (StreamMessage.Type c : StreamMessage.Type.values())
System.out.println(c);
</pre></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>an array containing the constants of this enum type, in the order they are declared</dd></dl>
</li>
</ul>
<a name="valueOf(java.lang.String)">
</a>
<ul class="blockList">
<li class="blockList">
<h4>valueOf</h4>
<pre>public static <a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html" title="enum in org.apache.cassandra.streaming.messages">StreamMessage.Type</a> valueOf(java.lang.String name)</pre>
<div class="block">Returns the enum constant of this type with the specified name.
The string must match <i>exactly</i> an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>name</code> - the name of the enum constant to be returned.</dd>
<dt><span class="strong">Returns:</span></dt><dd>the enum constant with the specified name</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code>java.lang.<API key></code> - if this enum type has no constant with the specified name</dd>
<dd><code>java.lang.<API key></code> - if the argument is null</dd></dl>
</li>
</ul>
<a name="get(byte)">
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>get</h4>
<pre>public static <a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Type.html" title="enum in org.apache.cassandra.streaming.messages">StreamMessage.Type</a> get(byte type)</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="bottomNav"><a name="navbar_bottom">
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../org/apache/cassandra/streaming/messages/StreamMessage.Serializer.html" title="interface in org.apache.cassandra.streaming.messages"><span class="strong">Prev Class</span></a></li>
<li>Next Class</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/apache/cassandra/streaming/messages/StreamMessage.Type.html" target="_top">Frames</a></li>
<li><a href="StreamMessage.Type.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li><a href="#<API key>">Enum Constants</a> | </li>
<li><a href="#field_summary">Field</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li><a href="#<API key>">Enum Constants</a> | </li>
<li><a href="#field_detail">Field</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
</a></div>
</body>
</html>
|
"use strict";
var router_1 = require('@angular/router');
var <API key> = require('./authorize/authorize-component');
var user_component_1 = require('./User/user-component');
var welcome_component_1 = require('./welcome-component');
exports.routes = [
{ path: '', component: welcome_component_1.welcome },
{ path: 'login', component: <API key>.AuthorizeComponent },
{ path: 'dashboard', component: user_component_1.UserComponent },
];
exports.<API key> = [
router_1.provideRouter(exports.routes)
];
//# sourceMappingURL=app.route.js.map
|
<?php
namespace Home\Controller;
class EmptyController extends HomeController{
public function _empty($action){
$resource = strtolower(CONTROLLER_NAME);
$this->assign('type', $resource);
if(in_array($resource, array('text', 'picture', 'music', 'video'))){
if(in_array($action, array('new', 'edit'))){
if('edit' == $action){
$id = intval(I('id'));
if($post = M('post')->find($id))
$this->assign('post', $post);
else
$this->error('');
}
$this->display('Post/'.$resource);
}else{
$this->error('');
}
}else{
switch (strtolower(CONTROLLER_NAME)) {
case 'post':
echo 'post';die;
$Index = new IndexController();
$Index->detail(ACTION_NAME);
break;
case 'search':
$Index = new IndexController();
$Index->search();
break;
case 'feed':
$type = I('get.type');
$this->feed($type);
break;
case 'mine':
if(!is_login())
$this->error('', "User/login");
$Index = new IndexController();
$Index->mine();
break;
default:
$Index = new IndexController();
if (is_numeric(CONTROLLER_NAME) && is_numeric(ACTION_NAME)) {
$Index->archive(CONTROLLER_NAME,ACTION_NAME);
}else{
$this->error('');
}
break;
}
}
}
}
|
<?php
defined('_JEXEC') or die();
$item = $this -> item;
$media = $this -> listMedia;
$params = $this -> mediaParams;
if($params -> get('<API key>','S')){
if(!empty($media[0] -> images)){
$src = JURI::root().str_replace('.'.JFile::getExt($media[0] -> images),'_'.$params -> get('<API key>','S')
.'.'.JFile::getExt($media[0] -> images),$media[0] -> images);
}
}
?>
<?php if($media):?>
<?php if($media[0] -> type == 'image'):?>
<?php
$src2 = JURI::root().str_replace('.'.JFile::getExt($media[0] -> images),
'_'.$params -> get('<API key>','XL')
.'.'.JFile::getExt($media[0] -> images),$media[0] -> images);
?>
<?php if($params -> get('show_image',1) == 1 AND !empty($media[0] -> images)):?>
<a class="ib-image" href="<?php echo $item ->link;?>">
<img src="<?php echo $src;?>" data-largesrc="<?php echo$src2;?>"
alt="<?php if(isset($media[0] -> imagetitle)) echo $media[0] -> imagetitle;?>"
title="<?php if(isset($media[0] -> imagetitle)) echo $media[0] -> imagetitle;?>"/>
<span><?php echo $item -> title;?></span>
</a>
<?php endif;?>
<?php endif;?>
<?php if($media[0] -> type == 'imagegallery'):?>
<?php
$srcGallery2 = JURI::root().str_replace('.'.JFile::getExt($media[0] -> images),
'_'.$params -> get('<API key>','XL')
.'.'.JFile::getExt($media[0] -> images),$media[0] -> images);
?>
<?php if($params -> get('show_image_gallery',1) == 1 AND !empty($media[0] -> images)):?>
<a class="ib-image" href="<?php echo $item ->link;?>">
<img src="<?php echo $src;?>" data-largesrc="<?php echo $srcGallery2;?>"
alt="<?php if(isset($media[0] -> imagetitle)) echo $media[0] -> imagetitle;?>"
title="<?php if(isset($media[0] -> imagetitle)) echo $media[0] -> imagetitle;?>"/>
<span><?php echo $item -> title;?></span>
</a>
<?php endif;?>
<?php endif;?>
<?php
if($media[0] -> type == 'video'):
if($params -> get('show_video',1) == 1 AND !empty($media[0] -> thumb)):
$srcVideo = str_replace('.'.JFile::getExt($media[0] -> thumb),'_'
.$params -> get('<API key>','M')
.'.'.JFile::getExt($media[0] -> thumb),$media[0] -> thumb);
$srcVideo2 = JURI::root().str_replace('.'.JFile::getExt($media[0] -> thumb),
'_'.$params -> get('<API key>','XL')
.'.'.JFile::getExt($media[0] -> thumb),$media[0] -> thumb);
?>
<a class="ib-image" href="<?php echo $item ->link;?>">
<img src="<?php echo $srcVideo;?>"
data-largesrc="<?php echo $srcVideo2;?>"
title="<?php echo $media[0] -> imagetitle;?>"
alt="<?php echo $media[0] -> imagetitle;?>"/>
<span><?php echo $item -> title;?></span>
</a>
<?php endif;?>
<?php endif;?>
<?php endif;?>
|
<?php
/**
* Unbind ...
*
* @phpstub
*
* @param resource $connection
* @param string $trigger_name
*
* @return bool
*/
function cyrus_unbind($connection, $trigger_name)
{
}
|
ngDefine(
'cockpit.plugin.statistics-plugin.controllers',
function(module) {
module
.controller(
'<API key>',
[
'$scope',
'DataFactory',
'Uri',
function($scope, DataFactory, Uri) {
$scope.options = {
chart : {
type : 'pieChart',
height : 500,
x : function(d) {
return d.key;
},
y : function(d) {
return d.y;
},
showLabels : true,
transitionDuration : 500,
labelThreshold : 0.01,
tooltips : true,
tooltipContent : function(key, y, e, graph) {
if (key == "finished") {
return '<h3>' + key + '</h3>' + '<p>count:<b>' + y
+ '</b><br/>' + 'average Duration:<b>'
+ (e.point.avg / 1000 / 60).toFixed(2)
+ ' min</b><br/>minimal Duration:<b>'
+ (e.point.min / 1000 / 60).toFixed(2)
+ ' min</b><br/>maximal Duration:<b>'
+ (e.point.max / 1000 / 60).toFixed(2)
+ ' min</b></p>'
} else {
return '<h3>' + key + '</h3>' + '<p>' + y + '</p>'
}
},
noData : "No Processes met the requirements",
legend : {
margin : {
top : 5,
right : 5,
bottom : 5,
left : 5
}
}
}
};
DataFactory
.<API key>(
$scope.processDefinition.key)
.then(
function() {
var <API key> = DataFactory.<API key>[$scope.processDefinition.key];
var counts = [];
counts
.push({
"key" : "running",
"y" : <API key>[0].<API key>
});
counts
.push({
"key" : "failed",
"y" : <API key>[0].failedInstanceCount
});
counts
.push({
"key" : "finished",
"y" : <API key>[0].endedInstanceCount,
"avg" : <API key>[0].duration,
"min" : <API key>[0].minDuration,
"max" : <API key>[0].maxDuration
});
$scope.statesOfDefinition = counts;
});
} ]);
});
|
import { Injectable } from '@angular/core';
import { Http } from '@angular/http';
import { UserData } from './user-data';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/map';
import 'rxjs/add/observable/of';
@Injectable()
export class ConferenceData {
data: any;
constructor(public http: Http, public user: UserData) { }
load(): any {
if (this.data) {
return Observable.of(this.data);
} else {
return this.http.get('assets/data/data.json')
.map(this.processData, this);
}
}
processData(data: any) {
// just some good 'ol JS fun with objects and arrays
// build up the data by linking employees to sessions
this.data = data.json();
this.data.tracks = [];
// loop through each day in the schedule
this.data.schedule.forEach((day: any) => {
// loop through each timeline group in the day
day.groups.forEach((group: any) => {
// loop through each session in the timeline group
group.sessions.forEach((session: any) => {
session.employees = [];
if (session.employeeNames) {
session.employeeNames.forEach((employeeName: any) => {
let employee = this.data.employees.find((s: any) => s.name === employeeName);
if (employee) {
session.employees.push(employee);
employee.sessions = employee.sessions || [];
employee.sessions.push(session);
}
});
}
if (session.tracks) {
session.tracks.forEach((track: any) => {
if (this.data.tracks.indexOf(track) < 0) {
this.data.tracks.push(track);
}
});
}
});
});
});
return this.data;
}
getTimeline(dayIndex: number, queryText = '', excludeTracks: any[] = [], segment = 'all') {
return this.load().map((data: any) => {
let day = data.schedule[dayIndex];
day.shownSessions = 0;
queryText = queryText.toLowerCase().replace(/,|\.|-/g, ' ');
let queryWords = queryText.split(' ').filter(w => !!w.trim().length);
day.groups.forEach((group: any) => {
group.hide = true;
group.sessions.forEach((session: any) => {
// check if this session should show or not
this.filterSession(session, queryWords, excludeTracks, segment);
if (!session.hide) {
// if this session is not hidden then this group should show
group.hide = false;
day.shownSessions++;
}
});
});
return day;
});
}
filterSession(session: any, queryWords: string[], excludeTracks: any[], segment: string) {
let matchesQueryText = false;
if (queryWords.length) {
// of any query word is in the session name than it passes the query test
queryWords.forEach((queryWord: string) => {
if (session.name.toLowerCase().indexOf(queryWord) > -1) {
matchesQueryText = true;
}
});
} else {
// if there are no query words then this session passes the query test
matchesQueryText = true;
}
// if any of the sessions tracks are not in the
// exclude tracks then this session passes the track test
let matchesTracks = false;
session.tracks.forEach((trackName: string) => {
if (excludeTracks.indexOf(trackName) === -1) {
matchesTracks = true;
}
});
// if the segement is 'favorites', but session is not a user favorite
// then this session does not pass the segment test
let matchesSegment = false;
if (segment === 'favorites') {
if (this.user.hasFavorite(session.name)) {
matchesSegment = true;
}
} else {
matchesSegment = true;
}
// all tests must be true if it should not be hidden
session.hide = !(matchesQueryText && matchesTracks && matchesSegment);
}
getEmployees() {
return this.load().map((data: any) => {
return data.employees.sort((a: any, b: any) => {
let aName = a.name.split(' ').pop();
let bName = b.name.split(' ').pop();
return aName.localeCompare(bName);
});
});
}
getTracks() {
return this.load().map((data: any) => {
return data.tracks.sort();
});
}
getMap() {
return this.load().map((data: any) => {
return data.map;
});
}
}
|
package nl.esciencecenter.e3dchem.modifiedtanimoto;
import org.knime.base.util.flowvariable.<API key>;
import org.knime.core.data.DataTableSpec;
import org.knime.core.node.<API key>;
import org.knime.core.node.util.CheckUtils;
import org.knime.distance.category.<API key>;
import org.knime.distance.util.propertyresolver.Configuration;
import org.knime.distance.util.propertyresolver.Property;
@Configuration
public final class <API key> extends
<API key><<API key>> {
@Property("meanBitDensity")
private double meanBitDensity = 0.01;
/**
* Framework constructor.
*/
<API key>() {
}
public <API key>(final double meanBitDensity,
String column) throws <API key> {
super(column);
this.meanBitDensity = meanBitDensity;
CheckUtils.checkSetting(meanBitDensity >= 0,
"mean bit density is not positive: %f ", meanBitDensity);
}
@Override
protected <API key><?> clone(String... columns)
throws <API key> {
CheckUtils.checkSetting(columns != null && columns.length == 1,
"Exactly one column must be selected.");
return new <API key>(meanBitDensity, columns[0]);
}
@Override
public String getFactoryId() {
return <API key>.ID;
}
/**
* {@inheritDoc}
*/
@Override
public <API key> <API key>(DataTableSpec spec,
<API key> <API key>)
throws <API key> {
return new <API key>(this, spec);
}
public double getMeanBitDensity() {
return meanBitDensity;
}
public void setMeanBitDensity(final double meanBitDensity) {
this.meanBitDensity = meanBitDensity;
}
}
|
using System;
using System.Reactive.Linq;
using System.Reactive.Subjects;
using System.Threading.Tasks;
using RElmah.Common.Model;
using RElmah.Errors;
using RElmah.Services.Nulls;
namespace RElmah.Services.Inbox
{
public class <API key> : IErrorsInbox
{
private readonly IErrorsBacklog _errorsBacklog;
private readonly Subject<ErrorPayload> _errors;
private readonly IObservable<ErrorPayload> _publishedErrors;
public <API key>() : this(NullErrorsBacklog.Instance) { }
public <API key>(IErrorsBacklog errorsBacklog)
{
_errorsBacklog = errorsBacklog;
_errors = new Subject<ErrorPayload>();
_publishedErrors = _errors.Publish().RefCount();
}
public Task Post(ErrorPayload payload)
{
return _errorsBacklog
.Store(payload)
.ContinueWith(_ => _errors.OnNext(payload));
}
public IObservable<ErrorPayload> GetErrorsStream()
{
return _publishedErrors;
}
}
}
|
# AUTOGENERATED FILE
FROM balenalib/<API key>:buster-run
ENV NODE_VERSION 15.14.0
ENV YARN_VERSION 1.22.4
RUN buildDeps='curl libatomic1' \
&& set -x \
&& for key in \
<API key> \
; do \
gpg --batch --keyserver pgp.mit.edu --recv-keys "$key" || \
gpg --batch --keyserver keyserver.pgp.com --recv-keys "$key" || \
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" ; \
done \
&& apt-get update && apt-get install -y $buildDeps --<API key> \
|
#!/usr/bin/env sh
set -e
exit 0
SCALA_VERSION=${SCALA_VERSION:-2_12}
sbt \
grpcRuntimeJVM${SCALA_VERSION}/<API key> \
lensesJVM${SCALA_VERSION}/<API key> \
runtimeJVM${SCALA_VERSION}/<API key> \
compilerPluginJVM${SCALA_VERSION}/<API key>
|
(function($) {
module("referenceReads1");
// Test case : Reference Reads 1
_asyncTest("Reference Reads 1", function()
{
expect(6);
GitanaTest.<API key>().then(function() {
var platform = this;
// create a few things
var repository = null;
this.createRepository().then(function() {
repository = this;
});
var domain = null;
this.createDomain().then(function() {
domain = this;
});
var registrar = null;
this.createRegistrar().then(function() {
registrar = this;
});
var stack = null;
this.createStack().then(function() {
stack = this;
});
var team = null;
this.then(function() {
this.subchain(stack).createTeam("abc-" + new Date().getTime()).then(function() {
team = this;
});
});
this.then(function() {
var repositoryReference = "repository://" + platform.getId() + "/" + repository.getId();
var domainReference = "domain://" + platform.getId() + "/" + domain.getId();
var registrarReference = "registrar://" + platform.getId() + "/" + registrar.getId();
var stackReference = "stack://" + platform.getId() + "/" + stack.getId();
var teamReference = "team://stack/" + platform.getId() + "/" + stack.getId() + "/" + team.getKey();
var entries = [{
"ref": repositoryReference
}, {
"ref": domainReference
}, {
"ref": registrarReference
}, {
"ref": stackReference
}, {
"ref": teamReference
}];
this.referenceReads(entries, function(results) {
// check that they all came back
ok(results.length == entries.length, "Found the right number of results");
for (var i = 0; i < results.length; i++)
{
ok(results[i].entry, "Found entry
}
// done
start();
});
});
});
});
}(jQuery) );
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="de">
<head>
<title>Uses of Class org.deidentifier.arx.aggregates.<API key>.Format (ARX API Documentation)</title>
<link rel="stylesheet" type="text/css" href="../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.deidentifier.arx.aggregates.<API key>.Format (ARX API Documentation)";
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar_top">
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../org/deidentifier/arx/aggregates/<API key>.Format.html" title="class in org.deidentifier.arx.aggregates">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/deidentifier/arx/aggregates/class-use/<API key>.Format.html" target="_top">Frames</a></li>
<li><a href="<API key>.Format.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip-navbar_top">
</a></div>
<div class="header">
<h2 title="Uses of Class org.deidentifier.arx.aggregates.<API key>.Format" class="title">Uses of Class<br>org.deidentifier.arx.aggregates.<API key>.Format</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../org/deidentifier/arx/aggregates/<API key>.Format.html" title="class in org.deidentifier.arx.aggregates"><API key>.Format</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#org.deidentifier.arx.aggregates">org.deidentifier.arx.aggregates</a></td>
<td class="colLast">
<div class="block">This package provides methods for aggregating data.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="org.deidentifier.arx.aggregates">
</a>
<h3>Uses of <a href="../../../../../org/deidentifier/arx/aggregates/<API key>.Format.html" title="class in org.deidentifier.arx.aggregates"><API key>.Format</a> in <a href="../../../../../org/deidentifier/arx/aggregates/package-summary.html">org.deidentifier.arx.aggregates</a></h3>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../org/deidentifier/arx/aggregates/package-summary.html">org.deidentifier.arx.aggregates</a> that return <a href="../../../../../org/deidentifier/arx/aggregates/<API key>.Format.html" title="class in org.deidentifier.arx.aggregates"><API key>.Format</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../org/deidentifier/arx/aggregates/<API key>.Format.html" title="class in org.deidentifier.arx.aggregates"><API key>.Format</a></code></td>
<td class="colLast"><span class="strong"><API key>.</span><code><strong><a href="../../../../../org/deidentifier/arx/aggregates/<API key>.html#getFormat()">getFormat</a></strong>()</code> </td>
</tr>
</tbody>
</table>
<table border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../org/deidentifier/arx/aggregates/package-summary.html">org.deidentifier.arx.aggregates</a> with parameters of type <a href="../../../../../org/deidentifier/arx/aggregates/<API key>.Format.html" title="class in org.deidentifier.arx.aggregates"><API key>.Format</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>static <a href="../../../../../org/deidentifier/arx/aggregates/HierarchyBuilder.html" title="class in org.deidentifier.arx.aggregates">HierarchyBuilder</a><java.util.Date></code></td>
<td class="colLast"><span class="strong"><API key>.</span><code><strong><a href="../../../../../org/deidentifier/arx/aggregates/<API key>.html#create(org.deidentifier.arx.DataType, java.util.TimeZone, org.deidentifier.arx.aggregates.<API key>.Format, java.util.Date, java.util.Date, org.deidentifier.arx.aggregates.<API key>.Granularity...)">create</a></strong>(<a href="../../../../../org/deidentifier/arx/DataType.html" title="class in org.deidentifier.arx">DataType</a><java.util.Date> type,
java.util.TimeZone timeZone,
<a href="../../../../../org/deidentifier/arx/aggregates/<API key>.Format.html" title="class in org.deidentifier.arx.aggregates"><API key>.Format</a> format,
java.util.Date bottomCoding,
java.util.Date topCoding,
<a href="../../../../../org/deidentifier/arx/aggregates/<API key>.Granularity.html" title="enum in org.deidentifier.arx.aggregates"><API key>.Granularity</a>... granularities)</code>
<div class="block">Creates an hierarchy reflecting the given granularities</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>static <a href="../../../../../org/deidentifier/arx/aggregates/HierarchyBuilder.html" title="class in org.deidentifier.arx.aggregates">HierarchyBuilder</a><java.util.Date></code></td>
<td class="colLast"><span class="strong"><API key>.</span><code><strong><a href="../../../../../org/deidentifier/arx/aggregates/<API key>.html#create(org.deidentifier.arx.DataType, java.util.TimeZone, org.deidentifier.arx.aggregates.<API key>.Format, org.deidentifier.arx.aggregates.<API key>.Granularity...)">create</a></strong>(<a href="../../../../../org/deidentifier/arx/DataType.html" title="class in org.deidentifier.arx">DataType</a><java.util.Date> type,
java.util.TimeZone timeZone,
<a href="../../../../../org/deidentifier/arx/aggregates/<API key>.Format.html" title="class in org.deidentifier.arx.aggregates"><API key>.Format</a> format,
<a href="../../../../../org/deidentifier/arx/aggregates/<API key>.Granularity.html" title="enum in org.deidentifier.arx.aggregates"><API key>.Granularity</a>... granularities)</code>
<div class="block">Creates an hierarchy reflecting the given granularities</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><span class="strong"><API key>.</span><code><strong><a href="../../../../../org/deidentifier/arx/aggregates/<API key>.html#setFormat(org.deidentifier.arx.aggregates.<API key>.Format)">setFormat</a></strong>(<a href="../../../../../org/deidentifier/arx/aggregates/<API key>.Format.html" title="class in org.deidentifier.arx.aggregates"><API key>.Format</a> format)</code> </td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="bottomNav"><a name="navbar_bottom">
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../org/deidentifier/arx/aggregates/<API key>.Format.html" title="class in org.deidentifier.arx.aggregates">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../package-tree.html">Tree</a></li>
<li><a href="../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?org/deidentifier/arx/aggregates/class-use/<API key>.Format.html" target="_top">Frames</a></li>
<li><a href="<API key>.Format.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip-navbar_bottom">
</a></div>
</body>
</html>
|
<html>
<body>
<table width="100%" height="100%" border="1">
<tr height="18">
<td width="20">_</td><td>_</td><td width="8">_</td><td width="50%">_</td><td width="50%">_</td><td width="20">_</td>
</tr>
<tr>
<td></td><td colspan="4" align="full">description</td>
</tr>
<tr height="8"></tr>
<tr>
<td></td><td colspan="4" align="full">error_lbl</td>
</tr>
<tr height="8"></tr>
<tr>
<td></td><td align="right">address_lbl</td><td></td><td align="full" colspan="2">address</td>
</tr>
<tr height="8"></tr>
<tr>
<td></td><td align="right">name_lbl</td><td></td><td align="full" colspan="2">name</td>
</tr>
<tr height="8"></tr>
<tr>
<td></td><td align="right">title_lbl</td><td></td><td align="full" colspan="2">title</td>
</tr>
<tr height="8"></tr>
<tr>
<td></td><td></td><td></td><td></td><td align="right">separate_vm</td>
</tr>
<tr height="100%"><td>_</td></tr>
</table>
</body>
</html>
|
-- CREATE DATABASE
CREATE DATABASE agile_metrics
WITH ENCODING='UTF8'
OWNER=postgres
CONNECTION LIMIT=-1;
-- Table: "user"
-- DROP TABLE "user";
CREATE TABLE "user"
(
id bigserial NOT NULL,
asana_id bigint,
name character varying(200),
email character varying(200),
photo_url character varying(500),
created_at timestamp with time zone NOT NULL DEFAULT now(),
updated_at timestamp with time zone,
deleted_at timestamp with time zone,
username character varying(100),
password character varying(100),
CONSTRAINT pk_user_id PRIMARY KEY (id)
)
WITH (
OIDS=FALSE
);
ALTER TABLE "user"
OWNER TO postgres;
-- Table: token
-- DROP TABLE token;
CREATE TABLE token
(
id bigserial NOT NULL,
user_id bigint,
created_at timestamp with time zone NOT NULL DEFAULT now(),
updated_at timestamp with time zone,
deleted_at timestamp with time zone,
expiry timestamp with time zone,
access_token character varying(500),
refresh_token character varying(60),
token_type character varying(50),
CONSTRAINT pk_token_id PRIMARY KEY (id),
CONSTRAINT fk_token_user_id FOREIGN KEY (user_id)
REFERENCES "user" (id) MATCH SIMPLE
ON UPDATE NO ACTION ON DELETE NO ACTION
)
WITH (
OIDS=FALSE
);
ALTER TABLE token
OWNER TO postgres;
-- Index: fki_token_user_id
-- DROP INDEX fki_token_user_id;
CREATE INDEX fki_token_user_id
ON token
USING btree
(user_id);
|
#ifndef GDCMMD5_H
#define GDCMMD5_H
#include "gdcmTypes.h"
namespace gdcm
{
class MD5Internals;
/**
* \brief Class for MD5
*
* \warning this class is able to pick from two implementations:
*
* 1. a lightweight md5 implementation (when GDCM_BUILD_TESTING is turned ON)
* 2. the one from OpenSSL (when <API key> is turned ON)
*
* In all other cases it will return an error
*/
class GDCM_EXPORT MD5
{
public :
MD5();
~MD5();
static bool Compute(const char *buffer, unsigned long buf_len, char digest_str[33]);
static bool ComputeFile(const char *filename, char digest_str[33]);
private:
MD5Internals *Internals;
private:
MD5(const MD5&); // Not implemented.
void operator=(const MD5&); // Not implemented.
};
} // end namespace gdcm
#endif //GDCMMD5_H
|
$(function () {
var controller = new ScrollMagic.Controller({
globalSceneOptions: {
triggerHook: 'onLeave',
reverse: true
}
});
// $('.homepage .panel').each(function () {
// var element = $(this);
// console.log(element);
// new ScrollMagic.Scene({triggerElement: element})
// .setPin(element)
// .setClassToggle(element,'active')
// .addTo(controller)
// var actual_positions = [0];
// var mid_points = [];
// var all_scenes = [];
// $('.services .panel').each(function (index) {
// if($(this).hasClass('main')) {
// new ScrollMagic.Scene({triggerElement: '.services .main'})
// .setPin('.services .main')
// .setClassToggle('.services .main','active')
// .addTo(controller)
// else {
// var element_id = $(this).attr('id');
// var <API key> = '#' + $(this).attr('id');
// var scene = new ScrollMagic.Scene({triggerElement: <API key>})
// .setPin(<API key>)
// .setClassToggle(<API key>,'show-bottom-nav')
// .addTo(controller)
// all_scenes.push({
// id: element_id,
// scene: scene
// actual_positions.push(Math.ceil(scene.triggerPosition()));
// if(actual_positions.length > 1) {
// mid_points.push((actual_positions[index] + actual_positions [index-1]) / 2)
// $('a[href*=#]:not([href=#])').click(function () {
// var id = $(this).attr('href').replace('
// if($(this).parent().parent().parent().hasClass('bottom-nav')) {
// var index = $('.bottom-nav ul li a').index($(this));
// }else {
// var index = $('ul.wrap li a').index($(this));
// if(id == 'down') {
// setTimeout(function () {
// $('.bottom-nav').addClass('fixed')
// },1100)
// else {
// var targetted_scene = all_scenes[index];
// if(targetted_scene.id == id) {
// $('html,body').animate({scrollTop: targetted_scene.scene.scrollOffset()},1000);
// return false;
// var <API key> = function (index) {
// $('.bottom-nav').addClass('fixed')
// $('.bottom-nav ul li').removeClass('active');
// $('.bottom-nav ul li:nth-child(' + index + ')').children('a').parent().last().addClass('active');
// $(window).scroll(function () {
// if ($(".show-bottom-nav")[0]){
// $('.bottom-nav').addClass('fixed')
// }else{
// $('.bottom-nav').removeClass('fixed')
// for(var index=0; index<mid_points.length; index++) {
// var next_index = index+1;
// var last_index = mid_points.length-1
// /* check between mid point ranges and set active class to the respective nav item. */
// if($(window).scrollTop() > mid_points[index] && $(window).scrollTop() < mid_points[next_index]) {
// <API key>(next_index);
// break;
// /* if nothing matches and reaches to last index then set active active to last nav item. */
// }else if ($(window).scrollTop() > mid_points[last_index]) {
// <API key>(mid_points.length);
// /* remove from all if its rolled back to the top*/
// }else {
// $('.bottom-nav ul li').removeClass('active');
});
//change navigation color on scroll
/*
var <API key> = $('.color-light').offset().top;
var <API key> = $('.pattern').offset().top;
console.log(<API key>, <API key>);
$(window).scroll(function (event) {
var scroll = $(window).scrollTop();
console.log(scroll);
if(scroll < <API key> && scroll >= <API key>) {
$('.homepage nav').addClass('change-color');
} else {
$('.homepage nav').removeClass('change-color');
}
});
*/
|
angular.module('aac.controllers.main', [])
/**
* Main layout controller
* @param $scope
*/
.controller('MainCtrl', function($scope, $rootScope, $location, Data, Utils) {
$scope.go = function(v) {
$location.path(v);
}
$scope.activeView = function(view) {
return view == $rootScope.currentView ? 'active' : '';
};
$scope.signOut = function() {
window.document.location = "./logout";
};
Data.getProfile().then(function(data) {
data.fullname = data.name + ' ' + data.surname;
$rootScope.user = data;
}).catch(function(err) {
Utils.showError(err);
});
})
.controller('HomeController', function($scope, $rootScope, $location) {
})
.controller('AccountsController', function($scope, $rootScope, $location, Data, Utils) {
Data.getAccounts().then(function(data) {
Data.getProviders().then(function(providers) {
providers.sort(function(a,b) {
if (data.accounts[a] && !data.accounts[b]) return -1;
if (data.accounts[b] && !data.accounts[a]) return 1;
return a.localeCompare(b);
});
$scope.providers = providers;
var accounts = {};
for (var p in data.accounts) {
var amap = {};
for (var k in data.accounts[p]) {
if (k === 'it.smartcommunitylab.aac.surname') amap['surname'] = data.accounts[p][k];
else if (k === 'it.smartcommunitylab.aac.givenname') amap['givenname'] = data.accounts[p][k];
else if (k === 'it.smartcommunitylab.aac.username') amap['username'] = data.accounts[p][k];
else amap[k] = data.accounts[p][k];
}
accounts[p] = amap;
}
$scope.accounts = accounts;
}).catch(function(err) {
Utils.showError(err);
});
}).catch(function(err) {
Utils.showError(err);
});
$scope.<API key> = function() {
$('#deleteConfirm').modal({keyboard: false});
}
$scope.deleteAccount = function() {
$('#deleteConfirm').modal('hide');
Data.deleteAccount().then(function() {
window.location.href = './logout';
}).catch(function(err) {
Utils.showError(err);
});
}
})
.controller('<API key>', function($scope, $rootScope, $location, Data, Utils) {
Data.getConnections().then(function(connections) {
$scope.connections = connections;
}).catch(function(err) {
Utils.showError(err);
});
$scope.confirmDeleteApp = function(app) {
$scope.clientId = app.clientId;
$('#deleteConfirm').modal({keyboard: false});
}
$scope.deleteApp = function() {
$('#deleteConfirm').modal('hide');
Data.removeConnection($scope.clientId).then(function(connections) {
$scope.connections = connections;
Utils.showSuccess();
}).catch(function(err) {
Utils.showError(err);
});
}
})
.controller('ProfileController', function($scope, $rootScope, $location, Data, Utils) {
$scope.profile = Object.assign($rootScope.user);
Data.getAccounts().then(function(data) {
if (!data.accounts.internal) {
$scope.password_required = true;
}
}).catch(function(err) {
Utils.showError(err);
});
$scope.cancel = function() {
window.history.back();
}
$scope.save = function() {
if (!$scope.profile.name ||
!$scope.profile.surname ||
!$scope.profile.username ||
$scope.profile.password && $scope.profile.password != $scope.profile.password2)
{
return;
}
Data.saveAccount($scope.profile).then(function(data) {
data.fullname = data.name + ' ' + data.surname;
$rootScope.user = data;
$scope.profile = Object.assign($rootScope.user);
$scope.password_required = false;
Utils.showSuccess();
}).catch(function(err) {
Utils.showError(err);
});
}
Utils.initUI();
})
;
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Generic values</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.77.1">
<link rel="home" href="index.html" title="GObject Reference Manual">
<link rel="up" href="rn01.html" title="API Reference">
<link rel="prev" href="gobject-Boxed-Types.html" title="Boxed Types">
<link rel="next" href="<API key>.html" title="Parameters and Values">
<meta name="generator" content="GTK-Doc V1.18 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2">
<tr valign="middle">
<td><a accesskey="p" href="gobject-Boxed-Types.html"><img src="left.png" width="24" height="24" border="0" alt="Prev"></a></td>
<td><a accesskey="u" href="rn01.html"><img src="up.png" width="24" height="24" border="0" alt="Up"></a></td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="24" height="24" border="0" alt="Home"></a></td>
<th width="100%" align="center">GObject Reference Manual</th>
<td><a accesskey="n" href="<API key>.html"><img src="right.png" width="24" height="24" border="0" alt="Next"></a></td>
</tr>
<tr><td colspan="5" class="shortcuts">
<a href="#<API key>.synopsis" class="shortcut">Top</a>
|
<a href="#<API key>.description" class="shortcut">Description</a>
</td></tr>
</table>
<div class="refentry">
<a name="<API key>"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="<API key>.top_of_page"></a>Generic values</span></h2>
<p>Generic values — A polymorphic type that can hold values of any
other type</p>
</td>
<td valign="top" align="right"></td>
</tr></table></div>
<div class="refsynopsisdiv">
<a name="<API key>.synopsis"></a><h2>Synopsis</h2>
<pre class="synopsis">
#include <glib-object.h>
#define <a class="link" href="<API key>.html#G-VALUE-INIT:CAPS" title="G_VALUE_INIT">G_VALUE_INIT</a>
#define <a class="link" href="<API key>.html#G-VALUE-HOLDS:CAPS" title="G_VALUE_HOLDS()">G_VALUE_HOLDS</a> (value,
type)
#define <a class="link" href="<API key>.html#G-VALUE-TYPE:CAPS" title="G_VALUE_TYPE()">G_VALUE_TYPE</a> (value)
#define <a class="link" href="<API key>.html#G-VALUE-TYPE-NAME:CAPS" title="G_VALUE_TYPE_NAME()">G_VALUE_TYPE_NAME</a> (value)
#define <a class="link" href="<API key>.html#G-TYPE-IS-VALUE:CAPS" title="G_TYPE_IS_VALUE()">G_TYPE_IS_VALUE</a> (type)
#define <a class="link" href="<API key>.html#<API key>:CAPS" title="<API key>()"><API key></a> (type)
#define <a class="link" href="<API key>.html#G-IS-VALUE:CAPS" title="G_IS_VALUE()">G_IS_VALUE</a> (value)
<a class="link" href="<API key>.html#GValue" title="GValue">GValue</a>;
#define <a class="link" href="<API key>.html#G-TYPE-VALUE:CAPS" title="G_TYPE_VALUE">G_TYPE_VALUE</a>
#define <a class="link" href="<API key>.html#G-TYPE-VALUE-ARRAY:CAPS" title="G_TYPE_VALUE_ARRAY">G_TYPE_VALUE_ARRAY</a>
<a class="link" href="<API key>.html#GValue" title="GValue"><span class="returnvalue">GValue</span></a> * <a class="link" href="<API key>.html#g-value-init" title="g_value_init ()">g_value_init</a> (<em class="parameter"><code><a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>,
<em class="parameter"><code><a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> g_type</code></em>);
<span class="returnvalue">void</span> <a class="link" href="<API key>.html#g-value-copy" title="g_value_copy ()">g_value_copy</a> (<em class="parameter"><code>const <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *src_value</code></em>,
<em class="parameter"><code><a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *dest_value</code></em>);
<a class="link" href="<API key>.html#GValue" title="GValue"><span class="returnvalue">GValue</span></a> * <a class="link" href="<API key>.html#g-value-reset" title="g_value_reset ()">g_value_reset</a> (<em class="parameter"><code><a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);
<span class="returnvalue">void</span> <a class="link" href="<API key>.html#g-value-unset" title="g_value_unset ()">g_value_unset</a> (<em class="parameter"><code><a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);
<span class="returnvalue">void</span> <a class="link" href="<API key>.html#<API key>" title="<API key> ()"><API key></a> (<em class="parameter"><code><a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>,
<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="<API key>.html#<API key>" title="<API key> ()"><API key></a> (<em class="parameter"><code>const <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> <a class="link" href="<API key>.html#<API key>" title="<API key> ()"><API key></a> (<em class="parameter"><code>const <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="<API key>.html#<API key>" title="<API key> ()"><API key></a> (<em class="parameter"><code><a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> src_type</code></em>,
<em class="parameter"><code><a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> dest_type</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="<API key>.html#<API key>" title="<API key> ()"><API key></a> (<em class="parameter"><code><a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> src_type</code></em>,
<em class="parameter"><code><a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> dest_type</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <a class="link" href="<API key>.html#g-value-transform" title="g_value_transform ()">g_value_transform</a> (<em class="parameter"><code>const <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *src_value</code></em>,
<em class="parameter"><code><a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *dest_value</code></em>);
<span class="returnvalue">void</span> (<a class="link" href="<API key>.html#GValueTransform" title="GValueTransform ()">*GValueTransform</a>) (<em class="parameter"><code>const <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *src_value</code></em>,
<em class="parameter"><code><a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *dest_value</code></em>);
<span class="returnvalue">void</span> <a class="link" href="<API key>.html#<API key>" title="<API key> ()"><API key></a> (<em class="parameter"><code><a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> src_type</code></em>,
<em class="parameter"><code><a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> dest_type</code></em>,
<em class="parameter"><code><a class="link" href="<API key>.html#GValueTransform" title="GValueTransform ()"><span class="type">GValueTransform</span></a> transform_func</code></em>);
<a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <a class="link" href="<API key>.html#<API key>" title="<API key> ()"><API key></a> (<em class="parameter"><code>const <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);
</pre>
</div>
<div class="refsect1">
<a name="<API key>.description"></a><h2>Description</h2>
<p>
The <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure is basically a variable container that consists
of a type identifier and a specific value of that type.
The type identifier within a <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure always determines the
type of the associated value.
To create a undefined <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure, simply create a zero-filled
<a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure. To initialize the <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a>, use the <a class="link" href="<API key>.html#g-value-init" title="g_value_init ()"><code class="function">g_value_init()</code></a>
function. A <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> cannot be used until it is initialized.
The basic type operations (such as freeing and copying) are determined
by the <a class="link" href="<API key>.html#GTypeValueTable" title="struct GTypeValueTable"><span class="type">GTypeValueTable</span></a> associated with the type ID stored in the <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a>.
Other <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> operations (such as converting values between types) are
provided by this interface.
</p>
<p>
The code in the example program below demonstrates <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a>'s
features.
</p>
<p>
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="preproc">#include</span><span class="normal"> </span><span class="string"><glib-object.h></span>
<span class="keyword">static</span><span class="normal"> </span><span class="type">void</span>
<span class="function">int2string</span><span class="normal"> </span><span class="symbol">(</span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">GValue</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">src_value</span><span class="symbol">,</span>
<span class="normal"> </span><span class="usertype">GValue</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">dest_value</span><span class="symbol">)</span>
<span class="cbracket">{</span>
<span class="normal"> </span><span class="keyword">if</span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="<API key>.html#g-value-get-int">g_value_get_int</a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">src_value</span><span class="symbol">)</span><span class="normal"> </span><span class="symbol">==</span><span class="normal"> </span><span class="number">42</span><span class="symbol">)</span>
<span class="normal"> </span><span class="function"><a href="<API key>.html#<API key>"><API key></a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">dest_value</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"An important number"</span><span class="symbol">);</span>
<span class="normal"> </span><span class="keyword">else</span>
<span class="normal"> </span><span class="function"><a href="<API key>.html#<API key>"><API key></a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal">dest_value</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"What's that?"</span><span class="symbol">);</span>
<span class="cbracket">}</span>
<span class="type">int</span>
<span class="function">main</span><span class="normal"> </span><span class="symbol">(</span><span class="type">int</span><span class="normal"> argc</span><span class="symbol">,</span>
<span class="normal"> </span><span class="type">char</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">argv</span><span class="symbol">[])</span>
<span class="cbracket">{</span>
<span class="normal"> </span><span class="comment">/* GValues must be initialized */</span>
<span class="normal"> </span><span class="usertype">GValue</span><span class="normal"> a </span><span class="symbol">=</span><span class="normal"> <a href="<API key>.html#G-VALUE-INIT:CAPS">G_VALUE_INIT</a></span><span class="symbol">;</span>
<span class="normal"> </span><span class="usertype">GValue</span><span class="normal"> b </span><span class="symbol">=</span><span class="normal"> <a href="<API key>.html#G-VALUE-INIT:CAPS">G_VALUE_INIT</a></span><span class="symbol">;</span>
<span class="normal"> </span><span class="keyword">const</span><span class="normal"> </span><span class="usertype">gchar</span><span class="normal"> </span><span class="symbol">*</span><span class="normal">message</span><span class="symbol">;</span>
<span class="normal"> </span><span class="function"><a href="<API key>.html#g-type-init">g_type_init</a></span><span class="normal"> </span><span class="symbol">();</span>
<span class="normal"> </span><span class="comment">/* The GValue starts empty */</span>
<span class="normal"> </span><span class="function"><a href="./../glib/glib/glib-Testing.html#g-assert">g_assert</a></span><span class="normal"> </span><span class="symbol">(!</span><span class="function"><a href="<API key>.html#<API key>:CAPS"><API key></a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">a</span><span class="symbol">));</span>
<span class="normal"> </span><span class="comment">/* Put a string in it */</span>
<span class="normal"> </span><span class="function"><a href="<API key>.html#g-value-init">g_value_init</a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">a</span><span class="symbol">,</span><span class="normal"> <a href="<API key>.html#G-TYPE-STRING:CAPS">G_TYPE_STRING</a></span><span class="symbol">);</span>
<span class="normal"> </span><span class="function"><a href="./../glib/glib/glib-Testing.html#g-assert">g_assert</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="<API key>.html#<API key>:CAPS"><API key></a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">a</span><span class="symbol">));</span>
<span class="normal"> </span><span class="function"><a href="<API key>.html#<API key>"><API key></a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">a</span><span class="symbol">,</span><span class="normal"> </span><span class="string">"Hello, world!"</span><span class="symbol">);</span>
<span class="normal"> </span><span class="function"><a href="./../glib/glib/<API key>.html#g-printf">g_printf</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"%s</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="<API key>.html#g-value-get-string">g_value_get_string</a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">a</span><span class="symbol">));</span>
<span class="normal"> </span><span class="comment">/* Reset it to its pristine state */</span>
<span class="normal"> </span><span class="function"><a href="<API key>.html#g-value-unset">g_value_unset</a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">a</span><span class="symbol">);</span>
<span class="normal"> </span><span class="comment">/* It can then be reused for another type */</span>
<span class="normal"> </span><span class="function"><a href="<API key>.html#g-value-init">g_value_init</a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">a</span><span class="symbol">,</span><span class="normal"> <a href="<API key>.html#G-TYPE-INT:CAPS">G_TYPE_INT</a></span><span class="symbol">);</span>
<span class="normal"> </span><span class="function"><a href="<API key>.html#g-value-set-int">g_value_set_int</a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">a</span><span class="symbol">,</span><span class="normal"> </span><span class="number">42</span><span class="symbol">);</span>
<span class="normal"> </span><span class="comment">/* Attempt to transform it into a GValue of type STRING */</span>
<span class="normal"> </span><span class="function"><a href="<API key>.html#g-value-init">g_value_init</a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">b</span><span class="symbol">,</span><span class="normal"> <a href="<API key>.html#G-TYPE-STRING:CAPS">G_TYPE_STRING</a></span><span class="symbol">);</span>
<span class="normal"> </span><span class="comment">/* An INT is transformable to a STRING */</span>
<span class="normal"> </span><span class="function"><a href="./../glib/glib/glib-Testing.html#g-assert">g_assert</a></span><span class="normal"> </span><span class="symbol">(</span><span class="function"><a href="<API key>.html#<API key>"><API key></a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="<API key>.html#G-TYPE-INT:CAPS">G_TYPE_INT</a></span><span class="symbol">,</span><span class="normal"> <a href="<API key>.html#G-TYPE-STRING:CAPS">G_TYPE_STRING</a></span><span class="symbol">));</span>
<span class="normal"> </span><span class="function"><a href="<API key>.html#g-value-transform">g_value_transform</a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">a</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">b</span><span class="symbol">);</span>
<span class="normal"> </span><span class="function"><a href="./../glib/glib/<API key>.html#g-printf">g_printf</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"%s</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="<API key>.html#g-value-get-string">g_value_get_string</a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">b</span><span class="symbol">));</span>
<span class="normal"> </span><span class="comment">/* Attempt to transform it again using a custom transform function */</span>
<span class="normal"> </span><span class="function"><a href="<API key>.html#<API key>"><API key></a></span><span class="normal"> </span><span class="symbol">(</span><span class="normal"><a href="<API key>.html#G-TYPE-INT:CAPS">G_TYPE_INT</a></span><span class="symbol">,</span><span class="normal"> <a href="<API key>.html#G-TYPE-STRING:CAPS">G_TYPE_STRING</a></span><span class="symbol">,</span><span class="normal"> int2string</span><span class="symbol">);</span>
<span class="normal"> </span><span class="function"><a href="<API key>.html#g-value-transform">g_value_transform</a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">a</span><span class="symbol">,</span><span class="normal"> </span><span class="symbol">&</span><span class="normal">b</span><span class="symbol">);</span>
<span class="normal"> </span><span class="function"><a href="./../glib/glib/<API key>.html#g-printf">g_printf</a></span><span class="normal"> </span><span class="symbol">(</span><span class="string">"%s</span><span class="specialchar">\n</span><span class="string">"</span><span class="symbol">,</span><span class="normal"> </span><span class="function"><a href="<API key>.html#g-value-get-string">g_value_get_string</a></span><span class="normal"> </span><span class="symbol">(&</span><span class="normal">b</span><span class="symbol">));</span>
<span class="normal"> </span><span class="keyword">return</span><span class="normal"> </span><span class="number">0</span><span class="symbol">;</span>
<span class="cbracket">}</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
</p>
</div>
<div class="refsect1">
<a name="<API key>.details"></a><h2>Details</h2>
<div class="refsect2">
<a name="G-VALUE-INIT:CAPS"></a><h3>G_VALUE_INIT</h3>
<pre class="programlisting">#define G_VALUE_INIT { 0, { { 0 } } }
</pre>
<p>
A <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> must be initialized before it can be used.
This macro can be used as initializer instead of an explicit
<code class="literal">{ 0 }</code> when declaring a variable,
but it cannot be assigned to a variable.
</p>
<p>
</p>
<div class="informalexample">
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td class="listing_lines" align="right"><pre>1</pre></td>
<td class="listing_code"><pre class="programlisting"><span class="usertype">GValue</span><span class="normal"> value </span><span class="symbol">=</span><span class="normal"> <a href="<API key>.html#G-VALUE-INIT:CAPS">G_VALUE_INIT</a></span><span class="symbol">;</span></pre></td>
</tr>
</tbody>
</table>
</div>
<p>
</p>
<p class="since">Since 2.30</p>
</div>
<hr>
<div class="refsect2">
<a name="G-VALUE-HOLDS:CAPS"></a><h3>G_VALUE_HOLDS()</h3>
<pre class="programlisting">#define G_VALUE_HOLDS(value,type) (<API key> ((value), (type)))
</pre>
<p>
Checks if <em class="parameter"><code>value</code></em> holds (or contains) a value of <em class="parameter"><code>type</code></em>.
This macro will also check for <em class="parameter"><code>value</code></em> != <a href="./../glib/glib/<API key>.html#NULL:CAPS"><code class="literal">NULL</code></a> and issue a
warning if the check fails.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>A <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>A <a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> value.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="./../glib/glib/<API key>.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>value</code></em> holds the <em class="parameter"><code>type</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G-VALUE-TYPE:CAPS"></a><h3>G_VALUE_TYPE()</h3>
<pre class="programlisting">#define G_VALUE_TYPE(value) (((GValue*) (value))->g_type)
</pre>
<p>
Get the type identifier of <em class="parameter"><code>value</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>A <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G-VALUE-TYPE-NAME:CAPS"></a><h3>G_VALUE_TYPE_NAME()</h3>
<pre class="programlisting">#define G_VALUE_TYPE_NAME(value) (g_type_name (G_VALUE_TYPE (value)))
</pre>
<p>
Gets the type name of <em class="parameter"><code>value</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>A <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the type name.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G-TYPE-IS-VALUE:CAPS"></a><h3>G_TYPE_IS_VALUE()</h3>
<pre class="programlisting">#define G_TYPE_IS_VALUE(type) (<API key> (type))
</pre>
<p>
Checks whether the passed in type ID can be used for <a class="link" href="<API key>.html#g-value-init" title="g_value_init ()"><code class="function">g_value_init()</code></a>.
That is, this macro checks whether this type provides an implementation
of the <a class="link" href="<API key>.html#GTypeValueTable" title="struct GTypeValueTable"><span class="type">GTypeValueTable</span></a> functions required for a type to create a <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> of.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>A <a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> value.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Whether <em class="parameter"><code>type</code></em> is suitable as a <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> type.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="<API key>:CAPS"></a><h3><API key>()</h3>
<pre class="programlisting">#define <API key>(type) (g_type_test_flags ((type), <API key>))
</pre>
<p>
Checks if <em class="parameter"><code>type</code></em> is an abstract value type. An abstract value type introduces
a value table, but can't be used for <a class="link" href="<API key>.html#g-value-init" title="g_value_init ()"><code class="function">g_value_init()</code></a> and is normally used as
an abstract base type for derived value types.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>type</code></em> :</span></p></td>
<td>A <a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> value.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="./../glib/glib/<API key>.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="G-IS-VALUE:CAPS"></a><h3>G_IS_VALUE()</h3>
<pre class="programlisting">#define G_IS_VALUE(value) (G_TYPE_CHECK_VALUE (value))
</pre>
<p>
Checks if <em class="parameter"><code>value</code></em> is a valid and initialized <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>A <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="./../glib/glib/<API key>.html#TRUE:CAPS"><code class="literal">TRUE</code></a> on success.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GValue"></a><h3>GValue</h3>
<pre class="programlisting">typedef struct {
} GValue;
</pre>
<p>
An opaque structure used to hold different types of values.
The data within the structure has protected scope: it is accessible only
to functions within a <a class="link" href="<API key>.html#GTypeValueTable" title="struct GTypeValueTable"><span class="type">GTypeValueTable</span></a> structure, or implementations of
the g_value_*() API. That is, code portions which implement new fundamental
types.
<a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> users cannot make any assumptions about how data is stored
within the 2 element <em class="parameter"><code>data</code></em> union, and the <em class="parameter"><code>g_type</code></em> member should
only be accessed through the <a class="link" href="<API key>.html#G-VALUE-TYPE:CAPS" title="G_VALUE_TYPE()"><code class="function">G_VALUE_TYPE()</code></a> macro.
</p>
</div>
<hr>
<div class="refsect2">
<a name="G-TYPE-VALUE:CAPS"></a><h3>G_TYPE_VALUE</h3>
<pre class="programlisting">#define G_TYPE_VALUE (g_value_get_type ())
</pre>
<p>
The type ID of the "GValue" type which is a boxed type,
used to pass around pointers to GValues.
</p>
</div>
<hr>
<div class="refsect2">
<a name="G-TYPE-VALUE-ARRAY:CAPS"></a><h3>G_TYPE_VALUE_ARRAY</h3>
<pre class="programlisting">#define G_TYPE_VALUE_ARRAY (<API key> ())
</pre>
<div class="warning" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Warning</h3>
<p><code class="literal">G_TYPE_VALUE_ARRAY</code> has been deprecated since version 2.32 and should not be used in newly-written code. Use <a href="./../glib/glib/glib-Arrays.html#GArray"><span class="type">GArray</span></a> instead of <a class="link" href="<API key>.html#GValueArray" title="struct GValueArray"><span class="type">GValueArray</span></a></p>
</div>
<p>
The type ID of the "GValueArray" type which is a boxed type,
used to pass around pointers to GValueArrays.
</p>
</div>
<hr>
<div class="refsect2">
<a name="g-value-init"></a><h3>g_value_init ()</h3>
<pre class="programlisting"><a class="link" href="<API key>.html#GValue" title="GValue"><span class="returnvalue">GValue</span></a> * g_value_init (<em class="parameter"><code><a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>,
<em class="parameter"><code><a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> g_type</code></em>);</pre>
<p>
Initializes <em class="parameter"><code>value</code></em> with the default value of <em class="parameter"><code>type</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>A zero-filled (uninitialized) <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>g_type</code></em> :</span></p></td>
<td>Type the <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> should hold values of.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure that has been passed in. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-value-copy"></a><h3>g_value_copy ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_value_copy (<em class="parameter"><code>const <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *src_value</code></em>,
<em class="parameter"><code><a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *dest_value</code></em>);</pre>
<p>
Copies the value of <em class="parameter"><code>src_value</code></em> into <em class="parameter"><code>dest_value</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>src_value</code></em> :</span></p></td>
<td>An initialized <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest_value</code></em> :</span></p></td>
<td>An initialized <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure of the same type as <em class="parameter"><code>src_value</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-value-reset"></a><h3>g_value_reset ()</h3>
<pre class="programlisting"><a class="link" href="<API key>.html#GValue" title="GValue"><span class="returnvalue">GValue</span></a> * g_value_reset (<em class="parameter"><code><a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
<p>
Clears the current value in <em class="parameter"><code>value</code></em> and resets it to the default value
(as if the value had just been initialized).
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>An initialized <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure that has been passed in</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-value-unset"></a><h3>g_value_unset ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> g_value_unset (<em class="parameter"><code><a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
<p>
Clears the current value in <em class="parameter"><code>value</code></em> and "unsets" the type,
this releases all resources associated with this GValue.
An unset value is the same as an uninitialized (zero-filled)
<a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>An initialized <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure.</td>
</tr></tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="<API key>"></a><h3><API key> ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> <API key> (<em class="parameter"><code><a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>,
<em class="parameter"><code><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="type">gpointer</span></a> instance</code></em>);</pre>
<p>
Sets <em class="parameter"><code>value</code></em> from an instantiatable type via the
value_table's <code class="function">collect_value()</code> function.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>An initialized <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>instance</code></em> :</span></p></td>
<td>the instance. <span class="annotation">[<acronym title="NULL is ok, both for passing and for returning."><span class="acronym">allow-none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="<API key>"></a><h3><API key> ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <API key> (<em class="parameter"><code>const <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
<p>
Determines if <em class="parameter"><code>value</code></em> will fit inside the size of a pointer value.
This is an internal function introduced mainly for C marshallers.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>An initialized <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="./../glib/glib/<API key>.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <em class="parameter"><code>value</code></em> will fit inside a pointer value.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="<API key>"></a><h3><API key> ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gpointer"><span class="returnvalue">gpointer</span></a> <API key> (<em class="parameter"><code>const <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>An initialized <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> structure.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>the value contents as pointer. This
function asserts that <a class="link" href="<API key>.html#<API key>" title="<API key> ()"><code class="function"><API key>()</code></a> returned <a href="./../glib/glib/<API key>.html#TRUE:CAPS"><code class="literal">TRUE</code></a> for the
passed in value. This is an internal function introduced mainly
for C marshallers. <span class="annotation">[<acronym title="Don't free data after the code is done."><span class="acronym">transfer none</span></acronym>]</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="<API key>"></a><h3><API key> ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <API key> (<em class="parameter"><code><a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> src_type</code></em>,
<em class="parameter"><code><a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> dest_type</code></em>);</pre>
<p>
Returns whether a <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> of type <em class="parameter"><code>src_type</code></em> can be copied into
a <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> of type <em class="parameter"><code>dest_type</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>src_type</code></em> :</span></p></td>
<td>source type to be copied.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest_type</code></em> :</span></p></td>
<td>destination type for copying.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="./../glib/glib/<API key>.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if <a class="link" href="<API key>.html#g-value-copy" title="g_value_copy ()"><code class="function">g_value_copy()</code></a> is possible with <em class="parameter"><code>src_type</code></em> and <em class="parameter"><code>dest_type</code></em>.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="<API key>"></a><h3><API key> ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> <API key> (<em class="parameter"><code><a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> src_type</code></em>,
<em class="parameter"><code><a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> dest_type</code></em>);</pre>
<p>
Check whether <a class="link" href="<API key>.html#g-value-transform" title="g_value_transform ()"><code class="function">g_value_transform()</code></a> is able to transform values
of type <em class="parameter"><code>src_type</code></em> into values of type <em class="parameter"><code>dest_type</code></em>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>src_type</code></em> :</span></p></td>
<td>Source type.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest_type</code></em> :</span></p></td>
<td>Target type.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>
<a href="./../glib/glib/<API key>.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the transformation is possible, <a href="./../glib/glib/<API key>.html#FALSE:CAPS"><code class="literal">FALSE</code></a> otherwise.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="g-value-transform"></a><h3>g_value_transform ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gboolean"><span class="returnvalue">gboolean</span></a> g_value_transform (<em class="parameter"><code>const <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *src_value</code></em>,
<em class="parameter"><code><a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *dest_value</code></em>);</pre>
<p>
Tries to cast the contents of <em class="parameter"><code>src_value</code></em> into a type appropriate
to store in <em class="parameter"><code>dest_value</code></em>, e.g. to transform a <a class="link" href="<API key>.html#G-TYPE-INT:CAPS" title="G_TYPE_INT"><code class="literal">G_TYPE_INT</code></a> value
into a <a class="link" href="<API key>.html#G-TYPE-FLOAT:CAPS" title="G_TYPE_FLOAT"><code class="literal">G_TYPE_FLOAT</code></a> value. Performing transformations between
value types might incur precision lossage. Especially
transformations into strings might reveal seemingly arbitrary
results and shouldn't be relied upon for production code (such
as rcfile value or object property serialization).
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>src_value</code></em> :</span></p></td>
<td>Source value.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest_value</code></em> :</span></p></td>
<td>Target value.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Whether a transformation rule was found and could be applied.
Upon failing transformations, <em class="parameter"><code>dest_value</code></em> is left untouched.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="GValueTransform"></a><h3>GValueTransform ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> (*GValueTransform) (<em class="parameter"><code>const <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *src_value</code></em>,
<em class="parameter"><code><a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *dest_value</code></em>);</pre>
<p>
The type of value transformation functions which can be registered with
<a class="link" href="<API key>.html#<API key>" title="<API key> ()"><code class="function"><API key>()</code></a>.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>src_value</code></em> :</span></p></td>
<td>Source value.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest_value</code></em> :</span></p></td>
<td>Target value.</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="<API key>"></a><h3><API key> ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span> <API key> (<em class="parameter"><code><a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> src_type</code></em>,
<em class="parameter"><code><a class="link" href="<API key>.html#GType" title="GType"><span class="type">GType</span></a> dest_type</code></em>,
<em class="parameter"><code><a class="link" href="<API key>.html#GValueTransform" title="GValueTransform ()"><span class="type">GValueTransform</span></a> transform_func</code></em>);</pre>
<p>
Registers a value transformation function for use in <a class="link" href="<API key>.html#g-value-transform" title="g_value_transform ()"><code class="function">g_value_transform()</code></a>.
A previously registered transformation function for <em class="parameter"><code>src_type</code></em> and <em class="parameter"><code>dest_type</code></em>
will be replaced.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>src_type</code></em> :</span></p></td>
<td>Source type.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>dest_type</code></em> :</span></p></td>
<td>Target type.</td>
</tr>
<tr>
<td><p><span class="term"><em class="parameter"><code>transform_func</code></em> :</span></p></td>
<td>a function which transforms values of type <em class="parameter"><code>src_type</code></em>
into value of type <em class="parameter"><code>dest_type</code></em>
</td>
</tr>
</tbody>
</table></div>
</div>
<hr>
<div class="refsect2">
<a name="<API key>"></a><h3><API key> ()</h3>
<pre class="programlisting"><a href="./../glib/glib/glib-Basic-Types.html#gchar"><span class="returnvalue">gchar</span></a> * <API key> (<em class="parameter"><code>const <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> *value</code></em>);</pre>
<p>
Return a newly allocated string, which describes the contents of a
<a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a>. The main purpose of this function is to describe <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a>
contents for debugging output, the way in which the contents are
described may change between different GLib versions.
</p>
<div class="variablelist"><table border="0" class="variablelist">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><em class="parameter"><code>value</code></em> :</span></p></td>
<td>
<a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a> which contents are to be described.</td>
</tr>
<tr>
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
<td>Newly allocated string.</td>
</tr>
</tbody>
</table></div>
</div>
</div>
<div class="refsect1">
<a name="<API key>.see-also"></a><h2>See Also</h2>
The fundamental types which all support <a class="link" href="<API key>.html#GValue" title="GValue"><span class="type">GValue</span></a>
operations and thus can be used as a type initializer for
<a class="link" href="<API key>.html#g-value-init" title="g_value_init ()"><code class="function">g_value_init()</code></a> are defined by a separate interface. See the <a class="link" href="<API key>.html" title="Parameters and Values">Standard
Values API</a> for details.
</div>
</div>
<div class="footer">
<hr>
Generated by GTK-Doc V1.18</div>
</body>
</html>
|
#!/bin/env python
import itertools
import collections
def read_table(filename):
with open(filename) as fp:
header = next(fp).split()
rows = [line.split()[1:] for line in fp if line.strip()]
columns = zip(*rows)
data = dict(zip(header, columns))
return data
table = read_table("../../data/colldata.txt")
pots = sorted(table)
alphabet = "+-?"
for num in range(2, len(table) + 1):
for group in itertools.combinations(pots, num):
patterns = zip(*[table[p] for p in group])
counts = collections.Counter(patterns)
for poss in itertools.product(alphabet, repeat=num):
print ', '.join(group) + ':',
print ''.join(poss), counts[poss]
|
package com.jota.patterns.singleton;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.widget.TextView;
import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;
import com.jota.patterns.singleton.singleton.User;
public class MainActivity extends AppCompatActivity {
@BindView(R.id.user1) TextView user1Text;
@BindView(R.id.user2) TextView user2Text;
@BindView(R.id.user3) TextView user3Text;
private User user, user1, user2, user3;
@Override protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ButterKnife.bind(this);
user = User.getInstance();
user.setToken("token");
user.setSocialNetwork("Facebook");
user1 = User.getInstance();
user2 = User.getInstance();
user3 = User.getInstance();
}
private void showUsers() {
user1Text.setText(user1.getSocialNetwork() + " - " + user1.getToken());
user2Text.setText(user2.getSocialNetwork() + " - " + user2.getToken());
user3Text.setText(user3.getSocialNetwork() + " - " + user3.getToken());
}
@OnClick(R.id.<API key>) public void changeSocial() {
user.setSocialNetwork("Twitter");
showUsers();
}
@OnClick(R.id.change_token_button) public void changeToken() {
user.setToken("Token token");
showUsers();
}
}
|
package ru.maizy.ambient7.core.data
import java.time.ZonedDateTime
case class Co2AggregatedLevels(
lowLevel: Int,
mediumLevel: Int,
highLevel: Int,
unknownLevel: Int,
from: ZonedDateTime,
to: ZonedDateTime,
agentId: Co2Agent
) {
override def toString: String = s"Co2AggregatedLevels(low=$lowLevel, med=$mediumLevel, high=$highLevel, " +
s"unknown=$unknownLevel, $from->$to, agent=${agentId.agentName}, tags=${agentId.tags})"
def hasAnyResult: Boolean =
lowLevel > 0 || mediumLevel > 0 || highLevel > 0
def combine(other: Co2AggregatedLevels): Co2AggregatedLevels =
copy(
lowLevel = lowLevel + other.lowLevel,
mediumLevel = mediumLevel + other.mediumLevel,
highLevel = highLevel + other.highLevel,
unknownLevel = unknownLevel + other.unknownLevel,
if (other.from.compareTo(from) < 0) other.from else from,
if (other.to.compareTo(to) > 0) other.to else to
)
}
|
jQuery(function($) {
//smooth scroll
$('.navbar-nav > li.anchor').click(function(event) {
//event.preventDefault();
var target = $(this).find('>a').prop('hash');
$('#navbar .active').removeClass('active');
$(this).addClass('active');
$('html, body').animate({
scrollTop: $(target).offset().top
}, 500);
});
//scrollspy
$('[data-spy="scroll"]').each(function () {
var $spy = $(this).scrollspy('refresh')
});
$(function() {
$(".navbar-btn").click(function() {
$("#options").toggle();
$(".navbar-btn .glyphicon").toggleClass("glyphicon-plus")
.toggleClass("glyphicon-minus");
});
});
});
|
// Package memory implements token buckets in memory, inspired by the algorithms used in Guava's
// Note that this implementation spins up a goroutine *per bucket* that's created. That can get
// expensive, and is not recommended for production use, with a large number of static or dynamic
// buckets.
package memory
import (
"context"
"time"
"github.com/square/quotaservice"
"github.com/square/quotaservice/config"
"github.com/square/quotaservice/logging"
pbconfig "github.com/square/quotaservice/protos/config"
)
type bucketFactory struct {
cfg *pbconfig.ServiceConfig
}
func (bf *bucketFactory) Init(cfg *pbconfig.ServiceConfig) {
bf.cfg = cfg
}
func (bf *bucketFactory) Client() interface{} {
return nil
}
func (bf *bucketFactory) NewBucket(namespace, bucketName string, cfg *pbconfig.BucketConfig, dyn bool) quotaservice.Bucket {
// fill rate is tokens-per-second.
bucket := &tokenBucket{
dynamic: dyn,
cfg: cfg,
nanosBetweenTokens: 1e9 / cfg.FillRate,
accumulatedTokens: cfg.Size, // Start full
fullName: config.FullyQualifiedName(namespace, bucketName),
waitTimer: make(chan *waitTimeReq),
closer: make(chan struct{})}
go bucket.waitTimeLoop()
return bucket
}
func NewBucketFactory() quotaservice.BucketFactory {
return &bucketFactory{}
}
// tokenBucket is a single-threaded implementation. A single goroutine updates the values of
// tokensNextAvailable and accumulatedTokens. When requesting tokens, Take() puts a request on
// the waitTimer channel, and listens on the response channel in the request for a result. The
// goroutine is shut down when Destroy() is called on this bucket. In-flight requests will be
// served, but new requests will not.
type tokenBucket struct {
dynamic bool
cfg *pbconfig.BucketConfig
nanosBetweenTokens int64
<API key> int64
accumulatedTokens int64
fullName string
waitTimer chan *waitTimeReq
closer chan struct{}
quotaservice.DefaultBucket // Extension for default methods on interface
}
// waitTimeReq is a request that you put on the channel for the waitTimer goroutine to pick up and
// process.
type waitTimeReq struct {
requested, maxWaitTimeNanos int64
response chan int64
}
func (b *tokenBucket) Take(_ context.Context, numTokens int64, maxWaitTime time.Duration) (time.Duration, bool) {
rsp := make(chan int64, 1)
b.waitTimer <- &waitTimeReq{numTokens, maxWaitTime.Nanoseconds(), rsp}
waitTimeNanos := <-rsp
if waitTimeNanos < 0 {
// Timed out
return 0, false
}
return time.Duration(waitTimeNanos) * time.Nanosecond, true
}
// calcWaitTime is designed to run in a single event loop and is not thread-safe.
func (b *tokenBucket) calcWaitTime(requested, maxWaitTimeNanos int64) (waitTimeNanos int64) {
currentTimeNanos := time.Now().UnixNano()
tna := b.<API key>
ac := b.accumulatedTokens
var freshTokens int64
if currentTimeNanos > tna {
freshTokens = (currentTimeNanos - tna) / b.nanosBetweenTokens
ac = min(b.cfg.Size, ac+freshTokens)
tna = currentTimeNanos
}
waitTimeNanos = tna - currentTimeNanos
<API key> := min(ac, requested)
tokensToWaitFor := requested - <API key>
futureWaitNanos := tokensToWaitFor * b.nanosBetweenTokens
tna += futureWaitNanos
ac -= <API key>
if (<API key> > b.cfg.MaxDebtMillis*1e6) || (waitTimeNanos > 0 && waitTimeNanos > maxWaitTimeNanos) {
waitTimeNanos = -1
} else {
b.<API key> = tna
b.accumulatedTokens = ac
}
return waitTimeNanos
}
func min(x, y int64) int64 {
if x < y {
return x
}
return y
}
// waitTimeLoop is the single event loop that claims tokens on a given bucket.
func (b *tokenBucket) waitTimeLoop() {
for {
select {
case req := <-b.waitTimer:
req.response <- b.calcWaitTime(req.requested, req.maxWaitTimeNanos)
case <-b.closer:
logging.Printf("Garbage collecting bucket %v", b.fullName)
// TODO(manik) properly notify goroutines who are currently trying to write to waitTimer
return
}
}
}
func (b *tokenBucket) Config() *pbconfig.BucketConfig {
return b.cfg
}
func (b *tokenBucket) Dynamic() bool {
return b.dynamic
}
func (b *tokenBucket) Destroy() {
// Signal the waitTimeLoop to exit
close(b.closer)
}
|
<?php
namespace Academe\Instructions;
use Academe\Contracts\Mapper\Executable;
abstract class BaseExecutable implements Executable
{
}
|
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports["default"] = void 0;
var STATIC_REG = /.*\.(png|jpe?g|gif|svg|woff2?|eot|ttf|otf)$/;
var VER_REG = /[\W][\d\w]+(?=\.\w+$)/;
var _default = function _default(req, res, next) {
var filePaths = req.url.split('/');
if (STATIC_REG.test(req.path) && filePaths[2] === 'prd') {
filePaths.splice(2, 1);
req.url = filePaths.join('/').replace(VER_REG, '');
}
next();
};
exports["default"] = _default;
|
System.register([], function (exports_1, context_1) {
"use strict";
var __moduleName = context_1 && context_1.id;
function toSnakeCase(camelCase) {
if (!camelCase) {
throw new Error("Please provide camelCase.");
}
return camelCase.replace(/([A-Z])/g, "-$1").toLowerCase();
}
exports_1("toSnakeCase", toSnakeCase);
return {
setters: [],
execute: function () {
}
};
});
//# sourceMappingURL=to.snake.case.js.map
|
package com.gotcreations.emojilibrary.controller;
import android.animation.Animator;
import android.graphics.PorterDuff;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.os.Handler;
import androidx.annotation.DrawableRes;
import androidx.appcompat.widget.Toolbar;
import android.text.Editable;
import android.text.InputType;
import android.text.TextWatcher;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.ImageButton;
import android.widget.LinearLayout;
import android.widget.TextView;
import java.util.concurrent.Executors;
import java.util.concurrent.<API key>;
import java.util.concurrent.TimeUnit;
import com.gotcreations.emojilibrary.R;
import com.gotcreations.emojilibrary.model.layout.EmojiCompatActivity;
import com.gotcreations.emojilibrary.model.layout.EmojiEditText;
import com.gotcreations.emojilibrary.model.layout.<API key>;
import com.gotcreations.emojilibrary.model.layout.TelegramPanelView;
import com.gotcreations.emojilibrary.util.<API key>;
import static android.view.View.GONE;
import static android.view.View.getDefaultSize;
public class TelegramPanel extends AppPanel{
private static final String TAG = "TelegramPanel";
public static final int EMPTY_MESSAGE = 0;
public static final int <API key> = 1;
public static final int <API key> = 2;
public static final int PREPARED_MESSAGE = 3;
public static final int <API key> = 4;
public static final int <API key> = 5;
public static final int AUDIO = 6;
private Toolbar mBottomPanel;
private TextView audioTime;
private TelegramPanelView panelView;
private int state;
// CONSTRUCTOR
public TelegramPanel(EmojiCompatActivity activity, <API key> listener) {
super(activity);
this.mActivity = activity;
init();
this.mEmojiKeyboard = new EmojiKeyboard(this.mActivity, this.mInput);
this.mListener = listener;
}
public TelegramPanel(EmojiCompatActivity activity) {
this(activity, null);
}
// INITIALIZATION
@Override
protected void initBottomPanel() {
this.audioTime = (TextView) this.mActivity.findViewById(R.id.audio_time);
this.mBottomPanel = (Toolbar) this.mActivity.findViewById(R.id.panel);
this.panelView = (TelegramPanelView) this.mActivity.findViewById(R.id.panel_container).getParent();
this.mBottomPanel.setNavigationIcon(R.drawable.input_emoji);
this.mBottomPanel.inflateMenu(R.menu.telegram_menu);
this.mBottomPanel.<API key>(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (state == AUDIO) {
fireOnMicOffClicked();
showAudioPanel(false);
} else if (TelegramPanel.this.<API key>) {
TelegramPanel.this.closeCurtain();
if (TelegramPanel.this.mInput.<API key>()) {
TelegramPanel.this.mBottomPanel.setNavigationIcon(R.drawable.ic_keyboard);
TelegramPanel.this.mInput.hideSoftKeyboard();
} else {
TelegramPanel.this.mBottomPanel.setNavigationIcon(R.drawable.input_emoji);
TelegramPanel.this.mInput.showSoftKeyboard();
}
} else {
TelegramPanel.this.mBottomPanel.setNavigationIcon(R.drawable.ic_keyboard);
TelegramPanel.this.closeCurtain();
TelegramPanel.this.showEmojiKeyboard(0);
}
}
});
this.mBottomPanel.<API key>(new Toolbar.<API key>() {
@Override
public boolean onMenuItemClick(MenuItem item) {
if (item.getItemId() == R.id.action_attach) {
fireOnAttachClicked();
} else if (item.getItemId() == R.id.action_mic) {
switch (state) {
case AUDIO:
fireOnSendClicked();
showAudioPanel(false);
break;
default:
if (TelegramPanel.this.mInput.getText().toString().equals("")) {
showAudioPanel(true);
} else {
fireOnSendClicked();
}
}
}
return Boolean.TRUE;
}
});
this.mCurtain = (LinearLayout) this.mActivity.findViewById(R.id.curtain);
this.state = EMPTY_MESSAGE;
}
@Override
protected void setInputConfig() {
this.mInput = (EmojiEditText) this.mBottomPanel.findViewById(R.id.input);
mInput.setInputType(InputType.<API key>);
this.mInput.<API key>(new EmojiEditText.<API key>() {
@Override
public void <API key>() {
if (!TelegramPanel.this.<API key>) {
final <API key> scheduler = Executors.<API key>(1);
scheduler.schedule(new Runnable() {
@Override
public void run() {
Handler mainHandler = new Handler(TelegramPanel.this.mActivity.getMainLooper());
Runnable myRunnable = new Runnable() {
@Override
public void run() {
TelegramPanel.this.openCurtain();
TelegramPanel.this.showEmojiKeyboard(0);
}
};
mainHandler.post(myRunnable);
}
}, 150, TimeUnit.MILLISECONDS);
}
}
@Override
public void <API key>() {
if (TelegramPanel.this.<API key>) {
TelegramPanel.this.closeCurtain();
TelegramPanel.this.hideEmojiKeyboard(200);
}
}
});
this.mInput.<API key>(new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence s, int start, int count, int after) {
}
@Override
public void onTextChanged(CharSequence s, int start, int before, int count) {
showSendOptions(true);
}
@Override
public void afterTextChanged(Editable s) {
}
});
audioTime.setTextColor(panelView.getAudioTextColor());
mInput.setTextColor(panelView.getTextColor());
mInput.setHint(panelView.getHintText());
mInput.setHintTextColor(panelView.getTextColorHint());
setIcon(R.id.action_attach, panelView.getAttachIconColor(), R.drawable.ic_attachment);
setIcon(R.id.action_mic, panelView.getAudioIconColor(), R.drawable.ic_mic);
}
private void setIcon(int itemId, int color, @DrawableRes int drawableId) {
Drawable icon = mActivity.getResources().getDrawable(drawableId);
icon.setColorFilter(color, PorterDuff.Mode.SRC_ATOP);
setIcon(itemId, icon);
}
private void setIcon(int itemId, Drawable icon) {
Menu menu = this.mBottomPanel.getMenu();
MenuItem mi = menu.findItem(itemId);
mi.setIcon(icon);
}
@Override
public void showAudioPanel(final boolean show) {
if (show) {
state = AUDIO;
hideEmojiKeyboard(0);
this.mInput.hideSoftKeyboard();
this.mInput.animate().alpha(0).setDuration(75).setListener(new <API key>() {
@Override
public void onAnimationEnd(Animator animation) {
Log.d(TAG, "Hide mInput");
mInput.setVisibility(GONE);
}
}).start();
this.audioTime.animate().alpha(1).setDuration(75).setListener(new <API key>() {
@Override
public void onAnimationEnd(Animator animation) {
Log.d(TAG, "show audioTime");
audioTime.setVisibility(View.VISIBLE);
}
}).start();
TelegramPanel.this.mBottomPanel.findViewById(R.id.action_attach).animate().scaleX(0).scaleY(0).setDuration(150).start();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
TelegramPanel.this.mBottomPanel.findViewById(R.id.action_mic).animate().scaleX(0).scaleY(0).setDuration(75).withEndAction(new Runnable() {
@Override
public void run() {
setIcon(R.id.action_mic, panelView.getSendIconColor(), R.drawable.ic_send);
TelegramPanel.this.mBottomPanel.findViewById(R.id.action_mic).animate().scaleX(1).scaleY(1).setDuration(75).start();
}
}).start();
}
Drawable icCircle = mActivity.getResources().getDrawable(R.drawable.ic_circle);
icCircle.setColorFilter(panelView.getAudioIconColor(), PorterDuff.Mode.SRC_ATOP);
this.mBottomPanel.setNavigationIcon(icCircle);
fireOnMicOnClicked();
} else {
this.audioTime.animate().alpha(0).setDuration(75).setListener(new <API key>() {
@Override
public void onAnimationEnd(Animator animation) {
Log.d(TAG, "Hide audioInput");
audioTime.setVisibility(GONE);
}
}).start();
this.mInput.animate().alpha(1).setDuration(75).setListener(new <API key>() {
@Override
public void onAnimationEnd(Animator animation) {
Log.d(TAG, "Show mInput");
mInput.setVisibility(View.VISIBLE);
}
}).start();
showSendOptions(true);
}
}
public void showSendOptions(boolean show) {
final MenuItem micButton = TelegramPanel.this.mBottomPanel.getMenu().findItem(R.id.action_mic);
if (<API key>) {
this.mBottomPanel.setNavigationIcon(R.drawable.ic_keyboard);
} else {
this.mBottomPanel.setNavigationIcon(R.drawable.input_emoji);
}
if (!this.mInput.getText().toString().equals("") && show) {
if (state != PREPARED_MESSAGE && state != <API key> && state != <API key>) {
TelegramPanel.this.mBottomPanel.findViewById(R.id.action_attach).animate().scaleX(0).scaleY(0).setDuration(150).start();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
TelegramPanel.this.mBottomPanel.findViewById(R.id.action_mic).animate().scaleX(0).scaleY(0).setDuration(75).withEndAction(new Runnable() {
@Override
public void run() {
setIcon(R.id.action_mic, panelView.getSendIconColor(), R.drawable.ic_send);
TelegramPanel.this.mBottomPanel.findViewById(R.id.action_mic).animate().scaleX(1).scaleY(1).setDuration(75).start();
}
}).start();
}
}
state = PREPARED_MESSAGE;
if (mInput.<API key>()) {
state = <API key>;
} else if (<API key>) {
state = <API key>;
}
} else {
state = EMPTY_MESSAGE;
if (mInput.<API key>()) {
state = <API key>;
} else if (<API key>) {
state = <API key>;
}
TelegramPanel.this.mBottomPanel.findViewById(R.id.action_attach).animate().scaleX(1).scaleY(1).setDuration(150).start();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
TelegramPanel.this.mBottomPanel.findViewById(R.id.action_mic).animate().scaleX(0).scaleY(0).setDuration(75).withEndAction(new Runnable() {
@Override
public void run() {
setIcon(R.id.action_mic, panelView.getAudioIconColor(), R.drawable.ic_mic);
TelegramPanel.this.mBottomPanel.findViewById(R.id.action_mic).animate().scaleX(1).scaleY(1).setDuration(75).start();
}
}).start();
}
}
}
public int getState() {
return state;
}
public boolean isInState(int state) {
return this.state == state;
}
public boolean isInAudioState() {
return isInState(AUDIO);
}
public boolean isInMessageState() {
return !isInAudioState();
}
@Override
public void hideEmojiKeyboard(int delay) {
super.hideEmojiKeyboard(delay);
this.mBottomPanel.setNavigationIcon(R.drawable.input_emoji);
}
public void setAudioTime(CharSequence time) {
this.audioTime.setText(time);
}
}
|
import { createStore, applyMiddleware, compose } from 'redux'
import logger from 'redux-logger'
import thunkMiddleware from 'redux-thunk'
import rootReducer from './reducers'
const configureStore = () => {
const composeEnhancers = window.<API key> || compose;
return createStore(rootReducer, /* preloadedState, */ composeEnhancers(
applyMiddleware(thunkMiddleware)
// applyMiddleware(logger)
));
}
export default configureStore
|
(function outer(modules, cache, entries){
/**
* Global
*/
var global = (function(){ return this; })();
/**
* Require `name`.
*
* @param {String} name
* @param {Boolean} jumped
* @api public
*/
function require(name, jumped){
if (cache[name]) return cache[name].exports;
if (modules[name]) return call(name, require);
throw new Error('cannot find module "' + name + '"');
}
/**
* Call module `id` and cache it.
*
* @param {Number} id
* @param {Function} require
* @return {Function}
* @api private
*/
function call(id, require){
var m = cache[id] = { exports: {} };
var mod = modules[id];
var name = mod[2];
var fn = mod[0];
fn.call(m.exports, function(req){
var dep = modules[id][1][req];
return require(dep ? dep : req);
}, m, m.exports, outer, modules, cache, entries);
// expose as `name`.
if (name) cache[name] = cache[id];
return cache[id].exports;
}
/**
* Require all entries exposing them on global if needed.
*/
for (var id in entries) {
if (entries[id]) {
global[entries[id]] = require(id);
} else {
require(id);
}
}
/**
* Duo flag.
*/
require.duo = true;
/**
* Expose cache.
*/
require.cache = cache;
/**
* Expose modules
*/
require.modules = modules;
/**
* Return newest require.
*/
return require;
})({
1: [function(require, module, exports) {
/** @jsx React.DOM */
React.renderComponent(
React.DOM.h1(null, "Hello, world!"),
document.getElementById('example')
);
}, {}]}, {}, {"1":""})
|
import arez.Arez;
import arez.ArezContext;
import arez.Component;
import arez.Disposable;
import arez.ObservableValue;
import arez.SafeProcedure;
import arez.component.DisposeNotifier;
import arez.component.Identifiable;
import arez.component.internal.ComponentKernel;
import java.text.ParseException;
import javax.annotation.Generated;
import javax.annotation.Nonnull;
import org.realityforge.braincheck.Guards;
@Generated("arez.processor.ArezProcessor")
final class <API key> extends <API key> implements Disposable, Identifiable<Integer>, DisposeNotifier {
private static volatile int $$arezi$$_nextId;
private final ComponentKernel $$arezi$$_kernel;
@Nonnull
private final ObservableValue<Long> $$arez$$_time;
<API key>() {
super();
final ArezContext $$arezv$$_context = Arez.context();
final int $$arezv$$_id = ++$$arezi$$_nextId;
final String $$arezv$$_name = Arez.areNamesEnabled() ? "<API key>." + $$arezv$$_id : null;
final Component $$arezv$$_component = Arez.<API key>() ? $$arezv$$_context.component( "<API key>", $$arezv$$_id, $$arezv$$_name, this::$$arezi$$<API key> ) : null;
this.$$arezi$$_kernel = new ComponentKernel( Arez.areZonesEnabled() ? $$arezv$$_context : null, Arez.areNamesEnabled() ? $$arezv$$_name : null, $$arezv$$_id, Arez.<API key>() ? $$arezv$$_component : null, null, Arez.<API key>() ? null : this::$$arezi$$_dispose, null, true, false, false );
this.$$arez$$_time = $$arezv$$_context.observable( Arez.<API key>() ? $$arezv$$_component : null, Arez.areNamesEnabled() ? $$arezv$$_name + ".time" : null, Arez.<API key>() ? () -> super.getTime() : null, Arez.<API key>() ? v -> super.setTime( v ) : null );
this.$$arezi$$_kernel.<API key>();
this.$$arezi$$_kernel.componentReady();
}
private int $$arezi$$_id() {
return this.$$arezi$$_kernel.getId();
}
@Override
@Nonnull
public Integer getArezId() {
if ( Arez.<API key>() ) {
Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenInitialized(), () -> "Method named 'getArezId' invoked on uninitialized component of type '<API key>'" );
}
if ( Arez.<API key>() ) {
Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenConstructed(), () -> "Method named 'getArezId' invoked on un-constructed component named '" + ( null == this.$$arezi$$_kernel ? "?" : this.$$arezi$$_kernel.getName() ) + "'" );
}
return $$arezi$$_id();
}
private void $$arezi$$<API key>() {
this.$$arezi$$_kernel.<API key>();
}
@Override
public void <API key>(@Nonnull final Object key, @Nonnull final SafeProcedure action) {
if ( Arez.<API key>() ) {
Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenInitialized(), () -> "Method named '<API key>' invoked on uninitialized component of type '<API key>'" );
}
this.$$arezi$$_kernel.<API key>( key, action );
}
@Override
public void <API key>(@Nonnull final Object key) {
if ( Arez.<API key>() ) {
Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenInitialized(), () -> "Method named '<API key>' invoked on uninitialized component of type '<API key>'" );
}
if ( Arez.<API key>() ) {
Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenConstructed(), () -> "Method named '<API key>' invoked on un-constructed component named '" + ( null == this.$$arezi$$_kernel ? "?" : this.$$arezi$$_kernel.getName() ) + "'" );
}
this.$$arezi$$_kernel.<API key>( key );
}
@Override
public boolean isDisposed() {
if ( Arez.<API key>() ) {
Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenInitialized(), () -> "Method named 'isDisposed' invoked on uninitialized component of type '<API key>'" );
}
if ( Arez.<API key>() ) {
Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenConstructed(), () -> "Method named 'isDisposed' invoked on un-constructed component named '" + ( null == this.$$arezi$$_kernel ? "?" : this.$$arezi$$_kernel.getName() ) + "'" );
}
return this.$$arezi$$_kernel.isDisposed();
}
@Override
public void dispose() {
if ( Arez.<API key>() ) {
Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenInitialized(), () -> "Method named 'dispose' invoked on uninitialized component of type '<API key>'" );
}
if ( Arez.<API key>() ) {
Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.hasBeenConstructed(), () -> "Method named 'dispose' invoked on un-constructed component named '" + ( null == this.$$arezi$$_kernel ? "?" : this.$$arezi$$_kernel.getName() ) + "'" );
}
this.$$arezi$$_kernel.dispose();
}
private void $$arezi$$_dispose() {
this.$$arez$$_time.dispose();
}
@Override
public long getTime() throws ParseException {
if ( Arez.<API key>() ) {
Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.isActive(), () -> "Method named 'getTime' invoked on " + this.$$arezi$$_kernel.describeState() + " component named '" + this.$$arezi$$_kernel.getName() + "'" );
}
this.$$arez$$_time.reportObserved();
return super.getTime();
}
@Override
public void setTime(final long time) throws ParseException {
if ( Arez.<API key>() ) {
Guards.apiInvariant( () -> null != this.$$arezi$$_kernel && this.$$arezi$$_kernel.isActive(), () -> "Method named 'setTime' invoked on " + this.$$arezi$$_kernel.describeState() + " component named '" + this.$$arezi$$_kernel.getName() + "'" );
}
this.$$arez$$_time.preReportChanged();
final long $$arezv$$_currentValue = super.getTime();
if ( time != $$arezv$$_currentValue ) {
super.setTime( time );
this.$$arez$$_time.reportChanged();
}
}
@Override
public String toString() {
if ( Arez.areNamesEnabled() ) {
return "ArezComponent[" + this.$$arezi$$_kernel.getName() + "]";
} else {
return super.toString();
}
}
}
|
namespace RoslynPad.Roslyn.Snippets
{
public sealed class SnippetInfo
{
public string Shortcut { get; }
public string Title { get; }
public string Description { get; }
public SnippetInfo(string shortcut, string title, string description)
{
Shortcut = shortcut;
Title = title;
Description = description;
}
}
}
|
package com.novartis.pcs.ontology.service.mapper;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
/**
*
* Stemmer, implementing the Porter Stemming Algorithm
*
* The Stemmer class transforms a word into its root form. The input
* word can be provided a character at time (by calling add()), or at once
* by calling one of the various stem(something) methods.
*/
class PorterStemmer
{
private char[] b;
private int i, /* offset into b */
j, k, k0;
private boolean dirty = false;
private static final int INC = 50; /* unit of size whereby b is increased */
private static final int EXTRA = 1;
public PorterStemmer() {
b = new char[INC];
i = 0;
}
/**
* reset() resets the stemmer so it can stem another word. If you invoke
* the stemmer by calling add(char) and then stem(), you must call reset()
* before starting another word.
*/
public void reset() { i = 0; dirty = false; }
/**
* Add a character to the word being stemmed. When you are finished
* adding characters, you can call stem(void) to process the word.
*/
public void add(char ch) {
if (b.length <= i + EXTRA) {
char[] new_b = new char[b.length+INC];
System.arraycopy(b, 0, new_b, 0, b.length);
b = new_b;
}
b[i++] = ch;
}
/**
* After a word has been stemmed, it can be retrieved by toString(),
* or a reference to the internal buffer can be retrieved by getResultBuffer
* and getResultLength (which is generally more efficient.)
*/
@Override
public String toString() { return new String(b,0,i); }
/**
* Returns the length of the word resulting from the stemming process.
*/
public int getResultLength() { return i; }
/**
* Returns a reference to a character buffer containing the results of
* the stemming process. You also need to consult getResultLength()
* to determine the length of the result.
*/
public char[] getResultBuffer() { return b; }
/* cons(i) is true <=> b[i] is a consonant. */
private final boolean cons(int i) {
switch (b[i]) {
case 'a': case 'e': case 'i': case 'o': case 'u':
return false;
case 'y':
return (i==k0) ? true : !cons(i-1);
default:
return true;
}
}
/* m() measures the number of consonant sequences between k0 and j. if c is
a consonant sequence and v a vowel sequence, and <..> indicates arbitrary
presence,
<c><v> gives 0
<c>vc<v> gives 1
<c>vcvc<v> gives 2
<c>vcvcvc<v> gives 3
.
*/
private final int m() {
int n = 0;
int i = k0;
while(true) {
if (i > j)
return n;
if (! cons(i))
break;
i++;
}
i++;
while(true) {
while(true) {
if (i > j)
return n;
if (cons(i))
break;
i++;
}
i++;
n++;
while(true) {
if (i > j)
return n;
if (! cons(i))
break;
i++;
}
i++;
}
}
/* vowelinstem() is true <=> k0,...j contains a vowel */
private final boolean vowelinstem() {
int i;
for (i = k0; i <= j; i++)
if (! cons(i))
return true;
return false;
}
/* doublec(j) is true <=> j,(j-1) contain a double consonant. */
private final boolean doublec(int j) {
if (j < k0+1)
return false;
if (b[j] != b[j-1])
return false;
return cons(j);
}
/* cvc(i) is true <=> i-2,i-1,i has the form consonant - vowel - consonant
and also if the second c is not w,x or y. this is used when trying to
restore an e at the end of a short word. e.g.
cav(e), lov(e), hop(e), crim(e), but
snow, box, tray.
*/
private final boolean cvc(int i) {
if (i < k0+2 || !cons(i) || cons(i-1) || !cons(i-2))
return false;
else {
int ch = b[i];
if (ch == 'w' || ch == 'x' || ch == 'y') return false;
}
return true;
}
private final boolean ends(String s) {
int l = s.length();
int o = k-l+1;
if (o < k0)
return false;
for (int i = 0; i < l; i++)
if (b[o+i] != s.charAt(i))
return false;
j = k-l;
return true;
}
/* setto(s) sets (j+1),...k to the characters in the string s, readjusting
k. */
void setto(String s) {
int l = s.length();
int o = j+1;
for (int i = 0; i < l; i++)
b[o+i] = s.charAt(i);
k = j+l;
dirty = true;
}
/* r(s) is used further down. */
void r(String s) { if (m() > 0) setto(s); }
/* step1() gets rid of plurals and -ed or -ing. e.g.
caresses -> caress
ponies -> poni
ties -> ti
caress -> caress
cats -> cat
feed -> feed
agreed -> agree
disabled -> disable
matting -> mat
mating -> mate
meeting -> meet
milling -> mill
messing -> mess
meetings -> meet
*/
private final void step1() {
if (b[k] == 's') {
if (ends("sses")) k -= 2;
else if (ends("ies")) setto("i");
else if (b[k-1] != 's') k
}
if (ends("eed")) {
if (m() > 0)
k
}
else if ((ends("ed") || ends("ing")) && vowelinstem()) {
k = j;
if (ends("at")) setto("ate");
else if (ends("bl")) setto("ble");
else if (ends("iz")) setto("ize");
else if (doublec(k)) {
int ch = b[k
if (ch == 'l' || ch == 's' || ch == 'z')
k++;
}
else if (m() == 1 && cvc(k))
setto("e");
}
}
/* step2() turns terminal y to i when there is another vowel in the stem. */
private final void step2() {
if (ends("y") && vowelinstem()) {
b[k] = 'i';
dirty = true;
}
}
/* step3() maps double suffices to single ones. so -ization ( = -ize plus
-ation) maps to -ize etc. note that the string before the suffix must give
m() > 0. */
private final void step3() {
if (k == k0) return; /* For Bug 1 */
switch (b[k-1]) {
case 'a':
if (ends("ational")) { r("ate"); break; }
if (ends("tional")) { r("tion"); break; }
break;
case 'c':
if (ends("enci")) { r("ence"); break; }
if (ends("anci")) { r("ance"); break; }
break;
case 'e':
if (ends("izer")) { r("ize"); break; }
break;
case 'l':
if (ends("bli")) { r("ble"); break; }
if (ends("alli")) { r("al"); break; }
if (ends("entli")) { r("ent"); break; }
if (ends("eli")) { r("e"); break; }
if (ends("ousli")) { r("ous"); break; }
break;
case 'o':
if (ends("ization")) { r("ize"); break; }
if (ends("ation")) { r("ate"); break; }
if (ends("ator")) { r("ate"); break; }
break;
case 's':
if (ends("alism")) { r("al"); break; }
if (ends("iveness")) { r("ive"); break; }
if (ends("fulness")) { r("ful"); break; }
if (ends("ousness")) { r("ous"); break; }
break;
case 't':
if (ends("aliti")) { r("al"); break; }
if (ends("iviti")) { r("ive"); break; }
if (ends("biliti")) { r("ble"); break; }
break;
case 'g':
if (ends("logi")) { r("log"); break; }
}
}
/* step4() deals with -ic-, -full, -ness etc. similar strategy to step3. */
private final void step4() {
switch (b[k]) {
case 'e':
if (ends("icate")) { r("ic"); break; }
if (ends("ative")) { r(""); break; }
if (ends("alize")) { r("al"); break; }
break;
case 'i':
if (ends("iciti")) { r("ic"); break; }
break;
case 'l':
if (ends("ical")) { r("ic"); break; }
if (ends("ful")) { r(""); break; }
break;
case 's':
if (ends("ness")) { r(""); break; }
break;
}
}
/* step5() takes off -ant, -ence etc., in context <c>vcvc<v>. */
private final void step5() {
if (k == k0) return; /* for Bug 1 */
switch (b[k-1]) {
case 'a':
if (ends("al")) break;
return;
case 'c':
if (ends("ance")) break;
if (ends("ence")) break;
return;
case 'e':
if (ends("er")) break; return;
case 'i':
if (ends("ic")) break; return;
case 'l':
if (ends("able")) break;
if (ends("ible")) break; return;
case 'n':
if (ends("ant")) break;
if (ends("ement")) break;
if (ends("ment")) break;
/* element etc. not stripped before the m */
if (ends("ent")) break;
return;
case 'o':
if (ends("ion") && j >= 0 && (b[j] == 's' || b[j] == 't')) break;
/* j >= 0 fixes Bug 2 */
if (ends("ou")) break;
return;
/* takes care of -ous */
case 's':
if (ends("ism")) break;
return;
case 't':
if (ends("ate")) break;
if (ends("iti")) break;
return;
case 'u':
if (ends("ous")) break;
return;
case 'v':
if (ends("ive")) break;
return;
case 'z':
if (ends("ize")) break;
return;
default:
return;
}
if (m() > 1)
k = j;
}
/* step6() removes a final -e if m() > 1. */
private final void step6() {
j = k;
if (b[k] == 'e') {
int a = m();
if (a > 1 || a == 1 && !cvc(k-1))
k
}
if (b[k] == 'l' && doublec(k) && m() > 1)
k
}
/**
* Stem a word provided as a String. Returns the result as a String.
*/
public String stem(String s) {
if (stem(s.toCharArray(), s.length()))
return toString();
else
return s;
}
/** Stem a word contained in a char[]. Returns true if the stemming process
* resulted in a word different from the input. You can retrieve the
* result with getResultLength()/getResultBuffer() or toString().
*/
public boolean stem(char[] word) {
return stem(word, word.length);
}
/** Stem a word contained in a portion of a char[] array. Returns
* true if the stemming process resulted in a word different from
* the input. You can retrieve the result with
* getResultLength()/getResultBuffer() or toString().
*/
public boolean stem(char[] wordBuffer, int offset, int wordLen) {
reset();
if (b.length < wordLen) {
char[] new_b = new char[wordLen + EXTRA];
b = new_b;
}
System.arraycopy(wordBuffer, offset, b, 0, wordLen);
i = wordLen;
return stem(0);
}
/** Stem a word contained in a leading portion of a char[] array.
* Returns true if the stemming process resulted in a word different
* from the input. You can retrieve the result with
* getResultLength()/getResultBuffer() or toString().
*/
public boolean stem(char[] word, int wordLen) {
return stem(word, 0, wordLen);
}
/** Stem the word placed into the Stemmer buffer through calls to add().
* Returns true if the stemming process resulted in a word different
* from the input. You can retrieve the result with
* getResultLength()/getResultBuffer() or toString().
*/
public boolean stem() {
return stem(0);
}
public boolean stem(int i0) {
k = i - 1;
k0 = i0;
if (k > k0+1) {
step1(); step2(); step3(); step4(); step5(); step6();
}
// Also, a word is considered dirty if we lopped off letters
// Thanks to Ifigenia Vairelles for pointing this out.
if (i != k+1)
dirty = true;
i = k+1;
return dirty;
}
/** Test program for demonstrating the Stemmer. It reads a file and
* stems each word, writing the result to standard out.
* Usage: Stemmer file-name
*/
public static void main(String[] args) {
PorterStemmer s = new PorterStemmer();
for (int i = 0; i < args.length; i++) {
try {
InputStream in = new FileInputStream(args[i]);
byte[] buffer = new byte[1024];
int bufferLen, offset, ch;
bufferLen = in.read(buffer);
offset = 0;
s.reset();
while(true) {
if (offset < bufferLen)
ch = buffer[offset++];
else {
bufferLen = in.read(buffer);
offset = 0;
if (bufferLen < 0)
ch = -1;
else
ch = buffer[offset++];
}
if (Character.isLetter((char) ch)) {
s.add(Character.toLowerCase((char) ch));
}
else {
s.stem();
System.out.print(s.toString());
s.reset();
if (ch < 0)
break;
else {
System.out.print((char) ch);
}
}
}
in.close();
}
catch (IOException e) {
System.out.println("error reading " + args[i]);
}
}
}
}
|
<?php
namespace Magento\Sales\Model\Grid;
class CollectionUpdater implements \Magento\Framework\View\Layout\Argument\UpdaterInterface
{
/**
* @var \Magento\Framework\Registry
*/
protected $registryManager;
/**
* @param \Magento\Framework\Registry $registryManager
*/
public function __construct(\Magento\Framework\Registry $registryManager)
{
$this->registryManager = $registryManager;
}
/**
* Update grid collection according to chosen order
*
* @param \Magento\Sales\Model\Resource\Transaction\Grid\Collection $argument
* @return \Magento\Sales\Model\Resource\Transaction\Grid\Collection
*/
public function update($argument)
{
$order = $this->registryManager->registry('current_order');
if ($order) {
$argument->setOrderFilter($order->getId());
}
$argument->addOrderInformation(['increment_id']);
return $argument;
}
}
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_112) on Mon Nov 06 11:57:26 MST 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Class org.wildfly.swarm.config.messaging.activemq.server.BroadcastGroup (BOM: * : All 2017.11.0 API)</title>
<meta name="date" content="2017-11-06">
<link rel="stylesheet" type="text/css" href="../../../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.wildfly.swarm.config.messaging.activemq.server.BroadcastGroup (BOM: * : All 2017.11.0 API)";
}
}
catch(err) {
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">WildFly Swarm API, 2017.11.0</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../../index.html?org/wildfly/swarm/config/messaging/activemq/server/class-use/BroadcastGroup.html" target="_top">Frames</a></li>
<li><a href="BroadcastGroup.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.top">
</a></div>
<div class="header">
<h2 title="Uses of Class org.wildfly.swarm.config.messaging.activemq.server.BroadcastGroup" class="title">Uses of Class<br>org.wildfly.swarm.config.messaging.activemq.server.BroadcastGroup</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#org.wildfly.swarm.config.messaging.activemq">org.wildfly.swarm.config.messaging.activemq</a></td>
<td class="colLast"> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="#org.wildfly.swarm.config.messaging.activemq.server">org.wildfly.swarm.config.messaging.activemq.server</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="org.wildfly.swarm.config.messaging.activemq">
</a>
<h3>Uses of <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a> in <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/package-summary.html">org.wildfly.swarm.config.messaging.activemq</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/package-summary.html">org.wildfly.swarm.config.messaging.activemq</a> that return <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a></code></td>
<td class="colLast"><span class="typeNameLabel">Server.ServerResources.</span><code><span class="memberNameLink"><a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/Server.ServerResources.html
</tr>
</tbody>
</table>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/package-summary.html">org.wildfly.swarm.config.messaging.activemq</a> that return types with arguments of type <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/List.html?is-external=true" title="class or interface in java.util">List</a><<a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a>></code></td>
<td class="colLast"><span class="typeNameLabel">Server.ServerResources.</span><code><span class="memberNameLink"><a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/Server.ServerResources.html#broadcastGroups--">broadcastGroups</a></span>()</code>
<div class="block">Get the list of BroadcastGroup resources</div>
</td>
</tr>
</tbody>
</table>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/package-summary.html">org.wildfly.swarm.config.messaging.activemq</a> with parameters of type <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/Server.html" title="type parameter in Server">T</a></code></td>
<td class="colLast"><span class="typeNameLabel">Server.</span><code><span class="memberNameLink"><a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/Server.html#broadcastGroup-org.wildfly.swarm.config.messaging.activemq.server.BroadcastGroup-">broadcastGroup</a></span>(<a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a> value)</code>
<div class="block">Add the BroadcastGroup object to the list of subresources</div>
</td>
</tr>
</tbody>
</table>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Method parameters in <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/package-summary.html">org.wildfly.swarm.config.messaging.activemq</a> with type arguments of type <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/Server.html" title="type parameter in Server">T</a></code></td>
<td class="colLast"><span class="typeNameLabel">Server.</span><code><span class="memberNameLink"><a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/Server.html
<div class="block">Add all BroadcastGroup objects to this subresource</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="org.wildfly.swarm.config.messaging.activemq.server">
</a>
<h3>Uses of <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a> in <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/package-summary.html">org.wildfly.swarm.config.messaging.activemq.server</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing classes, and an explanation">
<caption><span>Classes in <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/package-summary.html">org.wildfly.swarm.config.messaging.activemq.server</a> with type parameters of type <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Class and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>class </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a><T extends <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a><T>></span></code>
<div class="block">A broadcast group is the means by which a server broadcasts connectors over
the network.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>interface </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/<API key>.html" title="interface in org.wildfly.swarm.config.messaging.activemq.server"><API key></a><T extends <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a><T>></span></code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>interface </code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/<API key>.html" title="interface in org.wildfly.swarm.config.messaging.activemq.server"><API key></a><T extends <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a>></span></code> </td>
</tr>
</tbody>
</table>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/package-summary.html">org.wildfly.swarm.config.messaging.activemq.server</a> that return <a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">BroadcastGroup</a></code></td>
<td class="colLast"><span class="typeNameLabel"><API key>.</span><code><span class="memberNameLink"><a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/<API key>.html#get--">get</a></span>()</code>
<div class="block">Constructed instance of BroadcastGroup resource</div>
</td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="bottomNav"><a name="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../../../org/wildfly/swarm/config/messaging/activemq/server/BroadcastGroup.html" title="class in org.wildfly.swarm.config.messaging.activemq.server">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">WildFly Swarm API, 2017.11.0</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../../index.html?org/wildfly/swarm/config/messaging/activemq/server/class-use/BroadcastGroup.html" target="_top">Frames</a></li>
<li><a href="BroadcastGroup.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.bottom">
</a></div>
<p class="legalCopy"><small>Copyright &
</body>
</html>
|
<style type="text/css">
.placeholder {
display: none;
}
</style>
<div class="contentRight">
<div class="sanpham" style=" height: 100%; margin-top: 0">
<div class="row" style="margin: 5px">
<div class="page-header">
<h2><?php echo lang('form_checkout'); ?></h2>
</div>
<?php if (validation_errors()): ?>
<div class="alert alert-error">
<a class="close" data-dismiss="alert">×</a>
<?php echo validation_errors(); ?>
</div>
<?php endif; ?>
<script type="text/javascript">
$(document).ready(function () {
//if we support placeholder text, remove all the labels
if (!<API key>()) {
$('.placeholder').show();
}
<?php
// Restore previous selection, if we are on a validation page reload
$zone_id = set_value('zone_id');
echo "\$('#zone_id').val($zone_id);\n";
?>
});
function <API key>() {
return 'placeholder' in document.createElement('input');
}
</script>
<script type="text/javascript">
$(document).ready(function () {
$('#country_id').change(function () {
populate_zone_menu();
});
});
// context is ship or bill
function populate_zone_menu(value) {
$.post('<?php echo site_url('locations/get_zone_menu');?>', {id: $('#country_id').val()}, function (data) {
$('#zone_id').html(data);
});
}
</script>
<?php /* Only show this javascript if the user is logged in */ ?>
<?php if ($this->Customer_model->is_logged_in(false, false)) : ?>
<script type="text/javascript">
<?php
$add_list = array();
foreach($customer_addresses as $row) {
// build a new array
$add_list[$row['id']] = $row['field_data'];
}
$add_list = json_encode($add_list);
echo "eval(addresses=$add_list);";
?>
function populate_address(address_id) {
if (address_id == '') {
return;
}
// - populate the fields
$.each(addresses[address_id], function (key, value) {
$('.address[name=' + key + ']').val(value);
// repopulate the zone menu and set the right value if we change the country
if (key == 'zone_id') {
zone_id = value;
}
});
// repopulate the zone list, set the right value, then copy all to billing
$.post('<?php echo site_url('locations/get_zone_menu');?>', {id: $('#country_id').val()}, function (data) {
$('#zone_id').html(data);
$('#zone_id').val(zone_id);
});
}
</script>
<?php endif; ?>
<?php
$countries = $this->Location_model->get_countries_menu();
if (!empty($customer[$address_form_prefix . '_address']['country_id'])) {
$zone_menu = $this->Location_model->get_zones_menu($customer[$address_form_prefix . '_address']['country_id']);
} else {
$zone_menu = array('' => '') + $this->Location_model->get_zones_menu(array_shift(array_keys($countries)));
}
//form elements
$company = array('placeholder' => lang('address_company'), 'class' => 'address span8', 'name' => 'company', 'value' => set_value('company', @$customer[$address_form_prefix . '_address']['company']));
$address1 = array('placeholder' => lang('address1'), 'class' => 'address span8', 'name' => 'address1', 'value' => set_value('address1', @$customer[$address_form_prefix . '_address']['address1']));
$address2 = array('placeholder' => lang('address2'), 'class' => 'address span8', 'name' => 'address2', 'value' => set_value('address2', @$customer[$address_form_prefix . '_address']['address2']));
$first = array('placeholder' => lang('address_firstname'), 'class' => 'address span4', 'name' => 'firstname', 'value' => set_value('firstname', @$customer[$address_form_prefix . '_address']['firstname']));
$last = array('placeholder' => lang('address_lastname'), 'class' => 'address span4', 'name' => 'lastname', 'value' => set_value('lastname', @$customer[$address_form_prefix . '_address']['lastname']));
$email = array('placeholder' => lang('address_email'), 'class' => 'address span4', 'name' => 'email', 'value' => set_value('email', @$customer[$address_form_prefix . '_address']['email']));
$phone = array('placeholder' => lang('address_phone'), 'class' => 'address span4', 'name' => 'phone', 'value' => set_value('phone', @$customer[$address_form_prefix . '_address']['phone']));
$city = array('placeholder' => lang('address_city'), 'class' => 'address span3', 'name' => 'city', 'value' => set_value('city', @$customer[$address_form_prefix . '_address']['city']));
$zip = array('placeholder' => lang('address_zip'), 'maxlength' => '10', 'class' => 'address span2', 'name' => 'zip', 'value' => set_value('zip', @$customer[$address_form_prefix . '_address']['zip']));
?>
<?php
//post to the correct place.
echo ($address_form_prefix == 'bill') ? form_open('checkout/step_1', 'style = "padding-left: 60px;"') : form_open('checkout/shipping_address', 'style = "padding-left: 60px;"');?>
<div class="row">
<?php // Address form ?>
<div class="span8">
<div class="row">
<div class="span4">
<h2 style="margin:0px;">
<?php echo ($address_form_prefix == 'bill') ? lang('address') : lang('shipping_address'); ?>
</h2>
</div>
<div class="span4">
<?php if ($this->Customer_model->is_logged_in(false, false)) : ?>
<button class="btn btn-inverse pull-right" onclick="$('#address_manager').modal().modal('show');"
type="button"><i class="icon-envelope icon-white"></i> <?php echo lang('choose_address'); ?>
</button>
<?php endif; ?>
</div>
</div>
<div class="row">
<div class="span8">
<label class="placeholder"><?php echo lang('address_company'); ?></label>
<?php echo form_input($company); ?>
</div>
</div>
<div class="row">
<div class="span4">
<label class="placeholder"><?php echo lang('address_firstname'); ?><b class="r"> *</b></label>
<?php echo form_input($first); ?>
</div>
<div class="span4">
<label class="placeholder"><?php echo lang('address_lastname'); ?><b class="r"> *</b></label>
<?php echo form_input($last); ?>
</div>
</div>
<div class="row">
<div class="span4">
<label class="placeholder"><?php echo lang('address_email'); ?><b class="r"> *</b></label>
<?php echo form_input($email); ?>
</div>
<div class="span4">
<label class="placeholder"><?php echo lang('address_phone'); ?><b class="r"> *</b></label>
<?php echo form_input($phone); ?>
</div>
</div>
<div class="row">
<div class="span8">
<label class="placeholder"><?php echo lang('address_country'); ?><b class="r"> *</b></label>
<?php echo form_dropdown('country_id', $countries, @$customer[$address_form_prefix . '_address']['country_id'], 'id="country_id" class="address span8"'); ?>
</div>
</div>
<div class="row">
<div class="span8">
<label class="placeholder"><?php echo lang('address1'); ?><b class="r"> *</b></label>
<?php echo form_input($address1); ?>
</div>
</div>
<div class="row">
<div class="span8">
<label class="placeholder"><?php echo lang('address2'); ?></label>
<?php echo form_input($address2); ?>
</div>
</div>
<div class="row">
<div class="span3">
<label class="placeholder"><?php echo lang('address_city'); ?><b class="r"> *</b></label>
<?php echo form_input($city); ?>
</div>
<div class="span3">
<label class="placeholder"><?php echo lang('address_state'); ?><b class="r"> *</b></label>
<?php
echo form_dropdown('zone_id', $zone_menu, @$customer[$address_form_prefix . '_address']['zone_id'], 'id="zone_id" class="address span3" ');?>
</div>
<div class="span2">
<label class="placeholder"><?php echo lang('address_zip'); ?><b class="r"> *</b></label>
<?php echo form_input($zip); ?>
</div>
</div>
<?php if ($address_form_prefix == 'bill') : ?>
<div class="row">
<div class="span3">
<label class="checkbox inline" for="use_shipping">
<?php echo form_checkbox(array('name' => 'use_shipping', 'value' => 'yes', 'id' => 'use_shipping', 'checked' => $use_shipping)) ?>
<?php echo lang('ship_to_address') ?>
</label>
</div>
</div>
<?php endif ?>
<div class="row">
<div class="span8">
<?php if ($address_form_prefix == 'ship') : ?>
<input class="btn btn-block btn-large btn-secondary" type="button"
value="<?php echo lang('form_previous'); ?>"
onclick="window.location='<?php echo base_url('checkout/step_1') ?>'"/>
<?php endif; ?>
<input class="btn btn-block btn-large btn-primary" type="submit"
value="<?php echo lang('form_continue'); ?>"/>
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
<?php if ($this->Customer_model->is_logged_in(false, false)) : ?>
<div class="modal hide" id="address_manager">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal">×</button>
<h3><?php echo lang('your_addresses'); ?></h3>
</div>
<div class="modal-body">
<p>
<table class="table table-striped">
<?php
$c = 1;
foreach ($customer_addresses as $a):?>
<tr>
<td>
<?php
$b = $a['field_data'];
echo nl2br(format_address($b));
?>
</td>
<td style="width:100px;"><input type="button" class="btn btn-primary choose_address pull-right"
onclick="populate_address(<?php echo $a['id']; ?>);"
data-dismiss="modal"
value="<?php echo lang('form_choose'); ?>"/></td>
</tr>
<?php endforeach; ?>
</table>
</p>
</div>
<div class="modal-footer">
<a href="#" class="btn" data-dismiss="modal">Close</a>
</div>
</div>
<?php endif; ?>
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_151) on Mon Jan 15 08:36:52 MST 2018 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Class org.wildfly.swarm.config.undertow.Server.ServerResources (BOM: * : All 2018.1.0 API)</title>
<meta name="date" content="2018-01-15">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.wildfly.swarm.config.undertow.Server.ServerResources (BOM: * : All 2018.1.0 API)";
}
}
catch(err) {
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar.top">
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../org/wildfly/swarm/config/undertow/Server.ServerResources.html" title="class in org.wildfly.swarm.config.undertow">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">WildFly Swarm API, 2018.1.0</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/wildfly/swarm/config/undertow/class-use/Server.ServerResources.html" target="_top">Frames</a></li>
<li><a href="Server.ServerResources.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.top">
</a></div>
<div class="header">
<h2 title="Uses of Class org.wildfly.swarm.config.undertow.Server.ServerResources" class="title">Uses of Class<br>org.wildfly.swarm.config.undertow.Server.ServerResources</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../../org/wildfly/swarm/config/undertow/Server.ServerResources.html" title="class in org.wildfly.swarm.config.undertow">Server.ServerResources</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#org.wildfly.swarm.config.undertow">org.wildfly.swarm.config.undertow</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="org.wildfly.swarm.config.undertow">
</a>
<h3>Uses of <a href="../../../../../../org/wildfly/swarm/config/undertow/Server.ServerResources.html" title="class in org.wildfly.swarm.config.undertow">Server.ServerResources</a> in <a href="../../../../../../org/wildfly/swarm/config/undertow/package-summary.html">org.wildfly.swarm.config.undertow</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../org/wildfly/swarm/config/undertow/package-summary.html">org.wildfly.swarm.config.undertow</a> that return <a href="../../../../../../org/wildfly/swarm/config/undertow/Server.ServerResources.html" title="class in org.wildfly.swarm.config.undertow">Server.ServerResources</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/wildfly/swarm/config/undertow/Server.ServerResources.html" title="class in org.wildfly.swarm.config.undertow">Server.ServerResources</a></code></td>
<td class="colLast"><span class="typeNameLabel">Server.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/undertow/Server.html#subresources--">subresources</a></span>()</code> </td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="bottomNav"><a name="navbar.bottom">
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../org/wildfly/swarm/config/undertow/Server.ServerResources.html" title="class in org.wildfly.swarm.config.undertow">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">WildFly Swarm API, 2018.1.0</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/wildfly/swarm/config/undertow/class-use/Server.ServerResources.html" target="_top">Frames</a></li>
<li><a href="Server.ServerResources.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<a name="skip.navbar.bottom">
</a></div>
<p class="legalCopy"><small>Copyright &
</body>
</html>
|
package <API key>;
import org.junit.Test;
import java.util.List;
import static org.assertj.core.api.Assertions.assertThat;
public class <API key> {
private <API key> solution = new <API key>();
@Test
public void nullInput() {
List<List<Integer>> result = solution.levelOrder(null);
assertThat(result).isEmpty();
}
@Test
public void singleNodeInput() {
TreeNode root = new TreeNode(1);
List<List<Integer>> result = solution.levelOrder(root);
assertThat(result).hasSize(1);
assertThat(result.get(0)).containsExactly(1);
}
@Test
public void twoNodesInput() {
TreeNode root = new TreeNode(1);
root.right = new TreeNode(2);
List<List<Integer>> result = solution.levelOrder(root);
assertThat(result).hasSize(2);
assertThat(result.get(0)).containsExactly(1);
assertThat(result.get(1)).containsExactly(2);
}
@Test
public void threeNodesInput() {
TreeNode root = new TreeNode(1);
root.left = new TreeNode(2);
root.right = new TreeNode(3);
List<List<Integer>> result = solution.levelOrder(root);
assertThat(result).hasSize(2);
assertThat(result.get(0)).containsExactly(1);
assertThat(result.get(1)).containsExactly(2, 3);
}
@Test
public void fiveNodesInput() {
TreeNode root = new TreeNode(3);
root.left = new TreeNode(9);
TreeNode rightTree = new TreeNode(20);
rightTree.left = new TreeNode(15);
rightTree.right = new TreeNode(7);
root.right = rightTree;
List<List<Integer>> result = solution.levelOrder(root);
assertThat(result).hasSize(3);
assertThat(result.get(0)).containsExactly(3);
assertThat(result.get(1)).containsExactly(9, 20);
assertThat(result.get(2)).containsExactly(15, 7);
}
}
|
package cn.aezo.spring.base.annotation.combineannotation;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@Documented
@Configuration
@ComponentScan
public @interface WiselyConfiguration {
String[] value() default {};
}
|
.ff0{font-family:sans-serif;visibility:hidden;}
@font-face{font-family:ff1;src:url(f1.woff)format("woff");}.ff1{font-family:ff1;line-height:1.534180;font-style:normal;font-weight:normal;visibility:visible;}
@font-face{font-family:ff2;src:url(f2.woff)format("woff");}.ff2{font-family:ff2;line-height:1.456055;font-style:normal;font-weight:normal;visibility:visible;}
@font-face{font-family:ff3;src:url(f3.woff)format("woff");}.ff3{font-family:ff3;line-height:1.695312;font-style:normal;font-weight:normal;visibility:visible;}
@font-face{font-family:ff4;src:url(f4.woff)format("woff");}.ff4{font-family:ff4;line-height:0.910645;font-style:normal;font-weight:normal;visibility:visible;}
.m0{transform:matrix(0.250000,0.000000,0.000000,0.250000,0,0);-ms-transform:matrix(0.250000,0.000000,0.000000,0.250000,0,0);-webkit-transform:matrix(0.250000,0.000000,0.000000,0.250000,0,0);}
.m1{transform:none;-ms-transform:none;-webkit-transform:none;}
.v0{vertical-align:0.000000px;}
.ls2{letter-spacing:-0.096000px;}
.ls0{letter-spacing:0.000000px;}
.ls1{letter-spacing:0.096000px;}
.sc_{text-shadow:none;}
.sc0{text-shadow:-0.015em 0 transparent,0 0.015em transparent,0.015em 0 transparent,0 -0.015em transparent;}
@media screen and (-<API key>:0){
.sc_{-webkit-text-stroke:0px transparent;}
.sc0{-webkit-text-stroke:0.015em transparent;text-shadow:none;}
}
.ws0{word-spacing:0.000000px;}
._0{margin-left:-1.008000px;}
._1{width:1.016000px;}
.fc1{color:rgb(255,0,0);}
.fc0{color:rgb(0,0,0);}
.fs0{font-size:48.000000px;}
.fs1{font-size:56.000000px;}
.y26{bottom:16.000000px;}
.y52{bottom:79.584000px;}
.y25{bottom:88.464000px;}
.y4e{bottom:90.144000px;}
.y51{bottom:95.544000px;}
.y24{bottom:104.420000px;}
.y4d{bottom:105.980000px;}
.y4f{bottom:108.500000px;}
.y50{bottom:108.620000px;}
.y23{bottom:120.260000px;}
.y4c{bottom:121.820000px;}
.y22{bottom:136.100000px;}
.y4b{bottom:137.660000px;}
.y21{bottom:151.940000px;}
.y4a{bottom:153.620000px;}
.y20{bottom:167.900000px;}
.y49{bottom:169.460000px;}
.y1f{bottom:183.740000px;}
.y48{bottom:185.300000px;}
.y1e{bottom:199.580000px;}
.y47{bottom:201.140000px;}
.y1d{bottom:215.450000px;}
.y46{bottom:217.130000px;}
.y1c{bottom:231.410000px;}
.y45{bottom:232.970000px;}
.y1b{bottom:247.250000px;}
.y44{bottom:248.810000px;}
.y1a{bottom:263.090000px;}
.y43{bottom:264.650000px;}
.y19{bottom:278.930000px;}
.y42{bottom:280.610000px;}
.y18{bottom:294.770000px;}
.y41{bottom:296.450000px;}
.y17{bottom:310.730000px;}
.y40{bottom:312.290000px;}
.y16{bottom:326.570000px;}
.y3f{bottom:328.130000px;}
.y15{bottom:342.410000px;}
.y3e{bottom:344.090000px;}
.y14{bottom:358.250000px;}
.y3d{bottom:359.930000px;}
.y13{bottom:374.230000px;}
.y3c{bottom:375.790000px;}
.y12{bottom:390.070000px;}
.y3b{bottom:391.630000px;}
.y11{bottom:405.910000px;}
.y3a{bottom:407.470000px;}
.y10{bottom:421.750000px;}
.y39{bottom:423.430000px;}
.yf{bottom:437.710000px;}
.y38{bottom:439.270000px;}
.ye{bottom:453.550000px;}
.y37{bottom:455.110000px;}
.yd{bottom:469.150000px;}
.y36{bottom:470.950000px;}
.yc{bottom:484.990000px;}
.y35{bottom:486.910000px;}
.yb{bottom:500.950000px;}
.y34{bottom:502.750000px;}
.ya{bottom:516.790000px;}
.y33{bottom:518.590000px;}
.y9{bottom:532.630000px;}
.y32{bottom:534.430000px;}
.y8{bottom:548.500000px;}
.y31{bottom:550.420000px;}
.y7{bottom:564.460000px;}
.y30{bottom:566.260000px;}
.y6{bottom:580.300000px;}
.y2f{bottom:582.100000px;}
.y5{bottom:596.140000px;}
.y2e{bottom:597.940000px;}
.y4{bottom:611.980000px;}
.y2d{bottom:613.900000px;}
.y3{bottom:627.940000px;}
.y2c{bottom:629.740000px;}
.y2{bottom:643.780000px;}
.y2b{bottom:645.580000px;}
.y0{bottom:656.500000px;}
.y1{bottom:656.980000px;}
.y2a{bottom:661.420000px;}
.y29{bottom:677.380000px;}
.y28{bottom:693.220000px;}
.y27{bottom:709.080000px;}
.h3{height:53.250000px;}
.h2{height:54.960938px;}
.h1{height:63.500000px;}
.h4{height:69.015625px;}
.h5{height:183.500000px;}
.h0{height:792.000000px;}
.w1{width:208.000000px;}
.w2{width:468.000000px;}
.w0{width:612.000000px;}
.x0{left:72.000000px;}
.x4{left:186.980000px;}
.x6{left:253.000000px;}
.x5{left:277.010000px;}
.x1{left:279.890000px;}
.x2{left:286.010000px;}
.x3{left:306.050000px;}
.x7{left:539.980000px;}
@media print{
.v0{vertical-align:0.000000pt;}
.ls2{letter-spacing:-0.128000pt;}
.ls0{letter-spacing:0.000000pt;}
.ls1{letter-spacing:0.128000pt;}
.ws0{word-spacing:0.000000pt;}
._0{margin-left:-1.344000pt;}
._1{width:1.354667pt;}
.fs0{font-size:64.000000pt;}
.fs1{font-size:74.666667pt;}
.y26{bottom:21.333333pt;}
.y52{bottom:106.112000pt;}
.y25{bottom:117.952000pt;}
.y4e{bottom:120.192000pt;}
.y51{bottom:127.392000pt;}
.y24{bottom:139.226667pt;}
.y4d{bottom:141.306667pt;}
.y4f{bottom:144.666667pt;}
.y50{bottom:144.826667pt;}
.y23{bottom:160.346667pt;}
.y4c{bottom:162.426667pt;}
.y22{bottom:181.466667pt;}
.y4b{bottom:183.546667pt;}
.y21{bottom:202.586667pt;}
.y4a{bottom:204.826667pt;}
.y20{bottom:223.866667pt;}
.y49{bottom:225.946667pt;}
.y1f{bottom:244.986667pt;}
.y48{bottom:247.066667pt;}
.y1e{bottom:266.106667pt;}
.y47{bottom:268.186667pt;}
.y1d{bottom:287.266667pt;}
.y46{bottom:289.506667pt;}
.y1c{bottom:308.546667pt;}
.y45{bottom:310.626667pt;}
.y1b{bottom:329.666667pt;}
.y44{bottom:331.746667pt;}
.y1a{bottom:350.786667pt;}
.y43{bottom:352.866667pt;}
.y19{bottom:371.906667pt;}
.y42{bottom:374.146667pt;}
.y18{bottom:393.026667pt;}
.y41{bottom:395.266667pt;}
.y17{bottom:414.306667pt;}
.y40{bottom:416.386667pt;}
.y16{bottom:435.426667pt;}
.y3f{bottom:437.506667pt;}
.y15{bottom:456.546667pt;}
.y3e{bottom:458.786667pt;}
.y14{bottom:477.666667pt;}
.y3d{bottom:479.906667pt;}
.y13{bottom:498.973333pt;}
.y3c{bottom:501.053333pt;}
.y12{bottom:520.093333pt;}
.y3b{bottom:522.173333pt;}
.y11{bottom:541.213333pt;}
.y3a{bottom:543.293333pt;}
.y10{bottom:562.333333pt;}
.y39{bottom:564.573333pt;}
.yf{bottom:583.613333pt;}
.y38{bottom:585.693333pt;}
.ye{bottom:604.733333pt;}
.y37{bottom:606.813333pt;}
.yd{bottom:625.533333pt;}
.y36{bottom:627.933333pt;}
.yc{bottom:646.653333pt;}
.y35{bottom:649.213333pt;}
.yb{bottom:667.933333pt;}
.y34{bottom:670.333333pt;}
.ya{bottom:689.053333pt;}
.y33{bottom:691.453333pt;}
.y9{bottom:710.173333pt;}
.y32{bottom:712.573333pt;}
.y8{bottom:731.333333pt;}
.y31{bottom:733.893333pt;}
.y7{bottom:752.613333pt;}
.y30{bottom:755.013333pt;}
.y6{bottom:773.733333pt;}
.y2f{bottom:776.133333pt;}
.y5{bottom:794.853333pt;}
.y2e{bottom:797.253333pt;}
.y4{bottom:815.973333pt;}
.y2d{bottom:818.533333pt;}
.y3{bottom:837.253333pt;}
.y2c{bottom:839.653333pt;}
.y2{bottom:858.373333pt;}
.y2b{bottom:860.773333pt;}
.y0{bottom:875.333333pt;}
.y1{bottom:875.973333pt;}
.y2a{bottom:881.893333pt;}
.y29{bottom:903.173333pt;}
.y28{bottom:924.293333pt;}
.y27{bottom:945.440000pt;}
.h3{height:71.000000pt;}
.h2{height:73.281250pt;}
.h1{height:84.666667pt;}
.h4{height:92.020833pt;}
.h5{height:244.666667pt;}
.h0{height:1056.000000pt;}
.w1{width:277.333333pt;}
.w2{width:624.000000pt;}
.w0{width:816.000000pt;}
.x0{left:96.000000pt;}
.x4{left:249.306667pt;}
.x6{left:337.333333pt;}
.x5{left:369.346667pt;}
.x1{left:373.186667pt;}
.x2{left:381.346667pt;}
.x3{left:408.066667pt;}
.x7{left:719.973333pt;}
}
|
var addressBar = element(by.css("#addressBar")),
url = 'http://www.example.com/base/ratingList.html#!/path?a=b
it("should show fake browser info on load", function(){
expect(addressBar.getAttribute('value')).toBe(url);
expect(element(by.binding('$location.protocol()')).getText()).toBe('http');
expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com');
expect(element(by.binding('$location.port()')).getText()).toBe('80');
expect(element(by.binding('$location.path()')).getText()).toBe('/path');
expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}');
expect(element(by.binding('$location.hash()')).getText()).toBe('h');
});
it("should change $location accordingly", function(){
var navigation = element.all(by.css("#navigation a"));
navigation.get(0).click();
expect(addressBar.getAttribute('value')).toBe("http:
expect(element(by.binding('$location.protocol()')).getText()).toBe('http');
expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com');
expect(element(by.binding('$location.port()')).getText()).toBe('80');
expect(element(by.binding('$location.path()')).getText()).toBe('/first');
expect(element(by.binding('$location.search()')).getText()).toBe('{"a":"b"}');
expect(element(by.binding('$location.hash()')).getText()).toBe('');
navigation.get(1).click();
expect(addressBar.getAttribute('value')).toBe("http://www.example.com/base/ratingList.html#!/sec/ond?flag#hash");
expect(element(by.binding('$location.protocol()')).getText()).toBe('http');
expect(element(by.binding('$location.host()')).getText()).toBe('www.example.com');
expect(element(by.binding('$location.port()')).getText()).toBe('80');
expect(element(by.binding('$location.path()')).getText()).toBe('/sec/ond');
expect(element(by.binding('$location.search()')).getText()).toBe('{"flag":true}');
expect(element(by.binding('$location.hash()')).getText()).toBe('hash');
});
|
# AUTOGENERATED FILE
FROM balenalib/<API key>:xenial-run
ENV NODE_VERSION 15.14.0
ENV YARN_VERSION 1.22.4
RUN buildDeps='curl libatomic1' \
&& set -x \
&& for key in \
<API key> \
; do \
gpg --keyserver pgp.mit.edu --recv-keys "$key" || \
gpg --keyserver keyserver.pgp.com --recv-keys "$key" || \
gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key" ; \
done \
&& apt-get update && apt-get install -y $buildDeps --<API key> \
|
package com.codedpoetry.maven.dockerplugin.templates;
import java.io.StringWriter;
import java.util.Map;
public interface TemplateRenderer {
StringWriter renderTemplate(String templateUrl, Map context);
}
|
package st.domain.quitanda.client.model.contract;
public interface TypePayment
{
public int getDataBaseId();
}
|
package example.repo;
import example.model.Customer1794;
import java.util.List;
import org.springframework.data.repository.CrudRepository;
public interface <API key> extends CrudRepository<Customer1794, Long> {
List<Customer1794> findByLastName(String lastName);
}
|
"use strict";
define(["lib/three.min"], function() {
var Reality = function(sourceCanvas){
// Create a default camera and scene.
var camera = new THREE.Camera();
var scene = new THREE.Scene();
// Create a plane geometry to hold the sourceCanvas texture
var geometry = new THREE.PlaneGeometry(2, 2, 0);
// Create a material textured with the contents of sourceCanvas.
var texture = new THREE.Texture(sourceCanvas);
var material = new THREE.MeshBasicMaterial({
map: texture,
depthTest: false,
depthWrite: false
});
// Build a mesh and add it to the scene.
var mesh = new THREE.Mesh( geometry, material );
scene.add(mesh);
// We need to notify ThreeJS when the texture has changed.
function update() {
texture.needsUpdate = true;
}
return {
camera: camera,
scene: scene,
update: update,
}
}
var Scene = function() {
var scene = new THREE.Scene();
var camera = new THREE.Camera();
function add(object) {
scene.add(object);
}
function remove(object) {
scene.remove(object);
}
function setProjectionMatrix(matrix) {
camera.projectionMatrix.setFromArray( matrix );
}
return {
scene:scene,
camera:camera,
add:add,
remove:remove,
setProjectionMatrix:setProjectionMatrix,
}
}
var create = function(dimensions, sourceCanvas) {
// Create a canvas which will be used for WebGL
var glCanvas = document.createElement('canvas');
// Initialize the renderer and attach it to the canvas
var renderer = new THREE.WebGLRenderer({canvas:glCanvas});
renderer.setSize(dimensions.width, dimensions.height);
renderer.autoClear = false;
// Create a reality scene
var reality = new Reality(sourceCanvas);
var virtual = new Scene();
var light = new THREE.SpotLight(0xffffff);
light.position.set(0, 0, 9000);
light.lookAt( new THREE.Vector3(0,0,0) );
virtual.scene.add(light);
function render() {
// Render the reality scene
renderer.render(reality.scene, reality.camera);
// Render the augmented components on top of the reality scene.
renderer.render(virtual.scene, virtual.camera);
}
function update() {
// Notify the reality scene to update it's texture
reality.update();
}
function setCameraMatrix( matrix ) {
virtual.setProjectionMatrix( matrix );
}
function add( object ) {
virtual.add( object.model );
}
function remove( object ) {
virtual.remove( object.model );
}
return {
add: add,
remove: remove,
update: update,
render: render,
glCanvas: glCanvas,
setCameraMatrix: setCameraMatrix,
}
}
return {
create: create,
}
});
|
const $ = require('jquery');
const { BagItProfile } = require('../../bagit/bagit_profile');
const { Job } = require('../../core/job');
const { JobRunController } = require('./job_run_controller');
const { PackageOperation } = require('../../core/package_operation');
const path = require('path');
const { StorageService } = require('../../core/storage_service');
const { TestUtil } = require('../../core/test_util');
const { UITestUtil } = require('../common/ui_test_util');
const { UploadOperation } = require('../../core/upload_operation');
const { Util } = require('../../core/util');
beforeEach(() => {
TestUtil.deleteJsonFile('Job');
TestUtil.deleteJsonFile('StorageService');
});
afterAll(() => {
TestUtil.deleteJsonFile('Job');
TestUtil.deleteJsonFile('StorageService');
});
function getStorageService(name, proto, host) {
let ss = new StorageService({
name: name,
protocol: proto,
host: host
});
ss.save();
return ss;
}
function getUploadOp(name, proto, host) {
let ss = getStorageService(name, proto, host);
let op = new UploadOperation();
op.sourceFiles = ['/dev/null'];
op.storageServiceId = ss.id;
return op;
}
function getJob() {
var job = new Job();
job.packageOp = new PackageOperation('TestBag', '/dev/null');
job.packageOp.packageFormat = 'BagIt';
job.packageOp._trimLeadingPaths = false;
job.packageOp.sourceFiles = [
__dirname,
path.join(__dirname, '..', 'forms')
];
job.dirCount = 2;
job.fileCount = 12;
job.byteCount = 237174;
job.uploadOps = [
getUploadOp('target1', 's3', 'target1.com'),
getUploadOp('target2', 's3', 'target2.com')
];
job.bagItProfile = BagItProfile.load(path.join(__dirname, '..', '..', 'test', 'profiles', 'multi_manifest.json'));
job.save();
return job;
}
function getController() {
let job = getJob();
let params = new URLSearchParams({ id: job.id });
return new JobRunController(params);
}
test('constructor', () => {
let controller = getController();
expect(controller.model).toEqual(Job);
expect(controller.job).not.toBeNull();
});
test('show', () => {
let controller = getController();
let response = controller.show()
expect(response.container).toMatch(controller.job.packageOp.packageName);
expect(response.container).toMatch(controller.job.packageOp.outputPath);
expect(response.container).toMatch(controller.job.bagItProfile.name);
expect(response.container).toMatch(controller.job.bagItProfile.description);
expect(response.container).toMatch('2 Directories');
expect(response.container).toMatch('12 Files');
expect(response.container).toMatch('231.62 KB');
expect(response.container).toMatch(controller.job.packageOp.sourceFiles[0]);
expect(response.container).toMatch(controller.job.packageOp.sourceFiles[1]);
});
|
package io.github.dantesun.petclinic.data.velocity;
import org.apache.ibatis.executor.parameter.ParameterHandler;
import org.apache.ibatis.mapping.BoundSql;
import org.apache.ibatis.mapping.MappedStatement;
import org.apache.ibatis.mapping.SqlSource;
import org.apache.ibatis.parsing.XNode;
import org.apache.ibatis.scripting.LanguageDriver;
import org.apache.ibatis.session.Configuration;
import org.apache.ibatis.type.Alias;
import org.mybatis.scripting.velocity.Driver;
@Alias("velocity")
public class VelocityDriver implements LanguageDriver {
private Driver driverImpl = new Driver();
@Override
public ParameterHandler <API key>(MappedStatement mappedStatement, Object parameterObject, BoundSql boundSql) {
return driverImpl.<API key>(mappedStatement, parameterObject, boundSql);
}
@Override
public SqlSource createSqlSource(Configuration configuration, XNode script, Class<?> parameterType) {
return createSqlSource(configuration, script.getNode().getTextContent(), parameterType);
}
@Override
public SqlSource createSqlSource(Configuration configuration, String script, Class<?> parameterType) {
if (parameterType == null) {
parameterType = Object.class;
}
return new VelocitySqlSource(configuration, script, parameterType);
}
}
|
package core.utils;
import java.util.ArrayList;
import java.util.List;
public class Page<T> {
public static final int PAGE_SIZE = 10;
protected List<T> listObjects = new ArrayList<>();
protected int currentPage;
protected int pageSize = PAGE_SIZE;
/**
* Constructor.
* @param list contains the ArrayList to copy
* @param page correspond to the currentPage
*/
public Page(List<T> list, int page) {
for (int i = 0; i < list.size(); i++) {
this.listObjects.add(list.get(i));
}
this.currentPage = page;
}
/**
* Constructor.
* @param list contains the ArrayList to copy
* @param page correspond to the currentPage
* @param pageSize the page size
*/
public Page(List<T> list, int page, int pageSize) {
for (int i = 0; i < list.size(); i++) {
this.listObjects.add(list.get(i));
}
this.currentPage = page;
this.pageSize = pageSize;
}
/**
* Get the ArrayList containing a T page.
* @return the ArrayList containing a T page
*/
public List<T> getListPage() {
return listObjects;
}
/**
* Get the next page.
* @return next page
*/
public int getNextPage() {
return currentPage + 1;
}
/**
* Get previous page.
* @return previous page if currentPage > 0 else 0
*/
public int getPreviousPage() {
if (currentPage > 0) {
return currentPage - 1;
} else {
return 0;
}
}
/**
* Get the current page.
* @return the current page
*/
public int getCurrentPage() {
return currentPage;
}
/**
* Get the page size.
* @return the page size
*/
public int getPageSize() {
return pageSize;
}
/**
* Test if the ArrayList<T> is empty.
* @return True if Empty, else false
*/
public boolean isEmpty() {
return listObjects.isEmpty();
}
/**
* Returns a string representation of the object.
* @return a string representation of the object.
*/
@Override
public String toString() {
return this.getClass() + " [listObjects = " + listObjects + "]";
}
/**
* Equals Methode.
* @param o other object
* @return true if equals, else false
*/
@Override
public boolean equals(Object o) {
Page<T> page = (Page<T>) o;
if (page.getPageSize() != this.pageSize || page.getCurrentPage() != this.currentPage) {
return false;
}
boolean equals = true;
int i = 0;
while (i < this.pageSize && equals) {
equals = page.getListPage().get(i).equals(this.listObjects.get(i));
i++;
}
return equals;
}
/**
* Hash Code.
* @return hash code
*/
@Override
public int hashCode() {
int result = listObjects != null ? listObjects.hashCode() : 0;
result = 31 * result + currentPage;
result = 31 * result + pageSize;
return result;
}
/**
* Add a Object in the ArrayList.
* @param t the object
*/
public void add(T t) {
listObjects.add(t);
}
}
|
<?php
/**
* DO NOT EDIT THIS FILE!
*
* This file was automatically generated from external sources.
*
* Any manual change here will be lost the next time the SDK
* is updated. You've been warned!
*/
namespace DTS\eBaySDK\Test\PostOrder\Types;
use DTS\eBaySDK\PostOrder\Types\<API key>;
class <API key> extends \<API key>
{
private $obj;
protected function setUp()
{
$this->obj = new <API key>();
}
public function testCanBeCreated()
{
$this->assertInstanceOf('\DTS\eBaySDK\PostOrder\Types\<API key>', $this->obj);
}
public function testExtendsBaseType()
{
$this->assertInstanceOf('\DTS\eBaySDK\Types\BaseType', $this->obj);
}
}
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>Software Testing</title>
<link rel="stylesheet" type="text/css" href="style.css" />
<script type="text/javascript" src="cookies.js"></script>
<!-- Bootstrap Core CSS -->
<link href="css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="css/small-business.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<div class="container">
<!-- Brand and toggle get grouped for better mobile display -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#<API key>">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="
<img src="http://techspot.ccsf.edu/images/yuba.png" width="170" height="90" alt="">
</a>
</div>
<!-- Collect the nav links, forms, and other content for toggling -->
<div class="collapse navbar-collapse" id="<API key>">
<ul class="nav navbar-nav">
<li>
<a href="cookies.html">Log In</a>
</li>
<li>
<a href="page1.html">Home</a>
</li>
<li>
<a href="opp.html">Opportunity</a>
</li>
<li>
<a href="ld.html">L&D</a>
</li>
<li>
<a href="topics.html">Topics</a>
</li>
</ul>
<span class="eggs"><script>readCookie('myCookie')</script></span>
</div>
<!-- /.navbar-collapse -->
</div>
<!-- /.container -->
</nav>
<!-- Page Content -->
<div class="container">
<!-- Heading Row -->
<div class="row">
<div class="col-md-8">
<img class="img-responsive img-rounded" src="http:
</div>
<!-- /.col-md-8 -->
<div class="col-md-4">
<h1>In The News</h1>
<p style="color: black">
<strong>US prisoners released early by software bug</strong>
</p>
<p style="color: black">The bug miscalculated the sentence reductions prisoners in Washington state had received for good behaviour.It was introduced in 2002 as part of an update that followed a court ruling about applying good behaviour credits.State officials said
that many early-release prisoners would have to return to jail to finish their sentences.</p>
<a class="btn btn-primary btn-lg" href="http:
</div>
<!-- /.col-md-4 -->
</div>
<!-- /.row -->
<hr>
<!-- Call to Action Well -->
<div class="row">
<div class="col-lg-12">
<div class="well text-center">
<a href="https:
<a href="https:
</a>
</div>
</div>
<!-- /.col-lg-12 -->
</div>
<!-- /.row -->
<!-- Content Row -->
<div class="row">
<div class="col-md-4">
<h2>Overview</h2>
<p style="color: black">One of the very first things you will cover in QA are the different kinds of bus there are.
There are a total of 5 you will need to remember. Software Development Life Cycle (SDLC), being the different stages a product goes threw before its releas date. How to properly log any bugs you find within a spec. Following the different methods
testers use, which are constantly changing. One of the industry standards used today is Agile Testing. One other thing you will cover is White and Black Box Testing. In addition you will also cover White Box Dynamic and Static Testing; Black Box Dynamic and Static Testing. You will learn about Test-to-fail and Test-to-pass. One of the last of few things you will learn in QA is VCS (Version Control Systems), which can be very helpful while testing or creating a product.
</p>
<a class="btn btn-default" href="http://<API key>.com/<API key>/">More Info</a>
</div>
<!-- /.col-md-4 -->
<div class="col-md-4">
<h2>Software Tools</h2>
<p style="color:black">If you're intrested in learning a bit more about QA but don't know where to start, ther will be a link to a very insightful book at the end of this page. It is what we used in our QA class and it will give you an overview of QA and software testing. One out of two of the major things you will need to know is logging a specification bug. A basic templet should have your name, the date, the products name, the version number, and 3 pieces of information. Such as the type of bug you found, a potential bug, why you think it's a bug, and your suggested solution to fixing this bug. In addition you will have to know
the 5 bugs that exist to actually identify them. The second thing will be Equivelence Partitioning. Equivalence partitioning (also called Equivalence Class Partitioning or ECP) is a software testing technique that divides the input data of a software unit into partitions of equivalent data from which test cases can be derived. In principle, test cases are designed to cover each partition at least once. </p>
<a href="myfile.pdf"><img src="https://p.gr-assets.com/max_square/fill/books/1348774033/1543131.jpg" width="400" height="387"></a>
</div>
<!-- /.col-md-4 -->
<!-- /.col-md-4 -->
</div>
<!-- /.row -->
<!-- Footer -->
<footer>
<div class="row">
<div class="col-lg-12">
<center>
<p style="color:black">Copyright © YUBA 2016
<a href="page1.html">Home </a>
<a href="opp.html">Opportunities </a>
<a href="ld.html">L+D </a>
<a href="topics.html">Topics </a>
<a href="http:
</p>
</center>
</div>
</div>
</footer>
</div>
<!-- /.container -->
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>
|
namespace Altavant.Fusion.Graphics
{
using System;
using Fusion.Utils;
public enum MatrixOrder : byte
{
Append,
Prepend
}
public class Matrix
{
private float _m11;
private float _m12;
private float _m21;
private float _m22;
private float _offsetX;
private float _offsetY;
private float[] _values;
public Matrix()
: this(1F, 0F, 0F, 1F, 0F, 0F)
{
}
public Matrix(float m11, float m12, float m21, float m22, float offsetX, float offsetY)
{
_m11 = m11;
_m12 = m12;
_m21 = m21;
_m22 = m22;
_offsetX = offsetX;
_offsetY = offsetY;
}
public Matrix(Android.Graphics.Matrix matrix)
{
float[] values = new float[9];
matrix.GetValues(values);
_m11 = values[Android.Graphics.Matrix.MscaleX];
_m21 = values[Android.Graphics.Matrix.MskewX];
_offsetX = values[Android.Graphics.Matrix.MtransX];
_m12 = values[Android.Graphics.Matrix.MskewY];
_m22 = values[Android.Graphics.Matrix.MscaleY];
_offsetY = values[Android.Graphics.Matrix.MtransY];
}
public float M11
{
get
{
return _m11;
}
set
{
_m11 = value;
}
}
public float M12
{
get
{
return _m12;
}
set
{
_m12 = value;
}
}
public float M21
{
get
{
return _m21;
}
set
{
_m21 = value;
}
}
public float M22
{
get
{
return _m22;
}
set
{
_m22 = value;
}
}
public float OffsetX
{
get
{
return _offsetX;
}
set
{
_offsetX = value;
}
}
public float OffsetY
{
get
{
return _offsetY;
}
set
{
_offsetY = value;
}
}
public static Matrix Identity
{
get
{
return new Matrix(1F, 0F, 0F, 1F, 0F, 0F);
}
}
public bool IsIdentity
{
get
{
if ((_m11 == 1F) && (_m12 == 0F) && (_m21 == 0F) && (_m22 == 1F) && (_offsetX == 0F) && (_offsetY == 0F))
return true;
return false;
}
}
public void SetValues(float m11, float m12, float m21, float m22, float offsetX, float offsetY)
{
_m11 = m11;
_m12 = m12;
_m21 = m21;
_m22 = m22;
_offsetX = offsetX;
_offsetY = offsetY;
}
public void Reset()
{
_m11 = 1F;
_m12 = 0F;
_m21 = 0F;
_m22 = 1F;
_offsetX = 0F;
_offsetY = 0F;
}
public void Multiply(Matrix matrix)
{
Multiply(matrix, MatrixOrder.Prepend);
}
public void Multiply(Matrix matrix, MatrixOrder order)
{
if (matrix == null)
throw new <API key>(nameof(matrix));
float a11, a12, a21, a22, aX, aY;
float b11, b12, b21, b22, bX, bY;
if (order == MatrixOrder.Append)
{
a11 = _m11;
a12 = _m12;
a21 = _m21;
a22 = _m22;
aX = _offsetX;
aY = _offsetY;
b11 = matrix.M11;
b12 = matrix.M12;
b21 = matrix.M21;
b22 = matrix.M22;
bX = matrix.OffsetX;
bY = matrix.OffsetY;
}
else
{
a11 = matrix.M11;
a12 = matrix.M12;
a21 = matrix.M21;
a22 = matrix.M22;
aX = matrix.OffsetX;
aY = matrix.OffsetY;
b11 = _m11;
b12 = _m12;
b21 = _m21;
b22 = _m22;
bX = _offsetX;
bY = _offsetY;
}
_m11 = a11 * b11 + a12 * b21;
_m12 = a11 * b12 + a12 * b22;
_m21 = a21 * b11 + a22 * b21;
_m22 = a21 * b12 + a22 * b22;
_offsetX = aX * b11 + aY * b21 + bX;
_offsetY = aX * b12 + aY * b22 + bY;
}
public void Translate(float offsetX, float offsetY)
{
Translate(offsetX, offsetY, MatrixOrder.Prepend);
}
public void Translate(float offsetX, float offsetY, MatrixOrder order)
{
Matrix matrix = Translation(offsetX, offsetY);
Multiply(matrix, order);
}
public void Rotate(float angle)
{
Rotate(angle, MatrixOrder.Prepend);
}
public void Rotate(float angle, MatrixOrder order)
{
Matrix matrix = Rotation(angle);
Multiply(matrix, order);
}
public void RotateAt(float angle, Point center)
{
RotateAt(angle, center.X, center.Y, MatrixOrder.Prepend);
}
public void RotateAt(float angle, float centerX, float centerY)
{
RotateAt(angle, centerX, centerY, MatrixOrder.Prepend);
}
public void RotateAt(float angle, Point center, MatrixOrder order)
{
if (center == null)
throw new <API key>(nameof(center));
RotateAt(angle, center.X, center.Y, order);
}
public void RotateAt(float angle, float centerX, float centerY, MatrixOrder order)
{
Matrix matrix = RotationAt(angle, centerX, centerY);
Multiply(matrix, order);
}
public void Scale(float scaleX, float scaleY)
{
Scale(scaleX, scaleY, MatrixOrder.Prepend);
}
public void Scale(float scaleX, float scaleY, MatrixOrder order)
{
Matrix matrix = Scaling(scaleX, scaleY);
Multiply(matrix, order);
}
public void ScaleAt(float scaleX, float scaleY, Point center)
{
ScaleAt(scaleX, scaleY, center.X, center.Y, MatrixOrder.Prepend);
}
public void ScaleAt(float scaleX, float scaleY, float centerX, float centerY)
{
ScaleAt(scaleX, scaleY, centerX, centerY, MatrixOrder.Prepend);
}
public void ScaleAt(float scaleX, float scaleY, Point center, MatrixOrder order)
{
if (center == null)
throw new <API key>(nameof(center));
ScaleAt(scaleX, scaleY, center.X, center.Y, order);
}
public void ScaleAt(float scaleX, float scaleY, float centerX, float centerY, MatrixOrder order)
{
Matrix matrix = ScalingAt(scaleX, scaleY, centerX, centerY);
Multiply(matrix, order);
}
public void Shear(float shearX, float shearY)
{
Shear(shearX, shearY, MatrixOrder.Prepend);
}
public void Shear(float shearX, float shearY, MatrixOrder order)
{
Matrix matrix = Shearing(shearX, shearY);
Multiply(matrix, order);
}
public void ShearAt(float shearX, float shearY, Point center)
{
ShearAt(shearX, shearY, center.X, center.Y, MatrixOrder.Prepend);
}
public void ShearAt(float shearX, float shearY, float centerX, float centerY)
{
ShearAt(shearX, shearY, centerX, centerY, MatrixOrder.Prepend);
}
public void ShearAt(float shearX, float shearY, Point center, MatrixOrder order)
{
if (center == null)
throw new <API key>(nameof(center));
ShearAt(shearX, shearY, center.X, center.Y, order);
}
public void ShearAt(float shearX, float shearY, float centerX, float centerY, MatrixOrder order)
{
Matrix matrix = ShearingAt(shearX, shearY, centerX, centerY);
Multiply(matrix, order);
}
public void Skew(float skewX, float skewY)
{
Skew(skewX, skewY, MatrixOrder.Prepend);
}
public void Skew(float skewX, float skewY, MatrixOrder order)
{
Matrix matrix = Skewing(skewX, skewY);
Multiply(matrix, order);
}
public void SkewAt(float skewX, float skewY, Point center)
{
SkewAt(skewX, skewY, center.X, center.Y, MatrixOrder.Prepend);
}
public void SkewAt(float skewX, float skewY, float centerX, float centerY)
{
SkewAt(skewX, skewY, centerX, centerY, MatrixOrder.Prepend);
}
public void SkewAt(float skewX, float skewY, Point center, MatrixOrder order)
{
if (center == null)
throw new <API key>(nameof(center));
SkewAt(skewX, skewY, center.X, center.Y, order);
}
public void SkewAt(float skewX, float skewY, float centerX, float centerY, MatrixOrder order)
{
Matrix matrix = SkewingAt(skewX, skewY, centerX, centerY);
Multiply(matrix, order);
}
public Point TransformPoint(Point pt)
{
return TransformPoint(pt.X, pt.Y);
}
public Point TransformPoint(float x, float y)
{
float x1 = x * _m11 + y * _m21 + _offsetX;
float y1 = x * _m12 + y * _m22 + _offsetY;
return new Point(x1, y1);
}
public Matrix Clone()
{
return new Matrix(_m11, _m12, _m21, _m22, _offsetX, _offsetY);
}
public override int GetHashCode()
{
return _m11.GetHashCode() ^ _m12.GetHashCode() ^ _m21.GetHashCode() ^ _m22.GetHashCode() ^ _offsetX.GetHashCode() ^ _offsetY.GetHashCode();
}
public override bool Equals(object obj)
{
if (obj == null)
return false;
if (obj == this)
return true;
if (obj is Matrix)
{
Matrix matrix = (Matrix)obj;
if ((_m11 == matrix.M11) && (_m12 == matrix.M12) && (_m21 == matrix.M21) && (_m22 == matrix.M22) && (_offsetX == matrix.OffsetX) && (_offsetY == matrix.OffsetY))
return true;
}
return false;
}
public override string ToString()
{
CharBuffer cb = new CharBuffer();
cb.Add(Converter.ToString(_m11, 3));
cb.Add(", ");
cb.Add(Converter.ToString(_m12, 3));
cb.Add(", ");
cb.Add(Converter.ToString(_m21, 3));
cb.Add(", ");
cb.Add(Converter.ToString(_m22, 3));
cb.Add(", ");
cb.Add(Converter.ToString(_offsetX, 3));
cb.Add(", ");
cb.Add(Converter.ToString(_offsetY, 3));
return cb.ToString();
}
public static Matrix Parse(string s)
{
if (string.IsNullOrEmpty(s))
throw new ArgumentException(nameof(s));
string[] vals = Utils.Split(s);
float m11 = Convert.ToSingle(vals[0], Converter.NumberFormatInfo);
float m12 = Convert.ToSingle(vals[1], Converter.NumberFormatInfo);
float m21 = Convert.ToSingle(vals[2], Converter.NumberFormatInfo);
float m22 = Convert.ToSingle(vals[3], Converter.NumberFormatInfo);
float offsetX = Convert.ToSingle(vals[4], Converter.NumberFormatInfo);
float offsetY = Convert.ToSingle(vals[5], Converter.NumberFormatInfo);
return new Matrix(m11, m12, m21, m22, offsetX, offsetY);
}
public static Matrix Translation(Point offset)
{
return new Matrix(1F, 0F, 0F, 1F, offset.X, offset.Y);
}
public static Matrix Translation(float offsetX, float offsetY)
{
return new Matrix(1F, 0F, 0F, 1F, offsetX, offsetY);
}
public static Matrix Rotation(float angle)
{
double radianAngle = angle * Math.PI / 180F;
float cosAngle = (float)Math.Cos(radianAngle);
float sinAngle = (float)Math.Sin(radianAngle);
return new Matrix(cosAngle, sinAngle, -sinAngle, cosAngle, 0F, 0F);
}
public static Matrix RotationAt(float angle, Point center)
{
return RotationAt(angle, center.X, center.Y);
}
public static Matrix RotationAt(float angle, float centerX, float centerY)
{
double radianAngle = angle * Math.PI / 180F;
float cosAngle = (float)Math.Cos(radianAngle);
float sinAngle = (float)Math.Sin(radianAngle);
Matrix m1 = new Matrix(1F, 0F, 0F, 1F, -centerX, -centerY);
Matrix m2 = new Matrix(cosAngle, sinAngle, -sinAngle, cosAngle, 0F, 0F);
Matrix m3 = new Matrix(1F, 0F, 0F, 1F, centerX, centerY);
m1.Multiply(m2, MatrixOrder.Append);
m1.Multiply(m3, MatrixOrder.Append);
return m1;
}
public static Matrix Scaling(float scale)
{
return Scaling(scale, scale);
}
public static Matrix Scaling(float scaleX, float scaleY)
{
return new Matrix(scaleX, 0F, 0F, scaleY, 0F, 0F);
}
public static Matrix ScalingAt(float scale, Point center)
{
return ScalingAt(scale, scale, center.X, center.Y);
}
public static Matrix ScalingAt(float scaleX, float scaleY, Point center)
{
return ScalingAt(scaleX, scaleY, center.X, center.Y);
}
public static Matrix ScalingAt(float scale, float centerX, float centerY)
{
return ScalingAt(scale, scale, centerX, centerY);
}
public static Matrix ScalingAt(float scaleX, float scaleY, float centerX, float centerY)
{
Matrix m1 = new Matrix(1F, 0F, 0F, 1F, -centerX, -centerY);
Matrix m2 = new Matrix(scaleX, 0F, 0F, scaleY, 0F, 0F);
Matrix m3 = new Matrix(1F, 0F, 0F, 1F, centerX, centerY);
m1.Multiply(m2, MatrixOrder.Append);
m1.Multiply(m3, MatrixOrder.Append);
return m1;
}
public static Matrix Shearing(float shearX, float shearY)
{
return new Matrix(1F, shearY, shearX, 1F, 0F, 0F);
}
public static Matrix ShearingAt(float shearX, float shearY, Point center)
{
return ShearingAt(shearX, shearY, center.X, center.Y);
}
public static Matrix ShearingAt(float shearX, float shearY, float centerX, float centerY)
{
Matrix m1 = new Matrix(1F, 0F, 0F, 1F, -centerX, -centerY);
Matrix m2 = new Matrix(1F, shearY, shearX, 1F, 0F, 0F);
Matrix m3 = new Matrix(1F, 0F, 0F, 1F, centerX, centerY);
m1.Multiply(m2, MatrixOrder.Append);
m1.Multiply(m3, MatrixOrder.Append);
return m1;
}
public static Matrix Skewing(float skewX, float skewY)
{
double angleAlpha = skewX * Math.PI / 180F;
double angleBeta = skewY * Math.PI / 180F;
float tanAlpha = (float)Math.Tan(angleAlpha);
float tanBeta = (float)Math.Tan(angleBeta);
return new Matrix(1F, tanBeta, tanAlpha, 1F, 0F, 0F);
}
public static Matrix SkewingAt(float skewX, float skewY, Point center)
{
return SkewingAt(skewX, skewY, center.X, center.Y);
}
public static Matrix SkewingAt(float skewX, float skewY, float centerX, float centerY)
{
double angleAlpha = skewX * Math.PI / 180F;
double angleBeta = skewY * Math.PI / 180F;
float tanAlpha = (float)Math.Tan(angleAlpha);
float tanBeta = (float)Math.Tan(angleBeta);
Matrix m1 = new Matrix(1F, 0F, 0F, 1F, -centerX, -centerY);
Matrix m2 = new Matrix(1F, tanBeta, tanAlpha, 1F, 0F, 0F);
Matrix m3 = new Matrix(1F, 0F, 0F, 1F, centerX, centerY);
m1.Multiply(m2, MatrixOrder.Append);
m1.Multiply(m3, MatrixOrder.Append);
return m1;
}
public Android.Graphics.Matrix ToNative()
{
Android.Graphics.Matrix m = new Android.Graphics.Matrix();
ToNative(m);
return m;
}
public void ToNative(Android.Graphics.Matrix m)
{
if (_values == null)
_values = new float[9];
_values[Android.Graphics.Matrix.MscaleX] = _m11;
_values[Android.Graphics.Matrix.MskewX] = _m21;
_values[Android.Graphics.Matrix.MtransX] = _offsetX;
_values[Android.Graphics.Matrix.MskewY] = _m12;
_values[Android.Graphics.Matrix.MscaleY] = _m22;
_values[Android.Graphics.Matrix.MtransY] = _offsetY;
_values[Android.Graphics.Matrix.Mpersp2] = 1F;
m.SetValues(_values);
}
}
}
|
[assembly: Xamarin.Forms.Platform.WPF.ExportRenderer(typeof(Xamarin.Forms.Entry), typeof(Xamarin.Forms.Platform.WPF.Controls.EntryRenderer))]
namespace Xamarin.Forms.Platform.WPF.Controls
{
using System.Windows;
using System.Windows.Controls;
public partial class EntryRenderer : Xamarin.Forms.Platform.WPF.Rendereres.ViewRenderer
{
bool ignoreTextChange;
public new Entry Model
{
get { return (Entry)base.Model; }
set { base.Model = value; }
}
public EntryRenderer()
{
InitializeComponent();
}
protected override void LoadModel(View model)
{
((Entry)model).TextChanged += <API key>;
base.LoadModel(model);
}
protected override void UnloadModel(View model)
{
((Entry)model).TextChanged -= <API key>;
base.UnloadModel(model);
}
void <API key>(object sender, Xamarin.Forms.<API key> e)
{
if (ignoreTextChange)
return;
ignoreTextChange = true;
TextBox.Text = e.NewTextValue;
PasswordBox.Password = e.NewTextValue;
ignoreTextChange = false;
}
void TextBox_TextChanged(object sender, <API key> e)
{
if (ignoreTextChange)
return;
ignoreTextChange = true;
Model.Text = TextBox.Text;
PasswordBox.Password = TextBox.Text;
ignoreTextChange = false;
}
void <API key>(object sender, RoutedEventArgs e)
{
if (ignoreTextChange)
return;
ignoreTextChange = true;
Model.Text = PasswordBox.Password;
TextBox.Text = PasswordBox.Password;
ignoreTextChange = false;
}
private void Entry_LostFocus(object sender, RoutedEventArgs e)
{
if (Model != null)
Model.SendCompleted();
}
private void <API key>(object sender, System.Windows.Input.KeyEventArgs e)
{
if (Model != null && e.Key == System.Windows.Input.Key.Return)
{
Model.SendCompleted();
e.Handled = true;
}
}
protected override bool <API key>(BindableProperty property)
{
// Background color is set directly to the TextBox/PasswordBox with bindings.
return true;
}
}
}
|
/**
* @fileoverview Displays and edits the value of a cookie.
* Intended only for debugging.
*/
goog.provide('goog.ui.CookieEditor');
goog.require('goog.asserts');
goog.require('goog.dom');
goog.require('goog.dom.TagName');
goog.require('goog.events.EventType');
goog.require('goog.net.Cookies');
goog.require('goog.string');
goog.require('goog.style');
goog.require('goog.ui.Component');
goog.requireType('goog.events.Event');
/**
* Displays and edits the value of a cookie.
* @final
* @unrestricted
*/
goog.ui.CookieEditor = class extends goog.ui.Component {
/**
* @param {goog.dom.DomHelper=} opt_domHelper Optional DOM helper.
*/
constructor(opt_domHelper) {
'use strict';
super(opt_domHelper);
}
/**
* Sets the cookie which this component will edit.
* @param {string} cookieKey Cookie key.
*/
selectCookie(cookieKey) {
'use strict';
goog.asserts.assert(goog.net.Cookies.getInstance().isValidName(cookieKey));
this.cookieKey_ = cookieKey;
if (this.textAreaElem_) {
this.textAreaElem_.value =
goog.net.Cookies.getInstance().get(cookieKey) || '';
}
}
/** @override */
canDecorate() {
'use strict';
return false;
}
/** @override */
createDom() {
'use strict';
// Debug-only, so we don't need i18n.
this.clearButtonElem_ = goog.dom.createDom(
goog.dom.TagName.BUTTON, /* attributes */ null, 'Clear');
this.updateButtonElem_ = goog.dom.createDom(
goog.dom.TagName.BUTTON, /* attributes */ null, 'Update');
var value =
this.cookieKey_ && goog.net.Cookies.getInstance().get(this.cookieKey_);
this.textAreaElem_ = goog.dom.createDom(
goog.dom.TagName.TEXTAREA, /* attibutes */ null, value || '');
this.valueWarningElem_ = goog.dom.createDom(
goog.dom.TagName.SPAN,
/* attibutes */ {'style': 'display:none;color:red'},
'Invalid cookie value.');
this.setElementInternal(goog.dom.createDom(
goog.dom.TagName.DIV,
/* attibutes */ null, this.valueWarningElem_,
goog.dom.createDom(goog.dom.TagName.BR), this.textAreaElem_,
goog.dom.createDom(goog.dom.TagName.BR), this.clearButtonElem_,
this.updateButtonElem_));
}
/** @override */
enterDocument() {
'use strict';
super.enterDocument();
this.getHandler().listen(
this.clearButtonElem_, goog.events.EventType.CLICK, this.handleClear_);
this.getHandler().listen(
this.updateButtonElem_, goog.events.EventType.CLICK,
this.handleUpdate_);
}
/**
* Handles user clicking clear button.
* @param {!goog.events.Event} e The click event.
* @private
*/
handleClear_(e) {
'use strict';
if (this.cookieKey_) {
goog.net.Cookies.getInstance().remove(this.cookieKey_);
}
this.textAreaElem_.value = '';
}
/**
* Handles user clicking update button.
* @param {!goog.events.Event} e The click event.
* @private
*/
handleUpdate_(e) {
'use strict';
if (this.cookieKey_) {
var value = this.textAreaElem_.value;
if (value) {
// Strip line breaks.
value = goog.string.stripNewlines(value);
}
if (goog.net.Cookies.getInstance().isValidValue(value)) {
goog.net.Cookies.getInstance().set(this.cookieKey_, value);
goog.style.setElementShown(this.valueWarningElem_, false);
} else {
goog.style.setElementShown(this.valueWarningElem_, true);
}
}
}
/** @override */
disposeInternal() {
'use strict';
this.clearButtonElem_ = null;
this.cookieKey_ = null;
this.textAreaElem_ = null;
this.updateButtonElem_ = null;
this.valueWarningElem_ = null;
}
};
/**
* Cookie key.
* @type {?string}
* @private
*/
goog.ui.CookieEditor.prototype.cookieKey_;
/**
* Text area.
* @type {HTMLTextAreaElement}
* @private
*/
goog.ui.CookieEditor.prototype.textAreaElem_;
/**
* Clear button.
* @type {HTMLButtonElement}
* @private
*/
goog.ui.CookieEditor.prototype.clearButtonElem_;
/**
* Invalid value warning text.
* @type {HTMLSpanElement}
* @private
*/
goog.ui.CookieEditor.prototype.valueWarningElem_;
/**
* Update button.
* @type {HTMLButtonElement}
* @private
*/
goog.ui.CookieEditor.prototype.updateButtonElem_;
// TODO(user): add combobox for user to select different cookies
|
#!/usr/bin/env perl
use warnings;
use strict;
use POSIX;
# convert a set of numbers to a distribution
my $bin = shift @ARGV;
my $col = shift @ARGV;
$bin or die "usage: $0 <bin size> <column number (0 based)> <table (on STDIN)>\n";
my $delim = "\t";
my $n=0;
my $sum=0;
my $min=1000000000;
my $max = -999999999;
my %dist;
while (<>) {
chomp;
my @x = split /$delim/, $_;
my $val = $x[$col];
is_numeric($val) or next;
$sum += $val;
$min = $val if ($val < $min);
$max = $val if ($val > $max);
my $obin = int($val/$bin);
$dist{$obin}++;
$n++;
}
my $nover2=$n/2;
my $half_ass = $sum/2;
my $mean = int(1000*$sum/$n+0.5)/1000;
my $sum2=0;
my $minbin = $bin*floor($min/$bin);
my %cumdist;
while (my($obin,$tally) = each %dist) {
$sum2 += $tally*($obin*$bin-$mean)**2
}
my $stdev = int(1000*sqrt($sum2/$n)+0.5)/1000;
my $N50_sum=0;
my $N50=0;
my ($mode_height,$mode_bin)=(0,0);
my $median_bin=0;
my $iter=0;
my $previ;
my @bins = sort {$a <=> $b} keys %dist;
for my $i (@bins) {
$iter++;
if ($N50_sum < $half_ass) {
$N50 = $minbin+$i*$bin + floor($bin/2);
$N50_sum += $dist{$i}*$N50;
}
$cumdist{$i} = $dist{$i};
if ($iter>1) {
$cumdist{$i} += $cumdist{$previ};
}
if ($cumdist{$i} < $nover2) {
$median_bin = $i;
}
if($dist{$i} > $mode_height) {
$mode_height = $dist{$i};
$mode_bin = $i;
}
$previ=$i;
}
my $mode = $mode_bin*$bin;
my $median = $median_bin*$bin;
#print "# ", join ("\t",qw(N mean stdev median mode min max N50(bin))),"\n";
#print "# ", join ("\t",($n,$mean,$stdev,$median, $mode,$min,$max,$N50)),"\n";
print qq{# N\t$n
# mean\t$mean
# stdev\t$stdev
# median\t$median
# mode\t$mode
# min\t$min
# max\t$max
# N50\t$N50
};
print "\n#", join ("\t",qw(bin raw_dist norm_dist cumulative_dist)),"\n";
for my $i (@bins) {
print join ("\t",$i*$bin,$dist{$i},int(1000*$dist{$i}/$n)/1000,int(1000*$cumdist{$i}/$n)/1000),"\n";
}
sub getnum {
my $str = shift;
$str =~ s/^\s+
$str =~ s/\s+$
$! = 0;
my($num, $unparsed) = strtod($str);
if (($str eq '') || ($unparsed != 0) || $!) {
return undef;
}
else {
return $num;
}
}
sub is_numeric { defined getnum($_[0]) }
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_65) on Wed Sep 03 20:01:19 PDT 2014 -->
<meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
<title><API key>.<API key> (HBase 0.98.6-hadoop2 API)</title>
<meta name="date" content="2014-09-03">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="<API key>.<API key> (HBase 0.98.6-hadoop2 API)";
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar_top">
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/<API key>.<API key>.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/hadoop/hbase/protobuf/generated/<API key>.WhoAmIRequest.Builder.html" title="class in org.apache.hadoop.hbase.protobuf.generated"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../org/apache/hadoop/hbase/protobuf/generated/<API key>.WhoAmIResponse.html" title="class in org.apache.hadoop.hbase.protobuf.generated"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/hadoop/hbase/protobuf/generated/<API key>.<API key>.html" target="_top">Frames</a></li>
<li><a href="<API key>.<API key>.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li>Method</li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li>Method</li>
</ul>
</div>
<a name="skip-navbar_top">
</a></div>
<div class="header">
<div class="subTitle">org.apache.hadoop.hbase.protobuf.generated</div>
<h2 title="Interface <API key>.<API key>" class="title">Interface <API key>.<API key></h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Superinterfaces:</dt>
<dd>com.google.protobuf.<API key>, com.google.protobuf.MessageOrBuilder</dd>
</dl>
<dl>
<dt>All Known Implementing Classes:</dt>
<dd><a href="../../../../../../org/apache/hadoop/hbase/protobuf/generated/<API key>.WhoAmIRequest.html" title="class in org.apache.hadoop.hbase.protobuf.generated"><API key>.WhoAmIRequest</a>, <a href="../../../../../../org/apache/hadoop/hbase/protobuf/generated/<API key>.WhoAmIRequest.Builder.html" title="class in org.apache.hadoop.hbase.protobuf.generated"><API key>.WhoAmIRequest.Builder</a></dd>
</dl>
<dl>
<dt>Enclosing class:</dt>
<dd><a href="../../../../../../org/apache/hadoop/hbase/protobuf/generated/<API key>.html" title="class in org.apache.hadoop.hbase.protobuf.generated"><API key></a></dd>
</dl>
<hr>
<br>
<pre>public static interface <span class="strong"><API key>.<API key></span>
extends com.google.protobuf.MessageOrBuilder</pre>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="method_summary">
</a>
<h3>Method Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="<API key>.google.protobuf.MessageOrBuilder">
</a>
<h3>Methods inherited from interface com.google.protobuf.MessageOrBuilder</h3>
<code><API key>, getAllFields, <API key>, <API key>, getField, <API key>, getRepeatedField, <API key>, getUnknownFields, hasField</code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="<API key>.google.protobuf.<API key>">
</a>
<h3>Methods inherited from interface com.google.protobuf.<API key></h3>
<code>isInitialized</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="bottomNav"><a name="navbar_bottom">
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/<API key>.<API key>.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../org/apache/hadoop/hbase/protobuf/generated/<API key>.WhoAmIRequest.Builder.html" title="class in org.apache.hadoop.hbase.protobuf.generated"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../../org/apache/hadoop/hbase/protobuf/generated/<API key>.WhoAmIResponse.html" title="class in org.apache.hadoop.hbase.protobuf.generated"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/apache/hadoop/hbase/protobuf/generated/<API key>.<API key>.html" target="_top">Frames</a></li>
<li><a href="<API key>.<API key>.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li>Method</li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li>Method</li>
</ul>
</div>
<a name="skip-navbar_bottom">
</a></div>
<p class="legalCopy"><small>Copyright &
</body>
</html>
|
namespace News {
public partial class NewsEdit {
<summary>
tbTitle
</summary>
<remarks>
</remarks>
protected global::System.Web.UI.WebControls.TextBox tbTitle;
<summary>
ddlSort
</summary>
<remarks>
</remarks>
protected global::System.Web.UI.WebControls.DropDownList ddlSort;
<summary>
CKEditorControl1
</summary>
<remarks>
</remarks>
protected global::CKEditor.NET.CKEditorControl CKEditorControl1;
<summary>
btnSave
</summary>
<remarks>
</remarks>
protected global::System.Web.UI.WebControls.Button btnSave;
<summary>
btnBack
</summary>
<remarks>
</remarks>
protected global::System.Web.UI.WebControls.Button btnBack;
}
}
|
#ifndef _RUNTIME_INL
#define _RUNTIME_INL
#include "runtime.h"
// Expands to the body of a safe_ function that works by calling a delegate and
// if it fails garbage collecting and trying again once.
#define RETRY_ONCE_IMPL(RUNTIME, DELEGATE) do { \
<API key>(P_FLAVOR, RUNTIME, value, DELEGATE, P_RETURN); \
return value; \
} while (false)
#endif // _RUNTIME_INL
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace com.huawei.ebg.esdk.ucsdk.client.control
{
public partial class DialCall : Button
{
public DialCall()
{
InitializeComponent();
}
# region
private string _ucAccount;
[Description("UC")]
public string UCAccount
{
get { return _ucAccount; }
set { _ucAccount = value; }
}
private string _calledNumber;
[Description("")]
public string CalledNumber
{
get { return _calledNumber; }
set { _calledNumber = value; }
}
# endregion
protected override void OnClick(EventArgs e)
{
base.OnClick(e);
try
{
CtrlBusiness.DirectCall(_ucAccount, _calledNumber);
}
catch (Exception ex)
{
//throw ex;
}
}
}
}
|
layout: default
title: CAS - SMS Messaging
category: Notifications
# SMS Messaging
CAS presents the ability to notify users on select actions via SMS messaging. Example actions include notification of risky authentication attempts
or password reset links/tokens. SMS providers supported by CAS are listed below. Note that an active/professional subscription may be required for certain
providers.
## Custom
Send text messages using your own custom implementation.
java
@Bean
public SmsSender smsSender() {
}
## Groovy
Send text messages using an external Groovy script.
groovy
import java.util.*
def run(Object[] args) {
def from = args[0]
def to = args[1]
def message = args[2]
def logger = args[3]
logger.debug("Sending message ${message} to ${to} from ${from}")
true
}
To see the relevant list of CAS properties, please [review this guide](../configuration/<API key>.html#groovy).
## REST
Send text messages using a RESTful API. This is a `POST` with the following parameters:
| Field | Description
|
| `clientIpAddress` | The client IP address.
| `serverIpAddress` | The server IP address.
| `from` | The from address of the text message.
| `to` | The target recipient of the text message.
The request body contains the actual message. A status code of `200` is expected from the endpoint.
To see the relevant list of CAS properties, please [review this guide](../configuration/<API key>.html#rest-2).
## Twilio
To learn more, [visit this site](https:
xml
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId><API key></artifactId>
<version>${cas.version}</version>
</dependency>
To see the relevant list of CAS properties, please [review this guide](../configuration/<API key>.html#twilio).
## TextMagic
To learn more, [visit this site](https:
xml
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId><API key></artifactId>
<version>${cas.version}</version>
</dependency>
To see the relevant list of CAS properties, please [review this guide](../configuration/<API key>.html#textmagic).
## Clickatell
To learn more, [visit this site](http:
xml
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId><API key></artifactId>
<version>${cas.version}</version>
</dependency>
To see the relevant list of CAS properties, please [review this guide](../configuration/<API key>.html#clickatell).
## Amazon SNS
To learn more, [visit this site](https://docs.aws.amazon.com/sns).
xml
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId><API key></artifactId>
<version>${cas.version}</version>
</dependency>
To see the relevant list of CAS properties, please [review this guide](../configuration/<API key>.html#amazon-sns).
## Nexmo
To learn more, [visit this site](https://dashboard.nexmo.com/).
xml
<dependency>
<groupId>org.apereo.cas</groupId>
<artifactId><API key></artifactId>
<version>${cas.version}</version>
</dependency>
To see the relevant list of CAS properties, please [review this guide](../configuration/<API key>.html#nexmo).
|
package io.teknek.nibiru.transport.rpc;
import io.teknek.nibiru.transport.BaseResponse;
public class BlockingRpcResponse<T> implements BaseResponse {
private String exception;
private T rpcResult;
public BlockingRpcResponse(){
}
public String getException() {
return exception;
}
public void setException(String exception) {
this.exception = exception;
}
public T getRpcResult() {
return rpcResult;
}
public void setRpcResult(T rpcResult) {
this.rpcResult = rpcResult;
}
}
|
<!DOCTYPE HTML PUBLIC "-
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_80) on Thu Oct 15 19:26:58 UTC 2015 -->
<title><API key> (AWS SDK for Java - 1.10.27)</title>
<meta name="date" content="2015-10-15">
<link rel="stylesheet" type="text/css" href="../../../../../JavaDoc.css" title="Style">
</head>
<body>
<script type="text/javascript"><!
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="<API key> (AWS SDK for Java - 1.10.27)";
}
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="topNav"><a name="navbar_top">
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em>
<!-- Scripts for Syntax Highlighter START-->
<script id="<API key>" type="text/javascript" src = "http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/resources/syntaxhighlight/scripts/shCore.js">
</script>
<script id="<API key>" type="text/javascript" src = "http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/resources/syntaxhighlight/scripts/shBrushJava.js">
</script>
<link id="<API key>" rel="stylesheet" type="text/css" href = "http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/resources/syntaxhighlight/styles/shCoreDefault.css"/>
<link id="<API key>" rel="stylesheet" type="text/css" href = "http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/resources/syntaxhighlight/styles/shThemeDefault.css"/>
<!-- Scripts for Syntax Highlighter END-->
<div>
<!-- BEGIN-SECTION -->
<div id="divsearch" style="float:left;">
<span id="lblsearch" for="searchQuery">
<label>Search</label>
</span>
<form id="nav-search-form" target="_parent" method="get" action="http://docs.aws.amazon.com/search/doc-search.html#facet_doc_guide=API+Reference&facet_doc_product=AWS+SDK+for+Java">
<div id="<API key>" class="nav-sprite">
<div class="<API key> nav-sprite">
<div id="<API key>">
<input id="nav-searchfield" name="searchQuery">
</div>
</div>
</div>
<div id="nav-search-button" class="nav-sprite">
<input alt="" id="<API key>" type="image">
</div>
<input name="searchPath" type="hidden" value="documentation-guide" />
<input name="this_doc_product" type="hidden" value="AWS SDK for Java" />
<input name="this_doc_guide" type="hidden" value="API Reference" />
<input name="doc_locale" type="hidden" value="en_us" />
</form>
</div>
<!-- END-SECTION -->
<!-- <API key> -->
<div id="feedback-section">
<h3>Did this page help you?</h3>
<div id="<API key>">
<a id="feedback_yes" target="_blank" style="display:inline;">Yes</a>
<a id="feedback_no" target="_blank" style="display:inline;">No</a>
<a id="go_cti" target="_blank" style="display:inline;">Tell us about it...</a>
</div>
</div>
<script type="text/javascript">
window.onload = function(){
/* Dynamically add feedback links */
var javadoc_root_name = "/javadoc/";
var javadoc_path = location.href.substring(0, location.href.lastIndexOf(javadoc_root_name) + javadoc_root_name.length);
var file_path = location.href.substring(location.href.lastIndexOf(javadoc_root_name) + javadoc_root_name.length);
var feedback_yes_url = javadoc_path + "javadoc-resources/feedbackyes.html?topic_id=";
var feedback_no_url = javadoc_path + "javadoc-resources/feedbackno.html?topic_id=";
var <API key> = "https://aws-portal.amazon.com/gp/aws/<API key>/documentation/aws_doc_feedback_04?service_name=Java-Ref&file_name=";
if(file_path != "overview-frame.html") {
var file_name = file_path.replace(/[/.]/g, '_');
document.getElementById("feedback_yes").setAttribute("href", feedback_yes_url + file_name);
document.getElementById("feedback_no").setAttribute("href", feedback_no_url + file_name);
document.getElementById("go_cti").setAttribute("href", <API key> + file_name);
} else {
// hide the search box and the feeback links in overview-frame page,
// show "AWS SDK for Java" instead.
document.getElementById("feedback-section").outerHTML = "AWS SDK for Java";
document.getElementById("divsearch").outerHTML = "";
}
};
</script>
<!-- <API key> -->
</div>
</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../com/amazonaws/services/autoscaling/model/DescribeTagsRequest.html" title="class in com.amazonaws.services.autoscaling.model"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/amazonaws/services/autoscaling/model/<API key>.html" target="_top">Frames</a></li>
<li><a href="<API key>.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
</a></div>
<div class="header">
<div class="subTitle">com.amazonaws.services.autoscaling.model</div>
<h2 title="Class <API key>" class="title">Class <API key></h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>com.amazonaws.services.autoscaling.model.<API key></li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd>java.io.Serializable, java.lang.Cloneable</dd>
</dl>
<hr>
<br>
<pre>public class <span class="strong"><API key></span>
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable</pre>
<dl><dt><span class="strong">See Also:</span></dt><dd><a href="../../../../../serialized-form.html#com.amazonaws.services.autoscaling.model.<API key>">Serialized Form</a></dd></dl>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html#<API key>()"><API key></a></strong>()</code> </td>
</tr>
</table>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="method_summary">
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><API key></a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html#clone()">clone</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html#equals(java.lang.Object)">equals</a></strong>(java.lang.Object obj)</code> </td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html#getNextToken()">getNextToken</a></strong>()</code>
<div class="block">The token to use when requesting the next set of items.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.util.List<<a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><API key></a>></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html#<API key>()"><API key></a></strong>()</code>
<div class="block">The scheduled actions.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html#hashCode()">hashCode</a></strong>()</code> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html#setNextToken(java.lang.String)">setNextToken</a></strong>(java.lang.String nextToken)</code>
<div class="block">The token to use when requesting the next set of items.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html#<API key>(java.util.Collection)"><API key></a></strong>(java.util.Collection<<a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><API key></a>> <API key>)</code>
<div class="block">The scheduled actions.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html#toString()">toString</a></strong>()</code>
<div class="block">Returns a string representation of this object; useful for testing and
debugging.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><API key></a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html#withNextToken(java.lang.String)">withNextToken</a></strong>(java.lang.String nextToken)</code>
<div class="block">The token to use when requesting the next set of items.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><API key></a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html#<API key>(java.util.Collection)"><API key></a></strong>(java.util.Collection<<a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><API key></a>> <API key>)</code>
<div class="block">The scheduled actions.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><API key></a></code></td>
<td class="colLast"><code><strong><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html#<API key>(com.amazonaws.services.autoscaling.model.<API key>...)"><API key></a></strong>(<a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><API key></a>... <API key>)</code>
<div class="block">The scheduled actions.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="<API key>.lang.Object">
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>getClass, notify, notifyAll, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
</a>
<h3>Constructor Detail</h3>
<a name="<API key>()">
</a>
<ul class="blockListLast">
<li class="blockList">
<h4><API key></h4>
<pre>public <API key>()</pre>
</li>
</ul>
</li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="method_detail">
</a>
<h3>Method Detail</h3>
<a name="<API key>()">
</a>
<ul class="blockList">
<li class="blockList">
<h4><API key></h4>
<pre>public java.util.List<<a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><API key></a>> <API key>()</pre>
<div class="block">The scheduled actions.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The scheduled actions.</dd></dl>
</li>
</ul>
<a name="<API key>(java.util.Collection)">
</a>
<ul class="blockList">
<li class="blockList">
<h4><API key></h4>
<pre>public void <API key>(java.util.Collection<<a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><API key></a>> <API key>)</pre>
<div class="block">The scheduled actions.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code><API key></code> - The scheduled actions.</dd></dl>
</li>
</ul>
<a name="<API key>(com.amazonaws.services.autoscaling.model.<API key>...)">
</a>
<ul class="blockList">
<li class="blockList">
<h4><API key></h4>
<pre>public <a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><API key></a> <API key>(<a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><API key></a>... <API key>)</pre>
<div class="block">The scheduled actions.
<p>
<b>NOTE:</b> This method appends the values to the existing list (if
any). Use <a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html#<API key>(java.util.Collection)"><code><API key>(java.util.Collection)</code></a> or <a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html#<API key>(java.util.Collection)"><code><API key>(java.util.Collection)</code></a> if you want to
override the existing values.
<p>
Returns a reference to this object so that method calls can be chained together.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code><API key></code> - The scheduled actions.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A reference to this updated object so that method calls can be chained
together.</dd></dl>
</li>
</ul>
<a name="<API key>(java.util.Collection)">
</a>
<ul class="blockList">
<li class="blockList">
<h4><API key></h4>
<pre>public <a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><API key></a> <API key>(java.util.Collection<<a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><API key></a>> <API key>)</pre>
<div class="block">The scheduled actions.
<p>
Returns a reference to this object so that method calls can be chained together.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code><API key></code> - The scheduled actions.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A reference to this updated object so that method calls can be chained
together.</dd></dl>
</li>
</ul>
<a name="getNextToken()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNextToken</h4>
<pre>public java.lang.String getNextToken()</pre>
<div class="block">The token to use when requesting the next set of items. If there are
no additional items to return, the string is empty.
<p>
<b>Constraints:</b><br/>
<b>Pattern: </b>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*<br/></div>
<dl><dt><span class="strong">Returns:</span></dt><dd>The token to use when requesting the next set of items. If there are
no additional items to return, the string is empty.</dd></dl>
</li>
</ul>
<a name="setNextToken(java.lang.String)">
</a>
<ul class="blockList">
<li class="blockList">
<h4>setNextToken</h4>
<pre>public void setNextToken(java.lang.String nextToken)</pre>
<div class="block">The token to use when requesting the next set of items. If there are
no additional items to return, the string is empty.
<p>
<b>Constraints:</b><br/>
<b>Pattern: </b>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*<br/></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>nextToken</code> - The token to use when requesting the next set of items. If there are
no additional items to return, the string is empty.</dd></dl>
</li>
</ul>
<a name="withNextToken(java.lang.String)">
</a>
<ul class="blockList">
<li class="blockList">
<h4>withNextToken</h4>
<pre>public <a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><API key></a> withNextToken(java.lang.String nextToken)</pre>
<div class="block">The token to use when requesting the next set of items. If there are
no additional items to return, the string is empty.
<p>
Returns a reference to this object so that method calls can be chained together.
<p>
<b>Constraints:</b><br/>
<b>Pattern: </b>[\u0020-\uD7FF\uE000-\uFFFD\uD800\uDC00-\uDBFF\uDFFF\r\n\t]*<br/></div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>nextToken</code> - The token to use when requesting the next set of items. If there are
no additional items to return, the string is empty.</dd>
<dt><span class="strong">Returns:</span></dt><dd>A reference to this updated object so that method calls can be chained
together.</dd></dl>
</li>
</ul>
<a name="toString()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>toString</h4>
<pre>public java.lang.String toString()</pre>
<div class="block">Returns a string representation of this object; useful for testing and
debugging.</div>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>toString</code> in class <code>java.lang.Object</code></dd>
<dt><span class="strong">Returns:</span></dt><dd>A string representation of this object.</dd><dt><span class="strong">See Also:</span></dt><dd><code>Object.toString()</code></dd></dl>
</li>
</ul>
<a name="hashCode()">
</a>
<ul class="blockList">
<li class="blockList">
<h4>hashCode</h4>
<pre>public int hashCode()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>hashCode</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="equals(java.lang.Object)">
</a>
<ul class="blockList">
<li class="blockList">
<h4>equals</h4>
<pre>public boolean equals(java.lang.Object obj)</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>equals</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
<a name="clone()">
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>clone</h4>
<pre>public <a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><API key></a> clone()</pre>
<dl>
<dt><strong>Overrides:</strong></dt>
<dd><code>clone</code> in class <code>java.lang.Object</code></dd>
</dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<div class="bottomNav"><a name="navbar_bottom">
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="<API key>">
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage"><em>
<div>
<!-- Script for Syntax Highlighter START -->
<script type="text/javascript">
SyntaxHighlighter.all()
</script>
<!-- Script for Syntax Highlighter END -->
</div>
<script src="http://a0.awsstatic.com/chrome/js/1.0.46/jquery.1.9.js" type="text/javascript"></script>
<script>jQuery.noConflict();</script>
<script>
jQuery(function ($) {
$("div.header").prepend('<!--<API key>-->');
});
</script>
<!-- <API key> -->
<script src="http://l0.awsstatic.com/js/urchin.js" type="text/javascript"></script>
<script type="text/javascript">urchinTracker();</script>
<!-- END-URCHIN-TRACKER -->
<!
More info available at http:
<script language="JavaScript" type="text/javascript" src="https:
<script language="JavaScript" type="text/javascript">
<!
// Documentation Service Name
s.prop66='AWS SDK for Java';
s.eVar66='D=c66';
// Documentation Guide Name
s.prop65='API Reference';
s.eVar65='D=c65';
var s_code=s.t();if(s_code)document.write(s_code)
</script>
<script language="JavaScript" type="text/javascript">
<!--if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'\!-'+'-')
</script>
<noscript>
<img src="http://amazonwebservices.d2.sc.omtrdc.net/b/ss/awsamazondev/1/H.25.2--NS/0" height="1" width="1" border="0" alt="" />
</noscript>
<!--/DO NOT REMOVE/-->
</em></div>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../com/amazonaws/services/autoscaling/model/<API key>.html" title="class in com.amazonaws.services.autoscaling.model"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../../com/amazonaws/services/autoscaling/model/DescribeTagsRequest.html" title="class in com.amazonaws.services.autoscaling.model"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../index.html?com/amazonaws/services/autoscaling/model/<API key>.html" target="_top">Frames</a></li>
<li><a href="<API key>.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="<API key>">
<li><a href="../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!
allClassesLink = document.getElementById("<API key>");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li><a href="#constructor_summary">Constr</a> | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li><a href="#constructor_detail">Constr</a> | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
</a></div>
<p class="legalCopy"><small>
Copyright &
</small></p>
</body>
</html>
|
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import pytest
import allure_commons
from allure_pytest.utils import ALLURE_LABEL_PREFIX, ALLURE_LINK_PREFIX
class AllureTestHelper(object):
def __init__(self, config):
self.config = config
@allure_commons.hookimpl
def decorate_as_label(self, label_type, labels):
allure_label_marker = '{prefix}.{label_type}'.format(prefix=ALLURE_LABEL_PREFIX, label_type=label_type)
allure_label = getattr(pytest.mark, allure_label_marker)
return allure_label(*labels, label_type=label_type)
@allure_commons.hookimpl
def decorate_as_link(self, url, link_type, name):
allure_link_marker = '{prefix}.{link_type}'.format(prefix=ALLURE_LINK_PREFIX, link_type=link_type)
pattern = dict(self.config.option.allure_link_pattern).get(link_type, u'{}')
url = pattern.format(url)
allure_link = getattr(pytest.mark, allure_link_marker)
return allure_link(url, name=name, link_type=link_type)
|
title: Span
page_title: Span | UI for WinForms Documentation
description: Span
slug: winforms/richtextbox-(obsolete)/features/document-elements/span
tags: span
published: True
position: 4
previous_url: <API key>
# Span
The __Span__ class represents an inline object that allows you to display formatted text. The __Spans__ can only be used in the context of a __Paragraph__ class. As the spans are inline elements they get placed one after another and the text inside them gets wrapped to the next line if the space is insufficient.
This topic demonstrates how to:
* [Use Spans](#use-spans)
* [Add Text to a Span](#add-text-to-a-span)
* [Customize a Span](#customize-a-span)
## Use Spans
The __Spans__can be used only in the context of the [Paragraph]({%slug winforms/richtextbox-(obsolete)/features/document-elements/paragraph%}) element. The __Paragraph__ exposes a collection of Inlines, to which the spans can be added.
{{source=..\SamplesCS\RichTextBox\Features\Document Elements\RichTextBoxSpan.cs region=UseSpans}}
{{source=..\SamplesVB\RichTextBox\Features\Document Elements\RichTextBoxSpan.vb region=UseSpans}}
`C
Section section = new Section();
Paragraph paragraph = new Paragraph();
Span span = new Span("Span declared in code-behind");
paragraph.Inlines.Add(span);
section.Blocks.Add(paragraph);
this.radRichTextBox1.Document.Sections.Add(section);
`
`VB.NET
Dim section As New Section()
Dim paragraph As New Paragraph()
Dim span As New Span("Span declared in code-behind")
paragraph.Inlines.Add(span)
section.Blocks.Add(paragraph)
Me.RadRichTextBox1.Document.Sections.Add(section)
`
{{endregion}}
## Add Text to a Span
To specify the text in the __Span__ you can use its __Text__ property.
{{source=..\SamplesCS\RichTextBox\Features\Document Elements\RichTextBoxSpan.cs region=AddTextToSpan}}
{{source=..\SamplesVB\RichTextBox\Features\Document Elements\RichTextBoxSpan.vb region=AddTextToSpan}}
`C
Span mySpan = new Span();
mySpan.Text = "Thank you for choosing Telerik RadRichTextBox!";
`
`VB.NET
Dim mySpan As New Span()
mySpan.Text = "Thank you for choosing Telerik RadRichTextBox!"
`
{{endregion}}
>caution The Text property of Span cannot be set to an empty string, as Spans that do not contain any text are considered invalid. If you add an empty Span in the document programmatically, an exception will be thrown.
>
## Customize a Span
The __Span__ exposes several properties that allow you to customize the layout of the elements placed underneath it. Here is a list of them:
* <API key> - indicates whether the text is __Baseline__, __Subscript__ or __Superscript__.
* __FontFamily__ - represents the name of the text's font.
* __FontSize__ - represent the size of the text.
* __FontStyle__ - indicates whether the text should have its style set to bold, italic or to normal.
* __ForeColor__ - represents the foreground color for the text.
* __HighlightColor__ - represents the background color for the text.
* __Strikethrough__ - indicates whether the text should be stroke through.
* __UnderlineType__ - indicates whether the text should be underlined.
|
# AUTOGENERATED FILE
FROM balenalib/jetson-tx1-fedora:34-run
ENV GO_VERSION 1.16.3
# gcc for cgo
RUN dnf install -y \
gcc-c++ \
gcc \
git \
&& dnf clean all
RUN mkdir -p /usr/local/go \
&& curl -SLO "https://storage.googleapis.com/golang/go$GO_VERSION.linux-arm64.tar.gz" \
&& echo "<SHA256-like> go$GO_VERSION.linux-arm64.tar.gz" | sha256sum -c - \
&& tar -xzf "go$GO_VERSION.linux-arm64.tar.gz" -C /usr/local/go --strip-components=1 \
&& rm -f go$GO_VERSION.linux-arm64.tar.gz
ENV GOROOT /usr/local/go
ENV GOPATH /go
ENV PATH $GOPATH/bin:/usr/local/go/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
WORKDIR $GOPATH
CMD ["echo","'No CMD command was set in Dockerfile! Details about CMD command could be found in Dockerfile Guide section in our Docs. Here's the link: https://balena.io/docs"]
RUN curl -SLO "https://raw.githubusercontent.com/balena-io-library/base-images/<SHA1-like>/scripts/assets/tests/test-stack@golang.sh" \
&& echo "Running test-stack@golang" \
&& chmod +x test-stack@golang.sh \
&& bash test-stack@golang.sh \
&& rm -rf test-stack@golang.sh
RUN [ ! -d /.balena/messages ] && mkdir -p /.balena/messages; echo $'Here are a few details about this Docker image (For more information please visit https:
RUN echo $'#!/bin/sh.real\nbalena-info\nrm -f /bin/sh\ncp /bin/sh.real /bin/sh\n/bin/sh "$@"' > /bin/sh-shim \
&& chmod +x /bin/sh-shim \
&& cp /bin/sh /bin/sh.real \
&& mv /bin/sh-shim /bin/sh
|
# Using git with proxy
Git-sync supports using a proxy through git-configuration.
## Background
See [issue 180](https://github.com/kubernetes/git-sync/issues/180) for a background.
See [Github documentation](https://docs.github.com/en/github/<API key>/<API key>) specifically for GitHub.
Lastly, [see similar issue for FluxCD](https://github.com/fluxcd/flux/pull/3152) for configuration.
## Step 1: Create configuration
Create a ConfigMap to store your configuration:
bash
cat << EOF >> /tmp/ssh-config
Host github.com
ProxyCommand socat STDIO PROXY:<proxyIP>:%h:%p,proxyport=<proxyport>,proxyauth=<proxyAuth>
User git
Hostname ssh.github.com
Port 443
IdentityFile /etc/git-secret/ssh
EOF
kubectl create configmap ssh-config --from-file=ssh-config=/tmp/ssh-config
then mount this under `~/.ssh/config`, typically `/tmp/.ssh/config`:
yaml
apiVersion: v1
kind: Pod
spec:
containers:
- name: git-sync
volumeMounts:
- name: ssh-config
mountPath: /tmp/.ssh/config
readOnly: true
subPath: ssh-config
volumes:
- name: ssh-config
configMap:
name: ssh-config
|
<!DOCTYPE HTML PUBLIC "-
<!--NewPage
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_11) on Mon Oct 19 11:00:57 CEST 2009 -->
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<TITLE>
Uses of Class org.apache.mina.statemachine.annotation.<API key> (Apache MINA 2.0.0-RC1 API Documentation)
</TITLE>
<META NAME="date" CONTENT="2009-10-19">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Class org.apache.mina.statemachine.annotation.<API key> (Apache MINA 2.0.0-RC1 API Documentation)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<A NAME="navbar_top"></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../org/apache/mina/statemachine/annotation/<API key>.html" title="annotation in org.apache.mina.statemachine.annotation"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/mina/statemachine/annotation//<API key>.html" target="_top"><B>FRAMES</B></A>
<A HREF="<API key>.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<HR>
<CENTER>
<H2>
<B>Uses of Class<br>org.apache.mina.statemachine.annotation.<API key></B></H2>
</CENTER>
No usage of org.apache.mina.statemachine.annotation.<API key>
<P>
<HR>
<A NAME="navbar_bottom"></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="<API key>"></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../org/apache/mina/statemachine/annotation/<API key>.html" title="annotation in org.apache.mina.statemachine.annotation"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
PREV
NEXT</FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../../../../index.html?org/apache/mina/statemachine/annotation//<API key>.html" target="_top"><B>FRAMES</B></A>
<A HREF="<API key>.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!
if(window==top) {
document.writeln('<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<HR>
Copyright &
</BODY>
</HTML>
|
# farmwork/forms.py
from django import forms
from django.utils.text import slugify
from .models import Farmwork
# FARMWORK FORM
class FarmworkForm(forms.ModelForm):
def __init__(self, *args, **kwargs):
super(FarmworkForm, self).__init__(*args, **kwargs)
class Meta:
model = Farmwork
fields = [
'job_role',
'job_fruit',
'job_pay',
'job_pay_type',
'job_start_date',
'job_duration',
'job_duration_type',
'job_description',
'con_first_name',
'con_surname',
'con_number',
'con_email',
'con_description',
'acc_variety',
'acc_price',
'acc_price_type',
'acc_description',
'loc_street_address',
'loc_city',
'loc_state',
'loc_post_code',
]
# AUTO GENERATE SLUG ON SAVE
def save(self):
if self.instance.pk:
return super(FarmworkForm, self).save()
instance = super(FarmworkForm, self).save(commit=False)
instance.slug = slugify(instance.<API key>() + '-' + instance.<API key>() + '-in-' + instance.loc_city)
instance.save()
return instance
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.