text
stringlengths
2
1.04M
meta
dict
module.exports = function centreColourCollator(data) { const dataPerPixel = 4; const length = data.data.length; const i = Math.floor(length / dataPerPixel / 2) * dataPerPixel; return { r: data.data[i], g: data.data[i + 1], b: data.data[i + 2] }; };
{ "content_hash": "8cdb985d7bdccd7cf16df2ef3529083c", "timestamp": "", "source": "github", "line_count": 10, "max_line_length": 65, "avg_line_length": 27.1, "alnum_prop": 0.6346863468634686, "repo_name": "van-appears/umco", "id": "60d44c1183e264a7100449e6b211e7037d80e7b6", "size": "271", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/js/collators/centre-colour.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "4086" }, { "name": "HTML", "bytes": "3161" }, { "name": "JavaScript", "bytes": "12493" } ], "symlink_target": "" }
""" Tests for the Root Controller """ import pytest import bottle from controller import root def test_static_routing(): # Ensure that you can retrieve the JS and resources. (Wrap this in a # pytest.warns so that it allows for ResourceWarnings becuase of opening, # but not closing the resource files.) with pytest.warns(ResourceWarning): root.static('js', 'require.js') root.static('resources', 'css/app.css') # Ensure that Bottle raises an exception on files not in the js or # resources directories. with pytest.raises(bottle.HTTPError) as e_info: root.static('helpers', 'util.py') assert e_info.value.status == '404 Not Found' # Assert that when it can't find the file, the status code is 404. assert root.static('js', 'not-here.js').status == '404 Not Found'
{ "content_hash": "cf951e44c1a8e73409d135c5562dca7a", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 77, "avg_line_length": 33.32, "alnum_prop": 0.6866746698679472, "repo_name": "sumnerevans/wireless-debugging", "id": "ea9146a14522658bd566034a01662efb4dedac67", "size": "833", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "server/tests/root_controller_tests.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "40192" }, { "name": "HTML", "bytes": "9412" }, { "name": "Java", "bytes": "40850" }, { "name": "JavaScript", "bytes": "23092" }, { "name": "Python", "bytes": "112724" }, { "name": "Ruby", "bytes": "1241" }, { "name": "Swift", "bytes": "120570" } ], "symlink_target": "" }
///////////////////////// NumpyImportArray.init //////////////////// // comment below is deliberately kept in the generated C file to // help users debug where this came from: /* * Cython has automatically inserted a call to _import_array since * you didn't include one when you cimported numpy. To disable this * add the line * <void>numpy._import_array */ #ifdef NPY_FEATURE_VERSION /* This is a public define that makes us reasonably confident it's "real" Numpy */ // NO_IMPORT_ARRAY is Numpy's mechanism for indicating that import_array is handled elsewhere #if !NO_IMPORT_ARRAY /* https://docs.scipy.org/doc/numpy-1.17.0/reference/c-api.array.html#c.NO_IMPORT_ARRAY */ if (unlikely(_import_array() == -1)) { PyErr_SetString(PyExc_ImportError, "numpy.core.multiarray failed to import " "(auto-generated because you didn't call 'numpy.import_array()' after cimporting numpy; " "use '<void>numpy._import_array' to disable if you are certain you don't need it)."); } #endif #endif
{ "content_hash": "2d4d618ecb756c3fd9f05fa53b44671e", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 112, "avg_line_length": 50.15, "alnum_prop": 0.6969092721834497, "repo_name": "da-woods/cython", "id": "0399b9972b8da9934273ef9fd00b3f09707ae8c4", "size": "1003", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "Cython/Utility/NumpyImportArray.c", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "1429" }, { "name": "C", "bytes": "784502" }, { "name": "C++", "bytes": "31117" }, { "name": "Cython", "bytes": "3339772" }, { "name": "Emacs Lisp", "bytes": "12379" }, { "name": "Makefile", "bytes": "3184" }, { "name": "PowerShell", "bytes": "4022" }, { "name": "Python", "bytes": "3905495" }, { "name": "Shell", "bytes": "6235" }, { "name": "Smalltalk", "bytes": "618" }, { "name": "Starlark", "bytes": "3341" }, { "name": "sed", "bytes": "807" } ], "symlink_target": "" }
package org.locationtech.geowave.datastore.rocksdb.operations; import java.io.Closeable; import java.io.IOException; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; import java.util.Comparator; import java.util.Iterator; import java.util.List; import java.util.function.Predicate; import java.util.stream.Collectors; import org.apache.commons.lang3.tuple.Pair; import org.locationtech.geowave.core.index.ByteArray; import org.locationtech.geowave.core.index.ByteArrayRange; import org.locationtech.geowave.core.index.SinglePartitionQueryRanges; import org.locationtech.geowave.core.store.CloseableIterator; import org.locationtech.geowave.core.store.CloseableIteratorWrapper; import org.locationtech.geowave.core.store.entities.GeoWaveRow; import org.locationtech.geowave.core.store.entities.GeoWaveRowIteratorTransformer; import org.locationtech.geowave.core.store.entities.GeoWaveRowMergingIterator; import org.locationtech.geowave.datastore.rocksdb.util.RocksDBClient; import org.locationtech.geowave.datastore.rocksdb.util.RocksDBIndexTable; import org.locationtech.geowave.datastore.rocksdb.util.RocksDBUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.github.benmanes.caffeine.cache.Caffeine; import com.github.benmanes.caffeine.cache.LoadingCache; import com.google.common.collect.Iterators; import com.google.common.collect.Streams; import com.google.common.primitives.UnsignedBytes; public class RocksDBQueryExecution<T> { private static final Logger LOGGER = LoggerFactory.getLogger(RocksDBQueryExecution.class); private static class RangeReadInfo { byte[] partitionKey; ByteArrayRange sortKeyRange; public RangeReadInfo(final byte[] partitionKey, final ByteArrayRange sortKeyRange) { this.partitionKey = partitionKey; this.sortKeyRange = sortKeyRange; } } private static class ScoreOrderComparator implements Comparator<RangeReadInfo>, Serializable { private static final long serialVersionUID = 1L; private static final ScoreOrderComparator SINGLETON = new ScoreOrderComparator(); @Override public int compare(final RangeReadInfo o1, final RangeReadInfo o2) { int comp = UnsignedBytes.lexicographicalComparator().compare( o1.sortKeyRange.getStart(), o2.sortKeyRange.getStart()); if (comp != 0) { return comp; } comp = UnsignedBytes.lexicographicalComparator().compare( o1.sortKeyRange.getEnd(), o2.sortKeyRange.getEnd()); if (comp != 0) { return comp; } final byte[] otherComp = o2.partitionKey == null ? new byte[0] : o2.partitionKey; final byte[] thisComp = o1.partitionKey == null ? new byte[0] : o1.partitionKey; return UnsignedBytes.lexicographicalComparator().compare(thisComp, otherComp); } } private static ByteArray EMPTY_PARTITION_KEY = new ByteArray(); private final LoadingCache<ByteArray, RocksDBIndexTable> setCache = Caffeine.newBuilder().build(partitionKey -> getTable(partitionKey.getBytes())); private final Collection<SinglePartitionQueryRanges> ranges; private final short adapterId; private final String indexNamePrefix; private final RocksDBClient client; private final GeoWaveRowIteratorTransformer<T> rowTransformer; private final Predicate<GeoWaveRow> filter; private final boolean rowMerging; private final Pair<Boolean, Boolean> groupByRowAndSortByTimePair; private final boolean isSortFinalResultsBySortKey; protected RocksDBQueryExecution( final RocksDBClient client, final String indexNamePrefix, final short adapterId, final GeoWaveRowIteratorTransformer<T> rowTransformer, final Collection<SinglePartitionQueryRanges> ranges, final Predicate<GeoWaveRow> filter, final boolean rowMerging, final boolean async, final Pair<Boolean, Boolean> groupByRowAndSortByTimePair, final boolean isSortFinalResultsBySortKey) { this.client = client; this.indexNamePrefix = indexNamePrefix; this.adapterId = adapterId; this.rowTransformer = rowTransformer; this.ranges = ranges; this.filter = filter; this.rowMerging = rowMerging; this.groupByRowAndSortByTimePair = groupByRowAndSortByTimePair; this.isSortFinalResultsBySortKey = isSortFinalResultsBySortKey; } private RocksDBIndexTable getTable(final byte[] partitionKey) { return RocksDBUtils.getIndexTableFromPrefix( client, indexNamePrefix, adapterId, partitionKey, groupByRowAndSortByTimePair.getRight()); } public CloseableIterator<T> results() { final List<RangeReadInfo> reads = new ArrayList<>(); for (final SinglePartitionQueryRanges r : ranges) { for (final ByteArrayRange range : r.getSortKeyRanges()) { reads.add(new RangeReadInfo(r.getPartitionKey(), range)); } } return executeQuery(reads); } public CloseableIterator<T> executeQuery(final List<RangeReadInfo> reads) { if (isSortFinalResultsBySortKey) { // order the reads by sort keys reads.sort(ScoreOrderComparator.SINGLETON); } final List<CloseableIterator<GeoWaveRow>> iterators = reads.stream().map(r -> { ByteArray partitionKey; if ((r.partitionKey == null) || (r.partitionKey.length == 0)) { partitionKey = EMPTY_PARTITION_KEY; } else { partitionKey = new ByteArray(r.partitionKey); } return setCache.get(partitionKey).iterator(r.sortKeyRange); }).collect(Collectors.toList()); return transformAndFilter(new CloseableIteratorWrapper<>(new Closeable() { @Override public void close() throws IOException { iterators.forEach(i -> i.close()); } }, Iterators.concat(iterators.iterator()))); } private CloseableIterator<T> transformAndFilter(final CloseableIterator<GeoWaveRow> result) { final Iterator<GeoWaveRow> iterator = Streams.stream(result).filter(filter).iterator(); return new CloseableIteratorWrapper<>( result, rowTransformer.apply( sortByKeyIfRequired( isSortFinalResultsBySortKey, rowMerging ? new GeoWaveRowMergingIterator(iterator) : iterator))); } private static Iterator<GeoWaveRow> sortByKeyIfRequired( final boolean isRequired, final Iterator<GeoWaveRow> it) { if (isRequired) { return RocksDBUtils.sortBySortKey(it); } return it; } }
{ "content_hash": "2a2346218048730c67286e4bfb2aca21", "timestamp": "", "source": "github", "line_count": 169, "max_line_length": 96, "avg_line_length": 38.55621301775148, "alnum_prop": 0.7386433394720687, "repo_name": "spohnan/geowave", "id": "530286c30af6920ae1276712c9e4fbb366947c52", "size": "6951", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "extensions/datastores/rocksdb/src/main/java/org/locationtech/geowave/datastore/rocksdb/operations/RocksDBQueryExecution.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Dockerfile", "bytes": "3148" }, { "name": "FreeMarker", "bytes": "2879" }, { "name": "Gnuplot", "bytes": "57750" }, { "name": "Groovy", "bytes": "8034" }, { "name": "Java", "bytes": "9654261" }, { "name": "Jupyter Notebook", "bytes": "23088" }, { "name": "Puppet", "bytes": "8850" }, { "name": "Python", "bytes": "230406" }, { "name": "Scheme", "bytes": "20491" }, { "name": "Shell", "bytes": "97476" } ], "symlink_target": "" }
package cn.rongcloud.im.server.response; /** * Created by AMing on 16/1/13. * Company RongCloud */ public class SetPortraitResponse { /** * code : 200 */ private int code; public void setCode(int code) { this.code = code; } public int getCode() { return code; } }
{ "content_hash": "bbda8a39a373123b3eaedd3e7c01cd6f", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 40, "avg_line_length": 14.636363636363637, "alnum_prop": 0.5714285714285714, "repo_name": "13120241790/RongCloudJcenter", "id": "b43125ede8ca0412560aade77badfadef274fbb9", "size": "322", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "seal/src/main/java/cn/rongcloud/im/server/response/SetPortraitResponse.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "1448451" } ], "symlink_target": "" }
exports.BattleFormatsData = { bulbasaur: { viableMoves: {"sleeppowder":1,"gigadrain":1,"growth":1,"hiddenpowerfire":1,"hiddenpowerice":1,"sludgebomb":1,"swordsdance":1,"powerwhip":1,"leechseed":1,"synthesis":1}, eventPokemon: [ {"generation":3,"level":70,"moves":["sweetscent","growth","solarbeam","synthesis"]}, {"generation":3,"level":10,"gender":"M","moves":["tackle","growl","leechseed","vinewhip"]} ], tier: "LC" }, ivysaur: { viableMoves: {"sleeppowder":1,"gigadrain":1,"growth":1,"hiddenpowerfire":1,"hiddenpowerice":1,"sludgebomb":1,"swordsdance":1,"powerwhip":1,"leechseed":1,"synthesis":1}, tier: "NFE" }, venusaur: { viableMoves: {"sleeppowder":1,"gigadrain":1,"growth":1,"hiddenpowerfire":1,"hiddenpowerice":1,"sludgebomb":1,"swordsdance":1,"powerwhip":1,"leechseed":1,"synthesis":1,"earthquake":1}, tier: "UU" }, charmander: { viableMoves: {"flamethrower":1,"overheat":1,"dragonpulse":1,"hiddenpowergrass":1,"fireblast":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","moves":["scratch","growl","ember"]}, {"generation":4,"level":40,"gender":"M","nature":"Mild","moves":["return","hiddenpower","quickattack","howl"]}, {"generation":4,"level":40,"gender":"M","nature":"Naive","moves":["return","hiddenpower","quickattack","howl"]}, {"generation":4,"level":40,"gender":"M","nature":"Naughty","moves":["return","hiddenpower","quickattack","howl"]}, {"generation":4,"level":40,"gender":"M","nature":"Hardy","moves":["return","hiddenpower","quickattack","howl"]} ], tier: "LC" }, charmeleon: { viableMoves: {"flamethrower":1,"overheat":1,"dragonpulse":1,"hiddenpowergrass":1,"fireblast":1}, tier: "NFE" }, charizard: { viableMoves: {"flamethrower":1,"fireblast":1,"substitute":1,"airslash":1,"dragonpulse":1,"hiddenpowergrass":1,"roost":1}, eventPokemon: [ {"generation":3,"level":70,"moves":["wingattack","slash","dragonrage","firespin"]} ], tier: "NU" }, squirtle: { viableMoves: {"surf":1,"icebeam":1,"hydropump":1,"rapidspin":1,"scald":1,"aquajet":1,"toxic":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","moves":["tackle","tailwhip","bubble","withdraw"]} ], tier: "LC" }, wartortle: { viableMoves: {"surf":1,"icebeam":1,"hydropump":1,"rapidspin":1,"scald":1,"aquajet":1,"toxic":1}, tier: "NFE" }, blastoise: { viableMoves: {"surf":1,"icebeam":1,"hydropump":1,"rapidspin":1,"scald":1,"aquajet":1,"toxic":1,"dragontail":1}, eventPokemon: [ {"generation":3,"level":70,"moves":["protect","raindance","skullbash","hydropump"]} ], tier: "UU" }, caterpie: { viableMoves: {"bugbite":1,"snore":1,"tackle":1,"electroweb":1}, tier: "LC" }, metapod: { viableMoves: {"irondefense":1,"bugbite":1,"tackle":1,"electroweb":1}, tier: "NFE" }, butterfree: { viableMoves: {"quiverdance":1,"roost":1,"bugbuzz":1,"airslash":1,"substitute":1,"sleeppowder":1,"gigadrain":1,"stunspore":1,"uturn":1}, eventPokemon: [ {"generation":3,"level":30,"moves":["morningsun","psychic","sleeppowder","aerialace"]} ], tier: "NU" }, weedle: { viableMoves: {"bugbite":1,"stringshot":1,"poisonsting":1,"electroweb":1}, tier: "LC" }, kakuna: { viableMoves: {"electroweb":1,"bugbite":1,"irondefense":1,"poisonsting":1}, tier: "NFE" }, beedrill: { viableMoves: {"toxicspikes":1,"xscissor":1,"swordsdance":1,"uturn":1,"endeavor":1,"poisonjab":1,"drillrun":1,"nightslash":1,"brickbreak":1}, eventPokemon: [ {"generation":3,"level":30,"moves":["batonpass","sludgebomb","twineedle","swordsdance"]} ], tier: "NU" }, pidgey: { viableMoves: {"roost":1,"bravebird":1,"heatwave":1,"hurricane":1,"return":1,"workup":1,"uturn":1}, tier: "LC" }, pidgeotto: { viableMoves: {"roost":1,"bravebird":1,"heatwave":1,"hurricane":1,"return":1,"workup":1,"uturn":1}, eventPokemon: [ {"generation":3,"level":30,"moves":["refresh","wingattack","steelwing","featherdance"]} ], tier: "NFE" }, pidgeot: { viableMoves: {"roost":1,"bravebird":1,"pursuit":1,"heatwave":1,"return":1,"workup":1,"uturn":1}, tier: "NU" }, rattata: { viableMoves: {"facade":1,"flamewheel":1,"wildcharge":1,"suckerpunch":1,"uturn":1}, tier: "LC" }, raticate: { viableMoves: {"facade":1,"flamewheel":1,"wildcharge":1,"suckerpunch":1,"uturn":1}, eventPokemon: [ {"generation":3,"level":34,"moves":["refresh","superfang","scaryface","hyperfang"]} ], tier: "NU" }, spearow: { viableMoves: {"return":1,"drillpeck":1,"doubleedge":1,"uturn":1,"quickattack":1,"pursuit":1}, eventPokemon: [ {"generation":3,"level":22,"moves":["batonpass","falseswipe","leer","aerialace"]} ], tier: "LC" }, fearow: { viableMoves: {"return":1,"drillpeck":1,"doubleedge":1,"uturn":1,"quickattack":1,"pursuit":1,"drillrun":1,"roost":1}, tier: "NU" }, ekans: { viableMoves: {"coil":1,"gunkshot":1,"seedbomb":1,"glare":1,"suckerpunch":1,"aquatail":1,"crunch":1,"earthquake":1,"rest":1}, eventPokemon: [ {"generation":3,"level":14,"abilities":["shedskin"],"moves":["leer","wrap","poisonsting","bite"]}, {"generation":3,"level":10,"gender":"M","moves":["wrap","leer","poisonsting"]} ], tier: "LC" }, arbok: { viableMoves: {"coil":1,"gunkshot":1,"seedbomb":1,"glare":1,"suckerpunch":1,"aquatail":1,"crunch":1,"earthquake":1,"rest":1}, eventPokemon: [ {"generation":3,"level":33,"abilities":["intimidate","shedskin"],"moves":["refresh","sludgebomb","glare","bite"]} ], tier: "NU" }, pichu: { viableMoves: {"fakeout":1,"volttackle":1,"encore":1,"irontail":1,"toxic":1,"thunderpunch":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["static"],"moves":["thundershock","charm","surf"]}, {"generation":3,"level":5,"abilities":["static"],"moves":["thundershock","charm","wish"]}, {"generation":3,"level":5,"abilities":["static"],"moves":["thundershock","charm","teeterdance"]}, {"generation":3,"level":5,"abilities":["static"],"moves":["thundershock","charm","followme"]}, {"generation":4,"level":1,"abilities":["static"],"moves":["volttackle","thunderbolt","grassknot","return"]}, {"generation":4,"level":30,"shiny":true,"gender":"M","nature":"Jolly","abilities":["static"],"moves":["charge","volttackle","endeavor","endure"]}, {"generation":4,"level":30,"shiny":true,"gender":"M","nature":"Jolly","abilities":["static"],"moves":["volttackle","charge","endeavor","endure"]} ], tier: "LC" }, pichuspikyeared: { eventPokemon: [ {"generation":3,"level":5,"abilities":["static"],"moves":["thundershock","charm","surf"]}, {"generation":3,"level":5,"abilities":["static"],"moves":["thundershock","charm","wish"]}, {"generation":3,"level":5,"abilities":["static"],"moves":["thundershock","charm","teeterdance"]}, {"generation":3,"level":5,"abilities":["static"],"moves":["thundershock","charm","followme"]}, {"generation":4,"level":1,"abilities":["static"],"moves":["volttackle","thunderbolt","grassknot","return"]}, {"generation":4,"level":30,"gender":"M","nature":"Jolly","abilities":["static"],"moves":["charge","volttackle","endeavor","endure"]}, {"generation":4,"level":30,"gender":"M","nature":"Jolly","abilities":["static"],"moves":["volttackle","charge","endeavor","endure"]} ], tier: "NU" }, pikachu: { viableMoves: {"thunderbolt":1,"volttackle":1,"grassknot":1,"hiddenpowerice":1,"brickbreak":1,"extremespeed":1,"encore":1,"substitute":1}, eventPokemon: [ {"generation":3,"level":50,"abilities":["static"],"moves":["thunderbolt","agility","thunder","lightscreen"]}, {"generation":3,"level":10,"abilities":["static"],"moves":["thundershock","growl","tailwhip","thunderwave"]}, {"generation":3,"level":10,"abilities":["static"],"moves":["fly","tailwhip","growl","thunderwave"]}, {"generation":3,"level":5,"abilities":["static"],"moves":["surf","growl","tailwhip","thunderwave"]}, {"generation":3,"level":10,"abilities":["static"],"moves":["fly","growl","tailwhip","thunderwave"]}, {"generation":3,"level":10,"abilities":["static"],"moves":["thundershock","growl","thunderwave","surf"]}, {"generation":3,"level":70,"abilities":["static"],"moves":["thunderbolt","thunder","lightscreen","fly"]}, {"generation":3,"level":70,"abilities":["static"],"moves":["thunderbolt","thunder","lightscreen","surf"]}, {"generation":3,"level":70,"abilities":["static"],"moves":["thunderbolt","thunder","lightscreen","agility"]}, {"generation":4,"level":10,"gender":"F","nature":"Hardy","abilities":["static"],"moves":["surf","volttackle","tailwhip","thunderwave"]}, {"generation":3,"level":10,"gender":"M","abilities":["static"],"moves":["thundershock","growl","tailwhip","thunderwave"]}, {"generation":4,"level":50,"gender":"M","nature":"Hardy","abilities":["static"],"moves":["surf","thunderbolt","lightscreen","quickattack"]}, {"generation":4,"level":20,"gender":"F","nature":"Bashful","abilities":["static"],"moves":["present","quickattack","thundershock","tailwhip"]}, {"generation":4,"level":20,"gender":"M","nature":"Jolly","abilities":["static"],"moves":["grassknot","thunderbolt","flash","doubleteam"]}, {"generation":4,"level":40,"gender":"M","nature":"Modest","abilities":["static"],"moves":["surf","thunder","protect"]}, {"generation":4,"level":20,"gender":"F","nature":"Bashful","abilities":["static"],"moves":["quickattack","thundershock","tailwhip","present"]}, {"generation":4,"level":40,"gender":"M","nature":"Mild","abilities":["static"],"moves":["surf","thunder","protect"]}, {"generation":4,"level":20,"gender":"F","nature":"Bashful","abilities":["static"],"moves":["present","quickattack","thunderwave","tailwhip"]}, {"generation":4,"level":30,"gender":"M","abilities":["static"],"moves":["lastresort","present","thunderbolt","quickattack"]}, {"generation":4,"level":50,"gender":"M","nature":"Relaxed","abilities":["static"],"moves":["rest","sleeptalk","yawn","snore"]}, {"generation":4,"level":20,"gender":"M","nature":"Docile","abilities":["static"],"moves":["present","quickattack","thundershock","tailwhip"]}, {"generation":4,"level":50,"gender":"M","nature":"Naughty","abilities":["static"],"moves":["volttackle","irontail","quickattack","thunderbolt"]}, {"generation":4,"level":20,"gender":"M","nature":"Bashful","abilities":["static"],"moves":["present","quickattack","thundershock","tailwhip"]} ], tier: "NU" }, raichu: { viableMoves: {"nastyplot":1,"encore":1,"thunderbolt":1,"grassknot":1,"hiddenpowerice":1,"focusblast":1,"substitute":1,"extremespeed":1}, tier: "NU" }, sandshrew: { viableMoves: {"earthquake":1,"stoneedge":1,"swordsdance":1,"rapidspin":1,"nightslash":1,"xscissor":1,"stealthrock":1,"toxic":1}, eventPokemon: [ {"generation":3,"level":12,"abilities":["sandveil"],"moves":["scratch","defensecurl","sandattack","vitalthrow"]} ], tier: "LC" }, sandslash: { viableMoves: {"earthquake":1,"stoneedge":1,"swordsdance":1,"rapidspin":1,"nightslash":1,"xscissor":1,"stealthrock":1,"toxic":1}, tier: "NU" }, nidoranf: { viableMoves: {"toxicspikes":1,"crunch":1,"poisonjab":1,"honeclaws":1,"doublekick":1}, tier: "LC" }, nidorina: { viableMoves: {"toxicspikes":1,"crunch":1,"poisonjab":1,"honeclaws":1,"doublekick":1,"icebeam":1}, tier: "NFE" }, nidoqueen: { viableMoves: {"toxicspikes":1,"stealthrock":1,"fireblast":1,"thunderbolt":1,"icebeam":1,"earthpower":1,"sludgewave":1,"dragontail":1,"focusblast":1}, tier: "NU" }, nidoranm: { viableMoves: {"suckerpunch":1,"poisonjab":1,"headsmash":1,"honeclaws":1}, tier: "LC" }, nidorino: { viableMoves: {"suckerpunch":1,"poisonjab":1,"headsmash":1,"honeclaws":1}, tier: "NFE" }, nidoking: { viableMoves: {"fireblast":1,"thunderbolt":1,"icebeam":1,"earthpower":1,"sludgewave":1,"focusblast":1}, tier: "UU" }, cleffa: { viableMoves: {"reflect":1,"thunderwave":1,"lightscreen":1,"toxic":1,"fireblast":1,"encore":1,"wish":1,"protect":1,"softboiled":1,"aromatherapy":1}, tier: "LC" }, clefairy: { viableMoves: {"healingwish":1,"reflect":1,"thunderwave":1,"lightscreen":1,"toxic":1,"fireblast":1,"encore":1,"wish":1,"protect":1,"softboiled":1,"aromatherapy":1,"stealthrock":1}, tier: "NFE" }, clefable: { viableMoves: {"fireblast":1,"thunderbolt":1,"icebeam":1,"seismictoss":1,"wish":1,"protect":1,"softboiled":1,"healingwish":1,"doubleedge":1,"facade":1,"meteormash":1,"aromatherapy":1,"bellydrum":1,"trick":1,"calmmind":1,"stealthrock":1,"grassknot":1,"cosmicpower":1,"storedpower":1}, tier: "UU" }, vulpix: { viableMoves: {"flamethrower":1,"fireblast":1,"willowisp":1,"solarbeam":1,"nastyplot":1,"substitute":1,"toxic":1,"hypnosis":1,"painsplit":1}, eventPokemon: [ {"generation":3,"level":18,"abilities":["flashfire"],"moves":["tailwhip","roar","quickattack","willowisp"]}, {"generation":3,"level":18,"abilities":["flashfire"],"moves":["charm","heatwave","ember","dig"]} ], tier: "LC" }, ninetales: { viableMoves: {"flamethrower":1,"fireblast":1,"willowisp":1,"solarbeam":1,"nastyplot":1,"substitute":1,"toxic":1,"hypnosis":1,"painsplit":1}, tier: "NU" }, igglybuff: { viableMoves: {"wish":1,"thunderwave":1,"reflect":1,"lightscreen":1,"healbell":1,"seismictoss":1,"counter":1,"protect":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["cutecharm"],"moves":["sing","charm","defensecurl","tickle"]} ], tier: "LC" }, jigglypuff: { viableMoves: {"wish":1,"thunderwave":1,"reflect":1,"lightscreen":1,"healbell":1,"seismictoss":1,"counter":1,"stealthrock":1,"protect":1}, tier: "NFE" }, wigglytuff: { viableMoves: {"wish":1,"thunderwave":1,"reflect":1,"lightscreen":1,"healbell":1,"seismictoss":1,"counter":1,"stealthrock":1,"protect":1}, tier: "NU" }, zubat: { viableMoves: {"bravebird":1,"roost":1,"toxic":1,"taunt":1,"nastyplot":1,"gigadrain":1,"sludgebomb":1,"airslash":1,"uturn":1,"whirlwind":1,"acrobatics":1,"heatwave":1,"superfang":1}, tier: "LC" }, golbat: { viableMoves: {"bravebird":1,"roost":1,"toxic":1,"taunt":1,"nastyplot":1,"gigadrain":1,"sludgebomb":1,"airslash":1,"uturn":1,"whirlwind":1,"acrobatics":1,"heatwave":1,"superfang":1}, tier: "NU" }, crobat: { viableMoves: {"bravebird":1,"roost":1,"toxic":1,"taunt":1,"nastyplot":1,"gigadrain":1,"sludgebomb":1,"airslash":1,"uturn":1,"whirlwind":1,"acrobatics":1,"heatwave":1,"superfang":1}, eventPokemon: [ {"generation":4,"level":30,"gender":"M","nature":"Timid","abilities":["innerfocus"],"moves":["heatwave","airslash","sludgebomb","superfang"]} ], tier: "BL" }, oddish: { viableMoves: {"gigadrain":1,"sludgebomb":1,"synthesis":1,"sleeppowder":1,"stunspore":1,"toxic":1,"hiddenpowerfire":1,"leechseed":1}, eventPokemon: [ {"generation":3,"level":26,"abilities":["chlorophyll"],"moves":["poisonpowder","stunspore","sleeppowder","acid"]}, {"generation":3,"level":5,"abilities":["chlorophyll"],"moves":["absorb","leechseed"]} ], tier: "LC" }, gloom: { viableMoves: {"gigadrain":1,"sludgebomb":1,"synthesis":1,"sleeppowder":1,"stunspore":1,"toxic":1,"hiddenpowerfire":1,"leechseed":1}, eventPokemon: [ {"generation":3,"level":50,"abilities":["chlorophyll"],"moves":["sleeppowder","acid","moonlight","petaldance"]} ], tier: "NFE" }, vileplume: { viableMoves: {"gigadrain":1,"sludgebomb":1,"synthesis":1,"sleeppowder":1,"stunspore":1,"toxic":1,"hiddenpowerfire":1,"leechseed":1,"aromatherapy":1}, tier: "NU" }, bellossom: { viableMoves: {"gigadrain":1,"sludgebomb":1,"synthesis":1,"sleeppowder":1,"stunspore":1,"toxic":1,"hiddenpowerfire":1,"leechseed":1,"aromatherapy":1,"leafstorm":1}, tier: "NU" }, paras: { viableMoves: {"spore":1,"stunspore":1,"xscissor":1,"seedbomb":1,"synthesis":1,"leechseed":1,"aromatherapy":1}, eventPokemon: [ {"generation":3,"level":28,"abilities":["effectspore"],"moves":["refresh","spore","slash","falseswipe"]} ], tier: "LC" }, parasect: { viableMoves: {"spore":1,"stunspore":1,"xscissor":1,"seedbomb":1,"synthesis":1,"leechseed":1,"aromatherapy":1}, tier: "NU" }, venonat: { viableMoves: {"sleeppowder":1,"morningsun":1,"toxicspikes":1,"sludgebomb":1,"signalbeam":1,"stunspore":1}, tier: "LC" }, venomoth: { viableMoves: {"sleeppowder":1,"roost":1,"toxicspikes":1,"quiverdance":1,"batonpass":1,"bugbuzz":1,"sludgebomb":1,"gigadrain":1,"substitute":1}, eventPokemon: [ {"generation":3,"level":32,"abilities":["shielddust"],"moves":["refresh","silverwind","substitute","psychic"]} ], tier: "NU" }, diglett: { viableMoves: {"earthquake":1,"rockslide":1,"stealthrock":1,"suckerpunch":1,"reversal":1,"substitute":1}, tier: "LC" }, dugtrio: { viableMoves: {"earthquake":1,"stoneedge":1,"stealthrock":1,"suckerpunch":1,"reversal":1,"substitute":1}, eventPokemon: [ {"generation":3,"level":40,"abilities":["sandveil","arenatrap"],"moves":["charm","earthquake","sandstorm","triattack"]} ], tier: "UU" }, meowth: { viableMoves: {"fakeout":1,"uturn":1,"bite":1,"taunt":1,"return":1,"hypnosis":1,"waterpulse":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["pickup","technician"],"moves":["scratch","growl","petaldance"]}, {"generation":3,"level":5,"abilities":["pickup","technician"],"moves":["scratch","growl"]}, {"generation":3,"level":10,"gender":"M","abilities":["pickup","technician"],"moves":["scratch","growl","bite"]}, {"generation":3,"level":22,"abilities":["pickup","technician"],"moves":["sing","slash","payday","bite"]}, {"generation":4,"level":21,"gender":"F","nature":"Jolly","abilities":["pickup"],"moves":["bite","fakeout","furyswipes","screech"]}, {"generation":4,"level":10,"gender":"M","nature":"Jolly","abilities":["pickup"],"moves":["fakeout","payday","assist","scratch"]} ], tier: "LC" }, persian: { viableMoves: {"fakeout":1,"uturn":1,"bite":1,"taunt":1,"return":1,"hypnosis":1,"waterpulse":1,"switcheroo":1}, tier: "NU" }, psyduck: { viableMoves: {"hydropump":1,"surf":1,"icebeam":1,"hiddenpowergrass":1,"crosschop":1,"encore":1}, eventPokemon: [ {"generation":3,"level":27,"abilities":["damp"],"moves":["tailwhip","confusion","disable"]}, {"generation":3,"level":5,"abilities":["damp","cloudnine"],"moves":["watersport","scratch","tailwhip","mudsport"]} ], tier: "LC" }, golduck: { viableMoves: {"hydropump":1,"surf":1,"icebeam":1,"hiddenpowergrass":1,"encore":1,"focusblast":1}, eventPokemon: [ {"generation":3,"level":33,"abilities":["damp","cloudnine"],"moves":["charm","waterfall","psychup","brickbreak"]} ], tier: "NU" }, mankey: { viableMoves: {"closecombat":1,"uturn":1,"icepunch":1,"rockslide":1,"punishment":1}, tier: "LC" }, primeape: { viableMoves: {"closecombat":1,"uturn":1,"icepunch":1,"stoneedge":1,"punishment":1,"encore":1}, eventPokemon: [ {"generation":3,"level":34,"abilities":["vitalspirit"],"moves":["helpinghand","crosschop","focusenergy","reversal"]} ], tier: "UU" }, growlithe: { viableMoves: {"flareblitz":1,"wildcharge":1,"hiddenpowergrass":1,"hiddenpowerice":1,"closecombat":1,"morningsun":1,"willowisp":1,"toxic":1}, eventPokemon: [ {"generation":3,"level":32,"abilities":["intimidate"],"moves":["leer","odorsleuth","takedown","flamewheel"]}, {"generation":3,"level":10,"gender":"M","abilities":["intimidate","flashfire"],"moves":["bite","roar","ember"]}, {"generation":3,"level":28,"abilities":["intimidate","flashfire"],"moves":["charm","flamethrower","bite","takedown"]} ], tier: "LC" }, arcanine: { viableMoves: {"flareblitz":1,"wildcharge":1,"hiddenpowergrass":1,"hiddenpowerice":1,"extremespeed":1,"closecombat":1,"morningsun":1,"willowisp":1,"toxic":1}, tier: "UU" }, poliwag: { viableMoves: {"hydropump":1,"icebeam":1,"encore":1,"bellydrum":1,"hypnosis":1,"waterfall":1,"return":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["waterabsorb","damp"],"moves":["bubble","sweetkiss"]} ], tier: "LC" }, poliwhirl: { viableMoves: {"hydropump":1,"icebeam":1,"encore":1,"bellydrum":1,"hypnosis":1,"waterfall":1,"return":1}, tier: "NFE" }, poliwrath: { viableMoves: {"substitute":1,"circlethrow":1,"focuspunch":1,"bulkup":1,"encore":1,"waterfall":1,"toxic":1,"rest":1,"sleeptalk":1,"icepunch":1}, eventPokemon: [ {"generation":3,"level":42,"abilities":["damp","waterabsorb"],"moves":["helpinghand","hydropump","raindance","brickbreak"]} ], tier: "NU" }, politoed: { viableMoves: {"scald":1,"hypnosis":1,"toxic":1,"encore":1,"perishsong":1,"protect":1,"icebeam":1,"focusblast":1,"surf":1,"hydropump":1,"hiddenpowergrass":1}, tier: "NU" }, abra: { viableMoves: {"calmmind":1,"psychic":1,"psyshock":1,"hiddenpowerfighting":1,"shadowball":1,"encore":1,"substitute":1}, tier: "LC" }, kadabra: { viableMoves: {"calmmind":1,"psychic":1,"psyshock":1,"hiddenpowerfighting":1,"shadowball":1,"encore":1,"substitute":1}, tier: "NFE" }, alakazam: { viableMoves: {"calmmind":1,"psychic":1,"psyshock":1,"focusblast":1,"shadowball":1,"encore":1,"substitute":1}, eventPokemon: [ {"generation":3,"level":70,"abilities":["synchronize","innerfocus"],"moves":["futuresight","calmmind","psychic","trick"]} ], tier: "UU" }, machop: { viableMoves: {"dynamicpunch":1,"payback":1,"bulkup":1,"icepunch":1,"rockslide":1,"bulletpunch":1}, tier: "LC" }, machoke: { viableMoves: {"dynamicpunch":1,"payback":1,"bulkup":1,"icepunch":1,"rockslide":1,"bulletpunch":1}, eventPokemon: [ {"generation":3,"level":38,"abilities":["guts"],"moves":["seismictoss","foresight","revenge","vitalthrow"]} ], tier: "NU" }, machamp: { viableMoves: {"dynamicpunch":1,"payback":1,"bulkup":1,"icepunch":1,"stoneedge":1,"bulletpunch":1}, tier: "OU" }, bellsprout: { viableMoves: {"swordsdance":1,"sleeppowder":1,"sunnyday":1,"growth":1,"solarbeam":1,"gigadrain":1,"sludgebomb":1,"weatherball":1,"suckerpunch":1,"seedbomb":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["chlorophyll"],"moves":["vinewhip","teeterdance"]}, {"generation":3,"level":10,"gender":"M","abilities":["chlorophyll"],"moves":["vinewhip","growth"]} ], tier: "LC" }, weepinbell: { viableMoves: {"swordsdance":1,"sleeppowder":1,"sunnyday":1,"growth":1,"solarbeam":1,"gigadrain":1,"sludgebomb":1,"weatherball":1,"suckerpunch":1,"seedbomb":1}, eventPokemon: [ {"generation":3,"level":32,"abilities":["chlorophyll"],"moves":["morningsun","magicalleaf","sludgebomb","sweetscent"]} ], tier: "NFE" }, victreebel: { viableMoves: {"swordsdance":1,"sleeppowder":1,"sunnyday":1,"growth":1,"solarbeam":1,"gigadrain":1,"sludgebomb":1,"weatherball":1,"suckerpunch":1,"powerwhip":1}, tier: "NU" }, tentacool: { viableMoves: {"toxicspikes":1,"rapidspin":1,"scald":1,"sludgebomb":1,"icebeam":1,"knockoff":1,"gigadrain":1,"toxic":1}, tier: "LC" }, tentacruel: { viableMoves: {"toxicspikes":1,"rapidspin":1,"scald":1,"sludgebomb":1,"icebeam":1,"knockoff":1,"gigadrain":1,"toxic":1}, tier: "OU" }, geodude: { viableMoves: {"stealthrock":1,"earthquake":1,"stoneedge":1,"suckerpunch":1,"hammerarm":1,"firepunch":1}, tier: "LC" }, graveler: { viableMoves: {"stealthrock":1,"earthquake":1,"stoneedge":1,"suckerpunch":1,"hammerarm":1,"firepunch":1}, tier: "NFE" }, golem: { viableMoves: {"stealthrock":1,"earthquake":1,"stoneedge":1,"suckerpunch":1,"hammerarm":1,"firepunch":1}, tier: "NU" }, ponyta: { viableMoves: {"flareblitz":1,"wildcharge":1,"morningsun":1,"hypnosis":1,"flamecharge":1}, tier: "LC" }, rapidash: { viableMoves: {"flareblitz":1,"wildcharge":1,"morningsun":1,"hypnosis":1,"flamecharge":1,"megahorn":1,"drillrun":1}, eventPokemon: [ {"generation":3,"level":40,"abilities":["flashfire","runaway"],"moves":["batonpass","solarbeam","sunnyday","flamethrower"]} ], tier: "NU" }, slowpoke: { viableMoves: {"scald":1,"aquatail":1,"zenheadbutt":1,"thunderwave":1,"toxic":1,"slackoff":1,"trickroom":1,"trick":1}, eventPokemon: [ {"generation":3,"level":31,"abilities":["oblivious"],"moves":["watergun","confusion","disable","headbutt"]}, {"generation":3,"level":10,"gender":"M","abilities":["oblivious","owntempo"],"moves":["curse","yawn","tackle","growl"]} ], tier: "LC" }, slowbro: { viableMoves: {"scald":1,"surf":1,"fireblast":1,"icebeam":1,"psychic":1,"grassknot":1,"calmmind":1,"thunderwave":1,"toxic":1,"slackoff":1,"trickroom":1,"trick":1}, tier: "UU" }, slowking: { viableMoves: {"scald":1,"surf":1,"fireblast":1,"icebeam":1,"psychic":1,"grassknot":1,"calmmind":1,"thunderwave":1,"toxic":1,"slackoff":1,"trickroom":1,"trick":1,"nastyplot":1}, tier: "NU" }, magnemite: { viableMoves: {"thunderbolt":1,"thunderwave":1,"magnetrise":1,"substitute":1,"flashcannon":1,"hiddenpowerice":1,"voltswitch":1}, tier: "LC" }, magneton: { viableMoves: {"thunderbolt":1,"thunderwave":1,"magnetrise":1,"substitute":1,"flashcannon":1,"hiddenpowerice":1,"voltswitch":1}, eventPokemon: [ {"generation":3,"level":30,"abilities":["sturdy","magnetpull"],"moves":["refresh","doubleedge","raindance","thunder"]} ], tier: "NU" }, magnezone: { viableMoves: {"thunderbolt":1,"thunderwave":1,"magnetrise":1,"substitute":1,"flashcannon":1,"hiddenpowerice":1,"voltswitch":1}, tier: "OU" }, farfetchd: { viableMoves: {"bravebird":1,"swordsdance":1,"return":1,"leafblade":1,"roost":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["keeneye","innerfocus"],"moves":["yawn","wish"]}, {"generation":3,"level":36,"abilities":["keeneye","innerfocus"],"moves":["batonpass","slash","swordsdance","aerialace"]} ], tier: "NU" }, doduo: { viableMoves: {"bravebird":1,"return":1,"doubleedge":1,"roost":1,"quickattack":1,"pursuit":1}, tier: "LC" }, dodrio: { viableMoves: {"bravebird":1,"return":1,"doubleedge":1,"roost":1,"quickattack":1,"pursuit":1}, eventPokemon: [ {"generation":3,"level":34,"abilities":["earlybird","runaway"],"moves":["batonpass","drillpeck","agility","triattack"]} ], tier: "NU" }, seel: { viableMoves: {"surf":1,"icebeam":1,"aquajet":1,"iceshard":1,"raindance":1,"protect":1,"rest":1,"toxic":1,"drillrun":1}, eventPokemon: [ {"generation":3,"level":23,"abilities":["thickfat"],"moves":["helpinghand","surf","safeguard","icebeam"]} ], tier: "LC" }, dewgong: { viableMoves: {"surf":1,"icebeam":1,"aquajet":1,"iceshard":1,"raindance":1,"protect":1,"rest":1,"toxic":1,"drillrun":1}, tier: "NU" }, grimer: { viableMoves: {"curse":1,"gunkshot":1,"poisonjab":1,"shadowsneak":1,"payback":1,"brickbreak":1,"rest":1,"icepunch":1,"firepunch":1,"sleeptalk":1}, eventPokemon: [ {"generation":3,"level":23,"abilities":["stench","stickyhold"],"moves":["helpinghand","sludgebomb","shadowpunch","minimize"]} ], tier: "LC" }, muk: { viableMoves: {"curse":1,"gunkshot":1,"poisonjab":1,"shadowsneak":1,"payback":1,"brickbreak":1,"rest":1,"icepunch":1,"firepunch":1,"sleeptalk":1}, tier: "NU" }, shellder: { viableMoves: {"shellsmash":1,"hydropump":1,"razorshell":1,"rockblast":1,"iciclespear":1,"rapidspin":1}, eventPokemon: [ {"generation":3,"level":24,"abilities":["shellarmor"],"moves":["withdraw","iciclespear","supersonic","aurorabeam"]}, {"generation":3,"level":10,"gender":"M","abilities":["shellarmor"],"moves":["tackle","withdraw","iciclespear"]}, {"generation":3,"level":29,"abilities":["shellarmor"],"moves":["refresh","takedown","surf","aurorabeam"]} ], tier: "LC" }, cloyster: { viableMoves: {"shellsmash":1,"hydropump":1,"razorshell":1,"rockblast":1,"iciclespear":1,"iceshard":1,"rapidspin":1,"spikes":1,"toxicspikes":1}, tier: "UU" }, gastly: { viableMoves: {"shadowball":1,"sludgebomb":1,"hiddenpowerfighting":1,"thunderbolt":1,"substitute":1,"disable":1,"painsplit":1,"hypnosis":1,"gigadrain":1,"trick":1}, tier: "LC" }, haunter: { viableMoves: {"shadowball":1,"sludgebomb":1,"hiddenpowerfighting":1,"thunderbolt":1,"substitute":1,"disable":1,"painsplit":1,"hypnosis":1,"gigadrain":1,"trick":1}, eventPokemon: [ {"generation":3,"level":23,"abilities":["levitate"],"moves":["spite","curse","nightshade","confuseray"]} ], tier: "NU" }, gengar: { viableMoves: {"shadowball":1,"sludgebomb":1,"focusblast":1,"thunderbolt":1,"substitute":1,"disable":1,"painsplit":1,"hypnosis":1,"gigadrain":1,"trick":1}, tier: "OU" }, onix: { viableMoves: {"stealthrock":1,"earthquake":1,"stoneedge":1,"dragontail":1,"curse":1}, tier: "LC" }, steelix: { viableMoves: {"stealthrock":1,"earthquake":1,"ironhead":1,"curse":1,"dragontail":1,"roar":1,"toxic":1,"stoneedge":1,"icefang":1,"firefang":1}, tier: "UU" }, drowzee: { viableMoves: {"psychic":1,"seismictoss":1,"thunderwave":1,"wish":1,"protect":1,"healbell":1,"toxic":1,"nastyplot":1,"shadowball":1,"trickroom":1,"calmmind":1,"barrier":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["insomnia"],"moves":["bellydrum","wish"]} ], tier: "LC" }, hypno: { viableMoves: {"psychic":1,"seismictoss":1,"thunderwave":1,"wish":1,"protect":1,"healbell":1,"toxic":1,"nastyplot":1,"shadowball":1,"trickroom":1,"batonpass":1,"calmmind":1,"barrier":1,"bellydrum":1,"zenheadbutt":1,"firepunch":1}, eventPokemon: [ {"generation":3,"level":34,"abilities":["insomnia"],"moves":["batonpass","psychic","meditate","shadowball"]} ], tier: "NU" }, krabby: { viableMoves: {"crabhammer":1,"return":1,"swordsdance":1,"agility":1,"rockslide":1,"substitute":1,"xscissor":1,"superpower":1}, tier: "LC" }, kingler: { viableMoves: {"crabhammer":1,"return":1,"swordsdance":1,"agility":1,"rockslide":1,"substitute":1,"xscissor":1,"superpower":1}, tier: "NU" }, voltorb: { viableMoves: {"voltswitch":1,"thunderbolt":1,"taunt":1,"foulplay":1,"hiddenpowerice":1}, eventPokemon: [ {"generation":3,"level":19,"abilities":["static","soundproof"],"moves":["refresh","mirrorcoat","spark","swift"]} ], tier: "LC" }, electrode: { viableMoves: {"voltswitch":1,"thunderbolt":1,"taunt":1,"foulplay":1,"hiddenpowerice":1}, tier: "NU" }, exeggcute: { viableMoves: {"substitute":1,"leechseed":1,"gigadrain":1,"psychic":1,"sleeppowder":1,"stunspore":1,"hiddenpowerfire":1,"synthesis":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["chlorophyll"],"moves":["sweetscent","wish"]} ], tier: "LC" }, exeggutor: { viableMoves: {"substitute":1,"leechseed":1,"gigadrain":1,"leafstorm":1,"psychic":1,"sleeppowder":1,"stunspore":1,"hiddenpowerfire":1,"synthesis":1}, eventPokemon: [ {"generation":3,"level":46,"abilities":["chlorophyll"],"moves":["refresh","psychic","hypnosis","ancientpower"]} ], tier: "UU" }, cubone: { viableMoves: {"substitute":1,"bonemerang":1,"doubleedge":1,"stoneedge":1,"firepunch":1,"earthquake":1}, tier: "LC" }, marowak: { viableMoves: {"substitute":1,"bonemerang":1,"doubleedge":1,"stoneedge":1,"swordsdance":1,"firepunch":1,"earthquake":1}, eventPokemon: [ {"generation":3,"level":44,"abilities":["lightningrod","rockhead"],"moves":["sing","earthquake","swordsdance","rockslide"]} ], tier: "NU" }, tyrogue: { viableMoves: {"highjumpkick":1,"rapidspin":1,"fakeout":1,"bulletpunch":1,"machpunch":1,"toxic":1,"counter":1}, tier: "LC" }, hitmonlee: { viableMoves: {"highjumpkick":1,"suckerpunch":1,"stoneedge":1,"machpunch":1,"substitute":1,"fakeout":1,"closecombat":1,"earthquake":1,"blazekick":1}, eventPokemon: [ {"generation":3,"level":38,"abilities":["limber"],"moves":["refresh","highjumpkick","mindreader","megakick"]} ], tier: "UU" }, hitmonchan: { viableMoves: {"bulkup":1,"drainpunch":1,"icepunch":1,"machpunch":1,"substitute":1,"closecombat":1,"stoneedge":1,"rapidspin":1}, eventPokemon: [ {"generation":3,"level":38,"abilities":["keeneye"],"moves":["helpinghand","skyuppercut","mindreader","megapunch"]} ], tier: "NU" }, hitmontop: { viableMoves: {"fakeout":1,"suckerpunch":1,"machpunch":1,"bulkup":1,"rapidspin":1,"closecombat":1,"stoneedge":1,"toxic":1,"bulletpunch":1}, tier: "UU" }, lickitung: { viableMoves: {"wish":1,"protect":1,"dragontail":1,"curse":1,"bodyslam":1,"return":1,"powerwhip":1,"swordsdance":1,"earthquake":1,"toxic":1,"healbell":1,"earthquake":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["owntempo","oblivious"],"moves":["healbell","wish"]}, {"generation":3,"level":38,"abilities":["owntempo","oblivious"],"moves":["helpinghand","doubleedge","defensecurl","rollout"]} ], tier: "LC" }, lickilicky: { viableMoves: {"wish":1,"protect":1,"dragontail":1,"curse":1,"bodyslam":1,"return":1,"powerwhip":1,"swordsdance":1,"earthquake":1,"toxic":1,"healbell":1,"explosion":1,"earthquake":1}, tier: "NU" }, koffing: { viableMoves: {"painsplit":1,"sludgebomb":1,"willowisp":1,"fireblast":1,"toxic":1,"clearsmog":1,"rest":1,"sleeptalk":1,"thunderbolt":1}, tier: "LC" }, weezing: { viableMoves: {"painsplit":1,"sludgebomb":1,"willowisp":1,"fireblast":1,"toxic":1,"clearsmog":1,"rest":1,"sleeptalk":1,"thunderbolt":1}, tier: "UU" }, rhyhorn: { viableMoves: {"stoneedge":1,"earthquake":1,"aquatail":1,"megahorn":1,"stealthrock":1,"rockblast":1}, tier: "LC" }, rhydon: { viableMoves: {"stoneedge":1,"earthquake":1,"aquatail":1,"megahorn":1,"stealthrock":1,"rockblast":1}, eventPokemon: [ {"generation":3,"level":46,"abilities":["lightningrod","rockhead"],"moves":["helpinghand","megahorn","scaryface","earthquake"]} ], tier: "NFE" }, rhyperior: { viableMoves: {"stoneedge":1,"earthquake":1,"aquatail":1,"megahorn":1,"stealthrock":1,"rockblast":1}, tier: "UU" }, happiny: { viableMoves: {"aromatherapy":1,"toxic":1,"thunderwave":1,"counter":1,"endeavor":1}, tier: "LC" }, chansey: { viableMoves: {"wish":1,"softboiled":1,"protect":1,"toxic":1,"aromatherapy":1,"seismictoss":1,"counter":1,"thunderwave":1,"stealthrock":1}, eventPokemon: [ {"generation":3,"level":5,"gender":"F","abilities":["naturalcure","serenegrace"],"moves":["sweetscent","wish"]}, {"generation":3,"level":10,"gender":"F","abilities":["naturalcure","serenegrace"],"moves":["pound","growl","tailwhip","refresh"]}, {"generation":3,"level":39,"gender":"F","abilities":["naturalcure","serenegrace"],"moves":["sweetkiss","thunderbolt","softboiled","skillswap"]} ], tier: "UU" }, blissey: { viableMoves: {"wish":1,"softboiled":1,"protect":1,"toxic":1,"aromatherapy":1,"seismictoss":1,"counter":1,"thunderwave":1,"stealthrock":1,"flamethrower":1,"icebeam":1}, tier: "OU" }, tangela: { viableMoves: {"gigadrain":1,"sleeppowder":1,"hiddenpowerrock":1,"hiddenpowerice":1,"leechseed":1,"knockoff":1,"leafstorm":1,"stunspore":1,"synthesis":1}, eventPokemon: [ {"generation":3,"level":30,"abilities":["chlorophyll"],"moves":["morningsun","solarbeam","sunnyday","ingrain"]} ], tier: "NU" }, tangrowth: { viableMoves: {"gigadrain":1,"sleeppowder":1,"hiddenpowerrock":1,"hiddenpowerice":1,"leechseed":1,"knockoff":1,"leafstorm":1,"stunspore":1,"focusblast":1,"synthesis":1,"powerwhip":1}, tier: "UU" }, kangaskhan: { viableMoves: {"fakeout":1,"return":1,"hammerarm":1,"doubleedge":1,"suckerpunch":1,"earthquake":1,"substitute":1,"focuspunch":1,"circlethrow":1,"wish":1}, eventPokemon: [ {"generation":3,"level":5,"gender":"F","abilities":["earlybird","scrappy"],"moves":["yawn","wish"]}, {"generation":3,"level":10,"gender":"F","abilities":["earlybird","scrappy"],"moves":["cometpunch","leer","bite"]}, {"generation":3,"level":36,"gender":"F","abilities":["earlybird","scrappy"],"moves":["sing","earthquake","tailwhip","dizzypunch"]} ], tier: "UU" }, horsea: { viableMoves: {"hydropump":1,"icebeam":1,"substitute":1,"hiddenpowergrass":1,"raindance":1}, tier: "LC" }, seadra: { viableMoves: {"hydropump":1,"icebeam":1,"agility":1,"substitute":1,"hiddenpowergrass":1}, eventPokemon: [ {"generation":3,"level":45,"abilities":["poisonpoint","sniper"],"moves":["leer","watergun","twister","agility"]} ], tier: "NFE" }, kingdra: { viableMoves: {"hydropump":1,"icebeam":1,"dragondance":1,"substitute":1,"outrage":1,"dracometeor":1,"waterfall":1,"rest":1,"sleeptalk":1}, eventPokemon: [ {"generation":3,"level":50,"abilities":["swiftswim","sniper"],"moves":["leer","watergun","twister","agility"]} ], tier: "OU" }, goldeen: { viableMoves: {"raindance":1,"waterfall":1,"megahorn":1,"return":1,"drillrun":1}, tier: "LC" }, seaking: { viableMoves: {"raindance":1,"waterfall":1,"megahorn":1,"return":1,"drillrun":1}, tier: "NU" }, staryu: { viableMoves: {"surf":1,"thunderbolt":1,"icebeam":1,"rapidspin":1,"recover":1}, eventPokemon: [ {"generation":3,"level":50,"abilities":["illuminate","naturalcure"],"moves":["minimize","lightscreen","cosmicpower","hydropump"]}, {"generation":3,"level":18,"abilities":["illuminate"],"moves":["tackle","watergun","rapidspin","recover"]} ], tier: "LC" }, starmie: { viableMoves: {"surf":1,"thunderbolt":1,"icebeam":1,"rapidspin":1,"recover":1,"psychic":1,"trick":1}, eventPokemon: [ {"generation":3,"level":41,"abilities":["naturalcure","illuminate"],"moves":["refresh","waterfall","icebeam","recover"]} ], tier: "OU" }, mimejr: { viableMoves: {"substitute":1,"calmmind":1,"batonpass":1,"barrier":1,"psychic":1,"hiddenpowerfighting":1,"healingwish":1,"nastyplot":1,"shadowball":1,"thunderbolt":1,"encore":1}, tier: "LC" }, mrmime: { viableMoves: {"substitute":1,"calmmind":1,"batonpass":1,"barrier":1,"psychic":1,"hiddenpowerfighting":1,"healingwish":1,"nastyplot":1,"shadowball":1,"thunderbolt":1,"encore":1}, eventPokemon: [ {"generation":3,"level":42,"abilities":["soundproof"],"moves":["followme","psychic","encore","thunderpunch"]} ], tier: "NU" }, scyther: { viableMoves: {"swordsdance":1,"roost":1,"bugbite":1,"quickattack":1,"brickbreak":1,"aerialace":1,"batonpass":1,"uturn":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["swarm"],"moves":["quickattack","leer","focusenergy"]}, {"generation":3,"level":40,"abilities":["swarm"],"moves":["morningsun","razorwind","silverwind","slash"]} ], tier: "UU" }, scizor: { viableMoves: {"swordsdance":1,"roost":1,"bulletpunch":1,"bugbite":1,"superpower":1,"uturn":1,"batonpass":1,"pursuit":1}, eventPokemon: [ {"generation":3,"level":50,"gender":"M","abilities":["swarm"],"moves":["furycutter","metalclaw","swordsdance","slash"]}, {"generation":4,"level":50,"gender":"M","nature":"Adamant","abilities":["swarm"],"moves":["xscissor","swordsdance","irondefense","agility"]} ], tier: "OU" }, smoochum: { viableMoves: {"icebeam":1,"psychic":1,"hiddenpowerfighting":1,"trick":1,"shadowball":1,"grassknot":1}, tier: "LC" }, jynx: { viableMoves: {"icebeam":1,"psychic":1,"focusblast":1,"trick":1,"shadowball":1,"nastyplot":1,"lovelykiss":1,"substitute":1,"energyball":1}, tier: "NU" }, elekid: { viableMoves: {"thunderbolt":1,"crosschop":1,"voltswitch":1,"substitute":1,"hiddenpowerice":1,"psychic":1}, eventPokemon: [ {"generation":3,"level":20,"abilities":["static"],"moves":["icepunch","firepunch","thunderpunch","crosschop"]} ], tier: "LC" }, electabuzz: { viableMoves: {"thunderbolt":1,"voltswitch":1,"substitute":1,"hiddenpowerice":1,"focusblast":1,"psychic":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["static"],"moves":["quickattack","leer","thunderpunch"]}, {"generation":3,"level":43,"abilities":["static"],"moves":["followme","crosschop","thunderwave","thunderbolt"]}, {"generation":4,"level":30,"gender":"M","nature":"Naughty","abilities":["static"],"moves":["lowkick","shockwave","lightscreen","thunderpunch"]} ], tier: "NU" }, electivire: { viableMoves: {"wildcharge":1,"crosschop":1,"icepunch":1,"substitute":1,"flamethrower":1,"earthquake":1}, eventPokemon: [ {"generation":4,"level":50,"gender":"M","nature":"Adamant","abilities":["motordrive"],"moves":["thunderpunch","icepunch","crosschop","earthquake"]}, {"generation":4,"level":50,"gender":"M","nature":"Serious","abilities":["motordrive"],"moves":["lightscreen","thunderpunch","discharge","thunderbolt"]} ], tier: "OU" }, magby: { viableMoves: {"flareblitz":1,"substitute":1,"fireblast":1,"hiddenpowergrass":1,"crosschop":1,"thunderpunch":1,"overheat":1}, tier: "LC" }, magmar: { viableMoves: {"flareblitz":1,"substitute":1,"fireblast":1,"hiddenpowergrass":1,"crosschop":1,"thunderpunch":1,"overheat":1,"focusblast":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["flamebody"],"moves":["leer","smog","firepunch","leer"]}, {"generation":3,"level":36,"abilities":["flamebody"],"moves":["followme","fireblast","crosschop","thunderpunch"]}, {"generation":4,"level":30,"gender":"M","nature":"Quiet","abilities":["flamebody"],"moves":["smokescreen","firespin","confuseray","firepunch"]} ], tier: "NFE" }, magmortar: { viableMoves: {"fireblast":1,"substitute":1,"focusblast":1,"hiddenpowergrass":1,"thunderbolt":1,"overheat":1}, eventPokemon: [ {"generation":4,"level":50,"gender":"F","nature":"Modest","abilities":["flamebody"],"moves":["flamethrower","psychic","hyperbeam","solarbeam"]}, {"generation":4,"level":50,"gender":"M","nature":"Hardy","abilities":["flamebody"],"moves":["confuseray","firepunch","lavaplume","flamethrower"]} ], tier: "NU" }, pinsir: { viableMoves: {"swordsdance":1,"xscissor":1,"earthquake":1,"closecombat":1,"stealthrock":1,"substitute":1,"stoneedge":1,"quickattack":1}, eventPokemon: [ {"generation":3,"level":35,"abilities":["hypercutter"],"moves":["helpinghand","guillotine","falseswipe","submission"]} ], tier: "NU" }, tauros: { viableMoves: {"return":1,"earthquake":1,"zenheadbutt":1,"rockslide":1,"pursuit":1}, eventPokemon: [ {"generation":3,"level":25,"gender":"M","abilities":["intimidate"],"moves":["rage","hornattack","scaryface","pursuit"]}, {"generation":3,"level":10,"gender":"M","abilities":["intimidate"],"moves":["tackle","tailwhip","rage","hornattack"]}, {"generation":3,"level":46,"gender":"M","abilities":["intimidate"],"moves":["refresh","earthquake","tailwhip","bodyslam"]} ], tier: "NU" }, magikarp: { viableMoves: {"bounce":1,"flail":1,"tackle":1,"splash":1}, eventPokemon: [ {"generation":4,"level":5,"gender":"M","nature":"Relaxed","moves":["splash"]}, {"generation":4,"level":6,"gender":"F","nature":"Rash","moves":["splash"]}, {"generation":4,"level":7,"gender":"F","nature":"Hardy","moves":["splash"]}, {"generation":4,"level":5,"gender":"F","nature":"Lonely","moves":["splash"]}, {"generation":4,"level":4,"gender":"M","nature":"Modest","moves":["splash"]} ], tier: "LC" }, gyarados: { viableMoves: {"dragondance":1,"waterfall":1,"earthquake":1,"bounce":1,"rest":1,"sleeptalk":1,"dragontail":1,"stoneedge":1,"substitute":1,"thunderwave":1,"icefang":1}, tier: "OU" }, lapras: { viableMoves: {"icebeam":1,"thunderbolt":1,"healbell":1,"toxic":1,"surf":1,"dragondance":1,"substitute":1,"waterfall":1,"return":1,"avalanche":1,"rest":1,"sleeptalk":1,"curse":1,"iceshard":1,"drillrun":1}, eventPokemon: [ {"generation":3,"level":44,"abilities":["waterabsorb","shellarmor"],"moves":["hydropump","raindance","blizzard","healbell"]} ], tier: "NU" }, ditto: { viableMoves: {"transform":1}, tier: "NU" }, eevee: { viableMoves: {"quickattack":1,"return":1,"bite":1,"batonpass":1,"irontail":1,"yawn":1,"protect":1,"wish":1}, eventPokemon: [ {"generation":4,"level":10,"gender":"F","nature":"Lonely","abilities":["adaptability"],"moves":["covet","bite","helpinghand","attract"]}, {"generation":4,"level":50,"shiny":true,"gender":"M","nature":"Hardy","abilities":["adaptability"],"moves":["irontail","trumpcard","flail","quickattack"]} ], tier: "LC" }, vaporeon: { viableMoves: {"wish":1,"protect":1,"scald":1,"roar":1,"icebeam":1,"toxic":1,"batonpass":1,"substitute":1,"acidarmor":1,"hydropump":1,"hiddenpowergrass":1,"rest":1,"raindance":1}, tier: "OU" }, jolteon: { viableMoves: {"thunderbolt":1,"voltswitch":1,"hiddenpowergrass":1,"hiddenpowerice":1,"chargebeam":1,"batonpass":1,"substitute":1}, tier: "OU" }, flareon: { viableMoves: {"rest":1,"sleeptalk":1,"flamecharge":1,"facade":1}, tier: "NU" }, espeon: { viableMoves: {"psychic":1,"psyshock":1,"substitute":1,"wish":1,"shadowball":1,"hiddenpowerfighting":1,"calmmind":1,"morningsun":1,"storedpower":1,"batonpass":1}, eventPokemon: [ {"generation":3,"level":70,"moves":["psybeam","psychup","psychic","morningsun"]} ], tier: "NU" }, umbreon: { viableMoves: {"curse":1,"payback":1,"moonlight":1,"wish":1,"protect":1,"healbell":1,"toxic":1,"batonpass":1}, eventPokemon: [ {"generation":3,"level":70,"moves":["feintattack","meanlook","screech","moonlight"]} ], tier: "OU" }, leafeon: { viableMoves: {"swordsdance":1,"leafblade":1,"substitute":1,"return":1,"xscissor":1,"yawn":1,"roar":1,"healbell":1,"batonpass":1}, tier: "UU" }, glaceon: { viableMoves: {"icebeam":1,"hiddenpowerground":1,"shadowball":1,"wish":1,"protect":1}, tier: "NU" }, porygon: { viableMoves: {"triattack":1,"icebeam":1,"recover":1,"toxic":1,"thunderwave":1,"discharge":1,"trick":1}, tier: "LC" }, porygon2: { viableMoves: {"triattack":1,"icebeam":1,"recover":1,"toxic":1,"thunderwave":1,"discharge":1,"trick":1}, tier: "NU" }, porygonz: { viableMoves: {"triattack":1,"thunderbolt":1,"icebeam":1,"darkpulse":1,"hiddenpowerfighting":1,"agility":1,"trick":1,"nastyplot":1}, tier: "BL" }, omanyte: { viableMoves: {"shellsmash":1,"surf":1,"icebeam":1,"earthpower":1,"hiddenpowerelectric":1,"spikes":1,"toxicspikes":1,"stealthrock":1,"hydropump":1}, tier: "LC" }, omastar: { viableMoves: {"shellsmash":1,"surf":1,"icebeam":1,"earthpower":1,"hiddenpowerelectric":1,"spikes":1,"toxicspikes":1,"stealthrock":1,"hydropump":1}, tier: "UU" }, kabuto: { viableMoves: {"aquajet":1,"rockslide":1,"rapidspin":1,"stealthrock":1,"honeclaws":1,"waterfall":1,"toxic":1}, tier: "LC" }, kabutops: { viableMoves: {"aquajet":1,"stoneedge":1,"rapidspin":1,"stealthrock":1,"swordsdance":1,"waterfall":1,"toxic":1,"superpower":1}, tier: "UU" }, aerodactyl: { viableMoves: {"stealthrock":1,"taunt":1,"stoneedge":1,"rockslide":1,"earthquake":1,"aquatail":1,"roost":1,"firefang":1}, tier: "OU" }, munchlax: { viableMoves: {"rest":1,"curse":1,"sleeptalk":1,"bodyslam":1,"earthquake":1,"return":1,"firepunch":1,"icepunch":1,"whirlwind":1}, tier: "LC" }, snorlax: { viableMoves: {"rest":1,"curse":1,"sleeptalk":1,"bodyslam":1,"earthquake":1,"return":1,"firepunch":1,"icepunch":1,"crunch":1,"selfdestruct":1,"pursuit":1,"whirlwind":1}, eventPokemon: [ {"generation":3,"level":43,"abilities":["immunity","thickfat"],"moves":["refresh","fissure","curse","bodyslam"]} ], tier: "OU" }, articuno: { viableMoves: {"icebeam":1,"roost":1,"roar":1,"healbell":1,"toxic":1,"substitute":1,"hurricane":1}, eventPokemon: [ {"generation":3,"level":70,"abilities":["pressure"],"moves":["agility","mindreader","icebeam","reflect"]}, {"generation":3,"level":50,"abilities":["pressure"],"moves":["icebeam","healbell","extrasensory","haze"]} ], tier: "NU" }, zapdos: { viableMoves: {"thunderbolt":1,"heatwave":1,"hiddenpowergrass":1,"hiddenpowerice":1,"roost":1,"toxic":1,"substitute":1,"batonpass":1,"agility":1,"discharge":1}, eventPokemon: [ {"generation":3,"level":70,"abilities":["pressure"],"moves":["agility","detect","drillpeck","charge"]}, {"generation":3,"level":50,"abilities":["pressure"],"moves":["thunderbolt","extrasensory","batonpass","metalsound"]} ], tier: "OU" }, moltres: { viableMoves: {"fireblast":1,"hiddenpowergrass":1,"airslash":1,"roost":1,"substitute":1,"toxic":1,"overheat":1,"uturn":1,"willowisp":1,"hurricane":1}, eventPokemon: [ {"generation":3,"level":70,"abilities":["pressure"],"moves":["agility","endure","flamethrower","safeguard"]}, {"generation":3,"level":50,"abilities":["pressure"],"moves":["extrasensory","morningsun","willowisp","flamethrower"]} ], tier: "UU" }, dratini: { viableMoves: {"dragondance":1,"outrage":1,"waterfall":1,"fireblast":1,"extremespeed":1,"dracometeor":1,"substitute":1,"aquatail":1}, tier: "LC" }, dragonair: { viableMoves: {"dragondance":1,"outrage":1,"waterfall":1,"fireblast":1,"extremespeed":1,"dracometeor":1,"substitute":1,"aquatail":1}, tier: "NU" }, dragonite: { viableMoves: {"dragondance":1,"outrage":1,"firepunch":1,"extremespeed":1,"dragonclaw":1,"earthquake":1,"roost":1,"waterfall":1,"substitute":1,"roost":1,"thunderwave":1,"dragontail":1,"hurricane":1,"superpower":1,"dracometeor":1}, eventPokemon: [ {"generation":3,"level":70,"abilities":["innerfocus"],"moves":["agility","safeguard","wingattack","outrage"]}, {"generation":3,"level":55,"abilities":["innerfocus"],"moves":["healbell","hyperbeam","dragondance","earthquake"]}, {"generation":4,"level":50,"gender":"M","nature":"Mild","abilities":["innerfocus"],"moves":["dracometeor","thunderbolt","outrage","dragondance"]} ], tier: "OU" }, mewtwo: { viableMoves: {"psystrike":1,"aurasphere":1,"fireblast":1,"icebeam":1,"calmmind":1,"substitute":1,"recover":1,"thunderbolt":1}, tier: "Uber" }, mew: { viableMoves: {"taunt":1,"willowisp":1,"roost":1,"psychic":1,"nastyplot":1,"aurasphere":1,"shadowball":1,"fireblast":1,"swordsdance":1,"superpower":1,"zenheadbutt":1,"calmmind":1,"batonpass":1,"rockpolish":1,"substitute":1,"toxic":1,"explosion":1,"icebeam":1,"thunderbolt":1,"earthquake":1,"uturn":1,"stealthrock":1,"transform":1}, eventPokemon: [ {"generation":3,"level":30,"moves":["pound","transform","megapunch","metronome"]}, {"generation":3,"level":10,"moves":["pound","transform"]}, {"generation":4,"level":50,"moves":["ancientpower","metronome","teleport","aurasphere"]}, {"generation":4,"level":50,"moves":["barrier","metronome","teleport","aurasphere"]}, {"generation":4,"level":50,"moves":["megapunch","metronome","teleport","aurasphere"]}, {"generation":4,"level":50,"moves":["amnesia","metronome","teleport","aurasphere"]}, {"generation":4,"level":50,"moves":["transform","metronome","teleport","aurasphere"]}, {"generation":4,"level":50,"moves":["psychic","metronome","teleport","aurasphere"]}, {"generation":4,"level":50,"moves":["synthesis","return","hypnosis","teleport"]}, {"generation":4,"level":5,"moves":["pound"]} ], tier: "Uber" }, chikorita: { viableMoves: {"reflect":1,"lightscreen":1,"safeguard":1,"aromatherapy":1,"grasswhistle":1,"leechseed":1,"toxic":1,"gigadrain":1,"synthesis":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","moves":["tackle","growl","razorleaf"]} ], tier: "LC" }, bayleef: { viableMoves: {"reflect":1,"lightscreen":1,"safeguard":1,"aromatherapy":1,"grasswhistle":1,"leechseed":1,"toxic":1,"gigadrain":1,"synthesis":1}, tier: "NFE" }, meganium: { viableMoves: {"reflect":1,"lightscreen":1,"safeguard":1,"aromatherapy":1,"grasswhistle":1,"leechseed":1,"toxic":1,"gigadrain":1,"synthesis":1,"dragontail":1}, tier: "NU" }, cyndaquil: { viableMoves: {"eruption":1,"fireblast":1,"flamethrower":1,"hiddenpowergrass":1,"naturepower":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","moves":["tackle","leer","smokescreen"]} ], tier: "LC" }, quilava: { viableMoves: {"eruption":1,"fireblast":1,"flamethrower":1,"hiddenpowergrass":1,"naturepower":1}, tier: "NFE" }, typhlosion: { viableMoves: {"eruption":1,"fireblast":1,"flamethrower":1,"hiddenpowergrass":1,"naturepower":1,"focusblast":1}, eventPokemon: [ {"generation":3,"level":70,"abilities":["blaze"],"moves":["quickattack","flamewheel","swift","flamethrower"]} ], tier: "NU" }, totodile: { viableMoves: {"aquajet":1,"waterfall":1,"crunch":1,"icepunch":1,"superpower":1,"dragondance":1,"swordsdance":1,"return":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["torrent"],"moves":["scratch","leer","rage"]} ], tier: "LC" }, croconaw: { viableMoves: {"aquajet":1,"waterfall":1,"crunch":1,"icepunch":1,"superpower":1,"dragondance":1,"swordsdance":1,"return":1}, tier: "NFE" }, feraligatr: { viableMoves: {"aquajet":1,"waterfall":1,"crunch":1,"icepunch":1,"dragondance":1,"swordsdance":1,"return":1,"earthquake":1,"superpower":1}, tier: "UU" }, sentret: { viableMoves: {"superfang":1,"trick":1,"toxic":1,"uturn":1,"knockoff":1}, tier: "LC" }, furret: { viableMoves: {"return":1,"uturn":1,"suckerpunch":1,"trick":1,"icepunch":1,"firepunch":1,"thunderpunch":1}, tier: "NU" }, hoothoot: { viableMoves: {"reflect":1,"toxic":1,"roost":1,"lightscreen":1,"whirlwind":1,"nightshade":1,"magiccoat":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["insomnia","keeneye"],"moves":["tackle","growl","foresight"]} ], tier: "LC" }, noctowl: { viableMoves: {"roost":1,"whirlwind":1,"airslash":1,"nightshade":1,"toxic":1,"reflect":1,"lightscreen":1,"magiccoat":1}, tier: "NU" }, ledyba: { viableMoves: {"roost":1,"agility":1,"lightscreen":1,"encore":1,"reflect":1,"knockoff":1,"swordsdance":1,"batonpass":1,"toxic":1}, eventPokemon: [ {"generation":3,"level":10,"abilities":["earlybird","swarm"],"moves":["refresh","psybeam","aerialace","supersonic"]} ], tier: "LC" }, ledian: { viableMoves: {"roost":1,"agility":1,"lightscreen":1,"encore":1,"reflect":1,"knockoff":1,"swordsdance":1,"batonpass":1,"toxic":1}, tier: "NU" }, spinarak: { viableMoves: {"agility":1,"toxic":1,"xscissor":1,"toxicspikes":1,"poisonjab":1,"batonpass":1,"swordsdance":1}, eventPokemon: [ {"generation":3,"level":14,"abilities":["insomnia","swarm"],"moves":["refresh","dig","signalbeam","nightshade"]} ], tier: "LC" }, ariados: { viableMoves: {"agility":1,"toxic":1,"xscissor":1,"toxicspikes":1,"poisonjab":1,"batonpass":1,"swordsdance":1}, tier: "NU" }, chinchou: { viableMoves: {"voltswitch":1,"thunderbolt":1,"hiddenpowergrass":1,"hydropump":1,"icebeam":1,"surf":1,"thunderwave":1,"scald":1,"discharge":1}, tier: "LC" }, lanturn: { viableMoves: {"voltswitch":1,"thunderbolt":1,"hiddenpowergrass":1,"hydropump":1,"icebeam":1,"surf":1,"thunderwave":1,"scald":1,"discharge":1}, tier: "UU" }, togepi: { viableMoves: {"wish":1,"protect":1,"fireblast":1,"toxic":1,"thunderwave":1,"softboiled":1}, eventPokemon: [ {"generation":3,"level":20,"gender":"F","abilities":["serenegrace"],"moves":["metronome","charm","sweetkiss","yawn"]}, {"generation":3,"level":25,"abilities":["serenegrace","hustle"],"moves":["triattack","followme","ancientpower","helpinghand"]} ], tier: "LC" }, togetic: { viableMoves: {"wish":1,"protect":1,"fireblast":1,"toxic":1,"thunderwave":1,"roost":1}, tier: "NU" }, togekiss: { viableMoves: {"wish":1,"roost":1,"thunderwave":1,"nastyplot":1,"airslash":1,"aurasphere":1,"batonpass":1}, tier: "OU" }, natu: { viableMoves: {"thunderwave":1,"roost":1,"toxic":1,"reflect":1,"lightscreen":1,"uturn":1,"wish":1,"psychic":1,"nightshade":1,"uturn":1}, eventPokemon: [ {"generation":3,"level":22,"abilities":["synchronize","earlybird"],"moves":["batonpass","futuresight","nightshade","aerialace"]} ], tier: "LC" }, xatu: { viableMoves: {"thunderwave":1,"toxic":1,"roost":1,"psychic":1,"nightshade":1,"uturn":1,"reflect":1,"lightscreen":1,"wish":1,"calmmind":1}, tier: "NU" }, mareep: { viableMoves: {"reflect":1,"lightscreen":1,"thunderbolt":1,"discharge":1,"thunderwave":1,"toxic":1,"hiddenpowerice":1,"cottonguard":1}, eventPokemon: [ {"generation":3,"level":37,"gender":"F","abilities":["static"],"moves":["thunder","thundershock","thunderwave","cottonspore"]}, {"generation":3,"level":10,"gender":"M","abilities":["static"],"moves":["tackle","growl","thundershock"]}, {"generation":3,"level":17,"abilities":["static"],"moves":["healbell","thundershock","thunderwave","bodyslam"]} ], tier: "LC" }, flaaffy: { viableMoves: {"reflect":1,"lightscreen":1,"thunderbolt":1,"discharge":1,"thunderwave":1,"toxic":1,"hiddenpowerice":1,"cottonguard":1}, tier: "NFE" }, ampharos: { viableMoves: {"voltswitch":1,"focusblast":1,"hiddenpowerice":1,"hiddenpowergrass":1,"thunderbolt":1,"healbell":1}, tier: "NU" }, azurill: { viableMoves: {"scald":1,"return":1,"doubleedge":1,"encore":1,"toxic":1,"protect":1}, tier: "LC" }, marill: { viableMoves: {"waterfall":1,"return":1,"doubleedge":1,"encore":1,"toxic":1,"aquajet":1,"superpower":1,"icepunch":1,"protect":1}, tier: "NFE" }, azumarill: { viableMoves: {"waterfall":1,"aquajet":1,"return":1,"doubleedge":1,"icepunch":1,"superpower":1}, tier: "UU" }, bonsly: { viableMoves: {"rockslide":1,"brickbreak":1,"doubleedge":1,"toxic":1,"stealthrock":1,"suckerpunch":1}, tier: "LC" }, sudowoodo: { viableMoves: {"hammerarm":1,"stoneedge":1,"earthquake":1,"suckerpunch":1,"woodhammer":1,"explosion":1,"stealthrock":1}, tier: "NU" }, hoppip: { viableMoves: {"encore":1,"sleeppowder":1,"uturn":1,"toxic":1,"leechseed":1,"substitute":1,"protect":1}, tier: "LC" }, skiploom: { viableMoves: {"encore":1,"sleeppowder":1,"uturn":1,"toxic":1,"leechseed":1,"substitute":1,"protect":1}, tier: "NFE" }, jumpluff: { viableMoves: {"encore":1,"sleeppowder":1,"uturn":1,"toxic":1,"leechseed":1,"substitute":1,"gigadrain":1,"acrobatics":1,"synthesis":1}, tier: "NU" }, aipom: { viableMoves: {"fakeout":1,"return":1,"brickbreak":1,"seedbomb":1,"shadowclaw":1,"uturn":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["runaway","pickup"],"moves":["scratch","tailwhip","sandattack"]} ], tier: "LC" }, ambipom: { viableMoves: {"fakeout":1,"return":1,"payback":1,"uturn":1,"lowsweep":1,"switcheroo":1,"seedbomb":1}, tier: "UU" }, sunkern: { viableMoves: {"sunnyday":1,"gigadrain":1,"solarbeam":1,"hiddenpowerfire":1,"toxic":1,"earthpower":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["chlorophyll","solarpower"],"moves":["absorb","growth"]} ], tier: "LC" }, sunflora: { viableMoves: {"sunnyday":1,"leafstorm":1,"gigadrain":1,"solarbeam":1,"hiddenpowerfire":1,"earthpower":1}, tier: "NU" }, yanma: { viableMoves: {"bugbuzz":1,"airslash":1,"hiddenpowerground":1,"uturn":1,"protect":1,"gigadrain":1}, tier: "NU" }, yanmega: { viableMoves: {"bugbuzz":1,"airslash":1,"hiddenpowerground":1,"uturn":1,"protect":1,"gigadrain":1}, tier: "BL" }, wooper: { viableMoves: {"recover":1,"earthquake":1,"scald":1,"toxic":1,"stockpile":1,"yawn":1,"protect":1}, tier: "LC" }, quagsire: { viableMoves: {"recover":1,"earthquake":1,"waterfall":1,"scald":1,"toxic":1,"curse":1,"stoneedge":1,"stockpile":1,"yawn":1}, tier: "NU" }, murkrow: { viableMoves: {"substitute":1,"suckerpunch":1,"bravebird":1,"heatwave":1,"hiddenpowergrass":1,"roost":1,"darkpulse":1,"thunderwave":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["insomnia","superluck"],"moves":["peck","astonish"]} ], tier: "NU" }, honchkrow: { viableMoves: {"substitute":1,"superpower":1,"suckerpunch":1,"bravebird":1,"roost":1,"hiddenpowergrass":1,"heatwave":1,"pursuit":1}, tier: "BL" }, misdreavus: { viableMoves: {"nastyplot":1,"substitute":1,"calmmind":1,"willowisp":1,"shadowball":1,"thunderbolt":1,"hiddenpowerfighting":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["levitate"],"moves":["growl","psywave","spite"]} ], tier: "NU" }, mismagius: { viableMoves: {"nastyplot":1,"substitute":1,"calmmind":1,"willowisp":1,"shadowball":1,"thunderbolt":1,"hiddenpowerfighting":1}, tier: "UU" }, unown: { viableMoves: {"hiddenpowerpsychic":1}, tier: "NU" }, wynaut: { viableMoves: {"destinybond":1,"counter":1,"mirrorcoat":1,"encore":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["shadowtag"],"moves":["splash","charm","encore","tickle"]} ], tier: "Uber" }, wobbuffet: { viableMoves: {"destinybond":1,"counter":1,"mirrorcoat":1,"encore":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["shadowtag"],"moves":["counter","mirrorcoat","safeguard","destinybond"]}, {"generation":3,"level":10,"gender":"M","abilities":["shadowtag"],"moves":["counter","mirrorcoat","safeguard","destinybond"]} ], tier: "Uber" }, girafarig: { viableMoves: {"psychic":1,"thunderbolt":1,"calmmind":1,"batonpass":1,"agility":1,"hypervoice":1,"thunderwave":1}, tier: "NU" }, pineco: { viableMoves: {"rapidspin":1,"toxicspikes":1,"spikes":1,"bugbite":1,"stealthrock":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["sturdy"],"moves":["tackle","protect","selfdestruct"]}, {"generation":3,"level":22,"abilities":["sturdy"],"moves":["refresh","pinmissile","spikes","counter"]} ], tier: "LC" }, forretress: { viableMoves: {"rapidspin":1,"toxicspikes":1,"spikes":1,"bugbite":1,"earthquake":1,"voltswitch":1,"stealthrock":1}, tier: "OU" }, dunsparce: { viableMoves: {"coil":1,"rockslide":1,"bite":1,"headbutt":1,"glare":1,"thunderwave":1,"bodyslam":1,"roost":1}, tier: "NU" }, gligar: { viableMoves: {"stealthrock":1,"toxic":1,"roost":1,"taunt":1,"swordsdance":1,"earthquake":1,"uturn":1,"stoneedge":1,"acrobatics":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["hypercutter","sandveil"],"moves":["poisonsting","sandattack"]} ], tier: "LC" }, gliscor: { viableMoves: {"swordsdance":1,"acrobatics":1,"earthquake":1,"roost":1,"substitute":1,"taunt":1,"icefang":1,"protect":1,"toxic":1,"stealthrock":1}, tier: "OU" }, snubbull: { viableMoves: {"thunderwave":1,"return":1,"crunch":1,"closecombat":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["intimidate","runaway"],"moves":["tackle","scaryface","tailwhip","charm"]} ], tier: "LC" }, granbull: { viableMoves: {"thunderwave":1,"return":1,"crunch":1,"closecombat":1,"healbell":1,"icepunch":1}, tier: "NU" }, qwilfish: { viableMoves: {"toxicspikes":1,"waterfall":1,"spikes":1,"swordsdance":1,"poisonjab":1,"painsplit":1,"thunderwave":1,"taunt":1,"destinybond":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["poisonpoint","swiftswim"],"moves":["tackle","poisonsting","harden","minimize"]} ], tier: "UU" }, shuckle: { viableMoves: {"rollout":1,"acupressure":1,"powersplit":1,"rest":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["sturdy"],"moves":["constrict","withdraw","wrap"]}, {"generation":3,"level":20,"abilities":["sturdy"],"moves":["substitute","toxic","sludgebomb","encore"]} ], tier: "NU" }, heracross: { viableMoves: {"closecombat":1,"megahorn":1,"stoneedge":1,"swordsdance":1,"facade":1}, tier: "BL" }, sneasel: { viableMoves: {"iceshard":1,"icepunch":1,"nightslash":1,"lowkick":1,"pursuit":1,"swordsdance":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["innerfocus","keeneye"],"moves":["scratch","leer","taunt","quickattack"]} ], tier: "NU" }, weavile: { viableMoves: {"iceshard":1,"icepunch":1,"nightslash":1,"lowkick":1,"pursuit":1,"swordsdance":1}, eventPokemon: [ {"generation":4,"level":30,"gender":"M","nature":"Jolly","abilities":["pressure"],"moves":["fakeout","iceshard","nightslash","brickbreak"]} ], tier: "OU" }, teddiursa: { viableMoves: {"swordsdance":1,"protect":1,"facade":1,"closecombat":1,"firepunch":1,"crunch":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["pickup","quickfeet"],"moves":["scratch","leer","lick"]}, {"generation":3,"level":11,"abilities":["pickup"],"moves":["refresh","metalclaw","leer","return"]} ], tier: "LC" }, ursaring: { viableMoves: {"swordsdance":1,"protect":1,"facade":1,"closecombat":1,"firepunch":1,"crunch":1}, tier: "UU" }, slugma: { viableMoves: {"stockpile":1,"recover":1,"lavaplume":1,"willowisp":1,"toxic":1,"hiddenpowergrass":1}, tier: "LC" }, magcargo: { viableMoves: {"stockpile":1,"recover":1,"lavaplume":1,"willowisp":1,"toxic":1,"hiddenpowergrass":1,"hiddenpowerrock":1,"stealthrock":1,"shellsmash":1,"fireblast":1,"earthpower":1}, eventPokemon: [ {"generation":3,"level":38,"abilities":["magmaarmor","flamebody"],"moves":["refresh","heatwave","earthquake","flamethrower"]} ], tier: "NU" }, swinub: { viableMoves: {"earthquake":1,"iciclecrash":1,"iceshard":1,"stealthrock":1,"superpower":1,"endeavor":1,"stealthrock":1}, eventPokemon: [ {"generation":3,"level":22,"abilities":["oblivious"],"moves":["charm","ancientpower","mist","mudshot"]} ], tier: "LC" }, piloswine: { viableMoves: {"earthquake":1,"iciclecrash":1,"iceshard":1,"stealthrock":1,"superpower":1,"endeavor":1,"stealthrock":1}, tier: "NU" }, mamoswine: { viableMoves: {"iceshard":1,"earthquake":1,"endeavor":1,"iciclecrash":1,"stoneedge":1,"superpower":1,"stealthrock":1}, tier: "OU" }, corsola: { viableMoves: {"recover":1,"toxic":1,"powergem":1,"scald":1,"stealthrock":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["hustle","naturalcure"],"moves":["tackle","mudsport"]} ], tier: "NU" }, remoraid: { viableMoves: {"waterspout":1,"hydropump":1,"fireblast":1,"hiddenpowerground":1,"icebeam":1,"seedbomb":1,"rockblast":1}, tier: "LC" }, octillery: { viableMoves: {"hydropump":1,"fireblast":1,"icebeam":1,"energyball":1,"rockblast":1,"thunderwave":1}, eventPokemon: [ {"generation":4,"level":50,"gender":"F","nature":"Serious","abilities":["suctioncups"],"moves":["octazooka","icebeam","signalbeam","hyperbeam"]} ], tier: "NU" }, delibird: { viableMoves: {"rapidspin":1,"iceshard":1,"icepunch":1,"aerialace":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["vitalspirit","hustle"],"moves":["present"]} ], tier: "NU" }, mantyke: { viableMoves: {"raindance":1,"hydropump":1,"surf":1,"airslash":1,"icebeam":1,"rest":1,"sleeptalk":1,"toxic":1}, tier: "LC" }, mantine: { viableMoves: {"raindance":1,"hydropump":1,"surf":1,"airslash":1,"icebeam":1,"rest":1,"sleeptalk":1,"toxic":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["swiftswim","waterabsorb"],"moves":["tackle","bubble","supersonic"]} ], tier: "NU" }, skarmory: { viableMoves: {"whirlwind":1,"bravebird":1,"roost":1,"spikes":1,"stealthrock":1}, tier: "OU" }, houndour: { viableMoves: {"pursuit":1,"suckerpunch":1,"fireblast":1,"darkpulse":1,"hiddenpowerfighting":1,"nastyplot":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["earlybird","flashfire"],"moves":["leer","ember","howl"]}, {"generation":3,"level":17,"abilities":["earlybird","flashfire"],"moves":["charm","feintattack","ember","roar"]} ], tier: "LC" }, houndoom: { viableMoves: {"nastyplot":1,"pursuit":1,"darkpulse":1,"suckerpunch":1,"fireblast":1,"hiddenpowerfighting":1}, tier: "UU" }, phanpy: { viableMoves: {"stealthrock":1,"earthquake":1,"iceshard":1,"headsmash":1,"knockoff":1,"seedbomb":1,"superpower":1}, tier: "LC" }, donphan: { viableMoves: {"stealthrock":1,"rapidspin":1,"iceshard":1,"earthquake":1,"headsmash":1,"seedbomb":1,"superpower":1}, tier: "UU" }, stantler: { viableMoves: {"return":1,"megahorn":1,"jumpkick":1,"earthquake":1,"thunderwave":1,"suckerpunch":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["intimidate","frisk"],"moves":["tackle","leer"]} ], tier: "NU" }, smeargle: { viableMoves: {"spore":1,"spikes":1,"stealthrock":1,"uturn":1,"destinybond":1,"whirlwind":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["owntempo","technician"],"moves":["sketch"]} ], tier: "OU" }, miltank: { viableMoves: {"milkdrink":1,"stealthrock":1,"bodyslam":1,"healbell":1,"curse":1,"earthquake":1}, tier: "UU" }, raikou: { viableMoves: {"thunderbolt":1,"hiddenpowerice":1,"aurasphere":1,"calmmind":1,"substitute":1}, eventPokemon: [ {"generation":3,"level":70,"abilities":["pressure"],"moves":["quickattack","spark","reflect","crunch"]}, {"generation":4,"level":30,"shiny":true,"nature":"Rash","abilities":["pressure"],"moves":["zapcannon","aurasphere","extremespeed","weatherball"]} ], tier: "BL" }, entei: { viableMoves: {"extremespeed":1,"flareblitz":1,"ironhead":1,"flamecharge":1,"stoneedge":1}, eventPokemon: [ {"generation":3,"level":70,"abilities":["pressure"],"moves":["firespin","stomp","flamethrower","swagger"]}, {"generation":4,"level":30,"shiny":true,"nature":"Adamant","abilities":["pressure"],"moves":["flareblitz","howl","extremespeed","crushclaw"]} ], tier: "NU" }, suicune: { viableMoves: {"hydropump":1,"icebeam":1,"scald":1,"hiddenpowergrass":1,"hiddenpowerelectric":1,"rest":1,"sleeptalk":1,"roar":1,"calmmind":1}, eventPokemon: [ {"generation":3,"level":70,"abilities":["pressure"],"moves":["gust","aurorabeam","mist","mirrorcoat"]}, {"generation":4,"level":30,"shiny":true,"nature":"Relaxed","abilities":["pressure"],"moves":["sheercold","airslash","extremespeed","aquaring"]} ], tier: "OU" }, larvitar: { viableMoves: {"earthquake":1,"stoneedge":1,"rockpolish":1,"dragondance":1,"superpower":1}, eventPokemon: [ {"generation":3,"level":20,"abilities":["guts"],"moves":["sandstorm","dragondance","bite","outrage"]} ], tier: "LC" }, pupitar: { viableMoves: {"earthquake":1,"stoneedge":1,"rockpolish":1,"dragondance":1,"superpower":1}, tier: "NFE" }, tyranitar: { viableMoves: {"crunch":1,"stoneedge":1,"pursuit":1,"superpower":1,"fireblast":1,"icebeam":1,"stealthrock":1,"aquatail":1,"dragondance":1}, eventPokemon: [ {"generation":3,"level":70,"abilities":["sandstream"],"moves":["thrash","scaryface","crunch","earthquake"]} ], tier: "OU" }, lugia: { viableMoves: {"toxic":1,"dragontail":1,"roost":1,"substitute":1,"whirlwind":1,"icebeam":1}, eventPokemon: [ {"generation":3,"level":70,"abilities":["pressure"],"moves":["swift","raindance","hydropump","recover"]}, {"generation":3,"level":70,"abilities":["pressure"],"moves":["recover","hydropump","raindance","swift"]}, {"generation":3,"level":50,"abilities":["pressure"],"moves":["psychoboost","recover","hydropump","featherdance"]} ], tier: "Uber" }, hooh: { viableMoves: {"substitute":1,"sacredfire":1,"bravebird":1,"earthquake":1,"roost":1,"flamecharge":1}, eventPokemon: [ {"generation":3,"level":70,"abilities":["pressure"],"moves":["swift","sunnyday","fireblast","recover"]}, {"generation":3,"level":70,"abilities":["pressure"],"moves":["recover","fireblast","sunnyday","swift"]} ], tier: "Uber" }, celebi: { viableMoves: {"nastyplot":1,"psychic":1,"gigadrain":1,"recover":1,"healbell":1,"batonpass":1,"stealthrock":1,"earthpower":1,"hiddenpowerfire":1,"hiddenpowerice":1,"calmmind":1}, eventPokemon: [ {"generation":3,"level":10,"abilities":["naturalcure"],"moves":["confusion","recover","healbell","safeguard"]}, {"generation":3,"level":70,"abilities":["naturalcure"],"moves":["ancientpower","futuresight","batonpass","perishsong"]}, {"generation":3,"level":10,"abilities":["naturalcure"],"moves":["leechseed","recover","healbell","safeguard"]}, {"generation":3,"level":30,"abilities":["naturalcure"],"moves":["healbell","safeguard","ancientpower","futuresight"]}, {"generation":4,"level":50,"abilities":["naturalcure"],"moves":["leafstorm","recover","nastyplot","healingwish"]} ], tier: "OU" }, treecko: { viableMoves: {"substitute":1,"leechseed":1,"gigadrain":1,"leafstorm":1,"hiddenpowerice":1,"hiddenpowerrock":1,"endeavor":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","moves":["pound","leer","absorb"]} ], tier: "LC" }, grovyle: { viableMoves: {"substitute":1,"leechseed":1,"gigadrain":1,"leafstorm":1,"hiddenpowerice":1,"hiddenpowerrock":1,"endeavor":1}, tier: "NFE" }, sceptile: { viableMoves: {"substitute":1,"leechseed":1,"gigadrain":1,"leafstorm":1,"hiddenpowerice":1,"focusblast":1,"synthesis":1,"hiddenpowerrock":1}, tier: "UU" }, torchic: { viableMoves: {"fireblast":1,"protect":1,"batonpass":1,"substitute":1,"hiddenpowergrass":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["blaze"],"moves":["scratch","growl","focusenergy","ember"]} ], tier: "LC" }, combusken: { viableMoves: {"flareblitz":1,"skyuppercut":1,"protect":1,"swordsdance":1,"substitute":1,"batonpass":1}, tier: "NFE" }, blaziken: { viableMoves: {"flareblitz":1,"highjumpkick":1,"protect":1,"swordsdance":1,"substitute":1,"batonpass":1,"bravebird":1}, eventPokemon: [ {"generation":3,"level":70,"abilities":["blaze"],"moves":["blazekick","slash","mirrormove","skyuppercut"]} ], tier: "UU" }, mudkip: { viableMoves: {"waterfall":1,"earthpower":1,"superpower":1,"icebeam":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["torrent"],"moves":["tackle","growl","mudslap","watergun"]} ], tier: "LC" }, marshtomp: { viableMoves: {"waterfall":1,"earthquake":1,"superpower":1,"icepunch":1,"rockslide":1,"stealthrock":1}, tier: "NFE" }, swampert: { viableMoves: {"waterfall":1,"earthquake":1,"icepunch":1,"stealthrock":1,"roar":1,"superpower":1,"stoneedge":1,"rest":1,"sleeptalk":1,"curse":1}, tier: "OU" }, poochyena: { viableMoves: {"superfang":1,"foulplay":1,"suckerpunch":1,"toxic":1}, eventPokemon: [ {"generation":3,"level":10,"abilities":["runaway"],"moves":["healbell","dig","poisonfang","growl"]} ], tier: "LC" }, mightyena: { viableMoves: {"suckerpunch":1,"crunch":1,"icefang":1,"firefang":1,"howl":1}, tier: "NU" }, zigzagoon: { viableMoves: {"bellydrum":1,"extremespeed":1,"seedbomb":1,"substitute":1}, eventPokemon: [ {"generation":3,"level":5,"shiny":true,"abilities":["pickup"],"moves":["tackle","growl","tailwhip"]}, {"generation":3,"level":5,"abilities":["pickup"],"moves":["tackle","growl","extremespeed"]} ], tier: "LC" }, linoone: { viableMoves: {"bellydrum":1,"extremespeed":1,"seedbomb":1,"substitute":1,"shadowclaw":1}, tier: "NU" }, wurmple: { viableMoves: {"bugbite":1,"poisonsting":1,"tackle":1,"electroweb":1}, tier: "LC" }, silcoon: { viableMoves: {"bugbite":1,"poisonsting":1,"tackle":1,"electroweb":1}, tier: "NFE" }, beautifly: { viableMoves: {"quiverdance":1,"bugbuzz":1,"psychic":1,"hiddenpowerfighting":1,"hiddenpowerrock":1,"substitute":1,"roost":1}, tier: "NU" }, cascoon: { viableMoves: {"bugbite":1,"poisonsting":1,"tackle":1,"electroweb":1}, tier: "NFE" }, dustox: { viableMoves: {"toxic":1,"roost":1,"whirlwind":1,"bugbuzz":1,"protect":1,"sludgebomb":1,"quiverdance":1}, tier: "NU" }, lotad: { viableMoves: {"gigadrain":1,"icebeam":1,"scald":1,"substitute":1,"leechseed":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["swiftswim","raindish"],"moves":["astonish","growl","absorb"]} ], tier: "LC" }, lombre: { viableMoves: {"gigadrain":1,"icebeam":1,"scald":1,"substitute":1,"leechseed":1}, tier: "NFE" }, ludicolo: { viableMoves: {"raindance":1,"hydropump":1,"surf":1,"gigadrain":1,"icebeam":1,"scald":1,"leechseed":1,"substitute":1,"toxic":1}, tier: "UU" }, seedot: { viableMoves: {"leechseed":1,"naturepower":1,"seedbomb":1,"explosion":1,"foulplay":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["chlorophyll","earlybird"],"moves":["bide","harden","growth"]}, {"generation":3,"level":17,"abilities":["chlorophyll","earlybird"],"moves":["refresh","gigadrain","bulletseed","secretpower"]} ], tier: "LC" }, nuzleaf: { viableMoves: {"foulplay":1,"naturepower":1,"seedbomb":1,"explosion":1,"swordsdance":1}, tier: "NFE" }, shiftry: { viableMoves: {"hiddenpowerfire":1,"swordsdance":1,"seedbomb":1,"suckerpunch":1,"naturepower":1,"nastyplot":1,"gigadrain":1,"darkpulse":1}, tier: "NU" }, taillow: { viableMoves: {"bravebird":1,"facade":1,"quickattack":1,"uturn":1,"protect":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["guts"],"moves":["peck","growl","focusenergy","featherdance"]} ], tier: "LC" }, swellow: { viableMoves: {"bravebird":1,"facade":1,"quickattack":1,"uturn":1,"protect":1}, eventPokemon: [ {"generation":3,"level":43,"abilities":["guts"],"moves":["batonpass","skyattack","agility","facade"]} ], tier: "UU" }, wingull: { viableMoves: {"scald":1,"icebeam":1,"hiddenpowergrass":1,"uturn":1,"airslash":1,"hurricane":1}, tier: "LC" }, pelipper: { viableMoves: {"scald":1,"icebeam":1,"hiddenpowergrass":1,"uturn":1,"airslash":1,"hurricane":1,"toxic":1,"roost":1}, tier: "NU" }, ralts: { viableMoves: {"trickroom":1,"destinybond":1,"hypnosis":1,"willowisp":1}, eventPokemon: [ {"generation":3,"level":5,"moves":["growl","wish"]}, {"generation":3,"level":5,"moves":["growl","charm"]}, {"generation":3,"level":20,"moves":["sing","shockwave","reflect","confusion"]} ], tier: "LC" }, kirlia: { viableMoves: {"trickroom":1,"destinybond":1,"hypnosis":1,"willowisp":1}, tier: "NFE" }, gardevoir: { viableMoves: {"psychic":1,"focusblast":1,"shadowball":1,"trick":1,"calmmind":1,"willowisp":1,"wish":1,"thunderbolt":1,"protect":1,"healingwish":1}, tier: "NU" }, gallade: { viableMoves: {"closecombat":1,"trick":1,"stoneedge":1,"shadowsneak":1,"swordsdance":1,"bulkup":1,"drainpunch":1,"icepunch":1,"psychocut":1}, tier: "BL" }, surskit: { viableMoves: {"hydropump":1,"signalbeam":1,"hiddenpowerfire":1,"hiddenpowerfighting":1,"gigadrain":1}, eventPokemon: [ {"generation":3,"level":5,"moves":["bubble","mudsport"]}, {"generation":3,"level":10,"gender":"M","moves":["bubble","quickattack"]} ], tier: "LC" }, masquerain: { viableMoves: {"hydropump":1,"bugbuzz":1,"airslash":1,"quiverdance":1,"substitute":1,"batonpass":1,"roost":1}, tier: "NU" }, shroomish: { viableMoves: {"spore":1,"substitute":1,"leechseed":1,"gigadrain":1,"protect":1,"toxic":1,"stunspore":1}, eventPokemon: [ {"generation":3,"level":15,"abilities":["effectspore"],"moves":["refresh","falseswipe","megadrain","stunspore"]} ], tier: "LC" }, breloom: { viableMoves: {"spore":1,"substitute":1,"leechseed":1,"focuspunch":1,"machpunch":1,"lowsweep":1,"bulletseed":1,"stoneedge":1,"swordsdance":1,"thunderpunch":1}, tier: "OU" }, slakoth: { viableMoves: {"return":1,"hammerarm":1,"firepunch":1,"suckerpunch":1,"gigaimpact":1,"retaliate":1,"toxic":1}, tier: "LC" }, vigoroth: { viableMoves: {"bulkup":1,"return":1,"earthquake":1,"firepunch":1,"suckerpunch":1,"slackoff":1}, tier: "NU" }, slaking: { viableMoves: {"return":1,"earthquake":1,"pursuit":1,"firepunch":1,"suckerpunch":1,"doubleedge":1,"retaliate":1,"gigaimpact":1,"hammerarm":1}, eventPokemon: [ {"generation":4,"level":50,"gender":"M","nature":"Adamant","abilities":["traunt"],"moves":["gigaimpact","return","shadowclaw","aerialace"]} ], tier: "NU" }, nincada: { viableMoves: {"xscissor":1,"toxic":1,"aerialace":1,"nightslash":1}, tier: "LC" }, ninjask: { viableMoves: {"batonpass":1,"swordsdance":1,"substitute":1,"protect":1,"xscissor":1}, tier: "OU" }, shedinja: { viableMoves: {"swordsdance":1,"willowisp":1,"xscissor":1,"shadowsneak":1,"suckerpunch":1}, eventPokemon: [ {"generation":3,"level":50,"abilities":["wonderguard"],"moves":["spite","confuseray","shadowball","grudge"]}, {"generation":3,"level":20,"abilities":["wonderguard"],"moves":["doubleteam","furycutter","screech"]}, {"generation":3,"level":25,"abilities":["wonderguard"],"moves":["swordsdance"]}, {"generation":3,"level":31,"abilities":["wonderguard"],"moves":["slash"]}, {"generation":3,"level":38,"abilities":["wonderguard"],"moves":["agility"]}, {"generation":3,"level":45,"abilities":["wonderguard"],"moves":["batonpass"]}, {"generation":4,"level":52,"abilities":["wonderguard"],"moves":["xscissor"]} ], tier: "NU" }, whismur: { viableMoves: {"hypervoice":1,"fireblast":1,"shadowball":1,"icebeam":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["soundproof"],"moves":["pound","uproar","teeterdance"]} ], tier: "LC" }, loudred: { viableMoves: {"hypervoice":1,"fireblast":1,"shadowball":1,"icebeam":1}, tier: "NFE" }, exploud: { viableMoves: {"hypervoice":1,"overheat":1,"shadowball":1,"icebeam":1,"surf":1,"focusblast":1}, eventPokemon: [ {"generation":3,"level":100,"abilities":["soundproof"],"moves":["roar","rest","sleeptalk","hypervoice"]}, {"generation":3,"level":50,"abilities":["soundproof"],"moves":["stomp","screech","hyperbeam","roar"]} ], tier: "NU" }, makuhita: { viableMoves: {"crosschop":1,"bulletpunch":1,"closecombat":1,"icepunch":1,"bulkup":1}, eventPokemon: [ {"generation":3,"level":18,"abilities":["thickfat","guts"],"moves":["refresh","brickbreak","armthrust","rocktomb"]} ], tier: "LC" }, hariyama: { viableMoves: {"crosschop":1,"bulletpunch":1,"closecombat":1,"icepunch":1,"stoneedge":1,"bulkup":1}, tier: "UU" }, nosepass: { viableMoves: {"stoneedge":1,"toxic":1,"stealthrock":1,"thunderwave":1}, eventPokemon: [ {"generation":3,"level":26,"abilities":["sturdy","magnetpull"],"moves":["helpinghand","thunderbolt","thunderwave","rockslide"]} ], tier: "LC" }, probopass: { viableMoves: {"stealthrock":1,"thunderwave":1,"toxic":1,"earthpower":1,"powergem":1,"voltswitch":1}, tier: "NU" }, skitty: { viableMoves: {"return":1,"suckerpunch":1,"zenheadbutt":1,"thunderwave":1,"fakeout":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["cutecharm"],"moves":["tackle","growl","tailwhip","payday"]}, {"generation":3,"level":5,"abilities":["cutecharm"],"moves":["growl","tackle","tailwhip","rollout"]}, {"generation":3,"level":10,"gender":"M","abilities":["cutecharm","normalize"],"moves":["growl","tackle","tailwhip","attract"]} ], tier: "LC" }, delcatty: { viableMoves: {"return":1,"suckerpunch":1,"zenheadbutt":1,"thunderwave":1,"fakeout":1,"wish":1}, eventPokemon: [ {"generation":3,"level":18,"abilities":["cutecharm"],"moves":["sweetkiss","secretpower","attract","shockwave"]} ], tier: "NU" }, sableye: { viableMoves: {"recover":1,"willowisp":1,"taunt":1,"trick":1,"toxic":1,"nightshade":1,"seismictoss":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["keeneye"],"moves":["leer","scratch","foresight","nightshade"]}, {"generation":3,"level":33,"abilities":["keeneye"],"moves":["helpinghand","shadowball","feintattack","recover"]} ], tier: "NU" }, mawile: { viableMoves: {"swordsdance":1,"ironhead":1,"firefang":1,"crunch":1,"batonpass":1,"substitute":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["hypercutter","intimidate"],"moves":["astonish","faketears"]}, {"generation":3,"level":22,"abilities":["hypercutter","intimidate"],"moves":["sing","falseswipe","vicegrip","irondefense"]} ], tier: "NU" }, aron: { viableMoves: {"headsmash":1,"ironhead":1,"earthquake":1,"superpower":1,"stealthrock":1}, tier: "LC" }, lairon: { viableMoves: {"headsmash":1,"ironhead":1,"earthquake":1,"superpower":1,"stealthrock":1}, tier: "NFE" }, aggron: { viableMoves: {"rockpolish":1,"headsmash":1,"earthquake":1,"superpower":1,"heavyslam":1,"aquatail":1,"icepunch":1,"stealthrock":1,"thunderwave":1}, eventPokemon: [ {"generation":3,"level":100,"abilities":["sturdy","rockhead"],"moves":["irontail","protect","metalsound","doubleedge"]}, {"generation":3,"level":50,"abilities":["sturdy","rockhead"],"moves":["takedown","irontail","protect","metalsound"]} ], tier: "UU" }, meditite: { viableMoves: {"highjumpkick":1,"psychocut":1,"icepunch":1,"thunderpunch":1,"trick":1,"fakeout":1,"bulletpunch":1,"drainpunch":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["purepower"],"moves":["bide","meditate","confusion"]}, {"generation":3,"level":20,"abilities":["purepower"],"moves":["dynamicpunch","confusion","shadowball","detect"]} ], tier: "NU" }, medicham: { viableMoves: {"highjumpkick":1,"drainpunch":1,"psychocut":1,"icepunch":1,"thunderpunch":1,"trick":1,"fakeout":1,"bulletpunch":1}, tier: "NU" }, electrike: { viableMoves: {"voltswitch":1,"thunderbolt":1,"hiddenpowerice":1,"overheat":1,"switcheroo":1,"flamethrower":1}, tier: "LC" }, manectric: { viableMoves: {"voltswitch":1,"thunderbolt":1,"hiddenpowerice":1,"overheat":1,"switcheroo":1,"flamethrower":1}, eventPokemon: [ {"generation":3,"level":44,"abilities":["static","lightningrod"],"moves":["refresh","thunder","raindance","bite"]} ], tier: "NU" }, plusle: { viableMoves: {"nastyplot":1,"thunderbolt":1,"substitute":1,"batonpass":1,"hiddenpowerice":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["plus"],"moves":["growl","thunderwave","watersport"]}, {"generation":3,"level":10,"gender":"M","abilities":["plus"],"moves":["growl","thunderwave","quickattack"]} ], tier: "NU" }, minun: { viableMoves: {"nastyplot":1,"thunderbolt":1,"substitute":1,"batonpass":1,"hiddenpowerice":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["minus"],"moves":["growl","thunderwave","mudsport"]}, {"generation":3,"level":10,"gender":"M","abilities":["minus"],"moves":["growl","thunderwave","quickattack"]} ], tier: "NU" }, volbeat: { viableMoves: {"tailglow":1,"batonpass":1,"substitute":1,"bugbuzz":1,"thunderwave":1,"encore":1}, tier: "NU" }, illumise: { viableMoves: {"substitute":1,"batonpass":1,"wish":1,"bugbuzz":1,"encore":1,"thunderbolt":1}, tier: "NU" }, budew: { viableMoves: {"spikes":1,"toxicspikes":1,"sleeppowder":1,"gigadrain":1,"stunspore":1,"rest":1}, tier: "LC" }, roselia: { viableMoves: {"spikes":1,"toxicspikes":1,"sleeppowder":1,"gigadrain":1,"stunspore":1,"rest":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["naturalcure","poisonpoint"],"moves":["absorb","growth","poisonsting"]}, {"generation":3,"level":22,"abilities":["naturalcure","poisonpoint"],"moves":["sweetkiss","magicalleaf","leechseed","grasswhistle"]} ], tier: "NU" }, roserade: { viableMoves: {"sludgebomb":1,"gigadrain":1,"sleeppowder":1,"leafstorm":1,"spikes":1,"toxicspikes":1,"rest":1,"synthesis":1,"hiddenpowerfire":1}, tier: "OU" }, gulpin: { viableMoves: {"stockpile":1,"sludgebomb":1,"icebeam":1,"toxic":1,"painsplit":1,"yawn":1,"encore":1}, eventPokemon: [ {"generation":3,"level":17,"abilities":["stickyhold","liquidooze"],"moves":["sing","shockwave","sludge","toxic"]} ], tier: "LC" }, swalot: { viableMoves: {"stockpile":1,"sludgebomb":1,"icebeam":1,"toxic":1,"painsplit":1,"yawn":1,"encore":1,"earthquake":1}, tier: "NU" }, carvanha: { viableMoves: {"protect":1,"hydropump":1,"icebeam":1,"waterfall":1,"crunch":1,"hiddenpowergrass":1,"aquajet":1}, eventPokemon: [ {"generation":3,"level":15,"abilities":["roughskin"],"moves":["refresh","waterpulse","bite","scaryface"]} ], tier: "LC" }, sharpedo: { viableMoves: {"protect":1,"hydropump":1,"icebeam":1,"crunch":1,"earthquake":1,"waterfall":1,"hiddenpowergrass":1,"aquajet":1}, tier: "NU" }, wailmer: { viableMoves: {"waterspout":1,"surf":1,"hydropump":1,"icebeam":1,"hiddenpowergrass":1,"hiddenpowerelectric":1}, tier: "LC" }, wailord: { viableMoves: {"waterspout":1,"surf":1,"hydropump":1,"icebeam":1,"hiddenpowergrass":1,"hiddenpowerelectric":1}, eventPokemon: [ {"generation":3,"level":100,"abilities":["waterveil","oblivious"],"moves":["rest","waterspout","amnesia","hydropump"]}, {"generation":3,"level":50,"abilities":["waterveil","oblivious"],"moves":["waterpulse","mist","rest","waterspout"]} ], tier: "NU" }, numel: { viableMoves: {"curse":1,"earthquake":1,"rockslide":1,"fireblast":1,"flamecharge":1,"rest":1,"sleeptalk":1,"stockpile":1}, eventPokemon: [ {"generation":3,"level":14,"abilities":["oblivious"],"moves":["charm","takedown","dig","ember"]} ], tier: "LC" }, camerupt: { viableMoves: {"rockpolish":1,"fireblast":1,"earthpower":1,"stoneedge":1,"lavaplume":1,"stealthrock":1,"earthquake":1}, tier: "NU" }, torkoal: { viableMoves: {"rapidspin":1,"stealthrock":1,"yawn":1,"lavaplume":1,"earthquake":1,"toxic":1,"willowisp":1}, tier: "NU" }, spoink: { viableMoves: {"psychic":1,"reflect":1,"lightscreen":1,"thunderwave":1,"trick":1,"healbell":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["owntempo"],"moves":["splash","uproar"]} ], tier: "LC" }, grumpig: { viableMoves: {"calmmind":1,"psychic":1,"focusblast":1,"shadowball":1,"thunderwave":1,"trick":1,"healbell":1}, tier: "NU" }, spinda: { viableMoves: {"wish":1,"protect":1,"return":1,"superpower":1,"suckerpunch":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["owntempo","tangledfeet"],"moves":["tackle","uproar","sing"]} ], tier: "NU" }, trapinch: { viableMoves: {"earthquake":1,"rockslide":1,"crunch":1,"quickattack":1,"superpower":1}, tier: "LC" }, vibrava: { viableMoves: {"substitute":1,"earthquake":1,"outrage":1,"roost":1,"uturn":1,"superpower":1}, tier: "NFE" }, flygon: { viableMoves: {"earthquake":1,"outrage":1,"dragonclaw":1,"uturn":1,"roost":1,"substitute":1,"stoneedge":1,"firepunch":1,"superpower":1}, eventPokemon: [ {"generation":3,"level":45,"abilities":["levitate"],"moves":["sandtomb","crunch","dragonbreath","screech"]}, {"generation":4,"level":50,"gender":"M","nature":"Naive","abilities":["levitate"],"moves":["dracometeor","uturn","earthquake","dragonclaw"]} ], tier: "OU" }, cacnea: { viableMoves: {"swordsdance":1,"spikes":1,"suckerpunch":1,"seedbomb":1,"drainpunch":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["sandveil"],"moves":["poisonsting","leer","absorb","encore"]} ], tier: "LC" }, cacturne: { viableMoves: {"swordsdance":1,"spikes":1,"suckerpunch":1,"seedbomb":1,"drainpunch":1}, eventPokemon: [ {"generation":3,"level":45,"abilities":["sandveil"],"moves":["ingrain","feintattack","spikes","needlearm"]} ], tier: "NU" }, swablu: { viableMoves: {"roost":1,"toxic":1,"cottonguard":1,"return":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["naturalcure"],"moves":["peck","growl","falseswipe"]} ], tier: "LC" }, altaria: { viableMoves: {"dragondance":1,"outrage":1,"dragonclaw":1,"earthquake":1,"roost":1,"fireblast":1}, eventPokemon: [ {"generation":3,"level":45,"abilities":["naturalcure"],"moves":["takedown","dragonbreath","dragondance","refresh"]}, {"generation":3,"level":36,"abilities":["naturalcure"],"moves":["healbell","dragonbreath","solarbeam","aerialace"]} ], tier: "UU" }, zangoose: { viableMoves: {"swordsdance":1,"closecombat":1,"nightslash":1,"quickattack":1,"facade":1}, eventPokemon: [ {"generation":3,"level":18,"abilities":["immunity"],"moves":["leer","quickattack","swordsdance","furycutter"]}, {"generation":3,"level":10,"gender":"M","abilities":["immunity"],"moves":["scratch","leer","quickattack","swordsdance"]}, {"generation":3,"level":28,"abilities":["immunity"],"moves":["refresh","brickbreak","counter","crushclaw"]} ], tier: "NU" }, seviper: { viableMoves: {"sludgebomb":1,"flamethrower":1,"gigadrain":1,"switcheroo":1,"earthquake":1,"suckerpunch":1,"aquatail":1}, eventPokemon: [ {"generation":3,"level":18,"abilities":["shedskin"],"moves":["wrap","lick","bite","poisontail"]}, {"generation":3,"level":30,"abilities":["shedskin"],"moves":["poisontail","screech","glare","crunch"]}, {"generation":3,"level":10,"gender":"M","abilities":["shedskin"],"moves":["wrap","lick","bite"]} ], tier: "NU" }, lunatone: { viableMoves: {"psychic":1,"earthpower":1,"stealthrock":1,"rockpolish":1,"batonpass":1,"calmmind":1,"icebeam":1,"hiddenpowerrock":1,"moonlight":1}, eventPokemon: [ {"generation":3,"level":10,"abilities":["levitate"],"moves":["tackle","harden","confusion"]}, {"generation":3,"level":25,"abilities":["levitate"],"moves":["batonpass","psychic","raindance","rocktomb"]} ], tier: "NU" }, solrock: { viableMoves: {"stealthrock":1,"explosion":1,"stoneedge":1,"zenheadbutt":1,"earthquake":1,"batonpass":1,"willowisp":1,"rockpolish":1,"morningsun":1}, eventPokemon: [ {"generation":3,"level":10,"abilities":["levitate"],"moves":["tackle","harden","confusion"]}, {"generation":3,"level":41,"abilities":["levitate"],"moves":["batonpass","psychic","sunnyday","cosmicpower"]} ], tier: "NU" }, barboach: { viableMoves: {"dragondance":1,"waterfall":1,"earthquake":1,"return":1}, tier: "LC" }, whiscash: { viableMoves: {"dragondance":1,"waterfall":1,"earthquake":1,"stoneedge":1}, eventPokemon: [ {"generation":4,"level":51,"gender":"F","nature":"Gentle","abilities":["oblivious"],"moves":["earthquake","aquatail","zenheadbutt","gigaimpact"]} ], tier: "NU" }, corphish: { viableMoves: {"dragondance":1,"waterfall":1,"crunch":1,"superpower":1,"swordsdance":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["hypercutter","shellarmor"],"moves":["bubble","watersport"]} ], tier: "LC" }, crawdaunt: { viableMoves: {"dragondance":1,"waterfall":1,"crunch":1,"superpower":1,"swordsdance":1}, eventPokemon: [ {"generation":3,"level":100,"abilities":["hypercutter","shellarmor"],"moves":["taunt","crabhammer","swordsdance","guillotine"]}, {"generation":3,"level":50,"abilities":["hypercutter","shellarmor"],"moves":["knockoff","taunt","crabhammer","swordsdance"]} ], tier: "NU" }, baltoy: { viableMoves: {"stealthrock":1,"earthquake":1,"toxic":1,"psychic":1,"reflect":1,"lightscreen":1,"icebeam":1,"rapidspin":1}, eventPokemon: [ {"generation":3,"level":17,"abilities":["levitate"],"moves":["refresh","rocktomb","mudslap","psybeam"]} ], tier: "LC" }, claydol: { viableMoves: {"stealthrock":1,"toxic":1,"psychic":1,"icebeam":1,"earthquake":1,"rapidspin":1,"reflect":1,"lightscreen":1}, tier: "UU" }, lileep: { viableMoves: {"stealthrock":1,"recover":1,"ancientpower":1,"hiddenpowerfire":1,"gigadrain":1,"stockpile":1}, tier: "LC" }, cradily: { viableMoves: {"stealthrock":1,"recover":1,"stockpile":1,"seedbomb":1,"rockslide":1,"earthquake":1,"curse":1,"swordsdance":1}, tier: "NU" }, anorith: { viableMoves: {"stealthrock":1,"brickbreak":1,"toxic":1,"xscissor":1,"rockslide":1,"swordsdance":1,"rockpolish":1}, tier: "LC" }, armaldo: { viableMoves: {"stealthrock":1,"stoneedge":1,"toxic":1,"xscissor":1,"swordsdance":1,"earthquake":1,"superpower":1}, tier: "NU" }, feebas: { viableMoves: {"protect":1,"confuseray":1,"hypnosis":1,"scald":1,"toxic":1}, tier: "LC" }, milotic: { viableMoves: {"recover":1,"scald":1,"hypnosis":1,"toxic":1,"icebeam":1,"dragontail":1,"rest":1,"sleeptalk":1,"hiddenpowergrass":1}, eventPokemon: [ {"generation":3,"level":35,"abilities":["marvelscale"],"moves":["waterpulse","twister","recover","raindance"]}, {"generation":4,"level":50,"gender":"F","nature":"Bold","abilities":["marvelscale"],"moves":["recover","raindance","icebeam","hydropump"]}, {"generation":4,"level":50,"shiny":true,"gender":"M","nature":"Timid","abilities":["marvelscale"],"moves":["raindance","recover","hydropump","icywind"]} ], tier: "UU" }, castform: { viableMoves: {"sunnyday":1,"raindance":1,"fireblast":1,"hydropump":1,"thunder":1,"icebeam":1,"solarbeam":1}, tier: "NU" }, castformsunny: { tier: "Illegal" }, castformrainy: { tier: "Illegal" }, castformsnowy: { tier: "Illegal" }, kecleon: { viableMoves: {"stealthrock":1,"recover":1,"return":1,"thunderwave":1,"suckerpunch":1}, tier: "NU" }, shuppet: { viableMoves: {"trickroom":1,"destinybond":1,"taunt":1,"shadowsneak":1,"willowisp":1}, eventPokemon: [ {"generation":3,"level":45,"abilities":["insomnia","frisk"],"moves":["spite","willowisp","feintattack","shadowball"]} ], tier: "LC" }, banette: { viableMoves: {"trickroom":1,"destinybond":1,"taunt":1,"shadowclaw":1,"willowisp":1}, eventPokemon: [ {"generation":3,"level":37,"abilities":["insomnia"],"moves":["helpinghand","feintattack","shadowball","curse"]} ], tier: "NU" }, duskull: { viableMoves: {"willowisp":1,"shadowsneak":1,"icebeam":1,"painsplit":1,"substitute":1,"nightshade":1}, eventPokemon: [ {"generation":3,"level":45,"abilities":["levitate"],"moves":["pursuit","curse","willowisp","meanlook"]}, {"generation":3,"level":19,"abilities":["levitate"],"moves":["helpinghand","shadowball","astonish","confuseray"]} ], tier: "LC" }, dusclops: { viableMoves: {"willowisp":1,"shadowsneak":1,"icebeam":1,"painsplit":1,"substitute":1,"seismictoss":1}, tier: "NU" }, dusknoir: { viableMoves: {"willowisp":1,"shadowsneak":1,"icebeam":1,"painsplit":1,"substitute":1,"earthquake":1,"focuspunch":1}, tier: "OU" }, tropius: { viableMoves: {"leechseed":1,"substitute":1,"airslash":1,"gigadrain":1,"earthquake":1,"hiddenpowerfire":1,"roost":1,"leafstorm":1}, eventPokemon: [ {"generation":4,"level":53,"gender":"F","nature":"Jolly","abilities":["chlorophyll"],"moves":["airslash","synthesis","sunnyday","solarbeam"]} ], tier: "NU" }, chingling: { viableMoves: {"hypnosis":1,"reflect":1,"lightscreen":1,"toxic":1,"wish":1,"psychic":1}, tier: "LC" }, chimecho: { viableMoves: {"hypnosis":1,"toxic":1,"wish":1,"psychic":1,"thunderwave":1,"recover":1,"calmmind":1,"shadowball":1,"hiddenpowerfighting":1,"healingwish":1}, eventPokemon: [ {"generation":3,"level":10,"gender":"M","abilities":["levitate"],"moves":["wrap","growl","astonish"]} ], tier: "NU" }, absol: { viableMoves: {"swordsdance":1,"suckerpunch":1,"nightslash":1,"psychocut":1,"superpower":1,"pursuit":1,"megahorn":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["pressure"],"moves":["scratch","leer","wish"]}, {"generation":3,"level":5,"abilities":["pressure"],"moves":["scratch","leer","spite"]}, {"generation":3,"level":35,"abilities":["pressure"],"moves":["razorwind","bite","swordsdance","spite"]}, {"generation":3,"level":70,"abilities":["pressure"],"moves":["doubleteam","slash","futuresight","perishsong"]} ], tier: "UU" }, snorunt: { viableMoves: {"spikes":1,"icebeam":1,"hiddenpowerground":1,"iceshard":1,"crunch":1}, eventPokemon: [ {"generation":3,"level":22,"abilities":["innerfocus"],"moves":["sing","waterpulse","bite","icywind"]} ], tier: "LC" }, glalie: { viableMoves: {"spikes":1,"icebeam":1,"iceshard":1,"crunch":1,"explosion":1,"earthquake":1}, tier: "NU" }, froslass: { viableMoves: {"icebeam":1,"spikes":1,"destinybond":1,"shadowball":1,"substitute":1,"thunderbolt":1,"thunderwave":1}, tier: "BL" }, spheal: { viableMoves: {"substitute":1,"protect":1,"toxic":1,"surf":1,"icebeam":1}, eventPokemon: [ {"generation":3,"level":17,"abilities":["thickfat"],"moves":["charm","aurorabeam","watergun","mudslap"]} ], tier: "LC" }, sealeo: { viableMoves: {"substitute":1,"protect":1,"toxic":1,"surf":1,"icebeam":1}, tier: "NFE" }, walrein: { viableMoves: {"substitute":1,"protect":1,"toxic":1,"surf":1,"icebeam":1,"roar":1}, tier: "NU" }, clamperl: { viableMoves: {"shellsmash":1,"icebeam":1,"surf":1,"hiddenpowergrass":1,"hiddenpowerelectric":1,"substitute":1}, tier: "LC" }, huntail: { viableMoves: {"shellsmash":1,"return":1,"hydropump":1,"batonpass":1,"suckerpunch":1}, tier: "NU" }, gorebyss: { viableMoves: {"shellsmash":1,"batonpass":1,"hydropump":1,"icebeam":1,"hiddenpowergrass":1,"substitute":1}, tier: "NU" }, relicanth: { viableMoves: {"headsmash":1,"waterfall":1,"earthquake":1,"doubleedge":1,"stealthrock":1}, tier: "NU" }, luvdisc: { viableMoves: {"surf":1,"icebeam":1,"toxic":1,"sweetkiss":1,"protect":1}, tier: "NU" }, bagon: { viableMoves: {"outrage":1,"dragondance":1,"firefang":1,"rockslide":1,"dragonclaw":1}, eventPokemon: [ {"generation":3,"level":5,"moves":["rage","bite","wish"]}, {"generation":3,"level":5,"moves":["rage","bite","irondefense"]} ], tier: "LC" }, shelgon: { viableMoves: {"outrage":1,"brickbreak":1,"dragonclaw":1,"dragondance":1}, tier: "NU" }, salamence: { viableMoves: {"outrage":1,"fireblast":1,"earthquake":1,"dracometeor":1,"roost":1,"dragondance":1,"dragonclaw":1}, eventPokemon: [ {"generation":3,"level":50,"moves":["protect","dragonbreath","scaryface","fly"]}, {"generation":3,"level":50,"moves":["refresh","dragonclaw","dragondance","aerialace"]}, {"generation":4,"level":50,"gender":"M","nature":"Naughty","moves":["hydropump","stoneedge","fireblast","dragonclaw"]} ], tier: "Uber" }, beldum: { viableMoves: {"ironhead":1,"zenheadbutt":1,"headbutt":1,"irondefense":1}, tier: "LC" }, metang: { viableMoves: {"stealthrock":1,"meteormash":1,"toxic":1,"earthquake":1,"bulletpunch":1}, eventPokemon: [ {"generation":3,"level":30,"abilities":["clearbody"],"moves":["takedown","confusion","metalclaw","refresh"]} ], tier: "NU" }, metagross: { viableMoves: {"meteormash":1,"earthquake":1,"agility":1,"stealthrock":1,"zenheadbutt":1,"bulletpunch":1,"trick":1}, eventPokemon: [ {"generation":4,"level":62,"nature":"Brave","abilities":["clearbody"],"moves":["bulletpunch","meteormash","hammerarm","zenheadbutt"]} ], tier: "OU" }, regirock: { viableMoves: {"stealthrock":1,"thunderwave":1,"stoneedge":1,"earthquake":1,"curse":1,"rest":1,"sleeptalk":1,"rockslide":1,"toxic":1}, eventPokemon: [ {"generation":3,"level":40,"abilities":["clearbody"],"moves":["curse","superpower","ancientpower","hyperbeam"]} ], tier: "NU" }, regice: { viableMoves: {"thunderwave":1,"icebeam":1,"thunderbolt":1,"rest":1,"sleeptalk":1,"focusblast":1}, eventPokemon: [ {"generation":3,"level":40,"abilities":["clearbody"],"moves":["curse","superpower","ancientpower","hyperbeam"]} ], tier: "NU" }, registeel: { viableMoves: {"stealthrock":1,"ironhead":1,"curse":1,"rest":1,"thunderwave":1,"toxic":1}, eventPokemon: [ {"generation":3,"level":40,"abilities":["clearbody"],"moves":["curse","superpower","ancientpower","hyperbeam"]} ], tier: "UU" }, latias: { viableMoves: {"dragonpulse":1,"surf":1,"hiddenpowerfire":1,"roost":1,"calmmind":1,"wish":1,"healingwish":1}, eventPokemon: [ {"generation":3,"level":50,"gender":"F","abilities":["levitate"],"moves":["charm","recover","psychic","mistball"]}, {"generation":3,"level":70,"gender":"F","abilities":["levitate"],"moves":["mistball","psychic","recover","charm"]}, {"generation":4,"level":40,"gender":"F","abilities":["levitate"],"moves":["watersport","refresh","mistball","zenheadbutt"]} ], tier: "Uber" }, latios: { viableMoves: {"dracometeor":1,"dragonpulse":1,"surf":1,"hiddenpowerfire":1,"psyshock":1,"roost":1}, eventPokemon: [ {"generation":3,"level":50,"gender":"M","abilities":["levitate"],"moves":["dragondance","recover","psychic","lusterpurge"]}, {"generation":3,"level":70,"gender":"M","abilities":["levitate"],"moves":["lusterpurge","psychic","recover","dragondance"]}, {"generation":4,"level":40,"gender":"M","abilities":["levitate"],"moves":["protect","refresh","lusterpurge","zenheadbutt"]} ], tier: "Uber" }, kyogre: { viableMoves: {"waterspout":1,"surf":1,"thunder":1,"icebeam":1,"calmmind":1,"rest":1,"sleeptalk":1}, tier: "Uber" }, groudon: { viableMoves: {"earthquake":1,"dragontail":1,"stealthrock":1,"stoneedge":1,"swordsdance":1,"rockpolish":1,"thunderwave":1,"firepunch":1}, tier: "Uber" }, rayquaza: { viableMoves: {"outrage":1,"vcreate":1,"extremespeed":1,"dragondance":1,"swordsdance":1,"dracometeor":1,"dragonclaw":1}, tier: "Uber" }, jirachi: { viableMoves: {"ironhead":1,"firepunch":1,"thunderwave":1,"stealthrock":1,"wish":1,"uturn":1,"calmmind":1,"psychic":1,"thunder":1,"icepunch":1,"flashcannon":1}, eventPokemon: [ {"generation":3,"level":5,"abilities":["serenegrace"],"moves":["wish","confusion","rest"]}, {"generation":3,"level":30,"abilities":["serenegrace"],"moves":["helpinghand","psychic","refresh","rest"]}, {"generation":4,"level":5,"abilities":["serenegrace"],"moves":["wish","confusion","rest"]}, {"generation":4,"level":5,"abilities":["serenegrace"],"moves":["wish","confusion","rest","dracometeor"]} ], tier: "OU" }, deoxys: { viableMoves: {"psychoboost":1,"superpower":1,"extremespeed":1,"icebeam":1,"thunderbolt":1,"firepunch":1,"spikes":1,"stealthrock":1}, eventPokemon: [ {"generation":3,"level":30,"abilities":["pressure"],"moves":["snatch","psychic","spikes","knockoff"]}, {"generation":3,"level":30,"abilities":["pressure"],"moves":["superpower","psychic","pursuit","taunt"]}, {"generation":3,"level":30,"abilities":["pressure"],"moves":["swift","psychic","pursuit","knockoff"]}, {"generation":3,"level":70,"abilities":["pressure"],"moves":["cosmicpower","recover","psychoboost","hyperbeam"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","zapcannon","irondefense","extremespeed"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","swift","doubleteam","extremespeed"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","detect","counter","mirrorcoat"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","meteormash","superpower","hyperbeam"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","leer","wrap","nightshade"]} ], tier: "Uber" }, deoxysattack: { viableMoves: {"psychoboost":1,"superpower":1,"extremespeed":1,"icebeam":1,"thunderbolt":1,"firepunch":1,"spikes":1,"stealthrock":1}, eventPokemon: [ {"generation":3,"level":30,"abilities":["pressure"],"moves":["snatch","psychic","spikes","knockoff"]}, {"generation":3,"level":30,"abilities":["pressure"],"moves":["superpower","psychic","pursuit","taunt"]}, {"generation":3,"level":30,"abilities":["pressure"],"moves":["swift","psychic","pursuit","knockoff"]}, {"generation":3,"level":70,"abilities":["pressure"],"moves":["cosmicpower","recover","psychoboost","hyperbeam"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","zapcannon","irondefense","extremespeed"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","swift","doubleteam","extremespeed"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","detect","counter","mirrorcoat"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","meteormash","superpower","hyperbeam"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","leer","wrap","nightshade"]} ], tier: "Uber" }, deoxysdefense: { viableMoves: {"spikes":1,"stealthrock":1,"recover":1,"taunt":1,"toxic":1,"agility":1,"seismictoss":1,"magiccoat":1}, eventPokemon: [ {"generation":3,"level":30,"abilities":["pressure"],"moves":["snatch","psychic","spikes","knockoff"]}, {"generation":3,"level":30,"abilities":["pressure"],"moves":["superpower","psychic","pursuit","taunt"]}, {"generation":3,"level":30,"abilities":["pressure"],"moves":["swift","psychic","pursuit","knockoff"]}, {"generation":3,"level":70,"abilities":["pressure"],"moves":["cosmicpower","recover","psychoboost","hyperbeam"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","zapcannon","irondefense","extremespeed"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","swift","doubleteam","extremespeed"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","detect","counter","mirrorcoat"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","meteormash","superpower","hyperbeam"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","leer","wrap","nightshade"]} ], tier: "Uber" }, deoxysspeed: { viableMoves: {"spikes":1,"stealthrock":1,"superpower":1,"icebeam":1,"psychoboost":1,"taunt":1,"lightscreen":1,"reflect":1,"magiccoat":1,"trick":1}, eventPokemon: [ {"generation":3,"level":30,"abilities":["pressure"],"moves":["snatch","psychic","spikes","knockoff"]}, {"generation":3,"level":30,"abilities":["pressure"],"moves":["superpower","psychic","pursuit","taunt"]}, {"generation":3,"level":30,"abilities":["pressure"],"moves":["swift","psychic","pursuit","knockoff"]}, {"generation":3,"level":70,"abilities":["pressure"],"moves":["cosmicpower","recover","psychoboost","hyperbeam"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","zapcannon","irondefense","extremespeed"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","swift","doubleteam","extremespeed"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","detect","counter","mirrorcoat"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","meteormash","superpower","hyperbeam"]}, {"generation":4,"level":50,"abilities":["pressure"],"moves":["psychoboost","leer","wrap","nightshade"]} ], tier: "Uber" }, turtwig: { viableMoves: {"reflect":1,"lightscreen":1,"stealthrock":1,"seedbomb":1,"substitute":1,"leechseed":1,"toxic":1}, tier: "LC" }, grotle: { viableMoves: {"reflect":1,"lightscreen":1,"stealthrock":1,"seedbomb":1,"substitute":1,"leechseed":1,"toxic":1}, tier: "NFE" }, torterra: { viableMoves: {"stealthrock":1,"earthquake":1,"woodhammer":1,"stoneedge":1,"synthesis":1,"leechseed":1}, tier: "UU" }, chimchar: { viableMoves: {"stealthrock":1,"overheat":1,"hiddenpowergrass":1,"fakeout":1}, eventPokemon: [ {"generation":4,"level":40,"gender":"M","nature":"Mild","abilities":["blaze"],"moves":["flamethrower","thunderpunch","grassknot","helpinghand"]}, {"generation":4,"level":40,"gender":"M","nature":"Hardy","abilities":["blaze"],"moves":["flamethrower","thunderpunch","grassknot","helpinghand"]} ], tier: "LC" }, monferno: { viableMoves: {"stealthrock":1,"overheat":1,"hiddenpowergrass":1,"fakeout":1,"vacuumwave":1}, tier: "NU" }, infernape: { viableMoves: {"stealthrock":1,"fireblast":1,"closecombat":1,"uturn":1,"grassknot":1,"stoneedge":1,"machpunch":1,"swordsdance":1,"nastyplot":1,"flareblitz":1,"hiddenpowerice":1,"thunderpunch":1}, tier: "OU" }, piplup: { viableMoves: {"stealthrock":1,"hydropump":1,"scald":1,"icebeam":1,"hiddenpowerelectric":1,"hiddenpowerfire":1,"yawn":1}, tier: "LC" }, prinplup: { viableMoves: {"stealthrock":1,"hydropump":1,"scald":1,"icebeam":1,"hiddenpowerelectric":1,"hiddenpowerfire":1,"yawn":1}, tier: "NFE" }, empoleon: { viableMoves: {"stealthrock":1,"hydropump":1,"scald":1,"icebeam":1,"hiddenpowerelectric":1,"hiddenpowerfire":1,"roar":1,"grassknot":1}, tier: "OU" }, starly: { viableMoves: {"bravebird":1,"return":1,"uturn":1,"pursuit":1}, eventPokemon: [ {"generation":4,"level":1,"gender":"M","nature":"Mild","abilities":["keeneye"],"moves":["tackle","growl"]} ], tier: "LC" }, staravia: { viableMoves: {"bravebird":1,"return":1,"uturn":1,"pursuit":1}, tier: "NFE" }, staraptor: { viableMoves: {"bravebird":1,"closecombat":1,"return":1,"uturn":1,"quickattack":1,"substitute":1,"roost":1,"doubleedge":1}, tier: "BL" }, bidoof: { viableMoves: {"return":1,"aquatail":1,"curse":1,"quickattack":1,"stealthrock":1}, eventPokemon: [ {"generation":4,"level":1,"gender":"M","nature":"Lonely","abilities":["simple"],"moves":["tackle"]} ], tier: "LC" }, bibarel: { viableMoves: {"return":1,"waterfall":1,"curse":1,"quickattack":1,"stealthrock":1}, tier: "NU" }, kricketot: { viableMoves: {"endeavor":1,"mudslap":1,"bugbite":1,"strugglebug":1}, tier: "LC" }, kricketune: { viableMoves: {"swordsdance":1,"bugbite":1,"aerialace":1,"brickbreak":1,"toxic":1}, tier: "NU" }, shinx: { viableMoves: {"wildcharge":1,"icefang":1,"firefang":1,"crunch":1}, tier: "LC" }, luxio: { viableMoves: {"wildcharge":1,"icefang":1,"firefang":1,"crunch":1}, tier: "NFE" }, luxray: { viableMoves: {"wildcharge":1,"icefang":1,"firefang":1,"crunch":1,"superpower":1}, tier: "NU" }, cranidos: { viableMoves: {"headsmash":1,"rockslide":1,"earthquake":1,"zenheadbutt":1,"firepunch":1,"rockpolish":1,"crunch":1}, tier: "LC" }, rampardos: { viableMoves: {"headsmash":1,"rockslide":1,"earthquake":1,"zenheadbutt":1,"firepunch":1,"rockpolish":1,"crunch":1}, tier: "NU" }, shieldon: { viableMoves: {"stealthrock":1,"metalburst":1,"fireblast":1,"icebeam":1,"protect":1,"toxic":1,"roar":1}, tier: "LC" }, bastiodon: { viableMoves: {"stealthrock":1,"metalburst":1,"fireblast":1,"icebeam":1,"protect":1,"toxic":1,"roar":1}, tier: "NU" }, burmy: { viableMoves: {"bugbite":1,"hiddenpowerice":1,"electroweb":1,"protect":1}, tier: "LC" }, wormadam: { viableMoves: {"leafstorm":1,"gigadrain":1,"signalbeam":1,"hiddenpowerice":1,"hiddenpowerrock":1,"toxic":1,"psychic":1,"protect":1}, tier: "NU" }, wormadamsandy: { viableMoves: {"earthquake":1,"toxic":1,"bugbite":1,"protect":1,"suckerpunch":1}, tier: "NU" }, wormadamtrash: { viableMoves: {"stealthrock":1,"toxic":1,"ironhead":1,"protect":1}, tier: "NU" }, mothim: { viableMoves: {"quiverdance":1,"bugbuzz":1,"airslash":1,"gigadrain":1,"roost":1}, tier: "NU" }, combee: { viableMoves: {"bugbuzz":1,"aircutter":1,"endeavor":1,"ominouswind":1}, tier: "LC" }, vespiquen: { viableMoves: {"substitute":1,"roost":1,"toxic":1,"attackorder":1,"protect":1,"defendorder":1}, tier: "NU" }, pachirisu: { viableMoves: {"lightscreen":1,"discharge":1,"superfang":1,"toxic":1,"voltswitch":1}, tier: "NU" }, buizel: { viableMoves: {"waterfall":1,"return":1,"aquajet":1,"switcheroo":1,"brickbreak":1,"bulkup":1,"batonpass":1,"icepunch":1}, tier: "LC" }, floatzel: { viableMoves: {"waterfall":1,"return":1,"aquajet":1,"switcheroo":1,"brickbreak":1,"bulkup":1,"batonpass":1,"icepunch":1,"crunch":1}, tier: "NU" }, cherubi: { viableMoves: {"sunnyday":1,"solarbeam":1,"weatherball":1,"hiddenpowerice":1}, tier: "LC" }, cherrim: { viableMoves: {"sunnyday":1,"solarbeam":1,"weatherball":1,"hiddenpowerice":1}, tier: "NU" }, shellos: { viableMoves: {"scald":1,"clearsmog":1,"recover":1,"toxic":1,"icebeam":1}, tier: "LC" }, gastrodon: { viableMoves: {"earthpower":1,"icebeam":1,"scald":1,"toxic":1,"recover":1,"clearsmog":1}, tier: "NU" }, drifloon: { viableMoves: {"acrobatics":1,"shadowball":1,"substitute":1,"calmmind":1,"hypnosis":1,"hiddenpowerfighting":1,"thunderbolt":1,"destinybond":1,"willowisp":1,"stockpile":1,"batonpass":1}, tier: "LC" }, drifblim: { viableMoves: {"acrobatics":1,"shadowball":1,"substitute":1,"calmmind":1,"hypnosis":1,"hiddenpowerfighting":1,"thunderbolt":1,"destinybond":1,"willowisp":1,"stockpile":1,"batonpass":1}, tier: "NU" }, buneary: { viableMoves: {"fakeout":1,"return":1,"switcheroo":1,"thunderpunch":1,"jumpkick":1,"quickattack":1,"firepunch":1,"circlethrow":1,"icepunch":1,"healingwish":1}, tier: "LC" }, lopunny: { viableMoves: {"fakeout":1,"return":1,"switcheroo":1,"thunderpunch":1,"jumpkick":1,"quickattack":1,"firepunch":1,"circlethrow":1,"icepunch":1,"healingwish":1}, tier: "NU" }, glameow: { viableMoves: {"fakeout":1,"uturn":1,"suckerpunch":1,"hypnosis":1,"quickattack":1,"return":1,"foulplay":1}, tier: "LC" }, purugly: { viableMoves: {"fakeout":1,"uturn":1,"suckerpunch":1,"hypnosis":1,"quickattack":1,"return":1}, tier: "NU" }, stunky: { viableMoves: {"pursuit":1,"suckerpunch":1,"crunch":1,"fireblast":1,"explosion":1,"taunt":1}, tier: "LC" }, skuntank: { viableMoves: {"pursuit":1,"suckerpunch":1,"crunch":1,"fireblast":1,"explosion":1,"taunt":1,"poisonjab":1}, tier: "NU" }, bronzor: { viableMoves: {"stealthrock":1,"psychic":1,"toxic":1,"hypnosis":1,"reflect":1,"lightscreen":1,"trickroom":1,"explosion":1}, tier: "LC" }, bronzong: { viableMoves: {"stealthrock":1,"psychic":1,"earthquake":1,"toxic":1,"hypnosis":1,"reflect":1,"lightscreen":1,"trickroom":1,"explosion":1}, tier: "OU" }, chatot: { viableMoves: {"nastyplot":1,"hypervoice":1,"heatwave":1,"hiddenpowergrass":1,"substitute":1,"chatter":1}, eventPokemon: [ {"generation":4,"level":25,"gender":"M","nature":"Jolly","abilities":["keeneye"],"moves":["mirrormove","furyattack","chatter","taunt"]} ], tier: "NU" }, spiritomb: { viableMoves: {"shadowsneak":1,"suckerpunch":1,"pursuit":1,"trick":1,"willowisp":1,"calmmind":1,"darkpulse":1,"rest":1,"sleeptalk":1}, tier: "UU" }, gible: { viableMoves: {"outrage":1,"dragonclaw":1,"earthquake":1,"fireblast":1,"stoneedge":1,"stealthrock":1}, tier: "LC" }, gabite: { viableMoves: {"outrage":1,"dragonclaw":1,"earthquake":1,"fireblast":1,"stoneedge":1,"stealthrock":1}, tier: "NU" }, garchomp: { viableMoves: {"outrage":1,"dragonclaw":1,"earthquake":1,"stoneedge":1,"firefang":1,"swordsdance":1}, tier: "Uber" }, riolu: { viableMoves: {"crunch":1,"roar":1,"copycat":1,"drainpunch":1}, eventPokemon: [ {"generation":4,"level":30,"gender":"M","nature":"Serious","abilities":["steadfast"],"moves":["aurasphere","shadowclaw","bulletpunch","drainpunch"]} ], tier: "LC" }, lucario: { viableMoves: {"swordsdance":1,"closecombat":1,"crunch":1,"extremespeed":1,"icepunch":1,"bulletpunch":1,"nastyplot":1,"aurasphere":1,"darkpulse":1,"vacuumwave":1}, eventPokemon: [ {"generation":4,"level":50,"gender":"M","nature":"Modest","abilities":["steadfast"],"moves":["aurasphere","darkpulse","dragonpulse","waterpulse"]}, {"generation":4,"level":30,"gender":"M","nature":"Adamant","abilities":["innerfocus"],"moves":["forcepalm","bonerush","sunnyday","blazekick"]} ], tier: "OU" }, hippopotas: { viableMoves: {"earthquake":1,"slackoff":1,"roar":1,"stealthrock":1,"protect":1,"toxic":1}, tier: "LC" }, hippowdon: { viableMoves: {"earthquake":1,"slackoff":1,"roar":1,"stealthrock":1,"protect":1,"toxic":1,"icefang":1,"stoneedge":1,"stockpile":1}, tier: "OU" }, skorupi: { viableMoves: {"toxicspikes":1,"xscissor":1,"poisonjab":1,"protect":1}, tier: "LC" }, drapion: { viableMoves: {"crunch":1,"whirlwind":1,"toxicspikes":1,"pursuit":1,"earthquake":1,"aquatail":1,"swordsdance":1,"poisonjab":1,"rest":1,"sleeptalk":1}, tier: "UU" }, croagunk: { viableMoves: {"fakeout":1,"vacuumwave":1,"suckerpunch":1,"drainpunch":1,"darkpulse":1}, tier: "LC" }, toxicroak: { viableMoves: {"fakeout":1,"suckerpunch":1,"drainpunch":1,"bulkup":1,"substitute":1,"swordsdance":1,"crosschop":1,"icepunch":1}, tier: "UU" }, carnivine: { viableMoves: {"swordsdance":1,"powerwhip":1,"return":1,"sleeppowder":1,"substitute":1,"leechseed":1}, tier: "NU" }, finneon: { viableMoves: {"surf":1,"uturn":1,"icebeam":1,"hiddenpowerelectric":1,"hiddenpowergrass":1,"raindance":1}, tier: "LC" }, lumineon: { viableMoves: {"surf":1,"uturn":1,"icebeam":1,"hiddenpowerelectric":1,"hiddenpowergrass":1,"raindance":1}, tier: "NU" }, snover: { viableMoves: {"blizzard":1,"iceshard":1,"gigadrain":1,"leechseed":1,"substitute":1}, tier: "LC" }, abomasnow: { viableMoves: {"blizzard":1,"iceshard":1,"gigadrain":1,"leechseed":1,"substitute":1,"focusblast":1}, tier: "BL" }, rotom: { viableMoves: {"thunderbolt":1,"discharge":1,"voltswitch":1,"shadowball":1,"substitute":1,"painsplit":1,"hiddenpowerice":1,"hiddenpowerfighting":1,"willowisp":1,"rest":1,"sleeptalk":1,"trick":1}, tier: "UU" }, rotomheat: { viableMoves: {"thunderbolt":1,"discharge":1,"voltswitch":1,"substitute":1,"painsplit":1,"hiddenpowerice":1,"willowisp":1,"rest":1,"sleeptalk":1,"overheat":1,"trick":1}, tier: "OU" }, rotomwash: { viableMoves: {"thunderbolt":1,"discharge":1,"voltswitch":1,"substitute":1,"painsplit":1,"hiddenpowerice":1,"willowisp":1,"rest":1,"sleeptalk":1,"trick":1,"hydropump":1}, tier: "OU" }, rotomfrost: { viableMoves: {"thunderbolt":1,"discharge":1,"voltswitch":1,"substitute":1,"painsplit":1,"hiddenpowerfighting":1,"willowisp":1,"rest":1,"sleeptalk":1,"trick":1,"blizzard":1}, tier: "OU" }, rotomfan: { viableMoves: {"thunderbolt":1,"discharge":1,"voltswitch":1,"thunderwave":1,"substitute":1,"painsplit":1,"hiddenpowerfighting":1,"willowisp":1,"rest":1,"sleeptalk":1,"trick":1,"airslash":1,"confuseray":1}, tier: "OU" }, rotommow: { viableMoves: {"thunderbolt":1,"discharge":1,"voltswitch":1,"substitute":1,"painsplit":1,"hiddenpowerice":1,"willowisp":1,"rest":1,"sleeptalk":1,"trick":1,"leafstorm":1}, tier: "OU" }, uxie: { viableMoves: {"reflect":1,"lightscreen":1,"uturn":1,"psychic":1,"thunderwave":1,"yawn":1,"healbell":1,"stealthrock":1,"trick":1,"toxic":1}, tier: "UU" }, mesprit: { viableMoves: {"calmmind":1,"psychic":1,"thunderbolt":1,"icebeam":1,"substitute":1,"healingwish":1,"uturn":1,"trick":1,"stealthrock":1}, tier: "UU" }, azelf: { viableMoves: {"nastyplot":1,"psychic":1,"fireblast":1,"grassknot":1,"thunderbolt":1,"icepunch":1,"uturn":1,"trick":1,"taunt":1,"stealthrock":1,"explosion":1}, tier: "OU" }, dialga: { viableMoves: {"stealthrock":1,"dracometeor":1,"dragonpulse":1,"roar":1,"dragontail":1,"thunderbolt":1,"outrage":1,"bulkup":1,"fireblast":1,"aurasphere":1,"rest":1,"sleeptalk":1,"dragonclaw":1}, tier: "Uber" }, palkia: { viableMoves: {"spacialrend":1,"dracometeor":1,"surf":1,"hydropump":1,"thunderbolt":1,"outrage":1,"fireblast":1}, tier: "Uber" }, heatran: { viableMoves: {"substitute":1,"fireblast":1,"lavaplume":1,"willowisp":1,"stealthrock":1,"earthpower":1,"hiddenpowergrass":1,"hiddenpowerice":1,"dragonpulse":1,"protect":1,"toxic":1,"roar":1,"overheat":1}, eventPokemon: [ {"generation":4,"level":50,"nature":"Quiet","abilities":["flashfire"],"moves":["eruption","magmastorm","earthpower","ancientpower"]} ], tier: "OU" }, regigigas: { viableMoves: {"thunderwave":1,"substitute":1,"return":1,"drainpunch":1,"earthquake":1,"firepunch":1,"toxic":1,"confuseray":1}, eventPokemon: [ {"generation":4,"level":100,"abilities":["slowstart"],"moves":["ironhead","rockslide","icywind","crushgrip"]} ], tier: "NU" }, giratina: { viableMoves: {"rest":1,"sleeptalk":1,"dragontail":1,"roar":1,"willowisp":1,"calmmind":1,"dragonpulse":1,"shadowball":1}, tier: "Uber" }, giratinaorigin: { viableMoves: {"dracometeor":1,"shadowsneak":1,"dragontail":1,"hiddenpowerfire":1,"willowisp":1,"calmmind":1,"substitute":1,"dragonpulse":1,"shadowball":1,"aurasphere":1,"outrage":1}, requiredItem: "Griseous Orb", tier: "Uber" }, cresselia: { viableMoves: {"moonlight":1,"psychic":1,"icebeam":1,"thunderwave":1,"toxic":1,"lunardance":1,"rest":1,"sleeptalk":1,"calmmind":1,"reflect":1,"lightscreen":1}, tier: "BL" }, phione: { viableMoves: {"raindance":1,"scald":1,"uturn":1,"rest":1,"icebeam":1,"surf":1}, eventPokemon: [ {"generation":4,"level":50,"abilities":["hydration"],"moves":["grassknot","raindance","rest","surf"]} ], tier: "NU" }, manaphy: { viableMoves: {"tailglow":1,"surf":1,"icebeam":1,"grassknot":1}, eventPokemon: [ {"generation":4,"level":5,"abilities":["hydration"],"moves":["tailglow","bubble","watersport"]}, {"generation":4,"level":1,"abilities":["hydration"],"moves":["tailglow","bubble","watersport"]}, {"generation":4,"level":50,"abilities":["hydration"],"moves":["acidarmor","whirlpool","waterpulse","heartswap"]}, {"generation":4,"level":50,"abilities":["hydration"],"moves":["heartswap","waterpulse","whirlpool","acidarmor"]}, {"generation":4,"level":50,"abilities":["hydration"],"moves":["heartswap","whirlpool","waterpulse","acidarmor"]}, {"generation":4,"level":50,"nature":"Impish","abilities":["hydration"],"moves":["aquaring","waterpulse","watersport","heartswap"]} ], tier: "Uber" }, darkrai: { viableMoves: {"darkvoid":1,"darkpulse":1,"focusblast":1,"nastyplot":1,"substitute":1,"trick":1}, eventPokemon: [ {"generation":4,"level":50,"abilities":["baddreams"],"moves":["roaroftime","spacialrend","nightmare","hypnosis"]}, {"generation":4,"level":50,"abilities":["baddreams"],"moves":["darkvoid","darkpulse","shadowball","doubleteam"]}, {"generation":4,"level":50,"abilities":["baddreams"],"moves":["nightmare","hypnosis","roaroftime","spacialrend"]}, {"generation":4,"level":50,"abilities":["baddreams"],"moves":["doubleteam","nightmare","feintattack","hypnosis"]} ], tier: "Uber" }, shaymin: { viableMoves: {"seedflare":1,"earthpower":1,"airslash":1,"hiddenpowerfire":1,"rest":1,"substitute":1,"leechseed":1}, eventPokemon: [ {"generation":4,"level":50,"abilities":["naturalcure"],"moves":["seedflare","aromatherapy","substitute","energyball"]}, {"generation":4,"level":30,"abilities":["naturalcure"],"moves":["synthesis","leechseed","magicalleaf","growth"]}, {"generation":4,"level":30,"abilities":["naturalcure"],"moves":["growth","magicalleaf","leechseed","synthesis"]} ], tier: "OU" }, shayminsky: { viableMoves: {"seedflare":1,"earthpower":1,"airslash":1,"hiddenpowerice":1,"hiddenpowerfire":1,"substitute":1,"leechseed":1}, eventPokemon: [ {"generation":4,"level":50,"abilities":["naturalcure"],"moves":["seedflare","aromatherapy","substitute","energyball"]}, {"generation":4,"level":30,"abilities":["naturalcure"],"moves":["synthesis","leechseed","magicalleaf","growth"]}, {"generation":4,"level":30,"abilities":["naturalcure"],"moves":["growth","magicalleaf","leechseed","synthesis"]} ], tier: "Uber" }, arceus: { viableMoves: {"swordsdance":1,"extremespeed":1,"shadowclaw":1,"earthquake":1,"recover":1}, eventPokemon: [ {"generation":4,"level":100,"abilities":["multitype"],"moves":["judgment","roaroftime","spacialrend","shadowforce"]} ], tier: "Uber" }, arceusbug: { viableMoves: {"swordsdance":1,"xscissor":1,"stoneedge":1,"recover":1,"calmmind":1,"judgment":1,"icebeam":1,"fireblast":1}, requiredItem: "Insect Plate" }, arceusdark: { viableMoves: {"calmmind":1,"judgment":1,"recover":1,"refresh":1}, requiredItem: "Dread Plate" }, arceusdragon: { viableMoves: {"swordsdance":1,"outrage":1,"extremespeed":1,"earthquake":1,"recover":1}, requiredItem: "Draco Plate" }, arceuselectric: { viableMoves: {"calmmind":1,"judgment":1,"recover":1,"icebeam":1}, requiredItem: "Zap Plate" }, arceusfighting: { viableMoves: {"calmmind":1,"judgment":1,"icebeam":1,"darkpulse":1,"recover":1,"toxic":1}, requiredItem: "Fist Plate" }, arceusfire: { viableMoves: {"calmmind":1,"flamethrower":1,"fireblast":1,"thunderbolt":1,"recover":1}, requiredItem: "Flame Plate" }, arceusflying: { viableMoves: {"calmmind":1,"judgment":1,"refresh":1,"recover":1}, requiredItem: "Sky Plate" }, arceusghost: { viableMoves: {"calmmind":1,"judgment":1,"focusblast":1,"flamethrower":1,"recover":1,"swordsdance":1,"shadowclaw":1,"brickbreak":1,"willowisp":1,"roar":1}, requiredItem: "Spooky Plate" }, arceusgrass: { viableMoves: {"calmmind":1,"icebeam":1,"judgment":1,"earthpower":1,"recover":1,"stealthrock":1,"thunderwave":1}, requiredItem: "Meadow Plate" }, arceusground: { viableMoves: {"swordsdance":1,"earthquake":1,"stoneedge":1,"recover":1,"calmmind":1,"judgment":1,"icebeam":1,"stealthrock":1}, requiredItem: "Earth Plate" }, arceusice: { viableMoves: {"calmmind":1,"judgment":1,"icebeam":1,"thunderbolt":1,"focusblast":1,"recover":1}, requiredItem: "Icicle Plate" }, arceuspoison: { viableMoves: {"calmmind":1,"judgment":1,"sludgebomb":1,"focusblast":1,"fireblast":1,"recover":1,"willowisp":1,"icebeam":1,"stealthrock":1}, requiredItem: "Toxic Plate" }, arceuspsychic: { viableMoves: {"calmmind":1,"psyshock":1,"focusblast":1,"recover":1,"willowisp":1,"judgment":1}, requiredItem: "Mind Plate" }, arceusrock: { viableMoves: {"calmmind":1,"judgment":1,"recover":1,"willowisp":1,"swordsdance":1,"stoneedge":1,"earthquake":1,"refresh":1}, requiredItem: "Stone Plate" }, arceussteel: { viableMoves: {"calmmind":1,"judgment":1,"recover":1,"roar":1,"willowisp":1,"swordsdance":1,"ironhead":1}, requiredItem: "Iron Plate" }, arceuswater: { viableMoves: {"swordsdance":1,"waterfall":1,"extremespeed":1,"dragonclaw":1,"recover":1,"calmmind":1,"judgment":1,"icebeam":1,"fireblast":1}, requiredItem: "Splash Plate" }, missingno: { isNonstandard: true, tier: "" }, syclant: { viableMoves: {"bugbuzz":1,"icebeam":1,"blizzard":1,"earthpower":1,"spikes":1,"superpower":1,"tailglow":1,"uturn":1,"focusblast":1}, isNonstandard: true, tier: "G4CAP" }, revenankh: { viableMoves: {"bulkup":1,"shadowsneak":1,"drainpunch":1,"moonlight":1,"powerwhip":1,"icepunch":1}, isNonstandard: true, tier: "G4CAP" }, pyroak: { viableMoves: {"leechseed":1,"lavaplume":1,"substitute":1,"protect":1}, isNonstandard: true, tier: "G4CAP" }, fidgit: { viableMoves: {"spikes":1,"stealthrock":1,"toxicspikes":1,"wish":1,"rapidspin":1,"encore":1,"uturn":1,"sludgebomb":1}, isNonstandard: true, tier: "G4CAP" }, stratagem: { viableMoves: {"paleowave":1,"earthpower":1,"fireblast":1,"gigadrain":1,"calmmind":1}, isNonstandard: true, tier: "G4CAP" }, arghonaut: { viableMoves: {"recover":1,"bulkup":1,"waterfall":1,"crosschop":1,"stoneedge":1,"thunderpunch":1}, isNonstandard: true, tier: "G4CAP" }, kitsunoh: { viableMoves: {"shadowstrike":1,"superpower":1,"meteormash":1,"uturn":1,"icepunch":1,"thunderpunch":1,"trick":1,"willowisp":1}, isNonstandard: true, tier: "G4CAP" }, cyclohm: { viableMoves: {"slackoff":1,"dracometeor":1,"dragonpulse":1,"fireblast":1,"thunderbolt":1,"hydropump":1}, isNonstandard: true, tier: "G4CAP" }, colossoil: { viableMoves: {"earthquake":1,"crunch":1,"suckerpunch":1,"uturn":1,"rapidspin":1,"encore":1,"pursuit":1}, isNonstandard: true, tier: "G4CAP" }, krilowatt: { viableMoves: {"surf":1,"thunderbolt":1,"icebeam":1,"counter":1,"mirrorcoat":1,"earthquake":1}, isNonstandard: true, tier: "G4CAP" }, voodoom: { viableMoves: {"aurasphere":1,"darkpulse":1,"taunt":1,"painsplit":1}, isNonstandard: true, tier: "G4CAP" } };
{ "content_hash": "97e3fe1c00d39675da4bd7732b633690", "timestamp": "", "source": "github", "line_count": 2983, "max_line_length": 332, "avg_line_length": 43.46765001676165, "alnum_prop": 0.6436019249753209, "repo_name": "Adithya4Uberz/The-Tsunami-League", "id": "a373083fdad79fca61dbf6ac50f47d4c653f8c65", "size": "129664", "binary": false, "copies": "8", "ref": "refs/heads/master", "path": "mods/gen4/formats-data.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "1232" }, { "name": "JavaScript", "bytes": "2702706" }, { "name": "Shell", "bytes": "173" } ], "symlink_target": "" }
<!DOCTYPE html> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta name="viewport" content="width=device-width" /> <link rel="shortcut icon" type="image/x-icon" href="../../../../../favicon.ico" /> <title>ScriptIntrinsicBlend - Android SDK | Android Developers</title> <!-- STYLESHEETS --> <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Roboto:regular,medium,thin,italic,mediumitalic,bold" title="roboto"> <link href="../../../../../assets/css/default.css" rel="stylesheet" type="text/css"> <!-- FULLSCREEN STYLESHEET --> <link href="../../../../../assets/css/fullscreen.css" rel="stylesheet" class="fullscreen" type="text/css"> <!-- JAVASCRIPT --> <script src="http://www.google.com/jsapi" type="text/javascript"></script> <script src="../../../../../assets/js/android_3p-bundle.js" type="text/javascript"></script> <script type="text/javascript"> var toRoot = "../../../../../"; var devsite = false; </script> <script src="../../../../../assets/js/docs.js" type="text/javascript"></script> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-5831155-1']); _gaq.push(['_trackPageview']); (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); </script> </head> <body class="gc-documentation develop" itemscope itemtype="http://schema.org/Article"> <div id="doc-api-level" class="" style="display:none"></div> <a name="top"></a> <a name="top"></a> <!-- Header --> <div id="header"> <div class="wrap" id="header-wrap"> <div class="col-3 logo"> <a href="../../../../../index.html"> <img src="../../../../../assets/images/dac_logo.png" width="123" height="25" alt="Android Developers" /> </a> <div class="btn-quicknav" id="btn-quicknav"> <a href="#" class="arrow-inactive">Quicknav</a> <a href="#" class="arrow-active">Quicknav</a> </div> </div> <ul class="nav-x col-9"> <li class="design"> <a href="../../../../../design/index.html" zh-tw-lang="設計" zh-cn-lang="设计" ru-lang="Проектирование" ko-lang="디자인" ja-lang="設計" es-lang="Diseñar" >Design</a></li> <li class="develop"><a href="../../../../../develop/index.html" zh-tw-lang="開發" zh-cn-lang="开发" ru-lang="Разработка" ko-lang="개발" ja-lang="開発" es-lang="Desarrollar" >Develop</a></li> <li class="distribute last"><a href="../../../../../distribute/index.html" zh-tw-lang="發佈" zh-cn-lang="分发" ru-lang="Распространение" ko-lang="배포" ja-lang="配布" es-lang="Distribuir" >Distribute</a></li> </ul> <!-- New Search --> <div class="menu-container"> <div class="moremenu"> <div id="more-btn"></div> </div> <div class="morehover" id="moremenu"> <div class="top"></div> <div class="mid"> <div class="header">Links</div> <ul> <li><a href="https://play.google.com/apps/publish/">Google Play Developer Console</a></li> <li><a href="http://android-developers.blogspot.com/">Android Developers Blog</a></li> <li><a href="../../../../../about/index.html">About Android</a></li> </ul> <div class="header">Android Sites</div> <ul> <li><a href="http://www.android.com">Android.com</a></li> <li class="active"><a>Android Developers</a></li> <li><a href="http://source.android.com">Android Open Source Project</a></li> </ul> <br class="clearfix" /> </div> <div class="bottom"></div> </div> <div class="search" id="search-container"> <div class="search-inner"> <div id="search-btn"></div> <div class="left"></div> <form onsubmit="return submit_search()"> <input id="search_autocomplete" type="text" value="" autocomplete="off" name="q" onfocus="search_focus_changed(this, true)" onblur="search_focus_changed(this, false)" onkeydown="return search_changed(event, true, '../../../../../')" onkeyup="return search_changed(event, false, '../../../../../')" /> </form> <div class="right"></div> <a class="close hide">close</a> <div class="left"></div> <div class="right"></div> </div> </div> <div class="search_filtered_wrapper reference"> <div class="suggest-card reference no-display"> <ul class="search_filtered"> </ul> </div> </div> <div class="search_filtered_wrapper docs"> <div class="suggest-card dummy no-display">&nbsp;</div> <div class="suggest-card develop no-display"> <ul class="search_filtered"> </ul> <div class="child-card guides no-display"> </div> <div class="child-card training no-display"> </div> </div> <div class="suggest-card design no-display"> <ul class="search_filtered"> </ul> </div> <div class="suggest-card distribute no-display"> <ul class="search_filtered"> </ul> </div> </div> </div> <!-- /New Search> <!-- Expanded quicknav --> <div id="quicknav" class="col-9"> <ul> <li class="design"> <ul> <li><a href="../../../../../design/index.html">Get Started</a></li> <li><a href="../../../../../design/style/index.html">Style</a></li> <li><a href="../../../../../design/patterns/index.html">Patterns</a></li> <li><a href="../../../../../design/building-blocks/index.html">Building Blocks</a></li> <li><a href="../../../../../design/downloads/index.html">Downloads</a></li> <li><a href="../../../../../design/videos/index.html">Videos</a></li> </ul> </li> <li class="develop"> <ul> <li><a href="../../../../../training/index.html" zh-tw-lang="訓練課程" zh-cn-lang="培训" ru-lang="Курсы" ko-lang="교육" ja-lang="トレーニング" es-lang="Capacitación" >Training</a></li> <li><a href="../../../../../guide/components/index.html" zh-tw-lang="API 指南" zh-cn-lang="API 指南" ru-lang="Руководства по API" ko-lang="API 가이드" ja-lang="API ガイド" es-lang="Guías de la API" >API Guides</a></li> <li><a href="../../../../../reference/packages.html" zh-tw-lang="參考資源" zh-cn-lang="参考" ru-lang="Справочник" ko-lang="참조문서" ja-lang="リファレンス" es-lang="Referencia" >Reference</a></li> <li><a href="../../../../../tools/index.html" zh-tw-lang="相關工具" zh-cn-lang="工具" ru-lang="Инструменты" ko-lang="도구" ja-lang="ツール" es-lang="Herramientas" >Tools</a> <ul><li><a href="../../../../../sdk/index.html">Get the SDK</a></li></ul> </li> <li><a href="../../../../../google/index.html">Google Services</a> </li> </ul> </li> <li class="distribute last"> <ul> <li><a href="../../../../../distribute/index.html">Google Play</a></li> <li><a href="../../../../../distribute/googleplay/publish/index.html">Publishing</a></li> <li><a href="../../../../../distribute/googleplay/promote/index.html">Promoting</a></li> <li><a href="../../../../../distribute/googleplay/quality/index.html">App Quality</a></li> <li><a href="../../../../../distribute/googleplay/spotlight/index.html">Spotlight</a></li> <li><a href="../../../../../distribute/open.html">Open Distribution</a></li> </ul> </li> </ul> </div> <!-- /Expanded quicknav --> </div> </div> <!-- /Header --> <div id="searchResults" class="wrap" style="display:none;"> <h2 id="searchTitle">Results</h2> <div id="leftSearchControl" class="search-control">Loading...</div> </div> <!-- Secondary x-nav --> <div id="nav-x"> <div class="wrap"> <ul class="nav-x col-9 develop" style="width:100%"> <li class="training"><a href="../../../../../training/index.html" zh-tw-lang="訓練課程" zh-cn-lang="培训" ru-lang="Курсы" ko-lang="교육" ja-lang="トレーニング" es-lang="Capacitación" >Training</a></li> <li class="guide"><a href="../../../../../guide/components/index.html" zh-tw-lang="API 指南" zh-cn-lang="API 指南" ru-lang="Руководства по API" ko-lang="API 가이드" ja-lang="API ガイド" es-lang="Guías de la API" >API Guides</a></li> <li class="reference"><a href="../../../../../reference/packages.html" zh-tw-lang="參考資源" zh-cn-lang="参考" ru-lang="Справочник" ko-lang="참조문서" ja-lang="リファレンス" es-lang="Referencia" >Reference</a></li> <li class="tools"><a href="../../../../../tools/index.html" zh-tw-lang="相關工具" zh-cn-lang="工具" ru-lang="Инструменты" ko-lang="도구" ja-lang="ツール" es-lang="Herramientas" >Tools</a></li> <li class="google"><a href="../../../../../google/index.html" >Google Services</a> </li> </ul> </div> </div> <!-- /Sendondary x-nav --> <div class="wrap clearfix" id="body-content"> <div class="col-4" id="side-nav" itemscope itemtype="http://schema.org/SiteNavigationElement"> <div id="devdoc-nav"> <a class="totop" href="#top" data-g-event="left-nav-top">to top</a> <div id="api-nav-header"> <div id="api-level-toggle"> <label for="apiLevelCheckbox" class="disabled">API level: </label> <div class="select-wrapper"> <select id="apiLevelSelector"> <!-- option elements added by buildApiLevelSelector() --> </select> </div> </div><!-- end toggle --> <div id="api-nav-title">Android APIs</div> </div><!-- end nav header --> <script> var SINCE_DATA = [ '1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17', '18', '19' ]; buildApiLevelSelector(); </script> <div id="swapper"> <div id="nav-panels"> <div id="resize-packages-nav"> <div id="packages-nav" class="scroll-pane"> <ul> <li class="api apilevel-1"> <a href="../../../../../reference/android/package-summary.html">android</a></li> <li class="api apilevel-4"> <a href="../../../../../reference/android/accessibilityservice/package-summary.html">android.accessibilityservice</a></li> <li class="api apilevel-5"> <a href="../../../../../reference/android/accounts/package-summary.html">android.accounts</a></li> <li class="api apilevel-11"> <a href="../../../../../reference/android/animation/package-summary.html">android.animation</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/app/package-summary.html">android.app</a></li> <li class="api apilevel-8"> <a href="../../../../../reference/android/app/admin/package-summary.html">android.app.admin</a></li> <li class="api apilevel-8"> <a href="../../../../../reference/android/app/backup/package-summary.html">android.app.backup</a></li> <li class="api apilevel-3"> <a href="../../../../../reference/android/appwidget/package-summary.html">android.appwidget</a></li> <li class="api apilevel-5"> <a href="../../../../../reference/android/bluetooth/package-summary.html">android.bluetooth</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/content/package-summary.html">android.content</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/content/pm/package-summary.html">android.content.pm</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/content/res/package-summary.html">android.content.res</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/database/package-summary.html">android.database</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/database/sqlite/package-summary.html">android.database.sqlite</a></li> <li class="api apilevel-11"> <a href="../../../../../reference/android/drm/package-summary.html">android.drm</a></li> <li class="api apilevel-4"> <a href="../../../../../reference/android/gesture/package-summary.html">android.gesture</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/graphics/package-summary.html">android.graphics</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/graphics/drawable/package-summary.html">android.graphics.drawable</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/graphics/drawable/shapes/package-summary.html">android.graphics.drawable.shapes</a></li> <li class="api apilevel-19"> <a href="../../../../../reference/android/graphics/pdf/package-summary.html">android.graphics.pdf</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/hardware/package-summary.html">android.hardware</a></li> <li class="api apilevel-17"> <a href="../../../../../reference/android/hardware/display/package-summary.html">android.hardware.display</a></li> <li class="api apilevel-16"> <a href="../../../../../reference/android/hardware/input/package-summary.html">android.hardware.input</a></li> <li class="api apilevel-18"> <a href="../../../../../reference/android/hardware/location/package-summary.html">android.hardware.location</a></li> <li class="api apilevel-12"> <a href="../../../../../reference/android/hardware/usb/package-summary.html">android.hardware.usb</a></li> <li class="api apilevel-3"> <a href="../../../../../reference/android/inputmethodservice/package-summary.html">android.inputmethodservice</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/location/package-summary.html">android.location</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/media/package-summary.html">android.media</a></li> <li class="api apilevel-9"> <a href="../../../../../reference/android/media/audiofx/package-summary.html">android.media.audiofx</a></li> <li class="api apilevel-14"> <a href="../../../../../reference/android/media/effect/package-summary.html">android.media.effect</a></li> <li class="api apilevel-12"> <a href="../../../../../reference/android/mtp/package-summary.html">android.mtp</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/net/package-summary.html">android.net</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/net/http/package-summary.html">android.net.http</a></li> <li class="api apilevel-16"> <a href="../../../../../reference/android/net/nsd/package-summary.html">android.net.nsd</a></li> <li class="api apilevel-12"> <a href="../../../../../reference/android/net/rtp/package-summary.html">android.net.rtp</a></li> <li class="api apilevel-9"> <a href="../../../../../reference/android/net/sip/package-summary.html">android.net.sip</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/net/wifi/package-summary.html">android.net.wifi</a></li> <li class="api apilevel-14"> <a href="../../../../../reference/android/net/wifi/p2p/package-summary.html">android.net.wifi.p2p</a></li> <li class="api apilevel-16"> <a href="../../../../../reference/android/net/wifi/p2p/nsd/package-summary.html">android.net.wifi.p2p.nsd</a></li> <li class="api apilevel-9"> <a href="../../../../../reference/android/nfc/package-summary.html">android.nfc</a></li> <li class="api apilevel-19"> <a href="../../../../../reference/android/nfc/cardemulation/package-summary.html">android.nfc.cardemulation</a></li> <li class="api apilevel-10"> <a href="../../../../../reference/android/nfc/tech/package-summary.html">android.nfc.tech</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/opengl/package-summary.html">android.opengl</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/os/package-summary.html">android.os</a></li> <li class="api apilevel-9"> <a href="../../../../../reference/android/os/storage/package-summary.html">android.os.storage</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/preference/package-summary.html">android.preference</a></li> <li class="api apilevel-19"> <a href="../../../../../reference/android/print/package-summary.html">android.print</a></li> <li class="api apilevel-19"> <a href="../../../../../reference/android/print/pdf/package-summary.html">android.print.pdf</a></li> <li class="api apilevel-19"> <a href="../../../../../reference/android/printservice/package-summary.html">android.printservice</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/provider/package-summary.html">android.provider</a></li> <li class="api apilevel-11"> <a href="../../../../../reference/android/renderscript/package-summary.html">android.renderscript</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/sax/package-summary.html">android.sax</a></li> <li class="api apilevel-14"> <a href="../../../../../reference/android/security/package-summary.html">android.security</a></li> <li class="api apilevel-17"> <a href="../../../../../reference/android/service/dreams/package-summary.html">android.service.dreams</a></li> <li class="api apilevel-18"> <a href="../../../../../reference/android/service/notification/package-summary.html">android.service.notification</a></li> <li class="api apilevel-14"> <a href="../../../../../reference/android/service/textservice/package-summary.html">android.service.textservice</a></li> <li class="api apilevel-7"> <a href="../../../../../reference/android/service/wallpaper/package-summary.html">android.service.wallpaper</a></li> <li class="api apilevel-3"> <a href="../../../../../reference/android/speech/package-summary.html">android.speech</a></li> <li class="api apilevel-4"> <a href="../../../../../reference/android/speech/tts/package-summary.html">android.speech.tts</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v13/app/package-summary.html">android.support.v13.app</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v4/accessibilityservice/package-summary.html">android.support.v4.accessibilityservice</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v4/app/package-summary.html">android.support.v4.app</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v4/content/package-summary.html">android.support.v4.content</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v4/content/pm/package-summary.html">android.support.v4.content.pm</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v4/database/package-summary.html">android.support.v4.database</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v4/graphics/drawable/package-summary.html">android.support.v4.graphics.drawable</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v4/hardware/display/package-summary.html">android.support.v4.hardware.display</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v4/media/package-summary.html">android.support.v4.media</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v4/net/package-summary.html">android.support.v4.net</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v4/os/package-summary.html">android.support.v4.os</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v4/print/package-summary.html">android.support.v4.print</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v4/text/package-summary.html">android.support.v4.text</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v4/util/package-summary.html">android.support.v4.util</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v4/view/package-summary.html">android.support.v4.view</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v4/view/accessibility/package-summary.html">android.support.v4.view.accessibility</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v4/widget/package-summary.html">android.support.v4.widget</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v7/app/package-summary.html">android.support.v7.app</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v7/appcompat/package-summary.html">android.support.v7.appcompat</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v7/gridlayout/package-summary.html">android.support.v7.gridlayout</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v7/media/package-summary.html">android.support.v7.media</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v7/mediarouter/package-summary.html">android.support.v7.mediarouter</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v7/view/package-summary.html">android.support.v7.view</a></li> <li class="api apilevel-"> <a href="../../../../../reference/android/support/v7/widget/package-summary.html">android.support.v7.widget</a></li> <li class="selected api apilevel-"> <a href="../../../../../reference/android/support/v8/renderscript/package-summary.html">android.support.v8.renderscript</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/telephony/package-summary.html">android.telephony</a></li> <li class="api apilevel-5"> <a href="../../../../../reference/android/telephony/cdma/package-summary.html">android.telephony.cdma</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/telephony/gsm/package-summary.html">android.telephony.gsm</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/test/package-summary.html">android.test</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/test/mock/package-summary.html">android.test.mock</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/test/suitebuilder/package-summary.html">android.test.suitebuilder</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/text/package-summary.html">android.text</a></li> <li class="api apilevel-3"> <a href="../../../../../reference/android/text/format/package-summary.html">android.text.format</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/text/method/package-summary.html">android.text.method</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/text/style/package-summary.html">android.text.style</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/text/util/package-summary.html">android.text.util</a></li> <li class="api apilevel-19"> <a href="../../../../../reference/android/transition/package-summary.html">android.transition</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/util/package-summary.html">android.util</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/view/package-summary.html">android.view</a></li> <li class="api apilevel-4"> <a href="../../../../../reference/android/view/accessibility/package-summary.html">android.view.accessibility</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/view/animation/package-summary.html">android.view.animation</a></li> <li class="api apilevel-3"> <a href="../../../../../reference/android/view/inputmethod/package-summary.html">android.view.inputmethod</a></li> <li class="api apilevel-14"> <a href="../../../../../reference/android/view/textservice/package-summary.html">android.view.textservice</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/webkit/package-summary.html">android.webkit</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/android/widget/package-summary.html">android.widget</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/dalvik/bytecode/package-summary.html">dalvik.bytecode</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/dalvik/system/package-summary.html">dalvik.system</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/awt/font/package-summary.html">java.awt.font</a></li> <li class="api apilevel-3"> <a href="../../../../../reference/java/beans/package-summary.html">java.beans</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/io/package-summary.html">java.io</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/lang/package-summary.html">java.lang</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/lang/annotation/package-summary.html">java.lang.annotation</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/lang/ref/package-summary.html">java.lang.ref</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/lang/reflect/package-summary.html">java.lang.reflect</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/math/package-summary.html">java.math</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/net/package-summary.html">java.net</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/nio/package-summary.html">java.nio</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/nio/channels/package-summary.html">java.nio.channels</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/nio/channels/spi/package-summary.html">java.nio.channels.spi</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/nio/charset/package-summary.html">java.nio.charset</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/nio/charset/spi/package-summary.html">java.nio.charset.spi</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/security/package-summary.html">java.security</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/security/acl/package-summary.html">java.security.acl</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/security/cert/package-summary.html">java.security.cert</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/security/interfaces/package-summary.html">java.security.interfaces</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/security/spec/package-summary.html">java.security.spec</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/sql/package-summary.html">java.sql</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/text/package-summary.html">java.text</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/util/package-summary.html">java.util</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/util/concurrent/package-summary.html">java.util.concurrent</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/util/concurrent/atomic/package-summary.html">java.util.concurrent.atomic</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/util/concurrent/locks/package-summary.html">java.util.concurrent.locks</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/util/jar/package-summary.html">java.util.jar</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/util/logging/package-summary.html">java.util.logging</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/util/prefs/package-summary.html">java.util.prefs</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/util/regex/package-summary.html">java.util.regex</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/java/util/zip/package-summary.html">java.util.zip</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/javax/crypto/package-summary.html">javax.crypto</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/javax/crypto/interfaces/package-summary.html">javax.crypto.interfaces</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/javax/crypto/spec/package-summary.html">javax.crypto.spec</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/javax/microedition/khronos/egl/package-summary.html">javax.microedition.khronos.egl</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/javax/microedition/khronos/opengles/package-summary.html">javax.microedition.khronos.opengles</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/javax/net/package-summary.html">javax.net</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/javax/net/ssl/package-summary.html">javax.net.ssl</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/javax/security/auth/package-summary.html">javax.security.auth</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/javax/security/auth/callback/package-summary.html">javax.security.auth.callback</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/javax/security/auth/login/package-summary.html">javax.security.auth.login</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/javax/security/auth/x500/package-summary.html">javax.security.auth.x500</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/javax/security/cert/package-summary.html">javax.security.cert</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/javax/sql/package-summary.html">javax.sql</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/javax/xml/package-summary.html">javax.xml</a></li> <li class="api apilevel-8"> <a href="../../../../../reference/javax/xml/datatype/package-summary.html">javax.xml.datatype</a></li> <li class="api apilevel-8"> <a href="../../../../../reference/javax/xml/namespace/package-summary.html">javax.xml.namespace</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/javax/xml/parsers/package-summary.html">javax.xml.parsers</a></li> <li class="api apilevel-8"> <a href="../../../../../reference/javax/xml/transform/package-summary.html">javax.xml.transform</a></li> <li class="api apilevel-8"> <a href="../../../../../reference/javax/xml/transform/dom/package-summary.html">javax.xml.transform.dom</a></li> <li class="api apilevel-8"> <a href="../../../../../reference/javax/xml/transform/sax/package-summary.html">javax.xml.transform.sax</a></li> <li class="api apilevel-8"> <a href="../../../../../reference/javax/xml/transform/stream/package-summary.html">javax.xml.transform.stream</a></li> <li class="api apilevel-8"> <a href="../../../../../reference/javax/xml/validation/package-summary.html">javax.xml.validation</a></li> <li class="api apilevel-8"> <a href="../../../../../reference/javax/xml/xpath/package-summary.html">javax.xml.xpath</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/junit/framework/package-summary.html">junit.framework</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/junit/runner/package-summary.html">junit.runner</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/package-summary.html">org.apache.http</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/auth/package-summary.html">org.apache.http.auth</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/auth/params/package-summary.html">org.apache.http.auth.params</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/client/package-summary.html">org.apache.http.client</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/client/entity/package-summary.html">org.apache.http.client.entity</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/client/methods/package-summary.html">org.apache.http.client.methods</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/client/params/package-summary.html">org.apache.http.client.params</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/client/protocol/package-summary.html">org.apache.http.client.protocol</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/client/utils/package-summary.html">org.apache.http.client.utils</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/conn/package-summary.html">org.apache.http.conn</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/conn/params/package-summary.html">org.apache.http.conn.params</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/conn/routing/package-summary.html">org.apache.http.conn.routing</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/conn/scheme/package-summary.html">org.apache.http.conn.scheme</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/conn/ssl/package-summary.html">org.apache.http.conn.ssl</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/conn/util/package-summary.html">org.apache.http.conn.util</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/cookie/package-summary.html">org.apache.http.cookie</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/cookie/params/package-summary.html">org.apache.http.cookie.params</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/entity/package-summary.html">org.apache.http.entity</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/impl/package-summary.html">org.apache.http.impl</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/impl/auth/package-summary.html">org.apache.http.impl.auth</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/impl/client/package-summary.html">org.apache.http.impl.client</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/impl/conn/package-summary.html">org.apache.http.impl.conn</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/impl/conn/tsccm/package-summary.html">org.apache.http.impl.conn.tsccm</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/impl/cookie/package-summary.html">org.apache.http.impl.cookie</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/impl/entity/package-summary.html">org.apache.http.impl.entity</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/impl/io/package-summary.html">org.apache.http.impl.io</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/io/package-summary.html">org.apache.http.io</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/message/package-summary.html">org.apache.http.message</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/params/package-summary.html">org.apache.http.params</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/protocol/package-summary.html">org.apache.http.protocol</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/apache/http/util/package-summary.html">org.apache.http.util</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/json/package-summary.html">org.json</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/w3c/dom/package-summary.html">org.w3c.dom</a></li> <li class="api apilevel-8"> <a href="../../../../../reference/org/w3c/dom/ls/package-summary.html">org.w3c.dom.ls</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/xml/sax/package-summary.html">org.xml.sax</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/xml/sax/ext/package-summary.html">org.xml.sax.ext</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/xml/sax/helpers/package-summary.html">org.xml.sax.helpers</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/xmlpull/v1/package-summary.html">org.xmlpull.v1</a></li> <li class="api apilevel-1"> <a href="../../../../../reference/org/xmlpull/v1/sax2/package-summary.html">org.xmlpull.v1.sax2</a></li> </ul><br/> </div> <!-- end packages-nav --> </div> <!-- end resize-packages --> <div id="classes-nav" class="scroll-pane"> <ul> <li><h2>Classes</h2> <ul> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/BaseObj.html">BaseObj</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Byte2.html">Byte2</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Byte3.html">Byte3</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Byte4.html">Byte4</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Double2.html">Double2</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Double3.html">Double3</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Double4.html">Double4</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Element.html">Element</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Element.Builder.html">Element.Builder</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/FieldPacker.html">FieldPacker</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Float2.html">Float2</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Float3.html">Float3</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Float4.html">Float4</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Int2.html">Int2</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Int3.html">Int3</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Int4.html">Int4</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Long2.html">Long2</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Long3.html">Long3</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Long4.html">Long4</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Matrix2f.html">Matrix2f</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Matrix3f.html">Matrix3f</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Matrix4f.html">Matrix4f</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/RenderScript.html">RenderScript</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/RenderScript.RSErrorHandler.html">RenderScript.RSErrorHandler</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/RenderScript.RSMessageHandler.html">RenderScript.RSMessageHandler</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Sampler.html">Sampler</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Sampler.Builder.html">Sampler.Builder</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Script.html">Script</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Script.Builder.html">Script.Builder</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Script.FieldBase.html">Script.FieldBase</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Script.FieldID.html">Script.FieldID</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Script.LaunchOptions.html">Script.LaunchOptions</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/ScriptC.html">ScriptC</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/ScriptGroup.html">ScriptGroup</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/ScriptGroup.Builder.html">ScriptGroup.Builder</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsic.html">ScriptIntrinsic</a></li> <li class="selected api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html">ScriptIntrinsicBlend</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlur.html">ScriptIntrinsicBlur</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicColorMatrix.html">ScriptIntrinsicColorMatrix</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicConvolve3x3.html">ScriptIntrinsicConvolve3x3</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicConvolve5x5.html">ScriptIntrinsicConvolve5x5</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicLUT.html">ScriptIntrinsicLUT</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicYuvToRGB.html">ScriptIntrinsicYuvToRGB</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicYuvToRGBThunker.html">ScriptIntrinsicYuvToRGBThunker</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Short2.html">Short2</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Short3.html">Short3</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Short4.html">Short4</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Type.html">Type</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Type.Builder.html">Type.Builder</a></li> </ul> </li> <li><h2>Enums</h2> <ul> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Allocation.MipmapControl.html">Allocation.MipmapControl</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Element.DataKind.html">Element.DataKind</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Element.DataType.html">Element.DataType</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/RenderScript.ContextType.html">RenderScript.ContextType</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/RenderScript.Priority.html">RenderScript.Priority</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Sampler.Value.html">Sampler.Value</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/Type.CubemapFace.html">Type.CubemapFace</a></li> </ul> </li> <li><h2>Exceptions</h2> <ul> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/RSDriverException.html">RSDriverException</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/RSIllegalArgumentException.html">RSIllegalArgumentException</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/RSInvalidStateException.html">RSInvalidStateException</a></li> <li class="api apilevel-"><a href="../../../../../reference/android/support/v8/renderscript/RSRuntimeException.html">RSRuntimeException</a></li> </ul> </li> </ul><br/> </div><!-- end classes --> </div><!-- end nav-panels --> <div id="nav-tree" style="display:none" class="scroll-pane"> <div id="tree-list"></div> </div><!-- end nav-tree --> </div><!-- end swapper --> <div id="nav-swap"> <a class="fullscreen">fullscreen</a> <a href='#' onclick='swapNav();return false;'><span id='tree-link'>Use Tree Navigation</span><span id='panel-link' style='display:none'>Use Panel Navigation</span></a> </div> </div> <!-- end devdoc-nav --> </div> <!-- end side-nav --> <script type="text/javascript"> // init fullscreen based on user pref var fullscreen = readCookie("fullscreen"); if (fullscreen != 0) { if (fullscreen == "false") { toggleFullscreen(false); } else { toggleFullscreen(true); } } // init nav version for mobile if (isMobile) { swapNav(); // tree view should be used on mobile $('#nav-swap').hide(); } else { chooseDefaultNav(); if ($("#nav-tree").is(':visible')) { init_default_navtree("../../../../../"); } } // scroll the selected page into view $(document).ready(function() { scrollIntoView("packages-nav"); scrollIntoView("classes-nav"); }); </script> <div class="col-12" id="doc-col"> <div id="api-info-block"> <div class="sum-details-links"> Summary: <a href="#pubmethods">Methods</a> &#124; <a href="#inhmethods">Inherited Methods</a> &#124; <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a> </div><!-- end sum-details-links --> <div class="api-level"> </div> </div><!-- end api-info-block --> <!-- ======== START OF CLASS DATA ======== --> <div id="jd-header"> public class <h1 itemprop="name">ScriptIntrinsicBlend</h1> extends <a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsic.html">ScriptIntrinsic</a><br/> </div><!-- end header --> <div id="naMessage"></div> <div id="jd-content" class="api apilevel-"> <table class="jd-inheritance-table"> <tr> <td colspan="5" class="jd-inheritance-class-cell"><a href="../../../../../reference/java/lang/Object.html">java.lang.Object</a></td> </tr> <tr> <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td> <td colspan="4" class="jd-inheritance-class-cell"><a href="../../../../../reference/android/support/v8/renderscript/BaseObj.html">android.support.v8.renderscript.BaseObj</a></td> </tr> <tr> <td class="jd-inheritance-space">&nbsp;</td> <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td> <td colspan="3" class="jd-inheritance-class-cell"><a href="../../../../../reference/android/support/v8/renderscript/Script.html">android.support.v8.renderscript.Script</a></td> </tr> <tr> <td class="jd-inheritance-space">&nbsp;</td> <td class="jd-inheritance-space">&nbsp;</td> <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td> <td colspan="2" class="jd-inheritance-class-cell"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsic.html">android.support.v8.renderscript.ScriptIntrinsic</a></td> </tr> <tr> <td class="jd-inheritance-space">&nbsp;</td> <td class="jd-inheritance-space">&nbsp;</td> <td class="jd-inheritance-space">&nbsp;</td> <td class="jd-inheritance-space">&nbsp;&nbsp;&nbsp;&#x21b3;</td> <td colspan="1" class="jd-inheritance-class-cell">android.support.v8.renderscript.ScriptIntrinsicBlend</td> </tr> </table> <div class="jd-descr"> <h2>Class Overview</h2> <p itemprop="articleBody">Intrinsic kernels for blending two <code><a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a></code> objects. </p> </div><!-- jd-descr --> <div class="jd-descr"> <h2>Summary</h2> <!-- ========== METHOD SUMMARY =========== --> <table id="pubmethods" class="jd-sumtable"><tr><th colspan="12">Public Methods</th></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> static <a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html">ScriptIntrinsicBlend</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#create(android.support.v8.renderscript.RenderScript, android.support.v8.renderscript.Element)">create</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/RenderScript.html">RenderScript</a> rs, <a href="../../../../../reference/android/support/v8/renderscript/Element.html">Element</a> e)</nobr> <div class="jd-descrdiv">Supported elements types are <code><a href="../../../../../reference/android/support/v8/renderscript/Element.html#U8_4(android.support.v8.renderscript.RenderScript)">U8_4(RenderScript)</a></code></div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#forEachAdd(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)">forEachAdd</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</nobr> <div class="jd-descrdiv">Sets dst = min(src + dst, 1.0)</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#forEachClear(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)">forEachClear</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</nobr> <div class="jd-descrdiv">Sets dst = {0, 0, 0, 0}</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#forEachDst(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)">forEachDst</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</nobr> <div class="jd-descrdiv">Sets dst = dst This is a NOP.</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#forEachDstAtop(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)">forEachDstAtop</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</nobr> <div class="jd-descrdiv">dst = dst.rgb * src.a + (1.0 - dst.a) * src.rgb dst.a = src.a</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#forEachDstIn(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)">forEachDstIn</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</nobr> <div class="jd-descrdiv">Sets dst = dst * src.a</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#forEachDstOut(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)">forEachDstOut</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</nobr> <div class="jd-descrdiv">Sets dst = dst * (1.0 - src.a)</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#forEachDstOver(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)">forEachDstOver</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</nobr> <div class="jd-descrdiv">Sets dst = dst + src * (1.0 - dst.a)</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#forEachMultiply(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)">forEachMultiply</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</nobr> <div class="jd-descrdiv">Sets dst = src * dst</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#forEachSrc(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)">forEachSrc</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</nobr> <div class="jd-descrdiv">Sets dst = src</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#forEachSrcAtop(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)">forEachSrcAtop</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</nobr> <div class="jd-descrdiv">dst.rgb = src.rgb * dst.a + (1.0 - src.a) * dst.rgb dst.a = dst.a</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#forEachSrcIn(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)">forEachSrcIn</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</nobr> <div class="jd-descrdiv">Sets dst = src * dst.a</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#forEachSrcOut(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)">forEachSrcOut</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</nobr> <div class="jd-descrdiv">Sets dst = src * (1.0 - dst.a)</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#forEachSrcOver(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)">forEachSrcOver</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</nobr> <div class="jd-descrdiv">Sets dst = src + dst * (1.0 - src.a)</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#forEachSubtract(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)">forEachSubtract</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</nobr> <div class="jd-descrdiv">Sets dst = max(dst - src, 0.0)</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#forEachXor(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)">forEachXor</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</nobr> <div class="jd-descrdiv">Sets dst = {src.r ^ dst.r, src.g ^ dst.g, src.b ^ dst.b, src.a ^ dst.a}</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#getKernelIDAdd()">getKernelIDAdd</a></span>()</nobr> <div class="jd-descrdiv">Get a KernelID for the Add kernel.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#getKernelIDClear()">getKernelIDClear</a></span>()</nobr> <div class="jd-descrdiv">Get a KernelID for the Clear kernel.</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#getKernelIDDst()">getKernelIDDst</a></span>()</nobr> <div class="jd-descrdiv">Get a KernelID for the Dst kernel.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#getKernelIDDstAtop()">getKernelIDDstAtop</a></span>()</nobr> <div class="jd-descrdiv">Get a KernelID for the DstAtop kernel.</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#getKernelIDDstIn()">getKernelIDDstIn</a></span>()</nobr> <div class="jd-descrdiv">Get a KernelID for the DstIn kernel.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#getKernelIDDstOut()">getKernelIDDstOut</a></span>()</nobr> <div class="jd-descrdiv">Get a KernelID for the DstOut kernel.</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#getKernelIDDstOver()">getKernelIDDstOver</a></span>()</nobr> <div class="jd-descrdiv">Get a KernelID for the DstOver kernel.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#getKernelIDMultiply()">getKernelIDMultiply</a></span>()</nobr> <div class="jd-descrdiv">Get a KernelID for the Multiply kernel.</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#getKernelIDSrc()">getKernelIDSrc</a></span>()</nobr> <div class="jd-descrdiv">Get a KernelID for the Src kernel.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#getKernelIDSrcAtop()">getKernelIDSrcAtop</a></span>()</nobr> <div class="jd-descrdiv">Get a KernelID for the SrcAtop kernel.</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#getKernelIDSrcIn()">getKernelIDSrcIn</a></span>()</nobr> <div class="jd-descrdiv">Get a KernelID for the SrcIn kernel.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#getKernelIDSrcOut()">getKernelIDSrcOut</a></span>()</nobr> <div class="jd-descrdiv">Get a KernelID for the SrcOut kernel.</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#getKernelIDSrcOver()">getKernelIDSrcOver</a></span>()</nobr> <div class="jd-descrdiv">Get a KernelID for the SrcOver kernel.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#getKernelIDSubtract()">getKernelIDSubtract</a></span>()</nobr> <div class="jd-descrdiv">Get a KernelID for the Subtract kernel.</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html#getKernelIDXor()">getKernelIDXor</a></span>()</nobr> <div class="jd-descrdiv">Get a KernelID for the Xor kernel.</div> </td></tr> </table> <!-- ========== METHOD SUMMARY =========== --> <table id="inhmethods" class="jd-sumtable"><tr><th> <a href="#" class="toggle-all" onclick="return toggleAllInherited(this, null)">[Expand]</a> <div style="clear:left;">Inherited Methods</div></th></tr> <tr class="api apilevel-" > <td colspan="12"> <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.support.v8.renderscript.Script" class="jd-expando-trigger closed" ><img id="inherited-methods-android.support.v8.renderscript.Script-trigger" src="../../../../../assets/images/triangle-closed.png" class="jd-expando-trigger-img" /></a> From class <a href="../../../../../reference/android/support/v8/renderscript/Script.html">android.support.v8.renderscript.Script</a> <div id="inherited-methods-android.support.v8.renderscript.Script"> <div id="inherited-methods-android.support.v8.renderscript.Script-list" class="jd-inheritedlinks"> </div> <div id="inherited-methods-android.support.v8.renderscript.Script-summary" style="display: none;"> <table class="jd-sumtable-expando"> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/Script.html#bindAllocation(android.support.v8.renderscript.Allocation, int)">bindAllocation</a></span>(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> va, int slot)</nobr> <div class="jd-descrdiv">Only intended for use by generated reflected code.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.FieldID.html">Script.FieldID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/Script.html#createFieldID(int, android.support.v8.renderscript.Element)">createFieldID</a></span>(int slot, <a href="../../../../../reference/android/support/v8/renderscript/Element.html">Element</a> e)</nobr> <div class="jd-descrdiv">Only to be used by generated reflected classes.</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/Script.html#createKernelID(int, int, android.support.v8.renderscript.Element, android.support.v8.renderscript.Element)">createKernelID</a></span>(int slot, int sig, <a href="../../../../../reference/android/support/v8/renderscript/Element.html">Element</a> ein, <a href="../../../../../reference/android/support/v8/renderscript/Element.html">Element</a> eout)</nobr> <div class="jd-descrdiv">Only to be used by generated reflected classes.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/Script.html#forEach(int, android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation, android.support.v8.renderscript.FieldPacker)">forEach</a></span>(int slot, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout, <a href="../../../../../reference/android/support/v8/renderscript/FieldPacker.html">FieldPacker</a> v)</nobr> <div class="jd-descrdiv">Only intended for use by generated reflected code.</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/Script.html#forEach(int, android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation, android.support.v8.renderscript.FieldPacker, android.support.v8.renderscript.Script.LaunchOptions)">forEach</a></span>(int slot, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout, <a href="../../../../../reference/android/support/v8/renderscript/FieldPacker.html">FieldPacker</a> v, <a href="../../../../../reference/android/support/v8/renderscript/Script.LaunchOptions.html">Script.LaunchOptions</a> sc)</nobr> <div class="jd-descrdiv">Only intended for use by generated reflected code.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/Script.html#invoke(int)">invoke</a></span>(int slot)</nobr> <div class="jd-descrdiv">Only intended for use by generated reflected code.</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/Script.html#invoke(int, android.support.v8.renderscript.FieldPacker)">invoke</a></span>(int slot, <a href="../../../../../reference/android/support/v8/renderscript/FieldPacker.html">FieldPacker</a> v)</nobr> <div class="jd-descrdiv">Only intended for use by generated reflected code.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/Script.html#setTimeZone(java.lang.String)">setTimeZone</a></span>(<a href="../../../../../reference/java/lang/String.html">String</a> timeZone)</nobr> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/Script.html#setVar(int, int)">setVar</a></span>(int index, int v)</nobr> <div class="jd-descrdiv">Only intended for use by generated reflected code.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/Script.html#setVar(int, android.support.v8.renderscript.FieldPacker, android.support.v8.renderscript.Element, int[])">setVar</a></span>(int index, <a href="../../../../../reference/android/support/v8/renderscript/FieldPacker.html">FieldPacker</a> v, <a href="../../../../../reference/android/support/v8/renderscript/Element.html">Element</a> e, int[] dims)</nobr> <div class="jd-descrdiv">Only intended for use by generated reflected code.</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/Script.html#setVar(int, double)">setVar</a></span>(int index, double v)</nobr> <div class="jd-descrdiv">Only intended for use by generated reflected code.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/Script.html#setVar(int, boolean)">setVar</a></span>(int index, boolean v)</nobr> <div class="jd-descrdiv">Only intended for use by generated reflected code.</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/Script.html#setVar(int, float)">setVar</a></span>(int index, float v)</nobr> <div class="jd-descrdiv">Only intended for use by generated reflected code.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/Script.html#setVar(int, long)">setVar</a></span>(int index, long v)</nobr> <div class="jd-descrdiv">Only intended for use by generated reflected code.</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/Script.html#setVar(int, android.support.v8.renderscript.FieldPacker)">setVar</a></span>(int index, <a href="../../../../../reference/android/support/v8/renderscript/FieldPacker.html">FieldPacker</a> v)</nobr> <div class="jd-descrdiv">Only intended for use by generated reflected code.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/Script.html#setVar(int, android.support.v8.renderscript.BaseObj)">setVar</a></span>(int index, <a href="../../../../../reference/android/support/v8/renderscript/BaseObj.html">BaseObj</a> o)</nobr> <div class="jd-descrdiv">Only intended for use by generated reflected code.</div> </td></tr> </table> </div> </div> </td></tr> <tr class="api apilevel-" > <td colspan="12"> <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-android.support.v8.renderscript.BaseObj" class="jd-expando-trigger closed" ><img id="inherited-methods-android.support.v8.renderscript.BaseObj-trigger" src="../../../../../assets/images/triangle-closed.png" class="jd-expando-trigger-img" /></a> From class <a href="../../../../../reference/android/support/v8/renderscript/BaseObj.html">android.support.v8.renderscript.BaseObj</a> <div id="inherited-methods-android.support.v8.renderscript.BaseObj"> <div id="inherited-methods-android.support.v8.renderscript.BaseObj-list" class="jd-inheritedlinks"> </div> <div id="inherited-methods-android.support.v8.renderscript.BaseObj-summary" style="display: none;"> <table class="jd-sumtable-expando"> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> synchronized void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/BaseObj.html#destroy()">destroy</a></span>()</nobr> <div class="jd-descrdiv">Frees any native resources associated with this object.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> boolean</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/BaseObj.html#equals(java.lang.Object)">equals</a></span>(<a href="../../../../../reference/java/lang/Object.html">Object</a> obj)</nobr> <div class="jd-descrdiv">Compare the current BaseObj with another BaseObj for equality.</div> </td></tr> <tr class="alt-color api apilevel-" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/BaseObj.html#finalize()">finalize</a></span>()</nobr> <div class="jd-descrdiv">Invoked when the garbage collector has detected that this instance is no longer reachable.</div> </td></tr> <tr class=" api apilevel-" > <td class="jd-typecol"><nobr> int</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/android/support/v8/renderscript/BaseObj.html#hashCode()">hashCode</a></span>()</nobr> <div class="jd-descrdiv">Calculates the hash code value for a BaseObj.</div> </td></tr> </table> </div> </div> </td></tr> <tr class="api apilevel-" > <td colspan="12"> <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" ><img id="inherited-methods-java.lang.Object-trigger" src="../../../../../assets/images/triangle-closed.png" class="jd-expando-trigger-img" /></a> From class <a href="../../../../../reference/java/lang/Object.html">java.lang.Object</a> <div id="inherited-methods-java.lang.Object"> <div id="inherited-methods-java.lang.Object-list" class="jd-inheritedlinks"> </div> <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> <table class="jd-sumtable-expando"> <tr class="alt-color api apilevel-1" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/java/lang/Object.html">Object</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/java/lang/Object.html#clone()">clone</a></span>()</nobr> <div class="jd-descrdiv">Creates and returns a copy of this <code>Object</code>.</div> </td></tr> <tr class=" api apilevel-1" > <td class="jd-typecol"><nobr> boolean</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/java/lang/Object.html#equals(java.lang.Object)">equals</a></span>(<a href="../../../../../reference/java/lang/Object.html">Object</a> o)</nobr> <div class="jd-descrdiv">Compares this instance with the specified object and indicates if they are equal.</div> </td></tr> <tr class="alt-color api apilevel-1" > <td class="jd-typecol"><nobr> void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/java/lang/Object.html#finalize()">finalize</a></span>()</nobr> <div class="jd-descrdiv">Invoked when the garbage collector has detected that this instance is no longer reachable.</div> </td></tr> <tr class=" api apilevel-1" > <td class="jd-typecol"><nobr> final <a href="../../../../../reference/java/lang/Class.html">Class</a>&lt;?&gt;</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/java/lang/Object.html#getClass()">getClass</a></span>()</nobr> <div class="jd-descrdiv">Returns the unique instance of <code><a href="../../../../../reference/java/lang/Class.html">Class</a></code> that represents this object's class.</div> </td></tr> <tr class="alt-color api apilevel-1" > <td class="jd-typecol"><nobr> int</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/java/lang/Object.html#hashCode()">hashCode</a></span>()</nobr> <div class="jd-descrdiv">Returns an integer hash code for this object.</div> </td></tr> <tr class=" api apilevel-1" > <td class="jd-typecol"><nobr> final void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/java/lang/Object.html#notify()">notify</a></span>()</nobr> <div class="jd-descrdiv">Causes a thread which is waiting on this object's monitor (by means of calling one of the <code>wait()</code> methods) to be woken up.</div> </td></tr> <tr class="alt-color api apilevel-1" > <td class="jd-typecol"><nobr> final void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/java/lang/Object.html#notifyAll()">notifyAll</a></span>()</nobr> <div class="jd-descrdiv">Causes all threads which are waiting on this object's monitor (by means of calling one of the <code>wait()</code> methods) to be woken up.</div> </td></tr> <tr class=" api apilevel-1" > <td class="jd-typecol"><nobr> <a href="../../../../../reference/java/lang/String.html">String</a></nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/java/lang/Object.html#toString()">toString</a></span>()</nobr> <div class="jd-descrdiv">Returns a string containing a concise, human-readable description of this object.</div> </td></tr> <tr class="alt-color api apilevel-1" > <td class="jd-typecol"><nobr> final void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/java/lang/Object.html#wait()">wait</a></span>()</nobr> <div class="jd-descrdiv">Causes the calling thread to wait until another thread calls the <code>notify()</code> or <code>notifyAll()</code> method of this object.</div> </td></tr> <tr class=" api apilevel-1" > <td class="jd-typecol"><nobr> final void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/java/lang/Object.html#wait(long, int)">wait</a></span>(long millis, int nanos)</nobr> <div class="jd-descrdiv">Causes the calling thread to wait until another thread calls the <code>notify()</code> or <code>notifyAll()</code> method of this object or until the specified timeout expires.</div> </td></tr> <tr class="alt-color api apilevel-1" > <td class="jd-typecol"><nobr> final void</nobr> </td> <td class="jd-linkcol" width="100%"><nobr> <span class="sympad"><a href="../../../../../reference/java/lang/Object.html#wait(long)">wait</a></span>(long millis)</nobr> <div class="jd-descrdiv">Causes the calling thread to wait until another thread calls the <code>notify()</code> or <code>notifyAll()</code> method of this object or until the specified timeout expires.</div> </td></tr> </table> </div> </div> </td></tr> </table> </div><!-- jd-descr (summary) --> <!-- Details --> <!-- XML Attributes --> <!-- Enum Values --> <!-- Constants --> <!-- Fields --> <!-- Public ctors --> <!-- ========= CONSTRUCTOR DETAIL ======== --> <!-- Protected ctors --> <!-- ========= METHOD DETAIL ======== --> <!-- Public methdos --> <h2>Public Methods</h2> <A NAME="create(android.support.v8.renderscript.RenderScript, android.support.v8.renderscript.Element)"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public static <a href="../../../../../reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html">ScriptIntrinsicBlend</a> </span> <span class="sympad">create</span> <span class="normal">(<a href="../../../../../reference/android/support/v8/renderscript/RenderScript.html">RenderScript</a> rs, <a href="../../../../../reference/android/support/v8/renderscript/Element.html">Element</a> e)</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Supported elements types are <code><a href="../../../../../reference/android/support/v8/renderscript/Element.html#U8_4(android.support.v8.renderscript.RenderScript)">U8_4(RenderScript)</a></code></p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Parameters</h5> <table class="jd-tagtable"> <tr> <th>rs</td> <td>The RenderScript context</td> </tr> <tr> <th>e</td> <td>Element type for inputs and outputs</td> </tr> </table> </div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Returns</h5> <ul class="nolist"><li>ScriptIntrinsicBlend </li></ul> </div> </div> </div> <A NAME="forEachAdd(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public void </span> <span class="sympad">forEachAdd</span> <span class="normal">(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Sets dst = min(src + dst, 1.0)</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Parameters</h5> <table class="jd-tagtable"> <tr> <th>ain</td> <td>The source buffer</td> </tr> <tr> <th>aout</td> <td>The destination buffer </td> </tr> </table> </div> </div> </div> <A NAME="forEachClear(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public void </span> <span class="sympad">forEachClear</span> <span class="normal">(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Sets dst = {0, 0, 0, 0}</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Parameters</h5> <table class="jd-tagtable"> <tr> <th>ain</td> <td>The source buffer</td> </tr> <tr> <th>aout</td> <td>The destination buffer </td> </tr> </table> </div> </div> </div> <A NAME="forEachDst(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public void </span> <span class="sympad">forEachDst</span> <span class="normal">(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Sets dst = dst This is a NOP.</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Parameters</h5> <table class="jd-tagtable"> <tr> <th>ain</td> <td>The source buffer</td> </tr> <tr> <th>aout</td> <td>The destination buffer </td> </tr> </table> </div> </div> </div> <A NAME="forEachDstAtop(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public void </span> <span class="sympad">forEachDstAtop</span> <span class="normal">(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>dst = dst.rgb * src.a + (1.0 - dst.a) * src.rgb dst.a = src.a</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Parameters</h5> <table class="jd-tagtable"> <tr> <th>ain</td> <td>The source buffer</td> </tr> <tr> <th>aout</td> <td>The destination buffer </td> </tr> </table> </div> </div> </div> <A NAME="forEachDstIn(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public void </span> <span class="sympad">forEachDstIn</span> <span class="normal">(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Sets dst = dst * src.a</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Parameters</h5> <table class="jd-tagtable"> <tr> <th>ain</td> <td>The source buffer</td> </tr> <tr> <th>aout</td> <td>The destination buffer </td> </tr> </table> </div> </div> </div> <A NAME="forEachDstOut(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public void </span> <span class="sympad">forEachDstOut</span> <span class="normal">(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Sets dst = dst * (1.0 - src.a)</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Parameters</h5> <table class="jd-tagtable"> <tr> <th>ain</td> <td>The source buffer</td> </tr> <tr> <th>aout</td> <td>The destination buffer </td> </tr> </table> </div> </div> </div> <A NAME="forEachDstOver(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public void </span> <span class="sympad">forEachDstOver</span> <span class="normal">(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Sets dst = dst + src * (1.0 - dst.a)</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Parameters</h5> <table class="jd-tagtable"> <tr> <th>ain</td> <td>The source buffer</td> </tr> <tr> <th>aout</td> <td>The destination buffer </td> </tr> </table> </div> </div> </div> <A NAME="forEachMultiply(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public void </span> <span class="sympad">forEachMultiply</span> <span class="normal">(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Sets dst = src * dst</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Parameters</h5> <table class="jd-tagtable"> <tr> <th>ain</td> <td>The source buffer</td> </tr> <tr> <th>aout</td> <td>The destination buffer </td> </tr> </table> </div> </div> </div> <A NAME="forEachSrc(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public void </span> <span class="sympad">forEachSrc</span> <span class="normal">(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Sets dst = src</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Parameters</h5> <table class="jd-tagtable"> <tr> <th>ain</td> <td>The source buffer</td> </tr> <tr> <th>aout</td> <td>The destination buffer </td> </tr> </table> </div> </div> </div> <A NAME="forEachSrcAtop(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public void </span> <span class="sympad">forEachSrcAtop</span> <span class="normal">(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>dst.rgb = src.rgb * dst.a + (1.0 - src.a) * dst.rgb dst.a = dst.a</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Parameters</h5> <table class="jd-tagtable"> <tr> <th>ain</td> <td>The source buffer</td> </tr> <tr> <th>aout</td> <td>The destination buffer </td> </tr> </table> </div> </div> </div> <A NAME="forEachSrcIn(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public void </span> <span class="sympad">forEachSrcIn</span> <span class="normal">(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Sets dst = src * dst.a</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Parameters</h5> <table class="jd-tagtable"> <tr> <th>ain</td> <td>The source buffer</td> </tr> <tr> <th>aout</td> <td>The destination buffer </td> </tr> </table> </div> </div> </div> <A NAME="forEachSrcOut(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public void </span> <span class="sympad">forEachSrcOut</span> <span class="normal">(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Sets dst = src * (1.0 - dst.a)</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Parameters</h5> <table class="jd-tagtable"> <tr> <th>ain</td> <td>The source buffer</td> </tr> <tr> <th>aout</td> <td>The destination buffer </td> </tr> </table> </div> </div> </div> <A NAME="forEachSrcOver(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public void </span> <span class="sympad">forEachSrcOver</span> <span class="normal">(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Sets dst = src + dst * (1.0 - src.a)</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Parameters</h5> <table class="jd-tagtable"> <tr> <th>ain</td> <td>The source buffer</td> </tr> <tr> <th>aout</td> <td>The destination buffer </td> </tr> </table> </div> </div> </div> <A NAME="forEachSubtract(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public void </span> <span class="sympad">forEachSubtract</span> <span class="normal">(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Sets dst = max(dst - src, 0.0)</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Parameters</h5> <table class="jd-tagtable"> <tr> <th>ain</td> <td>The source buffer</td> </tr> <tr> <th>aout</td> <td>The destination buffer </td> </tr> </table> </div> </div> </div> <A NAME="forEachXor(android.support.v8.renderscript.Allocation, android.support.v8.renderscript.Allocation)"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public void </span> <span class="sympad">forEachXor</span> <span class="normal">(<a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> ain, <a href="../../../../../reference/android/support/v8/renderscript/Allocation.html">Allocation</a> aout)</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Sets dst = {src.r ^ dst.r, src.g ^ dst.g, src.b ^ dst.b, src.a ^ dst.a}</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Parameters</h5> <table class="jd-tagtable"> <tr> <th>ain</td> <td>The source buffer</td> </tr> <tr> <th>aout</td> <td>The destination buffer </td> </tr> </table> </div> </div> </div> <A NAME="getKernelIDAdd()"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a> </span> <span class="sympad">getKernelIDAdd</span> <span class="normal">()</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Get a KernelID for the Add kernel.</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Returns</h5> <ul class="nolist"><li>Script.KernelID The KernelID object. </li></ul> </div> </div> </div> <A NAME="getKernelIDClear()"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a> </span> <span class="sympad">getKernelIDClear</span> <span class="normal">()</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Get a KernelID for the Clear kernel.</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Returns</h5> <ul class="nolist"><li>Script.KernelID The KernelID object. </li></ul> </div> </div> </div> <A NAME="getKernelIDDst()"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a> </span> <span class="sympad">getKernelIDDst</span> <span class="normal">()</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Get a KernelID for the Dst kernel.</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Returns</h5> <ul class="nolist"><li>Script.KernelID The KernelID object. </li></ul> </div> </div> </div> <A NAME="getKernelIDDstAtop()"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a> </span> <span class="sympad">getKernelIDDstAtop</span> <span class="normal">()</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Get a KernelID for the DstAtop kernel.</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Returns</h5> <ul class="nolist"><li>Script.KernelID The KernelID object. </li></ul> </div> </div> </div> <A NAME="getKernelIDDstIn()"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a> </span> <span class="sympad">getKernelIDDstIn</span> <span class="normal">()</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Get a KernelID for the DstIn kernel.</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Returns</h5> <ul class="nolist"><li>Script.KernelID The KernelID object. </li></ul> </div> </div> </div> <A NAME="getKernelIDDstOut()"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a> </span> <span class="sympad">getKernelIDDstOut</span> <span class="normal">()</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Get a KernelID for the DstOut kernel.</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Returns</h5> <ul class="nolist"><li>Script.KernelID The KernelID object. </li></ul> </div> </div> </div> <A NAME="getKernelIDDstOver()"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a> </span> <span class="sympad">getKernelIDDstOver</span> <span class="normal">()</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Get a KernelID for the DstOver kernel.</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Returns</h5> <ul class="nolist"><li>Script.KernelID The KernelID object. </li></ul> </div> </div> </div> <A NAME="getKernelIDMultiply()"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a> </span> <span class="sympad">getKernelIDMultiply</span> <span class="normal">()</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Get a KernelID for the Multiply kernel.</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Returns</h5> <ul class="nolist"><li>Script.KernelID The KernelID object. </li></ul> </div> </div> </div> <A NAME="getKernelIDSrc()"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a> </span> <span class="sympad">getKernelIDSrc</span> <span class="normal">()</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Get a KernelID for the Src kernel.</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Returns</h5> <ul class="nolist"><li>Script.KernelID The KernelID object. </li></ul> </div> </div> </div> <A NAME="getKernelIDSrcAtop()"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a> </span> <span class="sympad">getKernelIDSrcAtop</span> <span class="normal">()</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Get a KernelID for the SrcAtop kernel.</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Returns</h5> <ul class="nolist"><li>Script.KernelID The KernelID object. </li></ul> </div> </div> </div> <A NAME="getKernelIDSrcIn()"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a> </span> <span class="sympad">getKernelIDSrcIn</span> <span class="normal">()</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Get a KernelID for the SrcIn kernel.</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Returns</h5> <ul class="nolist"><li>Script.KernelID The KernelID object. </li></ul> </div> </div> </div> <A NAME="getKernelIDSrcOut()"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a> </span> <span class="sympad">getKernelIDSrcOut</span> <span class="normal">()</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Get a KernelID for the SrcOut kernel.</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Returns</h5> <ul class="nolist"><li>Script.KernelID The KernelID object. </li></ul> </div> </div> </div> <A NAME="getKernelIDSrcOver()"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a> </span> <span class="sympad">getKernelIDSrcOver</span> <span class="normal">()</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Get a KernelID for the SrcOver kernel.</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Returns</h5> <ul class="nolist"><li>Script.KernelID The KernelID object. </li></ul> </div> </div> </div> <A NAME="getKernelIDSubtract()"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a> </span> <span class="sympad">getKernelIDSubtract</span> <span class="normal">()</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Get a KernelID for the Subtract kernel.</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Returns</h5> <ul class="nolist"><li>Script.KernelID The KernelID object. </li></ul> </div> </div> </div> <A NAME="getKernelIDXor()"></A> <div class="jd-details api apilevel-"> <h4 class="jd-details-title"> <span class="normal"> public <a href="../../../../../reference/android/support/v8/renderscript/Script.KernelID.html">Script.KernelID</a> </span> <span class="sympad">getKernelIDXor</span> <span class="normal">()</span> </h4> <div class="api-level"> <div></div> </div> <div class="jd-details-descr"> <div class="jd-tagdata jd-tagdescr"><p>Get a KernelID for the Xor kernel.</p></div> <div class="jd-tagdata"> <h5 class="jd-tagtitle">Returns</h5> <ul class="nolist"><li>Script.KernelID The KernelID object. </li></ul> </div> </div> </div> <!-- ========= METHOD DETAIL ======== --> <!-- ========= END OF CLASS DATA ========= --> <A NAME="navbar_top"></A> <div id="footer" class="wrap" > <div id="copyright"> Except as noted, this content is licensed under <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache 2.0</a>. For details and restrictions, see the <a href="../../../../../license.html"> Content License</a>. </div> <div id="build_info"> Android 4.4&nbsp;r1 &mdash; <script src="../../../../../timestamp.js" type="text/javascript"></script> <script>document.write(BUILD_TIMESTAMP)</script> </div> <div id="footerlinks"> <p> <a href="../../../../../about/index.html">About Android</a>&nbsp;&nbsp;|&nbsp; <a href="../../../../../legal.html">Legal</a>&nbsp;&nbsp;|&nbsp; <a href="../../../../../support.html">Support</a> </p> </div> </div> <!-- end footer --> </div> <!-- jd-content --> </div><!-- end doc-content --> </div> <!-- end body-content --> </body> </html>
{ "content_hash": "83a98e7281da53d99f3d69ab0e835f13", "timestamp": "", "source": "github", "line_count": 3689, "max_line_length": 775, "avg_line_length": 35.605584169151534, "alnum_prop": 0.5596007582851792, "repo_name": "terrytowne/android-developer-cn", "id": "1aeeb80a918637b0f4a8bd672432ceccf7c715e4", "size": "131725", "binary": false, "copies": "2", "ref": "refs/heads/4.4.zh_cn", "path": "reference/android/support/v8/renderscript/ScriptIntrinsicBlend.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "225261" }, { "name": "JavaScript", "bytes": "218708" } ], "symlink_target": "" }
package com.github.fakemongo; import com.github.fakemongo.impl.text.TextSearch; import com.github.fakemongo.junit.FongoRule; import com.mongodb.BasicDBList; import com.mongodb.BasicDBObject; import com.mongodb.DBCollection; import com.mongodb.DBObject; import com.mongodb.util.JSON; import java.util.List; import org.assertj.core.api.Assertions; import static org.junit.Assert.assertEquals; import org.junit.Before; import org.junit.Rule; import org.junit.Test; /** * @author Alexander Arutuniants <[email protected]> */ public class FongoTextSearchTest { private DBCollection collection; private TextSearch ts; @Rule public FongoRule fongoRule = new FongoRule(!true); @Before public void setUp() { collection = fongoRule.newCollection(); collection.insert((DBObject) JSON.parse("{ _id:1, textField: \"aaa bbb\", otherField: \"text1 aaa\" }")); collection.insert((DBObject) JSON.parse("{ _id:2, textField: \"ccc ddd\", otherField: \"text2 aaa\" }")); collection.insert((DBObject) JSON.parse("{ _id:3, textField: \"eee fff\", otherField: \"text3 aaa\" }")); collection.insert((DBObject) JSON.parse("{ _id:4, textField: \"aaa eee\", otherField: \"text4 aaa\" }")); collection.createIndex(new BasicDBObject("textField", "text")); ts = new TextSearch(collection); } @Test public void testFindByTextSearch_String() { String searchString = "aaa -eee -bbb"; DBObject result = ts.findByTextSearch(searchString); Assertions.assertThat(((List) result.get("results"))).hasSize(0); DBObject expected = new BasicDBObject("language", "english"); expected.put("results", new BasicDBList()); expected.put("stats", new BasicDBObject("nscannedObjects", 5L) .append("nscanned", 2L) .append("n", 0L) .append("timeMicros", 1) ); expected.put("ok", 1); Assertions.assertThat(result).isEqualTo(expected); } @Test public void testFindByTextSearch_String_DBObject() { String searchString = "aaa -eee"; DBObject project = new BasicDBObject("textField", 1); DBObject result = ts.findByTextSearch(searchString, project); DBObject expected = new BasicDBObject("language", "english"); expected.put("results", JSON.parse("[ { " + "\"score\" : 0.75 , " + "\"obj\" : { \"_id\" : 1 , \"textField\" : \"aaa bbb\"}}]")); expected.put("stats", new BasicDBObject("nscannedObjects", 4L) .append("nscanned", 2L) .append("n", 1L) .append("timeMicros", 1) ); expected.put("ok", 1); Assertions.assertThat(result).isEqualTo(expected); assertEquals("aaa bbb", ((DBObject) ((DBObject) ((List) result.get("results")).get(0)).get("obj")).get("textField")); } @Test public void testFindByTextSearch_3args() { String searchString = "aaa bbb ccc ddd eee"; DBObject project = new BasicDBObject("textField", 1).append("otherField", 1); DBObject result = ts.findByTextSearch(searchString, project, 2); DBObject expected = new BasicDBObject("language", "english"); expected.put("results", JSON.parse("[ " + "{ \"score\" : 1.5 , " + "\"obj\" : { \"_id\" : 1 , \"textField\" : \"aaa bbb\" , \"otherField\" : \"text1 aaa\"}} , " + "{ \"score\" : 1.5 , " + "\"obj\" : { \"_id\" : 2 , \"textField\" : \"ccc ddd\" , \"otherField\" : \"text2 aaa\"}}]")); expected.put("stats", new BasicDBObject("nscannedObjects", 6L) .append("nscanned", 6L) .append("n", 2L) .append("timeMicros", 1) ); expected.put("ok", 1); Assertions.assertThat(result).isEqualTo(expected); assertEquals("ccc ddd", ((DBObject) ((DBObject) ((List) result.get("results")).get(1)).get("obj")).get("textField")); } }
{ "content_hash": "3e5dfcdc8d7aefa93b38dc1f4ce9b1ff", "timestamp": "", "source": "github", "line_count": 110, "max_line_length": 109, "avg_line_length": 34.71818181818182, "alnum_prop": 0.6289604608536266, "repo_name": "fnouama/fongo", "id": "e68a7e74b540d61ed8f7465123a6eeaff294cd8b", "size": "4450", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "src/test/java/com/github/fakemongo/FongoTextSearchTest.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "704263" }, { "name": "Scala", "bytes": "3957" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (1.8.0) on Thu Nov 06 23:52:00 PST 2014 --> <title>CSV.Orientation</title> <meta name="date" content="2014-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="CSV.Orientation"; } } catch(err) { } //--> var methods = {"i0":9,"i1":9}; var tabs = {65535:["t0","All Methods"],1:["t1","Static 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> <!-- ========= START OF TOP NAVBAR ======= --> <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/CSV.Orientation.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><a href="../../blackdoor/util/CSV.html" title="class in blackdoor.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../blackdoor/util/DBP.html" title="class in blackdoor.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../index.html?blackdoor/util/CSV.Orientation.html" target="_top">Frames</a></li> <li><a href="CSV.Orientation.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#enum.constant.summary">Enum Constants</a>&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li><a href="#enum.constant.detail">Enum Constants</a>&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <!-- ======== START OF CLASS DATA ======== --> <div class="header"> <div class="subTitle">blackdoor.util</div> <h2 title="Enum CSV.Orientation" class="title">Enum CSV.Orientation</h2> </div> <div class="contentContainer"> <ul class="inheritance"> <li>java.lang.Object</li> <li> <ul class="inheritance"> <li>java.lang.Enum&lt;<a href="../../blackdoor/util/CSV.Orientation.html" title="enum in blackdoor.util">CSV.Orientation</a>&gt;</li> <li> <ul class="inheritance"> <li>blackdoor.util.CSV.Orientation</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&lt;<a href="../../blackdoor/util/CSV.Orientation.html" title="enum in blackdoor.util">CSV.Orientation</a>&gt;</dd> </dl> <dl> <dt>Enclosing class:</dt> <dd><a href="../../blackdoor/util/CSV.html" title="class in blackdoor.util">CSV</a></dd> </dl> <hr> <br> <pre>public static enum <span class="typeNameLabel">CSV.Orientation</span> extends java.lang.Enum&lt;<a href="../../blackdoor/util/CSV.Orientation.html" title="enum in blackdoor.util">CSV.Orientation</a>&gt;</pre> </li> </ul> </div> <div class="summary"> <ul class="blockList"> <li class="blockList"> <!-- =========== ENUM CONSTANT SUMMARY =========== --> <ul class="blockList"> <li class="blockList"><a name="enum.constant.summary"> <!-- --> </a> <h3>Enum Constant Summary</h3> <table class="memberSummary" 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">&nbsp;</span></caption> <tr> <th class="colOne" scope="col">Enum Constant and Description</th> </tr> <tr class="altColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../blackdoor/util/CSV.Orientation.html#INV">INV</a></span></code>&nbsp;</td> </tr> <tr class="rowColor"> <td class="colOne"><code><span class="memberNameLink"><a href="../../blackdoor/util/CSV.Orientation.html#STD">STD</a></span></code>&nbsp;</td> </tr> </table> </li> </ul> <!-- ========== METHOD SUMMARY =========== --> <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">&nbsp;</span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd">&nbsp;</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>static <a href="../../blackdoor/util/CSV.Orientation.html" title="enum in blackdoor.util">CSV.Orientation</a></code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../blackdoor/util/CSV.Orientation.html#valueOf-java.lang.String-">valueOf</a></span>(java.lang.String&nbsp;name)</code> <div class="block">Returns the enum constant of this type with the specified name.</div> </td> </tr> <tr id="i1" class="rowColor"> <td class="colFirst"><code>static <a href="../../blackdoor/util/CSV.Orientation.html" title="enum in blackdoor.util">CSV.Orientation</a>[]</code></td> <td class="colLast"><code><span class="memberNameLink"><a href="../../blackdoor/util/CSV.Orientation.html#values--">values</a></span>()</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="methods.inherited.from.class.java.lang.Enum"> <!-- --> </a> <h3>Methods inherited from class&nbsp;java.lang.Enum</h3> <code>compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf</code></li> </ul> <ul class="blockList"> <li class="blockList"><a name="methods.inherited.from.class.java.lang.Object"> <!-- --> </a> <h3>Methods inherited from class&nbsp;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"> <!-- ============ ENUM CONSTANT DETAIL =========== --> <ul class="blockList"> <li class="blockList"><a name="enum.constant.detail"> <!-- --> </a> <h3>Enum Constant Detail</h3> <a name="STD"> <!-- --> </a> <ul class="blockList"> <li class="blockList"> <h4>STD</h4> <pre>public static final&nbsp;<a href="../../blackdoor/util/CSV.Orientation.html" title="enum in blackdoor.util">CSV.Orientation</a> STD</pre> </li> </ul> <a name="INV"> <!-- --> </a> <ul class="blockListLast"> <li class="blockList"> <h4>INV</h4> <pre>public static final&nbsp;<a href="../../blackdoor/util/CSV.Orientation.html" title="enum in blackdoor.util">CSV.Orientation</a> INV</pre> </li> </ul> </li> </ul> <!-- ============ METHOD DETAIL ========== --> <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&nbsp;<a href="../../blackdoor/util/CSV.Orientation.html" title="enum in blackdoor.util">CSV.Orientation</a>[]&nbsp;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 (CSV.Orientation c : CSV.Orientation.values()) &nbsp; System.out.println(c); </pre></div> <dl> <dt><span class="returnLabel">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="blockListLast"> <li class="blockList"> <h4>valueOf</h4> <pre>public static&nbsp;<a href="../../blackdoor/util/CSV.Orientation.html" title="enum in blackdoor.util">CSV.Orientation</a>&nbsp;valueOf(java.lang.String&nbsp;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="paramLabel">Parameters:</span></dt> <dd><code>name</code> - the name of the enum constant to be returned.</dd> <dt><span class="returnLabel">Returns:</span></dt> <dd>the enum constant with the specified name</dd> <dt><span class="throwsLabel">Throws:</span></dt> <dd><code>java.lang.IllegalArgumentException</code> - if this enum type has no constant with the specified name</dd> <dd><code>java.lang.NullPointerException</code> - if the argument is null</dd> </dl> </li> </ul> </li> </ul> </li> </ul> </div> </div> <!-- ========= END OF CLASS DATA ========= --> <!-- ======= START OF BOTTOM NAVBAR ====== --> <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/CSV.Orientation.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><a href="../../blackdoor/util/CSV.html" title="class in blackdoor.util"><span class="typeNameLink">Prev&nbsp;Class</span></a></li> <li><a href="../../blackdoor/util/DBP.html" title="class in blackdoor.util"><span class="typeNameLink">Next&nbsp;Class</span></a></li> </ul> <ul class="navList"> <li><a href="../../index.html?blackdoor/util/CSV.Orientation.html" target="_top">Frames</a></li> <li><a href="CSV.Orientation.html" target="_top">No&nbsp;Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <div> <ul class="subNavList"> <li>Summary:&nbsp;</li> <li>Nested&nbsp;|&nbsp;</li> <li><a href="#enum.constant.summary">Enum Constants</a>&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#method.summary">Method</a></li> </ul> <ul class="subNavList"> <li>Detail:&nbsp;</li> <li><a href="#enum.constant.detail">Enum Constants</a>&nbsp;|&nbsp;</li> <li>Field&nbsp;|&nbsp;</li> <li><a href="#method.detail">Method</a></li> </ul> </div> <a name="skip.navbar.bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> </body> </html>
{ "content_hash": "6b5a9ae46da98f762363a4074a8bfc7b", "timestamp": "", "source": "github", "line_count": 345, "max_line_length": 389, "avg_line_length": 36.26376811594203, "alnum_prop": 0.6540644233074894, "repo_name": "kag0/nbd", "id": "e4891b13454f3d316526c647f4e676c26b019194", "size": "12511", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "doc/blackdoor/util/CSV.Orientation.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "11139" }, { "name": "Java", "bytes": "174394" }, { "name": "JavaScript", "bytes": "827" } ], "symlink_target": "" }
// This file is automatically generated. package adila.db; /* * Camelus Camelus L7 * * DEVICE: TR-7U * MODEL: L7 */ final class tr2d7u_l7 { public static final String DATA = "Camelus|Camelus L7|"; }
{ "content_hash": "02b2d5a6dafe807f66ceb8d12d5c89c0", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 60, "avg_line_length": 16.153846153846153, "alnum_prop": 0.6666666666666666, "repo_name": "karim/adila", "id": "13d45f2d316dfe4b96d5c733fa7248e953bf8447", "size": "210", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "database/src/main/java/adila/db/tr2d7u_l7.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "2903103" }, { "name": "Prolog", "bytes": "489" }, { "name": "Python", "bytes": "3280" } ], "symlink_target": "" }
@charset "utf-8"; /* CSS Document */ #preloader { background-color: #9bc638; } .colored-text { color: #9bc638; } .tp-banner a.btn1:hover { border: 2px solid #9bc638; background-color: #9bc638; } .tp-banner a.btn2 { border: 2px solid #9bc638; background-color: #9bc638; } .navbar-inverse { background-color: #9bc638; } .section-heading .heading { color: #9bc638; } .owl-theme .owl-controls .owl-page span { background: #9bc638; } .education-timeline .programe { color: #9bc638; } .education-timeline .education:hover .divider { background-color: #9bc638; } .education-timeline .education:hover .duration { color: #9bc638; } #process .items:hover { background: #9bc638; } .work-experience-timeline .company-name { color: #9bc638; } .work-experience-timeline .url a{ color: #9bc638; } .work-experience-timeline .col-left:hover .arrow { border-color: transparent #9bc638 transparent transparent; } .work-experience-timeline .col-right:hover .arrow { border-color: transparent transparent transparent #9bc638; } .work-experience-timeline .col-right:hover .duration, .work-experience-timeline .col-left:hover .duration { color: #9bc638; } #services-carousel .items:hover .icon { color: #9bc638; } #options ul li:hover a, #options ul li a.selected { border: 2px solid #9bc638; background-color: #9bc638; } .overlayzoom span.zoom { background: rgb(4, 158, 228); /* RGBa with 0.6 opacity */ background: rgba(4, 158, 228, 0.7); } #video .play a:hover { color: #9bc638; } #awards-carousel .items:hover .icon { color: #9bc638; } #testimonials-carousel .items .emp-name { color: #9bc638; } #contact { background-color: #9bc638; } #contact .section-heading h1.icon-line i { background: #9bc638; } #contact .contact-form .form button { color: #9bc638; } #contact .contact-form .form button:hover { background-color: #9bc638; } .social-icons ul li { background-color: #9bc638; } #footer .desc i { margin-bottom: 12px; color: #9bc638; } .link-btn a { background-color: #9bc638; border: 4px solid #9bc638; } .link-btn a:hover { border: 4px solid #9bc638; color: #9bc638; } .link-btn-2 a { background-color: #9bc638; border: 4px solid #9bc638; } .link-btn-2 a:hover { border: 4px solid #9bc638; color: #9bc638; } .scrollup { background-color: #9bc638; }
{ "content_hash": "46061ef7ab8dc50d5d8f065feab2e16b", "timestamp": "", "source": "github", "line_count": 111, "max_line_length": 107, "avg_line_length": 20.53153153153153, "alnum_prop": 0.701623519087319, "repo_name": "linuxhatto/Manicure", "id": "79b6421b174171b078e67dcab47223b772728b40", "size": "2279", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "static/css/colors/green.css", "mode": "33261", "license": "bsd-3-clause", "language": [ { "name": "ApacheConf", "bytes": "876" }, { "name": "CSS", "bytes": "852938" }, { "name": "CoffeeScript", "bytes": "4704" }, { "name": "Go", "bytes": "6808" }, { "name": "HTML", "bytes": "1192923" }, { "name": "JavaScript", "bytes": "4476576" }, { "name": "Makefile", "bytes": "448" }, { "name": "PHP", "bytes": "2211297" }, { "name": "Python", "bytes": "5596" }, { "name": "Shell", "bytes": "3733" } ], "symlink_target": "" }
CloudZero Reactor API ===================== The `CloudZero Reactor API`_ is documented on SwaggerHub .. _CloudZero Reactor API: https://app.swaggerhub.com/apis/cloudzero/cloudzero-reactor-api/
{ "content_hash": "7a85b6c5c10a974c933b477baab4a9d8", "timestamp": "", "source": "github", "line_count": 5, "max_line_length": 91, "avg_line_length": 38.8, "alnum_prop": 0.7061855670103093, "repo_name": "Cloudzero/cloudzero-reactor-aws", "id": "699d403364c2a24369f89836ab257487b1332f01", "size": "194", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "docs/api.rst", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Makefile", "bytes": "5349" }, { "name": "Python", "bytes": "803664" } ], "symlink_target": "" }
package org.apache.jackrabbit.oak.commons.jmx; import javax.management.DescriptorRead; import javax.management.MBeanAttributeInfo; import javax.management.MBeanInfo; import javax.management.MBeanOperationInfo; import javax.management.MBeanParameterInfo; import javax.management.StandardMBean; /** * The extension of {@link javax.management.StandardMBean} that will automatically provide JMX * metadata through annotations. * * @see javax.management.MBeanInfo * @see Description * @see Name * @see Impact */ public class AnnotatedStandardMBean extends StandardMBean { /** * Make a DynamicMBean out of the object implementation, using the specified * mbeanInterface class. * * @see {@link javax.management.StandardMBean#StandardMBean(Object, Class)} */ public <T> AnnotatedStandardMBean(T implementation, Class<T> mbeanInterface){ super(implementation, mbeanInterface, false); } protected AnnotatedStandardMBean(Class<?> mbeanInterface){ super(mbeanInterface, false); } @Override protected String getDescription(MBeanInfo info) { String desc = getValue(info, Description.NAME); return desc == null ? super.getDescription(info) : desc; } @Override protected String getDescription(MBeanAttributeInfo info) { String desc = getValue(info, Description.NAME); return desc == null ? super.getDescription(info) : desc; } @Override protected String getDescription(MBeanOperationInfo info) { String desc = getValue(info, Description.NAME); return desc == null ? super.getDescription(info) : desc; } @Override protected int getImpact(MBeanOperationInfo info) { String opt = getValue(info, Impact.NAME); return opt == null ? super.getImpact(info) : ImpactOption.valueOf(opt).value(); } @Override protected String getParameterName(MBeanOperationInfo op, MBeanParameterInfo param, int sequence) { String name = getValue(param, Name.NAME); return name == null ? super.getParameterName(op, param, sequence) : name; } @Override protected String getDescription(MBeanOperationInfo op, MBeanParameterInfo param, int sequence) { String desc = getValue(param, Description.NAME); return desc == null ? super.getDescription(op, param, sequence) : desc; } private static String getValue(DescriptorRead dr, String fieldName){ return (String) dr.getDescriptor().getFieldValue(fieldName); } }
{ "content_hash": "dcfe426aa7b10bcd0942f2adf09cbd76", "timestamp": "", "source": "github", "line_count": 80, "max_line_length": 94, "avg_line_length": 33.3125, "alnum_prop": 0.6724202626641651, "repo_name": "afilimonov/jackrabbit-oak", "id": "5f46eaac8c82474c10544fc8398c2b58251467e9", "size": "3472", "binary": false, "copies": "7", "ref": "refs/heads/trunk", "path": "oak-commons/src/main/java/org/apache/jackrabbit/oak/commons/jmx/AnnotatedStandardMBean.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "3451" }, { "name": "Groovy", "bytes": "103231" }, { "name": "Java", "bytes": "16508233" }, { "name": "JavaScript", "bytes": "42583" }, { "name": "Perl", "bytes": "7585" }, { "name": "Shell", "bytes": "17322" } ], "symlink_target": "" }
package io.datarouter.storage.node.factory; import java.util.function.Supplier; import io.datarouter.model.databean.Databean; import io.datarouter.model.entity.Entity; import io.datarouter.model.key.entity.EntityKey; import io.datarouter.model.key.primary.EntityPrimaryKey; import io.datarouter.model.key.primary.RegularPrimaryKey; import io.datarouter.model.serialize.fielder.DatabeanFielder; import io.datarouter.storage.client.ClientId; import io.datarouter.storage.client.imp.DatabeanClientNodeFactory; import io.datarouter.storage.node.NodeParams; import io.datarouter.storage.node.builder.NodeBuilder; import io.datarouter.storage.node.entity.EntityNodeParams; import io.datarouter.storage.node.type.physical.PhysicalNode; public abstract class BaseDatabeanNodeFactory extends BaseNodeFactory{ private final Supplier<Boolean> enableDiagnosticsSupplier; public BaseDatabeanNodeFactory(Supplier<Boolean> enableDiagnosticsSupplier){ this.enableDiagnosticsSupplier = enableDiagnosticsSupplier; } public <EK extends EntityKey<EK>, E extends Entity<EK>, PK extends EntityPrimaryKey<EK,PK>, D extends Databean<PK,D>, F extends DatabeanFielder<PK,D>, N extends PhysicalNode<PK,D,F>> N create( EntityNodeParams<EK,E> entityNodeParams, NodeParams<PK,D,F> params){ DatabeanClientNodeFactory clientNodeFactory = getClientNodeFactory( params.getClientId(), DatabeanClientNodeFactory.class); return cast(clientNodeFactory.createDatabeanNode(entityNodeParams, params)); } public <EK extends EntityKey<EK>, PK extends EntityPrimaryKey<EK,PK>, D extends Databean<PK,D>, F extends DatabeanFielder<PK,D>> NodeBuilder<EK,PK,D,F> create( ClientId clientId, Supplier<EK> entityKeySupplier, Supplier<D> databeanSupplier, Supplier<F> fielderSupplier){ return new NodeBuilder<>(this, enableDiagnosticsSupplier, clientId, entityKeySupplier, databeanSupplier, fielderSupplier); } public <PK extends RegularPrimaryKey<PK>, D extends Databean<PK,D>, F extends DatabeanFielder<PK,D>> NodeBuilder<PK,PK,D,F> create( ClientId clientId, Supplier<D> databeanSupplier, Supplier<F> fielderSupplier){ Supplier<PK> entityKeySupplier = databeanSupplier.get().getKeySupplier(); return create(clientId, entityKeySupplier, databeanSupplier, fielderSupplier); } public <EK extends EntityKey<EK>, PK extends EntityPrimaryKey<EK,PK>, D extends Databean<PK,D>, F extends DatabeanFielder<PK,D>, N extends PhysicalNode<PK,D,F>> N register(N node){ return datarouter.register(node); } }
{ "content_hash": "063faf739db7e5bac6bcebbd87533c62", "timestamp": "", "source": "github", "line_count": 75, "max_line_length": 88, "avg_line_length": 34.2, "alnum_prop": 0.7879142300194931, "repo_name": "hotpads/datarouter", "id": "eeb722798d6197382adbff9108a4d25169b787d2", "size": "3178", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "datarouter-storage/src/main/java/io/datarouter/storage/node/factory/BaseDatabeanNodeFactory.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "9438" }, { "name": "Java", "bytes": "8616487" }, { "name": "JavaScript", "bytes": "639471" } ], "symlink_target": "" }
<?php /** * Prevent direct access to this file. * * @since 2.7.0 */ if ( ! defined( 'WPINC' ) ) { exit( 'Sorry, you are not allowed to access this file directly.' ); } /** * Include reports menu items for WooCommerce 2.1.x branch: * * @since 2.7.0 */ /** Reports */ $menu_items[ 'reports' ] = array( 'parent' => $woocommercebar, 'title' => __( 'Reports', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports' ), 'meta' => array( 'target' => '', 'title' => __( 'Reports', 'woocommerce-admin-bar-addition' ) ) ); /** Orders & Sales */ $menu_items[ 'reportssales' ] = array( 'parent' => $reports, 'title' => __( 'Orders &amp; Sales', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=orders' ), 'meta' => array( 'target' => '', 'title' => __( 'Orders &amp; Sales', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportssales-last7days' ] = array( 'parent' => $reportssales, 'title' => __( 'Last 7 Days', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&range=7day' ), 'meta' => array( 'target' => '', 'title' => __( 'Last 7 Days', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportssales-thismonth' ] = array( 'parent' => $reportssales, 'title' => __( 'This Month', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&range=month' ), 'meta' => array( 'target' => '', 'title' => __( 'This Month', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportssales-lastmonth' ] = array( 'parent' => $reportssales, 'title' => __( 'Last Month', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&range=last_month' ), 'meta' => array( 'target' => '', 'title' => __( 'Last Month', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportssales-year' ] = array( 'parent' => $reportssales, 'title' => __( 'Year', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&range=last_month' ), 'meta' => array( 'target' => '', 'title' => __( 'Year', 'woocommerce-admin-bar-addition' ) ) ); /** By Products */ $menu_items[ 'reportsproducts' ] = array( 'parent' => $reports, 'title' => __( 'Product Sales', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=orders&report=sales_by_product' ), 'meta' => array( 'target' => '', 'title' => __( 'Product Sales', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportsproducts-last7days' ] = array( 'parent' => $reportsproducts, 'title' => __( 'Last 7 Days', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=orders&report=sales_by_product&range=7day' ), 'meta' => array( 'target' => '', 'title' => __( 'Last 7 Days', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportsproducts-thismonth' ] = array( 'parent' => $reportsproducts, 'title' => __( 'This Month', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=orders&report=sales_by_product&range=month' ), 'meta' => array( 'target' => '', 'title' => __( 'This Month', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportsproducts-lastmonth' ] = array( 'parent' => $reportsproducts, 'title' => __( 'Last Month', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=orders&report=sales_by_product&range=last_month' ), 'meta' => array( 'target' => '', 'title' => __( 'Last Month', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportsproducts-year' ] = array( 'parent' => $reportsproducts, 'title' => __( 'Year', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=orders&report=sales_by_product&range=year' ), 'meta' => array( 'target' => '', 'title' => __( 'Year', 'woocommerce-admin-bar-addition' ) ) ); /** by Category */ $menu_items[ 'reportscategories' ] = array( 'parent' => $reports, 'title' => __( 'Category Sales', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=orders&report=sales_by_category' ), 'meta' => array( 'target' => '', 'title' => __( 'Category Sales', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportscategories-last7days' ] = array( 'parent' => $reportscategories, 'title' => __( 'Last 7 Days', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=orders&report=sales_by_category&range=7day' ), 'meta' => array( 'target' => '', 'title' => __( 'Last 7 Days', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportscategories-thismonth' ] = array( 'parent' => $reportscategories, 'title' => __( 'This Month', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=orders&report=sales_by_category&range=month' ), 'meta' => array( 'target' => '', 'title' => __( 'This Month', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportscategories-lastmonth' ] = array( 'parent' => $reportscategories, 'title' => __( 'Last Month', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=orders&report=sales_by_category&range=last_month' ), 'meta' => array( 'target' => '', 'title' => __( 'Last Month', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportscategories-year' ] = array( 'parent' => $reportscategories, 'title' => __( 'Year', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=orders&report=sales_by_category&range=year' ), 'meta' => array( 'target' => '', 'title' => __( 'Year', 'woocommerce-admin-bar-addition' ) ) ); /** by Coupon */ $menu_items[ 'reportscoupons' ] = array( 'parent' => $reports, 'title' => __( 'Coupon Usage', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=orders&report=coupon_usage' ), 'meta' => array( 'target' => '', 'title' => __( 'Coupon Usage', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportscoupons-last7days' ] = array( 'parent' => $reportscoupons, 'title' => __( 'Last 7 Days', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=orders&report=coupon_usage&range=7day' ), 'meta' => array( 'target' => '', 'title' => __( 'Last 7 Days', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportscoupons-thismonth' ] = array( 'parent' => $reportscoupons, 'title' => __( 'This Month', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=orders&report=coupon_usage&range=month' ), 'meta' => array( 'target' => '', 'title' => __( 'This Month', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportscoupons-lastmonth' ] = array( 'parent' => $reportscoupons, 'title' => __( 'Last Month', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=orders&report=coupon_usage&range=month' ), 'meta' => array( 'target' => '', 'title' => __( 'Last Month', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportscoupons-year' ] = array( 'parent' => $reportscoupons, 'title' => __( 'Year', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=orders&report=coupon_usage&range=year' ), 'meta' => array( 'target' => '', 'title' => __( 'Year', 'woocommerce-admin-bar-addition' ) ) ); /** Customers */ $menu_items[ 'reportscustomers' ] = array( 'parent' => $reports, 'title' => __( 'Customers', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=customers' ), 'meta' => array( 'target' => '', 'title' => __( 'Customers', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportscustomers-vsguests' ] = array( 'parent' => $reportscustomers, 'title' => __( 'Customers vs. Guests', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=customers&report=customers' ), 'meta' => array( 'target' => '', 'title' => __( 'Customers vs. Guests', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportscustomers-list' ] = array( 'parent' => $reportscustomers, 'title' => __( 'Customer Listing', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=customers&report=customer_list' ), 'meta' => array( 'target' => '', 'title' => __( 'Customer Listing', 'woocommerce-admin-bar-addition' ) ) ); /** Stock */ $menu_items[ 'reportsstock' ] = array( 'parent' => $reports, 'title' => __( 'Stock', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=stock' ), 'meta' => array( 'target' => '', 'title' => __( 'Stock', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportsstock-low' ] = array( 'parent' => $reportsstock, 'title' => __( 'Low in Stock', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=stock&report=low_in_stock' ), 'meta' => array( 'target' => '', 'title' => __( 'Low in Stock', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportsstock-out' ] = array( 'parent' => $reportsstock, 'title' => __( 'Out of Stock', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=stock&report=out_of_stock' ), 'meta' => array( 'target' => '', 'title' => __( 'Out of Stock', 'woocommerce-admin-bar-addition' ) ) ); $menu_items[ 'reportsstock-most' ] = array( 'parent' => $reportsstock, 'title' => __( 'Most Stocked', 'woocommerce-admin-bar-addition' ), 'href' => admin_url( 'admin.php?page=wc-reports&tab=stock&report=most_stocked' ), 'meta' => array( 'target' => '', 'title' => __( 'Most Stocked', 'woocommerce-admin-bar-addition' ) ) );
{ "content_hash": "56213dd946604740fd1ffec6492d85e2", "timestamp": "", "source": "github", "line_count": 304, "max_line_length": 109, "avg_line_length": 34.276315789473685, "alnum_prop": 0.5832053742802303, "repo_name": "Doap/sinkjuice.com", "id": "928c8a82c7df1f242e7684d42a5380768419c1ab", "size": "10892", "binary": false, "copies": "10", "ref": "refs/heads/master", "path": "plugins/woocommerce-admin-bar-addition/includes/wcaba-reports-v21x.php", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "ApacheConf", "bytes": "2903" }, { "name": "CSS", "bytes": "7024597" }, { "name": "CoffeeScript", "bytes": "2134" }, { "name": "HTML", "bytes": "366280" }, { "name": "JavaScript", "bytes": "6153683" }, { "name": "Makefile", "bytes": "1531248" }, { "name": "PHP", "bytes": "63534232" }, { "name": "Perl", "bytes": "1539" }, { "name": "Ruby", "bytes": "7550" }, { "name": "Shell", "bytes": "2092" }, { "name": "Visual Basic", "bytes": "2281" }, { "name": "XSLT", "bytes": "10938" } ], "symlink_target": "" }
package model object CollectionTime extends Enumeration { type Code = Value val Daily, Weekly, Adhoc = Value }
{ "content_hash": "6043ba1c0225344079b077ecc5a274f4", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 43, "avg_line_length": 16.571428571428573, "alnum_prop": 0.75, "repo_name": "foodcloud/bonobo", "id": "ee3841d527aee8c682c4f735425905a15f5d4cda", "size": "116", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "app/model/CollectionTime.scala", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "20397" }, { "name": "Scala", "bytes": "12221" }, { "name": "Shell", "bytes": "193" } ], "symlink_target": "" }
package io.taig.android.graphic.syntax import io.taig.android.graphic.operation import scala.language.implicitConversions trait numeric { implicit def graphicNumericSyntax[T: Numeric]( value: T ): operation.numeric[T] = new operation.numeric[T](value) } object numeric extends numeric
{ "content_hash": "136c50c0858e906aa5f03299f1e2a50d", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 59, "avg_line_length": 23, "alnum_prop": 0.7759197324414716, "repo_name": "Taig/Toolbelt", "id": "0b9b9b83afbb120b5fb4409c744c2da7b781c5a4", "size": "299", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "graphic/src/main/scala/io/taig/android/graphic/syntax/numeric.scala", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "3940" }, { "name": "Scala", "bytes": "97288" } ], "symlink_target": "" }
@interface XMGTabController : UITabBarController @end
{ "content_hash": "cef2c5784e423dfb97721f4f73343b5f", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 48, "avg_line_length": 18.333333333333332, "alnum_prop": 0.8363636363636363, "repo_name": "jfresearch/bsbdjdemo", "id": "bb551c3aaa6aa79920d1f18ab5ac0f614e97a6d4", "size": "231", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "baisibudejiedemo/baisibudejiedemo/Classes/Other/Controller/XMGTabController.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Objective-C", "bytes": "27379" } ], "symlink_target": "" }
// // GTLMapsEngineIconStyle.h // // ---------------------------------------------------------------------------- // NOTE: This file is generated from Google APIs Discovery Service. // Service: // Google Maps Engine API (mapsengine/v1) // Description: // The Google Maps Engine API allows developers to store and query geospatial // vector and raster data. // Documentation: // https://developers.google.com/maps-engine/ // Classes: // GTLMapsEngineIconStyle (0 custom class methods, 2 custom properties) #if GTL_BUILT_AS_FRAMEWORK #import "GTL/GTLObject.h" #else #import "GTLObject.h" #endif // ---------------------------------------------------------------------------- // // GTLMapsEngineIconStyle // // Style for icon, this is part of point style. @interface GTLMapsEngineIconStyle : GTLObject // Custom icon id. // identifier property maps to 'id' in JSON (to avoid Objective C's 'id'). @property (copy) NSString *identifier; // Stock icon name. To use a stock icon, prefix it with 'gx_'. See Stock icon // names for valid icon names. For example, to specify small_red, set name to // 'gx_small_red'. @property (copy) NSString *name; @end
{ "content_hash": "7865ac5b52805457510f8755ff07bf13", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 79, "avg_line_length": 27.25581395348837, "alnum_prop": 0.6168941979522184, "repo_name": "uqtimes/GmailViewerObjectiveC", "id": "e05d985ff99874f5fddcb309d0ea9f7082eb8fc8", "size": "1767", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "google-api-objectc-client/Services/MapsEngine/Generated/GTLMapsEngineIconStyle.h", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "8862" }, { "name": "C++", "bytes": "5852" }, { "name": "Objective-C", "bytes": "5936329" } ], "symlink_target": "" }
package org.finra.hiveqlunit.resources; /** * Abstracts access to textual resources needed during testing, such as test data or hql scripts. * By using this interface, code that uses testing resources can be written agnostic to the * origin or nature of the resource. */ public interface TextResource { /** * Provides the text content of the resource the TextResource object represents. * * @return the text content of the resource the TextResource object represents */ public String resourceText(); }
{ "content_hash": "81e7a751979f2f0ecf74b69fadfe25d2", "timestamp": "", "source": "github", "line_count": 18, "max_line_length": 97, "avg_line_length": 29.88888888888889, "alnum_prop": 0.7304832713754646, "repo_name": "mpeter28/HiveQLUnit", "id": "241b7b41ac773692592083b3f084e78714d46fc4", "size": "1145", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/main/java/org/finra/hiveqlunit/resources/TextResource.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "62561" } ], "symlink_target": "" }
/* * ScaleDialogOJ.java * -- documented * * First runs ImageJ's ScaleDialog, then checks which image is involved, * and forwards this information to the ojj file * */ package oj.plugin; import ij.ImagePlus; import ij.plugin.filter.ScaleDialog; import ij.process.ImageProcessor; import java.lang.reflect.Field; import oj.OJ; import oj.project.ImageOJ; public class ScaleDialogOJ extends ScaleDialog { public void run(ImageProcessor ip) { super.run(ip); if (OJ.isProjectOpen) { ImageOJ imoj = OJ.getData().getImages().getImageByName(getImagePlus().getTitle()); if (imoj != null) { OJ.getImageProcessor().updateImageProperties(OJ.getData().getDirectory(), imoj); } } } private ImagePlus getImagePlus() { final Field[] fields = ScaleDialog.class.getDeclaredFields(); for (int i = 0; i < fields.length; ++i) { if ("imp".equals(fields[i].getName())) { fields[i].setAccessible(true); try { return (ImagePlus) fields[i].get((ScaleDialog) this); } catch (IllegalArgumentException ex) { ex.printStackTrace(); } catch (IllegalAccessException ex) { ex.printStackTrace(); } break; } } return null; } }
{ "content_hash": "3005cca1ab6973be729b9b0dae2ca7fd", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 96, "avg_line_length": 29.872340425531913, "alnum_prop": 0.5754985754985755, "repo_name": "norbertvischer/ObjectJ", "id": "02efaabb15250d473c15aaf79f8be44822d4b710", "size": "1404", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/oj/plugin/ScaleDialogOJ.java", "mode": "33261", "license": "mit", "language": [ { "name": "ImageJ Macro", "bytes": "335" }, { "name": "Java", "bytes": "6368081" } ], "symlink_target": "" }
<?php namespace Pyrus\Developer\Creator; class Tar implements \Pyrus\Package\CreatorInterface { /** * Path to archive file * * @var string */ protected $archive; /** * Temporary stream used for creating the archive * * @var stream */ protected $tmp; protected $path; protected $compress; function __construct($path, $compress = 'zlib') { $this->compress = $compress; if ($compress === 'bz2' && !function_exists('bzopen')) { throw new \Pyrus\Developer\Creator\Exception( 'bzip2 extension not available'); } if ($compress === 'zlib' && !function_exists('gzopen')) { throw new \Pyrus\Developer\Creator\Exception( 'zlib extension not available'); } $this->path = $path; } /** * save a file inside this package * * This code is modified from Vincent Lascaux's File_Archive * package, which is licensed under the LGPL license. * @param string relative path within the package * @param string|resource file contents or open file handle */ function addFile($path, $fileOrStream) { clearstatcache(); if (is_resource($fileOrStream)) { $stat = fstat($fileOrStream); } else { $stat = array( 'mode' => 0x8000 + 0644, 'uid' => 0, 'gid' => 0, 'size' => strlen($fileOrStream), 'mtime' => time(), ); } $link = null; if ($stat['mode'] & 0x4000) { $type = 5; // Directory } else if ($stat['mode'] & 0x8000) { $type = 0; // Regular } else if ($stat['mode'] & 0xA000) { $type = 1; // Link $link = @readlink($current); } else { $type = 9; // Unknown } $filePrefix = ''; if (strlen($path) > 255) { throw new \Pyrus\Developer\Creator\Exception( "$path is too long, must be 255 characters or less" ); } else if (strlen($path) > 100) { $filePrefix = substr($path, 0, strlen($path)-100); $path = substr($path, -100); } $block = pack('a100a8a8a8a12A12', $path, decoct($stat['mode']), sprintf('%6s ',decoct($stat['uid'])), sprintf('%6s ',decoct($stat['gid'])), sprintf('%11s ',decoct($stat['size'])), sprintf('%11s ',decoct($stat['mtime'])) ); $blockend = pack('a1a100a6a2a32a32a8a8a155a12', $type, $link, 'ustar', '00', 'Pyrus', 'Pyrus', '', '', $filePrefix, ''); $checkheader = array_merge(str_split($block), str_split($blockend)); if (!function_exists('_pear2tarchecksum')) { function _pear2tarchecksum($a, $b) {return $a + ord($b);} } $checksum = 256; // 8 * ord(' '); $checksum += array_reduce($checkheader, '_pear2tarchecksum'); $checksum = pack('a8', sprintf('%6s ', decoct($checksum))); fwrite($this->tmp, $block . $checksum . $blockend, 512); if (is_resource($fileOrStream)) { stream_copy_to_stream($fileOrStream, $this->tmp); if ($stat['size'] % 512) { fwrite($this->tmp, str_repeat("\0", 512 - $stat['size'] % 512)); } } else { fwrite($this->tmp, $fileOrStream); if (strlen($fileOrStream) % 512) { fwrite($this->tmp, str_repeat("\0", 512 - strlen($fileOrStream) % 512)); } } } function addDir($path) { foreach (new \RecursiveIteratorIterator( new \RecursiveDirectoryIterator($path, \RecursiveDirectoryIterator::SKIP_DOTS)) as $file) { $contents = file_get_contents((string)$file); $relpath = str_replace($path . DIRECTORY_SEPARATOR, '', $file); $this->addFile($relpath, $contents); } } /** * Initialize the package creator */ function init() { switch ($this->compress) { case 'zlib' : $this->tmp = gzopen($this->path, 'wb'); break; case 'bz2' : $this->tmp = bzopen($this->path, 'wb'); break; case 'none' : $this->tmp = fopen($this->path, 'wb'); break; default : throw new \Pyrus\Developer\Creator\Exception( 'unknown compression type ' . $this->compress); } } /** * Create an internal directory, creating parent directories as needed * * This is a no-op for the tar creator * @param string $dir */ function mkdir($dir) { } /** * Finish saving the package */ function close() { fwrite($this->tmp, pack('a1024', '')); fclose($this->tmp); } }
{ "content_hash": "84bf349d0c4cb5dbad3eb8b6ac0d4bbd", "timestamp": "", "source": "github", "line_count": 171, "max_line_length": 111, "avg_line_length": 30.263157894736842, "alnum_prop": 0.4757487922705314, "repo_name": "pyrus/Pyrus", "id": "f0fb8293ad70994f73511bf563f836a57d2f8f61", "size": "5175", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "tests/ScriptFrontend/Commands/Pyrus_Developer/src/Pyrus/Developer/Creator/Tar.php", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "PHP", "bytes": "2458078" }, { "name": "Shell", "bytes": "0" } ], "symlink_target": "" }
<?php use PHPUnit\Framework\TestCase; use liuguang\mvc\http\action\ViewResult; use liuguang\mvc\Application; use liuguang\mvc\services\UrlAsset; use liuguang\mvc\Container; use Symfony\Component\Asset\PathPackage; use Symfony\Component\Asset\VersionStrategy\StaticVersionStrategy; use Symfony\Component\Asset\Package; /** * 模板引擎单元测试 * * @author liuguang * */ class TemplateTest extends TestCase { /** * 获取模板处理之后的内容 * * @param string $templateName * @return string */ private function getTemplateResult(string $templateName): string { Application::$app->config->setValue('VIEW_PATH', dirname(__DIR__) . DIRECTORY_SEPARATOR . 'templates'); $template = new ViewResult($templateName); $viewPath = $template->getViewPath(); return file_get_contents($viewPath); } /** * 测试include标签 * * @return void */ public function testInclude(): void { $this->assertEquals('aa-hello world-bb-hello world-cc-hello world', $this->getTemplateResult('include/test')); } /** * 测试template标签 * * @return void */ public function testTemplate(): void { $this->assertEquals(<<<'RESULT' aa<?php include \liuguang\mvc\http\action\ViewResult::dynamicView('template/test1'); ?>bb RESULT , $this->getTemplateResult('template/test')); } /** * 测试变量输出标签 * * @return void */ public function testVars(): void { $this->assertEquals('<?php echo $testA; ?>', $this->getTemplateResult('vars/testa')); $this->assertEquals(<<<'RESULT' <?php echo str_replace(['&','<','>'],['&amp;','&lt;','&gt;'],$testB); ?> RESULT , $this->getTemplateResult('vars/testb')); } /** * 测试url标签 * * @return void */ public function testUrl(): void { Application::$app->container->addCallableMap(UrlAsset::class, function (Container $container) { return new class() extends UrlAsset { private $version = 'v12'; private $path = '/public'; private $versionStrategy = null; private function getVersionStrategy() { if ($this->versionStrategy === null) { $this->versionStrategy = new StaticVersionStrategy($this->version); } return $this->versionStrategy; } /** * * {@inheritdoc} * * @see \liuguang\mvc\services\UrlAsset::getDefaultPackage() */ public function getDefaultPackage(): Package { return new PathPackage($this->path, $this->getVersionStrategy()); } /** * * {@inheritdoc} * * @see \liuguang\mvc\services\UrlAsset::getNamedPackages() */ public function getNamedPackages(): array { $path = $this->path; $versionStrategy = $this->getVersionStrategy(); return [ 'img' => new PathPackage($path . '/image', $versionStrategy), 'js' => new PathPackage($path . '/js', $versionStrategy) ]; } }; }, '@urlAsset'); $this->assertEquals('<a href="/public/path/to/a.html?v12">aa</a>', $this->getTemplateResult('url/testa')); $this->assertEquals('<img src="/public/image/path/to/b.png?v12" />', $this->getTemplateResult('url/testb')); $this->assertEquals('<script type="text/javascript" src="/public/js/path/to/c.js?v12"></script>', $this->getTemplateResult('url/testc')); } /** * 测试变量输出标签 * * @return void */ public function testPhp(): void { $this->assertEquals(<<<'RESULT' <?php echo 'hello world !'; ?> RESULT , $this->getTemplateResult('php/test')); } /** * 测试block * * @return void */ public function testBlock(): void { $this->assertEquals(<<<'RESULT' hello world aaa bbb ccc RESULT , $this->getTemplateResult('block/test')); } /** * 测试注释 * * @return void */ public function testInfo(): void { $this->assertEquals(<<<'RESULT' aaa<?php /*this is a comment*/ ?> bbb ccc RESULT , $this->getTemplateResult('info/test')); } public function testCondition(): void { $this->assertEquals(<<<'RESULT' <?php if( $a ) { ?> aaa <?php } elseif($b) { ?> bbb <?php } else { ?> ccc <?php } ?> RESULT , $this->getTemplateResult('condition/test1')); $this->assertEquals(<<<'RESULT' <?php foreach($arr as $key => $value){ ?> ---- key : <?php echo $key; ?> ---- value : <?php echo $value; ?> ---- <?php } ?> RESULT , $this->getTemplateResult('condition/test2')); $this->assertEquals(<<<'RESULT' <?php foreach($arr as $value){ ?> ---- value : <?php echo $value; ?> ---- <?php } ?> RESULT , $this->getTemplateResult('condition/test3')); } /** * 测试不转换标签 * * @return void */ public function testNoConvert(): void { $this->assertEquals(<<<'RESULT' {$a} RESULT , $this->getTemplateResult('convert/test1')); $this->assertEquals(<<<'RESULT' {php}echo 'hello';{/php} RESULT , $this->getTemplateResult('convert/test2')); } /** * 测试标签合并 * * @return void */ public function testMerge(): void { $this->assertEquals(<<<'RESULT' <?php if( $a ) { var_dump('aaa'); } elseif($b) { var_dump('bbb'); } else { var_dump('ccc'); } ?> RESULT , $this->getTemplateResult('merge/test')); } }
{ "content_hash": "f4fa135e475ac743ba84ddfed96825b0", "timestamp": "", "source": "github", "line_count": 240, "max_line_length": 145, "avg_line_length": 24.291666666666668, "alnum_prop": 0.5322469982847341, "repo_name": "qq67579722/mvc", "id": "e4ac8498ad39f66254b7b61b81d95d4cbcb77dc5", "size": "5962", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "test/src/TemplateTest.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "301" }, { "name": "JavaScript", "bytes": "142" }, { "name": "PHP", "bytes": "1458051" } ], "symlink_target": "" }
require 'rails_helper' RSpec.describe "Teachers", type: :request do let!(:valid_user) { FactoryBot.create(:confirmed_user) } let!(:valid_edition) { FactoryBot.create(:edition) } let(:valid_headers) { { 'Authorization' => valid_user.access_token } } describe "GET /v1/teachers.json" do context "list all teachers" do it "Render all the teachers" do teacher = FactoryBot.create(:teacher) get "/v1/teachers", {}, valid_headers expect(response).to have_http_status(200) body = JSON.parse(response.body) expect(body.size).to eq(1) end end end describe "POST /v1/teachers.json" do context "resource is valid" do it "creates a teacher" do teacher_attributes = FactoryBot.attributes_for(:teacher) post "/v1/teachers", { :teacher => teacher_attributes }, valid_headers expect(response).to have_http_status(201) body = JSON.parse(response.body) teacher = Teacher.last expect(teacher.user).to eq(valid_user) expect(teacher.edition).to eq(valid_edition) end end context "resource is invalid" do it "responds with 422 when address is missing" do teacher_attributes = FactoryBot.attributes_for(:teacher) teacher_attributes[:school_name] = "" post "/v1/teachers", { :teacher => teacher_attributes }, valid_headers expect(response).to have_http_status(422) end end end end
{ "content_hash": "0c17a5ed910f2e01f99523b2efea605f", "timestamp": "", "source": "github", "line_count": 58, "max_line_length": 78, "avg_line_length": 25.70689655172414, "alnum_prop": 0.6338028169014085, "repo_name": "infoeducatie/infoeducatie-api", "id": "83e85d2ea90efb252076fd40c8e468247003a5e8", "size": "1491", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "spec/requests/teachers_spec.rb", "mode": "33188", "license": "mit", "language": [ { "name": "Dockerfile", "bytes": "502" }, { "name": "HTML", "bytes": "1388" }, { "name": "Ruby", "bytes": "147861" }, { "name": "Shell", "bytes": "932" } ], "symlink_target": "" }
/* Leola Programming Language Author: Tony Sparks See license.txt */ package leola.vm.types; import java.io.DataOutput; import java.io.IOException; import java.lang.reflect.Field; import java.lang.reflect.Method; import java.util.List; import java.util.Map; import leola.vm.exceptions.LeolaRuntimeException; import leola.vm.util.ClassUtil; /** * Refers to a Java Class * * @author Tony * */ public class LeoNativeClass extends LeoObject { /** * Class name */ private Class<?> nativeClass; /** * The instance of the native class */ private Object instance; /** * Adds ability to reference the public API of this class */ private Map<LeoObject, LeoObject> nativeApi; private Map<LeoObject, LeoObject> getApiMappings() { if(this.nativeApi == null) { synchronized (this) { if(this.nativeApi == null) { this.nativeApi = new LeoMap(); } } } return this.nativeApi; } private LeoObject getNativeMember(LeoObject key) { return getNativeMember(this.nativeClass, this.instance, getApiMappings(), key); } /** */ public LeoNativeClass() { this(null, null); } /** * @param instance */ public LeoNativeClass(Object instance) { this(instance.getClass(), instance); } /** * @param nativeClass * @param instance */ public LeoNativeClass( Class<?> nativeClass, Object instance) { super(LeoType.NATIVE_CLASS); this.nativeClass = nativeClass; this.instance = instance; } /* (non-Javadoc) * @see leola.types.LeoObject#toString() */ @Override public String toString() { return this.instance.toString(); } /* (non-Javadoc) * @see leola.vm.types.LeoObject#isOfType(java.lang.String) */ @Override public boolean isOfType(String rawType) { return is(rawType); } /** * @param className * @return true if the supplied className is of this type */ public boolean is(String className) { boolean result = false; try { Class<?> cls = Class.forName(className); Class<?> currentClass = this.nativeClass; while(!result && currentClass != null) { result = cls.getName().equals(currentClass.getName()); currentClass = currentClass.getSuperclass(); } } catch(Throwable t) { } return result; } /* (non-Javadoc) * @see leola.vm.types.LeoObject#isClass() */ @Override public boolean isClass() { return true; } @Override public boolean isAccessible() { return true; } /* (non-Javadoc) * @see leola.vm.types.LeoObject#isNativeClass() */ @Override public boolean isNativeClass() { return true; } /* (non-Javadoc) * @see leola.vm.types.LeoObject#setObject(leola.vm.types.LeoObject, leola.vm.types.LeoObject) */ @Override public void setObject(LeoObject key, LeoObject value) { setMember(key, value); } /* (non-Javadoc) * @see leola.vm.types.LeoObject#getObject(leola.vm.types.LeoObject) */ @Override public LeoObject xgetObject(LeoObject key) { return getMember(key); } /* (non-Javadoc) * @see leola.vm.types.LeoObject#getObject(leola.vm.types.LeoObject) */ @Override public LeoObject getObject(LeoObject key) { LeoObject member = getMember(key); if(member!=null) { return member; } return LeoObject.NULL; } /* (non-Javadoc) * @see leola.vm.types.LeoObject#hasObject(leola.vm.types.LeoObject) */ @Override public boolean hasObject(LeoObject key) { return getMember(key) != null; } /** * If the underlying native class can be indexed into * @return true if indexable */ private boolean isIndexable() { return List.class.isAssignableFrom(this.nativeClass) || Map.class.isAssignableFrom(this.nativeClass); } /* (non-Javadoc) * @see leola.vm.types.LeoObject#$sindex(leola.vm.types.LeoObject, leola.vm.types.LeoObject) */ @Override public void $sindex(LeoObject key, LeoObject other) { Method method = ClassUtil.getMethodByAnnotationAlias(nativeClass, "$sindex"); if(method!=null) { try { ClassUtil.invokeMethod(method, instance, new LeoObject[] {key, other}); } catch (Exception e) { throw new LeolaRuntimeException(e); } } else if(isIndexable()) { String functionName = (List.class.isAssignableFrom(this.nativeClass)) ? "set" : "put"; LeoObject func = getMember(LeoObject.valueOf(functionName)); func.call(key, other); } else { super.$sindex(key, other); } } /* (non-Javadoc) * @see leola.vm.types.LeoObject#$index(leola.vm.types.LeoObject) */ @Override public LeoObject $index(LeoObject other) { Method method = ClassUtil.getMethodByAnnotationAlias(nativeClass, "$index"); if(method!=null) { try { return LeoObject.valueOf( ClassUtil.invokeMethod(method, instance, new LeoObject[] {other}) ); } catch (Exception e) { throw new LeolaRuntimeException(e); } } else if(isIndexable()){ LeoObject func = getMember(LeoObject.valueOf("get")); return func.call(other); } return super.$index(other); } /** * Attempt to retrieve a native member of the supplied Java class. This will first check * the public methods, short of that, it will then check the public data members. * * @param member * @return the member if found. */ public LeoObject getMember(LeoObject member) { LeoObject result = getNativeMember(member); return result; } /** * Attempts to set the Java objects field. If it isn't found or fails to set * the field, an exception is thrown. * * @param member * @param value */ public void setMember(LeoObject member, LeoObject value) { String memberName = member.toString(); Field field = getField(memberName); if ( field != null ) { try { field.set(getInstance(), value.getValue(field.getType())); } catch(Exception e) { throwAttributeAccessError(nativeClass, member); } } else { throwAttributeError(nativeClass, member); } } /** * @return the nativeClass */ public Class<?> getNativeClass() { return nativeClass; } /** * @param fieldName * @return returns the field if found, if not found null */ public Field getField(String fieldName) { Field field = ClassUtil.getInheritedField(nativeClass, fieldName); return field; } /** * @param methodName * @return all methods defined by the supplied methodName */ public List<Method> getMethods(String methodName) { List<Method> meth = ClassUtil.getMethodsByName(nativeClass, methodName); return meth; } /** * @return the instance */ public Object getInstance() { return instance; } /** * @param instance the instance to set */ public void setInstance(Object instance) { this.instance = instance; } /* (non-Javadoc) * @see leola.vm.types.LeoObject#add(leola.vm.types.LeoObject) */ @Override public LeoObject $add(LeoObject other) { if (other.isString()) { return LeoString.valueOf(toString() + other.toString()); } return super.$add(other); } /* (non-Javadoc) * @see leola.vm.types.LeoObject#$req(leola.vm.types.LeoObject) */ @Override public boolean $req(LeoObject other) { return this.instance == other.getValue(); } /* (non-Javadoc) * @see leola.types.LeoObject#eq(leola.types.LeoObject) */ @Override public boolean $eq(LeoObject other) { if ( other != null && other.isOfType(LeoType.NATIVE_CLASS)) { LeoNativeClass otherClass = other.as(); return this.instance.equals(otherClass.instance); } return false; } @Override public int hashCode() { return this.instance.hashCode(); } /* (non-Javadoc) * @see leola.vm.types.LeoObject#equals(java.lang.Object) */ @Override public boolean equals(Object obj) { if(obj instanceof LeoObject) { return $eq((LeoObject)obj); } return this.instance.equals(obj); } /* (non-Javadoc) * @see leola.types.LeoObject#gt(leola.types.LeoObject) */ @Override public boolean $gt(LeoObject other) { return false; } /* (non-Javadoc) * @see leola.types.LeoObject#lt(leola.types.LeoObject) */ @Override public boolean $lt(LeoObject other) { return false; } /* (non-Javadoc) * @see leola.types.LeoObject#getValue() */ @Override public Object getValue() { return this.instance; } /* (non-Javadoc) * @see leola.vm.types.LeoObject#getValue(java.lang.Class) */ @Override public Object getValue(Class<?> narrowType) { if(LeoObject.class.equals(narrowType)) { return this; } return narrowType.isInstance(this.instance) ? narrowType.cast(this.instance) : this.instance; } @Override public boolean isAssignable(Class<?> javaType) { return javaType.isAssignableFrom(this.nativeClass); } /* (non-Javadoc) * @see leola.types.LeoObject#clone() */ @Override public LeoObject clone() { LeoNativeClass nClass = new LeoNativeClass(this.nativeClass, this.instance); return nClass; } @Override public void write(DataOutput out) throws IOException { out.write(this.getType().ordinal()); out.writeChars(this.nativeClass.getName()); } }
{ "content_hash": "bb7b34bf9e86af9c3263ba198619fb59", "timestamp": "", "source": "github", "line_count": 414, "max_line_length": 110, "avg_line_length": 25.801932367149757, "alnum_prop": 0.5705860325781689, "repo_name": "tonysparks/leola", "id": "f6fdd701d04e8ed295fdbffec27baa7784a0ec47", "size": "10682", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/leola/vm/types/LeoNativeClass.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "951160" } ], "symlink_target": "" }
/* * DO NOT EDIT. THIS FILE IS GENERATED FROM ../../../dist/idl\nsIXPConnect.idl */ #ifndef __gen_nsIXPConnect_h__ #define __gen_nsIXPConnect_h__ #ifndef __gen_nsISupports_h__ #include "nsISupports.h" #endif #include "js/Value.h" /* For IDL files that don't want to include root IDL files. */ #ifndef NS_NO_VTABLE #define NS_NO_VTABLE #endif #include "jspubtd.h" #include "js/TypeDecls.h" #include "mozilla/Attributes.h" #include "nsCOMPtr.h" struct JSFreeOp; class nsWrapperCache; class nsAXPCNativeCallContext; class nsIXPCScriptable; /* forward declaration */ class nsIXPConnect; /* forward declaration */ class nsIXPConnectWrappedNative; /* forward declaration */ class nsIInterfaceInfo; /* forward declaration */ class nsIXPCSecurityManager; /* forward declaration */ class nsIPrincipal; /* forward declaration */ class nsIClassInfo; /* forward declaration */ class nsIVariant; /* forward declaration */ class nsIStackFrame; /* forward declaration */ class nsIObjectInputStream; /* forward declaration */ class nsIObjectOutputStream; /* forward declaration */ /* starting interface: nsIXPConnectJSObjectHolder */ #define NS_IXPCONNECTJSOBJECTHOLDER_IID_STR "73e6ff4a-ab99-4d99-ac00-ba39ccb8e4d7" #define NS_IXPCONNECTJSOBJECTHOLDER_IID \ {0x73e6ff4a, 0xab99, 0x4d99, \ { 0xac, 0x00, 0xba, 0x39, 0xcc, 0xb8, 0xe4, 0xd7 }} class NS_NO_VTABLE nsIXPConnectJSObjectHolder : public nsISupports { public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCONNECTJSOBJECTHOLDER_IID) /* [nostdcall,notxpcom] JSObjectPtr GetJSObject (); */ virtual JSObject * GetJSObject(void) = 0; }; NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPConnectJSObjectHolder, NS_IXPCONNECTJSOBJECTHOLDER_IID) /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIXPCONNECTJSOBJECTHOLDER \ virtual JSObject * GetJSObject(void) override; /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIXPCONNECTJSOBJECTHOLDER(_to) \ virtual JSObject * GetJSObject(void) override { return _to GetJSObject(); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIXPCONNECTJSOBJECTHOLDER(_to) \ virtual JSObject * GetJSObject(void) override; #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsXPConnectJSObjectHolder : public nsIXPConnectJSObjectHolder { public: NS_DECL_ISUPPORTS NS_DECL_NSIXPCONNECTJSOBJECTHOLDER nsXPConnectJSObjectHolder(); private: ~nsXPConnectJSObjectHolder(); protected: /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS(nsXPConnectJSObjectHolder, nsIXPConnectJSObjectHolder) nsXPConnectJSObjectHolder::nsXPConnectJSObjectHolder() { /* member initializers and constructor code */ } nsXPConnectJSObjectHolder::~nsXPConnectJSObjectHolder() { /* destructor code */ } /* [nostdcall,notxpcom] JSObjectPtr GetJSObject (); */ JSObject * nsXPConnectJSObjectHolder::GetJSObject() { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif /* starting interface: nsIXPConnectWrappedNative */ #define NS_IXPCONNECTWRAPPEDNATIVE_IID_STR "e787be29-db5d-4a45-a3d6-1de1d6b85c30" #define NS_IXPCONNECTWRAPPEDNATIVE_IID \ {0xe787be29, 0xdb5d, 0x4a45, \ { 0xa3, 0xd6, 0x1d, 0xe1, 0xd6, 0xb8, 0x5c, 0x30 }} class nsIXPConnectWrappedNative : public nsIXPConnectJSObjectHolder { public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCONNECTWRAPPEDNATIVE_IID) /* readonly attribute nsISupports Native; */ NS_IMETHOD GetNative(nsISupports * *aNative) = 0; /* readonly attribute JSObjectPtr JSObjectPrototype; */ NS_IMETHOD GetJSObjectPrototype(JSObject **aJSObjectPrototype) = 0; /* nsIInterfaceInfo FindInterfaceWithMember (in JSHandleId nameID); */ NS_IMETHOD FindInterfaceWithMember(JS::Handle<jsid> nameID, nsIInterfaceInfo * *_retval) = 0; /* nsIInterfaceInfo FindInterfaceWithName (in JSHandleId nameID); */ NS_IMETHOD FindInterfaceWithName(JS::Handle<jsid> nameID, nsIInterfaceInfo * *_retval) = 0; /* [notxpcom] bool HasNativeMember (in JSHandleId name); */ NS_IMETHOD_(bool) HasNativeMember(JS::Handle<jsid> name) = 0; /* void debugDump (in short depth); */ NS_IMETHOD DebugDump(int16_t depth) = 0; /** * Faster access to the native object from C++. Will never return null. */ nsISupports* Native() const { return mIdentity; } protected: nsCOMPtr<nsISupports> mIdentity; public: }; NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPConnectWrappedNative, NS_IXPCONNECTWRAPPEDNATIVE_IID) /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIXPCONNECTWRAPPEDNATIVE \ NS_IMETHOD GetNative(nsISupports * *aNative) override; \ NS_IMETHOD GetJSObjectPrototype(JSObject **aJSObjectPrototype) override; \ NS_IMETHOD FindInterfaceWithMember(JS::Handle<jsid> nameID, nsIInterfaceInfo * *_retval) override; \ NS_IMETHOD FindInterfaceWithName(JS::Handle<jsid> nameID, nsIInterfaceInfo * *_retval) override; \ NS_IMETHOD_(bool) HasNativeMember(JS::Handle<jsid> name) override; \ NS_IMETHOD DebugDump(int16_t depth) override; \ /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIXPCONNECTWRAPPEDNATIVE(_to) \ NS_IMETHOD GetNative(nsISupports * *aNative) override { return _to GetNative(aNative); } \ NS_IMETHOD GetJSObjectPrototype(JSObject **aJSObjectPrototype) override { return _to GetJSObjectPrototype(aJSObjectPrototype); } \ NS_IMETHOD FindInterfaceWithMember(JS::Handle<jsid> nameID, nsIInterfaceInfo * *_retval) override { return _to FindInterfaceWithMember(nameID, _retval); } \ NS_IMETHOD FindInterfaceWithName(JS::Handle<jsid> nameID, nsIInterfaceInfo * *_retval) override { return _to FindInterfaceWithName(nameID, _retval); } \ NS_IMETHOD_(bool) HasNativeMember(JS::Handle<jsid> name) override { return _to HasNativeMember(name); } \ NS_IMETHOD DebugDump(int16_t depth) override { return _to DebugDump(depth); } \ /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIXPCONNECTWRAPPEDNATIVE(_to) \ NS_IMETHOD GetNative(nsISupports * *aNative) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNative(aNative); } \ NS_IMETHOD GetJSObjectPrototype(JSObject **aJSObjectPrototype) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetJSObjectPrototype(aJSObjectPrototype); } \ NS_IMETHOD FindInterfaceWithMember(JS::Handle<jsid> nameID, nsIInterfaceInfo * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FindInterfaceWithMember(nameID, _retval); } \ NS_IMETHOD FindInterfaceWithName(JS::Handle<jsid> nameID, nsIInterfaceInfo * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->FindInterfaceWithName(nameID, _retval); } \ NS_IMETHOD_(bool) HasNativeMember(JS::Handle<jsid> name) override; \ NS_IMETHOD DebugDump(int16_t depth) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DebugDump(depth); } \ #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsXPConnectWrappedNative : public nsIXPConnectWrappedNative { public: NS_DECL_ISUPPORTS NS_DECL_NSIXPCONNECTWRAPPEDNATIVE nsXPConnectWrappedNative(); private: ~nsXPConnectWrappedNative(); protected: /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS(nsXPConnectWrappedNative, nsIXPConnectWrappedNative) nsXPConnectWrappedNative::nsXPConnectWrappedNative() { /* member initializers and constructor code */ } nsXPConnectWrappedNative::~nsXPConnectWrappedNative() { /* destructor code */ } /* readonly attribute nsISupports Native; */ NS_IMETHODIMP nsXPConnectWrappedNative::GetNative(nsISupports * *aNative) { return NS_ERROR_NOT_IMPLEMENTED; } /* readonly attribute JSObjectPtr JSObjectPrototype; */ NS_IMETHODIMP nsXPConnectWrappedNative::GetJSObjectPrototype(JSObject **aJSObjectPrototype) { return NS_ERROR_NOT_IMPLEMENTED; } /* nsIInterfaceInfo FindInterfaceWithMember (in JSHandleId nameID); */ NS_IMETHODIMP nsXPConnectWrappedNative::FindInterfaceWithMember(JS::Handle<jsid> nameID, nsIInterfaceInfo * *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* nsIInterfaceInfo FindInterfaceWithName (in JSHandleId nameID); */ NS_IMETHODIMP nsXPConnectWrappedNative::FindInterfaceWithName(JS::Handle<jsid> nameID, nsIInterfaceInfo * *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* [notxpcom] bool HasNativeMember (in JSHandleId name); */ NS_IMETHODIMP_(bool) nsXPConnectWrappedNative::HasNativeMember(JS::Handle<jsid> name) { return NS_ERROR_NOT_IMPLEMENTED; } /* void debugDump (in short depth); */ NS_IMETHODIMP nsXPConnectWrappedNative::DebugDump(int16_t depth) { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif inline const nsQueryInterface do_QueryWrappedNative(nsIXPConnectWrappedNative *aWrappedNative) { return nsQueryInterface(aWrappedNative->Native()); } inline const nsQueryInterfaceWithError do_QueryWrappedNative(nsIXPConnectWrappedNative *aWrappedNative, nsresult *aError) { return nsQueryInterfaceWithError(aWrappedNative->Native(), aError); } /* starting interface: nsIXPConnectWrappedJS */ #define NS_IXPCONNECTWRAPPEDJS_IID_STR "3a01b0d6-074b-49ed-bac3-08c76366cae4" #define NS_IXPCONNECTWRAPPEDJS_IID \ {0x3a01b0d6, 0x074b, 0x49ed, \ { 0xba, 0xc3, 0x08, 0xc7, 0x63, 0x66, 0xca, 0xe4 }} class NS_NO_VTABLE nsIXPConnectWrappedJS : public nsIXPConnectJSObjectHolder { public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCONNECTWRAPPEDJS_IID) /* readonly attribute nsIInterfaceInfo InterfaceInfo; */ NS_IMETHOD GetInterfaceInfo(nsIInterfaceInfo * *aInterfaceInfo) = 0; /* readonly attribute nsIIDPtr InterfaceIID; */ NS_IMETHOD GetInterfaceIID(nsIID **aInterfaceIID) = 0; /* void debugDump (in short depth); */ NS_IMETHOD DebugDump(int16_t depth) = 0; /* void aggregatedQueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */ NS_IMETHOD AggregatedQueryInterface(const nsIID & uuid, void **result) = 0; }; NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPConnectWrappedJS, NS_IXPCONNECTWRAPPEDJS_IID) /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIXPCONNECTWRAPPEDJS \ NS_IMETHOD GetInterfaceInfo(nsIInterfaceInfo * *aInterfaceInfo) override; \ NS_IMETHOD GetInterfaceIID(nsIID **aInterfaceIID) override; \ NS_IMETHOD DebugDump(int16_t depth) override; \ NS_IMETHOD AggregatedQueryInterface(const nsIID & uuid, void **result) override; /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIXPCONNECTWRAPPEDJS(_to) \ NS_IMETHOD GetInterfaceInfo(nsIInterfaceInfo * *aInterfaceInfo) override { return _to GetInterfaceInfo(aInterfaceInfo); } \ NS_IMETHOD GetInterfaceIID(nsIID **aInterfaceIID) override { return _to GetInterfaceIID(aInterfaceIID); } \ NS_IMETHOD DebugDump(int16_t depth) override { return _to DebugDump(depth); } \ NS_IMETHOD AggregatedQueryInterface(const nsIID & uuid, void **result) override { return _to AggregatedQueryInterface(uuid, result); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIXPCONNECTWRAPPEDJS(_to) \ NS_IMETHOD GetInterfaceInfo(nsIInterfaceInfo * *aInterfaceInfo) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInterfaceInfo(aInterfaceInfo); } \ NS_IMETHOD GetInterfaceIID(nsIID **aInterfaceIID) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetInterfaceIID(aInterfaceIID); } \ NS_IMETHOD DebugDump(int16_t depth) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DebugDump(depth); } \ NS_IMETHOD AggregatedQueryInterface(const nsIID & uuid, void **result) override { return !_to ? NS_ERROR_NULL_POINTER : _to->AggregatedQueryInterface(uuid, result); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsXPConnectWrappedJS : public nsIXPConnectWrappedJS { public: NS_DECL_ISUPPORTS NS_DECL_NSIXPCONNECTWRAPPEDJS nsXPConnectWrappedJS(); private: ~nsXPConnectWrappedJS(); protected: /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS(nsXPConnectWrappedJS, nsIXPConnectWrappedJS) nsXPConnectWrappedJS::nsXPConnectWrappedJS() { /* member initializers and constructor code */ } nsXPConnectWrappedJS::~nsXPConnectWrappedJS() { /* destructor code */ } /* readonly attribute nsIInterfaceInfo InterfaceInfo; */ NS_IMETHODIMP nsXPConnectWrappedJS::GetInterfaceInfo(nsIInterfaceInfo * *aInterfaceInfo) { return NS_ERROR_NOT_IMPLEMENTED; } /* readonly attribute nsIIDPtr InterfaceIID; */ NS_IMETHODIMP nsXPConnectWrappedJS::GetInterfaceIID(nsIID **aInterfaceIID) { return NS_ERROR_NOT_IMPLEMENTED; } /* void debugDump (in short depth); */ NS_IMETHODIMP nsXPConnectWrappedJS::DebugDump(int16_t depth) { return NS_ERROR_NOT_IMPLEMENTED; } /* void aggregatedQueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result); */ NS_IMETHODIMP nsXPConnectWrappedJS::AggregatedQueryInterface(const nsIID & uuid, void **result) { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif /* starting interface: nsIXPCWrappedJSObjectGetter */ #define NS_IXPCWRAPPEDJSOBJECTGETTER_IID_STR "254bb2e0-6439-11d4-8fe0-0010a4e73d9a" #define NS_IXPCWRAPPEDJSOBJECTGETTER_IID \ {0x254bb2e0, 0x6439, 0x11d4, \ { 0x8f, 0xe0, 0x00, 0x10, 0xa4, 0xe7, 0x3d, 0x9a }} class NS_NO_VTABLE nsIXPCWrappedJSObjectGetter : public nsISupports { public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCWRAPPEDJSOBJECTGETTER_IID) /* readonly attribute nsISupports neverCalled; */ NS_IMETHOD GetNeverCalled(nsISupports * *aNeverCalled) = 0; }; NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPCWrappedJSObjectGetter, NS_IXPCWRAPPEDJSOBJECTGETTER_IID) /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIXPCWRAPPEDJSOBJECTGETTER \ NS_IMETHOD GetNeverCalled(nsISupports * *aNeverCalled) override; /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIXPCWRAPPEDJSOBJECTGETTER(_to) \ NS_IMETHOD GetNeverCalled(nsISupports * *aNeverCalled) override { return _to GetNeverCalled(aNeverCalled); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIXPCWRAPPEDJSOBJECTGETTER(_to) \ NS_IMETHOD GetNeverCalled(nsISupports * *aNeverCalled) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetNeverCalled(aNeverCalled); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsXPCWrappedJSObjectGetter : public nsIXPCWrappedJSObjectGetter { public: NS_DECL_ISUPPORTS NS_DECL_NSIXPCWRAPPEDJSOBJECTGETTER nsXPCWrappedJSObjectGetter(); private: ~nsXPCWrappedJSObjectGetter(); protected: /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS(nsXPCWrappedJSObjectGetter, nsIXPCWrappedJSObjectGetter) nsXPCWrappedJSObjectGetter::nsXPCWrappedJSObjectGetter() { /* member initializers and constructor code */ } nsXPCWrappedJSObjectGetter::~nsXPCWrappedJSObjectGetter() { /* destructor code */ } /* readonly attribute nsISupports neverCalled; */ NS_IMETHODIMP nsXPCWrappedJSObjectGetter::GetNeverCalled(nsISupports * *aNeverCalled) { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif /* starting interface: nsIXPCFunctionThisTranslator */ #define NS_IXPCFUNCTIONTHISTRANSLATOR_IID_STR "f5f84b70-92eb-41f1-a1dd-2eaac0ed564c" #define NS_IXPCFUNCTIONTHISTRANSLATOR_IID \ {0xf5f84b70, 0x92eb, 0x41f1, \ { 0xa1, 0xdd, 0x2e, 0xaa, 0xc0, 0xed, 0x56, 0x4c }} class NS_NO_VTABLE nsIXPCFunctionThisTranslator : public nsISupports { public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCFUNCTIONTHISTRANSLATOR_IID) /* nsISupports TranslateThis (in nsISupports aInitialThis); */ NS_IMETHOD TranslateThis(nsISupports *aInitialThis, nsISupports * *_retval) = 0; }; NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPCFunctionThisTranslator, NS_IXPCFUNCTIONTHISTRANSLATOR_IID) /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIXPCFUNCTIONTHISTRANSLATOR \ NS_IMETHOD TranslateThis(nsISupports *aInitialThis, nsISupports * *_retval) override; /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIXPCFUNCTIONTHISTRANSLATOR(_to) \ NS_IMETHOD TranslateThis(nsISupports *aInitialThis, nsISupports * *_retval) override { return _to TranslateThis(aInitialThis, _retval); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIXPCFUNCTIONTHISTRANSLATOR(_to) \ NS_IMETHOD TranslateThis(nsISupports *aInitialThis, nsISupports * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->TranslateThis(aInitialThis, _retval); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsXPCFunctionThisTranslator : public nsIXPCFunctionThisTranslator { public: NS_DECL_ISUPPORTS NS_DECL_NSIXPCFUNCTIONTHISTRANSLATOR nsXPCFunctionThisTranslator(); private: ~nsXPCFunctionThisTranslator(); protected: /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS(nsXPCFunctionThisTranslator, nsIXPCFunctionThisTranslator) nsXPCFunctionThisTranslator::nsXPCFunctionThisTranslator() { /* member initializers and constructor code */ } nsXPCFunctionThisTranslator::~nsXPCFunctionThisTranslator() { /* destructor code */ } /* nsISupports TranslateThis (in nsISupports aInitialThis); */ NS_IMETHODIMP nsXPCFunctionThisTranslator::TranslateThis(nsISupports *aInitialThis, nsISupports * *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif // For use with the service manager // {CB6593E0-F9B2-11d2-BDD6-000064657374} #define NS_XPCONNECT_CID \ { 0xcb6593e0, 0xf9b2, 0x11d2, \ { 0xbd, 0xd6, 0x0, 0x0, 0x64, 0x65, 0x73, 0x74 } } /* starting interface: nsIXPConnect */ #define NS_IXPCONNECT_IID_STR "241fbefa-89dc-42b2-b180-08167d4b351b" #define NS_IXPCONNECT_IID \ {0x241fbefa, 0x89dc, 0x42b2, \ { 0xb1, 0x80, 0x08, 0x16, 0x7d, 0x4b, 0x35, 0x1b }} class nsIXPConnect : public nsISupports { public: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IXPCONNECT_IID) NS_DEFINE_STATIC_CID_ACCESSOR(NS_XPCONNECT_CID) /* nsIXPConnectJSObjectHolder initClassesWithNewWrappedGlobal (in JSContextPtr aJSContext, in nsISupports aCOMObj, in nsIPrincipal aPrincipal, in uint32_t aFlags, in JSCompartmentOptions aOptions); */ NS_IMETHOD InitClassesWithNewWrappedGlobal(JSContext *aJSContext, nsISupports *aCOMObj, nsIPrincipal *aPrincipal, uint32_t aFlags, JS::CompartmentOptions & aOptions, nsIXPConnectJSObjectHolder * *_retval) = 0; enum { INIT_JS_STANDARD_CLASSES = 1U, DONT_FIRE_ONNEWGLOBALHOOK = 2U, OMIT_COMPONENTS_OBJECT = 4U }; /* nsIXPConnectJSObjectHolder wrapNative (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsISupports aCOMObj, in nsIIDRef aIID); */ NS_IMETHOD WrapNative(JSContext *aJSContext, JSObject *aScope, nsISupports *aCOMObj, const nsIID & aIID, nsIXPConnectJSObjectHolder * *_retval) = 0; /* void wrapNativeToJSVal (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsISupports aCOMObj, in nsWrapperCachePtr aCache, in nsIIDPtr aIID, in boolean aAllowWrapper, out jsval aVal); */ NS_IMETHOD WrapNativeToJSVal(JSContext *aJSContext, JSObject *aScope, nsISupports *aCOMObj, nsWrapperCache *aCache, const nsIID *aIID, bool aAllowWrapper, JS::MutableHandleValue aVal) = 0; /* void wrapJS (in JSContextPtr aJSContext, in JSObjectPtr aJSObj, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ NS_IMETHOD WrapJS(JSContext *aJSContext, JSObject *aJSObj, const nsIID & aIID, void **result) = 0; /* nsIVariant jSValToVariant (in JSContextPtr cx, in jsval aJSVal); */ NS_IMETHOD JSValToVariant(JSContext *cx, JS::HandleValue aJSVal, nsIVariant * *_retval) = 0; /* nsIXPConnectWrappedNative getWrappedNativeOfJSObject (in JSContextPtr aJSContext, in JSObjectPtr aJSObj); */ NS_IMETHOD GetWrappedNativeOfJSObject(JSContext *aJSContext, JSObject *aJSObj, nsIXPConnectWrappedNative * *_retval) = 0; /* [noscript,notxpcom] nsISupports getNativeOfWrapper (in JSContextPtr aJSContext, in JSObjectPtr aJSObj); */ NS_IMETHOD_(nsISupports *) GetNativeOfWrapper(JSContext *aJSContext, JSObject *aJSObj) = 0; /* [noscript,nostdcall,notxpcom] JSContextPtr getCurrentJSContext (); */ virtual JSContext * GetCurrentJSContext(void) = 0; /* [noscript,nostdcall,notxpcom] JSContextPtr getSafeJSContext (); */ virtual JSContext * GetSafeJSContext(void) = 0; /* readonly attribute nsIStackFrame CurrentJSStack; */ NS_IMETHOD GetCurrentJSStack(nsIStackFrame * *aCurrentJSStack) = 0; /* readonly attribute nsAXPCNativeCallContextPtr CurrentNativeCallContext; */ NS_IMETHOD GetCurrentNativeCallContext(nsAXPCNativeCallContext **aCurrentNativeCallContext) = 0; /* void debugDump (in short depth); */ NS_IMETHOD DebugDump(int16_t depth) = 0; /* void debugDumpObject (in nsISupports aCOMObj, in short depth); */ NS_IMETHOD DebugDumpObject(nsISupports *aCOMObj, int16_t depth) = 0; /* void debugDumpJSStack (in boolean showArgs, in boolean showLocals, in boolean showThisProps); */ NS_IMETHOD DebugDumpJSStack(bool showArgs, bool showLocals, bool showThisProps) = 0; /* void wrapJSAggregatedToNative (in nsISupports aOuter, in JSContextPtr aJSContext, in JSObjectPtr aJSObj, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ NS_IMETHOD WrapJSAggregatedToNative(nsISupports *aOuter, JSContext *aJSContext, JSObject *aJSObj, const nsIID & aIID, void **result) = 0; /* nsIXPConnectWrappedNative getWrappedNativeOfNativeObject (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsISupports aCOMObj, in nsIIDRef aIID); */ NS_IMETHOD GetWrappedNativeOfNativeObject(JSContext *aJSContext, JSObject *aScope, nsISupports *aCOMObj, const nsIID & aIID, nsIXPConnectWrappedNative * *_retval) = 0; /* void setFunctionThisTranslator (in nsIIDRef aIID, in nsIXPCFunctionThisTranslator aTranslator); */ NS_IMETHOD SetFunctionThisTranslator(const nsIID & aIID, nsIXPCFunctionThisTranslator *aTranslator) = 0; /* nsIXPConnectJSObjectHolder getWrappedNativePrototype (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsIClassInfo aClassInfo); */ NS_IMETHOD GetWrappedNativePrototype(JSContext *aJSContext, JSObject *aScope, nsIClassInfo *aClassInfo, nsIXPConnectJSObjectHolder * *_retval) = 0; /* jsval variantToJS (in JSContextPtr ctx, in JSObjectPtr scope, in nsIVariant value); */ NS_IMETHOD VariantToJS(JSContext *ctx, JSObject *scope, nsIVariant *value, JS::MutableHandleValue _retval) = 0; /* nsIVariant JSToVariant (in JSContextPtr ctx, in jsval value); */ NS_IMETHOD JSToVariant(JSContext *ctx, JS::HandleValue value, nsIVariant * *_retval) = 0; /* [noscript] nsIXPConnectJSObjectHolder createSandbox (in JSContextPtr cx, in nsIPrincipal principal); */ NS_IMETHOD CreateSandbox(JSContext *cx, nsIPrincipal *principal, nsIXPConnectJSObjectHolder * *_retval) = 0; /* [noscript] jsval evalInSandboxObject (in AString source, in string filename, in JSContextPtr cx, in JSObjectPtr sandbox); */ NS_IMETHOD EvalInSandboxObject(const nsAString & source, const char * filename, JSContext *cx, JSObject *sandbox, JS::MutableHandleValue _retval) = 0; /* void setReportAllJSExceptions (in boolean reportAllJSExceptions); */ NS_IMETHOD SetReportAllJSExceptions(bool reportAllJSExceptions) = 0; /* void GarbageCollect (in uint32_t reason); */ NS_IMETHOD GarbageCollect(uint32_t reason) = 0; /* void NotifyDidPaint (); */ NS_IMETHOD NotifyDidPaint(void) = 0; /** * Get the object principal for this wrapper. Note that this may well end * up being null; in that case one should seek principals elsewhere. Null * here does NOT indicate system principal or no principals at all, just * that this wrapper doesn't have an intrinsic one. */ virtual nsIPrincipal* GetPrincipal(JSObject* obj, bool allowShortCircuit) const = 0; virtual char* DebugPrintJSStack(bool showArgs, bool showLocals, bool showThisProps) = 0; /* [noscript] void writeScript (in nsIObjectOutputStream aStream, in JSContextPtr aJSContext, in JSScriptPtr aJSScript); */ NS_IMETHOD WriteScript(nsIObjectOutputStream *aStream, JSContext *aJSContext, JSScript *aJSScript) = 0; /* [noscript] JSScriptPtr readScript (in nsIObjectInputStream aStream, in JSContextPtr aJSContext); */ NS_IMETHOD ReadScript(nsIObjectInputStream *aStream, JSContext *aJSContext, JSScript **_retval) = 0; /* [noscript] void writeFunction (in nsIObjectOutputStream aStream, in JSContextPtr aJSContext, in JSObjectPtr aJSObject); */ NS_IMETHOD WriteFunction(nsIObjectOutputStream *aStream, JSContext *aJSContext, JSObject *aJSObject) = 0; /* [noscript] JSObjectPtr readFunction (in nsIObjectInputStream aStream, in JSContextPtr aJSContext); */ NS_IMETHOD ReadFunction(nsIObjectInputStream *aStream, JSContext *aJSContext, JSObject **_retval) = 0; }; NS_DEFINE_STATIC_IID_ACCESSOR(nsIXPConnect, NS_IXPCONNECT_IID) /* Use this macro when declaring classes that implement this interface. */ #define NS_DECL_NSIXPCONNECT \ NS_IMETHOD InitClassesWithNewWrappedGlobal(JSContext *aJSContext, nsISupports *aCOMObj, nsIPrincipal *aPrincipal, uint32_t aFlags, JS::CompartmentOptions & aOptions, nsIXPConnectJSObjectHolder * *_retval) override; \ NS_IMETHOD WrapNative(JSContext *aJSContext, JSObject *aScope, nsISupports *aCOMObj, const nsIID & aIID, nsIXPConnectJSObjectHolder * *_retval) override; \ NS_IMETHOD WrapNativeToJSVal(JSContext *aJSContext, JSObject *aScope, nsISupports *aCOMObj, nsWrapperCache *aCache, const nsIID *aIID, bool aAllowWrapper, JS::MutableHandleValue aVal) override; \ NS_IMETHOD WrapJS(JSContext *aJSContext, JSObject *aJSObj, const nsIID & aIID, void **result) override; \ NS_IMETHOD JSValToVariant(JSContext *cx, JS::HandleValue aJSVal, nsIVariant * *_retval) override; \ NS_IMETHOD GetWrappedNativeOfJSObject(JSContext *aJSContext, JSObject *aJSObj, nsIXPConnectWrappedNative * *_retval) override; \ NS_IMETHOD_(nsISupports *) GetNativeOfWrapper(JSContext *aJSContext, JSObject *aJSObj) override; \ virtual JSContext * GetCurrentJSContext(void) override; \ virtual JSContext * GetSafeJSContext(void) override; \ NS_IMETHOD GetCurrentJSStack(nsIStackFrame * *aCurrentJSStack) override; \ NS_IMETHOD GetCurrentNativeCallContext(nsAXPCNativeCallContext **aCurrentNativeCallContext) override; \ NS_IMETHOD DebugDump(int16_t depth) override; \ NS_IMETHOD DebugDumpObject(nsISupports *aCOMObj, int16_t depth) override; \ NS_IMETHOD DebugDumpJSStack(bool showArgs, bool showLocals, bool showThisProps) override; \ NS_IMETHOD WrapJSAggregatedToNative(nsISupports *aOuter, JSContext *aJSContext, JSObject *aJSObj, const nsIID & aIID, void **result) override; \ NS_IMETHOD GetWrappedNativeOfNativeObject(JSContext *aJSContext, JSObject *aScope, nsISupports *aCOMObj, const nsIID & aIID, nsIXPConnectWrappedNative * *_retval) override; \ NS_IMETHOD SetFunctionThisTranslator(const nsIID & aIID, nsIXPCFunctionThisTranslator *aTranslator) override; \ NS_IMETHOD GetWrappedNativePrototype(JSContext *aJSContext, JSObject *aScope, nsIClassInfo *aClassInfo, nsIXPConnectJSObjectHolder * *_retval) override; \ NS_IMETHOD VariantToJS(JSContext *ctx, JSObject *scope, nsIVariant *value, JS::MutableHandleValue _retval) override; \ NS_IMETHOD JSToVariant(JSContext *ctx, JS::HandleValue value, nsIVariant * *_retval) override; \ NS_IMETHOD CreateSandbox(JSContext *cx, nsIPrincipal *principal, nsIXPConnectJSObjectHolder * *_retval) override; \ NS_IMETHOD EvalInSandboxObject(const nsAString & source, const char * filename, JSContext *cx, JSObject *sandbox, JS::MutableHandleValue _retval) override; \ NS_IMETHOD SetReportAllJSExceptions(bool reportAllJSExceptions) override; \ NS_IMETHOD GarbageCollect(uint32_t reason) override; \ NS_IMETHOD NotifyDidPaint(void) override; \ NS_IMETHOD WriteScript(nsIObjectOutputStream *aStream, JSContext *aJSContext, JSScript *aJSScript) override; \ NS_IMETHOD ReadScript(nsIObjectInputStream *aStream, JSContext *aJSContext, JSScript **_retval) override; \ NS_IMETHOD WriteFunction(nsIObjectOutputStream *aStream, JSContext *aJSContext, JSObject *aJSObject) override; \ NS_IMETHOD ReadFunction(nsIObjectInputStream *aStream, JSContext *aJSContext, JSObject **_retval) override; /* Use this macro to declare functions that forward the behavior of this interface to another object. */ #define NS_FORWARD_NSIXPCONNECT(_to) \ NS_IMETHOD InitClassesWithNewWrappedGlobal(JSContext *aJSContext, nsISupports *aCOMObj, nsIPrincipal *aPrincipal, uint32_t aFlags, JS::CompartmentOptions & aOptions, nsIXPConnectJSObjectHolder * *_retval) override { return _to InitClassesWithNewWrappedGlobal(aJSContext, aCOMObj, aPrincipal, aFlags, aOptions, _retval); } \ NS_IMETHOD WrapNative(JSContext *aJSContext, JSObject *aScope, nsISupports *aCOMObj, const nsIID & aIID, nsIXPConnectJSObjectHolder * *_retval) override { return _to WrapNative(aJSContext, aScope, aCOMObj, aIID, _retval); } \ NS_IMETHOD WrapNativeToJSVal(JSContext *aJSContext, JSObject *aScope, nsISupports *aCOMObj, nsWrapperCache *aCache, const nsIID *aIID, bool aAllowWrapper, JS::MutableHandleValue aVal) override { return _to WrapNativeToJSVal(aJSContext, aScope, aCOMObj, aCache, aIID, aAllowWrapper, aVal); } \ NS_IMETHOD WrapJS(JSContext *aJSContext, JSObject *aJSObj, const nsIID & aIID, void **result) override { return _to WrapJS(aJSContext, aJSObj, aIID, result); } \ NS_IMETHOD JSValToVariant(JSContext *cx, JS::HandleValue aJSVal, nsIVariant * *_retval) override { return _to JSValToVariant(cx, aJSVal, _retval); } \ NS_IMETHOD GetWrappedNativeOfJSObject(JSContext *aJSContext, JSObject *aJSObj, nsIXPConnectWrappedNative * *_retval) override { return _to GetWrappedNativeOfJSObject(aJSContext, aJSObj, _retval); } \ NS_IMETHOD_(nsISupports *) GetNativeOfWrapper(JSContext *aJSContext, JSObject *aJSObj) override { return _to GetNativeOfWrapper(aJSContext, aJSObj); } \ virtual JSContext * GetCurrentJSContext(void) override { return _to GetCurrentJSContext(); } \ virtual JSContext * GetSafeJSContext(void) override { return _to GetSafeJSContext(); } \ NS_IMETHOD GetCurrentJSStack(nsIStackFrame * *aCurrentJSStack) override { return _to GetCurrentJSStack(aCurrentJSStack); } \ NS_IMETHOD GetCurrentNativeCallContext(nsAXPCNativeCallContext **aCurrentNativeCallContext) override { return _to GetCurrentNativeCallContext(aCurrentNativeCallContext); } \ NS_IMETHOD DebugDump(int16_t depth) override { return _to DebugDump(depth); } \ NS_IMETHOD DebugDumpObject(nsISupports *aCOMObj, int16_t depth) override { return _to DebugDumpObject(aCOMObj, depth); } \ NS_IMETHOD DebugDumpJSStack(bool showArgs, bool showLocals, bool showThisProps) override { return _to DebugDumpJSStack(showArgs, showLocals, showThisProps); } \ NS_IMETHOD WrapJSAggregatedToNative(nsISupports *aOuter, JSContext *aJSContext, JSObject *aJSObj, const nsIID & aIID, void **result) override { return _to WrapJSAggregatedToNative(aOuter, aJSContext, aJSObj, aIID, result); } \ NS_IMETHOD GetWrappedNativeOfNativeObject(JSContext *aJSContext, JSObject *aScope, nsISupports *aCOMObj, const nsIID & aIID, nsIXPConnectWrappedNative * *_retval) override { return _to GetWrappedNativeOfNativeObject(aJSContext, aScope, aCOMObj, aIID, _retval); } \ NS_IMETHOD SetFunctionThisTranslator(const nsIID & aIID, nsIXPCFunctionThisTranslator *aTranslator) override { return _to SetFunctionThisTranslator(aIID, aTranslator); } \ NS_IMETHOD GetWrappedNativePrototype(JSContext *aJSContext, JSObject *aScope, nsIClassInfo *aClassInfo, nsIXPConnectJSObjectHolder * *_retval) override { return _to GetWrappedNativePrototype(aJSContext, aScope, aClassInfo, _retval); } \ NS_IMETHOD VariantToJS(JSContext *ctx, JSObject *scope, nsIVariant *value, JS::MutableHandleValue _retval) override { return _to VariantToJS(ctx, scope, value, _retval); } \ NS_IMETHOD JSToVariant(JSContext *ctx, JS::HandleValue value, nsIVariant * *_retval) override { return _to JSToVariant(ctx, value, _retval); } \ NS_IMETHOD CreateSandbox(JSContext *cx, nsIPrincipal *principal, nsIXPConnectJSObjectHolder * *_retval) override { return _to CreateSandbox(cx, principal, _retval); } \ NS_IMETHOD EvalInSandboxObject(const nsAString & source, const char * filename, JSContext *cx, JSObject *sandbox, JS::MutableHandleValue _retval) override { return _to EvalInSandboxObject(source, filename, cx, sandbox, _retval); } \ NS_IMETHOD SetReportAllJSExceptions(bool reportAllJSExceptions) override { return _to SetReportAllJSExceptions(reportAllJSExceptions); } \ NS_IMETHOD GarbageCollect(uint32_t reason) override { return _to GarbageCollect(reason); } \ NS_IMETHOD NotifyDidPaint(void) override { return _to NotifyDidPaint(); } \ NS_IMETHOD WriteScript(nsIObjectOutputStream *aStream, JSContext *aJSContext, JSScript *aJSScript) override { return _to WriteScript(aStream, aJSContext, aJSScript); } \ NS_IMETHOD ReadScript(nsIObjectInputStream *aStream, JSContext *aJSContext, JSScript **_retval) override { return _to ReadScript(aStream, aJSContext, _retval); } \ NS_IMETHOD WriteFunction(nsIObjectOutputStream *aStream, JSContext *aJSContext, JSObject *aJSObject) override { return _to WriteFunction(aStream, aJSContext, aJSObject); } \ NS_IMETHOD ReadFunction(nsIObjectInputStream *aStream, JSContext *aJSContext, JSObject **_retval) override { return _to ReadFunction(aStream, aJSContext, _retval); } /* Use this macro to declare functions that forward the behavior of this interface to another object in a safe way. */ #define NS_FORWARD_SAFE_NSIXPCONNECT(_to) \ NS_IMETHOD InitClassesWithNewWrappedGlobal(JSContext *aJSContext, nsISupports *aCOMObj, nsIPrincipal *aPrincipal, uint32_t aFlags, JS::CompartmentOptions & aOptions, nsIXPConnectJSObjectHolder * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->InitClassesWithNewWrappedGlobal(aJSContext, aCOMObj, aPrincipal, aFlags, aOptions, _retval); } \ NS_IMETHOD WrapNative(JSContext *aJSContext, JSObject *aScope, nsISupports *aCOMObj, const nsIID & aIID, nsIXPConnectJSObjectHolder * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WrapNative(aJSContext, aScope, aCOMObj, aIID, _retval); } \ NS_IMETHOD WrapNativeToJSVal(JSContext *aJSContext, JSObject *aScope, nsISupports *aCOMObj, nsWrapperCache *aCache, const nsIID *aIID, bool aAllowWrapper, JS::MutableHandleValue aVal) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WrapNativeToJSVal(aJSContext, aScope, aCOMObj, aCache, aIID, aAllowWrapper, aVal); } \ NS_IMETHOD WrapJS(JSContext *aJSContext, JSObject *aJSObj, const nsIID & aIID, void **result) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WrapJS(aJSContext, aJSObj, aIID, result); } \ NS_IMETHOD JSValToVariant(JSContext *cx, JS::HandleValue aJSVal, nsIVariant * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->JSValToVariant(cx, aJSVal, _retval); } \ NS_IMETHOD GetWrappedNativeOfJSObject(JSContext *aJSContext, JSObject *aJSObj, nsIXPConnectWrappedNative * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWrappedNativeOfJSObject(aJSContext, aJSObj, _retval); } \ NS_IMETHOD_(nsISupports *) GetNativeOfWrapper(JSContext *aJSContext, JSObject *aJSObj) override; \ virtual JSContext * GetCurrentJSContext(void) override; \ virtual JSContext * GetSafeJSContext(void) override; \ NS_IMETHOD GetCurrentJSStack(nsIStackFrame * *aCurrentJSStack) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentJSStack(aCurrentJSStack); } \ NS_IMETHOD GetCurrentNativeCallContext(nsAXPCNativeCallContext **aCurrentNativeCallContext) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetCurrentNativeCallContext(aCurrentNativeCallContext); } \ NS_IMETHOD DebugDump(int16_t depth) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DebugDump(depth); } \ NS_IMETHOD DebugDumpObject(nsISupports *aCOMObj, int16_t depth) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DebugDumpObject(aCOMObj, depth); } \ NS_IMETHOD DebugDumpJSStack(bool showArgs, bool showLocals, bool showThisProps) override { return !_to ? NS_ERROR_NULL_POINTER : _to->DebugDumpJSStack(showArgs, showLocals, showThisProps); } \ NS_IMETHOD WrapJSAggregatedToNative(nsISupports *aOuter, JSContext *aJSContext, JSObject *aJSObj, const nsIID & aIID, void **result) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WrapJSAggregatedToNative(aOuter, aJSContext, aJSObj, aIID, result); } \ NS_IMETHOD GetWrappedNativeOfNativeObject(JSContext *aJSContext, JSObject *aScope, nsISupports *aCOMObj, const nsIID & aIID, nsIXPConnectWrappedNative * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWrappedNativeOfNativeObject(aJSContext, aScope, aCOMObj, aIID, _retval); } \ NS_IMETHOD SetFunctionThisTranslator(const nsIID & aIID, nsIXPCFunctionThisTranslator *aTranslator) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetFunctionThisTranslator(aIID, aTranslator); } \ NS_IMETHOD GetWrappedNativePrototype(JSContext *aJSContext, JSObject *aScope, nsIClassInfo *aClassInfo, nsIXPConnectJSObjectHolder * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GetWrappedNativePrototype(aJSContext, aScope, aClassInfo, _retval); } \ NS_IMETHOD VariantToJS(JSContext *ctx, JSObject *scope, nsIVariant *value, JS::MutableHandleValue _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->VariantToJS(ctx, scope, value, _retval); } \ NS_IMETHOD JSToVariant(JSContext *ctx, JS::HandleValue value, nsIVariant * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->JSToVariant(ctx, value, _retval); } \ NS_IMETHOD CreateSandbox(JSContext *cx, nsIPrincipal *principal, nsIXPConnectJSObjectHolder * *_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->CreateSandbox(cx, principal, _retval); } \ NS_IMETHOD EvalInSandboxObject(const nsAString & source, const char * filename, JSContext *cx, JSObject *sandbox, JS::MutableHandleValue _retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->EvalInSandboxObject(source, filename, cx, sandbox, _retval); } \ NS_IMETHOD SetReportAllJSExceptions(bool reportAllJSExceptions) override { return !_to ? NS_ERROR_NULL_POINTER : _to->SetReportAllJSExceptions(reportAllJSExceptions); } \ NS_IMETHOD GarbageCollect(uint32_t reason) override { return !_to ? NS_ERROR_NULL_POINTER : _to->GarbageCollect(reason); } \ NS_IMETHOD NotifyDidPaint(void) override { return !_to ? NS_ERROR_NULL_POINTER : _to->NotifyDidPaint(); } \ NS_IMETHOD WriteScript(nsIObjectOutputStream *aStream, JSContext *aJSContext, JSScript *aJSScript) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteScript(aStream, aJSContext, aJSScript); } \ NS_IMETHOD ReadScript(nsIObjectInputStream *aStream, JSContext *aJSContext, JSScript **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ReadScript(aStream, aJSContext, _retval); } \ NS_IMETHOD WriteFunction(nsIObjectOutputStream *aStream, JSContext *aJSContext, JSObject *aJSObject) override { return !_to ? NS_ERROR_NULL_POINTER : _to->WriteFunction(aStream, aJSContext, aJSObject); } \ NS_IMETHOD ReadFunction(nsIObjectInputStream *aStream, JSContext *aJSContext, JSObject **_retval) override { return !_to ? NS_ERROR_NULL_POINTER : _to->ReadFunction(aStream, aJSContext, _retval); } #if 0 /* Use the code below as a template for the implementation class for this interface. */ /* Header file */ class nsXPConnect : public nsIXPConnect { public: NS_DECL_ISUPPORTS NS_DECL_NSIXPCONNECT nsXPConnect(); private: ~nsXPConnect(); protected: /* additional members */ }; /* Implementation file */ NS_IMPL_ISUPPORTS(nsXPConnect, nsIXPConnect) nsXPConnect::nsXPConnect() { /* member initializers and constructor code */ } nsXPConnect::~nsXPConnect() { /* destructor code */ } /* nsIXPConnectJSObjectHolder initClassesWithNewWrappedGlobal (in JSContextPtr aJSContext, in nsISupports aCOMObj, in nsIPrincipal aPrincipal, in uint32_t aFlags, in JSCompartmentOptions aOptions); */ NS_IMETHODIMP nsXPConnect::InitClassesWithNewWrappedGlobal(JSContext *aJSContext, nsISupports *aCOMObj, nsIPrincipal *aPrincipal, uint32_t aFlags, JS::CompartmentOptions & aOptions, nsIXPConnectJSObjectHolder * *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* nsIXPConnectJSObjectHolder wrapNative (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsISupports aCOMObj, in nsIIDRef aIID); */ NS_IMETHODIMP nsXPConnect::WrapNative(JSContext *aJSContext, JSObject *aScope, nsISupports *aCOMObj, const nsIID & aIID, nsIXPConnectJSObjectHolder * *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* void wrapNativeToJSVal (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsISupports aCOMObj, in nsWrapperCachePtr aCache, in nsIIDPtr aIID, in boolean aAllowWrapper, out jsval aVal); */ NS_IMETHODIMP nsXPConnect::WrapNativeToJSVal(JSContext *aJSContext, JSObject *aScope, nsISupports *aCOMObj, nsWrapperCache *aCache, const nsIID *aIID, bool aAllowWrapper, JS::MutableHandleValue aVal) { return NS_ERROR_NOT_IMPLEMENTED; } /* void wrapJS (in JSContextPtr aJSContext, in JSObjectPtr aJSObj, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ NS_IMETHODIMP nsXPConnect::WrapJS(JSContext *aJSContext, JSObject *aJSObj, const nsIID & aIID, void **result) { return NS_ERROR_NOT_IMPLEMENTED; } /* nsIVariant jSValToVariant (in JSContextPtr cx, in jsval aJSVal); */ NS_IMETHODIMP nsXPConnect::JSValToVariant(JSContext *cx, JS::HandleValue aJSVal, nsIVariant * *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* nsIXPConnectWrappedNative getWrappedNativeOfJSObject (in JSContextPtr aJSContext, in JSObjectPtr aJSObj); */ NS_IMETHODIMP nsXPConnect::GetWrappedNativeOfJSObject(JSContext *aJSContext, JSObject *aJSObj, nsIXPConnectWrappedNative * *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* [noscript,notxpcom] nsISupports getNativeOfWrapper (in JSContextPtr aJSContext, in JSObjectPtr aJSObj); */ NS_IMETHODIMP_(nsISupports *) nsXPConnect::GetNativeOfWrapper(JSContext *aJSContext, JSObject *aJSObj) { return NS_ERROR_NOT_IMPLEMENTED; } /* [noscript,nostdcall,notxpcom] JSContextPtr getCurrentJSContext (); */ JSContext * nsXPConnect::GetCurrentJSContext() { return NS_ERROR_NOT_IMPLEMENTED; } /* [noscript,nostdcall,notxpcom] JSContextPtr getSafeJSContext (); */ JSContext * nsXPConnect::GetSafeJSContext() { return NS_ERROR_NOT_IMPLEMENTED; } /* readonly attribute nsIStackFrame CurrentJSStack; */ NS_IMETHODIMP nsXPConnect::GetCurrentJSStack(nsIStackFrame * *aCurrentJSStack) { return NS_ERROR_NOT_IMPLEMENTED; } /* readonly attribute nsAXPCNativeCallContextPtr CurrentNativeCallContext; */ NS_IMETHODIMP nsXPConnect::GetCurrentNativeCallContext(nsAXPCNativeCallContext **aCurrentNativeCallContext) { return NS_ERROR_NOT_IMPLEMENTED; } /* void debugDump (in short depth); */ NS_IMETHODIMP nsXPConnect::DebugDump(int16_t depth) { return NS_ERROR_NOT_IMPLEMENTED; } /* void debugDumpObject (in nsISupports aCOMObj, in short depth); */ NS_IMETHODIMP nsXPConnect::DebugDumpObject(nsISupports *aCOMObj, int16_t depth) { return NS_ERROR_NOT_IMPLEMENTED; } /* void debugDumpJSStack (in boolean showArgs, in boolean showLocals, in boolean showThisProps); */ NS_IMETHODIMP nsXPConnect::DebugDumpJSStack(bool showArgs, bool showLocals, bool showThisProps) { return NS_ERROR_NOT_IMPLEMENTED; } /* void wrapJSAggregatedToNative (in nsISupports aOuter, in JSContextPtr aJSContext, in JSObjectPtr aJSObj, in nsIIDRef aIID, [iid_is (aIID), retval] out nsQIResult result); */ NS_IMETHODIMP nsXPConnect::WrapJSAggregatedToNative(nsISupports *aOuter, JSContext *aJSContext, JSObject *aJSObj, const nsIID & aIID, void **result) { return NS_ERROR_NOT_IMPLEMENTED; } /* nsIXPConnectWrappedNative getWrappedNativeOfNativeObject (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsISupports aCOMObj, in nsIIDRef aIID); */ NS_IMETHODIMP nsXPConnect::GetWrappedNativeOfNativeObject(JSContext *aJSContext, JSObject *aScope, nsISupports *aCOMObj, const nsIID & aIID, nsIXPConnectWrappedNative * *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* void setFunctionThisTranslator (in nsIIDRef aIID, in nsIXPCFunctionThisTranslator aTranslator); */ NS_IMETHODIMP nsXPConnect::SetFunctionThisTranslator(const nsIID & aIID, nsIXPCFunctionThisTranslator *aTranslator) { return NS_ERROR_NOT_IMPLEMENTED; } /* nsIXPConnectJSObjectHolder getWrappedNativePrototype (in JSContextPtr aJSContext, in JSObjectPtr aScope, in nsIClassInfo aClassInfo); */ NS_IMETHODIMP nsXPConnect::GetWrappedNativePrototype(JSContext *aJSContext, JSObject *aScope, nsIClassInfo *aClassInfo, nsIXPConnectJSObjectHolder * *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* jsval variantToJS (in JSContextPtr ctx, in JSObjectPtr scope, in nsIVariant value); */ NS_IMETHODIMP nsXPConnect::VariantToJS(JSContext *ctx, JSObject *scope, nsIVariant *value, JS::MutableHandleValue _retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* nsIVariant JSToVariant (in JSContextPtr ctx, in jsval value); */ NS_IMETHODIMP nsXPConnect::JSToVariant(JSContext *ctx, JS::HandleValue value, nsIVariant * *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* [noscript] nsIXPConnectJSObjectHolder createSandbox (in JSContextPtr cx, in nsIPrincipal principal); */ NS_IMETHODIMP nsXPConnect::CreateSandbox(JSContext *cx, nsIPrincipal *principal, nsIXPConnectJSObjectHolder * *_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* [noscript] jsval evalInSandboxObject (in AString source, in string filename, in JSContextPtr cx, in JSObjectPtr sandbox); */ NS_IMETHODIMP nsXPConnect::EvalInSandboxObject(const nsAString & source, const char * filename, JSContext *cx, JSObject *sandbox, JS::MutableHandleValue _retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* void setReportAllJSExceptions (in boolean reportAllJSExceptions); */ NS_IMETHODIMP nsXPConnect::SetReportAllJSExceptions(bool reportAllJSExceptions) { return NS_ERROR_NOT_IMPLEMENTED; } /* void GarbageCollect (in uint32_t reason); */ NS_IMETHODIMP nsXPConnect::GarbageCollect(uint32_t reason) { return NS_ERROR_NOT_IMPLEMENTED; } /* void NotifyDidPaint (); */ NS_IMETHODIMP nsXPConnect::NotifyDidPaint() { return NS_ERROR_NOT_IMPLEMENTED; } /* [noscript] void writeScript (in nsIObjectOutputStream aStream, in JSContextPtr aJSContext, in JSScriptPtr aJSScript); */ NS_IMETHODIMP nsXPConnect::WriteScript(nsIObjectOutputStream *aStream, JSContext *aJSContext, JSScript *aJSScript) { return NS_ERROR_NOT_IMPLEMENTED; } /* [noscript] JSScriptPtr readScript (in nsIObjectInputStream aStream, in JSContextPtr aJSContext); */ NS_IMETHODIMP nsXPConnect::ReadScript(nsIObjectInputStream *aStream, JSContext *aJSContext, JSScript **_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* [noscript] void writeFunction (in nsIObjectOutputStream aStream, in JSContextPtr aJSContext, in JSObjectPtr aJSObject); */ NS_IMETHODIMP nsXPConnect::WriteFunction(nsIObjectOutputStream *aStream, JSContext *aJSContext, JSObject *aJSObject) { return NS_ERROR_NOT_IMPLEMENTED; } /* [noscript] JSObjectPtr readFunction (in nsIObjectInputStream aStream, in JSContextPtr aJSContext); */ NS_IMETHODIMP nsXPConnect::ReadFunction(nsIObjectInputStream *aStream, JSContext *aJSContext, JSObject **_retval) { return NS_ERROR_NOT_IMPLEMENTED; } /* End of implementation class template. */ #endif #endif /* __gen_nsIXPConnect_h__ */
{ "content_hash": "fb962600f1098cab17da6ecd308b4801", "timestamp": "", "source": "github", "line_count": 963, "max_line_length": 357, "avg_line_length": 51.34060228452752, "alnum_prop": 0.754859327278979, "repo_name": "andrasigneczi/TravelOptimizer", "id": "1ee9ec9f67b2c5fffdf12bdca253ad01a4db50c8", "size": "49441", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "DataCollector/mozilla/xulrunner-sdk/include/nsIXPConnect.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "3443874" }, { "name": "C++", "bytes": "33624518" }, { "name": "CSS", "bytes": "1225" }, { "name": "HTML", "bytes": "13117" }, { "name": "IDL", "bytes": "1110940" }, { "name": "Java", "bytes": "562163" }, { "name": "JavaScript", "bytes": "1480" }, { "name": "Makefile", "bytes": "360" }, { "name": "Objective-C", "bytes": "3166" }, { "name": "Python", "bytes": "322743" }, { "name": "Shell", "bytes": "2539" } ], "symlink_target": "" }
#ifndef mrpt_CStereoRectifyMap_H #define mrpt_CStereoRectifyMap_H #include <mrpt/utils/TStereoCamera.h> #include <mrpt/utils/CImage.h> #include <mrpt/slam/CObservationStereoImages.h> #include <mrpt/vision/link_pragmas.h> namespace mrpt { namespace vision { /** Use this class to rectify stereo images if the same distortion maps are reused over and over again. * The rectify maps are cached internally and only computed once for the camera parameters. * The stereo camera calibration must be supplied in a mrpt::util::TStereoCamera structure * (which provides method for loading from a plain text config file) or directly from the * parameters of a mrpt::slam::CObservationStereoImages object. * * Remember that the rectified images have a different set of intrinsic parameters than the * original images, which can be retrieved with \a getRectifiedImageParams() * * Works with grayscale or color images. * * Refer to the program stereo-calib-gui for a tool that generates the required stereo camera parameters * from a set of stereo images of a checkerboard. * * Example of usage with mrpt::slam::CObservationStereoImages: * * \code * CStereoRectifyMap rectify_map; * // Set options as desired: * // rectify_map.setAlpha(...); * // rectify_map.enableBothCentersCoincide(...); * * while (true) { * mrpt::slam::CObservationStereoImagesPtr obs_stereo = ... // Grab stereo observation from wherever * * // Only once, construct the rectification maps: * if (!rectify_map.isSet()) * rectify_map.setFromCamParams(*obs_stereo); * * // Rectify in place: * unmap.rectify(*obs_stereo); * // Rectified images are now in: obs_stereo->imageLeft & obs_stereo->imageRight * } * \endcode * * Read also the tutorial page online: http://www.mrpt.org/Rectifying_stereo_images * * \sa CUndistortMap, mrpt::slam::CObservationStereoImages, mrpt::utils::TCamera, the application <a href="http://www.mrpt.org/Application:camera-calib" >camera-calib</a> for calibrating a camera. * * \note This class provides a uniform wrap over different OpenCV versions. The "alpha" parameter is ignored if built against OpenCV 2.0.X * * \ingroup mrpt_vision_grp */ class VISION_IMPEXP CStereoRectifyMap { public: CStereoRectifyMap(); //!< Default ctor /** @name Rectify map preparation and setting/getting of parameters @{ */ /** Returns true if \a setFromCamParams() has been already called, false otherwise. * Can be used within loops to determine the first usage of the object and when it needs to be initialized. */ inline bool isSet() const { return !m_dat_mapx_left.empty(); } /** Prepares the mapping from the intrinsic, distortion and relative pose parameters of a stereo camera. * Must be called before invoking \a rectify(). * The \a alpha parameter can be changed with \a setAlpha() before invoking this method; otherwise, the current rectification maps will be marked as invalid and should be prepared again. * \sa setAlpha() */ void setFromCamParams(const mrpt::utils::TStereoCamera &params); /** A wrapper to \a setFromCamParams() which takes the parameters from an stereo observation object */ void setFromCamParams(const mrpt::slam::CObservationStereoImages &stereo_obs) { mrpt::utils::TStereoCamera params; stereo_obs.getStereoCameraParams(params); setFromCamParams(params); } /** Returns the camera parameters which were used to generate the distortion map, as passed by the user to \a setFromCamParams */ inline const mrpt::utils::TStereoCamera & getCameraParams() const { return m_camera_params; } /** After computing the rectification maps, this method retrieves the calibration parameters of the rectified images * (which won't have any distortion). * \exception std::exception If the rectification maps have not been computed. */ const mrpt::utils::TStereoCamera & getRectifiedImageParams() const; const mrpt::utils::TCamera & getRectifiedLeftImageParams() const; //!< Just like \a getRectifiedImageParams() but for the left camera only const mrpt::utils::TCamera & getRectifiedRightImageParams() const; //!< Just like \a getRectifiedImageParams() but for the right camera only /** Sets the \a alpha parameter which controls the zoom in/out of the rectified images, such that: * - alpha=0 => rectified images are zoom in so that only valid pixels are visible * - alpha=1 => rectified images will contain large "black areas" but no pixel from the original image will be lost. * Intermediary values leads to intermediary results. * Its default value (-1) means auto guess by the OpenCV's algorithm. * \note Call this method before building the rectification maps, otherwise they'll be marked as invalid. */ void setAlpha(double alpha); /** Return the \a alpha parameter \sa setAlpha */ inline double getAlpha() const { return m_alpha; } /** If enabled, the computed maps will rectify images to a size different than their original size. * \note Call this method before building the rectification maps, otherwise they'll be marked as invalid. */ void enableResizeOutput(bool enable, unsigned int target_width=0, unsigned int target_height=0); /** Returns whether resizing is enabled (default=false) \sa enableResizeOutput */ bool isEnabledResizeOutput() const { return m_resize_output; } /** Only when \a isEnabledResizeOutput() returns true, this gets the target size \sa enableResizeOutput */ mrpt::utils::TImageSize getResizeOutputSize() const { return m_resize_output_value; } /** Change remap interpolation method (default=Lineal). This parameter can be safely changed at any instant without consequences. */ void setInterpolationMethod(const mrpt::utils::TInterpolationMethod interp) { m_interpolation_method = m_interpolation_method; } /** Get the currently selected interpolation method \sa setInterpolationMethod */ mrpt::utils::TInterpolationMethod getInterpolationMethod() const { return m_interpolation_method; } /** If enabled (default=false), the principal points in both output images will coincide. * \note Call this method before building the rectification maps, otherwise they'll be marked as invalid. */ void enableBothCentersCoincide(bool enable=true); /** \sa enableBothCentersCoincide */ bool isEnabledBothCentersCoincide() const { return m_enable_both_centers_coincide; } /** @} */ /** @name Rectify methods @{ */ /** Rectify the input image pair and save the result in a different output images - \a setFromCamParams() must have been set prior to calling this. * The previous contents of the output images are completely ignored, but if they are already of the * correct size and type, allocation time will be saved. * Recall that \a getRectifiedImageParams() provides you the new intrinsic parameters of these images. * \exception std::exception If the rectification maps have not been computed. * \note The same image CANNOT be at the same time input and output, in which case an exception will be raised (but see the overloaded version for in-place rectification) */ void rectify( const mrpt::utils::CImage &in_left_image, const mrpt::utils::CImage &in_right_image, mrpt::utils::CImage &out_left_image, mrpt::utils::CImage &out_right_image) const; /** Overloaded version for in-place rectification: replace input images with their rectified versions * If \a use_internal_mem_cache is set to \a true (recommended), will reuse over and over again the same * auxiliary images (kept internally to this object) needed for in-place rectification. * The only reason not to enable this cache is when multiple threads can invoke this method simultaneously. */ void rectify( mrpt::utils::CImage &left_image, mrpt::utils::CImage &right_image, const bool use_internal_mem_cache = true ) const; /** Overloaded version for in-place rectification of image pairs stored in a mrpt::slam::CObservationStereoImages. * Upon return, the new camera intrinsic parameters will be already stored in the observation object. * If \a use_internal_mem_cache is set to \a true (recommended), will reuse over and over again the same * auxiliary images (kept internally to this object) needed for in-place rectification. * The only reason not to enable this cache is when multiple threads can invoke this method simultaneously. */ void rectify( mrpt::slam::CObservationStereoImages & stereo_image_observation, const bool use_internal_mem_cache = true ) const; /** Just like rectify() but directly works with OpenCV's "IplImage*", which must be passed as "void*" to avoid header dependencies * Output images CANNOT coincide with the input images. */ void rectify_IPL( const void* in_left_image, const void* in_right_image, void* out_left_image, void* out_right_image) const; /** @} */ private: double m_alpha; bool m_resize_output; bool m_enable_both_centers_coincide; mrpt::utils::TImageSize m_resize_output_value; mrpt::utils::TInterpolationMethod m_interpolation_method; mutable mrpt::utils::CImage m_cache1, m_cache2; //!< Memory caches for in-place rectification speed-up. std::vector<int16_t> m_dat_mapx_left,m_dat_mapx_right; std::vector<uint16_t> m_dat_mapy_left,m_dat_mapy_right; mrpt::utils::TStereoCamera m_camera_params; //!< A copy of the data provided by the user mrpt::utils::TStereoCamera m_rectified_image_params; //!< Resulting images params void internal_invalidate(); }; // end class } // end namespace } // end namespace #endif
{ "content_hash": "7591bff7164e44d76fce4b4fe18976c6", "timestamp": "", "source": "github", "line_count": 204, "max_line_length": 199, "avg_line_length": 48.69117647058823, "alnum_prop": 0.7148897614013893, "repo_name": "samuelpfchoi/mrpt", "id": "79b5fc6d643b7f39904dd3a1ec69d6093f07a9e4", "size": "10583", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "libs/vision/include/mrpt/vision/CStereoRectifyMap.h", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_71) on Tue Feb 16 15:23:08 EST 2016 --> <meta http-equiv="Content-Type" content="text/html" charset="utf-8"> <title>Uses of Class org.apache.solr.update.processor.RegexReplaceProcessorFactory (Solr 5.5.0 API)</title> <meta name="date" content="2016-02-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="Uses of Class org.apache.solr.update.processor.RegexReplaceProcessorFactory (Solr 5.5.0 API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <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/apache/solr/update/processor/RegexReplaceProcessorFactory.html" title="class in org.apache.solr.update.processor">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="../../../../../../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/apache/solr/update/processor/class-use/RegexReplaceProcessorFactory.html" target="_top">Frames</a></li> <li><a href="RegexReplaceProcessorFactory.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class org.apache.solr.update.processor.RegexReplaceProcessorFactory" class="title">Uses of Class<br>org.apache.solr.update.processor.RegexReplaceProcessorFactory</h2> </div> <div class="classUseContainer">No usage of org.apache.solr.update.processor.RegexReplaceProcessorFactory</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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/apache/solr/update/processor/RegexReplaceProcessorFactory.html" title="class in org.apache.solr.update.processor">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="../../../../../../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/apache/solr/update/processor/class-use/RegexReplaceProcessorFactory.html" target="_top">Frames</a></li> <li><a href="RegexReplaceProcessorFactory.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small> <i>Copyright &copy; 2000-2016 Apache Software Foundation. All Rights Reserved.</i> <script src='../../../../../../prettify.js' type='text/javascript'></script> <script type='text/javascript'> (function(){ var oldonload = window.onload; if (typeof oldonload != 'function') { window.onload = prettyPrint; } else { window.onload = function() { oldonload(); prettyPrint(); } } })(); </script> </small></p> </body> </html>
{ "content_hash": "a9492f4cae318930f0e6dd81a68e66b5", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 185, "avg_line_length": 39.656488549618324, "alnum_prop": 0.5936477382098171, "repo_name": "koneksys/KLD", "id": "b5ad138119ee9807117466b4565442301d928a3a", "size": "5195", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "middleware/solr/docs/solr-core/org/apache/solr/update/processor/class-use/RegexReplaceProcessorFactory.html", "mode": "33188", "license": "mit", "language": [ { "name": "AMPL", "bytes": "291" }, { "name": "Batchfile", "bytes": "51479" }, { "name": "CSS", "bytes": "591037" }, { "name": "HTML", "bytes": "64940813" }, { "name": "Java", "bytes": "2813" }, { "name": "JavaScript", "bytes": "2587494" }, { "name": "Python", "bytes": "3947" }, { "name": "Ruby", "bytes": "181387" }, { "name": "Shell", "bytes": "99038" }, { "name": "Smarty", "bytes": "12475" }, { "name": "XSLT", "bytes": "128198" } ], "symlink_target": "" }
#include "precompiled.h" #include "LayoutBlockBoxSpace.h" #include "LayoutBlockBox.h" #include "LayoutEngine.h" #include <Rocket/Core/Element.h> #include <Rocket/Core/ElementScroll.h> #include <Rocket/Core/StyleSheetKeywords.h> namespace Rocket { namespace Core { LayoutBlockBoxSpace::LayoutBlockBoxSpace(LayoutBlockBox* _parent) : dimensions(0, 0), offset(0, 0) { parent = _parent; } LayoutBlockBoxSpace::~LayoutBlockBoxSpace() { } // Imports boxes from another block into this space. void LayoutBlockBoxSpace::ImportSpace(const LayoutBlockBoxSpace& space) { // Copy all the boxes from the parent into this space. Could do some optimisation here! for (int i = 0; i < NUM_ANCHOR_EDGES; ++i) { for (size_t j = 0; j < space.boxes[i].size(); ++j) boxes[i].push_back(space.boxes[i][j]); } } // Generates the position for a box of a given size within a containing block box. void LayoutBlockBoxSpace::PositionBox(Vector2f& box_position, float& box_width, float cursor, const Vector2f& dimensions) const { box_width = PositionBox(box_position, cursor, dimensions); } // Generates and sets the position for a floating box of a given size within our block box. float LayoutBlockBoxSpace::PositionBox(float cursor, Element* element) { Vector2f element_size = element->GetBox().GetSize(Box::MARGIN); int float_property = element->GetProperty< int >(FLOAT); // Shift the cursor down (if necessary) so it isn't placed any higher than a previously-floated box. for (int i = 0; i < NUM_ANCHOR_EDGES; ++i) { if (!boxes[i].empty()) cursor = Math::Max(cursor, boxes[i].back().offset.y); } // Shift the cursor down past to clear boxes, if necessary. cursor = ClearBoxes(cursor, element->GetProperty< int >(CLEAR)); // Find a place to put this box. Vector2f element_offset; PositionBox(element_offset, cursor, element_size, float_property); // It's been placed, so we can now add it to our list of floating boxes. boxes[float_property == FLOAT_LEFT ? LEFT : RIGHT].push_back(SpaceBox(element_offset, element_size)); // Set our offset and dimensions (if necessary) so they enclose the new box. Vector2f normalised_offset = element_offset - (parent->GetPosition() + parent->GetBox().GetPosition()); offset.x = Math::Min(offset.x, normalised_offset.x); offset.y = Math::Min(offset.y, normalised_offset.y); dimensions.x = Math::Max(dimensions.x, normalised_offset.x + element_size.x); dimensions.y = Math::Max(dimensions.y, normalised_offset.y + element_size.y); // Shift the offset into the correct space relative to the element's offset parent. element_offset += Vector2f(element->GetBox().GetEdge(Box::MARGIN, Box::LEFT), element->GetBox().GetEdge(Box::MARGIN, Box::TOP)); element->SetOffset(element_offset - parent->GetOffsetParent()->GetPosition(), parent->GetOffsetParent()->GetElement()); return element_offset.y + element_size.y; } // Determines the appropriate vertical position for an object that is choosing to clear floating elements to the left // or right (or both). float LayoutBlockBoxSpace::ClearBoxes(float cursor, int clear_property) { // Clear left boxes. if (clear_property == CLEAR_LEFT || clear_property == CLEAR_BOTH) { for (size_t i = 0; i < boxes[LEFT].size(); ++i) cursor = Math::Max(cursor, boxes[LEFT][i].offset.y + boxes[LEFT][i].dimensions.y); } // Clear right boxes. if (clear_property == CLEAR_RIGHT || clear_property == CLEAR_BOTH) { for (size_t i = 0; i < boxes[RIGHT].size(); ++i) cursor = Math::Max(cursor, boxes[RIGHT][i].offset.y + boxes[RIGHT][i].dimensions.y); } return cursor; } // Generates the position for an arbitrary box within our space layout, floated against either the left or right edge. float LayoutBlockBoxSpace::PositionBox(Vector2f& box_position, float cursor, const Vector2f& dimensions, int float_property) const { float parent_scrollbar_width = parent->GetElement()->GetElementScroll()->GetScrollbarSize(ElementScroll::VERTICAL); float parent_origin = parent->GetPosition().x + parent->GetBox().GetPosition(Box::CONTENT).x; float parent_edge = parent->GetBox().GetSize().x + parent_origin - parent_scrollbar_width; AnchorEdge box_edge = float_property == FLOAT_RIGHT ? RIGHT : LEFT; box_position.y = cursor; box_position.x = box_edge == LEFT ? 0 : (parent->GetBox().GetSize().x - dimensions.x) - parent_scrollbar_width; box_position.x += parent_origin; float next_cursor = FLT_MAX; // First up; we iterate through all boxes that share our edge, pushing ourself to the side of them if we intersect // them. We record the height of the lowest box that gets in our way; in the event we can't be positioned at this // height, we'll reposition ourselves at that height for the next iteration. for (size_t i = 0; i < boxes[box_edge].size(); ++i) { const SpaceBox& fixed_box = boxes[box_edge][i]; // If the fixed box's bottom edge is above our top edge, then we can safely skip it. if (fixed_box.offset.y + fixed_box.dimensions.y <= box_position.y) continue; // If the fixed box's top edge is below our bottom edge, then we can safely skip it. if (fixed_box.offset.y >= box_position.y + dimensions.y) continue; // We're intersecting this box vertically, so the box is pushed to the side if necessary. bool collision = false; if (box_edge == LEFT) { float right_edge = fixed_box.offset.x + fixed_box.dimensions.x; collision = box_position.x < right_edge; if (collision) box_position.x = right_edge; } else { collision = box_position.x + dimensions.x > fixed_box.offset.x; if (collision) box_position.x = fixed_box.offset.x - dimensions.x; } // If there was a collision, then we *might* want to remember the height of this box if it is the earliest- // terminating box we've collided with so far. if (collision) { next_cursor = Math::Min(next_cursor, fixed_box.offset.y + fixed_box.dimensions.y); // Were we pushed out of our containing box? If so, try again at the next cursor position. float normalised_position = box_position.x - parent_origin; if (normalised_position < 0 || normalised_position + dimensions.x > parent->GetBox().GetSize().x) return PositionBox(box_position, next_cursor + 0.01f, dimensions, float_property); } } // Second; we go through all of the boxes on the other edge, checking for horizontal collisions and determining the // maximum width the box can stretch to, if it is placed at this location. float maximum_box_width = box_edge == LEFT ? parent_edge - box_position.x : box_position.x + dimensions.x; for (size_t i = 0; i < boxes[1 - box_edge].size(); ++i) { const SpaceBox& fixed_box = boxes[1 - box_edge][i]; // If the fixed box's bottom edge is above our top edge, then we can safely skip it. if (fixed_box.offset.y + fixed_box.dimensions.y <= box_position.y) continue; // If the fixed box's top edge is below our bottom edge, then we can safely skip it. if (fixed_box.offset.y >= box_position.y + dimensions.y) continue; // We intersect this box vertically, so check if it intersects horizontally. bool collision = false; if (box_edge == LEFT) { maximum_box_width = Math::Min(maximum_box_width, fixed_box.offset.x - box_position.x); collision = box_position.x + dimensions.x > fixed_box.offset.x; } else { maximum_box_width = Math::Min(maximum_box_width, (box_position.x + dimensions.x) - (fixed_box.offset.x + fixed_box.dimensions.x)); collision = box_position.x < fixed_box.offset.x + fixed_box.dimensions.x; } // If we collided with this box ... d'oh! We'll try again lower down the page, at the highest bottom-edge of // any of the boxes we've been pushed around by so far. if (collision) { next_cursor = Math::Min(next_cursor, fixed_box.offset.y + fixed_box.dimensions.y); return PositionBox(box_position, next_cursor + 0.00001f, dimensions, float_property); } } // Third; we go through all of the boxes (on both sides), checking for vertical collisions. for (int i = 0; i < 2; ++i) { for (size_t j = 0; j < boxes[i].size(); ++j) { const SpaceBox& fixed_box = boxes[i][j]; // If the fixed box's bottom edge is above our top edge, then we can safely skip it. if (fixed_box.offset.y + fixed_box.dimensions.y <= box_position.y) continue; // If the fixed box's top edge is below our bottom edge, then we can safely skip it. if (fixed_box.offset.y >= box_position.y + dimensions.y) continue; // We collide vertically; if we also collide horizontally, then we have to try again further down the // layout. If the fixed box's left edge is to right of our right edge, then we can safely skip it. if (fixed_box.offset.x >= box_position.x + dimensions.x) continue; // If the fixed box's right edge is to the left of our left edge, then we can safely skip it. if (fixed_box.offset.x + fixed_box.dimensions.x <= box_position.x) continue; // D'oh! We hit this box. Ah well; we'll try again lower down the page, at the highest bottom-edge of any // of the boxes we've been pushed around by so far. next_cursor = Math::Min(next_cursor, fixed_box.offset.y + fixed_box.dimensions.y); return PositionBox(box_position, next_cursor + 0.00001f, dimensions, float_property); } } // Looks like we've found a winner! return maximum_box_width; } // Returns the top-left offset of the boxes within the space. const Vector2f& LayoutBlockBoxSpace::GetOffset() const { return offset; } // Returns the dimensions of the boxes within the space. Vector2f LayoutBlockBoxSpace::GetDimensions() const { return dimensions - offset; } void* LayoutBlockBoxSpace::operator new(size_t size) { return LayoutEngine::AllocateLayoutChunk(size); } void LayoutBlockBoxSpace::operator delete(void* chunk) { LayoutEngine::DeallocateLayoutChunk(chunk); } LayoutBlockBoxSpace::SpaceBox::SpaceBox() : offset(0, 0), dimensions(0, 0) { } LayoutBlockBoxSpace::SpaceBox::SpaceBox(const Vector2f& offset, const Vector2f& dimensions) : offset(offset), dimensions(dimensions) { } } }
{ "content_hash": "2290c0fdc260130bfbbf9affc42ea1ab", "timestamp": "", "source": "github", "line_count": 264, "max_line_length": 133, "avg_line_length": 38.03409090909091, "alnum_prop": 0.7080968031072602, "repo_name": "Josiastech/vuforia-gamekit-integration", "id": "f525377c2c0f74b601d5ab1c00f2d2729e7e2f11", "size": "11331", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "Gamekit/Dependencies/Source/libRocket/Source/Core/LayoutBlockBoxSpace.cpp", "mode": "33261", "license": "mit", "language": [], "symlink_target": "" }
/** * Allows for runtime configuration. Internally, the runtime should * use the src/config.js module for various constants. We can use the * AMP_CONFIG global to translate user-defined configurations to this * module. * @type {!Object<string, string>} */ const env = self.AMP_CONFIG || {}; const thirdPartyFrameRegex = (typeof env['thirdPartyFrameRegex'] == 'string' ? new RegExp(env['thirdPartyFrameRegex']) : env['thirdPartyFrameRegex']) || /^d-\d+\.ampproject\.net$/; const cdnProxyRegex = (typeof env['cdnProxyRegex'] == 'string' ? new RegExp(env['cdnProxyRegex']) : env['cdnProxyRegex']) || /^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/; /** * Check for a custom URL definition in special <meta> tags. Note that this does * not allow for distinct custom URLs in AmpDocShadow instances. The shell is * allowed to define one set of custom URLs via AMP_CONFIG (recommended) or by * including <meta> tags in the shell <head>. Those custom URLs then apply to * all AMP documents loaded in the shell. * @param {string} name * @return {?string} * @private */ function getMetaUrl(name) { // Avoid exceptions in unit tests if (!self.document || !self.document.head) { return null; } // Disallow on proxy origins if (self.location && cdnProxyRegex.test(self.location.origin)) { return null; } const metaEl = self.document.head./*OK*/ querySelector( `meta[name="${name}"]` ); return (metaEl && metaEl.getAttribute('content')) || null; } /** * @typedef {{ * thirdParty: string, * thirdPartyFrameHost: string, * thirdPartyFrameRegex: !RegExp, * cdn: string, * cdnProxyRegex: !RegExp, * localhostRegex: !RegExp, * errorReporting: string, * betaErrorReporting: string, * localDev: boolean, * trustedViewerHosts: !Array<!RegExp>, * geoApi: ?string, * }} */ export const urls = { thirdParty: env['thirdPartyUrl'] || 'https://3p.ampproject.net', thirdPartyFrameHost: env['thirdPartyFrameHost'] || 'ampproject.net', thirdPartyFrameRegex, cdn: env['cdnUrl'] || getMetaUrl('runtime-host') || 'https://cdn.ampproject.org', /* Note that cdnProxyRegex is only ever checked against origins * (proto://host[:port]) so does not need to consider path */ cdnProxyRegex, localhostRegex: /^https?:\/\/localhost(:\d+)?$/, errorReporting: env['errorReportingUrl'] || 'https://us-central1-amp-error-reporting.cloudfunctions.net/r', betaErrorReporting: env['betaErrorReportingUrl'] || 'https://us-central1-amp-error-reporting.cloudfunctions.net/r-beta', localDev: env['localDev'] || false, /** * These domains are trusted with more sensitive viewer operations such as * propagating the referrer. If you believe your domain should be here, * file the issue on GitHub to discuss. The process will be similar * (but somewhat more stringent) to the one described in the [3p/README.md]( * https://github.com/ampproject/amphtml/blob/master/3p/README.md) * * {!Array<!RegExp>} */ trustedViewerHosts: [ /(^|\.)google\.(com?|[a-z]{2}|com?\.[a-z]{2}|cat)$/, /(^|\.)gmail\.(com|dev)$/, ], // Optional fallback API if amp-geo is left unpatched geoApi: env['geoApiUrl'] || getMetaUrl('amp-geo-api'), }; export const config = { urls, };
{ "content_hash": "cf6b36d57b745b2405ef063fef518eed", "timestamp": "", "source": "github", "line_count": 102, "max_line_length": 80, "avg_line_length": 32.3921568627451, "alnum_prop": 0.6697941888619855, "repo_name": "sharethrough/amphtml", "id": "3396e27453c75bc1097e87a9036d0782af94f300", "size": "3931", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/config.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "53392" }, { "name": "Go", "bytes": "7459" }, { "name": "HTML", "bytes": "443762" }, { "name": "Java", "bytes": "30170" }, { "name": "JavaScript", "bytes": "4458784" }, { "name": "Protocol Buffer", "bytes": "24816" }, { "name": "Python", "bytes": "60471" }, { "name": "Shell", "bytes": "4601" } ], "symlink_target": "" }
Making your shop support multiple languages is much like doing the same for any other SilverStripe website. [Here is a guide](http://www.balbuss.com/setting-up-a-multilingual-site/). Here is some shop-specific information: Add the following to your _config.php file: :::php Object::add_extension('SiteTree', 'Translatable'); Object::add_extension('SiteConfig', 'Translatable'); Object::add_extension('ProductVariation', 'Translatable');
{ "content_hash": "b7c028371bd636ff6a83622b1c2f25fc", "timestamp": "", "source": "github", "line_count": 11, "max_line_length": 96, "avg_line_length": 40.36363636363637, "alnum_prop": 0.7635135135135135, "repo_name": "hailwood/silverstripe-shop", "id": "a2cb5a2e678642b85522032c7746beb3b3b86718", "size": "483", "binary": false, "copies": "7", "ref": "refs/heads/develop", "path": "docs/en/02_Customisation/01_Recipes/Multi_Language.md", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "ApacheConf", "bytes": "217" }, { "name": "CSS", "bytes": "6785" }, { "name": "JavaScript", "bytes": "4934" }, { "name": "PHP", "bytes": "729154" }, { "name": "Scheme", "bytes": "45748" }, { "name": "Shell", "bytes": "536" } ], "symlink_target": "" }
#include <stdio.h> #include <string.h> #include <getopt.h> #include <assert.h> #include <iostream> #include <fstream> #include "ClusterMetrics.h" #include "Context.h" #include "Cycles.h" #include "Dispatch.h" #include "ShortMacros.h" #include "Crc32C.h" #include "ObjectFinder.h" #include "OptionParser.h" #include "RamCloud.h" #include "Tub.h" #include "IndexLookup.h" #include "Transaction.h" #include "TimeTrace.h" using namespace RAMCloud; int main(int argc, char *argv[]) try { int clientIndex; int numClients; string tableName; int serverSpan; int objectSize; int asyncReadSize; int count; // Set line buffering for stdout so that printf's and log messages // interleave properly. setvbuf(stdout, NULL, _IOLBF, 1024); // need external context to set log levels with OptionParser Context context(false); OptionsDescription clientOptions("TimeTransactionsAsyncReads"); clientOptions.add_options() // These first two options are currently ignored. They're here so that // this script can be run with cluster.py. ("clientIndex", ProgramOptions::value<int>(&clientIndex)-> default_value(0), "Index of this client (first client is 0; currently ignored)") ("numClients", ProgramOptions::value<int>(&numClients)-> default_value(1), "Total number of clients running (currently ignored)") ("serverSpan", ProgramOptions::value<int>(&serverSpan), "Server span for the table.") ("objectSize", ProgramOptions::value<int>(&objectSize), "Size of objects in bytes.") ("asyncReadSize", ProgramOptions::value<int>(&asyncReadSize), "Number of objects to asynchronously read.") ("count", ProgramOptions::value<int>(&count), "Number of times to execute the set of asynchronous reads."); OptionParser optionParser(clientOptions, argc, argv); context.transportManager->setSessionTimeout( optionParser.options.getSessionTimeout()); LOG(NOTICE, "Connecting to %s", optionParser.options.getCoordinatorLocator().c_str()); string locator = optionParser.options.getExternalStorageLocator(); if (locator.size() == 0) { locator = optionParser.options.getCoordinatorLocator(); } RamCloud client(&context, locator.c_str(), optionParser.options.getClusterName().c_str()); uint64_t tableId; client.dropTable("test"); tableId = client.createTable("test", serverSpan); // Write in values to read int keys[asyncReadSize]; for (int i = 0; i < asyncReadSize; i++) { keys[i] = i; char randomValue[objectSize]; client.write(tableId, (char*)&keys[i], sizeof(int), randomValue, objectSize); } printf("%12s %12s %12s %12s %12s %12s %12s %12s %12s %12s\n", "Size(B)", "Objects", "Count", "Min", "Max", "Avg", "50th", "90th", "95th", "99th"); // Time asynchronous reads uint64_t startTime, endTime; uint64_t latency[count]; for (int i = 0; i < count; i++) { Transaction tx(&client); Tub<Transaction::ReadOp> requests[asyncReadSize]; Buffer values[asyncReadSize]; startTime = Cycles::rdtsc(); for (int i = 0; i < asyncReadSize; i++) { requests[i].construct(&tx, tableId, (char*)&keys[i], sizeof(int), &values[i], true); } for (int i = 0; i < asyncReadSize; i++) { requests[i].get()->wait(); } endTime = Cycles::rdtsc(); latency[i] = endTime - startTime; tx.commit(); } std::vector<uint64_t> latencyVec (latency, latency+count); std::sort(latencyVec.begin(), latencyVec.end()); uint64_t sum = 0; for (int i = 0; i < count; i++) { sum += latencyVec[i]; } printf("%12d %12d %12d %12.3f %12.3f %12.3f %12.3f %12.3f %12.3f %12.3f\n", objectSize, asyncReadSize, count, Cycles::toNanoseconds(latencyVec[0])/1000.0, Cycles::toNanoseconds(latencyVec[count-1])/1000.0, Cycles::toNanoseconds(sum)/((float)count)/1000.0, Cycles::toNanoseconds(latencyVec[count*50/100])/1000.0, Cycles::toNanoseconds(latencyVec[count*90/100])/1000.0, Cycles::toNanoseconds(latencyVec[count*95/100])/1000.0, Cycles::toNanoseconds(latencyVec[count*99/100])/1000.0); client.dropTable("test"); TimeTrace::printToLog(); return 0; } catch (RAMCloud::ClientException& e) { fprintf(stderr, "RAMCloud exception: %s\n", e.str().c_str()); return 1; } catch (RAMCloud::Exception& e) { fprintf(stderr, "RAMCloud exception: %s\n", e.str().c_str()); return 1; }
{ "content_hash": "d3d8d09c76bc012284e9457049a2a59a", "timestamp": "", "source": "github", "line_count": 168, "max_line_length": 80, "avg_line_length": 28.738095238095237, "alnum_prop": 0.6130903065451533, "repo_name": "jdellithorpe/RAMCloudTools", "id": "d1c16bc44f2df8ebae63438e6309024ed512cc59", "size": "5606", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "src/main/cpp/TimeTraceTxReadOp.cc", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C++", "bytes": "34191" }, { "name": "Java", "bytes": "4388" }, { "name": "Makefile", "bytes": "573" } ], "symlink_target": "" }
// // UAEC2ReplaceRouteRequest.m // AWS iOS SDK // // Copyright © Unsigned Apps 2014. See License file. // Created by Rob Amos. // // #import "UAEC2ReplaceRouteRequest.h" #import "UAAWSAdditionalAccessors.h" #import "UAEC2ReplaceRouteResponse.h" @interface UAEC2ReplaceRouteRequest () @property (nonatomic, copy) NSString *action; @property (nonatomic, copy) NSString *version; @end #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wincomplete-implementation" @implementation UAEC2ReplaceRouteRequest @synthesize action=_action, version=_version, dryRun=_dryRun, routeTableID=_routeTableID, destinationCidrBlock=_destinationCidrBlock, gatewayID=_gatewayID, instanceID=_instanceID, networkInterfaceID=_networkInterfaceID, vpcPeeringConnectionID=_vpcPeeringConnectionID; - (id)init { if (self = [super init]) { [self setAction:@"ReplaceRoute"]; [self setVersion:@"2014-05-01"]; } return self; } - (Class)UA_ResponseClass { return [UAEC2ReplaceRouteResponse class]; } + (NSDictionary *)queryStringKeyPathsByPropertyKey { // Start with super's key paths (if there are any) NSMutableDictionary *keyPaths = [[UAEC2Request queryStringKeyPathsByPropertyKey] mutableCopy]; [keyPaths addEntriesFromDictionary: @{ @"action": @"Action", @"version": @"Version", @"dryRun": @"DryRun", @"routeTableID": @"RouteTableId", @"destinationCidrBlock": @"DestinationCidrBlock", @"gatewayID": @"GatewayId", @"instanceID": @"InstanceId", @"networkInterfaceID": @"NetworkInterfaceId", @"vpcPeeringConnectionID": @"VpcPeeringConnectionId" }]; return [keyPaths copy]; } + (NSValueTransformer *)dryRunQueryStringTransformer { return [UAMTLValueTransformer UA_JSONTransformerForBooleanString]; } /*#pragma mark - Invocation - (void)invokeWithOwner:(id)owner completionBlock:(UAEC2ReplaceRouteRequestCompletionBlock)completionBlock { [self setUA_Owner:owner]; [self setUA_RequestCompletionBlock:completionBlock]; [self invoke]; } - (void)waitWithOwner:(id)owner shouldContinueWaitingBlock:(UAEC2ReplaceRouteRequestShouldContinueWaitingBlock)shouldContinueWaitingBlock completionBlock:(UAEC2ReplaceRouteRequestCompletionBlock)completionBlock { [self setUA_Owner:owner]; [self setUA_ShouldContinueWaiting:shouldContinueWaitingBlock]; [self setUA_RequestCompletionBlock:completionBlock]; [self invoke]; } - (void)waitWithOwner:(id)owner untilValueAtKeyPath:(NSString *)keyPath isInArray:(NSArray *)array completionBlock:(UAEC2ReplaceRouteRequestCompletionBlock)completionBlock { [self setUA_Owner:self]; [self setUA_ShouldContinueWaiting:[UAAWSRequest UA_ShouldContinueWaitingBlockUntilValueAtKeyPath:keyPath isInArray:array]]; [self setUA_RequestCompletionBlock:completionBlock]; [self invoke]; } */ @end #pragma clang diagnostic pop
{ "content_hash": "0bc6c499f6f23dca080b03be10a200e5", "timestamp": "", "source": "github", "line_count": 97, "max_line_length": 267, "avg_line_length": 29.855670103092784, "alnum_prop": 0.7537983425414365, "repo_name": "unsignedapps/ua-aws-sdk-ios", "id": "cb92b35e890ba092ae336b97cdac4d5dd74d7c00", "size": "2897", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "AWS iOS SDK/EC2/Requests/UAEC2ReplaceRouteRequest.m", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "42359" }, { "name": "Objective-C", "bytes": "4812683" }, { "name": "Ruby", "bytes": "1520" } ], "symlink_target": "" }
package com.msopentech.odatajclient.engine.data.metadata.edm.v3; import com.msopentech.odatajclient.engine.data.metadata.edm.AbstractSchema; import java.util.ArrayList; import java.util.List; public class Schema extends AbstractSchema<EntityContainer, EntityType, ComplexType, FunctionImport> { private static final long serialVersionUID = 4453992249818796144L; private final List<Annotations> annotationList = new ArrayList<Annotations>(); private final List<Association> associations = new ArrayList<Association>(); private final List<ComplexType> complexTypes = new ArrayList<ComplexType>(); private final List<EntityContainer> entityContainers = new ArrayList<EntityContainer>(); private final List<EntityType> entityTypes = new ArrayList<EntityType>(); private final List<EnumType> enumTypes = new ArrayList<EnumType>(); private final List<Using> usings = new ArrayList<Using>(); private final List<ValueTerm> valueTerms = new ArrayList<ValueTerm>(); public Association getAssociation(final String name) { Association result = null; for (Association association : getAssociations()) { if (name.equals(association.getName())) { result = association; } } return result; } @Override public List<Annotations> getAnnotationsList() { return annotationList; } @Override public Annotations getAnnotationsList(final String target) { Annotations result = null; for (Annotations annots : getAnnotationsList()) { if (target.equals(annots.getTarget())) { result = annots; } } return result; } public List<Association> getAssociations() { return associations; } public List<Using> getUsings() { return usings; } public List<ValueTerm> getValueTerms() { return valueTerms; } @Override public List<EnumType> getEnumTypes() { return enumTypes; } @Override public EnumType getEnumType(final String name) { EnumType result = null; for (EnumType type : getEnumTypes()) { if (name.equals(type.getName())) { result = type; } } return result; } @Override public List<EntityContainer> getEntityContainers() { return entityContainers; } @Override public EntityContainer getDefaultEntityContainer() { EntityContainer result = null; for (EntityContainer container : getEntityContainers()) { if (container.isDefaultEntityContainer()) { result = container; } } return result; } @Override public EntityContainer getEntityContainer(final String name) { EntityContainer result = null; for (EntityContainer container : getEntityContainers()) { if (name.equals(container.getName())) { result = container; } } return result; } @Override public List<EntityType> getEntityTypes() { return entityTypes; } @Override public List<ComplexType> getComplexTypes() { return complexTypes; } }
{ "content_hash": "e96d8f0d4a39fbeb00b0c8ebe22f1769", "timestamp": "", "source": "github", "line_count": 119, "max_line_length": 102, "avg_line_length": 27.54621848739496, "alnum_prop": 0.6363636363636364, "repo_name": "sujianping/Office-365-SDK-for-Android", "id": "8f0dec4bbac2c04a50ee629395291f118150e9e5", "size": "3991", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "sdk/office365-mail-calendar-contact-sdk/odata/engine/src/main/java/com/msopentech/odatajclient/engine/data/metadata/edm/v3/Schema.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "2840" }, { "name": "Groovy", "bytes": "7902" }, { "name": "HTML", "bytes": "579880" }, { "name": "Java", "bytes": "2441205" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc (build 1.6.0_33) on Tue Aug 07 12:49:28 EEST 2012 --> <TITLE> Uses of Class org.eclipse.paho.client.mqttv3.internal.security.SSLSocketFactoryFactory </TITLE> <META NAME="date" CONTENT="2012-08-07"> <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.eclipse.paho.client.mqttv3.internal.security.SSLSocketFactoryFactory"; } } </SCRIPT> <NOSCRIPT> </NOSCRIPT> </HEAD> <BODY BGCOLOR="white" onload="windowTitle();"> <HR> <!-- ========= START OF TOP NAVBAR ======= --> <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>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../org/eclipse/paho/client/mqttv3/internal/security/SSLSocketFactoryFactory.html" title="class in org.eclipse.paho.client.mqttv3.internal.security"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../../../index.html?org/eclipse/paho/client/mqttv3/internal/security//class-useSSLSocketFactoryFactory.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="SSLSocketFactoryFactory.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<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> <!-- ========= END OF TOP NAVBAR ========= --> <HR> <CENTER> <H2> <B>Uses of Class<br>org.eclipse.paho.client.mqttv3.internal.security.SSLSocketFactoryFactory</B></H2> </CENTER> No usage of org.eclipse.paho.client.mqttv3.internal.security.SSLSocketFactoryFactory <P> <HR> <!-- ======= START OF BOTTOM NAVBAR ====== --> <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="navbar_bottom_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>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../org/eclipse/paho/client/mqttv3/internal/security/SSLSocketFactoryFactory.html" title="class in org.eclipse.paho.client.mqttv3.internal.security"><FONT CLASS="NavBarFont1"><B>Class</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Use</B></FONT>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> &nbsp;PREV&nbsp; &nbsp;NEXT</FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../../../../index.html?org/eclipse/paho/client/mqttv3/internal/security//class-useSSLSocketFactoryFactory.html" target="_top"><B>FRAMES</B></A> &nbsp; &nbsp;<A HREF="SSLSocketFactoryFactory.html" target="_top"><B>NO FRAMES</B></A> &nbsp; &nbsp;<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> <!-- ======== END OF BOTTOM NAVBAR ======= --> <HR> </BODY> </HTML>
{ "content_hash": "1f68911848e5f64a98a9867a3fb8f208", "timestamp": "", "source": "github", "line_count": 144, "max_line_length": 286, "avg_line_length": 44.56944444444444, "alnum_prop": 0.6160797756310377, "repo_name": "EEXCESS/android-app", "id": "fddf02644a9ffe583d579581fb08fbd6c3cde0c3", "size": "6418", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Frameworks/aware_framework_v2/doc/org/eclipse/paho/client/mqttv3/internal/security/class-use/SSLSocketFactoryFactory.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "1391" }, { "name": "Java", "bytes": "1247025" }, { "name": "Shell", "bytes": "1253" } ], "symlink_target": "" }
i18nUtil = {}; i18nUtil.setup = function(/*Object*/kwArgs){ //summary: loads dojo so we can use it for i18n bundle flattening. //Do the setup only if it has not already been done before. if(typeof djConfig == "undefined" || !(typeof dojo != "undefined" && dojo["i18n"])){ djConfig={ locale: 'xx', extraLocale: kwArgs.localeList, baseUrl: buildScriptsPath + "../../dojo/" }; load(buildScriptsPath + '../../dojo/dojo.js'); //Now set baseUrl so it is current directory, since all the prefixes //will be relative to the release dir from this directory. dojo.baseUrl = "./"; //Also be sure we register the right paths for module prefixes. buildUtil.configPrefixes(kwArgs.profileProperties.dependencies.prefixes); dojo.require("dojo.i18n"); } } i18nUtil.flattenLayerFileBundles = function(/*String*/fileName, /*String*/fileContents, /*Object*/kwArgs){ //summary: // This little utility is invoked by the build to flatten all of the JSON resource bundles used // by dojo.requireLocalization(), much like the main build itself, to optimize so that multiple // web hits will not be necessary to load these resources. Normally, a request for a particular // bundle in a locale like "en-us" would result in three web hits: one looking for en_us/ another // for en/ and another for ROOT/. All of this multiplied by the number of bundles used can result // in a lot of web hits and latency. This script uses Dojo to actually load the resources into // memory, then flatten the object and spit it out using dojo.toJson. The bootstrap // will be modified to download exactly one of these files, whichever is closest to the user's // locale. //fileName: // The name of the file to process (like dojo.js). This function will use // it to determine the best resource name to give the flattened bundle. //fileContents: // The contents of the file to process (like dojo.js). This function will look in // the contents for dojo.requireLocation() calls. //kwArgs: // The build's kwArgs. var destDirName = fileName.replace(/\/[^\/]+$/, "/") + "nls"; var nlsNamePrefix = fileName.replace(/\.js$/, ""); nlsNamePrefix = nlsNamePrefix.substring(nlsNamePrefix.lastIndexOf("/") + 1, nlsNamePrefix.length); i18nUtil.setup(kwArgs); var djLoadedBundles = []; //TODO: register plain function handler (output source) in jsonRegistry? var drl = dojo.requireLocalization; var dupes = {}; dojo.requireLocalization = function(modulename, bundlename, locale){ var dupName = [modulename, bundlename, locale].join(":"); if(!dupes[dupName]){ drl(modulename, bundlename, locale); djLoadedBundles.push({modulename: modulename, module: eval(modulename), bundlename: bundlename}); dupes[dupName] = 1; } }; var requireStatements = fileContents.match(/dojo\.requireLocalization\(.*\)\;/g); if(requireStatements){ eval(requireStatements.join(";")); //print("loaded bundles: "+djLoadedBundles.length); var djBundlesByLocale = {}; var jsLocale, entry, bundle; for (var i = 0; i < djLoadedBundles.length; i++){ entry = djLoadedBundles[i]; bundle = entry.module.nls[entry.bundlename]; for (jsLocale in bundle){ if (!djBundlesByLocale[jsLocale]){djBundlesByLocale[jsLocale]=[];} djBundlesByLocale[jsLocale].push(entry); } } localeList = []; //Save flattened bundles used by dojo.js. var mkdir = false; var dir = new java.io.File(destDirName); var modulePrefix = buildUtil.mapPathToResourceName(fileName, kwArgs.profileProperties.dependencies.prefixes); //Adjust modulePrefix to include the nls part before the last segment. var lastDot = modulePrefix.lastIndexOf("."); if(lastDot != -1){ modulePrefix = modulePrefix.substring(0, lastDot + 1) + "nls." + modulePrefix.substring(lastDot + 1, modulePrefix.length); }else{ throw "Invalid module prefix for flattened bundle: " + modulePrefix; } for (jsLocale in djBundlesByLocale){ var locale = jsLocale.replace(/\_/g, '-'); if(!mkdir){ dir.mkdir(); mkdir = true; } var outFile = new java.io.File(dir, nlsNamePrefix + "_" + locale + ".js"); //Make sure we can create the final file. var parentDir = outFile.getParentFile(); if(!parentDir.exists()){ if(!parentDir.mkdirs()){ throw "Could not create directory: " + parentDir.getAbsolutePath(); } } var os = new java.io.BufferedWriter( new java.io.OutputStreamWriter(new java.io.FileOutputStream(outFile), "utf-8")); try{ os.write("dojo.provide(\""+modulePrefix+"_"+locale+"\");"); for (var j = 0; j < djLoadedBundles.length; j++){ entry = djLoadedBundles[j]; var bundlePkg = [entry.modulename,"nls",entry.bundlename].join("."); var translationPkg = [bundlePkg,jsLocale].join("."); bundle = entry.module.nls[entry.bundlename]; if(bundle[jsLocale]){ //FIXME:redundant check? os.write("dojo.provide(\""+bundlePkg+"\");"); os.write(bundlePkg+"._built=true;"); os.write("dojo.provide(\""+translationPkg+"\");"); os.write(translationPkg+"="+dojo.toJson(bundle[jsLocale])+";"); } } }finally{ os.close(); } localeList.push(locale); } //Remove dojo.requireLocalization calls from the file. fileContents = fileContents.replace(/dojo\.requireLocalization\(.*\)\;/g, ""); var preloadCall = '\ndojo.i18n._preloadLocalizations("' + modulePrefix + '", ' + dojo.toJson(localeList.sort()) + ');\n'; //Inject the dojo._preloadLocalizations call into the file. //Do this at the end of the file, since we need to make sure dojo.i18n has been loaded. //The assumption is that if dojo.i18n is not in this layer file, dojo.i18n is //in one of the layer files this layer file depends on. //Allow call to be inserted in the dojo.js closure, if that is in play. i18nUtil.preloadInsertionRegExp.lastIndex = 0; if(fileContents.match(i18nUtil.preloadInsertionRegExp)){ i18nUtil.preloadInsertionRegExp.lastIndex = 0; fileContents = fileContents.replace(i18nUtil.preloadInsertionRegExp, preloadCall); }else{ fileContents += preloadCall; } } return fileContents; //String } i18nUtil.preloadInsertionRegExp = /\/\/INSERT dojo.i18n._preloadLocalizations HERE/; i18nUtil.flattenDirBundles = function(/*String*/prefixName, /*String*/prefixDir, /*Object*/kwArgs, /*RegExp*/nlsIgnoreRegExp){ //summary: Flattens the i18n bundles inside a directory so that only request //is needed per bundle. Does not handle resource flattening for dojo.js or //layered build files. i18nUtil.setup(kwArgs); var fileList = fileUtil.getFilteredFileList(prefixDir, /\.js$/, true); var prefixes = kwArgs.profileProperties.dependencies.prefixes; for(var i= 0; i < fileList.length; i++){ //Use new String so we get a JS string and not a Java string. var jsFileName = String(fileList[i]); var fileContents = null; //Files in nls directories, except for layer bundles that already have been processed. if(jsFileName.match(/\/nls\//) && !jsFileName.match(nlsIgnoreRegExp)){ fileContents = "(" + i18nUtil.makeFlatBundleContents(prefixName, prefixDir, jsFileName) + ")"; }else{ fileContents = i18nUtil.modifyRequireLocalization(readText(jsFileName), prefixes); } if(fileContents){ fileUtil.saveUtf8File(jsFileName, fileContents); } } } i18nUtil.modifyRequireLocalization = function(/*String*/fileContents, /*Array*/prefixes){ //summary: Modifies any dojo.requireLocalization calls in the fileContents to have the //list of supported locales as part of the call. This allows the i18n loading functions //to only make request(s) for locales that actually exist on disk. var dependencies = []; //Make sure we have a JS string, and not a Java string. fileContents = String(fileContents); var modifiedContents = fileContents; if(fileContents.match(buildUtil.globalRequireLocalizationRegExp)){ modifiedContents = fileContents.replace(buildUtil.globalRequireLocalizationRegExp, function(matchString){ var replacement = matchString; var partMatches = matchString.match(buildUtil.requireLocalizationRegExp); var depCall = partMatches[1]; var depArgs = partMatches[2]; if(depCall == "requireLocalization"){ //Need to find out what locales are available so the dojo loader //only has to do one script request for the closest matching locale. var reqArgs = i18nUtil.getRequireLocalizationArgsFromString(depArgs); if(reqArgs.moduleName){ //Find the list of locales supported by looking at the path names. var locales = i18nUtil.getLocalesForBundle(reqArgs.moduleName, reqArgs.bundleName, prefixes); //Add the supported locales to the requireLocalization arguments. if(!reqArgs.localeName){ depArgs += ", null"; } depArgs += ', "' + locales.join(",") + '"'; replacement = "dojo." + depCall + "(" + depArgs + ")"; } } return replacement; }); } return modifiedContents; } i18nUtil.makeFlatBundleContents = function(prefix, prefixPath, srcFileName){ //summary: Given a nls file name, flatten the bundles from parent locales into the nls bundle. var bundleParts = i18nUtil.getBundlePartsFromFileName(prefix, prefixPath, srcFileName); if(!bundleParts){ return null; } var moduleName = bundleParts.moduleName; var bundleName = bundleParts.bundleName; var localeName = bundleParts.localeName; dojo.requireLocalization(moduleName, bundleName, localeName); //Get the generated, flattened bundle. var module = dojo.getObject(moduleName); var bundleLocale = localeName ? localeName.replace(/-/g, "_") : "ROOT"; var flattenedBundle = module.nls[bundleName][bundleLocale]; if(!flattenedBundle){ throw "Cannot create flattened bundle for src file: " + srcFileName; } return dojo.toJson(flattenedBundle); } //Given a module and bundle name, find all the supported locales. i18nUtil.getLocalesForBundle = function(moduleName, bundleName, prefixes){ //Build a path to the bundle directory and ask for all files that match //the bundle name. var filePath = buildUtil.mapResourceToPath(moduleName, prefixes); var bundleRegExp = new RegExp("nls[/]?([\\w\\-]*)/" + bundleName + ".js$"); var bundleFiles = fileUtil.getFilteredFileList(filePath + "nls/", bundleRegExp, true); //Find the list of locales supported by looking at the path names. var locales = []; for(var j = 0; j < bundleFiles.length; j++){ var bundleParts = bundleFiles[j].match(bundleRegExp); if(bundleParts && bundleParts[1]){ locales.push(bundleParts[1]); }else{ locales.push("ROOT"); } } return locales.sort(); } i18nUtil.getRequireLocalizationArgsFromString = function(argString){ //summary: Given a string of the arguments to a dojo.requireLocalization //call, separate the string into individual arguments. var argResult = { moduleName: null, bundleName: null, localeName: null }; var l10nMatches = argString.split(/\,\s*/); if(l10nMatches && l10nMatches.length > 1){ argResult.moduleName = l10nMatches[0] ? l10nMatches[0].replace(/\"/g, "") : null; argResult.bundleName = l10nMatches[1] ? l10nMatches[1].replace(/\"/g, "") : null; argResult.localeName = l10nMatches[2]; } return argResult; } i18nUtil.getBundlePartsFromFileName = function(prefix, prefixPath, srcFileName){ //Pull off any ../ values from prefix path to make matching easier. var prefixPath = prefixPath.replace(/\.\.\//g, ""); //Strip off the prefix path so we can find the real resource and bundle names. var prefixStartIndex = srcFileName.lastIndexOf(prefixPath); if(prefixStartIndex != -1){ var startIndex = prefixStartIndex + prefixPath.length; //Need to add one if the prefiPath does not include an ending /. Otherwise, //We'll get extra dots in our bundleName. if(prefixPath.charAt(prefixPath.length) != "/"){ startIndex += 1; } srcFileName = srcFileName.substring(startIndex, srcFileName.length); } //var srcIndex = srcFileName.indexOf("src/"); //srcFileName = srcFileName.substring(srcIndex + 4, srcFileName.length); var parts = srcFileName.split("/"); //Split up the srcFileName into arguments that can be used for dojo.requireLocalization() var moduleParts = [prefix]; for(var i = 0; parts[i] != "nls"; i++){ moduleParts.push(parts[i]); } var moduleName = moduleParts.join("."); if(parts[i+1].match(/\.js$/)){ var localeName = ""; var bundleName = parts[i+1]; }else{ var localeName = parts[i+1]; var bundleName = parts[i+2]; } if(!bundleName || bundleName.indexOf(".js") == -1){ //Not a valid bundle. Could be something like a README file. return null; }else{ bundleName = bundleName.replace(/\.js/, ""); } return {moduleName: moduleName, bundleName: bundleName, localeName: localeName}; }
{ "content_hash": "20fbcb5dc4e6845f43f6875e91b2095f", "timestamp": "", "source": "github", "line_count": 334, "max_line_length": 126, "avg_line_length": 38.11377245508982, "alnum_prop": 0.7088766692851531, "repo_name": "henry-gobiernoabierto/geomoose", "id": "a426c7b76db6896d5902959b3c20cd670687b077", "size": "12730", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "htdocs/libs/dojo/util/buildscripts/jslib/i18nUtil.js", "mode": "33261", "license": "mit", "language": [ { "name": "ActionScript", "bytes": "41025" }, { "name": "Batchfile", "bytes": "7467" }, { "name": "C", "bytes": "14284" }, { "name": "CSS", "bytes": "2108805" }, { "name": "Groff", "bytes": "684" }, { "name": "HTML", "bytes": "10442977" }, { "name": "Java", "bytes": "127625" }, { "name": "JavaScript", "bytes": "25771831" }, { "name": "Makefile", "bytes": "2980" }, { "name": "PHP", "bytes": "762912" }, { "name": "Perl", "bytes": "6881" }, { "name": "Python", "bytes": "231993" }, { "name": "Ruby", "bytes": "16321" }, { "name": "Shell", "bytes": "26868" }, { "name": "TeX", "bytes": "13485" }, { "name": "XQuery", "bytes": "798" }, { "name": "XSLT", "bytes": "151867" } ], "symlink_target": "" }
<!doctype html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="description" content="The Electromagnetic Spectrum pervades everything. The sounds in your ears; the words you speak; the cellphone you love to distraction; the radio and TV that blare in the background — even the light from this screen hitting your eyes. Do you understand it? "/> <meta name="author" content="Omphalosskeptic"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="MobileOptimized" content="320"> <meta name="HandheldFriendly" content="True"> <title>emspectrum.info &bull; A Visual Tour of the Electromagnetic Spectrum</title> <link rel="stylesheet" href="css/style.css" media="screen" /> <link rel="stylesheet" href="css/print.css" media="print" /> <link rel="shortcut icon" href="favicon.png" /> <link rel="apple-touch-icon" href="apple-touch-icon.png" /> <link rel="stylesheet" href="//brick.a.ssl.fastly.net/Fira+Sans:300,400,700,300i,400i,700i/Gentium+Basic:400,700,400i,700i"> </head> <body> <div class="container"> <a href="index.html" class="unstyled-anchor"> <img class="logo" src="img/logo.png" width="120px;" alt="" /><br> </a> <h2 style="line-height:2.1;font-weight:700;" class="giga">You’re awesome.</h2> <p class="beta" > You’ll be the first to get access to the site! </p> <p> We’ll let you know as soon as it’s ready — tell your friends and we’ll work faster as fast as we can! </p> <Br> <footer > <em>Built with</em> ☕ by <em><a href="http://omphalosskeptic.github.io">@omphalosskeptic</a></em> </footer><br> </div> </body> </html>
{ "content_hash": "fb0dae9e9da090fd733ebcd538c00dc5", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 295, "avg_line_length": 35.170212765957444, "alnum_prop": 0.677555958862674, "repo_name": "curiositry/emspectrum.info", "id": "f42a917f41e6ff91eed3d48bb1a46257e685845a", "size": "1669", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "thanks.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "13863" } ], "symlink_target": "" }
// Licensed to the .NET Foundation under one or more agreements. // The .NET Foundation licenses this file to you under the MIT license. // See the LICENSE file in the project root for more information. using System.Collections.Generic; using Cake.Common.Tools.DotCover.Merge; using Cake.Core.IO; namespace Cake.Common.Tests.Fixtures.Tools.DotCover.Merge { internal sealed class DotCoverMergerFixture : DotCoverFixture<DotCoverMergeSettings> { public IEnumerable<FilePath> SourceFiles { get; set; } public FilePath OutputFile { get; set; } public DotCoverMergerFixture() { // Set the source files. SourceFiles = new[] { new FilePath("./result1.dcvr"), new FilePath("./result2.dcvr"), }; // Setup the output file. OutputFile = new FilePath("./result.dcvr"); } protected override void RunTool() { var tool = new DotCoverMerger(FileSystem, Environment, ProcessRunner, Tools); tool.Merge(SourceFiles, OutputFile, Settings); } } }
{ "content_hash": "42039a444520609fea27a7f8cf3475b1", "timestamp": "", "source": "github", "line_count": 35, "max_line_length": 89, "avg_line_length": 32.42857142857143, "alnum_prop": 0.626431718061674, "repo_name": "robgha01/cake", "id": "8054a9c9b3d010d3467e8ba29483c73768cf2a8d", "size": "1137", "binary": false, "copies": "17", "ref": "refs/heads/develop", "path": "src/Cake.Common.Tests/Fixtures/Tools/DotCover/Merge/DotCoverMergerFixture.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "6244576" }, { "name": "PowerShell", "bytes": "6547" }, { "name": "Shell", "bytes": "3287" } ], "symlink_target": "" }
// // Shaders.h // FreeFlight // // Created by Frédéric D'HAEYER on 24/10/11. // Copyright 2011 PARROT. All rights reserved. // #ifndef _OPENGL_SHADER_H_ #define _OPENGL_SHADER_H_ #include <OpenGLES/ES2/gl.h> #include <OpenGLES/ES2/glext.h> // #define DEBUG_SHADER /* Shader Utilities */ GLint opengl_shader_compile(GLuint *shader, GLenum type, GLsizei count, const char *content_file); GLint opengl_shader_link(GLuint prog); GLint opengl_shader_validate(GLuint prog); void opengl_shader_destroy(GLuint vertShader, GLuint fragShader, GLuint prog); #endif // _OPENGL_SHADER_H_
{ "content_hash": "5ad2e82261f59e566d79d90ebfabb79e", "timestamp": "", "source": "github", "line_count": 21, "max_line_length": 98, "avg_line_length": 27.80952380952381, "alnum_prop": 0.7328767123287672, "repo_name": "ffriedl/csc-at-hackathon", "id": "4be3ead10c90a37da0dfcec969a47febee47442b", "size": "586", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Drohne/SDK/ARDrone_SDK_2_0_1/ARDrone_SDK_2_0_1/Examples/iPhone/FreeFlight/Classes/Video/opengl_shader.h", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Assembly", "bytes": "27910" }, { "name": "C", "bytes": "3058009" }, { "name": "C#", "bytes": "34860" }, { "name": "C++", "bytes": "454697" }, { "name": "CSS", "bytes": "9835" }, { "name": "HTML", "bytes": "254961" }, { "name": "Java", "bytes": "625314" }, { "name": "JavaScript", "bytes": "5059" }, { "name": "Makefile", "bytes": "47997" }, { "name": "Objective-C", "bytes": "2557018" }, { "name": "Python", "bytes": "252" }, { "name": "Shell", "bytes": "23437" } ], "symlink_target": "" }
package io.libraft.agent.configuration; import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.ObjectCodec; import com.fasterxml.jackson.databind.DeserializationContext; import com.fasterxml.jackson.databind.JsonDeserializer; import com.fasterxml.jackson.databind.JsonMappingException; import com.fasterxml.jackson.databind.JsonNode; import com.fasterxml.jackson.databind.JsonSerializer; import com.fasterxml.jackson.databind.SerializerProvider; import com.google.common.net.HostAndPort; import io.libraft.agent.RaftMember; import java.io.IOException; import java.net.InetSocketAddress; import static com.google.common.base.Preconditions.checkNotNull; /** * Provides Jackson {@link JsonSerializer} and {@link JsonDeserializer} * implementations that convert a {@link RaftMember} to/from its JSON representation. */ public abstract class RaftMemberConverter { /** * JSON property that contains the {@link RaftMember#getId()} value. */ public static final String MEMBER_ID_FIELD = "id"; /** * JSON property that contains the {@link RaftMember#getAddress()} value. */ public static final String MEMBER_ENDPOINT_FIELD = "endpoint"; private RaftMemberConverter() { } // to prevent instantiation /** * {@code JsonSerializer} implementation that converts a {@link RaftMember} * instance into its corresponding JSON representation. */ public static final class Serializer extends JsonSerializer<RaftMember> { /** * {@inheritDoc} * <p/> * The {@link RaftMember#getAddress()} call to {@code raftMember} * <strong>must</strong> return an instance of {@link InetSocketAddress}. * All other address forms are <strong>unsupported</strong>. */ @SuppressWarnings("DuplicateThrows") @Override public void serialize(RaftMember raftMember, JsonGenerator generator, SerializerProvider provider) throws IOException, JsonProcessingException { generator.writeStartObject(); // id provider.defaultSerializeField(MEMBER_ID_FIELD, raftMember.getId(), generator); // address (we only support InetSocketAddress) InetSocketAddress listenAddress = (InetSocketAddress) raftMember.getAddress(); provider.defaultSerializeField(MEMBER_ENDPOINT_FIELD, String.format("%s:%d", listenAddress.getHostName(), listenAddress.getPort()), generator); generator.writeEndObject(); } } /** * {@code JsonDeserializer} implementation that converts a JSON object * into a corresponding {@link RaftMember} instance. */ public static final class Deserializer extends JsonDeserializer<RaftMember> { @SuppressWarnings("DuplicateThrows") @Override public RaftMember deserialize(JsonParser parser, DeserializationContext context) throws IOException, JsonProcessingException { ObjectCodec objectCodec = parser.getCodec(); JsonNode memberNode = objectCodec.readTree(parser); JsonNode node; try { node = memberNode.get(MEMBER_ID_FIELD); node = checkNotNull(node, "%s field missing", MEMBER_ID_FIELD); String id = node.textValue(); node = memberNode.get(MEMBER_ENDPOINT_FIELD); node = checkNotNull(node, "%s field missing", MEMBER_ENDPOINT_FIELD); String endpoint = node.textValue(); HostAndPort raftHostAndPort = Endpoints.getValidHostAndPortFromString(endpoint); return new RaftMember(id, InetSocketAddress.createUnresolved(raftHostAndPort.getHostText(), raftHostAndPort.getPort())); } catch (Exception e) { throw new JsonMappingException("invalid configuration", e); } } } }
{ "content_hash": "5848dda672fc8d77b74c1324e09e9921", "timestamp": "", "source": "github", "line_count": 99, "max_line_length": 155, "avg_line_length": 40.323232323232325, "alnum_prop": 0.6936372745490982, "repo_name": "allengeorge/libraft", "id": "71643e7ce597f98e7a2bcf5eb4effdacbe7db6ae", "size": "5623", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "libraft-agent/src/main/java/io/libraft/agent/configuration/RaftMemberConverter.java", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Groovy", "bytes": "19457" }, { "name": "Java", "bytes": "1347592" }, { "name": "Shell", "bytes": "8008" } ], "symlink_target": "" }
<?php /* @var string $actionLabel */ /* @var $model */ use yii\bootstrap\ActiveForm; $form = ActiveForm::begin([ 'layout' => 'horizontal' ]); ?> <?= $form->field($model, 'first_name') ?> <?= $form->field($model, 'last_name') ?> <div class="clearfix form-actions"> <div class="col-md-offset-3 col-md-9"> <?= \yii\bootstrap\Html::submitButton('Применить', ['class' => 'btn btn-success']) ?> </div> </div> <?php ActiveForm::end() ?>
{ "content_hash": "46730909f048cd7ff590aed150439097", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 97, "avg_line_length": 20.695652173913043, "alnum_prop": 0.5588235294117647, "repo_name": "lebeddima/library", "id": "aac289e97d74e9b7489049355a0734553defc8f7", "size": "485", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "backend/views/author/_form.php", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Batchfile", "bytes": "1541" }, { "name": "CSS", "bytes": "2728" }, { "name": "JavaScript", "bytes": "313010" }, { "name": "PHP", "bytes": "139648" } ], "symlink_target": "" }
export let readyResolve: (value?: unknown) => void; /** this promise is resolved when the initial big load of DIM API data is completed */ export const settingsReady = new Promise((resolve) => (readyResolve = resolve));
{ "content_hash": "7e6a94a851c8e717dbf1fcb1f8934748", "timestamp": "", "source": "github", "line_count": 3, "max_line_length": 86, "avg_line_length": 73.33333333333333, "alnum_prop": 0.7363636363636363, "repo_name": "DestinyItemManager/DIM", "id": "dc77da1e55e019d88d63bb6f8ac3591c6529b063", "size": "220", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/app/settings/settings.ts", "mode": "33188", "license": "mit", "language": [ { "name": "Dockerfile", "bytes": "361" }, { "name": "HTML", "bytes": "4081" }, { "name": "JavaScript", "bytes": "42997" }, { "name": "SCSS", "bytes": "229517" }, { "name": "Shell", "bytes": "2277" }, { "name": "TypeScript", "bytes": "2941689" } ], "symlink_target": "" }
using System.Threading.Tasks; using Wilcommerce.Auth.Models; namespace Wilcommerce.Auth.Services.Interfaces { /// <summary> /// Represents the token generator interface /// </summary> public interface ITokenGenerator { /// <summary> /// Generate an email confirmation token string for the specified user /// </summary> /// <param name="user">The current user</param> /// <returns>The token string</returns> Task<string> GenerateEmailConfirmationTokenForUser(User user); /// <summary> /// Generate a password recovery token string for the specified user /// </summary> /// <param name="user">The current user</param> /// <returns>The token string</returns> Task<string> GeneratePasswordRecoveryTokenForUser(User user); } }
{ "content_hash": "0de91e8707402a92c1eb3199fe77471b", "timestamp": "", "source": "github", "line_count": 25, "max_line_length": 78, "avg_line_length": 33.8, "alnum_prop": 0.6414201183431952, "repo_name": "wilcommerce/Wilcommerce.Auth", "id": "f155c76648b79f5082629c529ff0fc41d60cd558", "size": "847", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "src/Wilcommerce.Auth/Services/Interfaces/ITokenGenerator.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "107317" } ], "symlink_target": "" }
#include "list.h" /* * Allocate a new list_iterator_t. NULL on failure. * Accepts a direction, which may be LIST_HEAD or LIST_TAIL. */ list_iterator_t * list_iterator_new(list_t *list, list_direction_t direction) { list_node_t *node = direction == LIST_HEAD ? list->head : list->tail; return list_iterator_new_from_node(node, direction); } /* * Allocate a new list_iterator_t with the given start * node. NULL on failure. */ list_iterator_t * list_iterator_new_from_node(list_node_t *node, list_direction_t direction) { list_iterator_t *self; if (!(self = LIST_MALLOC(sizeof(list_iterator_t)))) return NULL; self->next = node; self->direction = direction; return self; } /* * Return the next list_node_t or NULL when no more * nodes remain in the list. */ list_node_t * list_iterator_next(list_iterator_t *self) { list_node_t *curr = self->next; if (curr) { self->next = self->direction == LIST_HEAD ? curr->next : curr->prev; } return curr; } /* * Free the list iterator. */ void list_iterator_destroy(list_iterator_t *self) { LIST_FREE(self); self = NULL; }
{ "content_hash": "30a92775f1736b06d1f98a4649147692", "timestamp": "", "source": "github", "line_count": 55, "max_line_length": 76, "avg_line_length": 20.6, "alnum_prop": 0.6540158870255958, "repo_name": "gnomex/C-Syllabus", "id": "5d8c42d267d5b71602738d1d03ce4265273f6e4b", "size": "1133", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "FAA/buffer-lru/src/list_iterator.c", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "146651" }, { "name": "Makefile", "bytes": "24232" } ], "symlink_target": "" }
using System.Data.Entity; namespace Galen.EntityFramework.Sharding { public abstract class ShardKeyMapperBase<TType> { public abstract bool KeyMapsToShard(TType key, DbContext context); } }
{ "content_hash": "a0186263fb641f5e29bf745e81c38a00", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 74, "avg_line_length": 23.333333333333332, "alnum_prop": 0.7428571428571429, "repo_name": "GalenHealthcare/Galen.Ef.Deployer", "id": "aa54d9f799892afb45431fe0382c6969dd4c1321", "size": "210", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Examples/CodeCamp2015.Sharded/Galen.EntityFramework.Sharding/ShardKeyMapperBase.cs", "mode": "33188", "license": "mit", "language": [ { "name": "C#", "bytes": "540498" }, { "name": "PowerShell", "bytes": "950" } ], "symlink_target": "" }
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <!-- NewPage --> <html lang="en"> <head> <!-- Generated by javadoc (version 1.7.0_55) on Fri Jun 20 06:34:21 EDT 2014 --> <meta http-equiv="Content-Type" content="text/html" charset="utf-8"> <title>Uses of Class org.apache.solr.rest.schema.SchemaVersionResource (Solr 4.9.0 API)</title> <meta name="date" content="2014-06-20"> <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.apache.solr.rest.schema.SchemaVersionResource (Solr 4.9.0 API)"; } //--> </script> <noscript> <div>JavaScript is disabled on your browser.</div> </noscript> <!-- ========= START OF TOP NAVBAR ======= --> <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/apache/solr/rest/schema/SchemaVersionResource.html" title="class in org.apache.solr.rest.schema">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="../../../../../../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/apache/solr/rest/schema/class-use/SchemaVersionResource.html" target="_top">Frames</a></li> <li><a href="SchemaVersionResource.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_top"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_top"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_top"> <!-- --> </a></div> <!-- ========= END OF TOP NAVBAR ========= --> <div class="header"> <h2 title="Uses of Class org.apache.solr.rest.schema.SchemaVersionResource" class="title">Uses of Class<br>org.apache.solr.rest.schema.SchemaVersionResource</h2> </div> <div class="classUseContainer">No usage of org.apache.solr.rest.schema.SchemaVersionResource</div> <!-- ======= START OF BOTTOM NAVBAR ====== --> <div class="bottomNav"><a name="navbar_bottom"> <!-- --> </a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><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/apache/solr/rest/schema/SchemaVersionResource.html" title="class in org.apache.solr.rest.schema">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="../../../../../../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/apache/solr/rest/schema/class-use/SchemaVersionResource.html" target="_top">Frames</a></li> <li><a href="SchemaVersionResource.html" target="_top">No Frames</a></li> </ul> <ul class="navList" id="allclasses_navbar_bottom"> <li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li> </ul> <div> <script type="text/javascript"><!-- allClassesLink = document.getElementById("allclasses_navbar_bottom"); if(window==top) { allClassesLink.style.display = "block"; } else { allClassesLink.style.display = "none"; } //--> </script> </div> <a name="skip-navbar_bottom"> <!-- --> </a></div> <!-- ======== END OF BOTTOM NAVBAR ======= --> <p class="legalCopy"><small> <i>Copyright &copy; 2000-2014 Apache Software Foundation. All Rights Reserved.</i> <script src='../../../../../../prettify.js' type='text/javascript'></script> <script type='text/javascript'> (function(){ var oldonload = window.onload; if (typeof oldonload != 'function') { window.onload = prettyPrint; } else { window.onload = function() { oldonload(); prettyPrint(); } } })(); </script> </small></p> </body> </html>
{ "content_hash": "6d53722e933d90c2d466c65e3e3b6e23", "timestamp": "", "source": "github", "line_count": 131, "max_line_length": 161, "avg_line_length": 37.64885496183206, "alnum_prop": 0.5985401459854015, "repo_name": "BibAlex/bhl_rails_4_solr", "id": "91c5c251d3f518b9226357ee5a61c64246d60aeb", "size": "4932", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "docs/solr-core/org/apache/solr/rest/schema/class-use/SchemaVersionResource.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Batchfile", "bytes": "366" }, { "name": "CSS", "bytes": "129178" }, { "name": "Groff", "bytes": "37749589" }, { "name": "HTML", "bytes": "87581" }, { "name": "JavaScript", "bytes": "1040511" }, { "name": "Shell", "bytes": "8670" }, { "name": "XSLT", "bytes": "149538" } ], "symlink_target": "" }
@echo off REM ************Compact Framework. RELEASE to Bin\Release\CF\Excel.dll************ REM ********************************************************************** SET CSC=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\csc.exe /nologo SET SC_PATH=%cd% REM **CLEAN RD /S /Q %SC_PATH%\Bin\Release\CF\ MKDIR %SC_PATH%\Bin\Release\CF\ set NETCF_PATH=C:\Program Files\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE if DEFINED REF ( set REF= ) set REF=%REF% "/r:%NETCF_PATH%\MsCorlib.dll" set REF=%REF% "/r:%NETCF_PATH%\System.dll" set REF=%REF% "/r:%NETCF_PATH%\System.Data.dll" set REF=%REF% "/r:%NETCF_PATH%\System.Xml.dll" set REF=%REF% /r:"%SC_PATH%\..\Lib\cf\ICSharpCode.SharpZipLib.dll" @echo on %CSC% /define:CF_RELEASE /nologo -nostdlib -noconfig /o /out:"%SC_PATH%\Bin\Release\CF\Excel.dll" /target:library %REF% /recurse:*.cs
{ "content_hash": "27810d05921ebceb52f70a0eec91ba1f", "timestamp": "", "source": "github", "line_count": 26, "max_line_length": 133, "avg_line_length": 32.5, "alnum_prop": 0.6284023668639053, "repo_name": "yyitsz/myjavastudio", "id": "6011e5f1482c9266924fdd5b805a2ce7fb2abcf8", "size": "845", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "RecourceConverter/ExcelReader/Build.Release.CF.bat", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ASP", "bytes": "29361" }, { "name": "Batchfile", "bytes": "5917" }, { "name": "C#", "bytes": "1904272" }, { "name": "CSS", "bytes": "206344" }, { "name": "HTML", "bytes": "53455" }, { "name": "Java", "bytes": "3185115" }, { "name": "JavaScript", "bytes": "654297" }, { "name": "PLSQL", "bytes": "10155" }, { "name": "Roff", "bytes": "178" }, { "name": "Shell", "bytes": "418" }, { "name": "XSLT", "bytes": "12347" } ], "symlink_target": "" }
package sgdi.pr3.grupo03.situacion1; import java.util.ArrayList; import sgdi.pr3.grupo03.shared.MongoUtil; import sgdi.pr3.grupo03.situacion1.model.*; public class TestData { public static void execute() { try { insertFilms(); insertSeries(); MongoUtil.close(); System.out.println("OK"); } catch (Exception ex) { System.err.println(ex); } } private static final int MAX = 10; private static void insertFilms() { Valuation vb = new Valuation(); vb.title = "Valoración "; vb.punctuation = 0; vb.explanation = "Comentario "; Film fb = new Film(); fb.title = "Película "; fb.releaseYear = 0; fb.directors = new ArrayList<>(); fb.directors.add("Director A"); fb.directors.add("Director B"); fb.countriesWhereFilmed = new ArrayList<>(); fb.countriesWhereFilmed.add("D"); fb.countriesWhereFilmed.add("E"); fb.actors = new ArrayList<>(); ActorWithCharacter[] actors = new ActorWithCharacter[2]; actors[0] = new ActorWithCharacter(); actors[0].actor = "Actor A"; actors[0].character = "Personaje A"; actors[1] = new ActorWithCharacter(); actors[1].actor = "Actor B"; actors[1].character = "Personaje B"; for (ActorWithCharacter actor : actors) { fb.actors.add(actor); } fb.synopsis = "Sinopsis "; fb.writers = new ArrayList<>(); fb.writers.add("Escritor A"); fb.writers.add("Escritor B"); for (int i = 0; i < MAX; i++) { int l = i % 5; Film fvictim = new Film(); fvictim.title = fb.title + i; fvictim.releaseYear = fb.releaseYear + i; fvictim.directors = new ArrayList<>(); for (String director : fb.directors) { fvictim.directors.add(director + l); } fvictim.countriesWhereFilmed = new ArrayList<>(); for (String countriesWhereFilmed : fb.countriesWhereFilmed) { fvictim.countriesWhereFilmed.add(countriesWhereFilmed + l); } fvictim.actors = new ArrayList<>(); for (ActorWithCharacter actor : actors) { ActorWithCharacter avictim = new ActorWithCharacter(); avictim.actor = actor.actor + l; avictim.character = actor.character + l; fvictim.actors.add(avictim); } fvictim.synopsis = fb.synopsis + i; fvictim.writers = new ArrayList<>(); for (String writer : fb.writers) { fvictim.writers.add(writer + l); } DBHelper.insertFilm(fvictim); String title = fb.title + i; Valuation vvictim = new Valuation(); fvictim = DBHelper.getFilmByTitle(title); vvictim.idRef = fvictim._id; vvictim.title = vb.title + title; vvictim.punctuation = vb.punctuation + i; vvictim.explanation = vb.explanation + title; DBHelper.insertValuation(vvictim); } } private static void insertSeries() { Valuation vb = new Valuation(); vb.title = "Valoración "; vb.punctuation = 0; vb.explanation = "Comentario "; Series s1b = new Series(); s1b.title = "Serie "; s1b.releaseYear = 0; s1b.synopsis = "Sinopsis "; Season s2b = new Season(); s2b.synopsis = "Sinopsis "; s2b.releaseYear = 0; Episode eb = new Episode(); eb.title = "Episodio "; eb.synopsis = "Sinopsis "; eb.releaseDate = new Date(); eb.releaseDate.day = 1; eb.releaseDate.month = 1; eb.releaseDate.year = 0; eb.actors = new ArrayList<>(); ActorWithCharacter[] actors = new ActorWithCharacter[2]; actors[0] = new ActorWithCharacter(); actors[0].actor = "Actor A"; actors[0].character = "Personaje A"; actors[1] = new ActorWithCharacter(); actors[1].actor = "Actor B"; actors[1].character = "Personaje B"; for (ActorWithCharacter actor : actors) { eb.actors.add(actor); } eb.writers = new ArrayList<>(); eb.writers.add("Escritor A"); eb.writers.add("Escritor B"); eb.directors = new ArrayList<>(); eb.directors.add("Director A"); eb.directors.add("Director B"); for (int i = 0; i < MAX; i++) { Valuation vvictim; String title = s1b.title + i; Series s1victim = new Series(); s1victim.title = title; s1victim.releaseYear = s1b.releaseYear + i; s1victim.synopsis = s1b.synopsis + i; DBHelper.insertSeries(s1victim); vvictim = new Valuation(); s1victim = DBHelper.getOneSeriesByTitle(title); vvictim.idRef = s1victim._id; vvictim.title = vb.title + title; vvictim.punctuation = vb.punctuation + i; vvictim.explanation = vb.explanation + title; DBHelper.insertValuation(vvictim); for (int j = 0; j < MAX; j++) { Season s2victim = new Season(); s2victim.seriesIdRef = s1victim._id; s2victim.synopsis = s1victim.title + " " + s2b.synopsis + j; s2victim.releaseYear = j; DBHelper.insertSeason(s2victim); String title2 = title + " T" + s2victim.releaseYear; vvictim = new Valuation(); s2victim = DBHelper.getSeasonByYear(title, s2victim.releaseYear); vvictim.idRef = s2victim._id; vvictim.title = vb.title + title2; vvictim.punctuation = vb.punctuation + j; vvictim.explanation = vb.explanation + title2; DBHelper.insertValuation(vvictim); for (int k = 0; k < MAX; k++) { int l = k % 5; String title3 = title2 + "E" + k; Episode evictim = new Episode(); evictim.seasonIdRef = s2victim._id; evictim.title = title3; evictim.synopsis = eb.synopsis + k; evictim.releaseDate = new Date(); evictim.releaseDate.day = eb.releaseDate.day; evictim.releaseDate.month = eb.releaseDate.month + k; evictim.releaseDate.year = eb.releaseDate.year + j; evictim.actors = new ArrayList<>(); for (ActorWithCharacter actor : actors) { ActorWithCharacter avictim = new ActorWithCharacter(); avictim.actor = actor.actor + l; avictim.character = actor.character + l; evictim.actors.add(avictim); } evictim.writers = new ArrayList<>(); for (String writer : eb.writers) { evictim.writers.add(writer + l); } evictim.directors = new ArrayList<>(); for (String director : eb.directors) { evictim.directors.add(director + l); } DBHelper.insertEpisode(evictim); vvictim = new Valuation(); evictim = DBHelper.getEpisodeByTitle(s1victim.title, s2victim.releaseYear, evictim.title); vvictim.idRef = evictim._id; vvictim.title = vb.title + title3; vvictim.punctuation = vb.punctuation + k; vvictim.explanation = vb.explanation + title3; DBHelper.insertValuation(vvictim); } } } } }
{ "content_hash": "877470fcb4cb176ba213115a3607758e", "timestamp": "", "source": "github", "line_count": 205, "max_line_length": 81, "avg_line_length": 39.170731707317074, "alnum_prop": 0.5212951432129515, "repo_name": "gorkinovich/SGDI", "id": "4d32eddab2b2e14afcdfb2ac336c18ed4e71ed0e", "size": "8439", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "MongoDB/src/sgdi/pr3/grupo03/situacion1/TestData.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "354474" }, { "name": "Python", "bytes": "18377" }, { "name": "Scala", "bytes": "4990" } ], "symlink_target": "" }
/* eslint no-console: 1 */ console.warn('You are using the default filter for the unitsTypes service. For more information about event filters see https://docs.feathersjs.com/api/events.html#event-filtering'); // eslint-disable-line no-console module.exports = function (data, connection, hook) { // eslint-disable-line no-unused-vars return data; };
{ "content_hash": "abd08b009b9252fe5f07f25ece0fd053", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 216, "avg_line_length": 59, "alnum_prop": 0.7570621468926554, "repo_name": "YeFFreY/bernard", "id": "93e753a976efac9f32d5ed81c28ee76eb6f47294", "size": "354", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "server/src/services/units-types/units-types.filters.js", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "352" }, { "name": "HTML", "bytes": "12510" }, { "name": "JavaScript", "bytes": "98161" } ], "symlink_target": "" }
package com.deleidos.rtws.commons.monitor.process; import com.deleidos.rtws.commons.monitor.core.ProcessMonitor; import com.deleidos.rtws.commons.net.listener.exception.ServerException; import com.deleidos.rtws.commons.net.listener.process.HiveProcess; public class HiveServerMonitor extends ProcessMonitor { // HiveProcess is a class provided in the CommandListener which determines // if the hive server software is installed and if it is currently running // or not HiveProcess hiveProcess = HiveProcess.newInstance(); public HiveServerMonitor(String name) { super(name); /* * Give the process 3 minutes to start and * only monitor at 2 minute intervals */ setStartupPeriod(1000 * 60 * 3); setMonitorInterval(1000 * 60 * 2); } @Override protected void monitor() { try { switch (hiveProcess.getStatus()) { case Running: setStatus(MonitorStatus.OK); break; case Stopped: addError("Hive server is not running."); hiveProcess.start(); break; case Unknown: default: addError("Hive server status is currently unknown."); break; } } catch (ServerException e) { addError(e.getMessage()); } } }
{ "content_hash": "22fe67782f1ff9d359000db4af085aaa", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 75, "avg_line_length": 25.06382978723404, "alnum_prop": 0.7215619694397284, "repo_name": "deleidos/digitaledge-platform", "id": "fda49d205278dc5b3eaae36bec309cbb12cb2c67", "size": "13113", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "commons-core/src/main/java/com/deleidos/rtws/commons/monitor/process/HiveServerMonitor.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ActionScript", "bytes": "16315580" }, { "name": "Batchfile", "bytes": "15678" }, { "name": "C", "bytes": "26042" }, { "name": "CSS", "bytes": "846559" }, { "name": "Groovy", "bytes": "93743" }, { "name": "HTML", "bytes": "36583222" }, { "name": "Java", "bytes": "33127586" }, { "name": "JavaScript", "bytes": "2030589" }, { "name": "Nginx", "bytes": "3934" }, { "name": "Perl", "bytes": "330290" }, { "name": "Python", "bytes": "54288" }, { "name": "Ruby", "bytes": "5133" }, { "name": "Shell", "bytes": "2482631" }, { "name": "XSLT", "bytes": "978664" } ], "symlink_target": "" }
PRAGMA cache_size = 10; BEGIN; INSERT INTO t1 SELECT blob(900) FROM t1; -- 32 SELECT count(*) FROM t1;
{ "content_hash": "5ab67779781807e9f70992af27299fbe", "timestamp": "", "source": "github", "line_count": 4, "max_line_length": 48, "avg_line_length": 26, "alnum_prop": 0.6923076923076923, "repo_name": "bkiers/sqlite-parser", "id": "53c551df1d023621676e13d1ceb49586641c6d2c", "size": "275", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/test/resources/wal.test_92.sql", "mode": "33188", "license": "mit", "language": [ { "name": "ANTLR", "bytes": "20112" }, { "name": "Java", "bytes": "6273" }, { "name": "PLpgSQL", "bytes": "324108" } ], "symlink_target": "" }
package nl.tno.idsa.library.relations.action_requires_location; import nl.tno.idsa.framework.semantics_impl.relations.LocationEnablesAction; import nl.tno.idsa.library.actions.StreetTheft; import nl.tno.idsa.library.locations.Outside; /** * Created by jongsd on 20-8-15. */ // TODO Add ignore unused. Document the class. public class StreetTheftIsOutside extends LocationEnablesAction { public StreetTheftIsOutside() { super(Outside.class, StreetTheft.class); } }
{ "content_hash": "1427bbaf2775b0682a4aef0dfe3a220b", "timestamp": "", "source": "github", "line_count": 15, "max_line_length": 76, "avg_line_length": 32.266666666666666, "alnum_prop": 0.7727272727272727, "repo_name": "TNOCS/idsa", "id": "07ceecd97e641eef993280627c2c39952451b33f", "size": "484", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "project/idsa/src/main/java/nl/tno/idsa/library/relations/action_requires_location/StreetTheftIsOutside.java", "mode": "33188", "license": "mit", "language": [ { "name": "Java", "bytes": "767957" } ], "symlink_target": "" }
<?xml version="1.0" encoding="utf-8"?> <LinearLayout ="horizontal" ="@id/background" ="@drawable/top_bar_tab_button_left" ="fill_parent" ="fill_parent" ="1.0" xmlns:android="http://schemas.android.com/apk/res/android"> <com.quizup.lib.widgets.textViews.GothamTextViewTranslated ="@color/black" ="center" ="@id/left_label" ="0.0dip" ="fill_parent" ="0.5" style="@style/top_bar_toggle_label" /> <com.quizup.lib.widgets.textViews.GothamTextViewTranslated ="@color/white" ="center" ="@id/right_label" ="0.0dip" ="fill_parent" ="0.5" style="@style/top_bar_toggle_label" /> </LinearLayout>
{ "content_hash": "84ba591fab976496473aa490a1e3b298", "timestamp": "", "source": "github", "line_count": 6, "max_line_length": 178, "avg_line_length": 98.83333333333333, "alnum_prop": 0.6947723440134908, "repo_name": "mmmsplay10/QuizUpWinner", "id": "a717431f3765d7dac425068e80ae51291022afad", "size": "593", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "com.quizup.core/res/layout/widget_top_bar_toggle_button.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "6075" }, { "name": "Java", "bytes": "23608889" }, { "name": "JavaScript", "bytes": "6345" }, { "name": "Python", "bytes": "933916" } ], "symlink_target": "" }
const userService = require('../../service/user') const nodeService = require('../../service/node') const trafficService = require('../../service/traffic') const MIN_FLOW = 1024 module.exports = async (ctx) => { let { nodeId } = ctx.params let { body } = ctx.request await nodeService.updateActivedAtAsync(nodeId) for (let item of body) { if (item.flowUp < MIN_FLOW && item.flowDown < MIN_FLOW) { continue } await userService.updateTrafficAsync(item.userId, item.flowUp, item.flowDown) await trafficService.createAsync(Object.assign({ nodeId }, item)) } ctx.body = { success: true } }
{ "content_hash": "e70a346863cc10501f08a42f04dc5441", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 81, "avg_line_length": 31.1, "alnum_prop": 0.6752411575562701, "repo_name": "qious/ss-panel", "id": "c01e02d7ab87a098cd33d4cd17ecd34d7eae0202", "size": "622", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/api/nodes/traffic.js", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "414" }, { "name": "JavaScript", "bytes": "131763" }, { "name": "Vue", "bytes": "69844" } ], "symlink_target": "" }
using ImitationLib.Elements; using ImitationLib.Utils; namespace ImitationLib { public class Program { public static void Main(string[] args) { Logger.InitLogger(); Entrance entrance = new Entrance(5, 4); Service service = new Service(12, 1); Service service2 = new Service(2, 1); Service service3 = new Service(8, 1); Exit exit = new Exit(0); Model model = new Model(); model.LinkElements(entrance, exit, service, service2, service3); model.Run(); } } }
{ "content_hash": "bb317fafca242ac149dae96a841cb45a", "timestamp": "", "source": "github", "line_count": 23, "max_line_length": 67, "avg_line_length": 21.52173913043478, "alnum_prop": 0.6787878787878788, "repo_name": "slawiko/ImitationLib", "id": "889b2de153282037d257bf42c7e1c40b662c6a6c", "size": "497", "binary": false, "copies": "1", "ref": "refs/heads/develop", "path": "ImitationLib/Program.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C#", "bytes": "17009" } ], "symlink_target": "" }
package org.deviceconnect.android.deviceplugin.irkit.profile; import android.content.Intent; import org.deviceconnect.android.deviceplugin.irkit.IRKitDeviceService; import org.deviceconnect.android.deviceplugin.irkit.data.IRKitDBHelper; import org.deviceconnect.android.deviceplugin.irkit.data.VirtualProfileData; import org.deviceconnect.android.message.MessageUtils; import org.deviceconnect.android.profile.DConnectProfile; import java.util.List; /** * TVプロファイル. * @author NTT DOCOMO, INC. */ public class IRKitTVProfile extends DConnectProfile { /** * プロファイル名: {@value}. */ public static final String PROFILE_NAME = "tv"; /** * 属性: {@value}. */ public static final String ATTRIBUTE_CHANNEL = "channel"; /** * 属性: {@value}. */ public static final String ATTRIBUTE_VOLUME = "volume"; /** * 属性: {@value}. */ public static final String ATTRIBUTE_BROADCASTWAVE = "broadcastwave"; /** * 属性: {@value}. */ public static final String ATTRIBUTE_MUTE = "mute"; /** * 属性: {@value}. */ public static final String ATTRIBUTE_ENLPROPERTY = "enlproperty"; /** * パラメータ: {@value}. */ public static final String PARAM_TVID = "tvId"; /** * パラメータ: {@value}. */ public static final String PARAM_CONTROL = "control"; /** * パラメータ: {@value}. */ public static final String PARAM_TUNING = "tuning"; /** * パラメータ: {@value}. */ public static final String PARAM_SELECT = "select"; /** * パラメータ: {@value}. */ public static final String PARAM_EPC = "epc"; /** * パラメータ: {@value}. */ public static final String PARAM_VALUE = "value"; /** * パラメータ: {@value}. */ public static final String PARAM_POWERSTATUS = "powerstatus"; /** * パラメータ: {@value}. */ public static final String PARAM_PROPERTIES = "properties"; /** * パラメータ: {@value}. */ public static final String PARAM_ON = "ON"; /** * パラメータ: {@value}. */ public static final String PARAM_OFF = "OFF"; /** * パラメータ: {@value}. */ public static final String PARAM_UNKNOWN = "UNKNOWN"; /** * パラメータ: {@value}. */ public static final String PARAM_NEXT = "next"; /** * パラメータ: {@value}. */ public static final String PARAM_PREVIOUS = "previous"; /** * パラメータ: {@value}. */ public static final String PARAM_UP = "up"; /** * パラメータ: {@value}. */ public static final String PARAM_DOWN = "down"; /** * パラメータ: {@value}. */ public static final String PARAM_DTV = "DTV"; /** * パラメータ: {@value}. */ public static final String PARAM_BS = "BS"; /** * パラメータ: {@value}. */ public static final String PARAM_CS = "CS"; @Override public String getProfileName() { return PROFILE_NAME; } @Override protected boolean onPutRequest(final Intent request, final Intent response) { String attribute = getAttribute(request); String serviceId = getServiceID(request); if (attribute == null) { String tv = "/" + PROFILE_NAME; return sendTVRequest(serviceId, "PUT", tv, response); } else if (attribute.equals(ATTRIBUTE_CHANNEL)){ String control = null; if (request.getExtras().getString(PARAM_CONTROL) != null) { control = "/" + PROFILE_NAME + "/" + ATTRIBUTE_CHANNEL + "?" + PARAM_CONTROL + "=" + request.getExtras().getString(PARAM_CONTROL); } if (request.getExtras().getString(PARAM_TUNING) != null) { if (request.getExtras().getString(PARAM_CONTROL) == null) { control = "/" + PROFILE_NAME + "/" + ATTRIBUTE_CHANNEL + "?"; } else { control = control + "&"; } control = control + PARAM_TUNING + "=" + request.getExtras().getString(PARAM_TUNING); } return sendTVRequest(serviceId, "PUT", control, response); } else if (attribute.equals(ATTRIBUTE_VOLUME)) { String control = "/" + PROFILE_NAME + "/" + ATTRIBUTE_VOLUME + "?" + PARAM_CONTROL + "=" + request.getExtras().getString(PARAM_CONTROL); return sendTVRequest(serviceId, "PUT", control, response); } else if (attribute.equals(ATTRIBUTE_BROADCASTWAVE)) { String select = "/" + PROFILE_NAME + "/" + ATTRIBUTE_BROADCASTWAVE + "?" + PARAM_SELECT + "=" + request.getExtras().getString(PARAM_SELECT); return sendTVRequest(serviceId, "PUT", select, response); } else { MessageUtils.setNotSupportAttributeError(response); return true; } } @Override protected boolean onDeleteRequest(final Intent request, final Intent response) { String attribute = getAttribute(request); String serviceId = getServiceID(request); if (attribute == null) { String tv = "/" + PROFILE_NAME; return sendTVRequest(serviceId, "DELETE", tv, response); } else { MessageUtils.setNotSupportAttributeError(response); return true; } } /** * ライト用の赤外線を送信する. * @param serviceId サービスID * @param method HTTP Method * @param uri URI * @param response レスポンス * @return true:同期 false:非同期 */ private boolean sendTVRequest(final String serviceId, final String method, final String uri, final Intent response) { boolean send = true; IRKitDBHelper helper = new IRKitDBHelper(getContext()); List<VirtualProfileData> requests = helper.getVirtualProfiles(serviceId, "TV"); if (requests.size() == 0) { MessageUtils.setInvalidRequestParameterError(response, "Invalid ServiceId"); return send; } for (VirtualProfileData req : requests) { if (req.getUri().equals(uri) && req.getMethod().equals(method) && req.getIr() != null) { final IRKitDeviceService service = (IRKitDeviceService) getContext(); send = service.sendIR(serviceId, req.getIr(), response); break; } else { MessageUtils.setInvalidRequestParameterError(response, "IR is not registered for that request"); } } return send; } }
{ "content_hash": "0631d364bbba4e45ee9047fe36b6960d", "timestamp": "", "source": "github", "line_count": 225, "max_line_length": 112, "avg_line_length": 29.24, "alnum_prop": 0.5689314485484116, "repo_name": "Onuzimoyr/dAndroid", "id": "bb473d2834a6fba2349befbb31270bee4164db12", "size": "7004", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "dConnectDevicePlugin/dConnectDeviceIRKit/app/src/main/java/org/deviceconnect/android/deviceplugin/irkit/profile/IRKitTVProfile.java", "mode": "33261", "license": "mit", "language": [ { "name": "C++", "bytes": "1895" }, { "name": "Java", "bytes": "8376569" }, { "name": "Makefile", "bytes": "281" } ], "symlink_target": "" }
package org.elasticsearch.client; import org.apache.logging.log4j.Logger; import org.elasticsearch.client.ml.CloseJobRequest; import org.elasticsearch.client.ml.DeleteDatafeedRequest; import org.elasticsearch.client.ml.DeleteJobRequest; import org.elasticsearch.client.ml.GetDatafeedRequest; import org.elasticsearch.client.ml.GetDatafeedResponse; import org.elasticsearch.client.ml.GetJobRequest; import org.elasticsearch.client.ml.GetJobResponse; import org.elasticsearch.client.ml.StopDatafeedRequest; import org.elasticsearch.client.ml.datafeed.DatafeedConfig; import org.elasticsearch.client.ml.job.config.Job; import java.io.IOException; /** * Cleans up and ML resources created during tests */ public class MlTestStateCleaner { private final Logger logger; private final MachineLearningClient mlClient; public MlTestStateCleaner(Logger logger, MachineLearningClient mlClient) { this.logger = logger; this.mlClient = mlClient; } public void clearMlMetadata() throws IOException { deleteAllDatafeeds(); deleteAllJobs(); } private void deleteAllDatafeeds() throws IOException { stopAllDatafeeds(); GetDatafeedResponse getDatafeedResponse = mlClient.getDatafeed(GetDatafeedRequest.getAllDatafeedsRequest(), RequestOptions.DEFAULT); for (DatafeedConfig datafeed : getDatafeedResponse.datafeeds()) { mlClient.deleteDatafeed(new DeleteDatafeedRequest(datafeed.getId()), RequestOptions.DEFAULT); } } private void stopAllDatafeeds() { StopDatafeedRequest stopAllDatafeedsRequest = StopDatafeedRequest.stopAllDatafeedsRequest(); try { mlClient.stopDatafeed(stopAllDatafeedsRequest, RequestOptions.DEFAULT); } catch (Exception e1) { logger.warn("failed to stop all datafeeds. Forcing stop", e1); try { stopAllDatafeedsRequest.setForce(true); mlClient.stopDatafeed(stopAllDatafeedsRequest, RequestOptions.DEFAULT); } catch (Exception e2) { logger.warn("Force-closing all data feeds failed", e2); } throw new RuntimeException("Had to resort to force-stopping datafeeds, something went wrong?", e1); } } private void deleteAllJobs() throws IOException { closeAllJobs(); GetJobResponse getJobResponse = mlClient.getJob(GetJobRequest.getAllJobsRequest(), RequestOptions.DEFAULT); for (Job job : getJobResponse.jobs()) { mlClient.deleteJob(new DeleteJobRequest(job.getId()), RequestOptions.DEFAULT); } } private void closeAllJobs() { CloseJobRequest closeAllJobsRequest = CloseJobRequest.closeAllJobsRequest(); try { mlClient.closeJob(closeAllJobsRequest, RequestOptions.DEFAULT); } catch (Exception e1) { logger.warn("failed to close all jobs. Forcing closed", e1); closeAllJobsRequest.setForce(true); try { mlClient.closeJob(closeAllJobsRequest, RequestOptions.DEFAULT); } catch (Exception e2) { logger.warn("Force-closing all jobs failed", e2); } throw new RuntimeException("Had to resort to force-closing jobs, something went wrong?", e1); } } }
{ "content_hash": "c6725881db8c8d9eaca5526070a6a61e", "timestamp": "", "source": "github", "line_count": 85, "max_line_length": 140, "avg_line_length": 39.188235294117646, "alnum_prop": 0.6964875412788952, "repo_name": "strapdata/elassandra", "id": "c565af7c37202980f871a917a21027aa3ef0cd62", "size": "4119", "binary": false, "copies": "17", "ref": "refs/heads/v6.8.4-strapdata", "path": "client/rest-high-level/src/test/java/org/elasticsearch/client/MlTestStateCleaner.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ANTLR", "bytes": "10298" }, { "name": "Batchfile", "bytes": "124" }, { "name": "Emacs Lisp", "bytes": "3341" }, { "name": "FreeMarker", "bytes": "45" }, { "name": "Groovy", "bytes": "383497" }, { "name": "HTML", "bytes": "2186" }, { "name": "Java", "bytes": "54992093" }, { "name": "Perl", "bytes": "12512" }, { "name": "PowerShell", "bytes": "19551" }, { "name": "Python", "bytes": "19852" }, { "name": "Shell", "bytes": "106694" } ], "symlink_target": "" }
stanza.text package =================== stanza.text.dataset module -------------------------- .. automodule:: stanza.text.dataset :members: :special-members: :show-inheritance: stanza.text.vocab module ------------------------ .. automodule:: stanza.text.vocab :members: :special-members: :show-inheritance:
{ "content_hash": "2ce6d64c119e1d9f2f92c850ec93853d", "timestamp": "", "source": "github", "line_count": 19, "max_line_length": 35, "avg_line_length": 17.736842105263158, "alnum_prop": 0.5489614243323442, "repo_name": "arunchaganty/obviousli", "id": "fdc0db39fba70d2d88076fc589eca98b50fa7129", "size": "337", "binary": false, "copies": "3", "ref": "refs/heads/master", "path": "third-party/stanza/docs/stanza.text.rst", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Python", "bytes": "95585" }, { "name": "Shell", "bytes": "3441" } ], "symlink_target": "" }
<!DOCTYPE html> <html lang="ko-kr"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> <meta name="generator" content="Hugo 0.15" /> <title>#Ludens</title> <meta property="og:site_name" content="#Ludens" /> <meta property="og:locale" content="ko-kr" /> <meta property="og:url" content="http://ludens.kr/tags/404/" /> <meta property="fb:pages" content="1707155736233413"/> <meta property="fb:admins" content="100001662925065"/> <meta property="fb:app_id" content="326482430777833"/> <meta property="fb:article_style" content="default" /> <meta name="twitter:site" content="@ludensk" /> <meta name="twitter:creator" content="@ludensk" /> <meta name="google-site-verification" content="RPY_1Z0am0hoduGzENYtuwF3BBoE0x5l3UxhUplLWPU" /> <meta name="naver-site-verification" content="f84c50bc744edf7a543994325914265117555d53" /> <meta name="p:domain_verify" content="381496f2247c95edc614061bacd92e08" /> <meta name="msvalidate.01" content="9137E6F3A8C1C4AE6DC4809DEDB06FD9" /> <meta property="og:title" content="404" /> <meta property="og:type" content="website" /> <meta name="description" content="페이스북부터 심리학 그리고 워드프레스까지 온갖 잡지식을 가끔씩 끄적이고 있습니다." /> <meta name="twitter:card" content="summary" /> <link rel="author" href="humans.txt" /> <link rel="me" href="https://twitter.com/ludensk" /> <link rel="me" href="https://google.com/+ludensk" /> <link rel="me" href="https://github.com/ludens" /> <link rel="pingback" href="https://webmention.io/ludens.kr/xmlrpc" /> <link rel="webmention" href="https://webmention.io/ludens.kr/webmention" /> <link href="https://plus.google.com/+ludensk" rel="publisher"> <link rel="canonical" href="http://ludens.kr/tags/404/" /> <link rel="alternate" type="application/rss+xml" title="#Ludens" href="http://ludens.kr/rss/" /> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="apple-mobile-web-app-title" content="#Ludens"> <meta name="mobile-web-app-capable" content="yes"> <meta name="theme-color" content="#111111"> <meta name="msapplication-navbutton-color" content="#111111"> <meta name="msapplication-TileColor" content="#111111"> <meta name="application-name" content="#Ludens"> <meta name="msapplication-tooltip" content="페이스북부터 심리학 그리고 워드프레스까지 온갖 잡지식을 가끔씩 끄적이고 있습니다."> <meta name="msapplication-starturl" content="/"> <meta http-equiv="cleartype" content="on"> <meta name="msapplication-tap-highlight" content="no"> <link rel="apple-touch-icon" sizes="57x57" href="http://ludens.kr/favicon/apple-touch-icon-57x57.png"> <link rel="apple-touch-icon" sizes="60x60" href="http://ludens.kr/favicon/apple-touch-icon-60x60.png"> <link rel="apple-touch-icon" sizes="72x72" href="http://ludens.kr/favicon/apple-touch-icon-72x72.png"> <link rel="apple-touch-icon" sizes="76x76" href="http://ludens.kr/favicon/apple-touch-icon-76x76.png"> <link rel="apple-touch-icon" sizes="114x114" href="http://ludens.kr/favicon/apple-touch-icon-114x114.png"> <link rel="apple-touch-icon" sizes="120x120" href="http://ludens.kr/favicon/apple-touch-icon-120x120.png"> <link rel="apple-touch-icon" sizes="144x144" href="http://ludens.kr/favicon/apple-touch-icon-144x144.png"> <link rel="apple-touch-icon" sizes="152x152" href="http://ludens.kr/favicon/apple-touch-icon-152x152.png"> <link rel="apple-touch-icon" sizes="180x180" href="http://ludens.kr/favicon/apple-touch-icon-180x180.png"> <link rel="icon" type="image/png" href="http://ludens.kr/favicon/favicon-32x32.png" sizes="32x32"> <link rel="icon" type="image/png" href="http://ludens.kr/favicon/favicon-194x194.png" sizes="194x194"> <link rel="icon" type="image/png" href="http://ludens.kr/favicon/favicon-96x96.png" sizes="96x96"> <link rel="icon" type="image/png" href="http://ludens.kr/favicon/android-chrome-192x192.png" sizes="192x192"> <link rel="icon" type="image/png" href="http://ludens.kr/favicon/favicon-16x16.png" sizes="16x16"> <link rel="manifest" href="http://ludens.kr/favicon/manifest.json"> <link rel="mask-icon" href="http://ludens.kr/favicon/safari-pinned-tab.svg" color="#5bbad5"> <meta name="msapplication-TileImage" content="/mstile-144x144.png"> <link rel="stylesheet" href="http://ludens.kr/css/pure/pure-min.css" /> <link rel="stylesheet" href="http://ludens.kr/css/pure/grids-responsive-min.css" /> <link rel='stylesheet' href='http://ludens.kr/font/fonts.css'> <link rel="stylesheet" href="http://ludens.kr/font/font-awesome.min.css"> <link rel="stylesheet" href="http://ludens.kr/css/style.css"/> <script src="http://ludens.kr/js/jquery-2.2.1.min.js"></script> </head> <body> <script> window.fbAsyncInit = function() { FB.init({ appId : '326482430777833', xfbml : true, version : 'v2.6' }); }; (function(d, s, id){ var js, fjs = d.getElementsByTagName(s)[0]; if (d.getElementById(id)) {return;} js = d.createElement(s); js.id = id; js.src = "//connect.facebook.net/ko_KR/sdk.js"; fjs.parentNode.insertBefore(js, fjs); }(document, 'script', 'facebook-jssdk')); </script> <header class="pure-g"> <div class="pure-u-1 pure-u-sm-1-3 center"> <h1><a href="http://ludens.kr">#LUDENS</a></h1> </div> <nav class="pure-u-1 pure-u-sm-2-3 center"> <a href="http://ludens.kr/" class="home" title="Home">HOME</a> <a href="http://ludens.kr/categories/" class="category" title="Category">CATEGORY</a> <a href="http://ludens.kr/post/" class="archive" title="Archive">ARCHIVE</a> <a href="http://ludens.kr/tags/" class="tag" title="Tag">TAG</a> <a href="http://ludens.kr/guestbook/" class="guestbook" title="Guestbook">GUESTBOOK</a> </nav> </header> <main class="list mainWrap"> <h2 class="ellipsis"><small>Posts about </small>404</h2> <h3 id="2013">2013</h3> <div class="pure-g"> <div class="pure-u-1 pure-u-sm-1-2"> <a href="http://ludens.kr/post/wordpress-faq/" class="cover" style="background-image: url('/images/old/cfile22.uf.266F8C3751211126154760.png');"></a> <div class="category ubuntu300 grey"> <a class="grey" href="http://ludens.kr/categories/wordpress" title="wordpress">wordpress</a> at <time datetime="18 Feb 2013 27:00">2013/2/18</time> </div> <h3 class="ellipsis margintop0"><a href="http://ludens.kr/post/wordpress-faq/" title="워드프레스 자주 묻는 질문: 60문 60답">워드프레스 자주 묻는 질문: 60문 60답</a></h3> </div> </div> </main> <footer> <div class="footerWrap pure-g"> <div class="pure-u-1 pure-u-md-2-5 copyright center"> ⓒ 2016 Ludens | Published with <a class="black dotline" href="http://gohugo.io" target="_blank" rel="nofollow">Hugo</a> </div> <nav class="pure-u-1 pure-u-md-3-5 center"> <a href="https://twitter.com/ludensk" class="twitter" title="Twitter"><i class='fa fa-twitter-square'></i></a> <a href="https://fb.com/ludensk" class="facebook" title="Facebook"><i class='fa fa-facebook-square'></i></a> <a href="https://instagr.am/ludensk" class="instagram" title="Instagram"><i class='fa fa-instagram'></i></a> <a href="https://pinterest.com/ludensk" class="pinterest" title="Pinterest"><i class='fa fa-pinterest-square'></i></a> <a href="https://www.youtube.com/user/ludensk" class="youtube" title="YouTube"><i class='fa fa-youtube-square'></i></a> <a href="https://ludensk.tumblr.com" class="tumblr" title="Tumblr"><i class='fa fa-tumblr-square'></i></a> <a href="https://linkedin.com/in/ludensk" class="linkedin" title="LinkedIn"><i class='fa fa-linkedin-square'></i></a> <a href="https://github.com/ludens" class="github" title="GitHub"><i class='fa fa-github-square'></i></a> <a href="http://ludens.kr/rss/" class="rss" title="RSS"><i class='fa fa-rss-square'></i></a> </nav> </div> </footer> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)})(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-29269230-1', 'auto'); ga('send', 'pageview'); </script> <script type="text/javascript" src="//wcs.naver.net/wcslog.js"></script> <script type="text/javascript"> if(!wcs_add) var wcs_add = {}; wcs_add["wa"] = "123cefa73667c5c"; wcs_do(); </script> <script> !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod?n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.async=!0;t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(window,document,'script','//connect.facebook.net/en_US/fbevents.js'); fbq('init','1143503702345044'); fbq('track',"PageView"); </script> <noscript><img height="1" width="1" style="display:none" src="//www.facebook.com/tr?id=1143503702345044&ev=PageView&noscript=1" /></noscript> <script src="//twemoji.maxcdn.com/twemoji.min.js"></script> <script>var emoji=document.getElementsByClassName("emoji");twemoji.parse(emoji[0],{size:16});</script> <script src="http://ludens.kr/js/jquery.keep-ratio.min.js"></script> <script type="text/javascript"> $(function() { $('.kofic-poster').keepRatio({ ratio: 27/40, calculate: 'height' }); $('.articleWrap .cover, .post_latest .cover,.articleWrap header figure').keepRatio({ ratio: 12/5, calculate: 'height' }); if ($(window).width() >= 568) { $('.futher .cover,.error .cover,.post_two .cover,.list .cover').keepRatio({ ratio: 4/3, calculate: 'height' }); $('.categories .cover').keepRatio({ ratio: 1/1, calculate: 'height' }); } else { $('.futher .cover,.error .cover,.post_two .cover,.list .cover,.categories .cover').keepRatio({ ratio: 12/5, calculate: 'height' }); } }); </script> </body> </html>
{ "content_hash": "e8f8a09b197cbd7e031305010cf06b20", "timestamp": "", "source": "github", "line_count": 229, "max_line_length": 370, "avg_line_length": 45.1703056768559, "alnum_prop": 0.6547757153905646, "repo_name": "ludens/ludens.kr", "id": "6d20c879a0fbb63709db20a70964320a4977a937", "size": "10542", "binary": false, "copies": "1", "ref": "refs/heads/gh-pages", "path": "tags/404/index.html", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "18631" }, { "name": "HTML", "bytes": "24946646" }, { "name": "JavaScript", "bytes": "8525" } ], "symlink_target": "" }
package com.easyooo.framework.support.mybatis; /** *SQL方言接口 * * @author Killer */ public interface Dialect { String getPagingSQL(String sql); String getCountingSQL(String sql); Order[] order(); }
{ "content_hash": "b5fa3c50fb71d7eb5d2dd92d5c0a96ec", "timestamp": "", "source": "github", "line_count": 17, "max_line_length": 46, "avg_line_length": 12.647058823529411, "alnum_prop": 0.6837209302325581, "repo_name": "leopardoooo/easyooo-framework", "id": "0120f21bf1162eef77083283666fee1f66f7c8ec", "size": "223", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/java/com/easyooo/framework/support/mybatis/Dialect.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "269029" } ], "symlink_target": "" }
#ifndef SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_COMMAND_NOTIFICATION_H_ #define SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_COMMAND_NOTIFICATION_H_ #include "application_manager/commands/command_notification_impl.h" #include "utils/macro.h" namespace application_manager { class Application; namespace commands { /** * @brief OnCommandNotification class is used to send notification * to mobile device. **/ class OnCommandNotification : public CommandNotificationImpl { public: /** * @brief OnCommandNotification class constructor * * @param message Incoming SmartObject message **/ OnCommandNotification(const MessageSharedPtr& message, ApplicationManager& application_manager); /** * @brief OnCommandNotification class destructor **/ virtual ~OnCommandNotification(); /** * @brief Execute command **/ virtual void Run(); private: DISALLOW_COPY_AND_ASSIGN(OnCommandNotification); }; } // namespace commands } // namespace application_manager #endif // SRC_COMPONENTS_APPLICATION_MANAGER_INCLUDE_APPLICATION_MANAGER_COMMANDS_MOBILE_ON_COMMAND_NOTIFICATION_H_
{ "content_hash": "4d03761670f1d5d618e69f3d5b80f0f6", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 116, "avg_line_length": 26.543478260869566, "alnum_prop": 0.7518427518427518, "repo_name": "APCVSRepo/sdl_core", "id": "e2faf9b05c68b4a3cc1bf7d1c7fd7b6d231cbe97", "size": "2734", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "src/components/application_manager/include/application_manager/commands/mobile/on_command_notification.h", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "10491" }, { "name": "C++", "bytes": "18387258" }, { "name": "CMake", "bytes": "417637" }, { "name": "HTML", "bytes": "1138" }, { "name": "M4", "bytes": "25347" }, { "name": "Makefile", "bytes": "139997" }, { "name": "PLpgSQL", "bytes": "12824" }, { "name": "Python", "bytes": "779378" }, { "name": "Shell", "bytes": "692158" } ], "symlink_target": "" }
<?php namespace InfinityFree\MofhClient\Exception; class InvalidRequestException extends \Exception { }
{ "content_hash": "8c669f78e781fd61bdb22c9aa24fcb66", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 48, "avg_line_length": 13.25, "alnum_prop": 0.8207547169811321, "repo_name": "HansAdema/mofh-client", "id": "5ef7f74f4d456d1d90022d171ecb3f4c775ac8b8", "size": "106", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/Exception/InvalidRequestException.php", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "PHP", "bytes": "59657" } ], "symlink_target": "" }
<?xml version="1.0" encoding="UTF-8"?> <!-- Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <modelVersion>4.0.0</modelVersion> <parent> <groupId>org.apache.camel</groupId> <artifactId>components</artifactId> <version>3.3.0-SNAPSHOT</version> </parent> <artifactId>camel-cdi</artifactId> <packaging>jar</packaging> <name>Camel :: CDI</name> <description>Using Camel with CDI</description> <properties> <firstVersion>2.10.0</firstVersion> <label>java</label> <title>CDI</title> <camel.osgi.import> !org.apache.camel.cdi.*, !org.apache.deltaspike.cdise.api.*, javax.xml.bind*;version="[2.2,3.0)", ${camel.osgi.import.defaults}, * </camel.osgi.import> </properties> <dependencyManagement> <dependencies> <!-- test dependencies --> <dependency> <groupId>org.jboss.shrinkwrap.descriptors</groupId> <artifactId>shrinkwrap-descriptors-bom</artifactId> <version>${shrinkwrap-descriptors-version}</version> <type>pom</type> <scope>import</scope> </dependency> <dependency> <groupId>org.jboss.arquillian</groupId> <artifactId>arquillian-bom</artifactId> <version>${arquillian-version}</version> <type>pom</type> <scope>import</scope> </dependency> </dependencies> </dependencyManagement> <dependencies> <!-- compile dependencies --> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-support</artifactId> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-main</artifactId> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-mock</artifactId> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-bean</artifactId> </dependency> <!-- DeltaSpike is only used to provide Main support thus optional --> <dependency> <groupId>org.apache.deltaspike.cdictrl</groupId> <artifactId>deltaspike-cdictrl-api</artifactId> <version>${deltaspike-version}</version> <optional>true</optional> </dependency> <!-- provided dependencies --> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core-xml</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-xml-jaxb</artifactId> <optional>true</optional> </dependency> <dependency> <groupId>javax.transaction</groupId> <artifactId>javax.transaction-api</artifactId> <version>${jta-api-1.2-version}</version> <scope>provided</scope> <optional>true</optional> </dependency> <!-- test dependencies --> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-cloud</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-seda</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-direct</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-rest</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-ref</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <scope>test</scope> <exclusions> <exclusion> <groupId>org.hamcrest</groupId> <artifactId>hamcrest-core</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.hamcrest</groupId> <artifactId>hamcrest</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>jul-to-slf4j</artifactId> <version>${slf4j-version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-api</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-core</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.logging.log4j</groupId> <artifactId>log4j-slf4j-impl</artifactId> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.junit</groupId> <artifactId>arquillian-junit-container</artifactId> <version>${arquillian-version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.shrinkwrap.descriptors</groupId> <artifactId>shrinkwrap-descriptors-depchain</artifactId> <type>pom</type> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.camel</groupId> <artifactId>camel-package-maven-plugin</artifactId> <executions> <execution> <id>jaxb-list</id> <goals> <goal>generate-jaxb-list</goal> </goals> <phase>process-classes</phase> </execution> </executions> </plugin> <plugin> <artifactId>maven-resources-plugin</artifactId> <executions> <execution> <id>copy-generated-resources-jaxb</id> <goals> <goal>resources</goal> </goals> <phase>process-classes</phase> <configuration> <resources> <resource> <directory>${basedir}/target/generated/camel/jaxb</directory> </resource> </resources> </configuration> </execution> </executions> </plugin> </plugins> </build> <profiles> <profile> <id>weld-3.0</id> <activation> <activeByDefault>true</activeByDefault> </activation> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> </plugin> </plugins> </build> <dependencies> <!-- provided dependencies --> <dependency> <groupId>javax.enterprise</groupId> <artifactId>cdi-api</artifactId> <version>${cdi-api-2.0-version}</version> <scope>provided</scope> </dependency> <!-- test dependencies --> <dependency> <groupId>org.jboss.weld</groupId> <artifactId>weld-core-impl</artifactId> <version>${weld3-version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.container</groupId> <artifactId>arquillian-weld-embedded</artifactId> <version>${arquillian-weld-embedded-version}</version> <scope>test</scope> </dependency> </dependencies> </profile> <profile> <id>owb-1.0</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <excludes> <exclude>**/*Cdi12Test.java</exclude> <exclude>**/*Cdi20Test.java</exclude> <!-- OWB does not call the InjectionTarget#preDestroy method --> <exclude>**/UnstoppedCamelContext*Test.java</exclude> <!-- Reactivate when OWB-1155 is fixed --> <exclude>**/ProgrammaticLookupTest.java</exclude> <!-- Reactivate when OWB-1126 is fixed --> <exclude>**/Xml*Test.java</exclude> </excludes> </configuration> </plugin> </plugins> </build> <dependencies> <!-- provided dependencies --> <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-jcdi_1.0_spec</artifactId> <version>${geronimo-jcdi-1.0-spec-version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-atinject_1.0_spec</artifactId> <version>${geronimo-atinject-1.0-spec-version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-interceptor_1.1_spec</artifactId> <version>${geronimo-interceptor-1.1-spec-version}</version> <scope>provided</scope> </dependency> <!-- test dependencies --> <dependency> <groupId>org.apache.openwebbeans.arquillian</groupId> <artifactId>owb-arquillian-standalone</artifactId> <version>${openwebbeans1-version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.openwebbeans</groupId> <artifactId>openwebbeans-impl</artifactId> <version>${openwebbeans1-version}</version> <scope>test</scope> </dependency> </dependencies> </profile> <profile> <id>owb-1.2</id> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <excludes> <exclude>**/*Cdi20Test.java</exclude> <!-- Reactivate when OWB-1155 is fixed --> <exclude>**/ProgrammaticLookupTest.java</exclude> <!-- Reactivate when OWB-1126 is fixed --> <exclude>**/Xml*Test.java</exclude> </excludes> </configuration> </plugin> </plugins> </build> <dependencies> <!-- provided dependencies --> <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-jcdi_1.1_spec</artifactId> <version>${geronimo-jcdi-1.1-spec-version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-atinject_1.0_spec</artifactId> <version>${geronimo-atinject-1.0-spec-version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-annotation_1.2_spec</artifactId> <version>${geronimo-annotation-1.2-spec-version}</version> <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-interceptor_1.2_spec</artifactId> <version>${geronimo-interceptor-1.2-spec-version}</version> <scope>provided</scope> </dependency> <!-- test dependencies --> <dependency> <groupId>org.apache.openwebbeans.arquillian</groupId> <artifactId>owb-arquillian-standalone</artifactId> <version>${openwebbeans-version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.apache.openwebbeans</groupId> <artifactId>openwebbeans-impl</artifactId> <version>${openwebbeans-version}</version> <scope>test</scope> </dependency> </dependencies> </profile> <profile> <id>jdk9+-weld-3.0</id> <activation> <jdk>[9,)</jdk> </activation> <dependencies> <!-- provided dependencies --> <dependency> <groupId>javax.enterprise</groupId> <artifactId>cdi-api</artifactId> <version>${cdi-api-2.0-version}</version> <scope>provided</scope> </dependency> <!-- test dependencies --> <dependency> <groupId>org.jboss.weld</groupId> <artifactId>weld-core-impl</artifactId> <version>${weld3-version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.jboss.arquillian.container</groupId> <artifactId>arquillian-weld-embedded</artifactId> <version>${arquillian-weld-embedded-version}</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <reuseForks>true</reuseForks> </configuration> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> <version>2.10</version> <executions> <execution> <id>copy</id> <phase>validate</phase> <goals> <goal>copy</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>javax.annotation</groupId> <artifactId>javax.annotation-api</artifactId> <version>1.2</version> <type>jar</type> <overWrite>false</overWrite> <outputDirectory>${project.basedir}/target/java9</outputDirectory> </artifactItem> </artifactItems> <overWriteReleases>false</overWriteReleases> <overWriteSnapshots>true</overWriteSnapshots> </configuration> </execution> <execution> <id>copy-jaxb</id> <phase>validate</phase> <goals> <goal>unpack</goal> </goals> <configuration> <artifactItems> <artifactItem> <groupId>jakarta.xml.bind</groupId> <artifactId>jakarta.xml.bind-api</artifactId> <version>${jakarta-jaxb-version}</version> <overWrite>false</overWrite> <outputDirectory>${project.basedir}/target/java9</outputDirectory> </artifactItem> <artifactItem> <groupId>org.glassfish.jaxb</groupId> <artifactId>jaxb-runtime</artifactId> <version>${glassfish-jaxb-runtime-version}</version> <overWrite>false</overWrite> <outputDirectory>${project.basedir}/target/java9</outputDirectory> </artifactItem> </artifactItems> <overWriteReleases>false</overWriteReleases> <overWriteSnapshots>true</overWriteSnapshots> </configuration> </execution> </executions> </plugin> </plugins> </build> </profile> </profiles> </project>
{ "content_hash": "3732a66562c80e3b9e6003b16f8d267b", "timestamp": "", "source": "github", "line_count": 533, "max_line_length": 204, "avg_line_length": 38.553470919324575, "alnum_prop": 0.46279624312618617, "repo_name": "zregvart/camel", "id": "5a8cd3446dd092442111f20621b1d575ceceb9eb", "size": "20549", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "components/camel-cdi/pom.xml", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Apex", "bytes": "6521" }, { "name": "Batchfile", "bytes": "2353" }, { "name": "CSS", "bytes": "5472" }, { "name": "Elm", "bytes": "10852" }, { "name": "FreeMarker", "bytes": "8015" }, { "name": "Groovy", "bytes": "20938" }, { "name": "HTML", "bytes": "914791" }, { "name": "Java", "bytes": "90321137" }, { "name": "JavaScript", "bytes": "101298" }, { "name": "RobotFramework", "bytes": "8461" }, { "name": "Shell", "bytes": "11165" }, { "name": "TSQL", "bytes": "28835" }, { "name": "Tcl", "bytes": "4974" }, { "name": "Thrift", "bytes": "6979" }, { "name": "XQuery", "bytes": "546" }, { "name": "XSLT", "bytes": "280849" } ], "symlink_target": "" }
/* Generated by camel build tools - do NOT edit this file! */ package org.apache.camel.component.aws.swf; import java.util.Map; import org.apache.camel.CamelContext; import org.apache.camel.spi.GeneratedPropertyConfigurer; import org.apache.camel.spi.PropertyConfigurerGetter; import org.apache.camel.util.CaseInsensitiveMap; import org.apache.camel.support.component.PropertyConfigurerSupport; /** * Generated by camel build tools - do NOT edit this file! */ @SuppressWarnings("unchecked") public class SWFEndpointConfigurer extends PropertyConfigurerSupport implements GeneratedPropertyConfigurer, PropertyConfigurerGetter { private static final Map<String, Object> ALL_OPTIONS; static { Map<String, Object> map = new CaseInsensitiveMap(); map.put("type", java.lang.String.class); map.put("amazonSWClient", com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflow.class); map.put("dataConverter", com.amazonaws.services.simpleworkflow.flow.DataConverter.class); map.put("domainName", java.lang.String.class); map.put("eventName", java.lang.String.class); map.put("region", java.lang.String.class); map.put("version", java.lang.String.class); map.put("bridgeErrorHandler", boolean.class); map.put("exceptionHandler", org.apache.camel.spi.ExceptionHandler.class); map.put("exchangePattern", org.apache.camel.ExchangePattern.class); map.put("lazyStartProducer", boolean.class); map.put("activityList", java.lang.String.class); map.put("activitySchedulingOptions", com.amazonaws.services.simpleworkflow.flow.ActivitySchedulingOptions.class); map.put("activityThreadPoolSize", int.class); map.put("activityTypeExecutionOptions", com.amazonaws.services.simpleworkflow.flow.worker.ActivityTypeExecutionOptions.class); map.put("activityTypeRegistrationOptions", com.amazonaws.services.simpleworkflow.flow.worker.ActivityTypeRegistrationOptions.class); map.put("basicPropertyBinding", boolean.class); map.put("clientConfigurationParameters", java.util.Map.class); map.put("startWorkflowOptionsParameters", java.util.Map.class); map.put("sWClientParameters", java.util.Map.class); map.put("synchronous", boolean.class); map.put("accessKey", java.lang.String.class); map.put("secretKey", java.lang.String.class); map.put("childPolicy", java.lang.String.class); map.put("executionStartToCloseTimeout", java.lang.String.class); map.put("operation", java.lang.String.class); map.put("signalName", java.lang.String.class); map.put("stateResultType", java.lang.String.class); map.put("taskStartToCloseTimeout", java.lang.String.class); map.put("terminationDetails", java.lang.String.class); map.put("terminationReason", java.lang.String.class); map.put("workflowList", java.lang.String.class); map.put("workflowTypeRegistrationOptions", com.amazonaws.services.simpleworkflow.flow.WorkflowTypeRegistrationOptions.class); ALL_OPTIONS = map; } @Override public boolean configure(CamelContext camelContext, Object obj, String name, Object value, boolean ignoreCase) { SWFEndpoint target = (SWFEndpoint) obj; switch (ignoreCase ? name.toLowerCase() : name) { case "accesskey": case "accessKey": target.getConfiguration().setAccessKey(property(camelContext, java.lang.String.class, value)); return true; case "activitylist": case "activityList": target.getConfiguration().setActivityList(property(camelContext, java.lang.String.class, value)); return true; case "activityschedulingoptions": case "activitySchedulingOptions": target.getConfiguration().setActivitySchedulingOptions(property(camelContext, com.amazonaws.services.simpleworkflow.flow.ActivitySchedulingOptions.class, value)); return true; case "activitythreadpoolsize": case "activityThreadPoolSize": target.getConfiguration().setActivityThreadPoolSize(property(camelContext, int.class, value)); return true; case "activitytypeexecutionoptions": case "activityTypeExecutionOptions": target.getConfiguration().setActivityTypeExecutionOptions(property(camelContext, com.amazonaws.services.simpleworkflow.flow.worker.ActivityTypeExecutionOptions.class, value)); return true; case "activitytyperegistrationoptions": case "activityTypeRegistrationOptions": target.getConfiguration().setActivityTypeRegistrationOptions(property(camelContext, com.amazonaws.services.simpleworkflow.flow.worker.ActivityTypeRegistrationOptions.class, value)); return true; case "amazonswclient": case "amazonSWClient": target.getConfiguration().setAmazonSWClient(property(camelContext, com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflow.class, value)); return true; case "basicpropertybinding": case "basicPropertyBinding": target.setBasicPropertyBinding(property(camelContext, boolean.class, value)); return true; case "bridgeerrorhandler": case "bridgeErrorHandler": target.setBridgeErrorHandler(property(camelContext, boolean.class, value)); return true; case "childpolicy": case "childPolicy": target.getConfiguration().setChildPolicy(property(camelContext, java.lang.String.class, value)); return true; case "clientconfigurationparameters": case "clientConfigurationParameters": target.getConfiguration().setClientConfigurationParameters(property(camelContext, java.util.Map.class, value)); return true; case "dataconverter": case "dataConverter": target.getConfiguration().setDataConverter(property(camelContext, com.amazonaws.services.simpleworkflow.flow.DataConverter.class, value)); return true; case "domainname": case "domainName": target.getConfiguration().setDomainName(property(camelContext, java.lang.String.class, value)); return true; case "eventname": case "eventName": target.getConfiguration().setEventName(property(camelContext, java.lang.String.class, value)); return true; case "exceptionhandler": case "exceptionHandler": target.setExceptionHandler(property(camelContext, org.apache.camel.spi.ExceptionHandler.class, value)); return true; case "exchangepattern": case "exchangePattern": target.setExchangePattern(property(camelContext, org.apache.camel.ExchangePattern.class, value)); return true; case "executionstarttoclosetimeout": case "executionStartToCloseTimeout": target.getConfiguration().setExecutionStartToCloseTimeout(property(camelContext, java.lang.String.class, value)); return true; case "lazystartproducer": case "lazyStartProducer": target.setLazyStartProducer(property(camelContext, boolean.class, value)); return true; case "operation": target.getConfiguration().setOperation(property(camelContext, java.lang.String.class, value)); return true; case "region": target.getConfiguration().setRegion(property(camelContext, java.lang.String.class, value)); return true; case "swclientparameters": case "sWClientParameters": target.getConfiguration().setSWClientParameters(property(camelContext, java.util.Map.class, value)); return true; case "secretkey": case "secretKey": target.getConfiguration().setSecretKey(property(camelContext, java.lang.String.class, value)); return true; case "signalname": case "signalName": target.getConfiguration().setSignalName(property(camelContext, java.lang.String.class, value)); return true; case "startworkflowoptionsparameters": case "startWorkflowOptionsParameters": target.getConfiguration().setStartWorkflowOptionsParameters(property(camelContext, java.util.Map.class, value)); return true; case "stateresulttype": case "stateResultType": target.getConfiguration().setStateResultType(property(camelContext, java.lang.String.class, value)); return true; case "synchronous": target.setSynchronous(property(camelContext, boolean.class, value)); return true; case "taskstarttoclosetimeout": case "taskStartToCloseTimeout": target.getConfiguration().setTaskStartToCloseTimeout(property(camelContext, java.lang.String.class, value)); return true; case "terminationdetails": case "terminationDetails": target.getConfiguration().setTerminationDetails(property(camelContext, java.lang.String.class, value)); return true; case "terminationreason": case "terminationReason": target.getConfiguration().setTerminationReason(property(camelContext, java.lang.String.class, value)); return true; case "version": target.getConfiguration().setVersion(property(camelContext, java.lang.String.class, value)); return true; case "workflowlist": case "workflowList": target.getConfiguration().setWorkflowList(property(camelContext, java.lang.String.class, value)); return true; case "workflowtyperegistrationoptions": case "workflowTypeRegistrationOptions": target.getConfiguration().setWorkflowTypeRegistrationOptions(property(camelContext, com.amazonaws.services.simpleworkflow.flow.WorkflowTypeRegistrationOptions.class, value)); return true; default: return false; } } @Override public Map<String, Object> getAllOptions(Object target) { return ALL_OPTIONS; } @Override public Object getOptionValue(Object obj, String name, boolean ignoreCase) { SWFEndpoint target = (SWFEndpoint) obj; switch (ignoreCase ? name.toLowerCase() : name) { case "accesskey": case "accessKey": return target.getConfiguration().getAccessKey(); case "activitylist": case "activityList": return target.getConfiguration().getActivityList(); case "activityschedulingoptions": case "activitySchedulingOptions": return target.getConfiguration().getActivitySchedulingOptions(); case "activitythreadpoolsize": case "activityThreadPoolSize": return target.getConfiguration().getActivityThreadPoolSize(); case "activitytypeexecutionoptions": case "activityTypeExecutionOptions": return target.getConfiguration().getActivityTypeExecutionOptions(); case "activitytyperegistrationoptions": case "activityTypeRegistrationOptions": return target.getConfiguration().getActivityTypeRegistrationOptions(); case "amazonswclient": case "amazonSWClient": return target.getConfiguration().getAmazonSWClient(); case "basicpropertybinding": case "basicPropertyBinding": return target.isBasicPropertyBinding(); case "bridgeerrorhandler": case "bridgeErrorHandler": return target.isBridgeErrorHandler(); case "childpolicy": case "childPolicy": return target.getConfiguration().getChildPolicy(); case "clientconfigurationparameters": case "clientConfigurationParameters": return target.getConfiguration().getClientConfigurationParameters(); case "dataconverter": case "dataConverter": return target.getConfiguration().getDataConverter(); case "domainname": case "domainName": return target.getConfiguration().getDomainName(); case "eventname": case "eventName": return target.getConfiguration().getEventName(); case "exceptionhandler": case "exceptionHandler": return target.getExceptionHandler(); case "exchangepattern": case "exchangePattern": return target.getExchangePattern(); case "executionstarttoclosetimeout": case "executionStartToCloseTimeout": return target.getConfiguration().getExecutionStartToCloseTimeout(); case "lazystartproducer": case "lazyStartProducer": return target.isLazyStartProducer(); case "operation": return target.getConfiguration().getOperation(); case "region": return target.getConfiguration().getRegion(); case "swclientparameters": case "sWClientParameters": return target.getConfiguration().getSWClientParameters(); case "secretkey": case "secretKey": return target.getConfiguration().getSecretKey(); case "signalname": case "signalName": return target.getConfiguration().getSignalName(); case "startworkflowoptionsparameters": case "startWorkflowOptionsParameters": return target.getConfiguration().getStartWorkflowOptionsParameters(); case "stateresulttype": case "stateResultType": return target.getConfiguration().getStateResultType(); case "synchronous": return target.isSynchronous(); case "taskstarttoclosetimeout": case "taskStartToCloseTimeout": return target.getConfiguration().getTaskStartToCloseTimeout(); case "terminationdetails": case "terminationDetails": return target.getConfiguration().getTerminationDetails(); case "terminationreason": case "terminationReason": return target.getConfiguration().getTerminationReason(); case "version": return target.getConfiguration().getVersion(); case "workflowlist": case "workflowList": return target.getConfiguration().getWorkflowList(); case "workflowtyperegistrationoptions": case "workflowTypeRegistrationOptions": return target.getConfiguration().getWorkflowTypeRegistrationOptions(); default: return null; } } }
{ "content_hash": "c012e50d7e899e8f5cf14770878c3855", "timestamp": "", "source": "github", "line_count": 198, "max_line_length": 242, "avg_line_length": 68.27777777777777, "alnum_prop": 0.7374805828833494, "repo_name": "alvinkwekel/camel", "id": "b838f540c406ec0d7a3d98a8a4f38e170c09b8e4", "size": "13519", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "components/camel-aws-swf/src/generated/java/org/apache/camel/component/aws/swf/SWFEndpointConfigurer.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Apex", "bytes": "6521" }, { "name": "Batchfile", "bytes": "2353" }, { "name": "CSS", "bytes": "5472" }, { "name": "Elm", "bytes": "10852" }, { "name": "FreeMarker", "bytes": "8015" }, { "name": "Groovy", "bytes": "20838" }, { "name": "HTML", "bytes": "915675" }, { "name": "Java", "bytes": "86780964" }, { "name": "JavaScript", "bytes": "100326" }, { "name": "Makefile", "bytes": "513" }, { "name": "RobotFramework", "bytes": "8461" }, { "name": "Shell", "bytes": "17295" }, { "name": "TSQL", "bytes": "28835" }, { "name": "Tcl", "bytes": "4974" }, { "name": "Thrift", "bytes": "6979" }, { "name": "XQuery", "bytes": "546" }, { "name": "XSLT", "bytes": "280849" } ], "symlink_target": "" }
import logging import operator import pytest from cassandra import ConsistencyLevel from pytest import mark from dtest import Tester, create_ks, create_cf from tools.data import insert_c1c2 from tools.misc import generate_ssl_stores from itertools import product since = pytest.mark.since logger = logging.getLogger(__name__) opmap = { operator.eq: "==", operator.gt: ">", operator.lt: "<", operator.ne: "!=", operator.ge: ">=", operator.le: "<=" } class TestStreaming(Tester): @pytest.fixture(autouse=True) def fixture_add_additional_log_patterns(self, fixture_dtest_setup): fixture_dtest_setup.ignore_log_patterns = ( # This one occurs when trying to send the migration to a # node that hasn't started yet, and when it does, it gets # replayed and everything is fine. r'Can\'t send migration request: node.*is down', # ignore streaming error during bootstrap r'Exception encountered during startup', r'Streaming error occurred' ) def setup_internode_ssl(self, cluster): logger.debug("***using internode ssl***") generate_ssl_stores(self.fixture_dtest_setup.test_path) cluster.enable_internode_ssl(self.fixture_dtest_setup.test_path) def _test_streaming(self, op_zerocopy, op_partial, num_partial, num_zerocopy, compaction_strategy='LeveledCompactionStrategy', num_keys=1000, rf=3, num_nodes=3, ssl=False): keys = num_keys cluster = self.cluster if ssl: self.setup_internode_ssl(cluster) tokens = cluster.balanced_tokens(num_nodes) cluster.set_configuration_options(values={'endpoint_snitch': 'org.apache.cassandra.locator.PropertyFileSnitch'}) cluster.set_configuration_options(values={'num_tokens': 1}) cluster.populate(num_nodes) nodes = cluster.nodelist() for i in range(0, len(nodes)): nodes[i].set_configuration_options(values={'initial_token': tokens[i]}) cluster.start(wait_for_binary_proto=True) session = self.patient_cql_connection(nodes[0]) create_ks(session, name='ks2', rf=rf) create_cf(session, 'cf', columns={'c1': 'text', 'c2': 'text'}, compaction_strategy=compaction_strategy) insert_c1c2(session, n=keys, consistency=ConsistencyLevel.ALL) session_n2 = self.patient_exclusive_cql_connection(nodes[1]) session_n2.execute("TRUNCATE system.available_ranges;") mark = nodes[1].mark_log() nodes[1].nodetool('rebuild -ks ks2') nodes[1].watch_log_for('Completed submission of build tasks', filename='debug.log', timeout=120) zerocopy_streamed_sstable = len( nodes[1].grep_log('.*CassandraEntireSSTableStreamReader.*?Finished receiving Data.*', filename='debug.log', from_mark=mark)) partial_streamed_sstable = len( nodes[1].grep_log('.*CassandraStreamReader.*?Finished receiving file.*', filename='debug.log', from_mark=mark)) assert op_zerocopy(zerocopy_streamed_sstable, num_zerocopy), "%s %s %s" % (num_zerocopy, opmap.get(op_zerocopy), zerocopy_streamed_sstable) assert op_partial(partial_streamed_sstable, num_partial), "%s %s %s" % (num_partial, op_partial, partial_streamed_sstable) @since('4.0') @pytest.mark.parametrize('ssl,compaction_strategy', product(['SSL', 'NoSSL'], ['LeveledCompactionStrategy', 'SizeTieredCompactionStrategy'])) def test_zerocopy_streaming(self, ssl, compaction_strategy): self._test_streaming(op_zerocopy=operator.gt, op_partial=operator.gt, num_zerocopy=1, num_partial=1, rf=2, num_nodes=3, ssl=(ssl == 'SSL'), compaction_strategy=compaction_strategy) @since('4.0') def test_zerocopy_streaming(self): self._test_streaming(op_zerocopy=operator.gt, op_partial=operator.eq, num_zerocopy=1, num_partial=0, num_nodes=2, rf=2) @since('4.0') def test_zerocopy_streaming_no_replication(self): self._test_streaming(op_zerocopy=operator.eq, op_partial=operator.eq, num_zerocopy=0, num_partial=0, rf=1, num_nodes=3)
{ "content_hash": "0a005acf48ad6cb095d4a2ab93acd72b", "timestamp": "", "source": "github", "line_count": 106, "max_line_length": 145, "avg_line_length": 42.235849056603776, "alnum_prop": 0.6209515300424391, "repo_name": "pcmanus/cassandra-dtest", "id": "34109202eb67ba481daff50c3010f4dad61fa72e", "size": "4477", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "streaming_test.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "Python", "bytes": "1176235" } ], "symlink_target": "" }
package org.apache.hadoop.hdfs.server.namenode; import java.io.IOException; import java.util.ArrayList; import java.util.Collection; import java.util.List; import java.util.Map; import java.util.SortedMap; import java.util.SortedSet; import java.util.TreeMap; import java.util.TreeSet; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.hadoop.classification.InterfaceAudience; import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.UnresolvedLinkException; import org.apache.hadoop.hdfs.protocol.FSConstants; import static org.apache.hadoop.hdfs.server.common.Util.now; /** * LeaseManager does the lease housekeeping for writing on files. * This class also provides useful static methods for lease recovery. * * Lease Recovery Algorithm * 1) Namenode retrieves lease information * 2) For each file f in the lease, consider the last block b of f * 2.1) Get the datanodes which contains b * 2.2) Assign one of the datanodes as the primary datanode p * 2.3) p obtains a new generation stamp form the namenode * 2.4) p get the block info from each datanode * 2.5) p computes the minimum block length * 2.6) p updates the datanodes, which have a valid generation stamp, * with the new generation stamp and the minimum block length * 2.7) p acknowledges the namenode the update results * 2.8) Namenode updates the BlockInfo * 2.9) Namenode removes f from the lease * and removes the lease once all files have been removed * 2.10) Namenode commit changes to edit log */ @InterfaceAudience.Private public class LeaseManager { public static final Log LOG = LogFactory.getLog(LeaseManager.class); private final FSNamesystem fsnamesystem; private long softLimit = FSConstants.LEASE_SOFTLIMIT_PERIOD; private long hardLimit = FSConstants.LEASE_HARDLIMIT_PERIOD; // // Used for handling lock-leases // Mapping: leaseHolder -> Lease // private SortedMap<String, Lease> leases = new TreeMap<String, Lease>(); // Set of: Lease private SortedSet<Lease> sortedLeases = new TreeSet<Lease>(); // // Map path names to leases. It is protected by the sortedLeases lock. // The map stores pathnames in lexicographical order. // private SortedMap<String, Lease> sortedLeasesByPath = new TreeMap<String, Lease>(); LeaseManager(FSNamesystem fsnamesystem) {this.fsnamesystem = fsnamesystem;} Lease getLease(String holder) { return leases.get(holder); } SortedSet<Lease> getSortedLeases() {return sortedLeases;} /** @return the lease containing src */ public Lease getLeaseByPath(String src) {return sortedLeasesByPath.get(src);} /** @return the number of leases currently in the system */ public synchronized int countLease() {return sortedLeases.size();} /** @return the number of paths contained in all leases */ synchronized int countPath() { int count = 0; for(Lease lease : sortedLeases) { count += lease.getPaths().size(); } return count; } /** * Adds (or re-adds) the lease for the specified file. */ synchronized Lease addLease(String holder, String src) { Lease lease = getLease(holder); if (lease == null) { lease = new Lease(holder); leases.put(holder, lease); sortedLeases.add(lease); } else { renewLease(lease); } sortedLeasesByPath.put(src, lease); lease.paths.add(src); return lease; } /** * Remove the specified lease and src. */ synchronized void removeLease(Lease lease, String src) { sortedLeasesByPath.remove(src); if (!lease.removePath(src)) { LOG.error(src + " not found in lease.paths (=" + lease.paths + ")"); } if (!lease.hasPath()) { leases.remove(lease.holder); if (!sortedLeases.remove(lease)) { LOG.error(lease + " not found in sortedLeases"); } } } /** * Remove the lease for the specified holder and src */ synchronized void removeLease(String holder, String src) { Lease lease = getLease(holder); if (lease != null) { removeLease(lease, src); } } /** * Reassign lease for file src to the new holder. */ synchronized Lease reassignLease(Lease lease, String src, String newHolder) { assert newHolder != null : "new lease holder is null"; if (lease != null) { removeLease(lease, src); } return addLease(newHolder, src); } /** * Finds the pathname for the specified pendingFile */ synchronized String findPath(INodeFileUnderConstruction pendingFile) throws IOException { Lease lease = getLease(pendingFile.getClientName()); if (lease != null) { String src = lease.findPath(pendingFile); if (src != null) { return src; } } throw new IOException("pendingFile (=" + pendingFile + ") not found." + "(lease=" + lease + ")"); } /** * Renew the lease(s) held by the given client */ synchronized void renewLease(String holder) { renewLease(getLease(holder)); } synchronized void renewLease(Lease lease) { if (lease != null) { sortedLeases.remove(lease); lease.renew(); sortedLeases.add(lease); } } /************************************************************ * A Lease governs all the locks held by a single client. * For each client there's a corresponding lease, whose * timestamp is updated when the client periodically * checks in. If the client dies and allows its lease to * expire, all the corresponding locks can be released. *************************************************************/ class Lease implements Comparable<Lease> { private final String holder; private long lastUpdate; private final Collection<String> paths = new TreeSet<String>(); /** Only LeaseManager object can create a lease */ private Lease(String holder) { this.holder = holder; renew(); } /** Only LeaseManager object can renew a lease */ private void renew() { this.lastUpdate = now(); } /** @return true if the Hard Limit Timer has expired */ public boolean expiredHardLimit() { return now() - lastUpdate > hardLimit; } /** @return true if the Soft Limit Timer has expired */ public boolean expiredSoftLimit() { return now() - lastUpdate > softLimit; } /** * @return the path associated with the pendingFile and null if not found. */ private String findPath(INodeFileUnderConstruction pendingFile) { try { for (String src : paths) { if (fsnamesystem.dir.getFileINode(src) == pendingFile) { return src; } } } catch (UnresolvedLinkException e) { throw new AssertionError("Lease files should reside on this FS"); } return null; } /** Does this lease contain any path? */ boolean hasPath() {return !paths.isEmpty();} boolean removePath(String src) { return paths.remove(src); } /** {@inheritDoc} */ public String toString() { return "[Lease. Holder: " + holder + ", pendingcreates: " + paths.size() + "]"; } /** {@inheritDoc} */ public int compareTo(Lease o) { Lease l1 = this; Lease l2 = o; long lu1 = l1.lastUpdate; long lu2 = l2.lastUpdate; if (lu1 < lu2) { return -1; } else if (lu1 > lu2) { return 1; } else { return l1.holder.compareTo(l2.holder); } } /** {@inheritDoc} */ public boolean equals(Object o) { if (!(o instanceof Lease)) { return false; } Lease obj = (Lease) o; if (lastUpdate == obj.lastUpdate && holder.equals(obj.holder)) { return true; } return false; } /** {@inheritDoc} */ public int hashCode() { return holder.hashCode(); } Collection<String> getPaths() { return paths; } String getHolder() { return holder; } void replacePath(String oldpath, String newpath) { paths.remove(oldpath); paths.add(newpath); } } synchronized void changeLease(String src, String dst, String overwrite, String replaceBy) { if (LOG.isDebugEnabled()) { LOG.debug(getClass().getSimpleName() + ".changelease: " + " src=" + src + ", dest=" + dst + ", overwrite=" + overwrite + ", replaceBy=" + replaceBy); } final int len = overwrite.length(); for(Map.Entry<String, Lease> entry : findLeaseWithPrefixPath(src, sortedLeasesByPath)) { final String oldpath = entry.getKey(); final Lease lease = entry.getValue(); //overwrite must be a prefix of oldpath final String newpath = replaceBy + oldpath.substring(len); if (LOG.isDebugEnabled()) { LOG.debug("changeLease: replacing " + oldpath + " with " + newpath); } lease.replacePath(oldpath, newpath); sortedLeasesByPath.remove(oldpath); sortedLeasesByPath.put(newpath, lease); } } synchronized void removeLeaseWithPrefixPath(String prefix) { for(Map.Entry<String, Lease> entry : findLeaseWithPrefixPath(prefix, sortedLeasesByPath)) { if (LOG.isDebugEnabled()) { LOG.debug(LeaseManager.class.getSimpleName() + ".removeLeaseWithPrefixPath: entry=" + entry); } removeLease(entry.getValue(), entry.getKey()); } } static private List<Map.Entry<String, Lease>> findLeaseWithPrefixPath( String prefix, SortedMap<String, Lease> path2lease) { if (LOG.isDebugEnabled()) { LOG.debug(LeaseManager.class.getSimpleName() + ".findLease: prefix=" + prefix); } List<Map.Entry<String, Lease>> entries = new ArrayList<Map.Entry<String, Lease>>(); final int srclen = prefix.length(); for(Map.Entry<String, Lease> entry : path2lease.tailMap(prefix).entrySet()) { final String p = entry.getKey(); if (!p.startsWith(prefix)) { return entries; } if (p.length() == srclen || p.charAt(srclen) == Path.SEPARATOR_CHAR) { entries.add(entry); } } return entries; } public void setLeasePeriod(long softLimit, long hardLimit) { this.softLimit = softLimit; this.hardLimit = hardLimit; } /****************************************************** * Monitor checks for leases that have expired, * and disposes of them. ******************************************************/ class Monitor implements Runnable { final String name = getClass().getSimpleName(); /** Check leases periodically. */ public void run() { for(; fsnamesystem.isRunning(); ) { fsnamesystem.writeLock(); try { if (!fsnamesystem.isInSafeMode()) { checkLeases(); } } finally { fsnamesystem.writeUnlock(); } try { Thread.sleep(2000); } catch(InterruptedException ie) { if (LOG.isDebugEnabled()) { LOG.debug(name + " is interrupted", ie); } } } } } /** Check the leases beginning from the oldest. */ private synchronized void checkLeases() { for(; sortedLeases.size() > 0; ) { final Lease oldest = sortedLeases.first(); if (!oldest.expiredHardLimit()) { return; } LOG.info("Lease " + oldest + " has expired hard limit"); final List<String> removing = new ArrayList<String>(); // need to create a copy of the oldest lease paths, becuase // internalReleaseLease() removes paths corresponding to empty files, // i.e. it needs to modify the collection being iterated over // causing ConcurrentModificationException String[] leasePaths = new String[oldest.getPaths().size()]; oldest.getPaths().toArray(leasePaths); for(String p : leasePaths) { try { if(fsnamesystem.internalReleaseLease(oldest, p, "HDFS_NameNode")) { LOG.info("Lease recovery for file " + p + " is complete. File closed."); removing.add(p); } else LOG.info("Started block recovery for file " + p + " lease " + oldest); } catch (IOException e) { LOG.error("Cannot release the path "+p+" in the lease "+oldest, e); removing.add(p); } } for(String p : removing) { removeLease(oldest, p); } } } /** {@inheritDoc} */ public synchronized String toString() { return getClass().getSimpleName() + "= {" + "\n leases=" + leases + "\n sortedLeases=" + sortedLeases + "\n sortedLeasesByPath=" + sortedLeasesByPath + "\n}"; } }
{ "content_hash": "2b2a037e4a19ddeb8a75bed0ce923026", "timestamp": "", "source": "github", "line_count": 420, "max_line_length": 95, "avg_line_length": 30.395238095238096, "alnum_prop": 0.6173429421901927, "repo_name": "steveloughran/hadoop-hdfs", "id": "77ca87860a49494bbe77f1486f84a93654f5ccb7", "size": "13572", "binary": false, "copies": "3", "ref": "refs/heads/HDFS-165-NPE-datanode-handshake", "path": "src/java/org/apache/hadoop/hdfs/server/namenode/LeaseManager.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C", "bytes": "203226" }, { "name": "C++", "bytes": "243118" }, { "name": "Java", "bytes": "4869978" }, { "name": "Objective-C", "bytes": "118273" }, { "name": "PHP", "bytes": "152555" }, { "name": "Perl", "bytes": "140392" }, { "name": "Python", "bytes": "143884" }, { "name": "Ruby", "bytes": "28485" }, { "name": "Shell", "bytes": "60984" }, { "name": "Smalltalk", "bytes": "56562" } ], "symlink_target": "" }
using System; using System.ComponentModel; namespace Azure.Analytics.Synapse.Artifacts.Models { /// <summary> The HDInsightActivityDebugInfoOption settings to use. </summary> public readonly partial struct HDInsightActivityDebugInfoOption : IEquatable<HDInsightActivityDebugInfoOption> { private readonly string _value; /// <summary> Determines if two <see cref="HDInsightActivityDebugInfoOption"/> values are the same. </summary> public HDInsightActivityDebugInfoOption(string value) { _value = value ?? throw new ArgumentNullException(nameof(value)); } private const string NoneValue = "None"; private const string AlwaysValue = "Always"; private const string FailureValue = "Failure"; /// <summary> None. </summary> public static HDInsightActivityDebugInfoOption None { get; } = new HDInsightActivityDebugInfoOption(NoneValue); /// <summary> Always. </summary> public static HDInsightActivityDebugInfoOption Always { get; } = new HDInsightActivityDebugInfoOption(AlwaysValue); /// <summary> Failure. </summary> public static HDInsightActivityDebugInfoOption Failure { get; } = new HDInsightActivityDebugInfoOption(FailureValue); /// <summary> Determines if two <see cref="HDInsightActivityDebugInfoOption"/> values are the same. </summary> public static bool operator ==(HDInsightActivityDebugInfoOption left, HDInsightActivityDebugInfoOption right) => left.Equals(right); /// <summary> Determines if two <see cref="HDInsightActivityDebugInfoOption"/> values are not the same. </summary> public static bool operator !=(HDInsightActivityDebugInfoOption left, HDInsightActivityDebugInfoOption right) => !left.Equals(right); /// <summary> Converts a string to a <see cref="HDInsightActivityDebugInfoOption"/>. </summary> public static implicit operator HDInsightActivityDebugInfoOption(string value) => new HDInsightActivityDebugInfoOption(value); /// <inheritdoc /> [EditorBrowsable(EditorBrowsableState.Never)] public override bool Equals(object obj) => obj is HDInsightActivityDebugInfoOption other && Equals(other); /// <inheritdoc /> public bool Equals(HDInsightActivityDebugInfoOption other) => string.Equals(_value, other._value, StringComparison.InvariantCultureIgnoreCase); /// <inheritdoc /> [EditorBrowsable(EditorBrowsableState.Never)] public override int GetHashCode() => _value?.GetHashCode() ?? 0; /// <inheritdoc /> public override string ToString() => _value; } }
{ "content_hash": "59ae8e86e3ebbd1c1f926770fb2643b4", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 151, "avg_line_length": 57.71739130434783, "alnum_prop": 0.7129943502824859, "repo_name": "stankovski/azure-sdk-for-net", "id": "126b98487f586903a001b92b5c562ce6981dbcc9", "size": "2793", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "sdk/synapse/Azure.Analytics.Synapse.Artifacts/src/Generated/Models/HDInsightActivityDebugInfoOption.cs", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C#", "bytes": "33972632" }, { "name": "Cucumber", "bytes": "89597" }, { "name": "Shell", "bytes": "675" } ], "symlink_target": "" }
typedef char bool; #define true 1 #define false 0 struct list_element { struct list_element * next; struct list_element * previous; }; typedef struct list_element list_element; typedef struct { list_element * first; list_element * last; } list; void list_init(list * container) { container->first = 0; container->last = 0; } bool list_empty(list * container) { return 0 == container->first; } list_element * list_begin(list * container) { return container->first; } list_element * list_next(list_element * element) { return element->next; } list_element * list_previous(list_element * element) { return element->previous; } void list_push_back(list * container, list_element * element) { if(list_empty(container)) { container->first = element; container->first->previous = 0; container->last = element; } else { container->last->next = element; element->previous = container->last; container->last = element; } element->next = 0; } list_element * list_pop_front(list * container) { list_element * element = container->first; container->first = container->first->next; if(container->first) { container->first->previous = 0; } return element; } // Add data to the program to see how it works typedef struct { list_element header; int value; } item; int main() { list items; item * a = (item *) malloc(sizeof(item)); item * b = (item *) malloc(sizeof(item)); item * c = (item *) malloc(sizeof(item)); printf("What is the value of the first node?\n"); scanf("%i", &a->value); printf("What is the value of the second node?\n"); scanf("%i", &b->value); printf("What is the value of the third node?\n"); scanf("%i", &c->value); list_init(&items); list_push_back(&items, &a->header); list_push_back(&items, &b->header); list_push_back(&items, &c->header); for(a = (item *) list_begin(&items); a; a = (item *) list_next(&a->header)) { printf("Loop Started\n"); if(list_previous(&a->header)) { b = (item *) list_previous(&a->header); printf("Previous element:%d\n", b->value); } printf("Current element:%d\n",a->value); if(list_next(&a->header)) { c = (item *) list_next(&a->header); printf("Next element:%d\n",c->value); } printf("Loop Ended\n\n"); } while(!list_empty(&items)) { a = (item *) list_pop_front(&items); free(a); } return 0; }
{ "content_hash": "7209125e46507e8d112dde27fc878c4d", "timestamp": "", "source": "github", "line_count": 129, "max_line_length": 77, "avg_line_length": 19.007751937984494, "alnum_prop": 0.6174551386623165, "repo_name": "arelenglish/programming-exercises", "id": "33e052c75e0231a60218e8dcac82012e849c0014", "size": "2543", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "c/double_linked_list.c", "mode": "33188", "license": "mit", "language": [ { "name": "C", "bytes": "2543" }, { "name": "Go", "bytes": "567" }, { "name": "JavaScript", "bytes": "1983" }, { "name": "Ruby", "bytes": "5730" } ], "symlink_target": "" }
/* * This file is public domain. Alternatively, you * can use it under Creative Commons Zero license */ package indexer.config object Indexer { /** * Built-in indexer classes. Do not put the abstract classes * in this list. */ val builtin = Seq( // "indexer.PDFIndexer", // "indexer.PlainTextIndexer", "indexer.TikaIndexer", "indexer.BasicInfoIndexer", "indexer.xml.EAGIndexer" ) }
{ "content_hash": "8e2783e89f1b7295fe5af5426e7618d9", "timestamp": "", "source": "github", "line_count": 20, "max_line_length": 64, "avg_line_length": 22.7, "alnum_prop": 0.6189427312775331, "repo_name": "ivan-cukic/litef-conductor", "id": "e1910cdec5455baa67cd19524b9cc323cb497a62", "size": "454", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/scala/indexer/config/Indexer.scala", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "3248" }, { "name": "HTML", "bytes": "12085" }, { "name": "JavaScript", "bytes": "110543" }, { "name": "Scala", "bytes": "437868" }, { "name": "Shell", "bytes": "1295" }, { "name": "Web Ontology Language", "bytes": "49613" } ], "symlink_target": "" }
<?php /** * GithubScm * * PHP version 8.1.1 * * @category Class * @package OpenAPI\Server\Model * @author OpenAPI Generator team * @link https://github.com/openapitools/openapi-generator */ /** * Swaggy Jenkins * * Jenkins API clients generated from Swagger / Open API specification * * The version of the OpenAPI document: 1.5.1-pre.0 * Contact: [email protected] * Generated by: https://github.com/openapitools/openapi-generator.git * */ /** * NOTE: This class is auto generated by the openapi generator program. * https://github.com/openapitools/openapi-generator * Do not edit the class manually. */ namespace OpenAPI\Server\Model; use Symfony\Component\Validator\Constraints as Assert; use JMS\Serializer\Annotation\Type; use JMS\Serializer\Annotation\SerializedName; /** * Class representing the GithubScm model. * * @package OpenAPI\Server\Model * @author OpenAPI Generator team */ class GithubScm { /** * @var string|null * @SerializedName("_class") * @Assert\Type("string") * @Type("string") */ protected $class; /** * @var OpenAPI\Server\Model\GithubScmlinks|null * @SerializedName("_links") * @Assert\Type("OpenAPI\Server\Model\GithubScmlinks") * @Type("OpenAPI\Server\Model\GithubScmlinks") */ protected $links; /** * @var string|null * @SerializedName("credentialId") * @Assert\Type("string") * @Type("string") */ protected $credentialId; /** * @var string|null * @SerializedName("id") * @Assert\Type("string") * @Type("string") */ protected $id; /** * @var string|null * @SerializedName("uri") * @Assert\Type("string") * @Type("string") */ protected $uri; /** * Constructor * @param mixed[] $data Associated array of property values initializing the model */ public function __construct(array $data = null) { $this->class = isset($data['class']) ? $data['class'] : null; $this->links = isset($data['links']) ? $data['links'] : null; $this->credentialId = isset($data['credentialId']) ? $data['credentialId'] : null; $this->id = isset($data['id']) ? $data['id'] : null; $this->uri = isset($data['uri']) ? $data['uri'] : null; } /** * Gets class. * * @return string|null */ public function getClass() { return $this->class; } /** * Sets class. * * @param string|null $class * * @return $this */ public function setClass($class = null) { $this->class = $class; return $this; } /** * Gets links. * * @return OpenAPI\Server\Model\GithubScmlinks|null */ public function getLinks(): ?GithubScmlinks { return $this->links; } /** * Sets links. * * @param OpenAPI\Server\Model\GithubScmlinks|null $links * * @return $this */ public function setLinks(GithubScmlinks $links = null) { $this->links = $links; return $this; } /** * Gets credentialId. * * @return string|null */ public function getCredentialId() { return $this->credentialId; } /** * Sets credentialId. * * @param string|null $credentialId * * @return $this */ public function setCredentialId($credentialId = null) { $this->credentialId = $credentialId; return $this; } /** * Gets id. * * @return string|null */ public function getId() { return $this->id; } /** * Sets id. * * @param string|null $id * * @return $this */ public function setId($id = null) { $this->id = $id; return $this; } /** * Gets uri. * * @return string|null */ public function getUri() { return $this->uri; } /** * Sets uri. * * @param string|null $uri * * @return $this */ public function setUri($uri = null) { $this->uri = $uri; return $this; } }
{ "content_hash": "3005458a83a12872639a20eaa005d985", "timestamp": "", "source": "github", "line_count": 218, "max_line_length": 90, "avg_line_length": 19.353211009174313, "alnum_prop": 0.5461009717942641, "repo_name": "cliffano/swaggy-jenkins", "id": "538cc57c9775eda49ca8bdbf75405b181513b55b", "size": "4219", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "clients/php-symfony/generated/Model/GithubScm.php", "mode": "33188", "license": "mit", "language": [ { "name": "Ada", "bytes": "569823" }, { "name": "Apex", "bytes": "741346" }, { "name": "Batchfile", "bytes": "14792" }, { "name": "C", "bytes": "971274" }, { "name": "C#", "bytes": "5131336" }, { "name": "C++", "bytes": "7799032" }, { "name": "CMake", "bytes": "20609" }, { "name": "CSS", "bytes": "4873" }, { "name": "Clojure", "bytes": "129018" }, { "name": "Crystal", "bytes": "864941" }, { "name": "Dart", "bytes": "876777" }, { "name": "Dockerfile", "bytes": "7385" }, { "name": "Eiffel", "bytes": "424642" }, { "name": "Elixir", "bytes": "139252" }, { "name": "Elm", "bytes": "187067" }, { "name": "Emacs Lisp", "bytes": "191" }, { "name": "Erlang", "bytes": "373074" }, { "name": "F#", "bytes": "556012" }, { "name": "Gherkin", "bytes": "951" }, { "name": "Go", "bytes": "345227" }, { "name": "Groovy", "bytes": "89524" }, { "name": "HTML", "bytes": "2367424" }, { "name": "Haskell", "bytes": "680841" }, { "name": "Java", "bytes": "12164874" }, { "name": "JavaScript", "bytes": "1959006" }, { "name": "Kotlin", "bytes": "1280953" }, { "name": "Lua", "bytes": "322316" }, { "name": "Makefile", "bytes": "11882" }, { "name": "Nim", "bytes": "65818" }, { "name": "OCaml", "bytes": "94665" }, { "name": "Objective-C", "bytes": "464903" }, { "name": "PHP", "bytes": "4383673" }, { "name": "Perl", "bytes": "743304" }, { "name": "PowerShell", "bytes": "678274" }, { "name": "Python", "bytes": "5529523" }, { "name": "QMake", "bytes": "6915" }, { "name": "R", "bytes": "840841" }, { "name": "Raku", "bytes": "10945" }, { "name": "Ruby", "bytes": "328360" }, { "name": "Rust", "bytes": "1735375" }, { "name": "Scala", "bytes": "1387368" }, { "name": "Shell", "bytes": "407167" }, { "name": "Swift", "bytes": "342562" }, { "name": "TypeScript", "bytes": "3060093" } ], "symlink_target": "" }
package core_test import ( "strings" "testing" "time" "github.com/OpenBazaar/wallet-interface" "github.com/golang/protobuf/ptypes" "github.com/OpenBazaar/openbazaar-go/core" "github.com/OpenBazaar/openbazaar-go/repo" "github.com/OpenBazaar/openbazaar-go/test/factory" ) func TestReleaseFundsAfterTimeoutErrors(t *testing.T) { sale := factory.NewSaleRecord() sale.Contract = factory.NewDisputedContract() // Fresh dispute timestamp test disputeStart, err := ptypes.TimestampProto(time.Now()) if err != nil { t.Fatal(err) } else { sale.Contract.Dispute.Timestamp = disputeStart } node := &core.OpenBazaarNode{} err = node.ReleaseFundsAfterTimeout(sale.Contract, []*wallet.TransactionRecord{}) if err == nil { t.Fatal("Expected sale which just now opened a dispute to return an error") } if !strings.Contains(err.Error(), core.ErrPrematureReleaseOfTimedoutEscrowFunds.Error()) { t.Error("Expected error to indicate the problem to be due to premature release of escrow funds") } // Expiring dispute timestamp test disputeStart, err = ptypes.TimestampProto(time.Now().Add(time.Duration(repo.DisputeTotalDurationHours) * time.Hour).Add(time.Duration(-1) * time.Minute)) if err != nil { t.Fatal(err) } sale.Contract.Dispute.Timestamp = disputeStart err = node.ReleaseFundsAfterTimeout(sale.Contract, []*wallet.TransactionRecord{}) if err == nil { t.Fatal("Expected sale whose dispute funds are one minute prior to timing out to return an error") } if !strings.Contains(err.Error(), core.ErrPrematureReleaseOfTimedoutEscrowFunds.Error()) { t.Error("Expected error to indicate the problem to be due to premature release of escrow funds") } }
{ "content_hash": "d04abb9ce6fb011b45d2f6f8c05b5720", "timestamp": "", "source": "github", "line_count": 50, "max_line_length": 154, "avg_line_length": 33.7, "alnum_prop": 0.7507418397626113, "repo_name": "hoffmabc/openbazaar-go", "id": "ab8f377a561e9e681141d101e92a75fa38bf3c24", "size": "1685", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "core/completion_test.go", "mode": "33188", "license": "mit", "language": [ { "name": "Dockerfile", "bytes": "495" }, { "name": "Go", "bytes": "1370391" }, { "name": "Makefile", "bytes": "856" }, { "name": "Python", "bytes": "279362" }, { "name": "Shell", "bytes": "2748" } ], "symlink_target": "" }
package com.google.javascript.jscomp; import com.google.javascript.jscomp.CompilerOptions.LanguageMode; /** * Test that errors and warnings are generated in appropriate cases and * appropriate cases only by VariableReferenceCheck when checking ES6 input * */ public final class Es6VariableReferenceCheckTest extends CompilerTestCase { private static final String LET_RUN = "let a = 1; let b = 2; let c = a + b, d = c;"; @Override public CompilerPass getProcessor(Compiler compiler) { return new VariableReferenceCheck(compiler); } @Override public void setUp() throws Exception { super.setUp(); setAcceptedLanguage(LanguageMode.ECMASCRIPT6); } public void testCorrectCode() { assertNoWarning(LET_RUN); assertNoWarning("function f() { " + LET_RUN + "}"); assertNoWarning("try { let e; } catch (e) { let x; }"); } public void testUndeclaredLet() { assertEarlyReferenceError("if (a) { x = 3; let x;}"); assertEarlyReferenceError(LINE_JOINER.join( "var x = 1;", "if (true) {", " x++;", " let x = 3;", "}")); } public void testUndeclaredConst() { assertEarlyReferenceError("if (a) { x = 3; const x = 3;}"); // For the following, IE 11 gives "Assignment to const", but technically // they are also undeclared references, which get caught in the first place. assertEarlyReferenceError(LINE_JOINER.join( "var x = 1;", "if (true) {", " x++;", " const x = 3;", "}")); assertEarlyReferenceError("a = 1; const a = 0;"); assertEarlyReferenceError("a++; const a = 0;"); } public void testIllegalLetShadowing() { assertRedeclareError("if (a) { let x; var x;}"); assertRedeclareError("if (a) { let x; let x;}"); assertRedeclareError(LINE_JOINER.join( "function f() {", " let x;", " if (a) {", " var x;", " }", "}")); assertNoWarning(LINE_JOINER.join( "function f() {", " if (a) {", " let x;", " }", " var x;", "}")); assertNoWarning( LINE_JOINER.join( "function f() {", " if (a) { let x; }", " if (b) { var x; }", "}")); assertRedeclareError("let x; var x;"); assertRedeclareError("var x; let x;"); assertRedeclareError("let x; let x;"); } public void testDuplicateLetConst() { assertRedeclareError("let x, x;"); assertRedeclareError("const x = 0, x = 0;"); } public void testIllegalBlockScopedEarlyReference() { assertEarlyReferenceError("let x = x"); assertEarlyReferenceError("const x = x"); assertEarlyReferenceError("let x = x || 0"); assertEarlyReferenceError("const x = x || 0"); // In the following cases, "x" might not be reachable but we warn anyways assertEarlyReferenceError("let x = expr || x"); assertEarlyReferenceError("const x = expr || x"); assertEarlyReferenceError("X; class X {};"); } public void testCorrectEarlyReference() { assertNoWarning("var goog = goog || {}"); assertNoWarning("function f() { a = 2; } var a = 2;"); } public void testIllegalConstShadowing() { assertRedeclareError("if (a) { const x = 3; var x;}"); assertRedeclareError(LINE_JOINER.join( "function f() {", " const x = 3;", " if (a) {", " var x;", " }", "}")); } public void testVarShadowing() { assertRedeclareGlobal("if (a) { var x; var x;}"); assertRedeclareError("if (a) { var x; let x;}"); assertRedeclare("function f() { var x; if (a) { var x; }}"); assertRedeclareError("function f() { if (a) { var x; } let x;}"); assertNoWarning("function f() { var x; if (a) { let x; }}"); assertNoWarning( LINE_JOINER.join( "function f() {", " if (a) { var x; }", " if (b) { let x; }", "}")); } public void testParameterShadowing() { assertParameterShadowed("function f(x) { let x; }"); assertParameterShadowed("function f(x) { const x = 3; }"); assertParameterShadowed("function f(X) { class X {} }"); assertRedeclare("function f(x) { function x() {} }"); assertRedeclare("function f(x) { var x; }"); assertRedeclare("function f(x=3) { var x; }"); assertRedeclare("function f(...x) { var x; }"); assertRedeclare("function f(...x) { function x() {} }"); assertRedeclare("function f(x=3) { function x() {} }"); assertNoWarning("function f(x) { if (true) { let x; } }"); assertNoWarning(LINE_JOINER.join( "function outer(x) {", " function inner() {", " let x = 1;", " }", "}")); assertNoWarning(LINE_JOINER.join( "function outer(x) {", " function inner() {", " var x = 1;", " }", "}")); assertRedeclare("function f({a, b}) { var a = 2 }"); assertRedeclare("function f({a, b}) { if (!a) var a = 6; }"); } public void testReassignedConst() { assertReassign("const a = 0; a = 1;"); assertReassign("const a = 0; a++;"); } public void testLetConstNotDirectlyInBlock() { testSame("if (true) var x = 3;"); testError("if (true) let x = 3;", VariableReferenceCheck.DECLARATION_NOT_DIRECTLY_IN_BLOCK); testError("if (true) const x = 3;", VariableReferenceCheck.DECLARATION_NOT_DIRECTLY_IN_BLOCK); testError("if (true) class C {}", VariableReferenceCheck.DECLARATION_NOT_DIRECTLY_IN_BLOCK); testError("if (true) function f() {}", VariableReferenceCheck.DECLARATION_NOT_DIRECTLY_IN_BLOCK); } public void testFunctionHoisting() { assertEarlyReference("if (true) { f(); function f() {} }"); } public void testFunctionHoistingRedeclaration1() { String[] js = { "var x;", "function x() {}", }; String message = "Variable x first declared in input0"; test(js, null, VarCheck.VAR_MULTIPLY_DECLARED_ERROR, null, message); } public void testFunctionHoistingRedeclaration2() { String[] js = { "function x() {}", "var x;", }; String message = "Variable x first declared in input0"; test(js, null, VarCheck.VAR_MULTIPLY_DECLARED_ERROR, null, message); } public void testArrowFunction() { assertNoWarning("var f = x => { return x+1; };"); assertNoWarning("var odds = [1,2,3,4].filter((n) => n%2 == 1)"); assertRedeclare("var f = x => {var x;}"); assertParameterShadowed("var f = x => {let x;}"); } public void testTryCatch() { assertRedeclareError( LINE_JOINER.join( "function f() {", " try {", " let e = 0;", " if (true) {", " let e = 1;", " }", " } catch (e) {", " let e;", " }", "}")); assertRedeclareError( LINE_JOINER.join( "function f() {", " try {", " let e = 0;", " if (true) {", " let e = 1;", " }", " } catch (e) {", " var e;", " }", "}")); assertRedeclareError( LINE_JOINER.join( "function f() {", " try {", " let e = 0;", " if (true) {", " let e = 1;", " }", " } catch (e) {", " function e() {", " var e;", " }", " }", "}")); } public void testClass() { assertNoWarning("class A { f() { return 1729; } }"); } public void testClassExtend() { assertNoWarning("class A {} class C extends A {} C = class extends A {}"); } public void testArrayPattern() { assertNoWarning("var [a] = [1];"); assertNoWarning("var [a, b] = [1, 2];"); assertEarlyReference("alert(a); var [a] = [1];"); assertEarlyReference("alert(b); var [a, b] = [1, 2];"); assertEarlyReference("[a] = [1]; var a;"); assertEarlyReference("[a, b] = [1]; var b;"); } public void testArrayPattern_defaultValue() { assertNoWarning("var [a = 1] = [2];"); assertNoWarning("var [a = 1] = [];"); assertEarlyReference("alert(a); var [a = 1] = [2];"); assertEarlyReference("alert(a); var [a = 1] = [];"); assertEarlyReference("alert(a); var [a = b] = [1];"); assertEarlyReference("alert(a); var [a = b] = [];"); } public void testObjectPattern() { assertNoWarning("var {a: b} = {a: 1};"); assertNoWarning("var {a: b} = {};"); assertNoWarning("var {a} = {a: 1};"); // 'a' is not declared at all, so the 'a' passed to alert() references // the global variable 'a', and there is no warning. assertNoWarning("alert(a); var {a: b} = {};"); assertEarlyReference("alert(b); var {a: b} = {a: 1};"); assertEarlyReference("alert(a); var {a} = {a: 1};"); assertEarlyReference("({a: b} = {}); var a, b;"); } public void testObjectPattern_defaultValue() { assertEarlyReference("alert(b); var {a: b = c} = {a: 1};"); assertEarlyReference("alert(b); var {a: b = c} = {};"); assertEarlyReference("alert(a); var {a = c} = {a: 1};"); assertEarlyReference("alert(a); var {a = c} = {};"); } /** * We can't catch all possible runtime errors but it's useful to have some * basic checks. */ public void testDefaultParam() { assertEarlyReferenceError("function f(x=a) {}"); assertEarlyReferenceError("function f(x=a) { let a; }"); assertEarlyReferenceError("function f(x=a) { var a; }"); assertEarlyReferenceError("function f(x=a()) { function a() {} }"); assertEarlyReferenceError("function f(x=[a]) { var a; }"); assertEarlyReferenceError("function f(x=y, y=2) {}"); assertNoWarning("function f(x=a) {} var a;"); assertNoWarning("let b; function f(x=b) { var b; }"); assertNoWarning("function f(y = () => x, x = 5) { return y(); }"); } public void testDestructuring() { testSame(LINE_JOINER.join( "function f() { ", " var obj = {a:1, b:2}; ", " var {a:c, b:d} = obj; ", "}")); testSame(LINE_JOINER.join( "function f() { ", " var obj = {a:1, b:2}; ", " var {a, b} = obj; ", "}")); assertRedeclare(LINE_JOINER.join( "function f() { ", " var obj = {a:1, b:2}; ", " var {a:c, b:d} = obj; ", " var c = b;", "}")); assertEarlyReference(LINE_JOINER.join( "function f() { ", " var {a:c, b:d} = obj;", " var obj = {a:1, b:2};", "}")); assertEarlyReference(LINE_JOINER.join( "function f() { ", " var {a, b} = obj;", " var obj = {a:1, b:2};", "}")); assertEarlyReference(LINE_JOINER.join( "function f() { ", " var e = c;", " var {a:c, b:d} = {a:1, b:2};", "}")); } private void assertReassign(String js) { testError(js, VariableReferenceCheck.REASSIGNED_CONSTANT); } private void assertRedeclare(String js) { testWarning(js, VariableReferenceCheck.REDECLARED_VARIABLE); } private void assertRedeclareGlobal(String js) { testError(js, VarCheck.VAR_MULTIPLY_DECLARED_ERROR); } private void assertRedeclareError(String js) { testError(js, VariableReferenceCheck.REDECLARED_VARIABLE_ERROR); } private void assertParameterShadowed(String js) { testError(js, VariableReferenceCheck.REDECLARED_VARIABLE_ERROR); } private void assertEarlyReference(String js) { testSame(js, VariableReferenceCheck.EARLY_REFERENCE); } private void assertEarlyReferenceError(String js) { testError(js, VariableReferenceCheck.EARLY_REFERENCE_ERROR); } /** * Expects the JS to generate no errors or warnings. */ private void assertNoWarning(String js) { testSame(js); } }
{ "content_hash": "ecf5a3181be7da4711d0d1fe32702866", "timestamp": "", "source": "github", "line_count": 397, "max_line_length": 80, "avg_line_length": 30.148614609571787, "alnum_prop": 0.5447405798312307, "repo_name": "mneise/closure-compiler", "id": "9fed45ecec23f5be0d73d89eb82315c7c5549886", "size": "12581", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "test/com/google/javascript/jscomp/Es6VariableReferenceCheckTest.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "HTML", "bytes": "1805" }, { "name": "Java", "bytes": "12073959" }, { "name": "JavaScript", "bytes": "4444190" }, { "name": "Protocol Buffer", "bytes": "7715" } ], "symlink_target": "" }
//====================================================================================== // Copyright 5AM Solutions Inc, Yale University // // Distributed under the OSI-approved BSD 3-Clause License. // See http://ncip.github.com/caarray/LICENSE.txt for details. //====================================================================================== package gov.nih.nci.caarray.services.external; import java.util.Collections; import java.util.HashMap; import java.util.Map; import net.sf.dozer.util.mapping.DozerBeanMapper; import net.sf.dozer.util.mapping.MapperIF; /** * Utility class maintaining a cache of dozer mappers for each API version. * * @author dkokotov */ public final class BeanMapperLookup { /** * Version 1.0 of API. */ public static final String VERSION_1_0 = "v1_0"; private static final Map<String, String> CONFIG_FILES = new HashMap<String, String>(); static { CONFIG_FILES.put(VERSION_1_0, "dozerBeanMapping_v1_0.xml"); } private static final Map<String, MapperIF> MAPPERS = new HashMap<String, MapperIF>(); private BeanMapperLookup() { // NOOP } /** * Return mapper for given API version. * @param apiVersion api version to get mapper for * @return the mapper */ public static synchronized MapperIF getMapper(String apiVersion) { MapperIF mapper = MAPPERS.get(apiVersion); if (mapper == null) { String configFile = CONFIG_FILES.get(apiVersion); mapper = new DozerBeanMapper(Collections.singletonList(configFile)); MAPPERS.put(apiVersion, mapper); } return mapper; } /** * Adds a new api -> mapper association. For use by unit tests. * * @param apiVersion version of api * @param mapper associated mapper for that api version */ public static void addMapper(String apiVersion, MapperIF mapper) { MAPPERS.put(apiVersion, mapper); } }
{ "content_hash": "d29381bcc6a58d8f597100b4cfa1f52a", "timestamp": "", "source": "github", "line_count": 62, "max_line_length": 90, "avg_line_length": 32.064516129032256, "alnum_prop": 0.6016096579476862, "repo_name": "NCIP/caarray", "id": "28399ca7e187b3d6aeddf32c4ed3e5cf5d5f65bf", "size": "1988", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "software/caarray-ejb.jar/src/main/java/gov/nih/nci/caarray/services/external/BeanMapperLookup.java", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Batchfile", "bytes": "615" }, { "name": "CSS", "bytes": "126854" }, { "name": "FreeMarker", "bytes": "4941" }, { "name": "Groovy", "bytes": "4998" }, { "name": "HTML", "bytes": "101282" }, { "name": "Java", "bytes": "7360097" }, { "name": "JavaScript", "bytes": "1167628" }, { "name": "Mathematica", "bytes": "104531225" }, { "name": "PLSQL", "bytes": "38277" }, { "name": "XSLT", "bytes": "53231" } ], "symlink_target": "" }
This is an AngularJS SPA (Single Page Application) for retrieving and graphing stored data that is available on Sparkfun Phant server data streams. It also implements a simple (for now) front-end for IoT device provisioning and also a simple MQTT monitor. PhantGraphs allows to create a simple Dashboard for showing graphs with data stored in Phant server data streams. The data that is shown in the graphs can be configured, namely which fields from a data stream is shown. PhantGraphs is built on AngularJS for a Single Page Application and Angular-chartJS for generating the graphs. It can graph data from data.sparkfun.com streams and your also your own data streams hosted on your servers. Example: ![Phant Dashboard](https://primalcortex.files.wordpress.com/2015/10/selection_242.png) The graphs will auto update with the most recent data as it arrives to the streams, allowing for live updating of the graphs. More info here -> https://primalcortex.wordpress.com/2015/10/15/sparkfun-phant-server-data-stream-graphing/ Please comments and feedback on the above link. Thanks! # How to use it Clone this repository and just put the app folder under the docroot of some web-server changing it's name to phantgraphs for example. Access it by **http://mywebserver/phantgraphs**. **IMPORTANT** The application for working needs the PG-RestServer application available here: https://github.com/fcgdam/PG-RestServer.git to be running. Without this server running the application won't work. After installing the PG-RestServer and starting it, on this aplication edit the file **restapi.js** under the folder **scripts** and change the REST API end point: **Before** angular.module('phantGraph') .constant('RESTENDPOINT_URI','http://localhost:3000/api/') **After** angular.module('phantGraph') .constant('RESTENDPOINT_URI',**'http://serveraddress.domain:3000/api/'**) # MQTT The application also allows to monitor MQTT messages for topics that have been subscrided. The MQTT broker must allow WebSockets connections and be reachable. # IoT Device Provisioning The application also permits some simple IoT device provisioning, namely registration, status monitoring and allows configuration data to be saved and fed to the IoT devices. ![Device Provisioning](https://primalcortex.files.wordpress.com/2015/10/selection_239.png)
{ "content_hash": "be49626e2b8bbb8c15ffa0c2620f3c04", "timestamp": "", "source": "github", "line_count": 47, "max_line_length": 182, "avg_line_length": 50.148936170212764, "alnum_prop": 0.7874416631310989, "repo_name": "fcgdam/PhantGraphs", "id": "dff3ccfd69eb88255786267550a0db0968b86214", "size": "2371", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "README.md", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "39504" }, { "name": "HTML", "bytes": "41275" }, { "name": "JavaScript", "bytes": "1558655" } ], "symlink_target": "" }
/* Author: Ioan Sucan */ #include "ompl/geometric/planners/sbl/pSBL.h" #include "ompl/base/goals/GoalState.h" #include "ompl/tools/config/SelfConfig.h" #include <boost/thread.hpp> #include <limits> #include <cassert> ompl::geometric::pSBL::pSBL(const base::SpaceInformationPtr &si) : base::Planner(si, "pSBL"), samplerArray_(si) { specs_.recognizedGoal = base::GOAL_STATE; specs_.multithreaded = true; maxDistance_ = 0.0; setThreadCount(2); connectionPoint_ = std::make_pair<base::State*, base::State*>(NULL, NULL); Planner::declareParam<double>("range", this, &pSBL::setRange, &pSBL::getRange, "0.:1.:10000."); Planner::declareParam<unsigned int>("thread_count", this, &pSBL::setThreadCount, &pSBL::getThreadCount, "1:64"); } ompl::geometric::pSBL::~pSBL() { freeMemory(); } void ompl::geometric::pSBL::setup() { Planner::setup(); tools::SelfConfig sc(si_, getName()); sc.configureProjectionEvaluator(projectionEvaluator_); sc.configurePlannerRange(maxDistance_); tStart_.grid.setDimension(projectionEvaluator_->getDimension()); tGoal_.grid.setDimension(projectionEvaluator_->getDimension()); } void ompl::geometric::pSBL::clear() { Planner::clear(); samplerArray_.clear(); freeMemory(); tStart_.grid.clear(); tStart_.size = 0; tStart_.pdf.clear(); tGoal_.grid.clear(); tGoal_.size = 0; tGoal_.pdf.clear(); removeList_.motions.clear(); connectionPoint_ = std::make_pair<base::State*, base::State*>(NULL, NULL); } void ompl::geometric::pSBL::freeGridMotions(Grid<MotionInfo> &grid) { for (Grid<MotionInfo>::iterator it = grid.begin(); it != grid.end() ; ++it) { for (unsigned int i = 0 ; i < it->second->data.size() ; ++i) { if (it->second->data[i]->state) si_->freeState(it->second->data[i]->state); delete it->second->data[i]; } } } void ompl::geometric::pSBL::threadSolve(unsigned int tid, const base::PlannerTerminationCondition &ptc, SolutionInfo *sol) { RNG rng; std::vector<Motion*> solution; base::State *xstate = si_->allocState(); bool startTree = rng.uniformBool(); while (!sol->found && ptc == false) { bool retry = true; while (retry && !sol->found && ptc == false) { removeList_.lock.lock(); if (!removeList_.motions.empty()) { if (loopLock_.try_lock()) { retry = false; std::map<Motion*, bool> seen; for (unsigned int i = 0 ; i < removeList_.motions.size() ; ++i) if (seen.find(removeList_.motions[i].motion) == seen.end()) removeMotion(*removeList_.motions[i].tree, removeList_.motions[i].motion, seen); removeList_.motions.clear(); loopLock_.unlock(); } } else retry = false; removeList_.lock.unlock(); } if (sol->found || ptc) break; loopLockCounter_.lock(); if (loopCounter_ == 0) loopLock_.lock(); loopCounter_++; loopLockCounter_.unlock(); TreeData &tree = startTree ? tStart_ : tGoal_; startTree = !startTree; TreeData &otherTree = startTree ? tStart_ : tGoal_; Motion *existing = selectMotion(rng, tree); if (!samplerArray_[tid]->sampleNear(xstate, existing->state, maxDistance_)) continue; /* create a motion */ Motion *motion = new Motion(si_); si_->copyState(motion->state, xstate); motion->parent = existing; motion->root = existing->root; existing->lock.lock(); existing->children.push_back(motion); existing->lock.unlock(); addMotion(tree, motion); if (checkSolution(rng, !startTree, tree, otherTree, motion, solution)) { sol->lock.lock(); if (!sol->found) { sol->found = true; PathGeometric *path = new PathGeometric(si_); for (unsigned int i = 0 ; i < solution.size() ; ++i) path->append(solution[i]->state); pdef_->addSolutionPath(base::PathPtr(path), false, 0.0, getName()); } sol->lock.unlock(); } loopLockCounter_.lock(); loopCounter_--; if (loopCounter_ == 0) loopLock_.unlock(); loopLockCounter_.unlock(); } si_->freeState(xstate); } ompl::base::PlannerStatus ompl::geometric::pSBL::solve(const base::PlannerTerminationCondition &ptc) { checkValidity(); base::GoalState *goal = dynamic_cast<base::GoalState*>(pdef_->getGoal().get()); if (!goal) { OMPL_ERROR("%s: Unknown type of goal", getName().c_str()); return base::PlannerStatus::UNRECOGNIZED_GOAL_TYPE; } while (const base::State *st = pis_.nextStart()) { Motion *motion = new Motion(si_); si_->copyState(motion->state, st); motion->valid = true; motion->root = motion->state; addMotion(tStart_, motion); } if (tGoal_.size == 0) { if (si_->satisfiesBounds(goal->getState()) && si_->isValid(goal->getState())) { Motion *motion = new Motion(si_); si_->copyState(motion->state, goal->getState()); motion->valid = true; motion->root = motion->state; addMotion(tGoal_, motion); } else OMPL_ERROR("%s: Goal state is invalid!", getName().c_str()); } if (tStart_.size == 0) { OMPL_ERROR("%s: Motion planning start tree could not be initialized!", getName().c_str()); return base::PlannerStatus::INVALID_START; } if (tGoal_.size == 0) { OMPL_ERROR("%s: Motion planning goal tree could not be initialized!", getName().c_str()); return base::PlannerStatus::INVALID_GOAL; } samplerArray_.resize(threadCount_); OMPL_INFORM("%s: Starting planning with %d states already in datastructure", getName().c_str(), (int)(tStart_.size + tGoal_.size)); SolutionInfo sol; sol.found = false; loopCounter_ = 0; std::vector<boost::thread*> th(threadCount_); for (unsigned int i = 0 ; i < threadCount_ ; ++i) th[i] = new boost::thread(boost::bind(&pSBL::threadSolve, this, i, ptc, &sol)); for (unsigned int i = 0 ; i < threadCount_ ; ++i) { th[i]->join(); delete th[i]; } OMPL_INFORM("%s: Created %u (%u start + %u goal) states in %u cells (%u start + %u goal)", getName().c_str(), tStart_.size + tGoal_.size, tStart_.size, tGoal_.size, tStart_.grid.size() + tGoal_.grid.size(), tStart_.grid.size(), tGoal_.grid.size()); return sol.found ? base::PlannerStatus::EXACT_SOLUTION : base::PlannerStatus::TIMEOUT; } bool ompl::geometric::pSBL::checkSolution(RNG &rng, bool start, TreeData &tree, TreeData &otherTree, Motion *motion, std::vector<Motion*> &solution) { Grid<MotionInfo>::Coord coord; projectionEvaluator_->computeCoordinates(motion->state, coord); otherTree.lock.lock(); Grid<MotionInfo>::Cell* cell = otherTree.grid.getCell(coord); if (cell && !cell->data.empty()) { Motion *connectOther = cell->data[rng.uniformInt(0, cell->data.size() - 1)]; otherTree.lock.unlock(); if (pdef_->getGoal()->isStartGoalPairValid(start ? motion->root : connectOther->root, start ? connectOther->root : motion->root)) { Motion *connect = new Motion(si_); si_->copyState(connect->state, connectOther->state); connect->parent = motion; connect->root = motion->root; motion->lock.lock(); motion->children.push_back(connect); motion->lock.unlock(); addMotion(tree, connect); if (isPathValid(tree, connect) && isPathValid(otherTree, connectOther)) { if (start) connectionPoint_ = std::make_pair(motion->state, connectOther->state); else connectionPoint_ = std::make_pair(connectOther->state, motion->state); /* extract the motions and put them in solution vector */ std::vector<Motion*> mpath1; while (motion != NULL) { mpath1.push_back(motion); motion = motion->parent; } std::vector<Motion*> mpath2; while (connectOther != NULL) { mpath2.push_back(connectOther); connectOther = connectOther->parent; } if (!start) mpath1.swap(mpath2); for (int i = mpath1.size() - 1 ; i >= 0 ; --i) solution.push_back(mpath1[i]); solution.insert(solution.end(), mpath2.begin(), mpath2.end()); return true; } } } else otherTree.lock.unlock(); return false; } bool ompl::geometric::pSBL::isPathValid(TreeData &tree, Motion *motion) { std::vector<Motion*> mpath; /* construct the solution path */ while (motion != NULL) { mpath.push_back(motion); motion = motion->parent; } bool result = true; /* check the path */ for (int i = mpath.size() - 1 ; result && i >= 0 ; --i) { mpath[i]->lock.lock(); if (!mpath[i]->valid) { if (si_->checkMotion(mpath[i]->parent->state, mpath[i]->state)) mpath[i]->valid = true; else { // remember we need to remove this motion PendingRemoveMotion prm; prm.tree = &tree; prm.motion = mpath[i]; removeList_.lock.lock(); removeList_.motions.push_back(prm); removeList_.lock.unlock(); result = false; } } mpath[i]->lock.unlock(); } return result; } ompl::geometric::pSBL::Motion* ompl::geometric::pSBL::selectMotion(RNG &rng, TreeData &tree) { tree.lock.lock (); GridCell* cell = tree.pdf.sample(rng.uniform01()); Motion *result = cell && !cell->data.empty() ? cell->data[rng.uniformInt(0, cell->data.size() - 1)] : NULL; tree.lock.unlock (); return result; } void ompl::geometric::pSBL::removeMotion(TreeData &tree, Motion *motion, std::map<Motion*, bool> &seen) { /* remove from grid */ seen[motion] = true; Grid<MotionInfo>::Coord coord; projectionEvaluator_->computeCoordinates(motion->state, coord); Grid<MotionInfo>::Cell* cell = tree.grid.getCell(coord); if (cell) { for (unsigned int i = 0 ; i < cell->data.size(); ++i) if (cell->data[i] == motion) { cell->data.erase(cell->data.begin() + i); tree.size--; break; } if (cell->data.empty()) { tree.pdf.remove(cell->data.elem_); tree.grid.remove(cell); tree.grid.destroyCell(cell); } else { tree.pdf.update(cell->data.elem_, 1.0/cell->data.size()); } } /* remove self from parent list */ if (motion->parent) { for (unsigned int i = 0 ; i < motion->parent->children.size() ; ++i) if (motion->parent->children[i] == motion) { motion->parent->children.erase(motion->parent->children.begin() + i); break; } } /* remove children */ for (unsigned int i = 0 ; i < motion->children.size() ; ++i) { motion->children[i]->parent = NULL; removeMotion(tree, motion->children[i], seen); } if (motion->state) si_->freeState(motion->state); delete motion; } void ompl::geometric::pSBL::addMotion(TreeData &tree, Motion *motion) { Grid<MotionInfo>::Coord coord; projectionEvaluator_->computeCoordinates(motion->state, coord); tree.lock.lock(); Grid<MotionInfo>::Cell* cell = tree.grid.getCell(coord); if (cell) { cell->data.push_back(motion); tree.pdf.update(cell->data.elem_, 1.0/cell->data.size()); } else { cell = tree.grid.createCell(coord); cell->data.push_back(motion); tree.grid.add(cell); cell->data.elem_ = tree.pdf.add(cell, 1.0); } tree.size++; tree.lock.unlock(); } void ompl::geometric::pSBL::getPlannerData(base::PlannerData &data) const { Planner::getPlannerData(data); std::vector<MotionInfo> motions; tStart_.grid.getContent(motions); for (unsigned int i = 0 ; i < motions.size() ; ++i) for (unsigned int j = 0 ; j < motions[i].size() ; ++j) if (motions[i][j]->parent == NULL) data.addStartVertex(base::PlannerDataVertex(motions[i][j]->state, 1)); else data.addEdge(base::PlannerDataVertex(motions[i][j]->parent->state, 1), base::PlannerDataVertex(motions[i][j]->state, 1)); motions.clear(); tGoal_.grid.getContent(motions); for (unsigned int i = 0 ; i < motions.size() ; ++i) for (unsigned int j = 0 ; j < motions[i].size() ; ++j) if (motions[i][j]->parent == NULL) data.addGoalVertex(base::PlannerDataVertex(motions[i][j]->state, 2)); else // The edges in the goal tree are reversed so that they are in the same direction as start tree data.addEdge(base::PlannerDataVertex(motions[i][j]->state, 2), base::PlannerDataVertex(motions[i][j]->parent->state, 2)); data.addEdge(data.vertexIndex(connectionPoint_.first), data.vertexIndex(connectionPoint_.second)); } void ompl::geometric::pSBL::setThreadCount(unsigned int nthreads) { assert(nthreads > 0); threadCount_ = nthreads; }
{ "content_hash": "76d33256ed3db0d7a7ed60bb0d838345", "timestamp": "", "source": "github", "line_count": 454, "max_line_length": 148, "avg_line_length": 31.411894273127754, "alnum_prop": 0.547226702194797, "repo_name": "sonny-tarbouriech/ompl", "id": "22c9cdda4ab9a78486d91ce6cbf39e1308b6490c", "size": "16030", "binary": false, "copies": "1", "ref": "refs/heads/safety", "path": "src/ompl/geometric/planners/sbl/src/pSBL.cpp", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "10966" }, { "name": "C++", "bytes": "4050034" }, { "name": "CMake", "bytes": "57906" }, { "name": "CSS", "bytes": "2438" }, { "name": "JavaScript", "bytes": "766" }, { "name": "Python", "bytes": "260476" }, { "name": "R", "bytes": "37627" }, { "name": "Shell", "bytes": "4446" } ], "symlink_target": "" }
SYNONYM #### According to The Catalogue of Life, 3rd January 2011 #### Published in null #### Original name null ### Remarks null
{ "content_hash": "661c737f3cf1d735cdb54cd3dca1cd1c", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 39, "avg_line_length": 10.23076923076923, "alnum_prop": 0.6917293233082706, "repo_name": "mdoering/backbone", "id": "8fe873042ac0dd061e32bbdd6a3ebce2fd0d6c09", "size": "203", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "life/Plantae/Magnoliophyta/Liliopsida/Poales/Cyperaceae/Eleocharis/Eleocharis parvula/ Syn. Chaetocyperus pygmaeus/README.md", "mode": "33188", "license": "apache-2.0", "language": [], "symlink_target": "" }
package netty.file; import java.nio.charset.Charset; import java.util.Hashtable; import java.util.Map; import io.netty.bootstrap.ServerBootstrap; import io.netty.channel.ChannelInitializer; import io.netty.channel.EventLoopGroup; import io.netty.channel.nio.NioEventLoopGroup; import io.netty.channel.socket.SocketChannel; import io.netty.channel.socket.nio.NioServerSocketChannel; import io.netty.handler.codec.LengthFieldBasedFrameDecoder; import io.netty.handler.codec.string.StringDecoder; import io.netty.handler.codec.string.StringEncoder; import io.netty.handler.stream.ChunkedWriteHandler; import io.netty.util.CharsetUtil; public class NettyFileServer { private EventLoopGroup boss = null; private EventLoopGroup worker = null; private static NettyFileServer instance = new NettyFileServer(); public static Map<String, String> sharedFiles = new Hashtable<>(); public static NettyFileServer getInstance() { return instance; } private NettyFileServer() { } public void run(int port) { boss = new NioEventLoopGroup(); worker = new NioEventLoopGroup(); ServerBootstrap bootstrap = new ServerBootstrap(); bootstrap.group(boss, worker); bootstrap.channel(NioServerSocketChannel.class); bootstrap.childHandler(new NapsterServerChildHandler()); try { bootstrap.bind(port).sync(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } finally { } } public void stopServer() { boss.shutdownGracefully(); worker.shutdownGracefully(); } /** * Register new file to the file server for sharing. * * @param checksum * the checksum of the file * @param filePath * the absolute path of the file */ public void shareNewFile(String checksum, String filePath) { sharedFiles.put(checksum, filePath); } /** * Remove a shared file from the file server because it is no longer shared. * * @param checksum * the checksum of the file */ public void unshareFile(String checksum) { sharedFiles.remove(checksum); } /** * Check if the shared file requested is available. * * @param checksum * - the checksum of the file * @return whether the shared file is available */ public boolean contains(String checksum) { return sharedFiles.containsKey(checksum); } } class NapsterServerChildHandler extends ChannelInitializer<SocketChannel> { @Override protected void initChannel(SocketChannel arg0) throws Exception { arg0.pipeline().addLast("chunkedWriter", new ChunkedWriteHandler()); arg0.pipeline().addLast(new StringEncoder(Charset.forName("GBK"))); // 解码格式 arg0.pipeline().addLast(new StringDecoder(CharsetUtil.UTF_8)); arg0.pipeline().addLast(new NettyFileServerHandler()); } }
{ "content_hash": "bcc8661a0e894dfca2a112764ce136e8", "timestamp": "", "source": "github", "line_count": 103, "max_line_length": 77, "avg_line_length": 26.902912621359224, "alnum_prop": 0.7408877661494045, "repo_name": "selfzhang/gitworkplace", "id": "1f4580fbc9a6f266a122ef794e9e2f5448710349", "size": "2779", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "client/src/main/java/netty/file/NettyFileServer.java", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C#", "bytes": "126271" }, { "name": "Java", "bytes": "165002" } ], "symlink_target": "" }
require 'fileutils' tmpdir = File.expand_path(File.join(File.dirname(__FILE__),'..','tmp')) dbpath = File.join(tmpdir,'mongodb') if File.exists? dbpath puts "removing dbpath: #{dbpath}" FileUtils.rm_rf dbpath end unless File.exists? dbpath puts "creating dbpath: #{dbpath}" FileUtils.mkdir_p dbpath end command = %W(mongod -dbpath #{dbpath} -noprealloc -nojournal -noauth -port 26016 -bind_ip 127.0.0.1) puts "executing: #{command.join(' ')}" puts '************************************************************' puts 'Run specs: $ MONGO_URL=mongo://127.0.0.1:26016 bundle exec spec spec' puts '************************************************************' Kernel.exec *command
{ "content_hash": "18c3ef7ebf681f65d434f5bac9160844", "timestamp": "", "source": "github", "line_count": 22, "max_line_length": 100, "avg_line_length": 31.318181818181817, "alnum_prop": 0.5776487663280117, "repo_name": "solnic/dm-mongo-adapter", "id": "202b9e7e51f3e5d2ab7b2dfc4433be57d44bc7bd", "size": "710", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "script/mongodb.rb", "mode": "33261", "license": "mit", "language": [ { "name": "Ruby", "bytes": "86644" } ], "symlink_target": "" }
package scala.slick.driver import scala.slick.lifted.TypeMapper import scala.slick.ast.{SymbolNamer, Symbol} trait BasicSQLUtilsComponent { driver: BasicDriver => def quoteIdentifier(id: String): String = { val s = new StringBuilder(id.length + 4) append '"' for(c <- id) if(c == '"') s append "\"\"" else s append c (s append '"').toString } def quote[T](v: T)(implicit tm: TypeMapper[T]): String = tm(driver).valueToSQLLiteral(v) def likeEncode(s: String) = { val b = new StringBuilder for(c <- s) c match { case '%' | '_' | '^' => b append '^' append c case _ => b append c } b.toString } class QuotingSymbolNamer(parent: Option[SymbolNamer]) extends SymbolNamer("x", parent) { override def namedSymbolName(s: Symbol) = quoteIdentifier(s.name) } }
{ "content_hash": "2616f550949496586bb4501e413b3c63", "timestamp": "", "source": "github", "line_count": 28, "max_line_length": 90, "avg_line_length": 29.107142857142858, "alnum_prop": 0.6417177914110429, "repo_name": "zefonseca/slick-1.0.0-scala.2.11.1", "id": "1bba6672c0b81356513d15b48f6458dee17b2415", "size": "815", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/scala/scala/slick/driver/BasicSQLUtilsComponent.scala", "mode": "33188", "license": "bsd-2-clause", "language": [ { "name": "Python", "bytes": "15216" }, { "name": "Scala", "bytes": "574019" } ], "symlink_target": "" }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.18"/> <meta name="viewport" content="width=device-width, initial-scale=1"/> <title>flat: Member List</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="search/search.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="search/searchdata.js"></script> <script type="text/javascript" src="search/search.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td id="projectalign" style="padding-left: 0.5em;"> <div id="projectname">flat &#160;<span id="projectnumber">1</span> </div> <div id="projectbrief">A 2D game engine based on SDL2.0</div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.18 --> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */ var searchBox = new SearchBox("searchBox", "search",false,'Search'); /* @license-end */ </script> <script type="text/javascript" src="menudata.js"></script> <script type="text/javascript" src="menu.js"></script> <script type="text/javascript"> /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */ $(function() { initMenu('',true,false,'search.php','Search'); $(document).ready(function() { init_search(); }); }); /* @license-end */</script> <div id="main-nav"></div> <!-- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> </div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="javascript:void(0)" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <div id="nav-path" class="navpath"> <ul> <li class="navelem"><a class="el" href="namespaceflat2d.html">flat2d</a></li><li class="navelem"><a class="el" href="classflat2d_1_1_game_data.html">GameData</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="headertitle"> <div class="title">flat2d::GameData Member List</div> </div> </div><!--header--> <div class="contents"> <p>This is the complete list of members for <a class="el" href="classflat2d_1_1_game_data.html">flat2d::GameData</a>, including all inherited members.</p> <table class="directory"> <tr class="even"><td class="entry"><a class="el" href="classflat2d_1_1_game_data.html#af0f090969169e72921a897aac6268cd1">GameData</a>(EntityContainer *obc, CollisionDetector *cd, Mixer *m, RenderData *rd, DeltatimeMonitor *dtm)</td><td class="entry"><a class="el" href="classflat2d_1_1_game_data.html">flat2d::GameData</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classflat2d_1_1_game_data.html#a14de476026ee3943825b0898439713f2">getCollisionDetector</a>() const</td><td class="entry"><a class="el" href="classflat2d_1_1_game_data.html">flat2d::GameData</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classflat2d_1_1_game_data.html#a66b1296238a0c2eef4d79281f5b53e80">getCustomGameData</a>() const</td><td class="entry"><a class="el" href="classflat2d_1_1_game_data.html">flat2d::GameData</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classflat2d_1_1_game_data.html#a0fa434a6d8ff02d9b0a0f5c838068303">getDeltatimeMonitor</a>() const</td><td class="entry"><a class="el" href="classflat2d_1_1_game_data.html">flat2d::GameData</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classflat2d_1_1_game_data.html#a213967e1655591b7ea42a0d61d545979">getEntityContainer</a>() const</td><td class="entry"><a class="el" href="classflat2d_1_1_game_data.html">flat2d::GameData</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classflat2d_1_1_game_data.html#ad1e6058b7e6f7325e4f5eb9d91ebddc6">getMixer</a>() const</td><td class="entry"><a class="el" href="classflat2d_1_1_game_data.html">flat2d::GameData</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr class="even"><td class="entry"><a class="el" href="classflat2d_1_1_game_data.html#a8b37707c4c8d397905dee86020546e26">getRenderData</a>() const</td><td class="entry"><a class="el" href="classflat2d_1_1_game_data.html">flat2d::GameData</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> <tr><td class="entry"><a class="el" href="classflat2d_1_1_game_data.html#ae3ba301dc56b7cec4e65dfea1a9a1dd4">setCustomGameData</a>(void *customGameData)</td><td class="entry"><a class="el" href="classflat2d_1_1_game_data.html">flat2d::GameData</a></td><td class="entry"><span class="mlabel">inline</span></td></tr> </table></div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated by &#160;<a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.18 </small></address> </body> </html>
{ "content_hash": "93008471cc6dd968b8e0d8e4983fee22", "timestamp": "", "source": "github", "line_count": 93, "max_line_length": 391, "avg_line_length": 63.46236559139785, "alnum_prop": 0.698407319552694, "repo_name": "LiquidityC/flat", "id": "eacc6249c2c1e9ea39c5f2dd2b50e421f45e99a6", "size": "5902", "binary": false, "copies": "1", "ref": "refs/heads/dev", "path": "docs/classflat2d_1_1_game_data-members.html", "mode": "33188", "license": "mit", "language": [ { "name": "C++", "bytes": "563273" }, { "name": "CMake", "bytes": "30340" }, { "name": "Makefile", "bytes": "290" }, { "name": "Vim script", "bytes": "224" } ], "symlink_target": "" }
<!-- shared between quotes page and front page --> <div class="masonry-item refined-user-quote"> <a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><div class="quote"><i> &ldquo;<?php echo get_the_content(); ?>&rdquo; </i></div></a> <p id="author">&#8212&nbsp<?php the_title(); ?></p> <hr/> </div>
{ "content_hash": "4e336eba49bb512c4e93bec092b7af0d", "timestamp": "", "source": "github", "line_count": 8, "max_line_length": 100, "avg_line_length": 41.75, "alnum_prop": 0.592814371257485, "repo_name": "jhotovy/refined", "id": "dfce746ee7dd7ac31937e00a02eff4eb05e5bc6b", "size": "334", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "templates/content-refined-quote.php", "mode": "33188", "license": "mit", "language": [ { "name": "CSS", "bytes": "22458" }, { "name": "JavaScript", "bytes": "13038" }, { "name": "PHP", "bytes": "100302" } ], "symlink_target": "" }
<?php namespace AppBundle\Entity; use Doctrine\ORM\Mapping as ORM; /** * Map * * @ORM\Table() * @ORM\Entity(repositoryClass="AppBundle\Entity\MapRepository") */ class Map { /** * @var integer * * @ORM\Column(name="id", type="integer") * @ORM\Id * @ORM\GeneratedValue(strategy="AUTO") */ private $id; /** * @var string * * @ORM\Column(name="title", type="string", length=255) */ private $title; /** * @var string * * @ORM\Column(name="description", type="text", nullable=true) */ private $description; /** * @var string * * @ORM\Column(name="background", type="text", nullable=true) */ private $background; /** * @ORM\OneToMany(targetEntity="Location", mappedBy="map") */ protected $locations; /** * Get id * * @return integer */ public function getId() { return $this->id; } /** * Set title * * @param string $title * @return Map */ public function setTitle($title) { $this->title = $title; return $this; } /** * Get title * * @return string */ public function getTitle() { return $this->title; } /** * Set description * * @param string $description * @return Map */ public function setDescription($description) { $this->description = $description; return $this; } /** * Get description * * @return string */ public function getDescription() { return $this->description; } /** * Set background * * @param string $background * @return Map */ public function setBackground($background) { $this->background = $background; return $this; } /** * Get background * * @return string */ public function getBackground() { return $this->background; } /** * Constructor */ public function __construct() { $this->points = new \Doctrine\Common\Collections\ArrayCollection(); } /** * Add points * * @param \AppBundle\Entity\Point $points * @return Map */ public function addPoint(\AppBundle\Entity\Point $points) { $this->points[] = $points; return $this; } /** * Remove points * * @param \AppBundle\Entity\Point $points */ public function removePoint(\AppBundle\Entity\Point $points) { $this->points->removeElement($points); } /** * Get points * * @return \Doctrine\Common\Collections\Collection */ public function getPoints() { return $this->points; } /** * Add locations * * @param \AppBundle\Entity\Location $locations * @return Map */ public function addLocation(\AppBundle\Entity\Location $locations) { $this->locations[] = $locations; return $this; } /** * Remove locations * * @param \AppBundle\Entity\Location $locations */ public function removeLocation(\AppBundle\Entity\Location $locations) { $this->locations->removeElement($locations); } /** * Get locations * * @return \Doctrine\Common\Collections\Collection */ public function getLocations() { return $this->locations; } }
{ "content_hash": "326f7c305e7458ad219449ba9df40737", "timestamp": "", "source": "github", "line_count": 202, "max_line_length": 75, "avg_line_length": 17.435643564356436, "alnum_prop": 0.5244179443498013, "repo_name": "rlbaltha/vintage", "id": "7aa9c6d938b66cb276c22fb6e729cd2230ef3685", "size": "3522", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/AppBundle/Entity/Map.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "3073" }, { "name": "CSS", "bytes": "715" }, { "name": "PHP", "bytes": "132697" } ], "symlink_target": "" }
using System; using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Ztop.Todo.Model { [Table("user_task")] public class UserTask { public UserTask() { CreateTime = DateTime.Now; } [Key] [DatabaseGenerated(System.ComponentModel.DataAnnotations.Schema.DatabaseGeneratedOption.Identity)] public int ID { get; set; } public int TaskID { get; set; } public int UserID { get; set; } [NotMapped] public User User { get; set; } [NotMapped] public Task Task { get; set; } [NotMapped] public bool IsCompleted { get { return CompletedTime.HasValue; } } public DateTime CreateTime { get; set; } public DateTime? CompletedTime { get; set; } public bool HasRead { get; set; } public bool Deleted { get; set; } } }
{ "content_hash": "e78b808983ef862bf17d9e5510e7e27b", "timestamp": "", "source": "github", "line_count": 43, "max_line_length": 106, "avg_line_length": 24.13953488372093, "alnum_prop": 0.6242774566473989, "repo_name": "LooWooTech/Kaopu", "id": "a57f7f1b6202dd88f869e4ee8973befefa1bbbc5", "size": "1040", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "Ztop.Todo.Model/UserTask.cs", "mode": "33188", "license": "mit", "language": [ { "name": "ASP", "bytes": "205" }, { "name": "C#", "bytes": "2061595" }, { "name": "CSS", "bytes": "77394" }, { "name": "HTML", "bytes": "274966" }, { "name": "JavaScript", "bytes": "229379" } ], "symlink_target": "" }
from datetime import datetime from django.db import models class WithScrobbleCountsManager(models.Manager): """ Adds a with_scrobble_counts() method. """ # Can we filter these (things) by Album? is_filterable_by_album = True # Can we filter these (things) by Artist? is_filterable_by_artist = True # Can we filter these (things) by Track? is_filterable_by_track = True def with_scrobble_counts(self, **kwargs): """ Adds a `scrobble_count` field to the Queryset's objects, and orders the results by that, descending. eg: # All Tracks, each with a scrobble_count: Track.objects.with_scrobble_counts() # All Albums, each with a total scrobble_count: Album.objects.with_scrobble_counts() # All Artists, each with a total scrobble_count: Artist.objects.with_scrobble_counts() # Tracks by artist_obj: Track.objects.with_scrobble_counts(artist=artist_obj) # Tracks appearing on album_obj: Track.objects.with_scrobble_counts(album=album_obj) # Albums on which track_obj appears: Album.objects.with_scrobble_counts(track=track_obj) or combine filters: # Tracks by artist_obj, scrobbled by account_obj between # datetime_obj_1 and datetime_obj2: Track.objects.with_scrobble_counts( account = account_obj, artist = artist_obj, min_post_time = datetime_obj_1, max_post_time = datetime_obj_2, ) Include an `account` to only include Scrobbles by that Account. Include an `album` to only include Scrobbles on that Album. Include an `artist` to only include Scrobbles by that Artist. Include a `track` to only include Scrobbles including that Track. Include a `min_post_time` to only include Scrobbles after then. Include a `max_post_time` to only include Scrobbles before then. """ account = kwargs.get("account", None) min_post_time = kwargs.get("min_post_time", None) max_post_time = kwargs.get("max_post_time", None) album = kwargs.get("album", None) artist = kwargs.get("artist", None) track = kwargs.get("track", None) if album and not self.is_filterable_by_album: raise ValueError("This is not filterable by album") if artist and not self.is_filterable_by_artist: raise ValueError("This is not filterable by artist") if track and not self.is_filterable_by_track: raise ValueError("This is not filterable by track") if account is not None and account.__class__.__name__ != "Account": raise TypeError( "account must be an Account instance, " "not a %s" % type(account) ) if album is not None and album.__class__.__name__ != "Album": raise TypeError( "album must be an Album instance, " "not a %s" % type(album) ) if artist is not None and artist.__class__.__name__ != "Artist": raise TypeError( "artist must be an Artist instance, " "not a %s" % type(account) ) if min_post_time is not None and type(min_post_time) is not datetime: raise TypeError( "min_post_time must be a datetime.datetime, " "not a %s" % type(min_post_time) ) if max_post_time is not None and type(max_post_time) is not datetime: raise TypeError( "max_post_time must be a datetime.datetime, " "not a %s" % type(max_post_time) ) filter_kwargs = {} if account: filter_kwargs["scrobbles__account"] = account if album: filter_kwargs["scrobbles__album"] = album if artist: filter_kwargs["scrobbles__artist"] = artist if track: filter_kwargs["scrobbles__track"] = track if min_post_time and max_post_time: filter_kwargs["scrobbles__post_time__gte"] = min_post_time filter_kwargs["scrobbles__post_time__lte"] = max_post_time elif min_post_time: filter_kwargs["scrobbles__post_time__gte"] = min_post_time elif max_post_time: filter_kwargs["scrobbles__post_time__lte"] = max_post_time qs = self.filter(**filter_kwargs) return qs.annotate( scrobble_count=models.Count("scrobbles", distinct=True) ).order_by("-scrobble_count") class TracksManager(WithScrobbleCountsManager): """ Adds a `scrobble_count` field to the Track objects. See WithScrobbleCountsManager for docs. """ # We can't filter a list of Tracks by Tracks. is_filterable_by_track = False def with_scrobble_counts(self, **kwargs): "Pre-fetch all the Tracks' Artists." qs = ( super(TracksManager, self) .with_scrobble_counts(**kwargs) .prefetch_related("artist") ) return qs class AlbumsManager(WithScrobbleCountsManager): """ Adds a `scrobble_count` field to the Album objects. See WithScrobbleCountsManager for docs. """ # We can't filter a list of Albums by Album. is_filterable_by_album = False def with_scrobble_counts(self, **kwargs): "Pre-fetch all the Albums' Artists." qs = ( super(AlbumsManager, self) .with_scrobble_counts(**kwargs) .prefetch_related("artist") ) return qs class ArtistsManager(WithScrobbleCountsManager): """ Adds a `scrobble_count` field to the Artist objects. See WithScrobbleCountsManager for docs. """ # We can't filter a list of Artists by Artist. is_filterable_by_artist = False
{ "content_hash": "ca066549fb23769aa960535151679462", "timestamp": "", "source": "github", "line_count": 181, "max_line_length": 82, "avg_line_length": 33, "alnum_prop": 0.5908253808806295, "repo_name": "philgyford/django-ditto", "id": "587bb9f918d1af60247fb15b1fff4e1d279bf485", "size": "5973", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "ditto/lastfm/managers.py", "mode": "33188", "license": "mit", "language": [ { "name": "HTML", "bytes": "131947" }, { "name": "JavaScript", "bytes": "15927" }, { "name": "Python", "bytes": "1121623" } ], "symlink_target": "" }
<!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.0"> <meta name="description" content=""> <meta name="author" content=""> <link rel="shortcut icon" href="/assets/favicon.png"> <title>JSON Blob</title> <!-- Bootstrap core CSS --> <link href="/assets/css/bootstrap/bootstrap.min.css" rel="stylesheet"> <link href="/assets/css/bootstrap/bootstrap-theme.min.css" rel="stylesheet"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[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.3.0/respond.min.js"></script> <![endif]--> </head> <!-- NAVBAR ================================================== --> <body> <div class="navbar-wrapper"> <div class="container"> <div class="navbar navbar-inverse navbar-static-top" role="navigation"> <div class="container"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <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="#">JSON Blob</a> </div> <div class="navbar-collapse collapse"> <ul class="nav navbar-nav"> <li class="active"><a href="#">New</a></li> <li><a href="#about">Save</a></li> <li><a href="#contact">Clear</a></li> <li class="dropdown"> <a href="#" class="dropdown-toggle" data-toggle="dropdown">About <b class="caret"></b></a> <ul class="dropdown-menu"> <li><a href="#">API</a></li> <li><a href="#">Source</a></li> </ul> </li> </ul> </div> </div> </div> </div> </div> <div class="container"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title">Unsaved JSON Blob</h3> </div> <div class="panel-body"> <div id="editor">{ "name": "John Smith", "age": 32, "employed": true, "address": { "street": "701 First Ave.", "city": "Sunnyvale, CA 95125", "country": "United States" }, "children": [ { "name": "Richard", "age": 7 }, { "name": "Susan", "age": 4 }, { "name": "James", "age": 3 } ] }</div> </div> </div> <div class="text-center"><p class="small">&copy; 2013 Tristan Burch</p></div> </div> <!-- /container --> <!-- Bootstrap core JavaScript ================================================== --> <!-- Placed at the end of the document so the pages load faster --> <script src="/assets/js/jquery-2.0.3.min.js"></script> <script src="/assets/js/bootstrap/bootstrap.min.js"></script> <script src="/assets/js/ace.js" type="text/javascript" charset="utf-8"></script> <script> var editor = ace.edit("editor"); editor.setTheme("ace/theme/cobalt"); editor.getSession().setMode("ace/mode/json"); editor.setReadOnly(false); </script> </body> </html>
{ "content_hash": "01e64ca586cb665b6548016fdf5b7c3c", "timestamp": "", "source": "github", "line_count": 111, "max_line_length": 118, "avg_line_length": 36.513513513513516, "alnum_prop": 0.45595854922279794, "repo_name": "tburch/jsonblob", "id": "03bf0947dde5acfeb16331787b3d610124bd879e", "size": "4054", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "src/main/resources/static-resources/assets/index.html", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "23924" }, { "name": "HTML", "bytes": "4054" }, { "name": "Handlebars", "bytes": "44832" }, { "name": "JavaScript", "bytes": "246622" }, { "name": "Kotlin", "bytes": "79204" } ], "symlink_target": "" }
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <title>statsmodels.stats.weightstats.DescrStatsW.ztost_mean &#8212; statsmodels v0.10.1 documentation</title> <link rel="stylesheet" href="../_static/nature.css" type="text/css" /> <link rel="stylesheet" href="../_static/pygments.css" type="text/css" /> <link rel="stylesheet" type="text/css" href="../_static/graphviz.css" /> <script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script> <script type="text/javascript" src="../_static/jquery.js"></script> <script type="text/javascript" src="../_static/underscore.js"></script> <script type="text/javascript" src="../_static/doctools.js"></script> <script type="text/javascript" src="../_static/language_data.js"></script> <script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?config=TeX-AMS-MML_HTMLorMML"></script> <link rel="shortcut icon" href="../_static/statsmodels_hybi_favico.ico"/> <link rel="author" title="About these documents" href="../about.html" /> <link rel="index" title="Index" href="../genindex.html" /> <link rel="search" title="Search" href="../search.html" /> <link rel="next" title="statsmodels.stats.weightstats.CompareMeans" href="statsmodels.stats.weightstats.CompareMeans.html" /> <link rel="prev" title="statsmodels.stats.weightstats.DescrStatsW.ztest_mean" href="statsmodels.stats.weightstats.DescrStatsW.ztest_mean.html" /> <link rel="stylesheet" href="../_static/examples.css" type="text/css" /> <link rel="stylesheet" href="../_static/facebox.css" type="text/css" /> <script type="text/javascript" src="../_static/scripts.js"> </script> <script type="text/javascript" src="../_static/facebox.js"> </script> <script type="text/javascript"> $.facebox.settings.closeImage = "../_static/closelabel.png" $.facebox.settings.loadingImage = "../_static/loading.gif" </script> <script> $(document).ready(function() { $.getJSON("../../versions.json", function(versions) { var dropdown = document.createElement("div"); dropdown.className = "dropdown"; var button = document.createElement("button"); button.className = "dropbtn"; button.innerHTML = "Other Versions"; var content = document.createElement("div"); content.className = "dropdown-content"; dropdown.appendChild(button); dropdown.appendChild(content); $(".header").prepend(dropdown); for (var i = 0; i < versions.length; i++) { if (versions[i].substring(0, 1) == "v") { versions[i] = [versions[i], versions[i].substring(1)]; } else { versions[i] = [versions[i], versions[i]]; }; }; for (var i = 0; i < versions.length; i++) { var a = document.createElement("a"); a.innerHTML = versions[i][1]; a.href = "../../" + versions[i][0] + "/index.html"; a.title = versions[i][1]; $(".dropdown-content").append(a); }; }); }); </script> </head><body> <div class="headerwrap"> <div class = "header"> <a href = "../index.html"> <img src="../_static/statsmodels_hybi_banner.png" alt="Logo" style="padding-left: 15px"/></a> </div> </div> <div class="related" role="navigation" aria-label="related navigation"> <h3>Navigation</h3> <ul> <li class="right" style="margin-right: 10px"> <a href="../genindex.html" title="General Index" accesskey="I">index</a></li> <li class="right" > <a href="../py-modindex.html" title="Python Module Index" >modules</a> |</li> <li class="right" > <a href="statsmodels.stats.weightstats.CompareMeans.html" title="statsmodels.stats.weightstats.CompareMeans" accesskey="N">next</a> |</li> <li class="right" > <a href="statsmodels.stats.weightstats.DescrStatsW.ztest_mean.html" title="statsmodels.stats.weightstats.DescrStatsW.ztest_mean" accesskey="P">previous</a> |</li> <li><a href ="../install.html">Install</a></li> &nbsp;|&nbsp; <li><a href="https://groups.google.com/forum/?hl=en#!forum/pystatsmodels">Support</a></li> &nbsp;|&nbsp; <li><a href="https://github.com/statsmodels/statsmodels/issues">Bugs</a></li> &nbsp;|&nbsp; <li><a href="../dev/index.html">Develop</a></li> &nbsp;|&nbsp; <li><a href="../examples/index.html">Examples</a></li> &nbsp;|&nbsp; <li><a href="../faq.html">FAQ</a></li> &nbsp;|&nbsp; <li class="nav-item nav-item-1"><a href="../stats.html" >Statistics <code class="xref py py-mod docutils literal notranslate"><span class="pre">stats</span></code></a> |</li> <li class="nav-item nav-item-2"><a href="statsmodels.stats.weightstats.DescrStatsW.html" accesskey="U">statsmodels.stats.weightstats.DescrStatsW</a> |</li> </ul> </div> <div class="document"> <div class="documentwrapper"> <div class="bodywrapper"> <div class="body" role="main"> <div class="section" id="statsmodels-stats-weightstats-descrstatsw-ztost-mean"> <h1>statsmodels.stats.weightstats.DescrStatsW.ztost_mean<a class="headerlink" href="#statsmodels-stats-weightstats-descrstatsw-ztost-mean" title="Permalink to this headline">¶</a></h1> <p>method</p> <dl class="method"> <dt id="statsmodels.stats.weightstats.DescrStatsW.ztost_mean"> <code class="sig-prename descclassname">DescrStatsW.</code><code class="sig-name descname">ztost_mean</code><span class="sig-paren">(</span><em class="sig-param">low</em>, <em class="sig-param">upp</em><span class="sig-paren">)</span><a class="reference internal" href="../_modules/statsmodels/stats/weightstats.html#DescrStatsW.ztost_mean"><span class="viewcode-link">[source]</span></a><a class="headerlink" href="#statsmodels.stats.weightstats.DescrStatsW.ztost_mean" title="Permalink to this definition">¶</a></dt> <dd><p>test of (non-)equivalence of one sample, based on z-test</p> <p>TOST: two one-sided z-tests</p> <p>null hypothesis: m &lt; low or m &gt; upp alternative hypothesis: low &lt; m &lt; upp</p> <p>where m is the expected value of the sample (mean of the population).</p> <p>If the pvalue is smaller than a threshold, say 0.05, then we reject the hypothesis that the expected value of the sample (mean of the population) is outside of the interval given by thresholds low and upp.</p> <dl class="field-list simple"> <dt class="field-odd">Parameters</dt> <dd class="field-odd"><dl class="simple"> <dt><strong>low, upp</strong><span class="classifier">float</span></dt><dd><p>equivalence interval low &lt; mean &lt; upp</p> </dd> </dl> </dd> <dt class="field-even">Returns</dt> <dd class="field-even"><dl class="simple"> <dt><strong>pvalue</strong><span class="classifier">float</span></dt><dd><p>pvalue of the non-equivalence test</p> </dd> <dt><strong>t1, pv1</strong><span class="classifier">tuple</span></dt><dd><p>test statistic and p-value for lower threshold test</p> </dd> <dt><strong>t2, pv2</strong><span class="classifier">tuple</span></dt><dd><p>test statistic and p-value for upper threshold test</p> </dd> </dl> </dd> </dl> </dd></dl> </div> </div> </div> </div> <div class="sphinxsidebar" role="navigation" aria-label="main navigation"> <div class="sphinxsidebarwrapper"> <h4>Previous topic</h4> <p class="topless"><a href="statsmodels.stats.weightstats.DescrStatsW.ztest_mean.html" title="previous chapter">statsmodels.stats.weightstats.DescrStatsW.ztest_mean</a></p> <h4>Next topic</h4> <p class="topless"><a href="statsmodels.stats.weightstats.CompareMeans.html" title="next chapter">statsmodels.stats.weightstats.CompareMeans</a></p> <div role="note" aria-label="source link"> <h3>This Page</h3> <ul class="this-page-menu"> <li><a href="../_sources/generated/statsmodels.stats.weightstats.DescrStatsW.ztost_mean.rst.txt" rel="nofollow">Show Source</a></li> </ul> </div> <div id="searchbox" style="display: none" role="search"> <h3 id="searchlabel">Quick search</h3> <div class="searchformwrapper"> <form class="search" action="../search.html" method="get"> <input type="text" name="q" aria-labelledby="searchlabel" /> <input type="submit" value="Go" /> </form> </div> </div> <script type="text/javascript">$('#searchbox').show(0);</script> </div> </div> <div class="clearer"></div> </div> <div class="footer" role="contentinfo"> &#169; Copyright 2009-2018, Josef Perktold, Skipper Seabold, Jonathan Taylor, statsmodels-developers. Created using <a href="http://sphinx-doc.org/">Sphinx</a> 2.1.2. </div> </body> </html>
{ "content_hash": "54d8385b82519aa4d91761cfa25e0ad0", "timestamp": "", "source": "github", "line_count": 189, "max_line_length": 518, "avg_line_length": 46.698412698412696, "alnum_prop": 0.6511443462497167, "repo_name": "statsmodels/statsmodels.github.io", "id": "e469efbc3a730600aa8bd4fa535b53c1c91386c3", "size": "8830", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "v0.10.1/generated/statsmodels.stats.weightstats.DescrStatsW.ztost_mean.html", "mode": "33188", "license": "bsd-3-clause", "language": [], "symlink_target": "" }
import re def list_parser(names): """Parse a list of elements, some of which might be one-level sublists within parentheses, into a a list of lists of those elements. For example: list_parser('(a,b),c') -> [['a', 'b'], 'c']""" elems = re.split(',', names) ret = [] accum = [] for elem in elems: if re.search('^\((.*)\)$', elem): accum.append(re.sub('^\((.*)\)', '\\1', elem)) ret.append(accum) accum = [] elif re.search('^\(', elem): accum.append(re.sub('^\(', '', elem)) elif re.search('\)$', elem): accum.append(re.sub('\)$', '', elem)) ret.append(accum) accum = [] elif len(accum) != 0: accum.append(elem) else: ret.append([elem]) if len(accum) > 0: print('Non matching brackets in', names) return ret def map2(f, ls): """map to a depth of 2. That is, given a list of lists, apply f to those innermost elements """ return [list(map(f, l)) for l in ls] def remove_trailing_ws(line): return re.sub('\s*$', '', line) def remove_leading_and_trailing_ws(line): return re.sub('\s*$', '', re.sub('^\s*', '', line)) def parse_pairs_list(pairString): """parse a string like 'name=value name2=value2' into a list of pairs of ('name', 'value') ...""" ret = [] pairs = re.finditer('(\w+)(=("[^"]*"|[^\s]*))?', pairString) for pair in pairs: name, rest, value = pair.groups() if value is not None: value = re.sub('^"(.*)"$', '\\1', value) ret.append((name, value)) else: ret.append((name, '')) return ret def parse_indexed_list(string): """parse a string of the form "(index,value),(index,value)..." into a list of index, value pairs""" ret = [] pairs = list_parser(string) for pair in pairs: if len(pair) == 2: index, value = pair ret.append((int(index), value)) return ret def parse_pairs(pairString): """parse a string like 'name=value name2=value2' into a dictionary of {'name': 'value', 'name2': 'value2'} """ return dict(parse_pairs_list(pairString))
{ "content_hash": "bdc6a5c3e958ae34fc423058f82d3a8d", "timestamp": "", "source": "github", "line_count": 72, "max_line_length": 74, "avg_line_length": 30.88888888888889, "alnum_prop": 0.529226618705036, "repo_name": "gem5/gem5", "id": "d888f13460e5e8d8f390a547f314d0bdeeb4b1f4", "size": "4293", "binary": false, "copies": "1", "ref": "refs/heads/stable", "path": "util/minorview/parse.py", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "Assembly", "bytes": "145626" }, { "name": "Awk", "bytes": "3386" }, { "name": "BASIC", "bytes": "2884" }, { "name": "C", "bytes": "3927153" }, { "name": "C++", "bytes": "42960484" }, { "name": "CMake", "bytes": "133888" }, { "name": "Dockerfile", "bytes": "34102" }, { "name": "Emacs Lisp", "bytes": "1914" }, { "name": "Forth", "bytes": "354" }, { "name": "Fortran", "bytes": "15436" }, { "name": "HTML", "bytes": "146414" }, { "name": "Hack", "bytes": "139769" }, { "name": "Java", "bytes": "6966" }, { "name": "M4", "bytes": "42624" }, { "name": "Makefile", "bytes": "39573" }, { "name": "Perl", "bytes": "23784" }, { "name": "Python", "bytes": "8079781" }, { "name": "Roff", "bytes": "8754" }, { "name": "SCSS", "bytes": "2971" }, { "name": "SWIG", "bytes": "173" }, { "name": "Scala", "bytes": "5328" }, { "name": "Shell", "bytes": "95638" }, { "name": "Starlark", "bytes": "25668" }, { "name": "SuperCollider", "bytes": "8869" }, { "name": "Vim Script", "bytes": "4343" }, { "name": "sed", "bytes": "3897" } ], "symlink_target": "" }
""" Contains common test fixtures used to run AWS Identity and Access Management (IAM) tests. """ import sys # This is needed so Python can find test_tools on the path. sys.path.append('../..') from test_tools.fixtures.common import *
{ "content_hash": "6ee6d51e903259e0c15450196fd611fb", "timestamp": "", "source": "github", "line_count": 9, "max_line_length": 82, "avg_line_length": 26.22222222222222, "alnum_prop": 0.7330508474576272, "repo_name": "awsdocs/aws-doc-sdk-examples", "id": "1a8cb23fd6b598dab767f678a49c37496963cb6f", "size": "344", "binary": false, "copies": "1", "ref": "refs/heads/main", "path": "python/example_code/glue/test/conftest.py", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "ABAP", "bytes": "476653" }, { "name": "Batchfile", "bytes": "900" }, { "name": "C", "bytes": "3852" }, { "name": "C#", "bytes": "2051923" }, { "name": "C++", "bytes": "943634" }, { "name": "CMake", "bytes": "82068" }, { "name": "CSS", "bytes": "33378" }, { "name": "Dockerfile", "bytes": "2243" }, { "name": "Go", "bytes": "1764292" }, { "name": "HTML", "bytes": "319090" }, { "name": "Java", "bytes": "4966853" }, { "name": "JavaScript", "bytes": "1655476" }, { "name": "Jupyter Notebook", "bytes": "9749" }, { "name": "Kotlin", "bytes": "1099902" }, { "name": "Makefile", "bytes": "4922" }, { "name": "PHP", "bytes": "1220594" }, { "name": "Python", "bytes": "2507509" }, { "name": "Ruby", "bytes": "500331" }, { "name": "Rust", "bytes": "558811" }, { "name": "Shell", "bytes": "63776" }, { "name": "Swift", "bytes": "267325" }, { "name": "TypeScript", "bytes": "119632" } ], "symlink_target": "" }
#ifndef SHWILD_INCL_HPP_PATTERN #define SHWILD_INCL_HPP_PATTERN /* ///////////////////////////////////////////////////////////////////////// * Includes */ /* shwild Header Files */ #include <shwild/shwild.h> /* STLSoft Header Files */ #include "shwild_stlsoft.h" #if defined(STLSOFT_COMPILER_IS_MSVC) && \ _MSC_VER >= 1400 /* For some weird reason, when used with VC++ 8, pattern.cpp ends up with a * definition of std::allocator<>::allocate() and * std::allocator<>::deallocate(), which breaks the linker with LNK2005 * (multiple definitions). * * So we disable the use of std::allocator, and tell it to use * stlsoft::malloc_allocator instead. */ # define STLSOFT_ALLOCATOR_SELECTOR_USE_STLSOFT_MALLOC_ALLOCATOR # define STLSOFT_ALLOCATOR_SELECTOR_NO_USE_STD_ALLOCATOR #endif /* compiler */ #include <stlsoft/memory/auto_buffer.hpp> /* Standard C Header Files */ #include <limits.h> /* ///////////////////////////////////////////////////////////////////////// * Typedefs */ /** \brief Types of pattern tokens */ enum token_type { TOK_INVALID = CHAR_MIN - 1 , TOK_END = 0 , TOK_WILD_1 = CHAR_MAX + 1 , TOK_WILD_N = CHAR_MAX + 2 , TOK_RANGE_BEG = CHAR_MAX + 3 , TOK_RANGE_END = CHAR_MAX + 4 , TOK_ENOMEM = CHAR_MAX + 5 }; /** \brief Types of pattern nodes */ enum node_type { NODE_NOTHING , NODE_WILD_1 , NODE_WILD_N , NODE_RANGE , NODE_NOT_RANGE , NODE_LITERAL , NODE_END }; /** \brief Node; INTERNAL CLASS. */ struct node_t { node_type type; /*!< The type of the node */ shwild_slice_t data; /*!< Indicates the contents */ }; /** \brief Buffer used when necessary. */ typedef stlsoft::auto_buffer< char , 1024 // , ss_typename_type_def_k allocator_selector<T>::allocator_type > node_buffer_t; /* ///////////////////////////////////////////////////////////////////////// * API */ /** \brief Initialises a node. */ void node_init( node_t* node ); /** \brief Uninitialises a node, releasing any associated resources. */ void node_reset( node_t* node ); /** \brief Parses the next node */ int get_node( node_t* node, node_buffer_t &buffer, char const* buf, size_t* len, unsigned flags ); /* ////////////////////////////////////////////////////////////////////// */ #endif /* !SHWILD_INCL_HPP_PATTERN */ /* ///////////////////////////// end of file //////////////////////////// */
{ "content_hash": "03251f8abee3d5bab22caeab5e5a31b5", "timestamp": "", "source": "github", "line_count": 94, "max_line_length": 98, "avg_line_length": 28.22340425531915, "alnum_prop": 0.4967960799095364, "repo_name": "zvelo/pantheios", "id": "1815f96c7bad340a491fe6eb9de6fc3a268efd9e", "size": "4628", "binary": false, "copies": "10", "ref": "refs/heads/master", "path": "src/shwild/pattern.hpp", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "C", "bytes": "1497828" }, { "name": "C++", "bytes": "3130548" }, { "name": "CSS", "bytes": "3238" }, { "name": "Ruby", "bytes": "24512" } ], "symlink_target": "" }
/**========================================================= * Module: calendar-ui.js * This script handle the calendar demo with draggable * events and events creations =========================================================*/ (function($, window, document){ 'use strict'; if(!$.fn.fullCalendar) return; // global shared var to know what we are dragging var draggingEvent = null; /** * ExternalEvent object * @param jQuery Object elements Set of element as jQuery objects */ var ExternalEvent = function (elements) { if (!elements) return; elements.each(function() { var $this = $(this); // create an Event Object (http://arshaw.com/fullcalendar/docs/event_data/Event_Object/) // it doesn't need to have a start or end var calendarEventObject = { title: $.trim($this.text()) // use the element's text as the event title }; // store the Event Object in the DOM element so we can get to it later $this.data('calendarEventObject', calendarEventObject); // make the event draggable using jQuery UI $this.draggable({ zIndex: 1070, revert: true, // will cause the event to go back to its revertDuration: 0 // original position after the drag }); }); }; /** * Invoke full calendar plugin and attach behavior * @param jQuery [calElement] The calendar dom element wrapped into jQuery * @param EventObject [events] An object with the event list to load when the calendar displays */ function initCalendar(calElement, events) { // check to remove elements from the list var removeAfterDrop = $('#remove-after-drop'); calElement.fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, buttonIcons: { // note the space at the beginning prev: ' fa fa-caret-left', next: ' fa fa-caret-right' }, buttonText: { today: 'today', month: 'month', week: 'week', day: 'day' }, editable: true, droppable: true, // this allows things to be dropped onto the calendar drop: function(date, allDay) { // this function is called when something is dropped var $this = $(this), // retrieve the dropped element's stored Event Object originalEventObject = $this.data('calendarEventObject'); // if something went wrong, abort if(!originalEventObject) return; // clone the object to avoid multiple events with reference to the same object var clonedEventObject = $.extend({}, originalEventObject); // assign the reported date clonedEventObject.start = date; clonedEventObject.allDay = allDay; clonedEventObject.backgroundColor = $this.css('background-color'); clonedEventObject.borderColor = $this.css('border-color'); // render the event on the calendar // the last `true` argument determines if the event "sticks" // (http://arshaw.com/fullcalendar/docs/event_rendering/renderEvent/) calElement.fullCalendar('renderEvent', clonedEventObject, true); // if necessary remove the element from the list if(removeAfterDrop.is(':checked')) { $this.remove(); } }, eventDragStart: function (event, js, ui) { draggingEvent = event; }, // This array is the events sources events: events }); } /** * Inits the external events panel * @param jQuery [calElement] The calendar dom element wrapped into jQuery */ function initExternalEvents(calElement){ // Panel with the external events list var externalEvents = $('.external-events'); // init the external events in the panel new ExternalEvent(externalEvents.children('div')); // External event color is danger-red by default var currColor = '#f6504d'; // Color selector button var eventAddBtn = $('.external-event-add-btn'); // New external event name input var eventNameInput = $('.external-event-name'); // Color switchers var eventColorSelector = $('.external-event-color-selector .circle'); // Trash events Droparea $('.external-events-trash').droppable({ accept: '.fc-event', activeClass: 'active', hoverClass: 'hovered', tolerance: 'touch', drop: function(event, ui) { // You can use this function to send an ajax request // to remove the event from the repository if(draggingEvent) { var eid = draggingEvent.id || draggingEvent._id; // Remove the event calElement.fullCalendar('removeEvents', eid); // Remove the dom element ui.draggable.remove(); // clear draggingEvent = null; } } }); eventColorSelector.click(function(e) { e.preventDefault(); var $this = $(this); // Save color currColor = $this.css('background-color'); // De-select all and select the current one eventColorSelector.removeClass('selected'); $this.addClass('selected'); }); eventAddBtn.click(function(e) { e.preventDefault(); // Get event name from input var val = eventNameInput.val(); // Dont allow empty values if ($.trim(val) === '') return; // Create new event element var newEvent = $('<div/>').css({ 'background-color': currColor, 'border-color': currColor, 'color': '#fff' }) .html(val); // Prepends to the external events list externalEvents.prepend(newEvent); // Initialize the new event element new ExternalEvent(newEvent); // Clear input eventNameInput.val(''); }); } /** * Creates an array of events to display in the first load of the calendar * Wrap into this function a request to a source to get via ajax the stored events * @return Array The array with the events */ function createDemoEvents() { // Date for the calendar events (dummy data) var date = new Date(); var d = date.getDate(), m = date.getMonth(), y = date.getFullYear(); return [ { title: 'All Day Event', start: new Date(y, m, 1), backgroundColor: '#f56954', //red borderColor: '#f56954' //red }, { title: 'Long Event', start: new Date(y, m, d - 5), end: new Date(y, m, d - 2), backgroundColor: '#f39c12', //yellow borderColor: '#f39c12' //yellow }, { title: 'Meeting', start: new Date(y, m, d, 10, 30), allDay: false, backgroundColor: '#0073b7', //Blue borderColor: '#0073b7' //Blue }, { title: 'Lunch', start: new Date(y, m, d, 12, 0), end: new Date(y, m, d, 14, 0), allDay: false, backgroundColor: '#00c0ef', //Info (aqua) borderColor: '#00c0ef' //Info (aqua) }, { title: 'Birthday Party', start: new Date(y, m, d + 1, 19, 0), end: new Date(y, m, d + 1, 22, 30), allDay: false, backgroundColor: '#00a65a', //Success (green) borderColor: '#00a65a' //Success (green) }, { title: 'Open Google', start: new Date(y, m, 28), end: new Date(y, m, 29), url: 'http://google.com/', backgroundColor: '#3c8dbc', //Primary (light-blue) borderColor: '#3c8dbc' //Primary (light-blue) } ]; } // When dom ready, init calendar and events $(function() { // The element that will display the calendar var calendar = $('#calendar'); var demoEvents = createDemoEvents(); initExternalEvents(calendar); initCalendar(calendar, demoEvents); }); }(jQuery, window, document)); /**========================================================= * Module: clear-storage.js * Removes a key from the browser storage via element click =========================================================*/ (function($, window, document){ 'use strict'; if( !store || !store.enabled ) return; var Selector = '[data-toggle="reset"]'; $(document).on('click', Selector, function (e) { e.preventDefault(); var key = $(this).data('key'); if(key) { store.remove(key); // reload the page window.location.reload(); } else { $.error('No storage key specified for reset.'); } }); }(jQuery, window, document)); /**========================================================= * Module: dataTable,js * dataTable init =========================================================*/ (function($, window, document){ 'use strict'; $(function(){ if ( ! $.fn.dataTable ) return; // // ID: dataTables-accounts // var dtAccounts = $('#dataTables-accounts').dataTable({ 'sDom': '<"wrapper"t<"row"<"col-md-6"i><"col-md-6"p>>>', 'paging': true, // Table pagination 'ordering': true, // Column ordering 'info': true, // Bottom left status text 'order': [[ 1, "asc" ]], // Text translation options // Note the required keywords between underscores (e.g _MENU_) oLanguage: { sSearch: 'Search all columns:', sLengthMenu: '_MENU_ records per page', info: 'Showing page _PAGE_ of _PAGES_', zeroRecords: 'Nothing found - sorry', infoEmpty: 'No records available', infoFiltered: '(filtered from _MAX_ total records)' } }); var inputSearchClass = 'datatable_input_col_search'; var columnInputs = $('tfoot .'+inputSearchClass); // On input keyup trigger filtering columnInputs.keyup(function () { dtAccounts.fnFilter(this.value, columnInputs.index(this)); }); // // ID: dataTables-messages // var dtMessages = $('#dataTables-messages').dataTable({ 'sDom': '<"wrapper"t<"row"<"col-md-6"i><"col-md-6"p>>>', 'paging': true, // Table pagination 'ordering': true, // Column ordering 'info': true, // Bottom left status text 'order': [[ 3, "asc" ]], // Text translation options // Note the required keywords between underscores (e.g _MENU_) oLanguage: { sSearch: 'Search all columns:', sLengthMenu: '_MENU_ records per page', info: 'Showing page _PAGE_ of _PAGES_', zeroRecords: 'Nothing found - sorry', infoEmpty: 'No records available', infoFiltered: '(filtered from _MAX_ total records)' } }); var inputSearchClass = 'datatable_input_col_search'; var columnInputs = $('tfoot .'+inputSearchClass); // On input keyup trigger filtering columnInputs.keyup(function () { dtMessages.fnFilter(this.value, columnInputs.index(this)); }); // // ID: dataTables-contacts // var dtContacts = $('#dataTables-contacts').dataTable({ 'sDom': '<"wrapper"t<"row"<"col-md-6"i><"col-md-6"p>>>', 'paging': true, // Table pagination 'ordering': true, // Column ordering 'info': true, // Bottom left status text 'order': [[ 0, "asc" ]], // Text translation options // Note the required keywords between underscores (e.g _MENU_) oLanguage: { sSearch: 'Search all columns:', sLengthMenu: '_MENU_ records per page', info: 'Showing page _PAGE_ of _PAGES_', zeroRecords: 'Nothing found - sorry', infoEmpty: 'No records available', infoFiltered: '(filtered from _MAX_ total records)' } }); var inputSearchClass = 'datatable_input_col_search'; var columnInputs = $('tfoot .'+inputSearchClass); // On input keyup trigger filtering columnInputs.keyup(function () { dtContacts.fnFilter(this.value, columnInputs.index(this)); }); }); }(jQuery, window, document)); /**========================================================= * Module: datepicker,js * DateTime Picker init =========================================================*/ (function($, window, document){ 'use strict'; var Selector = '.datetimepicker'; $(Selector).each(function() { var $this = $(this), options = $this.data(); // allow to set options via data-* attributes $this.datetimepicker($.extend( options, { // support for FontAwesome icons icons: { time: 'fa fa-clock-o', date: 'fa fa-calendar', up: 'fa fa-arrow-up', down: 'fa fa-arrow-down' } })); // Force a dropdown hide when click out of the input $(document).on('click', function(){ $this.data('DateTimePicker').hide(); }); }); }(jQuery, window, document)); /**========================================================= * Module: dropdown-animate.js * Animated transition for dropdown open state * Animation name placed in [data-play="animationName"] (http://daneden.github.io/animate.css/) * Optionally add [data-duration=seconds] * * Requires animo.js =========================================================*/ (function($, window, document){ 'use strict'; $(function() { var Selector = '.dropdown-toggle[data-play]', parent = $(Selector).parent(); /* From BS-Doc: All dropdown events are fired at the .dropdown-menu's parent element. */ parent.on('show.bs.dropdown', function () { //e.preventDefault(); var $this = $(this), toggle = $this.children('.dropdown-toggle'), animation = toggle.data('play'), duration = toggle.data('duration') || 0.5, target = $this.children('.dropdown-menu'); if(!target || !target.length) $.error('No target for play-animation'); else if( $.fn.animo && animation) target.animo( { animation: animation, duration: duration} ); }); }); }(jQuery, window, document)); /**========================================================= * Module: flot-chart.js * Initializes the flot chart plugin and attaches the * plugin to elements according to its type =========================================================*/ (function($, window, document){ 'use strict'; /** * Global object to load data for charts using ajax * Request the chart data from the server via post * Expects a response in JSON format to init the plugin * Usage * chart = new floatChart('#id', 'server/chart-data.php') * ... * chart.requestData(options); * * @param Chart element placeholder or selector * @param Url to get the data via post. Response in JSON format */ window.FlotChart = function (element, url) { // Properties this.element = $(element); this.url = url; // Public method this.requestData = function (option, method, callback) { var self = this; // support params (option), (option, method, callback) or (option, callback) callback = (method && $.isFunction(method)) ? method : callback; method = (method && typeof method == 'string') ? method : 'POST'; self.option = option; // save options $.ajax({ url: self.url, cache: false, type: method, dataType: 'json' }).done(function (data) { $.plot( self.element, data, option ); if(callback) callback(); }); return this; // chain-ability }; // Listen to refresh events this.listen = function() { var self = this, chartPanel = this.element.parents('.panel').eq(0); // attach custom event chartPanel.on('panel-refresh', function(event, panel) { // request data and remove spinner when done self.requestData(self.option, function(){ panel.removeSpinner(); }); }); return this; // chain-ability }; }; // // Start of Demo Script // $(function () { // Bar chart (function () { var Selector = '.chart-bar'; $(Selector).each(function() { var source = $(this).data('source') || $.error('Bar: No source defined.'); var chart = new FlotChart(this, source), //panel = $(Selector).parents('.panel'), option = { series: { bars: { align: 'center', lineWidth: 0, show: true, barWidth: 0.6, fill: 0.9 } }, grid: { borderColor: '#eee', borderWidth: 1, hoverable: true, backgroundColor: '#fcfcfc' }, tooltip: true, tooltipOpts: { content: '%x : %y' }, xaxis: { tickColor: '#fcfcfc', mode: 'categories' }, yaxis: { tickColor: '#eee' }, shadowSize: 0 }; // Send Request chart.requestData(option); }); })(); // Bar Stacked chart (function () { var Selector = '.chart-bar-stacked'; $(Selector).each(function() { var source = $(this).data('source') || $.error('Bar Stacked: No source defined.'); var chart = new FlotChart(this, source), option = { series: { stack: true, bars: { align: 'center', lineWidth: 0, show: true, barWidth: 0.6, fill: 0.9 } }, grid: { borderColor: '#eee', borderWidth: 1, hoverable: true, backgroundColor: '#fcfcfc' }, tooltip: true, tooltipOpts: { content: '%x : %y' }, xaxis: { tickColor: '#fcfcfc', mode: 'categories' }, yaxis: { tickColor: '#eee' }, shadowSize: 0 }; // Send Request chart.requestData(option); }); })(); // Area chart (function () { var Selector = '.chart-area'; $(Selector).each(function() { var source = $(this).data('source') || $.error('Area: No source defined.'); var chart = new FlotChart(this, source), option = { series: { lines: { show: true, fill: 0.8 }, points: { show: true, radius: 4 } }, grid: { borderColor: '#eee', borderWidth: 1, hoverable: true, backgroundColor: '#fcfcfc' }, tooltip: true, tooltipOpts: { content: '%x : %y' }, xaxis: { tickColor: '#fcfcfc', mode: 'categories' }, yaxis: { tickColor: '#eee', tickFormatter: function (v) { return v + ' visitors'; } }, shadowSize: 0 }; // Send Request and Listen for refresh events chart.requestData(option).listen(); }); })(); // Line chart (function () { var Selector = '.chart-line'; $(Selector).each(function() { var source = $(this).data('source') || $.error('Line: No source defined.'); var chart = new FlotChart(this, source), option = { series: { lines: { show: true, fill: 0.01 }, points: { show: true, radius: 4 } }, grid: { borderColor: '#eee', borderWidth: 1, hoverable: true, backgroundColor: '#fcfcfc' }, tooltip: true, tooltipOpts: { content: '%x : %y' }, xaxis: { tickColor: '#eee', mode: 'categories' }, yaxis: { tickColor: '#eee' }, shadowSize: 0 }; // Send Request chart.requestData(option); }); })(); // Pïe (function () { var Selector = '.chart-pie'; $(Selector).each(function() { var source = $(this).data('source') || $.error('Pie: No source defined.'); var chart = new FlotChart(this, source), option = { series: { pie: { show: true, innerRadius: 0, label: { show: true, radius: 0.8, formatter: function (label, series) { return '<div class="flot-pie-label">' + //label + ' : ' + Math.round(series.percent) + '%</div>'; }, background: { opacity: 0.8, color: '#222' } } } } }; // Send Request chart.requestData(option); }); })(); // Donut (function () { var Selector = '.chart-donut'; $(Selector).each(function() { var source = $(this).data('source') || $.error('Donut: No source defined.'); var chart = new FlotChart(this, source), option = { series: { pie: { show: true, innerRadius: 0.5 // This makes the donut shape } } }; // Send Request chart.requestData(option); }); })(); }); }(jQuery, window, document)); /**========================================================= * Module: form-wizard.js * Handles form wizard plugin and validation * [data-toggle="wizard"] to activate wizard plugin * [data-validate-step] to enable step validation via parsley =========================================================*/ (function($, window, document){ 'use strict'; if(!$.fn.bwizard) return; var Selector = '[data-toggle="wizard"]'; $(Selector).each(function() { var wizard = $(this), validate = wizard.data('validateStep'); // allow to set options via data-* attributes if(validate) { wizard.bwizard({ clickableSteps: false, validating: function(e, ui) { var $this = $(this), form = $this.parent(), group = form.find('.bwizard-activated'); if (false === form.parsley().validate( group[0].id )) { e.preventDefault(); return; } } }); } else { wizard.bwizard(); } }); }(jQuery, window, document)); /**========================================================= * Module: fullscreen.js * Removes a key from the browser storage via element click =========================================================*/ (function($, window, document){ 'use strict'; if( !screenfull ) return; var Selector = '[data-toggle="fullscreen"]'; $(document).on('click', Selector, function (e) { e.preventDefault(); if (screenfull.enabled) { screenfull.toggle(); // Switch icon indicator if(screenfull.isFullscreen) $(this).children('em').removeClass('fa-expand').addClass('fa-compress'); else $(this).children('em').removeClass('fa-compress').addClass('fa-expand'); } else { /*Ignore or do something else*/ } }); }(jQuery, window, document)); /**========================================================= * Module: gmap.js * Init Google Map plugin =========================================================*/ (function($, window, document){ 'use strict'; // ------------------------- // Map Style definition // ------------------------- // Custom core styles // Get more styles from http://snazzymaps.com/style/29/light-monochrome // - Just replace and assign to 'MapStyles' the new style array var MapStyles = [{featureType:'water',stylers:[{visibility:'on'},{color:'#bdd1f9'}]},{featureType:'all',elementType:'labels.text.fill',stylers:[{color:'#334165'}]},{featureType:'landscape',stylers:[{color:'#e9ebf1'}]},{featureType:'road.highway',elementType:'geometry',stylers:[{color:'#c5c6c6'}]},{featureType:'road.arterial',elementType:'geometry',stylers:[{color:'#fff'}]},{featureType:'road.local',elementType:'geometry',stylers:[{color:'#fff'}]},{featureType:'transit',elementType:'geometry',stylers:[{color:'#d8dbe0'}]},{featureType:'poi',elementType:'geometry',stylers:[{color:'#cfd5e0'}]},{featureType:'administrative',stylers:[{visibility:'on'},{lightness:33}]},{featureType:'poi.park',elementType:'labels',stylers:[{visibility:'on'},{lightness:20}]},{featureType:'road',stylers:[{color:'#d8dbe0',lightness:20}]}]; // ------------------------- // Custom Script // ------------------------- var mapSelector = '[data-toggle="gmap"]'; if($.fn.gMap) { var gMapRefs = []; $(mapSelector).each(function(){ var $this = $(this), addresses = $this.data('address') && $this.data('address').split(';'), titles = $this.data('title') && $this.data('title').split(';'), zoom = $this.data('zoom') || 14, maptype = $this.data('maptype') || 'ROADMAP', // or 'TERRAIN' markers = []; if(addresses) { for(var a in addresses) { if(typeof addresses[a] == 'string') { markers.push({ address: addresses[a], html: (titles && titles[a]) || '', popup: true /* Always popup */ }); } } var options = { controls: { panControl: false, zoomControl: true, mapTypeControl: true, scaleControl: true, streetViewControl: true, overviewMapControl: true }, scrollwheel: false, maptype: maptype, markers: markers, zoom: zoom // More options https://github.com/marioestrada/jQuery-gMap }; var gMap = $this.gMap(options); var ref = gMap.data('gMap.reference'); // save in the map references list gMapRefs.push(ref); // set the styles if($this.data('styled') !== undefined) { ref.setOptions({ styles: MapStyles }); } } }); //each } // Center Map marker on resolution change $(window).resize(function() { if(gMapRefs && gMapRefs.length) { for( var r in gMapRefs) { var mapRef = gMapRefs[r]; var currMapCenter = mapRef.getCenter(); if(mapRef && currMapCenter) { google.maps.event.trigger(mapRef, 'resize'); mapRef.setCenter(currMapCenter); } } } }); }(jQuery, window, document)); /**========================================================= * Module: load-css.js * Request and load into the current page a css file =========================================================*/ (function($, window, document){ 'use strict'; var Selector = '[data-toggle="load-css"]'; $(document).on('click', Selector, function (e) { e.preventDefault(); var uri = $(this).data('uri'), link; if(uri) { link = createLink(); if(link) { injectStylesheet(link, uri); } else { $.error('Error creating new stylsheet link element.'); } } else { $.error('No stylesheet location defined.'); } }); function createLink() { var linkId = 'autoloaded-stylesheet', link = $('#'+linkId); if( ! link.length ) { var newLink = $('<link rel="stylesheet">').attr('id', linkId); $('head').append(newLink); link = $('#'+linkId); } return link; } function injectStylesheet(element, uri) { var v = '?id='+Math.round(Math.random()*10000); // forces to jump cache if(element.length) { element.attr('href', uri + v); } } }(jQuery, window, document)); /**========================================================= * Module: markdownarea.js * Markdown Editor from UIKit adapted for Bootstrap Layout * Requires uikit core - codemirror - marked =========================================================*/ (function($, window, document){ 'use strict'; var Markdownarea = function(element, options){ var $element = $(element); if($element.data("markdownarea")) return; this.element = $element; this.options = $.extend({}, Markdownarea.defaults, options); this.marked = this.options.marked || marked; this.CodeMirror = this.options.CodeMirror || CodeMirror; this.marked.setOptions({ gfm : true, tables : true, breaks : true, pedantic : true, sanitize : false, smartLists : true, smartypants : false, langPrefix : 'lang-' }); this.init(); this.element.data("markdownarea", this); }; $.extend(Markdownarea.prototype, { init: function(){ var $this = this, tpl = Markdownarea.template; tpl = tpl.replace(/\{\:lblPreview\}/g, this.options.lblPreview); tpl = tpl.replace(/\{\:lblCodeview\}/g, this.options.lblCodeview); this.markdownarea = $(tpl); this.content = this.markdownarea.find(".uk-markdownarea-content"); this.toolbar = this.markdownarea.find(".uk-markdownarea-toolbar"); this.preview = this.markdownarea.find(".uk-markdownarea-preview").children().eq(0); this.code = this.markdownarea.find(".uk-markdownarea-code"); this.element.before(this.markdownarea).appendTo(this.code); this.editor = this.CodeMirror.fromTextArea(this.element[0], this.options.codemirror); this.editor.markdownarea = this; this.editor.on("change", (function(){ var render = function(){ var value = $this.editor.getValue(); $this.currentvalue = String(value); $this.element.trigger("markdownarea-before", [$this]); $this.applyPlugins(); $this.marked($this.currentvalue, function (err, markdown) { if (err) throw err; $this.preview.html(markdown); $this.element.val($this.editor.getValue()).trigger("markdownarea-update", [$this]); }); }; render(); return $.Utils.debounce(render, 150); })()); this.code.find(".CodeMirror").css("height", this.options.height); this._buildtoolbar(); this.fit(); $(window).on("resize", $.Utils.debounce(function(){ $this.fit(); }, 200)); var previewContainer = $this.preview.parent(), codeContent = this.code.find('.CodeMirror-sizer'), codeScroll = this.code.find('.CodeMirror-scroll').on('scroll',$.Utils.debounce(function() { if($this.markdownarea.attr("data-mode")=="tab") return; // calc position var codeHeight = codeContent.height() - codeScroll.height(), previewHeight = previewContainer[0].scrollHeight - previewContainer.height(), ratio = previewHeight / codeHeight, previewPostition = codeScroll.scrollTop() * ratio; // apply new scroll previewContainer.scrollTop(previewPostition); }, 10)); this.markdownarea.on("click", ".uk-markdown-button-markdown, .uk-markdown-button-preview", function(e){ e.preventDefault(); if($this.markdownarea.attr("data-mode")=="tab") { $this.markdownarea.find(".uk-markdown-button-markdown, .uk-markdown-button-preview").removeClass("uk-active").filter(this).addClass("uk-active"); $this.activetab = $(this).hasClass("uk-markdown-button-markdown") ? "code":"preview"; $this.markdownarea.attr("data-active-tab", $this.activetab); } }); this.preview.parent().css("height", this.code.height()); }, applyPlugins: function(){ var $this = this, plugins = Object.keys(Markdownarea.plugins), plgs = Markdownarea.plugins; this.markers = {}; if(plugins.length) { var lines = this.currentvalue.split("\n"); plugins.forEach(function(name){ this.markers[name] = []; }, this); for(var line=0,max=lines.length;line<max;line++) { (function(line){ plugins.forEach(function(name){ var i = 0; lines[line] = lines[line].replace(plgs[name].identifier, function(){ var replacement = plgs[name].cb({ "area" : $this, "found": arguments, "line" : line, "pos" : i++, "uid" : [name, line, i, (new Date().getTime())+"RAND"+(Math.ceil(Math.random() *100000))].join('-'), "replace": function(strwith){ var src = this.area.editor.getLine(this.line), start = src.indexOf(this.found[0]); end = start + this.found[0].length; this.area.editor.replaceRange(strwith, {"line": this.line, "ch":start}, {"line": this.line, "ch":end} ); } }); return replacement; }); }); }(line)); } this.currentvalue = lines.join("\n"); } }, _buildtoolbar: function(){ if(!(this.options.toolbar && this.options.toolbar.length)) return; var $this = this, bar = []; this.options.toolbar.forEach(function(cmd){ if(Markdownarea.commands[cmd]) { var title = Markdownarea.commands[cmd].title ? Markdownarea.commands[cmd].title : cmd; bar.push('<li><a data-markdownarea-cmd="'+cmd+'" title="'+title+'" data-toggle="tooltip">'+Markdownarea.commands[cmd].label+'</a></li>'); if(Markdownarea.commands[cmd].shortcut) { $this.registerShortcut(Markdownarea.commands[cmd].shortcut, Markdownarea.commands[cmd].action); } } }); this.toolbar.html(bar.join("\n")); this.markdownarea.on("click", "a[data-markdownarea-cmd]", function(){ var cmd = $(this).data("markdownareaCmd"); if(cmd && Markdownarea.commands[cmd] && (!$this.activetab || $this.activetab=="code" || cmd=="fullscreen")) { Markdownarea.commands[cmd].action.apply($this, [$this.editor]); } }); }, fit: function() { var mode = this.options.mode; if(mode=="split" && this.markdownarea.width() < this.options.maxsplitsize) { mode = "tab"; } if(mode=="tab") { if(!this.activetab) { this.activetab = "code"; this.markdownarea.attr("data-active-tab", this.activetab); } this.markdownarea.find(".uk-markdown-button-markdown, .uk-markdown-button-preview").removeClass("uk-active") .filter(this.activetab=="code" ? '.uk-markdown-button-markdown':'.uk-markdown-button-preview').addClass("uk-active"); } this.editor.refresh(); this.preview.parent().css("height", this.code.height()); this.markdownarea.attr("data-mode", mode); }, registerShortcut: function(combination, callback){ var $this = this; combination = $.isArray(combination) ? combination : [combination]; for(var i=0,max=combination.length;i < max;i++) { var map = {}; map[combination[i]] = function(){ callback.apply($this, [$this.editor]); }; $this.editor.addKeyMap(map); } }, getMode: function(){ var pos = this.editor.getDoc().getCursor(); return this.editor.getTokenAt(pos).state.base.htmlState ? 'html':'markdown'; } }); //jQuery plugin $.fn.markdownarea = function(options){ return this.each(function(){ var ele = $(this); if(!ele.data("markdownarea")) { var obj = new Markdownarea(ele, options); } }); }; var baseReplacer = function(replace, editor){ var text = editor.getSelection(), markdown = replace.replace('$1', text); editor.replaceSelection(markdown, 'end'); }; Markdownarea.commands = { "fullscreen": { "title" : 'Fullscreen', "label" : '<i class="fa fa-expand"></i>', "action" : function(editor){ editor.markdownarea.markdownarea.toggleClass("uk-markdownarea-fullscreen"); // dont use uk- to avoid rules declaration $('html').toggleClass("markdownarea-fullscreen"); $('html, body').scrollTop(0); var wrap = editor.getWrapperElement(); if(editor.markdownarea.markdownarea.hasClass("uk-markdownarea-fullscreen")) { editor.state.fullScreenRestore = {scrollTop: window.pageYOffset, scrollLeft: window.pageXOffset, width: wrap.style.width, height: wrap.style.height}; wrap.style.width = ""; wrap.style.height = editor.markdownarea.content.height()+"px"; document.documentElement.style.overflow = "hidden"; } else { document.documentElement.style.overflow = ""; var info = editor.state.fullScreenRestore; wrap.style.width = info.width; wrap.style.height = info.height; window.scrollTo(info.scrollLeft, info.scrollTop); } editor.refresh(); editor.markdownarea.preview.parent().css("height", editor.markdownarea.code.height()); } }, "bold" : { "title" : "Bold", "label" : '<i class="fa fa-bold"></i>', "shortcut": ['Ctrl-B', 'Cmd-B'], "action" : function(editor){ baseReplacer(this.getMode() == 'html' ? "<strong>$1</strong>":"**$1**", editor); } }, "italic" : { "title" : "Italic", "label" : '<i class="fa fa-italic"></i>', "action" : function(editor){ baseReplacer(this.getMode() == 'html' ? "<em>$1</em>":"*$1*", editor); } }, "strike" : { "title" : "Strikethrough", "label" : '<i class="fa fa-strikethrough"></i>', "action" : function(editor){ baseReplacer(this.getMode() == 'html' ? "<del>$1</del>":"~~$1~~", editor); } }, "blockquote" : { "title" : "Blockquote", "label" : '<i class="fa fa-quote-right"></i>', "action" : function(editor){ baseReplacer(this.getMode() == 'html' ? "<blockquote><p>$1</p></blockquote>":"> $1", editor); } }, "link" : { "title" : "Link", "label" : '<i class="fa fa-link"></i>', "action" : function(editor){ baseReplacer(this.getMode() == 'html' ? '<a href="http://">$1</a>':"[$1](http://)", editor); } }, "picture" : { "title" : "Picture", "label" : '<i class="fa fa-picture-o"></i>', "action" : function(editor){ baseReplacer(this.getMode() == 'html' ? '<img src="http://" alt="$1">':"![$1](http://)", editor); } }, "listUl" : { "title" : "Unordered List", "label" : '<i class="fa fa-list-ul"></i>', "action" : function(editor){ if(this.getMode() == 'markdown') baseReplacer("* $1", editor); } }, "listOl" : { "title" : "Ordered List", "label" : '<i class="fa fa-list-ol"></i>', "action" : function(editor){ if(this.getMode() == 'markdown') baseReplacer("1. $1", editor); } } }; Markdownarea.defaults = { "mode" : "split", "height" : 500, "maxsplitsize" : 1000, "codemirror" : { mode: 'gfm', tabMode: 'indent', tabindex: "2", lineWrapping: true, dragDrop: false, autoCloseTags: true, matchTags: true }, "toolbar" : [ "bold", "italic", "strike", "link", "picture", "blockquote", "listUl", "listOl" ], "lblPreview" : "Preview", "lblCodeview" : "Markdown" }; Markdownarea.template = '<div class="uk-markdownarea uk-clearfix" data-mode="split">' + '<div class="uk-markdownarea-navbar">' + '<ul class="uk-markdownarea-navbar-nav uk-markdownarea-toolbar"></ul>' + '<div class="uk-markdownarea-navbar-flip">' + '<ul class="uk-markdownarea-navbar-nav">' + '<li class="uk-markdown-button-markdown"><a>{:lblCodeview}</a></li>' + '<li class="uk-markdown-button-preview"><a>{:lblPreview}</a></li>' + '<li><a data-markdownarea-cmd="fullscreen" data-toggle="tooltip" title="Zen Mode"><i class="fa fa-expand"></i></a></li>' + '</ul>' + '</div>' + '</div>' + '<div class="uk-markdownarea-content">' + '<div class="uk-markdownarea-code"></div>' + '<div class="uk-markdownarea-preview"><div></div></div>' + '</div>' + '</div>'; Markdownarea.plugins = {}; Markdownarea.addPlugin = function(name, identifier, callback) { Markdownarea.plugins[name] = {"identifier":identifier, "cb":callback}; }; $.fn["markdownarea"] = Markdownarea; // init code $(function() { $("textarea[data-uk-markdownarea]").each(function() { var area = $(this), obj; if (!area.data("markdownarea")) { obj = new Markdownarea(area, $.Utils.options(area.attr("data-uk-markdownarea"))); } }); }); return Markdownarea; }(jQuery, window, document)); /**========================================================= * Module: navbar-search.js * Navbar search toggler * To open search add a buton with [data-toggle="navbar-search"] * To close search add an element with [data-toggle="navbar-search-dismiss"] * * Auto dismiss on ESC key =========================================================*/ (function($, window, document){ 'use strict'; $(function() { var openSelector = '[data-toggle="navbar-search"]', dismissSelector = '[data-toggle="navbar-search-dismiss"]', inputSelector = '.navbar-form input[type="text"]', navbarForm = $('form.navbar-form'); var NavSearch = { toggle: function() { navbarForm.toggleClass('open'); var isOpen = navbarForm.hasClass('open'); navbarForm.find('input')[isOpen ? 'focus' : 'blur'](); }, dismiss: function() { navbarForm .removeClass('open') // Close control .find('input[type="text"]').blur() // remove focus .val('') // Empty input ; } }; $(document) .on('click', NavSearch.dismiss) .on('click', openSelector +', '+ inputSelector +', '+ dismissSelector, function (e) { e.stopPropagation(); }) .on('click', dismissSelector, NavSearch.dismiss) .on('click', openSelector, NavSearch.toggle) .keyup(function(e) { if (e.keyCode == 27) // ESC NavSearch.dismiss(); }); }); }(jQuery, window, document)); /**========================================================= * Module: notify.js * Create toggleable notifications that fade out automatically. * Based on Notify addon from UIKit (http://getuikit.com/docs/addons_notify.html) * [data-toggle="notify"] * [data-options="options in json format" ] =========================================================*/ (function($, window, document){ 'use strict'; var Selector = '[data-toggle="notify"]', autoloadSelector = '[data-onload]', doc = $(document); $(function() { $(Selector).each(function(){ var $this = $(this), onload = $this.data('onload'); if(onload !== undefined) { setTimeout(function(){ notifyNow($this); }, 800); } $this.on('click', function (e) { e.preventDefault(); notifyNow($this); }); }); }); function notifyNow($element) { var message = $element.data('message'), options = $element.data('options'); if(!message) $.error('Notify: No message specified'); $.notify(message, options || {}); } }(jQuery, window, document)); /** * Notify Addon definition as jQuery plugin * Adapted version to work with Bootstrap classes * More information http://getuikit.com/docs/addons_notify.html */ (function($, window, document){ var containers = {}, messages = {}, notify = function(options){ if ($.type(options) == 'string') { options = { message: options }; } if (arguments[1]) { options = $.extend(options, $.type(arguments[1]) == 'string' ? {status:arguments[1]} : arguments[1]); } return (new Message(options)).show(); }, closeAll = function(group, instantly){ if(group) { for(var id in messages) { if(group===messages[id].group) messages[id].close(instantly); } } else { for(var id in messages) { messages[id].close(instantly); } } }; var Message = function(options){ var $this = this; this.options = $.extend({}, Message.defaults, options); this.uuid = "ID"+(new Date().getTime())+"RAND"+(Math.ceil(Math.random() * 100000)); this.element = $([ // alert-dismissable enables bs close icon '<div class="uk-notify-message alert-dismissable">', '<a class="close">&times;</a>', '<div>'+this.options.message+'</div>', '</div>' ].join('')).data("notifyMessage", this); // status if (this.options.status) { this.element.addClass('alert alert-'+this.options.status); this.currentstatus = this.options.status; } this.group = this.options.group; messages[this.uuid] = this; if(!containers[this.options.pos]) { containers[this.options.pos] = $('<div class="uk-notify uk-notify-'+this.options.pos+'"></div>').appendTo('body').on("click", ".uk-notify-message", function(){ $(this).data("notifyMessage").close(); }); } }; $.extend(Message.prototype, { uuid: false, element: false, timout: false, currentstatus: "", group: false, show: function() { if (this.element.is(":visible")) return; var $this = this; containers[this.options.pos].show().prepend(this.element); var marginbottom = parseInt(this.element.css("margin-bottom"), 10); this.element.css({"opacity":0, "margin-top": -1*this.element.outerHeight(), "margin-bottom":0}).animate({"opacity":1, "margin-top": 0, "margin-bottom":marginbottom}, function(){ if ($this.options.timeout) { var closefn = function(){ $this.close(); }; $this.timeout = setTimeout(closefn, $this.options.timeout); $this.element.hover( function() { clearTimeout($this.timeout); }, function() { $this.timeout = setTimeout(closefn, $this.options.timeout); } ); } }); return this; }, close: function(instantly) { var $this = this, finalize = function(){ $this.element.remove(); if(!containers[$this.options.pos].children().length) { containers[$this.options.pos].hide(); } delete messages[$this.uuid]; }; if(this.timeout) clearTimeout(this.timeout); if(instantly) { finalize(); } else { this.element.animate({"opacity":0, "margin-top": -1* this.element.outerHeight(), "margin-bottom":0}, function(){ finalize(); }); } }, content: function(html){ var container = this.element.find(">div"); if(!html) { return container.html(); } container.html(html); return this; }, status: function(status) { if(!status) { return this.currentstatus; } this.element.removeClass('alert alert-'+this.currentstatus).addClass('alert alert-'+status); this.currentstatus = status; return this; } }); Message.defaults = { message: "", status: "normal", timeout: 5000, group: null, pos: 'top-center' }; $["notify"] = notify; $["notify"].message = Message; $["notify"].closeAll = closeAll; return notify; }(jQuery, window, document)); /**========================================================= * Module: panel-perform.js * Dismiss panels * [data-perform="panel-dismiss"] * * Requires animo.js =========================================================*/ (function($, window, document){ 'use strict'; var panelSelector = '[data-perform="panel-dismiss"]', removeEvent = 'panel-remove', removedEvent = 'panel-removed'; $(document).on('click', panelSelector, function () { // find the first parent panel var parent = $(this).closest('.panel'); if($.support.animation) { parent.animo({animation: 'bounceOut'}, removeElement); } else removeElement(); function removeElement() { // Trigger the event and finally remove the element $.when(parent.trigger(removeEvent, [parent])) .done(destroyPanel); } function destroyPanel() { var col = parent.parent(); parent.remove(); // remove the parent if it is a row and is empty and not a sortable (portlet) col .trigger(removedEvent) // An event to catch when the panel has been removed from DOM .filter(function() { var el = $(this); return (el.is('[class*="col-"]:not(.sortable)') && el.children('*').length === 0); }).remove(); } }); }(jQuery, window, document)); /** * Collapse panels * [data-perform="panel-collapse"] * * Also uses browser storage to keep track * of panels collapsed state */ (function($, window, document) { 'use strict'; var panelSelector = '[data-perform="panel-collapse"]', storageKeyName = 'panelState'; // Prepare the panel to be collapsable and its events $(panelSelector).each(function() { // find the first parent panel var $this = $(this), parent = $this.closest('.panel'), wrapper = parent.find('.panel-wrapper'), collapseOpts = {toggle: false}, iconElement = $this.children('em'), panelId = parent.attr('id'); // if wrapper not added, add it // we need a wrapper to avoid jumping due to the paddings if( ! wrapper.length) { wrapper = parent.children('.panel-heading').nextAll() //find('.panel-body, .panel-footer') .wrapAll('<div/>') .parent() .addClass('panel-wrapper'); collapseOpts = {}; } // Init collapse and bind events to switch icons wrapper .collapse(collapseOpts) .on('hide.bs.collapse', function() { setIconHide( iconElement ); savePanelState( panelId, 'hide' ); }) .on('show.bs.collapse', function() { setIconShow( iconElement ); savePanelState( panelId, 'show' ); }); // Load the saved state if exists var currentState = loadPanelState( panelId ); if(currentState) { setTimeout(function() { wrapper.collapse( currentState ); }, 0); savePanelState( panelId, currentState ); } }); // finally catch clicks to toggle panel collapse $(document).on('click', panelSelector, function () { var parent = $(this).closest('.panel'); var wrapper = parent.find('.panel-wrapper'); wrapper.collapse('toggle'); }); ///////////////////////////////////////////// // Common use functions for panel collapse // ///////////////////////////////////////////// function setIconShow(iconEl) { iconEl.removeClass('fa-plus').addClass('fa-minus'); } function setIconHide(iconEl) { iconEl.removeClass('fa-minus').addClass('fa-plus'); } function savePanelState(id, state) { if(!id || !store || !store.enabled) return false; var data = store.get(storageKeyName); if(!data) { data = {}; } data[id] = state; store.set(storageKeyName, data); } function loadPanelState(id) { if(!id || !store || !store.enabled) return false; var data = store.get(storageKeyName); if(data) { return data[id] || false; } } }(jQuery, window, document)); /** * Refresh panels * [data-perform="panel-refresh"] * [data-spinner="standard"] */ (function($, window, document){ 'use strict'; var panelSelector = '[data-perform="panel-refresh"]', refreshEvent = 'panel-refresh', csspinnerClass = 'csspinner', defaultSpinner = 'standard'; // method to clear the spinner when done function removeSpinner(){ this.removeClass(csspinnerClass); } // catch clicks to toggle panel refresh $(document).on('click', panelSelector, function () { var $this = $(this), panel = $this.parents('.panel').eq(0), spinner = $this.data('spinner') || defaultSpinner ; // start showing the spinner panel.addClass(csspinnerClass + ' ' + spinner); // attach as public method panel.removeSpinner = removeSpinner; // Trigger the event and send the panel object $this.trigger(refreshEvent, [panel]); }); /** * This function is only to show a demonstration * of how to use the panel refresh system via * custom event. * IMPORTANT: see how to remove the spinner. */ $('.panel.panel-demo').on('panel-refresh', function(e, panel){ // perform any action when a .panel triggers a the refresh event setTimeout(function(){ // when the action is done, just remove the spinner class panel.removeSpinner(); }, 3000); }); }(jQuery, window, document)); /**========================================================= * Module: play-animation.js * Provides a simple way to run animation with a trigger * Targeted elements must have * [data-toggle="play-animation"] * [data-target="Target element affected by the animation"] * [data-play="Animation name (http://daneden.github.io/animate.css/)"] * * Requires animo.js =========================================================*/ (function($, window, document){ 'use strict'; var Selector = '[data-toggle="play-animation"]'; $(function() { var $scroller = $(window).add('body, .wrapper'); // Parse animations params and attach trigger to scroll $(Selector).each(function() { var $this = $(this), offset = $this.data('offset'), delay = $this.data('delay') || 100, // milliseconds animation = $this.data('play') || 'bounce'; if(typeof offset !== 'undefined') { // test if the element starts visible testAnimation($this); // test on scroll $scroller.scroll(function(){ testAnimation($this); }); } // Test an element visibilty and trigger the given animation function testAnimation(element) { if ( !element.hasClass('anim-running') && $.Utils.isInView(element, {topoffset: offset})) { element .addClass('anim-running'); setTimeout(function() { element .addClass('anim-done') .animo( { animation: animation, duration: 0.7} ); }, delay); } } }); // Run click triggered animations $(document).on('click', Selector, function() { var $this = $(this), targetSel = $this.data('target'), animation = $this.data('play') || 'bounce', target = $(targetSel); if(target && target) { target.animo( { animation: animation } ); } }); }); }(jQuery, window, document)); /**========================================================= * Module: portlet.js * Drag and drop any panel to change its position * The Selector should could be applied to any object that contains * panel, so .col-* element are ideal. =========================================================*/ (function($, window, document){ 'use strict'; // Component is optional if(!$.fn.sortable) return; var Selector = '[data-toggle="portlet"]', storageKeyName = 'portletState'; $(function(){ $( Selector ).sortable({ connectWith: Selector, items: 'div.panel', handle: '.portlet-handler', opacity: 0.7, placeholder: 'portlet box-placeholder', cancel: '.portlet-cancel', forcePlaceholderSize: true, iframeFix: false, tolerance: 'pointer', helper: 'original', revert: 200, forceHelperSize: true, start: saveListSize, update: savePortletOrder, create: loadPortletOrder }) // optionally disables mouse selection //.disableSelection() ; }); function savePortletOrder(event, ui) { var data = store.get(storageKeyName); if(!data) { data = {}; } data[this.id] = $(this).sortable('toArray'); if(data) { store.set(storageKeyName, data); } // save portlet size to avoid jumps saveListSize.apply(this); } function loadPortletOrder() { var data = store.get(storageKeyName); if(data) { var porletId = this.id, panels = data[porletId]; if(panels) { var portlet = $('#'+porletId); $.each(panels, function(index, value) { $('#'+value).appendTo(portlet); }); } } // save portlet size to avoid jumps saveListSize.apply(this); } // Keeps a consistent size in all portlet lists function saveListSize() { var $this = $(this); $this.css('min-height', $this.height()); } /*function resetListSize() { $(this).css('min-height', ""); }*/ }(jQuery, window, document)); /**========================================================= * Module: sidebar-menu.js * Provides a simple way to implement bootstrap collapse plugin using a target * next to the current element (sibling) * Targeted elements must have [data-toggle="collapse-next"] =========================================================*/ (function($, window, document){ 'use strict'; var collapseSelector = '[data-toggle="collapse-next"]', colllapsibles = $('.sidebar .collapse').collapse({toggle: false}), toggledClass = 'aside-collapsed', $body = $('body'), phone_mq = 768; // media querie $(function() { $(document) .on('click', collapseSelector, function (e) { e.preventDefault(); if ($(window).width() > phone_mq && $body.hasClass(toggledClass)) return; // Try to close all of the collapse areas first colllapsibles.collapse('hide'); // ...then open just the one we want var $target = $(this).siblings('ul'); $target.collapse('show'); }) // Submenu when aside is toggled .on('click', '.sidebar > .nav > li', function() { if ($body.hasClass(toggledClass) && $(window).width() > phone_mq) { $('.sidebar > .nav > li') .not(this) .removeClass('open') .end() .filter(this) .toggleClass('open'); } }); }); }(jQuery, window, document)); /**========================================================= * Module: sparkline.js * SparkLines Mini Charts =========================================================*/ (function($, window, document){ 'use strict'; var Selector = '.inlinesparkline'; // Match color with css values to style charts var colors = { primary: '#6cb5f4', success: '#27c24c', info: '#23b7e5', warning: '#ff902b', danger: '#f05050', inverse: '#131e26', green: '#0BBEB5', pink: '#ff3366', purple: '#7266ba', dark: '#3a3f51' }; // Inline sparklines take their values from the contents of the tag $(Selector).each(function() { var $this = $(this); var data = $this.data(); if(data.barColor && colors[data.barColor]) data.barColor = colors[data.barColor]; var options = data; options.type = data.type || 'bar'; // default chart is bar $(this).sparkline('html', options); }); }(jQuery, window, document)); /**========================================================= * Module: table-checkall.js * Tables check all checkbox =========================================================*/ (function($, window, document){ 'use strict'; var Selector = 'th.check-all'; $(Selector).on('change', function() { var $this = $(this), index= $this.index() + 1, checkbox = $this.find('input[type="checkbox"]'), table = $this.parents('table'); // Make sure to affect only the correct checkbox column table.find('tbody > tr > td:nth-child('+index+') input[type="checkbox"]') .prop('checked', checkbox[0].checked); }); }(jQuery, window, document)); /**========================================================= * Module: toggle-state.js * Toggle a classname from the BODY Useful to change a state that * affects globally the entire layout or more than one item * Targeted elements must have [data-toggle="CLASS-NAME-TO-TOGGLE"] =========================================================*/ (function($, window, document){ 'use strict'; var SelectorToggle = '[data-toggle-state]', $body = $('body'); $(document).on('click', SelectorToggle, function (e) { e.preventDefault(); var classname = $(this).data('toggleState'); if(classname) $body.toggleClass(classname); }); }(jQuery, window, document)); /**========================================================= * Module: tooltips.js * Initialize Bootstrap tooltip with auto placement =========================================================*/ (function($, window, document){ 'use strict'; $(function(){ $('[data-toggle="tooltip"]').tooltip({ container: 'body', placement: function (context, source) { //return (predictTooltipTop(source) < 0) ? "bottom": "top"; var pos = 'top'; if(predictTooltipTop(source) < 0) pos = 'bottom'; if(predictTooltipLeft(source) < 0) pos = 'right'; return pos; } }); }); // Predicts tooltip top position // based on the trigger element function predictTooltipTop(el) { var top = el.offsetTop; var height = 40; // asumes ~40px tooltip height while(el.offsetParent) { el = el.offsetParent; top += el.offsetTop; } return (top - height) - (window.pageYOffset); } // Predicts tooltip top position // based on the trigger element function predictTooltipLeft(el) { var left = el.offsetLeft; var width = el.offsetWidth; while(el.offsetParent) { el = el.offsetParent; left += el.offsetLeft; } return (left - width) - (window.pageXOffset); } }(jQuery, window, document)); /**========================================================= * Module: upload-demo.js * Upload Demostration * See file server/upload.php for more details =========================================================*/ (function($, window, document){ 'use strict'; $(function() { var progressbar = $('#progressbar'), bar = progressbar.find('.progress-bar'), settings = { action: 'server/upload.php', // upload url allow : '*.(jpg|jpeg|gif|png)', // allow only images param: 'upfile', loadstart: function() { bar.css('width', '0%').text('0%'); progressbar.removeClass('hidden'); }, progress: function(percent) { percent = Math.ceil(percent); bar.css('width', percent+'%').text(percent+'%'); }, allcomplete: function(response) { bar.css('width', '100%').text('100%'); setTimeout(function(){ progressbar.addClass('hidden'); }, 250); // Upload Completed alert(response); } }; var select = new $.upload.select($('#upload-select'), settings), drop = new $.upload.drop($('#upload-drop'), settings); }); }(jQuery, window, document)); /**========================================================= * Module: upload.js * Allow users to upload files through a file input form element or a placeholder area. * Based on addon from UIKit (http://getuikit.com/docs/addons_upload.html) * * Adapted version to work with Bootstrap classes =========================================================*/ (function($, window, document){ 'use strict'; var UploadSelect = function(element, options) { var $this = this, $element = $(element), options = $.extend({}, xhrupload.defaults, UploadSelect.defaults, options); if ($element.data("uploadSelect")) return; this.element = $element.on("change", function() { xhrupload($this.element[0].files, options); }); $element.data("uploadSelect", this); }; UploadSelect.defaults = {}; var UploadDrop = function(element, options) { var $this = this, $element = $(element), options = $.extend({}, xhrupload.defaults, UploadDrop.defaults, options), hasdragCls = false; if ($element.data("uploadDrop")) return; $element.on("drop", function(e){ if (e.dataTransfer && e.dataTransfer.files) { e.stopPropagation(); e.preventDefault(); $element.removeClass(options.dragoverClass); xhrupload(e.dataTransfer.files, options); } }).on("dragenter", function(e){ e.stopPropagation(); e.preventDefault(); }).on("dragover", function(e){ e.stopPropagation(); e.preventDefault(); if (!hasdragCls) { $element.addClass(options.dragoverClass); hasdragCls = true; } }).on("dragleave", function(e){ e.stopPropagation(); e.preventDefault(); $element.removeClass(options.dragoverClass); hasdragCls = false; }); $element.data("uploadDrop", this); }; UploadDrop.defaults = { 'dragoverClass': 'dragover' }; $.upload = { "select" : UploadSelect, "drop" : UploadDrop }; $.support.ajaxupload = (function() { function supportFileAPI() { var fi = document.createElement('INPUT'); fi.type = 'file'; return 'files' in fi; } function supportAjaxUploadProgressEvents() { var xhr = new XMLHttpRequest(); return !! (xhr && ('upload' in xhr) && ('onprogress' in xhr.upload)); } function supportFormData() { return !! window.FormData; } return supportFileAPI() && supportAjaxUploadProgressEvents() && supportFormData(); })(); if ($.support.ajaxupload){ $.event.props.push("dataTransfer"); } function xhrupload(files, settings) { if (!$.support.ajaxupload){ return this; } settings = $.extend({}, xhrupload.defaults, settings); if (!files.length){ return; } if (settings.allow !== '*.*') { for(var i=0,file;file=files[i];i++) { if(!matchName(settings.allow, file.name)) { if(typeof(settings.notallowed) == 'string') { alert(settings.notallowed); } else { settings.notallowed(file, settings); } return; } } } var complete = settings.complete; if (settings.single){ var count = files.length, uploaded = 0; settings.complete = function(response, xhr){ uploaded = uploaded+1; complete(response, xhr); if (uploaded<count){ upload([files[uploaded]], settings); } else { settings.allcomplete(response, xhr); } }; upload([files[0]], settings); } else { settings.complete = function(response, xhr){ complete(response, xhr); settings.allcomplete(response, xhr); }; upload(files, settings); } function upload(files, settings){ // upload all at once var formData = new FormData(), xhr = new XMLHttpRequest(); if (settings.before(settings, files)===false) return; for (var i = 0, f; f = files[i]; i++) { formData.append(settings.param, f); } for (var p in settings.params) { formData.append(p, settings.params[p]); } // Add any event handlers here... xhr.upload.addEventListener("progress", function(e){ var percent = (e.loaded / e.total)*100; settings.progress(percent, e); }, false); xhr.addEventListener("loadstart", function(e){ settings.loadstart(e); }, false); xhr.addEventListener("load", function(e){ settings.load(e); }, false); xhr.addEventListener("loadend", function(e){ settings.loadend(e); }, false); xhr.addEventListener("error", function(e){ settings.error(e); }, false); xhr.addEventListener("abort", function(e){ settings.abort(e); }, false); xhr.open(settings.method, settings.action, true); xhr.onreadystatechange = function() { settings.readystatechange(xhr); if (xhr.readyState==4){ var response = xhr.responseText; if (settings.type=="json") { try { response = $.parseJSON(response); } catch(e) { response = false; } } settings.complete(response, xhr); } }; xhr.send(formData); } } xhrupload.defaults = { 'action': '', 'single': true, 'method': 'POST', 'param' : 'files[]', 'params': {}, 'allow' : '*.*', 'type' : 'text', // events 'before' : function(o){}, 'loadstart' : function(){}, 'load' : function(){}, 'loadend' : function(){}, 'error' : function(){}, 'abort' : function(){}, 'progress' : function(){}, 'complete' : function(){}, 'allcomplete' : function(){}, 'readystatechange': function(){}, 'notallowed' : function(file, settings){ alert('Only the following file types are allowed: '+settings.allow); } }; function matchName(pattern, path) { var parsedPattern = '^' + pattern.replace(/\//g, '\\/'). replace(/\*\*/g, '(\\/[^\\/]+)*'). replace(/\*/g, '[^\\/]+'). replace(/((?!\\))\?/g, '$1.') + '$'; parsedPattern = '^' + parsedPattern + '$'; return (path.match(new RegExp(parsedPattern)) !== null); } $.xhrupload = xhrupload; return xhrupload; }(jQuery, window, document)); /**========================================================= * Module: utils.js * jQuery Utility functions library * adapted from the core of UIKit =========================================================*/ (function($, window, doc){ 'use strict'; var $html = $("html"), $win = $(window); $.support.transition = (function() { var transitionEnd = (function() { var element = doc.body || doc.documentElement, transEndEventNames = { WebkitTransition: 'webkitTransitionEnd', MozTransition: 'transitionend', OTransition: 'oTransitionEnd otransitionend', transition: 'transitionend' }, name; for (name in transEndEventNames) { if (element.style[name] !== undefined) return transEndEventNames[name]; } }()); return transitionEnd && { end: transitionEnd }; })(); $.support.animation = (function() { var animationEnd = (function() { var element = doc.body || doc.documentElement, animEndEventNames = { WebkitAnimation: 'webkitAnimationEnd', MozAnimation: 'animationend', OAnimation: 'oAnimationEnd oanimationend', animation: 'animationend' }, name; for (name in animEndEventNames) { if (element.style[name] !== undefined) return animEndEventNames[name]; } }()); return animationEnd && { end: animationEnd }; })(); $.support.requestAnimationFrame = window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.msRequestAnimationFrame || window.oRequestAnimationFrame || function(callback){ window.setTimeout(callback, 1000/60); }; $.support.touch = ( ('ontouchstart' in window && navigator.userAgent.toLowerCase().match(/mobile|tablet/)) || (window.DocumentTouch && document instanceof window.DocumentTouch) || (window.navigator['msPointerEnabled'] && window.navigator['msMaxTouchPoints'] > 0) || //IE 10 (window.navigator['pointerEnabled'] && window.navigator['maxTouchPoints'] > 0) || //IE >=11 false ); $.support.mutationobserver = (window.MutationObserver || window.WebKitMutationObserver || window.MozMutationObserver || null); $.Utils = {}; $.Utils.debounce = function(func, wait, immediate) { var timeout; return function() { var context = this, args = arguments; var later = function() { timeout = null; if (!immediate) func.apply(context, args); }; var callNow = immediate && !timeout; clearTimeout(timeout); timeout = setTimeout(later, wait); if (callNow) func.apply(context, args); }; }; $.Utils.removeCssRules = function(selectorRegEx) { var idx, idxs, stylesheet, _i, _j, _k, _len, _len1, _len2, _ref; if(!selectorRegEx) return; setTimeout(function(){ try { _ref = document.styleSheets; for (_i = 0, _len = _ref.length; _i < _len; _i++) { stylesheet = _ref[_i]; idxs = []; stylesheet.cssRules = stylesheet.cssRules; for (idx = _j = 0, _len1 = stylesheet.cssRules.length; _j < _len1; idx = ++_j) { if (stylesheet.cssRules[idx].type === CSSRule.STYLE_RULE && selectorRegEx.test(stylesheet.cssRules[idx].selectorText)) { idxs.unshift(idx); } } for (_k = 0, _len2 = idxs.length; _k < _len2; _k++) { stylesheet.deleteRule(idxs[_k]); } } } catch (_error) {} }, 0); }; $.Utils.isInView = function(element, options) { var $element = $(element); if (!$element.is(':visible')) { return false; } var window_left = $win.scrollLeft(), window_top = $win.scrollTop(), offset = $element.offset(), left = offset.left, top = offset.top; options = $.extend({topoffset:0, leftoffset:0}, options); if (top + $element.height() >= window_top && top - options.topoffset <= window_top + $win.height() && left + $element.width() >= window_left && left - options.leftoffset <= window_left + $win.width()) { return true; } else { return false; } }; $.Utils.options = function(string) { if ($.isPlainObject(string)) return string; var start = (string ? string.indexOf("{") : -1), options = {}; if (start != -1) { try { options = (new Function("", "var json = " + string.substr(start) + "; return JSON.parse(JSON.stringify(json));"))(); } catch (e) {} } return options; }; $.Utils.events = {}; $.Utils.events.click = $.support.touch ? 'tap' : 'click'; $.langdirection = $html.attr("dir") == "rtl" ? "right" : "left"; $(function(){ // Check for dom modifications if(!$.support.mutationobserver) return; // Install an observer for custom needs of dom changes var observer = new $.support.mutationobserver($.Utils.debounce(function(mutations) { $(doc).trigger("domready"); }, 300)); // pass in the target node, as well as the observer options observer.observe(document.body, { childList: true, subtree: true }); }); // add touch identifier class $html.addClass($.support.touch ? "touch" : "no-touch"); }(jQuery, window, document)); /** * * BeAdmin - Bootstrap Admin Theme - App Javascript * * Author: @themicon_co * Website: http://themicon.co * License: http://support.wrapbootstrap.com/knowledge_base/topics/usage-licenses * */ /** * Provides a start point to run plugins and other scripts */ (function($, window, document){ 'use strict'; if (typeof $ === 'undefined') { throw new Error('This application\'s JavaScript requires jQuery'); } $(window).load(function() { $('.scroll-content').slimScroll({ height: '250px' }); adjustLayout(); }).resize(adjustLayout); $(function() { // Init Fast click for mobiles FastClick.attach(document.body); // inhibits null links $('a[href="#"]').each(function(){ this.href = 'javascript:void(0);'; }); // abort dropdown autoclose when exist inputs inside $(document).on('click', '.dropdown-menu input', function(e){ e.stopPropagation(); }); // popover init $('[data-toggle=popover]').popover(); // Bootstrap slider $('.slider').slider(); // Chosen $('.chosen-select').chosen(); // Filestyle $('.filestyle').filestyle(); // Masked inputs initialization $.fn.inputmask && $('[data-toggle="masked"]').inputmask(); }); // keeps the wrapper covering always the entire body // necessary when main content doesn't fill the viewport function adjustLayout() { $('.wrapper > section').css('min-height', $(window).height()); } }(jQuery, window, document));
{ "content_hash": "2de49d3baaf52912c93dea5e669f7ab2", "timestamp": "", "source": "github", "line_count": 2787, "max_line_length": 825, "avg_line_length": 32.01112307140294, "alnum_prop": 0.46885613405817406, "repo_name": "harshittrivedi78/hotel_listing", "id": "0b663ca3d141e7ffd9f77a9d0b040c1385a0ab2f", "size": "89216", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "myproject/public/static/app/js/app.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "959022" }, { "name": "HTML", "bytes": "1584548" }, { "name": "JavaScript", "bytes": "4087475" }, { "name": "PHP", "bytes": "1742" }, { "name": "Python", "bytes": "12432" } ], "symlink_target": "" }
<?php namespace PHPExiftool\Driver\Tag\XMPPhotoshop; use JMS\Serializer\Annotation\ExclusionPolicy; use PHPExiftool\Driver\AbstractTag; /** * @ExclusionPolicy("all") */ class Source extends AbstractTag { protected $Id = 'Source'; protected $Name = 'Source'; protected $FullName = 'XMP::photoshop'; protected $GroupName = 'XMP-photoshop'; protected $g0 = 'XMP'; protected $g1 = 'XMP-photoshop'; protected $g2 = 'Image'; protected $Type = 'string'; protected $Writable = true; protected $Description = 'Source'; protected $local_g2 = 'Author'; }
{ "content_hash": "799ed121ccbff2e79e44ab151d74dca9", "timestamp": "", "source": "github", "line_count": 38, "max_line_length": 46, "avg_line_length": 15.973684210526315, "alnum_prop": 0.657331136738056, "repo_name": "bburnichon/PHPExiftool", "id": "1533493c72419f76e95487ce5afa9a30becf7ee3", "size": "831", "binary": false, "copies": "2", "ref": "refs/heads/master", "path": "lib/PHPExiftool/Driver/Tag/XMPPhotoshop/Source.php", "mode": "33188", "license": "mit", "language": [ { "name": "PHP", "bytes": "22076400" } ], "symlink_target": "" }
package com.ibm.jbatch.container.artifact.proxy; import java.io.Serializable; import javax.batch.api.chunk.ItemReader; import com.ibm.jbatch.container.exception.BatchContainerRuntimeException; public class ItemReaderProxy extends AbstractProxy<ItemReader> implements ItemReader { ItemReaderProxy(ItemReader delegate) { super(delegate); } @Override public Serializable checkpointInfo() { try { return this.delegate.checkpointInfo(); } catch (Exception e) { this.stepContext.setException(e); throw new BatchContainerRuntimeException(e); } } @Override public void close() { try { this.delegate.close(); } catch (Exception e) { this.stepContext.setException(e); throw new BatchContainerRuntimeException(e); } } @Override public void open(Serializable checkpoint) { try { this.delegate.open(checkpoint); } catch (Exception e) { this.stepContext.setException(e); throw new BatchContainerRuntimeException(e); } } /* * In order to provide skip/retry logic, these exceptions * are thrown as-is rather than beeing wrapped. * @see javax.batch.api.ItemReader#readItem() */ @Override public Object readItem() throws Exception { return this.delegate.readItem(); } }
{ "content_hash": "e51d57fd54ff86f18248b245f0ef87a1", "timestamp": "", "source": "github", "line_count": 56, "max_line_length": 86, "avg_line_length": 26.428571428571427, "alnum_prop": 0.6135135135135135, "repo_name": "sidgoyal/standards.jsr352.jbatch", "id": "8dc1b5c842119f34c4f0de752e0561467c7e3905", "size": "2224", "binary": false, "copies": "4", "ref": "refs/heads/master", "path": "com.ibm.jbatch.container/src/main/java/com/ibm/jbatch/container/artifact/proxy/ItemReaderProxy.java", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "1067572" } ], "symlink_target": "" }
from sqlagg.columns import SimpleColumn from corehq.apps.reports.datatables import DataTablesHeader, DataTablesColumnGroup from corehq.apps.reports.generic import GenericTabularReport from corehq.apps.reports.sqlreport import DatabaseColumn from corehq.apps.reports.standard import DatespanMixin, CustomProjectReport from corehq.apps.reports.util import format_datatables_data from custom.up_nrhm.reports import LangMixin from custom.up_nrhm.filters import HierarchySqlData from custom.up_nrhm.reports.block_level_af_report import BlockLevelAFReport from custom.up_nrhm.sql_data import ASHAFacilitatorsData from django.utils.translation import gettext as _, gettext_noop class DistrictFunctionalityReport(GenericTabularReport, DatespanMixin, CustomProjectReport, LangMixin): name = gettext_noop("Format-5 Functionality of ASHAs in blocks") slug = "district_functionality_report" no_value = '--' def get_blocks_for_district(self): blocks = [] for location in HierarchySqlData(config={'domain': self.domain}).get_data(): if location['district'] == self.report_config['district']: blocks.append(location['block']) return set(blocks) @property def headers(self): blocks = self.get_blocks_for_district() headers = [DataTablesColumnGroup('')] headers.extend([DataTablesColumnGroup(block) for block in self.get_blocks_for_district()]) columns = [DatabaseColumn(_("Percentage of ASHAs functional on " "(Number of functional ASHAs/total number of ASHAs) x 100"), SimpleColumn(''), header_group=headers[0])] for i, block in enumerate(blocks): columns.append(DatabaseColumn(_('%s of ASHAs') % '%', SimpleColumn(block), header_group=headers[i + 1])) columns.append(DatabaseColumn(_('Grade of Block'), SimpleColumn(block), header_group=headers[i + 1])) return DataTablesHeader(*headers) @property def report_config(self): return { 'domain': self.domain, 'year': self.request.GET.get('year'), 'month': self.request.GET.get('month'), 'district': self.request.GET.get('hierarchy_district'), 'is_checklist': 1 } @property def model(self): return ASHAFacilitatorsData(config=self.report_config) @property def rows(self): def percent(v1, v2): try: return float(v1) * 100.0 / float(v2) except ZeroDivisionError: return 0 def get_grade(v): return 'D' if v < 25 else 'C' if v < 50 else 'B' if v < 75 else 'A' rows = [[column.header] for column in self.model.columns[2:]] for block in self.get_blocks_for_district(): self.request_params['hierarchy_block'] = block q = self.request.GET.copy() q['hierarchy_block'] = block self.request.GET = q rs, block_total = BlockLevelAFReport(self.request, domain=self.domain).rows for index, row in enumerate(rs[0:-2]): value = percent(row[-1]['sort_key'], block_total) grade = get_grade(value) if index < 10: rows[index].append(format_datatables_data('%.1f%%' % value, '%.1f%%' % value)) rows[index].append(format_datatables_data(grade, grade)) else: rows[index].append(row[-1]) val = row[-1]['sort_key'] grade = get_grade(val) rows[index].append(format_datatables_data(grade, grade)) return rows, 0
{ "content_hash": "3536f2a9103f716cd788ebeb831aefce", "timestamp": "", "source": "github", "line_count": 85, "max_line_length": 113, "avg_line_length": 44.188235294117646, "alnum_prop": 0.6112886048988285, "repo_name": "dimagi/commcare-hq", "id": "0a17d3321d32e2540f76bcd4ed0cd4ab8172bed8", "size": "3756", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "custom/up_nrhm/reports/district_functionality_report.py", "mode": "33188", "license": "bsd-3-clause", "language": [ { "name": "CSS", "bytes": "82928" }, { "name": "Dockerfile", "bytes": "2341" }, { "name": "HTML", "bytes": "2589268" }, { "name": "JavaScript", "bytes": "5889543" }, { "name": "Jinja", "bytes": "3693" }, { "name": "Less", "bytes": "176180" }, { "name": "Makefile", "bytes": "1622" }, { "name": "PHP", "bytes": "2232" }, { "name": "PLpgSQL", "bytes": "66704" }, { "name": "Python", "bytes": "21779773" }, { "name": "Roff", "bytes": "150" }, { "name": "Shell", "bytes": "67473" } ], "symlink_target": "" }
import React from "react"; import styled, { keyframes, createGlobalStyle } from "styled-components"; import Monoton from "../../styles/fonts/Monoton-Regular.ttf"; import Assistant from "../../styles/fonts/Assistant-ExtraLight.ttf"; import { library } from "@fortawesome/fontawesome-svg-core"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import { faAngleDoubleDown } from "@fortawesome/free-solid-svg-icons"; import { Helmet } from "react-helmet"; library.add(faAngleDoubleDown); /*Styled Components*/ const GlobalStyle = createGlobalStyle` body { margin: 0; } @font-face { font-family: 'Monoton'; src: url(${Monoton}); } @font-face { font-family: 'Assistant'; src: url(${Assistant}); } body::-webkit-scrollbar { display: none; } `; /*Animation Keyframes*/ const neon = keyframes` 0% { text-shadow: 0 0 20px rgba(10, 175, 230, 1), 0 0 20px rgba(10, 175, 230, 0); } 12% { text-shadow: 0 0 20px rgba(10, 175, 230, 1.5), 0 0 20px rgba(10, 175, 230, 1); } 18% { text-shadow: 0 0 20px rgba(10, 175, 230, 1), 0 0 20px rgba(10, 175, 230, 0.2); } 25% { text-shadow: 0 0 20px rgba(10, 175, 230, 0.9), 0 0 20px rgba(10, 175, 230, 0.3); } 35% { text-shadow: 0 0 20px rgba(10, 175, 230, 0.8), 0 0 20px rgba(10, 175, 230, 0.1); } 42% { text-shadow: 0 0 20px rgba(10, 175, 230, 1.2), 0 0 20px rgba(10, 175, 230, 0); } 50% { text-shadow: 0 0 20px rgba(10, 175, 230, 1.6), 0 0 20px rgba(10, 175, 230, 1); } 100% { text-shadow: 0 0 20px rgba(10, 175, 230, 1.6), 0 0 20px rgba(10, 175, 230, 1); } `; const down = keyframes` 0%, 20%, 50%, 80%, 100% { transform: translateY(0); } 40% { transform: translateY(-20px); } 60% { transform: translateY(-10px); } `; /*Animation keyframes ending*/ const Container = styled.div` min-height: 100vh; `; const Main = styled.div` min-height: 100vh; background-color: black; display: flex; flex-flow: column; justify-content: center; align-items: center; color: #c6e2ff; `; const Gradientbox = styled.div` height: 300px; width: 600px; background-image: linear-gradient( 90deg, #f50057 0%, #242323 35%, #00b0ff 60%, #76ff03 100% ); position: relative; display: flex; justify-content: center; align-items: center; border-radius: 10px; @media (max-width: 620px) { width: 500px; } @media (max-width: 520px) { width: 400px; height: 220px; } @media (max-width: 420px) { height: 200px; width: 320px; } @media (max-width: 336px) { height: 190px; width: 310px; } @media (max-width: 316px) { background: transparent; } `; const Logo = styled.div` background-color: black; background: radial-gradient(ellipse at center, #0a2e38 0%, #000000 70%); height: 290px; width: 590px; font-family: "Monoton", cursive; border-radius: 8px; display: flex; justify-content: center; align-items: center; animation: ${neon} 900ms ease-in-out infinite alternate; animation-delay: 100ms; font-size: 140px; pointer-events: none; @media (max-width: 620px) { font-size: 120px; width: 490px; } @media (max-width: 520px) { font-size: 100px; width: 390px; height: 210px; } @media (max-width: 420px) { font-size: 87px; width: 310px; height: 190px; } @media (max-width: 336px) { font-size: 80px; width: 300px; height: 180px; } @media (max-width: 316px) { font-size: 75px; width: 300px; height: 180px; } `; const Subheading = styled.span` background-color: black; z-index: 5; font-size: 23px; font-family: "Assistant", sans-serif; margin-top: -17px; width: 360px; display: flex; justify-content: center; align-items: center; @media (max-width: 620px) { font-size: 22px; } @media (max-width: 520px) { font-size: 20px; } @media (max-width: 420px) { font-size: 19px; width: 250px; } @media (max-width: 336px) { font-size: 17px; width: 250px; } @media (max-width: 316px) { font-size: 15px; width: 250px; } `; const Arrowdown = styled.div` position: absolute; top: 90%; left: 50%; margin-left: -15px; animation: ${down} 1550ms ease-in-out infinite; `; const About = styled.section` min-height: 100vh; background-color: black; display: flex; justify-content: center; align-items: center; color: white; padding-left: 100px; padding-right: 100px; @media (max-width: 420px) { padding: 10px; } `; const Aboutus = styled.div` min-height: 100vh; min-width: 50vw; display: flex; justify-content: center; align-items: center; flex-flow: column; padding: 15px; font-family: "Assistant", sans-serif; `; const Aboutheading = styled.span` font-size: 55px; border-bottom: 1px solid white; padding-bottom: 7px; margin-bottom: 45px; `; const Abouttext = styled.p` font-size: 23px; font-weight: 400; letter-spacing: 0.02em; @media (max-width: 420px) { font-size: 20px; } `; /* Contact links */ const ContactSection = styled.div` min-height: 400px; margin: 0px; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; padding-top: 0px; background-color: black; color: white; font-family: "Assistant", sans-serif; @media (max-width: 420px) { padding-top: 40px; } `; const FindHead = styled.div` font-size: 55px; padding-bottom: 7px; border-bottom: 1px solid white; @media (max-width: 600px) { margin-bottom: 50px; } `; const IconsContainer = styled.div` min-height: 150px; width: 75%; margin-top: 20px; display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap; `; const GithubLink = styled.div` width: 180px; border: 1px solid #f50057; display: flex; justify-content: space-evenly; align-items: center; padding: 12px; font-family: "Assistant", sans-serif; font-weight: 400; font-size: 23px; color: #f50057; transition: all 180ms ease-in-out; &:hover { box-shadow: inset 210px 0px 0 0 #f50057; cursor: pointer; color: black; } @media (max-width: 600px) { margin-bottom: 15px; } @media (max-width: 420px) { font-size: 20px; } `; const TwitterLink = styled.div` width: 180px; border: 1px solid #00b0ff; display: flex; justify-content: space-evenly; align-items: center; padding: 12px; font-family: "Assistant", sans-serif; font-weight: 400; font-size: 23px; color: #00b0ff; transition: all 180ms ease-in-out; &:hover { box-shadow: inset 210px 0px 0 0 #00b0ff; cursor: pointer; color: black; } @media (max-width: 600px) { margin-bottom: 15px; } @media (max-width: 420px) { font-size: 20px; } `; const TelegramLink = styled.div` width: 180px; border: 1px solid #ffca28; display: flex; justify-content: space-evenly; align-items: center; padding: 12px; font-family: "Assistant", sans-serif; font-weight: 400; font-size: 23px; color: #ffca28; transition: all 180ms ease-in-out; &:hover { box-shadow: inset 210px 0px 0 0 #ffca28; cursor: pointer; color: black; } @media (max-width: 600px) { margin-bottom: 15px; } @media (max-width: 420px) { font-size: 20px; } `; const FacebookLink = styled.div` width: 180px; border: 1px solid #00b0ff; display: flex; justify-content: space-evenly; align-items: center; padding: 12px; font-family: "Assistant", sans-serif; font-weight: 400; font-size: 23px; color: #00b0ff; transition: all 180ms ease-in-out; &:hover { box-shadow: inset 210px 0px 0 0 #00b0ff; cursor: pointer; color: black; } @media (max-width: 600px) { margin-bottom: 15px; } @media (max-width: 420px) { font-size: 20px; } `; const BlogLink = styled.div` width: 180px; border: 1px solid #76ff03; display: flex; justify-content: space-evenly; align-items: center; padding: 12px; font-family: "Assistant", sans-serif; font-weight: 400; font-size: 23px; color: #76ff03; transition: all 180ms ease-in-out; &:hover { box-shadow: inset 210px 0px 0 0 #76ff03; cursor: pointer; color: black; } @media (max-width: 600px) { margin-bottom: 15px; } @media (max-width: 420px) { font-size: 20px; } `; const Alink = styled.a` text-decoration: none; outline: none !important; &:focus { outline: none; text-decoration: none; } &:active { outline: none; text-decoration: none; } `; const handleArrowClick = e => { e.preventDefault(); // get the id of the element to scroll to. e.g. "#aboutsection" const targetQuery = e.currentTarget.getAttribute("href"); // scroll the element into view document.querySelector(targetQuery).scrollIntoView({ behavior: "smooth" }); // set the URL hash to the href attribute if (window.history.pushState) { window.history.pushState(null, null, targetQuery); } else { window.location.hash = targetQuery; } }; /* Main */ export default () => ( <Container> <GlobalStyle /> <Helmet> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="description" content="Home Page for the Open Source Developers Community" /> <title>OSDC</title> <link rel="icon" type="image/png" href="https://avatars1.githubusercontent.com/u/919383?s=200&v=4" sizes="16x16" /> </Helmet> <Main> <Gradientbox> <Logo>OSDC</Logo> </Gradientbox> <Subheading>Open Source Developers Community</Subheading> <Arrowdown> <a href="#aboutsection" onClick={handleArrowClick}> <FontAwesomeIcon icon="angle-double-down" color="#ffca28" size="2x" /> </a> </Arrowdown> </Main> <About id="aboutsection"> <Aboutus> <Aboutheading>About us</Aboutheading> <Abouttext> We are an Open Source Community based in and around Jaypee Institute of Information Technology, Noida, India. A community of web developers, android freaks, machine learning enthusiasts, hackers, designers, game developers and most significantly Explorers. We welcome those who believe in the open source philosophy and are willing to sacrifice their naps in order to change the world. </Abouttext> <Abouttext> We also organize various workshops, talks and hackathons in an effort towards encouraging more people to lean into the open source world! We love having late night conversations on tech and building new things. If you love the same just hop in, we are looking forward for your participation. </Abouttext> </Aboutus> </About> <ContactSection> <FindHead>Find us on</FindHead> <IconsContainer> <Alink href="https://github.com/osdc/" target="_blank"> <GithubLink> <span>GITHUB</span> </GithubLink> </Alink> <Alink href="https://twitter.com/osdcjiit" target="_blank"> <TwitterLink> <span>TWITTER</span> </TwitterLink> </Alink> <Alink href="https://t.me/jiitosdc" target="_blank"> <TelegramLink> <span>TELEGRAM</span> </TelegramLink> </Alink> <Alink href="https://www.facebook.com/groups/jiitlug/" target="_blank"> <FacebookLink> <span>FACEBOOK</span> </FacebookLink> </Alink> <Alink href="https://osdcblog.netlify.app/" target="_blank"> <BlogLink> <span>BLOG</span> </BlogLink> </Alink> </IconsContainer> </ContactSection> </Container> );
{ "content_hash": "9de6c754fe334d9b2b5c4e2a1f91324a", "timestamp": "", "source": "github", "line_count": 540, "max_line_length": 85, "avg_line_length": 22.02777777777778, "alnum_prop": 0.6207650273224044, "repo_name": "osdc/osdc.github.io", "id": "18f104582c66bd80317bf2df64e6512af7039d80", "size": "11895", "binary": false, "copies": "1", "ref": "refs/heads/source", "path": "src/pages/index.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "11993" } ], "symlink_target": "" }
(function (factory) { if (typeof module === "object" && typeof module.exports === "object") { var v = factory(require, exports); if (v !== undefined) module.exports = v; } else if (typeof define === "function" && define.amd) { define(["require", "exports", "@angular/core", "../util/util"], factory); } })(function (require, exports) { "use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var core_1 = require("@angular/core"); var util_1 = require("../util/util"); /** * @hidden */ var UrlSerializer = (function () { /** * @param {?} config */ function UrlSerializer(config) { if (config && util_1.isArray(config.links)) { this.links = exports.normalizeLinks(config.links); } else { this.links = []; } } /** * Parse the URL into a Path, which is made up of multiple NavSegments. * Match which components belong to each segment. * @param {?} browserUrl * @return {?} */ UrlSerializer.prototype.parse = function (browserUrl) { if (browserUrl.charAt(0) === '/') { browserUrl = browserUrl.substr(1); } // trim off data after ? and # browserUrl = browserUrl.split('?')[0].split('#')[0]; var /** @type {?} */ navGroupStrings = urlToNavGroupStrings(browserUrl); var /** @type {?} */ navGroups = navGroupStringtoObjects(navGroupStrings); return exports.parseUrlParts(navGroups, this.links); }; /** * @param {?} navContainer * @param {?} nameOrComponent * @return {?} */ UrlSerializer.prototype.createSegmentFromName = function (navContainer, nameOrComponent) { var /** @type {?} */ configLink = this.getLinkFromName(nameOrComponent); if (configLink) { return this._createSegment({ navId: navContainer.id, secondaryId: navContainer.getSecondaryIdentifier(), type: 'tabs' }, configLink, null); } return null; }; /** * @param {?} nameOrComponent * @return {?} */ UrlSerializer.prototype.getLinkFromName = function (nameOrComponent) { return this.links.find(function (link) { return (link.component === nameOrComponent) || (link.name === nameOrComponent); }); }; /** * Serialize a path, which is made up of multiple NavSegments, * into a URL string. Turn each segment into a string and concat them to a URL. * @param {?} segments * @return {?} */ UrlSerializer.prototype.serialize = function (segments) { if (!segments || !segments.length) { return '/'; } var /** @type {?} */ sections = segments.map(function (segment) { if (segment.type === 'tabs') { return "/" + segment.type + "/" + segment.navId + "/" + segment.secondaryId + "/" + segment.id; } return "/" + segment.type + "/" + segment.navId + "/" + segment.id; }); return sections.join(''); }; /** * Serializes a component and its data into a NavSegment. * @param {?} navGroup * @param {?} component * @param {?} data * @return {?} */ UrlSerializer.prototype.serializeComponent = function (navGroup, component, data) { if (component) { var /** @type {?} */ link = exports.findLinkByComponentData(this.links, component, data); if (link) { return this._createSegment(navGroup, link, data); } } return null; }; /** * \@internal * @param {?} navGroup * @param {?} configLink * @param {?} data * @return {?} */ UrlSerializer.prototype._createSegment = function (navGroup, configLink, data) { var /** @type {?} */ urlParts = configLink.segmentParts; if (util_1.isPresent(data)) { // create a copy of the original parts in the link config urlParts = urlParts.slice(); // loop through all the data and convert it to a string var /** @type {?} */ keys = Object.keys(data); var /** @type {?} */ keysLength = keys.length; if (keysLength) { for (var /** @type {?} */ i = 0; i < urlParts.length; i++) { if (urlParts[i].charAt(0) === ':') { for (var /** @type {?} */ j = 0; j < keysLength; j++) { if (urlParts[i] === ":" + keys[j]) { // this data goes into the URL part (between slashes) urlParts[i] = encodeURIComponent(data[keys[j]]); break; } } } } } } return { id: urlParts.join('/'), name: configLink.name, component: configLink.component, loadChildren: configLink.loadChildren, data: data, defaultHistory: configLink.defaultHistory, navId: navGroup.navId, type: navGroup.type, secondaryId: navGroup.secondaryId }; }; return UrlSerializer; }()); exports.UrlSerializer = UrlSerializer; function UrlSerializer_tsickle_Closure_declarations() { /** @type {?} */ UrlSerializer.prototype.links; } /** * @param {?} name * @return {?} */ function formatUrlPart(name) { name = name.replace(URL_REPLACE_REG, '-'); name = name.charAt(0).toLowerCase() + name.substring(1).replace(/[A-Z]/g, function (match) { return '-' + match.toLowerCase(); }); while (name.indexOf('--') > -1) { name = name.replace('--', '-'); } if (name.charAt(0) === '-') { name = name.substring(1); } if (name.substring(name.length - 1) === '-') { name = name.substring(0, name.length - 1); } return encodeURIComponent(name); } exports.formatUrlPart = formatUrlPart; exports.parseUrlParts = function (navGroups, configLinks) { var /** @type {?} */ segments = []; for (var _i = 0, configLinks_1 = configLinks; _i < configLinks_1.length; _i++) { var link = configLinks_1[_i]; for (var _a = 0, navGroups_1 = navGroups; _a < navGroups_1.length; _a++) { var navGroup = navGroups_1[_a]; if (link.segmentPartsLen === navGroup.segmentPieces.length) { // check if the segment pieces are a match var /** @type {?} */ allSegmentsMatch = true; for (var /** @type {?} */ i = 0; i < navGroup.segmentPieces.length; i++) { if (!exports.isPartMatch(navGroup.segmentPieces[i], link.segmentParts[i])) { allSegmentsMatch = false; break; } } // sweet, we found a match! if (allSegmentsMatch) { segments.push({ id: link.segmentParts.join('/'), name: link.name, component: link.component, loadChildren: link.loadChildren, data: exports.createMatchedData(navGroup.segmentPieces, link), defaultHistory: link.defaultHistory, navId: navGroup.navId, type: navGroup.type, secondaryId: navGroup.secondaryId }); } } } } return segments; }; exports.isPartMatch = function (urlPart, configLinkPart) { if (util_1.isPresent(urlPart) && util_1.isPresent(configLinkPart)) { if (configLinkPart.charAt(0) === ':') { return true; } return (urlPart === configLinkPart); } return false; }; exports.createMatchedData = function (matchedUrlParts, link) { var /** @type {?} */ data = null; for (var /** @type {?} */ i = 0; i < link.segmentPartsLen; i++) { if (link.segmentParts[i].charAt(0) === ':') { data = data || {}; data[link.segmentParts[i].substring(1)] = decodeURIComponent(matchedUrlParts[i]); } } return data; }; exports.findLinkByComponentData = function (links, component, instanceData) { var /** @type {?} */ foundLink = null; var /** @type {?} */ foundLinkDataMatches = -1; for (var /** @type {?} */ i = 0; i < links.length; i++) { var /** @type {?} */ link = links[i]; if (link.component === component) { // ok, so the component matched, but multiple links can point // to the same component, so let's make sure this is the right link var /** @type {?} */ dataMatches = 0; if (instanceData) { var /** @type {?} */ instanceDataKeys = Object.keys(instanceData); // this link has data for (var /** @type {?} */ j = 0; j < instanceDataKeys.length; j++) { if (util_1.isPresent(link.dataKeys[instanceDataKeys[j]])) { dataMatches++; } } } else if (link.dataLen) { // this component does not have data but the link does continue; } if (dataMatches >= foundLinkDataMatches) { foundLink = link; foundLinkDataMatches = dataMatches; } } } return foundLink; }; exports.normalizeLinks = function (links) { for (var /** @type {?} */ i = 0, /** @type {?} */ ilen = links.length; i < ilen; i++) { var /** @type {?} */ link = links[i]; if (util_1.isBlank(link.segment)) { link.segment = link.name; } link.dataKeys = {}; link.segmentParts = link.segment.split('/'); link.segmentPartsLen = link.segmentParts.length; // used for sorting link.staticLen = link.dataLen = 0; var /** @type {?} */ stillCountingStatic = true; for (var /** @type {?} */ j = 0; j < link.segmentPartsLen; j++) { if (link.segmentParts[j].charAt(0) === ':') { link.dataLen++; stillCountingStatic = false; link.dataKeys[link.segmentParts[j].substring(1)] = true; } else if (stillCountingStatic) { link.staticLen++; } } } // sort by the number of parts, with the links // with the most parts first return links.sort(sortConfigLinks); }; /** * @param {?} a * @param {?} b * @return {?} */ function sortConfigLinks(a, b) { // sort by the number of parts if (a.segmentPartsLen > b.segmentPartsLen) { return -1; } if (a.segmentPartsLen < b.segmentPartsLen) { return 1; } // sort by the number of static parts in a row if (a.staticLen > b.staticLen) { return -1; } if (a.staticLen < b.staticLen) { return 1; } // sort by the number of total data parts if (a.dataLen < b.dataLen) { return -1; } if (a.dataLen > b.dataLen) { return 1; } return 0; } var /** @type {?} */ URL_REPLACE_REG = /\s+|\?|\!|\$|\,|\.|\+|\"|\'|\*|\^|\||\/|\\|\[|\]|#|%|`|>|<|;|:|@|&|=/g; /** * @hidden */ exports.DeepLinkConfigToken = new core_1.OpaqueToken('USERLINKS'); /** * @param {?} userDeepLinkConfig * @return {?} */ function setupUrlSerializer(userDeepLinkConfig) { return new UrlSerializer(userDeepLinkConfig); } exports.setupUrlSerializer = setupUrlSerializer; /** * @param {?} url * @return {?} */ function urlToNavGroupStrings(url) { var /** @type {?} */ tokens = url.split('/'); var /** @type {?} */ keywordIndexes = []; for (var /** @type {?} */ i = 0; i < tokens.length; i++) { if (tokens[i] === 'nav' || tokens[i] === 'tabs') { keywordIndexes.push(i); } } var /** @type {?} */ groupings = []; for (var /** @type {?} */ i = 0; i < keywordIndexes.length; i++) { var /** @type {?} */ startIndex = keywordIndexes[i]; var /** @type {?} */ endIndex = keywordIndexes[i + 1 < keywordIndexes.length ? i + 1 : keywordIndexes.length]; var /** @type {?} */ group = tokens.slice(startIndex, endIndex); groupings.push(group.join('/')); } return groupings; } exports.urlToNavGroupStrings = urlToNavGroupStrings; /** * @param {?} navGroupStrings * @return {?} */ function navGroupStringtoObjects(navGroupStrings) { // each string has a known format-ish, convert it to it return navGroupStrings.map(function (navGroupString) { var /** @type {?} */ sections = navGroupString.split('/'); if (sections[0] === 'nav') { return { type: 'nav', navId: sections[1], niceId: sections[1], secondaryId: null, segmentPieces: sections.splice(2) }; } return { type: 'tabs', navId: sections[1], niceId: sections[1], secondaryId: sections[2], segmentPieces: sections.splice(3) }; }); } exports.navGroupStringtoObjects = navGroupStringtoObjects; }); //# sourceMappingURL=url-serializer.js.map
{ "content_hash": "9de36a5a5ab54e2a6fa28b07f1df1dfd", "timestamp": "", "source": "github", "line_count": 372, "max_line_length": 155, "avg_line_length": 39.895161290322584, "alnum_prop": 0.4672191900815309, "repo_name": "druffolo/druffolo_mblComputing_Assign1", "id": "fe33c14065098f5c896cdf1de1c0098e2d847294", "size": "14841", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "node_modules/ionic-angular/umd/navigation/url-serializer.js", "mode": "33188", "license": "mit", "language": [ { "name": "Batchfile", "bytes": "13353" }, { "name": "C", "bytes": "701" }, { "name": "C#", "bytes": "24863" }, { "name": "C++", "bytes": "221862" }, { "name": "CSS", "bytes": "493916" }, { "name": "CoffeeScript", "bytes": "37321" }, { "name": "HTML", "bytes": "20944" }, { "name": "Java", "bytes": "462042" }, { "name": "JavaScript", "bytes": "4513242" }, { "name": "Objective-C", "bytes": "152362" }, { "name": "PowerShell", "bytes": "1464" }, { "name": "Shell", "bytes": "1332" }, { "name": "TypeScript", "bytes": "33930" } ], "symlink_target": "" }
#ifndef CQL_MAP_H_ #define CQL_MAP_H_ #include "libcql/cql.hpp" namespace cql { class cql_map_t { public: virtual ~cql_map_t(){}; virtual bool get_key_bool(size_t i, bool& output) const = 0; virtual bool get_key_int(size_t i, cql_int_t& output) const = 0; virtual bool get_key_float(size_t i, float& output) const = 0; virtual bool get_key_double(size_t i, double& output) const = 0; virtual bool get_key_bigint(size_t i, cql::cql_bigint_t& output) const = 0; virtual bool get_key_string(size_t i, std::string& output) const = 0; virtual bool get_key_data(size_t i, cql::cql_byte_t** output, cql::cql_short_t& size) const = 0; virtual bool get_value_bool(size_t i, bool& output) const = 0; virtual bool get_value_int(size_t i, cql_int_t& output) const = 0; virtual bool get_value_float(size_t i, float& output) const = 0; virtual bool get_value_double(size_t i, double& output) const = 0; virtual bool get_value_bigint(size_t i, cql::cql_bigint_t& output) const = 0; virtual bool get_value_string(size_t i, std::string& output) const = 0; virtual bool get_value_data(size_t i, cql::cql_byte_t** output, cql::cql_short_t& size) const = 0; virtual std::string str() const = 0; virtual cql::cql_column_type_enum key_type() const = 0; virtual const std::string& key_custom_class() const = 0; virtual cql::cql_column_type_enum value_type() const = 0; virtual const std::string& value_custom_class() const = 0; virtual size_t size() const = 0; }; } // namespace cql #endif // CQL_MAP_H_
{ "content_hash": "4b9fe44af485d701fe2ceb8d9308901a", "timestamp": "", "source": "github", "line_count": 98, "max_line_length": 62, "avg_line_length": 22.724489795918366, "alnum_prop": 0.46699595868881905, "repo_name": "mstump/libcql", "id": "89e1edebccdd07f5daf672a75843f538ed534d26", "size": "2838", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "include/libcql/cql_map.hpp", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "C++", "bytes": "298654" } ], "symlink_target": "" }
<?php namespace Drupal\Core\TypedData; /** * Interface for complex data definitions. * * @see \Drupal\Core\TypedData\ComplexDataInterface * * @ingroup typed_data */ interface ComplexDataDefinitionInterface extends DataDefinitionInterface { /** * Gets the definition of a contained property. * * @param string $name * The name of property. * * @return \Drupal\Core\TypedData\DataDefinitionInterface|null * The definition of the property or NULL if the property does not exist. */ public function getPropertyDefinition($name); /** * Gets an array of property definitions of contained properties. * * @return \Drupal\Core\TypedData\DataDefinitionInterface[] * An array of property definitions of contained properties, keyed by * property name. */ public function getPropertyDefinitions(); /** * Returns the name of the main property, if any. * * Some field items consist mainly of one main property, e.g. the value of a * text field or the @code target_id @endcode of an entity reference. If the * field item has no main property, the method returns NULL. * * @return string|null * The name of the value property, or NULL if there is none. */ public function getMainPropertyName(); }
{ "content_hash": "fc904938bd772c80eabf9c79bedbbf97", "timestamp": "", "source": "github", "line_count": 46, "max_line_length": 78, "avg_line_length": 27.934782608695652, "alnum_prop": 0.7027237354085603, "repo_name": "hrod/agile-california", "id": "e7a3c1a622bd871f29eb55e16ba44377885648a5", "size": "1285", "binary": false, "copies": "37", "ref": "refs/heads/master", "path": "docroot/core/lib/Drupal/Core/TypedData/ComplexDataDefinitionInterface.php", "mode": "33188", "license": "mit", "language": [ { "name": "ApacheConf", "bytes": "27457" }, { "name": "CSS", "bytes": "421251" }, { "name": "Cucumber", "bytes": "308" }, { "name": "HTML", "bytes": "491100" }, { "name": "JavaScript", "bytes": "877020" }, { "name": "Nginx", "bytes": "1025" }, { "name": "PHP", "bytes": "29519528" }, { "name": "Shell", "bytes": "76785" } ], "symlink_target": "" }
<Record> <Term>Polyradiculoneuropathy</Term> <SemanticType>Disease or Syndrome</SemanticType> <ParentTerm>Autoimmune Diseases of the Nervous System</ParentTerm> <ParentTerm>Polyneuropathies</ParentTerm> <ParentTerm>Demyelinating Diseases</ParentTerm> <ClassificationPath>Immune System Diseases/Autoimmune Diseases/Autoimmune Diseases of the Nervous System/Polyradiculoneuropathy</ClassificationPath> <ClassificationPath>Nervous System Diseases/Autoimmune Diseases of the Nervous System/Polyradiculoneuropathy</ClassificationPath> <ClassificationPath>Nervous System Diseases/Demyelinating Diseases/Polyradiculoneuropathy</ClassificationPath> <ClassificationPath>Nervous System Diseases/Neuromuscular Diseases/Peripheral Nervous System Diseases/Polyneuropathies/Polyradiculoneuropathy</ClassificationPath> <BroaderTerm>Polyradiculoneuropathy</BroaderTerm> <BroaderTerm>Autoimmune Diseases of the Nervous System</BroaderTerm> <BroaderTerm>Immune System Diseases</BroaderTerm> <BroaderTerm>Polyneuropathies</BroaderTerm> <BroaderTerm>Peripheral Nervous System Diseases</BroaderTerm> <BroaderTerm>Demyelinating Diseases</BroaderTerm> <BroaderTerm>Autoimmune Diseases</BroaderTerm> <BroaderTerm>Neuromuscular Diseases</BroaderTerm> <BroaderTerm>Nervous System Diseases</BroaderTerm> <ChildTerm>Hereditary Sensory and Autonomic Neuropathies</ChildTerm> <ChildTerm>Polyradiculoneuropathy, Chronic Inflammatory Demyelinating</ChildTerm> <ChildTerm>Polyradiculopathy</ChildTerm> <ChildTerm>Guillain-Barre Syndrome</ChildTerm> <Synonym>Polyradiculoneuropathy</Synonym> <Synonym>Peripheral Autoimmune Demyelinating Disease</Synonym> <Synonym>Polyradiculoneuritides</Synonym> <Synonym>Polyradiculoneuropathies</Synonym> <Synonym>Polyradiculoneuritis</Synonym> <Description>Diseases characterized by injury or dysfunction involving multiple peripheral nerves and nerve roots. The process may primarily affect myelin or nerve axons. Two of the more common demyelinating forms are acute inflammatory polyradiculopathy (GUILLAIN-BARRE SYNDROME) and POLYRADICULONEUROPATHY, CHRONIC INFLAMMATORY DEMYELINATING. Polyradiculoneuritis refers to inflammation of multiple peripheral nerves and spinal nerve roots.</Description> <Source>MeSH</Source> </Record>
{ "content_hash": "536775d6f8353365d6bceca140d91450", "timestamp": "", "source": "github", "line_count": 31, "max_line_length": 456, "avg_line_length": 73.12903225806451, "alnum_prop": 0.8491398323775915, "repo_name": "detnavillus/modular-informatic-designs", "id": "e94daf75d2791e8478bc4a6cff64f1260e0376f3", "size": "2267", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "pipeline/src/test/resources/thesaurus/diseaseorsyndrome/polyradiculoneuropathy.xml", "mode": "33261", "license": "apache-2.0", "language": [ { "name": "Java", "bytes": "2069134" } ], "symlink_target": "" }
'use strict'; module.exports = function IndexModel() { return { name: 'World' }; };
{ "content_hash": "91d549052ceb707382eb850bd947f726", "timestamp": "", "source": "github", "line_count": 7, "max_line_length": 40, "avg_line_length": 14.428571428571429, "alnum_prop": 0.5445544554455446, "repo_name": "pcostell/nodejs-docs-samples", "id": "2033c77b87f362b18143e169aa631965ed02c115", "size": "693", "binary": false, "copies": "5", "ref": "refs/heads/master", "path": "appengine/kraken/models/index.js", "mode": "33188", "license": "apache-2.0", "language": [ { "name": "CSS", "bytes": "3842" }, { "name": "HTML", "bytes": "5203" }, { "name": "JavaScript", "bytes": "553366" } ], "symlink_target": "" }
import React, { Component } from 'react'; function SubComponent() { return <div>Sub</div>; } const componentName = () => { return <div> <SubCoponent /> </div>; }; export default componentName;
{ "content_hash": "9184c8803bab7f9454579e68b0ebdcd6", "timestamp": "", "source": "github", "line_count": 13, "max_line_length": 41, "avg_line_length": 15.846153846153847, "alnum_prop": 0.6359223300970874, "repo_name": "davesnx/babel-plugin-transform-react-qa-classes", "id": "74a9a0582a018d6552c7386ff8c24230934de738", "size": "206", "binary": false, "copies": "1", "ref": "refs/heads/master", "path": "test/fixtures/react/rawfunction/actual.js", "mode": "33188", "license": "mit", "language": [ { "name": "JavaScript", "bytes": "7156" } ], "symlink_target": "" }