code
stringlengths 4
991k
| repo_name
stringlengths 6
116
| path
stringlengths 4
249
| language
stringclasses 30
values | license
stringclasses 15
values | size
int64 4
991k
| input_ids
listlengths 502
502
| token_type_ids
listlengths 502
502
| attention_mask
listlengths 502
502
| labels
listlengths 502
502
|
|---|---|---|---|---|---|---|---|---|---|
using Lucene.Net.Store;
using Lucene.Net.Support;
using System;
using System.Diagnostics;
namespace Lucene.Net.Util.Packed
{
/*
* 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.
*/
/// <summary>
/// Provides random access to a stream written with
/// <see cref="MonotonicBlockPackedWriter"/>.
/// <para/>
/// @lucene.internal
/// </summary>
public sealed class MonotonicBlockPackedReader : Int64Values
{
private readonly int blockShift, blockMask;
private readonly long valueCount;
private readonly long[] minValues;
private readonly float[] averages;
private readonly PackedInt32s.Reader[] subReaders;
/// <summary>
/// Sole constructor. </summary>
public MonotonicBlockPackedReader(IndexInput @in, int packedIntsVersion, int blockSize, long valueCount, bool direct)
{
this.valueCount = valueCount;
blockShift = PackedInt32s.CheckBlockSize(blockSize, AbstractBlockPackedWriter.MIN_BLOCK_SIZE, AbstractBlockPackedWriter.MAX_BLOCK_SIZE);
blockMask = blockSize - 1;
int numBlocks = PackedInt32s.NumBlocks(valueCount, blockSize);
minValues = new long[numBlocks];
averages = new float[numBlocks];
subReaders = new PackedInt32s.Reader[numBlocks];
for (int i = 0; i < numBlocks; ++i)
{
minValues[i] = @in.ReadVInt64();
averages[i] = Number.Int32BitsToSingle(@in.ReadInt32());
int bitsPerValue = @in.ReadVInt32();
if (bitsPerValue > 64)
{
throw new Exception("Corrupted");
}
if (bitsPerValue == 0)
{
subReaders[i] = new PackedInt32s.NullReader(blockSize);
}
else
{
int size = (int)Math.Min(blockSize, valueCount - (long)i * blockSize);
if (direct)
{
long pointer = @in.GetFilePointer();
subReaders[i] = PackedInt32s.GetDirectReaderNoHeader(@in, PackedInt32s.Format.PACKED, packedIntsVersion, size, bitsPerValue);
@in.Seek(pointer + PackedInt32s.Format.PACKED.ByteCount(packedIntsVersion, size, bitsPerValue));
}
else
{
subReaders[i] = PackedInt32s.GetReaderNoHeader(@in, PackedInt32s.Format.PACKED, packedIntsVersion, size, bitsPerValue);
}
}
}
}
public override long Get(long index)
{
Debug.Assert(index >= 0 && index < valueCount);
int block = (int)((long)((ulong)index >> blockShift));
int idx = (int)(index & blockMask);
// LUCENENET NOTE: IMPORTANT: The cast to float is critical here for it to work in x86
return minValues[block] + (long)(float)(idx * averages[block]) + BlockPackedReaderIterator.ZigZagDecode(subReaders[block].Get(idx));
}
/// <summary>
/// Returns the number of values.
/// <para/>
/// NOTE: This was size() in Lucene.
/// </summary>
public long Count
{
get { return valueCount; }
}
/// <summary>
/// Returns the approximate RAM bytes used. </summary>
public long RamBytesUsed()
{
long sizeInBytes = 0;
sizeInBytes += RamUsageEstimator.SizeOf(minValues);
sizeInBytes += RamUsageEstimator.SizeOf(averages);
foreach (PackedInt32s.Reader reader in subReaders)
{
sizeInBytes += reader.RamBytesUsed();
}
return sizeInBytes;
}
}
}
|
NikolayXHD/Lucene.Net.Contrib
|
Lucene.Net/Util/Packed/MonotonicBlockPackedReader.cs
|
C#
|
apache-2.0
| 4,774
|
[
30522,
2478,
19913,
2638,
1012,
5658,
1012,
3573,
1025,
2478,
19913,
2638,
1012,
5658,
1012,
2490,
1025,
2478,
2291,
1025,
2478,
2291,
1012,
16474,
2015,
1025,
3415,
15327,
19913,
2638,
1012,
5658,
1012,
21183,
4014,
1012,
8966,
1063,
1013,
1008,
1008,
7000,
2000,
1996,
15895,
4007,
3192,
1006,
2004,
2546,
1007,
2104,
2028,
2030,
2062,
1008,
12130,
6105,
10540,
1012,
2156,
1996,
5060,
5371,
5500,
2007,
1008,
2023,
2147,
2005,
3176,
2592,
4953,
9385,
6095,
1012,
1008,
1996,
2004,
2546,
15943,
2023,
5371,
2000,
2017,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1008,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1008,
1996,
6105,
1012,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1008,
1008,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1008,
1008,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1008,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
1000,
2004,
2003,
1000,
3978,
1010,
1008,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1008,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
1008,
12546,
2104,
1996,
6105,
1012,
1008,
1013,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
3640,
6721,
3229,
2000,
1037,
5460,
2517,
2007,
1013,
1013,
1013,
1026,
2156,
13675,
12879,
1027,
1000,
18847,
25009,
23467,
23947,
2098,
15994,
1000,
1013,
1028,
1012,
1013,
1013,
1013,
1026,
11498,
1013,
1028,
1013,
1013,
1013,
1030,
19913,
2638,
1012,
4722,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
2270,
10203,
2465,
18847,
25009,
23467,
23947,
2098,
16416,
4063,
1024,
20014,
21084,
10175,
15808,
1063,
2797,
3191,
2239,
2135,
20014,
5991,
4048,
6199,
1010,
3796,
9335,
2243,
1025,
2797,
3191,
2239,
2135,
2146,
3643,
3597,
16671,
1025,
2797,
3191,
2239,
2135,
2146,
1031,
1033,
8117,
10175,
15808,
1025,
2797,
3191,
2239,
30524,
25009,
23467,
23947,
2098,
16416,
4063,
1006,
5950,
2378,
18780,
1030,
1999,
1010,
20014,
8966,
18447,
2015,
27774,
1010,
20014,
5991,
4697,
1010,
2146,
3643,
3597,
16671,
1010,
22017,
2140,
3622,
1007,
1063,
2023,
1012,
3643,
3597,
16671,
1027,
3643,
3597,
16671,
1025,
5991,
4048,
6199,
1027,
8966,
18447,
16703,
2015,
1012,
4638,
23467,
5332,
4371,
1006,
5991,
4697,
1010,
10061,
23467,
23947,
2098,
15994,
1012,
8117,
1035,
3796,
1035,
2946,
1010,
10061,
23467,
23947,
2098,
15994,
1012,
4098,
1035,
3796,
1035,
2946,
1007,
1025,
3796,
9335,
2243,
1027,
5991,
4697,
1011,
1015,
1025,
20014,
15903,
7878,
2015,
1027,
8966,
18447,
16703,
2015,
1012,
15903,
7878,
2015,
1006,
3643,
3597,
16671,
1010,
5991,
4697,
1007,
1025,
8117,
10175,
15808,
1027,
2047,
2146,
1031,
15903,
7878,
2015,
1033,
1025,
20185,
1027,
2047,
14257,
1031,
15903,
7878,
2015,
1033,
1025,
4942,
16416,
30523,
2135,
14257,
1031,
1033,
20185,
1025,
2797,
3191,
2239,
2135,
8966,
18447,
16703,
2015,
1012,
8068,
1031,
1033,
4942,
16416,
13375,
1025,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
7082,
9570,
2953,
1012,
1026,
1013,
12654,
1028,
2270,
18847,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2135,
14257,
1031,
1033,
20185,
1025,
2797,
3191,
2239,
2135,
8966,
18447,
16703,
2015,
1012,
8068,
1031,
1033,
4942,
16416,
13375,
1025,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
7082,
9570,
2953,
1012,
1026,
1013,
12654,
1028,
2270,
18847,
30526
] |
##TPLHEADERSHORT##
<script type="text/javascript">
var oscamconf = 'conf';
</script>
##TPLBODY##
##TPLMENU##
##TPLCONFIGMENU##
##TPLMESSAGE##
<form action="config.html" method="get">
<input name="action" type="hidden" value="execute">
##CONFIG_CONTENT##
<TR><TD CLASS="configcolsave" COLSPAN="2"><input type="submit" value="Save" title="Save Settings ##BTNDISABLED##" ##BTNDISABLED##></TD></TR>
<TR CLASS="configfirstrow"><TD></TD><TD></TD></TR>
</TABLE>
</form>
##CONFIG_CONTROL##
##TPLFOOTER##
|
bas-t/oscam
|
webif/config/config.html
|
HTML
|
gpl-3.0
| 512
|
[
30522,
1001,
1001,
1056,
24759,
4974,
2545,
27794,
1001,
1001,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
1028,
13075,
9808,
28727,
8663,
2546,
1027,
1005,
9530,
2546,
1005,
1025,
1026,
1013,
5896,
1028,
1001,
1001,
1056,
24759,
30524,
1028,
1026,
7953,
2171,
1027,
1000,
2895,
1000,
2828,
1027,
1000,
5023,
1000,
3643,
1027,
1000,
15389,
1000,
1028,
1001,
1001,
9530,
8873,
2290,
1035,
4180,
1001,
1001,
1026,
19817,
1028,
1026,
14595,
2465,
1027,
1000,
9530,
8873,
18195,
27896,
10696,
1000,
8902,
13102,
2319,
1027,
1000,
1016,
1000,
1028,
1026,
7953,
2828,
1027,
1000,
12040,
1000,
3643,
1027,
1000,
3828,
1000,
2516,
1027,
1000,
3828,
10906,
1001,
1001,
18411,
16089,
19150,
2094,
1001,
1001,
1000,
1001,
1001,
18411,
16089,
19150,
2094,
1001,
1001,
1028,
1026,
1013,
14595,
1028,
1026,
1013,
19817,
1028,
1026,
19817,
2465,
1027,
1000,
9530,
8873,
25708,
18894,
13181,
2860,
1000,
1028,
1026,
14595,
1028,
1026,
1013,
14595,
1028,
1026,
14595,
1028,
1026,
1013,
14595,
1028,
1026,
1013,
19817,
1028,
1026,
1013,
2795,
1028,
1026,
1013,
2433,
1028,
1001,
1001,
9530,
8873,
2290,
1035,
2491,
1001,
1001,
1001,
1001,
1056,
24759,
13064,
2121,
1001,
1001,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
23684,
1001,
1001,
1001,
1001,
1056,
24759,
3549,
2226,
1001,
1001,
1001,
1001,
1056,
24759,
8663,
8873,
21693,
2368,
2226,
1001,
1001,
1001,
1001,
1056,
24759,
7834,
3736,
3351,
1001,
1001,
1026,
2433,
2895,
1027,
1000,
9530,
8873,
2290,
1012,
16129,
1000,
4118,
1027,
1000,
2131,
1000,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
23684,
1001,
1001,
1001,
1001,
1056,
24759,
3549,
2226,
1001,
1001,
1001,
1001,
1056,
24759,
8663,
8873,
21693,
2368,
2226,
1001,
1001,
1001,
1001,
1056,
24759,
7834,
3736,
3351,
1001,
1001,
1026,
2433,
2895,
1027,
1000,
9530,
8873,
2290,
1012,
16129,
1000,
4118,
1027,
1000,
2131,
1000,
30526
] |
/**
* @author Adam Meadows <adam.meadows@gmail.com>
* @copyright 2015 Adam Meadows. All rights reserved.
*/
'use strict';
/* eslint-disable max-nested-callbacks */
let $ = require('jquery');
let main = require('aiw-ui');
describe('main', () => {
let $container;
beforeEach(() => {
$container = $('<div/>');
main.render($container[0]);
});
it('renders template', () => {
expect($('.main p', $container)).toHaveText('This is my first webpack project!');
});
});
|
jobsquad/aiw-ui
|
spec/karma/index-spec.6.js
|
JavaScript
|
mit
| 513
|
[
30522,
1013,
1008,
1008,
1008,
1030,
3166,
4205,
13524,
1026,
4205,
1012,
13524,
1030,
20917,
4014,
1012,
4012,
1028,
1008,
1030,
9385,
2325,
4205,
13524,
1012,
2035,
2916,
9235,
1012,
1008,
1013,
1005,
2224,
9384,
1005,
1025,
1013,
1008,
9686,
4115,
2102,
1011,
4487,
19150,
4098,
1011,
9089,
2098,
1011,
2655,
12221,
1008,
1013,
2292,
1002,
1027,
5478,
1006,
1005,
1046,
4226,
2854,
1005,
1007,
1025,
2292,
2364,
1027,
5478,
1006,
1005,
9932,
2860,
1011,
21318,
1005,
1007,
1025,
6235,
1006,
1005,
2364,
1005,
1010,
1006,
1007,
1027,
1028,
1063,
2292,
1002,
11661,
1025,
2077,
5243,
2818,
1006,
1006,
1007,
1027,
1028,
1063,
1002,
11661,
30524,
1033,
1007,
1025,
1065,
1007,
1025,
2009,
1006,
1005,
17552,
2015,
23561,
1005,
1010,
1006,
1007,
1027,
1028,
1063,
5987,
1006,
1002,
1006,
1005,
1012,
2364,
1052,
1005,
1010,
1002,
11661,
1007,
1007,
1012,
2000,
3270,
19510,
10288,
2102,
1006,
1005,
2023,
2003,
2026,
2034,
4773,
23947,
2622,
999,
1005,
1007,
1025,
1065,
1007,
1025,
1065,
1007,
1025,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1027,
1002,
1006,
1005,
1026,
4487,
2615,
1013,
1028,
1005,
1007,
1025,
2364,
1012,
17552,
1006,
1002,
11661,
1031,
1014,
30526
] |
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Julas.Utils;
using Julas.Utils.Collections;
using Julas.Utils.Extensions;
using TheArtOfDev.HtmlRenderer.WinForms;
using Ozeki.VoIP;
using VoipClient;
namespace Client
{
public partial class ConversationForm : Form
{
private volatile bool _isInCall = false;
private readonly string _thisUserId;
private readonly string _otherUserId;
private readonly HtmlPanel _htmlPanel;
private readonly Color _textColor = Color.Black;
private readonly Color _timestampColor = Color.DarkGray;
private readonly Color _thisUserColor = Color.DodgerBlue;
private readonly Color _otherUserColor = Color.DarkOrange;
private readonly Color _enabledBtnColor = Color.FromArgb(255, 255, 255);
private readonly Color _disabledBtnColor = Color.FromArgb(226, 226, 226);
private readonly int _fontSize = 1;
private readonly VoipClientModule _voipClient;
public event Action<string> MessageSent;
public event Action Call;
public event Action HangUp;
public ConversationForm(string thisUserId, string otherUserId, string hash_pass, VoipClientModule voipClient)
{
_thisUserId = thisUserId;
_otherUserId = otherUserId;
_voipClient = voipClient;
InitializeComponent();
this.Text = $"Conversation with {otherUserId}";
_htmlPanel = new HtmlPanel();
panel1.Controls.Add(_htmlPanel);
_htmlPanel.Dock = DockStyle.Fill;
_voipClient.PhoneStateChanged += VoipClientOnPhoneStateChanged;
}
public new void Dispose()
{
_voipClient.PhoneStateChanged -= VoipClientOnPhoneStateChanged;
base.Dispose(true);
}
private void VoipClientOnPhoneStateChanged(PhoneState phoneState)
{
Invoke(() =>
{
if (!phoneState.OtherUserId.IsOneOf(null, _otherUserId) || phoneState.Status.IsOneOf(PhoneStatus.Registering))
{
btnCall.Enabled = false;
btnHangUp.Enabled = false;
btnCall.BackColor = _disabledBtnColor;
btnHangUp.BackColor = _disabledBtnColor;
return;
}
else
{
switch (phoneState.Status)
{
case PhoneStatus.Calling:
{
btnCall.Enabled = false;
btnHangUp.Enabled = true;
btnCall.BackColor = _disabledBtnColor;
btnHangUp.BackColor = _enabledBtnColor;
break;
}
case PhoneStatus.InCall:
{
btnCall.Enabled = false;
btnHangUp.Enabled = true;
btnCall.BackColor = _disabledBtnColor;
btnHangUp.BackColor = _enabledBtnColor;
break;
}
case PhoneStatus.IncomingCall:
{
btnCall.Enabled = true;
btnHangUp.Enabled = true;
btnCall.BackColor = _enabledBtnColor;
btnHangUp.BackColor = _enabledBtnColor;
break;
}
case PhoneStatus.Registered:
{
btnCall.Enabled = true;
btnHangUp.Enabled = false;
btnCall.BackColor = _enabledBtnColor;
btnHangUp.BackColor = _disabledBtnColor;
break;
}
}
}
});
}
public void AppendMessageFromOtherUser(string message)
{
AppendMessage(message, _otherUserId, _otherUserColor);
}
private void AppendMessageFromThisUser(string message)
{
AppendMessage(message, _thisUserId, _thisUserColor);
}
private void AppendMessage(string msg, string from, Color nameColor)
{
StringBuilder sb = new StringBuilder();
sb.Append("<p>");
sb.Append($"<b><font color=\"{GetHexColor(nameColor)}\" size=\"{_fontSize}\">{from}</font></b> ");
sb.Append($"<font color=\"{GetHexColor(_timestampColor)}\" size=\"{_fontSize}\">{DateTime.Now.ToString("HH:mm:ss")}</font>");
sb.Append("<br/>");
sb.Append($"<font color=\"{GetHexColor(_textColor)}\" size=\"{_fontSize}\">{msg}</font>");
sb.Append("</p>");
_htmlPanel.Text += sb.ToString();
_htmlPanel.VerticalScroll.Value = _htmlPanel.VerticalScroll.Maximum;
}
private string GetHexColor(Color color)
{
return $"#{color.R.ToString("x2").ToUpper()}{color.G.ToString("x2").ToUpper()}{color.B.ToString("x2").ToUpper()}";
}
private void SendMessage()
{
if (!tbInput.Text.IsNullOrWhitespace())
{
MessageSent?.Invoke(tbInput.Text.Trim());
AppendMessageFromThisUser(tbInput.Text.Trim());
tbInput.Text = "";
tbInput.SelectionStart = 0;
}
}
private void tbInput_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == '\r' || e.KeyChar == '\n')
{
e.Handled = true;
SendMessage();
}
}
private void btnSend_Click(object sender, EventArgs e)
{
SendMessage();
}
private void ConversationForm_Load(object sender, EventArgs e)
{
VoipClientOnPhoneStateChanged(_voipClient.PhoneState);
}
private void Invoke(Action action)
{
if(this.InvokeRequired)
{
this.Invoke(new MethodInvoker(action));
}
else
{
action();
}
}
private void btnCall_Click(object sender, EventArgs e)
{
btnCall.Enabled = false;
btnHangUp.Enabled = false;
btnCall.BackColor = _disabledBtnColor;
btnHangUp.BackColor = _disabledBtnColor;
switch (_voipClient.PhoneState.Status)
{
case PhoneStatus.IncomingCall:
{
_voipClient.AnswerCall();
break;
}
case PhoneStatus.Registered:
{
_voipClient.StartCall(_otherUserId);
break;
}
}
}
private void btnHangUp_Click(object sender, EventArgs e)
{
btnCall.Enabled = false;
btnHangUp.Enabled = false;
btnCall.BackColor = _disabledBtnColor;
btnHangUp.BackColor = _disabledBtnColor;
switch (_voipClient.PhoneState.Status)
{
case PhoneStatus.IncomingCall:
{
_voipClient.RejectCall();
break;
}
case PhoneStatus.InCall:
{
_voipClient.EndCall();
break;
}
case PhoneStatus.Calling:
{
_voipClient.EndCall();
break;
}
}
}
}
}
|
EMJK/Projekt_WTI_TIP
|
Client/ConversationForm.cs
|
C#
|
mit
| 8,027
|
[
30522,
2478,
2291,
1025,
2478,
2291,
1012,
6407,
1012,
12391,
1025,
2478,
2291,
1012,
6922,
5302,
9247,
1025,
2478,
2291,
1012,
2951,
1025,
2478,
2291,
1012,
5059,
1025,
2478,
2291,
1012,
11409,
4160,
1025,
2478,
2291,
1012,
3793,
1025,
2478,
2291,
1012,
11689,
2075,
1012,
8518,
1025,
2478,
2291,
1012,
3645,
1012,
3596,
1025,
2478,
21650,
3022,
1012,
21183,
12146,
1025,
2478,
21650,
3022,
1012,
21183,
12146,
1012,
6407,
1025,
30524,
11514,
20464,
11638,
1025,
3415,
15327,
7396,
1063,
2270,
7704,
2465,
4512,
14192,
1024,
2433,
1063,
2797,
20606,
22017,
2140,
1035,
2003,
2378,
9289,
2140,
1027,
6270,
1025,
2797,
3191,
2239,
2135,
5164,
1035,
2023,
20330,
3593,
1025,
2797,
3191,
2239,
2135,
5164,
1035,
2060,
20330,
3593,
1025,
2797,
3191,
2239,
2135,
16129,
9739,
2884,
1035,
16129,
9739,
2884,
1025,
2797,
3191,
2239,
2135,
3609,
1035,
3793,
18717,
1027,
3609,
1012,
2304,
1025,
2797,
3191,
2239,
2135,
3609,
1035,
2335,
15464,
15042,
12898,
2099,
1027,
3609,
1012,
2601,
17643,
2100,
1025,
2797,
3191,
2239,
2135,
3609,
1035,
2023,
20330,
18717,
1027,
3609,
1012,
11898,
15185,
7630,
2063,
1025,
2797,
3191,
2239,
2135,
3609,
1035,
2060,
20330,
18717,
1027,
3609,
1012,
2601,
18842,
3351,
1025,
2797,
3191,
2239,
2135,
3609,
1035,
9124,
19279,
15305,
10626,
1027,
3609,
1012,
2013,
2906,
18259,
1006,
20637,
1010,
20637,
1010,
20637,
1007,
1025,
2797,
3191,
2239,
2135,
3609,
1035,
9776,
19279,
15305,
10626,
1027,
3609,
1012,
2013,
2906,
18259,
1006,
21035,
1010,
21035,
1010,
21035,
1007,
1025,
2797,
3191,
2239,
2135,
20014,
1035,
15489,
5332,
4371,
1027,
1015,
1025,
2797,
3191,
2239,
2135,
29536,
11514,
20464,
11638,
5302,
8566,
2571,
1035,
29536,
11514,
20464,
11638,
1025,
2270,
2724,
2895,
1026,
5164,
1028,
7696,
4765,
1025,
2270,
2724,
2895,
2655,
1025,
2270,
2724,
2895,
6865,
6279,
1025,
2270,
4512,
14192,
1006,
5164,
2023,
20330,
3593,
1010,
5164,
2060,
20330,
3593,
1010,
5164,
23325,
1035,
3413,
1010,
29536,
11514,
20464,
11638,
5302,
8566,
2571,
29536,
11514,
20464,
11638,
1007,
1063,
1035,
2023,
20330,
3593,
1027,
2023,
20330,
3593,
1025,
1035,
2060,
20330,
3593,
1027,
2060,
20330,
3593,
1025,
1035,
29536,
11514,
20464,
11638,
1027,
29536,
11514,
20464,
11638,
1025,
3988,
4697,
9006,
29513,
3372,
1006,
1007,
1025,
2023,
1012,
3793,
1027,
1002,
1000,
4512,
2007,
1063,
2060,
20330,
3593,
1065,
1000,
1025,
1035,
16129,
9739,
2884,
1027,
2047,
16129,
9739,
2884,
1006,
1007,
1025,
5997,
2487,
1012,
7711,
1012,
5587,
1006,
1035,
16129,
9739,
2884,
1007,
1025,
1035,
16129,
9739,
2884,
1012,
8946,
1027,
15093,
27983,
1012,
6039,
1025,
1035,
29536,
11514,
20464,
11638,
1012,
11640,
12259,
22305,
2098,
1009,
1027,
29536,
11514,
20464,
11638,
2239,
19093,
12259,
22305,
2098,
1025,
1065,
2270,
2047,
11675,
27764,
1006,
1007,
1063,
1035,
29536,
11514,
20464,
11638,
1012,
11640,
12259,
22305,
2098,
1011,
1027,
29536,
11514,
20464,
11638,
2239,
19093,
12259,
22305,
2098,
1025,
2918,
1012,
27764,
30523,
2478,
21650,
3022,
1012,
21183,
12146,
1012,
14305,
1025,
2478,
1996,
8445,
11253,
24844,
1012,
16129,
7389,
4063,
2121,
1012,
2663,
22694,
1025,
2478,
11472,
26576,
1012,
29536,
11514,
1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100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2478,
21650,
3022,
1012,
21183,
12146,
1012,
14305,
1025,
2478,
1996,
8445,
11253,
24844,
1012,
16129,
7389,
4063,
2121,
1012,
2663,
22694,
1025,
2478,
11472,
26576,
1012,
29536,
11514,
1025,
2478,
29536,
30526
] |
module.exports = require('../lib/')
.extend('faker', function() {
try {
return require('faker/locale/zh_CN');
} catch (e) {
return null;
}
});
|
etzJohn/speedboost
|
node_modules/json-schema-faker/locale/zh_CN.js
|
JavaScript
|
mit
| 179
|
[
30522,
11336,
1012,
14338,
1027,
5478,
1006,
1005,
1012,
1012,
1013,
5622,
2497,
1013,
1005,
1007,
1012,
7949,
1006,
1005,
8275,
2099,
1005,
1010,
3853,
1006,
1007,
1063,
3046,
1063,
2709,
5478,
1006,
1005,
8275,
2099,
1013,
2334,
2063,
1013,
1062,
2232,
1035,
27166,
1005,
1007,
1025,
1065,
4608,
1006,
1041,
1007,
1063,
2709,
19701,
1025,
1065,
1065,
1007,
1025,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
# Contributing
I explicitly welcome contributions from people who have never contributed to open-source before: we were all beginners once!
I can help build on a partially working pull request with the aim of getting it merged.
I am also actively seeking to diversify our contributors and especially welcome contributions from women from all backgrounds and people of color. <sup>[1](#References)</sup>
If you're interested in contributing, fork this repo and create a pull request.
Please include a short descriptive link to your code in the readme, and order the link alphpabetically by file name.
Include a description of each data structure or algorithm at the top of the file, and if you feel that your code needs further explanation,
you can include a more detailed summary in the Data Structures or Algorithms subfolder's readme.
Please follow the [Ruby](https://github.com/bbatsov/ruby-style-guide) and [JavaScript](https://github.com/airbnb/javascript) Style Guides.
Tests are recommended, but optional.
If you're looking for inspiration, I'd love to have a:
+ [Priority Queue](https://en.wikipedia.org/wiki/Priority_queue)
+ [Valid Sudoku Board](https://en.wikipedia.org/wiki/Sudoku_solving_algorithms)
+ [Sorting Algorithms](https://en.wikipedia.org/wiki/Sorting_algorithm#Popular_sorting_algorithms)
+ [A* Search Algorithm](https://en.wikipedia.org/wiki/A*_search_algorithm)
+ [Knuth-Morris-Pratt Algorithm](https://en.wikipedia.org/wiki/Knuth%E2%80%93Morris%E2%80%93Pratt_algorithm)
+ [Heap](https://en.wikipedia.org/wiki/Heap_\(data_structure\))
+ [Bloom Filter](https://en.wikipedia.org/wiki/Bloom_filter)
+ [Or refactor one of these files!](/REFACTOR.md)
## Attribution
1. I used and modified [Homebrew's](https://github.com/Homebrew/brew#contributing) welcoming contributing section.
|
Dbz/Algorithms
|
CONTRIBUTING.md
|
Markdown
|
mit
| 1,821
|
[
30522,
1001,
8020,
1045,
12045,
6160,
5857,
2013,
2111,
2040,
2031,
2196,
5201,
2000,
2330,
1011,
3120,
2077,
1024,
2057,
2020,
2035,
4088,
16912,
2320,
999,
1045,
2064,
2393,
3857,
2006,
1037,
6822,
2551,
4139,
5227,
2007,
1996,
6614,
1997,
2893,
2009,
5314,
1012,
1045,
2572,
2036,
8851,
6224,
2000,
18612,
8757,
2256,
16884,
1998,
2926,
6160,
5857,
2013,
2308,
2013,
2035,
15406,
1998,
2111,
1997,
3609,
1012,
1026,
10514,
2361,
1028,
1031,
1015,
1033,
1006,
1001,
7604,
1007,
1026,
1013,
10514,
2361,
1028,
2065,
2017,
1005,
2128,
4699,
1999,
8020,
1010,
9292,
2023,
16360,
2080,
1998,
3443,
1037,
4139,
5227,
1012,
3531,
2421,
1037,
2460,
22726,
4957,
2000,
2115,
3642,
1999,
1996,
3191,
4168,
1010,
1998,
2344,
1996,
4957,
2632,
8458,
4502,
20915,
15004,
2011,
5371,
2171,
1012,
2421,
1037,
6412,
1997,
2169,
2951,
3252,
2030,
9896,
2012,
1996,
2327,
1997,
1996,
5371,
1010,
1998,
2065,
2017,
2514,
2008,
2115,
3642,
3791,
2582,
7526,
1010,
2017,
2064,
2421,
1037,
2062,
6851,
12654,
1999,
1996,
2951,
5090,
2030,
13792,
4942,
10371,
2121,
1005,
1055,
3191,
4168,
1012,
3531,
3582,
1996,
1031,
10090,
1033,
1006,
16770,
1024,
1013,
1013,
21025,
2705,
12083,
1012,
4012,
1013,
22861,
11149,
4492,
1013,
10090,
1011,
2806,
1011,
5009,
1007,
1998,
1031,
9262,
22483,
1033,
1006,
16770,
1024,
1013,
1013,
21025,
2705,
12083,
1012,
4012,
1013,
2250,
24700,
2497,
1013,
9262,
22483,
1007,
2806,
12468,
1012,
5852,
2024,
6749,
1010,
2021,
11887,
1012,
2065,
2017,
1005,
2128,
2559,
2005,
7780,
1010,
1045,
1005,
1040,
2293,
2000,
2031,
1037,
1024,
1009,
1031,
9470,
24240,
1033,
1006,
16770,
1024,
1013,
1013,
4372,
1012,
16948,
1012,
8917,
1013,
15536,
3211,
1013,
9470,
1035,
24240,
1007,
1009,
1031,
9398,
19219,
30524,
13792,
1007,
1009,
1031,
22210,
13792,
1033,
1006,
16770,
1024,
1013,
1013,
4372,
1012,
16948,
1012,
8917,
1013,
15536,
3211,
1013,
22210,
1035,
9896,
1001,
2759,
1035,
22210,
1035,
13792,
1007,
1009,
1031,
1037,
1008,
3945,
9896,
1033,
1006,
16770,
1024,
1013,
1013,
4372,
1012,
16948,
1012,
8917,
1013,
15536,
3211,
1013,
1037,
1008,
1035,
3945,
1035,
9896,
1007,
1009,
1031,
14161,
14317,
1011,
6384,
1011,
13208,
9896,
1033,
1006,
16770,
1024,
1013,
1013,
4372,
1012,
16948,
1012,
8917,
1013,
15536,
3211,
1013,
14161,
14317,
1003,
1041,
2475,
1003,
3770,
1003,
6109,
5302,
18752,
2015,
1003,
1041,
2475,
1003,
3770,
1003,
6109,
18098,
19321,
1035,
9896,
1007,
1009,
1031,
16721,
1033,
1006,
16770,
1024,
1013,
1013,
4372,
1012,
16948,
1012,
8917,
1013,
15536,
3211,
1013,
16721,
1035,
1032,
1006,
2951,
1035,
3252,
1032,
1007,
1007,
1009,
1031,
13426,
11307,
1033,
1006,
16770,
1024,
1013,
1013,
4372,
1012,
16948,
1012,
8917,
1013,
15536,
3211,
1013,
13426,
1035,
11307,
1007,
1009,
1031,
2030,
25416,
18908,
2953,
2028,
1997,
2122,
6764,
999,
1033,
1006,
1013,
25416,
18908,
2953,
1012,
9108,
1007,
1001,
1001,
2012,
18886,
29446,
1015,
1012,
1045,
2109,
1998,
6310,
1031,
2188,
13578,
2860,
1005,
1055,
1033,
1006,
30523,
21940,
2604,
1033,
1006,
16770,
1024,
1013,
1013,
4372,
1012,
16948,
1012,
8917,
1013,
15536,
3211,
1013,
19219,
21940,
1035,
13729,
1035,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
21940,
2604,
1033,
1006,
16770,
1024,
1013,
1013,
4372,
1012,
16948,
1012,
8917,
1013,
15536,
3211,
1013,
19219,
21940,
1035,
13729,
1035,
30526
] |
//
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed 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.
//
namespace Microsoft.PackageManagement.SwidTag.Test.Support {
using System.Linq;
public static class Event<T> where T : class {
private static T EmptyDelegate {
get {
return typeof (T).CreateEmptyDelegate() as T;
}
}
public static T Raise {
get {
return (XTask.CurrentExecutingTask.GetEventHandler(typeof (T)) as T) ?? EmptyDelegate;
}
}
public static T RaiseFirst {
get {
var dlg = XTask.CurrentExecutingTask.GetEventHandler(typeof (T));
return dlg != null ? dlg.GetInvocationList().FirstOrDefault() as T : EmptyDelegate;
}
}
}
}
|
fearthecowboy/Swidtag_deprecated
|
Test/Support/Event.cs
|
C#
|
apache-2.0
| 1,400
|
[
30522,
1013,
1013,
1013,
1013,
9385,
1006,
1039,
1007,
7513,
3840,
1012,
2035,
2916,
9235,
1012,
1013,
1013,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1013,
1013,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
1013,
1013,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1013,
1013,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1013,
1013,
1013,
1013,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1013,
1013,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
30524,
1998,
1013,
1013,
12546,
2104,
1996,
6105,
1012,
1013,
1013,
3415,
15327,
7513,
1012,
7427,
24805,
20511,
1012,
25430,
3593,
15900,
1012,
3231,
1012,
2490,
1063,
2478,
2291,
1012,
11409,
4160,
1025,
2270,
10763,
2465,
2724,
1026,
1056,
1028,
2073,
1056,
1024,
2465,
1063,
2797,
10763,
1056,
4064,
9247,
29107,
2618,
1063,
2131,
1063,
2709,
2828,
11253,
1006,
1056,
1007,
1012,
3443,
6633,
13876,
18124,
23115,
3686,
1006,
1007,
2004,
1056,
1025,
1065,
1065,
2270,
10763,
1056,
5333,
1063,
2131,
1063,
2709,
1006,
1060,
10230,
2243,
1012,
2783,
10288,
8586,
20807,
10230,
2243,
1012,
2131,
18697,
3372,
11774,
3917,
1006,
2828,
11253,
1006,
1056,
1007,
1007,
2004,
1056,
1007,
1029,
1029,
4064,
9247,
29107,
2618,
1025,
1065,
1065,
2270,
10763,
1056,
5333,
8873,
12096,
1063,
2131,
1063,
13075,
21469,
2290,
1027,
1060,
10230,
2243,
1012,
2783,
10288,
8586,
20807,
10230,
2243,
1012,
2131,
18697,
3372,
11774,
3917,
1006,
2828,
11253,
1006,
1056,
1007,
1007,
1025,
2709,
21469,
2290,
999,
1027,
19701,
1029,
21469,
2290,
1012,
2131,
2378,
19152,
9863,
1006,
1007,
1012,
2034,
8551,
12879,
23505,
1006,
1007,
2004,
1056,
1024,
4064,
9247,
29107,
2618,
1025,
1065,
1065,
1065,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1000,
2004,
2003,
1000,
3978,
1010,
1013,
1013,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1013,
1013,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
30526
] |
/**
* Copyright 2011 Pedro Ribeiro
*
* Licensed 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.
*/
package org.jalphanode.scheduler;
import java.util.Date;
/**
* Iterator which builds the next execution time.
*
* @author ribeirux
* @version $Revision$
*/
public interface ScheduleIterator {
/**
* Builds the next execution time according the specified {@code date}.
*
* @param date the date to begin the search for the next valid date
*
* @return the next execution date
*/
Date next(Date date);
}
|
ribeirux/jalphanode
|
core/src/main/java/org/jalphanode/scheduler/ScheduleIterator.java
|
Java
|
apache-2.0
| 1,080
|
[
30522,
1013,
1008,
1008,
1008,
9385,
2249,
7707,
19395,
17166,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1008,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
1008,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1008,
1008,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1008,
1008,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1008,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
1000,
2004,
2003,
1000,
3978,
30524,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
1008,
12546,
2104,
1996,
6105,
1012,
1008,
1013,
7427,
8917,
1012,
14855,
14277,
4819,
10244,
1012,
6134,
2099,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
3058,
1025,
1013,
1008,
1008,
1008,
2009,
6906,
4263,
2029,
16473,
1996,
2279,
7781,
2051,
1012,
1008,
1008,
1030,
3166,
19395,
7416,
6820,
2595,
1008,
1030,
2544,
1002,
13921,
1002,
1008,
1013,
2270,
8278,
6134,
21646,
8844,
1063,
1013,
1008,
1008,
1008,
16473,
1996,
2279,
7781,
2051,
2429,
1996,
9675,
1063,
1030,
3642,
3058,
1065,
1012,
1008,
1008,
1030,
11498,
2213,
3058,
1996,
3058,
2000,
4088,
1996,
3945,
2005,
1996,
2279,
9398,
3058,
1008,
1008,
1030,
2709,
1996,
2279,
7781,
3058,
1008,
1013,
3058,
2279,
1006,
3058,
3058,
1007,
1025,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1010,
1008,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1008,
2156,
1996,
30526
] |
/*
Copyright (©) 2003-2022 Teus Benschop.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#pragma once
#include <config/libraries.h>
class Database_Privileges
{
public:
static const char * database ();
static void create ();
static void upgrade ();
static void optimize ();
static bool healthy ();
static string save (string username);
static void load (string username, const string & data);
static void setBibleBook (string username, string bible, int book, bool write);
static void setBible (string username, string bible, bool write);
static void getBibleBook (string username, string bible, int book, bool & read, bool & write);
static tuple <bool, bool> getBible (string username, string bible);
static int getBibleBookCount ();
static bool getBibleBookExists (string username, string bible, int book);
static void removeBibleBook (string username, string bible, int book);
static void removeBible (string bible);
static void setFeature (string username, int feature, bool enabled);
static bool getFeature (string username, int feature);
static void removeUser (string username);
private:
static const char * bibles_start ();
static const char * bibles_end ();
static const char * features_start ();
static const char * features_end ();
static const char * on ();
static const char * off ();
};
string database_privileges_directory (const string & user);
string database_privileges_file ();
string database_privileges_client_path (const string & user);
void database_privileges_client_create (const string & user, bool force);
void database_privileges_client_remove (const string & user);
|
bibledit/windows
|
server/database/privileges.h
|
C
|
gpl-3.0
| 2,285
|
[
30522,
1013,
1008,
9385,
1006,
1075,
1007,
2494,
1011,
16798,
2475,
8915,
2271,
3841,
11624,
7361,
1012,
2023,
2565,
2003,
2489,
4007,
1025,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
2009,
1998,
1013,
2030,
19933,
2009,
2104,
1996,
3408,
1997,
1996,
27004,
2236,
2270,
6105,
2004,
2405,
2011,
1996,
2489,
4007,
3192,
1025,
2593,
2544,
1017,
1997,
1996,
6105,
1010,
2030,
1006,
2012,
2115,
5724,
1007,
2151,
2101,
2544,
1012,
2023,
2565,
2003,
5500,
1999,
1996,
3246,
2008,
2009,
2097,
2022,
6179,
1010,
2021,
2302,
2151,
10943,
2100,
1025,
2302,
2130,
1996,
13339,
10943,
2100,
1997,
6432,
8010,
2030,
10516,
2005,
1037,
3327,
3800,
1012,
2156,
1996,
27004,
2236,
2270,
6105,
2005,
2062,
4751,
1012,
2017,
2323,
2031,
2363,
1037,
6100,
1997,
1996,
27004,
2236,
2270,
6105,
2247,
2007,
2023,
2565,
1025,
2065,
2025,
1010,
4339,
2000,
1996,
2489,
4007,
3192,
1010,
4297,
1012,
1010,
4868,
5951,
2395,
1010,
3587,
2723,
1010,
3731,
1010,
5003,
6185,
14526,
2692,
1011,
7558,
2487,
3915,
1012,
1008,
1013,
1001,
10975,
8490,
2863,
2320,
1001,
2421,
1026,
9530,
8873,
2290,
1013,
8860,
1012,
1044,
1028,
2465,
7809,
1035,
14310,
1063,
2270,
1024,
10763,
9530,
3367,
25869,
1008,
7809,
1006,
1007,
1025,
10763,
11675,
3443,
1006,
1007,
1025,
10763,
11675,
12200,
1006,
1007,
1025,
10763,
11675,
23569,
27605,
4371,
1006,
1007,
1025,
10763,
22017,
2140,
7965,
1006,
1007,
1025,
10763,
5164,
3828,
1006,
5164,
5310,
18442,
1007,
1025,
10763,
11675,
7170,
1006,
5164,
5310,
18442,
1010,
9530,
3367,
5164,
1004,
2951,
1007,
1025,
10763,
11675,
2275,
28065,
2571,
8654,
1006,
5164,
5310,
18442,
1010,
5164,
6331,
1010,
20014,
2338,
1010,
22017,
2140,
4339,
1007,
1025,
10763,
11675,
2275,
28065,
2571,
1006,
5164,
5310,
18442,
1010,
5164,
6331,
1010,
22017,
2140,
4339,
30524,
10814,
1026,
22017,
2140,
1010,
22017,
2140,
1028,
2131,
28065,
2571,
1006,
5164,
5310,
18442,
1010,
5164,
6331,
1007,
1025,
10763,
20014,
2131,
28065,
2571,
8654,
3597,
16671,
1006,
1007,
1025,
10763,
22017,
2140,
2131,
28065,
2571,
8654,
10288,
5130,
1006,
5164,
5310,
18442,
1010,
5164,
6331,
1010,
20014,
2338,
1007,
1025,
10763,
11675,
6366,
28065,
2571,
8654,
1006,
5164,
5310,
18442,
1010,
5164,
6331,
1010,
20014,
2338,
1007,
1025,
10763,
11675,
6366,
28065,
2571,
1006,
5164,
6331,
1007,
1025,
10763,
11675,
2275,
7959,
4017,
5397,
1006,
5164,
5310,
18442,
1010,
20014,
3444,
1010,
22017,
2140,
9124,
1007,
1025,
10763,
22017,
2140,
2131,
7959,
4017,
5397,
1006,
5164,
5310,
18442,
1010,
20014,
3444,
1007,
1025,
10763,
11675,
6366,
20330,
1006,
5164,
5310,
18442,
1007,
1025,
2797,
1024,
10763,
9530,
3367,
25869,
1008,
6331,
2015,
1035,
2707,
1006,
1007,
1025,
10763,
9530,
3367,
25869,
1008,
6331,
2015,
1035,
2203,
1006,
1007,
1025,
10763,
9530,
3367,
25869,
1008,
2838,
1035,
2707,
1006,
1007,
1025,
10763,
9530,
3367,
25869,
1008,
2838,
1035,
2203,
1006,
1007,
1025,
10763,
9530,
3367,
25869,
1008,
2006,
1006,
1007,
30523,
1007,
1025,
10763,
11675,
2131,
28065,
2571,
8654,
1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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1007,
1025,
10763,
11675,
2131,
28065,
2571,
8654,
1006,
5164,
5310,
18442,
1010,
5164,
6331,
1010,
20014,
2338,
1010,
22017,
2140,
1004,
3191,
1010,
22017,
2140,
1004,
4339,
1007,
1025,
10763,
10722,
30526
] |
# Myriotrema norstictideum (Patw. & Nagarkar) D.D. Awasthi SPECIES
#### Status
ACCEPTED
#### According to
Index Fungorum
#### Published in
Biblthca Lichenol. 40: 3 (1991)
#### Original name
Leptotrema norstictideum Patw. & Nagarkar
### Remarks
null
|
mdoering/backbone
|
life/Fungi/Ascomycota/Lecanoromycetes/Ostropales/Graphidaceae/Myriotrema/Myriotrema norstictideum/README.md
|
Markdown
|
apache-2.0
| 253
|
[
30522,
1001,
2026,
9488,
7913,
2863,
4496,
10074,
3775,
3207,
2819,
1006,
6986,
2860,
1012,
1004,
16395,
6673,
1007,
1040,
1012,
1040,
1012,
22091,
14083,
4048,
2427,
1001,
1001,
1001,
1001,
3570,
3970,
1001,
1001,
1001,
1001,
2429,
2000,
5950,
4569,
20255,
2819,
1001,
1001,
1001,
1001,
2405,
1999,
12170,
16558,
2705,
3540,
5622,
8661,
4747,
1012,
2871,
1024,
1017,
1006,
2889,
1007,
1001,
1001,
1001,
1001,
2434,
2171,
3393,
13876,
4140,
28578,
2050,
4496,
10074,
3775,
3207,
2819,
6986,
2860,
1012,
1004,
16395,
6673,
1001,
1001,
1001,
12629,
19701,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
<!DOCTYPE html>
<!--[if lt IE 9]><html class="no-js lt-ie9" lang="bg" dir="ltr"><![endif]-->
<!--[if gt IE 8]><!-->
<html class="no-js" lang="bg" dir="ltr">
<!--<![endif]-->
<head>
<meta charset="utf-8" />
<!-- Web Experience Toolkit (WET) / Boîte à outils de l'expérience Web (BOEW)
wet-boew.github.io/wet-boew/License-en.html / wet-boew.github.io/wet-boew/Licence-fr.html -->
<title>Content page - No search or language selection link
- WET theme
- Работни примери
- Web Experience Toolkit
</title>
<meta content="width=device-width, initial-scale=1" name="viewport" />
<!-- Meta data -->
<meta name="description" content="Web Experience Toolkit (WET) includes reusable components for building and maintaining innovative Web sites that are accessible, usable, and interoperable. These reusable components are open source software and free for use by departments and external Web communities" />
<!-- Meta data-->
<!--[if gte IE 9 | !IE ]><!-->
<link href="../assets/favicon.ico" rel="icon" type="image/x-icon" />
<link rel="stylesheet" href="../css/wet-boew.css" />
<!--<![endif]-->
<link rel="stylesheet" href="../css/theme.css" />
<!--[if lt IE 9]>
<link href="../assets/favicon.ico" rel="shortcut icon" />
<link rel="stylesheet" href="../css/ie8-wet-boew.css" />
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.js"></script>
<script src="../js/ie8-wet-boew.js"></script>
<![endif]-->
<noscript><link rel="stylesheet" href="../css/noscript.css" /></noscript>
</head>
<body vocab="http://schema.org/" typeof="WebPage">
<ul id="wb-tphp">
<li class="wb-slc">
<a class="wb-sl" href="#wb-cont">Към основното съдържание</a>
</li>
<li class="wb-slc visible-sm visible-md visible-lg">
<a class="wb-sl" href="#wb-info">Напред към "За този сайт"</a>
</li>
</ul>
<header role="banner">
<div id="wb-bnr">
<div id="wb-bar">
<div class="container">
<div class="row">
<section class="wb-mb-links col-xs-12 visible-sm visible-xs" id="wb-glb-mn">
<h2>Търсене и менюта</h2>
<ul class="pnl-btn list-inline text-right">
<li><a href="#mb-pnl" title="Търсене и менюта" aria-controls="mb-pnl" class="overlay-lnk btn btn-sm btn-default" role="button"><span class="glyphicon glyphicon-search"><span class="glyphicon glyphicon-th-list"><span class="wb-inv">Търсене и менюта</span></span></span></a></li>
</ul>
<div id="mb-pnl"></div>
</section>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div id="wb-sttl" class="col-md-8">
<a href="../index-en.html">
<object type="image/svg+xml" tabindex="-1" data="../assets/logo.svg"></object>
<span>Web Experience Toolkit<span class="wb-inv">, </span><small>Collaborative open source project led by the Government of Canada</small></span>
</a>
</div>
</div>
</div>
</div>
<nav role="navigation" id="wb-sm" data-ajax-replace="../ajax/sitemenu-bg.html" data-trgt="mb-pnl" class="wb-menu visible-md visible-lg" typeof="SiteNavigationElement">
<div class="container nvbar">
<h2>Теми меню</h2>
<div class="row">
<ul class="list-inline menu">
<li><a href="../index-en.html">WET проект</a></li>
<li><a href="../docs/start-en.html#implement">Прилагане WET</a></li>
<li><a href="../docs/start-en.html">Принос за WET</a></li>
</ul>
</div>
</div>
</nav>
<nav role="navigation" id="wb-bc" property="breadcrumb">
<h2>Вие се намирате в:</h2>
<div class="container">
<div class="row">
<ol class="breadcrumb">
<li>
<a href="../index-en.html">Дом</a>
</li>
<li>
<a href="../demos/index-en.html">Работни примери</a>
</li>
<li>
<a href="../theme/index-en.html">WET theme</a>
</li>
<li>Content page - No search or language selection link</li>
</ol>
</div>
</div>
</nav>
</header>
<main role="main" property="mainContentOfPage" class="container">
<h1 id="wb-cont" property="name">Content page - No search or language selection link</h1>
<section class="alert alert-warning">
<h2 class="h3">Looking for WET v3.1?</h2>
<p>As of September 23, 2014, version 3.1 of the Web Experience Toolkit is no longer supported. The source code and documentation have been moved to the <a href="https://github.com/wet-boew/wet-boew-legacy">wet-boew-legacy</a> repository.</p>
</section>
<section>
<h2>Заглавие 2 (<code>h2</code>)</h2>
<section>
<h3>Заглавие 3 (<code>h3</code>)</h3>
<section>
<h4>Заглавие 4 (<code>h4</code>)</h4>
<section>
<h5>Заглавие 5 (<code>h5</code>)</h5>
<section>
<h6>Заглавие 6 (<code>h6</code>)</h6>
<p>Параграф - подразбиране вид</p>
</section>
</section>
</section>
</section>
</section>
<p><a href="#">Връзка</a></p>
<ul>
<li>неподреден списък (<code>ul</code>) - ниво 1
<ul>
<li>неподреден списък (<code>ul</code>) - ниво 2
<ul>
<li>неподреден списък (<code>ul</code>) - ниво 3</li>
</ul>
</li>
</ul>
</li>
</ul>
<ol>
<li>подреден списък (<code>ol</code>) - ниво 1</li>
<li>подреден списък (<code>ol</code>) - ниво 1
<ol>
<li>подреден списък (<code>ol</code>) - ниво 2</li>
<li>подреден списък (<code>ol</code>) - ниво 2
<ol>
<li>подреден списък (<code>ol</code>) - ниво 3</li>
<li>подреден списък (<code>ol</code>) - ниво 3</li>
</ol>
</li>
</ol>
</li>
</ol>
<table class="table table-striped">
<caption>Таблица надпис</caption>
<thead>
<tr>
<th scope="col">Таблица заглавието (<code>th</code>)</th>
<th scope="col">Таблица заглавието (<code>th</code>)</th>
<th scope="col">Таблица заглавието (<code>th</code>)</th>
<th scope="col">Таблица заглавието (<code>th</code>)</th>
</tr>
</thead>
<tbody>
<tr>
<td>Данни (<code>td</code>)</td>
<td>Данни (<code>td</code>)</td>
<td>Данни (<code>td</code>)</td>
<td>Данни (<code>td</code>)</td>
</tr>
<tr>
<td>Данни (<code>td</code>)</td>
<td>Данни (<code>td</code>)</td>
<td>Данни (<code>td</code>)</td>
<td>Данни (<code>td</code>)</td>
</tr>
<tr>
<td>Данни (<code>td</code>)</td>
<td>Данни (<code>td</code>)</td>
<td>Данни (<code>td</code>)</td>
<td>Данни (<code>td</code>)</td>
</tr>
</tbody>
</table>
<form method="post" action="#" class="form-horizontal">
<div class="form-group">
<label for="data1" class="col-sm-3 control-label">Форма <code>input</code></label>
<div class="col-sm-9">
<input type="text" id="data1" name="data1" class="form-control" />
</div>
</div>
<div class="form-group">
<label for="data2" class="col-sm-3 control-label">Форма <code>textarea</code></label>
<div class="col-sm-9">
<textarea id="data2" rows="3" cols="15" name="data2" class="form-control"></textarea>
</div>
</div>
<div class="form-group">
<label for="data4" class="col-sm-3 control-label">Форма <code>select</code></label>
<div class="col-sm-9">
<select name="data4" id="data4" class="form-control">
<option value="1">Опция 1</option>
<option value="2">Опция 2</option>
<option value="3">Опция 3</option>
<option value="4">Опция 4</option>
</select>
</div>
</div>
<div class="form-group">
<div class="col-sm-offset-3 col-sm-9">
<button type="submit" class="btn btn-primary">Подаване</button>
</div>
</div>
</form>
<blockquote>
<p>"<code>blockquote</code>"</p>
</blockquote>
<dl id="wb-dtmd">
<dt>Дата на промяна: </dt>
<dd><time property="dateModified">2014-02-19</time></dd>
</dl>
</main>
<footer role="contentinfo" id="wb-info" class="visible-sm visible-md visible-lg wb-navcurr">
<div class="container">
<nav role="navigation" class="row">
<h2>За този сайт</h2>
<section class="col-sm-3">
<h3>Свържете се с нас</h3>
<ul class="list-unstyled">
<li><a href="https://github.com/wet-boew/wet-boew/issues/new">Въпроси или коментари?</a></li>
</ul>
</section>
<section class="col-sm-3">
<h3>За</h3>
<ul class="list-unstyled">
<li><a href="../index-en.html#about">За Web Experience Toolkit</a></li>
<li><a rel="external" href="http://www.tbs-sct.gc.ca/ws-nw/index-eng.asp">За уеб стандарти</a></li>
</ul>
</section>
<section class="col-sm-3">
<h3>Новини</h3>
<ul class="list-unstyled">
<li><a href="https://github.com/wet-boew/wet-boew/pulse">Recent project activity</a></li>
<li><a href="https://github.com/wet-boew/wet-boew/graphs">Статистики за проекта</a></li>
</ul>
</section>
<section class="col-sm-3">
<h3>Останете във връзка</h3>
<ul class="list-unstyled">
<li><a rel="external" href="https://twitter.com/WebExpToolkit">Twitter</a></li>
</ul>
</section>
</nav>
</div>
</footer>
<!--[if gte IE 9 | !IE ]><!-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.js"></script>
<script src="../js/wet-boew.js"></script>
<!--<![endif]-->
<!--[if lt IE 9]>
<script src="../js/ie8-wet-boew2.js"></script>
<![endif]-->
</body>
</html>
|
TouficS/a11yppt
|
tables/unmin/theme/content-nosearchlang-bg.html
|
HTML
|
mit
| 9,801
|
[
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
999,
1011,
1011,
1031,
2065,
8318,
29464,
1023,
1033,
1028,
1026,
16129,
2465,
1027,
1000,
2053,
1011,
1046,
2015,
8318,
1011,
29464,
2683,
1000,
11374,
1027,
1000,
1038,
2290,
1000,
16101,
1027,
1000,
8318,
2099,
1000,
1028,
1026,
999,
1031,
2203,
10128,
1033,
1011,
1011,
1028,
1026,
999,
1011,
1011,
1031,
2065,
14181,
29464,
1022,
1033,
1028,
1026,
999,
1011,
1011,
1028,
1026,
16129,
2465,
1027,
1000,
2053,
1011,
1046,
2015,
1000,
11374,
1027,
1000,
1038,
2290,
1000,
16101,
1027,
1000,
8318,
2099,
1000,
1028,
1026,
999,
1011,
1011,
1026,
999,
1031,
2203,
10128,
1033,
1011,
1011,
1028,
1026,
2132,
1028,
1026,
18804,
25869,
13462,
1027,
1000,
21183,
2546,
1011,
1022,
1000,
1013,
1028,
1026,
999,
1011,
1011,
4773,
3325,
6994,
23615,
1006,
4954,
1007,
1013,
8945,
4221,
1037,
2041,
12146,
2139,
1048,
1005,
3325,
4773,
1006,
8945,
7974,
1007,
4954,
1011,
8945,
7974,
1012,
21025,
2705,
12083,
1012,
22834,
1013,
4954,
1011,
8945,
7974,
1013,
6105,
1011,
4372,
1012,
16129,
1013,
4954,
1011,
8945,
7974,
1012,
21025,
2705,
12083,
1012,
22834,
1013,
4954,
1011,
8945,
7974,
1013,
11172,
1011,
10424,
1012,
16129,
1011,
1011,
1028,
1026,
2516,
1028,
4180,
3931,
1011,
2053,
3945,
2030,
2653,
4989,
4957,
1011,
4954,
4323,
1011,
1195,
10260,
29740,
14150,
22919,
18947,
10325,
1194,
16856,
10325,
29745,
15290,
16856,
10325,
1011,
4773,
3325,
6994,
23615,
1026,
1013,
2516,
1028,
1026,
18804,
4180,
1027,
1000,
9381,
1027,
5080,
1011,
9381,
1010,
3988,
1011,
4094,
1027,
1015,
1000,
2171,
1027,
1000,
3193,
6442,
1000,
1013,
1028,
1026,
999,
1011,
1011,
18804,
2951,
1011,
1011,
1028,
1026,
18804,
2171,
1027,
1000,
6412,
1000,
4180,
1027,
1000,
4773,
3325,
6994,
23615,
1006,
4954,
1007,
2950,
2128,
10383,
3468,
6177,
2005,
2311,
1998,
8498,
9525,
4773,
4573,
2008,
2024,
7801,
1010,
24013,
1010,
1998,
6970,
25918,
3085,
1012,
2122,
2128,
10383,
3468,
6177,
2024,
2330,
3120,
4007,
1998,
2489,
2005,
2224,
2011,
7640,
1998,
6327,
4773,
4279,
1000,
1013,
1028,
1026,
999,
1011,
1011,
18804,
2951,
1011,
1011,
1028,
1026,
999,
1011,
1011,
30524,
1000,
3746,
1013,
1060,
1011,
12696,
1000,
1013,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
20116,
2015,
1013,
4954,
1011,
8945,
7974,
1012,
20116,
2015,
1000,
1013,
1028,
1026,
999,
1011,
1011,
1026,
999,
1031,
2203,
10128,
1033,
1011,
1011,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
20116,
2015,
1013,
4323,
1012,
20116,
2015,
1000,
1013,
1028,
1026,
999,
1011,
1011,
1031,
2065,
8318,
29464,
1023,
1033,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
7045,
1013,
6904,
7903,
2239,
1012,
24582,
2080,
1000,
2128,
2140,
1027,
1000,
2460,
12690,
12696,
30523,
1031,
2065,
14181,
2063,
29464,
1023,
1064,
999,
29464,
1033,
1028,
1026,
999,
1011,
1011,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
7045,
1013,
6904,
7903,
2239,
1012,
24582,
2080,
1000,
2128,
2140,
1027,
1000,
12696,
1000,
2828,
1027,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1031,
2065,
14181,
2063,
29464,
1023,
1064,
999,
29464,
1033,
1028,
1026,
999,
1011,
1011,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
7045,
1013,
6904,
7903,
2239,
1012,
24582,
2080,
1000,
2128,
2140,
1027,
1000,
12696,
1000,
2828,
1027,
30526
] |
<!DOCTYPE html>
<html ng-app="comparcelTester" ng-controller="AppCtrl">
<head>
<title>Comparcel Regression Tester</title>
<!-- social media tags -->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@comparcel">
<meta name="twitter:title" content="comparcelTester">
<meta name="twitter:description" content="Non-Trivial AngularJS Made Easy: Everything you need to kickstart AngularJS projects: a best-practice directory structure, an intelligent build system, and the best web design libraries around.">
<meta name="twitter:creator" content="@olliemaitland">
<meta name="twitter:image:src" content="https://a248.e.akamai.net/assets.github.com/images/modules/logos_page/Octocat.png?1366128846">
<meta property="og:title" content="Comparcel Regression" />
<meta property="og:type" content="website" />
<meta property="og:url" content="http://comparcel.com" />
<meta property="og:image" content="https://a248.e.akamai.net/assets.github.com/images/modules/logos_page/Octocat.png?1366128846" />
<meta property="og:description" content="Non-Trivial AngularJS Made Easy: Everything you need to kickstart AngularJS projects: a best-practice directory structure, an intelligent build system, and the best web design libraries around.">
<!-- font awesome from BootstrapCDN -->
<link href="http://netdna.bootstrapcdn.com/font-awesome/3.2.1/css/font-awesome.css" rel="stylesheet">
<!-- compiled CSS --><% styles.forEach( function ( file ) { %>
<link rel="stylesheet" type="text/css" href="<%= file %>" /><% }); %>
<!--[if IE 7>
<link rel="stylesheet" href="assets/font-awesome-ie7.min.css />
<![endif]-->
<!-- compiled CSS --><% scripts.forEach( function ( file ) { %>
<script type="text/javascript" src="<%= file %>"></script><% }); %>
<!-- it's stupid to have to load it here, but this is for the +1 button -->
<script type="text/javascript" src="https://apis.google.com/js/plusone.js">
{ "parsetags": "explicit" }
</script>
</head>
<body>
<div class="container">
<div class="masthead">
<h3 class="muted">Regression tester for Comparcel<small><a
href="http://comparcel.com">v<%= version %></a></small></h3>
<div class="navbar">
<div class="navbar-inner">
<div class="container">
<ul class="nav">
<li ui-route="/home" ng-class="{active:$uiRoute}">
<a href="#/home">
<i class="icon-home"></i>
Run
</a>
</li>
<li ui-route="/payload" ng-class="{active:$uiRoute}">
<a href="#/payload">
<i class="icon-settings"></i>
Payload
</a>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="container" ui-view="main"></div>
<footer class="footer">
<div class="container">
<div class="footer-inner">
<ul class="social">
<li><a target="_blank" href="http://twitter.com/olliemaitland"><i class="icon-twitter-sign"></i></a></li>
<li><a target="_blank" href="http://linkedin.com/in/olliemaitland"><i class="icon-linkedin-sign"></i></a></li>
</ul>
<p>
(c) 2013 Comparcel Limited.
<br />
regression tester is based on
<a href="http://github.com/joshdmiller/ng-boilerplate">ng-Boilerplate</a>,
<a href="http://www.angularjs.org">AngularJS</a>,
<a href="http://getbootstrap.com">Bootstrap</a>,
<a href="http://angular-ui.github.com/bootstrap">UI Bootstrap</a>,
and
<a href="http://fortawesome.github.com/Font-Awesome">Font Awesome</a>.
</p>
</div>
</div>
</footer>
</body>
</html>
|
olliemaitland/comparcel-regression
|
src/index.html
|
HTML
|
mit
| 3,975
|
[
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
12835,
1011,
10439,
1027,
30524,
6593,
12190,
1000,
1028,
1026,
2132,
1028,
1026,
2516,
1028,
4012,
19362,
29109,
26237,
3231,
2121,
1026,
1013,
2516,
1028,
1026,
999,
1011,
1011,
2591,
2865,
22073,
1011,
1011,
1028,
1026,
18804,
2171,
1027,
1000,
10474,
1024,
4003,
1000,
4180,
1027,
1000,
12654,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
10474,
1024,
2609,
1000,
4180,
1027,
1000,
1030,
4012,
19362,
29109,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
10474,
1024,
2516,
1000,
4180,
1027,
1000,
4012,
19362,
29109,
22199,
2121,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
10474,
1024,
6412,
1000,
4180,
1027,
1000,
2512,
1011,
20610,
16108,
22578,
2081,
3733,
1024,
2673,
2017,
2342,
2000,
14590,
7559,
2102,
16108,
22578,
3934,
1024,
1037,
2190,
1011,
3218,
14176,
3252,
1010,
2019,
9414,
3857,
2291,
1010,
1998,
1996,
2190,
4773,
2640,
8860,
2105,
1012,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
10474,
1024,
8543,
1000,
4180,
1027,
1000,
1030,
25208,
2863,
4183,
3122,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
10474,
1024,
3746,
1024,
5034,
2278,
1000,
4180,
1027,
1000,
16770,
1024,
1013,
1013,
22441,
18139,
1012,
1041,
1012,
9875,
2863,
2072,
1012,
5658,
1013,
7045,
1012,
21025,
2705,
12083,
1012,
4012,
1013,
4871,
1013,
14184,
1013,
25571,
1035,
3931,
1013,
13323,
24755,
2102,
1012,
1052,
3070,
1029,
15407,
2575,
12521,
2620,
2620,
21472,
1000,
1028,
1026,
18804,
3200,
1027,
1000,
13958,
1024,
2516,
1000,
4180,
1027,
1000,
4012,
19362,
29109,
26237,
1000,
1013,
1028,
1026,
18804,
3200,
1027,
1000,
13958,
1024,
2828,
1000,
4180,
1027,
1000,
4037,
1000,
1013,
1028,
1026,
18804,
3200,
1027,
1000,
13958,
1024,
24471,
2140,
1000,
4180,
1027,
1000,
8299,
1024,
1013,
1013,
4012,
19362,
29109,
1012,
4012,
1000,
1013,
1028,
1026,
18804,
3200,
1027,
1000,
13958,
1024,
3746,
1000,
4180,
1027,
1000,
16770,
1024,
1013,
1013,
22441,
18139,
1012,
1041,
1012,
9875,
2863,
2072,
1012,
5658,
1013,
7045,
1012,
21025,
2705,
12083,
1012,
4012,
1013,
4871,
1013,
14184,
1013,
25571,
1035,
3931,
1013,
13323,
24755,
2102,
1012,
1052,
3070,
1029,
15407,
2575,
12521,
2620,
2620,
21472,
1000,
1013,
1028,
1026,
18804,
3200,
1027,
1000,
13958,
1024,
6412,
1000,
4180,
1027,
1000,
2512,
1011,
20610,
16108,
22578,
2081,
3733,
1024,
2673,
2017,
2342,
2000,
14590,
7559,
2102,
16108,
22578,
3934,
1024,
1037,
2190,
1011,
3218,
14176,
3252,
1010,
2019,
9414,
3857,
2291,
1010,
1998,
1996,
2190,
4773,
2640,
8860,
2105,
1012,
1000,
1028,
1026,
999,
1011,
1011,
15489,
12476,
2013,
6879,
6494,
15042,
2094,
2078,
1011,
1011,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
8299,
1024,
1013,
1013,
5658,
28911,
1012,
6879,
6494,
15042,
2094,
2078,
1012,
4012,
1013,
15489,
1011,
12476,
1013,
1017,
1012,
1016,
1012,
1015,
1013,
20116,
2015,
1013,
15489,
1011,
12476,
1012,
20116,
2015,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
1028,
1026,
999,
1011,
1011,
9227,
20116,
2015,
1011,
1011,
1028,
1026,
1003,
6782,
1012,
18921,
6776,
1006,
3853,
1006,
5371,
1007,
30523,
1000,
4012,
19362,
29109,
22199,
2121,
1000,
12835,
1011,
11486,
1027,
1000,
10439,
30526
] |
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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1000,
4012,
19362,
29109,
22199,
2121,
1000,
12835,
1011,
11486,
1027,
1000,
10439,
30526
] |
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Struct template impl</title>
<link rel="stylesheet" href="../../../../../doc/src/boostbook.css" type="text/css">
<meta name="generator" content="DocBook XSL Stylesheets V1.79.1">
<link rel="home" href="../../../index.html" title="The Boost C++ Libraries BoostBook Documentation Subset">
<link rel="up" href="../fold.html#id-1.3.34.5.47.4.4" title="Description">
<link rel="prev" href="../fold.html" title="Struct template fold">
<link rel="next" href="../reverse_fold.html" title="Struct template reverse_fold">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table cellpadding="2" width="100%"><tr>
<td valign="top"><img alt="Boost C++ Libraries" width="277" height="86" src="../../../../../boost.png"></td>
<td align="center"><a href="../../../../../index.html">Home</a></td>
<td align="center"><a href="../../../../../libs/libraries.htm">Libraries</a></td>
<td align="center"><a href="http://www.boost.org/users/people.html">People</a></td>
<td align="center"><a href="http://www.boost.org/users/faq.html">FAQ</a></td>
<td align="center"><a href="../../../../../more/index.htm">More</a></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../fold.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../fold.html#id-1.3.34.5.47.4.4"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../reverse_fold.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
<div class="refentry">
<a name="boost.proto.fold.impl"></a><div class="titlepage"></div>
<div class="refnamediv">
<h2><span class="refentrytitle">Struct template impl</span></h2>
<p>boost::proto::fold::impl</p>
</div>
<h2 xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv-title">Synopsis</h2>
<div xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" class="refsynopsisdiv"><pre class="synopsis"><span class="comment">// In header: <<a class="link" href="../../../proto/reference.html#header.boost.proto.transform.fold_hpp" title="Header <boost/proto/transform/fold.hpp>">boost/proto/transform/fold.hpp</a>>
</span>
<span class="keyword">template</span><span class="special"><</span><span class="keyword">typename</span> <a class="link" href="../../../Expr.html" title="Concept Expr">Expr</a><span class="special">,</span> <span class="keyword">typename</span> State<span class="special">,</span> <span class="keyword">typename</span> Data<span class="special">></span>
<span class="keyword">struct</span> <a class="link" href="impl.html" title="Struct template impl">impl</a> <span class="special">:</span> <span class="keyword"></span> <a class="link" href="../transform_impl.html" title="Struct template transform_impl">proto::transform_impl</a><span class="special"><</span> <span class="identifier">Expr</span><span class="special">,</span> <span class="identifier">State</span><span class="special">,</span> <span class="identifier">Data</span> <span class="special">></span> <span class="special">{</span>
<span class="comment">// types</span>
<span class="keyword">typedef</span> <a class="link" href="../when.html" title="Struct template when">when</a><span class="special"><</span><a class="link" href="../_.html" title="Struct _">_</a><span class="special">,</span> <span class="identifier">Sequence</span><span class="special">></span> <a name="boost.proto.fold.impl.X"></a><span class="identifier">X</span><span class="special">;</span> <span class="comment">// For exposition only</span>
<span class="keyword">typedef</span> <a class="link" href="../when.html" title="Struct template when">when</a><span class="special"><</span><a class="link" href="../_.html" title="Struct _">_</a><span class="special">,</span> <span class="identifier">State0</span><span class="special">></span> <a name="boost.proto.fold.impl.Y"></a><span class="identifier">Y</span><span class="special">;</span> <span class="comment">// For exposition only</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span><span class="special"><</span><span class="identifier">X</span><span class="special">(</span><span class="identifier">Expr</span><span class="special">,</span> <span class="identifier">State</span><span class="special">,</span> <span class="identifier">Data</span><span class="special">)</span><span class="special">></span><span class="special">::</span><span class="identifier">type</span> <a name="boost.proto.fold.impl.seq"></a><span class="identifier">seq</span><span class="special">;</span> <span class="comment">// A Fusion sequence, for exposition only</span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">boost</span><span class="special">::</span><span class="identifier">result_of</span><span class="special"><</span><span class="identifier">Y</span><span class="special">(</span><span class="identifier">Expr</span><span class="special">,</span> <span class="identifier">State</span><span class="special">,</span> <span class="identifier">Data</span><span class="special">)</span><span class="special">></span><span class="special">::</span><span class="identifier">type</span> <a name="boost.proto.fold.impl.state0"></a><span class="identifier">state0</span><span class="special">;</span> <span class="comment">// An initial state for the fold, for exposition only</span>
<span class="keyword">typedef</span> <span class="emphasis"><em><span class="identifier">unspecified</span></em></span> <a name="boost.proto.fold.impl.fun"></a><span class="identifier">fun</span><span class="special">;</span> <span class="comment">// <code class="computeroutput">fun(d)(s,e) == when<_,Fun>()(e,s,d)</code></span>
<span class="keyword">typedef</span> <span class="keyword">typename</span> <span class="identifier">fusion</span><span class="special">::</span><span class="identifier">result_of</span><span class="special">::</span><span class="identifier">fold</span><span class="special"><</span><span class="identifier">seq</span><span class="special">,</span> <span class="identifier">state0</span><span class="special">,</span> <span class="identifier">fun</span><span class="special">></span><span class="special">::</span><span class="identifier">type</span> <a name="boost.proto.fold.impl.result_type"></a><span class="identifier">result_type</span><span class="special">;</span>
<span class="comment">// <a class="link" href="impl.html#id-1_3_34_5_45_2_1_1_5_9-bb">public member functions</a></span>
<span class="identifier">result_type</span> <a class="link" href="impl.html#id-1_3_34_5_45_2_1_1_5_9_1-bb"><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span></a><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">impl</span><span class="special">::</span><span class="identifier">expr_param</span><span class="special">,</span>
<span class="keyword">typename</span> <span class="identifier">impl</span><span class="special">::</span><span class="identifier">state_param</span><span class="special">,</span>
<span class="keyword">typename</span> <span class="identifier">impl</span><span class="special">::</span><span class="identifier">data_param</span><span class="special">)</span> <span class="keyword">const</span><span class="special">;</span>
<span class="special">}</span><span class="special">;</span></pre></div>
<div class="refsect1">
<a name="id-1.3.34.5.47.4.4.3.4"></a><h2>Description</h2>
<div class="refsect2">
<a name="id-1.3.34.5.47.4.4.3.4.2"></a><h3>
<a name="id-1_3_34_5_45_2_1_1_5_9-bb"></a><code class="computeroutput">impl</code> public member functions</h3>
<div class="orderedlist"><ol class="orderedlist" type="1"><li class="listitem">
<pre class="literallayout"><span class="identifier">result_type</span> <a name="id-1_3_34_5_45_2_1_1_5_9_1-bb"></a><span class="keyword">operator</span><span class="special">(</span><span class="special">)</span><span class="special">(</span><span class="keyword">typename</span> <span class="identifier">impl</span><span class="special">::</span><span class="identifier">expr_param</span> expr<span class="special">,</span>
<span class="keyword">typename</span> <span class="identifier">impl</span><span class="special">::</span><span class="identifier">state_param</span> state<span class="special">,</span>
<span class="keyword">typename</span> <span class="identifier">impl</span><span class="special">::</span><span class="identifier">data_param</span> data<span class="special">)</span> <span class="keyword">const</span><span class="special">;</span></pre>
<p>
Let <code class="computeroutput">seq</code> be
<code class="computeroutput"><code class="computeroutput"><a class="link" href="../when.html" title="Struct template when">when</a></code><<code class="computeroutput"><a class="link" href="../_.html" title="Struct _">_</a></code>, Sequence>()(expr, state, data)</code>,
let <code class="computeroutput">state0</code> be
<code class="computeroutput"><code class="computeroutput"><a class="link" href="../when.html" title="Struct template when">when</a></code><<code class="computeroutput"><a class="link" href="../_.html" title="Struct _">_</a></code>, State0>()(expr, state, data)</code>,
and let <code class="computeroutput">fun(data)</code> be an object such that
<code class="computeroutput">fun(data)(state, expr)</code> is equivalent to
<code class="computeroutput"><code class="computeroutput"><a class="link" href="../when.html" title="Struct template when">when</a></code><<code class="computeroutput"><a class="link" href="../_.html" title="Struct _">_</a></code>, Fun>()(expr, state, data)</code>. Then,
this function returns <code class="computeroutput">fusion::fold(seq, state0, fun(data))</code>.
</p>
<div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody><tr>
<td><p><span class="term">Parameters:</span></p></td>
<td><div class="variablelist"><table border="0" class="variablelist compact">
<colgroup>
<col align="left" valign="top">
<col>
</colgroup>
<tbody>
<tr>
<td><p><span class="term"><code class="computeroutput">data</code></span></p></td>
<td><p>An arbitrary data </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">expr</code></span></p></td>
<td><p>The current expression </p></td>
</tr>
<tr>
<td><p><span class="term"><code class="computeroutput">state</code></span></p></td>
<td><p>The current state </p></td>
</tr>
</tbody>
</table></div></td>
</tr></tbody>
</table></div>
</li></ol></div>
</div>
</div>
</div>
<table xmlns:rev="http://www.cs.rpi.edu/~gregod/boost/tools/doc/revision" width="100%"><tr>
<td align="left"></td>
<td align="right"><div class="copyright-footer">Copyright © 2008 Eric Niebler<p>
Distributed under the Boost Software License, Version 1.0. (See accompanying
file LICENSE_1_0.txt or copy at <a href="http://www.boost.org/LICENSE_1_0.txt" target="_top">http://www.boost.org/LICENSE_1_0.txt</a>)
</p>
</div></td>
</tr></table>
<hr>
<div class="spirit-nav">
<a accesskey="p" href="../fold.html"><img src="../../../../../doc/src/images/prev.png" alt="Prev"></a><a accesskey="u" href="../fold.html#id-1.3.34.5.47.4.4"><img src="../../../../../doc/src/images/up.png" alt="Up"></a><a accesskey="h" href="../../../index.html"><img src="../../../../../doc/src/images/home.png" alt="Home"></a><a accesskey="n" href="../reverse_fold.html"><img src="../../../../../doc/src/images/next.png" alt="Next"></a>
</div>
</body>
</html>
|
davehorton/drachtio-server
|
deps/boost_1_77_0/doc/html/boost/proto/fold/impl.html
|
HTML
|
mit
| 12,581
|
[
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
16129,
1018,
1012,
5890,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
19817,
1013,
16129,
2549,
1013,
6065,
1012,
26718,
2094,
1000,
1028,
1026,
16129,
1028,
1026,
2132,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
4180,
1011,
2828,
1000,
4180,
1027,
1000,
3793,
1013,
16129,
1025,
25869,
13462,
1027,
21183,
2546,
1011,
1022,
1000,
1028,
1026,
2516,
1028,
2358,
6820,
6593,
23561,
17727,
2140,
1026,
1013,
2516,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
9986,
1013,
5034,
2278,
1013,
12992,
8654,
1012,
20116,
2015,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
13103,
1000,
4180,
1027,
1000,
9986,
8654,
1060,
14540,
6782,
21030,
3215,
1058,
2487,
1012,
6535,
1012,
1015,
1000,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
2188,
1000,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
5950,
1012,
16129,
1000,
2516,
1027,
1000,
1996,
12992,
1039,
1009,
1009,
8860,
12992,
8654,
12653,
16745,
1000,
1028,
1026,
4957,
30524,
8909,
1011,
1015,
1012,
1017,
1012,
4090,
1012,
1019,
1012,
4700,
1012,
1018,
1012,
1018,
1000,
2516,
1027,
1000,
6412,
1000,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
3653,
2615,
1000,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
10671,
1012,
16129,
1000,
2516,
1027,
1000,
2358,
6820,
6593,
23561,
10671,
1000,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
2279,
1000,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
7901,
1035,
10671,
1012,
16129,
1000,
2516,
1027,
1000,
2358,
6820,
6593,
23561,
7901,
1035,
10671,
1000,
1028,
1026,
1013,
2132,
1028,
1026,
2303,
1038,
18195,
12898,
2099,
1027,
1000,
2317,
1000,
3793,
1027,
1000,
2304,
1000,
4957,
1027,
1000,
1001,
2199,
2692,
4246,
1000,
1058,
13767,
1027,
1000,
1001,
28122,
2692,
2620,
2549,
1000,
4862,
8950,
1027,
1000,
1001,
2199,
2692,
4246,
1000,
1028,
1026,
2795,
3526,
15455,
4667,
1027,
1000,
1016,
1000,
9381,
1027,
1000,
2531,
1003,
1000,
1028,
1026,
19817,
1028,
1026,
14595,
11748,
23773,
1027,
1000,
2327,
1000,
1028,
1026,
10047,
2290,
12456,
1027,
1000,
12992,
1039,
1009,
1009,
8860,
1000,
9381,
1027,
1000,
25578,
1000,
4578,
1027,
1000,
6564,
1000,
5034,
2278,
1027,
1000,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
12992,
1012,
1052,
3070,
1000,
1028,
1026,
1013,
14595,
1028,
1026,
14595,
25705,
1027,
1000,
2415,
1000,
1028,
1026,
1037,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
5950,
1012,
16129,
1000,
1028,
2188,
1026,
1013,
1037,
1028,
1026,
1013,
14595,
1028,
1026,
14595,
25705,
1027,
1000,
2415,
1000,
1028,
1026,
1037,
17850,
12879,
1027,
1000,
30523,
2128,
2140,
1027,
1000,
2039,
1000,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
10671,
1012,
16129,
1001,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2128,
2140,
1027,
1000,
2039,
1000,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
10671,
1012,
16129,
1001,
30526
] |
#!/usr/bin/env python3
# Copyright (c) 2014-2018 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test mempool persistence.
By default, bitcoind will dump mempool on shutdown and
then reload it on startup. This can be overridden with
the -persistmempool=0 command line option.
Test is as follows:
- start node0, node1 and node2. node1 has -persistmempool=0
- create 5 transactions on node2 to its own address. Note that these
are not sent to node0 or node1 addresses because we don't want
them to be saved in the wallet.
- check that node0 and node1 have 5 transactions in their mempools
- shutdown all nodes.
- startup node0. Verify that it still has 5 transactions
in its mempool. Shutdown node0. This tests that by default the
mempool is persistent.
- startup node1. Verify that its mempool is empty. Shutdown node1.
This tests that with -persistmempool=0, the mempool is not
dumped to disk when the node is shut down.
- Restart node0 with -persistmempool=0. Verify that its mempool is
empty. Shutdown node0. This tests that with -persistmempool=0,
the mempool is not loaded from disk on start up.
- Restart node0 with -persistmempool. Verify that it has 5
transactions in its mempool. This tests that -persistmempool=0
does not overwrite a previously valid mempool stored on disk.
- Remove node0 mempool.dat and verify savemempool RPC recreates it
and verify that node1 can load it and has 5 transactions in its
mempool.
- Verify that savemempool throws when the RPC is called if
node1 can't write to disk.
"""
from decimal import Decimal
import os
import time
from test_framework.test_framework import BitcoinTestFramework
from test_framework.util import (
assert_equal,
assert_greater_than_or_equal,
assert_raises_rpc_error,
wait_until,
)
class MempoolPersistTest(BitcoinTestFramework):
def set_test_params(self):
self.num_nodes = 3
self.extra_args = [[], ["-persistmempool=0"], []]
def skip_test_if_missing_module(self):
self.skip_if_no_wallet()
def run_test(self):
self.log.debug("Send 5 transactions from node2 (to its own address)")
tx_creation_time_lower = int(time.time())
for i in range(5):
last_txid = self.nodes[2].sendtoaddress(self.nodes[2].getnewaddress(), Decimal("10"))
node2_balance = self.nodes[2].getbalance()
self.sync_all()
tx_creation_time_higher = int(time.time())
self.log.debug("Verify that node0 and node1 have 5 transactions in their mempools")
assert_equal(len(self.nodes[0].getrawmempool()), 5)
assert_equal(len(self.nodes[1].getrawmempool()), 5)
self.log.debug("Prioritize a transaction on node0")
fees = self.nodes[0].getmempoolentry(txid=last_txid)['fees']
assert_equal(fees['base'], fees['modified'])
self.nodes[0].prioritisetransaction(txid=last_txid, fee_delta=1000)
fees = self.nodes[0].getmempoolentry(txid=last_txid)['fees']
assert_equal(fees['base'] + Decimal('0.00001000'), fees['modified'])
tx_creation_time = self.nodes[0].getmempoolentry(txid=last_txid)['time']
assert_greater_than_or_equal(tx_creation_time, tx_creation_time_lower)
assert_greater_than_or_equal(tx_creation_time_higher, tx_creation_time)
self.log.debug("Stop-start the nodes. Verify that node0 has the transactions in its mempool and node1 does not. Verify that node2 calculates its balance correctly after loading wallet transactions.")
self.stop_nodes()
# Give this node a head-start, so we can be "extra-sure" that it didn't load anything later
# Also don't store the mempool, to keep the datadir clean
self.start_node(1, extra_args=["-persistmempool=0"])
self.start_node(0)
self.start_node(2)
wait_until(lambda: self.nodes[0].getmempoolinfo()["loaded"], timeout=1)
wait_until(lambda: self.nodes[2].getmempoolinfo()["loaded"], timeout=1)
assert_equal(len(self.nodes[0].getrawmempool()), 5)
assert_equal(len(self.nodes[2].getrawmempool()), 5)
# The others have loaded their mempool. If node_1 loaded anything, we'd probably notice by now:
assert_equal(len(self.nodes[1].getrawmempool()), 0)
self.log.debug('Verify prioritization is loaded correctly')
fees = self.nodes[0].getmempoolentry(txid=last_txid)['fees']
assert_equal(fees['base'] + Decimal('0.00001000'), fees['modified'])
self.log.debug('Verify time is loaded correctly')
assert_equal(tx_creation_time, self.nodes[0].getmempoolentry(txid=last_txid)['time'])
# Verify accounting of mempool transactions after restart is correct
self.nodes[2].syncwithvalidationinterfacequeue() # Flush mempool to wallet
assert_equal(node2_balance, self.nodes[2].getbalance())
self.log.debug("Stop-start node0 with -persistmempool=0. Verify that it doesn't load its mempool.dat file.")
self.stop_nodes()
self.start_node(0, extra_args=["-persistmempool=0"])
wait_until(lambda: self.nodes[0].getmempoolinfo()["loaded"])
assert_equal(len(self.nodes[0].getrawmempool()), 0)
self.log.debug("Stop-start node0. Verify that it has the transactions in its mempool.")
self.stop_nodes()
self.start_node(0)
wait_until(lambda: self.nodes[0].getmempoolinfo()["loaded"])
assert_equal(len(self.nodes[0].getrawmempool()), 5)
mempooldat0 = os.path.join(self.nodes[0].datadir, 'regtest', 'mempool.dat')
mempooldat1 = os.path.join(self.nodes[1].datadir, 'regtest', 'mempool.dat')
self.log.debug("Remove the mempool.dat file. Verify that savemempool to disk via RPC re-creates it")
os.remove(mempooldat0)
self.nodes[0].savemempool()
assert os.path.isfile(mempooldat0)
self.log.debug("Stop nodes, make node1 use mempool.dat from node0. Verify it has 5 transactions")
os.rename(mempooldat0, mempooldat1)
self.stop_nodes()
self.start_node(1, extra_args=[])
wait_until(lambda: self.nodes[1].getmempoolinfo()["loaded"])
assert_equal(len(self.nodes[1].getrawmempool()), 5)
self.log.debug("Prevent bitcoind from writing mempool.dat to disk. Verify that `savemempool` fails")
# to test the exception we are creating a tmp folder called mempool.dat.new
# which is an implementation detail that could change and break this test
mempooldotnew1 = mempooldat1 + '.new'
os.mkdir(mempooldotnew1)
assert_raises_rpc_error(-1, "Unable to dump mempool to disk", self.nodes[1].savemempool)
os.rmdir(mempooldotnew1)
if __name__ == '__main__':
MempoolPersistTest().main()
|
tjps/bitcoin
|
test/functional/mempool_persist.py
|
Python
|
mit
| 6,912
|
[
30522,
1001,
999,
1013,
2149,
2099,
1013,
8026,
1013,
4372,
2615,
18750,
2509,
1001,
9385,
1006,
1039,
1007,
2297,
1011,
2760,
1996,
2978,
3597,
2378,
4563,
9797,
1001,
5500,
2104,
1996,
10210,
4007,
6105,
1010,
2156,
1996,
10860,
1001,
5371,
24731,
2030,
8299,
1024,
1013,
1013,
7479,
1012,
7480,
8162,
3401,
1012,
8917,
1013,
15943,
1013,
10210,
1011,
6105,
1012,
25718,
1012,
1000,
1000,
1000,
3231,
2033,
8737,
13669,
28297,
1012,
2011,
12398,
1010,
2978,
3597,
22254,
2097,
15653,
2033,
8737,
13669,
2006,
3844,
7698,
1998,
2059,
2128,
11066,
2009,
2006,
22752,
1012,
2023,
2064,
2022,
2058,
14615,
4181,
2007,
1996,
1011,
29486,
4168,
8737,
13669,
1027,
1014,
3094,
2240,
5724,
1012,
3231,
2003,
2004,
4076,
1024,
1011,
2707,
13045,
2692,
1010,
13045,
2487,
1998,
13045,
2475,
1012,
13045,
2487,
2038,
1011,
29486,
4168,
8737,
13669,
1027,
1014,
1011,
3443,
1019,
11817,
2006,
13045,
2475,
2000,
2049,
2219,
4769,
1012,
3602,
2008,
2122,
2024,
2025,
2741,
2000,
13045,
2692,
2030,
13045,
2487,
11596,
2138,
2057,
2123,
1005,
1056,
2215,
2068,
2000,
2022,
5552,
1999,
1996,
15882,
1012,
1011,
4638,
2008,
13045,
2692,
1998,
13045,
2487,
2031,
1019,
11817,
1999,
2037,
2033,
8737,
13669,
2015,
30524,
14516,
1012,
1011,
22752,
13045,
2487,
1012,
20410,
2008,
2049,
2033,
8737,
13669,
2003,
4064,
1012,
3844,
7698,
13045,
2487,
1012,
2023,
5852,
2008,
2007,
1011,
29486,
4168,
8737,
13669,
1027,
1014,
1010,
1996,
2033,
8737,
13669,
2003,
2025,
14019,
2000,
9785,
2043,
1996,
13045,
2003,
3844,
2091,
1012,
1011,
23818,
13045,
2692,
2007,
1011,
29486,
4168,
8737,
13669,
1027,
1014,
1012,
20410,
2008,
2049,
2033,
8737,
13669,
2003,
4064,
1012,
3844,
7698,
13045,
2692,
1012,
2023,
5852,
2008,
2007,
1011,
29486,
4168,
8737,
13669,
1027,
1014,
1010,
1996,
2033,
8737,
13669,
2003,
2025,
8209,
2013,
9785,
2006,
2707,
2039,
1012,
1011,
23818,
13045,
2692,
2007,
1011,
29486,
4168,
8737,
13669,
1012,
20410,
2008,
2009,
2038,
1019,
11817,
1999,
2049,
2033,
8737,
13669,
1012,
2023,
5852,
2008,
1011,
29486,
4168,
8737,
13669,
1027,
1014,
2515,
2025,
2058,
26373,
1037,
3130,
9398,
2033,
8737,
13669,
8250,
2006,
9785,
1012,
1011,
6366,
13045,
2692,
2033,
8737,
13669,
1012,
23755,
1998,
20410,
3828,
4168,
8737,
13669,
1054,
15042,
28667,
29313,
2015,
2009,
1998,
20410,
2008,
13045,
2487,
2064,
7170,
2009,
1998,
2038,
1019,
11817,
1999,
2049,
2033,
8737,
13669,
1012,
1011,
20410,
2008,
3828,
4168,
8737,
13669,
11618,
2043,
1996,
1054,
15042,
2003,
2170,
2065,
13045,
2487,
2064,
1005,
1056,
4339,
2000,
9785,
1012,
1000,
1000,
1000,
2013,
26066,
12324,
26066,
12324,
9808,
12324,
2051,
2013,
3231,
1035,
7705,
1012,
3231,
1035,
7705,
12324,
2978,
3597,
18447,
4355,
15643,
6198,
2013,
3231,
1035,
7705,
1012,
21183,
4014,
12324,
1006,
20865,
1035,
5020,
1010,
20865,
1035,
3618,
1035,
2084,
1035,
2030,
1035,
5020,
1010,
20865,
1035,
13275,
1035,
1054,
15042,
30523,
1011,
3844,
7698,
2035,
14164,
1012,
1011,
22752,
13045,
2692,
1012,
20410,
2008,
2009,
2145,
2038,
1019,
11817,
1999,
2049,
2033,
8737,
13669,
1012,
3844,
7698,
13045,
2692,
1012,
2023,
5852,
2008,
2011,
12398,
1996,
2033,
8737,
13669,
2003,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1011,
3844,
7698,
2035,
14164,
1012,
1011,
22752,
13045,
2692,
1012,
20410,
2008,
2009,
2145,
2038,
1019,
11817,
1999,
2049,
2033,
8737,
13669,
1012,
3844,
7698,
13045,
2692,
1012,
2023,
5852,
2008,
2011,
12398,
1996,
2033,
8737,
13669,
2003,
30526
] |
//
// Copyright (C) 2007-2008 Sebastian Kuzminsky
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
#define HM2_SOCFPGA_VERSION "0.9"
#define HM2_LLIO_NAME "hm2_soc_ol"
#define HM2_SOC_MAX_BOARDS 2
typedef struct {
hal_u32_t *irq_count;
hal_u32_t *irq_missed;
hal_u32_t *read_errors;
hal_u32_t *write_errors;
} hm2_soc_pins_t;
typedef struct {
int fpga_state;
int uio_fd;
int firmware_given;
const char *name;
const char *uio_dev;
void __iomem *base;
int len;
unsigned long ctrl_base_addr;
unsigned long data_base_addr;
char *firmware;
hm2_lowlevel_io_t llio;
hm2_soc_pins_t *pins;
} hm2_soc_t;
struct compatible {
char vendor[32];
char name[32];
};
struct dts_device_id {
unsigned short address_width; //address width /
unsigned short clocks; // clocks /
struct compatible compatible;
unsigned short data_width; /* (class,subclass,prog-if) triplet */
char name[32];
unsigned long reg[3];
};
|
araisrobo/machinekit
|
src/hal/drivers/mesa-hostmot2/hm2_soc_ol.h
|
C
|
lgpl-2.1
| 1,736
|
[
30522,
1013,
1013,
1013,
1013,
9385,
1006,
1039,
1007,
2289,
1011,
2263,
6417,
13970,
2480,
21266,
4801,
1013,
1013,
1013,
1013,
2023,
2565,
2003,
2489,
4007,
1025,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
2009,
1998,
1013,
2030,
19933,
1013,
1013,
2009,
2104,
1996,
3408,
1997,
1996,
27004,
2236,
2270,
6105,
2004,
2405,
2011,
30524,
1013,
2021,
2302,
2151,
10943,
2100,
1025,
2302,
2130,
1996,
13339,
10943,
2100,
1997,
1013,
1013,
6432,
8010,
2030,
10516,
2005,
1037,
3327,
3800,
1012,
2156,
1996,
1013,
1013,
27004,
2236,
2270,
6105,
2005,
2062,
4751,
1012,
1013,
1013,
1013,
1013,
2017,
2323,
2031,
2363,
1037,
6100,
1997,
1996,
27004,
2236,
2270,
6105,
1013,
1013,
2247,
2007,
2023,
2565,
1025,
2065,
2025,
1010,
4339,
2000,
1996,
2489,
4007,
1013,
1013,
3192,
1010,
4297,
1012,
1010,
4868,
5951,
2358,
1010,
3587,
2723,
1010,
3731,
1010,
5003,
6185,
14526,
2692,
1011,
7558,
2487,
3915,
1013,
1013,
1001,
9375,
20287,
2475,
1035,
27084,
22540,
3654,
1035,
2544,
1000,
1014,
1012,
1023,
1000,
1001,
9375,
20287,
2475,
1035,
2222,
3695,
1035,
2171,
1000,
20287,
2475,
1035,
27084,
1035,
19330,
1000,
1001,
9375,
20287,
2475,
1035,
27084,
1035,
4098,
1035,
7923,
1016,
21189,
12879,
2358,
6820,
6593,
1063,
11085,
1035,
1057,
16703,
1035,
1056,
1008,
20868,
4160,
1035,
4175,
1025,
11085,
1035,
1057,
16703,
1035,
1056,
1008,
20868,
4160,
1035,
4771,
1025,
11085,
1035,
1057,
16703,
1035,
1056,
1008,
3191,
1035,
10697,
1025,
11085,
1035,
1057,
16703,
1035,
1056,
1008,
4339,
1035,
10697,
1025,
1065,
20287,
2475,
1035,
27084,
1035,
16300,
1035,
1056,
1025,
21189,
12879,
2358,
6820,
6593,
1063,
20014,
1042,
26952,
2050,
1035,
2110,
1025,
20014,
21318,
2080,
1035,
1042,
2094,
1025,
20014,
3813,
8059,
1035,
2445,
1025,
9530,
3367,
25869,
1008,
2171,
1025,
9530,
3367,
25869,
1008,
21318,
2080,
1035,
16475,
1025,
11675,
1035,
1035,
22834,
4168,
2213,
1008,
2918,
1025,
20014,
18798,
1025,
27121,
2146,
14931,
12190,
1035,
2918,
1035,
5587,
2099,
1025,
27121,
2146,
2951,
1035,
2918,
1035,
5587,
2099,
1025,
25869,
1008,
3813,
8059,
1025,
20287,
2475,
1035,
2659,
20414,
2884,
1035,
22834,
1035,
1056,
2222,
3695,
1025,
20287,
2475,
1035,
27084,
1035,
16300,
1035,
1056,
1008,
16300,
1025,
1065,
20287,
2475,
1035,
27084,
1035,
1056,
1025,
2358,
6820,
6593,
11892,
1063,
25869,
21431,
1031,
3590,
1033,
1025,
25869,
2171,
1031,
3590,
1033,
1025,
1065,
1025,
2358,
6820,
6593,
26718,
2015,
1035,
5080,
1035,
8909,
1063,
27121,
2460,
4769,
1035,
9381,
1025,
1013,
1013,
4769,
9381,
1013,
27121,
2460,
20940,
1025,
1013,
1013,
20940,
1013,
2358,
6820,
6593,
11892,
11892,
1025,
27121,
2460,
2951,
1035,
9381,
1025,
1013,
1008,
1006,
2465,
1010,
4942,
26266,
1010,
4013,
2290,
1011,
2065,
1007,
6420,
2102,
1008,
1013,
25869,
2171,
1031,
3590,
1033,
1025,
27121,
2146,
19723,
1031,
1017,
1033,
1025,
1065,
1025,
102,
30523,
1013,
1013,
1996,
2489,
4007,
3192,
1025,
2593,
2544,
1016,
1997,
1996,
6105,
1010,
2030,
1013,
1013,
1006,
2012,
2115,
5724,
1007,
2151,
2101,
2544,
1012,
1013,
1013,
1013,
1013,
2023,
2565,
2003,
5500,
1999,
1996,
3246,
2008,
2009,
2097,
2022,
6179,
1010,
1013,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1013,
1013,
1996,
2489,
4007,
3192,
1025,
2593,
2544,
1016,
1997,
1996,
6105,
1010,
2030,
1013,
1013,
1006,
2012,
2115,
5724,
1007,
2151,
2101,
2544,
1012,
1013,
1013,
1013,
1013,
2023,
2565,
2003,
5500,
1999,
1996,
3246,
2008,
2009,
2097,
2022,
6179,
1010,
1013,
30526
] |
function foo<T = string>() {}
|
motiz88/astring-flow
|
test/data/roundtrip/flow-parser-tests/test-479.js
|
JavaScript
|
mit
| 29
|
[
30522,
3853,
29379,
1026,
1056,
1027,
5164,
1028,
1006,
1007,
1063,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
// Copyright (c) 2010-2014 SharpDX - Alexandre Mutel
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
using System;
using SharpDX.Mathematics;
using SharpDX.Toolkit.Graphics;
namespace SharpDX.Toolkit
{
/// <summary>
/// A GameSystem that allows to draw to another window or control. Currently only valid on desktop with Windows.Forms.
/// </summary>
public class GameWindowRenderer : GameSystem
{
private PixelFormat preferredBackBufferFormat;
private int preferredBackBufferHeight;
private int preferredBackBufferWidth;
private DepthFormat preferredDepthStencilFormat;
private bool isBackBufferToResize;
private GraphicsPresenter savedPresenter;
private ViewportF savedViewport;
private bool beginDrawOk;
private bool windowUserResized;
/// <summary>
/// Initializes a new instance of the <see cref="GameWindowRenderer" /> class.
/// </summary>
/// <param name="registry">The registry.</param>
/// <param name="gameContext">The window context.</param>
public GameWindowRenderer(IServiceRegistry registry, GameContext gameContext = null)
: base(registry)
{
GameContext = gameContext ?? new GameContext();
}
/// <summary>
/// Initializes a new instance of the <see cref="GameWindowRenderer" /> class.
/// </summary>
/// <param name="game">The game.</param>
/// <param name="gameContext">The window context.</param>
public GameWindowRenderer(Game game, GameContext gameContext = null)
: base(game)
{
GameContext = gameContext ?? new GameContext();
}
/// <summary>
/// Gets the underlying native window.
/// </summary>
/// <value>The underlying native window.</value>
public GameContext GameContext { get; private set; }
/// <summary>
/// Gets the window.
/// </summary>
/// <value>The window.</value>
public GameWindow Window { get; private set; }
/// <summary>
/// Gets or sets the presenter.
/// </summary>
/// <value>The presenter.</value>
public GraphicsPresenter Presenter { get; protected set; }
/// <summary>
/// Gets or sets the preferred back buffer format.
/// </summary>
/// <value>The preferred back buffer format.</value>
public PixelFormat PreferredBackBufferFormat
{
get
{
return preferredBackBufferFormat;
}
set
{
if (preferredBackBufferFormat != value)
{
preferredBackBufferFormat = value;
isBackBufferToResize = true;
}
}
}
/// <summary>
/// Gets or sets the height of the preferred back buffer.
/// </summary>
/// <value>The height of the preferred back buffer.</value>
public int PreferredBackBufferHeight
{
get
{
return preferredBackBufferHeight;
}
set
{
if (preferredBackBufferHeight != value)
{
preferredBackBufferHeight = value;
isBackBufferToResize = true;
}
}
}
/// <summary>
/// Gets or sets the width of the preferred back buffer.
/// </summary>
/// <value>The width of the preferred back buffer.</value>
public int PreferredBackBufferWidth
{
get
{
return preferredBackBufferWidth;
}
set
{
if (preferredBackBufferWidth != value)
{
preferredBackBufferWidth = value;
isBackBufferToResize = true;
}
}
}
/// <summary>
/// Gets or sets the preferred depth stencil format.
/// </summary>
/// <value>The preferred depth stencil format.</value>
public DepthFormat PreferredDepthStencilFormat
{
get
{
return preferredDepthStencilFormat;
}
set
{
preferredDepthStencilFormat = value;
}
}
public override void Initialize()
{
var gamePlatform = (IGamePlatform)this.Services.GetService(typeof(IGamePlatform));
GameContext.RequestedWidth = PreferredBackBufferWidth;
GameContext.RequestedHeight = PreferredBackBufferHeight;
Window = gamePlatform.CreateWindow(GameContext);
Window.Visible = true;
Window.ClientSizeChanged += WindowOnClientSizeChanged;
base.Initialize();
}
private Size2 GetRequestedSize(out PixelFormat format)
{
var bounds = Window.ClientBounds;
format = PreferredBackBufferFormat == PixelFormat.Unknown ? PixelFormat.R8G8B8A8.UNorm : PreferredBackBufferFormat;
return new Size2(
PreferredBackBufferWidth == 0 || windowUserResized ? bounds.Width : PreferredBackBufferWidth,
PreferredBackBufferHeight == 0 || windowUserResized ? bounds.Height : PreferredBackBufferHeight);
}
protected virtual void CreateOrUpdatePresenter()
{
if (Presenter == null)
{
PixelFormat resizeFormat;
var size = GetRequestedSize(out resizeFormat);
var presentationParameters = new PresentationParameters(size.Width, size.Height, Window.NativeWindow, resizeFormat) { DepthStencilFormat = PreferredDepthStencilFormat };
presentationParameters.PresentationInterval = PresentInterval.One;
Presenter = new SwapChainGraphicsPresenter(GraphicsDevice, presentationParameters);
isBackBufferToResize = false;
}
}
public override bool BeginDraw()
{
if (GraphicsDevice != null && Window.Visible)
{
savedPresenter = GraphicsDevice.Presenter;
savedViewport = GraphicsDevice.Viewport;
CreateOrUpdatePresenter();
if (isBackBufferToResize || windowUserResized)
{
PixelFormat resizeFormat;
var size = GetRequestedSize(out resizeFormat);
Presenter.Resize(size.Width, size.Height, resizeFormat);
isBackBufferToResize = false;
windowUserResized = false;
}
GraphicsDevice.Presenter = Presenter;
GraphicsDevice.SetViewport(Presenter.DefaultViewport);
GraphicsDevice.SetRenderTargets(Presenter.DepthStencilBuffer, Presenter.BackBuffer);
beginDrawOk = true;
return true;
}
beginDrawOk = false;
return false;
}
public override void EndDraw()
{
if (beginDrawOk && GraphicsDevice != null)
{
try
{
Presenter.Present();
}
catch (SharpDXException ex)
{
// If this is not a DeviceRemoved or DeviceReset, than throw an exception
if (ex.ResultCode != DXGI.ResultCode.DeviceRemoved && ex.ResultCode != DXGI.ResultCode.DeviceReset)
{
throw;
}
}
if (savedPresenter != null)
{
GraphicsDevice.Presenter = savedPresenter;
GraphicsDevice.SetRenderTargets(savedPresenter.DepthStencilBuffer, savedPresenter.BackBuffer);
GraphicsDevice.SetViewport(savedViewport);
}
}
}
private void WindowOnClientSizeChanged(object sender, EventArgs eventArgs)
{
windowUserResized = true;
}
}
}
|
sharpdx/Toolkit
|
Source/Toolkit/SharpDX.Toolkit.Game/GameWindowRenderer.cs
|
C#
|
mit
| 9,287
|
[
30522,
1013,
1013,
9385,
1006,
1039,
1007,
2230,
1011,
2297,
4629,
2094,
2595,
1011,
16971,
20101,
2140,
1013,
1013,
1013,
1013,
6656,
2003,
2182,
3762,
4379,
1010,
2489,
1997,
3715,
1010,
2000,
2151,
2711,
11381,
1037,
6100,
1013,
1013,
1997,
2023,
4007,
1998,
3378,
12653,
6764,
1006,
1996,
1000,
4007,
1000,
1007,
1010,
2000,
3066,
1013,
1013,
1999,
1996,
4007,
2302,
16840,
1010,
2164,
2302,
22718,
1996,
2916,
1013,
1013,
2000,
2224,
1010,
6100,
1010,
19933,
1010,
13590,
1010,
10172,
1010,
16062,
1010,
4942,
13231,
12325,
30524,
9385,
5060,
1998,
2023,
6656,
5060,
4618,
2022,
2443,
1999,
1013,
1013,
2035,
4809,
2030,
6937,
8810,
1997,
1996,
4007,
1012,
1013,
1013,
1013,
1013,
1996,
4007,
2003,
3024,
1000,
2004,
2003,
1000,
1010,
2302,
10943,
2100,
1997,
2151,
2785,
1010,
4671,
2030,
1013,
1013,
13339,
1010,
2164,
2021,
2025,
3132,
2000,
1996,
10943,
3111,
1997,
6432,
8010,
1010,
1013,
1013,
10516,
2005,
1037,
3327,
3800,
1998,
2512,
2378,
19699,
23496,
3672,
1012,
1999,
2053,
2724,
4618,
1996,
1013,
1013,
6048,
2030,
9385,
13304,
2022,
20090,
2005,
2151,
4366,
1010,
12394,
2030,
2060,
1013,
1013,
14000,
1010,
3251,
1999,
2019,
2895,
1997,
3206,
1010,
17153,
2102,
2030,
4728,
1010,
17707,
2013,
1010,
1013,
1013,
2041,
1997,
2030,
1999,
4434,
2007,
1996,
4007,
2030,
1996,
2224,
2030,
2060,
24069,
1999,
1013,
1013,
1996,
4007,
1012,
2478,
2291,
1025,
2478,
4629,
2094,
2595,
1012,
5597,
1025,
2478,
4629,
2094,
2595,
1012,
6994,
23615,
1012,
8389,
1025,
3415,
15327,
4629,
2094,
2595,
1012,
6994,
23615,
1063,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
1037,
2399,
27268,
6633,
2008,
4473,
2000,
4009,
2000,
2178,
3332,
2030,
2491,
1012,
2747,
2069,
9398,
2006,
15363,
2007,
3645,
1012,
3596,
1012,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
2270,
2465,
2208,
11101,
5004,
7389,
4063,
2121,
1024,
2399,
27268,
6633,
1063,
2797,
22138,
14192,
4017,
6871,
5963,
8569,
12494,
14192,
4017,
1025,
2797,
20014,
6871,
5963,
8569,
12494,
26036,
13900,
1025,
2797,
20014,
6871,
5963,
8569,
12494,
9148,
11927,
2232,
1025,
2797,
5995,
14192,
4017,
6871,
3207,
13876,
7898,
6528,
6895,
10270,
2953,
18900,
1025,
2797,
22017,
2140,
2003,
5963,
8569,
12494,
19277,
5332,
4371,
1025,
2797,
8389,
28994,
29110,
5552,
28994,
29110,
1025,
2797,
3193,
6442,
2546,
5552,
8584,
6442,
1025,
2797,
22017,
2140,
4088,
7265,
12155,
2243,
1025,
2797,
22017,
2140,
3332,
20330,
6072,
3550,
1025,
1013,
1013,
1013,
1026,
12654,
1028,
1013,
1013,
1013,
3988,
10057,
1037,
2047,
6013,
1997,
1996,
1026,
2156,
13675,
12879,
1027,
1000,
2208,
11101,
5004,
7389,
4063,
2121,
1000,
1013,
1028,
2465,
1012,
1013,
1013,
1013,
1026,
1013,
12654,
1028,
1013,
1013,
1013,
1026,
11498,
2213,
2171,
1027,
1000,
15584,
1000,
1028,
1996,
15584,
1012,
1026,
1013,
11498,
2213,
1028,
1013,
1013,
1013,
1026,
11498,
2213,
2171,
1027,
1000,
2208,
30523,
1010,
1998,
1013,
2030,
5271,
1013,
1013,
4809,
1997,
1996,
4007,
1010,
1998,
2000,
9146,
5381,
2000,
3183,
1996,
4007,
2003,
1013,
1013,
19851,
2000,
2079,
2061,
1010,
3395,
2000,
1996,
2206,
3785,
1024,
1013,
1013,
1013,
1013,
1996,
2682,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1010,
1998,
1013,
2030,
5271,
1013,
1013,
4809,
1997,
1996,
4007,
1010,
1998,
2000,
9146,
5381,
2000,
3183,
1996,
4007,
2003,
1013,
1013,
19851,
2000,
2079,
2061,
1010,
3395,
2000,
1996,
2206,
3785,
1024,
1013,
1013,
1013,
1013,
1996,
2682,
30526
] |
/*
* 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.
*/
Ext.define('OPF.console.domain.model.FilestoreModel', {
extend: 'Ext.data.Model',
statics: {
pageSuffixUrl: 'console/domain',
restSuffixUrl: 'registry/filestore',
editorClassName: 'OPF.console.domain.view.system.FilestoreEditor',
constraintName: 'OPF.registry.Filestore'
},
idProperty: 'id',
fields: [
{ name: 'id', type: 'int', useNull: true },
{ name: 'name', type: 'string' },
{ name: 'type', type: 'string' },
{ name: 'path', type: 'string' },
{ name: 'lookup', type: 'string' },
{ name: 'description', type: 'string' },
{ name: 'serverName', type: 'string' },
{ name: 'port', type: 'int', defaultValue: 8080 },
{ name: 'urlPath', type: 'string' },
{ name: 'status', type: 'string' },
{ name: 'serverDirectory', type: 'string' },
{ name: 'parentId', type: 'int' },
{ name: 'childCount', type: 'int' },
{ name: 'created', type: 'int' },
{ name: 'canUpdate', type: 'boolean' },
{ name: 'canDelete', type: 'boolean' }
]
});
|
firejack-open/Firejack-Platform
|
platform/src/main/webapp/js/net/firejack/platform/console/domain/model/FilestoreModel.js
|
JavaScript
|
apache-2.0
| 1,924
|
[
30522,
1013,
1008,
1008,
7000,
2000,
1996,
15895,
4007,
3192,
1006,
2004,
2546,
1007,
2104,
2028,
1008,
2030,
2062,
12130,
6105,
10540,
1012,
2156,
1996,
5060,
5371,
1008,
5500,
2007,
2023,
2147,
2005,
3176,
2592,
1008,
4953,
9385,
6095,
1012,
1996,
2004,
2546,
15943,
2023,
5371,
1008,
2000,
2017,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1008,
1000,
6105,
1000,
1007,
1025,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
1008,
2007,
1996,
6105,
1012,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1008,
1008,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1008,
1008,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
1008,
4007,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
1008,
1000,
2004,
2003,
1000,
3978,
1010,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
1008,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
2156,
1996,
6105,
2005,
1996,
1008,
3563,
2653,
8677,
6656,
2015,
1998,
12546,
1008,
2104,
1996,
6105,
1012,
1008,
1013,
4654,
2102,
1012,
9375,
1006,
1005,
6728,
2546,
1012,
10122,
1012,
5884,
1012,
2944,
1012,
6764,
19277,
5302,
9247,
1005,
1010,
1063,
7949,
1024,
1005,
4654,
2102,
1012,
2951,
1012,
2944,
1005,
1010,
10763,
2015,
1024,
1063,
5530,
16093,
8873,
2595,
3126,
2140,
1024,
1005,
10122,
1013,
5884,
1005,
1010,
16626,
16093,
8873,
2595,
3126,
2140,
1024,
1005,
15584,
1013,
6764,
19277,
1005,
1010,
3559,
26266,
18442,
1024,
1005,
6728,
2546,
1012,
10122,
1012,
5884,
1012,
3193,
1012,
2291,
1012,
6764,
19277,
2098,
15660,
1005,
1010,
27142,
18442,
1024,
1005,
6728,
2546,
1012,
15584,
1012,
6764,
19277,
1005,
1065,
1010,
8909,
21572,
4842,
3723,
1024,
1005,
8909,
1005,
1010,
4249,
1024,
1031,
1063,
2171,
1024,
1005,
8909,
1005,
1010,
2828,
1024,
1005,
20014,
1005,
1010,
2224,
11231,
3363,
1024,
2995,
1065,
1010,
1063,
2171,
1024,
1005,
2171,
1005,
1010,
2828,
1024,
1005,
5164,
1005,
1065,
1010,
1063,
2171,
1024,
1005,
2828,
1005,
1010,
2828,
1024,
1005,
5164,
1005,
1065,
1010,
1063,
2171,
1024,
1005,
4130,
1005,
1010,
2828,
1024,
1005,
5164,
1005,
1065,
1010,
1063,
2171,
1024,
1005,
2298,
6279,
1005,
1010,
2828,
1024,
1005,
5164,
1005,
1065,
1010,
1063,
2171,
1024,
1005,
6412,
1005,
1010,
2828,
1024,
1005,
5164,
1005,
1065,
1010,
1063,
2171,
1024,
1005,
8241,
30524,
1024,
3770,
17914,
1065,
1010,
1063,
2171,
1024,
1005,
24471,
14277,
8988,
1005,
1010,
2828,
1024,
1005,
5164,
1005,
1065,
1010,
1063,
2171,
1024,
1005,
3570,
1005,
1010,
2828,
1024,
1005,
5164,
1005,
1065,
1010,
1063,
2171,
1024,
1005,
8241,
4305,
2890,
16761,
2100,
1005,
1010,
2828,
1024,
1005,
5164,
1005,
1065,
1010,
1063,
2171,
1024,
1005,
6687,
3593,
1005,
1010,
2828,
1024,
1005,
20014,
1005,
1065,
1010,
1063,
2171,
1024,
1005,
2775,
3597,
16671,
1005,
1010,
2828,
1024,
1005,
20014,
1005,
1065,
1010,
1063,
2171,
1024,
1005,
2580,
1005,
1010,
2828,
30523,
18442,
1005,
1010,
2828,
1024,
1005,
5164,
1005,
1065,
1010,
1063,
2171,
1024,
1005,
3417,
1005,
1010,
2828,
1024,
1005,
20014,
1005,
1010,
12398,
10175,
5657,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
18442,
1005,
1010,
2828,
1024,
1005,
5164,
1005,
1065,
1010,
1063,
2171,
1024,
1005,
3417,
1005,
1010,
2828,
1024,
1005,
20014,
1005,
1010,
12398,
10175,
5657,
30526
] |
# Stackhousia spathulata f. spathulata Spreng. FORM
#### Status
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null
|
mdoering/backbone
|
life/Plantae/Magnoliophyta/Magnoliopsida/Celastrales/Celastraceae/Stackhousia/Stackhousia spathulata/Stackhousia spathulata spathulata/README.md
|
Markdown
|
apache-2.0
| 191
|
[
30522,
1001,
9991,
6806,
24118,
14690,
21886,
6790,
1042,
1012,
14690,
21886,
6790,
11867,
7389,
2290,
1012,
2433,
1001,
1001,
1001,
1001,
3570,
3970,
1001,
1001,
1001,
1001,
2429,
2000,
2248,
3269,
3415,
5950,
1001,
1001,
1001,
1001,
2405,
1999,
19701,
1001,
1001,
1001,
1001,
2434,
2171,
19701,
1001,
1001,
1001,
12629,
19701,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
package storage
import (
"crypto/sha256"
"testing"
"github.com/stretchr/testify/require"
"github.com/theupdateframework/notary/tuf/data"
"github.com/theupdateframework/notary/tuf/utils"
)
func TestMemoryStoreMetadataOperations(t *testing.T) {
s := NewMemoryStore(nil)
// GetSized of a non-existent metadata fails
_, err := s.GetSized("nonexistent", 0)
require.Error(t, err)
require.IsType(t, ErrMetaNotFound{}, err)
// Once SetMeta succeeds, GetSized with the role name and the consistent name
// should succeed
metaContent := []byte("content")
metaSize := int64(len(metaContent))
shasum := sha256.Sum256(metaContent)
invalidShasum := sha256.Sum256([]byte{})
require.NoError(t, s.Set("exists", metaContent))
require.NoError(t, s.SetMulti(map[string][]byte{"multi1": metaContent, "multi2": metaContent}))
for _, metaName := range []string{"exists", "multi1", "multi2"} {
role := data.RoleName(metaName)
meta, err := s.GetSized(metaName, metaSize)
require.NoError(t, err)
require.Equal(t, metaContent, meta)
meta, err = s.GetSized(utils.ConsistentName(role.String(), shasum[:]), metaSize)
require.NoError(t, err)
require.Equal(t, metaContent, meta)
_, err = s.GetSized(utils.ConsistentName(role.String(), invalidShasum[:]), metaSize)
require.Error(t, err)
require.IsType(t, ErrMetaNotFound{}, err)
}
// Once Metadata is removed, it's no longer accessible
err = s.RemoveAll()
require.NoError(t, err)
_, err = s.GetSized("exists", 0)
require.Error(t, err)
require.IsType(t, ErrMetaNotFound{}, err)
}
func TestMemoryStoreGetSized(t *testing.T) {
content := []byte("content")
s := NewMemoryStore(map[data.RoleName][]byte{"content": content})
// we can get partial size
meta, err := s.GetSized("content", 3)
require.NoError(t, err)
require.Equal(t, []byte("con"), meta)
// we can get zero size
meta, err = s.GetSized("content", 0)
require.NoError(t, err)
require.Equal(t, []byte{}, meta)
// we can get the whole thing by passing NoSizeLimit (-1)
meta, err = s.GetSized("content", NoSizeLimit)
require.NoError(t, err)
require.Equal(t, content, meta)
// a size much larger than the actual length will return the whole thing
meta, err = s.GetSized("content", 8000)
require.NoError(t, err)
require.Equal(t, content, meta)
}
|
jfrazelle/notary
|
storage/memorystore_test.go
|
GO
|
apache-2.0
| 2,293
|
[
30522,
7427,
5527,
12324,
1006,
1000,
19888,
2080,
1013,
21146,
17788,
2575,
1000,
1000,
5604,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
7683,
2099,
1013,
19919,
1013,
5478,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
1996,
6279,
13701,
15643,
6198,
1013,
2025,
5649,
1013,
10722,
2546,
1013,
2951,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
1996,
6279,
13701,
15643,
6198,
1013,
2025,
5649,
1013,
10722,
2546,
1013,
21183,
12146,
1000,
1007,
4569,
2278,
3231,
4168,
5302,
24769,
19277,
11368,
8447,
28555,
29487,
2015,
1006,
1056,
1008,
5604,
1012,
1056,
1007,
1063,
1055,
1024,
1027,
2047,
4168,
5302,
24769,
19277,
1006,
9152,
2140,
1007,
1013,
1013,
4152,
3550,
1997,
1037,
2512,
1011,
25953,
27425,
11896,
1035,
1010,
9413,
2099,
1024,
1027,
1055,
1012,
4152,
3550,
1006,
1000,
3904,
9048,
16173,
2102,
1000,
1010,
1014,
1007,
5478,
1012,
7561,
1006,
1056,
1010,
9413,
2099,
1007,
5478,
1012,
21541,
18863,
1006,
1056,
1010,
9413,
10867,
28752,
24475,
28819,
1063,
1065,
1010,
9413,
2099,
1007,
1013,
1013,
2320,
2275,
11368,
2050,
21645,
1010,
4152,
3550,
2007,
1996,
2535,
2171,
1998,
1996,
8335,
2171,
1013,
1013,
2323,
9510,
18804,
8663,
6528,
2102,
1024,
1027,
1031,
1033,
24880,
1006,
1000,
4180,
1000,
1007,
18804,
5332,
4371,
1024,
1027,
20014,
21084,
1006,
18798,
1006,
18804,
8663,
6528,
2102,
1007,
1007,
21146,
17421,
1024,
1027,
21146,
17788,
2575,
1012,
7680,
17788,
2575,
1006,
18804,
8663,
6528,
2102,
1007,
19528,
7377,
17421,
1024,
1027,
21146,
17788,
2575,
1012,
7680,
17788,
2575,
1006,
1031,
1033,
24880,
1063,
1065,
1007,
5478,
1012,
2053,
2121,
29165,
1006,
1056,
1010,
1055,
1012,
2275,
1006,
1000,
6526,
1000,
1010,
18804,
8663,
6528,
2102,
1007,
1007,
5478,
1012,
2053,
2121,
29165,
1006,
1056,
1010,
1055,
1012,
2275,
12274,
7096,
2072,
1006,
4949,
1031,
5164,
1033,
1031,
1033,
24880,
1063,
1000,
4800,
2487,
1000,
1024,
18804,
8663,
6528,
2102,
1010,
1000,
4800,
2475,
1000,
1024,
18804,
8663,
6528,
2102,
1065,
1007,
1007,
2005,
1035,
1010,
18804,
18442,
1024,
1027,
2846,
1031,
1033,
5164,
1063,
1000,
6526,
1000,
1010,
1000,
4800,
2487,
1000,
1010,
1000,
4800,
2475,
1000,
1065,
1063,
2535,
1024,
1027,
2951,
1012,
2535,
18442,
1006,
18804,
18442,
1007,
18804,
1010,
9413,
2099,
1024,
1027,
1055,
1012,
4152,
3550,
1006,
18804,
18442,
1010,
18804,
5332,
4371,
1007,
5478,
1012,
2053,
2121,
29165,
1006,
1056,
1010,
9413,
2099,
1007,
5478,
1012,
5020,
1006,
1056,
1010,
18804,
8663,
6528,
2102,
1010,
18804,
1007,
18804,
1010,
9413,
2099,
1027,
1055,
1012,
4152,
3550,
1006,
21183,
12146,
1012,
8335,
18442,
1006,
2535,
1012,
5164,
1006,
1007,
1010,
21146,
17421,
1031,
1024,
1033,
1007,
1010,
18804,
5332,
4371,
1007,
5478,
1012,
2053,
2121,
29165,
1006,
1056,
1010,
9413,
2099,
1007,
5478,
1012,
5020,
1006,
1056,
1010,
18804,
8663,
6528,
2102,
1010,
18804,
1007,
1035,
1010,
9413,
2099,
30524,
1024,
1033,
1007,
1010,
18804,
5332,
4371,
1007,
5478,
1012,
7561,
1006,
1056,
1010,
9413,
2099,
1007,
30523,
1027,
1055,
1012,
4152,
3550,
1006,
21183,
12146,
1012,
8335,
18442,
1006,
2535,
1012,
5164,
1006,
1007,
1010,
19528,
7377,
17421,
1031,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1027,
1055,
1012,
4152,
3550,
1006,
21183,
12146,
1012,
8335,
18442,
1006,
2535,
1012,
5164,
1006,
1007,
1010,
19528,
7377,
17421,
1031,
30526
] |
<!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_20) on Sat Oct 20 16:08:50 CDT 2012 -->
<TITLE>
I-Index
</TITLE>
<META NAME="date" CONTENT="2012-10-20">
<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="I-Index";
}
}
</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> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index-8.html"><B>PREV LETTER</B></A>
<A HREF="index-10.html"><B>NEXT LETTER</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../index.html?index-filesindex-9.html" target="_top"><B>FRAMES</B></A>
<A HREF="index-9.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">G</A> <A HREF="index-8.html">H</A> <A HREF="index-9.html">I</A> <A HREF="index-10.html">K</A> <A HREF="index-11.html">L</A> <A HREF="index-12.html">M</A> <A HREF="index-13.html">N</A> <A HREF="index-14.html">O</A> <A HREF="index-15.html">P</A> <A HREF="index-16.html">Q</A> <A HREF="index-17.html">R</A> <A HREF="index-18.html">S</A> <A HREF="index-19.html">T</A> <A HREF="index-20.html">U</A> <A HREF="index-21.html">V</A> <A HREF="index-22.html">W</A> <A HREF="index-23.html">X</A> <HR>
<A NAME="_I_"><!-- --></A><H2>
<B>I</B></H2>
<DL>
<DT><A HREF="../org/epri/pt2/gui/FuzzTestUtils.html#initFuzzTestsFromDatabase()"><B>initFuzzTestsFromDatabase()</B></A> -
Method in class org.epri.pt2.gui.<A HREF="../org/epri/pt2/gui/FuzzTestUtils.html" title="class in org.epri.pt2.gui">FuzzTestUtils</A>
<DD>
<DT><A HREF="../org/epri/pt2/fuzzer/RequestPanel.html#initRequestPacketTable()"><B>initRequestPacketTable()</B></A> -
Method in class org.epri.pt2.fuzzer.<A HREF="../org/epri/pt2/fuzzer/RequestPanel.html" title="class in org.epri.pt2.fuzzer">RequestPanel</A>
<DD>
<DT><A HREF="../org/epri/pt2/fuzzer/ResponsePanel.html#initResponsePacketTable()"><B>initResponsePacketTable()</B></A> -
Method in class org.epri.pt2.fuzzer.<A HREF="../org/epri/pt2/fuzzer/ResponsePanel.html" title="class in org.epri.pt2.fuzzer">ResponsePanel</A>
<DD>
<DT><A HREF="../org/epri/pt2/gui/StatusArea.html#initTabComponent(int, java.lang.String, org.epri.pt2.gui.TestExecutionTask)"><B>initTabComponent(int, String, TestExecutionTask)</B></A> -
Method in class org.epri.pt2.gui.<A HREF="../org/epri/pt2/gui/StatusArea.html" title="class in org.epri.pt2.gui">StatusArea</A>
<DD>
<DT><A HREF="../org/epri/pt2/InterfaceMapper.html" title="class in org.epri.pt2"><B>InterfaceMapper</B></A> - Class in <A HREF="../org/epri/pt2/package-summary.html">org.epri.pt2</A><DD>The InterfaceMapper class provides a static mapping method
<A HREF="../org/epri/pt2/InterfaceMapper.html#getClass(org.epri.pt2.InterfaceType)"><CODE>InterfaceMapper.getClass(InterfaceType)</CODE></A> which returns an AbstractIfaceDO instance.<DT><A HREF="../org/epri/pt2/InterfaceMapper.html#InterfaceMapper()"><B>InterfaceMapper()</B></A> -
Constructor for class org.epri.pt2.<A HREF="../org/epri/pt2/InterfaceMapper.html" title="class in org.epri.pt2">InterfaceMapper</A>
<DD>
<DT><A HREF="../org/epri/pt2/InterfaceType.html" title="enum in org.epri.pt2"><B>InterfaceType</B></A> - Enum in <A HREF="../org/epri/pt2/package-summary.html">org.epri.pt2</A><DD>A list of permissible interface types.<DT><A HREF="../org/epri/pt2/gui/model/MyTableModel.html#isCellEditable(int, int)"><B>isCellEditable(int, int)</B></A> -
Method in class org.epri.pt2.gui.model.<A HREF="../org/epri/pt2/gui/model/MyTableModel.html" title="class in org.epri.pt2.gui.model">MyTableModel</A>
<DD>
<DT><A HREF="../org/epri/pt2/gui/model/TestCaseDOTableModel.html#isCellEditable(int, int)"><B>isCellEditable(int, int)</B></A> -
Method in class org.epri.pt2.gui.model.<A HREF="../org/epri/pt2/gui/model/TestCaseDOTableModel.html" title="class in org.epri.pt2.gui.model">TestCaseDOTableModel</A>
<DD>
<DT><A HREF="../org/epri/pt2/DO/AbstractIfaceDO.html#isConnected()"><B>isConnected()</B></A> -
Method in class org.epri.pt2.DO.<A HREF="../org/epri/pt2/DO/AbstractIfaceDO.html" title="class in org.epri.pt2.DO">AbstractIfaceDO</A>
<DD>
<DT><A HREF="../org/epri/pt2/proxy/ProxyController.html#isEnabled()"><B>isEnabled()</B></A> -
Method in class org.epri.pt2.proxy.<A HREF="../org/epri/pt2/proxy/ProxyController.html" title="class in org.epri.pt2.proxy">ProxyController</A>
<DD>
<DT><A HREF="../org/epri/pt2/fuzzer/request/SocketHandler.html#isErroredOrClosed()"><B>isErroredOrClosed()</B></A> -
Method in class org.epri.pt2.fuzzer.request.<A HREF="../org/epri/pt2/fuzzer/request/SocketHandler.html" title="class in org.epri.pt2.fuzzer.request">SocketHandler</A>
<DD>
<DT><A HREF="../org/epri/pt2/proxy/ProxyController.html#isFilteringEnabled()"><B>isFilteringEnabled()</B></A> -
Method in class org.epri.pt2.proxy.<A HREF="../org/epri/pt2/proxy/ProxyController.html" title="class in org.epri.pt2.proxy">ProxyController</A>
<DD>
<DT><A HREF="../org/epri/pt2/DO/PacketDO.html#isFuzzed()"><B>isFuzzed()</B></A> -
Method in class org.epri.pt2.DO.<A HREF="../org/epri/pt2/DO/PacketDO.html" title="class in org.epri.pt2.DO">PacketDO</A>
<DD>
<DT><A HREF="../org/epri/pt2/proxy/ProxyController.html#isFuzzingEnabled()"><B>isFuzzingEnabled()</B></A> -
Method in class org.epri.pt2.proxy.<A HREF="../org/epri/pt2/proxy/ProxyController.html" title="class in org.epri.pt2.proxy">ProxyController</A>
<DD>
<DT><A HREF="../org/epri/pt2/proxy/ProxyController.html#isInterceptEnabled()"><B>isInterceptEnabled()</B></A> -
Method in class org.epri.pt2.proxy.<A HREF="../org/epri/pt2/proxy/ProxyController.html" title="class in org.epri.pt2.proxy">ProxyController</A>
<DD>
<DT><A HREF="../org/epri/pt2/packetparser/treemodel/XMLNode.html#isLeaf()"><B>isLeaf()</B></A> -
Method in class org.epri.pt2.packetparser.treemodel.<A HREF="../org/epri/pt2/packetparser/treemodel/XMLNode.html" title="class in org.epri.pt2.packetparser.treemodel">XMLNode</A>
<DD>
<DT><A HREF="../org/epri/pt2/packetparser/treemodel/XMLTreeModel.html#isLeaf(java.lang.Object)"><B>isLeaf(Object)</B></A> -
Method in class org.epri.pt2.packetparser.treemodel.<A HREF="../org/epri/pt2/packetparser/treemodel/XMLTreeModel.html" title="class in org.epri.pt2.packetparser.treemodel">XMLTreeModel</A>
<DD>
<DT><A HREF="../org/epri/pt2/sniffer/PCAPEthListener.html#isOpen()"><B>isOpen()</B></A> -
Method in class org.epri.pt2.sniffer.<A HREF="../org/epri/pt2/sniffer/PCAPEthListener.html" title="class in org.epri.pt2.sniffer">PCAPEthListener</A>
<DD>
<DT><A HREF="../org/epri/pt2/sniffer/SnifferController.html#isOpen(org.epri.pt2.DO.DeviceDO)"><B>isOpen(DeviceDO)</B></A> -
Method in class org.epri.pt2.sniffer.<A HREF="../org/epri/pt2/sniffer/SnifferController.html" title="class in org.epri.pt2.sniffer">SnifferController</A>
<DD>
<DT><A HREF="../org/epri/pt2/sniffer/SnifferInterface.html#isOpen()"><B>isOpen()</B></A> -
Method in interface org.epri.pt2.sniffer.<A HREF="../org/epri/pt2/sniffer/SnifferInterface.html" title="interface in org.epri.pt2.sniffer">SnifferInterface</A>
<DD>
<DT><A HREF="../org/epri/pt2/reassembler/TcpLink.html#isProcessed()"><B>isProcessed()</B></A> -
Method in class org.epri.pt2.reassembler.<A HREF="../org/epri/pt2/reassembler/TcpLink.html" title="class in org.epri.pt2.reassembler">TcpLink</A>
<DD>
<DT><A HREF="../org/epri/pt2/fuzzer/request/SocketHandler.html#isReadyToSend()"><B>isReadyToSend()</B></A> -
Method in class org.epri.pt2.fuzzer.request.<A HREF="../org/epri/pt2/fuzzer/request/SocketHandler.html" title="class in org.epri.pt2.fuzzer.request">SocketHandler</A>
<DD>
<DT><A HREF="../org/epri/pt2/reassembler/TcpReassembler.html#isRunning()"><B>isRunning()</B></A> -
Method in class org.epri.pt2.reassembler.<A HREF="../org/epri/pt2/reassembler/TcpReassembler.html" title="class in org.epri.pt2.reassembler">TcpReassembler</A>
<DD>
<DT><A HREF="../org/epri/pt2/DO/DataTypeDO.html#isSelected()"><B>isSelected()</B></A> -
Method in class org.epri.pt2.DO.<A HREF="../org/epri/pt2/DO/DataTypeDO.html" title="class in org.epri.pt2.DO">DataTypeDO</A>
<DD>
<DT><A HREF="../org/epri/pt2/DO/FuzzTestDO.html#isSelected()"><B>isSelected()</B></A> -
Method in class org.epri.pt2.DO.<A HREF="../org/epri/pt2/DO/FuzzTestDO.html" title="class in org.epri.pt2.DO">FuzzTestDO</A>
<DD>
<DT><A HREF="../org/epri/pt2/DO/PacketDO.html#isSelected()"><B>isSelected()</B></A> -
Method in class org.epri.pt2.DO.<A HREF="../org/epri/pt2/DO/PacketDO.html" title="class in org.epri.pt2.DO">PacketDO</A>
<DD>
<DT><A HREF="../org/epri/pt2/DO/TestCaseDO.html#isSelected()"><B>isSelected()</B></A> -
Method in class org.epri.pt2.DO.<A HREF="../org/epri/pt2/DO/TestCaseDO.html" title="class in org.epri.pt2.DO">TestCaseDO</A>
<DD>
<DT><A HREF="../org/epri/pt2/sniffer/PCAPEthListener.html#isSnifferType(int)"><B>isSnifferType(int)</B></A> -
Method in class org.epri.pt2.sniffer.<A HREF="../org/epri/pt2/sniffer/PCAPEthListener.html" title="class in org.epri.pt2.sniffer">PCAPEthListener</A>
<DD>
<DT><A HREF="../org/epri/pt2/sniffer/SnifferInterface.html#isSnifferType(int)"><B>isSnifferType(int)</B></A> -
Method in interface org.epri.pt2.sniffer.<A HREF="../org/epri/pt2/sniffer/SnifferInterface.html" title="interface in org.epri.pt2.sniffer">SnifferInterface</A>
<DD>
<DT><A HREF="../org/epri/pt2/proxy/ProxyController.html#isSSLEnabled()"><B>isSSLEnabled()</B></A> -
Method in class org.epri.pt2.proxy.<A HREF="../org/epri/pt2/proxy/ProxyController.html" title="class in org.epri.pt2.proxy">ProxyController</A>
<DD>
<DT><A HREF="../org/epri/pt2/packetparser/treemodel/XMLNode.html#isText()"><B>isText()</B></A> -
Method in class org.epri.pt2.packetparser.treemodel.<A HREF="../org/epri/pt2/packetparser/treemodel/XMLNode.html" title="class in org.epri.pt2.packetparser.treemodel">XMLNode</A>
<DD>
</DL>
<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> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Package</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Class</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <FONT CLASS="NavBarFont1">Use</FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Index</B></FONT> </TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="index-8.html"><B>PREV LETTER</B></A>
<A HREF="index-10.html"><B>NEXT LETTER</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../index.html?index-filesindex-9.html" target="_top"><B>FRAMES</B></A>
<A HREF="index-9.html" target="_top"><B>NO FRAMES</B></A>
<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<A HREF="index-1.html">A</A> <A HREF="index-2.html">B</A> <A HREF="index-3.html">C</A> <A HREF="index-4.html">D</A> <A HREF="index-5.html">E</A> <A HREF="index-6.html">F</A> <A HREF="index-7.html">G</A> <A HREF="index-8.html">H</A> <A HREF="index-9.html">I</A> <A HREF="index-10.html">K</A> <A HREF="index-11.html">L</A> <A HREF="index-12.html">M</A> <A HREF="index-13.html">N</A> <A HREF="index-14.html">O</A> <A HREF="index-15.html">P</A> <A HREF="index-16.html">Q</A> <A HREF="index-17.html">R</A> <A HREF="index-18.html">S</A> <A HREF="index-19.html">T</A> <A HREF="index-20.html">U</A> <A HREF="index-21.html">V</A> <A HREF="index-22.html">W</A> <A HREF="index-23.html">X</A> <HR>
</BODY>
</HTML>
|
epri-dev/PT2
|
Documents/javadoc/index-files/index-9.html
|
HTML
|
bsd-3-clause
| 15,240
|
[
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
16129,
1018,
1012,
5890,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
19817,
1013,
16129,
2549,
1013,
6065,
1012,
26718,
2094,
1000,
1028,
1026,
999,
1011,
1011,
2047,
13704,
1011,
1011,
1028,
1026,
16129,
1028,
1026,
2132,
1028,
1026,
999,
1011,
1011,
7013,
2011,
9262,
3527,
2278,
1006,
3857,
1015,
1012,
1020,
1012,
1014,
1035,
2322,
1007,
2006,
2938,
13323,
2322,
2385,
1024,
5511,
1024,
2753,
3729,
2102,
2262,
1011,
1011,
1028,
1026,
2516,
1028,
1045,
1011,
5950,
1026,
1013,
2516,
1028,
1026,
18804,
2171,
1027,
1000,
3058,
1000,
4180,
1027,
1000,
2262,
1011,
2184,
1011,
2322,
1000,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
6782,
21030,
2102,
1012,
20116,
2015,
1000,
2516,
1027,
1000,
2806,
1000,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
1028,
3853,
3332,
3775,
9286,
1006,
1007,
1063,
2065,
1006,
3295,
1012,
17850,
12879,
1012,
5950,
11253,
1006,
1005,
2003,
1011,
6327,
1027,
2995,
1005,
1007,
1027,
1027,
1011,
1015,
1007,
1063,
6687,
1012,
6254,
1012,
2516,
1027,
1000,
1045,
1011,
5950,
1000,
1025,
1065,
1065,
1026,
1013,
5896,
1028,
1026,
16839,
23235,
1028,
1026,
1013,
16839,
23235,
1028,
1026,
1013,
2132,
1028,
1026,
2303,
1038,
18195,
12898,
2099,
1027,
1000,
2317,
1000,
2006,
11066,
1027,
1000,
3332,
3775,
9286,
1006,
1007,
1025,
1000,
1028,
1026,
17850,
1028,
1026,
999,
1011,
1011,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
2707,
1997,
2327,
6583,
26493,
2906,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1011,
1011,
1028,
1026,
1037,
2171,
1027,
1000,
6583,
26493,
2906,
1035,
2327,
1000,
1028,
1026,
999,
1011,
1011,
1011,
1011,
1028,
1026,
1013,
1037,
1028,
1026,
1037,
17850,
12879,
1027,
1000,
1001,
13558,
1011,
6583,
26493,
2906,
1035,
2327,
1000,
2516,
1027,
30524,
19817,
1028,
1026,
14595,
8902,
13102,
2319,
1027,
1016,
1038,
18195,
12898,
2099,
1027,
1000,
1001,
25212,
4402,
4246,
1000,
2465,
1027,
1000,
6583,
26493,
2906,
29109,
2140,
2487,
1000,
1028,
1026,
1037,
2171,
1027,
1000,
6583,
26493,
2906,
1035,
2327,
1035,
2034,
10524,
1000,
1028,
1026,
999,
1011,
1011,
1011,
1011,
1028,
1026,
1013,
1037,
1028,
1026,
2795,
3675,
1027,
1000,
1014,
1000,
3526,
15455,
4667,
1027,
1000,
1014,
1000,
4442,
19498,
2075,
1027,
1000,
1017,
1000,
12654,
1027,
1000,
1000,
1028,
1026,
19817,
25705,
1027,
1000,
2415,
1000,
11748,
23773,
1027,
1000,
2327,
1000,
1028,
1026,
14595,
1038,
18195,
12898,
2099,
1027,
1000,
1001,
25212,
4402,
4246,
1000,
2465,
1027,
1000,
6583,
26493,
2906,
29109,
2140,
2487,
1000,
1028,
1026,
1037,
17850,
12879,
30523,
1000,
13558,
9163,
6971,
1000,
1028,
1026,
1013,
1037,
1028,
1026,
2795,
3675,
1027,
1000,
1014,
1000,
9381,
1027,
1000,
2531,
1003,
1000,
3526,
15455,
4667,
1027,
1000,
1015,
1000,
4442,
19498,
2075,
1027,
1000,
1014,
1000,
12654,
1027,
1000,
1000,
1028,
1026,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1000,
13558,
9163,
6971,
1000,
1028,
1026,
1013,
1037,
1028,
1026,
2795,
3675,
1027,
1000,
1014,
1000,
9381,
1027,
1000,
2531,
1003,
1000,
3526,
15455,
4667,
1027,
1000,
1015,
1000,
4442,
19498,
2075,
1027,
1000,
1014,
1000,
12654,
1027,
1000,
1000,
1028,
1026,
30526
] |
<!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) on Mon Jan 13 19:53:36 EST 2014 -->
<title>ExecutionInitializationOutput</title>
<meta name="date" content="2014-01-13">
<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="ExecutionInitializationOutput";
}
//-->
</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 class="navBarCell1Rev">Class</li>
<li><a href="class-use/ExecutionInitializationOutput.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="../../../../org/drip/quant/solver1D/ExecutionControlParams.html" title="class in org.drip.quant.solver1D"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/drip/quant/solver1D/ExecutionInitializer.html" title="class in org.drip.quant.solver1D"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/drip/quant/solver1D/ExecutionInitializationOutput.html" target="_top">Frames</a></li>
<li><a href="ExecutionInitializationOutput.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>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </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">org.drip.quant.solver1D</div>
<h2 title="Class ExecutionInitializationOutput" class="title">Class ExecutionInitializationOutput</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li>java.lang.Object</li>
<li>
<ul class="inheritance">
<li>org.drip.quant.solver1D.ExecutionInitializationOutput</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>Direct Known Subclasses:</dt>
<dd><a href="../../../../org/drip/quant/solver1D/BracketingOutput.html" title="class in org.drip.quant.solver1D">BracketingOutput</a>, <a href="../../../../org/drip/quant/solver1D/ConvergenceOutput.html" title="class in org.drip.quant.solver1D">ConvergenceOutput</a></dd>
</dl>
<hr>
<br>
<pre>public abstract class <span class="strong">ExecutionInitializationOutput</span>
extends java.lang.Object</pre>
<div class="block">ExecutionInitializationOutput holds the output of the root initializer calculation.
The following are the fields held by ExecutionInitializationOutput:
- Whether the initialization completed successfully
- the number of iterations, the number of objective function calculations, and the time taken for the
initialization
- the starting variate from the initialization</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>java.lang.String</code></td>
<td class="colLast"><code><strong><a href="../../../../org/drip/quant/solver1D/ExecutionInitializationOutput.html#displayString()">displayString</a></strong>()</code>
<div class="block">Return a string form of the Initializer output</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/drip/quant/solver1D/ExecutionInitializationOutput.html#getNumIterations()">getNumIterations</a></strong>()</code>
<div class="block">Return The number of Iterations consumed</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/drip/quant/solver1D/ExecutionInitializationOutput.html#getNumOFCalcs()">getNumOFCalcs</a></strong>()</code>
<div class="block">Retrieve the number of objective function calculations needed</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../org/drip/quant/solver1D/ExecutionInitializationOutput.html#getNumOFDerivCalcs()">getNumOFDerivCalcs</a></strong>()</code>
<div class="block">Retrieve the number of objective function derivative calculations needed</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../org/drip/quant/solver1D/ExecutionInitializationOutput.html#getStartingVariate()">getStartingVariate</a></strong>()</code>
<div class="block">Return the Starting Variate</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/drip/quant/solver1D/ExecutionInitializationOutput.html#incrIterations()">incrIterations</a></strong>()</code>
<div class="block">Increment the Number of Iterations</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/drip/quant/solver1D/ExecutionInitializationOutput.html#incrOFCalcs()">incrOFCalcs</a></strong>()</code>
<div class="block">Increment the Number of Objective Function Evaluations</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/drip/quant/solver1D/ExecutionInitializationOutput.html#incrOFDerivCalcs()">incrOFDerivCalcs</a></strong>()</code>
<div class="block">Increment the number of Objective Function Derivative evaluations</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/drip/quant/solver1D/ExecutionInitializationOutput.html#isDone()">isDone</a></strong>()</code>
<div class="block">Indicate if the execution initialization is done</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../org/drip/quant/solver1D/ExecutionInitializationOutput.html#setStartingVariate(double)">setStartingVariate</a></strong>(double dblStartingVariate)</code>
<div class="block">Set the Starting Variate</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../org/drip/quant/solver1D/ExecutionInitializationOutput.html#time()">time</a></strong>()</code>
<div class="block">Return the time elapsed for the execution initialization operation</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class java.lang.Object</h3>
<code>equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="incrIterations()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>incrIterations</h4>
<pre>public final boolean incrIterations()</pre>
<div class="block">Increment the Number of Iterations</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>TRUE => Successfully incremented</dd></dl>
</li>
</ul>
<a name="getNumIterations()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumIterations</h4>
<pre>public final int getNumIterations()</pre>
<div class="block">Return The number of Iterations consumed</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Number of Iterations consumed</dd></dl>
</li>
</ul>
<a name="incrOFCalcs()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>incrOFCalcs</h4>
<pre>public final boolean incrOFCalcs()</pre>
<div class="block">Increment the Number of Objective Function Evaluations</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>TRUE => Successfully incremented</dd></dl>
</li>
</ul>
<a name="getNumOFCalcs()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumOFCalcs</h4>
<pre>public final int getNumOFCalcs()</pre>
<div class="block">Retrieve the number of objective function calculations needed</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Number of objective function calculations needed</dd></dl>
</li>
</ul>
<a name="incrOFDerivCalcs()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>incrOFDerivCalcs</h4>
<pre>public final boolean incrOFDerivCalcs()</pre>
<div class="block">Increment the number of Objective Function Derivative evaluations</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>TRUE => Successfully incremented</dd></dl>
</li>
</ul>
<a name="getNumOFDerivCalcs()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getNumOFDerivCalcs</h4>
<pre>public final int getNumOFDerivCalcs()</pre>
<div class="block">Retrieve the number of objective function derivative calculations needed</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Number of objective function derivative calculations needed</dd></dl>
</li>
</ul>
<a name="isDone()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>isDone</h4>
<pre>public final boolean isDone()</pre>
<div class="block">Indicate if the execution initialization is done</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>TRUE => Execution initialization is done</dd></dl>
</li>
</ul>
<a name="time()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>time</h4>
<pre>public final double time()</pre>
<div class="block">Return the time elapsed for the execution initialization operation</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>execution initialization time</dd></dl>
</li>
</ul>
<a name="setStartingVariate(double)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setStartingVariate</h4>
<pre>public boolean setStartingVariate(double dblStartingVariate)</pre>
<div class="block">Set the Starting Variate</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dblStartingVariate</code> - Starting Variate</dd>
<dt><span class="strong">Returns:</span></dt><dd>TRUE => Starting Variate set successfully</dd></dl>
</li>
</ul>
<a name="getStartingVariate()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>getStartingVariate</h4>
<pre>public double getStartingVariate()</pre>
<div class="block">Return the Starting Variate</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Starting Variate</dd></dl>
</li>
</ul>
<a name="displayString()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>displayString</h4>
<pre>public java.lang.String displayString()</pre>
<div class="block">Return a string form of the Initializer output</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>String form of the Initializer output</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><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 class="navBarCell1Rev">Class</li>
<li><a href="class-use/ExecutionInitializationOutput.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="../../../../org/drip/quant/solver1D/ExecutionControlParams.html" title="class in org.drip.quant.solver1D"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../org/drip/quant/solver1D/ExecutionInitializer.html" title="class in org.drip.quant.solver1D"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?org/drip/quant/solver1D/ExecutionInitializationOutput.html" target="_top">Frames</a></li>
<li><a href="ExecutionInitializationOutput.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>
<div>
<ul class="subNavList">
<li>Summary: </li>
<li>Nested | </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail: </li>
<li>Field | </li>
<li>Constr | </li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
|
tectronics/splinelibrary
|
2.3/docs/Javadoc/org/drip/quant/solver1D/ExecutionInitializationOutput.html
|
HTML
|
apache-2.0
| 15,694
|
[
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
16129,
1018,
1012,
5890,
17459,
1013,
1013,
4372,
1000,
1000,
8299,
1024,
1013,
1013,
7479,
1012,
1059,
2509,
1012,
8917,
1013,
19817,
1013,
16129,
2549,
1013,
6065,
1012,
26718,
2094,
1000,
1028,
1026,
999,
1011,
1011,
2047,
13704,
1011,
1011,
1028,
1026,
16129,
11374,
1027,
1000,
4372,
1000,
1028,
1026,
2132,
1028,
1026,
999,
1011,
1011,
7013,
2011,
9262,
3527,
2278,
1006,
2544,
1015,
1012,
1021,
1012,
1014,
1007,
2006,
12256,
5553,
2410,
2539,
1024,
5187,
1024,
4029,
9765,
2297,
1011,
1011,
1028,
1026,
2516,
1028,
7781,
5498,
20925,
3989,
5833,
18780,
1026,
1013,
2516,
1028,
1026,
18804,
2171,
1027,
1000,
3058,
1000,
4180,
1027,
1000,
2297,
1011,
5890,
1011,
2410,
1000,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
6782,
21030,
2102,
1012,
20116,
2015,
1000,
2516,
1027,
1000,
2806,
1000,
1028,
1026,
1013,
2132,
1028,
1026,
2303,
1028,
1026,
5896,
2828,
1027,
1000,
3793,
1013,
9262,
22483,
1000,
1028,
1026,
999,
1011,
1011,
2065,
1006,
3295,
1012,
17850,
12879,
1012,
5950,
11253,
1006,
1005,
2003,
1011,
6327,
1027,
2995,
1005,
1007,
1027,
1027,
1011,
1015,
1007,
1063,
6687,
1012,
6254,
1012,
2516,
1027,
1000,
7781,
5498,
20925,
3989,
5833,
18780,
1000,
1025,
1065,
1013,
1013,
1011,
1011,
1028,
1026,
1013,
5896,
1028,
1026,
16839,
23235,
1028,
1026,
4487,
2615,
1028,
9262,
22483,
2003,
9776,
2006,
2115,
16602,
1012,
1026,
1013,
4487,
2615,
1028,
1026,
1013,
16839,
23235,
1028,
1026,
999,
1011,
1011,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
2707,
1997,
2327,
6583,
26493,
2906,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1011,
1011,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
2327,
2532,
2615,
1000,
1028,
1026,
1037,
2171,
1027,
1000,
6583,
26493,
30524,
2906,
1035,
2327,
1000,
2516,
1027,
1000,
13558,
9163,
6971,
1000,
1028,
1026,
1013,
1037,
1028,
1026,
1037,
2171,
1027,
1000,
6583,
26493,
2906,
1035,
2327,
1035,
2034,
10524,
1000,
1028,
1026,
999,
1011,
1011,
1011,
1011,
1028,
1026,
1013,
1037,
1028,
1026,
17359,
2465,
1027,
1000,
6583,
2615,
9863,
1000,
2516,
1027,
1000,
9163,
1000,
1028,
1026,
5622,
1028,
1026,
1037,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
1012,
1012,
1013,
19184,
1011,
12654,
1012,
16129,
1000,
1028,
19184,
1026,
1013,
1037,
1028,
1026,
1013,
5622,
1028,
1026,
5622,
1028,
1026,
1037,
17850,
12879,
1027,
1000,
7427,
1011,
12654,
1012,
16129,
1000,
1028,
7427,
1026,
1013,
1037,
1028,
1026,
1013,
5622,
1028,
1026,
5622,
2465,
1027,
1000,
6583,
26493,
2906,
29109,
2140,
2487,
2890,
2615,
1000,
1028,
2465,
1026,
1013,
5622,
1028,
1026,
5622,
1028,
1026,
1037,
17850,
12879,
1027,
1000,
2465,
1011,
30523,
2906,
1035,
2327,
1000,
1028,
1026,
999,
1011,
1011,
1011,
1011,
1028,
1026,
1013,
1037,
1028,
1026,
1037,
17850,
12879,
1027,
1000,
1001,
13558,
1011,
6583,
26493,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2906,
1035,
2327,
1000,
1028,
1026,
999,
1011,
1011,
1011,
1011,
1028,
1026,
1013,
1037,
1028,
1026,
1037,
17850,
12879,
1027,
1000,
1001,
13558,
1011,
6583,
26493,
30526
] |
package com.zimbra.cs.versioncheck;
import java.io.IOException;
import java.util.Iterator;
import java.util.List;
import java.util.Date;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import com.zimbra.common.util.ZimbraLog;
import com.zimbra.common.account.Key;
import com.zimbra.common.account.Key.ServerBy;
import com.zimbra.common.service.ServiceException;
import com.zimbra.common.soap.AdminConstants;
import com.zimbra.common.soap.SoapFaultException;
import com.zimbra.common.soap.SoapTransport;
import com.zimbra.common.util.CliUtil;
import com.zimbra.cs.account.Config;
import com.zimbra.cs.account.Provisioning;
import com.zimbra.cs.account.Server;
import com.zimbra.cs.client.LmcSession;
import com.zimbra.cs.client.soap.LmcSoapClientException;
import com.zimbra.cs.client.soap.LmcVersionCheckRequest;
import com.zimbra.cs.client.soap.LmcVersionCheckResponse;
import com.zimbra.cs.util.BuildInfo;
import com.zimbra.cs.util.SoapCLI;
import com.zimbra.common.util.DateUtil;
/**
* @author Greg Solovyev
*/
public class VersionCheckUtil extends SoapCLI {
private static final String OPT_CHECK_VERSION = "c";
private static final String OPT_MANUAL_CHECK_VERSION = "m";
private static final String SHOW_LAST_STATUS = "r";
protected VersionCheckUtil() throws ServiceException {
super();
}
public static void main(String[] args) {
CliUtil.toolSetup();
SoapTransport.setDefaultUserAgent("zmcheckversion", BuildInfo.VERSION);
VersionCheckUtil util = null;
try {
util = new VersionCheckUtil();
} catch (ServiceException e) {
System.err.println(e.getMessage());
System.exit(1);
}
try {
util.setupCommandLineOptions();
CommandLine cl = null;
try {
cl = util.getCommandLine(args);
} catch (ParseException e) {
System.out.println(e.getMessage());
util.usage();
System.exit(1);
}
if (cl == null) {
System.exit(1);
}
if (cl.hasOption(OPT_CHECK_VERSION)) {
//check schedule
Provisioning prov = Provisioning.getInstance();
Config config;
config = prov.getConfig();
String updaterServerId = config.getAttr(Provisioning.A_zimbraVersionCheckServer);
if (updaterServerId != null) {
Server server = prov.get(Key.ServerBy.id, updaterServerId);
if (server != null) {
Server localServer = prov.getLocalServer();
if (localServer!=null) {
if(!localServer.getId().equalsIgnoreCase(server.getId())) {
System.out.println("Wrong server");
System.exit(0);
}
}
}
}
String versionInterval = config.getAttr(Provisioning.A_zimbraVersionCheckInterval);
if(versionInterval == null || versionInterval.length()==0 || versionInterval.equalsIgnoreCase("0")) {
System.out.println("Automatic updates are disabled");
System.exit(0);
} else {
long checkInterval = DateUtil.getTimeIntervalSecs(versionInterval,0);
String lastAttempt = config.getAttr(Provisioning.A_zimbraVersionCheckLastAttempt);
if(lastAttempt != null) {
Date lastChecked = DateUtil.parseGeneralizedTime(config.getAttr(Provisioning.A_zimbraVersionCheckLastAttempt));
Date now = new Date();
if (now.getTime()/1000- lastChecked.getTime()/1000 >= checkInterval) {
util.doVersionCheck();
} else {
System.out.println("Too early");
System.exit(0);
}
} else {
util.doVersionCheck();
}
}
} else if (cl.hasOption(OPT_MANUAL_CHECK_VERSION)) {
util.doVersionCheck();
} else if (cl.hasOption(SHOW_LAST_STATUS)) {
util.doResult();
System.exit(0);
} else {
util.usage();
System.exit(1);
}
} catch (Exception e) {
System.err.println(e.getMessage());
ZimbraLog.extensions.error("Error in versioncheck util", e);
util.usage(null);
System.exit(1);
}
}
private void doVersionCheck() throws SoapFaultException, IOException, ServiceException, LmcSoapClientException {
LmcSession session = auth();
LmcVersionCheckRequest req = new LmcVersionCheckRequest();
req.setAction(AdminConstants.VERSION_CHECK_CHECK);
req.setSession(session);
req.invoke(getServerUrl());
}
private void doResult() throws SoapFaultException, IOException, ServiceException, LmcSoapClientException {
try {
LmcSession session = auth();
LmcVersionCheckRequest req = new LmcVersionCheckRequest();
req.setAction(AdminConstants.VERSION_CHECK_STATUS);
req.setSession(session);
LmcVersionCheckResponse res = (LmcVersionCheckResponse) req.invoke(getServerUrl());
List <VersionUpdate> updates = res.getUpdates();
for(Iterator <VersionUpdate> iter = updates.iterator();iter.hasNext();){
VersionUpdate update = iter.next();
String critical;
if(update.isCritical()) {
critical = "critical";
} else {
critical = "not critical";
}
System.out.println(
String.format("Found a %s update. Update is %s . Update version: %s. For more info visit: %s",
update.getType(),critical,update.getVersion(),update.getUpdateURL())
);
}
} catch (SoapFaultException soape) {
System.out.println("Cought SoapFaultException");
System.out.println(soape.getStackTrace().toString());
throw (soape);
} catch (LmcSoapClientException lmce) {
System.out.println("Cought LmcSoapClientException");
System.out.println(lmce.getStackTrace().toString());
throw (lmce);
} catch (ServiceException se) {
System.out.println("Cought ServiceException");
System.out.println(se.getStackTrace().toString());
throw (se);
} catch (IOException ioe) {
System.out.println("Cought IOException");
System.out.println(ioe.getStackTrace().toString());
throw (ioe);
}
}
protected void setupCommandLineOptions() {
// super.setupCommandLineOptions();
Options options = getOptions();
Options hiddenOptions = getHiddenOptions();
hiddenOptions.addOption(OPT_CHECK_VERSION, "autocheck", false, "Initiate version check request (exits if zimbraVersionCheckInterval==0)");
options.addOption(SHOW_LAST_STATUS, "result", false, "Show results of last version check.");
options.addOption(OPT_MANUAL_CHECK_VERSION, "manual", false, "Initiate version check request.");
}
protected String getCommandUsage() {
return "zmcheckversion <options>";
}
}
|
nico01f/z-pec
|
ZimbraAdminVersionCheck/src/java/com/zimbra/cs/versioncheck/VersionCheckUtil.java
|
Java
|
mit
| 7,334
|
[
30522,
7427,
4012,
1012,
1062,
5714,
10024,
1012,
20116,
1012,
2544,
5403,
3600,
1025,
12324,
9262,
1012,
22834,
1012,
22834,
10288,
24422,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
2009,
6906,
4263,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
2862,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
3058,
1025,
12324,
8917,
1012,
15895,
1012,
7674,
1012,
18856,
2072,
1012,
3094,
4179,
1025,
12324,
8917,
1012,
15895,
1012,
7674,
1012,
18856,
2072,
1012,
7047,
1025,
12324,
8917,
1012,
15895,
1012,
7674,
1012,
18856,
2072,
1012,
11968,
19763,
2595,
24422,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
2691,
1012,
21183,
4014,
1012,
1062,
5714,
10024,
21197,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
2691,
1012,
4070,
1012,
3145,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
2691,
1012,
4070,
1012,
3145,
1012,
8241,
3762,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
2691,
1012,
2326,
1012,
2326,
10288,
24422,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
2691,
1012,
30524,
5714,
10024,
1012,
2691,
1012,
21183,
4014,
1012,
18856,
17922,
3775,
2140,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
20116,
1012,
4070,
1012,
9530,
8873,
2290,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
20116,
1012,
4070,
1012,
9347,
2075,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
20116,
1012,
4070,
1012,
8241,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
20116,
1012,
7396,
1012,
1048,
12458,
8583,
10992,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
20116,
1012,
7396,
1012,
7815,
1012,
1048,
12458,
6499,
9331,
20464,
25099,
2595,
24422,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
20116,
1012,
7396,
1012,
7815,
1012,
1048,
12458,
27774,
5403,
3600,
2890,
15500,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
20116,
1012,
7396,
1012,
7815,
1012,
1048,
12458,
27774,
5403,
3600,
6072,
26029,
3366,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
20116,
1012,
21183,
4014,
1012,
3857,
2378,
14876,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
20116,
1012,
21183,
4014,
1012,
7815,
20464,
2072,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
2691,
1012,
21183,
4014,
1012,
3058,
21823,
2140,
1025,
1013,
1008,
1008,
1008,
1030,
3166,
6754,
3948,
10736,
6777,
1008,
1013,
2270,
2465,
2544,
5403,
3600,
21823,
2140,
8908,
7815,
20464,
2072,
1063,
2797,
10763,
2345,
5164,
23569,
1035,
4638,
1035,
2544,
1027,
1000,
1039,
1000,
1025,
2797,
10763,
2345,
5164,
23569,
1035,
6410,
1035,
4638,
1035,
2544,
1027,
1000,
1049,
1000,
1025,
2797,
10763,
2345,
5164,
2265,
1035,
2197,
1035,
3570,
1027,
1000,
1054,
1000,
1025,
5123,
2544,
5403,
3600,
21823,
2140,
1006,
1007,
11618,
2326,
10288,
24422,
1063,
3565,
1006,
1007,
1025,
1065,
2270,
10763,
11675,
2364,
1006,
5164,
1031,
1033,
12098,
5620,
1007,
1063,
18856,
17922,
3775,
2140,
1012,
5906,
3388,
6279,
1006,
1007,
1025,
7815,
6494,
30523,
7815,
1012,
4748,
10020,
8663,
12693,
3215,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
2691,
1012,
7815,
1012,
7815,
7011,
11314,
10288,
24422,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
2691,
1012,
7815,
1012,
7815,
6494,
3619,
6442,
1025,
12324,
4012,
1012,
1062,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
7815,
1012,
4748,
10020,
8663,
12693,
3215,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
2691,
1012,
7815,
1012,
7815,
7011,
11314,
10288,
24422,
1025,
12324,
4012,
1012,
1062,
5714,
10024,
1012,
2691,
1012,
7815,
1012,
7815,
6494,
3619,
6442,
1025,
12324,
4012,
1012,
1062,
30526
] |
# Stigeoclonium simplex Kützing SPECIES
#### Status
ACCEPTED
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null
|
mdoering/backbone
|
life/Plantae/Chlorophyta/Chlorophyceae/Chaetophorales/Chaetophoraceae/Stigeoclonium/Stigeoclonium simplex/README.md
|
Markdown
|
apache-2.0
| 188
|
[
30522,
1001,
2358,
25538,
10085,
7811,
5007,
3722,
2595,
13970,
5753,
2075,
2427,
1001,
1001,
1001,
1001,
3570,
3970,
1001,
1001,
1001,
1001,
2429,
2000,
1996,
10161,
1997,
2166,
1010,
3822,
2254,
2249,
1001,
1001,
1001,
1001,
2405,
1999,
19701,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1001,
1001,
1001,
1001,
2434,
2171,
19701,
1001,
1001,
1001,
12629,
19701,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
// Accessors are only available when targeting ECMAScript 5 and higher.
class Person {
private _name:string;
static age:number;
get name():string {
return this._name;
}
set name(newName:string) {
this._name = newName;
}
tell(){
return this.name + ":" + this.age;
}
}
var p:Person;
p = new Person();
// 【 accessors 】
p.name = "csxiaoyao";
// 【 static 】
Person.age = 25;
// p.age = 25;
alert(p.tell());
|
csxiaoyaojianxian/JavaScriptStudy
|
18-TypeScript/04-accessors&static.ts
|
TypeScript
|
mit
| 427
|
[
30522,
1013,
1013,
3229,
5668,
2024,
2069,
2800,
2043,
14126,
14925,
9335,
23235,
1019,
1998,
3020,
1012,
2465,
2711,
1063,
2797,
1035,
2171,
1024,
5164,
1025,
10763,
2287,
1024,
2193,
1025,
2131,
2171,
1006,
1007,
1024,
5164,
1063,
2709,
2023,
1012,
1035,
2171,
1025,
1065,
2275,
2171,
1006,
2047,
18442,
1024,
5164,
1007,
1063,
2023,
1012,
1035,
2171,
1027,
2047,
18442,
1025,
1065,
2425,
1006,
1007,
1063,
2709,
2023,
1012,
2171,
1009,
1000,
1024,
1000,
1009,
2023,
1012,
2287,
1025,
1065,
1065,
13075,
1052,
1024,
2711,
1025,
1052,
1027,
2047,
2711,
1006,
1007,
1025,
1013,
1013,
100,
3229,
5668,
100,
1052,
1012,
2171,
1027,
1000,
20116,
14787,
18232,
2080,
1000,
1025,
1013,
1013,
100,
10763,
100,
2711,
1012,
2287,
1027,
2423,
1025,
1013,
1013,
1052,
1012,
2287,
1027,
2423,
1025,
9499,
1006,
1052,
1012,
2425,
1006,
1007,
1007,
1025,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
import getDocument from './get-document';
export default function(node) {
const _document = getDocument(node);
return _document.defaultView || window;
}
|
DNACodeStudios/ally.js
|
src/util/get-window.js
|
JavaScript
|
mit
| 159
|
[
30522,
12324,
2131,
3527,
24894,
4765,
2013,
1005,
1012,
1013,
2131,
1011,
6254,
1005,
1025,
9167,
12398,
3853,
1006,
13045,
1007,
1063,
9530,
3367,
1035,
6254,
1027,
2131,
3527,
24894,
4765,
1006,
13045,
1007,
1025,
2709,
1035,
6254,
1012,
12398,
8584,
1064,
1064,
3332,
1025,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<!--Converted with LaTeX2HTML 2002-2-1 (1.70)
original version by: Nikos Drakos, CBLU, University of Leeds
* revised and updated by: Marcus Hennecke, Ross Moore, Herb Swan
* with significant contributions from:
Jens Lippmann, Marek Rouchal, Martin Wilck and others -->
<HTML>
<HEAD>
<TITLE>new()</TITLE>
<META NAME="description" CONTENT="new()">
<META NAME="keywords" CONTENT="manual">
<META NAME="resource-type" CONTENT="document">
<META NAME="distribution" CONTENT="global">
<META NAME="Generator" CONTENT="LaTeX2HTML v2002-2-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">
<LINK REL="STYLESHEET" HREF="manual.css">
<LINK REL="next" HREF="node20.html">
<LINK REL="previous" HREF="node18.html">
<LINK REL="up" HREF="node18.html">
<LINK REL="next" HREF="node20.html">
</HEAD>
<BODY >
<!--Navigation Panel-->
<A NAME="tex2html569"
HREF="node20.html">
<IMG WIDTH="37" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="next"
SRC="file:/sw/share/lib/latex2html/icons/next.png"></A>
<A NAME="tex2html565"
HREF="node18.html">
<IMG WIDTH="26" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="up"
SRC="file:/sw/share/lib/latex2html/icons/up.png"></A>
<A NAME="tex2html559"
HREF="node18.html">
<IMG WIDTH="63" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="previous"
SRC="file:/sw/share/lib/latex2html/icons/prev.png"></A>
<A NAME="tex2html567"
HREF="node1.html">
<IMG WIDTH="65" HEIGHT="24" ALIGN="BOTTOM" BORDER="0" ALT="contents"
SRC="file:/sw/share/lib/latex2html/icons/contents.png"></A>
<BR>
<B> Next:</B> <A NAME="tex2html570"
HREF="node20.html">_init()</A>
<B> Up:</B> <A NAME="tex2html566"
HREF="node18.html">Methods</A>
<B> Previous:</B> <A NAME="tex2html560"
HREF="node18.html">Methods</A>
<B> <A NAME="tex2html568"
HREF="node1.html">Contents</A></B>
<BR>
<BR>
<!--End of Navigation Panel-->
<H3><A NAME="SECTION00041100000000000000"></A><A NAME="Algorithm::new"></A>
<BR>
<TT>new()</TT>
</H3>
<I>Arguments:</I> <A HREF="node40.html#xref:Population"><TT>Population</TT></A> <code>=></code> <SMALL>OBJECT</SMALL>, <SMALL>ATTRIBUTE-HASH</SMALL> (optional)
<BR><I>Return value:</I> <SMALL>OBJECT</SMALL>
<BR><I>Defined in:</I> PerlGPObject.pm
<BR><I>Mainly called by:</I> perlgp-run.pl
<BR><I>Usually calls:</I> <TT>_init()</TT>
<BR><I>Relevant attributes:</I> all
<BR>
<P>
This is the constructor, but you probably don't need to call it
directly, except in specialist applications. A Population object must
be given in the argument hash. Other attributes may also be
specified in the argument hash, but note that the ``usual'' way to
set these attributes is to edit Algorithm.pm in the experiment
directory.
<P>
<BR><HR>
<ADDRESS>
Peter Aarestad
2006-04-11
</ADDRESS>
</BODY>
</HTML>
|
aarestad/gradschool-stuff
|
perlgp/docs/manual/manual/node19.html
|
HTML
|
gpl-2.0
| 2,789
|
[
30522,
1026,
999,
9986,
13874,
16129,
2270,
1000,
1011,
1013,
1013,
1059,
2509,
2278,
1013,
1013,
26718,
2094,
16129,
1017,
1012,
1016,
2345,
1013,
1013,
4372,
1000,
1028,
1026,
999,
1011,
1011,
4991,
2007,
2397,
2595,
2475,
11039,
19968,
2526,
1011,
1016,
1011,
1015,
1006,
1015,
1012,
3963,
1007,
2434,
2544,
2011,
1024,
23205,
2891,
2852,
20411,
2015,
1010,
17324,
7630,
1010,
2118,
1997,
7873,
1008,
8001,
1998,
7172,
2011,
1024,
6647,
21863,
18278,
2063,
1010,
5811,
5405,
1010,
12810,
10677,
1008,
2007,
3278,
5857,
2013,
1024,
25093,
5423,
9737,
11639,
1010,
29318,
20996,
10875,
2389,
1010,
3235,
19863,
3600,
1998,
2500,
1011,
1011,
1028,
1026,
16129,
1028,
1026,
2132,
1028,
1026,
2516,
1028,
2047,
1006,
1007,
1026,
1013,
2516,
1028,
1026,
18804,
2171,
1027,
1000,
6412,
1000,
4180,
1027,
1000,
2047,
1006,
1007,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
3145,
22104,
1000,
4180,
1027,
1000,
6410,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
7692,
1011,
2828,
1000,
4180,
1027,
1000,
6254,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
4353,
1000,
4180,
1027,
1000,
3795,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
13103,
1000,
4180,
1027,
1000,
2397,
2595,
2475,
11039,
19968,
1058,
28332,
2475,
1011,
1016,
1011,
1015,
1000,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
4180,
1011,
2806,
1011,
2828,
1000,
4180,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
30524,
1027,
1000,
2279,
1000,
17850,
12879,
1027,
1000,
13045,
11387,
1012,
16129,
1000,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
3025,
1000,
17850,
12879,
1027,
1000,
13045,
15136,
1012,
16129,
1000,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
2039,
1000,
17850,
12879,
1027,
1000,
13045,
15136,
1012,
16129,
1000,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
2279,
1000,
17850,
12879,
1027,
1000,
13045,
11387,
1012,
16129,
1000,
1028,
1026,
1013,
2132,
1028,
1026,
2303,
1028,
1026,
999,
1011,
1011,
9163,
5997,
1011,
1011,
1028,
1026,
1037,
2171,
1027,
1000,
16060,
2475,
11039,
19968,
26976,
2683,
1000,
17850,
12879,
1027,
1000,
13045,
11387,
1012,
16129,
1000,
1028,
1026,
10047,
2290,
9381,
1027,
1000,
4261,
1000,
4578,
1027,
1000,
2484,
1000,
25705,
1027,
1000,
3953,
1000,
3675,
1027,
1000,
1014,
1000,
12456,
1027,
1000,
2279,
1000,
5034,
2278,
1027,
1000,
5371,
1024,
1013,
25430,
1013,
3745,
1013,
5622,
2497,
1013,
2397,
2595,
2475,
11039,
19968,
1013,
18407,
1013,
2279,
1012,
1052,
3070,
1000,
1028,
1026,
1013,
1037,
1028,
1026,
1037,
2171,
1027,
1000,
16060,
2475,
11039,
19968,
26976,
2629,
1000,
17850,
12879,
1027,
1000,
13045,
15136,
1012,
16129,
1000,
1028,
1026,
10047,
2290,
9381,
1027,
1000,
2656,
1000,
4578,
1027,
1000,
2484,
1000,
25705,
1027,
1000,
3953,
1000,
3675,
1027,
1000,
1014,
1000,
12456,
1027,
1000,
2039,
1000,
5034,
2278,
1027,
1000,
5371,
1024,
1013,
25430,
1013,
3745,
1013,
5622,
2497,
1013,
2397,
2595,
2475,
11039,
19968,
1013,
18407,
1013,
2039,
1012,
1052,
3070,
1000,
1028,
1026,
1013,
1037,
1028,
1026,
30523,
6782,
21030,
2102,
1000,
17850,
12879,
1027,
1000,
6410,
1012,
20116,
2015,
1000,
1028,
1026,
4957,
2128,
2140,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
6782,
21030,
2102,
1000,
17850,
12879,
1027,
1000,
6410,
1012,
20116,
2015,
1000,
1028,
1026,
4957,
2128,
2140,
30526
] |
var superagent = require('superagent')
var env = process.env
/**
* put_doc
* initialize with the couchdb to save to
*
* expects that the url, port, username, password are in environment
* variables. If not, add these to the options object.
*
* var cuser = env.COUCHDB_USER ;
* var cpass = env.COUCHDB_PASS ;
* var chost = env.COUCHDB_HOST || '127.0.0.1';
* var cport = env.COUCHDB_PORT || 5984;
*
* Options:
*
* {"cuser":"somerthineg",
* "cpass":"password",
* "chost":"couchdb host",
* "cport":"couchdb port", // must be a number
* "cdb" :"the%2fcouchdb%2fto%2fuse" // be sure to properly escape your db names
* }
*
* If you don't need user/pass to create docs, feel free to skip
* these. I only try to use credentials if these are truthy
*
* returns a function that will save new entries
*
* to create a new doc in couchdb, call with the
* object that is the doc, plus a callback
*
* The object should be a couchdb doc, but th _id field is optional.
*
* but highly recommended
*
* The first argument to the callback is whether there is an error in
* the requqest, the second is the json object returned from couchdb,
* whcih should have the save state of the document (ok or rejected)
*
*/
function put_doc(opts){
if(opts.cdb === undefined)
throw new Error('must define the {"cdb":"dbname"} option')
var cuser = env.COUCHDB_USER
var cpass = env.COUCHDB_PASS
var chost = env.COUCHDB_HOST || '127.0.0.1'
var cport = env.COUCHDB_PORT || 5984
// override env. vars
if(opts.cuser !== undefined) cuser = opts.cuser
if(opts.cpass !== undefined) cpass = opts.cpass
if(opts.chost !== undefined) chost = opts.chost
if(opts.cport !== undefined) cport = +opts.cport
var couch = 'http://'+chost+':'+cport
if(/http/.test(chost)) couch = chost+':'+cport
var overwrite = false
function put(doc,next){
var uri = couch+'/'+opts.cdb
var req
if(overwrite && doc._id !== undefined){
uri += '/'+doc._id
superagent.head(uri)
.end(function(err,res){
if(res.header.etag){
doc._rev=JSON.parse(res.headers.etag)
}
var req = superagent.put(uri)
.type('json')
.set('accept','application/json')
if(cuser && cpass){
req.auth(cuser,cpass)
}
req.send(doc)
req.end(function(e,r){
if(e) return next(e)
return next(null,r.body)
})
})
}else{
if(doc._id !== undefined){
uri += '/'+doc._id
req = superagent.put(uri)
}else{
req = superagent.post(uri)
}
req.type('json')
.set('accept','application/json')
if(cuser && cpass){
req.auth(cuser,cpass)
}
req.send(doc)
req.end(function(e,r){
if(e) return next(e)
return next(null,r.body)
})
}
return null
}
put.overwrite = function(setting){
if(setting === undefined){
return overwrite
}
overwrite = setting
return overwrite
}
return put
}
module.exports=put_doc
|
jmarca/couchdb_put_doc
|
lib/put_doc.js
|
JavaScript
|
mit
| 3,419
|
[
30522,
13075,
3565,
4270,
3372,
1027,
5478,
1006,
1005,
3565,
4270,
3372,
1005,
1007,
13075,
4372,
2615,
30524,
2008,
1996,
24471,
2140,
1010,
3417,
1010,
5310,
18442,
1010,
20786,
2024,
1999,
4044,
1008,
10857,
1012,
2065,
2025,
1010,
5587,
2122,
2000,
1996,
7047,
4874,
1012,
1008,
1008,
13075,
12731,
8043,
1027,
4372,
2615,
1012,
6411,
18939,
1035,
5310,
1025,
1008,
13075,
18133,
12054,
1027,
4372,
2615,
1012,
6411,
18939,
1035,
3413,
1025,
1008,
13075,
16480,
3367,
1027,
4372,
2615,
1012,
6411,
18939,
1035,
3677,
1064,
1064,
1005,
13029,
1012,
1014,
1012,
1014,
1012,
1015,
1005,
1025,
1008,
13075,
18133,
11589,
1027,
4372,
2615,
1012,
6411,
18939,
1035,
3417,
1064,
1064,
5354,
2620,
2549,
1025,
1008,
1008,
7047,
1024,
1008,
1008,
1063,
1000,
12731,
8043,
1000,
1024,
1000,
2070,
15265,
3170,
2290,
1000,
1010,
1008,
1000,
18133,
12054,
1000,
1024,
1000,
20786,
1000,
1010,
1008,
1000,
16480,
3367,
1000,
1024,
1000,
6411,
18939,
3677,
1000,
1010,
1008,
1000,
18133,
11589,
1000,
1024,
1000,
6411,
18939,
3417,
1000,
1010,
1013,
1013,
2442,
2022,
1037,
2193,
1008,
1000,
3729,
2497,
1000,
1024,
1000,
1996,
1003,
1016,
11329,
7140,
2818,
18939,
1003,
1016,
6199,
2080,
1003,
1016,
25608,
2063,
1000,
1013,
1013,
2022,
2469,
2000,
7919,
4019,
2115,
16962,
3415,
1008,
1065,
1008,
1008,
2065,
2017,
2123,
1005,
1056,
2342,
5310,
1013,
3413,
2000,
3443,
9986,
2015,
1010,
2514,
2489,
2000,
13558,
1008,
2122,
1012,
1045,
2069,
3046,
2000,
2224,
22496,
2065,
2122,
2024,
3606,
2100,
1008,
1008,
5651,
1037,
3853,
2008,
2097,
3828,
2047,
10445,
1008,
1008,
2000,
3443,
1037,
2047,
9986,
1999,
6411,
18939,
1010,
2655,
2007,
1996,
1008,
4874,
2008,
2003,
1996,
9986,
1010,
4606,
1037,
2655,
5963,
1008,
1008,
1996,
4874,
2323,
2022,
1037,
6411,
18939,
9986,
1010,
2021,
16215,
1035,
8909,
2492,
2003,
11887,
1012,
1008,
1008,
2021,
3811,
6749,
1008,
1008,
1996,
2034,
6685,
2000,
1996,
2655,
5963,
2003,
3251,
2045,
2003,
2019,
7561,
1999,
1008,
1996,
2128,
28940,
4160,
4355,
1010,
1996,
2117,
2003,
1996,
1046,
3385,
4874,
2513,
2013,
6411,
18939,
1010,
1008,
1059,
16257,
19190,
2323,
2031,
1996,
3828,
2110,
1997,
1996,
6254,
1006,
7929,
2030,
5837,
1007,
1008,
1008,
1013,
3853,
2404,
1035,
9986,
1006,
23569,
2015,
1007,
1063,
2065,
1006,
23569,
2015,
1012,
3729,
2497,
1027,
1027,
1027,
6151,
28344,
1007,
5466,
2047,
7561,
1006,
1005,
2442,
9375,
1996,
1063,
1000,
3729,
2497,
1000,
1024,
1000,
16962,
18442,
1000,
1065,
5724,
1005,
1007,
13075,
12731,
8043,
1027,
4372,
2615,
1012,
6411,
18939,
1035,
5310,
13075,
18133,
12054,
1027,
4372,
2615,
1012,
6411,
18939,
1035,
3413,
13075,
16480,
3367,
1027,
4372,
2615,
1012,
6411,
18939,
1035,
3677,
1064,
1064,
1005,
13029,
1012,
1014,
1012,
1014,
1012,
1015,
1005,
13075,
18133,
11589,
1027,
4372,
2615,
1012,
6411,
18939,
1035,
3417,
1064,
1064,
5354,
2620,
2549,
1013,
1013,
2058,
15637,
4372,
2615,
1012,
13075,
2015,
2065,
1006,
23569,
2015,
1012,
12731,
30523,
1027,
2832,
1012,
4372,
2615,
1013,
1008,
1008,
1008,
2404,
1035,
9986,
1008,
3988,
4697,
2007,
1996,
6411,
18939,
2000,
3828,
2000,
1008,
1008,
24273,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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1027,
2832,
1012,
4372,
2615,
1013,
1008,
1008,
1008,
2404,
1035,
9986,
1008,
3988,
4697,
2007,
1996,
6411,
18939,
2000,
3828,
2000,
1008,
1008,
24273,
30526
] |
{% extends "admin/base/base_add.html" %}
{% block form %}
<form role="form" method="post" class="form form-horizontal" id="form-admin-add" enctype="multipart/form-data">
<div class="row cl">
<div class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>{{ form.language_id.label }}:</div>
<div class="formControls col-xs-4 col-sm-3">
<span class="select-box">{{ form.language_id }}</span>
{% for error in form.language_id.errors %}
<span class="c-red">{{ error }}</span>
{% endfor %}
</div>
</div>
<div class="row cl">
<div class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>{{ form.title.label }}:</div>
<div class="formControls col-xs-8 col-sm-9">
{{ form.title(value=featured.title) }}
{% for error in form.title.errors %}
<span class="c-red">{{ error }}</span>
{% endfor %}
</div>
</div>
<div class="row cl">
<div class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>{{ form.image.label }}:</div>
<div class="formControls col-xs-8 col-sm-9">
{{ form.image }}
{% for error in form.image.errors %}
<span class="c-red">{{ error }}</span>
{% endfor %}
<br/>
<br/>
<img class="picture-thumb" src="{{ url_for("static",filename="uploads/"+featured.image) }}"
width="100">
</div>
</div>
<div class="row cl">
<div class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>{{ form.url.label }}:</div>
<div class="formControls col-xs-8 col-sm-9">
{{ form.url(value=featured.url) }}
{% for error in form.url.errors %}
<span class="c-red">{{ error }}</span>
{% endfor %}
</div>
</div>
<div class="row cl">
<div class="form-label col-xs-4 col-sm-3"><span class="c-red">*</span>{{ form.status.label }}:</div>
<div class="formControls col-xs-4 col-sm-3">
<span class="select-box">{{ form.status }}</span>
{% for error in form.status.errors %}
<span class="c-red">{{ error }}</span>
{% endfor %}
</div>
</div>
<div class="row cl">
<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-3">
{{ form.csrf_token }}
{{ form.submit }}
</div>
</div>
</form>
{% endblock %}
{% block frontend %}
<script type="text/javascript"
src="{{ url_for("static",filename="admin/lib/jquery.validation/1.14.0/jquery.validate.js") }}"></script>
<script type="text/javascript"
src="{{ url_for("static",filename="admin/lib/jquery.validation/1.14.0/validate-methods.js") }}"></script>
<script type="text/javascript"
src="{{ url_for("static",filename="admin/lib/jquery.validation/1.14.0/messages_zh.js") }}"></script>
<script type="text/javascript" src="{{ url_for("static",filename="admin/h-ui.admin/js/dialog.js") }}"></script>
{% for message in get_flashed_messages(category_filter=["error"]) %}
<script type="text/javascript">
var msg = "{{ message }}";
if (msg) {
dialog.error(msg);
}
</script>
{% endfor %}
{% for message in get_flashed_messages(category_filter=["ok"]) %}
<script type="text/javascript">
var msg = "{{ message }}";
if (msg) {
dialog.success(msg);
}
</script>
{% endfor %}
<script type="text/javascript">
$(function () {
});
</script>
{% endblock %}
|
jinxiu89/flask_star
|
app/templates/admin/content/featured_edit.html
|
HTML
|
gpl-3.0
| 3,967
|
[
30522,
1063,
1003,
8908,
1000,
4748,
10020,
1013,
2918,
1013,
2918,
1035,
5587,
1012,
16129,
1000,
1003,
1065,
1063,
1003,
3796,
2433,
1003,
1065,
1026,
2433,
2535,
1027,
1000,
2433,
1000,
4118,
1027,
1000,
2695,
1000,
2465,
1027,
1000,
2433,
2433,
1011,
9876,
1000,
8909,
1027,
1000,
2433,
1011,
4748,
10020,
1011,
5587,
1000,
4372,
6593,
18863,
1027,
1000,
4800,
19362,
2102,
1013,
2433,
1011,
2951,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
5216,
18856,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
2433,
1011,
3830,
8902,
1011,
1060,
2015,
1011,
1018,
8902,
1011,
15488,
1011,
1017,
1000,
1028,
1026,
8487,
2465,
1027,
1000,
1039,
1011,
2417,
1000,
1028,
1008,
1026,
1013,
8487,
1028,
1063,
1063,
2433,
1012,
2653,
1035,
8909,
1012,
3830,
1065,
1065,
1993,
1026,
1013,
4487,
2615,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
2433,
8663,
13181,
4877,
8902,
1011,
1060,
2015,
1011,
1018,
8902,
1011,
15488,
1011,
1017,
1000,
1028,
1026,
8487,
2465,
1027,
1000,
7276,
1011,
3482,
1000,
1028,
1063,
1063,
2433,
1012,
2653,
1035,
8909,
1065,
1065,
1026,
1013,
8487,
1028,
1063,
1003,
2005,
7561,
1999,
2433,
1012,
2653,
1035,
8909,
1012,
10697,
1003,
1065,
1026,
8487,
2465,
1027,
1000,
1039,
1011,
2417,
1000,
1028,
1063,
1063,
7561,
1065,
1065,
1026,
1013,
8487,
1028,
1063,
1003,
2203,
29278,
1003,
1065,
1026,
1013,
4487,
2615,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
5216,
18856,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
2433,
1011,
3830,
8902,
1011,
1060,
2015,
1011,
1018,
8902,
1011,
15488,
1011,
1017,
1000,
1028,
1026,
8487,
2465,
1027,
1000,
1039,
1011,
2417,
1000,
1028,
1008,
1026,
1013,
8487,
1028,
1063,
1063,
2433,
1012,
2516,
1012,
3830,
1065,
1065,
1993,
1026,
1013,
4487,
2615,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
2433,
8663,
13181,
4877,
8902,
1011,
1060,
2015,
1011,
1022,
8902,
1011,
15488,
1011,
1023,
1000,
1028,
1063,
1063,
2433,
1012,
2516,
1006,
3643,
1027,
2956,
1012,
2516,
1007,
1065,
1065,
1063,
1003,
2005,
7561,
30524,
2203,
29278,
1003,
1065,
1026,
1013,
4487,
2615,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
5216,
18856,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
2433,
1011,
3830,
8902,
1011,
1060,
2015,
1011,
1018,
8902,
1011,
15488,
1011,
1017,
1000,
1028,
1026,
8487,
2465,
1027,
1000,
1039,
1011,
2417,
1000,
1028,
1008,
1026,
1013,
8487,
1028,
1063,
1063,
2433,
1012,
3746,
1012,
3830,
1065,
1065,
1993,
1026,
1013,
4487,
2615,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
2433,
8663,
13181,
4877,
8902,
1011,
1060,
2015,
1011,
1022,
8902,
1011,
15488,
1011,
1023,
1000,
1028,
1063,
1063,
2433,
1012,
3746,
1065,
1065,
1063,
1003,
2005,
7561,
1999,
2433,
1012,
3746,
1012,
10697,
1003,
1065,
1026,
8487,
2465,
1027,
1000,
1039,
1011,
2417,
1000,
1028,
1063,
1063,
7561,
1065,
1065,
1026,
1013,
8487,
1028,
1063,
1003,
2203,
30523,
1999,
2433,
1012,
2516,
1012,
10697,
1003,
1065,
1026,
8487,
2465,
1027,
1000,
1039,
1011,
2417,
1000,
1028,
1063,
1063,
7561,
1065,
1065,
1026,
1013,
8487,
1028,
1063,
1003,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1999,
2433,
1012,
2516,
1012,
10697,
1003,
1065,
1026,
8487,
2465,
1027,
1000,
1039,
1011,
2417,
1000,
1028,
1063,
1063,
7561,
1065,
1065,
1026,
1013,
8487,
1028,
1063,
1003,
30526
] |
# Dactylis glomerata var. hispanica VARIETY
#### Status
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
Cat. Bot. 1:8. 1797
#### Original name
null
### Remarks
null
|
mdoering/backbone
|
life/Plantae/Magnoliophyta/Liliopsida/Poales/Poaceae/Dactylis/Dactylis glomerata/ Syn. Dactylis glomerata hispanica/README.md
|
Markdown
|
apache-2.0
| 205
|
[
30522,
1001,
4830,
6593,
8516,
2483,
1043,
21297,
6906,
2696,
13075,
1012,
6696,
2050,
3528,
1001,
1001,
1001,
1001,
3570,
10675,
1001,
1001,
1001,
1001,
2429,
2000,
1996,
10161,
1997,
2166,
1010,
3822,
2254,
2249,
1001,
1001,
1001,
1001,
2405,
1999,
4937,
1012,
28516,
1012,
1015,
1024,
1022,
1012,
14112,
1001,
1001,
1001,
1001,
2434,
2171,
19701,
1001,
1001,
1001,
12629,
19701,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
phpoutputencoders
=================
XSS Prevention Output Encoding Library
|
jullrich/phpoutputencoders
|
README.md
|
Markdown
|
gpl-2.0
| 76
|
[
30522,
25718,
5833,
18780,
2368,
16044,
2869,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
body {
/* font-family: 'Lato', sans-serif; */
font-family: -apple-system, "Segoe UI", Roboto, Oxygen,
Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
font-size: 14px;
margin: 5px;
}
input{
padding: 8px;
}
.preview{
border: 1px solid black;
width: 800px;
padding: 1rem;
}
.border-bottom-black{
border-bottom: 1px solid black;
}
.d-flex{
display: flex;
}
.d-inline-block{
display: inline-block;
}
.space-between{
justify-content: space-between;
}
.mt-0{
margin-top: 0rem;
}
.mt-1{
margin-top: 0.5rem;
}
.mt-2{
margin-top: 1rem;
}
.mt-4{
margin-top: 2rem;
}
.ml-0{
margin-left: 0rem;
}
.ml-1{
margin-left: 0.5rem;
}
.mr-1{
margin-right: 0.5rem;
}
.mr-3{
margin-right: 1.5rem;
}
.mb-0{
margin-bottom: 0;
}
.mb-1{
margin-bottom: 0.5rem;
}
.mx-1{
margin-left: 0.5rem;
margin-right: 0.5rem;
}
.w-full{
width: 100%;
}
.w-60{
width: 60px;
}
.w-50{
width: 50px;
}
.w-100{
width: 100px;
}
.w-120{
width: 120px;
}
.w-150{
width: 150px;
}
.min-w-160{
min-width: 160px;
}
.flex-grow-2{
flex-grow: 2;
}
.flex-basis-120{
flex-basis: 120px;
}
.flex-column{
flex-direction: column;
}
.align-baseline{
align-items: baseline;
}
.capitalize{
text-transform: capitalize;
}
.scroll-x{
overflow-x: scroll;
}
.checkbox{
width: 20px;
height: 20px;
border: 1px solid black;
text-align: center;
overflow: hidden;
}
.signature{
width: 80%;
height: 70px;
margin-bottom: -20px;
}
#signature_p > hr{
z-index: 2;
position: relative;
height: 1px;
background-color: black;
}
@media only screen and (max-width: 500px) {
.w-80-xs{
width: 80%;
}
}
|
amitozdeol/amitozdeol.github.io
|
project/rent/main.css
|
CSS
|
mit
| 1,757
|
[
30522,
2303,
1063,
1013,
1008,
15489,
1011,
2155,
1024,
1005,
2474,
3406,
1005,
1010,
20344,
1011,
14262,
10128,
1025,
1008,
1013,
15489,
1011,
2155,
1024,
1011,
6207,
1011,
2291,
1010,
1000,
7367,
3995,
2063,
21318,
1000,
1010,
8957,
2080,
1010,
7722,
1010,
1057,
8569,
3372,
2226,
1010,
2064,
7559,
5349,
1010,
1000,
21554,
2050,
20344,
1000,
1010,
1000,
2852,
9314,
20344,
1000,
1010,
1000,
2002,
2140,
19510,
5555,
27713,
1000,
1010,
20344,
1011,
14262,
10128,
1025,
15489,
1011,
2946,
1024,
2403,
2361,
2595,
1025,
7785,
1024,
1019,
2361,
30524,
4667,
1024,
1022,
2361,
2595,
1025,
1065,
1012,
19236,
1063,
3675,
1024,
1015,
2361,
2595,
5024,
2304,
1025,
9381,
1024,
5385,
2361,
2595,
1025,
11687,
4667,
1024,
1015,
28578,
1025,
1065,
1012,
3675,
1011,
3953,
1011,
2304,
1063,
3675,
1011,
3953,
1024,
1015,
2361,
2595,
5024,
2304,
1025,
1065,
1012,
1040,
1011,
23951,
1063,
4653,
1024,
23951,
1025,
1065,
1012,
1040,
1011,
23881,
1011,
3796,
1063,
4653,
1024,
23881,
1011,
3796,
1025,
1065,
1012,
2686,
1011,
2090,
1063,
16114,
1011,
4180,
1024,
2686,
1011,
2090,
1025,
1065,
1012,
11047,
1011,
1014,
1063,
7785,
1011,
2327,
1024,
1014,
28578,
1025,
1065,
1012,
11047,
1011,
1015,
1063,
7785,
1011,
2327,
1024,
1014,
1012,
1019,
28578,
1025,
1065,
1012,
11047,
1011,
1016,
1063,
7785,
1011,
2327,
1024,
1015,
28578,
1025,
1065,
1012,
11047,
1011,
1018,
1063,
7785,
1011,
2327,
1024,
1016,
28578,
1025,
1065,
1012,
19875,
1011,
1014,
1063,
7785,
1011,
2187,
1024,
1014,
28578,
1025,
1065,
1012,
19875,
1011,
1015,
1063,
7785,
1011,
2187,
1024,
1014,
1012,
1019,
28578,
1025,
1065,
1012,
2720,
1011,
1015,
1063,
7785,
1011,
2157,
1024,
1014,
1012,
1019,
28578,
1025,
1065,
1012,
2720,
1011,
1017,
1063,
7785,
1011,
2157,
1024,
1015,
1012,
1019,
28578,
1025,
1065,
1012,
16914,
1011,
1014,
1063,
7785,
1011,
3953,
1024,
1014,
1025,
1065,
1012,
16914,
1011,
1015,
1063,
7785,
1011,
3953,
1024,
1014,
1012,
1019,
28578,
1025,
1065,
1012,
25630,
1011,
1015,
1063,
7785,
1011,
2187,
1024,
1014,
1012,
1019,
28578,
1025,
7785,
1011,
2157,
1024,
1014,
1012,
1019,
28578,
1025,
1065,
1012,
1059,
1011,
2440,
1063,
9381,
1024,
2531,
1003,
1025,
1065,
1012,
1059,
1011,
3438,
1063,
9381,
1024,
3438,
2361,
2595,
1025,
1065,
1012,
1059,
1011,
2753,
1063,
9381,
1024,
2753,
2361,
2595,
1025,
1065,
1012,
1059,
1011,
2531,
1063,
9381,
1024,
2531,
2361,
2595,
1025,
1065,
1012,
1059,
1011,
6036,
1063,
9381,
1024,
6036,
2361,
2595,
1025,
1065,
1012,
1059,
1011,
5018,
1063,
9381,
1024,
5018,
2361,
2595,
1025,
1065,
1012,
8117,
1011,
1059,
1011,
8148,
1063,
8117,
1011,
9381,
1024,
8148,
2361,
2595,
1025,
1065,
1012,
23951,
1011,
4982,
1011,
1016,
1063,
23951,
1011,
4982,
1024,
1016,
1025,
1065,
1012,
23951,
1011,
3978,
1011,
6036,
1063,
23951,
1011,
3978,
1024,
6036,
2361,
2595,
1025,
1065,
1012,
23951,
1011,
5930,
1063,
23951,
1011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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2595,
1025,
1065,
7953,
1063,
11687,
30526
] |
<?php
/*
* This file is part of the FOSUserBundle package.
*
* (c) FriendsOfSymfony <http://friendsofsymfony.github.com/>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace FOS\UserBundle\Model;
/**
* Interface to be implemented by group managers. This adds an additional level
* of abstraction between your application, and the actual repository.
*
* All changes to groups should happen through this interface.
*
* @author Christophe Coevoet <stof@notk.org>
*/
interface GroupManagerInterface {
/**
* Returns an empty group instance.
*
* @param string $name
* @return GroupInterface
*/
function createGroup($name);
/**
* Deletes a group.
*
* @param GroupInterface $group
* @return void
*/
function deleteGroup(GroupInterface $group);
/**
* Finds one group by the given criteria.
*
* @param array $criteria
* @return GroupInterface
*/
function findGroupBy(array $criteria);
/**
* Finds a group by name.
*
* @param string $name
* @return GroupInterface
*/
function findGroupByName($name);
/**
* Returns a collection with all user instances.
*
* @return \Traversable
*/
function findGroups();
/**
* Returns the group's fully qualified class name.
*
* @return string
*/
function getClass();
/**
* Updates a group.
*
* @param GroupInterface $group
*/
function updateGroup(GroupInterface $group);
}
|
lolostates/Lap
|
vendor/bundles/FOS/UserBundle/Model/GroupManagerInterface.php
|
PHP
|
agpl-3.0
| 1,483
|
[
30522,
1026,
1029,
25718,
1013,
1008,
1008,
2023,
5371,
2003,
2112,
1997,
1996,
1042,
2891,
20330,
27265,
2571,
7427,
1012,
1008,
1008,
1006,
1039,
1007,
2814,
11253,
6508,
2213,
14876,
4890,
1026,
8299,
1024,
1013,
1013,
2814,
11253,
6508,
2213,
14876,
4890,
1012,
21025,
2705,
12083,
1012,
4012,
1013,
1028,
1008,
1008,
2005,
1996,
2440,
9385,
1998,
6105,
2592,
1010,
3531,
3193,
1996,
6105,
1008,
5371,
2008,
2001,
5500,
2007,
2023,
3120,
3642,
1012,
1008,
1013,
3415,
15327,
1042,
2891,
1032,
5310,
27265,
2571,
1032,
2944,
1025,
1013,
1008,
1008,
1008,
8278,
2000,
2022,
7528,
2011,
2177,
10489,
1012,
2023,
9909,
2019,
3176,
2504,
1008,
1997,
24504,
2090,
2115,
4646,
1010,
1998,
1996,
5025,
22409,
1012,
1008,
1008,
2035,
3431,
2000,
2967,
2323,
4148,
2083,
2023,
8278,
1012,
1008,
1008,
1030,
3166,
23978,
24873,
6767,
3388,
1026,
2358,
11253,
1030,
2025,
2243,
1012,
8917,
1028,
1008,
1013,
8278,
2177,
24805,
4590,
18447,
2121,
30524,
1012,
1008,
1008,
1030,
11498,
2213,
2177,
18447,
2121,
12172,
1002,
2177,
1008,
1030,
2709,
11675,
1008,
1013,
3853,
3972,
12870,
17058,
1006,
2177,
18447,
2121,
12172,
1002,
2177,
1007,
1025,
1013,
1008,
1008,
1008,
4858,
2028,
2177,
2011,
1996,
2445,
9181,
1012,
1008,
1008,
1030,
11498,
2213,
9140,
1002,
9181,
1008,
1030,
2709,
2177,
18447,
2121,
12172,
1008,
1013,
3853,
2424,
17058,
3762,
1006,
9140,
1002,
9181,
1007,
1025,
1013,
1008,
1008,
1008,
4858,
1037,
2177,
2011,
2171,
1012,
1008,
1008,
1030,
11498,
2213,
5164,
1002,
2171,
1008,
1030,
2709,
2177,
18447,
2121,
12172,
1008,
1013,
3853,
2424,
17058,
3762,
18442,
1006,
1002,
2171,
1007,
1025,
1013,
1008,
1008,
1008,
5651,
1037,
3074,
2007,
2035,
5310,
12107,
1012,
1008,
1008,
1030,
2709,
1032,
29053,
3085,
1008,
1013,
3853,
2424,
17058,
2015,
1006,
1007,
1025,
1013,
1008,
1008,
1008,
5651,
1996,
2177,
1005,
1055,
3929,
4591,
2465,
2171,
1012,
1008,
1008,
1030,
2709,
5164,
1008,
1013,
3853,
2131,
26266,
1006,
1007,
1025,
1013,
1008,
1008,
1008,
14409,
1037,
2177,
1012,
1008,
1008,
1030,
11498,
2213,
2177,
18447,
2121,
12172,
1002,
2177,
1008,
1013,
3853,
10651,
17058,
1006,
2177,
18447,
2121,
12172,
1002,
2177,
1007,
1025,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
12172,
1063,
1013,
1008,
1008,
1008,
5651,
2019,
4064,
2177,
6013,
1012,
1008,
1008,
1030,
11498,
2213,
5164,
1002,
2171,
1008,
1030,
2709,
2177,
18447,
2121,
12172,
1008,
1013,
3853,
3443,
17058,
1006,
1002,
2171,
1007,
1025,
1013,
1008,
1008,
1008,
3972,
12870,
2015,
1037,
2177,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
12172,
1063,
1013,
1008,
1008,
1008,
5651,
2019,
4064,
2177,
6013,
1012,
1008,
1008,
1030,
11498,
2213,
5164,
1002,
2171,
1008,
1030,
2709,
2177,
18447,
2121,
12172,
1008,
1013,
3853,
3443,
17058,
1006,
1002,
2171,
1007,
1025,
1013,
1008,
1008,
1008,
3972,
12870,
2015,
1037,
2177,
30526
] |
#include <sstream>
#include <time.h>
#include <sys/time.h>
#include <iomanip>
#include <boost/filesystem/path.hpp>
#include <SpatialDomains/MeshGraph2D.h>
#include <MultiRegions/DisContField2D.h>
#ifdef NEKTAR_USING_CHUD
#include <CHUD/CHUD.h>
//#define SHARK
#endif
using namespace Nektar;
std::string PortablePath(const boost::filesystem::path& path);
int main(int argc, char *argv[])
{
MultiRegions::DisContField2DSharedPtr Exp,Fce,Sol;
int i, nq, coordim;
Array<OneD,NekDouble> fce,sol;
Array<OneD,NekDouble> xc0,xc1,xc2;
NekDouble lambda;
vector<string> vFilenames;
if(argc != 5)
{
fprintf(stderr,"Usage: TimingHDGHelmSolve2D Type MeshSize NumModes OptimisationLevel\n");
fprintf(stderr," where: - Type is one of the following:\n");
fprintf(stderr," 1: Regular Quadrilaterals \n");
fprintf(stderr," 2: Deformed Quadrilaterals (may not be supported) \n");
fprintf(stderr," 3: Regular Triangles \n");
fprintf(stderr," where: - MeshSize is 1/h \n");
fprintf(stderr," where: - NumModes is the number of 1D modes of the expansion \n");
fprintf(stderr," where: - OptimisationLevel is one of the following:\n");
fprintf(stderr," 0: Use elemental sum-factorisation evaluation \n");
fprintf(stderr," 2: Use elemental matrix evaluation using blockmatrices \n");
fprintf(stderr," 3: Use global matrix evaluation \n");
fprintf(stderr," 4: Use optimal evaluation (this option requires optimisation-files being set-up) \n");
exit(1);
}
boost::filesystem::path basePath(BASE_PATH);
int Type = atoi(argv[1]);
int MeshSize = atoi(argv[2]);
int NumModes = atoi(argv[3]);
int optLevel = atoi(argv[4]);
//----------------------------------------------
// Retrieve the necessary input files
stringstream MeshFileName;
stringstream MeshFileDirectory;
stringstream BCfileName;
stringstream ExpansionsFileName;
stringstream GlobOptFileName;
switch(Type)
{
case 1:
{
MeshFileDirectory << "RegularQuadMeshes";
MeshFileName << "UnitSquare_RegularQuadMesh_h_1_" << MeshSize << ".xml";
}
break;
case 2:
{
MeshFileDirectory << "DeformedQuadMeshes";
MeshFileName << "UnitSquare_DeformedQuadMesh_h_1_" << MeshSize << ".xml";
}
break;
case 3:
{
MeshFileDirectory << "RegularTriMeshes";
MeshFileName << "UnitSquare_RegularTriMesh_h_1_" << MeshSize << ".xml";
}
break;
default:
{
cerr << "Type should be equal to one of the following values: "<< endl;
cerr << " 1: Regular Quads" << endl;
cerr << " 2: Deformed Quads" << endl;
cerr << " 3: Regular Tris" << endl;
exit(1);
}
}
BCfileName << "UnitSquare_DirichletBoundaryConditions.xml";
ExpansionsFileName << "NektarExpansionsNummodes" << NumModes << ".xml";
switch(optLevel)
{
case 0:
{
GlobOptFileName << "NoGlobalMat.xml";
}
break;
case 2:
{
GlobOptFileName << "DoBlockMat.xml";
}
break;
case 3:
{
GlobOptFileName << "DoGlobalMat.xml";
}
break;
case 4:
{
ASSERTL0(false,"Optimisation level not set up");
}
break;
default:
{
ASSERTL0(false,"Unrecognised optimisation level");
}
}
boost::filesystem::path MeshFilePath = basePath /
boost::filesystem::path("InputFiles") /
boost::filesystem::path("Geometry") /
boost::filesystem::path(MeshFileDirectory.str()) /
boost::filesystem::path(MeshFileName.str());
vFilenames.push_back(PortablePath(MeshFilePath));
boost::filesystem::path BCfilePath = basePath /
boost::filesystem::path("InputFiles") /
boost::filesystem::path("Conditions") /
boost::filesystem::path(BCfileName.str());
vFilenames.push_back(PortablePath(BCfilePath));
boost::filesystem::path ExpansionsFilePath = basePath /
boost::filesystem::path("InputFiles") /
boost::filesystem::path("Expansions") /
boost::filesystem::path(ExpansionsFileName.str());
vFilenames.push_back(PortablePath(ExpansionsFilePath));
boost::filesystem::path GlobOptFilePath = basePath /
boost::filesystem::path("InputFiles") /
boost::filesystem::path("Optimisation") /
boost::filesystem::path(GlobOptFileName.str());
vFilenames.push_back(PortablePath(GlobOptFilePath));
//----------------------------------------------
LibUtilities::SessionReaderSharedPtr vSession
= LibUtilities::SessionReader::CreateInstance(argc, argv, vFilenames);
//----------------------------------------------
// Read in mesh from input file
SpatialDomains::MeshGraphSharedPtr graph2D = MemoryManager<SpatialDomains::MeshGraph2D>::AllocateSharedPtr(vSession);
//----------------------------------------------
//----------------------------------------------
// Print summary of solution details
lambda = vSession->GetParameter("Lambda");
//----------------------------------------------
//----------------------------------------------
// Define Expansion
Exp = MemoryManager<MultiRegions::DisContField2D>::
AllocateSharedPtr(vSession,graph2D,vSession->GetVariable(0));
//----------------------------------------------
int NumElements = Exp->GetExpSize();
//----------------------------------------------
// Set up coordinates of mesh for Forcing function evaluation
coordim = Exp->GetCoordim(0);
nq = Exp->GetTotPoints();
xc0 = Array<OneD,NekDouble>(nq,0.0);
xc1 = Array<OneD,NekDouble>(nq,0.0);
xc2 = Array<OneD,NekDouble>(nq,0.0);
switch(coordim)
{
case 1:
Exp->GetCoords(xc0);
break;
case 2:
Exp->GetCoords(xc0,xc1);
break;
case 3:
Exp->GetCoords(xc0,xc1,xc2);
break;
}
//----------------------------------------------
//----------------------------------------------
// Define forcing function for first variable defined in file
fce = Array<OneD,NekDouble>(nq);
LibUtilities::EquationSharedPtr ffunc = vSession->GetFunction("Forcing",0);
for(i = 0; i < nq; ++i)
{
fce[i] = ffunc->Evaluate(xc0[i],xc1[i],xc2[i]);
}
//----------------------------------------------
//----------------------------------------------
// Setup expansion containing the forcing function
Fce = MemoryManager<MultiRegions::DisContField2D>::AllocateSharedPtr(*Exp);
Fce->SetPhys(fce);
//----------------------------------------------
//----------------------------------------------
// Helmholtz solution taking physical forcing
FlagList flags;
StdRegions::ConstFactorMap factors;
factors[StdRegions::eFactorLambda] = lambda;
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateCoeffs(),flags,factors);
//----------------------------------------------
//----------------------------------------------
// Backward Transform Solution to get solved values at
Exp->BwdTrans(Exp->GetCoeffs(), Exp->UpdatePhys());
//----------------------------------------------
//----------------------------------------------
// See if there is an exact solution, if so
// evaluate and plot errors
LibUtilities::EquationSharedPtr ex_sol = vSession->GetFunction("ExactSolution",0);
//----------------------------------------------
// evaluate exact solution
sol = Array<OneD,NekDouble>(nq);
for(i = 0; i < nq; ++i)
{
sol[i] = ex_sol->Evaluate(xc0[i],xc1[i],xc2[i]);
}
//----------------------------------------------
//--------------------------------------------
// Calculate L_inf error
Sol = MemoryManager<MultiRegions::DisContField2D>::AllocateSharedPtr(*Exp);
Sol->SetPhys(sol);
Sol->SetPhysState(true);
NekDouble L2Error = Exp->L2 (Sol->GetPhys());
NekDouble LinfError = Exp->Linf(Sol->GetPhys());
//--------------------------------------------
// alternative error calculation
const LibUtilities::PointsKey PkeyT1(30,LibUtilities::eGaussLobattoLegendre);
const LibUtilities::PointsKey PkeyT2(30,LibUtilities::eGaussRadauMAlpha1Beta0);
const LibUtilities::PointsKey PkeyQ1(30,LibUtilities::eGaussLobattoLegendre);
const LibUtilities::PointsKey PkeyQ2(30,LibUtilities::eGaussLobattoLegendre);
const LibUtilities::BasisKey BkeyT1(LibUtilities::eModified_A,NumModes,PkeyT1);
const LibUtilities::BasisKey BkeyT2(LibUtilities::eModified_B,NumModes,PkeyT2);
const LibUtilities::BasisKey BkeyQ1(LibUtilities::eModified_A,NumModes,PkeyQ1);
const LibUtilities::BasisKey BkeyQ2(LibUtilities::eModified_A,NumModes,PkeyQ2);
MultiRegions::ExpList2DSharedPtr ErrorExp =
MemoryManager<MultiRegions::ExpList2D>::AllocateSharedPtr(vSession,BkeyT1,BkeyT2,BkeyQ1,BkeyQ2,graph2D);
int ErrorCoordim = ErrorExp->GetCoordim(0);
int ErrorNq = ErrorExp->GetTotPoints();
Array<OneD,NekDouble> ErrorXc0(ErrorNq,0.0);
Array<OneD,NekDouble> ErrorXc1(ErrorNq,0.0);
Array<OneD,NekDouble> ErrorXc2(ErrorNq,0.0);
switch(ErrorCoordim)
{
case 1:
ErrorExp->GetCoords(ErrorXc0);
break;
case 2:
ErrorExp->GetCoords(ErrorXc0,ErrorXc1);
break;
case 3:
ErrorExp->GetCoords(ErrorXc0,ErrorXc1,ErrorXc2);
break;
}
// evaluate exact solution
Array<OneD,NekDouble> ErrorSol(ErrorNq);
for(i = 0; i < ErrorNq; ++i)
{
ErrorSol[i] = ex_sol->Evaluate(ErrorXc0[i],ErrorXc1[i],ErrorXc2[i]);
}
// calcualte spectral/hp approximation on the quad points of this new
// expansion basis
ErrorExp->BwdTrans_IterPerExp(Exp->GetCoeffs(),ErrorExp->UpdatePhys());
NekDouble L2ErrorBis = ErrorExp->L2 (ErrorSol);
NekDouble LinfErrorBis = ErrorExp->Linf(ErrorSol);
//--------------------------------------------
#if 0
cout << "L infinity error: " << LinfErrorBis << endl;
cout << "L 2 error: " << L2ErrorBis << endl;
#endif
//----------------------------------------------
//----------------------------------------------
// Do the timings
timeval timer1, timer2;
NekDouble time1, time2;
NekDouble exeTime;
// We first do a single run in order to estimate the number of calls
// we are going to make
gettimeofday(&timer1, NULL);
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateCoeffs(),flags,factors);
Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys());
gettimeofday(&timer2, NULL);
time1 = timer1.tv_sec*1000000.0+(timer1.tv_usec);
time2 = timer2.tv_sec*1000000.0+(timer2.tv_usec);
exeTime = (time2-time1);
int NumCalls = (int) ceil(1.0e6/exeTime);
if(NumCalls < 1)
{
NumCalls = 1;
}
#ifdef SHARK
NumCalls *= 20;
chudInitialize();
chudSetErrorLogFile(stderr);
chudUmarkPID(getpid(), TRUE);
chudAcquireRemoteAccess();
chudStartRemotePerfMonitor("TimingHDGHelmSolve2D");
#endif
gettimeofday(&timer1, NULL);
for(i = 0; i < NumCalls; ++i)
{
Exp->HelmSolve(Fce->GetPhys(), Exp->UpdateCoeffs(),flags,factors);
Exp->BwdTrans (Exp->GetCoeffs(),Exp->UpdatePhys());
}
gettimeofday(&timer2, NULL);
#ifdef SHARK
chudStopRemotePerfMonitor();
chudReleaseRemoteAccess();
chudCleanup();
#endif
time1 = timer1.tv_sec*1000000.0+(timer1.tv_usec);
time2 = timer2.tv_sec*1000000.0+(timer2.tv_usec);
exeTime = (time2-time1);
int nLocCoeffs = Exp->GetNcoeffs();
int nGlobCoeffs = 0;
int nLocBndCoeffs = 0;
int nGlobBndCoeffs = 0;
int nLocDirCoeffs = 0;
int nGlobDirCoeffs = 0;
int nnz = 0;
ofstream outfile("TimingHDGHelmSolve2D.dat");
outfile.precision(0);
outfile << setw(10) << Type << " ";
outfile << setw(10) << NumElements << " ";
outfile << setw(10) << NumModes << " ";
outfile << setw(10) << NumCalls << " ";
outfile << setw(10) << fixed << noshowpoint << exeTime << " ";
outfile << setw(10) << fixed << noshowpoint << ((NekDouble) (exeTime/((NekDouble)NumCalls))) << " ";
outfile.precision(7);
outfile << setw(15) << scientific << noshowpoint << L2Error << " ";
outfile << setw(15) << scientific << noshowpoint << L2ErrorBis << " ";
outfile << setw(15) << scientific << noshowpoint << LinfError << " ";
outfile << setw(15) << scientific << noshowpoint << LinfErrorBis << " ";
outfile << setw(10) << nLocCoeffs << " ";
outfile << setw(10) << nGlobCoeffs << " ";
outfile << setw(10) << nLocBndCoeffs << " ";
outfile << setw(10) << nGlobBndCoeffs << " ";
outfile << setw(10) << nLocDirCoeffs << " ";
outfile << setw(10) << nGlobDirCoeffs << " ";
outfile << setw(10) << nnz << " ";
outfile << setw(10) << optLevel << " ";
outfile << endl;
outfile.close();
//----------------------------------------------
return 0;
}
std::string PortablePath(const boost::filesystem::path& path)
{
boost::filesystem::path temp = path;
#if BOOST_VERSION > 104200
temp.make_preferred();
return temp.string();
#else
return temp.file_string();
#endif
}
|
SCOREC/nektar
|
library/Timings/TimingHDGHelmSolve2D.cpp
|
C++
|
mit
| 13,774
|
[
30522,
1001,
2421,
1026,
7020,
25379,
1028,
1001,
2421,
1026,
2051,
1012,
1044,
1028,
1001,
2421,
1026,
25353,
2015,
1013,
2051,
1012,
1044,
1028,
1001,
2421,
1026,
22834,
20799,
2361,
1028,
1001,
2421,
1026,
12992,
1013,
6764,
27268,
6633,
1013,
4130,
1012,
6522,
2361,
1028,
1001,
2421,
1026,
13589,
9527,
28247,
1013,
20437,
14413,
2475,
2094,
1012,
1044,
1028,
1001,
2421,
1026,
4800,
23784,
2015,
1013,
12532,
3372,
3790,
2475,
2094,
1012,
1044,
1028,
1001,
2065,
3207,
2546,
11265,
25509,
2906,
1035,
2478,
1035,
14684,
2094,
1001,
2421,
1026,
14684,
2094,
1013,
14684,
2094,
1012,
1044,
1028,
1013,
1013,
1001,
9375,
11420,
1001,
2203,
10128,
2478,
3415,
15327,
11265,
25509,
2906,
1025,
2358,
2094,
1024,
1024,
5164,
12109,
15069,
1006,
9530,
3367,
12992,
1024,
1024,
6764,
27268,
6633,
1024,
1024,
4130,
1004,
4130,
1007,
1025,
20014,
2364,
1006,
20014,
12098,
18195,
1010,
25869,
1008,
12098,
2290,
2615,
1031,
1033,
1007,
1063,
4800,
23784,
2015,
1024,
1024,
12532,
3372,
3790,
2475,
5104,
8167,
2098,
13876,
2099,
4654,
2361,
1010,
4429,
2063,
1010,
14017,
1025,
20014,
1045,
1010,
1050,
4160,
1010,
2522,
8551,
5714,
1025,
9140,
1026,
2028,
2094,
1010,
11265,
2243,
26797,
30524,
1010,
11265,
2243,
26797,
3468,
1028,
1060,
2278,
2692,
1010,
1060,
2278,
2487,
1010,
1060,
2278,
2475,
1025,
11265,
2243,
26797,
3468,
23375,
1025,
9207,
1026,
5164,
1028,
1058,
8873,
20844,
7834,
1025,
2065,
1006,
12098,
18195,
999,
1027,
1019,
1007,
1063,
1042,
16550,
2546,
1006,
2358,
4063,
2099,
1010,
1000,
8192,
1024,
10984,
14945,
5603,
2884,
5244,
4747,
3726,
2475,
2094,
2828,
20437,
5332,
4371,
16371,
7382,
19847,
23569,
27605,
26652,
20414,
2884,
1032,
1050,
1000,
1007,
1025,
1042,
16550,
2546,
1006,
2358,
4063,
2099,
1010,
1000,
2073,
1024,
1011,
2828,
2003,
2028,
1997,
1996,
2206,
1024,
1032,
1050,
1000,
1007,
1025,
1042,
16550,
2546,
1006,
2358,
4063,
2099,
1010,
1000,
1015,
1024,
3180,
17718,
15928,
24932,
9777,
1032,
1050,
1000,
1007,
1025,
1042,
16550,
2546,
1006,
2358,
4063,
2099,
1010,
1000,
1016,
1024,
13366,
2953,
7583,
17718,
15928,
24932,
9777,
1006,
2089,
2025,
2022,
3569,
1007,
1032,
1050,
1000,
1007,
1025,
1042,
16550,
2546,
1006,
2358,
4063,
2099,
1010,
1000,
1017,
1024,
3180,
27189,
1032,
1050,
1000,
1007,
1025,
1042,
16550,
2546,
1006,
2358,
4063,
2099,
1010,
1000,
2073,
1024,
1011,
20437,
5332,
4371,
2003,
1015,
1013,
1044,
1032,
1050,
1000,
1007,
1025,
1042,
16550,
2546,
1006,
2358,
4063,
2099,
1010,
1000,
2073,
1024,
1011,
16371,
7382,
19847,
2003,
1996,
2193,
1997,
1015,
2094,
11583,
1997,
1996,
4935,
1032,
1050,
1000,
1007,
1025,
1042,
16550,
2546,
1006,
2358,
4063,
2099,
1010,
1000,
2073,
1024,
1011,
23569,
27605,
26652,
20414,
2884,
2003,
2028,
1997,
1996,
2206,
1024,
1032,
1050,
1000,
1007,
1025,
1042,
16550,
2546,
1006,
2358,
4063,
2099,
1010,
1000,
1014,
1024,
2224,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
3468,
1028,
4429,
2063,
1010,
14017,
1025,
9140,
1026,
2028,
2094,
30526
] |
module Y2018.M05.D08.Exercise where
{--
Okay, now that we have the new articles downloaded from the REST endpoint and
the ArticleMetaData context from the database, let's do some triage!
So, just like with the ArticleMetaData, we have to generalize the Article-
TriageInformation type from the specific Package and (Dated)Article types to
types that allow us to switch from Pilot(-specific) articles to WPJ, or, in the
future, articles of any type, ... or so we hope.
Whilst still being useful for solving this problem, too.
So, without further ado:
--}
import Data.Aeson (Value)
import Data.Map (Map)
import Database.PostgreSQL.Simple
-- below imports available via 1HaskellADay git repository
import Store.SQL.Connection
import Store.SQL.Util.Indexed
-- import Y2018.M01.D30.Exercise -- template for our ArticleTriageInformation
import Y2018.M04.D02.Exercise -- for Article type
import Y2018.M04.D13.Exercise -- for Packet type
import Y2018.M05.D04.Exercise -- for articles from the rest endpoint
import Y2018.M05.D07.Exercise -- for article context from the database
data Triage = NEW | UPDATED | REDUNDANT
deriving (Eq, Ord, Show)
instance Monoid Triage where
mempty = REDUNDANT
mappend = undefined
-- Triage is the dual of a Semigroupoid: we only care about its unit value
-- in logic analyses.
data ArticleTriageInformation package block article idx =
ATI { pack :: package,
art :: (block, article),
amd :: Maybe (IxValue (ArticleMetaData idx)) }
deriving Show
{--
The output from our analysis of the article context from the database (the
ArticleMetadata set) and the articles downloaded from the REST endpoint (the
ParsedPackage values) is the triaged article set
--}
type WPJATI = ArticleTriageInformation (Packet Value) Value Article Int
type MapTri = Map Triage WPJATI
triageArticles :: [IxValue (ArticleMetaData Int)] -> [ParsedPacket] -> MapTri
triageArticles amd packets = undefined
{--
So, with the above.
1. download the last week's articles from the REST endpoint
2. get the article metadata context from the database
3. triage the downloaded articles.
1. How many new articles are there?
2. How many updated articles are there?
3. How many redundant articles are there?
Since the World Policy Journal doesn't publish many articles each day, and a
packet has 100 articles, there 'may' be a lot of redundant articles. Do your
results bear this out?
--}
|
geophf/1HaskellADay
|
exercises/HAD/Y2018/M05/D08/Exercise.hs
|
Haskell
|
mit
| 2,432
|
[
30522,
11336,
1061,
11387,
15136,
1012,
1049,
2692,
2629,
1012,
1040,
2692,
2620,
1012,
6912,
2073,
1063,
1011,
1011,
3100,
1010,
2085,
2008,
2057,
2031,
1996,
2047,
4790,
22817,
2013,
1996,
2717,
2203,
8400,
1998,
1996,
3720,
11368,
8447,
2696,
6123,
2013,
1996,
7809,
1010,
2292,
1005,
1055,
2079,
2070,
13012,
4270,
999,
2061,
1010,
2074,
2066,
2007,
1996,
3720,
11368,
8447,
2696,
1010,
2057,
2031,
2000,
2236,
4697,
1996,
3720,
1011,
13012,
4270,
2378,
14192,
3370,
2828,
2013,
1996,
3563,
7427,
1998,
1006,
6052,
1007,
3720,
4127,
2000,
4127,
2008,
3499,
2149,
2000,
6942,
2013,
4405,
1006,
1011,
3563,
1007,
4790,
2000,
1059,
2361,
3501,
1010,
2030,
1010,
1999,
1996,
2925,
1010,
4790,
1997,
2151,
2828,
1010,
1012,
1012,
1012,
2030,
2061,
2057,
3246,
1012,
5819,
2145,
2108,
6179,
2005,
13729,
2023,
3291,
1010,
2205,
1012,
2061,
1010,
2302,
2582,
4748,
2080,
30524,
1012,
29296,
1012,
4434,
12324,
3573,
1012,
29296,
1012,
21183,
4014,
1012,
25331,
1011,
1011,
12324,
1061,
11387,
15136,
1012,
1049,
24096,
1012,
1040,
14142,
1012,
6912,
1011,
1011,
23561,
2005,
2256,
3720,
18886,
4270,
2378,
14192,
3370,
12324,
1061,
11387,
15136,
1012,
1049,
2692,
2549,
1012,
1040,
2692,
2475,
1012,
6912,
1011,
1011,
2005,
3720,
2828,
12324,
1061,
11387,
15136,
1012,
1049,
2692,
2549,
1012,
1040,
17134,
1012,
6912,
1011,
1011,
2005,
14771,
2828,
12324,
1061,
11387,
15136,
1012,
1049,
2692,
2629,
1012,
1040,
2692,
2549,
1012,
6912,
1011,
1011,
2005,
4790,
2013,
1996,
2717,
2203,
8400,
12324,
1061,
11387,
15136,
1012,
1049,
2692,
2629,
1012,
1040,
2692,
2581,
1012,
6912,
1011,
1011,
2005,
3720,
6123,
2013,
1996,
7809,
2951,
13012,
4270,
1027,
2047,
1064,
7172,
1064,
21707,
4315,
14966,
1006,
1041,
4160,
1010,
2030,
2094,
1010,
2265,
1007,
6013,
18847,
3593,
13012,
4270,
2073,
2033,
27718,
2100,
1027,
21707,
4949,
11837,
2094,
1027,
6151,
28344,
1011,
1011,
13012,
4270,
2003,
1996,
7037,
1997,
1037,
4100,
17058,
9314,
1024,
2057,
2069,
2729,
2055,
2049,
3131,
3643,
1011,
1011,
1999,
7961,
16478,
1012,
2951,
3720,
18886,
4270,
2378,
14192,
3370,
7427,
3796,
3720,
8909,
2595,
1027,
2012,
2072,
1063,
5308,
1024,
1024,
7427,
1010,
2396,
1024,
1024,
1006,
3796,
1010,
3720,
1007,
1010,
2572,
2094,
1024,
1024,
2672,
1006,
11814,
10175,
5657,
1006,
3720,
11368,
8447,
2696,
8909,
2595,
1007,
1007,
1065,
4315,
14966,
2265,
1063,
1011,
1011,
1996,
6434,
2013,
2256,
4106,
1997,
1996,
3720,
6123,
2013,
1996,
7809,
1006,
1996,
3720,
11368,
8447,
2696,
2275,
1007,
1998,
1996,
4790,
22817,
2013,
1996,
2717,
2203,
8400,
1006,
1996,
11968,
6924,
23947,
4270,
5300,
1007,
2003,
1996,
13012,
18655,
3720,
2275,
1011,
1011,
1065,
2828,
1059,
2361,
3900,
3775,
1027,
3720,
18886,
4270,
2378,
14192,
3370,
1006,
14771,
3643,
1007,
3643,
3720,
20014,
2828,
4949,
18886,
1027,
4949,
13012,
4270,
1059,
2361,
30523,
1024,
1011,
1011,
1065,
12324,
2951,
1012,
29347,
3385,
1006,
3643,
1007,
12324,
2951,
1012,
4949,
1006,
4949,
1007,
12324,
7809,
1012,
2695,
17603,
2015,
4160,
2140,
1012,
3722,
1011,
1011,
2917,
17589,
2800,
3081,
1015,
14949,
18690,
28039,
21025,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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1024,
1011,
1011,
1065,
12324,
2951,
1012,
29347,
3385,
1006,
3643,
1007,
12324,
2951,
1012,
4949,
1006,
4949,
1007,
12324,
7809,
1012,
2695,
17603,
2015,
4160,
2140,
1012,
3722,
1011,
1011,
2917,
17589,
2800,
3081,
1015,
14949,
18690,
28039,
21025,
2102,
22409,
12324,
3573,
30526
] |
<!DOCTYPE html>
<html class="theme-next mist use-motion" lang="zh-Hans">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta name="theme-color" content="#222">
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link href="/lib/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />
<link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
<link href="/lib/font-awesome/css/font-awesome.min.css?v=4.6.2" rel="stylesheet" type="text/css" />
<link href="/css/main.css?v=5.1.2" rel="stylesheet" type="text/css" />
<meta name="keywords" content="Hexo," />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.1.2" />
<meta name="description" content="相关资料Hexo官网: https://hexo.io/ NexT官网: http://theme-next.iissnan.com/ Node下载: http://nodejs.cn/download/ 安装Hexo安装hexo,如果没有安装Node,需要先安装Node,否则npm命令会提示用不了">
<meta name="keywords" content="Hexo">
<meta property="og:type" content="article">
<meta property="og:title" content="Hexo学习和使用">
<meta property="og:url" content="http://soaic.github.io/2017/08/10/Hexo学习和使用/index.html">
<meta property="og:site_name" content="Soaic's Blog">
<meta property="og:description" content="相关资料Hexo官网: https://hexo.io/ NexT官网: http://theme-next.iissnan.com/ Node下载: http://nodejs.cn/download/ 安装Hexo安装hexo,如果没有安装Node,需要先安装Node,否则npm命令会提示用不了">
<meta property="og:locale" content="zh-Hans">
<meta property="og:updated_time" content="2018-04-17T14:15:57.000Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="Hexo学习和使用">
<meta name="twitter:description" content="相关资料Hexo官网: https://hexo.io/ NexT官网: http://theme-next.iissnan.com/ Node下载: http://nodejs.cn/download/ 安装Hexo安装hexo,如果没有安装Node,需要先安装Node,否则npm命令会提示用不了">
<script type="text/javascript" id="hexo.configurations">
var NexT = window.NexT || {};
var CONFIG = {
root: '/',
scheme: 'Mist',
sidebar: {"position":"left","display":"post","offset":12,"offset_float":12,"b2t":false,"scrollpercent":false,"onmobile":false},
fancybox: true,
tabs: true,
motion: true,
duoshuo: {
userId: '0',
author: '博主'
},
algolia: {
applicationID: '',
apiKey: '',
indexName: '',
hits: {"per_page":10},
labels: {"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}
}
};
</script>
<link rel="canonical" href="http://soaic.github.io/2017/08/10/Hexo学习和使用/"/>
<title>Hexo学习和使用 | Soaic's Blog</title>
</head>
<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">
<div class="container sidebar-position-left page-post-detail ">
<div class="headband"></div>
<header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-brand-wrapper">
<div class="site-meta ">
<div class="custom-logo-site-title">
<a href="/" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<span class="site-title">Soaic's Blog</span>
<span class="logo-line-after"><i></i></span>
</a>
</div>
<h1 class="site-subtitle" itemprop="description">Soaic</h1>
</div>
<div class="site-nav-toggle">
<button>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
</button>
</div>
</div>
<nav class="site-nav">
<ul id="menu" class="menu">
<li class="menu-item menu-item-home">
<a href="/" rel="section">
<i class="menu-item-icon fa fa-fw fa-home"></i> <br />
首页
</a>
</li>
<li class="menu-item menu-item-archives">
<a href="/archives/" rel="section">
<i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
归档
</a>
</li>
<li class="menu-item menu-item-categories">
<a href="/categories/" rel="section">
<i class="menu-item-icon fa fa-fw fa-th"></i> <br />
分类
</a>
</li>
<li class="menu-item menu-item-tags">
<a href="/tags/" rel="section">
<i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
标签
</a>
</li>
<li class="menu-item menu-item-music">
<a href="/music/" rel="section">
<i class="menu-item-icon fa fa-fw fa-music"></i> <br />
音乐
</a>
</li>
<li class="menu-item menu-item-about">
<a href="/about/" rel="section">
<i class="menu-item-icon fa fa-fw fa-user"></i> <br />
关于
</a>
</li>
</ul>
</nav>
</div>
</header>
<main id="main" class="main">
<div class="main-inner">
<div class="content-wrap">
<div id="content" class="content">
<div id="posts" class="posts-expand">
<article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
<div class="post-block">
<link itemprop="mainEntityOfPage" href="http://soaic.github.io/2017/08/10/Hexo学习和使用/">
<span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
<meta itemprop="name" content="Soaic">
<meta itemprop="description" content="Welcome!">
<meta itemprop="image" content="/images/avatar.png">
</span>
<span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
<meta itemprop="name" content="Soaic's Blog">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">Hexo学习和使用</h2>
<div class="post-meta">
<span class="post-time">
<span class="post-meta-item-icon">
<i class="fa fa-calendar-o"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建于" itemprop="dateCreated datePublished" datetime="2017-08-10T11:03:00+08:00">
2017-08-10
</time>
</span>
<span id="/2017/08/10/Hexo学习和使用/" class="leancloud_visitors" data-flag-title="Hexo学习和使用">
<span class="post-meta-divider">|</span>
<span class="post-meta-item-icon">
<i class="fa fa-eye"></i>
</span>
<span class="post-meta-item-text">阅读次数 </span>
<span class="leancloud-visitors-count"></span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h3 id="相关资料"><a href="#相关资料" class="headerlink" title="相关资料"></a>相关资料</h3><p>Hexo官网: <a href="https://hexo.io/" target="_blank" rel="external">https://hexo.io/</a></p>
<p>NexT官网: <a href="http://theme-next.iissnan.com/" target="_blank" rel="external">http://theme-next.iissnan.com/</a></p>
<p>Node下载: <a href="http://nodejs.cn/download/" target="_blank" rel="external">http://nodejs.cn/download/</a></p>
<h3 id="安装Hexo"><a href="#安装Hexo" class="headerlink" title="安装Hexo"></a>安装Hexo</h3><p>安装hexo,如果没有安装Node,需要先安装Node,否则npm命令会提示用不了</p>
<a id="more"></a>
<p><code>npm install hexo-cli -g</code></p>
<p>初始化博客框架</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><div class="line">hexo init blog</div><div class="line">cd blog</div><div class="line">npm install</div></pre></td></tr></table></figure>
<p>运行Hexo</p>
<p><code>hexo server</code></p>
<h3 id="下载设置NexT主题"><a href="#下载设置NexT主题" class="headerlink" title="下载设置NexT主题"></a>下载设置NexT主题</h3><p>在终端窗口下,定位到 Hexo 站点目录下。使用 Git checkout 代码:</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><div class="line">cd your-hexo-site</div><div class="line">git clone https://github.com/iissnan/hexo-theme-next themes/next</div></pre></td></tr></table></figure>
<p>启用NexT主题 找到配置文件_config.yml 修改theme</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><div class="line">theme: next</div></pre></td></tr></table></figure>
<p>然后再运行hexo 命令hexo s或hexo server或hexo s –debug都可以 当命令行输出中提示出:</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><div class="line">INFO Hexo is running at http://0.0.0.0:4000/. Press Ctrl+C to stop.</div></pre></td></tr></table></figure>
<p>此时即可使用浏览器访问 <a href="http://localhost:4000" target="_blank" rel="external">http://localhost:4000</a>,检查站点是否正确运行。</p>
<p>最后部署到github上去,在_config.yml配置文件中添加如下代码,soaic为github用户名,<code>用户名.github.io</code>为Repository名,然后在github上创建<code>用户名.github.io</code>仓库,最后执行命令部署:<code>hexo d -g</code></p>
<figure class="highlight plain"><table><tr><td class="code"><pre><div class="line">deploy:</div><div class="line"> type: git</div><div class="line"> repo: https://github.com/soaic/soaic.github.io.git</div><div class="line"> branch: master</div></pre></td></tr></table></figure>
<h3 id="Next主题设定"><a href="#Next主题设定" class="headerlink" title="Next主题设定"></a>Next主题设定</h3><p>选择Scheme外观</p>
<figure class="highlight"><table><tr><td class="code"><pre><div class="line">#scheme: Muse</div><div class="line">#scheme: Mist</div><div class="line">scheme: Pisces</div><div class="line">#scheme: Gemini</div></pre></td></tr></table></figure>
<p>设置语言</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><div class="line">language: zh-Hans</div></pre></td></tr></table></figure>
<p>目前 NexT 支持的语言如以下表格所示:</p>
<table>
<thead>
<tr>
<th>语言</th>
<th>代码</th>
<th>设定示例</th>
</tr>
</thead>
<tbody>
<tr>
<td>English</td>
<td>en</td>
<td>language: en</td>
</tr>
<tr>
<td>简体中文</td>
<td>zh-Hans</td>
<td>language: zh-Hans</td>
</tr>
<tr>
<td>Français</td>
<td>fr-FR</td>
<td>language: fr-FR</td>
</tr>
<tr>
<td>Português</td>
<td>pt</td>
<td>language: pt or language: pt-BR</td>
</tr>
<tr>
<td>繁體中文</td>
<td>zh-hk 或者 zh-tw</td>
<td>language: zh-hk</td>
</tr>
<tr>
<td>Русский язык</td>
<td>ru</td>
<td>language: ru</td>
</tr>
<tr>
<td>Deutsch</td>
<td>de</td>
<td>language: de</td>
</tr>
<tr>
<td>日本語</td>
<td>ja</td>
<td>language: ja</td>
</tr>
<tr>
<td>Indonesian</td>
<td>id</td>
<td>language: id</td>
</tr>
<tr>
<td>Korean</td>
<td>ko</td>
<td>language: ko</td>
</tr>
</tbody>
</table>
<p>设置头像 </p>
<p>可以放置完整互联网URI也可以放置站内主题<code>source/images/</code>目录下的图片</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><div class="line">avatar: <span class="regexp">/images/</span>avatar.png</div></pre></td></tr></table></figure>
<h3 id="页面添加"><a href="#页面添加" class="headerlink" title="页面添加"></a>页面添加</h3><p>使用如下命令添加文章页面</p>
<p><code>hexo new post 标题名</code></p>
<p>使用如下命令添加「标签」页面</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><div class="line">cd your-hexo-site</div><div class="line">hexo new page tags</div></pre></td></tr></table></figure>
<p>设置该页面为标签页</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><div class="line">title: 标签</div><div class="line">date: <span class="number">2014</span><span class="number">-12</span><span class="number">-22</span> <span class="number">12</span>:<span class="number">39</span>:<span class="number">04</span></div><div class="line">type: <span class="string">"tags"</span></div><div class="line">---</div></pre></td></tr></table></figure>
<p>添加文章标签 下面例子将该文章添加为Test1和Test2两个标签</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><div class="line">title: 标签测试文章</div><div class="line">tags:</div><div class="line"> - Test1</div><div class="line"> - Test2</div><div class="line">---</div></pre></td></tr></table></figure>
<p>使用如下命令添加「分类」页面</p>
<figure class="highlight shell"><table><tr><td class="code"><pre><div class="line">cd your-hexo-site</div><div class="line">hexo new page categories</div></pre></td></tr></table></figure>
<p>设置该页面为分类页</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><div class="line">title: 分类</div><div class="line">date: <span class="number">2014</span><span class="number">-12</span><span class="number">-22</span> <span class="number">12</span>:<span class="number">39</span>:<span class="number">04</span></div><div class="line">type: <span class="string">"categories"</span></div><div class="line">---</div></pre></td></tr></table></figure>
<p>设置文章为分类 下面例子将该文章设置为Testing分类</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><div class="line">title: 分类测试文章</div><div class="line">categories: Testing</div><div class="line">---</div></pre></td></tr></table></figure>
<h3 id="添加阅读次数统计"><a href="#添加阅读次数统计" class="headerlink" title="添加阅读次数统计"></a>添加阅读次数统计</h3><p>利用LeanCloud第三方服务 并在NexT主题的_config.yml文件中修改为</p>
<figure class="highlight javascript"><table><tr><td class="code"><pre><div class="line">leancloud_visitors:</div><div class="line"> enable: <span class="literal">true</span></div><div class="line"> app_id: joaeuuc4hsqudUUwx4gIvGF6-gzGzoHsz</div><div class="line"> app_key: E9UJsJpw1omCHuS22PdSpKoh</div></pre></td></tr></table></figure>
<p>具体教程请查看 <a href="https://notes.wanghao.work/2015-10-21-为NexT主题添加文章阅读量统计功能.html#配置LeanCloud" target="_blank" rel="external">为NexT主题添加文章阅读量统计功能</a> </p>
</div>
<footer class="post-footer">
<div class="post-tags">
<a href="/tags/Hexo/" rel="tag"># Hexo</a>
</div>
<div class="post-nav">
<div class="post-nav-next post-nav-item">
<a href="/2016/12/13/2016-12-13-greendao/" rel="next" title="你必须了解的ORM框架GreenDao">
<i class="fa fa-chevron-left"></i> 你必须了解的ORM框架GreenDao
</a>
</div>
<span class="post-nav-divider"></span>
<div class="post-nav-prev post-nav-item">
<a href="/2017/08/11/小程序开发技巧/" rel="prev" title="小程序开发技巧">
小程序开发技巧 <i class="fa fa-chevron-right"></i>
</a>
</div>
</div>
</footer>
</div>
</article>
<div class="post-spread">
</div>
</div>
</div>
<div class="comments" id="comments">
</div>
</div>
<div class="sidebar-toggle">
<div class="sidebar-toggle-line-wrap">
<span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
</div>
</div>
<aside id="sidebar" class="sidebar">
<div class="sidebar-inner">
<ul class="sidebar-nav motion-element">
<li class="sidebar-nav-toc sidebar-nav-active" data-target="post-toc-wrap" >
文章目录
</li>
<li class="sidebar-nav-overview" data-target="site-overview">
站点概览
</li>
</ul>
<section class="site-overview sidebar-panel">
<div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
<img class="site-author-image" itemprop="image"
src="/images/avatar.png"
alt="Soaic" />
<p class="site-author-name" itemprop="name">Soaic</p>
<p class="site-description motion-element" itemprop="description">Welcome!</p>
</div>
<nav class="site-state motion-element">
<div class="site-state-item site-state-posts">
<a href="/archives/">
<span class="site-state-item-count">10</span>
<span class="site-state-item-name">日志</span>
</a>
</div>
<div class="site-state-item site-state-categories">
<a href="/categories/index.html">
<span class="site-state-item-count">1</span>
<span class="site-state-item-name">分类</span>
</a>
</div>
<div class="site-state-item site-state-tags">
<a href="/tags/index.html">
<span class="site-state-item-count">3</span>
<span class="site-state-item-name">标签</span>
</a>
</div>
</nav>
<div class="links-of-author motion-element">
</div>
</section>
<!--noindex-->
<section class="post-toc-wrap motion-element sidebar-panel sidebar-panel-active">
<div class="post-toc">
<div class="post-toc-content"><ol class="nav"><li class="nav-item nav-level-3"><a class="nav-link" href="#相关资料"><span class="nav-number">1.</span> <span class="nav-text">相关资料</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#安装Hexo"><span class="nav-number">2.</span> <span class="nav-text">安装Hexo</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#下载设置NexT主题"><span class="nav-number">3.</span> <span class="nav-text">下载设置NexT主题</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#Next主题设定"><span class="nav-number">4.</span> <span class="nav-text">Next主题设定</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#页面添加"><span class="nav-number">5.</span> <span class="nav-text">页面添加</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#添加阅读次数统计"><span class="nav-number">6.</span> <span class="nav-text">添加阅读次数统计</span></a></li></ol></div>
</div>
</section>
<!--/noindex-->
</div>
</aside>
</div>
</main>
<footer id="footer" class="footer">
<div class="footer-inner">
<div class="copyright" >
© 2016 -
<span itemprop="copyrightYear">2018</span>
<span class="with-love">
<i class="fa fa-heart"></i>
</span>
<span class="author" itemprop="copyrightHolder">Soaic</span>
</div>
<script async src="https://dn-lbstatics.qbox.me/busuanzi/2.3/busuanzi.pure.mini.js"></script>
<div class="powered-by">
<i class="fa fa-user-md"></i><span id="busuanzi_container_site_uv">
本站访客数:<span id="busuanzi_value_site_uv"></span>
</span>
</div>
<div class="powered-by">
由 <a class="theme-link" href="https://hexo.io">Hexo</a> 强力驱动
</div>
<div class="theme-info">
主题 -
<a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
NexT.Mist
</a>
</div>
</div>
</footer>
<div class="back-to-top">
<i class="fa fa-arrow-up"></i>
</div>
</div>
<script type="text/javascript">
if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
window.Promise = null;
}
</script>
<script type="text/javascript" src="/lib/jquery/index.js?v=2.1.3"></script>
<script type="text/javascript" src="/lib/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
<script type="text/javascript" src="/lib/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
<script type="text/javascript" src="/lib/velocity/velocity.min.js?v=1.2.1"></script>
<script type="text/javascript" src="/lib/velocity/velocity.ui.min.js?v=1.2.1"></script>
<script type="text/javascript" src="/lib/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
<script type="text/javascript" src="/js/src/utils.js?v=5.1.2"></script>
<script type="text/javascript" src="/js/src/motion.js?v=5.1.2"></script>
<script type="text/javascript" src="/js/src/scrollspy.js?v=5.1.2"></script>
<script type="text/javascript" src="/js/src/post-details.js?v=5.1.2"></script>
<script type="text/javascript" src="/js/src/bootstrap.js?v=5.1.2"></script>
<script src="https://cdn1.lncld.net/static/js/av-core-mini-0.6.4.js"></script>
<script>AV.initialize("nSNhFcJCeysT9vRXgfNvtbQF-gzGzoHsz", "aegQNi8pntiOE4R2z0e5B84D");</script>
<script>
function showTime(Counter) {
var query = new AV.Query(Counter);
var entries = [];
var $visitors = $(".leancloud_visitors");
$visitors.each(function () {
entries.push( $(this).attr("id").trim() );
});
query.containedIn('url', entries);
query.find()
.done(function (results) {
var COUNT_CONTAINER_REF = '.leancloud-visitors-count';
if (results.length === 0) {
$visitors.find(COUNT_CONTAINER_REF).text(0);
return;
}
for (var i = 0; i < results.length; i++) {
var item = results[i];
var url = item.get('url');
var time = item.get('time');
var element = document.getElementById(url);
$(element).find(COUNT_CONTAINER_REF).text(time);
}
for(var i = 0; i < entries.length; i++) {
var url = entries[i];
var element = document.getElementById(url);
var countSpan = $(element).find(COUNT_CONTAINER_REF);
if( countSpan.text() == '') {
countSpan.text(0);
}
}
})
.fail(function (object, error) {
console.log("Error: " + error.code + " " + error.message);
});
}
function addCount(Counter) {
var $visitors = $(".leancloud_visitors");
var url = $visitors.attr('id').trim();
var title = $visitors.attr('data-flag-title').trim();
var query = new AV.Query(Counter);
query.equalTo("url", url);
query.find({
success: function(results) {
if (results.length > 0) {
var counter = results[0];
counter.fetchWhenSave(true);
counter.increment("time");
counter.save(null, {
success: function(counter) {
var $element = $(document.getElementById(url));
$element.find('.leancloud-visitors-count').text(counter.get('time'));
},
error: function(counter, error) {
console.log('Failed to save Visitor num, with error message: ' + error.message);
}
});
} else {
var newcounter = new Counter();
/* Set ACL */
var acl = new AV.ACL();
acl.setPublicReadAccess(true);
acl.setPublicWriteAccess(true);
newcounter.setACL(acl);
/* End Set ACL */
newcounter.set("title", title);
newcounter.set("url", url);
newcounter.set("time", 1);
newcounter.save(null, {
success: function(newcounter) {
var $element = $(document.getElementById(url));
$element.find('.leancloud-visitors-count').text(newcounter.get('time'));
},
error: function(newcounter, error) {
console.log('Failed to create');
}
});
}
},
error: function(error) {
console.log('Error:' + error.code + " " + error.message);
}
});
}
$(function() {
var Counter = AV.Object.extend("Counter");
if ($('.leancloud_visitors').length == 1) {
addCount(Counter);
} else if ($('.post-title-link').length > 1) {
showTime(Counter);
}
});
</script>
</body>
</html>
|
soaic/soaic.github.io
|
2017/08/10/Hexo学习和使用/index.html
|
HTML
|
apache-2.0
| 26,458
|
[
30522,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
2465,
1027,
1000,
4323,
1011,
2279,
11094,
2224,
1011,
4367,
1000,
11374,
1027,
1000,
1062,
2232,
1011,
7003,
1000,
1028,
1026,
2132,
1028,
1026,
18804,
25869,
13462,
1027,
1000,
21183,
2546,
1011,
1022,
1000,
1013,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
1060,
1011,
25423,
1011,
11892,
1000,
4180,
1027,
1000,
29464,
1027,
3341,
1000,
1013,
1028,
1026,
18804,
2171,
1027,
1000,
3193,
6442,
1000,
4180,
1027,
1000,
9381,
1027,
5080,
1011,
9381,
1010,
3988,
1011,
4094,
1027,
1015,
1010,
4555,
1011,
4094,
1027,
1015,
1000,
1013,
1028,
1026,
18804,
2171,
1027,
1000,
4323,
1011,
3609,
1000,
4180,
1027,
1000,
1001,
19015,
1000,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
17053,
1011,
2491,
1000,
4180,
1027,
1000,
2053,
1011,
10938,
1000,
1013,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
17053,
1011,
2491,
30524,
2609,
29098,
1000,
1013,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
1013,
5622,
2497,
1013,
11281,
8758,
1013,
3120,
1013,
1046,
4226,
2854,
1012,
11281,
8758,
1012,
20116,
2015,
1029,
1058,
1027,
1016,
1012,
1015,
1012,
1019,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
1013,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
1013,
1013,
15489,
2015,
1012,
8224,
9331,
2483,
1012,
4012,
1013,
20116,
2015,
1029,
2155,
1027,
2474,
3406,
1024,
3998,
1010,
3998,
18400,
2594,
1010,
4278,
1010,
4278,
18400,
2594,
1010,
6352,
1010,
6352,
18400,
2594,
1004,
16745,
1027,
3763,
1010,
3763,
1011,
4654,
2102,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
1013,
5622,
2497,
1013,
15489,
1011,
12476,
1013,
20116,
2015,
1013,
15489,
1011,
12476,
1012,
8117,
1012,
20116,
2015,
1029,
1058,
1027,
1018,
1012,
1020,
1012,
1016,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
1013,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
1013,
20116,
2015,
1013,
2364,
1012,
20116,
2015,
1029,
1058,
1027,
1019,
1012,
1015,
1012,
1016,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
1013,
1028,
1026,
18804,
2171,
1027,
1000,
3145,
22104,
1000,
4180,
1027,
1000,
2002,
2595,
2080,
1010,
1000,
1013,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
2460,
12690,
12696,
1000,
2828,
1027,
1000,
3746,
1013,
1060,
1011,
12696,
1000,
17850,
12879,
1027,
1000,
1013,
6904,
7903,
2239,
1012,
24582,
2080,
1029,
1058,
1027,
1019,
1012,
1015,
1012,
1016,
1000,
1013,
1028,
1026,
18804,
2171,
1027,
1000,
6412,
1000,
4180,
1027,
1000,
1919,
100,
100,
100,
2002,
2595,
2080,
100,
100,
1993,
16770,
1024,
1013,
1013,
2002,
2595,
2080,
1012,
22834,
1013,
2279,
100,
100,
1993,
8299,
1024,
1013,
1013,
4323,
1011,
2279,
1012,
2462,
4757,
7229,
1012,
4012,
1013,
13045,
1743,
100,
1993,
8299,
1024,
1013,
1013,
13045,
22578,
1012,
27166,
1013,
8816,
1013,
1820,
100,
2002,
30523,
1000,
4180,
1027,
1000,
2053,
1011,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1000,
4180,
1027,
1000,
2053,
1011,
30526
] |
The Skills API Platform
=======================
An open platform to store human skills.
Powered by [API Platform](https://api-platform.com/) and [Fansible Tywin](https://github.com/fansible/tywin).
|
OpenSkills/skillsapi
|
README.md
|
Markdown
|
mit
| 200
|
[
30522,
1996,
4813,
17928,
4132,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
1027,
2019,
2330,
4132,
2000,
3573,
2529,
4813,
1012,
6113,
2011,
1031,
17928,
4132,
1033,
1006,
16770,
1024,
1013,
1013,
17928,
1011,
4132,
1012,
4012,
1013,
1007,
1998,
1031,
4599,
7028,
5939,
10105,
1033,
1006,
16770,
1024,
1013,
1013,
21025,
2705,
12083,
1012,
4012,
1013,
4599,
7028,
1013,
5939,
10105,
1007,
1012,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
/*
* Licensed 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.
*/
/*
* This code was generated by https://github.com/googleapis/google-api-java-client-services/
* Modify at your own risk.
*/
package com.google.api.services.streetviewpublish.v1;
/**
* Service definition for StreetViewPublish (v1).
*
* <p>
* Publishes 360 photos to Google Maps, along with position, orientation, and connectivity metadata. Apps can offer an interface for positioning, connecting, and uploading user-generated Street View images.
* </p>
*
* <p>
* For more information about this service, see the
* <a href="https://developers.google.com/streetview/publish/" target="_blank">API Documentation</a>
* </p>
*
* <p>
* This service uses {@link StreetViewPublishRequestInitializer} to initialize global parameters via its
* {@link Builder}.
* </p>
*
* @since 1.3
* @author Google, Inc.
*/
@SuppressWarnings("javadoc")
public class StreetViewPublish extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient {
// Note: Leave this static initializer at the top of the file.
static {
com.google.api.client.util.Preconditions.checkState(
com.google.api.client.googleapis.GoogleUtils.MAJOR_VERSION == 1 &&
(com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION >= 32 ||
(com.google.api.client.googleapis.GoogleUtils.MINOR_VERSION == 31 &&
com.google.api.client.googleapis.GoogleUtils.BUGFIX_VERSION >= 1)),
"You are currently running with version %s of google-api-client. " +
"You need at least version 1.31.1 of google-api-client to run version " +
"1.32.1 of the Street View Publish API library.", com.google.api.client.googleapis.GoogleUtils.VERSION);
}
/**
* The default encoded root URL of the service. This is determined when the library is generated
* and normally should not be changed.
*
* @since 1.7
*/
public static final String DEFAULT_ROOT_URL = "https://streetviewpublish.googleapis.com/";
/**
* The default encoded mTLS root URL of the service. This is determined when the library is generated
* and normally should not be changed.
*
* @since 1.31
*/
public static final String DEFAULT_MTLS_ROOT_URL = "https://streetviewpublish.mtls.googleapis.com/";
/**
* The default encoded service path of the service. This is determined when the library is
* generated and normally should not be changed.
*
* @since 1.7
*/
public static final String DEFAULT_SERVICE_PATH = "";
/**
* The default encoded batch path of the service. This is determined when the library is
* generated and normally should not be changed.
*
* @since 1.23
*/
public static final String DEFAULT_BATCH_PATH = "batch";
/**
* The default encoded base URL of the service. This is determined when the library is generated
* and normally should not be changed.
*/
public static final String DEFAULT_BASE_URL = DEFAULT_ROOT_URL + DEFAULT_SERVICE_PATH;
/**
* Constructor.
*
* <p>
* Use {@link Builder} if you need to specify any of the optional parameters.
* </p>
*
* @param transport HTTP transport, which should normally be:
* <ul>
* <li>Google App Engine:
* {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}</li>
* <li>Android: {@code newCompatibleTransport} from
* {@code com.google.api.client.extensions.android.http.AndroidHttp}</li>
* <li>Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
* </li>
* </ul>
* @param jsonFactory JSON factory, which may be:
* <ul>
* <li>Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}</li>
* <li>Google GSON: {@code com.google.api.client.json.gson.GsonFactory}</li>
* <li>Android Honeycomb or higher:
* {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}</li>
* </ul>
* @param httpRequestInitializer HTTP request initializer or {@code null} for none
* @since 1.7
*/
public StreetViewPublish(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
this(new Builder(transport, jsonFactory, httpRequestInitializer));
}
/**
* @param builder builder
*/
StreetViewPublish(Builder builder) {
super(builder);
}
@Override
protected void initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest<?> httpClientRequest) throws java.io.IOException {
super.initialize(httpClientRequest);
}
/**
* An accessor for creating requests from the Photo collection.
*
* <p>The typical use is:</p>
* <pre>
* {@code StreetViewPublish streetviewpublish = new StreetViewPublish(...);}
* {@code StreetViewPublish.Photo.List request = streetviewpublish.photo().list(parameters ...)}
* </pre>
*
* @return the resource collection
*/
public Photo photo() {
return new Photo();
}
/**
* The "photo" collection of methods.
*/
public class Photo {
/**
* After the client finishes uploading the photo with the returned UploadRef, CreatePhoto publishes
* the uploaded Photo to Street View on Google Maps. Currently, the only way to set heading, pitch,
* and roll in CreatePhoto is through the [Photo Sphere XMP
* metadata](https://developers.google.com/streetview/spherical-metadata) in the photo bytes.
* CreatePhoto ignores the `pose.heading`, `pose.pitch`, `pose.roll`, `pose.altitude`, and
* `pose.level` fields in Pose. This method returns the following error codes: *
* google.rpc.Code.INVALID_ARGUMENT if the request is malformed or if the uploaded photo is not a
* 360 photo. * google.rpc.Code.NOT_FOUND if the upload reference does not exist. *
* google.rpc.Code.RESOURCE_EXHAUSTED if the account has reached the storage limit.
*
* Create a request for the method "photo.create".
*
* This request holds the parameters needed by the streetviewpublish server. After setting any
* optional parameters, call the {@link Create#execute()} method to invoke the remote operation.
*
* @param content the {@link com.google.api.services.streetviewpublish.v1.model.Photo}
* @return the request
*/
public Create create(com.google.api.services.streetviewpublish.v1.model.Photo content) throws java.io.IOException {
Create result = new Create(content);
initialize(result);
return result;
}
public class Create extends StreetViewPublishRequest<com.google.api.services.streetviewpublish.v1.model.Photo> {
private static final String REST_PATH = "v1/photo";
/**
* After the client finishes uploading the photo with the returned UploadRef, CreatePhoto
* publishes the uploaded Photo to Street View on Google Maps. Currently, the only way to set
* heading, pitch, and roll in CreatePhoto is through the [Photo Sphere XMP
* metadata](https://developers.google.com/streetview/spherical-metadata) in the photo bytes.
* CreatePhoto ignores the `pose.heading`, `pose.pitch`, `pose.roll`, `pose.altitude`, and
* `pose.level` fields in Pose. This method returns the following error codes: *
* google.rpc.Code.INVALID_ARGUMENT if the request is malformed or if the uploaded photo is not a
* 360 photo. * google.rpc.Code.NOT_FOUND if the upload reference does not exist. *
* google.rpc.Code.RESOURCE_EXHAUSTED if the account has reached the storage limit.
*
* Create a request for the method "photo.create".
*
* This request holds the parameters needed by the the streetviewpublish server. After setting
* any optional parameters, call the {@link Create#execute()} method to invoke the remote
* operation. <p> {@link
* Create#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param content the {@link com.google.api.services.streetviewpublish.v1.model.Photo}
* @since 1.13
*/
protected Create(com.google.api.services.streetviewpublish.v1.model.Photo content) {
super(StreetViewPublish.this, "POST", REST_PATH, content, com.google.api.services.streetviewpublish.v1.model.Photo.class);
}
@Override
public Create set$Xgafv(java.lang.String $Xgafv) {
return (Create) super.set$Xgafv($Xgafv);
}
@Override
public Create setAccessToken(java.lang.String accessToken) {
return (Create) super.setAccessToken(accessToken);
}
@Override
public Create setAlt(java.lang.String alt) {
return (Create) super.setAlt(alt);
}
@Override
public Create setCallback(java.lang.String callback) {
return (Create) super.setCallback(callback);
}
@Override
public Create setFields(java.lang.String fields) {
return (Create) super.setFields(fields);
}
@Override
public Create setKey(java.lang.String key) {
return (Create) super.setKey(key);
}
@Override
public Create setOauthToken(java.lang.String oauthToken) {
return (Create) super.setOauthToken(oauthToken);
}
@Override
public Create setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Create) super.setPrettyPrint(prettyPrint);
}
@Override
public Create setQuotaUser(java.lang.String quotaUser) {
return (Create) super.setQuotaUser(quotaUser);
}
@Override
public Create setUploadType(java.lang.String uploadType) {
return (Create) super.setUploadType(uploadType);
}
@Override
public Create setUploadProtocol(java.lang.String uploadProtocol) {
return (Create) super.setUploadProtocol(uploadProtocol);
}
@Override
public Create set(String parameterName, Object value) {
return (Create) super.set(parameterName, value);
}
}
/**
* Deletes a Photo and its metadata. This method returns the following error codes: *
* google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested photo. *
* google.rpc.Code.NOT_FOUND if the photo ID does not exist.
*
* Create a request for the method "photo.delete".
*
* This request holds the parameters needed by the streetviewpublish server. After setting any
* optional parameters, call the {@link Delete#execute()} method to invoke the remote operation.
*
* @param photoId Required. ID of the Photo.
* @return the request
*/
public Delete delete(java.lang.String photoId) throws java.io.IOException {
Delete result = new Delete(photoId);
initialize(result);
return result;
}
public class Delete extends StreetViewPublishRequest<com.google.api.services.streetviewpublish.v1.model.Empty> {
private static final String REST_PATH = "v1/photo/{photoId}";
/**
* Deletes a Photo and its metadata. This method returns the following error codes: *
* google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested photo. *
* google.rpc.Code.NOT_FOUND if the photo ID does not exist.
*
* Create a request for the method "photo.delete".
*
* This request holds the parameters needed by the the streetviewpublish server. After setting
* any optional parameters, call the {@link Delete#execute()} method to invoke the remote
* operation. <p> {@link
* Delete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param photoId Required. ID of the Photo.
* @since 1.13
*/
protected Delete(java.lang.String photoId) {
super(StreetViewPublish.this, "DELETE", REST_PATH, null, com.google.api.services.streetviewpublish.v1.model.Empty.class);
this.photoId = com.google.api.client.util.Preconditions.checkNotNull(photoId, "Required parameter photoId must be specified.");
}
@Override
public Delete set$Xgafv(java.lang.String $Xgafv) {
return (Delete) super.set$Xgafv($Xgafv);
}
@Override
public Delete setAccessToken(java.lang.String accessToken) {
return (Delete) super.setAccessToken(accessToken);
}
@Override
public Delete setAlt(java.lang.String alt) {
return (Delete) super.setAlt(alt);
}
@Override
public Delete setCallback(java.lang.String callback) {
return (Delete) super.setCallback(callback);
}
@Override
public Delete setFields(java.lang.String fields) {
return (Delete) super.setFields(fields);
}
@Override
public Delete setKey(java.lang.String key) {
return (Delete) super.setKey(key);
}
@Override
public Delete setOauthToken(java.lang.String oauthToken) {
return (Delete) super.setOauthToken(oauthToken);
}
@Override
public Delete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Delete) super.setPrettyPrint(prettyPrint);
}
@Override
public Delete setQuotaUser(java.lang.String quotaUser) {
return (Delete) super.setQuotaUser(quotaUser);
}
@Override
public Delete setUploadType(java.lang.String uploadType) {
return (Delete) super.setUploadType(uploadType);
}
@Override
public Delete setUploadProtocol(java.lang.String uploadProtocol) {
return (Delete) super.setUploadProtocol(uploadProtocol);
}
/** Required. ID of the Photo. */
@com.google.api.client.util.Key
private java.lang.String photoId;
/** Required. ID of the Photo.
*/
public java.lang.String getPhotoId() {
return photoId;
}
/** Required. ID of the Photo. */
public Delete setPhotoId(java.lang.String photoId) {
this.photoId = photoId;
return this;
}
@Override
public Delete set(String parameterName, Object value) {
return (Delete) super.set(parameterName, value);
}
}
/**
* Gets the metadata of the specified Photo. This method returns the following error codes: *
* google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested Photo. *
* google.rpc.Code.NOT_FOUND if the requested Photo does not exist. * google.rpc.Code.UNAVAILABLE if
* the requested Photo is still being indexed.
*
* Create a request for the method "photo.get".
*
* This request holds the parameters needed by the streetviewpublish server. After setting any
* optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
*
* @param photoId Required. ID of the Photo.
* @return the request
*/
public Get get(java.lang.String photoId) throws java.io.IOException {
Get result = new Get(photoId);
initialize(result);
return result;
}
public class Get extends StreetViewPublishRequest<com.google.api.services.streetviewpublish.v1.model.Photo> {
private static final String REST_PATH = "v1/photo/{photoId}";
/**
* Gets the metadata of the specified Photo. This method returns the following error codes: *
* google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested Photo. *
* google.rpc.Code.NOT_FOUND if the requested Photo does not exist. * google.rpc.Code.UNAVAILABLE
* if the requested Photo is still being indexed.
*
* Create a request for the method "photo.get".
*
* This request holds the parameters needed by the the streetviewpublish server. After setting
* any optional parameters, call the {@link Get#execute()} method to invoke the remote operation.
* <p> {@link
* Get#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be
* called to initialize this instance immediately after invoking the constructor. </p>
*
* @param photoId Required. ID of the Photo.
* @since 1.13
*/
protected Get(java.lang.String photoId) {
super(StreetViewPublish.this, "GET", REST_PATH, null, com.google.api.services.streetviewpublish.v1.model.Photo.class);
this.photoId = com.google.api.client.util.Preconditions.checkNotNull(photoId, "Required parameter photoId must be specified.");
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public Get set$Xgafv(java.lang.String $Xgafv) {
return (Get) super.set$Xgafv($Xgafv);
}
@Override
public Get setAccessToken(java.lang.String accessToken) {
return (Get) super.setAccessToken(accessToken);
}
@Override
public Get setAlt(java.lang.String alt) {
return (Get) super.setAlt(alt);
}
@Override
public Get setCallback(java.lang.String callback) {
return (Get) super.setCallback(callback);
}
@Override
public Get setFields(java.lang.String fields) {
return (Get) super.setFields(fields);
}
@Override
public Get setKey(java.lang.String key) {
return (Get) super.setKey(key);
}
@Override
public Get setOauthToken(java.lang.String oauthToken) {
return (Get) super.setOauthToken(oauthToken);
}
@Override
public Get setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Get) super.setPrettyPrint(prettyPrint);
}
@Override
public Get setQuotaUser(java.lang.String quotaUser) {
return (Get) super.setQuotaUser(quotaUser);
}
@Override
public Get setUploadType(java.lang.String uploadType) {
return (Get) super.setUploadType(uploadType);
}
@Override
public Get setUploadProtocol(java.lang.String uploadProtocol) {
return (Get) super.setUploadProtocol(uploadProtocol);
}
/** Required. ID of the Photo. */
@com.google.api.client.util.Key
private java.lang.String photoId;
/** Required. ID of the Photo.
*/
public java.lang.String getPhotoId() {
return photoId;
}
/** Required. ID of the Photo. */
public Get setPhotoId(java.lang.String photoId) {
this.photoId = photoId;
return this;
}
/**
* The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see
* http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is
* unspecified, the user's language preference for Google services is used.
*/
@com.google.api.client.util.Key
private java.lang.String languageCode;
/** The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see
http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is unspecified,
the user's language preference for Google services is used.
*/
public java.lang.String getLanguageCode() {
return languageCode;
}
/**
* The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see
* http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is
* unspecified, the user's language preference for Google services is used.
*/
public Get setLanguageCode(java.lang.String languageCode) {
this.languageCode = languageCode;
return this;
}
/**
* Required. Specifies if a download URL for the photo bytes should be returned in the Photo
* response.
*/
@com.google.api.client.util.Key
private java.lang.String view;
/** Required. Specifies if a download URL for the photo bytes should be returned in the Photo response.
*/
public java.lang.String getView() {
return view;
}
/**
* Required. Specifies if a download URL for the photo bytes should be returned in the Photo
* response.
*/
public Get setView(java.lang.String view) {
this.view = view;
return this;
}
@Override
public Get set(String parameterName, Object value) {
return (Get) super.set(parameterName, value);
}
}
/**
* Creates an upload session to start uploading photo bytes. The method uses the upload URL of the
* returned UploadRef to upload the bytes for the Photo. In addition to the photo requirements shown
* in https://support.google.com/maps/answer/7012050?ref_topic=6275604, the photo must meet the
* following requirements: * Photo Sphere XMP metadata must be included in the photo metadata. See
* https://developers.google.com/streetview/spherical-metadata for the required fields. * The pixel
* size of the photo must meet the size requirements listed in
* https://support.google.com/maps/answer/7012050?ref_topic=6275604, and the photo must be a full
* 360 horizontally. After the upload completes, the method uses UploadRef with CreatePhoto to
* create the Photo object entry.
*
* Create a request for the method "photo.startUpload".
*
* This request holds the parameters needed by the streetviewpublish server. After setting any
* optional parameters, call the {@link StartUpload#execute()} method to invoke the remote
* operation.
*
* @param content the {@link com.google.api.services.streetviewpublish.v1.model.Empty}
* @return the request
*/
public StartUpload startUpload(com.google.api.services.streetviewpublish.v1.model.Empty content) throws java.io.IOException {
StartUpload result = new StartUpload(content);
initialize(result);
return result;
}
public class StartUpload extends StreetViewPublishRequest<com.google.api.services.streetviewpublish.v1.model.UploadRef> {
private static final String REST_PATH = "v1/photo:startUpload";
/**
* Creates an upload session to start uploading photo bytes. The method uses the upload URL of the
* returned UploadRef to upload the bytes for the Photo. In addition to the photo requirements
* shown in https://support.google.com/maps/answer/7012050?ref_topic=6275604, the photo must meet
* the following requirements: * Photo Sphere XMP metadata must be included in the photo metadata.
* See https://developers.google.com/streetview/spherical-metadata for the required fields. * The
* pixel size of the photo must meet the size requirements listed in
* https://support.google.com/maps/answer/7012050?ref_topic=6275604, and the photo must be a full
* 360 horizontally. After the upload completes, the method uses UploadRef with CreatePhoto to
* create the Photo object entry.
*
* Create a request for the method "photo.startUpload".
*
* This request holds the parameters needed by the the streetviewpublish server. After setting
* any optional parameters, call the {@link StartUpload#execute()} method to invoke the remote
* operation. <p> {@link
* StartUpload#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param content the {@link com.google.api.services.streetviewpublish.v1.model.Empty}
* @since 1.13
*/
protected StartUpload(com.google.api.services.streetviewpublish.v1.model.Empty content) {
super(StreetViewPublish.this, "POST", REST_PATH, content, com.google.api.services.streetviewpublish.v1.model.UploadRef.class);
}
@Override
public StartUpload set$Xgafv(java.lang.String $Xgafv) {
return (StartUpload) super.set$Xgafv($Xgafv);
}
@Override
public StartUpload setAccessToken(java.lang.String accessToken) {
return (StartUpload) super.setAccessToken(accessToken);
}
@Override
public StartUpload setAlt(java.lang.String alt) {
return (StartUpload) super.setAlt(alt);
}
@Override
public StartUpload setCallback(java.lang.String callback) {
return (StartUpload) super.setCallback(callback);
}
@Override
public StartUpload setFields(java.lang.String fields) {
return (StartUpload) super.setFields(fields);
}
@Override
public StartUpload setKey(java.lang.String key) {
return (StartUpload) super.setKey(key);
}
@Override
public StartUpload setOauthToken(java.lang.String oauthToken) {
return (StartUpload) super.setOauthToken(oauthToken);
}
@Override
public StartUpload setPrettyPrint(java.lang.Boolean prettyPrint) {
return (StartUpload) super.setPrettyPrint(prettyPrint);
}
@Override
public StartUpload setQuotaUser(java.lang.String quotaUser) {
return (StartUpload) super.setQuotaUser(quotaUser);
}
@Override
public StartUpload setUploadType(java.lang.String uploadType) {
return (StartUpload) super.setUploadType(uploadType);
}
@Override
public StartUpload setUploadProtocol(java.lang.String uploadProtocol) {
return (StartUpload) super.setUploadProtocol(uploadProtocol);
}
@Override
public StartUpload set(String parameterName, Object value) {
return (StartUpload) super.set(parameterName, value);
}
}
/**
* Updates the metadata of a Photo, such as pose, place association, connections, etc. Changing the
* pixels of a photo is not supported. Only the fields specified in the updateMask field are used.
* If `updateMask` is not present, the update applies to all fields. This method returns the
* following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create
* the requested photo. * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. *
* google.rpc.Code.NOT_FOUND if the requested photo does not exist. * google.rpc.Code.UNAVAILABLE if
* the requested Photo is still being indexed.
*
* Create a request for the method "photo.update".
*
* This request holds the parameters needed by the streetviewpublish server. After setting any
* optional parameters, call the {@link Update#execute()} method to invoke the remote operation.
*
* @param id A unique identifier for a photo.
* @param content the {@link com.google.api.services.streetviewpublish.v1.model.Photo}
* @return the request
*/
public Update update(java.lang.String id, com.google.api.services.streetviewpublish.v1.model.Photo content) throws java.io.IOException {
Update result = new Update(id, content);
initialize(result);
return result;
}
public class Update extends StreetViewPublishRequest<com.google.api.services.streetviewpublish.v1.model.Photo> {
private static final String REST_PATH = "v1/photo/{id}";
/**
* Updates the metadata of a Photo, such as pose, place association, connections, etc. Changing
* the pixels of a photo is not supported. Only the fields specified in the updateMask field are
* used. If `updateMask` is not present, the update applies to all fields. This method returns the
* following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not
* create the requested photo. * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. *
* google.rpc.Code.NOT_FOUND if the requested photo does not exist. * google.rpc.Code.UNAVAILABLE
* if the requested Photo is still being indexed.
*
* Create a request for the method "photo.update".
*
* This request holds the parameters needed by the the streetviewpublish server. After setting
* any optional parameters, call the {@link Update#execute()} method to invoke the remote
* operation. <p> {@link
* Update#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must
* be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param id A unique identifier for a photo.
* @param content the {@link com.google.api.services.streetviewpublish.v1.model.Photo}
* @since 1.13
*/
protected Update(java.lang.String id, com.google.api.services.streetviewpublish.v1.model.Photo content) {
super(StreetViewPublish.this, "PUT", REST_PATH, content, com.google.api.services.streetviewpublish.v1.model.Photo.class);
this.id = com.google.api.client.util.Preconditions.checkNotNull(id, "Required parameter id must be specified.");
}
@Override
public Update set$Xgafv(java.lang.String $Xgafv) {
return (Update) super.set$Xgafv($Xgafv);
}
@Override
public Update setAccessToken(java.lang.String accessToken) {
return (Update) super.setAccessToken(accessToken);
}
@Override
public Update setAlt(java.lang.String alt) {
return (Update) super.setAlt(alt);
}
@Override
public Update setCallback(java.lang.String callback) {
return (Update) super.setCallback(callback);
}
@Override
public Update setFields(java.lang.String fields) {
return (Update) super.setFields(fields);
}
@Override
public Update setKey(java.lang.String key) {
return (Update) super.setKey(key);
}
@Override
public Update setOauthToken(java.lang.String oauthToken) {
return (Update) super.setOauthToken(oauthToken);
}
@Override
public Update setPrettyPrint(java.lang.Boolean prettyPrint) {
return (Update) super.setPrettyPrint(prettyPrint);
}
@Override
public Update setQuotaUser(java.lang.String quotaUser) {
return (Update) super.setQuotaUser(quotaUser);
}
@Override
public Update setUploadType(java.lang.String uploadType) {
return (Update) super.setUploadType(uploadType);
}
@Override
public Update setUploadProtocol(java.lang.String uploadProtocol) {
return (Update) super.setUploadProtocol(uploadProtocol);
}
/** A unique identifier for a photo. */
@com.google.api.client.util.Key
private java.lang.String id;
/** A unique identifier for a photo.
*/
public java.lang.String getId() {
return id;
}
/** A unique identifier for a photo. */
public Update setId(java.lang.String id) {
this.id = id;
return this;
}
/**
* Required. Mask that identifies fields on the photo metadata to update. If not present, the
* old Photo metadata is entirely replaced with the new Photo metadata in this request. The
* update fails if invalid fields are specified. Multiple fields can be specified in a comma-
* delimited list. The following fields are valid: * `pose.heading` * `pose.latLngPair` *
* `pose.pitch` * `pose.roll` * `pose.level` * `pose.altitude` * `connections` * `places` >
* Note: When updateMask contains repeated fields, the entire set of repeated values get
* replaced with the new contents. For example, if updateMask contains `connections` and
* `UpdatePhotoRequest.photo.connections` is empty, all connections are removed.
*/
@com.google.api.client.util.Key
private String updateMask;
/** Required. Mask that identifies fields on the photo metadata to update. If not present, the old
Photo metadata is entirely replaced with the new Photo metadata in this request. The update fails
if invalid fields are specified. Multiple fields can be specified in a comma-delimited list. The
following fields are valid: * `pose.heading` * `pose.latLngPair` * `pose.pitch` * `pose.roll` *
`pose.level` * `pose.altitude` * `connections` * `places` > Note: When updateMask contains repeated
fields, the entire set of repeated values get replaced with the new contents. For example, if
updateMask contains `connections` and `UpdatePhotoRequest.photo.connections` is empty, all
connections are removed.
*/
public String getUpdateMask() {
return updateMask;
}
/**
* Required. Mask that identifies fields on the photo metadata to update. If not present, the
* old Photo metadata is entirely replaced with the new Photo metadata in this request. The
* update fails if invalid fields are specified. Multiple fields can be specified in a comma-
* delimited list. The following fields are valid: * `pose.heading` * `pose.latLngPair` *
* `pose.pitch` * `pose.roll` * `pose.level` * `pose.altitude` * `connections` * `places` >
* Note: When updateMask contains repeated fields, the entire set of repeated values get
* replaced with the new contents. For example, if updateMask contains `connections` and
* `UpdatePhotoRequest.photo.connections` is empty, all connections are removed.
*/
public Update setUpdateMask(String updateMask) {
this.updateMask = updateMask;
return this;
}
@Override
public Update set(String parameterName, Object value) {
return (Update) super.set(parameterName, value);
}
}
}
/**
* An accessor for creating requests from the Photos collection.
*
* <p>The typical use is:</p>
* <pre>
* {@code StreetViewPublish streetviewpublish = new StreetViewPublish(...);}
* {@code StreetViewPublish.Photos.List request = streetviewpublish.photos().list(parameters ...)}
* </pre>
*
* @return the resource collection
*/
public Photos photos() {
return new Photos();
}
/**
* The "photos" collection of methods.
*/
public class Photos {
/**
* Deletes a list of Photos and their metadata. Note that if BatchDeletePhotos fails, either
* critical fields are missing or there is an authentication error. Even if BatchDeletePhotos
* succeeds, individual photos in the batch may have failures. These failures are specified in each
* PhotoResponse.status in BatchDeletePhotosResponse.results. See DeletePhoto for specific failures
* that can occur per photo.
*
* Create a request for the method "photos.batchDelete".
*
* This request holds the parameters needed by the streetviewpublish server. After setting any
* optional parameters, call the {@link BatchDelete#execute()} method to invoke the remote
* operation.
*
* @param content the {@link com.google.api.services.streetviewpublish.v1.model.BatchDeletePhotosRequest}
* @return the request
*/
public BatchDelete batchDelete(com.google.api.services.streetviewpublish.v1.model.BatchDeletePhotosRequest content) throws java.io.IOException {
BatchDelete result = new BatchDelete(content);
initialize(result);
return result;
}
public class BatchDelete extends StreetViewPublishRequest<com.google.api.services.streetviewpublish.v1.model.BatchDeletePhotosResponse> {
private static final String REST_PATH = "v1/photos:batchDelete";
/**
* Deletes a list of Photos and their metadata. Note that if BatchDeletePhotos fails, either
* critical fields are missing or there is an authentication error. Even if BatchDeletePhotos
* succeeds, individual photos in the batch may have failures. These failures are specified in
* each PhotoResponse.status in BatchDeletePhotosResponse.results. See DeletePhoto for specific
* failures that can occur per photo.
*
* Create a request for the method "photos.batchDelete".
*
* This request holds the parameters needed by the the streetviewpublish server. After setting
* any optional parameters, call the {@link BatchDelete#execute()} method to invoke the remote
* operation. <p> {@link
* BatchDelete#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param content the {@link com.google.api.services.streetviewpublish.v1.model.BatchDeletePhotosRequest}
* @since 1.13
*/
protected BatchDelete(com.google.api.services.streetviewpublish.v1.model.BatchDeletePhotosRequest content) {
super(StreetViewPublish.this, "POST", REST_PATH, content, com.google.api.services.streetviewpublish.v1.model.BatchDeletePhotosResponse.class);
}
@Override
public BatchDelete set$Xgafv(java.lang.String $Xgafv) {
return (BatchDelete) super.set$Xgafv($Xgafv);
}
@Override
public BatchDelete setAccessToken(java.lang.String accessToken) {
return (BatchDelete) super.setAccessToken(accessToken);
}
@Override
public BatchDelete setAlt(java.lang.String alt) {
return (BatchDelete) super.setAlt(alt);
}
@Override
public BatchDelete setCallback(java.lang.String callback) {
return (BatchDelete) super.setCallback(callback);
}
@Override
public BatchDelete setFields(java.lang.String fields) {
return (BatchDelete) super.setFields(fields);
}
@Override
public BatchDelete setKey(java.lang.String key) {
return (BatchDelete) super.setKey(key);
}
@Override
public BatchDelete setOauthToken(java.lang.String oauthToken) {
return (BatchDelete) super.setOauthToken(oauthToken);
}
@Override
public BatchDelete setPrettyPrint(java.lang.Boolean prettyPrint) {
return (BatchDelete) super.setPrettyPrint(prettyPrint);
}
@Override
public BatchDelete setQuotaUser(java.lang.String quotaUser) {
return (BatchDelete) super.setQuotaUser(quotaUser);
}
@Override
public BatchDelete setUploadType(java.lang.String uploadType) {
return (BatchDelete) super.setUploadType(uploadType);
}
@Override
public BatchDelete setUploadProtocol(java.lang.String uploadProtocol) {
return (BatchDelete) super.setUploadProtocol(uploadProtocol);
}
@Override
public BatchDelete set(String parameterName, Object value) {
return (BatchDelete) super.set(parameterName, value);
}
}
/**
* Gets the metadata of the specified Photo batch. Note that if BatchGetPhotos fails, either
* critical fields are missing or there is an authentication error. Even if BatchGetPhotos succeeds,
* individual photos in the batch may have failures. These failures are specified in each
* PhotoResponse.status in BatchGetPhotosResponse.results. See GetPhoto for specific failures that
* can occur per photo.
*
* Create a request for the method "photos.batchGet".
*
* This request holds the parameters needed by the streetviewpublish server. After setting any
* optional parameters, call the {@link BatchGet#execute()} method to invoke the remote operation.
*
* @return the request
*/
public BatchGet batchGet() throws java.io.IOException {
BatchGet result = new BatchGet();
initialize(result);
return result;
}
public class BatchGet extends StreetViewPublishRequest<com.google.api.services.streetviewpublish.v1.model.BatchGetPhotosResponse> {
private static final String REST_PATH = "v1/photos:batchGet";
/**
* Gets the metadata of the specified Photo batch. Note that if BatchGetPhotos fails, either
* critical fields are missing or there is an authentication error. Even if BatchGetPhotos
* succeeds, individual photos in the batch may have failures. These failures are specified in
* each PhotoResponse.status in BatchGetPhotosResponse.results. See GetPhoto for specific failures
* that can occur per photo.
*
* Create a request for the method "photos.batchGet".
*
* This request holds the parameters needed by the the streetviewpublish server. After setting
* any optional parameters, call the {@link BatchGet#execute()} method to invoke the remote
* operation. <p> {@link
* BatchGet#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @since 1.13
*/
protected BatchGet() {
super(StreetViewPublish.this, "GET", REST_PATH, null, com.google.api.services.streetviewpublish.v1.model.BatchGetPhotosResponse.class);
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public BatchGet set$Xgafv(java.lang.String $Xgafv) {
return (BatchGet) super.set$Xgafv($Xgafv);
}
@Override
public BatchGet setAccessToken(java.lang.String accessToken) {
return (BatchGet) super.setAccessToken(accessToken);
}
@Override
public BatchGet setAlt(java.lang.String alt) {
return (BatchGet) super.setAlt(alt);
}
@Override
public BatchGet setCallback(java.lang.String callback) {
return (BatchGet) super.setCallback(callback);
}
@Override
public BatchGet setFields(java.lang.String fields) {
return (BatchGet) super.setFields(fields);
}
@Override
public BatchGet setKey(java.lang.String key) {
return (BatchGet) super.setKey(key);
}
@Override
public BatchGet setOauthToken(java.lang.String oauthToken) {
return (BatchGet) super.setOauthToken(oauthToken);
}
@Override
public BatchGet setPrettyPrint(java.lang.Boolean prettyPrint) {
return (BatchGet) super.setPrettyPrint(prettyPrint);
}
@Override
public BatchGet setQuotaUser(java.lang.String quotaUser) {
return (BatchGet) super.setQuotaUser(quotaUser);
}
@Override
public BatchGet setUploadType(java.lang.String uploadType) {
return (BatchGet) super.setUploadType(uploadType);
}
@Override
public BatchGet setUploadProtocol(java.lang.String uploadProtocol) {
return (BatchGet) super.setUploadProtocol(uploadProtocol);
}
/**
* Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see
* http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is
* unspecified, the user's language preference for Google services is used.
*/
@com.google.api.client.util.Key
private java.lang.String languageCode;
/** Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see
http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is unspecified,
the user's language preference for Google services is used.
*/
public java.lang.String getLanguageCode() {
return languageCode;
}
/**
* Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see
* http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is
* unspecified, the user's language preference for Google services is used.
*/
public BatchGet setLanguageCode(java.lang.String languageCode) {
this.languageCode = languageCode;
return this;
}
/**
* Required. IDs of the Photos. For HTTP GET requests, the URL query parameter should be
* `photoIds==&...`.
*/
@com.google.api.client.util.Key
private java.util.List<java.lang.String> photoIds;
/** Required. IDs of the Photos. For HTTP GET requests, the URL query parameter should be
`photoIds==&...`.
*/
public java.util.List<java.lang.String> getPhotoIds() {
return photoIds;
}
/**
* Required. IDs of the Photos. For HTTP GET requests, the URL query parameter should be
* `photoIds==&...`.
*/
public BatchGet setPhotoIds(java.util.List<java.lang.String> photoIds) {
this.photoIds = photoIds;
return this;
}
/**
* Required. Specifies if a download URL for the photo bytes should be returned in the Photo
* response.
*/
@com.google.api.client.util.Key
private java.lang.String view;
/** Required. Specifies if a download URL for the photo bytes should be returned in the Photo response.
*/
public java.lang.String getView() {
return view;
}
/**
* Required. Specifies if a download URL for the photo bytes should be returned in the Photo
* response.
*/
public BatchGet setView(java.lang.String view) {
this.view = view;
return this;
}
@Override
public BatchGet set(String parameterName, Object value) {
return (BatchGet) super.set(parameterName, value);
}
}
/**
* Updates the metadata of Photos, such as pose, place association, connections, etc. Changing the
* pixels of photos is not supported. Note that if BatchUpdatePhotos fails, either critical fields
* are missing or there is an authentication error. Even if BatchUpdatePhotos succeeds, individual
* photos in the batch may have failures. These failures are specified in each PhotoResponse.status
* in BatchUpdatePhotosResponse.results. See UpdatePhoto for specific failures that can occur per
* photo. Only the fields specified in updateMask field are used. If `updateMask` is not present,
* the update applies to all fields. The number of UpdatePhotoRequest messages in a
* BatchUpdatePhotosRequest must not exceed 20. > Note: To update Pose.altitude, Pose.latLngPair has
* to be filled as well. Otherwise, the request will fail.
*
* Create a request for the method "photos.batchUpdate".
*
* This request holds the parameters needed by the streetviewpublish server. After setting any
* optional parameters, call the {@link BatchUpdate#execute()} method to invoke the remote
* operation.
*
* @param content the {@link com.google.api.services.streetviewpublish.v1.model.BatchUpdatePhotosRequest}
* @return the request
*/
public BatchUpdate batchUpdate(com.google.api.services.streetviewpublish.v1.model.BatchUpdatePhotosRequest content) throws java.io.IOException {
BatchUpdate result = new BatchUpdate(content);
initialize(result);
return result;
}
public class BatchUpdate extends StreetViewPublishRequest<com.google.api.services.streetviewpublish.v1.model.BatchUpdatePhotosResponse> {
private static final String REST_PATH = "v1/photos:batchUpdate";
/**
* Updates the metadata of Photos, such as pose, place association, connections, etc. Changing the
* pixels of photos is not supported. Note that if BatchUpdatePhotos fails, either critical fields
* are missing or there is an authentication error. Even if BatchUpdatePhotos succeeds, individual
* photos in the batch may have failures. These failures are specified in each
* PhotoResponse.status in BatchUpdatePhotosResponse.results. See UpdatePhoto for specific
* failures that can occur per photo. Only the fields specified in updateMask field are used. If
* `updateMask` is not present, the update applies to all fields. The number of UpdatePhotoRequest
* messages in a BatchUpdatePhotosRequest must not exceed 20. > Note: To update Pose.altitude,
* Pose.latLngPair has to be filled as well. Otherwise, the request will fail.
*
* Create a request for the method "photos.batchUpdate".
*
* This request holds the parameters needed by the the streetviewpublish server. After setting
* any optional parameters, call the {@link BatchUpdate#execute()} method to invoke the remote
* operation. <p> {@link
* BatchUpdate#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)}
* must be called to initialize this instance immediately after invoking the constructor. </p>
*
* @param content the {@link com.google.api.services.streetviewpublish.v1.model.BatchUpdatePhotosRequest}
* @since 1.13
*/
protected BatchUpdate(com.google.api.services.streetviewpublish.v1.model.BatchUpdatePhotosRequest content) {
super(StreetViewPublish.this, "POST", REST_PATH, content, com.google.api.services.streetviewpublish.v1.model.BatchUpdatePhotosResponse.class);
}
@Override
public BatchUpdate set$Xgafv(java.lang.String $Xgafv) {
return (BatchUpdate) super.set$Xgafv($Xgafv);
}
@Override
public BatchUpdate setAccessToken(java.lang.String accessToken) {
return (BatchUpdate) super.setAccessToken(accessToken);
}
@Override
public BatchUpdate setAlt(java.lang.String alt) {
return (BatchUpdate) super.setAlt(alt);
}
@Override
public BatchUpdate setCallback(java.lang.String callback) {
return (BatchUpdate) super.setCallback(callback);
}
@Override
public BatchUpdate setFields(java.lang.String fields) {
return (BatchUpdate) super.setFields(fields);
}
@Override
public BatchUpdate setKey(java.lang.String key) {
return (BatchUpdate) super.setKey(key);
}
@Override
public BatchUpdate setOauthToken(java.lang.String oauthToken) {
return (BatchUpdate) super.setOauthToken(oauthToken);
}
@Override
public BatchUpdate setPrettyPrint(java.lang.Boolean prettyPrint) {
return (BatchUpdate) super.setPrettyPrint(prettyPrint);
}
@Override
public BatchUpdate setQuotaUser(java.lang.String quotaUser) {
return (BatchUpdate) super.setQuotaUser(quotaUser);
}
@Override
public BatchUpdate setUploadType(java.lang.String uploadType) {
return (BatchUpdate) super.setUploadType(uploadType);
}
@Override
public BatchUpdate setUploadProtocol(java.lang.String uploadProtocol) {
return (BatchUpdate) super.setUploadProtocol(uploadProtocol);
}
@Override
public BatchUpdate set(String parameterName, Object value) {
return (BatchUpdate) super.set(parameterName, value);
}
}
/**
* Lists all the Photos that belong to the user. > Note: Recently created photos that are still
* being indexed are not returned in the response.
*
* Create a request for the method "photos.list".
*
* This request holds the parameters needed by the streetviewpublish server. After setting any
* optional parameters, call the {@link List#execute()} method to invoke the remote operation.
*
* @return the request
*/
public List list() throws java.io.IOException {
List result = new List();
initialize(result);
return result;
}
public class List extends StreetViewPublishRequest<com.google.api.services.streetviewpublish.v1.model.ListPhotosResponse> {
private static final String REST_PATH = "v1/photos";
/**
* Lists all the Photos that belong to the user. > Note: Recently created photos that are still
* being indexed are not returned in the response.
*
* Create a request for the method "photos.list".
*
* This request holds the parameters needed by the the streetviewpublish server. After setting
* any optional parameters, call the {@link List#execute()} method to invoke the remote operation.
* <p> {@link
* List#initialize(com.google.api.client.googleapis.services.AbstractGoogleClientRequest)} must be
* called to initialize this instance immediately after invoking the constructor. </p>
*
* @since 1.13
*/
protected List() {
super(StreetViewPublish.this, "GET", REST_PATH, null, com.google.api.services.streetviewpublish.v1.model.ListPhotosResponse.class);
}
@Override
public com.google.api.client.http.HttpResponse executeUsingHead() throws java.io.IOException {
return super.executeUsingHead();
}
@Override
public com.google.api.client.http.HttpRequest buildHttpRequestUsingHead() throws java.io.IOException {
return super.buildHttpRequestUsingHead();
}
@Override
public List set$Xgafv(java.lang.String $Xgafv) {
return (List) super.set$Xgafv($Xgafv);
}
@Override
public List setAccessToken(java.lang.String accessToken) {
return (List) super.setAccessToken(accessToken);
}
@Override
public List setAlt(java.lang.String alt) {
return (List) super.setAlt(alt);
}
@Override
public List setCallback(java.lang.String callback) {
return (List) super.setCallback(callback);
}
@Override
public List setFields(java.lang.String fields) {
return (List) super.setFields(fields);
}
@Override
public List setKey(java.lang.String key) {
return (List) super.setKey(key);
}
@Override
public List setOauthToken(java.lang.String oauthToken) {
return (List) super.setOauthToken(oauthToken);
}
@Override
public List setPrettyPrint(java.lang.Boolean prettyPrint) {
return (List) super.setPrettyPrint(prettyPrint);
}
@Override
public List setQuotaUser(java.lang.String quotaUser) {
return (List) super.setQuotaUser(quotaUser);
}
@Override
public List setUploadType(java.lang.String uploadType) {
return (List) super.setUploadType(uploadType);
}
@Override
public List setUploadProtocol(java.lang.String uploadProtocol) {
return (List) super.setUploadProtocol(uploadProtocol);
}
/**
* Optional. The filter expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`. The
* filters supported are: `placeId`, `min_latitude`, `max_latitude`, `min_longitude`, and
* `max_longitude`. See https://google.aip.dev/160 for more information.
*/
@com.google.api.client.util.Key
private java.lang.String filter;
/** Optional. The filter expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`. The filters
supported are: `placeId`, `min_latitude`, `max_latitude`, `min_longitude`, and `max_longitude`. See
https://google.aip.dev/160 for more information.
*/
public java.lang.String getFilter() {
return filter;
}
/**
* Optional. The filter expression. For example: `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`. The
* filters supported are: `placeId`, `min_latitude`, `max_latitude`, `min_longitude`, and
* `max_longitude`. See https://google.aip.dev/160 for more information.
*/
public List setFilter(java.lang.String filter) {
this.filter = filter;
return this;
}
/**
* Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see
* http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is
* unspecified, the user's language preference for Google services is used.
*/
@com.google.api.client.util.Key
private java.lang.String languageCode;
/** Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see
http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is unspecified,
the user's language preference for Google services is used.
*/
public java.lang.String getLanguageCode() {
return languageCode;
}
/**
* Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more information, see
* http://www.unicode.org/reports/tr35/#Unicode_locale_identifier. If language_code is
* unspecified, the user's language preference for Google services is used.
*/
public List setLanguageCode(java.lang.String languageCode) {
this.languageCode = languageCode;
return this;
}
/**
* Optional. The maximum number of photos to return. `pageSize` must be non-negative. If
* `pageSize` is zero or is not provided, the default page size of 100 is used. The number of
* photos returned in the response may be less than `pageSize` if the number of photos that
* belong to the user is less than `pageSize`.
*/
@com.google.api.client.util.Key
private java.lang.Integer pageSize;
/** Optional. The maximum number of photos to return. `pageSize` must be non-negative. If `pageSize` is
zero or is not provided, the default page size of 100 is used. The number of photos returned in the
response may be less than `pageSize` if the number of photos that belong to the user is less than
`pageSize`.
*/
public java.lang.Integer getPageSize() {
return pageSize;
}
/**
* Optional. The maximum number of photos to return. `pageSize` must be non-negative. If
* `pageSize` is zero or is not provided, the default page size of 100 is used. The number of
* photos returned in the response may be less than `pageSize` if the number of photos that
* belong to the user is less than `pageSize`.
*/
public List setPageSize(java.lang.Integer pageSize) {
this.pageSize = pageSize;
return this;
}
/** Optional. The nextPageToken value returned from a previous ListPhotos request, if any. */
@com.google.api.client.util.Key
private java.lang.String pageToken;
/** Optional. The nextPageToken value returned from a previous ListPhotos request, if any.
*/
public java.lang.String getPageToken() {
return pageToken;
}
/** Optional. The nextPageToken value returned from a previous ListPhotos request, if any. */
public List setPageToken(java.lang.String pageToken) {
this.pageToken = pageToken;
return this;
}
/**
* Required. Specifies if a download URL for the photos bytes should be returned in the Photos
* response.
*/
@com.google.api.client.util.Key
private java.lang.String view;
/** Required. Specifies if a download URL for the photos bytes should be returned in the Photos
response.
*/
public java.lang.String getView() {
return view;
}
/**
* Required. Specifies if a download URL for the photos bytes should be returned in the Photos
* response.
*/
public List setView(java.lang.String view) {
this.view = view;
return this;
}
@Override
public List set(String parameterName, Object value) {
return (List) super.set(parameterName, value);
}
}
}
/**
* Builder for {@link StreetViewPublish}.
*
* <p>
* Implementation is not thread-safe.
* </p>
*
* @since 1.3.0
*/
public static final class Builder extends com.google.api.client.googleapis.services.json.AbstractGoogleJsonClient.Builder {
private static String chooseEndpoint(com.google.api.client.http.HttpTransport transport) {
// If the GOOGLE_API_USE_MTLS_ENDPOINT environment variable value is "always", use mTLS endpoint.
// If the env variable is "auto", use mTLS endpoint if and only if the transport is mTLS.
// Use the regular endpoint for all other cases.
String useMtlsEndpoint = System.getenv("GOOGLE_API_USE_MTLS_ENDPOINT");
useMtlsEndpoint = useMtlsEndpoint == null ? "auto" : useMtlsEndpoint;
if ("always".equals(useMtlsEndpoint) || ("auto".equals(useMtlsEndpoint) && transport != null && transport.isMtls())) {
return DEFAULT_MTLS_ROOT_URL;
}
return DEFAULT_ROOT_URL;
}
/**
* Returns an instance of a new builder.
*
* @param transport HTTP transport, which should normally be:
* <ul>
* <li>Google App Engine:
* {@code com.google.api.client.extensions.appengine.http.UrlFetchTransport}</li>
* <li>Android: {@code newCompatibleTransport} from
* {@code com.google.api.client.extensions.android.http.AndroidHttp}</li>
* <li>Java: {@link com.google.api.client.googleapis.javanet.GoogleNetHttpTransport#newTrustedTransport()}
* </li>
* </ul>
* @param jsonFactory JSON factory, which may be:
* <ul>
* <li>Jackson: {@code com.google.api.client.json.jackson2.JacksonFactory}</li>
* <li>Google GSON: {@code com.google.api.client.json.gson.GsonFactory}</li>
* <li>Android Honeycomb or higher:
* {@code com.google.api.client.extensions.android.json.AndroidJsonFactory}</li>
* </ul>
* @param httpRequestInitializer HTTP request initializer or {@code null} for none
* @since 1.7
*/
public Builder(com.google.api.client.http.HttpTransport transport, com.google.api.client.json.JsonFactory jsonFactory,
com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
super(
transport,
jsonFactory,
Builder.chooseEndpoint(transport),
DEFAULT_SERVICE_PATH,
httpRequestInitializer,
false);
setBatchPath(DEFAULT_BATCH_PATH);
}
/** Builds a new instance of {@link StreetViewPublish}. */
@Override
public StreetViewPublish build() {
return new StreetViewPublish(this);
}
@Override
public Builder setRootUrl(String rootUrl) {
return (Builder) super.setRootUrl(rootUrl);
}
@Override
public Builder setServicePath(String servicePath) {
return (Builder) super.setServicePath(servicePath);
}
@Override
public Builder setBatchPath(String batchPath) {
return (Builder) super.setBatchPath(batchPath);
}
@Override
public Builder setHttpRequestInitializer(com.google.api.client.http.HttpRequestInitializer httpRequestInitializer) {
return (Builder) super.setHttpRequestInitializer(httpRequestInitializer);
}
@Override
public Builder setApplicationName(String applicationName) {
return (Builder) super.setApplicationName(applicationName);
}
@Override
public Builder setSuppressPatternChecks(boolean suppressPatternChecks) {
return (Builder) super.setSuppressPatternChecks(suppressPatternChecks);
}
@Override
public Builder setSuppressRequiredParameterChecks(boolean suppressRequiredParameterChecks) {
return (Builder) super.setSuppressRequiredParameterChecks(suppressRequiredParameterChecks);
}
@Override
public Builder setSuppressAllChecks(boolean suppressAllChecks) {
return (Builder) super.setSuppressAllChecks(suppressAllChecks);
}
/**
* Set the {@link StreetViewPublishRequestInitializer}.
*
* @since 1.12
*/
public Builder setStreetViewPublishRequestInitializer(
StreetViewPublishRequestInitializer streetviewpublishRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(streetviewpublishRequestInitializer);
}
@Override
public Builder setGoogleClientRequestInitializer(
com.google.api.client.googleapis.services.GoogleClientRequestInitializer googleClientRequestInitializer) {
return (Builder) super.setGoogleClientRequestInitializer(googleClientRequestInitializer);
}
}
}
|
googleapis/google-api-java-client-services
|
clients/google-api-services-streetviewpublish/v1/1.31.0/com/google/api/services/streetviewpublish/v1/StreetViewPublish.java
|
Java
|
apache-2.0
| 65,530
|
[
30522,
1013,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1008,
1999,
12646,
2007,
1996,
6105,
1012,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1008,
1008,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1008,
1008,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
5500,
2104,
1996,
6105,
1008,
2003,
5500,
2006,
2019,
1000,
2004,
2003,
1000,
3978,
1010,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
1008,
2030,
13339,
1012,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
12546,
2104,
1008,
1996,
6105,
1012,
1008,
1013,
1013,
1008,
1008,
2023,
3642,
2001,
7013,
2011,
16770,
1024,
1013,
1013,
21025,
2705,
12083,
1012,
4012,
1013,
8224,
9331,
2483,
1013,
8224,
1011,
17928,
1011,
9262,
1011,
7396,
1011,
2578,
1013,
1008,
19933,
2012,
2115,
2219,
3891,
1012,
1008,
1013,
7427,
4012,
1012,
8224,
1012,
17928,
1012,
2578,
1012,
2395,
8584,
14289,
16558,
4509,
1012,
1058,
2487,
1025,
1013,
1008,
1008,
1008,
2326,
6210,
2005,
2395,
8584,
14289,
16558,
4509,
1006,
1058,
2487,
1007,
1012,
1008,
1008,
1026,
1052,
1028,
1008,
12466,
9475,
7760,
2000,
8224,
7341,
1010,
2247,
2007,
2597,
1010,
10296,
1010,
1998,
20831,
27425,
1012,
18726,
2064,
3749,
2019,
8278,
2005,
19120,
1010,
7176,
1010,
1998,
2039,
18570,
5310,
1011,
7013,
2395,
3193,
4871,
1012,
1008,
1026,
1013,
1052,
1028,
1008,
1008,
1026,
1052,
1028,
1008,
2005,
2062,
2592,
2055,
2023,
2326,
1010,
2156,
1996,
1008,
1026,
1037,
17850,
12879,
1027,
1000,
16770,
1024,
1013,
1013,
9797,
1012,
8224,
1012,
4012,
1013,
2395,
8584,
1013,
10172,
1013,
1000,
4539,
1027,
1000,
1035,
8744,
1000,
1028,
17928,
12653,
1026,
1013,
1037,
1028,
1008,
1026,
1013,
1052,
1028,
1008,
1008,
1026,
1052,
1028,
1008,
2023,
2326,
3594,
1063,
1030,
4957,
2395,
8584,
30524,
11709,
3081,
2049,
1008,
1063,
1030,
4957,
12508,
1065,
1012,
1008,
1026,
1013,
1052,
1028,
1008,
1008,
1030,
2144,
1015,
1012,
1017,
1008,
1030,
3166,
8224,
1010,
4297,
1012,
1008,
1013,
1030,
16081,
9028,
5582,
2015,
1006,
1000,
9262,
3527,
2278,
1000,
1007,
2270,
2465,
2395,
8584,
14289,
16558,
4509,
8908,
4012,
1012,
8224,
1012,
17928,
1012,
7396,
1012,
8224,
9331,
2483,
1012,
2578,
1012,
1046,
3385,
1012,
10061,
3995,
8649,
2571,
22578,
2239,
20464,
11638,
1063,
1013,
1013,
3602,
1024,
2681,
2023,
10763,
3988,
17629,
2012,
1996,
2327,
1997,
1996,
5371,
1012,
10763,
1063,
4012,
1012,
8224,
1012,
17928,
1012,
7396,
1012,
21183,
4014,
1012,
3653,
8663,
20562,
2015,
1012,
14148,
12259,
1006,
4012,
1012,
8224,
1012,
17928,
1012,
7396,
1012,
8224,
9331,
2483,
1012,
8224,
21823,
4877,
1012,
2350,
1035,
2544,
1027,
1027,
1015,
1004,
1004,
1006,
4012,
1012,
8224,
1012,
17928,
1012,
7396,
1012,
8224,
9331,
2483,
1012,
8224,
21823,
4877,
1012,
3576,
1035,
2544,
1028,
1027,
3590,
1064,
1064,
1006,
4012,
1012,
30523,
14289,
16558,
4509,
2890,
15500,
5498,
20925,
17629,
1065,
2000,
3988,
4697,
3795,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
14289,
16558,
4509,
2890,
15500,
5498,
20925,
17629,
1065,
2000,
3988,
4697,
3795,
30526
] |
/*
* lib/reed_solomon/encode_rs.c
*
* Overview:
* Generic Reed Solomon encoder / decoder library
*
* Copyright 2002, Phil Karn, KA9Q
* May be used under the terms of the GNU General Public License (GPL)
*
* Adaption to the kernel by Thomas Gleixner (tglx@linutronix.de)
*
* $Id: encode_rs.c 2 2007-04-05 08:51:12Z tt $
*
*/
/* Generic data width independent code which is included by the
* wrappers.
* int encode_rsX (struct rs_control *rs, uintX_t *data, int len, uintY_t *par)
*/
{
int i, j, pad;
int nn = rs->nn;
int nroots = rs->nroots;
uint16_t *alpha_to = rs->alpha_to;
uint16_t *index_of = rs->index_of;
uint16_t *genpoly = rs->genpoly;
uint16_t fb;
uint16_t msk = (uint16_t) rs->nn;
/* Check length parameter for validity */
pad = nn - nroots - len;
if (pad < 0 || pad >= nn)
return -ERANGE;
for (i = 0; i < len; i++) {
fb = index_of[((((uint16_t) data[i])^invmsk) & msk) ^ par[0]];
/* feedback term is non-zero */
if (fb != nn) {
for (j = 1; j < nroots; j++) {
par[j] ^= alpha_to[rs_modnn(rs, fb +
genpoly[nroots - j])];
}
}
/* Shift */
memmove(&par[0], &par[1], sizeof(uint16_t) * (nroots - 1));
if (fb != nn) {
par[nroots - 1] = alpha_to[rs_modnn(rs,
fb + genpoly[0])];
} else {
par[nroots - 1] = 0;
}
}
return 0;
}
|
odit/rv042
|
linux/kernel_2.6/linux/lib/reed_solomon/encode_rs.c
|
C
|
gpl-2.0
| 1,317
|
[
30522,
1013,
1008,
1008,
5622,
2497,
1013,
7305,
1035,
9168,
1013,
4372,
16044,
1035,
12667,
1012,
1039,
1008,
1008,
19184,
1024,
1008,
12391,
7305,
9168,
4372,
16044,
2099,
1013,
21933,
4063,
3075,
1008,
1008,
9385,
2526,
1010,
6316,
10556,
6826,
1010,
10556,
2683,
4160,
1008,
2089,
2022,
2109,
2104,
1996,
3408,
1997,
1996,
27004,
2236,
2270,
6105,
1006,
14246,
2140,
1007,
1008,
1008,
15581,
3258,
2000,
1996,
16293,
2011,
2726,
1043,
23057,
2595,
3678,
1006,
1056,
23296,
2595,
1030,
11409,
4904,
4948,
7646,
1012,
2139,
1007,
1008,
1008,
30524,
16044,
1035,
12667,
2595,
1006,
2358,
6820,
6593,
12667,
1035,
2491,
1008,
12667,
1010,
21318,
3372,
2595,
1035,
1056,
1008,
2951,
1010,
20014,
18798,
1010,
21318,
29405,
1035,
1056,
1008,
11968,
1007,
1008,
1013,
1063,
20014,
1045,
1010,
1046,
1010,
11687,
1025,
20014,
1050,
2078,
1027,
12667,
1011,
1028,
1050,
2078,
1025,
20014,
17212,
17206,
2015,
1027,
12667,
1011,
1028,
17212,
17206,
2015,
1025,
21318,
3372,
16048,
1035,
1056,
1008,
6541,
1035,
2000,
1027,
12667,
1011,
1028,
6541,
1035,
2000,
1025,
21318,
3372,
16048,
1035,
1056,
1008,
5950,
1035,
1997,
1027,
12667,
1011,
1028,
5950,
1035,
1997,
1025,
21318,
3372,
16048,
1035,
1056,
1008,
8991,
18155,
2100,
1027,
12667,
1011,
1028,
8991,
18155,
2100,
1025,
21318,
3372,
16048,
1035,
1056,
1042,
2497,
1025,
21318,
3372,
16048,
1035,
1056,
5796,
2243,
1027,
1006,
21318,
3372,
16048,
1035,
1056,
1007,
12667,
1011,
1028,
1050,
2078,
1025,
1013,
1008,
4638,
3091,
16381,
2005,
16406,
1008,
1013,
11687,
1027,
1050,
2078,
1011,
17212,
17206,
2015,
1011,
18798,
1025,
2065,
1006,
11687,
1026,
1014,
1064,
1064,
11687,
1028,
1027,
1050,
2078,
1007,
2709,
1011,
3690,
15465,
1025,
2005,
1006,
1045,
1027,
1014,
1025,
1045,
1026,
18798,
1025,
1045,
1009,
1009,
1007,
1063,
1042,
2497,
1027,
5950,
1035,
1997,
1031,
1006,
1006,
1006,
1006,
21318,
3372,
16048,
1035,
1056,
1007,
2951,
1031,
1045,
1033,
1007,
1034,
1999,
2615,
5244,
2243,
1007,
1004,
5796,
2243,
1007,
1034,
11968,
1031,
1014,
1033,
1033,
1025,
1013,
1008,
12247,
2744,
2003,
2512,
1011,
5717,
1008,
1013,
2065,
1006,
1042,
2497,
999,
1027,
1050,
2078,
1007,
1063,
2005,
1006,
1046,
1027,
1015,
1025,
1046,
1026,
17212,
17206,
2015,
1025,
1046,
1009,
1009,
1007,
1063,
11968,
1031,
1046,
1033,
1034,
1027,
6541,
1035,
2000,
1031,
12667,
1035,
16913,
10695,
1006,
12667,
1010,
1042,
2497,
1009,
8991,
18155,
2100,
1031,
17212,
17206,
2015,
1011,
1046,
1033,
1007,
1033,
1025,
1065,
1065,
1013,
1008,
5670,
1008,
1013,
2033,
7382,
21818,
1006,
1004,
11968,
1031,
1014,
1033,
1010,
1004,
11968,
1031,
1015,
1033,
1010,
2946,
11253,
1006,
21318,
3372,
16048,
1035,
1056,
1007,
1008,
1006,
17212,
17206,
2015,
1011,
1015,
1007,
1007,
1025,
2065,
1006,
1042,
2497,
999,
1027,
1050,
2078,
1007,
1063,
11968,
1031,
17212,
17206,
2015,
1011,
1015,
1033,
30523,
1002,
8909,
1024,
4372,
16044,
1035,
12667,
1012,
1039,
1016,
2289,
1011,
5840,
1011,
5709,
5511,
1024,
4868,
1024,
2260,
2480,
23746,
1002,
1008,
1008,
1013,
1013,
1008,
12391,
2951,
9381,
2981,
3642,
2029,
2003,
2443,
2011,
1996,
1008,
10236,
7347,
1012,
1008,
20014,
4372,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1002,
8909,
1024,
4372,
16044,
1035,
12667,
1012,
1039,
1016,
2289,
1011,
5840,
1011,
5709,
5511,
1024,
4868,
1024,
2260,
2480,
23746,
1002,
1008,
1008,
1013,
1013,
1008,
12391,
2951,
9381,
2981,
3642,
2029,
2003,
2443,
2011,
1996,
1008,
10236,
7347,
1012,
1008,
20014,
4372,
30526
] |
<?php
require (dirname(__FILE__) . "/inc/config.inc.php");
?>
<!DOCTYPE html>
<html>
<head>
<title>Tales Against Humanity</title>
<link href="https://maxcdn.bootstrapcdn.com/bootswatch/3.3.6/slate/bootstrap.min.css" rel="stylesheet" integrity="sha384-X9JiR5BtXUXiV6R3XuMyVGefFyy+18PHpBwaMfteb/vd2RrK6Gt4KPenkQyWLxCC" crossorigin="anonymous">
<link href="css/styles.css" rel="stylesheet">
<link href="css/font-awesome-4.5.0/css/font-awesome.min.css" rel="stylesheet">
<script src="https://js.pusher.com/3.0/pusher.min.js"></script>
<script src="http://code.jquery.com/jquery-2.2.1.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js" integrity="sha384-0mSbJDEHialfmuBBQP6A4Qrprq5OVfW37PRR3j5ELqxss1yVqOtnepnHVP9aJ7xS" crossorigin="anonymous"></script>
<script src="https://cdn.rawgit.com/leggetter/pusher-js-client-auth/master/dist/pusher-js-client-auth.js"></script>
<script src="js/bootstrap-growl/jquery.bootstrap-growl.min.js"></script>
<script src="js/jquery.blockUI.js"></script>
<script>
var pusher = null;
var name = null;
var channel = null;
var presenceChannel = null;
var pusherEndpoint = 'https://api.pusherapp.com/apps/<?=PUSHER_APP_ID; ?>/events';
var interval = null;
var voted = false;
function decrementTimer()
{
if ($('#countdownTimer').html() <= '0')
{
clearInterval(interval);
interval = null;
}
else
{
$('#countdownTimer').html(parseInt($('#countdownTimer').html(),
10) - 1);
}
}
function setUpTimer(time)
{
$('#countdownTimer').html(time);
interval = setInterval(decrementTimer, 1000);
}
function customGrowl(text)
{
$.bootstrapGrowl(text,
{
ele: 'body',
type: 'success',
offset: { from: 'top', amount: 60 },
align: 'right',
width: 250,
delay: 3000,
allow_dismiss: true,
stackup_spacing: 10
});
}
$(document).ready(function()
{
$('body').on('click', '.voteLink', function(event)
{
event.preventDefault();
$('#controlArea').block(
{
message: "Voted",
css:
{
border: 'none',
padding: '15px',
backgroundColor: '#000',
'-webkit-border-radius': '10px',
'-moz-border-radius': '10px',
opacity: .5,
color: '#fff'
}
}
);
var id = event.target.id;
console.log("Voting for " + id);
if(!voted)
{
submitVoteToServer(id);
voted = true;
}
});
$('body').on('click', '#phraseInputSubmit', function(event)
{
event.preventDefault();
var entry = $('#phraseInputBox').val();
console.log("User entered: " + entry);
submitPhraseToServer(entry);
$('#phraseInputSubmit').attr('disabled', true);
});
});
function newPhrase(data)
{
// When the server sends out a new phrase
var obj = JSON.parse(data);
$('#StoryPlaceholder').html(obj['phrase']);
$('#voteLinkDiv').html(' \
<form id="phraseForm" class="form-inline"> \
<div class="form-group"> \
<input type="text" class="form-control" id="phraseInputBox" /> \
<button type="button" class="form-control" id="phraseInputSubmit">\
Suggest » \
</button> \
</div> \
</form> \
');
voted = false;
}
function voteResult(data)
{
// When the server delivers the vote result
var obj = JSON.parse(data);
if (obj['winningtext'] == null || obj['winningtext'] == "")
{
$('#voteLinkDiv').html("<h3>No phrases were submitted, so there was no winner.</h3>");
}
else
{
$('#voteLinkDiv').html("<h3>The winning phrase was: " + obj['winningtext'] + "</h3>");
}
}
function voteRequest(data)
{
// When the server asks the users to vote (thus delivering all vote options)
var obj = JSON.parse(data);
console.dir(obj);
var suggestions = obj['suggestions'];
var html = "// ";
for (var key in suggestions)
{
html = html + '<button id="' + key + '" class="voteLink btn btn-primary btn-sm">'
+ suggestions[key] + '</button> // ';
}
$('#voteLinkDiv').html(html);
}
function submitPhraseToServer(phrase)
{
console.log("Sending this phrase: " + phrase);
var triggered = channel.trigger('client-submit_phrase',
{ 'phrase' : phrase });
}
function submitVoteToServer(phraseId)
{
var triggered = channel.trigger('client-submit_vote',
{ 'phraseid' : phraseId });
}
function login()
{
name = $('#nickname').val();
pusher = new Pusher('<?=PUSHER_APP_KEY; ?>',
{
authTransport: 'client',
clientAuth:
{
key: '<?=PUSHER_APP_KEY; ?>',
secret: '<?=PUSHER_APP_SECRET; ?>',
user_id: name,
user_info: {}
}
}
);
$('#loginModal').modal('hide');
channel = pusher.subscribe('<?=PUSHER_CHANNEL; ?>');
channel.bind('new_phrase', function(data)
{
setUpTimer('13');
newPhrase(data);
console.log(data);
});
channel.bind('vote_result', function(data)
{
setUpTimer('2');
voteResult(data);
console.log(data);
});
channel.bind('vote_request', function(data)
{
setUpTimer('8');
voteRequest(data);
console.log(data);
});
channel.bind('lock_unlock', function(data)
{
var obj = JSON.parse(data);
if (obj['action'] == "lock")
{
console.log("Lock signal received");
$('#controlArea').block( { message: null });
}
else
{
console.log("Unlock signal received");
$('#controlArea').unblock();
}
});
customGrowl("Welcome, " + name + "!");
presenceChannel = pusher.subscribe('presence-threewords');
presenceChannel.bind('pusher:subscription_succeeded', function(members)
{
$('#onlineCount').html("0");
members.each(function(member)
{
$('#onlineCount').html(parseInt($('#onlineCount').html(), 10) + 1);
console.log(member['user_id']);
});
});
presenceChannel.bind('pusher:member_added', function(member)
{
console.dir(member);
customGrowl(member['id'] + " has come online");
console.log(member['id'] + " came online");
if (member['user_id'] != name)
$('#onlineCount').html(parseInt($('#onlineCount').html(), 10) + 1);
});
presenceChannel.bind('pusher:member_removed', function(member)
{
customGrowl(member['id'] + " has left");
console.log(member['id'] + " left");
$('#onlineCount').html(parseInt($('#onlineCount').html(), 10) - 1);
});
}
$(document).ready(function()
{
$('#loginModal').modal('show');
$('#loginModal').on('hidden.bs.modal', function(e)
{
console.log("Closed that thing. Name is" + name);
if (name == null || name == "" || name == undefined
|| name == "null" || name == "undefined")
{
$('#loginModal').modal('show');
}
});
$('#play').click(function()
{
if ($('#nickname').val() != null && $('#nickname').val() != "")
login();
});
});
$('#nicknameForm').on('keyup keypress', function(e)
{
var keyCode = e.keyCode || e.which;
if (keyCode === 13)
{
e.preventDefault();
return false;
}
});
$('#nicknameForm').submit(function()
{
return false;
});
Pusher.log = function(message)
{
if (window.console && window.console.log)
{
window.console.log(message);
}
};
</script>
</head>
<body>
<nav class="navbar navbar-dark navbar-fixed-top navbar-transparent navbar-inner">
<div class="container">
<ul class="nav navbar-nav">
<li class="active"><a class="navbar-brand" href="/">Tales Against Humanity!</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a>Time Remaining:</a></li>
<li><a><span id="countdownTimer">0</span> seconds</a></li>
</div>
</div>
</nav>
<div class="container">
<div class="jumbotron">
<h2>Current Tale...</h2>
<h3 id="StoryPlaceholder"></h3>
</div>
</div>
<div class= "container">
<div class="jumbotron" id="controlArea">
<div class="container">
<h3>
Suggest your own three word phrase below, then vote for
the funniest by clicking on it. Collectively hack yourself
a story together!
</h3>
<div id="voteLinkDiv"></div>
</div>
</div>
</div>
<div class="container">
<div class="jumbotron">
<h4><span id="onlineCount">0</span> people online.</h4>
</div>
</div>
<div class="container align-middle align-bottom">
<a href="https://www.facebook.com/talesAgainstHumanity">
<i class="fa fa-facebook" style="font-size:48px"></i>
</a>
<a href="https://github.com/Chraya/HackYourselfAStory">
<i class="fa fa-github" style="font-size:48px"></i>
</a>
</div>
<div class="modal fade" id="loginModal" tabindex="-1" role="dialog">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<h4 class="modal-title">Choose a Nickname</h4>
</div>
<div class="modal-body">
<div class="container">
<h2>Please choose a nickname</h2>
<div class="col-md-12">
<form class="form-inline" id="nicknameForm" onsubmit="return false;">
<div class="form-group">
<input type="text" id="nickname" maxlength="64" class="form-control" placeholder="Enter a Nickname" />
</div>
</form>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" id="play" class="btn btn-primary">Let's play!</button>
</div>
</div>
</div>
</div>
</body>
</html>
|
Chraya/HackYourselfAStory
|
web/index.php
|
PHP
|
gpl-3.0
| 11,503
|
[
30522,
1026,
1029,
25718,
5478,
1006,
16101,
18442,
1006,
1035,
1035,
5371,
1035,
1035,
1007,
1012,
1000,
1013,
4297,
1013,
9530,
8873,
2290,
1012,
4297,
1012,
25718,
1000,
1007,
1025,
1029,
1028,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
1028,
1026,
2132,
1028,
1026,
2516,
1028,
7122,
30524,
1017,
1012,
1020,
1013,
12796,
1013,
6879,
6494,
2361,
1012,
8117,
1012,
20116,
2015,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
11109,
1027,
1000,
21146,
22025,
2549,
1011,
1060,
2683,
4478,
2099,
2629,
19279,
2595,
5602,
12848,
2575,
2099,
2509,
2595,
2819,
2100,
2615,
3351,
16329,
2100,
1009,
2324,
8458,
2361,
2497,
4213,
2213,
6199,
15878,
1013,
1058,
2094,
2475,
12171,
2243,
2575,
13512,
2549,
2243,
11837,
2243,
4160,
2100,
13668,
2595,
9468,
1000,
2892,
10050,
11528,
1027,
1000,
10812,
1000,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
20116,
2015,
1013,
6782,
1012,
20116,
2015,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
20116,
2015,
1013,
15489,
1011,
12476,
1011,
1018,
1012,
1019,
1012,
1014,
1013,
20116,
2015,
1013,
15489,
1011,
12476,
1012,
8117,
1012,
20116,
2015,
1000,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
1028,
1026,
5896,
5034,
2278,
1027,
1000,
16770,
1024,
1013,
1013,
1046,
2015,
1012,
5245,
2121,
1012,
4012,
1013,
1017,
1012,
1014,
1013,
5245,
2121,
1012,
8117,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
5896,
5034,
2278,
1027,
1000,
8299,
1024,
1013,
1013,
3642,
1012,
1046,
4226,
2854,
1012,
4012,
1013,
1046,
4226,
2854,
1011,
1016,
1012,
1016,
1012,
1015,
1012,
8117,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
5896,
5034,
2278,
1027,
1000,
16770,
1024,
1013,
1013,
4098,
19797,
2078,
1012,
6879,
6494,
15042,
2094,
2078,
1012,
4012,
1013,
6879,
6494,
2361,
1013,
1017,
1012,
1017,
1012,
1020,
1013,
1046,
2015,
1013,
6879,
6494,
2361,
1012,
8117,
1012,
1046,
2015,
1000,
11109,
1027,
1000,
21146,
22025,
2549,
1011,
1014,
5244,
2497,
3501,
25383,
4818,
16715,
12083,
2497,
4160,
2361,
2575,
2050,
2549,
4160,
14536,
2099,
4160,
2629,
4492,
2546,
2860,
24434,
18098,
2099,
2509,
3501,
2629,
2884,
4160,
2595,
4757,
2487,
2100,
2615,
4160,
4140,
2638,
2361,
25311,
2615,
2361,
2683,
13006,
2581,
2595,
2015,
1000,
2892,
10050,
11528,
1027,
1000,
10812,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
5896,
5034,
2278,
1027,
1000,
16770,
1024,
1013,
1013,
3729,
2078,
1012,
6315,
23806,
1012,
4012,
1013,
4190,
18150,
3334,
1013,
5245,
2121,
1011,
1046,
2015,
1011,
7396,
1011,
8740,
2705,
1013,
3040,
1013,
4487,
3367,
1013,
5245,
2121,
1011,
1046,
2015,
1011,
7396,
1011,
8740,
2705,
1012,
1046,
2015,
1000,
1028,
1026,
1013,
5896,
1028,
1026,
5896,
5034,
2278,
1027,
1000,
1046,
2015,
1013,
6879,
6494,
2361,
1011,
13349,
1013,
1046,
4226,
2854,
1012,
6879,
6494,
2361,
1011,
13349,
1012,
8117,
1012,
1046,
2015,
1000,
30523,
2114,
8438,
1026,
1013,
2516,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
16770,
1024,
1013,
1013,
4098,
19797,
2078,
1012,
6879,
6494,
15042,
2094,
2078,
1012,
4012,
1013,
6879,
18866,
1013,
1017,
1012,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2114,
8438,
1026,
1013,
2516,
1028,
1026,
4957,
17850,
12879,
1027,
1000,
16770,
1024,
1013,
1013,
4098,
19797,
2078,
1012,
6879,
6494,
15042,
2094,
2078,
1012,
4012,
1013,
6879,
18866,
1013,
1017,
1012,
30526
] |
#!/bin/bash
#: Convert common movie files (mp4, mov, mts) to vp9/vorbis. Targets higher quality and sane-ish file size.
#: Configuration should be good enough for most video @ 1080p60fps
#:
#: Tested on Ubuntu Server 17.04
#: Author: Fastily
# Set bash case-insensitivity and set non-matching patterns to expand to nothing
shopt -s globstar nullglob nocaseglob
##
# Print program help and exit
##
usage()
{
printf "Usage:\n"
printf "%s [-a] [-s] [-h]\n" "${0##*/}"
printf "\t-a: Turn audio transcoding on (off by default)\n"
printf "\t-s: Enable slow-motion encoding (8x slowdown @ 30fps)\n"
printf "\t-h: Show this message and exit\n"
exit 1
}
## Flag which toggles audio
aSet="-an"
enableSlowMo=false
while getopts "ahs" flag; do
case "$flag" in
a) aSet='-c:a libvorbis -q:a 8' ;;
s) enableSlowMo=true ;;
*) usage ;;
esac
done
cd "$PWD"
if [ "$enableSlowMo" = true ]; then
for f in **/*.{mp4,mov,mts}; do
printf '%s\n[INFO]: transcoding "%s"...\n' "$(date)" "$f"
ffmpeg -y -i "$f" -c:v libvpx-vp9 -b:v 0 -crf 24 -threads 6 -speed 0 -r 30 -vf "setpts=8*PTS" -an -map_metadata -1 -loglevel panic -f webm "${f%.*}.webm"
done
else
for f in **/*.{mp4,mov,mts}; do
printf '%s\n[INFO]: transcoding "%s"...\n' "$(date)" "$f"
ffmpeg -y -i "$f" -c:v libvpx-vp9 -b:v 0 -crf 24 -threads 6 -speed 0 $aSet -map_metadata -1 -loglevel panic -f webm "${f%.*}.webm"
done
fi
|
fastily/autobots
|
ubuntu/scripts/bin/toWebm.sh
|
Shell
|
gpl-3.0
| 1,392
|
[
30522,
1001,
999,
1013,
8026,
1013,
24234,
1001,
1024,
10463,
2691,
3185,
6764,
1006,
6131,
2549,
1010,
9587,
2615,
1010,
11047,
2015,
1007,
2000,
21210,
2683,
1013,
29536,
15185,
2483,
1012,
7889,
3020,
3737,
1998,
22856,
1011,
2003,
2232,
5371,
2946,
1012,
1001,
1024,
9563,
2323,
2022,
2204,
2438,
2005,
2087,
2678,
1030,
10715,
2692,
2361,
16086,
22540,
2015,
1001,
1024,
1001,
1024,
7718,
2006,
1057,
8569,
3372,
2226,
8241,
2459,
1012,
5840,
1001,
1024,
3166,
1024,
3435,
6588,
1001,
2275,
24234,
2553,
1011,
16021,
6132,
25090,
24872,
1998,
2275,
2512,
1011,
9844,
7060,
2000,
7818,
2000,
2498,
4497,
2102,
1011,
1055,
1043,
4135,
5910,
7559,
19701,
23296,
16429,
2053,
18382,
23296,
16429,
1001,
1001,
1001,
6140,
2565,
2393,
1998,
6164,
1001,
1001,
8192,
1006,
1007,
1063,
6140,
2546,
1000,
8192,
1024,
1032,
1050,
1000,
6140,
2546,
1000,
1003,
1055,
1031,
1011,
1037,
1033,
1031,
1011,
1055,
1033,
1031,
1011,
1044,
1033,
1032,
1050,
1000,
1000,
1002,
1063,
1014,
1001,
1001,
1008,
1013,
1065,
1000,
6140,
2546,
1000,
1032,
1056,
1011,
1037,
1024,
2735,
5746,
9099,
3597,
4667,
2006,
1006,
2125,
2011,
12398,
1007,
1032,
1050,
1000,
6140,
2546,
30524,
5210,
2029,
2000,
24989,
5746,
2004,
3388,
1027,
1000,
1011,
2019,
1000,
12939,
8261,
5302,
1027,
6270,
2096,
2131,
7361,
3215,
1000,
6289,
2015,
1000,
5210,
1025,
2079,
2553,
1000,
1002,
5210,
1000,
1999,
1037,
1007,
2004,
3388,
1027,
1005,
1011,
1039,
1024,
1037,
5622,
2497,
14550,
18477,
1011,
1053,
1024,
1037,
1022,
1005,
1025,
1025,
1055,
1007,
12939,
8261,
5302,
1027,
2995,
1025,
1025,
1008,
1007,
8192,
1025,
1025,
28776,
2278,
2589,
3729,
1000,
1002,
1052,
21724,
1000,
2065,
1031,
1000,
1002,
12939,
8261,
5302,
1000,
1027,
2995,
1033,
1025,
2059,
2005,
1042,
1999,
1008,
1008,
1013,
1008,
1012,
1063,
6131,
2549,
1010,
9587,
2615,
1010,
11047,
2015,
1065,
1025,
2079,
6140,
2546,
1005,
1003,
1055,
1032,
1050,
1031,
18558,
1033,
1024,
9099,
3597,
4667,
1000,
1003,
1055,
1000,
1012,
1012,
1012,
1032,
1050,
1005,
1000,
1002,
1006,
3058,
1007,
1000,
1000,
1002,
1042,
1000,
21461,
8737,
13910,
1011,
1061,
1011,
1045,
1000,
1002,
1042,
1000,
1011,
1039,
1024,
1058,
5622,
2497,
2615,
2361,
2595,
1011,
21210,
2683,
1011,
1038,
1024,
1058,
1014,
1011,
13675,
2546,
2484,
1011,
16457,
1020,
1011,
3177,
1014,
1011,
1054,
2382,
1011,
1058,
2546,
1000,
2275,
22798,
1027,
1022,
1008,
19637,
1000,
1011,
2019,
1011,
4949,
1035,
27425,
1011,
1015,
1011,
8833,
20414,
2884,
6634,
1011,
1042,
4773,
2213,
1000,
1002,
1063,
1042,
1003,
1012,
1008,
1065,
1012,
4773,
2213,
1000,
2589,
2842,
2005,
1042,
1999,
1008,
1008,
1013,
1008,
1012,
1063,
6131,
2549,
1010,
9587,
2615,
1010,
11047,
2015,
1065,
1025,
2079,
6140,
2546,
1005,
1003,
1055,
1032,
1050,
1031,
18558,
1033,
1024,
9099,
3597,
4667,
1000,
1003,
30523,
1000,
1032,
1056,
1011,
1055,
1024,
9585,
4030,
1011,
4367,
17181,
1006,
1022,
2595,
4030,
7698,
1030,
2382,
22540,
2015,
1007,
1032,
1050,
1000,
6140,
2546,
1000,
1032,
1056,
1011,
1044,
1024,
2265,
2023,
4471,
1998,
6164,
1032,
1050,
1000,
6164,
1015,
1065,
1001,
1001,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1000,
1032,
1056,
1011,
1055,
1024,
9585,
4030,
1011,
4367,
17181,
1006,
1022,
2595,
4030,
7698,
1030,
2382,
22540,
2015,
1007,
1032,
1050,
1000,
6140,
2546,
1000,
1032,
1056,
1011,
1044,
1024,
2265,
2023,
4471,
1998,
6164,
1032,
1050,
1000,
6164,
1015,
1065,
1001,
1001,
30526
] |
// Copyright 2016 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_EVENT_ROUTER_BASE_H_
#define CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_EVENT_ROUTER_BASE_H_
#include <map>
#include <string>
#include <utility>
#include "base/macros.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/ui/input_method/input_method_engine_base.h"
#include "ui/base/ime/ime_engine_handler_interface.h"
namespace extensions {
class InputImeEventRouterBase {
public:
explicit InputImeEventRouterBase(Profile* profile);
virtual ~InputImeEventRouterBase();
// Gets the input method engine if the extension is active.
virtual input_method::InputMethodEngineBase* GetActiveEngine(
const std::string& extension_id) = 0;
Profile* profile() const { return profile_; }
private:
Profile* profile_;
DISALLOW_COPY_AND_ASSIGN(InputImeEventRouterBase);
};
} // namespace extensions
#endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_IME_INPUT_IME_EVENT_ROUTER_BASE_H_
|
ds-hwang/chromium-crosswalk
|
chrome/browser/extensions/api/input_ime/input_ime_event_router_base.h
|
C
|
bsd-3-clause
| 1,149
|
[
30522,
1013,
1013,
9385,
2355,
1996,
10381,
21716,
5007,
6048,
1012,
2035,
2916,
9235,
1012,
1013,
1013,
2224,
1997,
2023,
3120,
3642,
2003,
9950,
2011,
1037,
18667,
2094,
1011,
2806,
6105,
2008,
2064,
2022,
1013,
1013,
2179,
1999,
1996,
6105,
5371,
1012,
1001,
2065,
13629,
2546,
18546,
1035,
16602,
1035,
14305,
1035,
17928,
1035,
7953,
1035,
10047,
2063,
1035,
7953,
1035,
10047,
2063,
1035,
2724,
1035,
2799,
2099,
1035,
2918,
1035,
1044,
1035,
1001,
9375,
18546,
1035,
16602,
1035,
14305,
1035,
17928,
1035,
7953,
1035,
10047,
2063,
1035,
7953,
1035,
10047,
2063,
1035,
2724,
1035,
2799,
2099,
1035,
2918,
1035,
1044,
1035,
1001,
2421,
1026,
4949,
1028,
1001,
2421,
1026,
5164,
1028,
1001,
2421,
1026,
9710,
1028,
1001,
2421,
1000,
2918,
1013,
26632,
2015,
1012,
1044,
1000,
1001,
2421,
1000,
18546,
1013,
16602,
1013,
17879,
1013,
6337,
1012,
1044,
1000,
1001,
2421,
1000,
18546,
1013,
16602,
1013,
21318,
1013,
7953,
1035,
4118,
1013,
7953,
1035,
4118,
1035,
3194,
1035,
2918,
1012,
1044,
1000,
1001,
2421,
1000,
21318,
1013,
2918,
1013,
10047,
2063,
1013,
10047,
2063,
1035,
3194,
1035,
28213,
1035,
8278,
1012,
1044,
1000,
3415,
15327,
14305,
1063,
2465,
7953,
14428,
18697,
3372,
22494,
3334,
15058,
1063,
2270,
1024,
13216,
7953,
14428,
18697,
3372,
22494,
3334,
15058,
1006,
6337,
1008,
6337,
1007,
1025,
7484,
1066,
7953,
14428,
18697,
3372,
22494,
3334,
15058,
1006,
1007,
1025,
1013,
1013,
4152,
1996,
7953,
4118,
3194,
2065,
1996,
5331,
2003,
3161,
1012,
7484,
7953,
1035,
4118,
1024,
1024,
7953,
11368,
6806,
4181,
11528,
15878,
11022,
1008,
2131,
19620,
13159,
3170,
1006,
9530,
3367,
2358,
2094,
1024,
1024,
5164,
1004,
5331,
1035,
8909,
1007,
1027,
1014,
1025,
6337,
1008,
6337,
1006,
1007,
9530,
3367,
1063,
2709,
6337,
1035,
1025,
1065,
2797,
1024,
6337,
1008,
6337,
1035,
1025,
4487,
12002,
8261,
1035,
6100,
1035,
1998,
1035,
23911,
1006,
7953,
14428,
18697,
3372,
22494,
3334,
15058,
1007,
1025,
1065,
1025,
1065,
1013,
1013,
3415,
15327,
14305,
1001,
2203,
10128,
1013,
1013,
18546,
1035,
16602,
1035,
14305,
1035,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
require 'open-uri'
require 'nokogiri'
require 'pry'
require "oracle/version"
require 'oracle/cli'
require 'oracle/hero'
require 'oracle/scraper'
|
TraiLYNNE/oracle-cli-project
|
lib/oracle.rb
|
Ruby
|
mit
| 146
|
[
30522,
5478,
1005,
2330,
1011,
24471,
2072,
1005,
5478,
1005,
2053,
3683,
23243,
1005,
5478,
1005,
29198,
1005,
5478,
1000,
14721,
1013,
2544,
1000,
5478,
1005,
14721,
1013,
18856,
2072,
1005,
5478,
1005,
14721,
1013,
5394,
1005,
5478,
1005,
14721,
1013,
26988,
2099,
1005,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
package org.zezutom.schematic.model.json;
import org.zezutom.schematic.service.generator.json.StringGenerator;
public class StringNodeTest extends NodeTestCase<String, StringGenerator, StringNode> {
@Override
StringNode newInstance(String name, StringGenerator generator) {
return new StringNode(name, generator);
}
@Override
Class<StringGenerator> getGeneratorClass() {
return StringGenerator.class;
}
@Override
String getTestValue() {
return "test";
}
}
|
zezutom/schematic
|
src/test/java/org/zezutom/schematic/model/json/StringNodeTest.java
|
Java
|
mit
| 521
|
[
30522,
7427,
8917,
1012,
27838,
9759,
20389,
1012,
8040,
28433,
4588,
1012,
2944,
1012,
1046,
3385,
1025,
12324,
8917,
1012,
27838,
9759,
20389,
1012,
8040,
28433,
4588,
1012,
2326,
1012,
13103,
1012,
1046,
3385,
1012,
5164,
6914,
6906,
4263,
1025,
2270,
2465,
5164,
3630,
3207,
22199,
8908,
13045,
22199,
18382,
1026,
5164,
1010,
5164,
6914,
6906,
4263,
1010,
5164,
3630,
3207,
1028,
1063,
1030,
2058,
15637,
5164,
3630,
3207,
2047,
7076,
26897,
1006,
5164,
2171,
1010,
5164,
6914,
6906,
4263,
13103,
1007,
1063,
2709,
2047,
5164,
3630,
3207,
1006,
2171,
1010,
13103,
1007,
1025,
1065,
1030,
2058,
15637,
2465,
1026,
5164,
6914,
6906,
4263,
1028,
2131,
6914,
6906,
4263,
26266,
1006,
1007,
1063,
2709,
5164,
6914,
6906,
4263,
1012,
2465,
1025,
1065,
1030,
2058,
15637,
5164,
2131,
22199,
10175,
5657,
1006,
1007,
1063,
2709,
1000,
3231,
1000,
1025,
1065,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="sl_SI">
<context>
<name>AboutDialog</name>
<message>
<location filename="../forms/aboutdialog.ui" line="+14"/>
<source>About LEOcoin</source>
<translation>O LEOcoin</translation>
</message>
<message>
<location line="+39"/>
<source><b>LEOcoin</b> version</source>
<translation><b>LEOcoin</b> verzija</translation>
</message>
<message>
<location line="+41"/>
<source>Copyright © 2009-2014 The Bitcoin developers
Copyright © 2012-2014 The NovaCoin developers
Copyright © 2014 The BlackCoin developers
Copyright © 2014-%1 The LEOcoin developers</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+16"/>
<source>
This is experimental software.
Distributed under the MIT/X11 software license, see the accompanying file COPYING or <a href="http://www.opensource.org/licenses/mit-license.php">http://www.opensource.org/licenses/mit-license.php</a>.
This product includes software developed by the OpenSSL Project for use in the OpenSSL Toolkit (<a href="https://www.openssl.org/">https://www.openssl.org/</a>) and cryptographic software written by Eric Young (<a href="mailto:eay@cryptsoft.com">eay@cryptsoft.com</a>) and UPnP software written by Thomas Bernard.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AddressTableModel</name>
<message>
<location filename="../addresstablemodel.cpp" line="+218"/>
<source>Label</source>
<translation>Oznaka</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Naslov</translation>
</message>
<message>
<location line="+0"/>
<source>pubkey</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
<source>stealth</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+34"/>
<source>(no label)</source>
<translation>(ni oznake)</translation>
</message>
<message>
<location line="+4"/>
<source>Stealth Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
<source>n/a</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>AskPassphraseDialog</name>
<message>
<location filename="../forms/askpassphrasedialog.ui" line="+26"/>
<source>Passphrase Dialog</source>
<translation>Poziv gesla</translation>
</message>
<message>
<location line="+21"/>
<source>Enter passphrase</source>
<translation>Vnesite geslo</translation>
</message>
<message>
<location line="+14"/>
<source>New passphrase</source>
<translation>Novo geslo</translation>
</message>
<message>
<location line="+14"/>
<source>Repeat new passphrase</source>
<translation>Ponovite novo geslo</translation>
</message>
<message>
<location line="+33"/>
<location line="+16"/>
<source>Serves to disable the trivial sendmoney when OS account compromised. Provides no real security.</source>
<translation>Služi kot onemogočenje pošiljanja prostega denarja, v primerih okužbe operacijskega sistema. Ne ponuja prave zaščite.</translation>
</message>
<message>
<location line="-13"/>
<source>For staking only</source>
<translation>Samo za staking.</translation>
</message>
<message>
<location line="+16"/>
<source>Enable messaging</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../askpassphrasedialog.cpp" line="+39"/>
<source>Enter the new passphrase to the wallet.<br/>Please use a passphrase of <b>10 or more random characters</b>, or <b>eight or more words</b>.</source>
<translation>Vnesite novo geslo za vstop v denarnico.<br/>Prosimo, da geslo sestavite iz <b> 10 ali več naključnih znakov</b> oz. <b>osem ali več besed</b>.</translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt wallet</source>
<translation>Šifriraj denarnico</translation>
</message>
<message>
<location line="+11"/>
<source>This operation needs your wallet passphrase to unlock the wallet.</source>
<translation>To dejanje zahteva geslo za odklepanje vaše denarnice.</translation>
</message>
<message>
<location line="+5"/>
<source>Unlock wallet</source>
<translation>Odkleni denarnico</translation>
</message>
<message>
<location line="+3"/>
<source>This operation needs your wallet passphrase to decrypt the wallet.</source>
<translation>To dejanje zahteva geslo za dešifriranje vaše denarnice.</translation>
</message>
<message>
<location line="+5"/>
<source>Decrypt wallet</source>
<translation>Dešifriraj denarnico</translation>
</message>
<message>
<location line="+3"/>
<source>Change passphrase</source>
<translation>Zamenjaj geslo</translation>
</message>
<message>
<location line="+1"/>
<source>Enter the old and new passphrase to the wallet.</source>
<translation>Vnesite staro in novo geslo denarnice.</translation>
</message>
<message>
<location line="+45"/>
<source>Confirm wallet encryption</source>
<translation>Potrdi šifriranje denarnice</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: If you encrypt your wallet and lose your passphrase, you will <b>LOSE ALL OF YOUR COINS</b>!</source>
<translation>Opozorilo: Če šifrirate svojo denarnico in izgubite svoje geslo, boste <b> IZGUBILI VSE SVOJE KOVANCE</b>!</translation>
</message>
<message>
<location line="+0"/>
<source>Are you sure you wish to encrypt your wallet?</source>
<translation>Ali ste prepričani, da želite šifrirati vašo denarnico?</translation>
</message>
<message>
<location line="+15"/>
<source>IMPORTANT: Any previous backups you have made of your wallet file should be replaced with the newly generated, encrypted wallet file. For security reasons, previous backups of the unencrypted wallet file will become useless as soon as you start using the new, encrypted wallet.</source>
<translation>POMEMBNO: Vsaka predhodna varnostna kopija datoteke denarnice mora biti nadomeščena z novo datoteko šifrirane denarnice. Zaradi varnostnih razlogov bodo namreč prejšnje varnostne kopije datoteke nešifrirane denarnice postale neuporabne takoj ko boste pričeli uporabljati novo, šifrirano denarnico.</translation>
</message>
<message>
<location line="+104"/>
<location line="+24"/>
<source>Warning: The Caps Lock key is on!</source>
<translation>Opozorilo: imate prižgan Cap Lock</translation>
</message>
<message>
<location line="-134"/>
<location line="+61"/>
<source>Wallet encrypted</source>
<translation>Denarnica šifrirana</translation>
</message>
<message>
<location line="-59"/>
<source>LEOcoin will close now to finish the encryption process. Remember that encrypting your wallet cannot fully protect your coins from being stolen by malware infecting your computer.</source>
<translation>LEOcoin se bo sedaj zaprl, da dokonča proces šifriranje. Pomnite, da tudi šifriranje vaše denarnice ne more v celoti zaščititi vaših kovancev pred krajo z zlonamernimi programi in računalniškimi virusi, če ti okužijo vaš računalnik.</translation>
</message>
<message>
<location line="+13"/>
<location line="+7"/>
<location line="+45"/>
<location line="+6"/>
<source>Wallet encryption failed</source>
<translation>Šifriranje denarnice je spodletelo</translation>
</message>
<message>
<location line="-57"/>
<source>Wallet encryption failed due to an internal error. Your wallet was not encrypted.</source>
<translation>Šifriranje denarnice spodletelo je zaradi notranje napake. Vaša denarnica ni šifrirana.</translation>
</message>
<message>
<location line="+7"/>
<location line="+51"/>
<source>The supplied passphrases do not match.</source>
<translation>Vnešeno geslo se ne ujema</translation>
</message>
<message>
<location line="-39"/>
<source>Wallet unlock failed</source>
<translation>Odklep denarnice spodletel</translation>
</message>
<message>
<location line="+1"/>
<location line="+13"/>
<location line="+19"/>
<source>The passphrase entered for the wallet decryption was incorrect.</source>
<translation>Geslo za dešifriranje denarnice, ki ste ga vnesli, ni pravilno.</translation>
</message>
<message>
<location line="-20"/>
<source>Wallet decryption failed</source>
<translation>Dešifriranje denarnice je spodletelo</translation>
</message>
<message>
<location line="+14"/>
<source>Wallet passphrase was successfully changed.</source>
<translation>Geslo denarnice je bilo uspešno spremenjeno.</translation>
</message>
</context>
<context>
<name>ClientModel</name>
<message>
<location filename="../clientmodel.cpp" line="+137"/>
<source>Network Alert</source>
<translation>Omrežno Opozorilo</translation>
</message>
</context>
<context>
<name>CoinControlDialog</name>
<message>
<location filename="../forms/coincontroldialog.ui" line="+14"/>
<source>Coin Control</source>
<translation>Kontrola kovancev</translation>
</message>
<message>
<location line="+31"/>
<source>Quantity:</source>
<translation>Količina:</translation>
</message>
<message>
<location line="+32"/>
<source>Bytes:</source>
<translation>Biti:</translation>
</message>
<message>
<location line="+48"/>
<source>Amount:</source>
<translation>Količina:</translation>
</message>
<message>
<location line="+32"/>
<source>Priority:</source>
<translation>Prednostno mesto:</translation>
</message>
<message>
<location line="+48"/>
<source>Fee:</source>
<translation>Provizija:</translation>
</message>
<message>
<location line="+35"/>
<source>Low Output:</source>
<translation>Nizek output:</translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="+528"/>
<location line="+30"/>
<source>no</source>
<translation>ne</translation>
</message>
<message>
<location filename="../forms/coincontroldialog.ui" line="+51"/>
<source>After Fee:</source>
<translation>Po proviziji:</translation>
</message>
<message>
<location line="+35"/>
<source>Change:</source>
<translation>Sprememba:</translation>
</message>
<message>
<location line="+69"/>
<source>(un)select all</source>
<translation>od/obkljukaj vse</translation>
</message>
<message>
<location line="+13"/>
<source>Tree mode</source>
<translation>Drevo</translation>
</message>
<message>
<location line="+16"/>
<source>List mode</source>
<translation>Seznam</translation>
</message>
<message>
<location line="+45"/>
<source>Amount</source>
<translation>Količina</translation>
</message>
<message>
<location line="+5"/>
<source>Label</source>
<translation>Oznaka</translation>
</message>
<message>
<location line="+5"/>
<source>Address</source>
<translation>Naslov</translation>
</message>
<message>
<location line="+5"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location line="+5"/>
<source>Confirmations</source>
<translation>Potrdila</translation>
</message>
<message>
<location line="+3"/>
<source>Confirmed</source>
<translation>Potrjeno</translation>
</message>
<message>
<location line="+5"/>
<source>Priority</source>
<translation>Prednostno mesto</translation>
</message>
<message>
<location filename="../coincontroldialog.cpp" line="-520"/>
<source>Copy address</source>
<translation>Kopiraj naslov</translation>
</message>
<message>
<location line="+1"/>
<source>Copy label</source>
<translation>Kopiraj oznako</translation>
</message>
<message>
<location line="+1"/>
<location line="+26"/>
<source>Copy amount</source>
<translation>Kopiraj količino</translation>
</message>
<message>
<location line="-25"/>
<source>Copy transaction ID</source>
<translation>Kopiraj ID transakcije</translation>
</message>
<message>
<location line="+24"/>
<source>Copy quantity</source>
<translation>Kopiraj količino</translation>
</message>
<message>
<location line="+2"/>
<source>Copy fee</source>
<translation>Kopiraj provizijo</translation>
</message>
<message>
<location line="+1"/>
<source>Copy after fee</source>
<translation>Kopiraj po proviziji</translation>
</message>
<message>
<location line="+1"/>
<source>Copy bytes</source>
<translation>Kopiraj bite</translation>
</message>
<message>
<location line="+1"/>
<source>Copy priority</source>
<translation>Kopiraj prednostno mesto</translation>
</message>
<message>
<location line="+1"/>
<source>Copy low output</source>
<translation>Kopiraj nizek output:</translation>
</message>
<message>
<location line="+1"/>
<source>Copy change</source>
<translation>Kopiraj spremembo</translation>
</message>
<message>
<location line="+317"/>
<source>highest</source>
<translation>najvišja</translation>
</message>
<message>
<location line="+1"/>
<source>high</source>
<translation>visoka</translation>
</message>
<message>
<location line="+1"/>
<source>medium-high</source>
<translation>srednje visoka</translation>
</message>
<message>
<location line="+1"/>
<source>medium</source>
<translation>srednje</translation>
</message>
<message>
<location line="+4"/>
<source>low-medium</source>
<translation>srednje nizka</translation>
</message>
<message>
<location line="+1"/>
<source>low</source>
<translation>nizka</translation>
</message>
<message>
<location line="+1"/>
<source>lowest</source>
<translation>najnižja</translation>
</message>
<message>
<location line="+130"/>
<location line="+30"/>
<source>DUST</source>
<translation>PRAH</translation>
</message>
<message>
<location line="-30"/>
<location line="+30"/>
<source>yes</source>
<translation>da</translation>
</message>
<message>
<location line="+10"/>
<source>This label turns red, if the transaction size is bigger than 10000 bytes.
This means a fee of at least %1 per kb is required.
Can vary +/- 1 Byte per input.</source>
<translation>Ta oznakla se obarva rdeče, če je transakcija večja od 10000 bajtov.
To pomeni, da je zahtevana provizija vsaj %1 na kb.
Lahko variira +/- 1 Bajt na vnos.</translation>
</message>
<message>
<location line="+1"/>
<source>Transactions with higher priority get more likely into a block.
This label turns red, if the priority is smaller than "medium".
This means a fee of at least %1 per kb is required.</source>
<translation>Transakcije z višjo prioriteto imajo višjo verjetnost, da so vključene v blok.
Ta oznaka se obarva rdeče, če je prioriteta manjša kot "srednja".
To pomeni, da je zahtevana provizija vsaj %1 na kb.</translation>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if any recipient receives an amount smaller than %1.
This means a fee of at least %2 is required.
Amounts below 0.546 times the minimum relay fee are shown as DUST.</source>
<translation>Ta oznaka se obarva rdeče, če prejemnik dobi količino manjšo od %1.
To pomeni, da je potrebna vsaj %2 provizija.
Zneski pod 0.546 krat minimalna transakcijska provizija so prikazani kot PRAH.</translation>
</message>
<message>
<location line="+1"/>
<source>This label turns red, if the change is smaller than %1.
This means a fee of at least %2 is required.</source>
<translation>Ta oznakla se obarva rdeče, če je sprememba manjša od %1.
To pomeni, da je zahtevana provizija vsaj %2.</translation>
</message>
<message>
<location line="+40"/>
<location line="+66"/>
<source>(no label)</source>
<translation>(ni oznake)</translation>
</message>
<message>
<location line="-9"/>
<source>change from %1 (%2)</source>
<translation>spremeni iz %1 (%2)</translation>
</message>
<message>
<location line="+1"/>
<source>(change)</source>
<translation>(spremeni)</translation>
</message>
</context>
<context>
<name>EditAddressDialog</name>
<message>
<location filename="../forms/editaddressdialog.ui" line="+14"/>
<source>Edit Address</source>
<translation>Uredi naslov</translation>
</message>
<message>
<location line="+11"/>
<source>&Label</source>
<translation>&Oznaka</translation>
</message>
<message>
<location line="+10"/>
<source>The label associated with this address book entry</source>
<translation>Oznaka povezana s tem vnosom v imeniku</translation>
</message>
<message>
<location line="+7"/>
<source>&Address</source>
<translation>&Naslov</translation>
</message>
<message>
<location line="+10"/>
<source>The address associated with this address book entry. This can only be modified for sending addresses.</source>
<translation>Naslov povezan s tem vnosom v imeniku. Spremenite ga lahko le za naslove odlivov.</translation>
</message>
<message>
<location line="+7"/>
<source>&Stealth Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../editaddressdialog.cpp" line="+20"/>
<source>New receiving address</source>
<translation>Nov naslov za prilive</translation>
</message>
<message>
<location line="+7"/>
<source>New sending address</source>
<translation>Nov naslov za odlive</translation>
</message>
<message>
<location line="+4"/>
<source>Edit receiving address</source>
<translation>Uredi naslov za prilive</translation>
</message>
<message>
<location line="+7"/>
<source>Edit sending address</source>
<translation>Uredi naslov za odlive</translation>
</message>
<message>
<location line="+82"/>
<source>The entered address "%1" is already in the address book.</source>
<translation>Vnešeni naslov "&1" je že v imeniku.</translation>
</message>
<message>
<location line="-5"/>
<source>The entered address "%1" is not a valid LEOcoin address.</source>
<translation>Vneseni naslov "%1" ni veljaven LEOcoin naslov.</translation>
</message>
<message>
<location line="+10"/>
<source>Could not unlock wallet.</source>
<translation>Denarnice ni bilo mogoče odkleniti.</translation>
</message>
<message>
<location line="+5"/>
<source>New key generation failed.</source>
<translation>Ustvarjanje novega ključa je spodletelo.</translation>
</message>
</context>
<context>
<name>GUIUtil::HelpMessageBox</name>
<message>
<location filename="../guiutil.cpp" line="+526"/>
<source>version</source>
<translation>različica</translation>
</message>
<message>
<location line="+0"/>
<location line="+12"/>
<source>LEOcoin</source>
<translation type="unfinished">LEOcoin</translation>
</message>
<message>
<location line="-10"/>
<source>Usage:</source>
<translation>Uporaba:</translation>
</message>
<message>
<location line="+1"/>
<source>command-line options</source>
<translation>možnosti ukazne vrstice</translation>
</message>
<message>
<location line="+4"/>
<source>UI options</source>
<translation>možnosti uporabniškega vmesnika</translation>
</message>
<message>
<location line="+1"/>
<source>Set language, for example "de_DE" (default: system locale)</source>
<translation>Nastavi jezik, npr. "sl_SI" (privzeto: jezikovna oznaka sistema)</translation>
</message>
<message>
<location line="+1"/>
<source>Start minimized</source>
<translation>Zaženi pomanjšano</translation>
</message>
<message>
<location line="+1"/>
<source>Show splash screen on startup (default: 1)</source>
<translation>Prikaži splash screen ob zagonu (default: 1)</translation>
</message>
</context>
<context>
<name>LEOcoinBridge</name>
<message>
<location filename="../LEOcoinbridge.cpp" line="+410"/>
<source>Incoming Message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+12"/>
<source>default</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+58"/>
<source><b>%1</b> to %2 (%3)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+4"/>
<source><b>%1</b> to LEO %2 (%3)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<location line="+5"/>
<source><b>%1</b> LEO, ring size %2 to LEO %3 (%4)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+4"/>
<location line="+10"/>
<location line="+12"/>
<location line="+8"/>
<source>Error:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-30"/>
<source>Unknown txn type detected %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+10"/>
<source>Input types must match for all recipients.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+12"/>
<source>Ring sizes must match for all recipients.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+8"/>
<source>Ring size outside range [%1, %2].</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+8"/>
<location line="+9"/>
<source>Confirm send coins</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-9"/>
<source>Are you sure you want to send?
Ring size of one is not anonymous, and harms the network.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
<location line="+9"/>
<source> and </source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
<source>Are you sure you want to send %1?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+15"/>
<location line="+25"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+6"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Coins</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-95"/>
<source>The change address is not valid, please recheck.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+25"/>
<location line="+376"/>
<source>The recipient address is not valid, please recheck.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-371"/>
<source>The amount to pay must be larger than 0.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<source>The amount exceeds your balance.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your balance when the %1 transaction fee is included.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+6"/>
<location line="+365"/>
<source>Duplicate address found, can only send to each address once per send operation.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-360"/>
<source>Error: Transaction creation failed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<source>Error: Narration is too long.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<source>Error: Ring Size Error.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<source>Error: Input Type Error.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<source>Error: Must be in full mode to send anon.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<source>Error: Invalid Stealth Address.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<source>The total exceeds your LEOcoin balance when the %1 transaction fee is included.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<source>Error generating transaction.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<source>Error generating transaction: %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+304"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<location line="+5"/>
<source>Send Message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-14"/>
<source>The message can't be empty.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+10"/>
<source>Error: Message creation failed.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<source>Error: The message was rejected.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+98"/>
<source>Sanity Error!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Error: a sanity check prevented the transfer of a non-group private key, please close your wallet and report this error to the development team as soon as possible.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../bridgetranslations.h" line="+8"/>
<source>Overview</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Send</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Receive</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Transactions</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Address Book</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Chat</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Notifications</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Options</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Wallet Management</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Add New Wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Import Wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Advanced</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Backup</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Backup Wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt Wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Change Passphrase</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>(Un)lock Wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Tools</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Chain Data</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Block Explorer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Sign Message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Verify Message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Debug</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>About LEOcoin</source>
<translation type="unfinished">O LEOcoin</translation>
</message>
<message>
<location line="+1"/>
<source>About QT</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>QR code</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Address:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Label:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Narration:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Amount:</source>
<translation type="unfinished">Količina:</translation>
</message>
<message>
<location line="+1"/>
<source>LEO</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>mLEO</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>µLEO</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Satoshi</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Add new receive address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+4"/>
<source>Add Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Add a new contact</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Address Lookup</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Address Type</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-6"/>
<source>Normal</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Stealth</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+6"/>
<source>Group</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-5"/>
<source>BIP32</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+6"/>
<source>Label</source>
<translation type="unfinished">Oznaka</translation>
</message>
<message>
<location line="+1"/>
<source>Address</source>
<translation type="unfinished">Naslov</translation>
</message>
<message>
<location line="+1"/>
<source>Public Key</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Transaction Hash</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Recent Transactions</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Market</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Advanced Options</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Coin Control</source>
<translation type="unfinished">Kontrola kovancev</translation>
</message>
<message>
<location line="+1"/>
<source>Make payment</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Balance transfer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Select Inputs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Automatically selected</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Quantity:</source>
<translation type="unfinished">Količina:</translation>
</message>
<message>
<location line="+1"/>
<source>Fee:</source>
<translation type="unfinished">Provizija:</translation>
</message>
<message>
<location line="+1"/>
<source>After Fee:</source>
<translation type="unfinished">Po proviziji:</translation>
</message>
<message>
<location line="+1"/>
<source>Bytes:</source>
<translation type="unfinished">Biti:</translation>
</message>
<message>
<location line="+1"/>
<source>Priority:</source>
<translation type="unfinished">Prednostno mesto:</translation>
</message>
<message>
<location line="+1"/>
<source>LowOutput:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Change:</source>
<translation type="unfinished">Sprememba:</translation>
</message>
<message>
<location line="+1"/>
<source>Custom change address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>From account</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>PUBLIC</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>PRIVATE</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Balance:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Ring Size:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>To account</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Pay to</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+135"/>
<source>Tor connection offline</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>i2p connection offline</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Wallet is encrypted and currently locked</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Wallet is syncing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Open chat list</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Enter a label for this address to add it to your address book</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Enter a address to add it to your address book</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Inputs</source>
<translation type="unfinished">Vnosi</translation>
</message>
<message>
<location line="+1"/>
<source>Values</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Outputs</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Enter a LEOcoin address to sign the message with (e.g. 8MfTCSnMvix9mVVNb2MGiEw92GpLrvzhVp)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Enter the message you want to sign</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Click sign message to generate signature</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Copy the signed message signature</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Enter a LEOcoin address to verify the message with (e.g. 8MfTCSnMvix9mVVNb2MGiEw92GpLrvzhVp)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Enter the message you want to verify</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Enter a LEOcoin signature</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Paste signature from clipboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Your total balance</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Balances overview</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Recent in/out transactions or stakes</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Select inputs to spend</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Optional address to receive transaction change</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Choose from address book</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Paste address from clipboard</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Remove this recipient</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Current spendable send payment balance</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Current spendable balance to account</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+4"/>
<source>The address to transfer the balance to</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>The label for this address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Amount to transfer</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Send to multiple recipients at once</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Double click to edit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Date and time that the transaction was received.</source>
<translation type="unfinished">Datum in čas, ko je transakcija bila prejeta.</translation>
</message>
<message>
<location line="+1"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation type="unfinished">Stanje transakcije. Zapeljite z miško čez to polje za prikaz števila potrdil. </translation>
</message>
<message>
<location line="+1"/>
<source>Type of transaction.</source>
<translation type="unfinished">Vrsta transakcije.</translation>
</message>
<message>
<location line="+1"/>
<source>Destination address of transaction.</source>
<translation type="unfinished">Naslov prejemnika transakcije.</translation>
</message>
<message>
<location line="+1"/>
<source>Short payment note.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Amount removed from or added to balance.</source>
<translation type="unfinished">Količina odlita ali prilita dobroimetju.</translation>
</message>
<message>
<location line="+1"/>
<source>The address to send the payment to (e.g. SXywGBZBowrppUwwNUo1GCRDTibzJi7g2M)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Choose address from address book</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Enter a public key for the address above</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Enter a label for this group</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Name for this Wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Enter a password</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Would you like to create a bip44 path?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Your recovery phrase (Keep this safe!)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-80"/>
<source>Recovery Phrase</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+26"/>
<source>Make Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Activate/Deactivate</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Set as Master</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+4"/>
<source>Not staking because wallet is offline</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>0 active connections to LEOcoin network</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+26"/>
<source>The address to send the payment to</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Enter a label for this address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Enter a short note to send with payment (max 24 characters)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+20"/>
<source>Wallet Name for recovered account</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Enter the password for the wallet you are trying to recover</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Is this a bip44 path?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-66"/>
<source>ID</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-122"/>
<source>Narration</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Amount</source>
<translation type="unfinished">Količina</translation>
</message>
<message>
<location line="+1"/>
<source>Default Stealth Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Add Recipient</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Clear All</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Suggest Ring Size</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Send Payment</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>RECEIVE</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Filter by type..</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Type</source>
<translation type="unfinished">Vrsta</translation>
</message>
<message>
<location line="+1"/>
<source>Show QR Code</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>New Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Copy Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>TRANSACTIONS</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Date</source>
<translation type="unfinished">Datum</translation>
</message>
<message>
<location line="+1"/>
<source>ADDRESSBOOK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Delete</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Start Private Conversation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Name:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Public Key:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Start Conversation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Choose identity</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Identity:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Start Group Conversation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Group name:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Create Group</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Invite others</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Search</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Invite others to group</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Invite to Group</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Invite</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>GROUP</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>BOOK</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Start private conversation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Start group conversation</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>CHAT</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Leave Group</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>CHAIN DATA</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Coin Value</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Owned (Mature)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>System (Mature)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Spends</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Least Depth</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>BLOCK EXPLORER</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Refresh</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Hash</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Height</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Timestamp</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Value Out</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>OPTIONS</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Main</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Network</source>
<translation type="unfinished">Omrežje</translation>
</message>
<message>
<location line="+1"/>
<source>Window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Display</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>I2P</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Tor</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Start LEOcoin on system login</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Detach databases at shutdown</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Pay transaction fee:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Optional transaction fee per kB that helps make sure your transactions are processed quickly.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Most transactions are 1kB. Fee 0.01 recommended.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Enable Staking</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Reserve:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Reserved amount does not participate in staking and is therefore spendable at any time.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Minimum Stake Interval</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Minimum Ring size:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Maximum Ring size:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Automatically select ring size</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Enable Secure messaging</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Thin Mode (Requires Restart)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Thin Full Index</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Thin Index Window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Map port using UPnP</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Connect through SOCKS proxy:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Details</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Proxy IP:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Port:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>SOCKS Version:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Minimize to the tray instead of the taskbar</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Minimize on close</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>User Interface language:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Unit to show amounts in:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Rows per page:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Display addresses in transaction list</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Notifications:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Visible Transaction Types:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>I2P (coming soon)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>TOR (coming soon)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Cancel</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Apply</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Ok</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Lets create a New Wallet and Account to get you started!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Wallet Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Password</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Add an optional Password to secure the Recovery Phrase (shown on next page)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Would you like to create a Multi-Account HD Key? (BIP44)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Language</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>English</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>French</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Japanese</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Spanish</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Chinese (Simplified)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Chinese (Traditional)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Next Step</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Write your Wallet Recovery Phrase</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>Important!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>You need the Wallet Recovery Phrase to restore this wallet. Write it down and keep them somewhere safe.
You will be asked to confirm the Wallet Recovery Phrase in the next screen to ensure you have written it down correctly</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>Back</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Please confirm your Wallet Recovery Phrase</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Congratulations! You have successfully created a New Wallet and Account</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>You can now use your Account to send and receive funds :)
Remember to keep your Wallet Recovery Phrase and Password (if set) safe in case you ever need to recover your wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>Lets import your Wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>The Wallet Recovery Phrase could require a password to be imported</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Is this a Multi-Account HD Key (BIP44)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Recovery Phrase (Usually 24 words)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Congratulations! You have successfully imported your Wallet from your Recovery Phrase</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>You can now use your Account to send and receive funds :)
Remember to keep your Wallet Recovery Phrase and Password safe in case you ever need to recover your wallet again!</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>Accounts</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Created</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Active Account</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Default</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Wallet Keys</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Path</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Active</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Master</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+61"/>
<source>LEOcoin Notification</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>A new version of the LEOcoin wallet is available.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Please go to</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>and upgrade to the latest version.</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>LEOcoinGUI</name>
<message>
<location filename="../LEOcoin.cpp" line="+111"/>
<source>A fatal error occurred. LEOcoin can no longer continue safely and will quit.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../LEOcoingui.cpp" line="+89"/>
<location line="+178"/>
<source>LEOcoin</source>
<translation type="unfinished">LEOcoin</translation>
</message>
<message>
<location line="-178"/>
<source>Client</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+90"/>
<source>E&xit</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Quit application</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>&About LEOcoin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Show information about LEOcoin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>About &Qt</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Show information about Qt</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>&Options...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Modify configuration options for LEOcoin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>&Show / Hide</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>&Encrypt Wallet...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Encrypt or decrypt wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>&Backup Wallet...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Backup wallet to another location</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>&Change Passphrase...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Change the passphrase used for wallet encryption</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>&Unlock Wallet...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Unlock wallet</source>
<translation type="unfinished">Odkleni denarnico</translation>
</message>
<message>
<location line="+1"/>
<source>&Lock Wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Lock wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+4"/>
<source>&Debug window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Open debugging and diagnostic console</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+26"/>
<source>&File</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+6"/>
<source>&Settings</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+8"/>
<source>&Help</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+19"/>
<source>Wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+6"/>
<location line="+9"/>
<source>[testnet]</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
<location line="+74"/>
<source>LEOcoin client</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location line="+63"/>
<source>%n active connection(s) to LEOcoin network</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message>
<location line="+18"/>
<source>block</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
<source>header</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>blocks</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
<source>headers</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+8"/>
<location line="+22"/>
<source>Synchronizing with network...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-20"/>
<source>Downloading filtered blocks...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+6"/>
<source>~%1 filtered block(s) remaining (%2% done).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+14"/>
<source>Importing blocks...</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location line="+5"/>
<source>~%n block(s) remaining</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message>
<location line="+13"/>
<location line="+4"/>
<source>Imported</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-4"/>
<location line="+4"/>
<source>Downloaded</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-3"/>
<source>%1 of %2 %3 of transaction history (%4% done).</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>%1 blocks of transaction history.</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location line="+23"/>
<source>%n second(s) ago</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n minute(s) ago</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<location line="+4"/>
<source>%n hour(s) ago</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<location line="+3"/>
<source>%n day(s) ago</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message>
<location line="+7"/>
<source>Up to date</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+12"/>
<source>Catching up...</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+16"/>
<source>Last received %1 was generated %2.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+59"/>
<source>This transaction is over the size limit. You can still send it for a fee of %1, which goes to the nodes that process your transaction and helps to support the network. Do you want to pay the fee?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<source>Confirm transaction fee</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+28"/>
<source>Sent transaction</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Incoming transaction</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
Amount: %2
Type: %3
Address: %4
</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+16"/>
<location line="+15"/>
<source>Incoming Message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Date: %1
From Address: %2
To Address: %3
Message: %4
</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+45"/>
<location line="+23"/>
<source>URI handling</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-23"/>
<location line="+23"/>
<source>URI can not be parsed! This can be caused by an invalid LEOcoin address or malformed URI parameters.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+42"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b> for staking and messaging only.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b> for messaging only.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b> for staking only.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+12"/>
<source>Wallet is <b>encrypted</b> and currently <b>unlocked</b></source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+25"/>
<source>Wallet is <b>encrypted</b> and currently <b>locked</b></source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+33"/>
<source>Backup Wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
<source>Wallet Data (*.dat)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<source>Backup Failed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
<source>There was an error trying to save the wallet data to the new location.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+48"/>
<source>Lock Wallet</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Error: Wallet must first be encrypted to be locked.</source>
<translation type="unfinished"></translation>
</message>
<message numerus="yes">
<location line="+69"/>
<source>%n second(s)</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<location line="+1"/>
<source>%n minute(s)</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<location line="+1"/>
<source>%n hour(s)</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<location line="+1"/>
<source>%n day(s)</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message>
<location line="+9"/>
<source>Staking.
Your weight is %1
Network weight is %2
Expected time to earn reward is %3</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+7"/>
<source>Not staking because wallet is in thin mode</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Not staking, staking is disabled</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Not staking because wallet is locked</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Not staking because wallet is offline</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Not staking because wallet is syncing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Not staking because you don't have mature coins</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Not staking</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../transactionrecord.cpp" line="+23"/>
<source>Received with</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>Received from</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>Sent to</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>Payment to yourself</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>Mined</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>Received LEOcoin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>Sent LEOcoin</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>Other</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>MessageModel</name>
<message>
<location filename="../messagemodel.cpp" line="+376"/>
<source>Type</source>
<translation type="unfinished">Vrsta</translation>
</message>
<message>
<location line="+0"/>
<source>Sent Date Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
<source>Received Date Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
<source>Label</source>
<translation type="unfinished">Oznaka</translation>
</message>
<message>
<location line="+0"/>
<source>To Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
<source>From Address</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
<source>Message</source>
<translation type="unfinished">Sporočilo</translation>
</message>
<message>
<location line="+41"/>
<source>Send Secure Message</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Send failed: %1.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+22"/>
<location line="+1"/>
<source>(no label)</source>
<translation type="unfinished">(ni oznake)</translation>
</message>
</context>
<context>
<name>PaymentServer</name>
<message>
<location filename="../paymentserver.cpp" line="+107"/>
<source>Cannot start LEOcoin: click-to-pay handler</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>PeerTableModel</name>
<message>
<location filename="../peertablemodel.cpp" line="+118"/>
<source>Address/Hostname</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
<source>User Agent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
<source>Ping Time</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>QObject</name>
<message>
<location filename="../guiutil.cpp" line="-470"/>
<source>%1 d</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>%1 h</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<source>%1 m</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+2"/>
<location line="+55"/>
<source>%1 s</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-10"/>
<source>None</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+5"/>
<source>N/A</source>
<translation type="unfinished">Neznano</translation>
</message>
<message>
<location line="+0"/>
<source>%1 ms</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>RPCConsole</name>
<message>
<location filename="../forms/rpcconsole.ui" line="+46"/>
<source>Client name</source>
<translation>Ime odjemalca</translation>
</message>
<message>
<location line="+10"/>
<location line="+23"/>
<location line="+26"/>
<location line="+26"/>
<location line="+23"/>
<location line="+23"/>
<location line="+36"/>
<location line="+23"/>
<location line="+36"/>
<location line="+23"/>
<location line="+23"/>
<location line="+491"/>
<location line="+23"/>
<location line="+23"/>
<location line="+23"/>
<location line="+23"/>
<location line="+23"/>
<location line="+23"/>
<location line="+23"/>
<location line="+23"/>
<location line="+23"/>
<location line="+23"/>
<location line="+23"/>
<location line="+23"/>
<location line="+23"/>
<location line="+23"/>
<source>N/A</source>
<translation>Neznano</translation>
</message>
<message>
<location line="-1062"/>
<source>Client version</source>
<translation>Različica odjemalca</translation>
</message>
<message>
<location line="-45"/>
<source>&Information</source>
<translation>&Informacije</translation>
</message>
<message>
<location line="-10"/>
<source>LEOcoin - Debug window</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+25"/>
<source>LEOcoin Core</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+53"/>
<source>Using OpenSSL version</source>
<translation>OpenSSL različica v rabi</translation>
</message>
<message>
<location line="+26"/>
<source>Using BerkeleyDB version</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+49"/>
<source>Startup time</source>
<translation>Čas zagona</translation>
</message>
<message>
<location line="+29"/>
<source>Network</source>
<translation>Omrežje</translation>
</message>
<message>
<location line="+7"/>
<source>Name</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+23"/>
<source>Number of connections</source>
<translation>Število povezav</translation>
</message>
<message>
<location line="+157"/>
<source>Show the LEOcoin help message to get a list with possible LEOcoin command-line options.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+99"/>
<source>&Network Traffic</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+52"/>
<source>&Clear</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+16"/>
<source>Totals</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+64"/>
<location filename="../rpcconsole.cpp" line="+396"/>
<source>In:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+80"/>
<location filename="../rpcconsole.cpp" line="+1"/>
<source>Out:</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+41"/>
<source>&Peers</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+39"/>
<location filename="../rpcconsole.cpp" line="-167"/>
<location line="+328"/>
<source>Select a peer to view detailed information.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+25"/>
<source>Peer ID</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+23"/>
<source>Direction</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+23"/>
<source>Version</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+23"/>
<source>User Agent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+23"/>
<source>Services</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+23"/>
<source>Starting Height</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+23"/>
<source>Sync Height</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+23"/>
<source>Ban Score</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+23"/>
<source>Connection Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+23"/>
<source>Last Send</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+23"/>
<source>Last Receive</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+23"/>
<source>Bytes Sent</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+23"/>
<source>Bytes Received</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+23"/>
<source>Ping Time</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+23"/>
<source>Time Offset</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="-866"/>
<source>Block chain</source>
<translation>veriga blokov</translation>
</message>
<message>
<location line="+7"/>
<source>Current number of blocks</source>
<translation>Trenutno število blokov</translation>
</message>
<message>
<location line="+23"/>
<source>Estimated total blocks</source>
<translation>Ocena vseh blokov</translation>
</message>
<message>
<location line="+23"/>
<source>Last block time</source>
<translation>Čas zadnjega bloka</translation>
</message>
<message>
<location line="+49"/>
<source>Open the LEOcoin debug log file from the current data directory. This can take a few seconds for large log files.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<source>&Open</source>
<translation>&Odpri</translation>
</message>
<message>
<location line="+16"/>
<source>Command-line options</source>
<translation>Možnosti ukazne vrstice.</translation>
</message>
<message>
<location line="+10"/>
<source>&Show</source>
<translation>&Prikaži</translation>
</message>
<message>
<location line="+24"/>
<source>&Console</source>
<translation>&Konzola</translation>
</message>
<message>
<location line="-266"/>
<source>Build date</source>
<translation>Datum izgradnje</translation>
</message>
<message>
<location line="+206"/>
<source>Debug log file</source>
<translation>Razhroščevalna dnevniška datoteka</translation>
</message>
<message>
<location line="+109"/>
<source>Clear console</source>
<translation>Počisti konzolo</translation>
</message>
<message>
<location filename="../rpcconsole.cpp" line="-197"/>
<source>Welcome to the LEOcoin Core RPC console.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+1"/>
<source>Use up and down arrows to navigate history, and <b>Ctrl-L</b> to clear screen.</source>
<translation>Za navigiranje po zgodovini uporabite puščici gor in dol, in <b>Ctrl-L</b> za izpraznjenje zaslona.</translation>
</message>
<message>
<location line="+1"/>
<source>Type <b>help</b> for an overview of available commands.</source>
<translation>Vtipkaj <b>pomoč</b> za vpogled v razpožljive ukaze.</translation>
</message>
<message>
<location line="+233"/>
<source>via %1</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+3"/>
<location line="+1"/>
<source>never</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+9"/>
<source>Inbound</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+0"/>
<source>Outbound</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+7"/>
<source>Unknown</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TrafficGraphWidget</name>
<message>
<location filename="../trafficgraphwidget.cpp" line="+79"/>
<source>KB/s</source>
<translation type="unfinished"></translation>
</message>
</context>
<context>
<name>TransactionDesc</name>
<message>
<location filename="../transactiondesc.cpp" line="+20"/>
<source>Open until %1</source>
<translation>Odpri enoto %1</translation>
</message>
<message numerus="yes">
<location line="-2"/>
<source>Open for %n block(s)</source>
<translation>
<numerusform>Odprt za %n blok</numerusform>
<numerusform>Odprt za %n bloka</numerusform>
<numerusform>Odprt za %n blokov</numerusform>
<numerusform>Odprt za %n blokov</numerusform>
</translation>
</message>
<message>
<location line="+7"/>
<source>conflicted</source>
<translation>sporen</translation>
</message>
<message>
<location line="+2"/>
<source>%1/offline</source>
<translation>%1/offline</translation>
</message>
<message>
<location line="+2"/>
<source>%1/unconfirmed</source>
<translation>%1/nepotrjeno</translation>
</message>
<message>
<location line="+2"/>
<source>%1 confirmations</source>
<translation>%1 potrdil</translation>
</message>
<message>
<location line="+18"/>
<source>Status</source>
<translation>Stanje</translation>
</message>
<message numerus="yes">
<location line="+7"/>
<source>, broadcast through %n node(s)</source>
<translation>
<numerusform>, predvajanje skozi %n vozlišče</numerusform>
<numerusform>, predvajanje skozi %n vozlišči</numerusform>
<numerusform>, predvajanje skozi %n vozlišč</numerusform>
<numerusform>, predvajanje skozi %n vozlišč</numerusform>
</translation>
</message>
<message>
<location line="+5"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location line="+7"/>
<source>Source</source>
<translation>Izvor</translation>
</message>
<message>
<location line="+0"/>
<source>Generated</source>
<translation>Generirano</translation>
</message>
<message>
<location line="+5"/>
<location line="+17"/>
<location line="+20"/>
<source>From</source>
<translation>Pošiljatelj</translation>
</message>
<message>
<location line="-19"/>
<location line="+20"/>
<location line="+23"/>
<location line="+57"/>
<source>To</source>
<translation>Prejemnik</translation>
</message>
<message>
<location line="-96"/>
<location line="+2"/>
<location line="+18"/>
<location line="+2"/>
<source>own address</source>
<translation>lasten naslov</translation>
</message>
<message>
<location line="-22"/>
<location line="+20"/>
<source>label</source>
<translation>oznaka</translation>
</message>
<message>
<location line="+37"/>
<location line="+12"/>
<location line="+44"/>
<location line="+20"/>
<location line="+40"/>
<source>Credit</source>
<translation>Kredit</translation>
</message>
<message numerus="yes">
<location line="-114"/>
<source>matures in %n more block(s)</source>
<translation>
<numerusform>dozori čez %n blok</numerusform>
<numerusform>dozori čez %n bloka</numerusform>
<numerusform>dozori čez %n blokov</numerusform>
<numerusform>dozori čez %n blokov</numerusform>
</translation>
</message>
<message>
<location line="+2"/>
<source>not accepted</source>
<translation>ni bilo sprejeto</translation>
</message>
<message>
<location line="+43"/>
<location line="+8"/>
<location line="+16"/>
<location line="+42"/>
<source>Debit</source>
<translation>Dolg</translation>
</message>
<message>
<location line="-52"/>
<source>Transaction fee</source>
<translation>Provizija transakcije</translation>
</message>
<message>
<location line="+19"/>
<source>Net amount</source>
<translation>Neto količina</translation>
</message>
<message>
<location line="+6"/>
<source>Message</source>
<translation>Sporočilo</translation>
</message>
<message>
<location line="+2"/>
<source>Comment</source>
<translation>Opomba</translation>
</message>
<message>
<location line="+12"/>
<source>Transaction ID</source>
<translation>ID transakcije</translation>
</message>
<message>
<location line="+3"/>
<source>Generated coins must mature 120 blocks before they can be spent. When you generated this block, it was broadcast to the network to be added to the block chain. If it fails to get into the chain, its state will change to "not accepted" and it won't be spendable. This may occasionally happen if another node generates a block within a few seconds of yours.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+7"/>
<source>Debug information</source>
<translation>Razhroščevalna informacija</translation>
</message>
<message>
<location line="+8"/>
<source>Transaction</source>
<translation>Transakcija</translation>
</message>
<message>
<location line="+5"/>
<source>Inputs</source>
<translation>Vnosi</translation>
</message>
<message>
<location line="+44"/>
<source>Amount</source>
<translation>Količina</translation>
</message>
<message>
<location line="+1"/>
<source>true</source>
<translation>pravilno</translation>
</message>
<message>
<location line="+0"/>
<source>false</source>
<translation>nepravilno</translation>
</message>
<message>
<location line="-266"/>
<source>, has not been successfully broadcast yet</source>
<translation>, še ni bil uspešno predvajan</translation>
</message>
<message>
<location line="+36"/>
<location line="+20"/>
<source>unknown</source>
<translation>neznano</translation>
</message>
</context>
<context>
<name>TransactionDescDialog</name>
<message>
<location filename="../forms/transactiondescdialog.ui" line="+14"/>
<source>Transaction details</source>
<translation>Podrobnosti transakcije</translation>
</message>
<message>
<location line="+6"/>
<source>This pane shows a detailed description of the transaction</source>
<translation>To podokno prikazuje podroben opis transakcije</translation>
</message>
</context>
<context>
<name>TransactionTableModel</name>
<message>
<location filename="../transactiontablemodel.cpp" line="+217"/>
<source>Date</source>
<translation>Datum</translation>
</message>
<message>
<location line="+0"/>
<source>Type</source>
<translation>Vrsta</translation>
</message>
<message>
<location line="+0"/>
<source>Address</source>
<translation>Naslov</translation>
</message>
<message>
<location line="+0"/>
<source>Amount</source>
<translation>Količina</translation>
</message>
<message>
<location line="+54"/>
<source>Open until %1</source>
<translation>Odpri enoto %1</translation>
</message>
<message>
<location line="+12"/>
<source>Confirmed (%1 confirmations)</source>
<translation>Potrjeno (%1 potrdil)</translation>
</message>
<message numerus="yes">
<location line="-15"/>
<source>Open for %n more block(s)</source>
<translation>
<numerusform>Odprt še %n blok</numerusform>
<numerusform>Odprt še %n bloka</numerusform>
<numerusform>Odprt še %n blokov</numerusform>
<numerusform>Odprt še %n blokov</numerusform>
</translation>
</message>
<message>
<location line="-51"/>
<source>Narration</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+57"/>
<source>Offline</source>
<translation>Nepovezan</translation>
</message>
<message>
<location line="+3"/>
<source>Unconfirmed</source>
<translation>Nepotrjeno</translation>
</message>
<message>
<location line="+3"/>
<source>Confirming (%1 of %2 recommended confirmations)</source>
<translation>Potrjuje (%1 od %2 priporočenih potrditev)</translation>
</message>
<message>
<location line="+6"/>
<source>Conflicted</source>
<translation>Sporen</translation>
</message>
<message>
<location line="+3"/>
<source>Immature (%1 confirmations, will be available after %2)</source>
<translation>Nezrel (%1 potrditev, na voljo bo po %2)</translation>
</message>
<message>
<location line="+3"/>
<source>This block was not received by any other nodes and will probably not be accepted!</source>
<translation>Ta blok ni prejelo še nobeno vozlišče. Najverjetneje ne bo sprejet!</translation>
</message>
<message>
<location line="+3"/>
<source>Generated but not accepted</source>
<translation>Generirano, toda ne sprejeto</translation>
</message>
<message>
<location line="+49"/>
<source>(n/a)</source>
<translation>(ni na voljo)</translation>
</message>
<message>
<location line="+202"/>
<source>Transaction status. Hover over this field to show number of confirmations.</source>
<translation>Stanje transakcije. Zapeljite z miško čez to polje za prikaz števila potrdil. </translation>
</message>
<message>
<location line="+2"/>
<source>Date and time that the transaction was received.</source>
<translation>Datum in čas, ko je transakcija bila prejeta.</translation>
</message>
<message>
<location line="+2"/>
<source>Type of transaction.</source>
<translation>Vrsta transakcije.</translation>
</message>
<message>
<location line="+2"/>
<source>Destination address of transaction.</source>
<translation>Naslov prejemnika transakcije.</translation>
</message>
<message>
<location line="+2"/>
<source>Amount removed from or added to balance.</source>
<translation>Količina odlita ali prilita dobroimetju.</translation>
</message>
</context>
<context>
<name>WalletModel</name>
<message>
<location filename="../walletmodel.cpp" line="+402"/>
<location line="+246"/>
<source>Sending...</source>
<translation>Pošiljanje...</translation>
</message>
</context>
<context>
<name>bitcoin-core</name>
<message>
<location filename="../bitcoinstrings.cpp" line="+33"/>
<source>LEOcoin version</source>
<translation>LEOcoin različica</translation>
</message>
<message>
<location line="+1"/>
<source>Usage:</source>
<translation>Uporaba:</translation>
</message>
<message>
<location line="+1"/>
<source>Send command to -server or LEOcoind</source>
<translation>Pošlji ukaz na -server ali LEOcoind</translation>
</message>
<message>
<location line="+1"/>
<source>List commands</source>
<translation>Prikaži ukaze</translation>
</message>
<message>
<location line="+1"/>
<source>Get help for a command</source>
<translation>Prikaži pomoč za ukaz</translation>
</message>
<message>
<location line="+2"/>
<source>Options:</source>
<translation>Možnosti:</translation>
</message>
<message>
<location line="+2"/>
<source>Specify configuration file (default: LEOcoin.conf)</source>
<translation>Določi konfiguracijsko datoteko (privzeto: LEOcoin.conf)</translation>
</message>
<message>
<location line="+1"/>
<source>Specify pid file (default: LEOcoind.pid)</source>
<translation>Določi pid datoteko (privzeto: LEOcoind.pid)</translation>
</message>
<message>
<location line="+2"/>
<source>Specify wallet file (within data directory)</source>
<translation>Določi datoteko denarnice (znotraj imenika s podatki)</translation>
</message>
<message>
<location line="-1"/>
<source>Specify data directory</source>
<translation>Določi podatkovni imenik</translation>
</message>
<message>
<location line="+2"/>
<source>Set database cache size in megabytes (default: 25)</source>
<translation>Nastavi pomnilnik podatkovne zbirke v megabajtih (privzeto: 25)</translation>
</message>
<message>
<location line="+1"/>
<source>Set database disk log size in megabytes (default: 100)</source>
<translation>Nastavi velikost zapisa podatkovne baze na disku v megabajtih (privzeto: 100)</translation>
</message>
<message>
<location line="+6"/>
<source>Listen for connections on <port> (default: 51737 or testnet: 51997)</source>
<translation>Sprejmi povezave na <port> (privzeta vrata: 51737 ali testnet: 51997) </translation>
</message>
<message>
<location line="+1"/>
<source>Maintain at most <n> connections to peers (default: 125)</source>
<translation>Obdrži maksimalno število <n> povezav (privzeto: 125)</translation>
</message>
<message>
<location line="+3"/>
<source>Connect to a node to retrieve peer addresses, and disconnect</source>
<translation>Poveži se na vozlišče da pridobiš naslove soležnikov in prekini povezavo</translation>
</message>
<message>
<location line="+1"/>
<source>Specify your own public address</source>
<translation>Določite vaš lasten javni naslov</translation>
</message>
<message>
<location line="+5"/>
<source>Bind to given address. Use [host]:port notation for IPv6</source>
<translation>Naveži na dani naslov. Uporabi [host]:port ukaz za IPv6</translation>
</message>
<message>
<location line="+2"/>
<source>Stake your coins to support network and gain reward (default: 1)</source>
<translation>Deleži svoje kovance za podporo omrežja in pridobi nagrado (default: 1)</translation>
</message>
<message>
<location line="+5"/>
<source>Threshold for disconnecting misbehaving peers (default: 100)</source>
<translation>Prag za prekinitev povezav s slabimi odjemalci (privzeto: 1000)</translation>
</message>
<message>
<location line="+1"/>
<source>Number of seconds to keep misbehaving peers from reconnecting (default: 86400)</source>
<translation>Število sekund preden se ponovno povežejo neodzivni soležniki (privzeto: 86400)</translation>
</message>
<message>
<location line="-44"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv4: %s</source>
<translation>Prišlo je do napake pri nastavljanju RPC porta %u za vhodne povezave na IPv4: %s</translation>
</message>
<message>
<location line="+51"/>
<source>Detach block and address databases. Increases shutdown time (default: 0)</source>
<translation>Loči podatkovne baze blokov in naslovov. Podaljša čas zaustavitve (privzeto: 0)</translation>
</message>
<message>
<location line="+109"/>
<source>Error: The transaction was rejected. This might happen if some of the coins in your wallet were already spent, such as if you used a copy of wallet.dat and coins were spent in the copy but not marked as spent here.</source>
<translation>Napaka: Transakcija je bila zavrnjena. To se je lahko zgodilo, če so bili kovanci v vaši denarnici že zapravljeni, na primer če ste uporabili kopijo wallet.dat in so bili kovanci zapravljeni v kopiji, a tu še niso bili označeni kot zapravljeni.</translation>
</message>
<message>
<location line="-5"/>
<source>Error: This transaction requires a transaction fee of at least %s because of its amount, complexity, or use of recently received funds </source>
<translation>Napaka: Ta transakcija zahteva transakcijsko provizijo vsaj %s zaradi svoje količine, kompleksnosti ali uporabo sredstev, ki ste jih prejeli pred kratkim. </translation>
</message>
<message>
<location line="-87"/>
<source>Listen for JSON-RPC connections on <port> (default: 51736 or testnet: 51996)</source>
<translation>Sprejmi povezave na <port> (privzeta vrata: 51737 ali testnet: 51997) </translation>
</message>
<message>
<location line="-11"/>
<source>Accept command line and JSON-RPC commands</source>
<translation>Sprejmi ukaze iz ukazne vrstice in JSON-RPC</translation>
</message>
<message>
<location line="+101"/>
<source>Error: Transaction creation failed </source>
<translation>Napaka: Ustvarjanje transakcije spodletelo</translation>
</message>
<message>
<location line="-5"/>
<source>Error: Wallet locked, unable to create transaction </source>
<translation>Napaka: Zaklenjena denarnica, ni mogoče opraviti transakcije</translation>
</message>
<message>
<location line="-8"/>
<source>Importing blockchain data file.</source>
<translation>Uvažanje blockchain podatkovne datoteke.</translation>
</message>
<message>
<location line="+1"/>
<source>Importing bootstrap blockchain data file.</source>
<translation>Uvažanje podatkovne datoteke verige blokov.</translation>
</message>
<message>
<location line="-88"/>
<source>Run in the background as a daemon and accept commands</source>
<translation>Teci v ozadju in sprejemaj ukaze</translation>
</message>
<message>
<location line="+1"/>
<source>Use the test network</source>
<translation>Uporabi testno omrežje</translation>
</message>
<message>
<location line="-24"/>
<source>Accept connections from outside (default: 1 if no -proxy or -connect)</source>
<translation>Sprejmi zunanje povezave (privzeto: 1 če ni nastavljen -proxy ali -connect)</translation>
</message>
<message>
<location line="-38"/>
<source>An error occurred while setting up the RPC port %u for listening on IPv6, falling back to IPv4: %s</source>
<translation>Prišlo je do napake pri nastavljanju RPC porta %u za vhodne povezave na IPv6: %s</translation>
</message>
<message>
<location line="+117"/>
<source>Error initializing database environment %s! To recover, BACKUP THAT DIRECTORY, then remove everything from it except for wallet.dat.</source>
<translation>Napaka pri zagonu podatkovne baze okolja %s! Za popravilo, NAPRAVITE VARNOSTNO KOPIJO IMENIKA, in iz njega odstranite vse razen datoteke wallet.dat</translation>
</message>
<message>
<location line="-20"/>
<source>Set maximum size of high-priority/low-fee transactions in bytes (default: 27000)</source>
<translation>Nastavi maksimalno velikost visoke-prioritete/nizke-provizije transakcij v bajtih (privzeto: 27000)</translation>
</message>
<message>
<location line="+11"/>
<source>Warning: -paytxfee is set very high! This is the transaction fee you will pay if you send a transaction.</source>
<translation>Opozorilo: -paytxfee je nastavljen zelo visoko! To je transakcijska provizija, ki jo boste plačali ob pošiljanju transakcije.</translation>
</message>
<message>
<location line="+61"/>
<source>Warning: Please check that your computer's date and time are correct! If your clock is wrong LEOcoin will not work properly.</source>
<translation>Opozorilo: Prosimo preverite svoj datum in čas svojega računalnika! Če je vaša ura nastavljena napačno LEOcoin ne bo deloval.</translation>
</message>
<message>
<location line="-31"/>
<source>Warning: error reading wallet.dat! All keys read correctly, but transaction data or address book entries might be missing or incorrect.</source>
<translation>Opozorilo: napaka pri branju wallet.dat! Vsi ključi so bili pravilno prebrani, podatki o transakciji ali imenik vnešenih naslovov so morda izgubljeni ali nepravilni.</translation>
</message>
<message>
<location line="-18"/>
<source>Warning: wallet.dat corrupt, data salvaged! Original wallet.dat saved as wallet.{timestamp}.bak in %s; if your balance or transactions are incorrect you should restore from a backup.</source>
<translation>Opozorilo: wallet.dat je pokvarjena, podatki rešeni! Originalna wallet.dat je bila shranjena kot denarnica. {timestamp}.bak v %s; če imate napačno prikazano stanje na računu ali v transakcijah prenovite datoteko z varnostno kopijo. </translation>
</message>
<message>
<location line="-30"/>
<source>Attempt to recover private keys from a corrupt wallet.dat</source>
<translation>Poizkusi rešiti zasebni ključ iz pokvarjene wallet.dat </translation>
</message>
<message>
<location line="+4"/>
<source>Block creation options:</source>
<translation>Možnosti ustvarjanja blokov:</translation>
</message>
<message>
<location line="-62"/>
<source>Connect only to the specified node(s)</source>
<translation>Poveži se samo na določena vozlišče(a)</translation>
</message>
<message>
<location line="+4"/>
<source>Discover own IP address (default: 1 when listening and no -externalip)</source>
<translation>Odkrij svoj IP naslov (privzeto: 1 ob poslušanju, ko ni aktiviran -externalip)</translation>
</message>
<message>
<location line="+94"/>
<source>Failed to listen on any port. Use -listen=0 if you want this.</source>
<translation>Poslušanje za vrata je spodletelo. Če želite lahko uporabite ukaz -listen=0.</translation>
</message>
<message>
<location line="-90"/>
<source>Find peers using DNS lookup (default: 1)</source>
<translation>Najdi soležnike z uporabno DNS vpogleda (privzeto: 1)</translation>
</message>
<message>
<location line="+5"/>
<source>Sync checkpoints policy (default: strict)</source>
<translation>Sinhronizacija načina točk preverjanja (privzeto: strogo)</translation>
</message>
<message>
<location line="+83"/>
<source>Invalid -tor address: '%s'</source>
<translation>Neveljaven -tor naslov: '%s'</translation>
</message>
<message>
<location line="+4"/>
<source>Invalid amount for -reservebalance=<amount></source>
<translation>Neveljavni znesek za -reservebalance=<amount></translation>
</message>
<message>
<location line="-82"/>
<source>Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)</source>
<translation>Največji sprejemni medpomnilnik glede na povezavo, <n>*1000 bytov (privzeto: 5000)</translation>
</message>
<message>
<location line="+1"/>
<source>Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)</source>
<translation>Največji oddajni medpomnilnik glede na povezavo, <n>*1000 bytov (privzeto: 1000)</translation>
</message>
<message>
<location line="-16"/>
<source>Only connect to nodes in network <net> (IPv4, IPv6 or Tor)</source>
<translation>Poveži se samo z vozlišči v omrežju <net> (IPv4, IPv6 in Tor)</translation>
</message>
<message>
<location line="+28"/>
<source>Output extra debugging information. Implies all other -debug* options</source>
<translation>Output dodatnih informacij razhroščevanja. Obsega vse druge -debug* možnosti.</translation>
</message>
<message>
<location line="+1"/>
<source>Output extra network debugging information</source>
<translation>Output dodatnih informacij razhroščevanja omrežja. </translation>
</message>
<message>
<location line="+1"/>
<source>Prepend debug output with timestamp</source>
<translation>Opremi output rahroščevanja s časovnim žigom. </translation>
</message>
<message>
<location line="+35"/>
<source>SSL options: (see the Bitcoin Wiki for SSL setup instructions)</source>
<translation>SSL možnosti: (glejte Bitcoin Wiki za navodla, kako nastaviti SSL)</translation>
</message>
<message>
<location line="-74"/>
<source>Select the version of socks proxy to use (4-5, default: 5)</source>
<translation>Izberi verzijo socks proxya za uporabo (4-5, privzeto: 5)</translation>
</message>
<message>
<location line="+41"/>
<source>Send trace/debug info to console instead of debug.log file</source>
<translation>Pošlji sledilne/razhroščevalne informacije v konzolo namesto jih shraniti v debug.log datoteko</translation>
</message>
<message>
<location line="+1"/>
<source>Send trace/debug info to debugger</source>
<translation>Pošlji sledilne/razhroščevalne informacije v razhroščevalnik</translation>
</message>
<message>
<location line="+28"/>
<source>Set maximum block size in bytes (default: 250000)</source>
<translation>Nastavi največjo velikost bloka v bajtih (privzeto: 250000)</translation>
</message>
<message>
<location line="-1"/>
<source>Set minimum block size in bytes (default: 0)</source>
<translation>Nastavi najmanjšo velikost bloka v bajtih (privzeto: 0)</translation>
</message>
<message>
<location line="-29"/>
<source>Shrink debug.log file on client startup (default: 1 when no -debug)</source>
<translation>Skrči debug.log datoteko ob zagonu aplikacije (privzeto: 1 ko ni aktiviran -debug)</translation>
</message>
<message>
<location line="-42"/>
<source>Specify connection timeout in milliseconds (default: 5000)</source>
<translation>Določi čas pavze povezovanja v milisekundah (privzeto: 5000)</translation>
</message>
<message>
<location line="+109"/>
<source>Unable to sign checkpoint, wrong checkpointkey?
</source>
<translation>Ni bilo mogoče vpisati točke preverjanja, napačen ključ za točko preverjanja?
</translation>
</message>
<message>
<location line="-80"/>
<source>Use UPnP to map the listening port (default: 0)</source>
<translation>Uporabi UPnP za mapiranje vrat poslušanja (privzeto: 0)</translation>
</message>
<message>
<location line="-1"/>
<source>Use UPnP to map the listening port (default: 1 when listening)</source>
<translation>Uporabi UPnP za mapiranje vrat poslušanja (privzeto: 1 med poslušanjem)</translation>
</message>
<message>
<location line="-25"/>
<source>Use proxy to reach tor hidden services (default: same as -proxy)</source>
<translation>Uporabi proxy za povezavo s skritimi storitvami tora (privzeto: isto kot -proxy) </translation>
</message>
<message>
<location line="+42"/>
<source>Username for JSON-RPC connections</source>
<translation>Uporabniško ime za JSON-RPC povezave</translation>
</message>
<message>
<location line="+47"/>
<source>Verifying database integrity...</source>
<translation>Potrdite neoporečnost baze podatkov...</translation>
</message>
<message>
<location line="+57"/>
<source>WARNING: syncronized checkpoint violation detected, but skipped!</source>
<translation>OPOZORILO: zaznana je bila kršitev s sinhronizirami točkami preverjanja, a je bila izpuščena.</translation>
</message>
<message>
<location line="+1"/>
<source>Warning: Disk space is low!</source>
<translation>Opozorilo: Malo prostora na disku!</translation>
</message>
<message>
<location line="-2"/>
<source>Warning: This version is obsolete, upgrade required!</source>
<translation>Opozorilo: ta različica je zastarela, potrebna je nadgradnja!</translation>
</message>
<message>
<location line="-48"/>
<source>wallet.dat corrupt, salvage failed</source>
<translation>wallet.dat poškodovana, neuspešna obnova</translation>
</message>
<message>
<location line="-54"/>
<source>Password for JSON-RPC connections</source>
<translation>Geslo za JSON-RPC povezave</translation>
</message>
<message>
<location line="-84"/>
<source>%s, you must set a rpcpassword in the configuration file:
%s
It is recommended you use the following random password:
rpcuser=LEOcoinrpc
rpcpassword=%s
(you do not need to remember this password)
The username and password MUST NOT be the same.
If the file does not exist, create it with owner-readable-only file permissions.
It is also recommended to set alertnotify so you are notified of problems;
for example: alertnotify=echo %%s | mail -s "LEOcoin Alert" admin@foo.com
</source>
<translation>%s, nastaviti morate rpcgeslo v konfiguracijski datoteki:
%s
Priporočeno je, da uporabite naslednje naključno geslo:
rpcuser=LEOcoinrpc
rpcpassword=%s
(tega gesla si vam ni potrebno zapomniti)
Uporabniško ime in geslo NE SMETA biti ista.
Če datoteka ne obstaja, jo ustvarite z lastniškimi dovoljenji za datoteke.
Prav tako je priporočeno, da nastavite alernotify, tkako da vas opozori na probleme;
na primer: alertnotify=echo %%s | mail -s "LEOcoin Alarm" admin@foo.com
</translation>
</message>
<message>
<location line="+51"/>
<source>Find peers using internet relay chat (default: 0)</source>
<translation>Najdi soležnike prek irca (privzeto: 0)</translation>
</message>
<message>
<location line="+5"/>
<source>Sync time with other nodes. Disable if time on your system is precise e.g. syncing with NTP (default: 1)</source>
<translation>Sinhroniziraj čas z drugimi vozlišči. Onemogoči, če je čas na vašem sistemu točno nastavljen, npr. sinhroniziranje z NTP (privzeto: 1)</translation>
</message>
<message>
<location line="+15"/>
<source>When creating transactions, ignore inputs with value less than this (default: 0.01)</source>
<translation>Ob ustvarjanju transakcij, prezri vnose z manjšo vrednostjo kot (privzeto: 0.01)</translation>
</message>
<message>
<location line="+16"/>
<source>Allow JSON-RPC connections from specified IP address</source>
<translation>Dovoli JSON-RPC povezave z določenega IP naslova</translation>
</message>
<message>
<location line="+1"/>
<source>Send commands to node running on <ip> (default: 127.0.0.1)</source>
<translation>Pošlji ukaze vozlišču na <ip> (privzet: 127.0.0.1)</translation>
</message>
<message>
<location line="+1"/>
<source>Execute command when the best block changes (%s in cmd is replaced by block hash)</source>
<translation>Izvrši ukaz, ko se najboljši blok spremeni (%s je v cmd programu nadomeščen z zgoščenimi bloki).</translation>
</message>
<message>
<location line="+3"/>
<source>Execute command when a wallet transaction changes (%s in cmd is replaced by TxID)</source>
<translation>Izvedi ukaz, ko bo transakcija denarnice se spremenila (V cmd je bil TxID zamenjan za %s)</translation>
</message>
<message>
<location line="+3"/>
<source>Require a confirmations for change (default: 0)</source>
<translation>Zahtevaj potrditve za spremembo (default: 0)</translation>
</message>
<message>
<location line="+1"/>
<source>Enforce transaction scripts to use canonical PUSH operators (default: 1)</source>
<translation>Zahtevaj da transakcijske skripte uporabljajo operatorje canonical PUSH (privzeto: 1)</translation>
</message>
<message>
<location line="+2"/>
<source>Execute command when a relevant alert is received (%s in cmd is replaced by message)</source>
<translation>Izvrši ukaz, ko je prejet relevanten alarm (%s je v cmd programu nadomeščen s sporočilom)</translation>
</message>
<message>
<location line="+3"/>
<source>Upgrade wallet to latest format</source>
<translation>Posodobi denarnico v najnovejši zapis</translation>
</message>
<message>
<location line="+1"/>
<source>Set key pool size to <n> (default: 100)</source>
<translation>Nastavi velikost ključa bazena na <n> (privzeto: 100)</translation>
</message>
<message>
<location line="+1"/>
<source>Rescan the block chain for missing wallet transactions</source>
<translation>Ponovno preglej verigo blokov za manjkajoče transakcije denarnice</translation>
</message>
<message>
<location line="+2"/>
<source>How many blocks to check at startup (default: 2500, 0 = all)</source>
<translation>Koliko blokov naj preveri ob zagonu aplikacije (privzeto: 2500, 0 = vse)</translation>
</message>
<message>
<location line="+1"/>
<source>How thorough the block verification is (0-6, default: 1)</source>
<translation>Kako temeljito naj bo preverjanje blokov (0-6, privzeto: 1)</translation>
</message>
<message>
<location line="+1"/>
<source>Imports blocks from external blk000?.dat file</source>
<translation>Uvozi bloke iz zunanje blk000?.dat datoteke</translation>
</message>
<message>
<location line="+8"/>
<source>Use OpenSSL (https) for JSON-RPC connections</source>
<translation>Uporabi OpenSSL (https) za JSON-RPC povezave</translation>
</message>
<message>
<location line="+1"/>
<source>Server certificate file (default: server.cert)</source>
<translation>Datoteka potrdila strežnika (privzeta: server.cert)</translation>
</message>
<message>
<location line="+1"/>
<source>Server private key (default: server.pem)</source>
<translation>Zasebni ključ strežnika (privzet: server.pem)</translation>
</message>
<message>
<location line="+1"/>
<source>Acceptable ciphers (default: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</source>
<translation>Dovoljeni kodirniki (privzeti: TLSv1+HIGH:!SSLv2:!aNULL:!eNULL:!AH:!3DES:@STRENGTH)</translation>
</message>
<message>
<location line="+53"/>
<source>Error: Wallet unlocked for staking only, unable to create transaction.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location line="+18"/>
<source>WARNING: Invalid checkpoint found! Displayed transactions may not be correct! You may need to upgrade, or notify developers.</source>
<translation>OPOZORILO: Najdene so bile neveljavne točke preverjanja! Prikazane transakcije so morda napačne! Poiščite novo različico aplikacije ali pa obvestite razvijalce.</translation>
</message>
<message>
<location line="-158"/>
<source>This help message</source>
<translation>To sporočilo pomoči</translation>
</message>
<message>
<location line="+95"/>
<source>Wallet %s resides outside data directory %s.</source>
<translation>Denarnica %s se nahaja zunaj datotečnega imenika %s.</translation>
</message>
<message>
<location line="+1"/>
<source>Cannot obtain a lock on data directory %s. LEOcoin is probably already running.</source>
<translation>Ni bilo mogoče najti podatkovnega imenika %s. Aplikacija LEOcoin je verjetno že zagnana.</translation>
</message>
<message>
<location line="-98"/>
<source>LEOcoin</source>
<translation>LEOcoin</translation>
</message>
<message>
<location line="+140"/>
<source>Unable to bind to %s on this computer (bind returned error %d, %s)</source>
<translation>Na tem računalniku je bilo nemogoče vezati na %s (bind returned error %d, %s)</translation>
</message>
<message>
<location line="-130"/>
<source>Connect through socks proxy</source>
<translation>Poveži se skozi socks proxy</translation>
</message>
<message>
<location line="+3"/>
<source>Allow DNS lookups for -addnode, -seednode and -connect</source>
<translation>Omogoči DNS povezave za -addnode, -seednode in -connect</translation>
</message>
<message>
<location line="+122"/>
<source>Loading addresses...</source>
<translation>Nalaganje naslovov ...</translation>
</message>
<message>
<location line="-15"/>
<source>Error loading blkindex.dat</source>
<translation>Napaka pri nalaganju blkindex.dat</translation>
</message>
<message>
<location line="+2"/>
<source>Error loading wallet.dat: Wallet corrupted</source>
<translation>Napaka pri nalaganju wallet.dat: denarnica pokvarjena</translation>
</message>
<message>
<location line="+4"/>
<source>Error loading wallet.dat: Wallet requires newer version of LEOcoin</source>
<translation>Napaka pri nalaganju wallet.dat: denarnica zahteva novejšo verzijo LEOcoin</translation>
</message>
<message>
<location line="+1"/>
<source>Wallet needed to be rewritten: restart LEOcoin to complete</source>
<translation>Denarnica mora biti prepisana: ponovno odprite LEOcoin za dokončanje</translation>
</message>
<message>
<location line="+1"/>
<source>Error loading wallet.dat</source>
<translation>Napaka pri nalaganju wallet.dat</translation>
</message>
<message>
<location line="-16"/>
<source>Invalid -proxy address: '%s'</source>
<translation>Neveljaven -proxy naslov: '%s'</translation>
</message>
<message>
<location line="-1"/>
<source>Unknown network specified in -onlynet: '%s'</source>
<translation>Neznano omrežje določeno v -onlynet: '%s'</translation>
</message>
<message>
<location line="-1"/>
<source>Unknown -socks proxy version requested: %i</source>
<translation>Zahtevana neznana -socks proxy različica: %i</translation>
</message>
<message>
<location line="+4"/>
<source>Cannot resolve -bind address: '%s'</source>
<translation>Ni mogoče določiti -bind naslova: '%s'</translation>
</message>
<message>
<location line="+2"/>
<source>Cannot resolve -externalip address: '%s'</source>
<translation>Ni mogoče določiti -externalip naslova: '%s'</translation>
</message>
<message>
<location line="-24"/>
<source>Invalid amount for -paytxfee=<amount>: '%s'</source>
<translation>Neveljavni znesek za -paytxfee=<amount>: '%s'</translation>
</message>
<message>
<location line="+44"/>
<source>Error: could not start node</source>
<translation>Napaka: ni mogoče zagnati vozlišča</translation>
</message>
<message>
<location line="+11"/>
<source>Sending...</source>
<translation>Pošiljanje...</translation>
</message>
<message>
<location line="+5"/>
<source>Invalid amount</source>
<translation>Neveljavna količina</translation>
</message>
<message>
<location line="+1"/>
<source>Insufficient funds</source>
<translation>Premalo sredstev</translation>
</message>
<message>
<location line="-34"/>
<source>Loading block index...</source>
<translation>Nalaganje indeksa blokov ...</translation>
</message>
<message>
<location line="-103"/>
<source>Add a node to connect to and attempt to keep the connection open</source>
<translation>Dodaj vozlišče za povezavo nanj in skušaj le to obdržati odprto</translation>
</message>
<message>
<location line="+122"/>
<source>Unable to bind to %s on this computer. LEOcoin is probably already running.</source>
<translation>Navezava v %s na tem računalniku ni mogoča LEOcoin aplikacija je verjetno že zagnana.</translation>
</message>
<message>
<location line="-97"/>
<source>Fee per KB to add to transactions you send</source>
<translation>Provizija na KB ki jo morate dodati transakcijam, ki jih pošiljate</translation>
</message>
<message>
<location line="+55"/>
<source>Invalid amount for -mininput=<amount>: '%s'</source>
<translation>Neveljavni znesek za -miniput=<amount>: '%s'</translation>
</message>
<message>
<location line="+25"/>
<source>Loading wallet...</source>
<translation>Nalaganje denarnice ...</translation>
</message>
<message>
<location line="+8"/>
<source>Cannot downgrade wallet</source>
<translation>Ne morem </translation>
</message>
<message>
<location line="+1"/>
<source>Cannot initialize keypool</source>
<translation>Ni mogoče zagnati keypoola</translation>
</message>
<message>
<location line="+1"/>
<source>Cannot write default address</source>
<translation>Ni mogoče zapisati privzetega naslova</translation>
</message>
<message>
<location line="+1"/>
<source>Rescanning...</source>
<translation>Ponovno pregledovanje ...</translation>
</message>
<message>
<location line="+5"/>
<source>Done loading</source>
<translation>Nalaganje končano</translation>
</message>
<message>
<location line="-167"/>
<source>To use the %s option</source>
<translation>Za uporabo %s opcije</translation>
</message>
<message>
<location line="+14"/>
<source>Error</source>
<translation>Napaka</translation>
</message>
<message>
<location line="+6"/>
<source>You must set rpcpassword=<password> in the configuration file:
%s
If the file does not exist, create it with owner-readable-only file permissions.</source>
<translation>Nastaviti morate rpcpassword=<password> v konfiguracijski datoteki:
%s
Če datoteka ne obstaja, jo ustvarite z lastniškimi dovoljenji za datoteke.</translation>
</message>
</context>
</TS>
|
Leocoin-project/LEOcoin
|
src/qt/locale/LEOcoin_sl_SI.ts
|
TypeScript
|
mit
| 148,042
|
[
30522,
1026,
1029,
20950,
2544,
1027,
1000,
1015,
1012,
1014,
1000,
17181,
1027,
1000,
21183,
2546,
1011,
1022,
1000,
1029,
1028,
1026,
999,
9986,
13874,
24529,
1028,
1026,
24529,
2544,
1027,
1000,
1016,
1012,
1015,
1000,
2653,
1027,
1000,
22889,
1035,
9033,
1000,
1028,
1026,
6123,
1028,
1026,
2171,
1028,
2055,
27184,
8649,
1026,
1013,
2171,
1028,
1026,
4471,
1028,
1026,
3295,
5371,
18442,
1027,
1000,
1012,
1012,
1013,
3596,
1013,
2055,
27184,
8649,
1012,
21318,
1000,
2240,
1027,
1000,
1009,
2403,
1000,
1013,
1028,
1026,
3120,
1028,
2055,
6688,
3597,
2378,
1026,
1013,
3120,
1028,
1026,
5449,
1028,
1051,
6688,
3597,
2378,
1026,
30524,
1038,
1004,
14181,
1025,
6688,
3597,
2378,
1004,
8318,
1025,
1013,
1038,
1004,
14181,
1025,
2544,
1026,
1013,
3120,
1028,
1026,
5449,
1028,
1004,
8318,
1025,
1038,
1004,
14181,
1025,
6688,
3597,
2378,
1004,
8318,
1025,
1013,
1038,
1004,
14181,
1025,
2310,
15378,
14713,
1026,
1013,
5449,
1028,
1026,
1013,
4471,
1028,
1026,
4471,
1028,
1026,
3295,
2240,
1027,
1000,
1009,
4601,
1000,
1013,
1028,
1026,
3120,
1028,
9385,
1075,
2268,
1011,
2297,
1996,
2978,
3597,
2378,
9797,
9385,
1075,
2262,
1011,
2297,
1996,
6846,
3597,
2378,
9797,
9385,
1075,
2297,
1996,
2304,
3597,
2378,
9797,
9385,
1075,
2297,
1011,
1003,
1015,
1996,
6688,
3597,
2378,
9797,
1026,
1013,
3120,
1028,
1026,
5449,
2828,
1027,
1000,
14342,
1000,
1028,
1026,
1013,
5449,
1028,
1026,
1013,
4471,
1028,
1026,
4471,
1028,
1026,
3295,
2240,
1027,
1000,
1009,
2385,
1000,
1013,
1028,
1026,
3120,
1028,
2023,
2003,
6388,
4007,
1012,
5500,
2104,
1996,
10210,
1013,
1060,
14526,
4007,
6105,
1010,
2156,
1996,
10860,
5371,
24731,
2030,
1004,
8318,
1025,
1037,
17850,
12879,
1027,
1004,
22035,
2102,
1025,
8299,
1024,
1013,
1013,
7479,
1012,
7480,
8162,
3401,
1012,
8917,
1013,
15943,
1013,
10210,
1011,
6105,
1012,
25718,
1004,
22035,
2102,
1025,
1004,
14181,
1025,
8299,
1024,
1013,
1013,
7479,
1012,
7480,
8162,
3401,
1012,
8917,
1013,
15943,
1013,
10210,
1011,
6105,
1012,
25718,
1004,
8318,
1025,
1013,
1037,
1004,
14181,
1025,
1012,
2023,
4031,
2950,
4007,
2764,
2011,
1996,
7480,
14540,
2622,
2005,
2224,
1999,
1996,
7480,
14540,
6994,
23615,
1006,
1004,
8318,
1025,
1037,
17850,
12879,
1027,
1004,
22035,
2102,
1025,
16770,
1024,
1013,
1013,
7479,
1012,
7480,
14540,
1012,
8917,
1013,
1004,
22035,
2102,
1025,
1004,
14181,
1025,
16770,
1024,
1013,
1013,
7479,
1012,
7480,
14540,
1012,
8917,
1013,
1004,
8318,
1025,
1013,
1037,
1004,
14181,
1025,
1007,
1998,
19888,
13705,
4007,
2517,
2011,
4388,
2402,
1006,
1004,
8318,
1025,
1037,
17850,
12879,
1027,
1004,
22035,
2102,
1025,
5653,
3406,
1024,
19413,
2100,
1030,
19888,
6499,
6199,
1012,
4012,
1004,
22035,
2102,
1025,
1004,
14181,
1025,
19413,
2100,
1030,
19888,
6499,
6199,
1012,
4012,
1004,
8318,
1025,
1013,
1037,
1004,
14181,
1025,
1007,
1998,
2039,
16275,
4007,
2517,
2011,
2726,
6795,
1012,
1026,
1013,
3120,
1028,
1026,
5449,
2828,
1027,
30523,
1013,
5449,
1028,
1026,
1013,
4471,
1028,
1026,
4471,
1028,
1026,
3295,
2240,
1027,
1000,
1009,
4464,
1000,
1013,
1028,
1026,
3120,
1028,
1004,
8318,
1025,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1013,
5449,
1028,
1026,
1013,
4471,
1028,
1026,
4471,
1028,
1026,
3295,
2240,
1027,
1000,
1009,
4464,
1000,
1013,
1028,
1026,
3120,
1028,
1004,
8318,
1025,
30526
] |
#include "Extensions.hpp"
#include "Extensions.inl"
#include <Math/Rect.hpp>
#include <Math/Vector.hpp>
#include <Script/ScriptExtensions.hpp>
#include <SFML/Graphics/CircleShape.hpp>
#include <angelscript.h>
#include <cassert>
namespace
{
void create_CircleShape(void* memory)
{
new(memory)sf::CircleShape();
}
void create_CircleShape_rad(float radius, unsigned int count, void* memory)
{
new(memory)sf::CircleShape(radius, count);
}
bool Reg()
{
Script::ScriptExtensions::AddExtension([](asIScriptEngine* eng) {
int r = 0;
r = eng->SetDefaultNamespace("Shapes"); assert(r >= 0);
r = eng->RegisterObjectType("Circle", sizeof(sf::CircleShape), asOBJ_VALUE | asGetTypeTraits<sf::CircleShape>()); assert(r >= 0);
r = eng->RegisterObjectBehaviour("Circle", asBEHAVE_CONSTRUCT, "void f()", asFUNCTION(create_CircleShape), asCALL_CDECL_OBJLAST); assert(r >= 0);
r = eng->RegisterObjectBehaviour("Circle", asBEHAVE_CONSTRUCT, "void f(float,uint=30)", asFUNCTION(create_CircleShape_rad), asCALL_CDECL_OBJLAST); assert(r >= 0);
r = eng->RegisterObjectMethod("Circle", "void set_PointCount(uint)", asMETHOD(sf::CircleShape, setPointCount), asCALL_THISCALL); assert(r >= 0);
r = eng->RegisterObjectMethod("Circle", "float get_Radius()", asMETHOD(sf::CircleShape, getRadius), asCALL_THISCALL); assert(r >= 0);
r = eng->RegisterObjectMethod("Circle", "void set_Radius(float)", asMETHOD(sf::CircleShape, setRadius), asCALL_THISCALL); assert(r >= 0);
Script::SFML::registerShape<sf::CircleShape>("Circle", eng);
r = eng->SetDefaultNamespace(""); assert(r >= 0);
}, 6);
return true;
}
}
bool Script::SFML::Extensions::CircleShape = Reg();
|
ace13/LD31
|
Source/Script/SFML/CircleShape.cpp
|
C++
|
mit
| 1,833
|
[
30522,
1001,
2421,
1000,
14305,
1012,
6522,
2361,
1000,
1001,
2421,
1000,
14305,
1012,
1999,
2140,
1000,
1001,
2421,
1026,
8785,
1013,
28667,
2102,
1012,
6522,
2361,
1028,
1001,
2421,
1026,
8785,
1013,
9207,
1012,
6522,
2361,
1028,
1001,
2421,
1026,
5896,
1013,
5896,
10288,
29048,
2015,
1012,
6522,
2361,
1028,
1001,
2421,
1026,
16420,
19968,
1013,
8389,
1013,
7925,
3270,
5051,
1012,
6522,
2361,
1028,
1001,
2421,
1026,
7048,
23235,
1012,
1044,
1028,
1001,
2421,
1026,
16220,
8743,
1028,
3415,
15327,
1063,
11675,
3443,
1035,
7925,
3270,
5051,
1006,
11675,
1008,
3638,
1007,
1063,
2047,
1006,
3638,
1007,
16420,
1024,
1024,
7925,
3270,
5051,
1006,
1007,
1025,
1065,
11675,
3443,
1035,
7925,
3270,
5051,
1035,
10958,
2094,
1006,
14257,
12177,
1010,
27121,
20014,
4175,
1010,
11675,
1008,
3638,
1007,
1063,
2047,
1006,
3638,
1007,
16420,
1024,
1024,
7925,
3270,
5051,
1006,
12177,
1010,
4175,
1007,
1025,
1065,
22017,
2140,
19723,
1006,
1007,
1063,
5896,
1024,
1024,
5896,
10288,
29048,
2015,
1024,
1024,
5587,
10288,
29048,
1006,
1031,
1033,
1006,
2004,
2483,
23235,
13159,
3170,
1008,
25540,
1007,
1063,
20014,
1054,
1027,
1014,
1025,
1054,
1027,
30524,
1006,
16420,
1024,
1024,
7925,
3270,
5051,
1007,
1010,
2004,
16429,
3501,
1035,
3643,
1064,
2004,
18150,
13874,
6494,
12762,
1026,
16420,
1024,
1024,
7925,
3270,
5051,
1028,
1006,
1007,
1007,
1025,
20865,
1006,
1054,
1028,
1027,
1014,
1007,
1025,
1054,
1027,
25540,
1011,
1028,
4236,
16429,
20614,
4783,
3270,
25500,
3126,
1006,
1000,
4418,
1000,
1010,
2004,
4783,
3270,
3726,
1035,
9570,
1010,
1000,
11675,
1042,
1006,
1007,
1000,
1010,
2004,
11263,
27989,
1006,
3443,
1035,
7925,
3270,
5051,
1007,
1010,
2004,
9289,
2140,
1035,
3729,
8586,
2140,
1035,
27885,
3501,
8523,
2102,
1007,
1025,
20865,
1006,
1054,
1028,
1027,
1014,
1007,
1025,
1054,
1027,
25540,
1011,
1028,
4236,
16429,
20614,
4783,
3270,
25500,
3126,
1006,
1000,
4418,
1000,
1010,
2004,
4783,
3270,
3726,
1035,
9570,
1010,
1000,
11675,
1042,
1006,
14257,
1010,
21318,
3372,
1027,
2382,
1007,
1000,
1010,
2004,
11263,
27989,
1006,
3443,
1035,
7925,
3270,
5051,
1035,
10958,
2094,
1007,
1010,
2004,
9289,
2140,
1035,
3729,
8586,
2140,
1035,
27885,
3501,
8523,
2102,
1007,
1025,
20865,
1006,
1054,
1028,
1027,
1014,
1007,
1025,
1054,
1027,
25540,
1011,
1028,
4236,
16429,
20614,
11368,
6806,
2094,
1006,
1000,
4418,
1000,
1010,
1000,
11675,
2275,
1035,
2391,
3597,
16671,
1006,
21318,
3372,
1007,
1000,
1010,
2004,
11368,
6806,
2094,
1006,
16420,
1024,
1024,
7925,
3270,
5051,
1010,
2275,
8400,
3597,
16671,
1007,
1010,
2004,
9289,
2140,
1035,
2023,
9289,
2140,
1007,
1025,
20865,
1006,
1054,
1028,
1027,
1014,
1007,
1025,
1054,
1027,
25540,
1011,
1028,
4236,
16429,
20614,
11368,
6806,
2094,
1006,
1000,
4418,
1000,
1010,
1000,
14257,
2131,
1035,
12177,
1006,
1007,
1000,
1010,
2004,
11368,
6806,
2094,
1006,
16420,
1024,
1024,
30523,
25540,
1011,
1028,
2275,
3207,
7011,
11314,
18442,
23058,
1006,
1000,
10466,
1000,
1007,
1025,
20865,
1006,
1054,
1028,
1027,
1014,
1007,
1025,
1054,
1027,
25540,
1011,
1028,
4236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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
25540,
1011,
1028,
2275,
3207,
7011,
11314,
18442,
23058,
1006,
1000,
10466,
1000,
1007,
1025,
20865,
1006,
1054,
1028,
1027,
1014,
1007,
1025,
1054,
1027,
25540,
1011,
1028,
4236,
16429,
20614,
13874,
1006,
1000,
4418,
1000,
1010,
2946,
11253,
30526
] |
module.exports = require('./../make')({
build: true
});
|
2gis/vmmaster-frontend
|
config/web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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
/*
* Copyright (c) 2008-2011 Atheros Communications Inc.
*
* Permission to use, copy, modify, and/or distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#include <linux/dma-mapping.h>
#include "ath9k.h"
#include "ar9003_mac.h"
#define SKB_CB_ATHBUF(__skb) (*((struct ath_buf **)__skb->cb))
static inline bool ath_is_alt_ant_ratio_better(int alt_ratio, int maxdelta,
int mindelta, int main_rssi_avg,
int alt_rssi_avg, int pkt_count)
{
return (((alt_ratio >= ATH_ANT_DIV_COMB_ALT_ANT_RATIO2) &&
(alt_rssi_avg > main_rssi_avg + maxdelta)) ||
(alt_rssi_avg > main_rssi_avg + mindelta)) && (pkt_count > 50);
}
static inline bool ath_ant_div_comb_alt_check(u8 div_group, int alt_ratio,
int curr_main_set, int curr_alt_set,
int alt_rssi_avg, int main_rssi_avg)
{
bool result = false;
switch (div_group) {
case 0:
if (alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO)
result = true;
break;
case 1:
case 2:
if ((((curr_main_set == ATH_ANT_DIV_COMB_LNA2) &&
(curr_alt_set == ATH_ANT_DIV_COMB_LNA1) &&
(alt_rssi_avg >= (main_rssi_avg - 5))) ||
((curr_main_set == ATH_ANT_DIV_COMB_LNA1) &&
(curr_alt_set == ATH_ANT_DIV_COMB_LNA2) &&
(alt_rssi_avg >= (main_rssi_avg - 2)))) &&
(alt_rssi_avg >= 4))
result = true;
else
result = false;
break;
}
return result;
}
static inline bool ath9k_check_auto_sleep(struct ath_softc *sc)
{
return sc->ps_enabled &&
(sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_AUTOSLEEP);
}
/*
* Setup and link descriptors.
*
* 11N: we can no longer afford to self link the last descriptor.
* MAC acknowledges BA status as long as it copies frames to host
* buffer (or rx fifo). This can incorrectly acknowledge packets
* to a sender if last desc is self-linked.
*/
static void ath_rx_buf_link(struct ath_softc *sc, struct ath_buf *bf)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ath_desc *ds;
struct sk_buff *skb;
ATH_RXBUF_RESET(bf);
ds = bf->bf_desc;
ds->ds_link = 0; /* link to null */
ds->ds_data = bf->bf_buf_addr;
/* virtual addr of the beginning of the buffer. */
skb = bf->bf_mpdu;
BUG_ON(skb == NULL);
ds->ds_vdata = skb->data;
/*
* setup rx descriptors. The rx_bufsize here tells the hardware
* how much data it can DMA to us and that we are prepared
* to process
*/
ath9k_hw_setuprxdesc(ah, ds,
common->rx_bufsize,
0);
if (sc->rx.rxlink == NULL)
ath9k_hw_putrxbuf(ah, bf->bf_daddr);
else
*sc->rx.rxlink = bf->bf_daddr;
sc->rx.rxlink = &ds->ds_link;
}
static void ath_setdefantenna(struct ath_softc *sc, u32 antenna)
{
/* XXX block beacon interrupts */
ath9k_hw_setantenna(sc->sc_ah, antenna);
sc->rx.defant = antenna;
sc->rx.rxotherant = 0;
}
static void ath_opmode_init(struct ath_softc *sc)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
u32 rfilt, mfilt[2];
/* configure rx filter */
rfilt = ath_calcrxfilter(sc);
ath9k_hw_setrxfilter(ah, rfilt);
/* configure bssid mask */
ath_hw_setbssidmask(common);
/* configure operational mode */
ath9k_hw_setopmode(ah);
/* calculate and install multicast filter */
mfilt[0] = mfilt[1] = ~0;
ath9k_hw_setmcastfilter(ah, mfilt[0], mfilt[1]);
}
static bool ath_rx_edma_buf_link(struct ath_softc *sc,
enum ath9k_rx_qtype qtype)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_rx_edma *rx_edma;
struct sk_buff *skb;
struct ath_buf *bf;
rx_edma = &sc->rx.rx_edma[qtype];
if (skb_queue_len(&rx_edma->rx_fifo) >= rx_edma->rx_fifo_hwsize)
return false;
bf = list_first_entry(&sc->rx.rxbuf, struct ath_buf, list);
list_del_init(&bf->list);
skb = bf->bf_mpdu;
ATH_RXBUF_RESET(bf);
memset(skb->data, 0, ah->caps.rx_status_len);
dma_sync_single_for_device(sc->dev, bf->bf_buf_addr,
ah->caps.rx_status_len, DMA_TO_DEVICE);
SKB_CB_ATHBUF(skb) = bf;
ath9k_hw_addrxbuf_edma(ah, bf->bf_buf_addr, qtype);
skb_queue_tail(&rx_edma->rx_fifo, skb);
return true;
}
static void ath_rx_addbuffer_edma(struct ath_softc *sc,
enum ath9k_rx_qtype qtype, int size)
{
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
u32 nbuf = 0;
if (list_empty(&sc->rx.rxbuf)) {
ath_dbg(common, ATH_DBG_QUEUE, "No free rx buf available\n");
return;
}
while (!list_empty(&sc->rx.rxbuf)) {
nbuf++;
if (!ath_rx_edma_buf_link(sc, qtype))
break;
if (nbuf >= size)
break;
}
}
static void ath_rx_remove_buffer(struct ath_softc *sc,
enum ath9k_rx_qtype qtype)
{
struct ath_buf *bf;
struct ath_rx_edma *rx_edma;
struct sk_buff *skb;
rx_edma = &sc->rx.rx_edma[qtype];
while ((skb = skb_dequeue(&rx_edma->rx_fifo)) != NULL) {
bf = SKB_CB_ATHBUF(skb);
BUG_ON(!bf);
list_add_tail(&bf->list, &sc->rx.rxbuf);
}
}
static void ath_rx_edma_cleanup(struct ath_softc *sc)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ath_buf *bf;
ath_rx_remove_buffer(sc, ATH9K_RX_QUEUE_LP);
ath_rx_remove_buffer(sc, ATH9K_RX_QUEUE_HP);
list_for_each_entry(bf, &sc->rx.rxbuf, list) {
if (bf->bf_mpdu) {
dma_unmap_single(sc->dev, bf->bf_buf_addr,
common->rx_bufsize,
DMA_BIDIRECTIONAL);
dev_kfree_skb_any(bf->bf_mpdu);
bf->bf_buf_addr = 0;
bf->bf_mpdu = NULL;
}
}
INIT_LIST_HEAD(&sc->rx.rxbuf);
kfree(sc->rx.rx_bufptr);
sc->rx.rx_bufptr = NULL;
}
static void ath_rx_edma_init_queue(struct ath_rx_edma *rx_edma, int size)
{
skb_queue_head_init(&rx_edma->rx_fifo);
skb_queue_head_init(&rx_edma->rx_buffers);
rx_edma->rx_fifo_hwsize = size;
}
static int ath_rx_edma_init(struct ath_softc *sc, int nbufs)
{
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct ath_hw *ah = sc->sc_ah;
struct sk_buff *skb;
struct ath_buf *bf;
int error = 0, i;
u32 size;
ath9k_hw_set_rx_bufsize(ah, common->rx_bufsize -
ah->caps.rx_status_len);
ath_rx_edma_init_queue(&sc->rx.rx_edma[ATH9K_RX_QUEUE_LP],
ah->caps.rx_lp_qdepth);
ath_rx_edma_init_queue(&sc->rx.rx_edma[ATH9K_RX_QUEUE_HP],
ah->caps.rx_hp_qdepth);
size = sizeof(struct ath_buf) * nbufs;
bf = kzalloc(size, GFP_KERNEL);
if (!bf)
return -ENOMEM;
INIT_LIST_HEAD(&sc->rx.rxbuf);
sc->rx.rx_bufptr = bf;
for (i = 0; i < nbufs; i++, bf++) {
skb = ath_rxbuf_alloc(common, common->rx_bufsize, GFP_KERNEL);
if (!skb) {
error = -ENOMEM;
goto rx_init_fail;
}
memset(skb->data, 0, common->rx_bufsize);
bf->bf_mpdu = skb;
bf->bf_buf_addr = dma_map_single(sc->dev, skb->data,
common->rx_bufsize,
DMA_BIDIRECTIONAL);
if (unlikely(dma_mapping_error(sc->dev,
bf->bf_buf_addr))) {
dev_kfree_skb_any(skb);
bf->bf_mpdu = NULL;
bf->bf_buf_addr = 0;
ath_err(common,
"dma_mapping_error() on RX init\n");
error = -ENOMEM;
goto rx_init_fail;
}
list_add_tail(&bf->list, &sc->rx.rxbuf);
}
return 0;
rx_init_fail:
ath_rx_edma_cleanup(sc);
return error;
}
static void ath_edma_start_recv(struct ath_softc *sc)
{
spin_lock_bh(&sc->rx.rxbuflock);
ath9k_hw_rxena(sc->sc_ah);
ath_rx_addbuffer_edma(sc, ATH9K_RX_QUEUE_HP,
sc->rx.rx_edma[ATH9K_RX_QUEUE_HP].rx_fifo_hwsize);
ath_rx_addbuffer_edma(sc, ATH9K_RX_QUEUE_LP,
sc->rx.rx_edma[ATH9K_RX_QUEUE_LP].rx_fifo_hwsize);
ath_opmode_init(sc);
ath9k_hw_startpcureceive(sc->sc_ah, (sc->sc_flags & SC_OP_OFFCHANNEL));
spin_unlock_bh(&sc->rx.rxbuflock);
}
static void ath_edma_stop_recv(struct ath_softc *sc)
{
ath_rx_remove_buffer(sc, ATH9K_RX_QUEUE_HP);
ath_rx_remove_buffer(sc, ATH9K_RX_QUEUE_LP);
}
int ath_rx_init(struct ath_softc *sc, int nbufs)
{
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
struct sk_buff *skb;
struct ath_buf *bf;
int error = 0;
spin_lock_init(&sc->sc_pcu_lock);
sc->sc_flags &= ~SC_OP_RXFLUSH;
spin_lock_init(&sc->rx.rxbuflock);
common->rx_bufsize = IEEE80211_MAX_MPDU_LEN / 2 +
sc->sc_ah->caps.rx_status_len;
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) {
return ath_rx_edma_init(sc, nbufs);
} else {
ath_dbg(common, ATH_DBG_CONFIG, "cachelsz %u rxbufsize %u\n",
common->cachelsz, common->rx_bufsize);
/* Initialize rx descriptors */
error = ath_descdma_setup(sc, &sc->rx.rxdma, &sc->rx.rxbuf,
"rx", nbufs, 1, 0);
if (error != 0) {
ath_err(common,
"failed to allocate rx descriptors: %d\n",
error);
goto err;
}
list_for_each_entry(bf, &sc->rx.rxbuf, list) {
skb = ath_rxbuf_alloc(common, common->rx_bufsize,
GFP_KERNEL);
if (skb == NULL) {
error = -ENOMEM;
goto err;
}
bf->bf_mpdu = skb;
bf->bf_buf_addr = dma_map_single(sc->dev, skb->data,
common->rx_bufsize,
DMA_FROM_DEVICE);
if (unlikely(dma_mapping_error(sc->dev,
bf->bf_buf_addr))) {
dev_kfree_skb_any(skb);
bf->bf_mpdu = NULL;
bf->bf_buf_addr = 0;
ath_err(common,
"dma_mapping_error() on RX init\n");
error = -ENOMEM;
goto err;
}
}
sc->rx.rxlink = NULL;
}
err:
if (error)
ath_rx_cleanup(sc);
return error;
}
void ath_rx_cleanup(struct ath_softc *sc)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct sk_buff *skb;
struct ath_buf *bf;
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) {
ath_rx_edma_cleanup(sc);
return;
} else {
list_for_each_entry(bf, &sc->rx.rxbuf, list) {
skb = bf->bf_mpdu;
if (skb) {
dma_unmap_single(sc->dev, bf->bf_buf_addr,
common->rx_bufsize,
DMA_FROM_DEVICE);
dev_kfree_skb(skb);
bf->bf_buf_addr = 0;
bf->bf_mpdu = NULL;
}
}
if (sc->rx.rxdma.dd_desc_len != 0)
ath_descdma_cleanup(sc, &sc->rx.rxdma, &sc->rx.rxbuf);
}
}
/*
* Calculate the receive filter according to the
* operating mode and state:
*
* o always accept unicast, broadcast, and multicast traffic
* o maintain current state of phy error reception (the hal
* may enable phy error frames for noise immunity work)
* o probe request frames are accepted only when operating in
* hostap, adhoc, or monitor modes
* o enable promiscuous mode according to the interface state
* o accept beacons:
* - when operating in adhoc mode so the 802.11 layer creates
* node table entries for peers,
* - when operating in station mode for collecting rssi data when
* the station is otherwise quiet, or
* - when operating as a repeater so we see repeater-sta beacons
* - when scanning
*/
u32 ath_calcrxfilter(struct ath_softc *sc)
{
u32 rfilt;
rfilt = ATH9K_RX_FILTER_UCAST | ATH9K_RX_FILTER_BCAST
| ATH9K_RX_FILTER_MCAST;
if (sc->rx.rxfilter & FIF_PROBE_REQ)
rfilt |= ATH9K_RX_FILTER_PROBEREQ;
/*
* Set promiscuous mode when FIF_PROMISC_IN_BSS is enabled for station
* mode interface or when in monitor mode. AP mode does not need this
* since it receives all in-BSS frames anyway.
*/
if (sc->sc_ah->is_monitoring)
rfilt |= ATH9K_RX_FILTER_PROM;
if (sc->rx.rxfilter & FIF_CONTROL)
rfilt |= ATH9K_RX_FILTER_CONTROL;
if ((sc->sc_ah->opmode == NL80211_IFTYPE_STATION) &&
(sc->nvifs <= 1) &&
!(sc->rx.rxfilter & FIF_BCN_PRBRESP_PROMISC))
rfilt |= ATH9K_RX_FILTER_MYBEACON;
else
rfilt |= ATH9K_RX_FILTER_BEACON;
if ((sc->sc_ah->opmode == NL80211_IFTYPE_AP) ||
(sc->rx.rxfilter & FIF_PSPOLL))
rfilt |= ATH9K_RX_FILTER_PSPOLL;
if (conf_is_ht(&sc->hw->conf))
rfilt |= ATH9K_RX_FILTER_COMP_BAR;
if (sc->nvifs > 1 || (sc->rx.rxfilter & FIF_OTHER_BSS)) {
/* The following may also be needed for other older chips */
if (sc->sc_ah->hw_version.macVersion == AR_SREV_VERSION_9160)
rfilt |= ATH9K_RX_FILTER_PROM;
rfilt |= ATH9K_RX_FILTER_MCAST_BCAST_ALL;
}
return rfilt;
#undef RX_FILTER_PRESERVE
}
int ath_startrecv(struct ath_softc *sc)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_buf *bf, *tbf;
if (ah->caps.hw_caps & ATH9K_HW_CAP_EDMA) {
ath_edma_start_recv(sc);
return 0;
}
spin_lock_bh(&sc->rx.rxbuflock);
if (list_empty(&sc->rx.rxbuf))
goto start_recv;
sc->rx.rxlink = NULL;
list_for_each_entry_safe(bf, tbf, &sc->rx.rxbuf, list) {
ath_rx_buf_link(sc, bf);
}
/* We could have deleted elements so the list may be empty now */
if (list_empty(&sc->rx.rxbuf))
goto start_recv;
bf = list_first_entry(&sc->rx.rxbuf, struct ath_buf, list);
ath9k_hw_putrxbuf(ah, bf->bf_daddr);
ath9k_hw_rxena(ah);
start_recv:
ath_opmode_init(sc);
ath9k_hw_startpcureceive(ah, (sc->sc_flags & SC_OP_OFFCHANNEL));
spin_unlock_bh(&sc->rx.rxbuflock);
return 0;
}
bool ath_stoprecv(struct ath_softc *sc)
{
struct ath_hw *ah = sc->sc_ah;
bool stopped, reset = false;
spin_lock_bh(&sc->rx.rxbuflock);
ath9k_hw_abortpcurecv(ah);
ath9k_hw_setrxfilter(ah, 0);
stopped = ath9k_hw_stopdmarecv(ah, &reset);
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)
ath_edma_stop_recv(sc);
else
sc->rx.rxlink = NULL;
spin_unlock_bh(&sc->rx.rxbuflock);
if (!(ah->ah_flags & AH_UNPLUGGED) &&
unlikely(!stopped)) {
ath_err(ath9k_hw_common(sc->sc_ah),
"Could not stop RX, we could be "
"confusing the DMA engine when we start RX up\n");
ATH_DBG_WARN_ON_ONCE(!stopped);
}
return stopped && !reset;
}
void ath_flushrecv(struct ath_softc *sc)
{
sc->sc_flags |= SC_OP_RXFLUSH;
if (sc->sc_ah->caps.hw_caps & ATH9K_HW_CAP_EDMA)
ath_rx_tasklet(sc, 1, true);
ath_rx_tasklet(sc, 1, false);
sc->sc_flags &= ~SC_OP_RXFLUSH;
}
static bool ath_beacon_dtim_pending_cab(struct sk_buff *skb)
{
/* Check whether the Beacon frame has DTIM indicating buffered bc/mc */
struct ieee80211_mgmt *mgmt;
u8 *pos, *end, id, elen;
struct ieee80211_tim_ie *tim;
mgmt = (struct ieee80211_mgmt *)skb->data;
pos = mgmt->u.beacon.variable;
end = skb->data + skb->len;
while (pos + 2 < end) {
id = *pos++;
elen = *pos++;
if (pos + elen > end)
break;
if (id == WLAN_EID_TIM) {
if (elen < sizeof(*tim))
break;
tim = (struct ieee80211_tim_ie *) pos;
if (tim->dtim_count != 0)
break;
return tim->bitmap_ctrl & 0x01;
}
pos += elen;
}
return false;
}
static void ath_rx_ps_beacon(struct ath_softc *sc, struct sk_buff *skb)
{
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
if (skb->len < 24 + 8 + 2 + 2)
return;
sc->ps_flags &= ~PS_WAIT_FOR_BEACON;
if (sc->ps_flags & PS_BEACON_SYNC) {
sc->ps_flags &= ~PS_BEACON_SYNC;
ath_dbg(common, ATH_DBG_PS,
"Reconfigure Beacon timers based on timestamp from the AP\n");
ath_set_beacon(sc);
}
if (ath_beacon_dtim_pending_cab(skb)) {
/*
* Remain awake waiting for buffered broadcast/multicast
* frames. If the last broadcast/multicast frame is not
* received properly, the next beacon frame will work as
* a backup trigger for returning into NETWORK SLEEP state,
* so we are waiting for it as well.
*/
ath_dbg(common, ATH_DBG_PS,
"Received DTIM beacon indicating buffered broadcast/multicast frame(s)\n");
sc->ps_flags |= PS_WAIT_FOR_CAB | PS_WAIT_FOR_BEACON;
return;
}
if (sc->ps_flags & PS_WAIT_FOR_CAB) {
/*
* This can happen if a broadcast frame is dropped or the AP
* fails to send a frame indicating that all CAB frames have
* been delivered.
*/
sc->ps_flags &= ~PS_WAIT_FOR_CAB;
ath_dbg(common, ATH_DBG_PS,
"PS wait for CAB frames timed out\n");
}
}
static void ath_rx_ps(struct ath_softc *sc, struct sk_buff *skb, bool mybeacon)
{
struct ieee80211_hdr *hdr;
struct ath_common *common = ath9k_hw_common(sc->sc_ah);
hdr = (struct ieee80211_hdr *)skb->data;
/* Process Beacon and CAB receive in PS state */
if (((sc->ps_flags & PS_WAIT_FOR_BEACON) || ath9k_check_auto_sleep(sc))
&& mybeacon)
ath_rx_ps_beacon(sc, skb);
else if ((sc->ps_flags & PS_WAIT_FOR_CAB) &&
(ieee80211_is_data(hdr->frame_control) ||
ieee80211_is_action(hdr->frame_control)) &&
is_multicast_ether_addr(hdr->addr1) &&
!ieee80211_has_moredata(hdr->frame_control)) {
/*
* No more broadcast/multicast frames to be received at this
* point.
*/
sc->ps_flags &= ~(PS_WAIT_FOR_CAB | PS_WAIT_FOR_BEACON);
ath_dbg(common, ATH_DBG_PS,
"All PS CAB frames received, back to sleep\n");
} else if ((sc->ps_flags & PS_WAIT_FOR_PSPOLL_DATA) &&
!is_multicast_ether_addr(hdr->addr1) &&
!ieee80211_has_morefrags(hdr->frame_control)) {
sc->ps_flags &= ~PS_WAIT_FOR_PSPOLL_DATA;
ath_dbg(common, ATH_DBG_PS,
"Going back to sleep after having received PS-Poll data (0x%lx)\n",
sc->ps_flags & (PS_WAIT_FOR_BEACON |
PS_WAIT_FOR_CAB |
PS_WAIT_FOR_PSPOLL_DATA |
PS_WAIT_FOR_TX_ACK));
}
}
static bool ath_edma_get_buffers(struct ath_softc *sc,
enum ath9k_rx_qtype qtype)
{
struct ath_rx_edma *rx_edma = &sc->rx.rx_edma[qtype];
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct sk_buff *skb;
struct ath_buf *bf;
int ret;
skb = skb_peek(&rx_edma->rx_fifo);
if (!skb)
return false;
bf = SKB_CB_ATHBUF(skb);
BUG_ON(!bf);
dma_sync_single_for_cpu(sc->dev, bf->bf_buf_addr,
common->rx_bufsize, DMA_FROM_DEVICE);
ret = ath9k_hw_process_rxdesc_edma(ah, NULL, skb->data);
if (ret == -EINPROGRESS) {
/*let device gain the buffer again*/
dma_sync_single_for_device(sc->dev, bf->bf_buf_addr,
common->rx_bufsize, DMA_FROM_DEVICE);
return false;
}
__skb_unlink(skb, &rx_edma->rx_fifo);
if (ret == -EINVAL) {
/* corrupt descriptor, skip this one and the following one */
list_add_tail(&bf->list, &sc->rx.rxbuf);
ath_rx_edma_buf_link(sc, qtype);
skb = skb_peek(&rx_edma->rx_fifo);
if (!skb)
return true;
bf = SKB_CB_ATHBUF(skb);
BUG_ON(!bf);
__skb_unlink(skb, &rx_edma->rx_fifo);
list_add_tail(&bf->list, &sc->rx.rxbuf);
ath_rx_edma_buf_link(sc, qtype);
return true;
}
skb_queue_tail(&rx_edma->rx_buffers, skb);
return true;
}
static struct ath_buf *ath_edma_get_next_rx_buf(struct ath_softc *sc,
struct ath_rx_status *rs,
enum ath9k_rx_qtype qtype)
{
struct ath_rx_edma *rx_edma = &sc->rx.rx_edma[qtype];
struct sk_buff *skb;
struct ath_buf *bf;
while (ath_edma_get_buffers(sc, qtype));
skb = __skb_dequeue(&rx_edma->rx_buffers);
if (!skb)
return NULL;
bf = SKB_CB_ATHBUF(skb);
ath9k_hw_process_rxdesc_edma(sc->sc_ah, rs, skb->data);
return bf;
}
static struct ath_buf *ath_get_next_rx_buf(struct ath_softc *sc,
struct ath_rx_status *rs)
{
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ath_desc *ds;
struct ath_buf *bf;
int ret;
if (list_empty(&sc->rx.rxbuf)) {
sc->rx.rxlink = NULL;
return NULL;
}
bf = list_first_entry(&sc->rx.rxbuf, struct ath_buf, list);
ds = bf->bf_desc;
/*
* Must provide the virtual address of the current
* descriptor, the physical address, and the virtual
* address of the next descriptor in the h/w chain.
* This allows the HAL to look ahead to see if the
* hardware is done with a descriptor by checking the
* done bit in the following descriptor and the address
* of the current descriptor the DMA engine is working
* on. All this is necessary because of our use of
* a self-linked list to avoid rx overruns.
*/
ret = ath9k_hw_rxprocdesc(ah, ds, rs);
if (ret == -EINPROGRESS) {
struct ath_rx_status trs;
struct ath_buf *tbf;
struct ath_desc *tds;
memset(&trs, 0, sizeof(trs));
if (list_is_last(&bf->list, &sc->rx.rxbuf)) {
sc->rx.rxlink = NULL;
return NULL;
}
tbf = list_entry(bf->list.next, struct ath_buf, list);
/*
* On some hardware the descriptor status words could
* get corrupted, including the done bit. Because of
* this, check if the next descriptor's done bit is
* set or not.
*
* If the next descriptor's done bit is set, the current
* descriptor has been corrupted. Force s/w to discard
* this descriptor and continue...
*/
tds = tbf->bf_desc;
ret = ath9k_hw_rxprocdesc(ah, tds, &trs);
if (ret == -EINPROGRESS)
return NULL;
}
if (!bf->bf_mpdu)
return bf;
/*
* Synchronize the DMA transfer with CPU before
* 1. accessing the frame
* 2. requeueing the same buffer to h/w
*/
dma_sync_single_for_cpu(sc->dev, bf->bf_buf_addr,
common->rx_bufsize,
DMA_FROM_DEVICE);
return bf;
}
/* Assumes you've already done the endian to CPU conversion */
static bool ath9k_rx_accept(struct ath_common *common,
struct ieee80211_hdr *hdr,
struct ieee80211_rx_status *rxs,
struct ath_rx_status *rx_stats,
bool *decrypt_error)
{
struct ath_softc *sc = (struct ath_softc *) common->priv;
bool is_mc, is_valid_tkip, strip_mic, mic_error;
struct ath_hw *ah = common->ah;
__le16 fc;
u8 rx_status_len = ah->caps.rx_status_len;
fc = hdr->frame_control;
is_mc = !!is_multicast_ether_addr(hdr->addr1);
is_valid_tkip = rx_stats->rs_keyix != ATH9K_RXKEYIX_INVALID &&
test_bit(rx_stats->rs_keyix, common->tkip_keymap);
strip_mic = is_valid_tkip && ieee80211_is_data(fc) &&
!(rx_stats->rs_status &
(ATH9K_RXERR_DECRYPT | ATH9K_RXERR_CRC | ATH9K_RXERR_MIC |
ATH9K_RXERR_KEYMISS));
if (!rx_stats->rs_datalen)
return false;
/*
* rs_status follows rs_datalen so if rs_datalen is too large
* we can take a hint that hardware corrupted it, so ignore
* those frames.
*/
if (rx_stats->rs_datalen > (common->rx_bufsize - rx_status_len))
return false;
/* Only use error bits from the last fragment */
if (rx_stats->rs_more)
return true;
mic_error = is_valid_tkip && !ieee80211_is_ctl(fc) &&
!ieee80211_has_morefrags(fc) &&
!(le16_to_cpu(hdr->seq_ctrl) & IEEE80211_SCTL_FRAG) &&
(rx_stats->rs_status & ATH9K_RXERR_MIC);
/*
* The rx_stats->rs_status will not be set until the end of the
* chained descriptors so it can be ignored if rs_more is set. The
* rs_more will be false at the last element of the chained
* descriptors.
*/
if (rx_stats->rs_status != 0) {
u8 status_mask;
if (rx_stats->rs_status & ATH9K_RXERR_CRC) {
rxs->flag |= RX_FLAG_FAILED_FCS_CRC;
mic_error = false;
}
if (rx_stats->rs_status & ATH9K_RXERR_PHY)
return false;
if ((rx_stats->rs_status & ATH9K_RXERR_DECRYPT) ||
(!is_mc && (rx_stats->rs_status & ATH9K_RXERR_KEYMISS))) {
*decrypt_error = true;
mic_error = false;
}
/*
* Reject error frames with the exception of
* decryption and MIC failures. For monitor mode,
* we also ignore the CRC error.
*/
status_mask = ATH9K_RXERR_DECRYPT | ATH9K_RXERR_MIC |
ATH9K_RXERR_KEYMISS;
if (ah->is_monitoring && (sc->rx.rxfilter & FIF_FCSFAIL))
status_mask |= ATH9K_RXERR_CRC;
if (rx_stats->rs_status & ~status_mask)
return false;
}
/*
* For unicast frames the MIC error bit can have false positives,
* so all MIC error reports need to be validated in software.
* False negatives are not common, so skip software verification
* if the hardware considers the MIC valid.
*/
if (strip_mic)
rxs->flag |= RX_FLAG_MMIC_STRIPPED;
else if (is_mc && mic_error)
rxs->flag |= RX_FLAG_MMIC_ERROR;
return true;
}
static int ath9k_process_rate(struct ath_common *common,
struct ieee80211_hw *hw,
struct ath_rx_status *rx_stats,
struct ieee80211_rx_status *rxs)
{
struct ieee80211_supported_band *sband;
enum ieee80211_band band;
unsigned int i = 0;
band = hw->conf.channel->band;
sband = hw->wiphy->bands[band];
if (rx_stats->rs_rate & 0x80) {
/* HT rate */
rxs->flag |= RX_FLAG_HT;
if (rx_stats->rs_flags & ATH9K_RX_2040)
rxs->flag |= RX_FLAG_40MHZ;
if (rx_stats->rs_flags & ATH9K_RX_GI)
rxs->flag |= RX_FLAG_SHORT_GI;
rxs->rate_idx = rx_stats->rs_rate & 0x7f;
return 0;
}
for (i = 0; i < sband->n_bitrates; i++) {
if (sband->bitrates[i].hw_value == rx_stats->rs_rate) {
rxs->rate_idx = i;
return 0;
}
if (sband->bitrates[i].hw_value_short == rx_stats->rs_rate) {
rxs->flag |= RX_FLAG_SHORTPRE;
rxs->rate_idx = i;
return 0;
}
}
/*
* No valid hardware bitrate found -- we should not get here
* because hardware has already validated this frame as OK.
*/
ath_dbg(common, ATH_DBG_ANY,
"unsupported hw bitrate detected 0x%02x using 1 Mbit\n",
rx_stats->rs_rate);
return -EINVAL;
}
static void ath9k_process_rssi(struct ath_common *common,
struct ieee80211_hw *hw,
struct ieee80211_hdr *hdr,
struct ath_rx_status *rx_stats)
{
struct ath_softc *sc = hw->priv;
struct ath_hw *ah = common->ah;
int last_rssi;
if (!rx_stats->is_mybeacon ||
((ah->opmode != NL80211_IFTYPE_STATION) &&
(ah->opmode != NL80211_IFTYPE_ADHOC)))
return;
if (rx_stats->rs_rssi != ATH9K_RSSI_BAD && !rx_stats->rs_moreaggr)
ATH_RSSI_LPF(sc->last_rssi, rx_stats->rs_rssi);
last_rssi = sc->last_rssi;
if (likely(last_rssi != ATH_RSSI_DUMMY_MARKER))
rx_stats->rs_rssi = ATH_EP_RND(last_rssi,
ATH_RSSI_EP_MULTIPLIER);
if (rx_stats->rs_rssi < 0)
rx_stats->rs_rssi = 0;
/* Update Beacon RSSI, this is used by ANI. */
ah->stats.avgbrssi = rx_stats->rs_rssi;
}
/*
* For Decrypt or Demic errors, we only mark packet status here and always push
* up the frame up to let mac80211 handle the actual error case, be it no
* decryption key or real decryption error. This let us keep statistics there.
*/
static int ath9k_rx_skb_preprocess(struct ath_common *common,
struct ieee80211_hw *hw,
struct ieee80211_hdr *hdr,
struct ath_rx_status *rx_stats,
struct ieee80211_rx_status *rx_status,
bool *decrypt_error)
{
struct ath_hw *ah = common->ah;
memset(rx_status, 0, sizeof(struct ieee80211_rx_status));
/*
* everything but the rate is checked here, the rate check is done
* separately to avoid doing two lookups for a rate for each frame.
*/
if (!ath9k_rx_accept(common, hdr, rx_status, rx_stats, decrypt_error))
return -EINVAL;
/* Only use status info from the last fragment */
if (rx_stats->rs_more)
return 0;
ath9k_process_rssi(common, hw, hdr, rx_stats);
if (ath9k_process_rate(common, hw, rx_stats, rx_status))
return -EINVAL;
rx_status->band = hw->conf.channel->band;
rx_status->freq = hw->conf.channel->center_freq;
rx_status->signal = ah->noise + rx_stats->rs_rssi;
rx_status->antenna = rx_stats->rs_antenna;
rx_status->flag |= RX_FLAG_MACTIME_MPDU;
return 0;
}
static void ath9k_rx_skb_postprocess(struct ath_common *common,
struct sk_buff *skb,
struct ath_rx_status *rx_stats,
struct ieee80211_rx_status *rxs,
bool decrypt_error)
{
struct ath_hw *ah = common->ah;
struct ieee80211_hdr *hdr;
int hdrlen, padpos, padsize;
u8 keyix;
__le16 fc;
/* see if any padding is done by the hw and remove it */
hdr = (struct ieee80211_hdr *) skb->data;
hdrlen = ieee80211_get_hdrlen_from_skb(skb);
fc = hdr->frame_control;
padpos = ath9k_cmn_padpos(hdr->frame_control);
/* The MAC header is padded to have 32-bit boundary if the
* packet payload is non-zero. The general calculation for
* padsize would take into account odd header lengths:
* padsize = (4 - padpos % 4) % 4; However, since only
* even-length headers are used, padding can only be 0 or 2
* bytes and we can optimize this a bit. In addition, we must
* not try to remove padding from short control frames that do
* not have payload. */
padsize = padpos & 3;
if (padsize && skb->len>=padpos+padsize+FCS_LEN) {
memmove(skb->data + padsize, skb->data, padpos);
skb_pull(skb, padsize);
}
keyix = rx_stats->rs_keyix;
if (!(keyix == ATH9K_RXKEYIX_INVALID) && !decrypt_error &&
ieee80211_has_protected(fc)) {
rxs->flag |= RX_FLAG_DECRYPTED;
} else if (ieee80211_has_protected(fc)
&& !decrypt_error && skb->len >= hdrlen + 4) {
keyix = skb->data[hdrlen + 3] >> 6;
if (test_bit(keyix, common->keymap))
rxs->flag |= RX_FLAG_DECRYPTED;
}
if (ah->sw_mgmt_crypto &&
(rxs->flag & RX_FLAG_DECRYPTED) &&
ieee80211_is_mgmt(fc))
/* Use software decrypt for management frames. */
rxs->flag &= ~RX_FLAG_DECRYPTED;
}
static void ath_lnaconf_alt_good_scan(struct ath_ant_comb *antcomb,
struct ath_hw_antcomb_conf ant_conf,
int main_rssi_avg)
{
antcomb->quick_scan_cnt = 0;
if (ant_conf.main_lna_conf == ATH_ANT_DIV_COMB_LNA2)
antcomb->rssi_lna2 = main_rssi_avg;
else if (ant_conf.main_lna_conf == ATH_ANT_DIV_COMB_LNA1)
antcomb->rssi_lna1 = main_rssi_avg;
switch ((ant_conf.main_lna_conf << 4) | ant_conf.alt_lna_conf) {
case 0x10: /* LNA2 A-B */
antcomb->main_conf = ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
antcomb->first_quick_scan_conf =
ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
antcomb->second_quick_scan_conf = ATH_ANT_DIV_COMB_LNA1;
break;
case 0x20: /* LNA1 A-B */
antcomb->main_conf = ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
antcomb->first_quick_scan_conf =
ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
antcomb->second_quick_scan_conf = ATH_ANT_DIV_COMB_LNA2;
break;
case 0x21: /* LNA1 LNA2 */
antcomb->main_conf = ATH_ANT_DIV_COMB_LNA2;
antcomb->first_quick_scan_conf =
ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
antcomb->second_quick_scan_conf =
ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
break;
case 0x12: /* LNA2 LNA1 */
antcomb->main_conf = ATH_ANT_DIV_COMB_LNA1;
antcomb->first_quick_scan_conf =
ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
antcomb->second_quick_scan_conf =
ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
break;
case 0x13: /* LNA2 A+B */
antcomb->main_conf = ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
antcomb->first_quick_scan_conf =
ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
antcomb->second_quick_scan_conf = ATH_ANT_DIV_COMB_LNA1;
break;
case 0x23: /* LNA1 A+B */
antcomb->main_conf = ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
antcomb->first_quick_scan_conf =
ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
antcomb->second_quick_scan_conf = ATH_ANT_DIV_COMB_LNA2;
break;
default:
break;
}
}
static void ath_select_ant_div_from_quick_scan(struct ath_ant_comb *antcomb,
struct ath_hw_antcomb_conf *div_ant_conf,
int main_rssi_avg, int alt_rssi_avg,
int alt_ratio)
{
/* alt_good */
switch (antcomb->quick_scan_cnt) {
case 0:
/* set alt to main, and alt to first conf */
div_ant_conf->main_lna_conf = antcomb->main_conf;
div_ant_conf->alt_lna_conf = antcomb->first_quick_scan_conf;
break;
case 1:
/* set alt to main, and alt to first conf */
div_ant_conf->main_lna_conf = antcomb->main_conf;
div_ant_conf->alt_lna_conf = antcomb->second_quick_scan_conf;
antcomb->rssi_first = main_rssi_avg;
antcomb->rssi_second = alt_rssi_avg;
if (antcomb->main_conf == ATH_ANT_DIV_COMB_LNA1) {
/* main is LNA1 */
if (ath_is_alt_ant_ratio_better(alt_ratio,
ATH_ANT_DIV_COMB_LNA1_DELTA_HI,
ATH_ANT_DIV_COMB_LNA1_DELTA_LOW,
main_rssi_avg, alt_rssi_avg,
antcomb->total_pkt_count))
antcomb->first_ratio = true;
else
antcomb->first_ratio = false;
} else if (antcomb->main_conf == ATH_ANT_DIV_COMB_LNA2) {
if (ath_is_alt_ant_ratio_better(alt_ratio,
ATH_ANT_DIV_COMB_LNA1_DELTA_MID,
ATH_ANT_DIV_COMB_LNA1_DELTA_LOW,
main_rssi_avg, alt_rssi_avg,
antcomb->total_pkt_count))
antcomb->first_ratio = true;
else
antcomb->first_ratio = false;
} else {
if ((((alt_ratio >= ATH_ANT_DIV_COMB_ALT_ANT_RATIO2) &&
(alt_rssi_avg > main_rssi_avg +
ATH_ANT_DIV_COMB_LNA1_DELTA_HI)) ||
(alt_rssi_avg > main_rssi_avg)) &&
(antcomb->total_pkt_count > 50))
antcomb->first_ratio = true;
else
antcomb->first_ratio = false;
}
break;
case 2:
antcomb->alt_good = false;
antcomb->scan_not_start = false;
antcomb->scan = false;
antcomb->rssi_first = main_rssi_avg;
antcomb->rssi_third = alt_rssi_avg;
if (antcomb->second_quick_scan_conf == ATH_ANT_DIV_COMB_LNA1)
antcomb->rssi_lna1 = alt_rssi_avg;
else if (antcomb->second_quick_scan_conf ==
ATH_ANT_DIV_COMB_LNA2)
antcomb->rssi_lna2 = alt_rssi_avg;
else if (antcomb->second_quick_scan_conf ==
ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2) {
if (antcomb->main_conf == ATH_ANT_DIV_COMB_LNA2)
antcomb->rssi_lna2 = main_rssi_avg;
else if (antcomb->main_conf == ATH_ANT_DIV_COMB_LNA1)
antcomb->rssi_lna1 = main_rssi_avg;
}
if (antcomb->rssi_lna2 > antcomb->rssi_lna1 +
ATH_ANT_DIV_COMB_LNA1_LNA2_SWITCH_DELTA)
div_ant_conf->main_lna_conf = ATH_ANT_DIV_COMB_LNA2;
else
div_ant_conf->main_lna_conf = ATH_ANT_DIV_COMB_LNA1;
if (antcomb->main_conf == ATH_ANT_DIV_COMB_LNA1) {
if (ath_is_alt_ant_ratio_better(alt_ratio,
ATH_ANT_DIV_COMB_LNA1_DELTA_HI,
ATH_ANT_DIV_COMB_LNA1_DELTA_LOW,
main_rssi_avg, alt_rssi_avg,
antcomb->total_pkt_count))
antcomb->second_ratio = true;
else
antcomb->second_ratio = false;
} else if (antcomb->main_conf == ATH_ANT_DIV_COMB_LNA2) {
if (ath_is_alt_ant_ratio_better(alt_ratio,
ATH_ANT_DIV_COMB_LNA1_DELTA_MID,
ATH_ANT_DIV_COMB_LNA1_DELTA_LOW,
main_rssi_avg, alt_rssi_avg,
antcomb->total_pkt_count))
antcomb->second_ratio = true;
else
antcomb->second_ratio = false;
} else {
if ((((alt_ratio >= ATH_ANT_DIV_COMB_ALT_ANT_RATIO2) &&
(alt_rssi_avg > main_rssi_avg +
ATH_ANT_DIV_COMB_LNA1_DELTA_HI)) ||
(alt_rssi_avg > main_rssi_avg)) &&
(antcomb->total_pkt_count > 50))
antcomb->second_ratio = true;
else
antcomb->second_ratio = false;
}
/* set alt to the conf with maximun ratio */
if (antcomb->first_ratio && antcomb->second_ratio) {
if (antcomb->rssi_second > antcomb->rssi_third) {
/* first alt*/
if ((antcomb->first_quick_scan_conf ==
ATH_ANT_DIV_COMB_LNA1) ||
(antcomb->first_quick_scan_conf ==
ATH_ANT_DIV_COMB_LNA2))
/* Set alt LNA1 or LNA2*/
if (div_ant_conf->main_lna_conf ==
ATH_ANT_DIV_COMB_LNA2)
div_ant_conf->alt_lna_conf =
ATH_ANT_DIV_COMB_LNA1;
else
div_ant_conf->alt_lna_conf =
ATH_ANT_DIV_COMB_LNA2;
else
/* Set alt to A+B or A-B */
div_ant_conf->alt_lna_conf =
antcomb->first_quick_scan_conf;
} else if ((antcomb->second_quick_scan_conf ==
ATH_ANT_DIV_COMB_LNA1) ||
(antcomb->second_quick_scan_conf ==
ATH_ANT_DIV_COMB_LNA2)) {
/* Set alt LNA1 or LNA2 */
if (div_ant_conf->main_lna_conf ==
ATH_ANT_DIV_COMB_LNA2)
div_ant_conf->alt_lna_conf =
ATH_ANT_DIV_COMB_LNA1;
else
div_ant_conf->alt_lna_conf =
ATH_ANT_DIV_COMB_LNA2;
} else {
/* Set alt to A+B or A-B */
div_ant_conf->alt_lna_conf =
antcomb->second_quick_scan_conf;
}
} else if (antcomb->first_ratio) {
/* first alt */
if ((antcomb->first_quick_scan_conf ==
ATH_ANT_DIV_COMB_LNA1) ||
(antcomb->first_quick_scan_conf ==
ATH_ANT_DIV_COMB_LNA2))
/* Set alt LNA1 or LNA2 */
if (div_ant_conf->main_lna_conf ==
ATH_ANT_DIV_COMB_LNA2)
div_ant_conf->alt_lna_conf =
ATH_ANT_DIV_COMB_LNA1;
else
div_ant_conf->alt_lna_conf =
ATH_ANT_DIV_COMB_LNA2;
else
/* Set alt to A+B or A-B */
div_ant_conf->alt_lna_conf =
antcomb->first_quick_scan_conf;
} else if (antcomb->second_ratio) {
/* second alt */
if ((antcomb->second_quick_scan_conf ==
ATH_ANT_DIV_COMB_LNA1) ||
(antcomb->second_quick_scan_conf ==
ATH_ANT_DIV_COMB_LNA2))
/* Set alt LNA1 or LNA2 */
if (div_ant_conf->main_lna_conf ==
ATH_ANT_DIV_COMB_LNA2)
div_ant_conf->alt_lna_conf =
ATH_ANT_DIV_COMB_LNA1;
else
div_ant_conf->alt_lna_conf =
ATH_ANT_DIV_COMB_LNA2;
else
/* Set alt to A+B or A-B */
div_ant_conf->alt_lna_conf =
antcomb->second_quick_scan_conf;
} else {
/* main is largest */
if ((antcomb->main_conf == ATH_ANT_DIV_COMB_LNA1) ||
(antcomb->main_conf == ATH_ANT_DIV_COMB_LNA2))
/* Set alt LNA1 or LNA2 */
if (div_ant_conf->main_lna_conf ==
ATH_ANT_DIV_COMB_LNA2)
div_ant_conf->alt_lna_conf =
ATH_ANT_DIV_COMB_LNA1;
else
div_ant_conf->alt_lna_conf =
ATH_ANT_DIV_COMB_LNA2;
else
/* Set alt to A+B or A-B */
div_ant_conf->alt_lna_conf = antcomb->main_conf;
}
break;
default:
break;
}
}
static void ath_ant_div_conf_fast_divbias(struct ath_hw_antcomb_conf *ant_conf,
struct ath_ant_comb *antcomb, int alt_ratio)
{
if (ant_conf->div_group == 0) {
/* Adjust the fast_div_bias based on main and alt lna conf */
switch ((ant_conf->main_lna_conf << 4) |
ant_conf->alt_lna_conf) {
case 0x01: /* A-B LNA2 */
ant_conf->fast_div_bias = 0x3b;
break;
case 0x02: /* A-B LNA1 */
ant_conf->fast_div_bias = 0x3d;
break;
case 0x03: /* A-B A+B */
ant_conf->fast_div_bias = 0x1;
break;
case 0x10: /* LNA2 A-B */
ant_conf->fast_div_bias = 0x7;
break;
case 0x12: /* LNA2 LNA1 */
ant_conf->fast_div_bias = 0x2;
break;
case 0x13: /* LNA2 A+B */
ant_conf->fast_div_bias = 0x7;
break;
case 0x20: /* LNA1 A-B */
ant_conf->fast_div_bias = 0x6;
break;
case 0x21: /* LNA1 LNA2 */
ant_conf->fast_div_bias = 0x0;
break;
case 0x23: /* LNA1 A+B */
ant_conf->fast_div_bias = 0x6;
break;
case 0x30: /* A+B A-B */
ant_conf->fast_div_bias = 0x1;
break;
case 0x31: /* A+B LNA2 */
ant_conf->fast_div_bias = 0x3b;
break;
case 0x32: /* A+B LNA1 */
ant_conf->fast_div_bias = 0x3d;
break;
default:
break;
}
} else if (ant_conf->div_group == 1) {
/* Adjust the fast_div_bias based on main and alt_lna_conf */
switch ((ant_conf->main_lna_conf << 4) |
ant_conf->alt_lna_conf) {
case 0x01: /* A-B LNA2 */
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x02: /* A-B LNA1 */
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x03: /* A-B A+B */
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x10: /* LNA2 A-B */
if (!(antcomb->scan) &&
(alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO))
ant_conf->fast_div_bias = 0x3f;
else
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x12: /* LNA2 LNA1 */
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x13: /* LNA2 A+B */
if (!(antcomb->scan) &&
(alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO))
ant_conf->fast_div_bias = 0x3f;
else
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x20: /* LNA1 A-B */
if (!(antcomb->scan) &&
(alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO))
ant_conf->fast_div_bias = 0x3f;
else
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x21: /* LNA1 LNA2 */
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x23: /* LNA1 A+B */
if (!(antcomb->scan) &&
(alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO))
ant_conf->fast_div_bias = 0x3f;
else
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x30: /* A+B A-B */
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x31: /* A+B LNA2 */
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x32: /* A+B LNA1 */
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
default:
break;
}
} else if (ant_conf->div_group == 2) {
/* Adjust the fast_div_bias based on main and alt_lna_conf */
switch ((ant_conf->main_lna_conf << 4) |
ant_conf->alt_lna_conf) {
case 0x01: /* A-B LNA2 */
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x02: /* A-B LNA1 */
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x03: /* A-B A+B */
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x10: /* LNA2 A-B */
if (!(antcomb->scan) &&
(alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO))
ant_conf->fast_div_bias = 0x1;
else
ant_conf->fast_div_bias = 0x2;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x12: /* LNA2 LNA1 */
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x13: /* LNA2 A+B */
if (!(antcomb->scan) &&
(alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO))
ant_conf->fast_div_bias = 0x1;
else
ant_conf->fast_div_bias = 0x2;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x20: /* LNA1 A-B */
if (!(antcomb->scan) &&
(alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO))
ant_conf->fast_div_bias = 0x1;
else
ant_conf->fast_div_bias = 0x2;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x21: /* LNA1 LNA2 */
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x23: /* LNA1 A+B */
if (!(antcomb->scan) &&
(alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO))
ant_conf->fast_div_bias = 0x1;
else
ant_conf->fast_div_bias = 0x2;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x30: /* A+B A-B */
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x31: /* A+B LNA2 */
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
case 0x32: /* A+B LNA1 */
ant_conf->fast_div_bias = 0x1;
ant_conf->main_gaintb = 0;
ant_conf->alt_gaintb = 0;
break;
default:
break;
}
}
}
/* Antenna diversity and combining */
static void ath_ant_comb_scan(struct ath_softc *sc, struct ath_rx_status *rs)
{
struct ath_hw_antcomb_conf div_ant_conf;
struct ath_ant_comb *antcomb = &sc->ant_comb;
int alt_ratio = 0, alt_rssi_avg = 0, main_rssi_avg = 0, curr_alt_set;
int curr_main_set;
int main_rssi = rs->rs_rssi_ctl0;
int alt_rssi = rs->rs_rssi_ctl1;
int rx_ant_conf, main_ant_conf;
bool short_scan = false;
rx_ant_conf = (rs->rs_rssi_ctl2 >> ATH_ANT_RX_CURRENT_SHIFT) &
ATH_ANT_RX_MASK;
main_ant_conf = (rs->rs_rssi_ctl2 >> ATH_ANT_RX_MAIN_SHIFT) &
ATH_ANT_RX_MASK;
/* Record packet only when both main_rssi and alt_rssi is positive */
if (main_rssi > 0 && alt_rssi > 0) {
antcomb->total_pkt_count++;
antcomb->main_total_rssi += main_rssi;
antcomb->alt_total_rssi += alt_rssi;
if (main_ant_conf == rx_ant_conf)
antcomb->main_recv_cnt++;
else
antcomb->alt_recv_cnt++;
}
/* Short scan check */
if (antcomb->scan && antcomb->alt_good) {
if (time_after(jiffies, antcomb->scan_start_time +
msecs_to_jiffies(ATH_ANT_DIV_COMB_SHORT_SCAN_INTR)))
short_scan = true;
else
if (antcomb->total_pkt_count ==
ATH_ANT_DIV_COMB_SHORT_SCAN_PKTCOUNT) {
alt_ratio = ((antcomb->alt_recv_cnt * 100) /
antcomb->total_pkt_count);
if (alt_ratio < ATH_ANT_DIV_COMB_ALT_ANT_RATIO)
short_scan = true;
}
}
if (((antcomb->total_pkt_count < ATH_ANT_DIV_COMB_MAX_PKTCOUNT) ||
rs->rs_moreaggr) && !short_scan)
return;
if (antcomb->total_pkt_count) {
alt_ratio = ((antcomb->alt_recv_cnt * 100) /
antcomb->total_pkt_count);
main_rssi_avg = (antcomb->main_total_rssi /
antcomb->total_pkt_count);
alt_rssi_avg = (antcomb->alt_total_rssi /
antcomb->total_pkt_count);
}
ath9k_hw_antdiv_comb_conf_get(sc->sc_ah, &div_ant_conf);
curr_alt_set = div_ant_conf.alt_lna_conf;
curr_main_set = div_ant_conf.main_lna_conf;
antcomb->count++;
if (antcomb->count == ATH_ANT_DIV_COMB_MAX_COUNT) {
if (alt_ratio > ATH_ANT_DIV_COMB_ALT_ANT_RATIO) {
ath_lnaconf_alt_good_scan(antcomb, div_ant_conf,
main_rssi_avg);
antcomb->alt_good = true;
} else {
antcomb->alt_good = false;
}
antcomb->count = 0;
antcomb->scan = true;
antcomb->scan_not_start = true;
}
if (!antcomb->scan) {
if (ath_ant_div_comb_alt_check(div_ant_conf.div_group,
alt_ratio, curr_main_set, curr_alt_set,
alt_rssi_avg, main_rssi_avg)) {
if (curr_alt_set == ATH_ANT_DIV_COMB_LNA2) {
/* Switch main and alt LNA */
div_ant_conf.main_lna_conf =
ATH_ANT_DIV_COMB_LNA2;
div_ant_conf.alt_lna_conf =
ATH_ANT_DIV_COMB_LNA1;
} else if (curr_alt_set == ATH_ANT_DIV_COMB_LNA1) {
div_ant_conf.main_lna_conf =
ATH_ANT_DIV_COMB_LNA1;
div_ant_conf.alt_lna_conf =
ATH_ANT_DIV_COMB_LNA2;
}
goto div_comb_done;
} else if ((curr_alt_set != ATH_ANT_DIV_COMB_LNA1) &&
(curr_alt_set != ATH_ANT_DIV_COMB_LNA2)) {
/* Set alt to another LNA */
if (curr_main_set == ATH_ANT_DIV_COMB_LNA2)
div_ant_conf.alt_lna_conf =
ATH_ANT_DIV_COMB_LNA1;
else if (curr_main_set == ATH_ANT_DIV_COMB_LNA1)
div_ant_conf.alt_lna_conf =
ATH_ANT_DIV_COMB_LNA2;
goto div_comb_done;
}
if ((alt_rssi_avg < (main_rssi_avg +
div_ant_conf.lna1_lna2_delta)))
goto div_comb_done;
}
if (!antcomb->scan_not_start) {
switch (curr_alt_set) {
case ATH_ANT_DIV_COMB_LNA2:
antcomb->rssi_lna2 = alt_rssi_avg;
antcomb->rssi_lna1 = main_rssi_avg;
antcomb->scan = true;
/* set to A+B */
div_ant_conf.main_lna_conf =
ATH_ANT_DIV_COMB_LNA1;
div_ant_conf.alt_lna_conf =
ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
break;
case ATH_ANT_DIV_COMB_LNA1:
antcomb->rssi_lna1 = alt_rssi_avg;
antcomb->rssi_lna2 = main_rssi_avg;
antcomb->scan = true;
/* set to A+B */
div_ant_conf.main_lna_conf = ATH_ANT_DIV_COMB_LNA2;
div_ant_conf.alt_lna_conf =
ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
break;
case ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2:
antcomb->rssi_add = alt_rssi_avg;
antcomb->scan = true;
/* set to A-B */
div_ant_conf.alt_lna_conf =
ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
break;
case ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2:
antcomb->rssi_sub = alt_rssi_avg;
antcomb->scan = false;
if (antcomb->rssi_lna2 >
(antcomb->rssi_lna1 +
ATH_ANT_DIV_COMB_LNA1_LNA2_SWITCH_DELTA)) {
/* use LNA2 as main LNA */
if ((antcomb->rssi_add > antcomb->rssi_lna1) &&
(antcomb->rssi_add > antcomb->rssi_sub)) {
/* set to A+B */
div_ant_conf.main_lna_conf =
ATH_ANT_DIV_COMB_LNA2;
div_ant_conf.alt_lna_conf =
ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
} else if (antcomb->rssi_sub >
antcomb->rssi_lna1) {
/* set to A-B */
div_ant_conf.main_lna_conf =
ATH_ANT_DIV_COMB_LNA2;
div_ant_conf.alt_lna_conf =
ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
} else {
/* set to LNA1 */
div_ant_conf.main_lna_conf =
ATH_ANT_DIV_COMB_LNA2;
div_ant_conf.alt_lna_conf =
ATH_ANT_DIV_COMB_LNA1;
}
} else {
/* use LNA1 as main LNA */
if ((antcomb->rssi_add > antcomb->rssi_lna2) &&
(antcomb->rssi_add > antcomb->rssi_sub)) {
/* set to A+B */
div_ant_conf.main_lna_conf =
ATH_ANT_DIV_COMB_LNA1;
div_ant_conf.alt_lna_conf =
ATH_ANT_DIV_COMB_LNA1_PLUS_LNA2;
} else if (antcomb->rssi_sub >
antcomb->rssi_lna1) {
/* set to A-B */
div_ant_conf.main_lna_conf =
ATH_ANT_DIV_COMB_LNA1;
div_ant_conf.alt_lna_conf =
ATH_ANT_DIV_COMB_LNA1_MINUS_LNA2;
} else {
/* set to LNA2 */
div_ant_conf.main_lna_conf =
ATH_ANT_DIV_COMB_LNA1;
div_ant_conf.alt_lna_conf =
ATH_ANT_DIV_COMB_LNA2;
}
}
break;
default:
break;
}
} else {
if (!antcomb->alt_good) {
antcomb->scan_not_start = false;
/* Set alt to another LNA */
if (curr_main_set == ATH_ANT_DIV_COMB_LNA2) {
div_ant_conf.main_lna_conf =
ATH_ANT_DIV_COMB_LNA2;
div_ant_conf.alt_lna_conf =
ATH_ANT_DIV_COMB_LNA1;
} else if (curr_main_set == ATH_ANT_DIV_COMB_LNA1) {
div_ant_conf.main_lna_conf =
ATH_ANT_DIV_COMB_LNA1;
div_ant_conf.alt_lna_conf =
ATH_ANT_DIV_COMB_LNA2;
}
goto div_comb_done;
}
}
ath_select_ant_div_from_quick_scan(antcomb, &div_ant_conf,
main_rssi_avg, alt_rssi_avg,
alt_ratio);
antcomb->quick_scan_cnt++;
div_comb_done:
ath_ant_div_conf_fast_divbias(&div_ant_conf, antcomb, alt_ratio);
ath9k_hw_antdiv_comb_conf_set(sc->sc_ah, &div_ant_conf);
antcomb->scan_start_time = jiffies;
antcomb->total_pkt_count = 0;
antcomb->main_total_rssi = 0;
antcomb->alt_total_rssi = 0;
antcomb->main_recv_cnt = 0;
antcomb->alt_recv_cnt = 0;
}
int ath_rx_tasklet(struct ath_softc *sc, int flush, bool hp)
{
struct ath_buf *bf;
struct sk_buff *skb = NULL, *requeue_skb, *hdr_skb;
struct ieee80211_rx_status *rxs;
struct ath_hw *ah = sc->sc_ah;
struct ath_common *common = ath9k_hw_common(ah);
struct ieee80211_hw *hw = sc->hw;
struct ieee80211_hdr *hdr;
int retval;
struct ath_rx_status rs;
enum ath9k_rx_qtype qtype;
bool edma = !!(ah->caps.hw_caps & ATH9K_HW_CAP_EDMA);
int dma_type;
u8 rx_status_len = ah->caps.rx_status_len;
u64 tsf = 0;
u32 tsf_lower = 0;
unsigned long flags;
if (edma)
dma_type = DMA_BIDIRECTIONAL;
else
dma_type = DMA_FROM_DEVICE;
qtype = hp ? ATH9K_RX_QUEUE_HP : ATH9K_RX_QUEUE_LP;
spin_lock_bh(&sc->rx.rxbuflock);
tsf = ath9k_hw_gettsf64(ah);
tsf_lower = tsf & 0xffffffff;
do {
bool decrypt_error = false;
/* If handling rx interrupt and flush is in progress => exit */
if ((sc->sc_flags & SC_OP_RXFLUSH) && (flush == 0))
break;
memset(&rs, 0, sizeof(rs));
if (edma)
bf = ath_edma_get_next_rx_buf(sc, &rs, qtype);
else
bf = ath_get_next_rx_buf(sc, &rs);
if (!bf)
break;
skb = bf->bf_mpdu;
if (!skb)
continue;
/*
* Take frame header from the first fragment and RX status from
* the last one.
*/
if (sc->rx.frag)
hdr_skb = sc->rx.frag;
else
hdr_skb = skb;
hdr = (struct ieee80211_hdr *) (hdr_skb->data + rx_status_len);
rxs = IEEE80211_SKB_RXCB(hdr_skb);
if (ieee80211_is_beacon(hdr->frame_control) &&
!compare_ether_addr(hdr->addr3, common->curbssid))
rs.is_mybeacon = true;
else
rs.is_mybeacon = false;
ath_debug_stat_rx(sc, &rs);
/*
* If we're asked to flush receive queue, directly
* chain it back at the queue without processing it.
*/
if (sc->sc_flags & SC_OP_RXFLUSH)
goto requeue_drop_frag;
retval = ath9k_rx_skb_preprocess(common, hw, hdr, &rs,
rxs, &decrypt_error);
if (retval)
goto requeue_drop_frag;
rxs->mactime = (tsf & ~0xffffffffULL) | rs.rs_tstamp;
if (rs.rs_tstamp > tsf_lower &&
unlikely(rs.rs_tstamp - tsf_lower > 0x10000000))
rxs->mactime -= 0x100000000ULL;
if (rs.rs_tstamp < tsf_lower &&
unlikely(tsf_lower - rs.rs_tstamp > 0x10000000))
rxs->mactime += 0x100000000ULL;
/* Ensure we always have an skb to requeue once we are done
* processing the current buffer's skb */
requeue_skb = ath_rxbuf_alloc(common, common->rx_bufsize, GFP_ATOMIC);
/* If there is no memory we ignore the current RX'd frame,
* tell hardware it can give us a new frame using the old
* skb and put it at the tail of the sc->rx.rxbuf list for
* processing. */
if (!requeue_skb)
goto requeue_drop_frag;
/* Unmap the frame */
dma_unmap_single(sc->dev, bf->bf_buf_addr,
common->rx_bufsize,
dma_type);
skb_put(skb, rs.rs_datalen + ah->caps.rx_status_len);
if (ah->caps.rx_status_len)
skb_pull(skb, ah->caps.rx_status_len);
if (!rs.rs_more)
ath9k_rx_skb_postprocess(common, hdr_skb, &rs,
rxs, decrypt_error);
/* We will now give hardware our shiny new allocated skb */
bf->bf_mpdu = requeue_skb;
bf->bf_buf_addr = dma_map_single(sc->dev, requeue_skb->data,
common->rx_bufsize,
dma_type);
if (unlikely(dma_mapping_error(sc->dev,
bf->bf_buf_addr))) {
dev_kfree_skb_any(requeue_skb);
bf->bf_mpdu = NULL;
bf->bf_buf_addr = 0;
ath_err(common, "dma_mapping_error() on RX\n");
ieee80211_rx(hw, skb);
break;
}
if (rs.rs_more) {
/*
* rs_more indicates chained descriptors which can be
* used to link buffers together for a sort of
* scatter-gather operation.
*/
if (sc->rx.frag) {
/* too many fragments - cannot handle frame */
dev_kfree_skb_any(sc->rx.frag);
dev_kfree_skb_any(skb);
skb = NULL;
}
sc->rx.frag = skb;
goto requeue;
}
if (sc->rx.frag) {
int space = skb->len - skb_tailroom(hdr_skb);
sc->rx.frag = NULL;
if (pskb_expand_head(hdr_skb, 0, space, GFP_ATOMIC) < 0) {
dev_kfree_skb(skb);
goto requeue_drop_frag;
}
skb_copy_from_linear_data(skb, skb_put(hdr_skb, skb->len),
skb->len);
dev_kfree_skb_any(skb);
skb = hdr_skb;
}
/*
* change the default rx antenna if rx diversity chooses the
* other antenna 3 times in a row.
*/
if (sc->rx.defant != rs.rs_antenna) {
if (++sc->rx.rxotherant >= 3)
ath_setdefantenna(sc, rs.rs_antenna);
} else {
sc->rx.rxotherant = 0;
}
if (rxs->flag & RX_FLAG_MMIC_STRIPPED)
skb_trim(skb, skb->len - 8);
spin_lock_irqsave(&sc->sc_pm_lock, flags);
if ((sc->ps_flags & (PS_WAIT_FOR_BEACON |
PS_WAIT_FOR_CAB |
PS_WAIT_FOR_PSPOLL_DATA)) ||
ath9k_check_auto_sleep(sc))
ath_rx_ps(sc, skb, rs.is_mybeacon);
spin_unlock_irqrestore(&sc->sc_pm_lock, flags);
if ((ah->caps.hw_caps & ATH9K_HW_CAP_ANT_DIV_COMB) && sc->ant_rx == 3)
ath_ant_comb_scan(sc, &rs);
ieee80211_rx(hw, skb);
requeue_drop_frag:
if (sc->rx.frag) {
dev_kfree_skb_any(sc->rx.frag);
sc->rx.frag = NULL;
}
requeue:
if (edma) {
list_add_tail(&bf->list, &sc->rx.rxbuf);
ath_rx_edma_buf_link(sc, qtype);
} else {
list_move_tail(&bf->list, &sc->rx.rxbuf);
ath_rx_buf_link(sc, bf);
if (!flush)
ath9k_hw_rxena(ah);
}
} while (1);
spin_unlock_bh(&sc->rx.rxbuflock);
if (!(ah->imask & ATH9K_INT_RXEOL)) {
ah->imask |= (ATH9K_INT_RXEOL | ATH9K_INT_RXORN);
ath9k_hw_set_interrupts(ah);
}
return 0;
}
|
yajnab/android_kernel_samsung_delos3geur
|
drivers/net/wireless/ath/ath9k/recv.c
|
C
|
gpl-2.0
| 54,570
|
[
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2263,
1011,
2249,
2012,
5886,
2891,
4806,
4297,
1012,
1008,
1008,
6656,
2000,
2224,
1010,
6100,
1010,
19933,
1010,
1998,
1013,
2030,
16062,
2023,
4007,
2005,
2151,
1008,
3800,
2007,
2030,
2302,
7408,
2003,
2182,
3762,
4379,
1010,
3024,
2008,
1996,
2682,
1008,
9385,
5060,
1998,
2023,
6656,
5060,
3711,
1999,
2035,
4809,
1012,
1008,
1008,
1996,
4007,
2003,
3024,
1000,
2004,
2003,
1000,
1998,
1996,
3166,
5860,
19771,
5244,
2035,
10943,
3111,
1008,
2007,
7634,
2000,
2023,
4007,
2164,
2035,
13339,
10943,
3111,
1997,
1008,
6432,
8010,
1998,
10516,
1012,
1999,
2053,
2724,
4618,
1996,
3166,
2022,
20090,
2005,
1008,
2151,
2569,
1010,
3622,
1010,
14958,
1010,
2030,
9530,
3366,
15417,
4818,
12394,
2030,
2151,
12394,
1008,
18971,
4525,
2013,
3279,
1997,
2224,
1010,
2951,
2030,
11372,
1010,
3251,
1999,
2019,
1008,
2895,
1997,
3206,
1010,
27988,
2030,
2060,
17153,
20771,
2895,
1010,
17707,
2041,
1997,
1008,
2030,
1999,
4434,
2007,
1996,
2224,
2030,
2836,
1997,
2023,
4007,
1012,
1008,
1013,
1001,
2421,
1026,
11603,
1013,
1040,
2863,
1011,
12375,
1012,
1044,
1028,
1001,
2421,
1000,
2012,
2232,
2683,
2243,
1012,
1044,
1000,
1001,
2421,
1000,
12098,
21057,
2692,
2509,
1035,
6097,
1012,
1044,
1000,
1001,
9375,
15315,
2497,
1035,
17324,
1035,
2012,
2232,
8569,
2546,
1006,
1035,
1035,
15315,
2497,
1007,
1006,
1008,
1006,
1006,
2358,
6820,
6593,
2012,
2232,
1035,
20934,
2546,
1008,
1008,
1007,
1035,
1035,
15315,
2497,
1011,
1028,
17324,
1007,
1007,
10763,
23881,
22017,
2140,
2012,
2232,
1035,
2003,
1035,
12456,
1035,
14405,
1035,
6463,
1035,
2488,
1006,
20014,
12456,
1035,
6463,
1010,
20014,
4098,
9247,
2696,
1010,
20014,
2568,
20042,
2050,
1010,
20014,
2364,
1035,
12667,
5332,
1035,
20704,
2290,
1010,
20014,
12456,
1035,
12667,
5332,
1035,
20704,
2290,
1010,
20014,
1052,
25509,
1035,
4175,
1007,
1063,
2709,
1006,
1006,
1006,
12456,
1035,
6463,
1028,
1027,
2012,
2232,
1035,
14405,
1035,
4487,
2615,
1035,
22863,
1035,
12456,
1035,
14405,
1035,
6463,
2475,
1007,
1004,
1004,
1006,
12456,
1035,
12667,
5332,
1035,
20704,
2290,
1028,
2364,
1035,
12667,
5332,
1035,
20704,
2290,
1009,
4098,
9247,
2696,
1007,
1007,
1064,
1064,
1006,
12456,
1035,
12667,
5332,
1035,
20704,
2290,
1028,
2364,
1035,
12667,
5332,
1035,
20704,
2290,
1009,
2568,
20042,
2050,
1007,
1007,
1004,
1004,
1006,
1052,
25509,
1035,
4175,
1028,
2753,
1007,
1025,
1065,
10763,
23881,
22017,
2140,
2012,
2232,
1035,
14405,
1035,
4487,
2615,
1035,
22863,
1035,
12456,
1035,
4638,
1006,
1057,
2620,
4487,
2615,
1035,
2177,
1010,
20014,
12456,
1035,
6463,
1010,
20014,
12731,
12171,
1035,
2364,
1035,
2275,
1010,
20014,
12731,
12171,
1035,
12456,
1035,
2275,
1010,
20014,
12456,
1035,
12667,
5332,
1035,
20704,
2290,
1010,
20014,
2364,
1035,
12667,
5332,
1035,
20704,
2290,
1007,
1063,
22017,
2140,
2765,
1027,
6270,
1025,
6942,
1006,
4487,
2615,
1035,
2177,
30524,
1035,
6463,
1007,
2765,
1027,
2995,
1025,
3338,
1025,
2553,
30523,
1007,
1063,
2553,
1014,
1024,
2065,
1006,
12456,
1035,
6463,
1028,
2012,
2232,
1035,
14405,
1035,
4487,
2615,
1035,
22863,
1035,
12456,
1035,
14405,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1007,
1063,
2553,
1014,
1024,
2065,
1006,
12456,
1035,
6463,
1028,
2012,
2232,
1035,
14405,
1035,
4487,
2615,
1035,
22863,
1035,
12456,
1035,
14405,
30526
] |
/*
* Copyright (C) 2014 Google Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Neither the name of Google Inc. nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#ifndef DocumentStyleSheetCollector_h
#define DocumentStyleSheetCollector_h
#include "platform/heap/Handle.h"
#include "wtf/HashSet.h"
#include "wtf/Vector.h"
namespace blink {
class CSSStyleSheet;
class Document;
class StyleSheet;
class StyleSheetCollection;
class DocumentStyleSheetCollector {
// This class contains references to two on-heap collections, therefore
// it's unhealthy to have it anywhere but on the stack, where stack
// scanning will keep them alive.
STACK_ALLOCATED();
public:
friend class ImportedDocumentStyleSheetCollector;
DocumentStyleSheetCollector(StyleSheetCollection*,
HeapVector<Member<StyleSheet>>*,
HeapHashSet<Member<Document>>*);
~DocumentStyleSheetCollector();
void appendActiveStyleSheets(const HeapVector<Member<CSSStyleSheet>>&);
void appendActiveStyleSheet(CSSStyleSheet*);
void appendSheetForList(StyleSheet*);
bool hasVisited(Document* document) const {
return m_visitedDocuments->contains(document);
}
void willVisit(Document* document) { m_visitedDocuments->add(document); }
private:
Member<StyleSheetCollection> m_collection;
HeapVector<Member<StyleSheet>>* m_styleSheetsForStyleSheetList;
HeapHashSet<Member<Document>>* m_visitedDocuments;
};
class ActiveDocumentStyleSheetCollector final
: public DocumentStyleSheetCollector {
public:
ActiveDocumentStyleSheetCollector(StyleSheetCollection&);
private:
HeapHashSet<Member<Document>> m_visitedDocuments;
};
class ImportedDocumentStyleSheetCollector final
: public DocumentStyleSheetCollector {
public:
ImportedDocumentStyleSheetCollector(DocumentStyleSheetCollector&,
HeapVector<Member<StyleSheet>>&);
};
} // namespace blink
#endif // DocumentStyleSheetCollector_h
|
ssaroha/node-webrtc
|
third_party/webrtc/include/chromium/src/third_party/WebKit/Source/core/dom/DocumentStyleSheetCollector.h
|
C
|
bsd-2-clause
| 3,172
|
[
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2297,
8224,
4297,
1012,
2035,
2916,
9235,
1012,
1008,
1008,
25707,
1998,
2224,
1999,
3120,
1998,
12441,
3596,
1010,
2007,
2030,
2302,
1008,
14080,
1010,
2024,
7936,
3024,
2008,
1996,
2206,
3785,
2024,
1008,
2777,
1024,
1008,
1008,
1008,
25707,
2015,
1997,
3120,
3642,
2442,
9279,
1996,
2682,
9385,
1008,
5060,
1010,
2023,
2862,
1997,
3785,
1998,
1996,
2206,
5860,
19771,
5017,
1012,
1008,
1008,
4445,
1996,
2171,
1997,
8224,
4297,
1012,
4496,
1996,
3415,
1997,
2049,
1008,
16884,
2089,
2022,
2109,
2000,
2203,
5668,
2063,
2030,
5326,
3688,
5173,
2013,
1008,
2023,
4007,
2302,
3563,
3188,
2517,
6656,
1012,
1008,
1008,
2023,
4007,
2003,
3024,
2011,
1996,
9385,
13304,
1998,
16884,
1008,
1000,
2004,
2003,
1000,
1998,
2151,
4671,
2030,
13339,
10943,
3111,
1010,
2164,
1010,
2021,
2025,
1008,
3132,
2000,
1010,
1996,
13339,
10943,
3111,
1997,
6432,
8010,
1998,
10516,
2005,
1008,
1037,
3327,
3800,
2024,
5860,
19771,
7583,
1012,
1999,
2053,
2724,
4618,
1996,
9385,
1008,
3954,
2030,
16884,
2022,
20090,
2005,
2151,
3622,
1010,
14958,
1010,
5043,
2389,
1010,
1008,
2569,
1010,
27792,
1010,
2030,
9530,
3366,
15417,
4818,
12394,
1006,
2164,
1010,
2021,
2025,
1008,
3132,
2000,
1010,
21423,
1997,
7681,
5350,
2030,
2578,
1025,
3279,
1997,
2224,
1010,
1008,
2951,
1010,
2030,
11372,
1025,
2030,
2449,
24191,
1007,
2174,
3303,
1998,
2006,
2151,
1008,
3399,
1997,
14000,
1010,
3251,
1999,
3206,
1010,
9384,
14000,
1010,
2030,
17153,
2102,
1008,
1006,
2164,
27988,
2030,
4728,
1007,
17707,
1999,
2151,
2126,
2041,
1997,
1996,
2224,
1008,
1997,
2023,
4007,
1010,
2130,
2065,
9449,
1997,
1996,
6061,
1997,
2107,
4053,
1012,
1008,
1013,
1001,
2065,
13629,
2546,
5491,
27983,
4095,
15558,
26895,
30524,
1013,
23325,
13462,
1012,
1044,
1000,
1001,
2421,
1000,
1059,
24475,
1013,
9207,
1012,
1044,
1000,
3415,
15327,
12373,
1063,
2465,
20116,
4757,
27983,
4095,
15558,
1025,
2465,
6254,
1025,
2465,
6782,
21030,
2102,
1025,
2465,
6782,
21030,
13535,
14511,
18491,
1025,
2465,
5491,
27983,
4095,
15558,
26895,
22471,
2953,
1063,
1013,
1013,
2023,
2465,
3397,
7604,
2000,
2048,
2006,
1011,
16721,
6407,
1010,
3568,
1013,
1013,
2009,
1005,
1055,
4895,
20192,
24658,
2100,
2000,
2031,
2009,
5973,
2021,
2006,
1996,
9991,
1010,
2073,
9991,
1013,
1013,
13722,
2097,
2562,
2068,
4142,
1012,
9991,
1035,
11095,
1006,
1007,
1025,
2270,
1024,
2767,
2465,
10964,
3527,
24894,
11187,
27983,
4095,
15558,
26895,
22471,
2953,
1025,
5491,
27983,
4095,
15558,
26895,
22471,
2953,
1006,
6782,
21030,
13535,
14511,
18491,
1008,
1010,
16721,
3726,
16761,
1026,
2266,
1026,
6782,
21030,
2102,
1028,
1028,
1008,
1010,
16721,
14949,
7898,
3388,
1026,
2266,
1026,
6254,
1028,
1028,
1008,
1007,
1025,
1066,
5491,
27983,
4095,
15558,
26895,
22471,
2953,
1006,
1007,
1025,
11675,
10439,
10497,
19620,
21756,
4244,
21030,
3215,
1006,
9530,
3367,
16721,
3726,
16761,
1026,
2266,
1026,
20116,
4757,
30523,
22471,
2953,
1035,
1044,
1001,
9375,
5491,
27983,
4095,
15558,
26895,
22471,
2953,
1035,
1044,
1001,
2421,
1000,
4132,
1013,
16721,
1013,
5047,
1012,
1044,
1000,
1001,
2421,
1000,
1059,
24475,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
22471,
2953,
1035,
1044,
1001,
9375,
5491,
27983,
4095,
15558,
26895,
22471,
2953,
1035,
1044,
1001,
2421,
1000,
4132,
1013,
16721,
1013,
5047,
1012,
1044,
1000,
1001,
2421,
1000,
1059,
24475,
30526
] |
package org.eclipse.scout.widgets.heatmap.client.ui.form.fields.heatmapfield;
import java.util.Collection;
import org.eclipse.scout.rt.client.ui.form.fields.IFormField;
public interface IHeatmapField extends IFormField {
String PROP_VIEW_PARAMETER = "viewParameter";
String PROP_HEAT_POINT_LIST = "heatPointList";
HeatmapViewParameter getViewParameter();
Collection<HeatPoint> getHeatPoints();
void handleClick(MapPoint point);
void addHeatPoint(HeatPoint heatPoint);
void addHeatPoints(Collection<HeatPoint> heatPoints);
void setHeatPoints(Collection<HeatPoint> heatPoints);
void setViewParameter(HeatmapViewParameter parameter);
IHeatmapFieldUIFacade getUIFacade();
void addHeatmapListener(IHeatmapListener listener);
void removeHeatmapListener(IHeatmapListener listener);
}
|
BSI-Business-Systems-Integration-AG/org.thethingsnetwork.zrh.monitor
|
ttn_monitor/org.eclipse.scout.widgets.heatmap.client/src/main/java/org/eclipse/scout/widgets/heatmap/client/ui/form/fields/heatmapfield/IHeatmapField.java
|
Java
|
epl-1.0
| 817
|
[
30522,
7427,
8917,
1012,
13232,
1012,
7464,
1012,
15536,
28682,
1012,
3684,
2863,
2361,
1012,
7396,
1012,
21318,
1012,
2433,
1012,
4249,
1012,
3684,
2863,
14376,
12891,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
3074,
1025,
12324,
8917,
1012,
13232,
1012,
7464,
1012,
19387,
1012,
7396,
1012,
21318,
1012,
2433,
1012,
4249,
1012,
2065,
2953,
2213,
3790,
1025,
2270,
8278,
1045,
20192,
29418,
14376,
12891,
8908,
2065,
2953,
2213,
3790,
1063,
5164,
17678,
1035,
3193,
1035,
16381,
1027,
1000,
3193,
28689,
22828,
1000,
1025,
5164,
17678,
1035,
3684,
1035,
2391,
1035,
2862,
1027,
1000,
3684,
8400,
9863,
1000,
1025,
3684,
2863,
2361,
8584,
28689,
22828,
2131,
8584,
28689,
22828,
1006,
1007,
1025,
3074,
1026,
3684,
8400,
1028,
2131,
20192,
25856,
25785,
2015,
1006,
1007,
1025,
11675,
5047,
20464,
6799,
1006,
4949,
8400,
2391,
1007,
1025,
11675,
5587,
20192,
25856,
25785,
1006,
3684,
8400,
3684,
8400,
1007,
1025,
11675,
5587,
20192,
25856,
25785,
2015,
1006,
3074,
1026,
3684,
8400,
1028,
3684,
26521,
1007,
1025,
11675,
6662,
5243,
25856,
25785,
2015,
1006,
3074,
1026,
3684,
8400,
1028,
3684,
26521,
1007,
1025,
11675,
2275,
8584,
28689,
22828,
1006,
3684,
2863,
2361,
8584,
28689,
22828,
16381,
1007,
1025,
1045,
20192,
29418,
14376,
12891,
10179,
7011,
21869,
30524,
1045,
20192,
29418,
24759,
27870,
3678,
19373,
1007,
1025,
11675,
6366,
20192,
29418,
24759,
27870,
3678,
1006,
1045,
20192,
29418,
24759,
27870,
3678,
19373,
1007,
1025,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2131,
10179,
7011,
21869,
1006,
1007,
1025,
11675,
5587,
20192,
29418,
24759,
27870,
3678,
1006,
30526
] |
'use strict';
angular.module("ngLocale", [], ["$provide", function($provide) {
var PLURAL_CATEGORY = {ZERO: "zero", ONE: "one", TWO: "two", FEW: "few", MANY: "many", OTHER: "other"};
function getDecimals(n) {
n = n + '';
var i = n.indexOf('.');
return (i == -1) ? 0 : n.length - i - 1;
}
function getVF(n, opt_precision) {
var v = opt_precision;
if (undefined === v) {
v = Math.min(getDecimals(n), 3);
}
var base = Math.pow(10, v);
var f = ((n * base) | 0) % base;
return {v: v, f: f};
}
$provide.value("$locale", {
"DATETIME_FORMATS": {
"AMPMS": [
"am",
"pm"
],
"DAY": [
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
],
"MONTH": [
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
],
"SHORTDAY": [
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat"
],
"SHORTMONTH": [
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
],
"fullDate": "EEEE, d MMMM y",
"longDate": "d MMMM y",
"medium": "d MMM y HH:mm:ss",
"mediumDate": "d MMM y",
"mediumTime": "HH:mm:ss",
"short": "dd/MM/y HH:mm",
"shortDate": "dd/MM/y",
"shortTime": "HH:mm"
},
"NUMBER_FORMATS": {
"CURRENCY_SYM": "\u00a3",
"DECIMAL_SEP": ".",
"GROUP_SEP": ",",
"PATTERNS": [
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 3,
"minFrac": 0,
"minInt": 1,
"negPre": "-",
"negSuf": "",
"posPre": "",
"posSuf": ""
},
{
"gSize": 3,
"lgSize": 3,
"maxFrac": 2,
"minFrac": 2,
"minInt": 1,
"negPre": "\u00a4-",
"negSuf": "",
"posPre": "\u00a4",
"posSuf": ""
}
]
},
"id": "en-fk",
"pluralCat": function(n, opt_precision) { var i = n | 0; var vf = getVF(n, opt_precision); if (i == 1 && vf.v == 0) { return PLURAL_CATEGORY.ONE; } return PLURAL_CATEGORY.OTHER;}
});
}]);
|
marcoR80/simple-app-mobile
|
www/vendor/angular-1.3.9/i18n/angular-locale_en-fk.js
|
JavaScript
|
mit
| 2,280
|
[
30522,
1005,
2224,
9384,
1005,
1025,
16108,
1012,
11336,
1006,
1000,
12835,
4135,
9289,
2063,
1000,
1010,
1031,
1033,
1010,
1031,
1000,
1002,
3073,
1000,
1010,
3853,
1006,
1002,
3073,
1007,
1063,
13075,
13994,
1035,
4696,
1027,
1063,
5717,
1024,
1000,
5717,
1000,
1010,
2028,
1024,
1000,
2028,
1000,
1010,
2048,
1024,
1000,
2048,
1000,
1010,
2261,
1024,
1000,
2261,
1000,
1010,
2116,
1024,
1000,
2116,
1000,
1010,
2060,
1024,
1000,
2060,
1000,
1065,
1025,
3853,
2131,
3207,
6895,
9067,
2015,
1006,
1050,
1007,
1063,
1050,
1027,
1050,
1009,
1005,
1005,
1025,
13075,
1045,
1027,
1050,
1012,
5950,
11253,
1006,
1005,
1012,
1005,
1007,
1025,
2709,
1006,
1045,
1027,
1027,
1011,
1015,
1007,
1029,
1014,
1024,
1050,
1012,
3091,
1011,
1045,
1011,
1015,
1025,
1065,
3853,
2131,
2615,
2546,
1006,
1050,
1010,
23569,
1035,
11718,
1007,
1063,
13075,
1058,
1027,
23569,
1035,
11718,
1025,
2065,
1006,
6151,
28344,
1027,
1027,
1027,
1058,
1007,
30524,
1006,
1050,
1008,
2918,
1007,
1064,
1014,
1007,
1003,
2918,
1025,
2709,
1063,
1058,
1024,
1058,
1010,
1042,
1024,
1042,
1065,
1025,
1065,
1002,
3073,
1012,
3643,
1006,
1000,
1002,
2334,
2063,
1000,
1010,
1063,
1000,
3058,
7292,
1035,
11630,
1000,
1024,
1063,
1000,
23713,
5244,
1000,
1024,
1031,
1000,
2572,
1000,
1010,
1000,
7610,
1000,
1033,
1010,
1000,
2154,
1000,
1024,
1031,
1000,
4465,
1000,
1010,
1000,
6928,
1000,
1010,
1000,
9857,
1000,
1010,
1000,
9317,
1000,
1010,
1000,
9432,
1000,
1010,
1000,
5958,
1000,
1010,
1000,
5095,
1000,
1033,
1010,
1000,
3204,
1000,
1024,
1031,
1000,
2254,
1000,
1010,
1000,
2337,
1000,
1010,
1000,
2233,
1000,
1010,
1000,
2258,
1000,
1010,
1000,
2089,
1000,
1010,
1000,
2238,
1000,
1010,
1000,
2251,
1000,
1010,
1000,
2257,
1000,
1010,
1000,
2244,
1000,
1010,
1000,
2255,
1000,
1010,
1000,
2281,
1000,
1010,
1000,
2285,
1000,
1033,
1010,
1000,
2460,
10259,
1000,
1024,
1031,
1000,
3103,
1000,
1010,
1000,
12256,
1000,
1010,
1000,
10722,
2063,
1000,
1010,
1000,
21981,
1000,
1010,
1000,
16215,
2226,
1000,
1010,
1000,
10424,
2072,
1000,
1010,
1000,
2938,
1000,
1033,
1010,
1000,
2460,
9629,
2232,
1000,
1024,
1031,
1000,
5553,
1000,
1010,
1000,
13114,
1000,
1010,
1000,
9388,
1000,
1010,
1000,
19804,
1000,
1010,
1000,
2089,
1000,
1010,
1000,
12022,
1000,
1010,
1000,
21650,
1000,
1010,
1000,
15476,
1000,
1010,
1000,
19802,
1000,
1010,
1000,
13323,
1000,
1010,
1000,
13292,
1000,
1010,
1000,
11703,
1000,
1033,
1010,
1000,
2440,
13701,
1000,
1024,
1000,
25212,
4402,
1010,
1040,
25391,
2213,
1061,
1000,
1010,
1000,
2146,
13701,
1000,
1024,
1000,
1040,
25391,
2213,
1061,
1000,
1010,
1000,
5396,
1000,
1024,
1000,
1040,
25391,
1061,
1044,
2232,
1024,
3461,
1024,
7020,
1000,
1010,
1000,
5396,
13701,
1000,
1024,
1000,
1040,
25391,
1061,
1000,
1010,
1000,
5396,
7292,
1000,
1024,
1000,
1044,
2232,
1024,
3461,
1024,
7020,
1000,
1010,
1000,
2460,
30523,
1063,
1058,
1027,
8785,
1012,
8117,
1006,
2131,
3207,
6895,
9067,
2015,
1006,
1050,
1007,
1010,
1017,
1007,
1025,
1065,
13075,
2918,
1027,
8785,
1012,
23776,
1006,
2184,
1010,
1058,
1007,
1025,
13075,
1042,
1027,
1006,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1063,
1058,
1027,
8785,
1012,
8117,
1006,
2131,
3207,
6895,
9067,
2015,
1006,
1050,
1007,
1010,
1017,
1007,
1025,
1065,
13075,
2918,
1027,
8785,
1012,
23776,
1006,
2184,
1010,
1058,
1007,
1025,
13075,
1042,
1027,
1006,
30526
] |
C
C This source code is part of
C
C G R O M A C S
C
C Copyright (c) 1991-2000, University of Groningen, The Netherlands.
C Copyright (c) 2001-2009, The GROMACS Development Team
C
C Gromacs is a library for molecular simulation and trajectory analysis,
C written by Erik Lindahl, David van der Spoel, Berk Hess, and others - for
C a full list of developers and information, check out http://www.gromacs.org
C
C This program is free software; you can redistribute it and/or modify it under
C the terms of the GNU Lesser General Public License as published by the Free
C Software Foundation; either version 2 of the License, or (at your option) any
C later version.
C As a special exception, you may use this file as part of a free software
C library without restriction. Specifically, if other files instantiate
C templates or use macros or inline functions from this file, or you compile
C this file and link it with other files to produce an executable, this
C file does not by itself cause the resulting executable to be covered by
C the GNU Lesser General Public License.
C
C In plain-speak: do not worry about classes/macros/templates either - only
C changes to the library have to be LGPL, not an application linking with it.
C
C To help fund GROMACS development, we humbly ask that you cite
C the papers people have written on it - you can find them on the website!
C
C
C Gromacs nonbonded kernel f77skernel400
C Coulomb interaction: Generalized-Born
C VdW interaction: Not calculated
C water optimization: No
C Calculate forces: yes
C
subroutine f77skernel400(
& nri,
& iinr,
& jindex,
& jjnr,
& shift,
& shiftvec,
& fshift,
& gid,
& pos,
& faction,
& charge,
& facel,
& krf,
& crf,
& Vc,
& type,
& ntype,
& vdwparam,
& Vvdw,
& tabscale,
& VFtab,
& invsqrta,
& dvda,
& gbtabscale,
& GBtab,
& nthreads,
& count,
& mtx,
& outeriter,
& inneriter,
& work)
implicit none
integer*4 nri,iinr(*),jindex(*),jjnr(*),shift(*)
real*4 shiftvec(*),fshift(*),pos(*),faction(*)
integer*4 gid(*),type(*),ntype
real*4 charge(*),facel,krf,crf,Vc(*),vdwparam(*)
real*4 Vvdw(*),tabscale,VFtab(*)
real*4 invsqrta(*),dvda(*),gbtabscale,GBtab(*)
integer*4 nthreads,count,mtx,outeriter,inneriter
real*4 work(*)
integer*4 n,ii,is3,ii3,k,nj0,nj1,jnr,j3,ggid
integer*4 nn0,nn1,nouter,ninner
real*4 shX,shY,shZ
real*4 fscal,tx,ty,tz
real*4 iq
real*4 qq,vcoul,vctot
real*4 r,rt,eps,eps2
integer*4 n0,nnn
real*4 Y,F,Geps,Heps2,Fp,VV
real*4 FF
real*4 fijC
real*4 isai,isaj,isaprod,gbscale,vgb
real*4 dvdasum,dvdatmp,dvdaj,fgb
real*4 ix1,iy1,iz1,fix1,fiy1,fiz1
real*4 jx1,jy1,jz1
real*4 dx11,dy11,dz11,rsq11,rinv11
C Reset outer and inner iteration counters
nouter = 0
ninner = 0
C Loop over thread workunits
10 call f77kernelsync(mtx,count,nri,nthreads,nn0,nn1)
if(nn1.gt.nri) nn1=nri
C Start outer loop over neighborlists
do n=nn0+1,nn1
C Load shift vector for this list
is3 = 3*shift(n)+1
shX = shiftvec(is3)
shY = shiftvec(is3+1)
shZ = shiftvec(is3+2)
C Load limits for loop over neighbors
nj0 = jindex(n)+1
nj1 = jindex(n+1)
C Get outer coordinate index
ii = iinr(n)+1
ii3 = 3*ii-2
C Load i atom data, add shift vector
ix1 = shX + pos(ii3+0)
iy1 = shY + pos(ii3+1)
iz1 = shZ + pos(ii3+2)
C Load parameters for i atom
iq = facel*charge(ii)
isai = invsqrta(ii)
C Zero the potential energy for this list
vctot = 0
dvdasum = 0
C Clear i atom forces
fix1 = 0
fiy1 = 0
fiz1 = 0
do k=nj0,nj1
C Get j neighbor index, and coordinate index
jnr = jjnr(k)+1
j3 = 3*jnr-2
C load j atom coordinates
jx1 = pos(j3+0)
jy1 = pos(j3+1)
jz1 = pos(j3+2)
C Calculate distance
dx11 = ix1 - jx1
dy11 = iy1 - jy1
dz11 = iz1 - jz1
rsq11 = dx11*dx11+dy11*dy11+dz11*dz11
C Calculate 1/r and 1/r2
rinv11 = 1.0/sqrt(rsq11)
C Load parameters for j atom
isaj = invsqrta(jnr)
isaprod = isai*isaj
qq = iq*charge(jnr)
vcoul = qq*rinv11
fscal = vcoul*rinv11
qq = isaprod*(-qq)
gbscale = isaprod*gbtabscale
C Tabulated Generalized-Born interaction
dvdaj = dvda(jnr)
r = rsq11*rinv11
C Calculate table index
rt = r*gbscale
n0 = rt
eps = rt-n0
eps2 = eps*eps
nnn = 4*n0+1
Y = GBtab(nnn)
F = GBtab(nnn+1)
Geps = eps*GBtab(nnn+2)
Heps2 = eps2*GBtab(nnn+3)
Fp = F+Geps+Heps2
VV = Y+eps*Fp
FF = Fp+Geps+2.0*Heps2
vgb = qq*VV
fijC = qq*FF*gbscale
dvdatmp = -0.5*(vgb+fijC*r)
dvdasum = dvdasum + dvdatmp
dvda(jnr) = dvdaj+dvdatmp*isaj*isaj
vctot = vctot + vcoul
fscal = -(fijC-fscal)*rinv11
C Calculate temporary vectorial force
tx = fscal*dx11
ty = fscal*dy11
tz = fscal*dz11
C Increment i atom force
fix1 = fix1 + tx
fiy1 = fiy1 + ty
fiz1 = fiz1 + tz
C Decrement j atom force
faction(j3+0) = faction(j3+0) - tx
faction(j3+1) = faction(j3+1) - ty
faction(j3+2) = faction(j3+2) - tz
C Inner loop uses 49 flops/iteration
end do
C Add i forces to mem and shifted force list
faction(ii3+0) = faction(ii3+0) + fix1
faction(ii3+1) = faction(ii3+1) + fiy1
faction(ii3+2) = faction(ii3+2) + fiz1
fshift(is3) = fshift(is3)+fix1
fshift(is3+1) = fshift(is3+1)+fiy1
fshift(is3+2) = fshift(is3+2)+fiz1
C Add potential energies to the group for this list
ggid = gid(n)+1
Vc(ggid) = Vc(ggid) + vctot
dvda(ii) = dvda(ii) + dvdasum*isai*isai
C Increment number of inner iterations
ninner = ninner + nj1 - nj0
C Outer loop uses 12 flops/iteration
end do
C Increment number of outer iterations
nouter = nouter + nn1 - nn0
if(nn1.lt.nri) goto 10
C Write outer/inner iteration count to pointers
outeriter = nouter
inneriter = ninner
return
end
C
C Gromacs nonbonded kernel f77skernel400nf
C Coulomb interaction: Generalized-Born
C VdW interaction: Not calculated
C water optimization: No
C Calculate forces: no
C
subroutine f77skernel400nf(
& nri,
& iinr,
& jindex,
& jjnr,
& shift,
& shiftvec,
& fshift,
& gid,
& pos,
& faction,
& charge,
& facel,
& krf,
& crf,
& Vc,
& type,
& ntype,
& vdwparam,
& Vvdw,
& tabscale,
& VFtab,
& invsqrta,
& dvda,
& gbtabscale,
& GBtab,
& nthreads,
& count,
& mtx,
& outeriter,
& inneriter,
& work)
implicit none
integer*4 nri,iinr(*),jindex(*),jjnr(*),shift(*)
real*4 shiftvec(*),fshift(*),pos(*),faction(*)
integer*4 gid(*),type(*),ntype
real*4 charge(*),facel,krf,crf,Vc(*),vdwparam(*)
real*4 Vvdw(*),tabscale,VFtab(*)
real*4 invsqrta(*),dvda(*),gbtabscale,GBtab(*)
integer*4 nthreads,count,mtx,outeriter,inneriter
real*4 work(*)
integer*4 n,ii,is3,ii3,k,nj0,nj1,jnr,j3,ggid
integer*4 nn0,nn1,nouter,ninner
real*4 shX,shY,shZ
real*4 iq
real*4 qq,vcoul,vctot
real*4 r,rt,eps,eps2
integer*4 n0,nnn
real*4 Y,F,Geps,Heps2,Fp,VV
real*4 isai,isaj,isaprod,gbscale,vgb
real*4 ix1,iy1,iz1
real*4 jx1,jy1,jz1
real*4 dx11,dy11,dz11,rsq11,rinv11
C Reset outer and inner iteration counters
nouter = 0
ninner = 0
C Loop over thread workunits
10 call f77kernelsync(mtx,count,nri,nthreads,nn0,nn1)
if(nn1.gt.nri) nn1=nri
C Start outer loop over neighborlists
do n=nn0+1,nn1
C Load shift vector for this list
is3 = 3*shift(n)+1
shX = shiftvec(is3)
shY = shiftvec(is3+1)
shZ = shiftvec(is3+2)
C Load limits for loop over neighbors
nj0 = jindex(n)+1
nj1 = jindex(n+1)
C Get outer coordinate index
ii = iinr(n)+1
ii3 = 3*ii-2
C Load i atom data, add shift vector
ix1 = shX + pos(ii3+0)
iy1 = shY + pos(ii3+1)
iz1 = shZ + pos(ii3+2)
C Load parameters for i atom
iq = facel*charge(ii)
isai = invsqrta(ii)
C Zero the potential energy for this list
vctot = 0
C Clear i atom forces
do k=nj0,nj1
C Get j neighbor index, and coordinate index
jnr = jjnr(k)+1
j3 = 3*jnr-2
C load j atom coordinates
jx1 = pos(j3+0)
jy1 = pos(j3+1)
jz1 = pos(j3+2)
C Calculate distance
dx11 = ix1 - jx1
dy11 = iy1 - jy1
dz11 = iz1 - jz1
rsq11 = dx11*dx11+dy11*dy11+dz11*dz11
C Calculate 1/r and 1/r2
rinv11 = 1.0/sqrt(rsq11)
C Load parameters for j atom
isaj = invsqrta(jnr)
isaprod = isai*isaj
qq = iq*charge(jnr)
vcoul = qq*rinv11
qq = isaprod*(-qq)
gbscale = isaprod*gbtabscale
C Tabulated Generalized-Born interaction
r = rsq11*rinv11
C Calculate table index
rt = r*gbscale
n0 = rt
eps = rt-n0
eps2 = eps*eps
nnn = 4*n0+1
Y = GBtab(nnn)
F = GBtab(nnn+1)
Geps = eps*GBtab(nnn+2)
Heps2 = eps2*GBtab(nnn+3)
Fp = F+Geps+Heps2
VV = Y+eps*Fp
vgb = qq*VV
vctot = vctot + vcoul
C Inner loop uses 29 flops/iteration
end do
C Add i forces to mem and shifted force list
C Add potential energies to the group for this list
ggid = gid(n)+1
Vc(ggid) = Vc(ggid) + vctot
C Increment number of inner iterations
ninner = ninner + nj1 - nj0
C Outer loop uses 5 flops/iteration
end do
C Increment number of outer iterations
nouter = nouter + nn1 - nn0
if(nn1.lt.nri) goto 10
C Write outer/inner iteration count to pointers
outeriter = nouter
inneriter = ninner
return
end
|
tectronics/force-distribution-analysis.gromacs-4-5-3
|
src/gmxlib/nonbonded/nb_kernel_f77_single/f77skernel400.f
|
FORTRAN
|
gpl-2.0
| 15,251
|
[
30522,
1039,
1039,
2023,
3120,
3642,
2003,
2112,
1997,
1039,
1039,
1043,
1054,
1051,
1049,
1037,
1039,
1055,
1039,
1039,
9385,
1006,
1039,
1007,
2889,
1011,
2456,
1010,
2118,
1997,
29070,
1010,
1996,
4549,
1012,
1039,
9385,
1006,
1039,
1007,
2541,
1011,
2268,
1010,
1996,
24665,
9626,
6169,
2458,
2136,
1039,
1039,
24665,
9626,
6169,
2003,
1037,
3075,
2005,
8382,
12504,
1998,
22793,
4106,
1010,
1039,
2517,
2011,
10240,
8507,
7317,
1010,
2585,
3158,
4315,
11867,
8913,
2140,
1010,
2022,
8024,
23484,
1010,
1998,
2500,
1011,
2005,
1039,
1037,
2440,
2862,
1997,
9797,
1998,
2592,
1010,
4638,
2041,
8299,
1024,
1013,
1013,
7479,
1012,
24665,
9626,
6169,
1012,
8917,
1039,
1039,
2023,
2565,
2003,
2489,
4007,
1025,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
2009,
1998,
1013,
2030,
19933,
2009,
2104,
1039,
1996,
3408,
1997,
1996,
27004,
8276,
2236,
2270,
6105,
2004,
2405,
2011,
1996,
2489,
1039,
4007,
3192,
1025,
2593,
2544,
1016,
1997,
1996,
6105,
1010,
2030,
1006,
2012,
2115,
5724,
1007,
2151,
1039,
2101,
2544,
1012,
1039,
2004,
1037,
2569,
6453,
1010,
2017,
2089,
2224,
2023,
5371,
2004,
2112,
1997,
1037,
2489,
4007,
1039,
3075,
2302,
16840,
1012,
4919,
1010,
2065,
2060,
6764,
7107,
13143,
1039,
23561,
2015,
2030,
2224,
26632,
2015,
2030,
23881,
4972,
2013,
2023,
5371,
1010,
2030,
2017,
4012,
22090,
1039,
2023,
5371,
1998,
4957,
2009,
2007,
2060,
6764,
2000,
3965,
2019,
4654,
8586,
23056,
1010,
2023,
1039,
5371,
2515,
2025,
2011,
2993,
3426,
1996,
4525,
4654,
8586,
23056,
2000,
2022,
3139,
2011,
1039,
1996,
27004,
8276,
2236,
2270,
6105,
1012,
1039,
1039,
1999,
5810,
1011,
3713,
1024,
2079,
2025,
4737,
2055,
4280,
1013,
26632,
2015,
1013,
23561,
2015,
2593,
30524,
6321,
3198,
2008,
2017,
21893,
1039,
1996,
4981,
2111,
2031,
2517,
2006,
2009,
1011,
2017,
2064,
2424,
2068,
2006,
1996,
4037,
999,
1039,
1039,
1039,
24665,
9626,
6169,
2512,
11735,
5732,
16293,
1042,
2581,
2581,
17140,
12119,
2140,
29537,
1039,
2522,
18845,
14905,
8290,
1024,
18960,
1011,
2141,
1039,
1058,
2094,
2860,
8290,
1024,
2025,
10174,
1039,
2300,
20600,
1024,
2053,
1039,
18422,
2749,
1024,
2748,
1039,
4942,
22494,
10196,
1042,
2581,
2581,
17140,
12119,
2140,
29537,
1006,
1004,
17212,
2072,
1010,
1004,
2462,
16118,
1010,
1004,
9743,
3207,
2595,
1010,
1004,
29017,
16118,
1010,
1004,
5670,
1010,
1004,
5670,
3726,
2278,
1010,
1004,
1042,
6182,
6199,
1010,
1004,
21025,
2094,
1010,
1004,
13433,
2015,
1010,
1004,
10233,
1010,
1004,
3715,
1010,
1004,
2227,
2140,
1010,
1004,
1047,
12881,
1010,
1004,
13675,
2546,
1010,
1004,
18315,
1010,
1004,
2828,
1010,
1004,
23961,
18863,
1010,
1004,
1058,
2094,
2860,
28689,
2213,
1010,
1004,
1058,
16872,
2860,
1010,
1004,
21628,
15782,
2571,
1010,
1004,
1058,
6199,
7875,
1010,
1004,
1999,
15088,
4160,
13320,
1010,
1004,
4966,
2050,
1010,
1004,
16351,
2696,
5910,
9289,
2063,
1010,
1004,
16351,
2696,
2497,
1010,
1004,
23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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1011,
2069,
1039,
3431,
2000,
1996,
3075,
2031,
2000,
2022,
1048,
21600,
2140,
1010,
2025,
2019,
4646,
11383,
2007,
2009,
1012,
1039,
1039,
2000,
2393,
4636,
24665,
9626,
6169,
2458,
1010,
2057,
14910,
30526
] |
<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: google/pubsub/v1/pubsub.proto
namespace Google\Cloud\PubSub\V1;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Request for the ModifyAckDeadline method.
*
* Generated from protobuf message <code>google.pubsub.v1.ModifyAckDeadlineRequest</code>
*/
class ModifyAckDeadlineRequest extends \Google\Protobuf\Internal\Message
{
/**
* Required. The name of the subscription.
* Format is `projects/{project}/subscriptions/{sub}`.
*
* Generated from protobuf field <code>string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
*/
private $subscription = '';
/**
* Required. List of acknowledgment IDs.
*
* Generated from protobuf field <code>repeated string ack_ids = 4 [(.google.api.field_behavior) = REQUIRED];</code>
*/
private $ack_ids;
/**
* Required. The new ack deadline with respect to the time this request was
* sent to the Pub/Sub system. For example, if the value is 10, the new ack
* deadline will expire 10 seconds after the `ModifyAckDeadline` call was
* made. Specifying zero might immediately make the message available for
* delivery to another subscriber client. This typically results in an
* increase in the rate of message redeliveries (that is, duplicates).
* The minimum deadline you can specify is 0 seconds.
* The maximum deadline you can specify is 600 seconds (10 minutes).
*
* Generated from protobuf field <code>int32 ack_deadline_seconds = 3 [(.google.api.field_behavior) = REQUIRED];</code>
*/
private $ack_deadline_seconds = 0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $subscription
* Required. The name of the subscription.
* Format is `projects/{project}/subscriptions/{sub}`.
* @type string[]|\Google\Protobuf\Internal\RepeatedField $ack_ids
* Required. List of acknowledgment IDs.
* @type int $ack_deadline_seconds
* Required. The new ack deadline with respect to the time this request was
* sent to the Pub/Sub system. For example, if the value is 10, the new ack
* deadline will expire 10 seconds after the `ModifyAckDeadline` call was
* made. Specifying zero might immediately make the message available for
* delivery to another subscriber client. This typically results in an
* increase in the rate of message redeliveries (that is, duplicates).
* The minimum deadline you can specify is 0 seconds.
* The maximum deadline you can specify is 600 seconds (10 minutes).
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Google\Pubsub\V1\Pubsub::initOnce();
parent::__construct($data);
}
/**
* Required. The name of the subscription.
* Format is `projects/{project}/subscriptions/{sub}`.
*
* Generated from protobuf field <code>string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
* @return string
*/
public function getSubscription()
{
return $this->subscription;
}
/**
* Required. The name of the subscription.
* Format is `projects/{project}/subscriptions/{sub}`.
*
* Generated from protobuf field <code>string subscription = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
* @param string $var
* @return $this
*/
public function setSubscription($var)
{
GPBUtil::checkString($var, True);
$this->subscription = $var;
return $this;
}
/**
* Required. List of acknowledgment IDs.
*
* Generated from protobuf field <code>repeated string ack_ids = 4 [(.google.api.field_behavior) = REQUIRED];</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getAckIds()
{
return $this->ack_ids;
}
/**
* Required. List of acknowledgment IDs.
*
* Generated from protobuf field <code>repeated string ack_ids = 4 [(.google.api.field_behavior) = REQUIRED];</code>
* @param string[]|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setAckIds($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->ack_ids = $arr;
return $this;
}
/**
* Required. The new ack deadline with respect to the time this request was
* sent to the Pub/Sub system. For example, if the value is 10, the new ack
* deadline will expire 10 seconds after the `ModifyAckDeadline` call was
* made. Specifying zero might immediately make the message available for
* delivery to another subscriber client. This typically results in an
* increase in the rate of message redeliveries (that is, duplicates).
* The minimum deadline you can specify is 0 seconds.
* The maximum deadline you can specify is 600 seconds (10 minutes).
*
* Generated from protobuf field <code>int32 ack_deadline_seconds = 3 [(.google.api.field_behavior) = REQUIRED];</code>
* @return int
*/
public function getAckDeadlineSeconds()
{
return $this->ack_deadline_seconds;
}
/**
* Required. The new ack deadline with respect to the time this request was
* sent to the Pub/Sub system. For example, if the value is 10, the new ack
* deadline will expire 10 seconds after the `ModifyAckDeadline` call was
* made. Specifying zero might immediately make the message available for
* delivery to another subscriber client. This typically results in an
* increase in the rate of message redeliveries (that is, duplicates).
* The minimum deadline you can specify is 0 seconds.
* The maximum deadline you can specify is 600 seconds (10 minutes).
*
* Generated from protobuf field <code>int32 ack_deadline_seconds = 3 [(.google.api.field_behavior) = REQUIRED];</code>
* @param int $var
* @return $this
*/
public function setAckDeadlineSeconds($var)
{
GPBUtil::checkInt32($var);
$this->ack_deadline_seconds = $var;
return $this;
}
}
|
googleapis/google-cloud-php-pubsub
|
src/V1/ModifyAckDeadlineRequest.php
|
PHP
|
apache-2.0
| 6,591
|
[
30522,
1026,
1029,
25718,
1001,
7013,
2011,
1996,
8778,
17698,
21624,
1012,
2079,
2025,
10086,
999,
1001,
3120,
1024,
8224,
1013,
23598,
12083,
1013,
1058,
2487,
1013,
23598,
12083,
1012,
15053,
3415,
15327,
8224,
1032,
6112,
1032,
23598,
12083,
1032,
1058,
2487,
1025,
2224,
8224,
1032,
15053,
8569,
2546,
1032,
4722,
1032,
14246,
19279,
18863,
1025,
2224,
8224,
1032,
15053,
8569,
2546,
1032,
4722,
1032,
5567,
3790,
1025,
2224,
8224,
1032,
15053,
8569,
2546,
1032,
4722,
1032,
14246,
8569,
3775,
2140,
1025,
1013,
1008,
1008,
1008,
5227,
2005,
1996,
19933,
8684,
3207,
4215,
4179,
4118,
1012,
1008,
1008,
7013,
2013,
15053,
8569,
2546,
4471,
1026,
3642,
1028,
8224,
1012,
23598,
12083,
1012,
1058,
2487,
1012,
19933,
8684,
3207,
4215,
20660,
2063,
15500,
1026,
1013,
3642,
1028,
1008,
1013,
2465,
19933,
8684,
3207,
4215,
20660,
2063,
15500,
8908,
1032,
8224,
1032,
15053,
8569,
2546,
1032,
4722,
1032,
4471,
1063,
1013,
1008,
1008,
1008,
3223,
1012,
1996,
2171,
1997,
1996,
15002,
1012,
1008,
4289,
2003,
1036,
3934,
1013,
1063,
2622,
1065,
30524,
17928,
1012,
7692,
1035,
4431,
1007,
1027,
1063,
1026,
1013,
3642,
1028,
1008,
1013,
2797,
1002,
15002,
1027,
1005,
1005,
1025,
1013,
1008,
1008,
1008,
3223,
1012,
2862,
1997,
9353,
2243,
19779,
3709,
21693,
4765,
8909,
2015,
1012,
1008,
1008,
7013,
2013,
15053,
8569,
2546,
2492,
1026,
3642,
1028,
5567,
5164,
9353,
2243,
1035,
8909,
2015,
1027,
1018,
1031,
1006,
1012,
8224,
1012,
17928,
1012,
2492,
1035,
5248,
1007,
1027,
3223,
1033,
1025,
1026,
1013,
3642,
1028,
1008,
1013,
2797,
1002,
9353,
2243,
1035,
8909,
2015,
1025,
1013,
1008,
1008,
1008,
3223,
1012,
1996,
2047,
9353,
2243,
15117,
2007,
4847,
2000,
1996,
2051,
2023,
5227,
2001,
1008,
2741,
2000,
1996,
9047,
1013,
4942,
2291,
1012,
2005,
2742,
1010,
2065,
1996,
3643,
2003,
2184,
1010,
1996,
2047,
9353,
2243,
1008,
15117,
2097,
4654,
20781,
2184,
3823,
2044,
1996,
1036,
19933,
8684,
3207,
4215,
4179,
1036,
2655,
2001,
1008,
2081,
1012,
20648,
2075,
5717,
2453,
3202,
2191,
1996,
4471,
2800,
2005,
1008,
6959,
2000,
2178,
4942,
29234,
2099,
7396,
1012,
2023,
4050,
3463,
1999,
2019,
1008,
3623,
1999,
1996,
3446,
1997,
4471,
2417,
20806,
6299,
3111,
1006,
2008,
2003,
1010,
24473,
2015,
1007,
1012,
1008,
1996,
6263,
15117,
2017,
2064,
20648,
2003,
1014,
3823,
1012,
1008,
1996,
4555,
15117,
2017,
2064,
20648,
2003,
5174,
3823,
1006,
2184,
2781,
1007,
1012,
1008,
1008,
7013,
2013,
15053,
8569,
2546,
2492,
1026,
3642,
1028,
20014,
16703,
9353,
2243,
1035,
15117,
1035,
3823,
1027,
1017,
1031,
1006,
1012,
8224,
1012,
17928,
1012,
2492,
1035,
5248,
1007,
1027,
3223,
1033,
1025,
1026,
1013,
3642,
1028,
1008,
1013,
2797,
1002,
9353,
2243,
1035,
15117,
1035,
3823,
1027,
1014,
1025,
1013,
1008,
1008,
1008,
9570,
2953,
1012,
1008,
1008,
1030,
11498,
2213,
9140,
1002,
2951,
1063,
1008,
30523,
1013,
15002,
2015,
1013,
1063,
4942,
1065,
1036,
1012,
1008,
1008,
7013,
2013,
15053,
8569,
2546,
2492,
1026,
3642,
1028,
5164,
15002,
1027,
1015,
1031,
1006,
1012,
8224,
1012,
17928,
1012,
2492,
1035,
5248,
1007,
1027,
3223,
1010,
1006,
1012,
8224,
1012,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1013,
15002,
2015,
1013,
1063,
4942,
1065,
1036,
1012,
1008,
1008,
7013,
2013,
15053,
8569,
2546,
2492,
1026,
3642,
1028,
5164,
15002,
1027,
1015,
1031,
1006,
1012,
8224,
1012,
17928,
1012,
2492,
1035,
5248,
1007,
1027,
3223,
1010,
1006,
1012,
8224,
1012,
30526
] |
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Runtime Version:4.0.30319.42000
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
namespace RS.TimeLogger {
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.1.0.0")]
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
public static Settings Default {
get {
return defaultInstance;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("")]
public string LastUser {
get {
return ((string)(this["LastUser"]));
}
set {
this["LastUser"] = value;
}
}
[global::System.Configuration.UserScopedSettingAttribute()]
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.Configuration.DefaultSettingValueAttribute("00000000-0000-0000-0000-000000000000")]
public global::System.Guid LastActivity {
get {
return ((global::System.Guid)(this["LastActivity"]));
}
set {
this["LastActivity"] = value;
}
}
}
}
|
RomanianSoftware/Tools
|
RS.TimeLogger/RS.TimeLogger/Settings.Designer.cs
|
C#
|
mit
| 1,971
|
[
30522,
1013,
1013,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1013,
1013,
1026,
8285,
1011,
7013,
1028,
1013,
1013,
2023,
3642,
2001,
7013,
2011,
1037,
6994,
1012,
1013,
1013,
2448,
7292,
2544,
1024,
1018,
1012,
1014,
1012,
19988,
16147,
1012,
17442,
8889,
1013,
1013,
1013,
1013,
3431,
2000,
2023,
5371,
2089,
3426,
16542,
5248,
1998,
2097,
2022,
2439,
2065,
1013,
1013,
1996,
3642,
2003,
19723,
24454,
4383,
1012,
1013,
1013,
1026,
1013,
8285,
1011,
7013,
1028,
1013,
1013,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
3415,
15327,
12667,
1012,
2051,
21197,
4590,
1063,
1031,
3795,
1024,
1024,
2291,
1012,
2448,
7292,
1012,
21624,
8043,
7903,
2229,
1012,
21624,
6914,
16848,
19321,
3089,
8569,
2618,
1006,
1007,
1033,
1031,
3795,
1024,
1024,
2291,
1012,
22402,
5358,
1012,
21624,
1012,
7013,
16044,
19321,
3089,
8569,
2618,
1006,
1000,
7513,
1012,
26749,
8525,
20617,
1012,
10195,
1012,
10906,
6155,
23773,
2121,
1012,
10906,
7741,
2571,
8873,
23115,
24454,
8844,
1000,
1010,
1000,
2321,
1012,
1015,
1012,
1014,
1012,
1014,
1000,
1007,
1033,
4722,
10203,
7704,
2465,
10906,
1024,
3795,
1024,
1024,
2291,
1012,
9563,
1012,
5097,
18319,
3070,
19022,
11022,
1063,
2797,
10763,
10906,
12398,
7076,
26897,
1027,
1006,
1006,
10906,
1007,
1006,
3795,
1024,
1024,
2291,
1012,
9563,
1012,
5097,
18319,
3070,
19022,
11022,
1012,
25549,
1006,
2047,
30524,
1033,
1031,
3795,
1024,
1024,
2291,
1012,
16474,
2015,
1012,
2139,
8569,
13327,
8540,
20330,
16044,
19321,
3089,
8569,
2618,
1006,
1007,
1033,
1031,
3795,
1024,
1024,
2291,
1012,
9563,
1012,
12398,
21678,
2075,
10175,
5657,
19321,
3089,
8569,
2618,
1006,
1000,
1000,
1007,
1033,
2270,
5164,
2197,
20330,
1063,
2131,
1063,
2709,
1006,
1006,
5164,
1007,
1006,
2023,
1031,
1000,
2197,
20330,
1000,
1033,
1007,
1007,
1025,
1065,
2275,
1063,
2023,
1031,
1000,
2197,
20330,
1000,
1033,
1027,
3643,
1025,
1065,
1065,
1031,
3795,
1024,
1024,
2291,
1012,
9563,
1012,
5198,
16186,
5104,
18319,
13807,
4779,
3089,
8569,
2618,
1006,
30523,
10906,
1006,
1007,
1007,
1007,
1007,
1025,
2270,
10763,
10906,
12398,
1063,
2131,
1063,
2709,
12398,
7076,
26897,
1025,
1065,
1065,
1031,
3795,
1024,
1024,
2291,
1012,
9563,
1012,
5198,
16186,
5104,
18319,
13807,
4779,
3089,
8569,
2618,
1006,
1007,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
10906,
1006,
1007,
1007,
1007,
1007,
1025,
2270,
10763,
10906,
12398,
1063,
2131,
1063,
2709,
12398,
7076,
26897,
1025,
1065,
1065,
1031,
3795,
1024,
1024,
2291,
1012,
9563,
1012,
5198,
16186,
5104,
18319,
13807,
4779,
3089,
8569,
2618,
1006,
1007,
30526
] |
<?php
/*
* 2018 Romain CANON <romain.hydrocanon@gmail.com>
*
* This file is part of the TYPO3 Configuration Object project.
* It is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License, either
* version 3 of the License, or any later version.
*
* For the full copyright and license information, see:
* http://www.gnu.org/licenses/gpl-3.0.html
*/
namespace Romm\ConfigurationObject\Validation\Validator;
use Romm\ConfigurationObject\Core\Core;
use TYPO3\CMS\Extbase\Validation\Validator\AbstractValidator;
class ClassExistsValidator extends AbstractValidator
{
/**
* Checks if the value is an existing class.
*
* @param mixed $value The value that should be validated.
*/
public function isValid($value)
{
if (false === Core::get()->classExists($value)) {
$errorMessage = $this->translateErrorMessage('validator.class_exists.not_valid', 'configuration_object', [$value]);
$this->addError($errorMessage, 1457610460);
}
}
}
|
romm/configuration_object
|
Classes/Validation/Validator/ClassExistsValidator.php
|
PHP
|
gpl-3.0
| 1,066
|
[
30522,
1026,
1029,
25718,
1013,
1008,
1008,
2760,
12836,
2378,
9330,
1026,
12836,
2378,
1012,
18479,
23803,
2078,
1030,
20917,
4014,
1012,
4012,
1028,
1008,
1008,
2023,
5371,
2003,
2112,
1997,
1996,
5939,
6873,
2509,
9563,
4874,
2622,
1012,
1008,
30524,
2440,
9385,
1998,
6105,
2592,
1010,
2156,
1024,
1008,
8299,
1024,
1013,
1013,
7479,
1012,
27004,
1012,
8917,
1013,
15943,
1013,
14246,
2140,
1011,
1017,
1012,
1014,
1012,
16129,
1008,
1013,
3415,
15327,
17083,
2213,
1032,
9563,
16429,
20614,
1032,
27354,
1032,
9398,
8844,
1025,
2224,
17083,
2213,
1032,
9563,
16429,
20614,
1032,
4563,
1032,
4563,
1025,
2224,
5939,
6873,
2509,
1032,
4642,
2015,
1032,
4654,
2102,
15058,
1032,
27354,
1032,
9398,
8844,
1032,
10061,
10175,
8524,
4263,
1025,
2465,
2465,
10288,
5130,
10175,
8524,
4263,
8908,
10061,
10175,
8524,
4263,
1063,
1013,
1008,
1008,
1008,
14148,
2065,
1996,
3643,
2003,
2019,
4493,
2465,
1012,
1008,
1008,
1030,
11498,
2213,
3816,
1002,
3643,
1996,
3643,
2008,
2323,
2022,
9398,
4383,
1012,
1008,
1013,
2270,
3853,
2003,
10175,
3593,
1006,
1002,
3643,
1007,
1063,
2065,
1006,
6270,
1027,
1027,
1027,
4563,
1024,
1024,
2131,
1006,
1007,
1011,
1028,
2465,
10288,
5130,
1006,
1002,
3643,
1007,
1007,
1063,
1002,
7561,
7834,
3736,
3351,
1027,
1002,
2023,
1011,
1028,
17637,
2121,
29165,
7834,
3736,
3351,
1006,
1005,
9398,
8844,
1012,
2465,
1035,
6526,
1012,
2025,
1035,
9398,
1005,
1010,
1005,
9563,
1035,
4874,
1005,
1010,
1031,
1002,
3643,
1033,
1007,
1025,
1002,
2023,
1011,
1028,
5587,
2121,
29165,
1006,
1002,
7561,
7834,
3736,
3351,
1010,
13741,
2581,
2575,
10790,
21472,
2692,
1007,
1025,
1065,
1065,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
2009,
2003,
2489,
4007,
1025,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
2009,
1998,
1013,
2030,
19933,
2009,
1008,
2104,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2009,
2003,
2489,
4007,
1025,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
2009,
1998,
1013,
2030,
19933,
2009,
1008,
2104,
1996,
3408,
1997,
1996,
27004,
2236,
2270,
6105,
1010,
2593,
1008,
2544,
1017,
1997,
1996,
6105,
1010,
2030,
2151,
2101,
2544,
1012,
1008,
1008,
2005,
1996,
30526
] |
# Package tockloader.jlinkexe Documentation
Interface for boards using Segger's JLinkExe program.
All communication with the board is done using JLinkExe commands and scripts.
Different MCUs require different command line arguments so that the JLinkExe
tool knows which JTAG interface it is talking to. Since we don't want to burden
the user with specifying the board each time, we default to using a generic
cortex-m0 target, and use that to read the bootloader attributes to get the
correct version. Once we know more about the board we are talking to we use the
correct command line argument for future communication.
## Class JLinkExe
Base class for interacting with hardware boards. All of the class functions
should be overridden to support a new method of interacting with a board.
### \_\_init\_\_
```py
def __init__(self, args)
```
Initialize self. See help(type(self)) for accurate signature.
### attached\_board\_exists
```py
def attached_board_exists(self)
```
For this particular board communication channel, check if there appears
to be a valid board attached to the host that tockloader can communicate
with.
### bootloader\_is\_present
```py
def bootloader_is_present(self)
```
Check for the Tock bootloader. Returns `True` if it is present, `False`
if not, and `None` if unsure.
### determine\_current\_board
```py
def determine_current_board(self)
```
Figure out which board we are connected to. Most likely done by reading
the attributes. Doesn't return anything.
### enter\_bootloader\_mode
```py
def enter_bootloader_mode(self)
```
Get to a mode where we can read & write flash.
### erase\_page
```py
def erase_page(self, address)
```
Erase a specific page of internal flash.
### exit\_bootloader\_mode
```py
def exit_bootloader_mode(self)
```
Get out of bootloader mode and go back to running main code.
### flash\_binary
```py
def flash_binary(self, address, binary)
```
Write using JTAG
### get\_all\_attributes
```py
def get_all_attributes(self)
```
Get all attributes on a board. Returns an array of attribute dicts.
### get\_apps\_start\_address
```py
def get_apps_start_address(self)
```
Return the address in flash where applications start on this platform.
This might be set on the board itself, in the command line arguments
to Tockloader, or just be the default.
### get\_attribute
```py
def get_attribute(self, index)
```
Get a single attribute. Returns a dict with two keys: `key` and `value`.
### get\_board\_arch
```py
def get_board_arch(self)
```
Return the architecture of the board we are connected to.
### get\_board\_name
```py
def get_board_name(self)
```
Return the name of the board we are connected to.
### get\_bootloader\_version
```py
def get_bootloader_version(self)
```
Return the version string of the bootloader. Should return a value
like `0.5.0`, or `None` if it is unknown.
### get\_kernel\_version
```py
def get_kernel_version(self)
```
Return the kernel ABI version installed on the board. If the version
cannot be determined, return `None`.
### get\_page\_size
```py
def get_page_size(self)
```
Return the size of the page in bytes for the connected board.
### open\_link\_to\_board
```py
def open_link_to_board(self)
```
Open a connection to the board.
### print\_known\_boards
```py
def print_known_boards(self)
```
Display the boards that have settings configured in tockloader.
### read\_range
```py
def read_range(self, address, length)
```
Read a specific range of flash.
If this fails for some reason this should return an empty binary array.
### run\_terminal
```py
def run_terminal(self)
```
Use JLinkRTTClient to listen for RTT messages.
### set\_attribute
```py
def set_attribute(self, index, raw)
```
Set a single attribute.
### set\_start\_address
```py
def set_start_address(self, address)
```
Set the address the bootloader jumps to to start the actual code.
### \_configure\_from\_known\_boards
```py
def _configure_from_known_boards(self)
```
If we know the name of the board we are interfacing with, this function
tries to use the `KNOWN_BOARDS` array to populate other needed settings
if they have not already been set from other methods.
This can be used in multiple locations. First, it is used when
tockloader first starts because if a user passes in the `--board`
argument then we know the board and can try to pull in settings from
KNOWN_BOARDS. Ideally, however, the user doesn't have to pass in any
arguments, but then we won't know what board until after we have had a
chance to read its attributes. The board at least needs the "board"
attribute to be set, and then we can use KNOWN_BOARDS to fill in the
rest.
### \_decode\_attribute
```py
def _decode_attribute(self, raw)
```
### \_get\_tockloader\_board\_from\_emulators
```py
def _get_tockloader_board_from_emulators(self, emulators)
```
Returns None or a board name if we can parse the emulators list
and find a valid board.
### \_list\_emulators
```py
def _list_emulators(self)
```
Retrieve a list of JLink compatible devices.
### \_run\_jtag\_commands
```py
def _run_jtag_commands(self, commands, binary, write=True)
```
- `commands`: List of JLinkExe commands. Use {binary} for where the name
of the binary file should be substituted.
- `binary`: A bytes() object that will be used to write to the board.
- `write`: Set to true if the command writes binaries to the board. Set
to false if the command will read bits from the board.
|
helena-project/tockloader
|
docs/jlinkexe.md
|
Markdown
|
mit
| 5,576
|
[
30522,
1001,
7427,
2000,
3600,
11066,
2121,
1012,
1046,
13767,
10288,
2063,
12653,
8278,
2005,
7923,
2478,
7367,
13327,
1005,
1055,
1046,
13767,
10288,
2063,
2565,
1012,
2035,
4807,
2007,
1996,
2604,
2003,
2589,
2478,
1046,
13767,
10288,
2063,
10954,
1998,
14546,
1012,
2367,
11338,
2271,
5478,
2367,
3094,
2240,
9918,
2061,
2008,
1996,
1046,
13767,
10288,
2063,
6994,
4282,
2029,
1046,
15900,
8278,
2009,
2003,
3331,
2000,
1012,
2144,
2057,
2123,
1005,
1056,
2215,
2000,
10859,
1996,
5310,
2007,
20648,
2075,
1996,
2604,
2169,
2051,
1010,
2057,
12398,
2000,
2478,
1037,
12391,
17132,
1011,
1049,
2692,
4539,
1010,
1998,
2224,
2008,
2000,
3191,
1996,
9573,
11066,
2121,
12332,
2000,
2131,
1996,
6149,
2544,
1012,
2320,
2057,
2113,
2062,
2055,
1996,
2604,
2057,
2024,
3331,
2000,
2057,
2224,
1996,
6149,
3094,
2240,
6685,
2005,
2925,
4807,
1012,
1001,
1001,
2465,
1046,
13767,
10288,
2063,
2918,
2465,
2005,
21935,
2007,
8051,
7923,
1012,
2035,
1997,
1996,
2465,
4972,
2323,
2022,
2058,
14615,
4181,
2000,
2490,
1037,
2047,
4118,
1997,
21935,
2007,
1037,
2604,
1012,
1001,
1001,
1001,
1032,
1035,
1032,
1035,
1999,
4183,
1032,
1035,
1032,
1035,
1036,
1036,
1036,
1052,
2100,
13366,
1035,
1035,
1999,
4183,
1035,
1035,
1006,
2969,
1010,
12098,
5620,
1007,
1036,
1036,
1036,
3988,
4697,
2969,
1012,
2156,
2393,
1006,
2828,
1006,
2969,
1007,
1007,
2005,
8321,
8085,
1012,
1001,
1001,
1001,
4987,
1032,
1035,
2604,
1032,
1035,
6526,
1036,
1036,
1036,
1052,
2100,
13366,
4987,
1035,
2604,
1035,
6526,
1006,
2969,
1007,
1036,
1036,
1036,
2005,
2023,
3327,
2604,
4807,
3149,
1010,
4638,
2065,
2045,
3544,
2000,
2022,
1037,
9398,
2604,
4987,
2000,
1996,
3677,
2008,
2000,
3600,
11066,
2121,
2064,
10639,
2007,
1012,
1001,
1001,
1001,
9573,
11066,
2121,
1032,
1035,
2003,
1032,
1035,
2556,
1036,
1036,
1036,
1052,
2100,
13366,
9573,
30524,
1012,
1001,
1001,
1001,
5646,
1032,
1035,
2783,
1032,
1035,
2604,
1036,
1036,
1036,
1052,
2100,
13366,
5646,
1035,
2783,
1035,
2604,
1006,
2969,
1007,
1036,
1036,
1036,
3275,
2041,
2029,
2604,
2057,
2024,
4198,
2000,
1012,
2087,
3497,
2589,
2011,
3752,
1996,
12332,
1012,
2987,
1005,
1056,
2709,
2505,
1012,
1001,
1001,
1001,
4607,
1032,
1035,
9573,
11066,
2121,
1032,
1035,
5549,
1036,
1036,
1036,
1052,
2100,
13366,
4607,
1035,
9573,
11066,
2121,
1035,
5549,
1006,
2969,
1007,
1036,
1036,
1036,
2131,
2000,
1037,
5549,
2073,
2057,
2064,
3191,
1004,
4339,
5956,
1012,
1001,
1001,
1001,
22505,
1032,
1035,
3931,
1036,
1036,
1036,
1052,
2100,
13366,
22505,
1035,
3931,
1006,
2969,
1010,
4769,
1007,
1036,
1036,
1036,
22505,
1037,
3563,
3931,
1997,
4722,
5956,
1012,
1001,
1001,
1001,
6164,
1032,
1035,
9573,
11066,
2121,
1032,
1035,
5549,
1036,
1036,
1036,
1052,
2100,
13366,
6164,
1035,
9573,
11066,
2121,
1035,
5549,
1006,
2969,
1007,
1036,
1036,
1036,
2131,
2041,
30523,
11066,
2121,
1035,
2003,
1035,
2556,
1006,
2969,
1007,
1036,
1036,
1036,
4638,
2005,
1996,
2000,
3600,
9573,
11066,
2121,
1012,
5651,
1036,
2995,
1036,
2065,
2009,
2003,
2556,
1010,
1036,
6270,
1036,
2065,
2025,
1010,
1998,
1036,
3904,
1036,
2065,
12422,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
11066,
2121,
1035,
2003,
1035,
2556,
1006,
2969,
1007,
1036,
1036,
1036,
4638,
2005,
1996,
2000,
3600,
9573,
11066,
2121,
1012,
5651,
1036,
2995,
1036,
2065,
2009,
2003,
2556,
1010,
1036,
6270,
1036,
2065,
2025,
1010,
1998,
1036,
3904,
1036,
2065,
12422,
30526
] |
function init(){
listar();
calcular();
}
function calcular(){
var tabla=$('#tbllistado').DataTable({
"paging": false,
"bInfo" : false,
"searching": false,
"bLengthChange": false //used to hide the property
});
/*FUNCION QUE DETECTA EL CLICK Y EL ID DE LA FILA*/
/*
$('#tbllistado').on('click', 'tr', function () {
var id = tabla.row(this).id();
alert('Clicked row id ' + id);
});*/
var total = 0;
var totalFeriado = 0;
/*FUNCION QUE DETECTA EL CHANGE Y EL VALOR PARA CANT*/
$('#tbllistado').on('change', '.normal', function () {
var id = $(this).val();
/*DESACTIVAMOS EL INPUT*/
$(this).prop('disabled', true);
var neto = parseInt($(this).parent().parent().find(".neto").html(), 10);
var monto = id*neto;
total = total+monto;
totalFeriado = total+(total*0.20);
$("#total").html('Normal: '+total+' / Feriado: '+totalFeriado);
});
}
function listar(){
$.post('controllers/tarifas.php?op=listarHTML',function(respuesta){
$("#contenido").html(respuesta);
});
}
init();
|
transmarim/sigtsm
|
vistas/js/calculadora.js
|
JavaScript
|
mit
| 1,157
|
[
30522,
3853,
1999,
4183,
1006,
1007,
1063,
2862,
2906,
1006,
1007,
1025,
10250,
15431,
1006,
1007,
1025,
1065,
3853,
10250,
15431,
1006,
1007,
1063,
13075,
21628,
2721,
1027,
1002,
1006,
1005,
1001,
26419,
21711,
17713,
2080,
1005,
1007,
1012,
2951,
10880,
1006,
1063,
1000,
6643,
4726,
1000,
1024,
6270,
1010,
1000,
8026,
14876,
1000,
1024,
6270,
1010,
1000,
6575,
1000,
1024,
6270,
1010,
1000,
1038,
7770,
13512,
16257,
18003,
2063,
1000,
1024,
6270,
1013,
1013,
2109,
2000,
5342,
1996,
3200,
1065,
1007,
1025,
1013,
1008,
4569,
10446,
10861,
11487,
2050,
3449,
11562,
1061,
3449,
8909,
2139,
2474,
10882,
2721,
1008,
1013,
1013,
1008,
1002,
1006,
1005,
1001,
26419,
21711,
17713,
2080,
1005,
1007,
1012,
2006,
1006,
1005,
11562,
1005,
1010,
1005,
19817,
1005,
1010,
3853,
1006,
1007,
1063,
13075,
8909,
1027,
21628,
2721,
1012,
5216,
1006,
2023,
1007,
1012,
8909,
1006,
1007,
1025,
9499,
1006,
1005,
13886,
5216,
8909,
1005,
1009,
8909,
1007,
1025,
1065,
1007,
1025,
1008,
1013,
13075,
2561,
1027,
1014,
1025,
13075,
2561,
7512,
28665,
2080,
1027,
1014,
1025,
1013,
1008,
4569,
10446,
10861,
11487,
2050,
3449,
2689,
1061,
3449,
27314,
11498,
2064,
2102,
1008,
1013,
1002,
1006,
1005,
1001,
26419,
21711,
17713,
2080,
1005,
1007,
1012,
2006,
1006,
1005,
2689,
1005,
1010,
1005,
1012,
3671,
1005,
1010,
3853,
1006,
1007,
1063,
13075,
8909,
1027,
1002,
1006,
2023,
1007,
1012,
11748,
1006,
1007,
1025,
1013,
1008,
4078,
18908,
11444,
15530,
3449,
7953,
1008,
1013,
1002,
1006,
2023,
1007,
1012,
17678,
1006,
1005,
9776,
1005,
1010,
2995,
1007,
1025,
13075,
5658,
2080,
1027,
11968,
20240,
3372,
1006,
1002,
1006,
2023,
1007,
1012,
6687,
1006,
1007,
1012,
6687,
1006,
1007,
1012,
2424,
1006,
1000,
1012,
5658,
2080,
1000,
1007,
1012,
16129,
1006,
1007,
1010,
2184,
1007,
1025,
13075,
18318,
2080,
1027,
8909,
1008,
5658,
2080,
1025,
2561,
1027,
2561,
1009,
18318,
2080,
1025,
2561,
7512,
28665,
2080,
1027,
2561,
1009,
1006,
2561,
1008,
1014,
1012,
2322,
1007,
1025,
1002,
1006,
1000,
1001,
2561,
1000,
1007,
1012,
16129,
1006,
1005,
3671,
1024,
1005,
1009,
2561,
1009,
1005,
1013,
10768,
4360,
3527,
1024,
1005,
1009,
2561,
7512,
28665,
2080,
1007,
1025,
1065,
1007,
1025,
1065,
3853,
2862,
2906,
1006,
1007,
1063,
1002,
1012,
2695,
1006,
1005,
21257,
1013,
16985,
10128,
3022,
1012,
25718,
1029,
6728,
1027,
2862,
2906,
11039,
19968,
1005,
1010,
3853,
1006,
24501,
14289,
4355,
2050,
1007,
1063,
1002,
1006,
1000,
1001,
9530,
6528,
13820,
1000,
1007,
1012,
16129,
1006,
24501,
14289,
4355,
2050,
1007,
1025,
1065,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1007,
1025,
1065,
1999,
4183,
1006,
1007,
1025,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
<?php
/*
* This file is part of the codeliner/ginger-core.
* (c) Alexander Miertsch <kontakt@codeliner.ws>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*
* Date: 08.02.14 - 21:14
*/
namespace GingerCoreTest\Model\JsonWDL\Action;
use GingerCore\Model\JsonWDL\Action\StructureDefinition;
use GingerCore\Model\JsonWDL\Action\StructureItem;
use GingerCoreTest\TestCase;
/**
* Class StructureDefinitionTest
*
* @package GingerCoreTest\Model\JsonWDL\Action
* @author Alexander Miertsch <kontakt@codeliner.ws>
*/
class StructureDefinitionTest extends TestCase
{
/**
* @test
*/
public function is_return_a_sorted_structureItems_collection()
{
$structureItemCollection = array(
new StructureItem('b', StructureDefinition::STRING),
new StructureItem('a.b', StructureDefinition::HASHTABLE),
new StructureItem('a', StructureDefinition::HASHTABLE),
new StructureItem('a.b.c', StructureDefinition::STRING)
);
$structureDefinition = new StructureDefinition($structureItemCollection);
$sortedPaths = array('a', 'a.b', 'a.b.c', 'b');
foreach($structureDefinition->structureItems() as $structureItem) {
$this->assertInstanceOf('GingerCore\Model\JsonWDL\Action\StructureItem', $structureItem);
$this->assertEquals(array_shift($sortedPaths), $structureItem->pathWithKey());
}
}
/**
* @test
*/
public function is_sub_item_collection()
{
$structureItemCollection = array(
new StructureItem('b', StructureDefinition::STRING),
new StructureItem('a.b', StructureDefinition::HASHTABLE),
new StructureItem('a', StructureDefinition::HASHTABLE),
new StructureItem('a.b.c', StructureDefinition::STRING)
);
$structureDefinition = new StructureDefinition($structureItemCollection);
$aStructureItem = new StructureItem('a', StructureDefinition::HASHTABLE);
$subItemCollection = $structureDefinition->subStructureItemsOf($aStructureItem);
$this->assertEquals(2, count($subItemCollection));
foreach($subItemCollection as $subStructureItem) {
$this->assertTrue($subStructureItem->isSubItemOf($aStructureItem));
}
}
/**
* @test
*/
public function is_same_value_as()
{
$structureItemCollection = array(
new StructureItem('b', StructureDefinition::STRING),
new StructureItem('a.b', StructureDefinition::HASHTABLE),
new StructureItem('a', StructureDefinition::HASHTABLE),
new StructureItem('a.b.c', StructureDefinition::STRING)
);
$structureDefinition = new StructureDefinition($structureItemCollection);
$sameStructureDefinition = new StructureDefinition($structureItemCollection);
$this->assertTrue($structureDefinition->sameValueAs($sameStructureDefinition));
}
/**
* @test
*/
public function is_not_same_value_as()
{
$structureItemCollection = array(
new StructureItem('b', StructureDefinition::STRING),
new StructureItem('a.b', StructureDefinition::HASHTABLE),
new StructureItem('a', StructureDefinition::HASHTABLE),
new StructureItem('a.b.c', StructureDefinition::STRING)
);
$structureDefinition = new StructureDefinition($structureItemCollection);
unset($structureItemCollection[0]);
$structureItemCollection[] = new StructureItem('c', StructureDefinition::STRING);
$otherStructureDefinition = new StructureDefinition($structureItemCollection);
$this->assertFalse($structureDefinition->sameValueAs($otherStructureDefinition));
}
/**
* @test
*/
public function is_path_valueType_list()
{
$structureItemCollection = array(
new StructureItem('b', StructureDefinition::STRING),
new StructureItem('a.b', StructureDefinition::HASHTABLE),
new StructureItem('a', StructureDefinition::HASHTABLE),
new StructureItem('a.b.c', StructureDefinition::STRING)
);
$structureDefinition = new StructureDefinition($structureItemCollection);
$this->assertEquals(
array(
'a' => StructureDefinition::HASHTABLE,
'a.b' => StructureDefinition::HASHTABLE,
'a.b.c' => StructureDefinition::STRING,
'b' => StructureDefinition::STRING,
),
$structureDefinition->toArray()
);
}
/**
* @test
*/
public function is_structure_definition_from_path_valueType_list()
{
$structureDefinition = StructureDefinition::fromPathValueTypeList(
array(
'a' => StructureDefinition::HASHTABLE,
'a.b' => StructureDefinition::HASHTABLE,
'a.b.c' => StructureDefinition::STRING,
'b' => StructureDefinition::STRING,
)
);
$this->assertEquals(
array(
'a' => StructureDefinition::HASHTABLE,
'a.b' => StructureDefinition::HASHTABLE,
'a.b.c' => StructureDefinition::STRING,
'b' => StructureDefinition::STRING,
),
$structureDefinition->toArray()
);
}
}
|
gingerwfms/ginger-core
|
tests/GingerCoreTest/Model/JsonWDL/Action/StructureDefinitionTest.php
|
PHP
|
bsd-3-clause
| 5,509
|
[
30522,
1026,
1029,
25718,
1013,
1008,
1008,
2023,
5371,
2003,
2112,
1997,
1996,
3642,
20660,
1013,
14580,
1011,
4563,
1012,
1008,
1006,
1039,
1007,
3656,
2771,
8743,
11624,
1026,
12849,
12380,
25509,
1030,
3642,
20660,
1012,
1059,
2015,
1028,
1008,
1008,
2005,
1996,
2440,
9385,
1998,
6105,
2592,
1010,
3531,
3193,
1996,
6105,
1008,
5371,
2008,
2001,
5500,
2007,
2023,
3120,
3642,
1012,
1008,
1008,
3058,
1024,
5511,
1012,
6185,
1012,
2403,
1011,
2538,
1024,
2403,
1008,
1013,
3415,
15327,
14580,
17345,
22199,
1032,
2944,
1032,
1046,
3385,
21724,
2140,
1032,
2895,
1025,
2224,
14580,
17345,
1032,
2944,
1032,
1046,
3385,
21724,
2140,
1032,
2895,
1032,
14336,
12879,
5498,
3508,
1025,
2224,
14580,
17345,
1032,
2944,
1032,
1046,
3385,
21724,
2140,
1032,
2895,
1032,
3252,
4221,
2213,
1025,
2224,
14580,
17345,
22199,
1032,
3231,
18382,
1025,
1013,
1008,
1008,
1008,
2465,
14336,
12879,
5498,
3508,
22199,
1008,
1008,
1030,
7427,
14580,
17345,
22199,
1032,
2944,
1032,
1046,
3385,
21724,
2140,
1032,
2895,
1008,
1030,
3166,
3656,
2771,
8743,
11624,
1026,
12849,
12380,
25509,
1030,
3642,
20660,
1012,
1059,
2015,
1028,
1008,
1013,
2465,
14336,
12879,
5498,
3508,
22199,
8908,
3231,
18382,
1063,
1013,
1008,
1008,
1008,
1030,
3231,
1008,
1013,
2270,
3853,
2003,
1035,
2709,
1035,
1037,
1035,
19616,
1035,
3252,
4221,
5244,
1035,
3074,
1006,
1007,
1063,
1002,
3252,
4221,
12458,
14511,
18491,
1027,
9140,
1006,
2047,
3252,
4221,
2213,
1006,
1005,
1038,
1005,
1010,
14336,
12879,
5498,
3508,
1024,
1024,
5164,
1007,
1010,
2047,
3252,
4221,
2213,
1006,
1005,
1037,
1012,
1038,
1005,
1010,
14336,
12879,
5498,
3508,
1024,
1024,
23325,
10880,
1007,
1010,
2047,
3252,
4221,
2213,
1006,
1005,
1037,
1005,
1010,
14336,
12879,
5498,
3508,
1024,
1024,
23325,
10880,
1007,
1010,
2047,
3252,
4221,
2213,
1006,
1005,
1037,
1012,
1038,
1012,
1039,
1005,
1010,
14336,
12879,
5498,
3508,
1024,
1024,
5164,
1007,
1007,
1025,
1002,
14336,
12879,
5498,
3508,
1027,
2047,
14336,
12879,
5498,
3508,
1006,
1002,
3252,
4221,
12458,
14511,
18491,
1007,
1025,
1002,
19616,
15069,
2015,
1027,
9140,
1006,
1005,
1037,
1005,
1010,
1005,
1037,
1012,
1038,
1005,
1010,
1005,
1037,
1012,
30524,
1032,
2944,
1032,
1046,
3385,
21724,
2140,
1032,
2895,
1032,
3252,
4221,
2213,
1005,
1010,
1002,
3252,
4221,
2213,
1007,
1025,
1002,
2023,
1011,
1028,
20865,
2063,
26426,
2015,
1006,
9140,
1035,
5670,
1006,
1002,
19616,
15069,
2015,
1007,
1010,
1002,
3252,
4221,
2213,
1011,
1028,
4130,
24415,
14839,
1006,
1007,
1007,
1025,
1065,
1065,
1013,
1008,
1008,
1008,
1030,
3231,
1008,
1013,
2270,
3853,
2003,
1035,
4942,
1035,
8875,
1035,
3074,
1006,
1007,
1063,
1002,
3252,
4221,
12458,
14511,
18491,
1027,
9140,
1006,
2047,
3252,
4221,
2213,
1006,
1005,
1038,
1005,
1010,
14336,
12879,
5498,
3508,
1024,
1024,
5164,
1007,
1010,
2047,
3252,
4221,
2213,
1006,
30523,
1038,
1012,
1039,
1005,
1010,
1005,
1038,
1005,
1007,
1025,
18921,
6776,
1006,
1002,
14336,
12879,
5498,
3508,
1011,
1028,
3252,
4221,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1038,
1012,
1039,
1005,
1010,
1005,
1038,
1005,
1007,
1025,
18921,
6776,
1006,
1002,
14336,
12879,
5498,
3508,
1011,
1028,
3252,
4221,
5244,
1006,
1007,
2004,
1002,
3252,
4221,
2213,
1007,
1063,
1002,
2023,
1011,
1028,
20865,
7076,
26897,
11253,
1006,
1005,
14580,
17345,
30526
] |
package main
/*
* CSCI 4229 Assignment 5: Lighting
*
* Author: Zach Anders
*
* Some code derived from CSCI 4229 Examples 9, 10, and 13 (ex9.c, ex10.c, ex13.c)
*
* Code for 2D text display (due to missing windowpos2i) based off some example code
* at http://programmingexamples.net/wiki/OpenGL/Text
*/
import (
"actor"
"entity"
"math/rand"
"os"
"runtime"
"time"
"glutil"
"util"
"world"
"github.com/go-gl/gl"
"github.com/ianremmler/ode"
"github.com/rhencke/glut"
)
var renderQueue util.RenderQueue = util.NewEmptyRenderQueue()
//var currentCamera = CreateDefaultViewport()
var my_world = world.NewWorld()
var player = actor.NewPlayer(&my_world, glutil.Point3D{0, 0, 0}, 5)
var light actor.OrbitActor
var currentMouse = glutil.CreateMouseState()
// Normal order:
//Translate -> Rotate -> Scale
// Creates the display function
func DisplayFunc() {
gl.Clear(gl.COLOR_BUFFER_BIT | gl.DEPTH_BUFFER_BIT)
gl.Enable(gl.DEPTH_TEST)
gl.LoadIdentity()
// currentCamera.PositionSelf()
player.PositionSelf()
my_world.Tick()
renderQueue.RenderAll()
gl.Disable(gl.DEPTH_TEST)
gl.Disable(gl.LIGHTING)
gl.Color3f(.9, .9, .9)
glutil.Print2d(5, 35, "Keys: W,S,A,D : Move Around | Q / E : Move Light left/right | L : Toggle light rotation")
glutil.Print2d(5, 20, "Click and Drag: Rotate | Arrow keys: Rotate")
glutil.Print2d(5, 5, "%s", player.ToString())
gl.Flush()
glut.SwapBuffers()
}
// Creates the key handler function
func KeyDownFunc(ch byte, x int, y int) {
switch ch {
case 27:
os.Exit(0)
break
case 's':
player.Translate(-2.5, 0.0, 0.0)
break
case 'w':
player.Translate(2.5, 0.0, 0.0)
break
case 'd':
player.Translate(0.0, 0.0, -2.5)
break
case 'a':
player.Translate(0.0, 0.0, 2.5)
break
case 'q':
light.AdjustAngle(-5)
break
case 'e':
light.AdjustAngle(5)
break
case 'l':
light.Toggle()
break
}
glut.PostRedisplay()
}
// Creates the special key handler function
func SpecialFunc(key int, x int, y int) {
// Phi: Elevation, Theta: Azimuth
if key == glut.KEY_RIGHT {
player.Rotate(10, 0)
} else if key == glut.KEY_LEFT {
player.Rotate(-10, 0)
} else if key == glut.KEY_UP {
player.Rotate(0, 10)
} else if key == glut.KEY_DOWN {
player.Rotate(0, -10)
}
// Tell GLUT it is necessary to redisplay the scene
glut.PostRedisplay()
}
func MouseMotion(x, y int) {
if currentMouse.LeftDown {
horiz_delta := currentMouse.X - x
vert_delta := currentMouse.Y - y
player.Rotate(int32(horiz_delta)/-5, int32(vert_delta)/5)
player.ImmediateLook()
}
currentMouse.X, currentMouse.Y = x, y
}
func MouseDown(button, state, x, y int) {
currentMouse.X, currentMouse.Y = x, y
switch button {
case glut.LEFT_BUTTON:
currentMouse.LeftDown = (state == glut.DOWN)
break
case glut.MIDDLE_BUTTON:
currentMouse.MiddleDown = (state == glut.DOWN)
break
case glut.RIGHT_BUTTON:
currentMouse.RightDown = (state == glut.DOWN)
break
}
}
/*
* GLUT calls this routine when the window is resized
*/
func Reshape(width int, height int) {
asp := float64(1)
// Ratio of the width to the height of the window
if height > 0 {
asp = float64(width) / float64(height)
}
// Set the viewport to the entire window
gl.Viewport(0, 0, width, height)
player.GetProjection().AspectRatio = asp
player.GetProjection().SetProjectionMatrix()
}
// Idler function. Called whenever GLUT is idle.
func IdleFunc() {
s_time := glut.Get(glut.ELAPSED_TIME)
glut.PostRedisplay()
e_time := glut.Get(glut.ELAPSED_TIME) - s_time
if e_time < 33 {
time.Sleep(time.Duration(33-e_time) * time.Millisecond)
}
}
func setup() {
lightsource := actor.NewBallLight(&my_world, glutil.Point3D{15, 15, 15})
renderQueue.AddNamed(&lightsource, "light")
light = actor.NewOrbitActor(&my_world, &lightsource, glutil.Point3D{0, 15, 0}, 50)
my_world.AddActor(&light)
rand.Seed(0x12345 + 8)
my_world.AddActor(&player)
block := actor.NewBlock(&my_world, glutil.Point3D{22, 0, 0}, glutil.Point3D{10, 20.5, 20}, glutil.Color4D{.5, .3, .1, 1})
my_world.AddActor(&block)
renderQueue.Add(&block)
tmpList := []actor.OrbitActor{}
for i := 0; i < 250; i++ {
speed := rand.Intn(3)
//radius := rand.Intn(50) + 125
radius := 100
x, y, z := float64(rand.Intn(10)-5), float64(rand.Intn(10)-5), float64(rand.Intn(150)-75)
angle := float64(rand.Intn(360))
//cylinder := NewCylinder(&my_world, glutil.Point3D{x, y + 30, z}, 1, 4)
cylinder := actor.NewBlock(&my_world, glutil.Point3D{x, y + 30, z}, glutil.Point3D{.1, .1, .1}, glutil.Color4D{.8, .8, .8, .05})
tmpList = append(tmpList, actor.NewOrbitActor(&my_world, &cylinder, glutil.Point3D{x, y + 0, z}, float64(radius)))
tmpList[i].SetSpeed(int32(speed))
tmpList[i].SetAngle(int32(angle))
tmpList[i].SetAxis(glutil.Point3D{0, 0, 1})
renderQueue.Add(&cylinder)
my_world.AddActor(&tmpList[i])
}
// Create castle
//myCastle := NewCastle()
//renderQueue.AddNamed(&myCastle, "castle")
// Create ground
ground := entity.NewXYPlane(glutil.Point3D{100, 0, 100}, glutil.Point3D{-100, 0, -100}, 0)
ground.SetColor(glutil.Color4D{0.4313725490 * .7, 0.24705882 * .7, 0.098039215 * .7, 1})
ground.SetPolygonOffset(1.0)
renderQueue.Add(&ground)
my_world.AddEntity(&ground.Box)
stairs := actor.NewStairs(&my_world, glutil.Point3D{0, 0, 0})
renderQueue.Add(&stairs)
scale := float64(200)
for i := 0; i < 100; i++ {
x := (rand.Float64() * scale) - (scale / 2)
z := (rand.Float64() * scale) - (scale / 2)
x_scale, z_scale := (rand.Float64()/2)+.75, (rand.Float64()/2)+.75
y_scale := (rand.Float64() * 1) + .75
if (x < -5 || x > 20) && (z < -5 || z > 20) {
tree1 := entity.NewTree(glutil.Point3D{x, 0, z}, x_scale, y_scale, z_scale)
renderQueue.Add(&tree1)
}
}
// Put camera somewhere
//currentCamera.Translate(5, -5, 28)
player.Translate(10, 0, -20)
player.ImmediateJump() // Skip interpolation
player.Rotate(-120, 0)
player.ImmediateLook() // Skip interpolation
}
func main() {
// Let go use 2 threads
runtime.GOMAXPROCS(2)
// Init
glut.InitDisplayMode(glut.RGB | glut.DOUBLE | glut.DEPTH)
glut.InitWindowSize(750, 750)
glut.CreateWindow("Zach Anders - Assignment 5")
setup()
// Display Callbacks
glut.DisplayFunc(DisplayFunc)
glut.IdleFunc(IdleFunc)
glut.ReshapeFunc(Reshape)
// Input Callbacks
glut.SpecialFunc(SpecialFunc)
glut.KeyboardFunc(KeyDownFunc)
glut.MotionFunc(MouseMotion)
glut.MouseFunc(MouseDown)
glut.MainLoop()
}
|
ZachAnders/Graphics_HW5_lighting
|
src/main/scene_main.go
|
GO
|
bsd-3-clause
| 6,411
|
[
30522,
7427,
2364,
1013,
1008,
1008,
20116,
6895,
29269,
2683,
8775,
1019,
1024,
7497,
1008,
1008,
3166,
1024,
12397,
15387,
1008,
1008,
2070,
3642,
5173,
2013,
20116,
6895,
29269,
2683,
4973,
1023,
1010,
2184,
1010,
1998,
2410,
1006,
4654,
2683,
1012,
1039,
1010,
4654,
10790,
1012,
1039,
1010,
4654,
17134,
1012,
1039,
1007,
1008,
1008,
3642,
2005,
14134,
3793,
4653,
1006,
2349,
2000,
4394,
3332,
6873,
2015,
2475,
2072,
1007,
2241,
2125,
2070,
2742,
3642,
1008,
2012,
8299,
1024,
1013,
1013,
4730,
10288,
16613,
4244,
1012,
5658,
1013,
15536,
3211,
1013,
2330,
23296,
1013,
3793,
1008,
1013,
12324,
1006,
1000,
3364,
1000,
1000,
9178,
1000,
1000,
8785,
1013,
14566,
1000,
1000,
9808,
1000,
1000,
2448,
7292,
1000,
1000,
2051,
1000,
1000,
1043,
7630,
3775,
2140,
1000,
1000,
21183,
4014,
1000,
1000,
2088,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
2175,
1011,
1043,
2140,
1013,
1043,
2140,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
4775,
28578,
18602,
1013,
24040,
1000,
1000,
21025,
2705,
12083,
1012,
4012,
1013,
1054,
10222,
19869,
1013,
1043,
7630,
2102,
1000,
1007,
13075,
17552,
4226,
5657,
21183,
4014,
1012,
17552,
4226,
5657,
1027,
21183,
4014,
1012,
2047,
6633,
13876,
16363,
11563,
4226,
5657,
1006,
1007,
1013,
1013,
13075,
2783,
28727,
6906,
1027,
2580,
12879,
23505,
8584,
6442,
1006,
1007,
13075,
2026,
1035,
2088,
1027,
2088,
1012,
2047,
11108,
1006,
1007,
13075,
2447,
1027,
3364,
1012,
2047,
13068,
2121,
1006,
1004,
2026,
1035,
2088,
1010,
1043,
7630,
3775,
2140,
1012,
2391,
29097,
1063,
1014,
1010,
1014,
1010,
1014,
1065,
1010,
1019,
1007,
13075,
2422,
3364,
1012,
8753,
18908,
2953,
13075,
2783,
27711,
2063,
1027,
1043,
7630,
3775,
2140,
1012,
3443,
27711,
4355,
3686,
1006,
1007,
1013,
1013,
3671,
2344,
1024,
1013,
1013,
17637,
1011,
1028,
24357,
1011,
1028,
4094,
1013,
1013,
9005,
1996,
4653,
3853,
4569,
2278,
4653,
11263,
12273,
1006,
1007,
1063,
1043,
2140,
1012,
3154,
1006,
1043,
2140,
1012,
3609,
1035,
17698,
1035,
2978,
1064,
1043,
2140,
1012,
5995,
1035,
17698,
1035,
2978,
1007,
1043,
2140,
1012,
9585,
1006,
1043,
2140,
1012,
5995,
1035,
3231,
1007,
1043,
2140,
1012,
7170,
5178,
16778,
3723,
1006,
1007,
1013,
1013,
2783,
28727,
6906,
1012,
4460,
2884,
2546,
1006,
1007,
2447,
1012,
4460,
2884,
2546,
1006,
1007,
2026,
1035,
2088,
1012,
16356,
1006,
1007,
17552,
4226,
5657,
1012,
17552,
8095,
1006,
1007,
1043,
2140,
1012,
4487,
19150,
1006,
1043,
2140,
1012,
5995,
1035,
3231,
1007,
1043,
2140,
1012,
4487,
19150,
1006,
1043,
2140,
1012,
7497,
1007,
1043,
2140,
1012,
3609,
2509,
2546,
1006,
1012,
1023,
1010,
1012,
1023,
1010,
1012,
1023,
1007,
1043,
7630,
3775,
2140,
1012,
6140,
2475,
2094,
1006,
1019,
1010,
3486,
1010,
1000,
6309,
1024,
1059,
1010,
1055,
1010,
1037,
1010,
30524,
2422,
2187,
1013,
2157,
1064,
1048,
1024,
2000,
24679,
2422,
9963,
1000,
1007,
1043,
7630,
3775,
2140,
1012,
6140,
2475,
2094,
1006,
1019,
1010,
2322,
1010,
1000,
11562,
1998,
8011,
1024,
24357,
1064,
8612,
6309,
1024,
24357,
1000,
1007,
1043,
7630,
3775,
2140,
30523,
1040,
1024,
2693,
2105,
1064,
1053,
1013,
1041,
1024,
2693,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1040,
1024,
2693,
2105,
1064,
1053,
1013,
1041,
1024,
2693,
30526
] |
<?php
/**
* Shopware 5
* Copyright (c) shopware AG
*
* According to our dual licensing model, this program can be used either
* under the terms of the GNU Affero General Public License, version 3,
* or under a proprietary license.
*
* The texts of the GNU Affero General Public License with an additional
* permission and of our proprietary license can be found at and
* in the LICENSE file you have received along with this program.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* "Shopware" is a registered trademark of shopware AG.
* The licensing of the program under the AGPLv3 does not imply a
* trademark license. Therefore any rights, title and interest in
* our trademarks remain entirely with us.
*/
/**
* @param array $params
* @param $template
*
* @return bool|mixed|string
*/
function smarty_function_flink($params, $template)
{
$file = $params['file'];
$request = Shopware()->Front()->Request();
$docPath = Shopware()->Container()->getParameter('shopware.app.rootdir');
// Check if we got an URI or a local link
if (!empty($file) && strpos($file, '/') !== 0 && strpos($file, '://') === false) {
$useIncludePath = $template->smarty->getUseIncludePath();
/** @var string[] $templateDirs */
$templateDirs = $template->smarty->getTemplateDir();
// Try to find the file on the filesystem
foreach ($templateDirs as $dir) {
if (file_exists($dir . $file)) {
$file = Enlight_Loader::realpath($dir) . DIRECTORY_SEPARATOR . str_replace('/', DIRECTORY_SEPARATOR, $file);
break;
}
if ($useIncludePath) {
if ($dir === '.' . DIRECTORY_SEPARATOR) {
$dir = '';
}
if (($result = Enlight_Loader::isReadable($dir . $file)) !== false) {
$file = $result;
break;
}
}
}
// Some cleanup code
if (strpos($file, $docPath) === 0) {
$file = substr($file, strlen($docPath));
}
// Make sure we have the right separator for the web context
if (DIRECTORY_SEPARATOR !== '/') {
$file = str_replace(DIRECTORY_SEPARATOR, '/', $file);
}
if (strpos($file, './') === 0) {
$file = substr($file, 2);
}
if ($request !== null) {
$file = $request->getBasePath() . '/' . ltrim($file, '/');
}
}
if (empty($file) && $request !== null) {
$file = $request->getBasePath() . '/';
}
if ($request !== null && !empty($params['fullPath']) && strpos($file, '/') === 0) {
$file = $request->getScheme() . '://' . $request->getHttpHost() . $file;
}
return $file;
}
|
simkli/shopware
|
engine/Library/Enlight/Template/Plugins/function.flink.php
|
PHP
|
agpl-3.0
| 3,003
|
[
30522,
1026,
1029,
25718,
1013,
1008,
1008,
1008,
4497,
8059,
1019,
1008,
9385,
1006,
1039,
1007,
4497,
8059,
12943,
1008,
1008,
2429,
2000,
2256,
7037,
13202,
2944,
1010,
2023,
2565,
2064,
2022,
2109,
2593,
1008,
2104,
1996,
3408,
1997,
1996,
27004,
21358,
7512,
2080,
2236,
2270,
6105,
1010,
2544,
1017,
1010,
1008,
2030,
2104,
1037,
16350,
6105,
1012,
1008,
1008,
1996,
6981,
1997,
1996,
27004,
21358,
7512,
2080,
2236,
2270,
6105,
2007,
2019,
3176,
1008,
6656,
1998,
1997,
2256,
16350,
6105,
2064,
2022,
2179,
2012,
1998,
1008,
1999,
1996,
6105,
5371,
2017,
2031,
2363,
2247,
2007,
2023,
2565,
1012,
1008,
1008,
2023,
2565,
2003,
5500,
1999,
1996,
3246,
2008,
2009,
2097,
2022,
6179,
1010,
1008,
2021,
2302,
2151,
10943,
2100,
1025,
2302,
2130,
1996,
13339,
10943,
2100,
1997,
1008,
6432,
8010,
2030,
10516,
2005,
1037,
3327,
3800,
1012,
2156,
1996,
1008,
27004,
21358,
7512,
2080,
2236,
2270,
6105,
2005,
2062,
4751,
1012,
1008,
1008,
1000,
4497,
8059,
1000,
2003,
1037,
5068,
11749,
1997,
4497,
8059,
12943,
1012,
1008,
1996,
13202,
1997,
1996,
2565,
2104,
1996,
12943,
24759,
2615,
2509,
2515,
2025,
19515,
1037,
1008,
11749,
6105,
1012,
3568,
2151,
2916,
1010,
2516,
1998,
3037,
1999,
1008,
2256,
11749,
2015,
3961,
4498,
2007,
2149,
1012,
1008,
1013,
1013,
1008,
1008,
1008,
1030,
11498,
2213,
9140,
1002,
11498,
5244,
1008,
1030,
11498,
2213,
1002,
23561,
1008,
1008,
1030,
2709,
22017,
2140,
1064,
3816,
1064,
5164,
1008,
1013,
3853,
6047,
2100,
1035,
3853,
1035,
13109,
19839,
1006,
1002,
11498,
5244,
1010,
1002,
23561,
1007,
1063,
1002,
5371,
1027,
1002,
11498,
5244,
1031,
1005,
5371,
1005,
1033,
1025,
1002,
5227,
1027,
4497,
8059,
1006,
1007,
1011,
1028,
2392,
1006,
1007,
1011,
1028,
5227,
1006,
1007,
1025,
1002,
9986,
15069,
1027,
4497,
8059,
1006,
1007,
1011,
1028,
11661,
1006,
1007,
1011,
1028,
2131,
28689,
22828,
1006,
1005,
4497,
8059,
1012,
10439,
1012,
7117,
4305,
2099,
1005,
1007,
1025,
1013,
1013,
4638,
2065,
2057,
2288,
2019,
24471,
2072,
2030,
1037,
2334,
4957,
2065,
1006,
999,
4064,
1006,
1002,
5371,
1007,
1004,
1004,
2358,
14536,
2891,
1006,
1002,
5371,
1010,
1005,
1013,
1005,
1007,
999,
1027,
1027,
1014,
1004,
1004,
2358,
14536,
2891,
1006,
1002,
5371,
1010,
1005,
1024,
1013,
1013,
1005,
30524,
8557,
2378,
20464,
12672,
15069,
1006,
1007,
1025,
1013,
1008,
1008,
1030,
13075,
5164,
1031,
1033,
1002,
23561,
4305,
2869,
1008,
1013,
1002,
23561,
4305,
2869,
1027,
1002,
23561,
1011,
1028,
6047,
2100,
1011,
1028,
2131,
18532,
15725,
4305,
2099,
1006,
1007,
1025,
1013,
1013,
3046,
2000,
2424,
1996,
5371,
2006,
1996,
6764,
27268,
6633,
18921,
6776,
1006,
1002,
23561,
4305,
2869,
2004,
1002,
16101,
1007,
1063,
2065,
1006,
5371,
1035,
6526,
1006,
1002,
16101,
1012,
1002,
5371,
1007,
1007,
1063,
1002,
5371,
1027,
4372,
7138,
1035,
7170,
2121,
1024,
1024,
2613,
15069,
1006,
1002,
16101,
1007,
1012,
14176,
1035,
19802,
25879,
2953,
1012,
2358,
2099,
1035,
5672,
1006,
1005,
1013,
30523,
1007,
1027,
1027,
1027,
6270,
1007,
1063,
1002,
2224,
2378,
20464,
12672,
15069,
1027,
1002,
23561,
1011,
1028,
6047,
2100,
1011,
1028,
2131,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1007,
1027,
1027,
1027,
6270,
1007,
1063,
1002,
2224,
2378,
20464,
12672,
15069,
1027,
1002,
23561,
1011,
1028,
6047,
2100,
1011,
1028,
2131,
30526
] |
if (BUILD_STATIC AND XMRIG_OS_UNIX AND WITH_OPENCL)
message(WARNING "OpenCL backend is not compatible with static build, use -DWITH_OPENCL=OFF to suppress this warning")
set(WITH_OPENCL OFF)
endif()
if (WITH_OPENCL)
add_definitions(/DXMRIG_FEATURE_OPENCL)
add_definitions(/DCL_USE_DEPRECATED_OPENCL_1_2_APIS)
if (XMRIG_OS_APPLE)
add_definitions(/DCL_TARGET_OPENCL_VERSION=120)
elseif (WITH_OPENCL_VERSION)
add_definitions(/DCL_TARGET_OPENCL_VERSION=${WITH_OPENCL_VERSION})
endif()
set(HEADERS_BACKEND_OPENCL
src/backend/opencl/cl/OclSource.h
src/backend/opencl/interfaces/IOclRunner.h
src/backend/opencl/kernels/Cn0Kernel.h
src/backend/opencl/kernels/Cn1Kernel.h
src/backend/opencl/kernels/Cn2Kernel.h
src/backend/opencl/kernels/CnBranchKernel.h
src/backend/opencl/OclBackend.h
src/backend/opencl/OclCache.h
src/backend/opencl/OclConfig.h
src/backend/opencl/OclConfig_gen.h
src/backend/opencl/OclGenerator.h
src/backend/opencl/OclLaunchData.h
src/backend/opencl/OclThread.h
src/backend/opencl/OclThreads.h
src/backend/opencl/OclWorker.h
src/backend/opencl/runners/OclBaseRunner.h
src/backend/opencl/runners/OclCnRunner.h
src/backend/opencl/runners/tools/OclCnR.h
src/backend/opencl/runners/tools/OclSharedData.h
src/backend/opencl/runners/tools/OclSharedState.h
src/backend/opencl/wrappers/OclContext.h
src/backend/opencl/wrappers/OclDevice.h
src/backend/opencl/wrappers/OclError.h
src/backend/opencl/wrappers/OclKernel.h
src/backend/opencl/wrappers/OclLib.h
src/backend/opencl/wrappers/OclPlatform.h
src/backend/opencl/wrappers/OclVendor.h
)
set(SOURCES_BACKEND_OPENCL
src/backend/opencl/cl/OclSource.cpp
src/backend/opencl/generators/ocl_generic_cn_generator.cpp
src/backend/opencl/generators/ocl_vega_cn_generator.cpp
src/backend/opencl/kernels/Cn0Kernel.cpp
src/backend/opencl/kernels/Cn1Kernel.cpp
src/backend/opencl/kernels/Cn2Kernel.cpp
src/backend/opencl/kernels/CnBranchKernel.cpp
src/backend/opencl/OclBackend.cpp
src/backend/opencl/OclCache.cpp
src/backend/opencl/OclConfig.cpp
src/backend/opencl/OclLaunchData.cpp
src/backend/opencl/OclThread.cpp
src/backend/opencl/OclThreads.cpp
src/backend/opencl/OclWorker.cpp
src/backend/opencl/runners/OclBaseRunner.cpp
src/backend/opencl/runners/OclCnRunner.cpp
src/backend/opencl/runners/tools/OclCnR.cpp
src/backend/opencl/runners/tools/OclSharedData.cpp
src/backend/opencl/runners/tools/OclSharedState.cpp
src/backend/opencl/wrappers/OclContext.cpp
src/backend/opencl/wrappers/OclDevice.cpp
src/backend/opencl/wrappers/OclError.cpp
src/backend/opencl/wrappers/OclKernel.cpp
src/backend/opencl/wrappers/OclLib.cpp
src/backend/opencl/wrappers/OclPlatform.cpp
)
if (WIN32)
list(APPEND SOURCES_BACKEND_OPENCL src/backend/opencl/OclCache_win.cpp)
else()
list(APPEND SOURCES_BACKEND_OPENCL src/backend/opencl/OclCache_unix.cpp)
endif()
if (WITH_RANDOMX)
list(APPEND HEADERS_BACKEND_OPENCL
src/backend/opencl/kernels/rx/Blake2bHashRegistersKernel.h
src/backend/opencl/kernels/rx/Blake2bInitialHashKernel.h
src/backend/opencl/kernels/rx/ExecuteVmKernel.h
src/backend/opencl/kernels/rx/FillAesKernel.h
src/backend/opencl/kernels/rx/FindSharesKernel.h
src/backend/opencl/kernels/rx/HashAesKernel.cpp
src/backend/opencl/kernels/rx/InitVmKernel.h
src/backend/opencl/kernels/rx/RxJitKernel.h
src/backend/opencl/kernels/rx/RxRunKernel.h
src/backend/opencl/runners/OclRxBaseRunner.h
src/backend/opencl/runners/OclRxJitRunner.h
src/backend/opencl/runners/OclRxVmRunner.h
)
list(APPEND SOURCES_BACKEND_OPENCL
src/backend/opencl/generators/ocl_generic_rx_generator.cpp
src/backend/opencl/kernels/rx/Blake2bHashRegistersKernel.cpp
src/backend/opencl/kernels/rx/Blake2bInitialHashKernel.cpp
src/backend/opencl/kernels/rx/ExecuteVmKernel.cpp
src/backend/opencl/kernels/rx/FillAesKernel.cpp
src/backend/opencl/kernels/rx/FindSharesKernel.cpp
src/backend/opencl/kernels/rx/HashAesKernel.cpp
src/backend/opencl/kernels/rx/InitVmKernel.cpp
src/backend/opencl/kernels/rx/RxJitKernel.cpp
src/backend/opencl/kernels/rx/RxRunKernel.cpp
src/backend/opencl/runners/OclRxBaseRunner.cpp
src/backend/opencl/runners/OclRxJitRunner.cpp
src/backend/opencl/runners/OclRxVmRunner.cpp
)
endif()
if (WITH_ASTROBWT)
list(APPEND HEADERS_BACKEND_OPENCL
src/backend/opencl/kernels/astrobwt/AstroBWT_FilterKernel.h
src/backend/opencl/kernels/astrobwt/AstroBWT_FindSharesKernel.h
src/backend/opencl/kernels/astrobwt/AstroBWT_MainKernel.h
src/backend/opencl/kernels/astrobwt/AstroBWT_PrepareBatch2Kernel.h
src/backend/opencl/kernels/astrobwt/AstroBWT_Salsa20Kernel.h
src/backend/opencl/kernels/astrobwt/AstroBWT_SHA3InitialKernel.h
src/backend/opencl/kernels/astrobwt/AstroBWT_SHA3Kernel.h
src/backend/opencl/runners/OclAstroBWTRunner.h
)
list(APPEND SOURCES_BACKEND_OPENCL
src/backend/opencl/generators/ocl_generic_astrobwt_generator.cpp
src/backend/opencl/kernels/astrobwt/AstroBWT_FilterKernel.cpp
src/backend/opencl/kernels/astrobwt/AstroBWT_FindSharesKernel.cpp
src/backend/opencl/kernels/astrobwt/AstroBWT_MainKernel.cpp
src/backend/opencl/kernels/astrobwt/AstroBWT_PrepareBatch2Kernel.cpp
src/backend/opencl/kernels/astrobwt/AstroBWT_Salsa20Kernel.cpp
src/backend/opencl/kernels/astrobwt/AstroBWT_SHA3InitialKernel.cpp
src/backend/opencl/kernels/astrobwt/AstroBWT_SHA3Kernel.cpp
src/backend/opencl/runners/OclAstroBWTRunner.cpp
)
endif()
if (WITH_KAWPOW)
list(APPEND HEADERS_BACKEND_OPENCL
src/backend/opencl/kernels/kawpow/KawPow_CalculateDAGKernel.h
src/backend/opencl/runners/OclKawPowRunner.h
src/backend/opencl/runners/tools/OclKawPow.h
)
list(APPEND SOURCES_BACKEND_OPENCL
src/backend/opencl/generators/ocl_generic_kawpow_generator.cpp
src/backend/opencl/kernels/kawpow/KawPow_CalculateDAGKernel.cpp
src/backend/opencl/runners/OclKawPowRunner.cpp
src/backend/opencl/runners/tools/OclKawPow.cpp
)
endif()
if (WITH_STRICT_CACHE)
add_definitions(/DXMRIG_STRICT_OPENCL_CACHE)
else()
remove_definitions(/DXMRIG_STRICT_OPENCL_CACHE)
endif()
if (WITH_INTERLEAVE_DEBUG_LOG)
add_definitions(/DXMRIG_INTERLEAVE_DEBUG)
endif()
if (WITH_ADL AND (XMRIG_OS_WIN OR XMRIG_OS_LINUX))
add_definitions(/DXMRIG_FEATURE_ADL)
list(APPEND HEADERS_BACKEND_OPENCL
src/backend/opencl/wrappers/AdlHealth.h
src/backend/opencl/wrappers/AdlLib.h
)
if (XMRIG_OS_WIN)
list(APPEND SOURCES_BACKEND_OPENCL src/backend/opencl/wrappers/AdlLib.cpp)
else()
list(APPEND SOURCES_BACKEND_OPENCL src/backend/opencl/wrappers/AdlLib_linux.cpp)
endif()
else()
remove_definitions(/DXMRIG_FEATURE_ADL)
endif()
else()
remove_definitions(/DXMRIG_FEATURE_OPENCL)
remove_definitions(/DXMRIG_FEATURE_ADL)
set(HEADERS_BACKEND_OPENCL "")
set(SOURCES_BACKEND_OPENCL "")
endif()
|
xmrig/xmrig
|
src/backend/opencl/opencl.cmake
|
CMake
|
gpl-3.0
| 8,040
|
[
30522,
2065,
1006,
3857,
1035,
10763,
1998,
1060,
2213,
3089,
2290,
1035,
9808,
1035,
19998,
1998,
2007,
1035,
2330,
20464,
1007,
4471,
1006,
5432,
1000,
2330,
20464,
2067,
10497,
2003,
2025,
11892,
2007,
10763,
3857,
1010,
2224,
1011,
1040,
24415,
1035,
2330,
20464,
1027,
2125,
2000,
16081,
2023,
5432,
1000,
1007,
2275,
1006,
2007,
1035,
2330,
20464,
2125,
1007,
2203,
10128,
1006,
1007,
2065,
1006,
2007,
1035,
2330,
20464,
1007,
5587,
1035,
15182,
1006,
1013,
1040,
2595,
2213,
3089,
2290,
1035,
3444,
1035,
2330,
20464,
1007,
5587,
1035,
15182,
1006,
1013,
5887,
2140,
1035,
2224,
1035,
2139,
28139,
12921,
1035,
2330,
20464,
1035,
1015,
1035,
1016,
1035,
17928,
2015,
1007,
2065,
1006,
1060,
2213,
3089,
2290,
1035,
9808,
1035,
6207,
1007,
5587,
1035,
15182,
1006,
1013,
5887,
2140,
1035,
4539,
1035,
2330,
20464,
1035,
2544,
1027,
6036,
1007,
2842,
10128,
1006,
2007,
1035,
2330,
20464,
1035,
2544,
1007,
5587,
1035,
15182,
1006,
1013,
5887,
2140,
1035,
4539,
1035,
2330,
20464,
1035,
2544,
1027,
1002,
1063,
2007,
1035,
2330,
20464,
1035,
2544,
1065,
1007,
2203,
10128,
1006,
1007,
2275,
1006,
20346,
2015,
1035,
2067,
10497,
1035,
2330,
20464,
5034,
2278,
1013,
2067,
30524,
1013,
2330,
20464,
1013,
19706,
1013,
25941,
20974,
4609,
3678,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
16293,
2015,
1013,
27166,
2692,
5484,
11877,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
16293,
2015,
1013,
27166,
2487,
5484,
11877,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
16293,
2015,
1013,
27166,
2475,
5484,
11877,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
16293,
2015,
1013,
27166,
10024,
12680,
5484,
11877,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
1051,
20464,
5963,
10497,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
12258,
15395,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
12258,
2239,
8873,
2290,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
12258,
2239,
8873,
2290,
1035,
8991,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
1051,
20464,
6914,
6906,
4263,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
1051,
20464,
17298,
12680,
2850,
2696,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
1051,
20464,
2705,
16416,
2094,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
1051,
20464,
2705,
16416,
5104,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
1051,
20464,
6198,
2121,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
7190,
1013,
1051,
20464,
15058,
23195,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
7190,
1013,
12258,
16118,
4609,
3678,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
7190,
1013,
5906,
1013,
12258,
16118,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
1013,
2330,
20464,
1013,
7190,
1013,
5906,
1013,
30523,
10497,
1013,
2330,
20464,
1013,
18856,
1013,
1051,
20464,
6499,
3126,
3401,
1012,
1044,
5034,
2278,
1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100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
10497,
1013,
2330,
20464,
1013,
18856,
1013,
1051,
20464,
6499,
3126,
3401,
1012,
1044,
5034,
2278,
1013,
2067,
10497,
30526
] |
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// 有关程序集的常规信息通过以下
// 特性集控制。更改这些特性值可修改
// 与程序集关联的信息。
[assembly: AssemblyTitle("Ioc.Net")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Ioc.Net")]
[assembly: AssemblyCopyright("Copyright © 2014")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// 将 ComVisible 设置为 false 使此程序集中的类型
// 对 COM 组件不可见。 如果需要从 COM 访问此程序集中的类型,
// 则将该类型上的 ComVisible 特性设置为 true。
[assembly: ComVisible(false)]
// 如果此项目向 COM 公开,则下列 GUID 用于类型库的 ID
[assembly: Guid("f6d4ae6f-4e01-40b2-bc0a-ea8c7eb517d5")]
// 程序集的版本信息由下面四个值组成:
//
// 主版本
// 次版本
// 生成号
// 修订号
//
// 可以指定所有这些值,也可以使用“生成号”和“修订号”的默认值,
// 方法是按如下所示使用“*”:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
|
plantain-00/csharp-demo
|
Playthings/Ioc.Net/Ioc.Net/Properties/AssemblyInfo.cs
|
C#
|
mit
| 1,302
|
[
30522,
2478,
2291,
1012,
9185,
1025,
2478,
2291,
1012,
2448,
7292,
1012,
21624,
8043,
7903,
2229,
1025,
2478,
2291,
1012,
2448,
7292,
1012,
6970,
11923,
2121,
7903,
2229,
1025,
1013,
1013,
1873,
100,
100,
100,
100,
1916,
100,
100,
1767,
100,
100,
100,
100,
1743,
1013,
1013,
100,
100,
100,
100,
100,
1636,
100,
100,
100,
100,
100,
100,
100,
100,
100,
100,
1013,
1013,
100,
100,
100,
100,
100,
100,
1916,
1767,
100,
1636,
1031,
3320,
1024,
3320,
3775,
9286,
1006,
1000,
25941,
1012,
5658,
1000,
1007,
1033,
1031,
3320,
1024,
3320,
6155,
23235,
3258,
1006,
1000,
1000,
1007,
1033,
1031,
3320,
1024,
3320,
8663,
8873,
27390,
3370,
1006,
1000,
1000,
1007,
1033,
1031,
3320,
1024,
3320,
9006,
9739,
2100,
1006,
1000,
1000,
1007,
1033,
1031,
3320,
1024,
3320,
21572,
8566,
6593,
1006,
1000,
25941,
1012,
5658,
1000,
1007,
1033,
1031,
3320,
1024,
3320,
3597,
7685,
15950,
1006,
1000,
9385,
1075,
2297,
1000,
30524,
6270,
100,
100,
100,
100,
100,
1746,
1916,
100,
100,
1013,
1013,
100,
4012,
100,
100,
1744,
100,
100,
1636,
100,
100,
100,
100,
100,
4012,
100,
100,
100,
100,
100,
100,
1746,
1916,
100,
100,
1989,
1013,
1013,
100,
100,
100,
100,
100,
1742,
1916,
4012,
11365,
7028,
100,
100,
100,
100,
100,
2995,
1636,
1031,
3320,
1024,
4012,
11365,
7028,
1006,
6270,
1007,
1033,
1013,
1013,
100,
100,
100,
100,
1918,
100,
4012,
1772,
100,
1989,
100,
1743,
100,
26458,
2094,
100,
100,
100,
100,
100,
1916,
8909,
1031,
3320,
1024,
26458,
2094,
1006,
1000,
1042,
2575,
2094,
2549,
6679,
2575,
2546,
1011,
1018,
2063,
24096,
1011,
2871,
2497,
2475,
1011,
4647,
2692,
2050,
1011,
19413,
2620,
2278,
2581,
15878,
22203,
2581,
2094,
2629,
1000,
1007,
1033,
1013,
1013,
100,
100,
100,
1916,
1907,
1876,
1767,
100,
100,
1743,
1976,
1798,
100,
100,
100,
1854,
1024,
1013,
1013,
1013,
1013,
1747,
1907,
1876,
1013,
1013,
100,
1907,
1876,
1013,
1013,
1910,
1854,
100,
1013,
1013,
100,
100,
100,
1013,
1013,
1013,
1013,
100,
100,
100,
1822,
100,
1873,
100,
100,
100,
1989,
1750,
100,
100,
100,
100,
1523,
1910,
1854,
100,
1524,
1796,
1523,
100,
100,
100,
1524,
1916,
100,
100,
100,
1989,
1013,
1013,
1863,
1901,
100,
100,
100,
1743,
100,
1923,
100,
100,
1523,
1008,
1524,
1024,
1013,
1013,
1031,
3320,
1024,
3320,
27774,
1006,
1000,
1015,
1012,
1014,
1012,
1008,
1000,
1007,
1033,
1031,
3320,
1024,
3320,
27774,
1006,
1000,
1015,
1012,
1014,
1012,
1014,
1012,
1014,
1000,
1007,
1033,
1031,
3320,
1024,
3320,
8873,
20414,
2545,
3258,
1006,
1000,
1015,
1012,
1014,
1012,
1014,
1012,
1014,
1000,
1007,
1033,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
1007,
1033,
1031,
3320,
1024,
3320,
6494,
3207,
10665,
1006,
1000,
1000,
1007,
1033,
1031,
3320,
1024,
3320,
14561,
1006,
1000,
1000,
1007,
1033,
1013,
1013,
100,
4012,
11365,
7028,
100,
100,
100,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1007,
1033,
1031,
3320,
1024,
3320,
6494,
3207,
10665,
1006,
1000,
1000,
1007,
1033,
1031,
3320,
1024,
3320,
14561,
1006,
1000,
1000,
1007,
1033,
1013,
1013,
100,
4012,
11365,
7028,
100,
100,
100,
30526
] |
#include "svmClassifier.hpp"
|
moosemaniam/cocobongo
|
lib/svmClassifier.cpp
|
C++
|
gpl-2.0
| 31
|
[
30522,
1001,
2421,
1000,
17917,
12458,
27102,
18095,
1012,
6522,
2361,
1000,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
using NUnit.Framework;
using OpenQA.Selenium;
namespace Atata.Tests
{
public class PressTriggerTests : UITestFixture
{
private ScrollablePage _page;
protected override void OnSetUp()
{
_page = Go.To<ScrollablePage>();
}
[Test]
public void PressEndAttribute()
{
_page.
BottomText.Should.Not.BeVisibleInViewPort().
BottomText.Metadata.Add(new PressEndAttribute(TriggerEvents.BeforeGet));
_page.
BottomText.Get(out _).
BottomText.Should.BeVisibleInViewPort();
}
[Test]
public void PressHomeAttribute()
{
_page.
Press(Keys.End).
TopText.Should.Not.BeVisibleInViewPort().
TopText.Metadata.Add(new PressHomeAttribute(TriggerEvents.BeforeGet));
_page.
TopText.Get(out _).
TopText.Should.BeVisibleInViewPort();
}
}
}
|
YevgeniyShunevych/Atata
|
test/Atata.Tests/PressTriggerTests.cs
|
C#
|
mit
| 1,030
|
[
30522,
2478,
16634,
4183,
1012,
7705,
1025,
2478,
2330,
19062,
1012,
7367,
7770,
5007,
1025,
3415,
15327,
29533,
2696,
1012,
5852,
1063,
2270,
2465,
2811,
18886,
13327,
22199,
2015,
1024,
21318,
22199,
8873,
18413,
5397,
1063,
2797,
17186,
3085,
13704,
1035,
3931,
1025,
5123,
2058,
15637,
11675,
14447,
6279,
1006,
1007,
1063,
1035,
3931,
1027,
2175,
1012,
2000,
1026,
17186,
3085,
13704,
1028,
1006,
1007,
1025,
1065,
1031,
3231,
1033,
2270,
11675,
2811,
10497,
19321,
3089,
8569,
2618,
1006,
1007,
1063,
1035,
3931,
1012,
3953,
18209,
1012,
2323,
1012,
2025,
1012,
2022,
11365,
7028,
2378,
8584,
6442,
1006,
1007,
1012,
3953,
18209,
1012,
27425,
1012,
5587,
1006,
2047,
2811,
10497,
19321,
3089,
8569,
2618,
1006,
9495,
18697,
7666,
1012,
2077,
18150,
1007,
1007,
1025,
1035,
3931,
1012,
3953,
18209,
1012,
2131,
1006,
2041,
1035,
1007,
1012,
3953,
18209,
1012,
2323,
1012,
2022,
11365,
7028,
2378,
8584,
6442,
1006,
1007,
1025,
1065,
1031,
3231,
1033,
2270,
11675,
2811,
23393,
5243,
4779,
3089,
8569,
2618,
1006,
1007,
1063,
1035,
3931,
1012,
2811,
1006,
6309,
1012,
2203,
1007,
1012,
2327,
18209,
1012,
2323,
1012,
2025,
1012,
2022,
11365,
7028,
2378,
8584,
6442,
1006,
1007,
1012,
2327,
18209,
1012,
27425,
1012,
5587,
1006,
2047,
2811,
23393,
5243,
4779,
3089,
8569,
2618,
1006,
9495,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-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
3931,
1012,
2327,
18209,
1012,
2131,
1006,
2041,
1035,
30526
] |
/**
* Copyright 2020 The AMP HTML Authors. All Rights Reserved.
*
* Licensed 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.
*/
import {loadScript, validateData} from '#3p/3p';
/**
* @param {!Window} global
* @param {!Object} data
*/
export function relappro(global, data) {
validateData(data, [], ['slotId', 'nameAdUnit', 'requirements']);
global.params = data;
loadScript(
global,
'https://cdn.relappro.com/adservices/amp/relappro.amp.min.js'
);
}
|
rsimha-amp/amphtml
|
ads/vendors/relappro.js
|
JavaScript
|
apache-2.0
| 972
|
[
30522,
1013,
1008,
1008,
1008,
9385,
12609,
1996,
23713,
16129,
6048,
1012,
2035,
2916,
9235,
1012,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1008,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
1008,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1008,
1008,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1008,
1008,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1008,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
1000,
2004,
1011,
2003,
1000,
3978,
30524,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
1008,
12546,
2104,
1996,
6105,
1012,
1008,
1013,
12324,
1063,
15665,
23235,
1010,
9398,
4383,
6790,
1065,
2013,
1005,
1001,
1017,
2361,
1013,
1017,
2361,
1005,
1025,
1013,
1008,
1008,
1008,
1030,
11498,
2213,
1063,
999,
3332,
1065,
3795,
1008,
1030,
11498,
2213,
1063,
999,
4874,
1065,
2951,
1008,
1013,
9167,
3853,
2128,
2721,
9397,
3217,
1006,
3795,
1010,
2951,
1007,
1063,
9398,
4383,
6790,
1006,
2951,
1010,
1031,
1033,
1010,
1031,
1005,
10453,
3593,
1005,
1010,
1005,
2171,
4215,
19496,
2102,
1005,
1010,
1005,
5918,
1005,
1033,
1007,
1025,
3795,
1012,
11498,
5244,
1027,
2951,
1025,
15665,
23235,
1006,
3795,
1010,
1005,
16770,
1024,
1013,
1013,
3729,
2078,
1012,
2128,
2721,
9397,
3217,
1012,
4012,
1013,
14997,
2121,
7903,
2229,
1013,
23713,
1013,
2128,
2721,
9397,
3217,
1012,
23713,
1012,
8117,
1012,
1046,
2015,
1005,
1007,
1025,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
1010,
1008,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1008,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0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,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1010,
1008,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1008,
30526
] |
/*
* WPA Supplicant / Configuration file structures
* Copyright (c) 2003-2005, Jouni Malinen <j@w1.fi>
*
* This software may be distributed under the terms of the BSD license.
* See README for more details.
*/
#ifndef CONFIG_H
#define CONFIG_H
#define DEFAULT_EAPOL_VERSION 1
#ifdef CONFIG_NO_SCAN_PROCESSING
#define DEFAULT_AP_SCAN 2
#else /* CONFIG_NO_SCAN_PROCESSING */
#define DEFAULT_AP_SCAN 1
#endif /* CONFIG_NO_SCAN_PROCESSING */
#define DEFAULT_FAST_REAUTH 1
#define DEFAULT_P2P_GO_INTENT 7
#define DEFAULT_P2P_INTRA_BSS 1
#define DEFAULT_BSS_MAX_COUNT 200
#define DEFAULT_BSS_EXPIRATION_AGE 180
#define DEFAULT_BSS_EXPIRATION_SCAN_COUNT 2
#define DEFAULT_MAX_NUM_STA 128
#define DEFAULT_ACCESS_NETWORK_TYPE 15
#include "config_ssid.h"
#include "wps/wps.h"
#define CFG_CHANGED_DEVICE_NAME BIT(0)
#define CFG_CHANGED_CONFIG_METHODS BIT(1)
#define CFG_CHANGED_DEVICE_TYPE BIT(2)
#define CFG_CHANGED_OS_VERSION BIT(3)
#define CFG_CHANGED_UUID BIT(4)
#define CFG_CHANGED_COUNTRY BIT(5)
#define CFG_CHANGED_SEC_DEVICE_TYPE BIT(6)
#define CFG_CHANGED_P2P_SSID_POSTFIX BIT(7)
#define CFG_CHANGED_WPS_STRING BIT(8)
#define CFG_CHANGED_P2P_INTRA_BSS BIT(9)
#define CFG_CHANGED_VENDOR_EXTENSION BIT(10)
#define CFG_CHANGED_P2P_LISTEN_CHANNEL BIT(11)
#define CFG_CHANGED_P2P_OPER_CHANNEL BIT(12)
#ifdef ANDROID_P2P
#define CFG_CHANGED_IFACE_PRIORITY BIT(13)
#endif
/**
* struct wpa_config - wpa_supplicant configuration data
*
* This data structure is presents the per-interface (radio) configuration
* data. In many cases, there is only one struct wpa_config instance, but if
* more than one network interface is being controlled, one instance is used
* for each.
*/
struct wpa_config {
/**
* ssid - Head of the global network list
*
* This is the head for the list of all the configured networks.
*/
struct wpa_ssid *ssid;
/**
* pssid - Per-priority network lists (in priority order)
*/
struct wpa_ssid **pssid;
/**
* num_prio - Number of different priorities used in the pssid lists
*
* This indicates how many per-priority network lists are included in
* pssid.
*/
int num_prio;
/**
* eapol_version - IEEE 802.1X/EAPOL version number
*
* wpa_supplicant is implemented based on IEEE Std 802.1X-2004 which
* defines EAPOL version 2. However, there are many APs that do not
* handle the new version number correctly (they seem to drop the
* frames completely). In order to make wpa_supplicant interoperate
* with these APs, the version number is set to 1 by default. This
* configuration value can be used to set it to the new version (2).
*/
int eapol_version;
/**
* ap_scan - AP scanning/selection
*
* By default, wpa_supplicant requests driver to perform AP
* scanning and then uses the scan results to select a
* suitable AP. Another alternative is to allow the driver to
* take care of AP scanning and selection and use
* wpa_supplicant just to process EAPOL frames based on IEEE
* 802.11 association information from the driver.
*
* 1: wpa_supplicant initiates scanning and AP selection (default).
*
* 0: Driver takes care of scanning, AP selection, and IEEE 802.11
* association parameters (e.g., WPA IE generation); this mode can
* also be used with non-WPA drivers when using IEEE 802.1X mode;
* do not try to associate with APs (i.e., external program needs
* to control association). This mode must also be used when using
* wired Ethernet drivers.
*
* 2: like 0, but associate with APs using security policy and SSID
* (but not BSSID); this can be used, e.g., with ndiswrapper and NDIS
* drivers to enable operation with hidden SSIDs and optimized roaming;
* in this mode, the network blocks in the configuration are tried
* one by one until the driver reports successful association; each
* network block should have explicit security policy (i.e., only one
* option in the lists) for key_mgmt, pairwise, group, proto variables.
*/
int ap_scan;
/**
* ctrl_interface - Parameters for the control interface
*
* If this is specified, %wpa_supplicant will open a control interface
* that is available for external programs to manage %wpa_supplicant.
* The meaning of this string depends on which control interface
* mechanism is used. For all cases, the existence of this parameter
* in configuration is used to determine whether the control interface
* is enabled.
*
* For UNIX domain sockets (default on Linux and BSD): This is a
* directory that will be created for UNIX domain sockets for listening
* to requests from external programs (CLI/GUI, etc.) for status
* information and configuration. The socket file will be named based
* on the interface name, so multiple %wpa_supplicant processes can be
* run at the same time if more than one interface is used.
* /var/run/wpa_supplicant is the recommended directory for sockets and
* by default, wpa_cli will use it when trying to connect with
* %wpa_supplicant.
*
* Access control for the control interface can be configured
* by setting the directory to allow only members of a group
* to use sockets. This way, it is possible to run
* %wpa_supplicant as root (since it needs to change network
* configuration and open raw sockets) and still allow GUI/CLI
* components to be run as non-root users. However, since the
* control interface can be used to change the network
* configuration, this access needs to be protected in many
* cases. By default, %wpa_supplicant is configured to use gid
* 0 (root). If you want to allow non-root users to use the
* control interface, add a new group and change this value to
* match with that group. Add users that should have control
* interface access to this group.
*
* When configuring both the directory and group, use following format:
* DIR=/var/run/wpa_supplicant GROUP=wheel
* DIR=/var/run/wpa_supplicant GROUP=0
* (group can be either group name or gid)
*
* For UDP connections (default on Windows): The value will be ignored.
* This variable is just used to select that the control interface is
* to be created. The value can be set to, e.g., udp
* (ctrl_interface=udp).
*
* For Windows Named Pipe: This value can be used to set the security
* descriptor for controlling access to the control interface. Security
* descriptor can be set using Security Descriptor String Format (see
* http://msdn.microsoft.com/library/default.asp?url=/library/en-us/secauthz/security/security_descriptor_string_format.asp).
* The descriptor string needs to be prefixed with SDDL=. For example,
* ctrl_interface=SDDL=D: would set an empty DACL (which will reject
* all connections).
*/
char *ctrl_interface;
/**
* ctrl_interface_group - Control interface group (DEPRECATED)
*
* This variable is only used for backwards compatibility. Group for
* UNIX domain sockets should now be specified using GROUP=group in
* ctrl_interface variable.
*/
char *ctrl_interface_group;
/**
* fast_reauth - EAP fast re-authentication (session resumption)
*
* By default, fast re-authentication is enabled for all EAP methods
* that support it. This variable can be used to disable fast
* re-authentication (by setting fast_reauth=0). Normally, there is no
* need to disable fast re-authentication.
*/
int fast_reauth;
/**
* opensc_engine_path - Path to the OpenSSL engine for opensc
*
* This is an OpenSSL specific configuration option for loading OpenSC
* engine (engine_opensc.so); if %NULL, this engine is not loaded.
*/
char *opensc_engine_path;
/**
* pkcs11_engine_path - Path to the OpenSSL engine for PKCS#11
*
* This is an OpenSSL specific configuration option for loading PKCS#11
* engine (engine_pkcs11.so); if %NULL, this engine is not loaded.
*/
char *pkcs11_engine_path;
/**
* pkcs11_module_path - Path to the OpenSSL OpenSC/PKCS#11 module
*
* This is an OpenSSL specific configuration option for configuring
* path to OpenSC/PKCS#11 engine (opensc-pkcs11.so); if %NULL, this
* module is not loaded.
*/
char *pkcs11_module_path;
/**
* driver_param - Driver interface parameters
*
* This text string is passed to the selected driver interface with the
* optional struct wpa_driver_ops::set_param() handler. This can be
* used to configure driver specific options without having to add new
* driver interface functionality.
*/
char *driver_param;
/**
* dot11RSNAConfigPMKLifetime - Maximum lifetime of a PMK
*
* dot11 MIB variable for the maximum lifetime of a PMK in the PMK
* cache (unit: seconds).
*/
unsigned int dot11RSNAConfigPMKLifetime;
/**
* dot11RSNAConfigPMKReauthThreshold - PMK re-authentication threshold
*
* dot11 MIB variable for the percentage of the PMK lifetime
* that should expire before an IEEE 802.1X reauthentication occurs.
*/
unsigned int dot11RSNAConfigPMKReauthThreshold;
/**
* dot11RSNAConfigSATimeout - Security association timeout
*
* dot11 MIB variable for the maximum time a security association
* shall take to set up (unit: seconds).
*/
unsigned int dot11RSNAConfigSATimeout;
/**
* update_config - Is wpa_supplicant allowed to update configuration
*
* This variable control whether wpa_supplicant is allow to re-write
* its configuration with wpa_config_write(). If this is zero,
* configuration data is only changed in memory and the external data
* is not overriden. If this is non-zero, wpa_supplicant will update
* the configuration data (e.g., a file) whenever configuration is
* changed. This update may replace the old configuration which can
* remove comments from it in case of a text file configuration.
*/
int update_config;
/**
* blobs - Configuration blobs
*/
struct wpa_config_blob *blobs;
/**
* uuid - Universally Unique IDentifier (UUID; see RFC 4122) for WPS
*/
u8 uuid[16];
/**
* device_name - Device Name (WPS)
* User-friendly description of device; up to 32 octets encoded in
* UTF-8
*/
char *device_name;
/**
* manufacturer - Manufacturer (WPS)
* The manufacturer of the device (up to 64 ASCII characters)
*/
char *manufacturer;
/**
* model_name - Model Name (WPS)
* Model of the device (up to 32 ASCII characters)
*/
char *model_name;
/**
* model_number - Model Number (WPS)
* Additional device description (up to 32 ASCII characters)
*/
char *model_number;
/**
* serial_number - Serial Number (WPS)
* Serial number of the device (up to 32 characters)
*/
char *serial_number;
/**
* device_type - Primary Device Type (WPS)
*/
u8 device_type[WPS_DEV_TYPE_LEN];
/**
* config_methods - Config Methods
*
* This is a space-separated list of supported WPS configuration
* methods. For example, "label virtual_display virtual_push_button
* keypad".
* Available methods: usba ethernet label display ext_nfc_token
* int_nfc_token nfc_interface push_button keypad
* virtual_display physical_display
* virtual_push_button physical_push_button.
*/
char *config_methods;
/**
* os_version - OS Version (WPS)
* 4-octet operating system version number
*/
u8 os_version[4];
/**
* country - Country code
*
* This is the ISO/IEC alpha2 country code for which we are operating
* in
*/
char country[2];
/**
* wps_cred_processing - Credential processing
*
* 0 = process received credentials internally
* 1 = do not process received credentials; just pass them over
* ctrl_iface to external program(s)
* 2 = process received credentials internally and pass them over
* ctrl_iface to external program(s)
*/
int wps_cred_processing;
#define MAX_SEC_DEVICE_TYPES 5
/**
* sec_device_types - Secondary Device Types (P2P)
*/
u8 sec_device_type[MAX_SEC_DEVICE_TYPES][WPS_DEV_TYPE_LEN];
int num_sec_device_types;
int p2p_listen_reg_class;
int p2p_listen_channel;
int p2p_oper_reg_class;
int p2p_oper_channel;
int p2p_go_intent;
char *p2p_ssid_postfix;
int persistent_reconnect;
int p2p_intra_bss;
#define MAX_WPS_VENDOR_EXT 10
/**
* wps_vendor_ext - Vendor extension attributes in WPS
*/
struct wpabuf *wps_vendor_ext[MAX_WPS_VENDOR_EXT];
/**
* p2p_group_idle - Maximum idle time in seconds for P2P group
*
* This value controls how long a P2P group is maintained after there
* is no other members in the group. As a GO, this means no associated
* stations in the group. As a P2P client, this means no GO seen in
* scan results. The maximum idle time is specified in seconds with 0
* indicating no time limit, i.e., the P2P group remains in active
* state indefinitely until explicitly removed. As a P2P client, the
* maximum idle time of P2P_MAX_CLIENT_IDLE seconds is enforced, i.e.,
* this parameter is mainly meant for GO use and for P2P client, it can
* only be used to reduce the default timeout to smaller value.
*/
unsigned int p2p_group_idle;
/**
* bss_max_count - Maximum number of BSS entries to keep in memory
*/
unsigned int bss_max_count;
/**
* bss_expiration_age - BSS entry age after which it can be expired
*
* This value controls the time in seconds after which a BSS entry
* gets removed if it has not been updated or is not in use.
*/
unsigned int bss_expiration_age;
/**
* bss_expiration_scan_count - Expire BSS after number of scans
*
* If the BSS entry has not been seen in this many scans, it will be
* removed. A value of 1 means that entry is removed after the first
* scan in which the BSSID is not seen. Larger values can be used
* to avoid BSS entries disappearing if they are not visible in
* every scan (e.g., low signal quality or interference).
*/
unsigned int bss_expiration_scan_count;
/**
* filter_ssids - SSID-based scan result filtering
*
* 0 = do not filter scan results
* 1 = only include configured SSIDs in scan results/BSS table
*/
int filter_ssids;
/**
* max_num_sta - Maximum number of STAs in an AP/P2P GO
*/
unsigned int max_num_sta;
/**
* changed_parameters - Bitmap of changed parameters since last update
*/
unsigned int changed_parameters;
/**
* disassoc_low_ack - Disassocicate stations with massive packet loss
*/
int disassoc_low_ack;
/**
* interworking - Whether Interworking (IEEE 802.11u) is enabled
*/
int interworking;
/**
* access_network_type - Access Network Type
*
* When Interworking is enabled, scans will be limited to APs that
* advertise the specified Access Network Type (0..15; with 15
* indicating wildcard match).
*/
int access_network_type;
/**
* hessid - Homogenous ESS identifier
*
* If this is set (any octet is non-zero), scans will be used to
* request response only from BSSes belonging to the specified
* Homogeneous ESS. This is used only if interworking is enabled.
*/
u8 hessid[ETH_ALEN];
/**
* home_realm - Home Realm for Interworking
*/
char *home_realm;
/**
* home_username - Username for Interworking network selection
*/
char *home_username;
/**
* home_password - Password for Interworking network selection
*/
char *home_password;
/**
* home_ca_cert - CA certificate for Interworking network selection
*/
char *home_ca_cert;
/**
* home_imsi - IMSI in <MCC> | <MNC> | '-' | <MSIN> format
*/
char *home_imsi;
/**
* home_milenage - Milenage parameters for SIM/USIM simulator in
* <Ki>:<OPc>:<SQN> format
*/
char *home_milenage;
#ifdef ANDROID_P2P
/**
* prioritize - Prioritize an Interface
* Interface name of the interface that needs to be proritized; Useful
* for resolving conflicts in connection. up to 16 octets encoded in
* UTF-8
*/
char *prioritize;
#endif
};
/* Prototypes for common functions from config.c */
void wpa_config_free(struct wpa_config *ssid);
void wpa_config_free_ssid(struct wpa_ssid *ssid);
void wpa_config_foreach_network(struct wpa_config *config,
void (*func)(void *, struct wpa_ssid *),
void *arg);
struct wpa_ssid * wpa_config_get_network(struct wpa_config *config, int id);
struct wpa_ssid * wpa_config_add_network(struct wpa_config *config);
int wpa_config_remove_network(struct wpa_config *config, int id);
void wpa_config_set_network_defaults(struct wpa_ssid *ssid);
int wpa_config_set(struct wpa_ssid *ssid, const char *var, const char *value,
int line);
int wpa_config_set_quoted(struct wpa_ssid *ssid, const char *var,
const char *value);
char ** wpa_config_get_all(struct wpa_ssid *ssid, int get_keys);
char * wpa_config_get(struct wpa_ssid *ssid, const char *var);
char * wpa_config_get_no_key(struct wpa_ssid *ssid, const char *var);
void wpa_config_update_psk(struct wpa_ssid *ssid);
int wpa_config_add_prio_network(struct wpa_config *config,
struct wpa_ssid *ssid);
int wpa_config_update_prio_list(struct wpa_config *config);
const struct wpa_config_blob * wpa_config_get_blob(struct wpa_config *config,
const char *name);
void wpa_config_set_blob(struct wpa_config *config,
struct wpa_config_blob *blob);
void wpa_config_free_blob(struct wpa_config_blob *blob);
int wpa_config_remove_blob(struct wpa_config *config, const char *name);
struct wpa_config * wpa_config_alloc_empty(const char *ctrl_interface,
const char *driver_param);
#ifndef CONFIG_NO_STDOUT_DEBUG
void wpa_config_debug_dump_networks(struct wpa_config *config);
#else /* CONFIG_NO_STDOUT_DEBUG */
#define wpa_config_debug_dump_networks(c) do { } while (0)
#endif /* CONFIG_NO_STDOUT_DEBUG */
/* Prototypes for common functions from config.c */
int wpa_config_process_global(struct wpa_config *config, char *pos, int line);
/* Prototypes for backend specific functions from the selected config_*.c */
/**
* wpa_config_read - Read and parse configuration database
* @name: Name of the configuration (e.g., path and file name for the
* configuration file)
* Returns: Pointer to allocated configuration data or %NULL on failure
*
* This function reads configuration data, parses its contents, and allocates
* data structures needed for storing configuration information. The allocated
* data can be freed with wpa_config_free().
*
* Each configuration backend needs to implement this function.
*/
struct wpa_config * wpa_config_read(const char *name);
/**
* wpa_config_write - Write or update configuration data
* @name: Name of the configuration (e.g., path and file name for the
* configuration file)
* @config: Configuration data from wpa_config_read()
* Returns: 0 on success, -1 on failure
*
* This function write all configuration data into an external database (e.g.,
* a text file) in a format that can be read with wpa_config_read(). This can
* be used to allow wpa_supplicant to update its configuration, e.g., when a
* new network is added or a password is changed.
*
* Each configuration backend needs to implement this function.
*/
int wpa_config_write(const char *name, struct wpa_config *config);
#endif /* CONFIG_H */
|
TeamNyx/external_wpa_supplicant_8
|
wpa_supplicant/config.h
|
C
|
gpl-2.0
| 18,957
|
[
30522,
1013,
1008,
1008,
1059,
4502,
10514,
9397,
19341,
3372,
1013,
9563,
5371,
5090,
1008,
9385,
1006,
1039,
1007,
2494,
1011,
2384,
1010,
8183,
19496,
16007,
10224,
1026,
1046,
1030,
1059,
2487,
1012,
10882,
1028,
1008,
1008,
2023,
4007,
2089,
2022,
5500,
2104,
1996,
3408,
1997,
1996,
18667,
2094,
6105,
1012,
1008,
2156,
3191,
4168,
2005,
2062,
4751,
1012,
1008,
1013,
1001,
2065,
13629,
2546,
9530,
8873,
2290,
1035,
1044,
1001,
9375,
9530,
8873,
2290,
1035,
1044,
1001,
9375,
12398,
1035,
19413,
18155,
1035,
2544,
1015,
1001,
2065,
3207,
2546,
9530,
8873,
2290,
1035,
2053,
1035,
13594,
1035,
6364,
1001,
9375,
12398,
1035,
9706,
1035,
13594,
1016,
1001,
2842,
1013,
1008,
9530,
8873,
2290,
1035,
2053,
1035,
13594,
1035,
6364,
1008,
1013,
1001,
9375,
12398,
1035,
30524,
1035,
13594,
1035,
6364,
1008,
1013,
1001,
9375,
12398,
1035,
3435,
1035,
2128,
4887,
2705,
1015,
1001,
9375,
12398,
1035,
1052,
2475,
2361,
1035,
2175,
1035,
7848,
1021,
1001,
9375,
12398,
1035,
1052,
2475,
2361,
1035,
26721,
1035,
18667,
2015,
1015,
1001,
9375,
12398,
1035,
18667,
2015,
1035,
4098,
1035,
4175,
3263,
1001,
9375,
12398,
1035,
18667,
2015,
1035,
4654,
16781,
1035,
2287,
8380,
1001,
9375,
12398,
1035,
18667,
2015,
1035,
4654,
16781,
1035,
13594,
1035,
4175,
1016,
1001,
9375,
12398,
1035,
4098,
1035,
16371,
2213,
1035,
2358,
2050,
11899,
1001,
9375,
12398,
1035,
3229,
1035,
2897,
1035,
2828,
2321,
1001,
2421,
1000,
9530,
8873,
2290,
1035,
7020,
3593,
1012,
1044,
1000,
1001,
2421,
1000,
1059,
4523,
1013,
1059,
4523,
1012,
1044,
1000,
1001,
9375,
12935,
2290,
1035,
2904,
1035,
5080,
1035,
2171,
2978,
1006,
1014,
1007,
1001,
9375,
12935,
2290,
1035,
2904,
1035,
9530,
8873,
2290,
1035,
4725,
2978,
1006,
1015,
1007,
1001,
9375,
12935,
2290,
1035,
2904,
1035,
5080,
1035,
2828,
2978,
1006,
1016,
1007,
1001,
9375,
12935,
2290,
1035,
2904,
1035,
9808,
1035,
2544,
2978,
1006,
1017,
1007,
1001,
9375,
12935,
2290,
1035,
2904,
1035,
1057,
21272,
2978,
1006,
1018,
1007,
1001,
9375,
12935,
2290,
1035,
2904,
1035,
2406,
2978,
1006,
1019,
1007,
1001,
9375,
12935,
2290,
1035,
2904,
1035,
10819,
1035,
5080,
1035,
2828,
2978,
1006,
1020,
1007,
1001,
9375,
12935,
2290,
1035,
2904,
1035,
1052,
2475,
2361,
1035,
7020,
3593,
1035,
2695,
8873,
2595,
2978,
1006,
1021,
1007,
1001,
9375,
12935,
2290,
1035,
2904,
1035,
1059,
4523,
1035,
5164,
2978,
1006,
1022,
1007,
1001,
9375,
12935,
2290,
1035,
2904,
1035,
1052,
2475,
2361,
1035,
26721,
1035,
18667,
2015,
2978,
1006,
1023,
1007,
1001,
9375,
12935,
2290,
1035,
2904,
1035,
21431,
1035,
5331,
2978,
1006,
2184,
1007,
1001,
9375,
12935,
2290,
1035,
2904,
1035,
1052,
2475,
2361,
1035,
4952,
1035,
3149,
2978,
1006,
2340,
1007,
1001,
9375,
12935,
2290,
1035,
2904,
1035,
1052,
2475,
2361,
1035,
6728,
2121,
1035,
3149,
2978,
1006,
2260,
1007,
1001,
2065,
3207,
2546,
11924,
1035,
1052,
2475,
2361,
1001,
9375,
12935,
2290,
1035,
2904,
1035,
2065,
10732,
1035,
9470,
2978,
1006,
2410,
1007,
1001,
2203,
10128,
1013,
1008,
1008,
1008,
30523,
9706,
1035,
13594,
1015,
1001,
2203,
10128,
1013,
1008,
9530,
8873,
2290,
1035,
2053,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
9706,
1035,
13594,
1015,
1001,
2203,
10128,
1013,
1008,
9530,
8873,
2290,
1035,
2053,
30526
] |
/*
* Copyright (C) 2013 Camptocamp
*
* This file is part of MapFish Print
*
* MapFish Print is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* MapFish Print is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MapFish Print. If not, see <http://www.gnu.org/licenses/>.
*/
package org.mapfish.print;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.TreeSet;
import java.util.Map;
import javax.annotation.PreDestroy;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONWriter;
import org.mapfish.print.config.Config;
import org.mapfish.print.config.ConfigFactory;
import org.mapfish.print.output.OutputFactory;
import org.mapfish.print.output.OutputFormat;
import org.mapfish.print.output.PrintParams;
import org.mapfish.print.utils.PJsonObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Required;
import com.lowagie.text.DocumentException;
import com.lowagie.text.FontFactory;
import com.lowagie.text.pdf.ByteBuffer;
/**
* The main class for printing maps. Will parse the spec, create the PDF
* document and generate it.
*
* This class should not be directly created but rather obtained from an application
* context object so that all plugins and dependencies are correctly injected into it
*/
public class MapPrinter {
/**
* The parsed configuration file.
*
* This is a per instance property and while can be set by spring typically will be set by user of printer
*/
private Config config;
/**
* The directory where the configuration file sits (used for ${configDir})
*
* This is a per instance property and while can be set by spring typically will be set by user of printer
*/
private File configDir;
/**
* OutputFactory for the final output
*
* Injected by Spring
*/
private OutputFactory outputFactory;
/**
* Factory for creating config objects
*
* Injected by Spring
*/
private ConfigFactory configFactory;
private volatile boolean fontsInitialized = false;
static {
//configure iText to use a higher precision for floats
ByteBuffer.HIGH_PRECISION = true;
}
/**
* OutputFactory for the final output
*
* Injected by Spring
*/
@Autowired
@Required
public void setOutputFactory(OutputFactory outputFactory) {
this.outputFactory = outputFactory;
}
/**
* Factory for creating config objects
*
* Injected by Spring
*/
@Autowired
@Required
public void setConfigFactory(ConfigFactory configFactory) {
this.configFactory = configFactory;
}
/**
* Sets both the configuration by parsing the configFile and the configDir relative to the configFile
* @param configFile
* @throws FileNotFoundException
* @return this
*/
public MapPrinter setYamlConfigFile(File configFile) throws FileNotFoundException {
this.config = configFactory.fromYaml(configFile);
configDir = configFile.getParentFile();
if (configDir == null) {
try {
configDir = new File(".").getCanonicalFile();
} catch (IOException e) {
configDir = new File(".");
}
}
return this;
}
public MapPrinter setConfig(String strConfig) {
this.config = configFactory.fromString(strConfig);
return this;
}
public MapPrinter setConfig(InputStream inputConfig) {
this.config = configFactory.fromInputStream(inputConfig);
return this;
}
public MapPrinter setConfigDir(String configDir) {
this.configDir = new File(configDir);
return this;
}
/**
* Register the user specified fonts in iText.
*/
private void initFonts() {
if(!fontsInitialized) {
synchronized (this) {
if(!fontsInitialized) {
//we don't do that since it takes ages and that would hurt the perfs for
//the python controller:
//FontFactory.registerDirectories();
FontFactory.defaultEmbedding = true;
final TreeSet<String> fontPaths = config.getFonts();
if (fontPaths != null) {
for (String fontPath : fontPaths) {
fontPath = fontPath.replaceAll("\\$\\{configDir\\}", configDir.getPath());
File fontFile = new File(fontPath);
if (fontFile.isDirectory()) {
FontFactory.registerDirectory(fontPath, true);
} else {
FontFactory.register(fontPath);
}
}
}
}
}
}
}
/**
* Generate the PDF using the given spec.
*
* @return The context that was used for printing.
* @throws InterruptedException
*/
public RenderingContext print(PJsonObject jsonSpec, OutputStream outputStream, Map<String, String> headers) throws DocumentException, InterruptedException {
initFonts();
OutputFormat output = this.outputFactory.create(config, jsonSpec);
PrintParams params = new PrintParams(config, configDir, jsonSpec, outputStream, headers);
return output.print(params );
}
public static PJsonObject parseSpec(String spec) {
final JSONObject jsonSpec;
try {
jsonSpec = new JSONObject(spec);
} catch (JSONException e) {
throw new RuntimeException("Cannot parse the spec file", e);
}
return new PJsonObject(jsonSpec, "spec");
}
/**
* Use by /info.json to generate its returned content.
*/
public void printClientConfig(JSONWriter json) throws JSONException {
config.printClientConfig(json);
}
/**
* Stop the thread pool or others.
*/
@PreDestroy
public void stop() {
config.close();
}
public String getOutputFilename(String layout, String defaultName) {
final String name = config.getOutputFilename(layout);
return name == null ? defaultName : name;
}
public Config getConfig() {
return config;
}
public OutputFormat getOutputFormat(PJsonObject jsonSpec) {
return outputFactory.create(config, jsonSpec);
}
}
|
mbarto/mapfish-print
|
src/main/java/org/mapfish/print/MapPrinter.java
|
Java
|
gpl-3.0
| 7,087
|
[
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2286,
3409,
3406,
26468,
1008,
1008,
2023,
5371,
2003,
2112,
1997,
4949,
7529,
6140,
1008,
1008,
4949,
7529,
6140,
2003,
2489,
4007,
1024,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
2009,
1998,
1013,
2030,
19933,
1008,
2009,
2104,
1996,
3408,
1997,
1996,
27004,
2236,
2270,
6105,
2004,
2405,
2011,
1008,
1996,
2489,
4007,
3192,
1010,
2593,
2544,
1017,
1997,
1996,
6105,
1010,
2030,
1008,
1006,
2012,
2115,
5724,
1007,
2151,
2101,
2544,
1012,
1008,
1008,
4949,
7529,
6140,
2003,
5500,
1999,
1996,
3246,
2008,
2009,
2097,
2022,
6179,
1010,
1008,
2021,
2302,
2151,
10943,
2100,
1025,
2302,
2130,
1996,
13339,
10943,
2100,
1997,
1008,
6432,
8010,
2030,
10516,
2005,
1037,
3327,
3800,
1012,
2156,
1996,
1008,
27004,
2236,
2270,
6105,
2005,
2062,
4751,
1012,
1008,
1008,
2017,
2323,
2031,
2363,
1037,
6100,
1997,
1996,
27004,
2236,
2270,
6105,
1008,
2247,
2007,
4949,
7529,
6140,
1012,
2065,
2025,
1010,
2156,
1026,
8299,
1024,
1013,
1013,
7479,
1012,
27004,
1012,
8917,
1013,
15943,
1013,
1028,
1012,
1008,
1013,
7427,
8917,
1012,
4949,
7529,
1012,
6140,
1025,
12324,
9262,
1012,
22834,
1012,
5371,
1025,
12324,
9262,
1012,
22834,
1012,
5371,
17048,
14876,
8630,
10288,
24422,
1025,
12324,
9262,
1012,
22834,
1012,
22834,
10288,
24422,
1025,
12324,
9262,
1012,
22834,
1012,
20407,
25379,
1025,
12324,
9262,
1012,
22834,
1012,
27852,
25379,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
3628,
3388,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
4949,
1025,
12324,
9262,
2595,
1012,
30524,
1025,
12324,
8917,
1012,
1046,
3385,
1012,
1046,
3385,
10288,
24422,
1025,
12324,
8917,
1012,
1046,
3385,
1012,
1046,
3385,
16429,
20614,
1025,
12324,
8917,
1012,
1046,
3385,
1012,
1046,
3385,
15994,
1025,
12324,
8917,
1012,
4949,
7529,
1012,
6140,
1012,
9530,
8873,
2290,
1012,
9530,
8873,
2290,
1025,
12324,
8917,
1012,
4949,
7529,
1012,
6140,
1012,
9530,
8873,
2290,
1012,
9530,
8873,
25708,
18908,
10253,
1025,
12324,
8917,
1012,
4949,
7529,
1012,
6140,
1012,
6434,
1012,
6434,
21450,
1025,
12324,
8917,
1012,
4949,
7529,
1012,
6140,
1012,
6434,
1012,
6434,
14192,
4017,
1025,
12324,
8917,
1012,
4949,
7529,
1012,
6140,
1012,
6434,
1012,
6140,
28689,
5244,
1025,
12324,
8917,
1012,
4949,
7529,
1012,
6140,
1012,
21183,
12146,
1012,
1052,
22578,
17175,
2497,
20614,
1025,
12324,
8917,
1012,
3500,
15643,
6198,
1012,
13435,
1012,
4713,
1012,
5754,
17287,
3508,
1012,
8285,
20357,
2094,
1025,
12324,
8917,
1012,
3500,
15643,
6198,
1012,
13435,
1012,
4713,
1012,
5754,
17287,
3508,
1012,
3223,
1025,
12324,
4012,
1012,
2659,
22974,
2063,
1012,
3793,
1012,
6254,
10288,
24422,
1025,
12324,
4012,
1012,
2659,
22974,
2063,
1012,
3793,
1012,
15489,
21450,
1025,
12324,
4012,
1012,
2659,
22974,
2063,
1012,
3793,
1012,
11135,
1012,
24880,
8569,
12494,
1025,
1013,
1008,
1008,
1008,
1996,
2364,
2465,
2005,
8021,
7341,
1012,
2097,
11968,
3366,
1996,
28699,
1010,
3443,
1996,
11135,
1008,
6254,
1998,
9699,
2009,
1012,
1008,
1008,
2023,
2465,
2323,
2025,
2022,
3495,
2580,
2021,
2738,
4663,
2013,
2019,
4646,
1008,
6123,
30523,
5754,
17287,
3508,
1012,
3653,
6155,
13181,
2100,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
5754,
17287,
3508,
1012,
3653,
6155,
13181,
2100,
30526
] |
<?php
session_start();
include("../connect.php");
include("../function.php");
//session_start();
if($_REQUEST['cat_id'])
{
$data="";
$count=0;
$select_list_data="select * from users_data where int_fid in(".$_REQUEST['cat_id'].") and int_del_status='0'";
$result_list_data=mysql_query($select_list_data) or die(mysql_error());
$data.="<br>";
$data.="<table style='width: 270px;' id='alternatecolor' class='altrowstable1' >";
while($fetch_list_data=mysql_fetch_array($result_list_data))
{ $count++;
$imgsrc="../".$fetch_list_data['txt_real_path'];
$data.="<tr >";
$data.="<td style='padding-left:5px;'>";
$data.="<div style='width:240px;overflow:hidden;'>".$fetch_list_data['txt_file_name']."</div>";
$data.="</td>";
$data.="<td >";
$data.="<img src='images/play-icon.png' style='cursor:pointer;' title='Play Item' onclick='go(\"$imgsrc\");'>";
$data.="</td>";
$data.="</tr>";
//$main_data="<a href='javascript:load_data(\"".$fetch_list_data['txt_file_name']."\");'>".$fetch_list_data['txt_file_name']."</a>";
//$data=$data.$main_data;
//$data.="</br></br>";
}
$data.="</table>";
echo $data;
}
?>
|
aroramanish63/bulmail_app
|
Live Backup/databagg 30 jan backup/user/ajax_load_list_11_7.php
|
PHP
|
gpl-3.0
| 1,421
|
[
30522,
1026,
1029,
25718,
5219,
1035,
2707,
1006,
1007,
1025,
2421,
1006,
1000,
1012,
1012,
1013,
7532,
1012,
25718,
1000,
1007,
1025,
2421,
1006,
1000,
1012,
1012,
30524,
1005,
4937,
1035,
8909,
1005,
1033,
1007,
1063,
1002,
2951,
1027,
1000,
1000,
1025,
1002,
4175,
1027,
1014,
1025,
1002,
7276,
1035,
2862,
1035,
2951,
1027,
1000,
7276,
1008,
2013,
5198,
1035,
2951,
2073,
20014,
1035,
10882,
2094,
1999,
1006,
1000,
1012,
1002,
1035,
5227,
1031,
1005,
4937,
1035,
8909,
1005,
1033,
1012,
1000,
1007,
1998,
20014,
1035,
3972,
1035,
3570,
1027,
1005,
1014,
1005,
1000,
1025,
1002,
2765,
1035,
2862,
1035,
2951,
1027,
2026,
2015,
4160,
2140,
1035,
23032,
1006,
1002,
7276,
1035,
2862,
1035,
2951,
1007,
2030,
3280,
1006,
2026,
2015,
4160,
2140,
1035,
7561,
1006,
1007,
1007,
1025,
1002,
2951,
1012,
1027,
1000,
1026,
7987,
1028,
1000,
1025,
1002,
2951,
1012,
1027,
1000,
1026,
2795,
2806,
1027,
1005,
9381,
1024,
13756,
2361,
2595,
1025,
1005,
8909,
1027,
1005,
6585,
18717,
1005,
2465,
1027,
1005,
12456,
10524,
9153,
3468,
2487,
1005,
1028,
1000,
1025,
2096,
1006,
1002,
18584,
1035,
2862,
1035,
2951,
1027,
2026,
2015,
4160,
2140,
1035,
18584,
1035,
9140,
1006,
1002,
2765,
1035,
2862,
1035,
2951,
1007,
1007,
1063,
1002,
4175,
1009,
1009,
1025,
1002,
10047,
5620,
11890,
1027,
1000,
1012,
1012,
1013,
1000,
1012,
1002,
18584,
1035,
2862,
1035,
2951,
1031,
1005,
19067,
2102,
1035,
2613,
1035,
4130,
1005,
1033,
1025,
1002,
2951,
1012,
1027,
1000,
1026,
19817,
1028,
1000,
1025,
1002,
2951,
1012,
1027,
1000,
1026,
14595,
2806,
1027,
1005,
11687,
4667,
1011,
2187,
1024,
1019,
2361,
2595,
1025,
1005,
1028,
1000,
1025,
1002,
2951,
1012,
1027,
1000,
1026,
4487,
2615,
2806,
1027,
1005,
9381,
1024,
11212,
2361,
2595,
1025,
2058,
12314,
1024,
5023,
1025,
1005,
1028,
1000,
1012,
1002,
18584,
1035,
2862,
1035,
2951,
1031,
1005,
19067,
2102,
1035,
5371,
1035,
2171,
1005,
1033,
1012,
1000,
1026,
1013,
4487,
2615,
1028,
1000,
1025,
1002,
2951,
1012,
1027,
1000,
1026,
1013,
14595,
1028,
1000,
1025,
1002,
2951,
1012,
1027,
1000,
1026,
14595,
1028,
1000,
1025,
1002,
2951,
1012,
1027,
1000,
1026,
10047,
2290,
5034,
2278,
1027,
1005,
4871,
1013,
2377,
1011,
12696,
1012,
1052,
3070,
1005,
2806,
1027,
1005,
12731,
25301,
2099,
1024,
20884,
1025,
1005,
2516,
1027,
1005,
2377,
8875,
1005,
2006,
20464,
6799,
1027,
1005,
2175,
1006,
1032,
1000,
1002,
10047,
5620,
11890,
1032,
1000,
1007,
1025,
1005,
1028,
1000,
1025,
1002,
2951,
1012,
1027,
1000,
1026,
1013,
14595,
1028,
1000,
1025,
1002,
2951,
1012,
1027,
1000,
1026,
1013,
19817,
1028,
1000,
1025,
1013,
1013,
1002,
2364,
1035,
2951,
1027,
1000,
1026,
1037,
17850,
12879,
1027,
1005,
9262,
22483,
1024,
7170,
1035,
2951,
1006,
1032,
1000,
1000,
1012,
1002,
18584,
1035,
2862,
1035,
2951,
1031,
1005,
19067,
2102,
1035,
5371,
1035,
2171,
1005,
1033,
1012,
1000,
1032,
1000,
1007,
1025,
1005,
1028,
1000,
1012,
1002,
18584,
1035,
2862,
1035,
2951,
1031,
1005,
19067,
30523,
1013,
3853,
1012,
25718,
1000,
1007,
1025,
1013,
1013,
5219,
1035,
2707,
1006,
1007,
1025,
2065,
1006,
1002,
1035,
5227,
1031,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1013,
3853,
1012,
25718,
1000,
1007,
1025,
1013,
1013,
5219,
1035,
2707,
1006,
1007,
1025,
2065,
1006,
1002,
1035,
5227,
1031,
30526
] |
import { ConflictException } from '@nestjs/common';
/**
* An exception that occurs whenever a resource being created already exists.
*/
export class ResourceAlreadyExistException extends ConflictException {}
|
gavenda/yondene
|
src/api/app/shared/exceptions/resource-already-exist.exception.ts
|
TypeScript
|
gpl-3.0
| 211
|
[
30522,
12324,
1063,
4736,
10288,
24422,
1065,
2013,
1005,
1030,
9089,
22578,
1013,
2691,
1005,
1025,
1013,
1008,
1008,
1008,
2019,
6453,
2008,
5158,
7188,
1037,
7692,
2108,
2580,
2525,
6526,
1012,
1008,
1013,
9167,
2465,
7692,
2389,
16416,
5149,
10288,
27870,
2595,
24422,
8908,
4736,
10288,
24422,
1063,
1065,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
/*
* Copyright 2017 The Bazel Authors. All rights reserved.
*
* Licensed 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.
*/
package com.google.idea.blaze.aspect;
import static com.google.common.truth.Truth.assertThat;
import static java.nio.charset.StandardCharsets.UTF_8;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
import com.google.common.io.Files;
import com.google.idea.blaze.aspect.JarFilter.JarFilterOptions;
import java.io.File;
import java.io.FileOutputStream;
import java.util.Enumeration;
import java.util.List;
import java.util.zip.ZipEntry;
import java.util.zip.ZipFile;
import java.util.zip.ZipOutputStream;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
/** Unit tests for {@link JarFilter} */
@RunWith(JUnit4.class)
public class JarFilterTest {
@Rule public TemporaryFolder folder = new TemporaryFolder();
@Test
public void testFilterMethod() throws Exception {
List<String> prefixes =
ImmutableList.of("com/google/foo/Foo", "com/google/bar/Bar", "com/google/baz/Baz");
assertThat(JarFilter.shouldKeepClass(prefixes, "com/google/foo/Foo.class")).isTrue();
assertThat(JarFilter.shouldKeepClass(prefixes, "com/google/foo/Foo$Inner.class")).isTrue();
assertThat(JarFilter.shouldKeepClass(prefixes, "com/google/bar/Bar.class")).isTrue();
assertThat(JarFilter.shouldKeepClass(prefixes, "com/google/foo/Foo/NotFoo.class")).isFalse();
assertThat(JarFilter.shouldKeepClass(prefixes, "wrong/com/google/foo/Foo.class")).isFalse();
}
@Test
public void fullIntegrationTest() throws Exception {
File fooJava = folder.newFile("Foo.java");
Files.write("package com.google.foo; class Foo { class Inner {} }".getBytes(UTF_8), fooJava);
File barJava = folder.newFile("Bar.java");
Files.write("package com.google.foo.bar; class Bar {}".getBytes(UTF_8), barJava);
File srcJar = folder.newFile("gen.srcjar");
try (ZipOutputStream zo = new ZipOutputStream(new FileOutputStream(srcJar))) {
zo.putNextEntry(new ZipEntry("com/google/foo/gen/Gen.java"));
zo.write("package gen; class Gen {}".getBytes(UTF_8));
zo.closeEntry();
zo.putNextEntry(new ZipEntry("com/google/foo/gen/Gen2.java"));
zo.write("package gen; class Gen2 {}".getBytes(UTF_8));
zo.closeEntry();
}
File src3Jar = folder.newFile("gen3.srcjar");
try (ZipOutputStream zo = new ZipOutputStream(new FileOutputStream(src3Jar))) {
zo.putNextEntry(new ZipEntry("com/google/foo/gen/Gen3.java"));
zo.write("package gen; class Gen3 {}".getBytes(UTF_8));
zo.closeEntry();
}
File filterJar = folder.newFile("foo.jar");
try (ZipOutputStream zo = new ZipOutputStream(new FileOutputStream(filterJar))) {
zo.putNextEntry(new ZipEntry("com/google/foo/Foo.class"));
zo.closeEntry();
zo.putNextEntry(new ZipEntry("com/google/foo/Foo$Inner.class"));
zo.closeEntry();
zo.putNextEntry(new ZipEntry("com/google/foo/bar/Bar.class"));
zo.closeEntry();
zo.putNextEntry(new ZipEntry("gen/Gen.class"));
zo.closeEntry();
zo.putNextEntry(new ZipEntry("gen/Gen2.class"));
zo.closeEntry();
zo.putNextEntry(new ZipEntry("gen/Gen3.class"));
zo.closeEntry();
zo.putNextEntry(new ZipEntry("com/google/foo/Foo2.class"));
zo.closeEntry();
}
File filterSrcJar = folder.newFile("foo-src.jar");
try (ZipOutputStream zo = new ZipOutputStream(new FileOutputStream(filterSrcJar))) {
zo.putNextEntry(new ZipEntry("com/google/foo/Foo.java"));
zo.closeEntry();
zo.putNextEntry(new ZipEntry("com/google/foo/bar/Bar.java"));
zo.closeEntry();
zo.putNextEntry(new ZipEntry("gen/Gen.java"));
zo.closeEntry();
zo.putNextEntry(new ZipEntry("gen/Gen2.java"));
zo.closeEntry();
zo.putNextEntry(new ZipEntry("gen/Gen3.java"));
zo.closeEntry();
zo.putNextEntry(new ZipEntry("com/google/foo/Foo2.java"));
zo.closeEntry();
zo.putNextEntry(new ZipEntry("com/google/foo/bar/Bar2.java"));
zo.closeEntry();
}
File filteredJar = folder.newFile("foo-filtered-gen.jar");
File filteredSourceJar = folder.newFile("foo-filtered-gen-src.jar");
String[] args =
new String[] {
"--keep_java_file",
fooJava.getPath(),
"--keep_java_file",
barJava.getPath(),
"--keep_source_jar",
srcJar.getPath(),
"--keep_source_jar",
src3Jar.getPath(),
"--filter_jar",
filterJar.getPath(),
"--filter_source_jar",
filterSrcJar.getPath(),
"--filtered_jar",
filteredJar.getPath(),
"--filtered_source_jar",
filteredSourceJar.getPath()
};
JarFilterOptions options = JarFilter.parseArgs(args);
JarFilter.main(options);
List<String> filteredJarNames = Lists.newArrayList();
try (ZipFile zipFile = new ZipFile(filteredJar)) {
Enumeration<? extends ZipEntry> entries = zipFile.entries();
while (entries.hasMoreElements()) {
ZipEntry zipEntry = entries.nextElement();
filteredJarNames.add(zipEntry.getName());
}
}
List<String> filteredSourceJarNames = Lists.newArrayList();
try (ZipFile zipFile = new ZipFile(filteredSourceJar)) {
Enumeration<? extends ZipEntry> entries = zipFile.entries();
while (entries.hasMoreElements()) {
ZipEntry zipEntry = entries.nextElement();
filteredSourceJarNames.add(zipEntry.getName());
}
}
assertThat(filteredJarNames)
.containsExactly(
"com/google/foo/Foo.class",
"com/google/foo/Foo$Inner.class",
"com/google/foo/bar/Bar.class",
"gen/Gen.class",
"gen/Gen2.class",
"gen/Gen3.class");
assertThat(filteredSourceJarNames)
.containsExactly(
"com/google/foo/Foo.java",
"com/google/foo/bar/Bar.java",
"gen/Gen.java",
"gen/Gen2.java",
"gen/Gen3.java");
}
}
|
bazelbuild/intellij
|
aspect/tools/tests/unittests/com/google/idea/blaze/aspect/JarFilterTest.java
|
Java
|
apache-2.0
| 6,677
|
[
30522,
1013,
1008,
1008,
9385,
2418,
1996,
8670,
12638,
6048,
1012,
2035,
2916,
9235,
1012,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
30524,
1007,
1025,
1008,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
1008,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1008,
1008,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1008,
1008,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1008,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
1000,
2004,
2003,
1000,
3978,
1010,
1008,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1008,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
1008,
12546,
2104,
1996,
6105,
1012,
1008,
1013,
7427,
4012,
1012,
8224,
1012,
2801,
1012,
15347,
1012,
7814,
1025,
12324,
10763,
4012,
1012,
8224,
1012,
2691,
1012,
3606,
1012,
3606,
1012,
20865,
8322,
2102,
1025,
12324,
10763,
9262,
1012,
9152,
2080,
1012,
25869,
13462,
1012,
3115,
7507,
22573,
3215,
1012,
21183,
2546,
1035,
1022,
1025,
12324,
4012,
1012,
8224,
1012,
2691,
1012,
8145,
1012,
10047,
28120,
3085,
9863,
1025,
12324,
4012,
1012,
8224,
1012,
2691,
1012,
8145,
1012,
7201,
1025,
12324,
4012,
1012,
8224,
1012,
2691,
1012,
22834,
1012,
6764,
1025,
12324,
4012,
1012,
8224,
1012,
2801,
1012,
15347,
1012,
7814,
1012,
15723,
8873,
21928,
1012,
15723,
8873,
21928,
7361,
9285,
1025,
12324,
9262,
1012,
22834,
1012,
5371,
1025,
12324,
9262,
1012,
22834,
1012,
5371,
5833,
18780,
21422,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
4372,
17897,
8156,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
2862,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
14101,
1012,
14101,
4765,
2854,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
14101,
1012,
14101,
8873,
2571,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
14101,
1012,
14101,
5833,
18780,
21422,
1025,
12324,
8917,
1012,
12022,
4183,
1012,
3627,
1025,
12324,
8917,
1012,
12022,
4183,
1012,
3231,
1025,
12324,
8917,
1012,
12022,
4183,
1012,
3513,
1012,
5741,
10371,
2121,
1025,
12324,
8917,
1012,
12022,
4183,
1012,
5479,
1012,
2448,
24415,
1025,
12324,
8917,
1012,
12022,
4183,
1012,
7190,
1012,
12022,
4183,
2549,
1025,
1013,
1008,
1008,
3131,
5852,
2005,
1063,
1030,
4957,
15723,
8873,
21928,
1065,
1008,
1013,
1030,
2448,
24415,
1006,
12022,
4183,
2549,
1012,
2465,
1007,
2270,
2465,
15723,
8873,
21928,
22199,
1063,
1030,
3627,
2270,
5741,
10371,
2121,
19622,
1027,
2047,
5741,
10371,
2121,
1006,
1007,
1025,
1030,
3231,
2270,
11675,
3231,
8873,
21928,
11368,
6806,
2094,
1006,
1007,
11618,
6453,
1063,
2862,
1026,
5164,
1028,
17576,
2229,
1027,
10047,
28120,
3085,
9863,
1012,
1997,
1006,
1000,
4012,
1013,
8224,
1013,
29379,
1013,
29379,
1000,
1010,
1000,
4012,
1013,
8224,
1013,
3347,
1013,
3347,
1000,
1010,
1000,
4012,
1013,
8224,
1013,
8670,
2480,
1013,
8670,
2480,
1000,
1007,
1025,
20865,
8322,
2102,
1006,
15723,
8873,
21928,
1012,
2323,
20553,
15042,
27102,
1006,
17576,
2229,
1010,
1000,
4012,
1013,
8224,
1013,
29379,
30523,
1996,
1000,
6105,
1000,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1996,
1000,
6105,
1000,
30526
] |
{% extends "admin/base_site.html" %}
{% load i18n static %}
{% block extrastyle %}{{ block.super }}<link rel="stylesheet" type="text/css" href="{% static "admin/css/login.css" %}" />
{{ form.media }}
{% endblock %}
{% block bodyclass %}{{ block.super }} login{% endblock %}
{% block usertools %}{% endblock %}
{% block nav-global %}{% endblock %}
{% block content_title %}{% endblock %}
{% block breadcrumbs %}{% endblock %}
{% block content %}
{% if form.errors and not form.non_field_errors %}
<p class="errornote">
{% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %}
</p>
{% endif %}
{% if form.non_field_errors %}
{% for error in form.non_field_errors %}
<p class="errornote">
{{ error }}
</p>
{% endfor %}
{% endif %}
<div id="content-main">
{% if user.is_authenticated %}
<p class="errornote">
{% blocktrans with username=request.user.get_username trimmed %}
You are authenticated as {{ username }}, but are not authorized to
access this page. Would you like to login to a different account?
{% endblocktrans %}
</p>
{% endif %}
<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
<div class="form-row">
{{ form.username.errors }}
{{ form.username.label_tag }} {{ form.username }}
</div>
<div class="form-row">
{{ form.password.errors }}
{{ form.password.label_tag }} {{ form.password }}
<input type="hidden" name="next" value="{{ next }}" />
</div>
{% url 'admin_password_reset' as password_reset_url %}
{% if password_reset_url %}
<div class="password-reset-link">
<a href="{{ password_reset_url }}">{% trans 'Forgotten your password or username?' %}</a>
</div>
{% endif %}
<div class="submit-row">
<label> </label><input type="submit" value="{% trans 'Log in' %}" />
</div>
</form>
</div>
{% endblock %}
|
CarlosTenorio/vespapp-web
|
web/templates/admin/login.html
|
HTML
|
gpl-3.0
| 1,916
|
[
30522,
1063,
1003,
8908,
1000,
4748,
10020,
1013,
2918,
1035,
2609,
1012,
16129,
1000,
1003,
1065,
1063,
1003,
7170,
1045,
15136,
2078,
10763,
1003,
1065,
1063,
1003,
3796,
26279,
27983,
1003,
1065,
1063,
1063,
3796,
1012,
3565,
1065,
1065,
1026,
4957,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
17850,
12879,
1027,
1000,
1063,
1003,
10763,
1000,
4748,
10020,
1013,
20116,
2015,
1013,
8833,
2378,
1012,
20116,
2015,
1000,
1003,
1065,
1000,
1013,
1028,
1063,
1063,
2433,
1012,
2865,
1065,
1065,
1063,
1003,
2203,
23467,
1003,
1065,
1063,
1003,
3796,
2303,
26266,
1003,
1065,
1063,
1063,
3796,
1012,
3565,
1065,
1065,
8833,
2378,
1063,
1003,
2203,
23467,
1003,
1065,
1063,
1003,
3796,
5310,
3406,
27896,
1003,
1065,
1063,
1003,
2203,
23467,
1003,
1065,
1063,
1003,
3796,
6583,
2615,
1011,
3795,
1003,
1065,
1063,
1003,
2203,
23467,
1003,
1065,
1063,
1003,
3796,
4180,
1035,
2516,
1003,
1065,
1063,
1003,
2203,
23467,
1003,
1065,
1063,
1003,
3796,
7852,
26775,
25438,
2015,
1003,
1065,
1063,
1003,
2203,
23467,
1003,
1065,
1063,
1003,
3796,
4180,
1003,
1065,
1063,
1003,
2065,
2433,
1012,
10697,
1998,
2025,
2433,
1012,
2512,
1035,
2492,
1035,
10697,
1003,
1065,
1026,
1052,
2465,
1027,
1000,
7561,
22074,
1000,
1028,
1063,
1003,
2065,
2433,
1012,
10697,
1012,
5167,
1064,
3091,
1027,
1027,
1015,
1003,
1065,
1063,
1003,
9099,
1000,
3531,
6149,
1996,
7561,
2917,
1012,
1000,
1003,
1065,
1063,
1003,
2842,
1003,
1065,
1063,
1003,
9099,
1000,
3531,
6149,
1996,
10697,
2917,
1012,
1000,
1003,
1065,
1063,
1003,
2203,
10128,
1003,
1065,
1026,
1013,
1052,
1028,
1063,
1003,
2203,
10128,
1003,
1065,
1063,
1003,
2065,
2433,
1012,
2512,
1035,
2492,
1035,
10697,
1003,
1065,
1063,
1003,
2005,
7561,
1999,
2433,
1012,
2512,
1035,
2492,
1035,
10697,
1003,
1065,
1026,
1052,
2465,
1027,
1000,
7561,
22074,
1000,
1028,
1063,
1063,
7561,
1065,
1065,
1026,
1013,
1052,
1028,
1063,
1003,
2203,
29278,
1003,
1065,
1063,
1003,
2203,
10128,
1003,
1065,
1026,
4487,
2615,
8909,
1027,
1000,
4180,
1011,
2364,
1000,
1028,
1063,
1003,
2065,
5310,
1012,
2003,
1035,
14469,
4383,
1003,
1065,
1026,
1052,
2465,
1027,
1000,
7561,
22074,
1000,
1028,
1063,
1003,
3796,
6494,
3619,
2007,
5310,
18442,
1027,
5227,
1012,
5310,
1012,
2131,
1035,
5310,
18442,
21920,
1003,
1065,
2017,
2024,
14469,
4383,
2004,
1063,
1063,
5310,
18442,
1065,
1065,
1010,
2021,
2024,
2025,
9362,
2000,
3229,
2023,
3931,
1012,
2052,
2017,
2066,
2000,
8833,
2378,
2000,
1037,
2367,
4070,
1029,
1063,
1003,
2203,
23467,
30524,
1065,
1065,
1000,
4118,
1027,
1000,
2695,
1000,
8909,
1027,
1000,
8833,
2378,
1011,
2433,
1000,
1028,
1063,
1003,
20116,
12881,
1035,
19204,
1003,
1065,
1026,
4487,
2615,
2465,
1027,
1000,
2433,
1011,
5216,
1000,
1028,
1063,
1063,
2433,
1012,
5310,
18442,
1012,
10697,
1065,
1065,
1063,
1063,
2433,
1012,
5310,
18442,
1012,
3830,
1035,
6415,
1065,
1065,
1063,
1063,
2433,
1012,
5310,
30523,
6494,
3619,
1003,
1065,
1026,
1013,
1052,
1028,
1063,
1003,
2203,
10128,
1003,
1065,
1026,
2433,
2895,
1027,
1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100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
6494,
3619,
1003,
1065,
1026,
1013,
1052,
1028,
1063,
1003,
2203,
10128,
1003,
1065,
1026,
2433,
2895,
1027,
1000,
1063,
1063,
10439,
1035,
4130,
30526
] |
from django.shortcuts import render,get_object_or_404
from django.http import Http404
# Create your views here.
from django.http import HttpResponse
def home(request):
return render(request,'index.html');
|
iscarecrow/sb
|
server/views.py
|
Python
|
mit
| 208
|
[
30522,
2013,
6520,
23422,
1012,
2460,
12690,
2015,
12324,
17552,
1010,
2131,
1035,
4874,
1035,
2030,
1035,
24837,
2013,
6520,
23422,
1012,
8299,
12324,
8299,
12740,
2549,
1001,
3443,
2115,
5328,
2182,
1012,
2013,
6520,
23422,
1012,
8299,
12324,
8299,
6072,
26029,
3366,
13366,
2188,
1006,
5227,
1007,
1024,
2709,
17552,
1006,
5227,
1010,
1005,
5950,
1012,
16129,
1005,
1007,
1025,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
30526
] |
/***************************************************************
*
* Copyright (C) 1990-2007, Condor Team, Computer Sciences Department,
* University of Wisconsin-Madison, WI.
*
* Licensed 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.
*
***************************************************************/
#include "condor_common.h"
#include "condor_config.h"
#include "condor_state.h"
#include "condor_api.h"
#include "status_types.h"
#include "totals.h"
#include "get_daemon_name.h"
#include "daemon.h"
#include "dc_collector.h"
#include "extArray.h"
#include "sig_install.h"
#include "string_list.h"
#include "condor_string.h" // for strnewp()
#include "match_prefix.h" // is_arg_colon_prefix
#include "print_wrapped_text.h"
#include "error_utils.h"
#include "condor_distribution.h"
#include "condor_version.h"
#include <vector>
#include <sstream>
#include <iostream>
using std::vector;
using std::string;
using std::stringstream;
struct SortSpec {
string arg;
string keyAttr;
string keyExprAttr;
ExprTree* expr;
ExprTree* exprLT;
ExprTree* exprEQ;
SortSpec(): arg(), keyAttr(), keyExprAttr(), expr(NULL), exprLT(NULL), exprEQ(NULL) {}
~SortSpec() {
if (NULL != expr) delete expr;
if (NULL != exprLT) delete exprLT;
if (NULL != exprEQ) delete exprEQ;
}
SortSpec(const SortSpec& src): expr(NULL), exprLT(NULL), exprEQ(NULL) { *this = src; }
SortSpec& operator=(const SortSpec& src) {
if (this == &src) return *this;
arg = src.arg;
keyAttr = src.keyAttr;
keyExprAttr = src.keyExprAttr;
if (NULL != expr) delete expr;
expr = src.expr->Copy();
if (NULL != exprLT) delete exprLT;
exprLT = src.exprLT->Copy();
if (NULL != exprEQ) delete exprEQ;
exprEQ = src.exprEQ->Copy();
return *this;
}
};
// global variables
AttrListPrintMask pm;
printmask_headerfooter_t pmHeadFoot = STD_HEADFOOT;
List<const char> pm_head; // The list of headings for the mask entries
std::vector<GroupByKeyInfo> group_by_keys; // TJ 8.1.5 for future use, ignored for now.
bool explicit_format = false;
bool using_print_format = false; // hack for now so we can get standard totals when using -print-format
bool disable_user_print_files = false; // allow command line to defeat use of default user print files.
const char *DEFAULT= "<default>";
DCCollector* pool = NULL;
AdTypes type = (AdTypes) -1;
ppOption ppStyle = PP_NOTSET;
ppOption ppTotalStyle = PP_NOTSET; // used when setting PP_CUSTOM to keep track of how to do totals.
int wantOnlyTotals = 0;
int summarySize = -1;
bool expert = false;
bool wide_display = false; // when true, don't truncate field data
bool invalid_fields_empty = false; // when true, print "" instead of "[?]" for missing data
Mode mode = MODE_NOTSET;
const char * mode_constraint = NULL; // constraint set by mode
int diagnose = 0;
char* direct = NULL;
char* statistics = NULL;
char* genericType = NULL;
CondorQuery *query;
char buffer[1024];
char *myName;
vector<SortSpec> sortSpecs;
bool noSort = false; // set to true to disable sorting entirely
bool javaMode = false;
bool vmMode = false;
bool absentMode = false;
char *target = NULL;
const char * ads_file = NULL; // read classads from this file instead of querying them from the collector
ClassAd *targetAd = NULL;
ArgList projList; // Attributes that we want the server to send us
// instantiate templates
// function declarations
void usage ();
void firstPass (int, char *[]);
void secondPass (int, char *[]);
void prettyPrint(ClassAdList &, TrackTotals *);
int matchPrefix(const char *, const char *, int min_len);
int lessThanFunc(AttrList*,AttrList*,void*);
int customLessThanFunc(AttrList*,AttrList*,void*);
static bool read_classad_file(const char *filename, ClassAdList &classads, const char * constr);
extern "C" int SetSyscalls (int) {return 0;}
extern void setPPstyle (ppOption, int, const char *);
extern void setType (const char *, int, const char *);
extern void setMode (Mode, int, const char *);
int
main (int argc, char *argv[])
{
#if !defined(WIN32)
install_sig_handler(SIGPIPE, (SIG_HANDLER)SIG_IGN );
#endif
// initialize to read from config file
myDistro->Init( argc, argv );
myName = argv[0];
config();
dprintf_config_tool_on_error(0);
// The arguments take two passes to process --- the first pass
// figures out the mode, after which we can instantiate the required
// query object. We add implied constraints from the command line in
// the second pass.
firstPass (argc, argv);
// if the mode has not been set, it is STARTD_NORMAL
if (mode == MODE_NOTSET) {
setMode (MODE_STARTD_NORMAL, 0, DEFAULT);
}
// instantiate query object
if (!(query = new CondorQuery (type))) {
dprintf_WriteOnErrorBuffer(stderr, true);
fprintf (stderr, "Error: Out of memory\n");
exit (1);
}
// if a first-pass setMode set a mode_constraint, apply it now to the query object
if (mode_constraint && ! explicit_format) {
query->addANDConstraint(mode_constraint);
}
// set pretty print style implied by the type of entity being queried
// but do it with default priority, so that explicitly requested options
// can override it
switch (type)
{
#ifdef HAVE_EXT_POSTGRESQL
case QUILL_AD:
setPPstyle(PP_QUILL_NORMAL, 0, DEFAULT);
break;
#endif /* HAVE_EXT_POSTGRESQL */
case DEFRAG_AD:
setPPstyle(PP_GENERIC_NORMAL, 0, DEFAULT);
break;
case STARTD_AD:
setPPstyle(PP_STARTD_NORMAL, 0, DEFAULT);
break;
case SCHEDD_AD:
setPPstyle(PP_SCHEDD_NORMAL, 0, DEFAULT);
break;
case MASTER_AD:
setPPstyle(PP_MASTER_NORMAL, 0, DEFAULT);
break;
case CKPT_SRVR_AD:
setPPstyle(PP_CKPT_SRVR_NORMAL, 0, DEFAULT);
break;
case COLLECTOR_AD:
setPPstyle(PP_COLLECTOR_NORMAL, 0, DEFAULT);
break;
case STORAGE_AD:
setPPstyle(PP_STORAGE_NORMAL, 0, DEFAULT);
break;
case NEGOTIATOR_AD:
setPPstyle(PP_NEGOTIATOR_NORMAL, 0, DEFAULT);
break;
case GRID_AD:
setPPstyle(PP_GRID_NORMAL, 0, DEFAULT);
break;
case GENERIC_AD:
setPPstyle(PP_GENERIC, 0, DEFAULT);
break;
case ANY_AD:
setPPstyle(PP_ANY_NORMAL, 0, DEFAULT);
break;
default:
setPPstyle(PP_VERBOSE, 0, DEFAULT);
}
// set the constraints implied by the mode
switch (mode) {
#ifdef HAVE_EXT_POSTGRESQL
case MODE_QUILL_NORMAL:
#endif /* HAVE_EXT_POSTGRESQL */
case MODE_DEFRAG_NORMAL:
case MODE_STARTD_NORMAL:
case MODE_MASTER_NORMAL:
case MODE_CKPT_SRVR_NORMAL:
case MODE_SCHEDD_NORMAL:
case MODE_SCHEDD_SUBMITTORS:
case MODE_COLLECTOR_NORMAL:
case MODE_NEGOTIATOR_NORMAL:
case MODE_STORAGE_NORMAL:
case MODE_GENERIC_NORMAL:
case MODE_ANY_NORMAL:
case MODE_GRID_NORMAL:
case MODE_HAD_NORMAL:
break;
case MODE_OTHER:
// tell the query object what the type we're querying is
query->setGenericQueryType(genericType);
free(genericType);
genericType = NULL;
break;
case MODE_STARTD_AVAIL:
// For now, -avail shows you machines avail to anyone.
sprintf (buffer, "%s == \"%s\"", ATTR_STATE,
state_to_string(unclaimed_state));
if (diagnose) {
printf ("Adding constraint [%s]\n", buffer);
}
query->addORConstraint (buffer);
break;
case MODE_STARTD_RUN:
sprintf (buffer, "%s == \"%s\"", ATTR_STATE,
state_to_string(claimed_state));
if (diagnose) {
printf ("Adding constraint [%s]\n", buffer);
}
query->addORConstraint (buffer);
break;
case MODE_STARTD_COD:
sprintf (buffer, "%s > 0", ATTR_NUM_COD_CLAIMS );
if (diagnose) {
printf ("Adding constraint [%s]\n", buffer);
}
query->addORConstraint (buffer);
break;
default:
break;
}
if(javaMode) {
sprintf( buffer, "%s == TRUE", ATTR_HAS_JAVA );
if (diagnose) {
printf ("Adding constraint [%s]\n", buffer);
}
query->addANDConstraint (buffer);
projList.AppendArg(ATTR_HAS_JAVA);
projList.AppendArg(ATTR_JAVA_MFLOPS);
projList.AppendArg(ATTR_JAVA_VENDOR);
projList.AppendArg(ATTR_JAVA_VERSION);
}
if(absentMode) {
sprintf( buffer, "%s == TRUE", ATTR_ABSENT );
if (diagnose) {
printf( "Adding constraint %s\n", buffer );
}
query->addANDConstraint( buffer );
projList.AppendArg( ATTR_ABSENT );
projList.AppendArg( ATTR_LAST_HEARD_FROM );
projList.AppendArg( ATTR_CLASSAD_LIFETIME );
}
if(vmMode) {
sprintf( buffer, "%s == TRUE", ATTR_HAS_VM);
if (diagnose) {
printf ("Adding constraint [%s]\n", buffer);
}
query->addANDConstraint (buffer);
projList.AppendArg(ATTR_VM_TYPE);
projList.AppendArg(ATTR_VM_MEMORY);
projList.AppendArg(ATTR_VM_NETWORKING);
projList.AppendArg(ATTR_VM_NETWORKING_TYPES);
projList.AppendArg(ATTR_VM_HARDWARE_VT);
projList.AppendArg(ATTR_VM_AVAIL_NUM);
projList.AppendArg(ATTR_VM_ALL_GUEST_MACS);
projList.AppendArg(ATTR_VM_ALL_GUEST_IPS);
projList.AppendArg(ATTR_VM_GUEST_MAC);
projList.AppendArg(ATTR_VM_GUEST_IP);
}
// second pass: add regular parameters and constraints
if (diagnose) {
printf ("----------\n");
}
secondPass (argc, argv);
// initialize the totals object
if (ppStyle == PP_CUSTOM && using_print_format) {
if (pmHeadFoot & HF_NOSUMMARY) ppTotalStyle = PP_CUSTOM;
} else {
ppTotalStyle = ppStyle;
}
TrackTotals totals(ppTotalStyle);
// fetch the query
QueryResult q;
if ((mode == MODE_STARTD_NORMAL) && (ppStyle == PP_STARTD_NORMAL)) {
projList.AppendArg("Name");
projList.AppendArg("Machine");
projList.AppendArg("Opsys");
projList.AppendArg("Arch");
projList.AppendArg("State");
projList.AppendArg("Activity");
projList.AppendArg("LoadAvg");
projList.AppendArg("Memory");
projList.AppendArg("ActvtyTime");
projList.AppendArg("MyCurrentTime");
projList.AppendArg("EnteredCurrentActivity");
} else if( ppStyle == PP_VERBOSE ) {
// Remove everything from the projection list if we're displaying
// the "long form" of the ads.
projList.Clear();
}
if( projList.Count() > 0 ) {
char **attr_list = projList.GetStringArray();
query->setDesiredAttrs(attr_list);
deleteStringArray(attr_list);
}
// if diagnose was requested, just print the query ad
if (diagnose) {
ClassAd queryAd;
// print diagnostic information about inferred internal state
setMode ((Mode) 0, 0, NULL);
setType (NULL, 0, NULL);
setPPstyle ((ppOption) 0, 0, DEFAULT);
printf ("----------\n");
q = query->getQueryAd (queryAd);
fPrintAd (stdout, queryAd);
printf ("----------\n");
fprintf (stderr, "Result of making query ad was: %d\n", q);
exit (1);
}
// Address (host:port) is taken from requested pool, if given.
char* addr = (NULL != pool) ? pool->addr() : NULL;
Daemon* requested_daemon = pool;
// If we're in "direct" mode, then we attempt to locate the daemon
// associated with the requested subsystem (here encoded by value of mode)
// In this case the host:port of pool (if given) denotes which
// pool is being consulted
if( direct ) {
Daemon *d = NULL;
switch( mode ) {
case MODE_MASTER_NORMAL:
d = new Daemon( DT_MASTER, direct, addr );
break;
case MODE_STARTD_NORMAL:
case MODE_STARTD_AVAIL:
case MODE_STARTD_RUN:
case MODE_STARTD_COD:
d = new Daemon( DT_STARTD, direct, addr );
break;
#ifdef HAVE_EXT_POSTGRESQL
case MODE_QUILL_NORMAL:
d = new Daemon( DT_QUILL, direct, addr );
break;
#endif /* HAVE_EXT_POSTGRESQL */
case MODE_SCHEDD_NORMAL:
case MODE_SCHEDD_SUBMITTORS:
d = new Daemon( DT_SCHEDD, direct, addr );
break;
case MODE_NEGOTIATOR_NORMAL:
d = new Daemon( DT_NEGOTIATOR, direct, addr );
break;
case MODE_CKPT_SRVR_NORMAL:
case MODE_COLLECTOR_NORMAL:
case MODE_LICENSE_NORMAL:
case MODE_STORAGE_NORMAL:
case MODE_GENERIC_NORMAL:
case MODE_ANY_NORMAL:
case MODE_OTHER:
case MODE_GRID_NORMAL:
case MODE_HAD_NORMAL:
// These have to go to the collector, anyway.
break;
default:
fprintf( stderr, "Error: Illegal mode %d\n", mode );
exit( 1 );
break;
}
// Here is where we actually override 'addr', if we can obtain
// address of the requested daemon/subsys. If it can't be
// located, then fail with error msg.
// 'd' will be null (unset) if mode is one of above that must go to
// collector (MODE_ANY_NORMAL, MODE_COLLECTOR_NORMAL, etc)
if (NULL != d) {
if( d->locate() ) {
addr = d->addr();
requested_daemon = d;
} else {
const char* id = d->idStr();
if (NULL == id) id = d->name();
dprintf_WriteOnErrorBuffer(stderr, true);
if (NULL == id) id = "daemon";
fprintf(stderr, "Error: Failed to locate %s\n", id);
fprintf(stderr, "%s\n", d->error());
exit( 1 );
}
}
}
ClassAdList result;
CondorError errstack;
if (NULL != ads_file) {
MyString req; // query requirements
q = query->getRequirements(req);
const char * constraint = req.empty() ? NULL : req.c_str();
if (read_classad_file(ads_file, result, constraint)) {
q = Q_OK;
}
} else if (NULL != addr) {
// this case executes if pool was provided, or if in "direct" mode with
// subsystem that corresponds to a daemon (above).
// Here 'addr' represents either the host:port of requested pool, or
// alternatively the host:port of daemon associated with requested subsystem (direct mode)
q = query->fetchAds (result, addr, &errstack);
} else {
// otherwise obtain list of collectors and submit query that way
CollectorList * collectors = CollectorList::create();
q = collectors->query (*query, result, &errstack);
delete collectors;
}
// if any error was encountered during the query, report it and exit
if (Q_OK != q) {
dprintf_WriteOnErrorBuffer(stderr, true);
// we can always provide these messages:
fprintf( stderr, "Error: %s\n", getStrQueryResult(q) );
fprintf( stderr, "%s\n", errstack.getFullText(true).c_str() );
if ((NULL != requested_daemon) && ((Q_NO_COLLECTOR_HOST == q) ||
(requested_daemon->type() == DT_COLLECTOR)))
{
// Specific long message if connection to collector failed.
const char* fullhost = requested_daemon->fullHostname();
if (NULL == fullhost) fullhost = "<unknown_host>";
const char* daddr = requested_daemon->addr();
if (NULL == daddr) daddr = "<unknown>";
char info[1000];
sprintf(info, "%s (%s)", fullhost, daddr);
printNoCollectorContact( stderr, info, !expert );
} else if ((NULL != requested_daemon) && (Q_COMMUNICATION_ERROR == q)) {
// more helpful message for failure to connect to some daemon/subsys
const char* id = requested_daemon->idStr();
if (NULL == id) id = requested_daemon->name();
if (NULL == id) id = "daemon";
const char* daddr = requested_daemon->addr();
if (NULL == daddr) daddr = "<unknown>";
fprintf(stderr, "Error: Failed to contact %s at %s\n", id, daddr);
}
// fail
exit (1);
}
if (noSort) {
// do nothing
} else if (sortSpecs.empty()) {
// default classad sorting
result.Sort((SortFunctionType)lessThanFunc);
} else {
// User requested custom sorting expressions:
// insert attributes related to custom sorting
result.Open();
while (ClassAd* ad = result.Next()) {
for (vector<SortSpec>::iterator ss(sortSpecs.begin()); ss != sortSpecs.end(); ++ss) {
ss->expr->SetParentScope(ad);
classad::Value v;
ss->expr->Evaluate(v);
stringstream vs;
// This will properly render all supported value types,
// including undefined and error, although current semantic
// pre-filters classads where sort expressions are undef/err:
vs << ((v.IsStringValue())?"\"":"") << v << ((v.IsStringValue())?"\"":"");
ad->AssignExpr(ss->keyAttr.c_str(), vs.str().c_str());
// Save the full expr in case user wants to examine on output:
ad->AssignExpr(ss->keyExprAttr.c_str(), ss->arg.c_str());
}
}
result.Open();
result.Sort((SortFunctionType)customLessThanFunc);
}
// output result
prettyPrint (result, &totals);
delete query;
return 0;
}
const CustomFormatFnTable * getCondorStatusPrintFormats();
int set_status_print_mask_from_stream (
const char * streamid,
bool is_filename,
const char ** pconstraint)
{
std::string where_expr;
std::string messages;
StringList attrs;
SimpleInputStream * pstream = NULL;
*pconstraint = NULL;
FILE *file = NULL;
if (MATCH == strcmp("-", streamid)) {
pstream = new SimpleFileInputStream(stdin, false);
} else if (is_filename) {
file = safe_fopen_wrapper_follow(streamid, "r");
if (file == NULL) {
fprintf(stderr, "Can't open select file: %s\n", streamid);
return -1;
}
pstream = new SimpleFileInputStream(file, true);
} else {
pstream = new StringLiteralInputStream(streamid);
}
ASSERT(pstream);
int err = SetAttrListPrintMaskFromStream(
*pstream,
*getCondorStatusPrintFormats(),
pm,
pmHeadFoot,
group_by_keys,
where_expr,
attrs,
messages);
delete pstream; pstream = NULL;
if ( ! err) {
if ( ! where_expr.empty()) {
*pconstraint = pm.store(where_expr.c_str());
//if ( ! validate_constraint(*pconstraint)) {
// formatstr_cat(messages, "WHERE expression is not valid: %s\n", *pconstraint);
//}
}
// convert projection list into the format that condor status likes. because programmers.
attrs.rewind();
const char * attr;
while ((attr = attrs.next())) { projList.AppendArg(attr); }
}
if ( ! messages.empty()) { fprintf(stderr, "%s", messages.c_str()); }
return err;
}
static bool read_classad_file(const char *filename, ClassAdList &classads, const char * constr)
{
bool success = false;
FILE* file = safe_fopen_wrapper_follow(filename, "r");
if (file == NULL) {
fprintf(stderr, "Can't open file of job ads: %s\n", filename);
return false;
} else {
CondorClassAdFileParseHelper parse_helper("\n");
for (;;) {
ClassAd* classad = new ClassAd();
int error;
bool is_eof;
int cAttrs = classad->InsertFromFile(file, is_eof, error, &parse_helper);
bool include_classad = cAttrs > 0 && error >= 0;
if (include_classad && constr) {
classad::Value val;
if (classad->EvaluateExpr(constr,val)) {
if ( ! val.IsBooleanValueEquiv(include_classad)) {
include_classad = false;
}
}
}
if (include_classad) {
classads.Insert(classad);
} else {
delete classad;
}
if (is_eof) {
success = true;
break;
}
if (error < 0) {
success = false;
break;
}
}
fclose(file);
}
return success;
}
void
usage ()
{
fprintf (stderr,"Usage: %s [help-opt] [query-opt] [display-opt] "
"[custom-opts ...] [name ...]\n"
" where [help-opt] is one of\n"
"\t-help\t\t\tPrint this screen and exit\n"
"\t-version\t\tPrint HTCondor version and exit\n"
"\t-diagnose\t\tPrint out query ad without performing query\n"
" and [query-opt] is one of\n"
"\t-absent\t\t\tPrint information about absent resources\n"
"\t-avail\t\t\tPrint information about available resources\n"
"\t-ckptsrvr\t\tDisplay checkpoint server attributes\n"
"\t-claimed\t\tPrint information about claimed resources\n"
"\t-cod\t\t\tDisplay Computing On Demand (COD) jobs\n"
"\t-collector\t\tDisplay collector daemon attributes\n"
"\t-debug\t\t\tDisplay debugging info to console\n"
"\t-defrag\t\t\tDisplay status of defrag daemon\n"
"\t-direct <host>\t\tGet attributes directly from the given daemon\n"
"\t-java\t\t\tDisplay Java-capable hosts\n"
"\t-vm\t\t\tDisplay VM-capable hosts\n"
"\t-license\t\tDisplay attributes of licenses\n"
"\t-master\t\t\tDisplay daemon master attributes\n"
"\t-pool <name>\t\tGet information from collector <name>\n"
"\t-ads <file>\t\tGet information from <file>\n"
"\t-grid\t\t\tDisplay grid resources\n"
"\t-run\t\t\tSame as -claimed [deprecated]\n"
#ifdef HAVE_EXT_POSTGRESQL
"\t-quill\t\t\tDisplay attributes of quills\n"
#endif /* HAVE_EXT_POSTGRESQL */
"\t-schedd\t\t\tDisplay attributes of schedds\n"
"\t-server\t\t\tDisplay important attributes of resources\n"
"\t-startd\t\t\tDisplay resource attributes\n"
"\t-generic\t\tDisplay attributes of 'generic' ads\n"
"\t-subsystem <type>\tDisplay classads of the given type\n"
"\t-negotiator\t\tDisplay negotiator attributes\n"
"\t-storage\t\tDisplay network storage resources\n"
"\t-any\t\t\tDisplay any resources\n"
"\t-state\t\t\tDisplay state of resources\n"
"\t-submitters\t\tDisplay information about request submitters\n"
// "\t-statistics <set>:<n>\tDisplay statistics for <set> at level <n>\n"
// "\t\t\t\tsee STATISTICS_TO_PUBLISH for valid <set> and level values\n"
// "\t-world\t\t\tDisplay all pools reporting to UW collector\n"
" and [display-opt] is one of\n"
"\t-long\t\t\tDisplay entire classads\n"
"\t-sort <expr>\t\tSort entries by expressions. 'no' disables sorting\n"
"\t-total\t\t\tDisplay totals only\n"
"\t-verbose\t\tSame as -long\n"
"\t-wide\t\t\tdon't truncate data to fit in 80 columns.\n"
"\t-xml\t\t\tDisplay entire classads, but in XML\n"
"\t-attributes X,Y,...\tAttributes to show in -xml or -long \n"
"\t-expert\t\t\tDisplay shorter error messages\n"
" and [custom-opts ...] are one or more of\n"
"\t-constraint <const>\tAdd constraint on classads\n"
"\t-format <fmt> <attr>\tRegister display format and attribute\n"
"\t-autoformat:[V,ntlh] <attr> [attr2 [attr3 ...]]\t Print attr(s) with automatic formatting\n"
"\t\tV\tUse %%V formatting\n"
"\t\t,\tComma separated (default is space separated)\n"
"\t\tt\tTab separated\n"
"\t\tn\tNewline after each attribute\n"
"\t\tl\tLabel each value\n"
"\t\th\tHeadings\n"
"\t-target filename\tIf -format or -af is used, the option target classad\n",
myName);
}
void
firstPass (int argc, char *argv[])
{
int had_pool_error = 0;
int had_direct_error = 0;
int had_statistics_error = 0;
//bool explicit_mode = false;
const char * pcolon = NULL;
// Process arguments: there are dependencies between them
// o -l/v and -serv are mutually exclusive
// o -sub, -avail and -run are mutually exclusive
// o -pool and -entity may be used at most once
// o since -c can be processed only after the query has been instantiated,
// constraints are added on the second pass
for (int i = 1; i < argc; i++) {
if (matchPrefix (argv[i], "-avail", 3)) {
setMode (MODE_STARTD_AVAIL, i, argv[i]);
} else
if (matchPrefix (argv[i], "-pool", 2)) {
if( pool ) {
delete pool;
had_pool_error = 1;
}
i++;
if( ! argv[i] ) {
fprintf( stderr, "%s: -pool requires a hostname as an argument.\n",
myName );
if (!expert) {
printf("\n");
print_wrapped_text("Extra Info: The hostname should be the central "
"manager of the Condor pool you wish to work with.",
stderr);
printf("\n");
}
fprintf( stderr, "Use \"%s -help\" for details\n", myName );
exit( 1 );
}
pool = new DCCollector( argv[i] );
if( !pool->addr() ) {
dprintf_WriteOnErrorBuffer(stderr, true);
fprintf( stderr, "Error: %s\n", pool->error() );
if (!expert) {
printf("\n");
print_wrapped_text("Extra Info: You specified a hostname for a pool "
"(the -pool argument). That should be the Internet "
"host name for the central manager of the pool, "
"but it does not seem to "
"be a valid hostname. (The DNS lookup failed.)",
stderr);
}
exit( 1 );
}
} else
if (is_dash_arg_prefix (argv[i], "ads", 2)) {
if( !argv[i+1] ) {
fprintf( stderr, "%s: -ads requires a filename argument\n",
myName );
fprintf( stderr, "Use \"%s -help\" for details\n", myName );
exit( 1 );
}
i += 1;
ads_file = argv[i];
} else
if (matchPrefix (argv[i], "-format", 2)) {
setPPstyle (PP_CUSTOM, i, argv[i]);
if( !argv[i+1] || !argv[i+2] ) {
fprintf( stderr, "%s: -format requires two other arguments\n",
myName );
fprintf( stderr, "Use \"%s -help\" for details\n", myName );
exit( 1 );
}
i += 2;
explicit_format = true;
} else
if (*argv[i] == '-' &&
(is_arg_colon_prefix(argv[i]+1, "autoformat", &pcolon, 5) ||
is_arg_colon_prefix(argv[i]+1, "af", &pcolon, 2)) ) {
// make sure we have at least one more argument
if ( !argv[i+1] || *(argv[i+1]) == '-') {
fprintf( stderr, "Error: Argument %s requires "
"at last one attribute parameter\n", argv[i] );
fprintf( stderr, "Use \"%s -help\" for details\n", myName );
exit( 1 );
}
explicit_format = true;
setPPstyle (PP_CUSTOM, i, argv[i]);
while (argv[i+1] && *(argv[i+1]) != '-') {
++i;
}
// if autoformat list ends in a '-' without any characters after it, just eat the arg and keep going.
if (i+1 < argc && '-' == (argv[i+1])[0] && 0 == (argv[i+1])[1]) {
++i;
}
} else
if (is_dash_arg_colon_prefix(argv[i], "print-format", &pcolon, 2)) {
if ( (i+1 >= argc) || (*(argv[i+1]) == '-' && (argv[i+1])[1] != 0)) {
fprintf( stderr, "Error: Argument -print-format requires a filename argument\n");
exit( 1 );
}
explicit_format = true;
++i; // eat the next argument.
// we can't fully parse the print format argument until the second pass, so we are done for now.
} else
if (matchPrefix (argv[i], "-wide", 3)) {
wide_display = true; // when true, don't truncate field data
//invalid_fields_empty = true;
} else
if (matchPrefix (argv[i], "-target", 5)) {
if( !argv[i+1] ) {
fprintf( stderr, "%s: -target requires one additional argument\n",
myName );
fprintf( stderr, "Use \"%s -help\" for details\n", myName );
exit( 1 );
}
i += 1;
target = argv[i];
FILE *targetFile = safe_fopen_wrapper_follow(target, "r");
int iseof, iserror, empty;
targetAd = new ClassAd(targetFile, "\n\n", iseof, iserror, empty);
fclose(targetFile);
} else
if (matchPrefix (argv[i], "-constraint", 4)) {
// can add constraints on second pass only
i++;
if( ! argv[i] ) {
fprintf( stderr, "%s: -constraint requires another argument\n",
myName );
fprintf( stderr, "Use \"%s -help\" for details\n", myName );
exit( 1 );
}
} else
if (matchPrefix (argv[i], "-direct", 4)) {
if( direct ) {
free( direct );
had_direct_error = 1;
}
i++;
if( ! argv[i] ) {
fprintf( stderr, "%s: -direct requires another argument\n",
myName );
fprintf( stderr, "Use \"%s -help\" for details\n", myName );
exit( 1 );
}
direct = strdup( argv[i] );
} else
if (matchPrefix (argv[i], "-diagnose", 4)) {
diagnose = 1;
} else
if (matchPrefix (argv[i], "-debug", 3)) {
// dprintf to console
dprintf_set_tool_debug("TOOL", 0);
} else
if (matchPrefix (argv[i], "-defrag", 4)) {
setMode (MODE_DEFRAG_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "-help", 2)) {
usage ();
exit (0);
} else
if (matchPrefix (argv[i], "-long", 2) || matchPrefix (argv[i],"-verbose", 3)) {
setPPstyle (PP_VERBOSE, i, argv[i]);
} else
if (matchPrefix (argv[i],"-xml", 2)){
setPPstyle (PP_XML, i, argv[i]);
} else
if (matchPrefix (argv[i],"-attributes", 3)){
if( !argv[i+1] ) {
fprintf( stderr, "%s: -attributes requires one additional argument\n",
myName );
fprintf( stderr, "Use \"%s -help\" for details\n", myName );
exit( 1 );
}
i++;
} else
if (matchPrefix (argv[i], "-run", 2) || matchPrefix(argv[i], "-claimed", 3)) {
setMode (MODE_STARTD_RUN, i, argv[i]);
} else
if( matchPrefix (argv[i], "-cod", 4) ) {
setMode (MODE_STARTD_COD, i, argv[i]);
} else
if (matchPrefix (argv[i], "-java", 2)) {
/*explicit_mode =*/ javaMode = true;
} else
if (matchPrefix (argv[i], "-absent", 3)) {
/*explicit_mode =*/ absentMode = true;
} else
if (matchPrefix (argv[i], "-vm", 3)) {
/*explicit_mode =*/ vmMode = true;
} else
if (matchPrefix (argv[i], "-server", 3)) {
setPPstyle (PP_STARTD_SERVER, i, argv[i]);
} else
if (matchPrefix (argv[i], "-state", 5)) {
setPPstyle (PP_STARTD_STATE, i, argv[i]);
} else
if (matchPrefix (argv[i], "-statistics", 6)) {
if( statistics ) {
free( statistics );
had_statistics_error = 1;
}
i++;
if( ! argv[i] ) {
fprintf( stderr, "%s: -statistics requires another argument\n",
myName );
fprintf( stderr, "Use \"%s -help\" for details\n", myName );
exit( 1 );
}
statistics = strdup( argv[i] );
} else
if (matchPrefix (argv[i], "-startd", 5)) {
setMode (MODE_STARTD_NORMAL,i, argv[i]);
} else
if (matchPrefix (argv[i], "-schedd", 3)) {
setMode (MODE_SCHEDD_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "-grid", 2)) {
setMode (MODE_GRID_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "-subsystem", 5)) {
i++;
if( !argv[i] ) {
fprintf( stderr, "%s: -subsystem requires another argument\n",
myName );
fprintf( stderr, "Use \"%s -help\" for details\n", myName );
exit( 1 );
}
if (matchPrefix (argv[i], "schedd", 6)) {
setMode (MODE_SCHEDD_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "startd", 6)) {
setMode (MODE_STARTD_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "quill", 5)) {
setMode (MODE_QUILL_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "negotiator", 10)) {
setMode (MODE_NEGOTIATOR_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "master", 6)) {
setMode (MODE_MASTER_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "collector", 9)) {
setMode (MODE_COLLECTOR_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "generic", 7)) {
setMode (MODE_GENERIC_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "had", 3)) {
setMode (MODE_HAD_NORMAL, i, argv[i]);
} else
if (*argv[i] == '-') {
fprintf(stderr, "%s: -subsystem requires another argument\n",
myName);
fprintf( stderr, "Use \"%s -help\" for details\n", myName );
exit(1);
} else {
genericType = strdup(argv[i]);
setMode (MODE_OTHER, i, argv[i]);
}
} else
#ifdef HAVE_EXT_POSTGRESQL
if (matchPrefix (argv[i], "-quill", 2)) {
setMode (MODE_QUILL_NORMAL, i, argv[i]);
} else
#endif /* HAVE_EXT_POSTGRESQL */
if (matchPrefix (argv[i], "-license", 3)) {
setMode (MODE_LICENSE_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "-storage", 4)) {
setMode (MODE_STORAGE_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "-negotiator", 2)) {
setMode (MODE_NEGOTIATOR_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "-generic", 3)) {
setMode (MODE_GENERIC_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "-any", 3)) {
setMode (MODE_ANY_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "-sort", 3)) {
i++;
if( ! argv[i] ) {
fprintf( stderr, "%s: -sort requires another argument\n",
myName );
fprintf( stderr, "Use \"%s -help\" for details\n", myName );
exit( 1 );
}
if (MATCH == strcasecmp(argv[i], "false") ||
MATCH == strcasecmp(argv[i], "0") ||
MATCH == strcasecmp(argv[i], "no") ||
MATCH == strcasecmp(argv[i], "none"))
{
noSort = true;
continue;
}
int jsort = sortSpecs.size();
SortSpec ss;
ExprTree* sortExpr = NULL;
if (ParseClassAdRvalExpr(argv[i], sortExpr)) {
fprintf(stderr, "Error: Parse error of: %s\n", argv[i]);
exit(1);
}
ss.expr = sortExpr;
ss.arg = argv[i];
formatstr(ss.keyAttr, "CondorStatusSortKey%d", jsort);
formatstr(ss.keyExprAttr, "CondorStatusSortKeyExpr%d", jsort);
string exprString;
formatstr(exprString, "MY.%s < TARGET.%s", ss.keyAttr.c_str(), ss.keyAttr.c_str());
if (ParseClassAdRvalExpr(exprString.c_str(), sortExpr)) {
fprintf(stderr, "Error: Parse error of: %s\n", exprString.c_str());
exit(1);
}
ss.exprLT = sortExpr;
formatstr(exprString, "MY.%s == TARGET.%s", ss.keyAttr.c_str(), ss.keyAttr.c_str());
if (ParseClassAdRvalExpr(exprString.c_str(), sortExpr)) {
fprintf(stderr, "Error: Parse error of: %s\n", exprString.c_str());
exit(1);
}
ss.exprEQ = sortExpr;
sortSpecs.push_back(ss);
// the silent constraint TARGET.%s =!= UNDEFINED is added
// as a customAND constraint on the second pass
} else
if (matchPrefix (argv[i], "-submitters", 5)) {
setMode (MODE_SCHEDD_SUBMITTORS, i, argv[i]);
} else
if (matchPrefix (argv[i], "-master", 2)) {
setMode (MODE_MASTER_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "-collector", 4)) {
setMode (MODE_COLLECTOR_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "-world", 2)) {
setMode (MODE_COLLECTOR_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "-ckptsrvr", 3)) {
setMode (MODE_CKPT_SRVR_NORMAL, i, argv[i]);
} else
if (matchPrefix (argv[i], "-total", 2)) {
wantOnlyTotals = 1;
explicit_format = true;
} else
if (matchPrefix(argv[i], "-expert", 2)) {
expert = true;
} else
if (matchPrefix(argv[i], "-version", 4)) {
printf( "%s\n%s\n", CondorVersion(), CondorPlatform() );
exit(0);
} else
if (*argv[i] == '-') {
fprintf (stderr, "Error: Unknown option %s\n", argv[i]);
usage ();
exit (1);
}
}
if( had_pool_error ) {
fprintf( stderr,
"Warning: Multiple -pool arguments given, using \"%s\"\n",
pool->name() );
}
if( had_direct_error ) {
fprintf( stderr,
"Warning: Multiple -direct arguments given, using \"%s\"\n",
direct );
}
if( had_statistics_error ) {
fprintf( stderr,
"Warning: Multiple -statistics arguments given, using \"%s\"\n",
statistics );
}
}
void
secondPass (int argc, char *argv[])
{
const char * pcolon = NULL;
char *daemonname;
for (int i = 1; i < argc; i++) {
// omit parameters which qualify switches
if( matchPrefix(argv[i],"-pool", 2) || matchPrefix(argv[i],"-direct", 4) ) {
i++;
continue;
}
if( matchPrefix(argv[i],"-subsystem", 5) ) {
i++;
continue;
}
if (matchPrefix (argv[i], "-format", 2)) {
pm.registerFormat (argv[i+1], argv[i+2]);
StringList attributes;
ClassAd ad;
if(!ad.GetExprReferences(argv[i+2],attributes,attributes)){
fprintf( stderr, "Error: Parse error of: %s\n", argv[i+2]);
exit(1);
}
attributes.rewind();
char const *s;
while( (s=attributes.next()) ) {
projList.AppendArg(s);
}
if (diagnose) {
printf ("Arg %d --- register format [%s] for [%s]\n",
i, argv[i+1], argv[i+2]);
}
i += 2;
continue;
}
if (*argv[i] == '-' &&
(is_arg_colon_prefix(argv[i]+1, "autoformat", &pcolon, 5) ||
is_arg_colon_prefix(argv[i]+1, "af", &pcolon, 2)) ) {
// make sure we have at least one more argument
if ( !argv[i+1] || *(argv[i+1]) == '-') {
fprintf( stderr, "Error: Argument %s requires "
"at last one attribute parameter\n", argv[i] );
fprintf( stderr, "Use \"%s -help\" for details\n", myName );
exit( 1 );
}
bool flabel = false;
bool fCapV = false;
bool fheadings = false;
const char * pcolpre = " ";
const char * pcolsux = NULL;
if (pcolon) {
++pcolon;
while (*pcolon) {
switch (*pcolon)
{
case ',': pcolsux = ","; break;
case 'n': pcolsux = "\n"; break;
case 't': pcolpre = "\t"; break;
case 'l': flabel = true; break;
case 'V': fCapV = true; break;
case 'h': fheadings = true; break;
}
++pcolon;
}
}
pm.SetAutoSep(NULL, pcolpre, pcolsux, "\n");
while (argv[i+1] && *(argv[i+1]) != '-') {
++i;
ClassAd ad;
StringList attributes;
if(!ad.GetExprReferences(argv[i],attributes,attributes)){
fprintf( stderr, "Error: Parse error of: %s\n", argv[i]);
exit(1);
}
attributes.rewind();
char const *s;
while ((s = attributes.next())) {
projList.AppendArg(s);
}
MyString lbl = "";
int wid = 0;
int opts = FormatOptionNoTruncate;
if (fheadings || pm_head.Length() > 0) {
const char * hd = fheadings ? argv[i] : "(expr)";
wid = 0 - (int)strlen(hd);
opts = FormatOptionAutoWidth | FormatOptionNoTruncate;
pm_head.Append(hd);
}
else if (flabel) { lbl.formatstr("%s = ", argv[i]); wid = 0; opts = 0; }
lbl += fCapV ? "%V" : "%v";
if (diagnose) {
printf ("Arg %d --- register format [%s] width=%d, opt=0x%x for [%s]\n",
i, lbl.Value(), wid, opts, argv[i]);
}
pm.registerFormat(lbl.Value(), wid, opts, argv[i]);
}
// if autoformat list ends in a '-' without any characters after it, just eat the arg and keep going.
if (i+1 < argc && '-' == (argv[i+1])[0] && 0 == (argv[i+1])[1]) {
++i;
}
continue;
}
if (is_dash_arg_colon_prefix(argv[i], "print-format", &pcolon, 2)) {
if ( (i+1 >= argc) || (*(argv[i+1]) == '-' && (argv[i+1])[1] != 0)) {
fprintf( stderr, "Error: Argument -print-format requires a filename argument\n");
exit( 1 );
}
// hack allow -pr ! to disable use of user-default print format files.
if (MATCH == strcmp(argv[i+1], "!")) {
++i;
disable_user_print_files = true;
continue;
}
ppTotalStyle = ppStyle;
setPPstyle (PP_CUSTOM, i, argv[i]);
++i; // skip to the next argument.
if (set_status_print_mask_from_stream(argv[i], true, &mode_constraint) < 0) {
fprintf(stderr, "Error: invalid select file %s\n", argv[i]);
exit (1);
}
if (mode_constraint) {
query->addANDConstraint(mode_constraint);
}
using_print_format = true; // so we can hack totals.
continue;
}
if (matchPrefix (argv[i], "-target", 5)) {
i++;
continue;
}
if (is_dash_arg_prefix(argv[i], "ads", 2)) {
++i;
continue;
}
if( matchPrefix(argv[i], "-sort", 3) ) {
i++;
if ( ! noSort) {
sprintf( buffer, "%s =!= UNDEFINED", argv[i] );
query->addANDConstraint( buffer );
}
continue;
}
if (matchPrefix (argv[i], "-statistics", 6)) {
i += 2;
sprintf(buffer,"STATISTICS_TO_PUBLISH = \"%s\"", statistics);
if (diagnose) {
printf ("[%s]\n", buffer);
}
query->addExtraAttribute(buffer);
continue;
}
if (matchPrefix (argv[i], "-attributes", 3) ) {
// parse attributes to be selected and split them along ","
StringList more_attrs(argv[i+1],",");
char const *s;
more_attrs.rewind();
while( (s=more_attrs.next()) ) {
projList.AppendArg(s);
}
i++;
continue;
}
// figure out what the other parameters should do
if (*argv[i] != '-') {
// display extra information for diagnosis
if (diagnose) {
printf ("Arg %d (%s) --- adding constraint", i, argv[i]);
}
if( !(daemonname = get_daemon_name(argv[i])) ) {
if ( (mode==MODE_SCHEDD_SUBMITTORS) && strchr(argv[i],'@') ) {
// For a submittor query, it is possible that the
// hostname is really a UID_DOMAIN. And there is
// no requirement that UID_DOMAIN actually have
// an inverse lookup in DNS... so if get_daemon_name()
// fails with a fully qualified submittor lookup, just
// use what we are given and do not flag an error.
daemonname = strnewp(argv[i]);
} else {
dprintf_WriteOnErrorBuffer(stderr, true);
fprintf( stderr, "%s: unknown host %s\n",
argv[0], get_host_part(argv[i]) );
exit(1);
}
}
switch (mode) {
case MODE_DEFRAG_NORMAL:
case MODE_STARTD_NORMAL:
case MODE_STARTD_COD:
#ifdef HAVE_EXT_POSTGRESQL
case MODE_QUILL_NORMAL:
#endif /* HAVE_EXT_POSTGRESQL */
case MODE_SCHEDD_NORMAL:
case MODE_SCHEDD_SUBMITTORS:
case MODE_MASTER_NORMAL:
case MODE_COLLECTOR_NORMAL:
case MODE_CKPT_SRVR_NORMAL:
case MODE_NEGOTIATOR_NORMAL:
case MODE_STORAGE_NORMAL:
case MODE_ANY_NORMAL:
case MODE_GENERIC_NORMAL:
case MODE_STARTD_AVAIL:
case MODE_OTHER:
case MODE_GRID_NORMAL:
case MODE_HAD_NORMAL:
sprintf(buffer,"(%s==\"%s\") || (%s==\"%s\")",
ATTR_NAME, daemonname, ATTR_MACHINE, daemonname );
if (diagnose) {
printf ("[%s]\n", buffer);
}
query->addORConstraint (buffer);
break;
case MODE_STARTD_RUN:
sprintf (buffer,"%s == \"%s\"",ATTR_REMOTE_USER,argv[i]);
if (diagnose) {
printf ("[%s]\n", buffer);
}
query->addORConstraint (buffer);
break;
default:
fprintf(stderr,"Error: Don't know how to process %s\n",argv[i]);
}
delete [] daemonname;
daemonname = NULL;
} else
if (matchPrefix (argv[i], "-constraint", 4)) {
if (diagnose) {
printf ("[%s]\n", argv[i+1]);
}
query->addANDConstraint (argv[i+1]);
i++;
}
}
}
int
matchPrefix (const char *s1, const char *s2, int min_len)
{
int lenS1 = strlen (s1);
int lenS2 = strlen (s2);
int len = (lenS1 < lenS2) ? lenS1 : lenS2;
if(len < min_len) {
return 0;
}
return (strncmp (s1, s2, len) == 0);
}
int
lessThanFunc(AttrList *ad1, AttrList *ad2, void *)
{
MyString buf1;
MyString buf2;
int val;
if( !ad1->LookupString(ATTR_OPSYS, buf1) ||
!ad2->LookupString(ATTR_OPSYS, buf2) ) {
buf1 = "";
buf2 = "";
}
val = strcmp( buf1.Value(), buf2.Value() );
if( val ) {
return (val < 0);
}
if( !ad1->LookupString(ATTR_ARCH, buf1) ||
!ad2->LookupString(ATTR_ARCH, buf2) ) {
buf1 = "";
buf2 = "";
}
val = strcmp( buf1.Value(), buf2.Value() );
if( val ) {
return (val < 0);
}
if( !ad1->LookupString(ATTR_MACHINE, buf1) ||
!ad2->LookupString(ATTR_MACHINE, buf2) ) {
buf1 = "";
buf2 = "";
}
val = strcmp( buf1.Value(), buf2.Value() );
if( val ) {
return (val < 0);
}
if (!ad1->LookupString(ATTR_NAME, buf1) ||
!ad2->LookupString(ATTR_NAME, buf2))
return 0;
return ( strcmp( buf1.Value(), buf2.Value() ) < 0 );
}
int
customLessThanFunc( AttrList *ad1, AttrList *ad2, void *)
{
classad::Value lt_result;
bool val;
for (unsigned i = 0; i < sortSpecs.size(); ++i) {
if (EvalExprTree(sortSpecs[i].exprLT, ad1, ad2, lt_result)
&& lt_result.IsBooleanValue(val) ) {
if( val ) {
return 1;
} else {
if (EvalExprTree( sortSpecs[i].exprEQ, ad1,
ad2, lt_result ) &&
( !lt_result.IsBooleanValue(val) || !val )){
return 0;
}
}
} else {
return 0;
}
}
return 0;
}
|
zhangzhehust/htcondor
|
src/condor_status.V6/status.cpp
|
C++
|
apache-2.0
| 43,130
|
[
30522,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
9385,
1006,
1039,
1007,
2901,
1011,
2289,
1010,
29260,
2136,
1010,
3274,
4163,
30524,
6100,
1997,
1996,
6105,
2012,
1008,
1008,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1008,
1008,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1008,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
1000,
2004,
2003,
1000,
3978,
1010,
1008,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1008,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
1008,
12546,
2104,
1996,
6105,
1012,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1013,
1001,
2421,
1000,
29260,
1035,
2691,
1012,
1044,
1000,
1001,
2421,
1000,
29260,
1035,
9530,
8873,
2290,
1012,
1044,
1000,
1001,
2421,
1000,
29260,
1035,
2110,
1012,
1044,
1000,
1001,
2421,
1000,
29260,
1035,
17928,
1012,
1044,
1000,
1001,
2421,
1000,
3570,
1035,
4127,
1012,
1044,
1000,
1001,
2421,
1000,
21948,
1012,
1044,
1000,
1001,
2421,
1000,
2131,
1035,
12828,
1035,
2171,
1012,
1044,
1000,
1001,
2421,
1000,
12828,
1012,
1044,
1000,
1001,
2421,
1000,
5887,
1035,
10018,
1012,
1044,
1000,
1001,
2421,
1000,
4654,
7559,
9447,
1012,
1044,
1000,
1001,
2421,
1000,
9033,
2290,
1035,
16500,
1012,
1044,
1000,
1001,
2421,
1000,
5164,
1035,
2862,
1012,
1044,
1000,
1001,
2421,
1000,
29260,
1035,
5164,
1012,
1044,
1000,
1013,
1013,
2005,
2358,
12119,
2860,
2361,
1006,
1007,
1001,
2421,
1000,
2674,
1035,
17576,
1012,
1044,
1000,
1013,
1013,
2003,
1035,
12098,
2290,
1035,
16844,
1035,
17576,
1001,
2421,
1000,
6140,
1035,
5058,
1035,
3793,
1012,
1044,
1000,
1001,
2421,
1000,
7561,
1035,
21183,
12146,
1012,
1044,
1000,
1001,
2421,
1000,
29260,
1035,
4353,
1012,
1044,
1000,
1001,
2421,
1000,
29260,
1035,
2544,
1012,
1044,
1000,
1001,
2421,
1026,
9207,
1028,
1001,
2421,
1026,
7020,
25379,
1028,
1001,
2421,
1026,
16380,
25379,
1028,
2478,
2358,
2094,
1024,
1024,
9207,
1025,
2478,
2358,
2094,
1024,
1024,
5164,
1025,
2478,
2358,
2094,
30523,
2533,
1010,
1008,
2118,
1997,
5273,
1011,
7063,
1010,
15536,
1012,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2533,
1010,
1008,
2118,
1997,
5273,
1011,
7063,
1010,
15536,
1012,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
2017,
1008,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
2017,
2089,
1008,
6855,
1037,
30526
] |
/**
* Copyright 2015 The AMP HTML Authors. All Rights Reserved.
*
* Licensed 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.
*/
import {Platform} from '../../src/service/platform-impl';
describe('Platform', () => {
let isIos;
let isAndroid;
let isChrome;
let isFirefox;
let isSafari;
let isIe;
let isEdge;
let isWebKit;
let isStandalone;
let majorVersion;
let iosVersion;
let iosMajorVersion;
let userAgent;
beforeEach(() => {
isIos = false;
isAndroid = false;
isChrome = false;
isSafari = false;
isFirefox = false;
isIe = false;
isEdge = false;
isWebKit = false;
isStandalone = false;
majorVersion = 0;
iosVersion = '';
iosMajorVersion = null;
userAgent = '';
});
function testUserAgent(userAgentString) {
const platform = new Platform({navigator: {userAgent: userAgentString}});
expect(platform.isIos()).to.equal(isIos);
expect(platform.isAndroid()).to.equal(isAndroid);
expect(platform.isChrome()).to.equal(isChrome);
expect(platform.isSafari()).to.equal(isSafari);
expect(platform.isFirefox()).to.equal(isFirefox);
expect(platform.isIe()).to.equal(isIe);
expect(platform.isEdge()).to.equal(isEdge);
expect(platform.isWebKit()).to.equal(isWebKit);
expect(platform.getMajorVersion()).to.equal(majorVersion);
expect(platform.getIosVersionString()).to.equal(iosVersion);
expect(platform.getIosMajorVersion()).to.equal(iosMajorVersion);
}
function testStandalone(userAgentString, standAloneBoolean) {
const platform = new Platform({
navigator: {
standalone: standAloneBoolean,
userAgent: userAgentString,
},
});
expect(platform.isStandalone()).to.equal(isStandalone);
}
it('should tolerate empty or null', () => {
testUserAgent(null);
testUserAgent('');
testUserAgent(' ');
testStandalone(null, null);
testStandalone('', null);
testStandalone(' ', null);
});
it('iPhone 6 Plus v8', () => {
isIos = true;
isSafari = true;
isWebKit = true;
majorVersion = 8;
iosVersion = '8.0';
iosMajorVersion = 8;
isStandalone = true;
userAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 8_0 like Mac OS X)' +
' AppleWebKit/600.1.3 (KHTML, like Gecko) Version/8.0' +
' Mobile/12A4345d Safari/600.1.4';
testUserAgent(userAgent);
testStandalone(userAgent, isStandalone);
});
it('iPhone 6 Plus v9', () => {
isIos = true;
isSafari = true;
isWebKit = true;
majorVersion = 9;
iosVersion = '9.3';
iosMajorVersion = 9;
isStandalone = true;
userAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_3 like Mac OS X)' +
' AppleWebKit/601.1.46 (KHTML, like Gecko) Version/9.0' +
' Mobile/13E230 Safari/601.1';
testUserAgent(userAgent);
testStandalone(userAgent, isStandalone);
});
it('iPhone 6 Plus no version', () => {
isIos = true;
isSafari = true;
isWebKit = true;
majorVersion = 9;
iosVersion = '9.3';
iosMajorVersion = 9;
isStandalone = true;
userAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 9_3 like Mac OS X)' +
' AppleWebKit/601.1.46 (KHTML, like Gecko)' +
' Mobile/13E230 Safari/601.1';
testUserAgent(userAgent);
testStandalone(userAgent, isStandalone);
});
it('iPhone ios 10.2.1', () => {
isIos = true;
isSafari = true;
isWebKit = true;
majorVersion = 10;
iosVersion = '10.2.1';
iosMajorVersion = 10;
isStandalone = true;
userAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_2_1 like Mac OS X)' +
' AppleWebKit/602.4.6 (KHTML, like Gecko) Version/10.0' +
' Mobile/14D27 Safari/602.1';
testUserAgent(userAgent);
testStandalone(userAgent, isStandalone);
});
it('iPad 2', () => {
isIos = true;
isSafari = true;
isWebKit = true;
majorVersion = 7;
iosVersion = '7.0';
iosMajorVersion = 7;
isStandalone = true;
userAgent = 'Mozilla/5.0 (iPad; CPU OS 7_0 like Mac OS X)' +
' AppleWebKit/537.51.1 (KHTML, like Gecko) Version/7.0' +
' Mobile/11A465 Safari/9537.53';
testUserAgent(userAgent);
testStandalone(userAgent, isStandalone);
});
it('iPhone ios 10.2, Chrome ios', () => {
isIos = true;
isChrome = true;
isWebKit = true;
majorVersion = 56;
iosVersion = '10.2';
iosMajorVersion = 10;
isStandalone = true;
userAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_2 like Mac OS X)' +
' AppleWebKit/602.1.50 (KHTML, like Gecko) CriOS/56.0.2924.73' +
' Mobile/16D32 Safari/602.1';
testUserAgent(userAgent);
testStandalone(userAgent, isStandalone);
});
it('Desktop Safari', () => {
isSafari = true;
isWebKit = true;
majorVersion = 7;
userAgent = 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_9_3) ' +
'AppleWebKit/537.75.14 (KHTML, like Gecko) Version/7.0.3 ' +
'Safari/7046A194A';
testUserAgent(userAgent);
testStandalone(userAgent, isStandalone);
});
it('Nexus 6 Chrome', () => {
isAndroid = true;
isChrome = true;
isWebKit = true;
majorVersion = 44;
userAgent = 'Mozilla/5.0 (Linux; Android 5.1.1; Nexus 6 Build/LYZ28E)' +
' AppleWebKit/537.36 (KHTML, like Gecko) Chrome/44.0.2403.20' +
' Mobile Safari/537.36';
testUserAgent(userAgent);
testStandalone(userAgent, isStandalone);
});
it('Firefox', () => {
isFirefox = true;
majorVersion = 40;
userAgent = 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:40.0) ' +
'Gecko/20100101 Firefox/40.1';
testUserAgent(userAgent);
testStandalone(userAgent, isStandalone);
});
it('Firefox ios', () => {
isIos = true;
isFirefox = true;
isWebKit = true;
majorVersion = 7;
iosVersion = '10.3.1';
iosMajorVersion = 10;
isStandalone = true;
userAgent = 'Mozilla/5.0 (iPhone; CPU iPhone OS 10_3_1 like Mac OS X)' +
' AppleWebKit/603.1.30 (KHTML, like Gecko) FxiOS/7.5b3349' +
' Mobile/14E304 Safari/603.1.30';
testUserAgent(userAgent);
testStandalone(userAgent, isStandalone);
});
it('IE', () => {
isIe = true;
majorVersion = 10;
userAgent = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 7.0;' +
' InfoPath.3; .NET CLR 3.1.40767; Trident/6.0; en-IN)';
testUserAgent(userAgent);
testStandalone(userAgent, isStandalone);
});
it('IEMobile', () => {
isIe = true;
majorVersion = 10;
userAgent = 'Mozilla/5.0 (compatible; MSIE 10.0; Windows Phone 8.0;' +
' Trident/6.0; IEMobile/10.0; ARM; Touch; NOKIA; Lumia 520)';
testUserAgent(userAgent);
testStandalone(userAgent, isStandalone);
});
it('Edge', () => {
isEdge = true;
majorVersion = 12;
userAgent = 'Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36' +
' (KHTML, like Gecko) Chrome/42.0.2311.135 Safari/537.36' +
' Edge/12.10136';
testUserAgent(userAgent);
testStandalone(userAgent, isStandalone);
});
});
|
avimehta/amphtml
|
test/functional/test-platform.js
|
JavaScript
|
apache-2.0
| 7,502
|
[
30522,
1013,
1008,
1008,
1008,
9385,
2325,
1996,
23713,
16129,
6048,
1012,
2035,
2916,
9235,
1012,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1008,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
1008,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1008,
1008,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1008,
1008,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1008,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
1000,
2004,
1011,
2003,
1000,
3978,
1010,
1008,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1008,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
1008,
12546,
2104,
1996,
6105,
1012,
1008,
1013,
12324,
1063,
4132,
1065,
2013,
1005,
1012,
1012,
1013,
1012,
1012,
1013,
5034,
2278,
1013,
2326,
1013,
4132,
1011,
17727,
2140,
1005,
1025,
6235,
1006,
1005,
4132,
1005,
1010,
1006,
1007,
1027,
1028,
1063,
2292,
2003,
10735,
1025,
2292,
18061,
4859,
22943,
1025,
2292,
2003,
20366,
1025,
2292,
2003,
10273,
14876,
2595,
1025,
2292,
26354,
10354,
8486,
1025,
2292,
2003,
2666,
1025,
2292,
2003,
24225,
1025,
2292,
2003,
8545,
2497,
23615,
1025,
2292,
26354,
5794,
9305,
5643,
1025,
2292,
2350,
27774,
1025,
2292,
16380,
27774,
1025,
2292,
16380,
2863,
5558,
2099,
27774,
1025,
2292,
5310,
4270,
3372,
1025,
2077,
5243,
2818,
1006,
1006,
1007,
1027,
1028,
1063,
2003,
10735,
1027,
6270,
1025,
18061,
4859,
22943,
1027,
6270,
1025,
2003,
20366,
1027,
6270,
1025,
26354,
10354,
8486,
1027,
6270,
1025,
2003,
10273,
14876,
2595,
1027,
6270,
1025,
2003,
2666,
1027,
6270,
1025,
2003,
24225,
1027,
6270,
1025,
2003,
8545,
2497,
23615,
1027,
6270,
1025,
26354,
5794,
9305,
5643,
1027,
6270,
1025,
2350,
27774,
1027,
1014,
1025,
16380,
27774,
1027,
1005,
1005,
1025,
16380,
2863,
5558,
30524,
1024,
5310,
4270,
7666,
18886,
3070,
1065,
1065,
1007,
1025,
5987,
1006,
4132,
1012,
2003,
10735,
1006,
1007,
1007,
1012,
2000,
1012,
5020,
1006,
2003,
10735,
1007,
1025,
5987,
1006,
4132,
1012,
18061,
4859,
22943,
1006,
1007,
1007,
1012,
2000,
1012,
5020,
1006,
18061,
4859,
22943,
1007,
1025,
5987,
1006,
4132,
1012,
2003,
20366,
1006,
1007,
1007,
1012,
2000,
1012,
5020,
1006,
2003,
20366,
1007,
1025,
5987,
1006,
4132,
1012,
26354,
10354,
8486,
1006,
1007,
1007,
1012,
2000,
1012,
5020,
1006,
26354,
10354,
8486,
1007,
1025,
5987,
1006,
4132,
1012,
2003,
10273,
14876,
2595,
1006,
1007,
1007,
1012,
2000,
1012,
5020,
1006,
2003,
10273,
14876,
2595,
1007,
1025,
5987,
1006,
4132,
1012,
2003,
2666,
1006,
1007,
1007,
1012,
2000,
1012,
5020,
1006,
2003,
2666,
1007,
1025,
5987,
1006,
4132,
1012,
2003,
24225,
1006,
1007,
1007,
1012,
2000,
1012,
5020,
1006,
30523,
2099,
27774,
1027,
19701,
1025,
5310,
4270,
3372,
1027,
1005,
1005,
1025,
1065,
1007,
1025,
3853,
3231,
20330,
4270,
3372,
1006,
5310,
4270,
7666,
18886,
3070,
1007,
1063,
9530,
3367,
4132,
1027,
2047,
4132,
1006,
1063,
20532,
1024,
1063,
5310,
4270,
3372,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2099,
27774,
1027,
19701,
1025,
5310,
4270,
3372,
1027,
1005,
1005,
1025,
1065,
1007,
1025,
3853,
3231,
20330,
4270,
3372,
1006,
5310,
4270,
7666,
18886,
3070,
1007,
1063,
9530,
3367,
4132,
1027,
2047,
4132,
1006,
1063,
20532,
1024,
1063,
5310,
4270,
3372,
30526
] |
/*
* Copyright (c) 2004-2022, University of Oslo
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* Neither the name of the HISP project nor the names of its contributors may
* be used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
package org.hisp.dhis.period;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
import java.util.ArrayList;
import java.util.Date;
import java.util.Iterator;
import java.util.List;
import org.hisp.dhis.DhisSpringTest;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @author Torgeir Lorange Ostby
* @version $Id: PeriodStoreTest.java 5983 2008-10-17 17:42:44Z larshelg $
*/
class PeriodStoreTest extends DhisSpringTest
{
@Autowired
private PeriodStore periodStore;
// -------------------------------------------------------------------------
// Period
// -------------------------------------------------------------------------
@Test
void testAddPeriod()
{
List<PeriodType> periodTypes = periodStore.getAllPeriodTypes();
Iterator<PeriodType> it = periodTypes.iterator();
PeriodType periodTypeA = it.next();
PeriodType periodTypeB = it.next();
Period periodA = new Period( periodTypeA, getDay( 1 ), getDay( 2 ) );
Period periodB = new Period( periodTypeA, getDay( 2 ), getDay( 3 ) );
Period periodC = new Period( periodTypeB, getDay( 2 ), getDay( 3 ) );
periodStore.addPeriod( periodA );
long idA = periodA.getId();
periodStore.addPeriod( periodB );
long idB = periodB.getId();
periodStore.addPeriod( periodC );
long idC = periodC.getId();
periodA = periodStore.get( idA );
assertNotNull( periodA );
assertEquals( idA, periodA.getId() );
assertEquals( periodTypeA, periodA.getPeriodType() );
assertEquals( getDay( 1 ), periodA.getStartDate() );
assertEquals( getDay( 2 ), periodA.getEndDate() );
periodB = periodStore.get( idB );
assertNotNull( periodB );
assertEquals( idB, periodB.getId() );
assertEquals( periodTypeA, periodB.getPeriodType() );
assertEquals( getDay( 2 ), periodB.getStartDate() );
assertEquals( getDay( 3 ), periodB.getEndDate() );
periodC = periodStore.get( idC );
assertNotNull( periodC );
assertEquals( idC, periodC.getId() );
assertEquals( periodTypeB, periodC.getPeriodType() );
assertEquals( getDay( 2 ), periodC.getStartDate() );
assertEquals( getDay( 3 ), periodC.getEndDate() );
}
@Test
void testDeleteAndGetPeriod()
{
List<PeriodType> periodTypes = periodStore.getAllPeriodTypes();
Iterator<PeriodType> it = periodTypes.iterator();
PeriodType periodTypeA = it.next();
PeriodType periodTypeB = it.next();
Period periodA = new Period( periodTypeA, getDay( 1 ), getDay( 2 ) );
Period periodB = new Period( periodTypeA, getDay( 2 ), getDay( 3 ) );
Period periodC = new Period( periodTypeB, getDay( 2 ), getDay( 3 ) );
Period periodD = new Period( periodTypeB, getDay( 3 ), getDay( 4 ) );
periodStore.addPeriod( periodA );
long idA = periodA.getId();
periodStore.addPeriod( periodB );
long idB = periodB.getId();
periodStore.addPeriod( periodC );
long idC = periodC.getId();
periodStore.addPeriod( periodD );
long idD = periodD.getId();
assertNotNull( periodStore.get( idA ) );
assertNotNull( periodStore.get( idB ) );
assertNotNull( periodStore.get( idC ) );
assertNotNull( periodStore.get( idD ) );
periodStore.delete( periodA );
assertNull( periodStore.get( idA ) );
assertNotNull( periodStore.get( idB ) );
assertNotNull( periodStore.get( idC ) );
assertNotNull( periodStore.get( idD ) );
periodStore.delete( periodB );
assertNull( periodStore.get( idA ) );
assertNull( periodStore.get( idB ) );
assertNotNull( periodStore.get( idC ) );
assertNotNull( periodStore.get( idD ) );
periodStore.delete( periodC );
assertNull( periodStore.get( idA ) );
assertNull( periodStore.get( idB ) );
assertNull( periodStore.get( idC ) );
assertNotNull( periodStore.get( idD ) );
periodStore.delete( periodD );
assertNull( periodStore.get( idA ) );
assertNull( periodStore.get( idB ) );
assertNull( periodStore.get( idC ) );
assertNull( periodStore.get( idD ) );
}
@Test
void testGetPeriod()
{
List<PeriodType> periodTypes = periodStore.getAllPeriodTypes();
Iterator<PeriodType> it = periodTypes.iterator();
PeriodType periodTypeA = it.next();
PeriodType periodTypeB = it.next();
Period periodA = new Period( periodTypeA, getDay( 1 ), getDay( 2 ) );
Period periodB = new Period( periodTypeA, getDay( 2 ), getDay( 3 ) );
Period periodC = new Period( periodTypeB, getDay( 2 ), getDay( 3 ) );
Period periodD = new Period( periodTypeB, getDay( 3 ), getDay( 4 ) );
Period periodE = new Period( periodTypeA, getDay( 3 ), getDay( 4 ) );
periodStore.addPeriod( periodA );
long idA = periodA.getId();
periodStore.addPeriod( periodB );
long idB = periodB.getId();
periodStore.addPeriod( periodC );
long idC = periodC.getId();
periodStore.addPeriod( periodD );
long idD = periodD.getId();
periodStore.addPeriod( periodE );
long idE = periodE.getId();
periodA = periodStore.getPeriod( getDay( 1 ), getDay( 2 ), periodTypeA );
assertNotNull( periodA );
assertEquals( idA, periodA.getId() );
assertEquals( periodTypeA, periodA.getPeriodType() );
assertEquals( getDay( 1 ), periodA.getStartDate() );
assertEquals( getDay( 2 ), periodA.getEndDate() );
periodB = periodStore.getPeriod( getDay( 2 ), getDay( 3 ), periodTypeA );
assertNotNull( periodB );
assertEquals( idB, periodB.getId() );
assertEquals( periodTypeA, periodB.getPeriodType() );
assertEquals( getDay( 2 ), periodB.getStartDate() );
assertEquals( getDay( 3 ), periodB.getEndDate() );
periodC = periodStore.getPeriod( getDay( 2 ), getDay( 3 ), periodTypeB );
assertNotNull( periodC );
assertEquals( idC, periodC.getId() );
assertEquals( periodTypeB, periodC.getPeriodType() );
assertEquals( getDay( 2 ), periodC.getStartDate() );
assertEquals( getDay( 3 ), periodC.getEndDate() );
periodD = periodStore.getPeriod( getDay( 3 ), getDay( 4 ), periodTypeB );
assertNotNull( periodD );
assertEquals( idD, periodD.getId() );
assertEquals( periodTypeB, periodD.getPeriodType() );
assertEquals( getDay( 3 ), periodD.getStartDate() );
assertEquals( getDay( 4 ), periodD.getEndDate() );
periodE = periodStore.getPeriod( getDay( 3 ), getDay( 4 ), periodTypeA );
assertNotNull( periodE );
assertEquals( idE, periodE.getId() );
assertEquals( periodTypeA, periodE.getPeriodType() );
assertEquals( getDay( 3 ), periodE.getStartDate() );
assertEquals( getDay( 4 ), periodE.getEndDate() );
assertNull( periodStore.getPeriod( getDay( 1 ), getDay( 2 ), periodTypeB ) );
assertNull( periodStore.getPeriod( getDay( 1 ), getDay( 3 ), periodTypeA ) );
assertNull( periodStore.getPeriod( getDay( 1 ), getDay( 5 ), periodTypeB ) );
assertNull( periodStore.getPeriod( getDay( 4 ), getDay( 3 ), periodTypeB ) );
assertNull( periodStore.getPeriod( getDay( 5 ), getDay( 6 ), periodTypeA ) );
}
@Test
void testGetAllPeriods()
{
PeriodType periodType = periodStore.getAllPeriodTypes().iterator().next();
Period periodA = new Period( periodType, getDay( 1 ), getDay( 1 ) );
Period periodB = new Period( periodType, getDay( 1 ), getDay( 2 ) );
Period periodC = new Period( periodType, getDay( 2 ), getDay( 3 ) );
periodStore.addPeriod( periodA );
periodStore.addPeriod( periodB );
periodStore.addPeriod( periodC );
List<Period> periods = periodStore.getAll();
assertNotNull( periods );
assertEquals( 3, periods.size() );
assertTrue( periods.contains( periodA ) );
assertTrue( periods.contains( periodB ) );
assertTrue( periods.contains( periodC ) );
}
@Test
void testGetPeriodsBetweenDates()
{
List<PeriodType> periodTypes = periodStore.getAllPeriodTypes();
Iterator<PeriodType> it = periodTypes.iterator();
PeriodType periodTypeA = it.next();
PeriodType periodTypeB = it.next();
Period periodA = new Period( periodTypeA, getDay( 1 ), getDay( 2 ) );
Period periodB = new Period( periodTypeA, getDay( 2 ), getDay( 3 ) );
Period periodC = new Period( periodTypeB, getDay( 2 ), getDay( 3 ) );
Period periodD = new Period( periodTypeB, getDay( 3 ), getDay( 4 ) );
periodStore.addPeriod( periodA );
periodStore.addPeriod( periodB );
periodStore.addPeriod( periodC );
periodStore.addPeriod( periodD );
List<Period> periods = periodStore.getPeriodsBetweenDates( getDay( 1 ), getDay( 1 ) );
assertNotNull( periods );
assertEquals( 0, periods.size() );
periods = periodStore.getPeriodsBetweenDates( getDay( 1 ), getDay( 2 ) );
assertNotNull( periods );
assertEquals( 1, periods.size() );
assertEquals( periodA, periods.iterator().next() );
periods = periodStore.getPeriodsBetweenDates( getDay( 2 ), getDay( 4 ) );
assertNotNull( periods );
assertEquals( 3, periods.size() );
assertTrue( periods.contains( periodB ) );
assertTrue( periods.contains( periodC ) );
assertTrue( periods.contains( periodD ) );
periods = periodStore.getPeriodsBetweenDates( getDay( 1 ), getDay( 5 ) );
assertNotNull( periods );
assertEquals( 4, periods.size() );
assertTrue( periods.contains( periodA ) );
assertTrue( periods.contains( periodB ) );
assertTrue( periods.contains( periodC ) );
assertTrue( periods.contains( periodD ) );
}
@Test
void testGetPeriodsBetweenOrSpanningDates()
{
List<PeriodType> periodTypes = periodStore.getAllPeriodTypes();
Iterator<PeriodType> it = periodTypes.iterator();
PeriodType periodTypeA = it.next();
PeriodType periodTypeB = it.next();
Period periodA = new Period( periodTypeA, getDay( 1 ), getDay( 2 ) );
Period periodB = new Period( periodTypeA, getDay( 2 ), getDay( 3 ) );
Period periodC = new Period( periodTypeB, getDay( 2 ), getDay( 3 ) );
Period periodD = new Period( periodTypeB, getDay( 3 ), getDay( 4 ) );
Period periodE = new Period( periodTypeB, getDay( 1 ), getDay( 4 ) );
periodStore.addPeriod( periodA );
periodStore.addPeriod( periodB );
periodStore.addPeriod( periodC );
periodStore.addPeriod( periodD );
periodStore.addPeriod( periodE );
List<Period> periods = periodStore.getPeriodsBetweenOrSpanningDates( getDay( 1 ), getDay( 1 ) );
assertNotNull( periods );
assertEquals( 2, periods.size() );
assertTrue( periods.contains( periodA ) );
assertTrue( periods.contains( periodE ) );
periods = periodStore.getPeriodsBetweenOrSpanningDates( getDay( 1 ), getDay( 2 ) );
assertNotNull( periods );
assertEquals( 2, periods.size() );
assertTrue( periods.contains( periodA ) );
assertTrue( periods.contains( periodE ) );
periods = periodStore.getPeriodsBetweenOrSpanningDates( getDay( 2 ), getDay( 3 ) );
assertNotNull( periods );
assertEquals( 3, periods.size() );
assertTrue( periods.contains( periodB ) );
assertTrue( periods.contains( periodC ) );
assertTrue( periods.contains( periodE ) );
periods = periodStore.getPeriodsBetweenOrSpanningDates( getDay( 2 ), getDay( 4 ) );
assertNotNull( periods );
assertEquals( 4, periods.size() );
assertTrue( periods.contains( periodB ) );
assertTrue( periods.contains( periodC ) );
assertTrue( periods.contains( periodD ) );
assertTrue( periods.contains( periodE ) );
}
@Test
void testGetIntersectingPeriodsByPeriodType()
{
PeriodType ypt = PeriodType.getPeriodTypeByName( YearlyPeriodType.NAME );
Date jan2006 = getDate( 2006, 1, 1 );
Date dec2006 = getDate( 2006, 12, 31 );
Date jan2007 = getDate( 2007, 1, 1 );
Date dec2007 = getDate( 2007, 12, 31 );
Period periodA = new Period( ypt, jan2006, dec2006 );
Period periodB = new Period( ypt, jan2007, dec2007 );
periodStore.addPeriod( periodA );
periodStore.addPeriod( periodB );
PeriodType mpt = PeriodType.getPeriodTypeByName( MonthlyPeriodType.NAME );
Date janstart = getDate( 2006, 1, 1 );
Date janend = getDate( 2006, 1, 31 );
Date febstart = getDate( 2006, 2, 1 );
Date febend = getDate( 2006, 2, 28 );
Date marstart = getDate( 2006, 3, 1 );
Date marend = getDate( 2006, 3, 31 );
Date aprstart = getDate( 2006, 4, 1 );
Date aprend = getDate( 2006, 4, 30 );
Date maystart = getDate( 2006, 5, 1 );
Date mayend = getDate( 2006, 5, 31 );
Date junstart = getDate( 2006, 6, 1 );
Date junend = getDate( 2006, 6, 30 );
Date julstart = getDate( 2006, 7, 1 );
Date julend = getDate( 2006, 7, 31 );
Date augstart = getDate( 2006, 8, 1 );
Date augend = getDate( 2006, 8, 31 );
Date sepstart = getDate( 2006, 9, 1 );
Date sepend = getDate( 2006, 9, 30 );
Date octstart = getDate( 2006, 10, 1 );
Date octend = getDate( 2006, 10, 31 );
Date novstart = getDate( 2006, 11, 1 );
Date novend = getDate( 2006, 11, 30 );
Date decstart = getDate( 2006, 12, 1 );
Date decend = getDate( 2006, 12, 31 );
Period periodC = new Period( mpt, janstart, janend );
Period periodD = new Period( mpt, febstart, febend );
Period periodE = new Period( mpt, marstart, marend );
Period periodF = new Period( mpt, aprstart, aprend );
Period periodG = new Period( mpt, maystart, mayend );
Period periodH = new Period( mpt, junstart, junend );
Period periodI = new Period( mpt, julstart, julend );
Period periodJ = new Period( mpt, augstart, augend );
Period periodK = new Period( mpt, sepstart, sepend );
Period periodL = new Period( mpt, octstart, octend );
Period periodM = new Period( mpt, novstart, novend );
Period periodN = new Period( mpt, decstart, decend );
periodStore.addPeriod( periodC );
periodStore.addPeriod( periodD );
periodStore.addPeriod( periodE );
periodStore.addPeriod( periodF );
periodStore.addPeriod( periodG );
periodStore.addPeriod( periodH );
periodStore.addPeriod( periodI );
periodStore.addPeriod( periodJ );
periodStore.addPeriod( periodK );
periodStore.addPeriod( periodL );
periodStore.addPeriod( periodM );
periodStore.addPeriod( periodN );
List<Period> periodsA = periodStore.getIntersectingPeriodsByPeriodType( ypt, getDate( 2006, 6, 1 ),
getDate( 2006, 11, 30 ) );
assertNotNull( periodsA );
assertEquals( 1, periodsA.size() );
List<Period> periodsB = periodStore.getIntersectingPeriodsByPeriodType( mpt, getDate( 2006, 6, 1 ),
getDate( 2006, 11, 30 ) );
assertNotNull( periodsB );
assertEquals( 6, periodsB.size() );
}
@Test
void testGetIntersectingPeriods()
{
PeriodType type = periodStore.getAllPeriodTypes().iterator().next();
Period periodA = new Period( type, getDay( 1 ), getDay( 2 ) );
Period periodB = new Period( type, getDay( 2 ), getDay( 4 ) );
Period periodC = new Period( type, getDay( 4 ), getDay( 6 ) );
Period periodD = new Period( type, getDay( 6 ), getDay( 8 ) );
Period periodE = new Period( type, getDay( 8 ), getDay( 10 ) );
Period periodF = new Period( type, getDay( 10 ), getDay( 12 ) );
Period periodG = new Period( type, getDay( 12 ), getDay( 14 ) );
Period periodH = new Period( type, getDay( 2 ), getDay( 6 ) );
Period periodI = new Period( type, getDay( 8 ), getDay( 12 ) );
Period periodJ = new Period( type, getDay( 2 ), getDay( 12 ) );
periodStore.addPeriod( periodA );
periodStore.addPeriod( periodB );
periodStore.addPeriod( periodC );
periodStore.addPeriod( periodD );
periodStore.addPeriod( periodE );
periodStore.addPeriod( periodF );
periodStore.addPeriod( periodG );
periodStore.addPeriod( periodH );
periodStore.addPeriod( periodI );
periodStore.addPeriod( periodJ );
List<Period> periods = periodStore.getIntersectingPeriods( getDay( 4 ), getDay( 10 ) );
assertEquals( periods.size(), 8 );
assertTrue( periods.contains( periodB ) );
assertTrue( periods.contains( periodC ) );
assertTrue( periods.contains( periodD ) );
assertTrue( periods.contains( periodE ) );
assertTrue( periods.contains( periodF ) );
assertTrue( periods.contains( periodH ) );
assertTrue( periods.contains( periodI ) );
assertTrue( periods.contains( periodJ ) );
}
@Test
void testGetPeriodsByPeriodType()
{
List<PeriodType> periodTypes = periodStore.getAllPeriodTypes();
Iterator<PeriodType> it = periodTypes.iterator();
PeriodType periodTypeA = it.next();
PeriodType periodTypeB = it.next();
PeriodType periodTypeC = it.next();
Period periodA = new Period( periodTypeA, getDay( 1 ), getDay( 2 ) );
Period periodB = new Period( periodTypeA, getDay( 2 ), getDay( 3 ) );
Period periodC = new Period( periodTypeA, getDay( 3 ), getDay( 4 ) );
Period periodD = new Period( periodTypeB, getDay( 3 ), getDay( 4 ) );
periodStore.addPeriod( periodA );
periodStore.addPeriod( periodB );
periodStore.addPeriod( periodC );
periodStore.addPeriod( periodD );
List<Period> periodsARef = new ArrayList<>();
periodsARef.add( periodA );
periodsARef.add( periodB );
periodsARef.add( periodC );
List<Period> periodsA = periodStore.getPeriodsByPeriodType( periodTypeA );
assertNotNull( periodsA );
assertEquals( periodsARef.size(), periodsA.size() );
assertTrue( periodsA.containsAll( periodsARef ) );
List<Period> periodsB = periodStore.getPeriodsByPeriodType( periodTypeB );
assertNotNull( periodsB );
assertEquals( 1, periodsB.size() );
assertEquals( periodD, periodsB.iterator().next() );
List<Period> periodsC = periodStore.getPeriodsByPeriodType( periodTypeC );
assertNotNull( periodsC );
assertEquals( 0, periodsC.size() );
}
}
|
dhis2/dhis2-core
|
dhis-2/dhis-services/dhis-service-core/src/test/java/org/hisp/dhis/period/PeriodStoreTest.java
|
Java
|
bsd-3-clause
| 20,914
|
[
30522,
1013,
1008,
1008,
9385,
1006,
1039,
1007,
2432,
1011,
16798,
2475,
1010,
2118,
1997,
9977,
1008,
2035,
2916,
9235,
1012,
1008,
1008,
25707,
1998,
2224,
1999,
3120,
1998,
12441,
3596,
1010,
2007,
2030,
2302,
1008,
14080,
1010,
2024,
7936,
3024,
2008,
1996,
2206,
3785,
2024,
2777,
1024,
1008,
25707,
2015,
1997,
3120,
3642,
2442,
9279,
1996,
2682,
9385,
5060,
1010,
2023,
1008,
2862,
1997,
3785,
1998,
1996,
2206,
5860,
19771,
5017,
1012,
1008,
30524,
5017,
1999,
1996,
12653,
1008,
1998,
1013,
2030,
2060,
4475,
3024,
2007,
1996,
4353,
1012,
1008,
4445,
1996,
2171,
1997,
1996,
2010,
2361,
2622,
4496,
1996,
3415,
1997,
2049,
16884,
2089,
1008,
2022,
2109,
2000,
2203,
5668,
2063,
2030,
5326,
3688,
5173,
2013,
2023,
4007,
2302,
1008,
3563,
3188,
2517,
6656,
1012,
1008,
1008,
2023,
4007,
2003,
3024,
2011,
1996,
9385,
13304,
1998,
16884,
1000,
2004,
2003,
1000,
1998,
1008,
2151,
4671,
2030,
13339,
10943,
3111,
1010,
2164,
1010,
2021,
2025,
3132,
2000,
1010,
1996,
13339,
1008,
10943,
3111,
1997,
6432,
8010,
1998,
10516,
2005,
1037,
3327,
3800,
2024,
1008,
5860,
19771,
7583,
1012,
1999,
2053,
2724,
4618,
1996,
9385,
3954,
2030,
16884,
2022,
20090,
2005,
1008,
2151,
3622,
1010,
14958,
1010,
5043,
2389,
1010,
2569,
1010,
27792,
1010,
2030,
9530,
3366,
15417,
4818,
12394,
1008,
1006,
2164,
1010,
2021,
2025,
3132,
2000,
1010,
21423,
1997,
7681,
5350,
2030,
2578,
1025,
1008,
3279,
1997,
2224,
1010,
2951,
1010,
2030,
11372,
1025,
2030,
2449,
24191,
1007,
2174,
3303,
1998,
2006,
1008,
2151,
3399,
1997,
14000,
1010,
3251,
1999,
3206,
1010,
9384,
14000,
1010,
2030,
17153,
2102,
1008,
1006,
2164,
27988,
2030,
4728,
1007,
17707,
1999,
2151,
2126,
2041,
1997,
1996,
2224,
1997,
2023,
1008,
4007,
1010,
2130,
2065,
9449,
1997,
1996,
6061,
1997,
2107,
4053,
1012,
1008,
1013,
7427,
8917,
1012,
2010,
2361,
1012,
28144,
2483,
1012,
2558,
1025,
12324,
10763,
8917,
1012,
12022,
4183,
1012,
13035,
1012,
17928,
1012,
23617,
2015,
1012,
20865,
2063,
26426,
2015,
1025,
12324,
10763,
8917,
1012,
12022,
4183,
1012,
13035,
1012,
17928,
1012,
23617,
2015,
1012,
20865,
17048,
11231,
3363,
1025,
12324,
10763,
8917,
1012,
12022,
4183,
1012,
13035,
1012,
17928,
1012,
23617,
2015,
1012,
20865,
11231,
3363,
1025,
12324,
10763,
8917,
1012,
12022,
4183,
1012,
13035,
1012,
17928,
1012,
23617,
2015,
1012,
20865,
16344,
5657,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
9140,
9863,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
3058,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
2009,
6906,
4263,
1025,
12324,
9262,
1012,
21183,
4014,
1012,
2862,
1025,
12324,
8917,
1012,
2010,
2361,
1012,
28144,
2483,
1012,
28144,
14643,
18098,
2075,
22199,
1025,
12324,
8917,
1012,
12022,
4183,
1012,
13035,
1012,
17928,
1012,
3231,
1025,
12324,
8917,
1012,
3500,
15643,
6198,
1012,
13435,
1012,
4713,
1012,
5754,
17287,
3508,
1012,
8285,
20357,
2094,
1025,
1013,
1008,
1008,
1008,
1030,
3166,
17153,
3351,
4313,
8840,
24388,
2063,
9808,
2102,
3762,
1008,
1030,
2544,
1002,
30523,
1008,
25707,
2015,
1999,
12441,
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1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1008,
25707,
2015,
1999,
12441,
2433,
2442,
21376,
1996,
2682,
9385,
5060,
1010,
1008,
2023,
2862,
1997,
3785,
1998,
1996,
2206,
5860,
19771,
30526
] |
<?php
/**
* A two factor authentication module that protects both the admin and customer logins
* Copyright (C) 2017 Ross Mitchell
*
* This file is part of Rossmitchell/Twofactor.
*
* Rossmitchell/Twofactor is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
namespace Rossmitchell\Twofactor\Controller\Customerlogin;
use Magento\Customer\Api\Data\CustomerInterface;
use Magento\Framework\App\Action\Action;
use Magento\Framework\App\Action\Context;
use Magento\Framework\Controller\Result\Redirect;
use Rossmitchell\Twofactor\Model\Config\Customer as CustomerAdmin;
use Rossmitchell\Twofactor\Model\Customer\Attribute\IsUsingTwoFactor;
use Rossmitchell\Twofactor\Model\Customer\Customer;
use Rossmitchell\Twofactor\Model\Urls\Fetcher;
abstract class AbstractController extends Action
{
/**
* @var CustomerAdmin
*/
private $customerAdmin;
/**
* @var Customer
*/
private $customerGetter;
/**
* @var Redirect
*/
private $redirectAction;
/**
* @var CustomerInterface|false
*/
private $customerModel;
/**
* @var IsUsingTwoFactor
*/
private $isUsingTwoFactor;
/**
* @var Fetcher
*/
private $fetcher;
/**
* AbstractController constructor.
*
* @param Context $context
* @param CustomerAdmin $customerAdmin
* @param Customer $customerGetter
* @param Fetcher $fetcher
* @param IsUsingTwoFactor $isUsingTwoFactor
*/
public function __construct(
Context $context,
CustomerAdmin $customerAdmin,
Customer $customerGetter,
Fetcher $fetcher,
IsUsingTwoFactor $isUsingTwoFactor
) {
parent::__construct($context);
$this->customerAdmin = $customerAdmin;
$this->customerGetter = $customerGetter;
$this->isUsingTwoFactor = $isUsingTwoFactor;
$this->fetcher = $fetcher;
}
/**
* The controllers should only be run if the following conditions are met:
*
* - Two Factor Authentication is enabled for the store
* - There is a customer
* - That customer is using Two Factor Authentication
*
* If all of these conditions are met, then the method will return true, otherwise a redirect will be created and
* the method will return false
*
* @return bool
*/
public function shouldActionBeRun()
{
if ($this->isEnabled() === false) {
$this->redirectAction = $this->handleDisabled();
return false;
}
if ($this->getCustomer() === false) {
$this->redirectAction = $this->handleMissingCustomer();
return false;
}
if ($this->isCustomerUsingTwoFactor() === false) {
$this->redirectAction = $this->handleNonOptInCustomer();
return false;
}
return true;
}
/**
* Returns the redirect action generated by the shouldActionBeRun method
*
* @return Redirect
*/
public function getRedirectAction()
{
return $this->redirectAction;
}
/**
* Used to create a redirect action to a specific page
*
* @param string $path - The path the the customer should be redirected to
*
* @return Redirect
*/
public function redirect($path)
{
$redirect = $this->resultRedirectFactory->create();
$redirect->setPath($path);
return $redirect;
}
/**
* Used to fetch the customer from the session
*
* @return CustomerInterface|false
*/
public function getCustomer()
{
if (null === $this->customerModel) {
$this->customerModel = $this->customerGetter->getCustomer();
}
return $this->customerModel;
}
/**
* @return Fetcher
*/
public function getUrlFetcher()
{
return $this->fetcher;
}
/**
* A wrapper method around the Customer::isTwoFactorEnabled method
*
* @return bool
*/
private function isEnabled()
{
return ($this->customerAdmin->isTwoFactorEnabled() === true);
}
/**
* A wrapper method around the IsUsingTwoFactor::getValue method
*
* @return bool
*/
private function isCustomerUsingTwoFactor()
{
$customer = $this->getCustomer();
return $this->isUsingTwoFactor->getValue($customer);
}
/**
* If Two Factor Authentication is disabled redirect the customer to the home page
*
* @return Redirect
*/
private function handleDisabled()
{
return $this->redirect('/');
}
/**
* If there isn't a customer in the session then redirect the user to the login page
*
* @return Redirect
*/
private function handleMissingCustomer()
{
$loginUrl = $this->getUrlFetcher()->getCustomerLogInUrl();
return $this->redirect($loginUrl);
}
/**
* Redirect customers that are not using Two Factor Authentication to the home page
*
* @return Redirect
*/
private function handleNonOptInCustomer()
{
return $this->redirect('/');
}
}
|
rossmitchell/module-twofactor
|
Controller/Customerlogin/AbstractController.php
|
PHP
|
gpl-3.0
| 5,795
|
[
30522,
1026,
1029,
25718,
1013,
1008,
1008,
1008,
1037,
2048,
5387,
27280,
11336,
2008,
18227,
2119,
1996,
4748,
10020,
1998,
8013,
8833,
7076,
1008,
9385,
1006,
1039,
1007,
2418,
5811,
6395,
1008,
1008,
2023,
5371,
2003,
2112,
1997,
5811,
22930,
15721,
2140,
1013,
2048,
7011,
16761,
1012,
1008,
1008,
5811,
22930,
15721,
2140,
1013,
2048,
7011,
16761,
2003,
2489,
4007,
1024,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
2009,
1998,
1013,
2030,
19933,
1008,
2009,
2104,
1996,
3408,
1997,
1996,
27004,
2236,
2270,
6105,
2004,
2405,
2011,
1008,
1996,
2489,
4007,
3192,
1010,
2593,
2544,
1017,
1997,
1996,
6105,
1010,
2030,
1008,
1006,
2012,
2115,
5724,
1007,
2151,
2101,
2544,
1012,
1008,
1008,
2023,
2565,
2003,
5500,
1999,
1996,
3246,
2008,
2009,
2097,
2022,
6179,
1010,
1008,
2021,
2302,
2151,
10943,
2100,
1025,
2302,
2130,
1996,
13339,
10943,
2100,
1997,
1008,
6432,
8010,
2030,
10516,
2005,
1037,
3327,
3800,
1012,
2156,
1996,
1008,
27004,
2236,
2270,
6105,
2005,
2062,
4751,
1012,
1008,
1008,
2017,
2323,
2031,
2363,
1037,
6100,
1997,
1996,
27004,
2236,
2270,
6105,
1008,
2247,
2007,
2023,
2565,
1012,
2065,
2025,
1010,
2156,
1026,
8299,
1024,
1013,
1013,
7479,
1012,
27004,
1012,
8917,
1013,
15943,
1013,
1028,
1012,
1008,
1013,
3415,
15327,
5811,
22930,
15721,
2140,
1032,
2048,
7011,
16761,
1032,
11486,
1032,
8013,
21197,
2378,
1025,
2224,
17454,
13663,
1032,
8013,
1032,
17928,
1032,
2951,
1032,
8013,
18447,
2121,
12172,
1025,
2224,
17454,
13663,
1032,
7705,
1032,
10439,
1032,
2895,
1032,
2895,
1025,
2224,
17454,
13663,
1032,
7705,
1032,
10439,
1032,
2895,
1032,
6123,
1025,
2224,
17454,
13663,
1032,
7705,
1032,
11486,
1032,
2765,
1032,
2417,
7442,
6593,
1025,
2224,
5811,
22930,
15721,
2140,
1032,
2048,
7011,
16761,
1032,
2944,
1032,
9530,
8873,
2290,
1032,
8013,
2004,
8013,
4215,
10020,
1025,
2224,
5811,
22930,
15721,
2140,
1032,
2048,
7011,
16761,
1032,
2944,
1032,
8013,
1032,
17961,
1032,
2003,
18161,
2102,
12155,
7011,
16761,
1025,
2224,
5811,
22930,
15721,
2140,
1032,
2048,
7011,
16761,
1032,
2944,
1032,
8013,
1032,
8013,
1025,
2224,
5811,
22930,
15721,
2140,
1032,
2048,
7011,
16761,
1032,
2944,
1032,
24471,
4877,
1032,
18584,
2121,
1025,
10061,
2465,
10061,
8663,
13181,
10820,
8908,
2895,
1063,
1013,
1008,
1008,
1008,
1030,
13075,
8013,
4215,
10020,
1008,
1013,
2797,
1002,
8013,
4215,
10020,
1025,
1013,
1008,
1008,
1008,
1030,
30524,
3334,
1025,
1013,
1008,
1008,
1008,
1030,
13075,
2417,
7442,
6593,
1008,
1013,
2797,
1002,
2417,
7442,
25572,
7542,
1025,
1013,
1008,
1008,
1008,
1030,
13075,
8013,
18447,
2121,
12172,
1064,
6270,
1008,
1013,
2797,
1002,
8013,
5302,
9247,
1025,
1013,
1008,
1008,
1008,
1030,
13075,
2003,
18161,
2102,
12155,
7011,
16761,
1008,
1013,
2797,
1002,
2003,
18161,
2102,
12155,
7011,
16761,
1025,
1013,
1008,
1008,
1008,
1030,
13075,
18584,
2121,
1008,
1013,
2797,
1002,
18584,
2121,
1025,
1013,
1008,
1008,
1008,
10061,
8663,
13181,
10820,
9570,
2953,
1012,
1008,
1008,
1030,
11498,
2213,
6123,
1002,
6123,
1008,
1030,
11498,
2213,
8013,
4215,
10020,
1002,
8013,
4215,
10020,
1008,
30523,
13075,
8013,
1008,
1013,
2797,
1002,
8013,
18150,
30526
] |
[
0,
0,
0,
0,
0,
0,
0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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
13075,
8013,
1008,
1013,
2797,
1002,
8013,
18150,
30526
] |
# @desc makefile for Login
# @author viticm<viticm.ti@gmail.com>
# @date 2013-06-25 20:00:13
include ../../premake.mk
CFLAGS = -I$(BASEDIR)/Login/Main -I$(BASEDIR)/Login/DB -I$(BASEDIR)/Login/Packets -I$(BASEDIR)/Login/Process -I$(BASEDIR)/Login/Player -I$(BASEDIR)/Login $(SERVER_BASE_INCLUDES)
LDFLAGS =
DIRS =
OBJS = DBThread.o \
LoginDBManager.o \
DBThreadManager.o \
CharConfig.o \
DBLogicManager.o
debug:$(OBJS)
for dir in $(DIRS); do \
$(MAKE) debug -C $$dir; \
done
release:$(OBJS)
for dir in $(DIRS); do \
$(MAKE) release -C $$dir; \
done
all:debug
clean:
$(RM) -f *.o
|
viticm/web-pap
|
server/Login/DB/Makefile
|
Makefile
|
bsd-3-clause
| 604
|
[
30522,
1001,
1030,
4078,
2278,
2191,
8873,
2571,
2005,
8833,
2378,
1001,
1030,
3166,
6819,
4588,
2213,
1026,
6819,
4588,
2213,
1012,
14841,
1030,
20917,
4014,
1012,
4012,
1028,
1001,
1030,
3058,
2286,
1011,
5757,
1011,
2423,
2322,
1024,
4002,
1024,
2410,
2421,
1012,
1012,
1013,
1012,
1012,
1013,
26563,
13808,
1012,
12395,
18830,
26454,
1027,
1011,
1045,
1002,
1006,
2241,
4313,
1007,
1013,
8833,
2378,
1013,
2364,
1011,
1045,
1002,
1006,
2241,
4313,
1007,
1013,
8833,
2378,
1013,
30524,
1013,
8833,
2378,
1013,
2447,
1011,
1045,
1002,
1006,
2241,
4313,
1007,
1013,
8833,
2378,
1002,
1006,
8241,
1035,
2918,
1035,
2950,
1007,
25510,
10258,
26454,
1027,
16101,
2015,
1027,
27885,
22578,
1027,
16962,
2705,
16416,
2094,
1012,
1051,
1032,
8833,
22254,
25526,
5162,
4590,
1012,
1051,
1032,
16962,
2705,
16416,
21804,
17325,
1012,
1051,
1032,
25869,
8663,
8873,
2290,
1012,
1051,
1032,
16962,
27179,
24805,
4590,
1012,
1051,
2139,
8569,
2290,
1024,
1002,
1006,
27885,
22578,
1007,
2005,
16101,
1999,
1002,
1006,
16101,
2015,
1007,
1025,
2079,
1032,
1002,
1006,
2191,
1007,
2139,
8569,
2290,
1011,
1039,
1002,
1002,
16101,
1025,
1032,
2589,
2713,
1024,
1002,
1006,
27885,
22578,
1007,
2005,
16101,
1999,
1002,
1006,
16101,
2015,
1007,
1025,
2079,
1032,
1002,
1006,
2191,
1007,
2713,
1011,
1039,
1002,
1002,
16101,
1025,
1032,
2589,
2035,
1024,
2139,
8569,
2290,
4550,
1024,
1002,
1006,
28549,
1007,
1011,
1042,
1008,
1012,
1051,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
16962,
1011,
1045,
1002,
1006,
2241,
4313,
1007,
1013,
8833,
2378,
1013,
23730,
1011,
1045,
1002,
1006,
2241,
4313,
1007,
1013,
8833,
2378,
1013,
2832,
1011,
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-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
16962,
1011,
1045,
1002,
1006,
2241,
4313,
1007,
1013,
8833,
2378,
1013,
23730,
1011,
1045,
1002,
1006,
2241,
4313,
1007,
1013,
8833,
2378,
1013,
2832,
1011,
1045,
1002,
1006,
2241,
4313,
1007,
30526
] |
#!/bin/bash
# Distill standard library documentation from the stdops.c file.
cat Interpreter/stdops.c | grep '//' | colrm 1 3 | tail -n +10 > Documentation/Standard\ Library.mkd
|
wandernauta/Staple
|
Support/mkstdlibdoc.sh
|
Shell
|
mit
| 180
|
[
30522,
1001,
999,
1013,
8026,
1013,
24234,
1001,
4487,
16643,
3363,
3115,
3075,
12653,
2013,
1996,
2358,
3527,
4523,
1012,
1039,
5371,
1012,
4937,
19555,
1013,
2358,
3527,
4523,
1012,
1039,
1064,
24665,
13699,
1005,
1013,
1013,
1005,
1064,
8902,
10867,
1015,
1017,
1064,
5725,
1011,
1050,
1009,
2184,
1028,
12653,
1013,
3115,
1032,
3075,
1012,
12395,
2094,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "net/http/alternative_service.h"
#include "base/check_op.h"
#include "base/metrics/histogram_macros.h"
#include "base/metrics/histogram_macros_local.h"
#include "base/notreached.h"
#include "base/strings/stringprintf.h"
#include "net/base/port_util.h"
namespace net {
namespace {
quic::ParsedQuicVersion ParsedQuicVersionFromAlpn(
base::StringPiece str,
quic::ParsedQuicVersionVector supported_versions) {
for (const quic::ParsedQuicVersion& version : supported_versions) {
if (AlpnForVersion(version) == str)
return version;
}
return quic::ParsedQuicVersion::Unsupported();
}
} // anonymous namespace
void HistogramAlternateProtocolUsage(AlternateProtocolUsage usage,
bool is_google_host) {
UMA_HISTOGRAM_ENUMERATION("Net.AlternateProtocolUsage", usage,
ALTERNATE_PROTOCOL_USAGE_MAX);
if (is_google_host) {
UMA_HISTOGRAM_ENUMERATION("Net.AlternateProtocolUsageGoogle", usage,
ALTERNATE_PROTOCOL_USAGE_MAX);
}
}
void HistogramBrokenAlternateProtocolLocation(
BrokenAlternateProtocolLocation location) {
UMA_HISTOGRAM_ENUMERATION("Net.AlternateProtocolBrokenLocation", location,
BROKEN_ALTERNATE_PROTOCOL_LOCATION_MAX);
}
bool IsAlternateProtocolValid(NextProto protocol) {
switch (protocol) {
case kProtoUnknown:
return false;
case kProtoHTTP11:
return false;
case kProtoHTTP2:
return true;
case kProtoQUIC:
return true;
}
NOTREACHED();
return false;
}
bool IsProtocolEnabled(NextProto protocol,
bool is_http2_enabled,
bool is_quic_enabled) {
switch (protocol) {
case kProtoUnknown:
NOTREACHED();
return false;
case kProtoHTTP11:
return true;
case kProtoHTTP2:
return is_http2_enabled;
case kProtoQUIC:
return is_quic_enabled;
}
NOTREACHED();
return false;
}
// static
AlternativeServiceInfo
AlternativeServiceInfo::CreateHttp2AlternativeServiceInfo(
const AlternativeService& alternative_service,
base::Time expiration) {
DCHECK_EQ(alternative_service.protocol, kProtoHTTP2);
return AlternativeServiceInfo(alternative_service, expiration,
quic::ParsedQuicVersionVector());
}
// static
AlternativeServiceInfo AlternativeServiceInfo::CreateQuicAlternativeServiceInfo(
const AlternativeService& alternative_service,
base::Time expiration,
const quic::ParsedQuicVersionVector& advertised_versions) {
DCHECK_EQ(alternative_service.protocol, kProtoQUIC);
return AlternativeServiceInfo(alternative_service, expiration,
advertised_versions);
}
AlternativeServiceInfo::AlternativeServiceInfo() : alternative_service_() {}
AlternativeServiceInfo::~AlternativeServiceInfo() = default;
AlternativeServiceInfo::AlternativeServiceInfo(
const AlternativeService& alternative_service,
base::Time expiration,
const quic::ParsedQuicVersionVector& advertised_versions)
: alternative_service_(alternative_service), expiration_(expiration) {
if (alternative_service_.protocol == kProtoQUIC) {
advertised_versions_ = advertised_versions;
}
}
AlternativeServiceInfo::AlternativeServiceInfo(
const AlternativeServiceInfo& alternative_service_info) = default;
AlternativeServiceInfo& AlternativeServiceInfo::operator=(
const AlternativeServiceInfo& alternative_service_info) = default;
std::string AlternativeService::ToString() const {
return base::StringPrintf("%s %s:%d", NextProtoToString(protocol),
host.c_str(), port);
}
std::string AlternativeServiceInfo::ToString() const {
base::Time::Exploded exploded;
expiration_.LocalExplode(&exploded);
return base::StringPrintf(
"%s, expires %04d-%02d-%02d %02d:%02d:%02d",
alternative_service_.ToString().c_str(), exploded.year, exploded.month,
exploded.day_of_month, exploded.hour, exploded.minute, exploded.second);
}
// static
bool AlternativeServiceInfo::TransportVersionLessThan(
const quic::ParsedQuicVersion& lhs,
const quic::ParsedQuicVersion& rhs) {
return lhs.transport_version < rhs.transport_version;
}
std::ostream& operator<<(std::ostream& os,
const AlternativeService& alternative_service) {
os << alternative_service.ToString();
return os;
}
AlternativeServiceInfoVector ProcessAlternativeServices(
const spdy::SpdyAltSvcWireFormat::AlternativeServiceVector&
alternative_service_vector,
bool is_http2_enabled,
bool is_quic_enabled,
const quic::ParsedQuicVersionVector& supported_quic_versions) {
// Convert spdy::SpdyAltSvcWireFormat::AlternativeService entries
// to net::AlternativeServiceInfo.
AlternativeServiceInfoVector alternative_service_info_vector;
for (const spdy::SpdyAltSvcWireFormat::AlternativeService&
alternative_service_entry : alternative_service_vector) {
if (!IsPortValid(alternative_service_entry.port))
continue;
NextProto protocol =
NextProtoFromString(alternative_service_entry.protocol_id);
// Check if QUIC version is supported. Filter supported QUIC versions.
quic::ParsedQuicVersionVector advertised_versions;
if (protocol == kProtoQUIC) {
if (!IsProtocolEnabled(protocol, is_http2_enabled, is_quic_enabled))
continue;
if (!alternative_service_entry.version.empty()) {
advertised_versions = FilterSupportedAltSvcVersions(
alternative_service_entry, supported_quic_versions);
if (advertised_versions.empty())
continue;
}
} else if (!IsAlternateProtocolValid(protocol)) {
quic::ParsedQuicVersion version = ParsedQuicVersionFromAlpn(
alternative_service_entry.protocol_id, supported_quic_versions);
if (version == quic::ParsedQuicVersion::Unsupported()) {
continue;
}
protocol = kProtoQUIC;
advertised_versions = {version};
}
if (!IsAlternateProtocolValid(protocol) ||
!IsProtocolEnabled(protocol, is_http2_enabled, is_quic_enabled)) {
continue;
}
AlternativeService alternative_service(protocol,
alternative_service_entry.host,
alternative_service_entry.port);
base::Time expiration =
base::Time::Now() +
base::Seconds(alternative_service_entry.max_age_seconds);
AlternativeServiceInfo alternative_service_info;
if (protocol == kProtoQUIC) {
alternative_service_info =
AlternativeServiceInfo::CreateQuicAlternativeServiceInfo(
alternative_service, expiration, advertised_versions);
} else {
alternative_service_info =
AlternativeServiceInfo::CreateHttp2AlternativeServiceInfo(
alternative_service, expiration);
}
alternative_service_info_vector.push_back(alternative_service_info);
}
return alternative_service_info_vector;
}
} // namespace net
|
scheib/chromium
|
net/http/alternative_service.cc
|
C++
|
bsd-3-clause
| 7,271
|
[
30522,
1013,
1013,
9385,
1006,
1039,
1007,
2262,
1996,
10381,
21716,
5007,
6048,
1012,
2035,
2916,
9235,
1012,
1013,
1013,
2224,
1997,
2023,
3120,
3642,
2003,
9950,
2011,
1037,
18667,
2094,
1011,
2806,
6105,
2008,
2064,
2022,
1013,
1013,
2179,
1999,
1996,
6105,
5371,
1012,
1001,
2421,
1000,
5658,
1013,
8299,
1013,
4522,
1035,
2326,
1012,
1044,
1000,
1001,
2421,
1000,
2918,
1013,
4638,
1035,
6728,
1012,
1044,
1000,
1001,
2421,
1000,
2918,
1013,
12046,
2015,
1013,
2010,
3406,
13113,
1035,
26632,
2015,
1012,
1044,
1000,
1001,
2421,
1000,
2918,
1013,
30524,
2334,
1012,
1044,
1000,
1001,
2421,
1000,
2918,
1013,
10289,
15395,
2094,
1012,
1044,
1000,
1001,
2421,
1000,
2918,
1013,
7817,
1013,
5164,
16550,
2546,
1012,
1044,
1000,
1001,
2421,
1000,
5658,
1013,
2918,
1013,
3417,
1035,
21183,
4014,
1012,
1044,
1000,
3415,
15327,
5658,
1063,
3415,
15327,
1063,
21864,
2278,
1024,
1024,
11968,
6924,
15549,
2278,
27774,
11968,
6924,
15549,
2278,
27774,
19699,
9626,
14277,
2078,
1006,
2918,
1024,
1024,
5164,
11198,
2358,
2099,
1010,
21864,
2278,
1024,
1024,
11968,
6924,
15549,
2278,
27774,
3726,
16761,
3569,
1035,
4617,
1007,
1063,
2005,
1006,
9530,
3367,
21864,
2278,
1024,
1024,
11968,
6924,
15549,
2278,
27774,
1004,
2544,
1024,
3569,
1035,
4617,
1007,
1063,
2065,
1006,
2632,
2361,
2078,
29278,
27774,
1006,
2544,
1007,
1027,
1027,
2358,
2099,
1007,
2709,
2544,
1025,
1065,
2709,
21864,
2278,
1024,
1024,
11968,
6924,
15549,
2278,
27774,
1024,
1024,
4895,
6342,
9397,
15613,
1006,
1007,
1025,
1065,
1065,
1013,
1013,
10812,
3415,
15327,
11675,
2010,
3406,
13113,
2389,
16451,
3686,
21572,
3406,
25778,
10383,
3351,
1006,
6585,
21572,
3406,
25778,
10383,
3351,
8192,
1010,
22017,
2140,
2003,
1035,
8224,
1035,
3677,
1007,
1063,
8529,
2050,
1035,
2010,
3406,
13113,
1035,
4372,
17897,
8156,
1006,
1000,
5658,
1012,
6585,
21572,
3406,
25778,
10383,
3351,
1000,
1010,
8192,
1010,
6585,
1035,
8778,
1035,
8192,
1035,
4098,
1007,
1025,
2065,
1006,
2003,
1035,
8224,
1035,
3677,
1007,
1063,
8529,
2050,
1035,
2010,
3406,
13113,
1035,
4372,
17897,
8156,
1006,
1000,
5658,
1012,
6585,
21572,
3406,
25778,
10383,
3351,
3995,
8649,
2571,
1000,
1010,
8192,
1010,
6585,
1035,
8778,
1035,
8192,
1035,
4098,
1007,
1025,
1065,
1065,
11675,
2010,
3406,
13113,
29162,
2389,
16451,
3686,
21572,
3406,
26895,
23909,
1006,
3714,
2389,
16451,
3686,
21572,
3406,
26895,
23909,
3295,
1007,
1063,
8529,
2050,
1035,
2010,
3406,
13113,
1035,
4372,
17897,
8156,
1006,
1000,
5658,
1012,
6585,
21572,
3406,
25778,
29162,
4135,
10719,
1000,
1010,
3295,
1010,
3714,
1035,
6585,
1035,
8778,
1035,
3295,
1035,
4098,
1007,
1025,
1065,
22017,
2140,
18061,
21928,
12556,
21572,
3406,
25778,
10175,
3593,
1006,
2279,
21572,
3406,
8778,
1007,
1063,
6942,
1006,
8778,
1007,
1063,
2553,
1047,
21572,
24826,
8950,
19779,
2078,
1024,
2709,
6270,
1025,
2553,
1047,
21572,
3406,
11039,
25856,
14526,
1024,
2709,
6270,
1025,
2553,
1047,
21572,
3406,
11039,
25856,
2475,
1024,
2709,
2995,
1025,
2553,
1047,
21572,
3406,
15549,
2278,
1024,
2709,
2995,
1025,
1065,
10289,
15395,
2094,
30523,
12046,
2015,
1013,
2010,
3406,
13113,
1035,
26632,
2015,
1035,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
12046,
2015,
1013,
2010,
3406,
13113,
1035,
26632,
2015,
1035,
30526
] |
/*
XOWA: the XOWA Offline Wiki Application
Copyright (C) 2012 gnosygnu@gmail.com
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package gplx.xowa.xtns.gallery; import gplx.*; import gplx.xowa.*; import gplx.xowa.xtns.*;
import org.junit.*;
public class Gallery_itm_parser_tst {
@Before public void init() {fxt.Init();} private Gallery_itm_parser_fxt fxt = new Gallery_itm_parser_fxt();
@Test public void All() {fxt.Test_parse("File:A.png|a|alt=b|link=c" , fxt.Expd("File:A.png", "a" , "b" , "c"));}
@Test public void Ttl_only() {fxt.Test_parse("File:A.png" , fxt.Expd("File:A.png", null, null, null));}
@Test public void Ttl_url_encoded() {fxt.Test_parse("File:A%28b%29.png" , fxt.Expd("File:A(b).png"));} // PURPOSE: handle url-encoded sequences; DATE:2014-01-01
@Test public void Caption_only() {fxt.Test_parse("File:A.png|a" , fxt.Expd("File:A.png", "a" , null, null));}
@Test public void Caption_many() {fxt.Test_parse("File:A.png|a|b" , fxt.Expd("File:A.png", "a|b"));} // NOTE: pipe becomes part of caption (i.e.: doesn't separate into caption / alt)
@Test public void Alt_only() {fxt.Test_parse("File:A.png|alt=a" , fxt.Expd("File:A.png", null, "a" , null));}
@Test public void Link_only() {fxt.Test_parse("File:A.png|link=a" , fxt.Expd("File:A.png", null, null, "a"));}
@Test public void Caption_alt() {fxt.Test_parse("File:A.png|a|alt=b" , fxt.Expd("File:A.png", "a" , "b"));}
@Test public void Alt_caption() {fxt.Test_parse("File:A.png|alt=a|b" , fxt.Expd("File:A.png", "b" , "a"));}
@Test public void Alt_blank() {fxt.Test_parse("File:A.png|alt=|b" , fxt.Expd("File:A.png", "b" , ""));}
@Test public void Alt_invalid() {fxt.Test_parse("File:A.png|alta=b" , fxt.Expd("File:A.png", "alta=b"));} // NOTE: invalid alt becomes caption
@Test public void Ws() {fxt.Test_parse("File:A.png| alt = b | c" , fxt.Expd("File:A.png", "c" , "b"));}
@Test public void Ws_caption_many() {fxt.Test_parse("File:A.png| a | b | c " , fxt.Expd("File:A.png", "a | b | c"));}
@Test public void Page_pdf() {fxt.Test_parse("File:A.pdf|page=1 " , fxt.Expd("File:A.pdf", null, null, null, 1));} // pdf parses page=1
@Test public void Page_png() {fxt.Test_parse("File:A.png|page=1 " , fxt.Expd("File:A.png", "page=1", null, null));} // non-pdf treats page=1 as caption
@Test public void Page_invalid() {fxt.Test_parse("|page=1");} // check that null title doesn't fail; DATE:2014-03-21
@Test public void Skip_blank() {fxt.Test_parse("");}
@Test public void Skip_empty() {fxt.Test_parse("|File:A.png");}
@Test public void Skip_ws() {fxt.Test_parse(" |File:A.png");}
@Test public void Skip_anchor() {fxt.Test_parse("#a");} // PURPOSE: anchor-like ttl should not render; ar.d:جَبَّارَة; DATE:2014-03-18
@Test public void Many() {
fxt.Test_parse("File:A.png\nFile:B.png" , fxt.Expd("File:A.png"), fxt.Expd("File:B.png"));
}
@Test public void Many_nl() {
fxt.Test_parse("File:A.png\n\n\nFile:B.png" , fxt.Expd("File:A.png"), fxt.Expd("File:B.png"));
}
@Test public void Many_nl_w_tab() {
fxt.Test_parse("File:A.png\n \t \nFile:B.png" , fxt.Expd("File:A.png"), fxt.Expd("File:B.png"));
}
@Test public void Many_invalid() {
fxt.Test_parse("File:A.png\n<invalid>\nFile:B.png" , fxt.Expd("File:A.png"), fxt.Expd("File:B.png"));
}
@Test public void Caption_complicated() {
fxt.Test_parse("File:A.png|alt=a|b[[c|d]]e ", fxt.Expd("File:A.png", "b[[c|d]]e", "a"));
}
@Test public void Alt_magic_word_has_arg() { // PURPOSE: img_alt magic_word is of form "alt=$1"; make sure =$1 is stripped for purpose of parser; DATE:2013-09-12
fxt.Init_kwd_set(Xol_kwd_grp_.Id_img_alt, "alt=$1");
fxt.Test_parse("File:A.png|alt=a|b", fxt.Expd("File:A.png", "b", "a"));
}
@Test public void Link_null() { // PURPOSE: null link causes page to fail; EX: ru.w:Гянджа; <gallery>Datei:A.png|link= |</gallery>; DATE:2014-04-11
fxt.Test_parse("File:A.png|link = |b", fxt.Expd("File:A.png", "b", null, null));
}
@Test public void Caption_empty() { // PURPOSE: check that empty ws doesn't break caption (based on Link_null); DATE:2014-04-11
fxt.Test_parse("File:A.png| | | ", fxt.Expd("File:A.png", null, null, null));
}
}
class Gallery_itm_parser_fxt {
private Xoa_app app; private Xow_wiki wiki;
private Gallery_itm_parser parser;
public Gallery_itm_parser_fxt Init() {
this.app = Xoa_app_fxt.app_();
this.wiki = Xoa_app_fxt.wiki_tst_(app);
parser = new Gallery_itm_parser();
parser.Init_by_wiki(wiki);
return this;
}
public String[] Expd(String ttl) {return new String[] {ttl, null, null, null, null};}
public String[] Expd(String ttl, String caption) {return new String[] {ttl, caption, null, null, null};}
public String[] Expd(String ttl, String caption, String alt) {return new String[] {ttl, caption, alt, null, null};}
public String[] Expd(String ttl, String caption, String alt, String link) {return new String[] {ttl, caption, alt, link, null};}
public String[] Expd(String ttl, String caption, String alt, String link, int page) {return new String[] {ttl, caption, alt, link, Int_.XtoStr(page)};}
public void Init_kwd_set(int kwd_id, String kwd_val) {
wiki.Lang().Kwd_mgr().Get_or_new(kwd_id).Itms()[0].Val_(Bry_.new_ascii_(kwd_val));
parser.Init_by_wiki(wiki);
}
public void Test_parse(String raw, String[]... expd) {
ListAdp actl = ListAdp_.new_();
byte[] src = Bry_.new_ascii_(raw);
parser.Parse_all(actl, Gallery_mgr_base_.New_by_mode(Gallery_mgr_base_.Traditional_tid), new Gallery_xnde(), src, 0, src.length);
Tfds.Eq_ary(String_.Ary_flatten(expd), String_.Ary_flatten(X_to_str_ary(src, actl)));
}
private String[][] X_to_str_ary(byte[] src, ListAdp list) {
int len = list.Count();
String[][] rv = new String[len][];
for (int i = 0; i < len; i++) {
Gallery_itm itm = (Gallery_itm)list.FetchAt(i);
String[] ary = new String[5];
rv[i] = ary;
ary[0] = String_.new_utf8_(itm.Ttl().Full_txt());
ary[2] = X_to_str_ary_itm(src, itm.Alt_bgn(), itm.Alt_end());
ary[3] = X_to_str_ary_itm(src, itm.Link_bgn(), itm.Link_end());
ary[4] = X_to_str_ary_itm(src, itm.Page_bgn(), itm.Page_end());
byte[] caption = itm.Caption_bry();
ary[1] = caption == null ? null : String_.new_utf8_(caption);
}
return rv;
}
private String X_to_str_ary_itm(byte[] src, int bgn, int end) {
return bgn == Bry_.NotFound && end == Bry_.NotFound ? null : String_.new_utf8_(src, bgn, end);
}
}
|
crosslink/xowa
|
dev/400_xowa/src/gplx/xowa/xtns/gallery/Gallery_itm_parser_tst.java
|
Java
|
agpl-3.0
| 7,217
|
[
30522,
1013,
1008,
1060,
21293,
1024,
1996,
1060,
21293,
2125,
4179,
15536,
3211,
4646,
9385,
1006,
1039,
1007,
2262,
1043,
15460,
2100,
16206,
2226,
1030,
20917,
4014,
1012,
4012,
2023,
2565,
2003,
2489,
4007,
1024,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
2009,
1998,
1013,
2030,
19933,
2009,
2104,
1996,
3408,
1997,
1996,
27004,
21358,
7512,
2080,
2236,
2270,
6105,
2004,
2405,
2011,
1996,
2489,
4007,
3192,
1010,
2593,
2544,
1017,
1997,
1996,
6105,
1010,
2030,
1006,
2012,
2115,
5724,
1007,
2151,
2101,
2544,
1012,
2023,
2565,
2003,
5500,
1999,
1996,
3246,
2008,
2009,
2097,
2022,
6179,
1010,
2021,
2302,
2151,
10943,
2100,
1025,
2302,
2130,
1996,
30524,
2156,
1996,
27004,
21358,
7512,
2080,
2236,
2270,
6105,
2005,
2062,
4751,
1012,
2017,
2323,
2031,
2363,
1037,
6100,
1997,
1996,
27004,
21358,
7512,
2080,
2236,
2270,
6105,
2247,
2007,
2023,
2565,
1012,
2065,
2025,
1010,
2156,
1026,
8299,
1024,
1013,
1013,
7479,
1012,
27004,
1012,
8917,
1013,
15943,
1013,
1028,
1012,
1008,
1013,
7427,
14246,
2140,
2595,
1012,
1060,
21293,
1012,
1060,
2102,
3619,
1012,
3916,
1025,
12324,
14246,
2140,
2595,
1012,
1008,
1025,
12324,
14246,
2140,
2595,
1012,
1060,
21293,
1012,
1008,
1025,
12324,
14246,
2140,
2595,
1012,
1060,
21293,
1012,
1060,
2102,
3619,
1012,
1008,
1025,
12324,
8917,
1012,
12022,
4183,
1012,
1008,
1025,
2270,
2465,
3916,
1035,
2009,
2213,
1035,
11968,
8043,
1035,
24529,
2102,
1063,
1030,
2077,
2270,
11675,
1999,
4183,
1006,
1007,
1063,
23292,
2102,
1012,
1999,
4183,
1006,
1007,
1025,
1065,
2797,
3916,
1035,
2009,
2213,
1035,
11968,
8043,
1035,
23292,
2102,
23292,
2102,
1027,
2047,
3916,
1035,
2009,
2213,
1035,
11968,
8043,
1035,
23292,
2102,
1006,
1007,
1025,
1030,
3231,
2270,
11675,
2035,
1006,
1007,
1063,
23292,
2102,
1012,
3231,
1035,
11968,
3366,
1006,
1000,
5371,
1024,
1037,
1012,
1052,
3070,
1064,
1037,
1064,
12456,
1027,
1038,
1064,
4957,
1027,
1039,
1000,
1010,
23292,
2102,
1012,
4654,
17299,
1006,
1000,
5371,
1024,
1037,
1012,
1052,
3070,
1000,
1010,
1000,
1037,
1000,
1010,
1000,
1038,
1000,
1010,
1000,
1039,
1000,
1007,
1007,
1025,
1065,
1030,
3231,
2270,
11675,
23746,
2140,
1035,
2069,
1006,
1007,
1063,
23292,
2102,
1012,
3231,
1035,
11968,
3366,
1006,
1000,
5371,
1024,
1037,
1012,
1052,
3070,
1000,
1010,
23292,
2102,
1012,
4654,
17299,
1006,
1000,
5371,
1024,
1037,
1012,
1052,
3070,
1000,
1010,
19701,
1010,
19701,
1010,
19701,
1007,
1007,
1025,
1065,
1030,
3231,
2270,
11675,
23746,
2140,
1035,
24471,
2140,
1035,
12359,
1006,
1007,
1063,
23292,
2102,
1012,
3231,
1035,
11968,
3366,
1006,
1000,
5371,
1024,
1037,
1003,
2654,
2497,
1003,
2756,
1012,
1052,
3070,
1000,
1010,
23292,
2102,
1012,
4654,
17299,
1006,
1000,
5371,
1024,
1037,
1006,
1038,
1007,
1012,
1052,
3070,
1000,
1007,
1007,
1025,
1065,
1013,
1013,
3800,
1024,
5047,
24471,
2140,
1011,
12359,
10071,
1025,
3058,
1024,
2297,
1011,
5890,
1011,
5890,
1030,
3231,
2270,
11675,
14408,
3258,
1035,
2069,
1006,
1007,
1063,
23292,
2102,
1012,
3231,
1035,
11968,
3366,
1006,
1000,
5371,
30523,
13339,
10943,
2100,
1997,
6432,
8010,
2030,
10516,
2005,
1037,
3327,
3800,
1012,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
13339,
10943,
2100,
1997,
6432,
8010,
2030,
10516,
2005,
1037,
3327,
3800,
1012,
30526
] |
#pragma once
#include <glkernel/noise.h>
#include <glkernel/glm_compatability.h>
namespace
{
// From // JAVA REFERENCE IMPLEMENTATION OF IMPROVED NOISE - COPYRIGHT 2002 KEN PERLIN. (http://mrl.nyu.edu/~perlin/noise/)
// and (Improving Noise - Perlin - 2002) - http://mrl.nyu.edu/~perlin/paper445.pdf
const std::vector<unsigned char> perm =
{
151, 160, 137, 91, 90, 15, 131, 13, 201, 95, 96, 53, 194, 233, 7, 225,
140, 36, 103, 30, 69, 142, 8, 99, 37, 240, 21, 10, 23, 190, 6, 148,
247, 120, 234, 75, 0, 26, 197, 62, 94, 252, 219, 203, 117, 35, 11, 32,
57, 177, 33, 88, 237, 149, 56, 87, 174, 20, 125, 136, 171, 168, 68, 175,
74, 165, 71, 134, 139, 48, 27, 166, 77, 146, 158, 231, 83, 111, 229, 122,
60, 211, 133, 230, 220, 105, 92, 41, 55, 46, 245, 40, 244, 102, 143, 54,
65, 25, 63, 161, 1, 216, 80, 73, 209, 76, 132, 187, 208, 89, 18, 169,
200, 196, 135, 130, 116, 188, 159, 86, 164, 100, 109, 198, 173, 186, 3, 64,
52, 217, 226, 250, 124, 123, 5, 202, 38, 147, 118, 126, 255, 82, 85, 212,
207, 206, 59, 227, 47, 16, 58, 17, 182, 189, 28, 42, 223, 183, 170, 213,
119, 248, 152, 2, 44, 154, 163, 70, 221, 153, 101, 155, 167, 43, 172, 9,
129, 22, 39, 253, 19, 98, 108, 110, 79, 113, 224, 232, 178, 185, 112, 104,
218, 246, 97, 228, 251, 34, 242, 193, 238, 210, 144, 12, 191, 179, 162, 241,
81, 51, 145, 235, 249, 14, 239, 107, 49, 192, 214, 31, 181, 199, 106, 157,
184, 84, 204, 176, 115, 121, 50, 45, 127, 4, 150, 254, 138, 236, 205, 93,
222, 114, 67, 29, 24, 72, 243, 141, 128, 195, 78, 66, 215, 61, 156, 180
};
const std::vector<glm::vec3> grad =
{
{ 1.0, 1.0, 0.0 }, { -1.0, 1.0, 0.0 }, { 1.0, -1.0, 0.0 }, { -1.0, -1.0, 0.0 },
{ 1.0, 0.0, 1.0 }, { -1.0, 0.0, 1.0 }, { 1.0, 0.0, -1.0 }, { -1.0, 0.0, -1.0 },
{ 0.0, 1.0, 1.0 }, { 0.0, -1.0, 1.0 }, { 0.0, 1.0, -1.0 }, { 0.0, -1.0, -1.0 },
{ 1.0, 1.0, 0.0 }, { -1.0, 1.0, 0.0 }, { 0.0, -1.0, 0.0 }, { 0.0, -1.0, -1.0 }
};
unsigned char hash3(
const unsigned int x
, const unsigned int y
, const unsigned int z
, const unsigned int r)
{
// the values of x, y and z will be in [0, 1 << r]
// the frequency mask is used for returning equal values
// for the minimum and the maximum input to ensure tileability
unsigned int frequencyMask = 1 << r;
assert(frequencyMask <= perm.size());
return perm[(perm[(perm[x % frequencyMask] + y) % frequencyMask] + z) % frequencyMask];
}
template<typename T, typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>
glm::tvec3<T, glm::highp> grad3(
const unsigned int x
, const unsigned int y
, const unsigned int z
, const unsigned int r)
{
const auto p = hash3(x, y, z, r);
return glm::tvec3<T, glm::highp>(grad[p % 16]);
}
template<typename T, typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>
glm::tvec3<T, glm::highp> grad3(
glm::tvec3<unsigned int, glm::highp> v
, const unsigned int r)
{
const auto p = hash3(v.x, v.y, v.z, r);
return glm::tvec3<T, glm::highp>(grad[p % 16]);
}
template<typename T, typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>
T smootherstep(const T t)
{
return t * t * t * (t * (t * 6 - 15) + 10);
}
template<typename T, typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>
T perlin3(
const T s
, const T t
, const T u
, const unsigned int r)
{
// scale according to frequency
const auto scaled_s = s * (1 << r);
const auto scaled_t = t * (1 << r);
const auto scaled_u = u * (1 << r);
const auto is = static_cast<unsigned int>(floor(scaled_s));
const auto it = static_cast<unsigned int>(floor(scaled_t));
const auto iu = static_cast<unsigned int>(floor(scaled_u));
const auto f = glm::fract(glm::tvec3<T, glm::highp>(scaled_s, scaled_t, scaled_u));
// range [-1;+1]
const auto aaa = glm::dot(grad3<T>(is + 0, it + 0, iu + 0, r), f);
const auto baa = glm::dot(grad3<T>(is + 1, it + 0, iu + 0, r), f - glm::tvec3<T, glm::highp>(1., 0., 0.));
const auto aba = glm::dot(grad3<T>(is + 0, it + 1, iu + 0, r), f - glm::tvec3<T, glm::highp>(0., 1., 0.));
const auto bba = glm::dot(grad3<T>(is + 1, it + 1, iu + 0, r), f - glm::tvec3<T, glm::highp>(1., 1., 0.));
const auto aab = glm::dot(grad3<T>(is + 0, it + 0, iu + 1, r), f - glm::tvec3<T, glm::highp>(0., 0., 1.));
const auto bab = glm::dot(grad3<T>(is + 1, it + 0, iu + 1, r), f - glm::tvec3<T, glm::highp>(1., 0., 1.));
const auto abb = glm::dot(grad3<T>(is + 0, it + 1, iu + 1, r), f - glm::tvec3<T, glm::highp>(0., 1., 1.));
const auto bbb = glm::dot(grad3<T>(is + 1, it + 1, iu + 1, r), f - glm::tvec3<T, glm::highp>(1., 1., 1.));
// interpolate noise values of the eight corners
const auto i = glm::mix(
glm::tvec4<T, glm::highp>(aaa, aab, aba, abb),
glm::tvec4<T, glm::highp>(baa, bab, bba, bbb),
smootherstep(f[0]));
const auto j = glm::mix(
glm::tvec2<T, glm::highp>(i[0], i[1]),
glm::tvec2<T, glm::highp>(i[2], i[3]),
smootherstep(f[1]));
return glm::mix(j[0], j[1], smootherstep(f[2]));
}
// adapted from example code by Stefan Gustavson (stegu@itn.liu.se)
// (http://webstaff.itn.liu.se/~stegu/simplexnoise/SimplexNoise.java)
template<typename T, typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>
T simplex3(
const T s
, const T t
, const T u
, const unsigned int r)
{
const T skew_constant = 1 / static_cast<T>(3);
const T unskew_constant = 1 / static_cast<T>(6);
// scale according to frequency
const glm::tvec3<T, glm::highp> pos = {s, t, u};
const glm::tvec3<T, glm::highp> scaled_pos = pos * static_cast<T>(1 << r);
// skew the input space to determine the simplex cell origin
const T skew_factor = (scaled_pos.x + scaled_pos.y + scaled_pos.z) * skew_constant;
const glm::tvec3<unsigned int, glm::highp> corner = glm::tvec3<unsigned int, glm::highp>(glm::floor(scaled_pos + skew_factor));
// unskew the cell origin back to (x,y,z) space
const T unskew_factor = (corner.x + corner.y + corner.z) * unskew_constant;
const glm::tvec3<T, glm::highp> v0 = scaled_pos + unskew_factor - static_cast<glm::tvec3<T, glm::highp>>(corner);
// for the 3D case, the simplex shape is a slightly irregular tetrahedron.
// determine corner offsets in skewed space for specific simplex
glm::tvec3<unsigned int, glm::highp> corner_offset1;
glm::tvec3<unsigned int, glm::highp> corner_offset2;
if (v0.x >= v0.y)
{
if (v0.y >= v0.z)
{
corner_offset1 = {1, 0, 0};
corner_offset2 = {1, 1, 0};
} // X Y Z order
else if (v0.x >= v0.z)
{
corner_offset1 = {1, 0, 0};
corner_offset2 = {1, 0, 1};
} // X Z Y order
else
{
corner_offset1 = {0, 0, 1};
corner_offset2 = {1, 0, 1};
} // Z X Y order
}
else
{ // v0.x < v0.y
if (v0.y < v0.z)
{
corner_offset1 = {0, 0, 1};
corner_offset2 = {0, 1, 1};
} // Z Y X order
else if (v0.x < v0.z)
{
corner_offset1 = {0, 1, 0};
corner_offset2 = {0, 1, 1};
} // Y Z X order
else
{
corner_offset1 = {0, 1, 0};
corner_offset2 = {1, 1, 0};
} // Y X Z order
}
// corner offsets in (x,y,z) space
const glm::tvec3<T, glm::highp> v1 = v0 + unskew_constant - static_cast<glm::tvec3<T, glm::highp>>(corner_offset1);
const glm::tvec3<T, glm::highp> v2 = v0 + 2 * unskew_constant - static_cast<glm::tvec3<T, glm::highp>>(corner_offset2);
const glm::tvec3<T, glm::highp> v3 = v0 + (3 * unskew_constant - 1);
// contribution factors
const T t0 = static_cast<T>(0.5) - glm::dot(v0, v0);
const T t1 = static_cast<T>(0.5) - glm::dot(v1, v1);
const T t2 = static_cast<T>(0.5) - glm::dot(v2, v2);
const T t3 = static_cast<T>(0.5) - glm::dot(v3, v3);
// Calculate the contribution from the four corners
const T n0 = (t0 < 0) ? 0 : (std::pow(t0, 4) * glm::dot(grad3<T>(corner, r), v0));
const T n1 = (t1 < 0) ? 0 : (std::pow(t1, 4) * glm::dot(grad3<T>(corner + corner_offset1, r), v1));
const T n2 = (t2 < 0) ? 0 : (std::pow(t2, 4) * glm::dot(grad3<T>(corner + corner_offset2, r), v2));
const T n3 = (t3 < 0) ? 0 : (std::pow(t3, 4) * glm::dot(grad3<T>(corner + 1u, r), v3));
// Add contributions from each corner to get the final noise value.
// The result is scaled to stay just inside [-1,1]
return 32 * (n0 + n1 + n2 + n3);
}
template<typename T, typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>
T get_octave_type_value(const glkernel::noise::OctaveType type
, const unsigned int octave
, const T noise_value
, const T octaved_noise)
{
switch (type)
{
case glkernel::noise::OctaveType::Standard:
return octave > 0 ? 0 : noise_value;
case glkernel::noise::OctaveType::Cloud:
return octaved_noise;
case glkernel::noise::OctaveType::CloudAbs:
return fabs(octaved_noise);
case glkernel::noise::OctaveType::Wood:
return octaved_noise * 8 - static_cast<int>(octaved_noise * 8);
case glkernel::noise::OctaveType::Paper:
return noise_value * noise_value * static_cast<T>(octaved_noise > 0 ? 1 : -1);
default:
return noise_value;
}
}
template<typename T, typename std::enable_if<std::is_floating_point<T>::value>::type* = nullptr>
T get_noise_type_value(const glkernel::noise::GradientNoiseType type
, const T x
, const T y
, const T z
, const unsigned int octave)
{
switch (type)
{
case glkernel::noise::GradientNoiseType::Perlin:
return perlin3(x, y, z, octave);
case glkernel::noise::GradientNoiseType::Simplex:
return simplex3(x, y, z, octave);
default:
return 0;
}
}
} // namespace
namespace glkernel
{
namespace noise
{
template <typename T>
class uniform_operator
{
public:
template<typename std::enable_if<std::is_floating_point<T>::value>::type * = nullptr>
uniform_operator(size_t size, glm::length_t
, T range_min, T range_max);
template<typename V, typename std::enable_if<std::is_floating_point<typename V::value_type>::value>::type * = nullptr>
uniform_operator(size_t size, glm::length_t coefficient
, const V & range_min, const V & range_max);
T operator()(const size_t index);
protected:
std::mt19937_64 m_generator;
std::uniform_real_distribution<T> m_distribute;
};
template<typename T>
template<typename std::enable_if<std::is_floating_point<T>::value>::type *>
uniform_operator<T>::uniform_operator(const size_t, const glm::length_t
, const T range_min, const T range_max)
: m_generator{ std::random_device{ }() }
, m_distribute{ range_min, range_max }
{
}
template <typename T>
template<typename V, typename std::enable_if<std::is_floating_point<typename V::value_type>::value>::type *>
uniform_operator<T>::uniform_operator(const size_t size, const glm::length_t coefficient
, const V & range_min, const V & range_max)
: uniform_operator{ size, coefficient, range_min[coefficient], range_max[coefficient] }
{
}
template<typename T>
T uniform_operator<T>::operator()(const size_t)
{
return m_distribute(m_generator);
}
template<typename T, typename std::enable_if<std::is_floating_point<T>::value>::type *>
void uniform(tkernel<T> & kernel, const T range_min, const T range_max)
{
kernel.template for_each<uniform_operator<T>>(range_min, range_max);
}
template<typename V, typename std::enable_if<std::is_floating_point<typename V::value_type>::value>::type *>
void uniform(tkernel<V> & kernel, const typename V::value_type range_min, const typename V::value_type range_max)
{
kernel.template for_each<uniform_operator<typename V::value_type>>(range_min, range_max);
}
template <typename V, typename std::enable_if<std::is_floating_point<typename V::value_type>::value>::type * = nullptr>
void uniform(tkernel<V> & kernel, const V & range_min, const V & range_max)
{
kernel.template for_each<uniform_operator<typename V::value_type>>(range_min, range_max);
}
template <typename T>
class normal_operator
{
public:
template <typename std::enable_if<std::is_floating_point<T>::value>::type * = nullptr>
normal_operator(size_t size, glm::length_t
, T mean, T stddev);
template <typename V, typename std::enable_if<std::is_floating_point<typename V::value_type>::value>::type * = nullptr>
normal_operator(size_t size, glm::length_t coefficient
, const V & mean, const V & stddev);
T operator()(const size_t index);
protected:
std::mt19937_64 m_generator;
std::uniform_real_distribution<T> m_distribute;
};
template <typename T>
template <typename std::enable_if<std::is_floating_point<T>::value>::type *>
normal_operator<T>::normal_operator(const size_t, const glm::length_t
, const T mean, const T stddev)
: m_generator{ std::random_device{}() }
, m_distribute{ mean, stddev }
{
}
template <typename T>
template <typename V, typename std::enable_if<std::is_floating_point<typename V::value_type>::value>::type *>
normal_operator<T>::normal_operator(const size_t size, const glm::length_t coefficient
, const V & mean, const V & stddev)
: normal_operator{ size, coefficient, mean[coefficient], stddev[coefficient] }
{
}
template<typename T>
T normal_operator<T>::operator()(const size_t)
{
return m_distribute(m_generator);
}
template<typename T, typename std::enable_if<std::is_floating_point<T>::value>::type *>
void normal(tkernel<T> & kernel, const T mean, const T stddev)
{
kernel.template for_each<normal_operator<T>>(mean, stddev);
}
template <typename V, typename std::enable_if<std::is_floating_point<typename V::value_type>::value>::type * = nullptr>
void normal(tkernel<V> & kernel, const typename V::value_type mean, const typename V::value_type stddev)
{
kernel.template for_each<normal_operator<typename V::value_type>>(mean, stddev);
}
template <typename V, typename std::enable_if<std::is_floating_point<typename V::value_type>::value>::type * = nullptr>
void normal(tkernel<V> & kernel, const V & mean, const V & stddev)
{
kernel.template for_each<normal_operator<typename V::value_type>>(mean, stddev);
}
template<typename T, typename std::enable_if<std::is_floating_point<T>::value>::type *>
void gradient(tkernel<T> & kernel
, const GradientNoiseType noise_type
, const OctaveType octave_type
, const unsigned int start_frequency
, const unsigned int octaves)
{
if (kernel.size() < 1)
return;
std::vector<T> fo(octaves);
for (unsigned int o = 0; o < octaves; ++o)
{
fo[o] = static_cast<T>(1.0 / (1 << o));
}
#pragma omp parallel for
for (long long i = 0; i < static_cast<long long>(kernel.size()); ++i)
{
const auto location = static_cast<glm::tvec3<T, glm::highp>>(kernel.position(i));
const auto x = location.x / kernel.width();
const auto y = location.y / kernel.height();
const auto z = location.z / kernel.depth();
// collect noise values over multiple octaves
T p = 0.5;
for (unsigned int o = 0; o < octaves; ++o)
{
const T po = get_noise_type_value(noise_type, x, y, z, o + start_frequency);
const T pf = fo[o] * po;
p += get_octave_type_value(octave_type, o, po, pf);
}
kernel[i] = p;
}
}
} // namespace noise
} // namespace glkernel
|
cginternals/glkernel
|
source/glkernel/include/glkernel/noise.hpp
|
C++
|
mit
| 15,839
|
[
30522,
1001,
10975,
8490,
2863,
2320,
1001,
2421,
1026,
1043,
28143,
12119,
2140,
1013,
5005,
1012,
1044,
1028,
1001,
2421,
1026,
1043,
28143,
12119,
2140,
1013,
1043,
13728,
1035,
4012,
4502,
2696,
8553,
1012,
1044,
1028,
3415,
15327,
1063,
1013,
1013,
2013,
1013,
1013,
9262,
4431,
7375,
1997,
5301,
5005,
1011,
9385,
2526,
6358,
2566,
4115,
1012,
1006,
8299,
1024,
1013,
1013,
2720,
2140,
1012,
27935,
1012,
3968,
2226,
1013,
1066,
2566,
4115,
1013,
5005,
1013,
1007,
1013,
1013,
1998,
1006,
9229,
5005,
1011,
2566,
4115,
1011,
2526,
1007,
1011,
8299,
1024,
1013,
1013,
2720,
2140,
1012,
27935,
1012,
3968,
2226,
1013,
1066,
2566,
4115,
1013,
3259,
22932,
2629,
1012,
11135,
9530,
3367,
2358,
2094,
1024,
1024,
9207,
1026,
27121,
25869,
1028,
2566,
2213,
1027,
1063,
16528,
1010,
8148,
1010,
14989,
1010,
6205,
1010,
3938,
1010,
2321,
1010,
14677,
1010,
2410,
1010,
16345,
1010,
5345,
1010,
5986,
1010,
5187,
1010,
19955,
1010,
22115,
1010,
1021,
1010,
14993,
1010,
8574,
1010,
4029,
1010,
9800,
1010,
2382,
1010,
6353,
1010,
16087,
1010,
1022,
1010,
5585,
1010,
4261,
1010,
11212,
1010,
2538,
1010,
2184,
1010,
2603,
1010,
11827,
1010,
1020,
1010,
16459,
1010,
23380,
1010,
6036,
1010,
22018,
1010,
4293,
1010,
1014,
1010,
2656,
1010,
19975,
1010,
5786,
1010,
6365,
1010,
22898,
1010,
20636,
1010,
18540,
1010,
12567,
1010,
3486,
1010,
2340,
1010,
3590,
1010,
5401,
1010,
18118,
1010,
3943,
1010,
6070,
1010,
23297,
1010,
17332,
1010,
5179,
1010,
6584,
1010,
19492,
1010,
2322,
1010,
8732,
1010,
15407,
1010,
18225,
1010,
16923,
1010,
6273,
1010,
12862,
1010,
6356,
1010,
13913,
1010,
6390,
1010,
15170,
30524,
1010,
4583,
1010,
4805,
1010,
21005,
1010,
2871,
1010,
24194,
1010,
9402,
1010,
16065,
1010,
5139,
1010,
3515,
1010,
2423,
1010,
6191,
1010,
17365,
1010,
1015,
1010,
20294,
1010,
3770,
1010,
6421,
1010,
19348,
1010,
6146,
1010,
14078,
1010,
19446,
1010,
18512,
1010,
6486,
1010,
2324,
1010,
18582,
1010,
3263,
1010,
20035,
1010,
11502,
1010,
7558,
1010,
12904,
1010,
19121,
1010,
18914,
1010,
6564,
1010,
17943,
1010,
2531,
1010,
11518,
1010,
20003,
1010,
19410,
1010,
19609,
1010,
1017,
1010,
4185,
1010,
4720,
1010,
20335,
1010,
21035,
1010,
5539,
1010,
13412,
1010,
13138,
1010,
1019,
1010,
16798,
1010,
4229,
1010,
16471,
1010,
12963,
1010,
14010,
1010,
20637,
1010,
6445,
1010,
5594,
1010,
18164,
1010,
19843,
1010,
18744,
1010,
5354,
1010,
21489,
1010,
4700,
1010,
2385,
1010,
5388,
1010,
2459,
1010,
17691,
1010,
20500,
1010,
2654,
1010,
4413,
1010,
20802,
1010,
18677,
1010,
10894,
1010,
19883,
1010,
13285,
1010,
24568,
1010,
15017,
1010,
1016,
1010,
4008,
1010,
16666,
1010,
17867,
1010,
3963,
1010,
19594,
1010,
16710,
1010,
7886,
1010,
14168,
1010,
16785,
1010,
4724,
1010,
18253,
1010,
1023,
1010,
14378,
1010,
2570,
1010,
4464,
1010,
23254,
1010,
2539,
1010,
5818,
1010,
10715,
1010,
7287,
1010,
6535,
1010,
12104,
1010,
19711,
30523,
1010,
16621,
1010,
4466,
1010,
2676,
1010,
18610,
1010,
6255,
1010,
16333,
1010,
17696,
1010,
20304,
1010,
6640,
1010,
11118,
1010,
22777,
1010,
13092,
1010,
3438,
1010,
19235,
1010,
14506,
1010,
11816,
1010,
10545,
1010,
8746,
1010,
6227,
1010,
4601,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1010,
16621,
1010,
4466,
1010,
2676,
1010,
18610,
1010,
6255,
1010,
16333,
1010,
17696,
1010,
20304,
1010,
6640,
1010,
11118,
1010,
22777,
1010,
13092,
1010,
3438,
1010,
19235,
1010,
14506,
1010,
11816,
1010,
10545,
1010,
8746,
1010,
6227,
1010,
4601,
30526
] |
/**
* before : before(el, newEl)
* Inserts a new element `newEl` just before `el`.
*
* var before = require('dom101/before');
* var newNode = document.createElement('div');
* var button = document.querySelector('#submit');
*
* before(button, newNode);
*/
function before (el, newEl) {
if (typeof newEl === 'string') {
return el.insertAdjacentHTML('beforebegin', newEl)
} else {
return el.parentNode.insertBefore(newEl, el)
}
}
module.exports = before
|
rstacruz/dom101
|
before.js
|
JavaScript
|
mit
| 492
|
[
30522,
1013,
1008,
1008,
1008,
2077,
1024,
2077,
1006,
3449,
1010,
2047,
2884,
1007,
1008,
19274,
2015,
1037,
2047,
5783,
1036,
2047,
2884,
1036,
2074,
2077,
1036,
3449,
1036,
1012,
1008,
1008,
13075,
2077,
1027,
5478,
1006,
1005,
14383,
10790,
2487,
1013,
2077,
1005,
1007,
1025,
1008,
13075,
2047,
3630,
3207,
1027,
6254,
1012,
3443,
12260,
3672,
1006,
1005,
4487,
2615,
1005,
1007,
1025,
1008,
13075,
6462,
1027,
6254,
1012,
23032,
11246,
22471,
2953,
1006,
1005,
1001,
12040,
1005,
1007,
1025,
1008,
1008,
2077,
1006,
6462,
1010,
2047,
3630,
3207,
1007,
1025,
1008,
1013,
3853,
2077,
1006,
3449,
1010,
2047,
2884,
1007,
1063,
2065,
1006,
2828,
11253,
2047,
2884,
1027,
1027,
1027,
1005,
5164,
1005,
1007,
1063,
2709,
3449,
1012,
19274,
4215,
3900,
13013,
11039,
19968,
1006,
1005,
2077,
4783,
11528,
1005,
1010,
2047,
2884,
1007,
1065,
2842,
1063,
2709,
3449,
1012,
6687,
3630,
3207,
1012,
19274,
4783,
29278,
2063,
1006,
2047,
2884,
1010,
3449,
1007,
1065,
1065,
11336,
1012,
14338,
1027,
2077,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
# http://tech.thereq.com/post/13437077944/unit-testing-your-rails-3-1-caching-with-rspec
module ExampleHelpers
module CachingTestHelpers
module ResponseHelper
def action_cached?
request.path.action_cached?
end
def page_cached?
request.path.page_cached?
end
def private_page_cached?
request.path.private_page_cached?
end
end
ActionDispatch::TestResponse.send(:include, ResponseHelper)
end
end
class String
def action_cached?
Rails.cache.exist?("views/www.example.com#{self}")
end
def private_page_cached?
File.exists? private_page_cache_path(self)
end
end
RSpec.configure do |config|
config.include ExampleHelpers::CachingTestHelpers, :type => :request
end
|
pleary/inaturalist
|
spec/helpers/example_helpers.rb
|
Ruby
|
mit
| 759
|
[
30522,
1001,
8299,
1024,
1013,
1013,
6627,
1012,
2045,
4160,
1012,
4012,
1013,
2695,
1013,
15170,
24434,
2692,
2581,
2581,
2683,
22932,
1013,
3131,
1011,
5604,
1011,
2115,
1011,
15168,
1011,
1017,
1011,
1015,
1011,
6187,
8450,
1011,
2007,
1011,
12667,
5051,
2278,
11336,
2742,
16001,
7347,
11336,
6187,
8450,
22199,
16001,
7347,
11336,
3433,
16001,
4842,
13366,
2895,
1035,
17053,
2094,
1029,
5227,
1012,
4130,
1012,
2895,
1035,
17053,
2094,
1029,
2203,
13366,
3931,
1035,
17053,
2094,
1029,
5227,
1012,
4130,
1012,
3931,
1035,
17053,
2094,
1029,
2203,
13366,
2797,
1035,
3931,
1035,
17053,
2094,
1029,
5227,
1012,
4130,
1012,
2797,
1035,
3931,
1035,
17053,
2094,
1029,
2203,
2203,
2895,
10521,
4502,
10649,
1024,
1024,
3231,
6072,
26029,
3366,
1012,
4604,
1006,
1024,
2421,
1010,
3433,
16001,
4842,
1007,
2203,
2203,
2465,
5164,
13366,
2895,
1035,
17053,
2094,
1029,
15168,
1012,
17053,
1012,
4839,
1029,
1006,
1000,
5328,
1013,
7479,
1012,
2742,
1012,
4012,
1001,
1063,
2969,
1065,
1000,
1007,
2203,
13366,
2797,
1035,
3931,
1035,
17053,
2094,
1029,
5371,
1012,
6526,
1029,
2797,
1035,
3931,
1035,
17053,
1035,
4130,
1006,
2969,
30524,
2290,
1012,
2421,
2742,
16001,
7347,
1024,
1024,
6187,
8450,
22199,
16001,
7347,
1010,
1024,
2828,
1027,
1028,
1024,
5227,
2203,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1007,
2203,
2203,
12667,
5051,
2278,
1012,
9530,
8873,
27390,
2063,
2079,
1064,
9530,
8873,
2290,
1064,
9530,
8873,
30526
] |
/*!
* Vitality v2.0.0 (http://themes.startbootstrap.com/vitality-v2.0.0)
* Copyright 2013-2017 Start Bootstrap
* Purchase a license to use this theme at (https://wrapbootstrap.com)
*/
/*!
* Vitality v2.0.0 (http://themes.startbootstrap.com/vitality-v2.0.0)
* Copyright 2013-2017 Start Bootstrap
* Purchase a license to use this theme at (https://wrapbootstrap.com)
*/
// Load WOW.js on non-touch devices
var isPhoneDevice = "ontouchstart" in document.documentElement;
$(document).ready(function() {
if (isPhoneDevice) {
//mobile
} else {
//desktop
// Initialize WOW.js
wow = new WOW({
offset: 50
})
wow.init();
}
});
(function($) {
"use strict"; // Start of use strict
// Collapse the navbar when page is scrolled
$(window).scroll(function() {
if ($("#mainNav").offset().top > 100) {
$("#mainNav").addClass("navbar-shrink");
} else {
$("#mainNav").removeClass("navbar-shrink");
}
});
// Activate scrollspy to add active class to navbar items on scroll
$('body').scrollspy({
target: '#mainNav',
offset: 68
});
// Smooth Scrolling: Smooth scrolls to an ID on the current page
// To use this feature, add a link on your page that links to an ID, and add the .page-scroll class to the link itself. See the docs for more details.
$('a.page-scroll').bind('click', function(event) {
var $anchor = $(this);
$('html, body').stop().animate({
scrollTop: ($($anchor.attr('href')).offset().top - 68)
}, 1250, 'easeInOutExpo');
event.preventDefault();
});
// Closes responsive menu when a link is clicked
$('.navbar-collapse>ul>li>a, .navbar-brand').click(function() {
$('.navbar-collapse').collapse('hide');
});
// Activates floating label headings for the contact form
$("body").on("input propertychange", ".floating-label-form-group", function(e) {
$(this).toggleClass("floating-label-form-group-with-value", !!$(e.target).val());
}).on("focus", ".floating-label-form-group", function() {
$(this).addClass("floating-label-form-group-with-focus");
}).on("blur", ".floating-label-form-group", function() {
$(this).removeClass("floating-label-form-group-with-focus");
});
// Owl Carousel Settings
$(".team-carousel").owlCarousel({
items: 3,
navigation: true,
pagination: false,
navigationText: [
"<i class='fa fa-angle-left'></i>",
"<i class='fa fa-angle-right'></i>"
],
});
$(".portfolio-carousel").owlCarousel({
singleItem: true,
navigation: true,
pagination: false,
navigationText: [
"<i class='fa fa-angle-left'></i>",
"<i class='fa fa-angle-right'></i>"
],
autoHeight: true,
mouseDrag: false,
touchDrag: false,
transitionStyle: "fadeUp"
});
$(".testimonials-carousel, .mockup-carousel").owlCarousel({
singleItem: true,
navigation: true,
pagination: true,
autoHeight: true,
navigationText: [
"<i class='fa fa-angle-left'></i>",
"<i class='fa fa-angle-right'></i>"
],
transitionStyle: "backSlide"
});
$(".portfolio-gallery").owlCarousel({
items: 3,
});
// Magnific Popup jQuery Lightbox Gallery Settings
$('.gallery-link').magnificPopup({
type: 'image',
gallery: {
enabled: true
},
image: {
titleSrc: 'title'
}
});
// Magnific Popup Settings
$('.mix').magnificPopup({
type: 'image',
image: {
titleSrc: 'title'
}
});
// Vide - Video Background Settings
$('header.video').vide({
mp4: "mp4/camera.mp4",
poster: "img/agency/backgrounds/bg-mobile-fallback.jpg"
}, {
posterType: 'jpg'
});
})(jQuery); // End of use strict
|
EricRibeiro/DonactionTIS
|
donaction-enterprise/scripts/source/agency/vitality.js
|
JavaScript
|
mit
| 4,078
|
[
30522,
1013,
1008,
999,
1008,
8995,
3012,
1058,
2475,
1012,
1014,
1012,
1014,
1006,
8299,
1024,
1013,
1013,
6991,
1012,
2707,
27927,
20528,
2361,
1012,
4012,
1013,
8995,
3012,
1011,
1058,
2475,
1012,
1014,
1012,
1014,
1007,
1008,
9385,
2286,
1011,
2418,
2707,
6879,
6494,
2361,
1008,
5309,
1037,
6105,
2000,
2224,
2023,
4323,
2012,
1006,
16770,
1024,
1013,
1013,
10236,
27927,
20528,
2361,
1012,
4012,
1007,
1008,
1013,
1013,
1008,
999,
1008,
8995,
3012,
1058,
2475,
1012,
1014,
1012,
1014,
1006,
8299,
1024,
1013,
1013,
6991,
1012,
2707,
27927,
20528,
2361,
1012,
4012,
1013,
8995,
3012,
1011,
1058,
2475,
1012,
1014,
1012,
1014,
1007,
1008,
9385,
2286,
1011,
2418,
2707,
6879,
6494,
2361,
30524,
1008,
1013,
1013,
1013,
7170,
10166,
1012,
1046,
2015,
2006,
2512,
1011,
3543,
5733,
13075,
2003,
9864,
24844,
6610,
1027,
1000,
3031,
10875,
14117,
2102,
1000,
1999,
6254,
1012,
6254,
12260,
3672,
1025,
1002,
1006,
6254,
1007,
1012,
3201,
1006,
3853,
1006,
1007,
1063,
2065,
1006,
2003,
9864,
24844,
6610,
1007,
1063,
1013,
1013,
4684,
1065,
2842,
1063,
1013,
1013,
15363,
1013,
1013,
3988,
4697,
10166,
1012,
1046,
2015,
10166,
1027,
2047,
10166,
1006,
1063,
16396,
1024,
2753,
1065,
1007,
10166,
1012,
1999,
4183,
1006,
1007,
1025,
1065,
1065,
1007,
1025,
1006,
3853,
1006,
1002,
1007,
1063,
1000,
2224,
9384,
1000,
1025,
1013,
1013,
2707,
1997,
2224,
9384,
1013,
1013,
7859,
1996,
6583,
26493,
2906,
2043,
3931,
2003,
17186,
2098,
1002,
1006,
3332,
1007,
1012,
17186,
1006,
3853,
1006,
1007,
1063,
2065,
1006,
1002,
1006,
1000,
1001,
2364,
2532,
2615,
1000,
1007,
1012,
16396,
1006,
1007,
1012,
2327,
1028,
2531,
1007,
1063,
1002,
1006,
1000,
1001,
2364,
2532,
2615,
1000,
1007,
1012,
5587,
26266,
1006,
1000,
6583,
26493,
2906,
1011,
22802,
1000,
1007,
1025,
1065,
2842,
1063,
1002,
1006,
1000,
1001,
2364,
2532,
2615,
1000,
1007,
1012,
6366,
26266,
1006,
1000,
6583,
26493,
2906,
1011,
22802,
1000,
1007,
1025,
1065,
1065,
1007,
1025,
1013,
1013,
20544,
23074,
7685,
2000,
5587,
3161,
2465,
2000,
6583,
26493,
2906,
5167,
2006,
17186,
1002,
1006,
1005,
2303,
1005,
1007,
1012,
23074,
7685,
1006,
1063,
4539,
1024,
1005,
1001,
2364,
2532,
2615,
1005,
1010,
16396,
1024,
6273,
1065,
1007,
1025,
1013,
1013,
5744,
28903,
1024,
5744,
23074,
2000,
2019,
8909,
2006,
1996,
2783,
3931,
1013,
1013,
2000,
2224,
2023,
3444,
1010,
5587,
1037,
4957,
2006,
2115,
3931,
2008,
6971,
2000,
2019,
8909,
1010,
1998,
5587,
1996,
1012,
3931,
1011,
17186,
2465,
2000,
1996,
4957,
2993,
1012,
2156,
1996,
9986,
2015,
2005,
2062,
4751,
1012,
1002,
1006,
1005,
1037,
1012,
3931,
1011,
17186,
1005,
1007,
1012,
14187,
1006,
1005,
11562,
1005,
1010,
3853,
1006,
2724,
1007,
1063,
13075,
1002,
8133,
1027,
1002,
1006,
2023,
1007,
1025,
1002,
1006,
1005,
16129,
1010,
2303,
1005,
1007,
1012,
2644,
1006,
1007,
1012,
2019,
21499,
1006,
1063,
17186,
14399,
1024,
1006,
1002,
1006,
1002,
8133,
1012,
2012,
16344,
1006,
1005,
17850,
12879,
1005,
1007,
30523,
1008,
5309,
1037,
6105,
2000,
2224,
2023,
4323,
2012,
1006,
16770,
1024,
1013,
1013,
10236,
27927,
20528,
2361,
1012,
4012,
1007,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1008,
5309,
1037,
6105,
2000,
2224,
2023,
4323,
2012,
1006,
16770,
1024,
1013,
1013,
10236,
27927,
20528,
2361,
1012,
4012,
1007,
30526
] |
/**
******************************************************************************
* @file USB_Host/DynamicSwitch_Standalon/Inc/lcd_log_conf.h
* @author MCD Application Team
* @version V1.0.3
* @date 29-January-2016
* @brief LCD Log configuration file.
******************************************************************************
* @attention
*
* <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2>
*
* Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
* 3. Neither the name of STMicroelectronics nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
******************************************************************************
*/
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef __LCD_LOG_CONF_H
#define __LCD_LOG_CONF_H
/* Includes ------------------------------------------------------------------*/
#include "stm32469i_discovery_lcd.h"
#include "stm32469i_discovery.h"
#include <stdio.h>
/* Exported types ------------------------------------------------------------*/
/* Exported constants --------------------------------------------------------*/
/* Define the LCD default text color */
#define LCD_LOG_DEFAULT_COLOR LCD_COLOR_WHITE
/* Comment the line below to disable the scroll back and forward features */
#define LCD_SCROLL_ENABLED 1
#define LCD_LOG_HEADER_FONT Font16
#define LCD_LOG_FOOTER_FONT Font16
#define LCD_LOG_TEXT_FONT Font16
/* Define the LCD LOG Color */
#define LCD_LOG_BACKGROUND_COLOR LCD_COLOR_BLACK
#define LCD_LOG_TEXT_COLOR LCD_COLOR_WHITE
#define LCD_LOG_SOLID_BACKGROUND_COLOR LCD_COLOR_BLUE
#define LCD_LOG_SOLID_TEXT_COLOR LCD_COLOR_WHITE
/* Define the cache depth */
#define CACHE_SIZE 100
#define YWINDOW_SIZE 10
#if (YWINDOW_SIZE > 14)
#error "Wrong YWINDOW SIZE"
#endif
/* Redirect the printf to the LCD */
#ifdef __GNUC__
/* With GCC/RAISONANCE, small printf (option LD Linker->Libraries->Small printf
set to 'Yes') calls __io_putchar() */
#define LCD_LOG_PUTCHAR int __io_putchar(int ch)
#else
#define LCD_LOG_PUTCHAR int fputc(int ch, FILE *f)
#endif /* __GNUC__ */
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
#endif /* __LCD_LOG_CONF_H */
/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
|
mariobarbareschi/stm32-compiler-docker
|
STM32Cube_FW_F4_V1.11.0/Projects/STM32469I-Discovery/Applications/USB_Host/DynamicSwitch_Standalone/Inc/lcd_log_conf.h
|
C
|
agpl-3.0
| 4,076
|
[
30522,
1013,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1030,
5371,
18833,
1035,
3677,
1013,
10949,
9148,
10649,
1035,
3233,
23067,
2078,
1013,
4297,
1013,
27662,
1035,
8833,
1035,
9530,
2546,
1012,
1044,
1008,
1030,
3166,
11338,
2094,
4646,
2136,
1008,
1030,
2544,
1058,
2487,
1012,
1014,
1012,
1017,
1008,
1030,
3058,
2756,
1011,
2254,
1011,
2355,
1008,
1030,
4766,
27662,
8833,
9563,
5371,
1012,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1030,
3086,
1008,
1008,
1026,
1044,
2475,
1028,
1026,
2415,
1028,
1004,
6100,
1025,
9385,
1006,
1039,
1007,
2355,
2358,
7712,
3217,
12260,
6593,
4948,
6558,
1026,
1013,
2415,
1028,
1026,
1013,
1044,
2475,
1028,
1008,
1008,
25707,
1998,
2224,
1999,
3120,
1998,
12441,
3596,
1010,
2007,
2030,
2302,
14080,
1010,
1008,
2024,
7936,
3024,
2008,
1996,
2206,
3785,
2024,
2777,
1024,
1008,
1015,
1012,
25707,
2015,
1997,
3120,
3642,
2442,
9279,
1996,
2682,
9385,
5060,
1010,
1008,
2023,
2862,
1997,
3785,
1998,
1996,
2206,
5860,
19771,
5017,
1012,
1008,
30524,
1999,
1996,
12653,
1008,
1998,
1013,
2030,
2060,
4475,
3024,
2007,
1996,
4353,
1012,
1008,
1017,
1012,
4445,
1996,
2171,
1997,
2358,
7712,
3217,
12260,
6593,
4948,
6558,
4496,
1996,
3415,
1997,
2049,
16884,
1008,
2089,
2022,
2109,
2000,
2203,
5668,
2063,
2030,
5326,
3688,
5173,
2013,
2023,
4007,
1008,
2302,
3563,
3188,
2517,
6656,
1012,
1008,
1008,
2023,
4007,
2003,
3024,
2011,
1996,
9385,
13304,
1998,
16884,
1000,
2004,
2003,
1000,
1008,
1998,
2151,
4671,
2030,
13339,
10943,
3111,
1010,
2164,
1010,
2021,
2025,
3132,
2000,
1010,
1996,
1008,
13339,
10943,
3111,
1997,
6432,
8010,
1998,
10516,
2005,
1037,
3327,
3800,
2024,
1008,
5860,
19771,
7583,
1012,
1999,
2053,
2724,
4618,
1996,
9385,
9111,
2030,
16884,
2022,
20090,
1008,
2005,
2151,
3622,
1010,
14958,
1010,
5043,
2389,
1010,
2569,
1010,
27792,
1010,
2030,
9530,
3366,
15417,
4818,
1008,
12394,
1006,
2164,
1010,
2021,
2025,
3132,
2000,
1010,
21423,
1997,
7681,
5350,
2030,
1008,
2578,
1025,
3279,
1997,
2224,
1010,
2951,
1010,
2030,
11372,
1025,
2030,
30523,
1016,
1012,
25707,
2015,
1999,
12441,
2433,
2442,
21376,
1996,
2682,
9385,
5060,
1010,
1008,
2023,
2862,
1997,
3785,
1998,
1996,
2206,
5860,
19771,
5017,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1016,
1012,
25707,
2015,
1999,
12441,
2433,
2442,
21376,
1996,
2682,
9385,
5060,
1010,
1008,
2023,
2862,
1997,
3785,
1998,
1996,
2206,
5860,
19771,
5017,
30526
] |
/**
* @author Richard Davey <rich@photonstorm.com>
* @copyright 2022 Photon Storm Ltd.
* @license {@link https://opensource.org/licenses/MIT|MIT License}
*/
/**
* Returns the nearest power of 2 to the given `value`.
*
* @function Phaser.Math.Pow2.GetNext
* @since 3.0.0
*
* @param {number} value - The value.
*
* @return {number} The nearest power of 2 to `value`.
*/
var GetPowerOfTwo = function (value)
{
var index = Math.log(value) / 0.6931471805599453;
return (1 << Math.ceil(index));
};
module.exports = GetPowerOfTwo;
|
photonstorm/phaser
|
src/math/pow2/GetPowerOfTwo.js
|
JavaScript
|
mit
| 562
|
[
30522,
1013,
1008,
1008,
1008,
1030,
3166,
2957,
20436,
1026,
4138,
1030,
26383,
19718,
1012,
4012,
1028,
1008,
1030,
9385,
16798,
2475,
26383,
4040,
5183,
1012,
1008,
1030,
6105,
1063,
1030,
4957,
16770,
1024,
1013,
1013,
7480,
8162,
3401,
1012,
8917,
1013,
15943,
1013,
10210,
1064,
10210,
6105,
1065,
1008,
1013,
1013,
1008,
1008,
1008,
5651,
1996,
7205,
2373,
1997,
1016,
2000,
1996,
2445,
1036,
3643,
1036,
1012,
1008,
1008,
1030,
3853,
4403,
2099,
1012,
8785,
1012,
23776,
2475,
1012,
2131,
2638,
18413,
1008,
1030,
2144,
1017,
1012,
1014,
1012,
1014,
1008,
1008,
1030,
11498,
2213,
1063,
2193,
1065,
3643,
1011,
1996,
3643,
1012,
1008,
1008,
1030,
2709,
1063,
2193,
1065,
1996,
7205,
2373,
1997,
1016,
2000,
1036,
3643,
1036,
1012,
1008,
1013,
13075,
2131,
11452,
15794,
12155,
1027,
3853,
1006,
3643,
1007,
1063,
13075,
5950,
1027,
8785,
1012,
8833,
1006,
3643,
1007,
1013,
1014,
1012,
6353,
21486,
22610,
15136,
2692,
24087,
2683,
2683,
19961,
2509,
1025,
2709,
1006,
1015,
1026,
1026,
8785,
1012,
8292,
4014,
1006,
5950,
1007,
1007,
1025,
1065,
1025,
11336,
1012,
14338,
1027,
2131,
11452,
15794,
12155,
1025,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
30526
] |
//#! Ignore-License
/*
* Copyright 2007 - 2009 Lars Heuer (heuer[at]semagia.com)
*
* Licensed 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.
*/
package net.ontopia.topicmaps.utils.jtm;
/**
* INTERNAL: Known token types for JTM 1.0.
*/
final class JSONToken {
/**
* Token types.
*/
public static final int
START_OBJECT = 0,
END_OBJECT = 1,
START_ARRAY = 2,
END_ARRAY = 4,
VALUE_NULL = 5,
KW_VERSION = 6,
KW_ITEM_TYPE = 7,
KW_TOPICS = 8,
KW_ASSOCIATIONS = 9,
KW_ROLES = 10,
KW_OCCURRENCES = 11,
KW_NAMES = 12,
KW_VARIANTS = 13,
KW_SCOPE = 14,
KW_TYPE = 15,
KW_PLAYER = 16,
KW_VALUE = 17,
KW_DATATYPE = 18,
KW_REIFIER = 19,
KW_SIDS = 20,
KW_SLOS = 21,
KW_IIDS = 22,
KW_PARENT = 23,
VALUE_STRING = 24,
COLON = 25,
COMMA = 26
;
/**
* Returns a string representation of the provided token.
*
* @param type The token type.
* @return A string representing the token.
*/
public static String nameOf(final int type) {
switch (type) {
case START_OBJECT: return "{";
case END_OBJECT: return "}";
case START_ARRAY: return "[";
case END_ARRAY: return "]";
case COMMA: return ",";
case COLON: return ":";
case VALUE_NULL: return "null";
case VALUE_STRING: return "<string>";
case KW_VERSION: return "version";
case KW_ITEM_TYPE: return "item_type";
case KW_TOPICS: return "topics";
case KW_ASSOCIATIONS: return "associations";
case KW_ROLES: return "roles";
case KW_OCCURRENCES: return "occurrences";
case KW_NAMES: return "names";
case KW_VARIANTS: return "variants";
case KW_SCOPE: return "scope";
case KW_TYPE: return "type";
case KW_PLAYER: return "player";
case KW_VALUE: return "value";
case KW_DATATYPE: return "datatype";
case KW_REIFIER: return "reifier";
case KW_SIDS: return "subject_identifiers";
case KW_SLOS: return "subject_locators";
case KW_IIDS: return "item_identifiers";
case KW_PARENT: return "parent";
}
throw new IllegalArgumentException("Unknown token type:" + type);
}
}
|
ontopia/ontopia
|
ontopia-engine/src/main/java/net/ontopia/topicmaps/utils/jtm/JSONToken.java
|
Java
|
apache-2.0
| 3,297
|
[
30522,
1013,
1013,
1001,
999,
8568,
1011,
6105,
1013,
1008,
1008,
9385,
2289,
1011,
2268,
16357,
2002,
13094,
1006,
2002,
13094,
1031,
2012,
1033,
7367,
2863,
10440,
1012,
4012,
1007,
1008,
1008,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1008,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
1008,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1008,
1008,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1008,
30524,
2019,
1000,
2004,
2003,
1000,
3978,
1010,
1008,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1008,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
1008,
12546,
2104,
1996,
6105,
1012,
1008,
1013,
7427,
5658,
1012,
3031,
19312,
1012,
8476,
2863,
4523,
1012,
21183,
12146,
1012,
1046,
21246,
1025,
1013,
1008,
1008,
1008,
4722,
1024,
2124,
19204,
4127,
2005,
1046,
21246,
1015,
1012,
1014,
1012,
1008,
1013,
2345,
2465,
1046,
3385,
18715,
2368,
1063,
1013,
1008,
1008,
1008,
19204,
4127,
1012,
1008,
1013,
2270,
10763,
2345,
20014,
2707,
1035,
4874,
1027,
1014,
1010,
2203,
1035,
4874,
1027,
1015,
1010,
2707,
1035,
9140,
1027,
1016,
1010,
2203,
1035,
9140,
1027,
1018,
1010,
3643,
1035,
19701,
1027,
1019,
1010,
6448,
1035,
2544,
1027,
1020,
1010,
6448,
1035,
8875,
1035,
2828,
1027,
1021,
1010,
6448,
1035,
7832,
1027,
1022,
1010,
6448,
1035,
8924,
1027,
1023,
1010,
6448,
1035,
4395,
1027,
2184,
1010,
6448,
1035,
27247,
1027,
2340,
1010,
6448,
1035,
3415,
1027,
2260,
1010,
6448,
1035,
10176,
1027,
2410,
1010,
6448,
1035,
9531,
1027,
2403,
1010,
6448,
1035,
2828,
1027,
2321,
1010,
6448,
1035,
2447,
1027,
2385,
1010,
6448,
1035,
3643,
1027,
2459,
1010,
6448,
1035,
2951,
13874,
1027,
2324,
1010,
6448,
1035,
24964,
8873,
2121,
1027,
2539,
1010,
6448,
1035,
15765,
2015,
1027,
2322,
1010,
6448,
1035,
22889,
2891,
1027,
2538,
1010,
6448,
1035,
2462,
5104,
1027,
2570,
1010,
6448,
1035,
6687,
1027,
2603,
1010,
3643,
1035,
5164,
1027,
2484,
1010,
16844,
1027,
2423,
1010,
4012,
2863,
1027,
2656,
1025,
1013,
1008,
1008,
1008,
5651,
1037,
5164,
6630,
1997,
1996,
3024,
19204,
1012,
1008,
1008,
1030,
11498,
2213,
2828,
1996,
19204,
2828,
1012,
1008,
1030,
2709,
1037,
5164,
5052,
1996,
19204,
1012,
1008,
1013,
2270,
10763,
5164,
2171,
11253,
1006,
2345,
20014,
2828,
1007,
1063,
6942,
1006,
2828,
1007,
1063,
2553,
2707,
1035,
4874,
1024,
2709,
1000,
1063,
1000,
1025,
2553,
2203,
1035,
4874,
1024,
2709,
1000,
1065,
1000,
1025,
2553,
2707,
1035,
9140,
1024,
2709,
1000,
1031,
1000,
1025,
2553,
2203,
1035,
9140,
1024,
2709,
1000,
1033,
1000,
1025,
2553,
4012,
2863,
1024,
2709,
1000,
1010,
1000,
1025,
2553,
16844,
1024,
2709,
1000,
1024,
1000,
1025,
2553,
3643,
1035,
19701,
1024,
2709,
1000,
19701,
1000,
1025,
2553,
3643,
1035,
5164,
1024,
2709,
1000,
1026,
5164,
1028,
1000,
30523,
1008,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1008,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1008,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1008,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
30526
] |
#ifndef __ASM_SH_PCI_H
#define __ASM_SH_PCI_H
#ifdef __KERNEL__
#include <linux/dma-mapping.h>
/* Can be used to override the logic in pci_scan_bus for skipping
already-configured bus numbers - to be used for buggy BIOSes
or architectures with incomplete PCI setup by the loader */
#define pcibios_assign_all_busses() 1
#define pcibios_scan_all_fns(a, b) 0
/*
* A board can define one or more PCI channels that represent built-in (or
* external) PCI controllers.
*/
struct pci_channel {
struct pci_ops *pci_ops;
struct resource *io_resource;
struct resource *mem_resource;
int first_devfn;
int last_devfn;
};
/*
* Each board initializes this array and terminates it with a NULL entry.
*/
extern struct pci_channel board_pci_channels[];
#define PCIBIOS_MIN_IO board_pci_channels->io_resource->start
#define PCIBIOS_MIN_MEM board_pci_channels->mem_resource->start
/*
* I/O routine helpers
*/
#ifndef CONFIG_CPU_SUBTYPE_ST40
#if defined(CONFIG_CPU_SUBTYPE_SH7780) || defined(CONFIG_CPU_SUBTYPE_SH7785)
#define PCI_IO_AREA 0xFE400000
#define PCI_IO_SIZE 0x00400000
#else
#define PCI_IO_AREA 0xFE240000
#define PCI_IO_SIZE 0X00040000
#endif
#define PCI_MEM_SIZE 0x01000000
#define SH4_PCIIOBR_MASK 0xFFFC0000
#define pci_ioaddr(addr) (PCI_IO_AREA + (addr & ~SH4_PCIIOBR_MASK))
#endif
#if defined(CONFIG_PCI) && defined(PCI_IO_SIZE)
#define is_pci_ioaddr(port) \
(((port) >= PCIBIOS_MIN_IO) && \
((port) < (PCIBIOS_MIN_IO + PCI_IO_SIZE)))
#define is_pci_memaddr(port) \
(((port) >= PCIBIOS_MIN_MEM) && \
((port) < (PCIBIOS_MIN_MEM + PCI_MEM_SIZE)))
#else
#define is_pci_ioaddr(port) (0)
#define is_pci_memaddr(port) (0)
#endif
struct pci_dev;
extern void pcibios_set_master(struct pci_dev *dev);
static inline void pcibios_penalize_isa_irq(int irq, int active)
{
/* We don't do dynamic PCI IRQ allocation */
}
/* Dynamic DMA mapping stuff.
* SuperH has everything mapped statically like x86.
*/
/* The PCI address space does equal the physical memory
* address space. The networking and block device layers use
* this boolean for bounce buffer decisions.
*/
#define PCI_DMA_BUS_IS_PHYS (1)
#include <linux/types.h>
#include <linux/slab.h>
#include <asm/scatterlist.h>
#include <linux/string.h>
#include <asm/io.h>
/* pci_unmap_{single,page} being a nop depends upon the
* configuration.
*/
#ifdef CONFIG_SH_PCIDMA_NONCOHERENT
#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME) \
dma_addr_t ADDR_NAME;
#define DECLARE_PCI_UNMAP_LEN(LEN_NAME) \
__u32 LEN_NAME;
#define pci_unmap_addr(PTR, ADDR_NAME) \
((PTR)->ADDR_NAME)
#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) \
(((PTR)->ADDR_NAME) = (VAL))
#define pci_unmap_len(PTR, LEN_NAME) \
((PTR)->LEN_NAME)
#define pci_unmap_len_set(PTR, LEN_NAME, VAL) \
(((PTR)->LEN_NAME) = (VAL))
#else
#define DECLARE_PCI_UNMAP_ADDR(ADDR_NAME)
#define DECLARE_PCI_UNMAP_LEN(LEN_NAME)
#define pci_unmap_addr(PTR, ADDR_NAME) (0)
#define pci_unmap_addr_set(PTR, ADDR_NAME, VAL) do { } while (0)
#define pci_unmap_len(PTR, LEN_NAME) (0)
#define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0)
#endif
#ifdef CONFIG_PCI
static inline void pci_dma_burst_advice(struct pci_dev *pdev,
enum pci_dma_burst_strategy *strat,
unsigned long *strategy_parameter)
{
*strat = PCI_DMA_BURST_INFINITY;
*strategy_parameter = ~0UL;
}
#endif
/* Board-specific fixup routines. */
// void pcibios_fixup(void); is this still needed? SIM
int pcibios_init_platform(void);
int pcibios_map_platform_irq(struct pci_dev *dev, u8 slot, u8 pin);
#ifdef CONFIG_PCI_AUTO
int pciauto_assign_resources(int busno, struct pci_channel *hose);
#endif
#endif /* __KERNEL__ */
/* generic pci stuff */
#include <asm-generic/pci.h>
/* generic DMA-mapping stuff */
#include <asm-generic/pci-dma-compat.h>
#endif /* __ASM_SH_PCI_H */
|
zheharry/linux-sh4-2.6.23.17_stm23_A18B
|
include/asm-sh/pci.h
|
C
|
gpl-2.0
| 3,810
|
[
30522,
1001,
2065,
13629,
2546,
1035,
1035,
2004,
2213,
1035,
14021,
1035,
7473,
2072,
1035,
1044,
1001,
9375,
1035,
1035,
2004,
2213,
1035,
14021,
1035,
7473,
2072,
1035,
1044,
1001,
2065,
3207,
2546,
1035,
1035,
16293,
1035,
1035,
1001,
2421,
1026,
11603,
1013,
1040,
2863,
1011,
12375,
1012,
1044,
1028,
1013,
1008,
2064,
2022,
2109,
2000,
2058,
15637,
1996,
7961,
1999,
7473,
2072,
1035,
13594,
1035,
3902,
2005,
25978,
2525,
1011,
26928,
3902,
3616,
1011,
2000,
2022,
2109,
2005,
11829,
6292,
16012,
8583,
2030,
4294,
2015,
2007,
12958,
7473,
2072,
16437,
2011,
1996,
7170,
2121,
1008,
1013,
1001,
9375,
7473,
12322,
10735,
1035,
23911,
1035,
2035,
1035,
3902,
8583,
1006,
1007,
1015,
1001,
9375,
7473,
12322,
10735,
1035,
13594,
1035,
2035,
1035,
1042,
3619,
1006,
1037,
1010,
1038,
1007,
1014,
1013,
1008,
1008,
1037,
2604,
2064,
9375,
2028,
2030,
2062,
7473,
2072,
6833,
2008,
5050,
2328,
1011,
1999,
1006,
2030,
1008,
6327,
1007,
7473,
2072,
21257,
1012,
1008,
1013,
2358,
6820,
6593,
7473,
2072,
1035,
3149,
1063,
2358,
6820,
6593,
7473,
2072,
1035,
23092,
1008,
7473,
2072,
1035,
23092,
1025,
2358,
6820,
6593,
7692,
1008,
22834,
1035,
7692,
1025,
2358,
6820,
6593,
7692,
1008,
2033,
2213,
1035,
7692,
1025,
20014,
2034,
1035,
16475,
2546,
2078,
1025,
20014,
2197,
1035,
16475,
2546,
2078,
1025,
1065,
1025,
1013,
1008,
1008,
2169,
2604,
3988,
10057,
2023,
9140,
1998,
28790,
2009,
2007,
1037,
19701,
4443,
1012,
1008,
1013,
4654,
16451,
2358,
6820,
6593,
7473,
2072,
1035,
3149,
2604,
1035,
7473,
2072,
1035,
6833,
1031,
1033,
1025,
1001,
9375,
7473,
12322,
10735,
1035,
8117,
1035,
22834,
2604,
1035,
7473,
2072,
1035,
6833,
1011,
1028,
22834,
1035,
7692,
1011,
1028,
2707,
1001,
9375,
7473,
12322,
10735,
1035,
8117,
1035,
2033,
2213,
2604,
1035,
7473,
2072,
1035,
6833,
1011,
1028,
2033,
2213,
1035,
7692,
1011,
1028,
2707,
1013,
1008,
1008,
1045,
1013,
1051,
9410,
2393,
2545,
1008,
1013,
1001,
2065,
13629,
2546,
9530,
8873,
2290,
1035,
17368,
1035,
4942,
13874,
1035,
2358,
12740,
1001,
2065,
4225,
1006,
9530,
8873,
2290,
1035,
17368,
1035,
4942,
13874,
1035,
14021,
2581,
2581,
17914,
1007,
30524,
8873,
2290,
1035,
17368,
1035,
4942,
13874,
1035,
14021,
2581,
2581,
27531,
1007,
1001,
9375,
7473,
2072,
1035,
22834,
1035,
2181,
1014,
2595,
7959,
29537,
8889,
2692,
1001,
9375,
7473,
2072,
1035,
22834,
1035,
2946,
1014,
2595,
8889,
29537,
8889,
2692,
1001,
2842,
1001,
9375,
7473,
2072,
1035,
22834,
1035,
2181,
1014,
2595,
7959,
18827,
8889,
8889,
1001,
9375,
7473,
2072,
1035,
22834,
1035,
2946,
1014,
2595,
8889,
2692,
29537,
8889,
1001,
2203,
10128,
1001,
9375,
7473,
2072,
1035,
2033,
2213,
1035,
2946,
1014,
2595,
24096,
8889,
8889,
8889,
1001,
9375,
14021,
2549,
1035,
7473,
6137,
16429,
2099,
1035,
7308,
1014,
2595,
4246,
11329,
8889,
8889,
1001,
9375,
7473,
2072,
1035,
22834,
4215,
13626,
1006,
5587,
2099,
1007,
1006,
7473,
2072,
1035,
22834,
1035,
2181,
1009,
1006,
5587,
2099,
1004,
1066,
14021,
2549,
1035,
7473,
6137,
16429,
2099,
1035,
7308,
1007,
1007,
1001,
2203,
10128,
1001,
2065,
4225,
1006,
9530,
30523,
1064,
1064,
4225,
1006,
9530,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1064,
1064,
4225,
1006,
9530,
30526
] |
// 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;
using Xunit;
namespace System.IO.Tests
{
public class Uma_ReadWriteStruct : Uma_TestStructs
{
[Fact]
public static void UmaReadWriteStruct_NegativePosition()
{
const int capacity = 100;
UmaTestStruct inStruct = new UmaTestStruct();
using (TestSafeBuffer buffer = new TestSafeBuffer(capacity))
using (UnmanagedMemoryAccessor uma = new UnmanagedMemoryAccessor(buffer, 0, capacity, FileAccess.ReadWrite))
{
AssertExtensions.Throws<ArgumentOutOfRangeException>("position", () => uma.Write<UmaTestStruct>(-1, ref inStruct));
AssertExtensions.Throws<ArgumentOutOfRangeException>("position", () => uma.Read<UmaTestStruct>(-1, out inStruct));
}
}
[Fact]
public static void UmaReadWriteStruct_Closed()
{
const int capacity = 100;
UmaTestStruct inStruct = new UmaTestStruct();
using (var buffer = new TestSafeBuffer(capacity))
{
UnmanagedMemoryAccessor uma = new UnmanagedMemoryAccessor(buffer, 0, capacity, FileAccess.ReadWrite);
uma.Dispose();
Assert.Throws<ObjectDisposedException>(() => uma.Write<UmaTestStruct>(0, ref inStruct));
Assert.Throws<ObjectDisposedException>(() => uma.Read<UmaTestStruct>(0, out inStruct));
}
}
[Fact]
public static void UmaReadStruct_WriteMode()
{
const int capacity = 100;
UmaTestStruct inStruct = new UmaTestStruct();
using (TestSafeBuffer buffer = new TestSafeBuffer(capacity))
using (UnmanagedMemoryAccessor uma = new UnmanagedMemoryAccessor(buffer, 0, capacity, FileAccess.Write))
{
Assert.Throws<NotSupportedException>(() => uma.Read<UmaTestStruct>(0, out inStruct));
}
}
[Fact]
public static void UmaWriteStruct_ReadMode()
{
const int capacity = 100;
UmaTestStruct inStruct = new UmaTestStruct();
using (TestSafeBuffer buffer = new TestSafeBuffer(capacity))
using (UnmanagedMemoryAccessor uma = new UnmanagedMemoryAccessor(buffer, 0, capacity, FileAccess.Read))
{
Assert.Throws<NotSupportedException>(() => uma.Write<UmaTestStruct>(0, ref inStruct));
}
}
[Fact]
public static void UmaReadWriteStruct_PositionGreaterThanCapacity()
{
const int capacity = 100;
UmaTestStruct inStruct = new UmaTestStruct();
using (TestSafeBuffer buffer = new TestSafeBuffer(capacity))
using (UnmanagedMemoryAccessor uma = new UnmanagedMemoryAccessor(buffer, 0, capacity, FileAccess.ReadWrite))
{
AssertExtensions.Throws<ArgumentOutOfRangeException>("position", () => uma.Write<UmaTestStruct>(capacity, ref inStruct));
AssertExtensions.Throws<ArgumentOutOfRangeException>("position", () => uma.Read<UmaTestStruct>(capacity, out inStruct));
}
}
[Fact]
public static void UmaReadWriteStruct_InsufficientSpace()
{
const int capacity = 100;
UmaTestStruct inStruct = new UmaTestStruct();
using (TestSafeBuffer buffer = new TestSafeBuffer(capacity))
using (UnmanagedMemoryAccessor uma = new UnmanagedMemoryAccessor(buffer, 0, capacity, FileAccess.ReadWrite))
{
AssertExtensions.Throws<ArgumentException>("position", () => uma.Write<UmaTestStruct>(capacity - UmaTestStruct_UnalignedSize + 1, ref inStruct));
AssertExtensions.Throws<ArgumentException>("position", () => uma.Write<UmaTestStruct>(capacity - UmaTestStruct_AlignedSize + 1, ref inStruct));
AssertExtensions.Throws<ArgumentException>("position", () => uma.Read<UmaTestStruct>(capacity - UmaTestStruct_UnalignedSize + 1, out inStruct));
AssertExtensions.Throws<ArgumentException>("position", () => uma.Read<UmaTestStruct>(capacity - UmaTestStruct_AlignedSize + 1, out inStruct));
}
}
[Fact]
public static void UmaReadWriteStructWithReferenceType_ThrowsArgumentException()
{
const int capacity = 100;
UmaTestStruct_ContainsReferenceType inStruct = new UmaTestStruct_ContainsReferenceType { referenceType = new object() };
using (var buffer = new TestSafeBuffer(capacity))
using (var uma = new UnmanagedMemoryAccessor(buffer, 0, capacity, FileAccess.ReadWrite))
{
AssertExtensions.Throws<ArgumentException>("type", () => uma.Write<UmaTestStruct_ContainsReferenceType>(0, ref inStruct));
AssertExtensions.Throws<ArgumentException>("type", () => uma.Read<UmaTestStruct_ContainsReferenceType>(0, out inStruct));
}
}
[Fact]
public static void UmaReadWriteGenericIntStruct_Valid()
{
const int capacity = 100;
UmaTestStruct_Generic<int> inStruct = new UmaTestStruct_Generic<int> () { ofT = 158 };
UmaTestStruct_Generic<int> outStruct;
using (var buffer = new TestSafeBuffer(capacity))
using (var uma = new UnmanagedMemoryAccessor(buffer, 0, capacity, FileAccess.ReadWrite))
{
uma.Write<UmaTestStruct_Generic<int>>(0, ref inStruct);
uma.Read<UmaTestStruct_Generic<int>>(0, out outStruct);
Assert.Equal(inStruct.ofT, outStruct.ofT);
}
}
[Fact]
public static void UmaReadWriteGenericStringStruct_ThrowsArgumentException()
{
const int capacity = 100;
UmaTestStruct_Generic<string> inStruct = new UmaTestStruct_Generic<string>() { ofT = "Cats!" };
using (var buffer = new TestSafeBuffer(capacity))
using (var uma = new UnmanagedMemoryAccessor(buffer, 0, capacity, FileAccess.ReadWrite))
{
AssertExtensions.Throws<ArgumentException>("type", () => uma.Write<UmaTestStruct_Generic<string>>(0, ref inStruct));
AssertExtensions.Throws<ArgumentException>("type", () => uma.Read<UmaTestStruct_Generic<string>>(0, out inStruct));
}
}
[Fact]
public static void UmaReadWriteStruct_Valid()
{
const int capacity = 100;
UmaTestStruct inStruct = new UmaTestStruct(){ int1 = 1, int2 = 2, bool1 = false, char1 = 'p', bool2 = true};
UmaTestStruct outStruct;
using (TestSafeBuffer buffer = new TestSafeBuffer(capacity))
using (UnmanagedMemoryAccessor uma = new UnmanagedMemoryAccessor(buffer, 0, capacity, FileAccess.ReadWrite))
{
uma.Write<UmaTestStruct>(capacity - UmaTestStruct_AlignedSize, ref inStruct);
uma.Read<UmaTestStruct>(capacity - UmaTestStruct_AlignedSize, out outStruct);
Assert.Equal(inStruct.int1, outStruct.int1);
Assert.Equal(inStruct.int2, outStruct.int2);
Assert.Equal(inStruct.bool1, outStruct.bool1);
Assert.Equal(inStruct.char1, outStruct.char1);
Assert.Equal(inStruct.bool2, outStruct.bool2);
}
}
}
}
|
krk/corefx
|
src/System.IO.UnmanagedMemoryStream/tests/Uma.ReadWriteStruct.cs
|
C#
|
mit
| 7,597
|
[
30522,
1013,
1013,
7000,
2000,
1996,
1012,
5658,
3192,
2104,
2028,
2030,
2062,
10540,
1012,
1013,
1013,
1996,
1012,
5658,
3192,
15943,
2023,
5371,
2000,
2017,
2104,
1996,
10210,
6105,
1012,
1013,
1013,
2156,
1996,
6105,
5371,
1999,
1996,
2622,
7117,
2005,
2062,
2592,
1012,
2478,
2291,
1025,
2478,
15990,
3490,
2102,
1025,
3415,
15327,
2291,
1012,
22834,
1012,
5852,
1063,
2270,
2465,
8529,
2050,
1035,
3191,
26373,
3367,
6820,
6593,
1024,
8529,
2050,
1035,
5852,
18300,
2015,
1063,
1031,
2755,
1033,
2270,
10763,
11675,
27981,
13775,
26373,
3367,
6820,
6593,
1035,
4997,
26994,
1006,
1007,
1063,
9530,
3367,
20014,
3977,
1027,
2531,
1025,
8529,
8520,
3215,
18300,
16021,
18300,
1027,
2047,
8529,
8520,
3215,
18300,
1006,
1007,
1025,
2478,
1006,
5852,
10354,
15878,
16093,
7512,
17698,
1027,
2047,
5852,
10354,
15878,
16093,
7512,
1006,
3977,
1007,
1007,
2478,
1006,
4895,
24805,
5999,
4168,
5302,
20444,
9468,
7971,
2953,
8529,
2050,
1027,
2047,
4895,
24805,
5999,
4168,
5302,
20444,
9468,
7971,
2953,
1006,
17698,
1010,
1014,
1010,
3977,
1010,
5371,
6305,
9623,
2015,
1012,
3191,
26373,
1007,
1007,
1063,
20865,
10288,
29048,
2015,
1012,
11618,
1026,
6685,
5833,
11253,
24388,
4402,
2595,
24422,
1028,
1006,
1000,
2597,
1000,
1010,
1006,
1007,
1027,
1028,
8529,
2050,
1012,
4339,
1026,
8529,
8520,
3215,
18300,
1028,
1006,
1011,
1015,
1010,
25416,
16021,
18300,
1007,
1007,
1025,
20865,
10288,
29048,
2015,
1012,
11618,
1026,
6685,
5833,
11253,
24388,
4402,
2595,
24422,
1028,
1006,
1000,
2597,
1000,
1010,
1006,
1007,
1027,
1028,
8529,
2050,
1012,
3191,
1026,
8529,
8520,
3215,
18300,
1028,
1006,
1011,
1015,
1010,
2041,
16021,
18300,
1007,
1007,
1025,
1065,
1065,
1031,
2755,
1033,
2270,
10763,
11675,
27981,
13775,
26373,
3367,
6820,
6593,
1035,
2701,
1006,
1007,
1063,
9530,
3367,
20014,
3977,
1027,
2531,
1025,
8529,
8520,
3215,
18300,
16021,
18300,
1027,
2047,
8529,
8520,
3215,
18300,
1006,
1007,
1025,
2478,
1006,
13075,
17698,
1027,
2047,
5852,
10354,
15878,
16093,
7512,
1006,
3977,
1007,
1007,
1063,
4895,
24805,
5999,
4168,
5302,
20444,
9468,
7971,
2953,
8529,
2050,
1027,
2047,
4895,
24805,
5999,
4168,
5302,
20444,
9468,
7971,
2953,
1006,
17698,
1010,
1014,
1010,
3977,
1010,
5371,
6305,
9623,
2015,
1012,
3191,
26373,
1007,
1025,
8529,
2050,
1012,
27764,
1006,
1007,
1025,
20865,
1012,
11618,
1026,
4874,
10521,
19155,
10288,
24422,
1028,
1006,
1006,
1007,
1027,
1028,
8529,
2050,
1012,
4339,
1026,
8529,
8520,
3215,
18300,
1028,
1006,
1014,
1010,
25416,
16021,
18300,
1007,
1007,
1025,
20865,
1012,
11618,
1026,
4874,
10521,
19155,
10288,
24422,
1028,
1006,
1006,
1007,
1027,
1028,
8529,
2050,
1012,
3191,
1026,
8529,
8520,
3215,
18300,
1028,
1006,
1014,
1010,
2041,
16021,
18300,
1007,
1007,
1025,
30524,
1035,
4339,
5302,
3207,
1006,
1007,
1063,
9530,
3367,
20014,
3977,
1027,
2531,
1025,
8529,
8520,
3215,
18300,
16021,
18300,
1027,
2047,
8529,
8520,
3215,
18300,
1006,
1007,
1025,
2478,
1006,
5852,
10354,
15878,
16093,
7512,
17698,
1027,
2047,
5852,
10354,
15878,
16093,
7512,
1006,
3977,
1007,
1007,
2478,
30523,
1065,
1065,
1031,
2755,
1033,
2270,
10763,
11675,
27981,
13775,
3367,
6820,
6593,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1065,
1065,
1031,
2755,
1033,
2270,
10763,
11675,
27981,
13775,
3367,
6820,
6593,
30526
] |
#!/bin/sh
# CYBERWATCH SAS - 2017
#
# Security fix for USN-2166-1
#
# Security announcement date: 2014-04-14 00:00:00 UTC
# Script generation date: 2017-01-01 21:03:46 UTC
#
# Operating System: Ubuntu 12.04 LTS
# Architecture: x86_64
#
# Vulnerable packages fix on version:
# - libsnmp15:5.4.3~dfsg-2.4ubuntu1.2
#
# Last versions recommanded by security team:
# - libsnmp15:5.4.3~dfsg-2.4ubuntu1.3
#
# CVE List:
# - CVE-2012-6151
# - CVE-2014-2284
# - CVE-2014-2285
# - CVE-2014-2310
#
# More details:
# - https://www.cyberwatch.fr/vulnerabilites
#
# Licence: Released under The MIT License (MIT), See LICENSE FILE
sudo apt-get install --only-upgrade libsnmp15=5.4.3~dfsg-2.4ubuntu1.3 -y
|
Cyberwatch/cbw-security-fixes
|
Ubuntu_12.04_LTS/x86_64/2014/USN-2166-1.sh
|
Shell
|
mit
| 706
|
[
30522,
1001,
999,
1013,
8026,
1013,
14021,
1001,
16941,
18866,
21871,
1011,
2418,
1001,
1001,
3036,
8081,
2005,
2149,
2078,
1011,
20294,
2575,
1011,
1015,
1001,
1001,
3036,
8874,
3058,
1024,
2297,
1011,
5840,
1011,
2403,
4002,
1024,
4002,
1024,
4002,
11396,
1001,
5896,
4245,
3058,
1024,
2418,
1011,
5890,
1011,
5890,
2538,
1024,
6021,
1024,
4805,
11396,
1001,
1001,
4082,
2291,
1024,
1057,
8569,
3372,
2226,
2260,
1012,
5840,
8318,
2015,
1001,
4294,
1024,
1060,
20842,
1035,
4185,
1001,
1001,
8211,
14555,
8081,
2006,
2544,
1024,
1001,
1011,
5622,
5910,
2078,
8737,
16068,
1024,
1019,
1012,
1018,
1012,
1017,
1066,
1040,
10343,
2290,
1011,
1016,
1012,
1018,
12083,
16671,
2226,
2487,
1012,
1016,
1001,
1001,
2197,
4617,
28667,
5358,
2386,
5732,
2011,
3036,
2136,
1024,
1001,
1011,
5622,
5910,
2078,
8737,
16068,
1024,
1019,
1012,
1018,
1012,
1017,
1066,
1040,
10343,
2290,
1011,
1016,
1012,
1018,
12083,
16671,
2226,
2487,
1012,
1017,
1001,
1001,
26226,
2063,
2862,
1024,
1001,
1011,
26226,
2063,
1011,
2262,
1011,
6079,
22203,
1001,
1011,
26226,
2063,
1011,
2297,
1011,
22238,
2549,
1001,
1011,
26226,
2063,
1011,
2297,
1011,
22238,
2629,
1001,
1011,
26226,
2063,
1011,
2297,
1011,
20304,
2692,
1001,
1001,
2062,
4751,
1024,
1001,
1011,
16770,
1024,
1013,
1013,
7479,
1012,
16941,
18866,
1012,
10424,
1013,
24728,
19666,
6906,
14454,
7616,
1001,
1001,
11172,
1024,
2207,
2104,
30524,
2226,
2487,
1012,
1017,
1011,
1061,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1996,
10210,
6105,
1006,
10210,
1007,
1010,
2156,
6105,
5371,
19219,
2080,
26794,
1011,
2131,
16500,
1011,
1011,
2069,
1011,
12200,
5622,
5910,
2078,
8737,
16068,
1027,
1019,
1012,
1018,
1012,
1017,
1066,
1040,
10343,
2290,
1011,
1016,
1012,
1018,
12083,
16671,
30526
] |
/*
Copyright (C) 2007 <SWGEmu>
This File is part of Core3.
This program is free software; you can redistribute
it and/or modify it under the terms of the GNU Lesser
General Public License as published by the Free Software
Foundation; either version 2 of the License,
or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for
more details.
You should have received a copy of the GNU Lesser General
Public License along with this program; if not, write to
the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
Linking Engine3 statically or dynamically with other modules
is making a combined work based on Engine3.
Thus, the terms and conditions of the GNU Lesser General Public License
cover the whole combination.
In addition, as a special exception, the copyright holders of Engine3
give you permission to combine Engine3 program with free software
programs or libraries that are released under the GNU LGPL and with
code included in the standard release of Core3 under the GNU LGPL
license (or modified versions of such code, with unchanged license).
You may copy and distribute such a system following the terms of the
GNU LGPL for Engine3 and the licenses of the other code concerned,
provided that you include the source code of that other code when
and as the GNU LGPL requires distribution of source code.
Note that people who make modified versions of Engine3 are not obligated
to grant this special exception for their modified versions;
it is their choice whether to do so. The GNU Lesser General Public License
gives permission to release a modified version without this exception;
this exception also makes it possible to release a modified version
which carries forward this exception.
*/
#ifndef STEADYAIMCOMMAND_H_
#define STEADYAIMCOMMAND_H_
#include "server/zone/objects/scene/SceneObject.h"
#include "SquadLeaderCommand.h"
class SteadyaimCommand : public SquadLeaderCommand {
public:
SteadyaimCommand(const String& name, ZoneProcessServer* server)
: SquadLeaderCommand(name, server) {
}
int doQueueCommand(CreatureObject* creature, const uint64& target, const UnicodeString& arguments) {
if (!checkStateMask(creature))
return INVALIDSTATE;
if (!checkInvalidLocomotions(creature))
return INVALIDLOCOMOTION;
if (!creature->isPlayerCreature())
return GENERALERROR;
ManagedReference<CreatureObject*> player = cast<CreatureObject*>(creature);
ManagedReference<GroupObject*> group = player->getGroup();
if (!checkGroupLeader(player, group))
return GENERALERROR;
float skillMod = (float) creature->getSkillMod("steadyaim");
int hamCost = (int) (100.0f * (1.0f - (skillMod / 100.0f))) * calculateGroupModifier(group);
int healthCost = creature->calculateCostAdjustment(CreatureAttribute::STRENGTH, hamCost);
int actionCost = creature->calculateCostAdjustment(CreatureAttribute::QUICKNESS, hamCost);
int mindCost = creature->calculateCostAdjustment(CreatureAttribute::FOCUS, hamCost);
if (!inflictHAM(player, healthCost, actionCost, mindCost))
return GENERALERROR;
// shoutCommand(player, group);
int amount = 5 + skillMod;
if (!doSteadyAim(player, group, amount))
return GENERALERROR;
if (player->isPlayerCreature() && player->getPlayerObject()->getCommandMessageString(String("steadyaim").hashCode()).isEmpty()==false) {
UnicodeString shout(player->getPlayerObject()->getCommandMessageString(String("steadyaim").hashCode()));
server->getChatManager()->broadcastMessage(player, shout, 0, 0, 80);
}
return SUCCESS;
}
bool doSteadyAim(CreatureObject* leader, GroupObject* group, int amount) {
if (leader == NULL || group == NULL)
return false;
for (int i = 0; i < group->getGroupSize(); i++) {
ManagedReference<SceneObject*> member = group->getGroupMember(i);
if (!member->isPlayerCreature() || member == NULL || member->getZone() != leader->getZone())
continue;
ManagedReference<CreatureObject*> memberPlayer = cast<CreatureObject*>( member.get());
Locker clocker(memberPlayer, leader);
sendCombatSpam(memberPlayer);
ManagedReference<WeaponObject*> weapon = memberPlayer->getWeapon();
if (!weapon->isRangedWeapon())
continue;
int duration = 300;
ManagedReference<Buff*> buff = new Buff(memberPlayer, actionCRC, duration, BuffType::SKILL);
buff->setSkillModifier("private_aim", amount);
memberPlayer->addBuff(buff);
}
return true;
}
};
#endif //STEADYAIMCOMMAND_H_
|
kidaa/Awakening-Core3
|
src/server/zone/objects/creature/commands/SteadyaimCommand.h
|
C
|
lgpl-3.0
| 4,686
|
[
30522,
1013,
1008,
9385,
1006,
1039,
1007,
2289,
1026,
25430,
3351,
12274,
1028,
2023,
5371,
2003,
2112,
1997,
4563,
2509,
1012,
2023,
2565,
2003,
2489,
4007,
1025,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
2009,
1998,
1013,
2030,
19933,
2009,
2104,
1996,
3408,
1997,
1996,
27004,
8276,
2236,
2270,
6105,
2004,
2405,
2011,
1996,
2489,
4007,
3192,
1025,
2593,
2544,
1016,
1997,
1996,
6105,
1010,
2030,
1006,
2012,
2115,
5724,
1007,
2151,
2101,
2544,
1012,
2023,
2565,
30524,
1025,
2302,
2130,
1996,
13339,
10943,
2100,
1997,
6432,
8010,
2030,
10516,
2005,
1037,
3327,
3800,
1012,
2156,
1996,
27004,
8276,
2236,
2270,
6105,
2005,
2062,
4751,
1012,
2017,
2323,
2031,
2363,
1037,
6100,
1997,
1996,
27004,
8276,
2236,
2270,
6105,
2247,
2007,
2023,
2565,
1025,
2065,
2025,
1010,
4339,
2000,
1996,
2489,
4007,
3192,
1010,
4297,
1012,
1010,
4868,
5951,
2358,
1010,
3587,
2723,
1010,
3731,
1010,
5003,
6185,
14526,
2692,
1011,
7558,
2487,
3915,
11383,
3194,
2509,
10763,
3973,
2030,
8790,
3973,
2007,
2060,
14184,
2003,
2437,
1037,
4117,
2147,
2241,
2006,
3194,
2509,
1012,
2947,
1010,
1996,
3408,
1998,
3785,
1997,
1996,
27004,
8276,
2236,
2270,
6105,
3104,
1996,
2878,
5257,
1012,
1999,
2804,
1010,
2004,
1037,
2569,
6453,
1010,
1996,
9385,
13304,
1997,
3194,
2509,
2507,
2017,
6656,
2000,
11506,
3194,
2509,
2565,
2007,
2489,
4007,
3454,
2030,
8860,
2008,
2024,
2207,
2104,
1996,
27004,
1048,
21600,
2140,
1998,
2007,
3642,
2443,
1999,
1996,
3115,
2713,
1997,
4563,
2509,
2104,
1996,
27004,
1048,
21600,
2140,
6105,
1006,
2030,
6310,
4617,
1997,
2107,
3642,
1010,
2007,
15704,
6105,
1007,
1012,
2017,
2089,
6100,
1998,
16062,
2107,
1037,
2291,
2206,
1996,
3408,
1997,
1996,
27004,
1048,
21600,
2140,
2005,
3194,
2509,
1998,
1996,
15943,
1997,
1996,
2060,
3642,
4986,
1010,
3024,
2008,
2017,
2421,
1996,
3120,
3642,
1997,
2008,
2060,
3642,
2043,
1998,
2004,
1996,
27004,
1048,
21600,
2140,
5942,
4353,
1997,
3120,
3642,
1012,
3602,
2008,
2111,
2040,
2191,
6310,
4617,
1997,
3194,
2509,
2024,
2025,
27885,
14715,
3064,
2000,
3946,
2023,
2569,
6453,
2005,
2037,
6310,
4617,
1025,
2009,
2003,
2037,
3601,
3251,
2000,
2079,
2061,
1012,
1996,
27004,
8276,
2236,
2270,
6105,
3957,
6656,
2000,
2713,
1037,
6310,
2544,
2302,
2023,
6453,
1025,
2023,
6453,
2036,
3084,
2009,
2825,
2000,
2713,
1037,
6310,
2544,
2029,
7883,
2830,
2023,
6453,
1012,
1008,
1013,
1001,
2065,
13629,
2546,
6706,
4886,
12458,
5358,
2386,
2094,
1035,
1044,
1035,
1001,
9375,
6706,
4886,
12458,
5358,
2386,
2094,
1035,
1044,
1035,
1001,
2421,
1000,
8241,
1013,
4224,
1013,
5200,
1013,
3496,
1013,
3496,
16429,
20614,
1012,
1044,
1000,
1001,
2421,
1000,
4686,
19000,
9006,
2386,
2094,
1012,
1044,
1000,
2465,
6706,
4886,
12458,
5358,
2386,
2094,
1024,
2270,
4686,
19000,
9006,
2386,
2094,
1063,
2270,
1024,
6706,
4886,
12458,
5358,
2386,
2094,
1006,
9530,
3367,
5164,
1004,
2171,
1010,
4224,
21572,
9623,
18116,
6299,
1008,
8241,
1007,
1024,
4686,
19000,
9006,
2386,
2094,
1006,
2171,
1010,
30523,
2003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,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2003,
5500,
1999,
1996,
3246,
2008,
2009,
2097,
2022,
6179,
1010,
2021,
2302,
2151,
10943,
2100,
30526
] |
rfstats
======
statistics for random fields
----------------------------
Several different methods for estimating correlation functions for random fields are included.
|
aluchies/rfstats
|
README.md
|
Markdown
|
mit
| 169
|
[
30522,
21792,
9153,
3215,
1027,
1027,
1027,
1027,
1027,
1027,
6747,
2005,
6721,
4249,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
2195,
2367,
4725,
2005,
9765,
22835,
16902,
4972,
2005,
6721,
4249,
2024,
2443,
1012,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30524,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
# Introduction to solresol
TODO: write [great documentation](http://jacobian.org/writing/great-documentation/what-to-write/)
|
aaron-santos/solresol
|
doc/intro.md
|
Markdown
|
mit
| 126
|
[
30522,
1001,
4955,
2000,
14017,
6072,
4747,
28681,
2080,
1024,
4339,
1031,
2307,
12653,
1033,
1006,
8299,
1024,
1013,
1013,
6213,
2937,
1012,
8917,
1013,
3015,
1013,
2307,
1011,
12653,
1013,
2054,
1011,
2000,
1011,
4339,
1013,
1007,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
angular.module('elementBoxApp.products.productInfo')
.controller('ProductInfoCtrl', [
'$scope', '$rootScope', '$state', '$stateParams', '$timeout', 'ModalAlert', 'ProductsService', 'UserService', 'CommentsService', 'EVENT_NAMES',
function($scope, $rootScope, $state, $stateParams, $timeout, ModalAlert, ProductsService, UserService, CommentsService, EVENT_NAMES) {
$scope.slides = [];
$scope.slidesIndex = 0;
$scope.userHasRated = false;
$scope.rateVal = null;
$scope.newComment = '';
$scope.commentSent = false;
var ratingInProcess = false;
$rootScope.$emit('title', 'TITLE_MY_PRODUCT_INFO');
// Comments pagination:
$scope.comments = [];
$scope.commentsData = {
page: 1,
pageSize: 3,
totalPages: 0,
totalComments: 0
};
var onNeedToLogin = function() {
ModalAlert.alert({
title: 'PRODUCTS.PLEASE_SIGNIN',
msg: 'PRODUCTS.PLEASE_SIGNIN_TO_ACCESS'
});
};
// $scope.myInterval = 5000;
// $scope.slides2 = [];
// Fetching product:
$scope.product = ProductsService.get({
id: $stateParams.productId
}, function(p) { // success cbk.
p.images = p.images ? p.images : [];
p.images.forEach(function(image, index) {
$scope.slides.push({ url: image.url, index: index+1 });
});
// p.rating.value = parseInt(p.rating.value);
}, function(err) { // error cbk.
$state.go('main.products.info-404');
});
$scope.fetchPage = function() {
CommentsService.query({
prodId: $stateParams.productId,
page: $scope.commentsData.page,
pageSize: $scope.commentsData.pageSize
})
.$promise.then(function(res) {
$scope.comments = res.results;
$scope.commentsData.page = res.page;
$scope.commentsData.totalPages = res.totalPages;
$scope.commentsData.totalComments = res.total;
$scope.commentsData.pageSize = res.pageSize;
});
};
$scope.addComment = function(commentTxt) {
if (!commentTxt || !commentTxt.trim()) { return; }
if (!$scope.currentUser || !$scope.currentUser.id) {
onNeedToLogin();
return;
}
var newComment = {
prodId: $stateParams.productId,
text: commentTxt
};
CommentsService.save(newComment, function(data) {
$scope.fetchPage();
$rootScope.$emit(EVENT_NAMES.addComment, newComment);
$scope.newComment = '';
$scope.commentSent = true;
});
};
$scope.$watch('commentsData.page', function(newVal, oldVal) {
$scope.fetchPage();
});
$scope.rate = function(val) {
if ($scope.rateVal || ratingInProcess) { return; }
if (!$scope.currentUser || !$scope.currentUser.id) {
onNeedToLogin();
return;
}
ratingInProcess = true;
ProductsService.rate({_id: $scope.product._id, rating: val}, function() { // success cbk.
$scope.userHasRated = true;
$scope.rateVal = val;
ratingInProcess = false;
}, function() { // err cbk.
ratingInProcess = false;
});
};
$scope.addToWishList = function() {
if (!$scope.currentUser || !$scope.currentUser.id) {
return onNeedToLogin();
}
UserService.addToWishList({ prodId: $scope.product._id }, function() {
$rootScope.$emit(EVENT_NAMES.addWishList, $scope.product);
});
};
$scope.removeFromWishList = function() {
UserService.removeFromWishList({ itemId: $scope.product._id }, function() {
$rootScope.$emit(EVENT_NAMES.removeWishList, $scope.product);
});
};
$scope.hasWishListedProduct = function() {
if (!$scope.currentUser || !$scope.product) {
return false;
}
if (!$scope.currentUser.wishList) {
$scope.currentUser.wishList = [];
}
return $scope.currentUser.wishList.indexOf($scope.product._id) >= 0;
};
// $scope.fetchPage(); // fetching first page.
}
]);
|
mauroBus/element
|
client/src/app/products/product-info/product-info.controller.js
|
JavaScript
|
apache-2.0
| 4,089
|
[
30522,
16108,
1012,
11336,
1006,
1005,
5783,
8758,
29098,
1012,
3688,
1012,
4031,
2378,
14876,
1005,
1007,
1012,
11486,
1006,
1005,
4031,
2378,
14876,
6593,
12190,
1005,
1010,
1031,
1005,
1002,
9531,
1005,
1010,
1005,
1002,
6147,
16186,
1005,
1010,
1005,
1002,
2110,
1005,
1010,
1005,
1002,
2110,
28689,
5244,
1005,
1010,
1005,
1002,
2051,
5833,
1005,
1010,
1005,
16913,
7911,
3917,
2102,
1005,
1010,
1005,
3688,
8043,
7903,
2063,
1005,
1010,
1005,
5198,
2121,
7903,
2063,
1005,
1010,
1005,
7928,
8043,
7903,
2063,
1005,
1010,
1005,
2724,
1035,
3415,
1005,
1010,
3853,
1006,
1002,
9531,
1010,
1002,
6147,
16186,
1010,
1002,
2110,
1010,
1002,
2110,
28689,
5244,
1010,
1002,
2051,
5833,
1010,
16913,
7911,
3917,
30524,
10288,
1027,
1014,
1025,
1002,
9531,
1012,
5310,
14949,
9250,
1027,
6270,
1025,
1002,
9531,
1012,
3446,
10175,
1027,
19701,
1025,
1002,
9531,
1012,
2047,
9006,
3672,
1027,
1005,
1005,
1025,
1002,
9531,
1012,
7928,
4765,
1027,
6270,
1025,
13075,
5790,
2378,
21572,
9623,
2015,
1027,
6270,
1025,
1002,
6147,
16186,
1012,
1002,
12495,
2102,
1006,
1005,
2516,
1005,
1010,
1005,
2516,
1035,
2026,
1035,
4031,
1035,
18558,
1005,
1007,
1025,
1013,
1013,
7928,
6643,
20876,
3508,
1024,
1002,
9531,
1012,
7928,
1027,
1031,
1033,
1025,
1002,
9531,
1012,
7928,
2850,
2696,
1027,
1063,
3931,
1024,
1015,
1010,
5530,
4697,
1024,
1017,
1010,
2561,
13704,
2015,
1024,
1014,
1010,
2561,
9006,
8163,
1024,
1014,
1065,
1025,
13075,
2006,
24045,
11927,
12898,
11528,
1027,
3853,
1006,
1007,
1063,
16913,
7911,
3917,
2102,
1012,
9499,
1006,
1063,
2516,
1024,
1005,
3688,
1012,
3531,
1035,
3696,
2378,
1005,
1010,
5796,
2290,
1024,
1005,
3688,
1012,
3531,
1035,
3696,
2378,
1035,
2000,
1035,
3229,
1005,
1065,
1007,
1025,
1065,
1025,
1013,
1013,
1002,
9531,
1012,
2026,
18447,
2121,
10175,
1027,
13509,
1025,
1013,
1013,
1002,
9531,
1012,
14816,
2475,
1027,
1031,
1033,
1025,
1013,
1013,
18584,
2075,
4031,
1024,
1002,
9531,
1012,
4031,
1027,
3688,
8043,
7903,
2063,
1012,
2131,
1006,
1063,
8909,
1024,
1002,
2110,
28689,
5244,
1012,
4031,
3593,
1065,
1010,
3853,
1006,
1052,
1007,
1063,
1013,
1013,
3112,
17324,
2243,
1012,
1052,
1012,
4871,
1027,
1052,
1012,
4871,
1029,
1052,
1012,
4871,
1024,
1031,
1033,
1025,
1052,
1012,
4871,
1012,
18921,
6776,
1006,
3853,
1006,
3746,
1010,
5950,
1007,
1063,
1002,
9531,
1012,
14816,
1012,
5245,
1006,
1063,
24471,
2140,
1024,
3746,
1012,
24471,
2140,
1010,
5950,
1024,
5950,
1009,
1015,
1065,
1007,
1025,
1065,
1007,
1025,
1013,
1013,
1052,
1012,
5790,
1012,
3643,
1027,
11968,
20240,
3372,
1006,
1052,
1012,
5790,
1012,
3643,
1007,
1025,
1065,
1010,
3853,
1006,
9413,
2099,
1007,
1063,
1013,
1013,
7561,
17324,
2243,
1012,
1002,
2110,
1012,
2175,
1006,
1005,
2364,
1012,
3688,
1012,
18558,
1011,
24837,
1005,
1007,
1025,
1065,
1007,
1025,
1002,
9531,
1012,
18584,
13704,
1027,
3853,
1006,
1007,
1063,
30523,
2102,
1010,
3688,
8043,
7903,
2063,
1010,
5198,
2121,
7903,
2063,
1010,
7928,
8043,
7903,
2063,
1010,
2724,
1035,
3415,
1007,
1063,
1002,
9531,
1012,
14816,
1027,
1031,
1033,
1025,
1002,
9531,
1012,
14816,
22254,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
2102,
1010,
3688,
8043,
7903,
2063,
1010,
5198,
2121,
7903,
2063,
1010,
7928,
8043,
7903,
2063,
1010,
2724,
1035,
3415,
1007,
1063,
1002,
9531,
1012,
14816,
1027,
1031,
1033,
1025,
1002,
9531,
1012,
14816,
22254,
30526
] |
<?php
session_start();
$exercise = $_SESSION['exercise'];
if($_POST){
unset($exercise[$_POST['id']]);
$_SESSION['exercise'] = $exercise;
header('Location: ./');
}
$workout = $exercise[$_REQUEST['id']];
?>
<!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">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>Exercise Log: Delete</title>
<!-- Bootstrap -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/css/toastr.min.css" type="text/css" />
<link rel="stylesheet" href="//code.jquery.com/ui/1.11.4/themes/smoothness/jquery-ui.css">
<link rel="stylesheet" type="text/css" href="../style/stylesheet.css" />
</head>
<body>
<div class="container">
<div class="page-header">
<h1>Exercise <small>Viewing <?=$workout['Name']?> workout</small></h1>
</div>
<ul>
<li>Workout Name: <?=$workout['Name']?></li>
<li>Workout Amount: <?=$workout['Amount']?></li>
<li>Workout Time: <?=$workout['Time']?></li>
<li>Workout Calories Burned: <?=$workout['Calories']?></li>
</ul>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/toastr.js/latest/js/toastr.min.js"></script>
<script src="//code.jquery.com/ui/1.11.4/jquery-ui.js"></script>
<script type="text/javascript">
(function($){
$(function(){
});
})(jQuery);
</script>
</body>
</html>
|
kevinflaherty/Web-Programming
|
fitness/exercise/view.php
|
PHP
|
gpl-2.0
| 2,009
|
[
30522,
1026,
1029,
25718,
5219,
1035,
2707,
1006,
1007,
1025,
1002,
6912,
1027,
1002,
1035,
5219,
1031,
1005,
6912,
1005,
1033,
1025,
2065,
1006,
1002,
1035,
2695,
1007,
1063,
4895,
13462,
1006,
1002,
6912,
1031,
1002,
1035,
2695,
1031,
1005,
8909,
1005,
1033,
1033,
1007,
1025,
1002,
1035,
5219,
1031,
1005,
6912,
1005,
1033,
1027,
1002,
6912,
1025,
20346,
1006,
1005,
3295,
1024,
1012,
1013,
1005,
1007,
1025,
1065,
1002,
27090,
1027,
1002,
6912,
1031,
1002,
1035,
5227,
1031,
1005,
8909,
1005,
1033,
1033,
1025,
1029,
1028,
1026,
999,
9986,
13874,
16129,
1028,
1026,
16129,
11374,
1027,
1000,
4372,
1000,
1028,
1026,
2132,
1028,
1026,
18804,
25869,
13462,
1027,
1000,
21183,
2546,
1011,
1022,
1000,
1028,
1026,
18804,
8299,
1011,
1041,
15549,
2615,
1027,
1000,
1060,
1011,
25423,
1011,
11892,
1000,
4180,
1027,
1000,
29464,
1027,
3341,
1000,
1028,
1026,
18804,
2171,
1027,
1000,
3193,
6442,
1000,
4180,
1027,
1000,
9381,
1027,
5080,
1011,
9381,
1010,
3988,
1011,
4094,
1027,
1015,
1000,
1028,
1026,
999,
1011,
1011,
1996,
2682,
1017,
18804,
22073,
1008,
2442,
1008,
2272,
2034,
1999,
1996,
2132,
1025,
2151,
2060,
2132,
4180,
2442,
2272,
1008,
2044,
1008,
2122,
22073,
1011,
1011,
1028,
1026,
2516,
1028,
6912,
8833,
1024,
3972,
12870,
1026,
1013,
2516,
1028,
1026,
999,
1011,
1011,
6879,
6494,
2361,
1011,
1011,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
17850,
12879,
1027,
1000,
16770,
1024,
1013,
1013,
4098,
19797,
2078,
1012,
6879,
6494,
15042,
2094,
2078,
1012,
4012,
1013,
6879,
6494,
2361,
1013,
1017,
1012,
1017,
1012,
1019,
1013,
20116,
2015,
1013,
6879,
6494,
2361,
1012,
8117,
1012,
20116,
2015,
1000,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
17850,
12879,
1027,
1000,
1013,
1013,
3729,
2078,
22578,
1012,
6112,
10258,
12069,
1012,
4012,
1013,
18176,
1013,
5622,
5910,
1013,
15174,
2099,
1012,
1046,
2015,
1013,
6745,
1013,
20116,
2015,
1013,
15174,
2099,
1012,
8117,
1012,
20116,
2015,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
1013,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
17850,
12879,
30524,
5744,
2791,
1013,
1046,
4226,
2854,
1011,
21318,
1012,
20116,
2015,
1000,
1028,
1026,
4957,
2128,
2140,
1027,
1000,
6782,
21030,
2102,
1000,
2828,
1027,
1000,
3793,
1013,
20116,
2015,
1000,
17850,
12879,
1027,
1000,
1012,
1012,
1013,
2806,
1013,
6782,
21030,
2102,
1012,
20116,
2015,
1000,
1013,
1028,
1026,
1013,
2132,
1028,
1026,
2303,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
11661,
1000,
1028,
1026,
4487,
2615,
2465,
1027,
1000,
3931,
1011,
20346,
1000,
1028,
1026,
1044,
2487,
1028,
6912,
1026,
2235,
1028,
10523,
1026,
1029,
1027,
1002,
27090,
1031,
1005,
2171,
1005,
1033,
1029,
1028,
27090,
1026,
1013,
2235,
1028,
1026,
1013,
1044,
2487,
1028,
1026,
1013,
4487,
2615,
1028,
1026,
17359,
1028,
1026,
5622,
1028,
27090,
2171,
1024,
1026,
1029,
1027,
1002,
27090,
1031,
1005,
2171,
1005,
1033,
1029,
1028,
1026,
1013,
30523,
1027,
1000,
1013,
1013,
3642,
1012,
1046,
4226,
2854,
1012,
4012,
1013,
21318,
1013,
1015,
1012,
2340,
1012,
1018,
1013,
6991,
1013,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1027,
1000,
1013,
1013,
3642,
1012,
1046,
4226,
2854,
1012,
4012,
1013,
21318,
1013,
1015,
1012,
2340,
1012,
1018,
1013,
6991,
1013,
30526
] |
# Xcode Snippets
## CLI Build
```bash
xcodebuild -list -project Project.xcodeproj
xcodebuild -scheme iOS build
```
## CLI Test
```bash
xcodebuild test -project Project.xcodeproj -scheme Tests -destination 'platform=iOS Simulator,name=iPad Air 2,OS=10.0'
```
## CLI xcrun
```bash
xcrun -sdk iphoneos swiftc -target armv7-apple-ios10.0 main.swift
```
## Trouble Shooting
```bash
# clean == ⌘ + ⌥ + k
# full clean == ⌘ + ⌥ + ⇧ + k
```
## Switch Xcode Install
```bash
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
```
## Add new-iOS Support to legacy Xcode
```bash
# hella unsupported
sudo ln -s /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0\ \(15A372\) /Applications/Xcode8.app/Contents/Developer/Platforms/iPhoneOS.platform/DeviceSupport/11.0
```
## Playgrounds
```bash
# Inserting the following into a playground simulates a playholder and will cause the playground to exit to the simulator it's containing:
override public func viewDidAppear(_ animated: Bool) {
<#code#>
}
```
```swift
import PlaygroundSupport
...
PlaygroundPage.current.liveView = viewController.view
...
PlaygroundPage.current.needsIndefiniteExecution
```
## Simulator
```bash
xcrun simctl list | grep Air
xcrun simctl boot "iPad Air 2"
xcrun simctl install booted Project.swiftmodule
```
## Devices
```bash
instruments -s devices
```
|
mlavergn/cheatsheets
|
xcode.md
|
Markdown
|
unlicense
| 1,406
|
[
30522,
1001,
1060,
16044,
1055,
3490,
29519,
2015,
1001,
1001,
18856,
2072,
3857,
1036,
1036,
1036,
24234,
1060,
16044,
8569,
4014,
2094,
1011,
2862,
1011,
2622,
2622,
1012,
1060,
16044,
21572,
3501,
1060,
16044,
8569,
4014,
2094,
1011,
5679,
16380,
3857,
1036,
1036,
1036,
1001,
1001,
18856,
2072,
3231,
1036,
1036,
1036,
24234,
1060,
16044,
8569,
4014,
2094,
3231,
1011,
2622,
2622,
1012,
1060,
16044,
21572,
3501,
1011,
5679,
5852,
1011,
7688,
1005,
4132,
1027,
16380,
25837,
1010,
2171,
1027,
25249,
2250,
1016,
1010,
9808,
1027,
2184,
1012,
1014,
1005,
1036,
1036,
1036,
1001,
1001,
18856,
2072,
1060,
26775,
4609,
1036,
1036,
1036,
24234,
1060,
26775,
4609,
1011,
17371,
2243,
18059,
2891,
9170,
2278,
1011,
4539,
2849,
2615,
2581,
1011,
6207,
1011,
16380,
10790,
1012,
1014,
2364,
1012,
9170,
1036,
1036,
1036,
1001,
1001,
4390,
5008,
1036,
30524,
1036,
1036,
1036,
24234,
19219,
2080,
1060,
16044,
1011,
7276,
1011,
6942,
1013,
5097,
1013,
1060,
16044,
1012,
10439,
1013,
8417,
1013,
9722,
1036,
1036,
1036,
1001,
1001,
5587,
2047,
1011,
16380,
2490,
2000,
8027,
1060,
16044,
1036,
1036,
1036,
24234,
1001,
3109,
2050,
4895,
6342,
9397,
15613,
19219,
2080,
1048,
2078,
1011,
1055,
1013,
5097,
1013,
1060,
16044,
1012,
10439,
1013,
8417,
1013,
9722,
1013,
7248,
1013,
18059,
2891,
1012,
4132,
1013,
5733,
6279,
6442,
1013,
2340,
1012,
1014,
1032,
1032,
1006,
2321,
2050,
24434,
2475,
1032,
1007,
1013,
5097,
1013,
1060,
16044,
2620,
1012,
10439,
1013,
8417,
1013,
9722,
1013,
7248,
1013,
18059,
2891,
1012,
4132,
1013,
5733,
6279,
6442,
1013,
2340,
1012,
1014,
1036,
1036,
1036,
1001,
1001,
14705,
2015,
1036,
1036,
1036,
24234,
1001,
19274,
2075,
1996,
2206,
2046,
1037,
14705,
26633,
2015,
1037,
2377,
14528,
1998,
2097,
3426,
1996,
14705,
2000,
6164,
2000,
1996,
25837,
2009,
1005,
1055,
4820,
1024,
2058,
15637,
2270,
4569,
2278,
3193,
4305,
2850,
21512,
2906,
1006,
1035,
6579,
1024,
22017,
2140,
1007,
1063,
1026,
1001,
3642,
1001,
1028,
1065,
1036,
1036,
1036,
1036,
1036,
1036,
9170,
12324,
14705,
6342,
9397,
11589,
1012,
1012,
1012,
14705,
13704,
1012,
2783,
1012,
2444,
8584,
1027,
3193,
8663,
13181,
10820,
1012,
3193,
1012,
1012,
1012,
14705,
13704,
1012,
2783,
1012,
3791,
22254,
12879,
5498,
17389,
2595,
8586,
13700,
1036,
1036,
1036,
1001,
1001,
25837,
1036,
1036,
1036,
24234,
1060,
26775,
4609,
21934,
6593,
2140,
2862,
1064,
24665,
13699,
2250,
1060,
26775,
4609,
21934,
6593,
2140,
9573,
1000,
25249,
2250,
1016,
1000,
1060,
26775,
4609,
21934,
6593,
2140,
16500,
9573,
2098,
2622,
1012,
9170,
5302,
8566,
2571,
1036,
1036,
1036,
1001,
1001,
5733,
1036,
1036,
1036,
24234,
5693,
1011,
1055,
5733,
1036,
1036,
1036,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30523,
1036,
1036,
24234,
1001,
4550,
1027,
1027,
100,
1009,
100,
1009,
1047,
1001,
2440,
4550,
1027,
1027,
100,
1009,
100,
1009,
100,
1009,
1047,
1036,
1036,
1036,
1001,
1001,
6942,
1060,
16044,
16500,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1036,
1036,
24234,
1001,
4550,
1027,
1027,
100,
1009,
100,
1009,
1047,
1001,
2440,
4550,
1027,
1027,
100,
1009,
100,
1009,
100,
1009,
1047,
1036,
1036,
1036,
1001,
1001,
6942,
1060,
16044,
16500,
30526
] |
#!/usr/bin/python
# *****************************************************************************
#
# Copyright (c) 2016, EPAM SYSTEMS INC
#
# Licensed 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.
#
# ******************************************************************************
import logging
import json
import sys
from dlab.fab import *
from dlab.meta_lib import *
from dlab.actions_lib import *
import os
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--uuid', type=str, default='')
args = parser.parse_args()
if __name__ == "__main__":
local_log_filename = "{}_{}_{}.log".format(os.environ['conf_resource'], os.environ['edge_user_name'],
os.environ['request_id'])
local_log_filepath = "/logs/" + os.environ['conf_resource'] + "/" + local_log_filename
logging.basicConfig(format='%(levelname)-8s [%(asctime)s] %(message)s',
level=logging.DEBUG,
filename=local_log_filepath)
notebook_config = dict()
try:
notebook_config['exploratory_name'] = os.environ['exploratory_name']
except:
notebook_config['exploratory_name'] = ''
notebook_config['service_base_name'] = os.environ['conf_service_base_name']
notebook_config['instance_type'] = os.environ['aws_notebook_instance_type']
notebook_config['key_name'] = os.environ['conf_key_name']
notebook_config['user_keyname'] = os.environ['edge_user_name']
notebook_config['instance_name'] = '{}-{}-nb-{}-{}'.format(notebook_config['service_base_name'],
os.environ['edge_user_name'],
notebook_config['exploratory_name'], args.uuid)
notebook_config['expected_image_name'] = '{}-{}-notebook-image'.format(notebook_config['service_base_name'],
os.environ['application'])
notebook_config['notebook_image_name'] = str(os.environ.get('notebook_image_name'))
notebook_config['role_profile_name'] = '{}-{}-nb-de-Profile' \
.format(notebook_config['service_base_name'].lower().replace('-', '_'), os.environ['edge_user_name'])
notebook_config['security_group_name'] = '{}-{}-nb-SG'.format(notebook_config['service_base_name'],
os.environ['edge_user_name'])
notebook_config['tag_name'] = '{}-Tag'.format(notebook_config['service_base_name'])
notebook_config['dlab_ssh_user'] = os.environ['conf_os_user']
notebook_config['shared_image_enabled'] = os.environ['conf_shared_image_enabled']
# generating variables regarding EDGE proxy on Notebook instance
instance_hostname = get_instance_hostname(notebook_config['tag_name'], notebook_config['instance_name'])
edge_instance_name = os.environ['conf_service_base_name'] + "-" + os.environ['edge_user_name'] + '-edge'
edge_instance_hostname = get_instance_hostname(notebook_config['tag_name'], edge_instance_name)
edge_instance_ip = get_instance_ip_address(notebook_config['tag_name'], edge_instance_name).get('Public')
keyfile_name = "{}{}.pem".format(os.environ['conf_key_dir'], os.environ['conf_key_name'])
try:
if os.environ['conf_os_family'] == 'debian':
initial_user = 'ubuntu'
sudo_group = 'sudo'
if os.environ['conf_os_family'] == 'redhat':
initial_user = 'ec2-user'
sudo_group = 'wheel'
logging.info('[CREATING DLAB SSH USER]')
print('[CREATING DLAB SSH USER]')
params = "--hostname {} --keyfile {} --initial_user {} --os_user {} --sudo_group {}".format\
(instance_hostname, os.environ['conf_key_dir'] + os.environ['conf_key_name'] + ".pem", initial_user,
notebook_config['dlab_ssh_user'], sudo_group)
try:
local("~/scripts/{}.py {}".format('create_ssh_user', params))
except:
traceback.print_exc()
raise Exception
except Exception as err:
append_result("Failed creating ssh user 'dlab'.", str(err))
remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
sys.exit(1)
# configuring proxy on Notebook instance
try:
logging.info('[CONFIGURE PROXY ON JUPYTER INSTANCE]')
print('[CONFIGURE PROXY ON JUPYTER INSTANCE]')
additional_config = {"proxy_host": edge_instance_hostname, "proxy_port": "3128"}
params = "--hostname {} --instance_name {} --keyfile {} --additional_config '{}' --os_user {}"\
.format(instance_hostname, notebook_config['instance_name'], keyfile_name, json.dumps(additional_config), notebook_config['dlab_ssh_user'])
try:
local("~/scripts/{}.py {}".format('common_configure_proxy', params))
except:
traceback.print_exc()
raise Exception
except Exception as err:
append_result("Failed to configure proxy.", str(err))
remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
sys.exit(1)
# updating repositories & installing python packages
try:
logging.info('[INSTALLING PREREQUISITES TO JUPYTER NOTEBOOK INSTANCE]')
print('[INSTALLING PREREQUISITES TO JUPYTER NOTEBOOK INSTANCE]')
params = "--hostname {} --keyfile {} --user {} --region {}".\
format(instance_hostname, keyfile_name, notebook_config['dlab_ssh_user'], os.environ['aws_region'])
try:
local("~/scripts/{}.py {}".format('install_prerequisites', params))
except:
traceback.print_exc()
raise Exception
except Exception as err:
append_result("Failed installing apps: apt & pip.", str(err))
remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
sys.exit(1)
# installing and configuring jupiter and all dependencies
try:
logging.info('[CONFIGURE JUPYTER NOTEBOOK INSTANCE]')
print('[CONFIGURE JUPYTER NOTEBOOK INSTANCE]')
params = "--hostname {} " \
"--keyfile {} " \
"--region {} " \
"--spark_version {} " \
"--hadoop_version {} " \
"--os_user {} " \
"--scala_version {} " \
"--r_mirror {} " \
"--exploratory_name {}".\
format(instance_hostname,
keyfile_name,
os.environ['aws_region'],
os.environ['notebook_spark_version'],
os.environ['notebook_hadoop_version'],
notebook_config['dlab_ssh_user'],
os.environ['notebook_scala_version'],
os.environ['notebook_r_mirror'],
notebook_config['exploratory_name'])
try:
local("~/scripts/{}.py {}".format('configure_jupyter_node', params))
except:
traceback.print_exc()
raise Exception
except Exception as err:
append_result("Failed to configure jupyter.", str(err))
remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
sys.exit(1)
try:
print('[INSTALLING USERs KEY]')
logging.info('[INSTALLING USERs KEY]')
additional_config = {"user_keyname": notebook_config['user_keyname'],
"user_keydir": os.environ['conf_key_dir']}
params = "--hostname {} --keyfile {} --additional_config '{}' --user {}".format(
instance_hostname, keyfile_name, json.dumps(additional_config), notebook_config['dlab_ssh_user'])
try:
local("~/scripts/{}.py {}".format('install_user_key', params))
except:
append_result("Failed installing users key")
raise Exception
except Exception as err:
append_result("Failed installing users key.", str(err))
remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
sys.exit(1)
try:
print('[SETUP USER GIT CREDENTIALS]')
logging.info('[SETUP USER GIT CREDENTIALS]')
params = '--os_user {} --notebook_ip {} --keyfile "{}"' \
.format(notebook_config['dlab_ssh_user'], instance_hostname, keyfile_name)
try:
local("~/scripts/{}.py {}".format('common_download_git_certfile', params))
local("~/scripts/{}.py {}".format('manage_git_creds', params))
except:
append_result("Failed setup git credentials")
raise Exception
except Exception as err:
append_result("Failed to setup git credentials.", str(err))
remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
sys.exit(1)
try:
logging.info('[POST CONFIGURING PROCESS]')
print('[POST CONFIGURING PROCESS')
if notebook_config['notebook_image_name'] not in [notebook_config['expected_image_name'], 'None']:
params = "--hostname {} --keyfile {} --os_user {} --nb_tag_name {} --nb_tag_value {}" \
.format(instance_hostname, keyfile_name, notebook_config['dlab_ssh_user'],
notebook_config['tag_name'], notebook_config['instance_name'])
try:
local("~/scripts/{}.py {}".format('common_remove_remote_kernels', params))
except:
traceback.print_exc()
raise Exception
except Exception as err:
append_result("Failed to post configuring instance.", str(err))
remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
sys.exit(1)
try:
print('[SETUP EDGE REVERSE PROXY TEMPLATE]')
logging.info('[SETUP EDGE REVERSE PROXY TEMPLATE]')
additional_info = {
'instance_hostname': instance_hostname,
'tensor': False
}
params = "--edge_hostname {} " \
"--keyfile {} " \
"--os_user {} " \
"--type {} " \
"--exploratory_name {} " \
"--additional_info '{}'"\
.format(edge_instance_hostname,
keyfile_name,
notebook_config['dlab_ssh_user'],
'jupyter',
notebook_config['exploratory_name'],
json.dumps(additional_info))
try:
local("~/scripts/{}.py {}".format('common_configure_reverse_proxy', params))
except:
append_result("Failed edge reverse proxy template")
raise Exception
except Exception as err:
append_result("Failed to set edge reverse proxy template.", str(err))
remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
sys.exit(1)
if notebook_config['shared_image_enabled'] == 'true':
try:
print('[CREATING AMI]')
ami_id = get_ami_id_by_name(notebook_config['expected_image_name'])
if ami_id == '':
print("Looks like it's first time we configure notebook server. Creating image.")
image_id = create_image_from_instance(tag_name=notebook_config['tag_name'],
instance_name=notebook_config['instance_name'],
image_name=notebook_config['expected_image_name'])
if image_id != '':
print("Image was successfully created. It's ID is {}".format(image_id))
except Exception as err:
append_result("Failed creating image.", str(err))
remove_ec2(notebook_config['tag_name'], notebook_config['instance_name'])
sys.exit(1)
# generating output information
ip_address = get_instance_ip_address(notebook_config['tag_name'], notebook_config['instance_name']).get('Private')
dns_name = get_instance_hostname(notebook_config['tag_name'], notebook_config['instance_name'])
jupyter_ip_url = "http://" + ip_address + ":8888/{}/".format(notebook_config['exploratory_name'])
jupyter_dns_url = "http://" + dns_name + ":8888/{}/".format(notebook_config['exploratory_name'])
jupyter_notebook_acces_url = "http://" + edge_instance_ip + "/{}/".format(notebook_config['exploratory_name'])
jupyter_ungit_acces_url = "http://" + edge_instance_ip + "/{}-ungit/".format(notebook_config['exploratory_name'])
ungit_ip_url = "http://" + ip_address + ":8085/{}-ungit/".format(notebook_config['exploratory_name'])
print('[SUMMARY]')
logging.info('[SUMMARY]')
print("Instance name: {}".format(notebook_config['instance_name']))
print("Private DNS: {}".format(dns_name))
print("Private IP: {}".format(ip_address))
print("Instance ID: {}".format(get_instance_by_name(notebook_config['tag_name'], notebook_config['instance_name'])))
print("Instance type: {}".format(notebook_config['instance_type']))
print("Key name: {}".format(notebook_config['key_name']))
print("User key name: {}".format(notebook_config['user_keyname']))
print("Image name: {}".format(notebook_config['notebook_image_name']))
print("Profile name: {}".format(notebook_config['role_profile_name']))
print("SG name: {}".format(notebook_config['security_group_name']))
print("Jupyter URL: {}".format(jupyter_ip_url))
print("Jupyter URL: {}".format(jupyter_dns_url))
print("Ungit URL: {}".format(ungit_ip_url))
print("ReverseProxyNotebook".format(jupyter_notebook_acces_url))
print("ReverseProxyUngit".format(jupyter_ungit_acces_url))
print('SSH access (from Edge node, via IP address): ssh -i {0}.pem {1}@{2}'.
format(notebook_config['key_name'], notebook_config['dlab_ssh_user'], ip_address))
print('SSH access (from Edge node, via FQDN): ssh -i {0}.pem {1}@{2}'.
format(notebook_config['key_name'], notebook_config['dlab_ssh_user'], dns_name))
with open("/root/result.json", 'w') as result:
res = {"hostname": dns_name,
"ip": ip_address,
"instance_id": get_instance_by_name(notebook_config['tag_name'], notebook_config['instance_name']),
"master_keyname": os.environ['conf_key_name'],
"notebook_name": notebook_config['instance_name'],
"notebook_image_name": notebook_config['notebook_image_name'],
"Action": "Create new notebook server",
"exploratory_url": [
{"description": "Jupyter",
"url": jupyter_notebook_acces_url},
{"description": "Ungit",
"url": jupyter_ungit_acces_url},
{"description": "Jupyter (via tunnel)",
"url": jupyter_ip_url},
{"description": "Ungit (via tunnel)",
"url": ungit_ip_url}
]}
result.write(json.dumps(res))
|
epam/DLab
|
infrastructure-provisioning/src/general/scripts/aws/jupyter_configure.py
|
Python
|
apache-2.0
| 15,517
|
[
30522,
1001,
999,
1013,
2149,
2099,
1013,
8026,
1013,
18750,
1001,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1001,
1001,
9385,
1006,
1039,
1007,
2355,
1010,
19044,
2213,
3001,
4297,
1001,
1001,
7000,
2104,
1996,
15895,
6105,
1010,
2544,
1016,
1012,
1014,
1006,
1996,
1000,
6105,
1000,
1007,
1025,
1001,
2017,
2089,
2025,
2224,
2023,
5371,
3272,
1999,
12646,
2007,
1996,
6105,
1012,
1001,
2017,
2089,
6855,
1037,
6100,
1997,
1996,
6105,
2012,
1001,
1001,
8299,
1024,
1013,
1013,
7479,
1012,
15895,
1012,
8917,
1013,
15943,
1013,
6105,
1011,
1016,
1012,
1014,
1001,
1001,
4983,
3223,
2011,
12711,
2375,
2030,
3530,
2000,
1999,
3015,
1010,
4007,
1001,
5500,
2104,
1996,
6105,
2003,
5500,
2006,
2019,
1000,
2004,
2003,
1000,
3978,
1010,
1001,
2302,
10943,
3111,
2030,
3785,
1997,
2151,
2785,
1010,
2593,
4671,
2030,
13339,
1012,
1001,
2156,
1996,
6105,
2005,
1996,
3563,
2653,
8677,
6656,
2015,
1998,
1001,
12546,
2104,
1996,
6105,
1012,
1001,
1001,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
1008,
12324,
15899,
12324,
1046,
3385,
12324,
25353,
2015,
2013,
21469,
7875,
1012,
6904,
2497,
12324,
1008,
2013,
21469,
7875,
1012,
18804,
1035,
5622,
2497,
12324,
1008,
2013,
21469,
7875,
1012,
4506,
1035,
5622,
2497,
12324,
1008,
12324,
9808,
12324,
12098,
21600,
11650,
2063,
11968,
8043,
1027,
12098,
21600,
11650,
2063,
1012,
6685,
19362,
8043,
1006,
1007,
11968,
8043,
1012,
5587,
1035,
6685,
1006,
1005,
1011,
1011,
1057,
21272,
1005,
1010,
2828,
1027,
2358,
2099,
1010,
12398,
1027,
1005,
1005,
1007,
12098,
5620,
1027,
11968,
8043,
1012,
11968,
3366,
1035,
12098,
5620,
1006,
1007,
2065,
1035,
1035,
2171,
1035,
1035,
1027,
1027,
1000,
1035,
1035,
2364,
1035,
1035,
1000,
1024,
2334,
1035,
8833,
1035,
5371,
18442,
1027,
1000,
1063,
1065,
1035,
1063,
1065,
1035,
1063,
1065,
1012,
8833,
1000,
1012,
4289,
1006,
9808,
1012,
4372,
21663,
2239,
1031,
1005,
9530,
2546,
1035,
7692,
1005,
1033,
30524,
1035,
8833,
1035,
5371,
15069,
1027,
1000,
1013,
15664,
1013,
1000,
1009,
9808,
1012,
4372,
21663,
2239,
1031,
1005,
9530,
2546,
30523,
1010,
9808,
1012,
4372,
21663,
2239,
1031,
1005,
3341,
1035,
5310,
1035,
2171,
1005,
1033,
1010,
9808,
1012,
4372,
21663,
2239,
1031,
1005,
5227,
1035,
8909,
1005,
1033,
1007,
2334,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0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
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1010,
9808,
1012,
4372,
21663,
2239,
1031,
1005,
3341,
1035,
5310,
1035,
2171,
1005,
1033,
1010,
9808,
1012,
4372,
21663,
2239,
1031,
1005,
5227,
1035,
8909,
1005,
1033,
1007,
2334,
30526
] |
//
//
// The Laxkit, a windowing toolkit
// Please consult http://laxkit.sourceforge.net about where to send any
// correspondence about this software.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Library General Public
// License as published by the Free Software Foundation; either
// version 2 of the License, or (at your option) any later version.
//
// This library is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
// Library General Public License for more details.
//
// You should have received a copy of the GNU Library General Public
// License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// Copyright (C) 2014,2015 by Tom Lechner
//
#ifndef _LAX_ENGRAVERFILLINTERFACE_H
#define _LAX_ENGRAVERFILLINTERFACE_H
#include <lax/interfaces/engraverfilldata.h>
#include <lax/interfaces/patchinterface.h>
#include <lax/interfaces/lineprofile.h>
#include <lax/interfaces/pathinterface.h>
#include <lax/interfaces/imageinterface.h>
#include <lax/interfaces/gradientinterface.h>
#include <lax/interfaces/curvemapinterface.h>
#include <lax/screencolor.h>
#include <lax/curveinfo.h>
#include <lax/noise.h>
namespace LaxInterfaces {
//------------------------------ EngraverFillInterface -------------------------------
//class EngraverInterfaceSettings
//{
// public:
// EngraverInterfaceSettings();
// virtual ~EngraverInterfaceSettings() {}
//
// Laxkit::ScreenColor fgcolor,bgcolor;
//
// int panelwidth;
//
// double sensitive_thickness;
// double sensitive_turbulence;
// double sensitive_drag;
// double sensitive_pushPull;
// double sensitive_avoidToward;
// double sensitive_twirl;
//};
class EngraverFillInterface : public PatchInterface
{
private:
unsigned int eventobject; //bit of a hack to remember which event when calling
int eventgroup; //helper windows from the group list
protected:
Laxkit::MenuInfo modes;
EngraverFillData *edata;
int mode;
int controlmode;
int submode;
int current_group;
//general tool settings
double brush_radius; //screen pixels
Laxkit::CurveInfo thickness; //ramp of thickness brush
double sensitive_thickness;
double sensitive_turbulence;
double sensitive_drag;
double sensitive_pushpull;
double sensitive_avoidtoward;
double sensitive_twirl;
double default_spacing;
EngraverLineQuality default_linequality;
EngraverTraceSettings default_trace;
//EngraverDirection default_direction;
//EngraverSpacing default_spacing;
NormalDirectionMap *directionmap;
Laxkit::RefPtrStack<TraceObject> traceobjects;
//for turbulence tool
double turbulence_size; //this*spacing
bool turbulence_per_line;
Laxkit::OpenSimplexNoise noise;
//decorations to show..
Laxkit::MenuInfo panel;
flatpoint list_offset;
bool show_group_list;
int show_points;
bool show_direction;
bool show_panel;
bool show_trace_object;
bool show_object;
bool grow_lines;
bool always_warp;
bool auto_reline;
//Laxkit::CurveInfo tracemap;
Laxkit::MenuItem *tracebox;
Laxkit::DoubleBBox panelbox;
Laxkit::IntRectangle sensbox;
//general display state
Laxkit::ScreenColor fgcolor,bgcolor;
unsigned long activate_color, deactivate_color;
int lasthover;
int lasthovercategory;
int lasthoverindex, lasthoverdetail;
flatpoint hover;
flatpoint hoverdir, hdir[10];
//Selection *selection;
CurveMapInterface curvemapi;
virtual int ActivatePathInterface();
virtual void ChangeMessage(int forwhich);
virtual int scanPanel(int x,int y, int *category, int *index_ret, int *detail_ret);
virtual int scanEngraving(int x,int y,unsigned int state, int *category, int *index_ret, int *detail_ret);
virtual int PerformAction(int action);
virtual void DrawOrientation(int over);
virtual void DrawPanel();
virtual void DrawPanelHeader(int open, int hover,const char *name, int x,int y,int w, int hh);
virtual void DrawLineGradient(double minx,double maxx,double miny,double maxy, int groupnum, int horizontal);
virtual void DrawSlider(double pos,int hovered, double x,double y,double w,double h, const char *text);
virtual void DrawCheckBox(int on, int hovered, double x,double y,double w,double h, const char *text);
virtual void DrawNumInput(double pos,int type,int hovered, double x,double y,double w,double h, const char *text);
virtual void DrawShadeGradient(double minx,double maxx,double miny,double maxy);
virtual int IsSharing(int what, EngraverPointGroup *group, int curgroup);
virtual void UpdatePanelAreas();
virtual Laxkit::MenuInfo *GetGroupMenu(int what);
virtual int NumGroupLines();
virtual EngraverFillData *GroupFromLineIndex(int i, int *gi);
virtual int CurrentLineIndex(int *maxindex);
virtual int PushToAll(int what, EngraverPointGroup *from,int fromi);
virtual int PushSettings(int what, EngraverPointGroup *from,int fromi, EngraverPointGroup *to,int toi);
virtual void UpdateDashCaches(EngraverLineQuality *dash);
public:
EngraverFillInterface(int nid, Laxkit::Displayer *ndp);
virtual ~EngraverFillInterface();
virtual Laxkit::ShortcutHandler *GetShortcuts();
virtual const char *IconId() { return "Engraver"; }
virtual const char *Name();
virtual const char *whattype() { return "EngraverFillInterface"; }
virtual const char *whatdatatype() { return "EngraverFillData"; }
virtual anInterface *duplicate(anInterface *dup);
virtual int UseThisObject(ObjectContext *oc);
virtual int UseThis(anObject *newdata,unsigned int mask=0);
virtual int UseThis(int id,int ndata);
virtual int DrawData(anObject *ndata,anObject *a1=NULL,anObject *a2=NULL,int info=0);
virtual int LBDown(int x,int y,unsigned int state,int count,const Laxkit::LaxMouse *d);
virtual int LBUp(int x,int y,unsigned int state,const Laxkit::LaxMouse *d);
virtual int WheelUp(int x,int y,unsigned int state,int count,const Laxkit::LaxMouse *d);
virtual int WheelDown(int x,int y,unsigned int state,int count,const Laxkit::LaxMouse *d);
virtual int MouseMove(int x,int y,unsigned int state,const Laxkit::LaxMouse *d);
virtual int CharInput(unsigned int ch,const char *buffer,int len,unsigned int state,const Laxkit::LaxKeyboard *d);
virtual int KeyUp(unsigned int ch,unsigned int state,const Laxkit::LaxKeyboard *d);
virtual int Refresh();
virtual int Event(const Laxkit::EventData *data, const char *mes);
virtual Laxkit::MenuInfo *ContextMenu(int x,int y,int deviceid, Laxkit::MenuInfo *menu);
virtual int InterfaceOff();
virtual int InitializeResources();
virtual void deletedata(bool flush_selection);
virtual PatchData *newPatchData(double xx,double yy,double ww,double hh,int nr,int nc,unsigned int stle);
//virtual void drawpatch(int roff,int coff);
//virtual void patchpoint(PatchRenderContext *context, double s0,double ds,double t0,double dt,int n);
virtual int ChangeMode(int newmode);
virtual const char *ModeTip(int mode);
virtual int Trace(bool do_once=false);
virtual int Reline(bool do_once=true, int which=3);
virtual int Grow(bool alldir, bool allindata);
virtual int AddToSelection(ObjectContext *oc);
};
} //namespace LaxInterfaces
#endif
|
tomlechner/laxkit
|
lax/interfaces/engraverfillinterface.h
|
C
|
lgpl-2.1
| 7,333
|
[
30522,
1013,
1013,
1013,
1013,
1013,
1013,
1996,
27327,
23615,
1010,
1037,
3332,
2075,
6994,
23615,
1013,
1013,
3531,
23363,
8299,
1024,
1013,
1013,
27327,
23615,
1012,
3120,
29278,
3351,
1012,
5658,
2055,
2073,
2000,
4604,
2151,
1013,
1013,
11061,
2055,
2023,
4007,
1012,
1013,
1013,
1013,
1013,
2023,
3075,
2003,
2489,
4007,
1025,
2017,
2064,
2417,
2923,
3089,
8569,
2618,
2009,
1998,
1013,
2030,
1013,
1013,
19933,
2009,
2104,
1996,
3408,
1997,
1996,
27004,
3075,
2236,
2270,
1013,
1013,
6105,
2004,
2405,
2011,
1996,
2489,
4007,
3192,
1025,
2593,
1013,
1013,
2544,
1016,
1997,
1996,
6105,
1010,
2030,
1006,
2012,
2115,
5724,
1007,
2151,
2101,
2544,
1012,
1013,
1013,
1013,
1013,
2023,
3075,
2003,
5500,
1999,
1996,
3246,
2008,
2009,
2097,
2022,
6179,
1010,
1013,
1013,
2021,
2302,
2151,
10943,
2100,
1025,
2302,
2130,
1996,
13339,
10943,
2100,
1997,
1013,
1013,
6432,
8010,
2030,
10516,
2005,
1037,
3327,
3800,
1012,
2156,
1996,
27004,
1013,
1013,
3075,
2236,
2270,
6105,
2005,
2062,
4751,
1012,
1013,
1013,
1013,
1013,
2017,
2323,
2031,
2363,
1037,
6100,
1997,
1996,
27004,
3075,
2236,
2270,
1013,
1013,
6105,
2247,
2007,
2023,
3075,
1025,
2065,
2025,
1010,
4339,
2000,
1996,
2489,
4007,
1013,
1013,
3192,
1010,
4297,
1012,
1010,
5354,
3379,
2173,
1010,
7621,
14210,
1010,
3731,
1010,
5003,
6185,
14526,
2487,
1011,
7558,
2581,
3915,
1013,
1013,
1013,
1013,
9385,
1006,
1039,
1007,
2297,
1010,
2325,
2011,
3419,
3393,
28254,
1013,
1013,
1001,
2065,
13629,
2546,
1035,
27327,
1035,
27771,
8873,
21202,
3334,
12172,
1035,
1044,
1001,
9375,
1035,
27327,
1035,
27771,
8873,
21202,
3334,
12172,
1035,
1044,
1001,
2421,
1026,
27327,
1013,
19706,
1013,
27771,
8873,
3363,
2850,
2696,
1012,
1044,
1028,
1001,
2421,
1026,
27327,
1013,
19706,
1013,
8983,
18447,
2121,
12172,
1012,
1044,
1028,
1001,
2421,
1026,
27327,
1013,
19706,
1013,
2240,
21572,
8873,
2571,
1012,
1044,
1028,
1001,
2421,
1026,
27327,
1013,
19706,
1013,
4130,
18447,
2121,
12172,
1012,
1044,
1028,
1001,
2421,
1026,
27327,
1013,
19706,
1013,
3746,
18447,
2121,
12172,
1012,
1044,
1028,
1001,
2421,
1026,
27327,
1013,
19706,
1013,
17978,
18447,
2121,
12172,
1012,
1044,
1028,
1001,
2421,
1026,
27327,
1013,
19706,
1013,
7774,
2863,
8091,
3334,
12172,
1012,
1044,
1028,
1001,
2421,
1026,
27327,
1013,
3898,
18717,
1012,
1044,
1028,
1001,
2421,
1026,
27327,
1013,
7774,
2378,
14876,
1012,
1044,
1028,
1001,
2421,
1026,
27327,
1013,
5005,
1012,
1044,
1028,
3415,
15327,
27327,
18447,
2121,
12172,
2015,
1063,
1013,
1013,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
30524,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1013,
1013,
2465,
27771,
18447,
2121,
12172,
21678,
8613,
1013,
1013,
1063,
1013,
1013,
2270,
1024,
1013,
1013,
27771,
18447,
2121,
12172,
21678,
8613,
1006,
1007,
1025,
1013,
1013,
7484,
30523,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
27771,
8873,
21202,
3334,
12172,
1011,
1011,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,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1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
1011,
27771,
8873,
21202,
3334,
12172,
1011,
1011,
30526
] |
# Agrimonia viscidula Bunge SPECIES
#### Status
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null
|
mdoering/backbone
|
life/Plantae/Magnoliophyta/Magnoliopsida/Rosales/Rosaceae/Agrimonia/Agrimonia viscidula/README.md
|
Markdown
|
apache-2.0
| 175
|
[
30522,
1001,
12943,
20026,
12488,
25292,
6895,
8566,
2721,
21122,
3351,
2427,
1001,
1001,
1001,
1001,
3570,
3970,
1001,
1001,
1001,
1001,
2429,
2000,
2248,
3269,
3415,
5950,
1001,
1001,
1001,
1001,
2405,
1999,
19701,
1001,
1001,
1001,
1001,
2434,
2171,
19701,
1001,
1001,
1001,
12629,
19701,
102,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1
] |
[
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
30526
] |
<?php
class modules_g2 {
/**
* @brief The base URL to the datepicker module. This will be correct whether it is in the
* application modules directory or the xataface modules directory.
*
* @see getBaseURL()
*/
private $baseURL = null;
/**
* @brief Returns the base URL to this module's directory. Useful for including
* Javascripts and CSS.
*
*/
public function getBaseURL(){
if ( !isset($this->baseURL) ){
$this->baseURL = Dataface_ModuleTool::getInstance()->getModuleURL(__FILE__);
}
return $this->baseURL;
}
public function __construct(){
$app = Dataface_Application::getInstance();
$s = DIRECTORY_SEPARATOR;
if ( isset($app->version) and $app->version >= 2 ){
$app->registerEventListener('SkinTool.ready', array($this, 'registerSkin'), true);
} else {
df_register_skin('g2', dirname(__FILE__).$s.'templates');
}
$app->registerEventListener('filterTemplateContext', array($this, 'filterTemplateContext'));
$jt = Dataface_JavascriptTool::getInstance();
$jt->ignore('jquery.packed.js');
$jt->ignore('jquery-ui.min.js');
$jt->ignore('xatajax.core.js');
$jt->ignore('xatajax.util.js');
$jt->ignore('xataface/lang.js');
$jt->ignoreCss('jquery-ui/jquery-ui.css');
$app->addHeadContent('<script src="'.htmlspecialchars(DATAFACE_URL.'/js/xataface/lang.js').'"></script>');
$app->addHeadContent('<script src="'.htmlspecialchars(DATAFACE_URL.'/modules/XataJax/js/jquery.packed.js').'"></script>');
$app->addHeadContent('<script src="'.htmlspecialchars(DATAFACE_URL.'/modules/XataJax/js/jquery-ui.min.js').'"></script>');
$app->addHeadContent('<script src="'.htmlspecialchars(DATAFACE_URL.'/modules/XataJax/js/xatajax.core.js').'"></script>');
$app->addHeadContent('<script src="'.htmlspecialchars(DATAFACE_URL.'/modules/XataJax/js/xatajax.util.js').'"></script>');
$app->addHeadContent('<link rel="stylesheet" type="text/css" href="'.htmlspecialchars(DATAFACE_URL.'/modules/XataJax/css/jquery-ui/jquery-ui.css').'"/>');
$app->addHeadContent('<link rel="stylesheet" type="text/css" href="'.htmlspecialchars($this->getBaseURL().'/css/xataface-global.css').'"/>');
$jt->addPath(dirname(__FILE__).$s.'js', $this->getBaseURL().'/js');
$ct = Dataface_CSSTool::getInstance();
$ct->addPath(dirname(__FILE__).$s.'css', $this->getBaseURL().'/css');
$jt->import('xataface/modules/g2/global.js');
$app->addJSStrings(array(
'themes.g2.VIEW_SEARCH_RESULTS' => df_translate('themes.g2.VIEW_SEARCH_RESULTS', 'View Search Results'),
'themes.g2.SEARCH_RESULTS' => df_translate('themes.g2.SEARCH_RESULTS', 'Search Results'),
'findwidgets.date.from' => df_translate('findwidgets.date.from', 'From'),
'findwidgets.date.to' => df_translate('findwidgets.date.to', 'to')
));
// Let's create the actions for our tables.
$app = Dataface_Application::getInstance();
$order = -1000;
$prefix = 'top_left_menu_actions_';
$at = Dataface_ActionTool::getInstance();
foreach ($app->_conf['_tables'] as $k=>$v){
$nav = $app->getNavItem($k, $v);
if ( $nav ){
$action = array(
'name' => $prefix.$k,
'label' => $nav['label'],
'description' => @$nav['description'],
'selected' => @$nav['selected'],
'url' => @$nav['href'],
'category' => 'top_left_menu_bar',
'order' => $order++
);
if ( @$nav['permission'] ){
$action['permission'] = $nav['permission'];
}
if ( @$nav['condition'] ){
$action['condition'] = $nav['condition'];
}
$at->addAction($prefix.$k, $action);
}
}
}
public function registerSkin(){
$s = DIRECTORY_SEPARATOR;
df_register_skin('g2', dirname(__FILE__).$s.'templates');
}
/**
* We just want this to run before the left column is rendered.. We're not using it for output
*/
public function block__before_left_column(){
// Let's create the actions for our tables.
$app = Dataface_Application::getInstance();
$query = $app->getQuery();
$order = -1000;
$at = Dataface_ActionTool::getInstance();
$table = Dataface_Table::loadTable($query['-table']);
$search = $this->getCurrentSearch();
if ( @$query['-search'] ) $search['-search'] = $query['-search'];
$showAll = array(
'name' => 'show_all_records',
'label' => df_translate('actions.show_all_records.label', 'All '.$table->getLabel()),
'description' => df_translate('actions.show_all_records.description', 'Show all records in '.$table->getLabel()),
'selected' => !$search and (@$query['-mode'] == 'list'),
'url' => DATAFACE_SITE_HREF.'?-table='.htmlspecialchars($table->tablename),
'category' => 'table_quicklinks',
'order' => -1000
);
$at->addAction('show_all_records', $showAll);
// We want to get the last search results
/*
$thisSearch = $search;
if ( !$search ){
$thisSearch = @$_SESSION['xf_last_search_query'];
if ( $thisSearch ){
$thisSearch = @$thisSearch[$query['-table']];
}
} else {
$_SESSION['xf_last_search_query'][$query['-table']] = $search;
}
if ( $thisSearch){
$searchResults = array(
'name' => 'search_results',
'label' => 'Search Results',
'description' => 'Search results',
'selected' => $search,
'url' => $app->url($thisSearch),
'category' => 'table_quicklinks',
'order' => -999
);
$at->addAction('search_results', $searchResults);
}
*/
}
public function filterTemplateContext($event){
$event->context['G2'] = $this;
}
public function getSearchParameters(){
$query = Dataface_Application::getInstance()->getQuery();
$table = Dataface_Table::loadTable($query['-table']);
if ( PEAR::isError($table) ){
throw new Exception($table->getMessage(), $table->getCode());
}
$out = array();
foreach ($query as $k=>$v){
if ( $v and $table->hasField($k)){
$fld =& $table->getField($k);
if (isset($fld['silent_filter'])) {
continue;
}
$out[$fld['widget']['label']] = $v;
unset($fld);
}
}
if ( @$query['-search'] ) $out['Keywords'] = $query['-search'];
return $out;
}
public function getCurrentSearch(){
$query = Dataface_Application::getInstance()->getQuery();
$table = Dataface_Table::loadTable($query['-table']);
if ( PEAR::isError($table) ){
throw new Exception($table->getMessage(), $table->getCode());
}
$out = array();
foreach ($query as $k=>$v){
if ( $v and $table->hasField($k) ){
$fld =& $table->getField($k);
$out[$k] = $v;
unset($fld);
}
}
if ( @$query['-search']){
$out['-search'] = $query['-search'];
}
return $out;
}
function block__head(){
$app = Dataface_Application::getInstance();
$query = $app->getQuery();
$record = $app->getRecord();
$out = array();
$out[] = '<meta id="xf-meta-tablename" name="xf-tablename" content="'.htmlspecialchars($query['-table']).'"/>';
if ( $record and $query['-mode'] == 'browse' ){
$out[] = '<meta id="xf-meta-record-id" name="xf-record-id" content="'.htmlspecialchars($record->getId()).'"/>';
$out[] = '<meta id="xf-meta-record-title" name="xf-record-title" content="'.htmlspecialchars($record->getTitle()).'"/>';
} else if ($query['-mode'] == 'list' ){
$currSearch = $this->getCurrentSearch();
if ( $currSearch ){
$out[] = '<meta id="xf-meta-search-query" name="xf-search-query" content="'.htmlspecialchars(http_build_query($currSearch)).'"/>';
}
}
echo implode("\n", $out);
}
function get_property($key, $default=null){
$app =& Dataface_Application::getInstance();
if ( @$app->_conf['modules_g2'] and isset($app->_conf['modules_g2'][$key]) ){
return $app->_conf['modules_g2'][$key];
} else {
return $default;
}
}
}
|
shannah/xataface
|
modules/g2/g2.php
|
PHP
|
gpl-2.0
| 7,713
|
[
30522,
1026,
1029,
25718,
2465,
14184,
1035,
1043,
2475,
1063,
1013,
1008,
1008,
1008,
1030,
4766,
1996,
2918,
24471,
2140,
2000,
1996,
3058,
24330,
5484,
11336,
1012,
2023,
2097,
2022,
6149,
3251,
2009,
2003,
1999,
1996,
1008,
4646,
14184,
14176,
2030,
1996,
1060,
6790,
12172,
14184,
14176,
1012,
1008,
1008,
1030,
2156,
2131,
15058,
3126,
2140,
1006,
1007,
1008,
1013,
2797,
1002,
2918,
3126,
2140,
1027,
19701,
1025,
1013,
1008,
1008,
1008,
1030,
4766,
5651,
1996,
2918,
24471,
2140,
2000,
2023,
11336,
1005,
1055,
14176,
1012,
6179,
2005,
2164,
1008,
9262,
22483,
2015,
1998,
20116,
2015,
1012,
1008,
1008,
1013,
2270,
3853,
2131,
15058,
3126,
2140,
1006,
1007,
1063,
2065,
1006,
999,
26354,
3388,
1006,
1002,
2023,
1011,
1028,
2918,
3126,
2140,
1007,
1007,
1063,
1002,
2023,
1011,
1028,
2918,
3126,
2140,
1027,
2951,
12172,
1035,
11336,
3406,
4747,
1024,
1024,
2131,
7076,
26897,
1006,
1007,
1011,
1028,
2131,
5302,
8566,
2571,
3126,
2140,
1006,
1035,
1035,
5371,
1035,
1035,
1007,
1025,
1065,
2709,
1002,
2023,
1011,
1028,
2918,
3126,
2140,
1025,
1065,
2270,
3853,
1035,
1035,
9570,
1006,
1007,
1063,
1002,
10439,
1027,
2951,
12172,
1035,
4646,
1024,
1024,
2131,
7076,
26897,
1006,
1007,
1025,
1002,
1055,
1027,
14176,
1035,
19802,
30524,
1002,
10439,
1011,
1028,
4236,
18697,
3372,
9863,
24454,
1006,
1005,
3096,
3406,
4747,
1012,
3201,
1005,
1010,
9140,
1006,
1002,
2023,
1010,
1005,
18687,
4939,
1005,
1007,
1010,
2995,
1007,
1025,
1065,
2842,
1063,
1040,
2546,
1035,
4236,
1035,
3096,
1006,
1005,
1043,
2475,
1005,
1010,
16101,
18442,
1006,
1035,
1035,
5371,
1035,
1035,
1007,
1012,
1002,
1055,
1012,
1005,
23561,
2015,
1005,
1007,
1025,
1065,
1002,
10439,
1011,
1028,
4236,
18697,
3372,
9863,
24454,
1006,
1005,
11307,
18532,
15725,
8663,
18209,
1005,
1010,
9140,
1006,
1002,
2023,
1010,
1005,
11307,
18532,
15725,
8663,
18209,
1005,
1007,
1007,
1025,
1002,
1046,
2102,
1027,
2951,
12172,
1035,
9262,
22483,
3406,
4747,
1024,
1024,
2131,
7076,
26897,
1006,
1007,
1025,
1002,
1046,
2102,
1011,
1028,
8568,
1006,
1005,
1046,
4226,
2854,
1012,
8966,
1012,
1046,
2015,
1005,
1007,
1025,
1002,
1046,
2102,
1011,
1028,
8568,
1006,
1005,
1046,
4226,
2854,
1011,
21318,
1012,
8117,
1012,
1046,
2015,
1005,
1007,
1025,
1002,
1046,
2102,
1011,
1028,
8568,
1006,
1005,
1060,
6790,
3900,
2595,
1012,
4563,
1012,
1046,
2015,
1005,
1007,
1025,
1002,
1046,
2102,
1011,
1028,
8568,
1006,
1005,
1060,
6790,
3900,
2595,
1012,
21183,
4014,
1012,
1046,
2015,
1005,
1007,
1025,
1002,
1046,
2102,
1011,
1028,
8568,
1006,
1005,
1060,
6790,
12172,
1013,
11374,
1012,
1046,
2015,
1005,
1007,
1025,
1002,
1046,
2102,
1011,
1028,
8568,
6169,
2015,
1006,
1005,
1046,
4226,
2854,
1011,
21318,
1013,
1046,
4226,
2854,
1011,
21318,
1012,
20116,
2015,
1005,
1007,
1025,
1002,
10439,
1011,
1028,
5587,
4974,
8663,
6528,
2102,
1006,
1005,
1026,
5896,
5034,
2278,
1027,
1000,
1005,
1012,
16129,
13102,
8586,
4818,
7507,
2869,
1006,
30523,
25879,
2953,
1025,
2065,
1006,
26354,
3388,
1006,
1002,
10439,
1011,
1028,
2544,
1007,
1998,
1002,
10439,
1011,
1028,
2544,
1028,
1027,
1016,
1007,
1063,
30526
] |
[
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
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
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
-100,
25879,
2953,
1025,
2065,
1006,
26354,
3388,
1006,
1002,
10439,
1011,
1028,
2544,
1007,
1998,
1002,
10439,
1011,
1028,
2544,
1028,
1027,
1016,
1007,
1063,
30526
] |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.