Dataset Preview
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code: DatasetGenerationError
Exception: ArrowInvalid
Message: JSON parse error: Missing a closing quotation mark in string. in row 496
Traceback: Traceback (most recent call last):
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 145, in _generate_tables
dataset = json.load(f)
File "/usr/local/lib/python3.9/json/__init__.py", line 293, in load
return loads(fp.read(),
File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 761)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1995, in _prepare_split_single
for _, table in generator:
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 148, in _generate_tables
raise e
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 122, in _generate_tables
pa_table = paj.read_json(
File "pyarrow/_json.pyx", line 308, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: JSON parse error: Missing a closing quotation mark in string. in row 496
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1529, in compute_config_parquet_and_info_response
parquet_operations = convert_to_parquet(builder)
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1154, in convert_to_parquet
builder.download_and_prepare(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1027, in download_and_prepare
self._download_and_prepare(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1122, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1882, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2038, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
text
string | meta
dict |
|---|---|
<?php
namespace Apple\ApnPush;
use Apple\ApnPush\Notification\Notification as BaseNotification;
/**
* This is a shortcut class
* See \Apple\ApnPush\Notification\Notification
*/
class Notification extends BaseNotification
{
}
|
{
"content_hash": "e5fa37f9514ec334082032003976c741",
"timestamp": "",
"source": "github",
"line_count": 15,
"max_line_length": 64,
"avg_line_length": 15.533333333333333,
"alnum_prop": 0.7725321888412017,
"repo_name": "jbboehr/AppleApnPush",
"id": "0675098379325db68357b4b4360d056df20c61f7",
"size": "461",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Notification.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "151295"
}
]
}
|
var mk = require('safe-mkdir');
mk.mkdir('./typings/modules');
var gc = require('glob-copy');
gc('./node_modules/aurelia-*/dist/system/*.d.ts', './typings/modules',
function(err, files)
{ console.log("copied " + files.length + " files to ./typings/modules");}
);
|
{
"content_hash": "7ae2f5e161155394a7a4f9416dacde38",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 77,
"avg_line_length": 27.3,
"alnum_prop": 0.6336996336996337,
"repo_name": "Vheissu/aurelia-typescript-webpack-starter",
"id": "1c29058c2e42008d76af7ba02db7766efa1a70a9",
"size": "273",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "copy-typings.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "57"
},
{
"name": "HTML",
"bytes": "557"
},
{
"name": "JavaScript",
"bytes": "5342"
},
{
"name": "TypeScript",
"bytes": "772"
}
]
}
|
namespace T5.ExtractSongsTitles
{
using System;
using System.Xml;
internal class Program
{
private static void Main()
{
Console.WriteLine("List of Songs' Titles using XmlReader:");
using (var reader = XmlReader.Create("../../../catalogue.xml"))
{
while (reader.Read())
{
if (reader.NodeType == XmlNodeType.Element && (reader.Name =="title"))
{
Console.WriteLine(reader.ReadElementString());
}
}
}
}
}
}
|
{
"content_hash": "017084e112688db0a4a83c36efed75c9",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 87,
"avg_line_length": 26.91304347826087,
"alnum_prop": 0.4620355411954766,
"repo_name": "studware/Ange-Git",
"id": "e1bae3c6bc0755142ecf823ead8a7ab046f7eada",
"size": "621",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "MyTelerikAcademyHomeWorks/DataBase/HW2.XML-Processing-in-.NET/T5.ExtractSongsTitles/Program.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "1833657"
},
{
"name": "CSS",
"bytes": "52022"
},
{
"name": "HTML",
"bytes": "48849"
},
{
"name": "JavaScript",
"bytes": "6247"
},
{
"name": "PLSQL",
"bytes": "6610"
},
{
"name": "PowerShell",
"bytes": "332"
},
{
"name": "XSLT",
"bytes": "2371"
}
]
}
|
package com.gdn.venice.server.app.kpi.presenter.commands;
import java.util.HashMap;
import java.util.List;
import com.djarum.raf.utilities.Locator;
import com.gdn.venice.client.util.Util;
import com.gdn.venice.facade.KpiMeasurementPeriodSessionEJBRemote;
import com.gdn.venice.persistence.KpiMeasurementPeriod;
import com.gdn.venice.persistence.KpiTargetBaseline;
import com.gdn.venice.server.command.RafRpcCommand;
/**
* Fetch Command for Blacklist Source
*
* @author Roland
*/
public class FetchKpiSetupPartySlaDataCommandComboBoxPeriod implements RafRpcCommand{
public String execute() {
Locator<Object> locator=null;
HashMap<Integer, String> mapp = new HashMap<Integer, String>();
HashMap<String, String> map = new HashMap<String, String>();
try{
locator = new Locator<Object>();
KpiMeasurementPeriodSessionEJBRemote sessionHome = (KpiMeasurementPeriodSessionEJBRemote) locator.lookup(KpiMeasurementPeriodSessionEJBRemote.class, "KpiMeasurementPeriodSessionEJBBean");
List<KpiMeasurementPeriod> kpiPeriodListSource = null;
String query = "select o from KpiMeasurementPeriod o";
kpiPeriodListSource = sessionHome.queryByRange(query, 0, 0);
for(int i=0; i<kpiPeriodListSource.size();i++){
KpiMeasurementPeriod list = kpiPeriodListSource.get(i);
mapp.put(new Integer(list.getKpiPeriodId().toString()), list.getDescription());
}
map=Util.SortedHashMap(mapp, "asc");
}catch(Exception e){
e.printStackTrace();
}finally{
try{
if(locator!=null){
locator.close();
}
}catch(Exception e){
e.printStackTrace();
}
}
return Util.formXMLfromHashMap(map);
}
}
|
{
"content_hash": "bce2f55685cb14a34611c53cb82308c9",
"timestamp": "",
"source": "github",
"line_count": 51,
"max_line_length": 193,
"avg_line_length": 32.529411764705884,
"alnum_prop": 0.7474382157926461,
"repo_name": "yauritux/venice-legacy",
"id": "f0e75f64d4c21a507bbe7d2c89e75513d2f68d41",
"size": "1659",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Venice/Venice-Web/src/main/java/com/gdn/venice/server/app/kpi/presenter/commands/FetchKpiSetupPartySlaDataCommandComboBoxPeriod.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ASP",
"bytes": "270052"
},
{
"name": "ActionScript",
"bytes": "241582"
},
{
"name": "C#",
"bytes": "77780"
},
{
"name": "CSS",
"bytes": "281718"
},
{
"name": "Java",
"bytes": "19297374"
},
{
"name": "JavaScript",
"bytes": "426505"
},
{
"name": "PHP",
"bytes": "443666"
},
{
"name": "Perl",
"bytes": "1716"
},
{
"name": "Ruby",
"bytes": "152554"
},
{
"name": "Visual Basic",
"bytes": "71378"
},
{
"name": "XSLT",
"bytes": "207588"
}
]
}
|
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
Pernettya angustifolia Lindl.
### Remarks
null
|
{
"content_hash": "eedc4da6d20316ff06eedadf5aef730f",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 31,
"avg_line_length": 11.615384615384615,
"alnum_prop": 0.7350993377483444,
"repo_name": "mdoering/backbone",
"id": "17176c2c52e48bfefe44e95a1faaf411ae87925e",
"size": "236",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Ericales/Ericaceae/Gaultheria/Gaultheria mucronata/Gaultheria mucronata angustifolia/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": []
}
|
IMesh* CSmokeSystem::particleMsh = nullptr;
CSmokeSystem::CSmokeSystem() : CBaseParticle()
{
for (int i = 0; i < AMOUNT_OF_PARTICLES; i++)
{
particleArray[i].mPartMdl = particleMsh->CreateModel(0, 0, 0);
particleArray[i].mVelocity = 70.0f;
particleArray[i].mLifeTime = 0.0f;
particleArray[i].mlifeSpan = random(2.0f, 9.0f);
particleArray[i].mPartMdl->Scale(0.1);
}
}
CSmokeSystem::~CSmokeSystem()
{
for (int i = 0; i < AMOUNT_OF_PARTICLES; i++)
{
IMesh* pMesh = particleArray[i].mPartMdl->GetMesh();
pMesh->RemoveModel(particleArray[i].mPartMdl);
}
}
void CSmokeSystem::update(float frametime, CPlayer* playerPtr)
{
for (int i = 0; i < AMOUNT_OF_PARTICLES; i++)
{
if (particleArray[i].mLifeTime > particleArray[i].mlifeSpan)
{
particleArray[i].mPartMdl->SetPosition(playerPtr->GetX(), playerPtr->GetY(), playerPtr->GetZ());
particleArray[i].mDirX = random(-5, 5);
particleArray[i].mVelocity = random(5, 7);
particleArray[i].mLifeTime = 0.0f * frametime;
}
else
{
particleArray[i].mPartMdl->MoveX(particleArray[i].mDirX * frametime);
particleArray[i].mPartMdl->MoveY(particleArray[i].mVelocity * frametime);
particleArray[i].mLifeTime += 2 * frametime;
particleArray[i].mPartMdl->LookAt(playerPtr->GetCamera());
particleArray[i].mPartMdl->Scale(0.3);
}
}
}
|
{
"content_hash": "f928d2a2798c4d9588763ba3d0477795",
"timestamp": "",
"source": "github",
"line_count": 46,
"max_line_length": 99,
"avg_line_length": 29.76086956521739,
"alnum_prop": 0.6639883126369612,
"repo_name": "Game-Project-University/Professional-Skills-Games-Project",
"id": "5be6617933f9776c799a02f9b2a8e1782b65743d",
"size": "1395",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Game_Project/SmokeSystem.cpp",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C++",
"bytes": "125674"
},
{
"name": "Logos",
"bytes": "12824844"
}
]
}
|
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<TextView
android:id="@+id/variable_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content" >
<EditText
android:id="@+id/set_variable_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" >
<requestFocus />
</EditText>
<Button
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="0.18"
android:text="Set"
android:onClick="setVariable" />
</LinearLayout>
</LinearLayout>
|
{
"content_hash": "a7af79089d25c6f6522194b519776e9f",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 72,
"avg_line_length": 30.352941176470587,
"alnum_prop": 0.6027131782945736,
"repo_name": "orbekk/master",
"id": "4570577d18198a2ab65b8d86ce491de0f0fe5ac4",
"size": "1032",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "same-android/res/layout/variable_test.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "610071"
},
{
"name": "Shell",
"bytes": "588"
}
]
}
|
/**
* RL2 file demuxer
* @file
* @author Sascha Sommer (saschasommer@freenet.de)
* @see http://wiki.multimedia.cx/index.php?title=RL2
*
* extradata:
* 2 byte le initial drawing offset within 320x200 viewport
* 4 byte le number of used colors
* 256 * 3 bytes rgb palette
* optional background_frame
*/
#include <stdint.h>
#include "libavutil/intreadwrite.h"
#include "libavutil/mathematics.h"
#include "avformat.h"
#include "internal.h"
#define EXTRADATA1_SIZE (6 + 256 * 3) ///< video base, clr, palette
#define FORM_TAG MKBETAG('F', 'O', 'R', 'M')
#define RLV2_TAG MKBETAG('R', 'L', 'V', '2')
#define RLV3_TAG MKBETAG('R', 'L', 'V', '3')
typedef struct Rl2DemuxContext {
unsigned int index_pos[2]; ///< indexes in the sample tables
} Rl2DemuxContext;
/**
* check if the file is in rl2 format
* @param p probe buffer
* @return 0 when the probe buffer does not contain rl2 data, > 0 otherwise
*/
static int rl2_probe(AVProbeData *p)
{
if(AV_RB32(&p->buf[0]) != FORM_TAG)
return 0;
if(AV_RB32(&p->buf[8]) != RLV2_TAG &&
AV_RB32(&p->buf[8]) != RLV3_TAG)
return 0;
return AVPROBE_SCORE_MAX;
}
/**
* read rl2 header data and setup the avstreams
* @param s demuxer context
* @return 0 on success, AVERROR otherwise
*/
static av_cold int rl2_read_header(AVFormatContext *s)
{
AVIOContext *pb = s->pb;
AVStream *st;
unsigned int frame_count;
unsigned int audio_frame_counter = 0;
unsigned int video_frame_counter = 0;
unsigned int back_size;
unsigned short sound_rate;
unsigned short rate;
unsigned short channels;
unsigned short def_sound_size;
unsigned int signature;
unsigned int pts_den = 11025; /* video only case */
unsigned int pts_num = 1103;
unsigned int* chunk_offset = NULL;
int* chunk_size = NULL;
int* audio_size = NULL;
int i;
int ret = 0;
avio_skip(pb,4); /* skip FORM tag */
back_size = avio_rl32(pb); /**< get size of the background frame */
signature = avio_rb32(pb);
avio_skip(pb, 4); /* data size */
frame_count = avio_rl32(pb);
/* disallow back_sizes and frame_counts that may lead to overflows later */
if(back_size > INT_MAX/2 || frame_count > INT_MAX / sizeof(uint32_t))
return AVERROR_INVALIDDATA;
avio_skip(pb, 2); /* encoding mentod */
sound_rate = avio_rl16(pb);
rate = avio_rl16(pb);
channels = avio_rl16(pb);
def_sound_size = avio_rl16(pb);
/** setup video stream */
st = avformat_new_stream(s, NULL);
if(!st)
return AVERROR(ENOMEM);
st->codecpar->codec_type = AVMEDIA_TYPE_VIDEO;
st->codecpar->codec_id = AV_CODEC_ID_RL2;
st->codecpar->codec_tag = 0; /* no fourcc */
st->codecpar->width = 320;
st->codecpar->height = 200;
/** allocate and fill extradata */
st->codecpar->extradata_size = EXTRADATA1_SIZE;
if(signature == RLV3_TAG && back_size > 0)
st->codecpar->extradata_size += back_size;
if(ff_get_extradata(s, st->codecpar, pb, st->codecpar->extradata_size) < 0)
return AVERROR(ENOMEM);
/** setup audio stream if present */
if(sound_rate){
if (!channels || channels > 42) {
av_log(s, AV_LOG_ERROR, "Invalid number of channels: %d\n", channels);
return AVERROR_INVALIDDATA;
}
pts_num = def_sound_size;
pts_den = rate;
st = avformat_new_stream(s, NULL);
if (!st)
return AVERROR(ENOMEM);
st->codecpar->codec_type = AVMEDIA_TYPE_AUDIO;
st->codecpar->codec_id = AV_CODEC_ID_PCM_U8;
st->codecpar->codec_tag = 1;
st->codecpar->channels = channels;
st->codecpar->bits_per_coded_sample = 8;
st->codecpar->sample_rate = rate;
st->codecpar->bit_rate = st->codecpar->channels * st->codecpar->sample_rate *
st->codecpar->bits_per_coded_sample;
st->codecpar->block_align = st->codecpar->channels *
st->codecpar->bits_per_coded_sample / 8;
avpriv_set_pts_info(st,32,1,rate);
}
avpriv_set_pts_info(s->streams[0], 32, pts_num, pts_den);
chunk_size = av_malloc(frame_count * sizeof(uint32_t));
audio_size = av_malloc(frame_count * sizeof(uint32_t));
chunk_offset = av_malloc(frame_count * sizeof(uint32_t));
if(!chunk_size || !audio_size || !chunk_offset){
av_free(chunk_size);
av_free(audio_size);
av_free(chunk_offset);
return AVERROR(ENOMEM);
}
/** read offset and size tables */
for(i=0; i < frame_count;i++)
chunk_size[i] = avio_rl32(pb);
for(i=0; i < frame_count;i++)
chunk_offset[i] = avio_rl32(pb);
for(i=0; i < frame_count;i++)
audio_size[i] = avio_rl32(pb) & 0xFFFF;
/** build the sample index */
for(i=0;i<frame_count;i++){
if(chunk_size[i] < 0 || audio_size[i] > chunk_size[i]){
ret = AVERROR_INVALIDDATA;
break;
}
if(sound_rate && audio_size[i]){
av_add_index_entry(s->streams[1], chunk_offset[i],
audio_frame_counter,audio_size[i], 0, AVINDEX_KEYFRAME);
audio_frame_counter += audio_size[i] / channels;
}
av_add_index_entry(s->streams[0], chunk_offset[i] + audio_size[i],
video_frame_counter,chunk_size[i]-audio_size[i],0,AVINDEX_KEYFRAME);
++video_frame_counter;
}
av_free(chunk_size);
av_free(audio_size);
av_free(chunk_offset);
return ret;
}
/**
* read a single audio or video packet
* @param s demuxer context
* @param pkt the packet to be filled
* @return 0 on success, AVERROR otherwise
*/
static int rl2_read_packet(AVFormatContext *s,
AVPacket *pkt)
{
Rl2DemuxContext *rl2 = s->priv_data;
AVIOContext *pb = s->pb;
AVIndexEntry *sample = NULL;
int i;
int ret = 0;
int stream_id = -1;
int64_t pos = INT64_MAX;
/** check if there is a valid video or audio entry that can be used */
for(i=0; i<s->nb_streams; i++){
if(rl2->index_pos[i] < s->streams[i]->nb_index_entries
&& s->streams[i]->index_entries[ rl2->index_pos[i] ].pos < pos){
sample = &s->streams[i]->index_entries[ rl2->index_pos[i] ];
pos= sample->pos;
stream_id= i;
}
}
if(stream_id == -1)
return AVERROR_EOF;
++rl2->index_pos[stream_id];
/** position the stream (will probably be there anyway) */
avio_seek(pb, sample->pos, SEEK_SET);
/** fill the packet */
ret = av_get_packet(pb, pkt, sample->size);
if(ret != sample->size){
av_packet_unref(pkt);
return AVERROR(EIO);
}
pkt->stream_index = stream_id;
pkt->pts = sample->timestamp;
return ret;
}
/**
* seek to a new timestamp
* @param s demuxer context
* @param stream_index index of the stream that should be seeked
* @param timestamp wanted timestamp
* @param flags direction and seeking mode
* @return 0 on success, -1 otherwise
*/
static int rl2_read_seek(AVFormatContext *s, int stream_index, int64_t timestamp, int flags)
{
AVStream *st = s->streams[stream_index];
Rl2DemuxContext *rl2 = s->priv_data;
int i;
int index = av_index_search_timestamp(st, timestamp, flags);
if(index < 0)
return -1;
rl2->index_pos[stream_index] = index;
timestamp = st->index_entries[index].timestamp;
for(i=0; i < s->nb_streams; i++){
AVStream *st2 = s->streams[i];
index = av_index_search_timestamp(st2,
av_rescale_q(timestamp, st->time_base, st2->time_base),
flags | AVSEEK_FLAG_BACKWARD);
if(index < 0)
index = 0;
rl2->index_pos[i] = index;
}
return 0;
}
AVInputFormat ff_rl2_demuxer = {
.name = "rl2",
.long_name = NULL_IF_CONFIG_SMALL("RL2"),
.priv_data_size = sizeof(Rl2DemuxContext),
.read_probe = rl2_probe,
.read_header = rl2_read_header,
.read_packet = rl2_read_packet,
.read_seek = rl2_read_seek,
};
|
{
"content_hash": "2e859be25eb67aca3259b79dd52ef6f2",
"timestamp": "",
"source": "github",
"line_count": 277,
"max_line_length": 92,
"avg_line_length": 29.32490974729242,
"alnum_prop": 0.5922688661824449,
"repo_name": "darlyhellen/oto",
"id": "69e8be2e578c584d63a4811ca1fcb9cbfc4bcb23",
"size": "8972",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "NDKFFmpeg/jni/ffmpeg/libavformat/rl2.c",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Assembly",
"bytes": "2888454"
},
{
"name": "C",
"bytes": "43819918"
},
{
"name": "C++",
"bytes": "766406"
},
{
"name": "CSS",
"bytes": "4996"
},
{
"name": "Groff",
"bytes": "132"
},
{
"name": "HTML",
"bytes": "12881"
},
{
"name": "Java",
"bytes": "3538043"
},
{
"name": "JavaScript",
"bytes": "3196"
},
{
"name": "Makefile",
"bytes": "572934"
},
{
"name": "Objective-C",
"bytes": "90626"
},
{
"name": "Perl",
"bytes": "48238"
},
{
"name": "Python",
"bytes": "1743"
},
{
"name": "Shell",
"bytes": "52374"
},
{
"name": "Verilog",
"bytes": "1242"
}
]
}
|
#include "abstractedgeoperator.h"
#include <annis/util/comparefunctions.h> // for checkAnnotationEqual
#include <annis/wrapper.h> // for ListWrapper
#include <google/btree.h> // for btree_iterator
#include <google/btree_map.h> // for btree_map
#include <google/btree_set.h> // for btree_set
#include <stddef.h> // for size_t
#include <algorithm> // for max, min, move
#include <cmath> // for ceil
#include <limits> // for numeric_limits
#include <set> // for set
#include <utility> // for pair
#include "annis/annosearch/nodebyedgeannosearch.h" // for NodeByEdgeAnnoSearch
#include "annis/annostorage.h" // for AnnoStorage
#include "annis/graphstorage/graphstorage.h" // for ReadableGraphStorage
#include "annis/iterators.h" // for EdgeIterator, AnnoIt
#include "annis/stringstorage.h" // for StringStorage
#include <annis/types.h>
#include <annis/annosearch/exactannokeysearch.h>
using namespace annis;
AbstractEdgeOperator::AbstractEdgeOperator(ComponentType componentType, std::string ns, std::string name,
DB::GetGSFuncT getGraphStorageFunc,
const DB& db,
unsigned int minDistance, unsigned int maxDistance)
: componentType(componentType),
getGraphStorageFunc(getGraphStorageFunc),
db(db),
strings(db.strings), ns(ns), name(name),
minDistance(minDistance), maxDistance(maxDistance),
anyAnno(Init::initAnnotation()), edgeAnno(anyAnno)
{
initGraphStorage();
}
AbstractEdgeOperator::AbstractEdgeOperator(ComponentType componentType, std::string name,
DB::GetAllGSFuncT getAllGraphStorageFunc,
const DB& db,
unsigned int minDistance, unsigned int maxDistance)
: componentType(componentType),
getAllGraphStorageFunc(getAllGraphStorageFunc),
db(db),
strings(db.strings), ns(""), name(name),
minDistance(minDistance), maxDistance(maxDistance),
anyAnno(Init::initAnnotation()), edgeAnno(anyAnno)
{
initGraphStorage();
}
AbstractEdgeOperator::AbstractEdgeOperator(ComponentType componentType, std::string ns, std::string name,
DB::GetGSFuncT getGraphStorageFunc,
const DB& db,
const Annotation& edgeAnno)
: componentType(componentType),
getGraphStorageFunc(getGraphStorageFunc),
db(db),
strings(db.strings), ns(ns), name(name),
minDistance(1), maxDistance(1),
anyAnno(Init::initAnnotation()), edgeAnno(edgeAnno)
{
initGraphStorage();
}
AbstractEdgeOperator::AbstractEdgeOperator(ComponentType componentType, std::string name,
DB::GetAllGSFuncT getAllGraphStorageFunc,
const DB& db,
const Annotation& edgeAnno)
: componentType(componentType),
getAllGraphStorageFunc(getAllGraphStorageFunc),
db(db),
strings(db.strings), ns(""), name(name),
minDistance(1), maxDistance(1),
anyAnno(Init::initAnnotation()), edgeAnno(edgeAnno)
{
initGraphStorage();
}
std::unique_ptr<AnnoIt> AbstractEdgeOperator::retrieveMatches(const Match &lhs)
{
std::unique_ptr<ListWrapper> w = std::unique_ptr<ListWrapper>(new ListWrapper());
// add the rhs nodes of all of the edge storages
if(gs.size() == 1)
{
std::unique_ptr<EdgeIterator> it = gs[0]->findConnected(lhs.node, minDistance, maxDistance);
for(auto m = it->next(); m; m = it->next())
{
if(checkEdgeAnnotation(gs[0], lhs.node, *m))
{
// directly add the matched node since when having only one component
// no duplicates are possible
w->addMatch(*m);
}
}
}
else if(gs.size() > 1)
{
btree::btree_set<nodeid_t> uniqueResult;
for(auto e : gs)
{
std::unique_ptr<EdgeIterator> it = e->findConnected(lhs.node, minDistance, maxDistance);
for(auto m = it->next(); m; m = it->next())
{
if(checkEdgeAnnotation(e, lhs.node, *m))
{
uniqueResult.insert(*m);
}
}
}
for(const auto& n : uniqueResult)
{
w->addMatch(n);
}
}
return std::move(w);
}
bool AbstractEdgeOperator::filter(const Match &lhs, const Match &rhs)
{
// check if the two nodes are connected in *any* of the edge storages
for(auto e : gs)
{
if(e->isConnected(Init::initEdge(lhs.node, rhs.node), minDistance, maxDistance))
{
if(checkEdgeAnnotation(e, lhs.node, rhs.node))
{
return true;
}
}
}
return false;
}
void AbstractEdgeOperator::initGraphStorage()
{
gs.clear();
if(getAllGraphStorageFunc)
{
gs = (*getAllGraphStorageFunc)(componentType, name);
}
else if(getGraphStorageFunc)
{
// directly add the only known edge storage
if(auto e = (*getGraphStorageFunc)(componentType, ns, name))
{
gs.push_back(e);
}
}
}
bool AbstractEdgeOperator::checkEdgeAnnotation(std::shared_ptr<const ReadableGraphStorage> e, nodeid_t source, nodeid_t target)
{
if(edgeAnno == anyAnno)
{
return true;
}
else if(edgeAnno.val == 0 || edgeAnno.val == std::numeric_limits<std::uint32_t>::max())
{
// must be a valid value
return false;
}
else
{
// check if the edge has the correct annotation first
auto edgeAnnoList = e->getEdgeAnnotations(Init::initEdge(source, target));
for(const auto& anno : edgeAnnoList)
{
if(checkAnnotationEqual(edgeAnno, anno))
{
return true;
}
} // end for each annotation of candidate edge
}
return false;
}
double AbstractEdgeOperator::selectivity()
{
if(gs.size() == 0)
{
// will not find anything
return 0.0;
}
ExactAnnoKeySearch nodeSearch(db, annis_ns, annis_node_name);
double maxNodes = nodeSearch.guessMaxCount();
double worstSel = 0.0;
for(std::weak_ptr<const ReadableGraphStorage> gPtr: gs)
{
if(auto g = gPtr.lock())
{
double graphStorageSelectivity = 0.0;
const auto& stat = g->getStatistics();
if(stat.valid)
{
if(stat.cyclic)
{
// can get all other nodes
return 1.0;
}
// get number of nodes reachable from min to max distance
std::uint32_t maxPathLength = std::min(maxDistance, stat.maxDepth);
std::uint32_t minPathLength = std::max(0, (int) minDistance-1);
if (stat.avgFanOut > 1.0)
{
// Assume two complete k-ary trees (with the average fan-out as k)
// as defined in "Thomas Cormen: Introduction to algorithms (2009), page 1179)
// with the maximum and minimum height. Calculate the number of nodes for both complete trees and
// subtract them to get an estimation of the number of nodes that fullfull the path length criteria.
double k = stat.avgFanOut;
double reachableMax = std::ceil((std::pow(k, (double) maxPathLength) - 1.0) / (k - 1.0 ));
double reachableMin = std::ceil((std::pow(k, (double) minPathLength) - 1.0) / (k - 1.0));
double reachable = reachableMax - reachableMin;
graphStorageSelectivity = reachable / maxNodes;
}
else
{
// We can't use the formula for complete k-ary trees because we can't divide by zero and don't want negative
// numbers. Use the simplified estimation with multiplication instead.
double reachableMax = std::ceil(stat.avgFanOut * (double) maxPathLength);
double reachableMin = std::ceil(stat.avgFanOut * (double) minPathLength);
graphStorageSelectivity = (reachableMax - reachableMin) / maxNodes;
}
}
else
{
// assume a default selecivity for this graph storage operator
graphStorageSelectivity = 0.01;
}
worstSel = std::max(worstSel, graphStorageSelectivity);
}
}
// return worst selectivity
return worstSel;
}
double AbstractEdgeOperator::edgeAnnoSelectivity()
{
// check if an edge annotation is defined
if((edgeAnno == anyAnno))
{
return 1.0;
}
else
{
double worstSel = 0.0;
for(std::weak_ptr<const ReadableGraphStorage> gPtr: gs)
{
if(auto g = gPtr.lock())
{
size_t numOfAnnos = g->numberOfEdgeAnnotations();
if(numOfAnnos == 0)
{
// we won't be able to find anything if there are no annotations
return 0.0;
}
else
{
// the edge annotation will filter the selectivity even more
size_t guessedCount = g->getAnnoStorage().guessMaxCount(strings, edgeAnno);
worstSel = std::max(worstSel, (double) guessedCount / (double) numOfAnnos);
}
}
}
return worstSel;
}
return -1.0;
}
int64_t AbstractEdgeOperator::guessMaxCountEdgeAnnos()
{
if(edgeAnno == anyAnno)
{
if(gs.size() == 1)
{
return gs[0]->getStatistics().nodes;
}
else
{
// TODO: implement graph storage source node search for multiple graph storages
return -1;
}
}
else
{
std::int64_t sum = 0;
for(std::weak_ptr<const ReadableGraphStorage> gPtr: gs)
{
if(auto g = gPtr.lock())
{
sum += g->getAnnoStorage().guessMaxCount(strings, edgeAnno);
}
}
return sum;
}
}
std::shared_ptr<EstimatedSearch> AbstractEdgeOperator::createAnnoSearch(
std::function<std::list<Annotation> (nodeid_t)> nodeAnnoMatchGenerator,
bool maximalOneNodeAnno,
bool returnsNothing,
std::int64_t wrappedNodeCountEstimate,
std::string debugDescription) const
{
if(edgeAnno == anyAnno)
{
if(gs.size() == 1)
{
return gs[0]->getSourceNodeIterator(nodeAnnoMatchGenerator, maximalOneNodeAnno, returnsNothing);
}
else
{
// TODO: implement graph storage source node search for multiple graph storages
return std::shared_ptr<EstimatedSearch>();
}
}
else
{
std::set<Annotation> validEdgeAnnos;
if(edgeAnno.ns == 0)
{
// collect all edge annotations having this name
for(size_t i =0; i < gs.size(); i++)
{
const BTreeMultiAnnoStorage<Edge>& annos = gs[i]->getAnnoStorage();
auto keysLower = annos.annoKeys.lower_bound({edgeAnno.name, 0});
auto keysUpper = annos.annoKeys.upper_bound({edgeAnno.name, uintmax});
for(auto itKey = keysLower; itKey != keysUpper; itKey++)
{
Annotation fullyQualifiedAnno = edgeAnno;
fullyQualifiedAnno.ns = itKey->first.ns;
validEdgeAnnos.emplace(fullyQualifiedAnno);
}
}
}
else
{
// there is only one valid edge annotation
validEdgeAnnos.emplace(edgeAnno);
}
return std::make_shared<NodeByEdgeAnnoSearch>(gs, validEdgeAnnos, nodeAnnoMatchGenerator,
maximalOneNodeAnno,
returnsNothing,
wrappedNodeCountEstimate, debugDescription);
}
}
std::string AbstractEdgeOperator::description()
{
std::string result;
if(minDistance == 1 && maxDistance == 1)
{
result = operatorString() + name;
}
else if(minDistance == 1 && maxDistance == std::numeric_limits<unsigned int>::max())
{
result = operatorString() + name + " *";
}
else if(minDistance == maxDistance)
{
result = operatorString() + name + "," + std::to_string(minDistance);
}
else
{
result = operatorString() + name + "," + std::to_string(minDistance) + "," + std::to_string(maxDistance);
}
if(!(edgeAnno == anyAnno))
{
if(edgeAnno.name != 0 && edgeAnno.val != 0
&& edgeAnno.name != std::numeric_limits<std::uint32_t>::max()
&& edgeAnno.val != std::numeric_limits<std::uint32_t>::max())
{
result += "[" + strings.str(edgeAnno.name) + "=\"" + strings.str(edgeAnno.val) + "\"]";
}
else
{
result += "[invalid anno]";
}
}
return result;
}
AbstractEdgeOperator::~AbstractEdgeOperator()
{
}
|
{
"content_hash": "f642a923bc01691129fa4254dfe7597e",
"timestamp": "",
"source": "github",
"line_count": 420,
"max_line_length": 127,
"avg_line_length": 29.176190476190477,
"alnum_prop": 0.6119634405092215,
"repo_name": "thomaskrause/graphANNIS",
"id": "88900a2b7c69fc678ac94d331104b305f1385c74",
"size": "12868",
"binary": false,
"copies": "2",
"ref": "refs/heads/develop",
"path": "src/lib/annis/operators/abstractedgeoperator.cpp",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ANTLR",
"bytes": "6150"
},
{
"name": "Batchfile",
"bytes": "594"
},
{
"name": "C",
"bytes": "56184"
},
{
"name": "C++",
"bytes": "12044379"
},
{
"name": "CMake",
"bytes": "298812"
},
{
"name": "HTML",
"bytes": "33203"
},
{
"name": "Java",
"bytes": "217843"
},
{
"name": "M4",
"bytes": "38186"
},
{
"name": "Makefile",
"bytes": "162473"
},
{
"name": "Perl",
"bytes": "5918"
},
{
"name": "Python",
"bytes": "406684"
},
{
"name": "Shell",
"bytes": "704817"
}
]
}
|
<!DOCTYPE html>
<html lang= "en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, intial-scale=1">
<link rel="stylesheet"href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css">
<link rel="stylesheet"href="styles.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.0/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script src="http://cdn.jsdelivr.net/alasql/0.2/alasql.min.js"></script>
<title> Orcas</title>
</head>
<h1> Welcome </h1>
<!-- <h2><img src="cropped orcas.jpg" width="1200">
</h2> -->
<body>
<script>
alasql("CREATE TABLE loggedin (name STRING, password STRING)");
alasql("CREATE TABLE orcas (age INT, name STRING, park STRING, password STRING)");
alasql("INSERT INTO orcas VALUES (49,'Corky II', 'California', 'Corky II')");
alasql("INSERT INTO orcas VALUES (14,'Ikaika', 'California', 'Ikaika')");
alasql("INSERT INTO orcas VALUES (11,'Kalia', 'California', 'Kalia')");
alasql("INSERT INTO orcas VALUES (40,'Kasatka', 'California', 'Kasatka')");
alasql("INSERT INTO orcas VALUES (23,'Keet', 'California', 'Keet')");
alasql("INSERT INTO orcas VALUES (4,'Makani', 'California', 'Makani')");
alasql("INSERT INTO orcas VALUES (15,'Nakai', 'California', 'Nakai')");
alasql("INSERT INTO orcas VALUES (28,'Orkid', 'California', 'Orkid')");
alasql("INSERT INTO orcas VALUES (23,'Shouka', 'California', 'Shouka')");
alasql("INSERT INTO orcas VALUES (38,'Ulises', 'California', 'Ulises')");
alasql("INSERT INTO orcas VALUES (1,'Amaya', 'California', 'Amaya')");
alasql("INSERT INTO orcas VALUES (41,'Katina', 'Florida', 'Katina')");
alasql("INSERT INTO orcas VALUES (28,'Kayla', 'Florida', 'Kayla')");
alasql("INSERT INTO orcas VALUES (6,'Makaio', 'Florida', 'Makaio')");
alasql("INSERT INTO orcas VALUES (9,'Malia', 'Florida', 'Malia')");
alasql("INSERT INTO orcas VALUES (11,'Nalani', 'Florida', 'Nalani')");
alasql("INSERT INTO orcas VALUES (36,'Tilikum', 'Florida', 'Tilikum')");
alasql("INSERT INTO orcas VALUES (11,'Trua', 'Florida', 'Trua')");
alasql("INSERT INTO orcas VALUES (5,'Kyuquot', 'Texas', 'Kyuquot')");
alasql("INSERT INTO orcas VALUES (2,'Kamea', 'Texas', 'Kamea')");
alasql("INSERT INTO orcas VALUES (6,'Sakari', 'Texas', 'Sakari')");
alasql("INSERT INTO orcas VALUES (25,'Takara', 'Texas', 'Takara')");
alasql("INSERT INTO orcas VALUES (17,'Tuar', 'Texas', 'Tuar')");
function getPark(homepark){
if (homepark == 'Florida'){
var list = alasql("SELECT name FROM orcas WHERE park = 'Florida'");
}
else if (homepark == 'Texas'){
var list = alasql("SELECT name FROM orcas WHERE park == 'Texas'");
}
else{
var list = alasql("SELECT name FROM orcas WHERE park == 'California'");
}
var text = ""
for (i = 0; i < list.length; i++){
text += list[i].name + '<br>';
}
document.getElementById("demo").innerHTML = text;
}
function signUp(){
var x = document.getElementById("frm2");
var username = x.elements[0].value;
var pass = x.elements[1].value;
var age = x.elements[2].value;
var park = x.elements[1].value;
var match = alasql("SELECT name FROM orcas WHERE name == ? AND password == ?", [username, pass]);
if (match.length > 0){
alert('Sign Up Failed! Try Again!')
}
else{
alasql("INSERT INTO orcas VALUES (?,?, ?, ?)", [age, username, park, pass]);
alert('Sign Up Successful!')
var list = alasql("SELECT * FROM orcas");
var text = ""
for (i = 0; i < list.length; i++){
text += list[i].name + '<br>';
}
document.getElementById("demo").innerHTML = text;
alert(text)
}
}
function signIn(){
var x = document.getElementById("frm1");
var username = x.elements[0].value;
var pass = x.elements[1].value;
console.log(pass)
var match = alasql("SELECT name FROM orcas WHERE name = ? AND password = ?", [username, pass]);
if (match.length == 1){
console.log("HELLOOOOOO")
alert('You are loggged in as ' + username + '!')
var text = 'Hello, ' + username + '!';
document.getElementById("demo").innerHTML = text;
console.log(document.getElementById("demo").innerHTML);
alasql("INSERT INTO loggedin VALUES (?,?)", [username, password]);
console.log(alasql("SELECT name FROM loggedin"));
alert(alasql("SELECT name FROM loggedin").length)
}
else{
alert('Log In Failed! Try Again!')
}
}
function helloLoggedIn(){
var list = alasql("SELECT name FROM loggedin");
alert(list.length)
if (list.length == 0){
return;
}
alert(list.length)
var text = 'Hello, ' + list[list.length-1].name + '!';
alert(list.length)
document.getElementById("demo").innerHTML = text;
}
</script>
<div class="container">
<div class="dropdown">
<button class="btn btn-default dropdown-toggle" type="button" data-toggle="dropdown">Dropdown
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li> <a href="#"> Action </a></li>
<li> <a href="#"> Other </a></li>
<li> <a href="#"> Other Action </a></li>
<li role="separator" class="divider"></li>
<li><a href="#"> Separated Link </a></li>
</ul>
</div>
<div class="btn-group" role="group" aria-label="Basic example">
<div class="btn-group" role="group" aria-label="First group">
<button type="button" class="btn btn-secondary" onclick="getPark('Florida')">Florida</button>
<button type="button" class="btn btn-secondary" onclick="getPark('California')">California</button>
<button type="button" class="btn btn-secondary" onclick="getPark('Texas')">Texas</button>
</div>
</div>
<div>
<form id="frm1" class="form-inline">
<div class="form-group">
<label class="sr-only" for="exampleInputEmail3">Name</label>
<input type="text" class="form-control" id="exampleInputEmail3" placeholder="Enter name">
</div>
<div class="form-group">
<label class="sr-only" for="exampleInputPassword3">Password</label>
<input type="password" class="form-control" id="exampleInputPassword3" placeholder="Password">
</div>
<button type="submit" class="btn btn-primary" onclick="signIn()">Sign in</button>
</form>
</div>
<div>
<p id="demo" onload="helloLoggedIn()"> </p>
</div>
<div>
<form id="frm2" class="form-inline">
<div class="form-group">
<label class="sr-only" for="exampleInputEmail3">Name</label>
<input type="text" class="form-control" id="exampleInputEmail3" placeholder="Enter name">
</div>
<div class="form-group">
<label class="sr-only" for="exampleInputPassword3">Password</label>
<input type="password" class="form-control" id="exampleInputPassword3" placeholder="Password">
</div>
<div class="form-group">
<label class="sr-only" for="exampleInputAge">Age</label>
<input type="integer" class="form-control" id="exampleInputPassword3" placeholder="Age">
</div>
<div class="form-group">
<label class="sr-only" for="exampleInputPassword3">Park</label>
<input type="text" class="form-control" id="exampleInputPassword3" placeholder="Park">
</div>
<button type="submit" class="btn btn-primary" onclick="signUp()">Sign Up</button>
</form>
</div>
</div>
</body>
</html>
|
{
"content_hash": "d210a7dd2d816347eb5328576922f523",
"timestamp": "",
"source": "github",
"line_count": 196,
"max_line_length": 105,
"avg_line_length": 38.826530612244895,
"alnum_prop": 0.6223390275952694,
"repo_name": "katyaschw/pagesTest",
"id": "e6db85f7ecd720df62fe11753abf1d850a5495f7",
"size": "7610",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "orcas.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "184"
},
{
"name": "HTML",
"bytes": "15214"
}
]
}
|
{% extends "touchtechnology/news/base.html" %}
{% load i18n %}
{% load content %}
{% block body_class %}{{ block.super }} feeds{% endblock %}
{% block news_content %}
<h1>{% block page_title %}{% trans "Feeds" %}{% endblock %}</h1>
{% block syndication %}
{% chunk "syndication-info" %}
{% endblock %}
{% block syndication_terms %}
{% chunk "syndication-terms" %}
{% endblock %}
<ul>
<li><a href="{% url application.name|add:":feed-atom" %}">{% trans "Atom" %}</a></li>
<li><a href="{% url application.name|add:":feed-rss" %}">{% trans "RSS" %}</a></li>
</ul>
{% endblock %}
|
{
"content_hash": "9c81631614a603023c69bf1a7c1232b4",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 93,
"avg_line_length": 27.59090909090909,
"alnum_prop": 0.5634266886326195,
"repo_name": "goodtune/vitriolic",
"id": "0b8de71feaef49fa8954d09ee29ef510e44f1410",
"size": "607",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "touchtechnology/news/templates/touchtechnology/news/feeds.html",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "307509"
},
{
"name": "HTML",
"bytes": "273967"
},
{
"name": "JavaScript",
"bytes": "626908"
},
{
"name": "Less",
"bytes": "1373"
},
{
"name": "Makefile",
"bytes": "369"
},
{
"name": "Python",
"bytes": "962353"
},
{
"name": "Shell",
"bytes": "1490"
},
{
"name": "XSLT",
"bytes": "3510"
}
]
}
|
<!DOCTYPE html>
<html>
<meta charset=utf-8>
<title>Google search</title>
<form action="localhost/search">
<label for="q">Keyword(s):</label>
<input type="search" name="q" size="32" id="q">
<input type="hidden" name="ie" value="utf-8">
<input type="hidden" name="oe" value="utf-8">
<input type="submit" value="Search">
</form>
</html>
|
{
"content_hash": "da7dac7ee870c43e7e28d64810cd7adc",
"timestamp": "",
"source": "github",
"line_count": 12,
"max_line_length": 47,
"avg_line_length": 28.666666666666668,
"alnum_prop": 0.6453488372093024,
"repo_name": "Ju-Sha/Online-auction-system",
"id": "5b140908202a5d88e03f501935b48f0aa64cb1e8",
"size": "344",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "testSearch.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "374877"
},
{
"name": "PHP",
"bytes": "288659"
}
]
}
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="lang:clipboard.copy" content="Copy to clipboard">
<meta name="lang:clipboard.copied" content="Copied to clipboard">
<meta name="lang:search.language" content="en">
<meta name="lang:search.pipeline.stopwords" content="True">
<meta name="lang:search.pipeline.trimmer" content="True">
<meta name="lang:search.result.none" content="No matching documents">
<meta name="lang:search.result.one" content="1 matching document">
<meta name="lang:search.result.other" content="# matching documents">
<meta name="lang:search.tokenizer" content="[\s\-]+">
<link href="https://fonts.gstatic.com/" rel="preconnect" crossorigin>
<link href="https://fonts.googleapis.com/css?family=Roboto+Mono:400,500,700|Roboto:300,400,400i,700&display=fallback" rel="stylesheet">
<style>
body,
input {
font-family: "Roboto", "Helvetica Neue", Helvetica, Arial, sans-serif
}
code,
kbd,
pre {
font-family: "Roboto Mono", "Courier New", Courier, monospace
}
</style>
<link rel="stylesheet" href="../_static/stylesheets/application.css"/>
<link rel="stylesheet" href="../_static/stylesheets/application-palette.css"/>
<link rel="stylesheet" href="../_static/stylesheets/application-fixes.css"/>
<link rel="stylesheet" href="../_static/fonts/material-icons.css"/>
<meta name="theme-color" content="#3f51b5">
<script src="../_static/javascripts/modernizr.js"></script>
<title>statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize_approximate_diffuse — statsmodels</title>
<link rel="icon" type="image/png" sizes="32x32" href="../_static/icons/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="../_static/icons/favicon-16x16.png">
<link rel="manifest" href="../_static/icons/site.webmanifest">
<link rel="mask-icon" href="../_static/icons/safari-pinned-tab.svg" color="#919191">
<meta name="msapplication-TileColor" content="#2b5797">
<meta name="msapplication-config" content="../_static/icons/browserconfig.xml">
<link rel="stylesheet" href="../_static/stylesheets/examples.css">
<link rel="stylesheet" href="../_static/stylesheets/deprecation.css">
<link rel="stylesheet" type="text/css" href="../_static/pygments.css" />
<link rel="stylesheet" type="text/css" href="../_static/material.css" />
<link rel="stylesheet" type="text/css" href="../_static/graphviz.css" />
<link rel="stylesheet" type="text/css" href="../_static/plot_directive.css" />
<script data-url_root="../" id="documentation_options" src="../_static/documentation_options.js"></script>
<script src="../_static/jquery.js"></script>
<script src="../_static/underscore.js"></script>
<script src="../_static/doctools.js"></script>
<script crossorigin="anonymous" integrity="sha256-Ae2Vz/4ePdIu6ZyI/5ZGsYnb+m0JlOmKPjt6XZ9JJkA=" src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js"></script>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="author" title="About these documents" href="../about.html" />
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
<link rel="next" title="statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize_known" href="statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize_known.html" />
<link rel="prev" title="statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize" href="statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize.html" />
</head>
<body dir=ltr
data-md-color-primary=indigo data-md-color-accent=blue>
<svg class="md-svg">
<defs data-children-count="0">
<svg xmlns="http://www.w3.org/2000/svg" width="416" height="448" viewBox="0 0 416 448" id="__github"><path fill="currentColor" d="M160 304q0 10-3.125 20.5t-10.75 19T128 352t-18.125-8.5-10.75-19T96 304t3.125-20.5 10.75-19T128 256t18.125 8.5 10.75 19T160 304zm160 0q0 10-3.125 20.5t-10.75 19T288 352t-18.125-8.5-10.75-19T256 304t3.125-20.5 10.75-19T288 256t18.125 8.5 10.75 19T320 304zm40 0q0-30-17.25-51T296 232q-10.25 0-48.75 5.25Q229.5 240 208 240t-39.25-2.75Q130.75 232 120 232q-29.5 0-46.75 21T56 304q0 22 8 38.375t20.25 25.75 30.5 15 35 7.375 37.25 1.75h42q20.5 0 37.25-1.75t35-7.375 30.5-15 20.25-25.75T360 304zm56-44q0 51.75-15.25 82.75-9.5 19.25-26.375 33.25t-35.25 21.5-42.5 11.875-42.875 5.5T212 416q-19.5 0-35.5-.75t-36.875-3.125-38.125-7.5-34.25-12.875T37 371.5t-21.5-28.75Q0 312 0 260q0-59.25 34-99-6.75-20.5-6.75-42.5 0-29 12.75-54.5 27 0 47.5 9.875t47.25 30.875Q171.5 96 212 96q37 0 70 8 26.25-20.5 46.75-30.25T376 64q12.75 25.5 12.75 54.5 0 21.75-6.75 42 34 40 34 99.5z"/></svg>
</defs>
</svg>
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer">
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search">
<label class="md-overlay" data-md-component="overlay" for="__drawer"></label>
<a href="#generated/statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize_approximate_diffuse" tabindex="1" class="md-skip"> Skip to content </a>
<header class="md-header" data-md-component="header">
<nav class="md-header-nav md-grid">
<div class="md-flex navheader">
<div class="md-flex__cell md-flex__cell--shrink">
<a href="../index.html" title="statsmodels"
class="md-header-nav__button md-logo">
<img src="../_static/statsmodels-logo-v2-bw.svg" height="26"
alt="statsmodels logo">
</a>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--menu md-header-nav__button" for="__drawer"></label>
</div>
<div class="md-flex__cell md-flex__cell--stretch">
<div class="md-flex__ellipsis md-header-nav__title" data-md-component="title">
<span class="md-header-nav__topic">statsmodels v0.13.2</span>
<span class="md-header-nav__topic"> statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize_approximate_diffuse </span>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<label class="md-icon md-icon--search md-header-nav__button" for="__search"></label>
<div class="md-search" data-md-component="search" role="dialog">
<label class="md-search__overlay" for="__search"></label>
<div class="md-search__inner" role="search">
<form class="md-search__form" action="../search.html" method="get" name="search">
<input type="text" class="md-search__input" name="q" placeholder="Search"
autocapitalize="off" autocomplete="off" spellcheck="false"
data-md-component="query" data-md-state="active">
<label class="md-icon md-search__icon" for="__search"></label>
<button type="reset" class="md-icon md-search__icon" data-md-component="reset" tabindex="-1">

</button>
</form>
<div class="md-search__output">
<div class="md-search__scrollwrap" data-md-scrollfix>
<div class="md-search-result" data-md-component="result">
<div class="md-search-result__meta">
Type to start searching
</div>
<ol class="md-search-result__list"></ol>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="md-flex__cell md-flex__cell--shrink">
<div class="md-header-nav__source">
<a href="https://github.com/statsmodels/statsmodels" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24" width="28" height="28">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
statsmodels
</div>
</a>
</div>
</div>
<script src="../_static/javascripts/version_dropdown.js"></script>
<script>
var json_loc = "../../versions-v2.json",
target_loc = "../../",
text = "Versions";
$( document ).ready( add_version_dropdown(json_loc, target_loc, text));
</script>
</div>
</nav>
</header>
<div class="md-container">
<nav class="md-tabs" data-md-component="tabs">
<div class="md-tabs__inner md-grid">
<ul class="md-tabs__list">
<li class="md-tabs__item"><a href="../user-guide.html" class="md-tabs__link">User Guide</a></li>
<li class="md-tabs__item"><a href="../tsa.html" class="md-tabs__link">Time Series analysis <code class="xref py py-mod docutils literal notranslate"><span class="pre">tsa</span></code></a></li>
<li class="md-tabs__item"><a href="statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.html" class="md-tabs__link">statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing</a></li>
</ul>
</div>
</nav>
<main class="md-main">
<div class="md-main__inner md-grid" data-md-component="container">
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--primary" data-md-level="0">
<label class="md-nav__title md-nav__title--site" for="__drawer">
<a href="../index.html" title="statsmodels" class="md-nav__button md-logo">
<img src="../_static/statsmodels-logo-v2-bw.svg" alt=" logo" width="48" height="48">
</a>
<a href="../index.html"
title="statsmodels">statsmodels v0.13.2</a>
</label>
<div class="md-nav__source">
<a href="https://github.com/statsmodels/statsmodels" title="Go to repository" class="md-source" data-md-source="github">
<div class="md-source__icon">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24" width="28" height="28">
<use xlink:href="#__github" width="24" height="24"></use>
</svg>
</div>
<div class="md-source__repository">
statsmodels
</div>
</a>
</div>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="../install.html" class="md-nav__link">Installing statsmodels</a>
</li>
<li class="md-nav__item">
<a href="../gettingstarted.html" class="md-nav__link">Getting started</a>
</li>
<li class="md-nav__item">
<a href="../user-guide.html" class="md-nav__link">User Guide</a>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="../user-guide.html#background" class="md-nav__link">Background</a>
</li>
<li class="md-nav__item">
<a href="../user-guide.html#regression-and-linear-models" class="md-nav__link">Regression and Linear Models</a>
</li>
<li class="md-nav__item">
<a href="../user-guide.html#time-series-analysis" class="md-nav__link">Time Series Analysis</a>
<ul class="md-nav__list">
<li class="md-nav__item">
<a href="../tsa.html" class="md-nav__link">Time Series analysis <code class="xref py py-mod docutils literal notranslate"><span class="pre">tsa</span></code></a>
</li>
<li class="md-nav__item">
<a href="../statespace.html" class="md-nav__link">Time Series Analysis by State Space Methods <code class="xref py py-mod docutils literal notranslate"><span class="pre">statespace</span></code></a>
</li>
<li class="md-nav__item">
<a href="../vector_ar.html" class="md-nav__link">Vector Autoregressions <code class="xref py py-mod docutils literal notranslate"><span class="pre">tsa.vector_ar</span></code></a>
</li></ul>
</li>
<li class="md-nav__item">
<a href="../user-guide.html#other-models" class="md-nav__link">Other Models</a>
</li>
<li class="md-nav__item">
<a href="../user-guide.html#statistics-and-tools" class="md-nav__link">Statistics and Tools</a>
</li>
<li class="md-nav__item">
<a href="../user-guide.html#data-sets" class="md-nav__link">Data Sets</a>
</li>
<li class="md-nav__item">
<a href="../user-guide.html#sandbox" class="md-nav__link">Sandbox</a>
</li></ul>
</li>
<li class="md-nav__item">
<a href="../examples/index.html" class="md-nav__link">Examples</a>
</li>
<li class="md-nav__item">
<a href="../api.html" class="md-nav__link">API Reference</a>
</li>
<li class="md-nav__item">
<a href="../about.html" class="md-nav__link">About statsmodels</a>
</li>
<li class="md-nav__item">
<a href="../dev/index.html" class="md-nav__link">Developer Page</a>
</li>
<li class="md-nav__item">
<a href="../release/index.html" class="md-nav__link">Release Notes</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary">
<ul class="md-nav__list" data-md-scrollfix="">
<li class="md-nav__item"><a class="md-nav__extra_link" href="../_sources/generated/statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize_approximate_diffuse.rst.txt">Show Source</a> </li>
<li id="searchbox" class="md-nav__item"></li>
</ul>
</nav>
</div>
</div>
</div>
<div class="md-content">
<article class="md-content__inner md-typeset" role="main">
<section id="statsmodels-tsa-statespace-exponential-smoothing-exponentialsmoothing-initialize-approximate-diffuse">
<h1 id="generated-statsmodels-tsa-statespace-exponential-smoothing-exponentialsmoothing-initialize-approximate-diffuse--page-root">statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize_approximate_diffuse<a class="headerlink" href="#generated-statsmodels-tsa-statespace-exponential-smoothing-exponentialsmoothing-initialize-approximate-diffuse--page-root" title="Permalink to this headline">¶</a></h1>
<dl class="py method">
<dt class="sig sig-object py" id="statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize_approximate_diffuse">
<span class="sig-prename descclassname"><span class="pre">ExponentialSmoothing.</span></span><span class="sig-name descname"><span class="pre">initialize_approximate_diffuse</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">variance</span></span><span class="o"><span class="pre">=</span></span><span class="default_value"><span class="pre">None</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize_approximate_diffuse" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialize approximate diffuse</p>
</dd></dl>
</section>
</article>
</div>
</div>
</main>
</div>
<footer class="md-footer">
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid">
<a href="statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize.html" title="statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize"
class="md-flex md-footer-nav__link md-footer-nav__link--prev"
rel="prev">
<div class="md-flex__cell md-flex__cell--shrink">
<i class="md-icon md-icon--arrow-back md-footer-nav__button"></i>
</div>
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title">
<span class="md-flex__ellipsis">
<span
class="md-footer-nav__direction"> Previous </span> statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize </span>
</div>
</a>
<a href="statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize_known.html" title="statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize_known"
class="md-flex md-footer-nav__link md-footer-nav__link--next"
rel="next">
<div class="md-flex__cell md-flex__cell--stretch md-footer-nav__title"><span
class="md-flex__ellipsis"> <span
class="md-footer-nav__direction"> Next </span> statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize_known </span>
</div>
<div class="md-flex__cell md-flex__cell--shrink"><i
class="md-icon md-icon--arrow-forward md-footer-nav__button"></i>
</div>
</a>
</nav>
</div>
<div class="md-footer-meta md-typeset">
<div class="md-footer-meta__inner md-grid">
<div class="md-footer-copyright">
<div class="md-footer-copyright__highlight">
© Copyright 2009-2019, Josef Perktold, Skipper Seabold, Jonathan Taylor, statsmodels-developers.
</div>
Last updated on
Feb 08, 2022.
<br/>
Created using
<a href="http://www.sphinx-doc.org/">Sphinx</a> 4.4.0.
and
<a href="https://github.com/bashtage/sphinx-material/">Material for
Sphinx</a>
</div>
</div>
</div>
</footer>
<script src="../_static/javascripts/application.js"></script>
<script>app.initialize({version: "1.0.4", url: {base: ".."}})</script>
</body>
</html>
|
{
"content_hash": "f7a548ff83d60a16de20443a72ac3c88",
"timestamp": "",
"source": "github",
"line_count": 448,
"max_line_length": 999,
"avg_line_length": 41.83482142857143,
"alnum_prop": 0.6190374559812186,
"repo_name": "statsmodels/statsmodels.github.io",
"id": "cd6fdb1283ba616b33b86187acb56675933fb01e",
"size": "18746",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "v0.13.2/generated/statsmodels.tsa.statespace.exponential_smoothing.ExponentialSmoothing.initialize_approximate_diffuse.html",
"mode": "33188",
"license": "bsd-3-clause",
"language": []
}
|
SYNONYM
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null
|
{
"content_hash": "2af31d2ca671a5f15e98a6d4e5ce24f1",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.23076923076923,
"alnum_prop": 0.6917293233082706,
"repo_name": "mdoering/backbone",
"id": "80497f1818584d1b255f7c6729865a6506a44464",
"size": "183",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Ericales/Sapotaceae/Pouteria/Pouteria maclayana/ Syn. Lucuma navicularis/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": []
}
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Plato - lib/loglevel/level2.js</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link href="../../assets/css/vendor/morris.css" rel="stylesheet">
<link href="../../assets/css/vendor/bootstrap.css" rel="stylesheet">
<link href="../../assets/css/vendor/font-awesome.css" rel="stylesheet">
<link href="../../assets/css/vendor/codemirror.css" rel="stylesheet">
<link href="../../assets/css/plato.css" rel="stylesheet">
<link href="../../assets/css/plato-file.css" rel="stylesheet">
</head>
<body>
<div class="navbar navbar-fixed-top">
<div class="container">
<a class="navbar-brand" href="http://github.com/es-analysis/plato">Plato on Github</a>
<ul class="nav navbar-nav">
<li>
<a href="../../index.html">Report Home</a>
</li>
</ul>
</div>
</div>
<div class="jumbotron">
<div class="container">
<h1>lib/loglevel/level2.js</h1>
</div>
</div>
<div class="container aggregate-stats">
<div class="row">
<div class="col-md-6">
<h2 class="header">Maintainability <a href="http://blogs.msdn.com/b/codeanalysis/archive/2007/11/20/maintainability-index-range-and-meaning.aspx"><i class="icon icon-info-sign" rel="popover" data-placement="top" data-trigger="hover" data-content="A value between 0 and 100 that represents the relative ease of maintaining the code. A high value means better maintainability." data-original-title="Maintainability Index" data-container="body"></i></a></h2>
<p class="stat">54.48</p>
</div>
<div class="col-md-6">
<h2 class="header">Lines of code <i class="icon icon-info-sign" rel="popover" data-placement="top" data-trigger="hover" data-content="Source Lines of Code / Logical Lines of Code" data-original-title="SLOC/LSLOC" data-container="body"></i></h2>
<p class="stat">118</p>
</div>
</div>
<div class="row historical">
<div class="col-md-6">
<p id="chart_historical_maint" class="chart"></p>
</div>
<div class="col-md-6">
<p id="chart_historical_sloc" class="chart"></p>
</div>
</div>
<div class="row">
<div class="col-md-6">
<h2 class="header">Difficulty <a href="http://en.wikipedia.org/wiki/Halstead_complexity_measures"><i class="icon icon-info-sign" rel="popover" data-placement="top" data-trigger="hover" data-content="The difficulty measure is related to the difficulty of the program to write or understand." data-original-title="Difficulty" data-container="body"></i></a></h2>
<p class="stat">34.04</p>
</div>
<div class="col-md-6">
<h2 class="header">Estimated Errors <a href="http://en.wikipedia.org/wiki/Halstead_complexity_measures"><i class="icon icon-info-sign" rel="popover" data-placement="top" data-trigger="hover" data-content="Halstead's delivered bugs is an estimate for the number of errors in the implementation." data-original-title="Delivered Bugs" data-container="body"></i></a></h2>
<p class="stat">1.09</p>
</div>
</div>
</div>
<div class="container charts">
<div class="row">
<h2 class="header">Function weight</h2>
</div>
<div class="row">
<div class="col-md-6">
<h3 class="chart-header">By Complexity <a href="http://en.wikipedia.org/wiki/Cyclomatic_complexity"><i class="icon icon-info-sign" rel="popover" data-placement="top" data-trigger="hover" data-content="This metric counts the number of distinct paths through a block of code. Lower values are better." data-original-title="Cyclomatic Complexity" data-container="body"></i></a></h3>
<div id="fn-by-complexity" class="stat"></div>
</div>
<div class="col-md-6">
<h3 class="chart-header">By SLOC <i class="icon icon-info-sign" rel="popover" data-placement="top" data-trigger="hover" data-content="Source Lines of Code / Logical Lines of Code" data-original-title="SLOC/LSLOC" data-container="body"></i></h3>
<div id="fn-by-sloc" class="stat"></div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<textarea id="file-source" class="col-md-12">
'use strict';
// int. libs
var Log = require('./level1');
/**
* @class LogLevel2
* @constructor
* @param {object} opts
*/
var LogLevel2 = Log;
/**
* @module LogLevel2
*/
module.exports = LogLevel2;
/**
* Outputs in which browser env the tests will run
*
* @method outputRunBrowser
* @param {object} data
* @return {LogLevel2}
*/
LogLevel2.prototype.outputRunBrowser = function (browser) {
this.echo('Running Browser:', {nl: false, ec: true, foreground: 'white'});
this.echo(browser, {foreground: 'yellowBright'});
return this;
};
/**
* Outputs a message when the test starts
*
* @method outputTestStarted
* @param {object} data
* @return {LogLevel2}
*/
LogLevel2.prototype.outputTestStarted = function (data) {
this.echo('RUNNING TEST - ', {nl: false, pnl: true, foreground: 'magentaBright'});
this.echo('"' + data.name + '"', {foreground: 'cyanBright'});
return this;
};
/**
* Outputs a message when all assertions of a test has been run
*
* @method outputAssertionResult
* @param {object} data
* @return {LogLevel2}
*/
LogLevel2.prototype.outputAssertionResult = function (data) {
var selector = (data.selector) ? data.selector : '';
var title = data.type.toUpperCase() + ' ' + selector;
if (data.success) {
this.echo(this.symbol('*'), {nl: false, ec: true, foreground: 'greenBright'});
this.echo(title, {nl: false, ec: true, foreground: 'magentaBright'});
if (data.message) {
this.echo(data.message, {foreground: 'greenBright'});
} else {
this.echo('');
}
} else {
this.echo(this.symbol('x'), {nl: false, ec: true, foreground: 'redBright'});
this.echo(title, {foreground: 'redBright'});
this.echo('EXPECTED: ' + data.expected, {indent: 4, foreground: 'magentaBright'});
this.echo('FOUND: ' + data.value, {indent: 4, foreground: 'magentaBright'});
if (data.message) {
this.echo('MESSAGE: ' + data.message, {indent: 4, foreground: 'magentaBright'});
}
}
return this;
};
/**
* Outputs a message when all assertions of a test has been run
*
* @method outputAssertionExpectation
* @param {object} data
* @return {LogLevel2}
*/
LogLevel2.prototype.outputAssertionExpectation = function (data) {
if (data.status) {
this.echo(this.symbol('*'), {nl: false, ec: true, foreground: 'greenBright'});
this.echo(data.expected, {nl: false, ec: true, foreground: 'magentaBright'});
this.echo('Assertions run', {foreground: 'greenBright'});
} else {
if (data.expected !== data.run) {
this.echo(this.symbol('x'), {nl: false, ec: true, foreground: 'redBright'});
this.echo(data.expected, {nl: false, ec: true, foreground: 'magentaBright'});
this.echo('Assertions run', {foreground: 'redBright'});
this.echo('EXPECTED: ' + data.expected, {indent: 4, foreground: 'magentaBright'});
this.echo('RUN: ' + data.run, {indent: 4, foreground: 'magentaBright'});
}
}
return this;
};
/**
* Outputs a message when a test has been finished
*
* @method outputTestFinished
* @param {object} data
* @return {LogLevel2}
*/
LogLevel2.prototype.outputTestFinished = function (data) {
this.echo(this.symbol((data.status ? '*' : 'x')), {nl: false, ec: true, foreground: (data.status ? 'greenBright' : 'redBright')});
this.echo('TEST -', {nl: false, ec: true, foreground: 'magentaBright'});
this.echo('"' + data.name + '"', {nl: false, ec: true, foreground: 'cyanBright'});
this.echo((data.status ? 'SUCCEEDED' : 'FAILED'), {foreground: (data.status ? 'greenBright' : 'redBright')});
return this;
};</textarea>
</div>
</div>
<footer class="footer">
<div class="container">
<p>.</p>
</div>
</footer>
<script type="text/html" id="complexity-popover-template">
<div class="complexity-notice">
Complexity : {{ complexity.cyclomatic }} <br>
Length : {{ complexity.halstead.length }} <br>
Difficulty : {{ complexity.halstead.difficulty.toFixed(2) }} <br>
Est # bugs : {{ complexity.halstead.bugs.toFixed(2) }}<br>
</div>
</script>
<script type="text/javascript" src="../../assets/scripts/bundles/core-bundle.js"></script>
<script type="text/javascript" src="../../assets/scripts/bundles/codemirror.js"></script>
<script type="text/javascript" src="../../assets/scripts/codemirror.markpopovertext.js"></script>
<script type="text/javascript" src="report.js"></script>
<script type="text/javascript" src="report.history.js"></script>
<script type="text/javascript" src="../../assets/scripts/plato-file.js"></script>
</body>
</html>
|
{
"content_hash": "cd32c0706d31ac9224fe79a54466d25f",
"timestamp": "",
"source": "github",
"line_count": 237,
"max_line_length": 462,
"avg_line_length": 39.586497890295355,
"alnum_prop": 0.6534853975698145,
"repo_name": "dalekjs/dalekjs.github.io",
"id": "9f5b891e9f296935c7d8f8a7a0abfc0638da63e8",
"size": "10530",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "package/dalek-reporter-console/master/complexity/files/lib_loglevel_level2_js/index.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "584958"
},
{
"name": "HTML",
"bytes": "10786988"
},
{
"name": "JavaScript",
"bytes": "2458700"
}
]
}
|
package net.runelite.client.plugins;
import com.google.common.annotations.VisibleForTesting;
import com.google.common.collect.ImmutableSet;
import com.google.common.collect.Lists;
import com.google.common.graph.Graph;
import com.google.common.graph.GraphBuilder;
import com.google.common.graph.Graphs;
import com.google.common.graph.MutableGraph;
import com.google.common.reflect.ClassPath;
import com.google.common.reflect.ClassPath.ClassInfo;
import com.google.inject.Binder;
import com.google.inject.CreationException;
import com.google.inject.Injector;
import com.google.inject.Key;
import com.google.inject.Module;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Optional;
import java.util.Set;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ScheduledExecutorService;
import java.util.stream.Collectors;
import javax.inject.Inject;
import javax.inject.Named;
import javax.inject.Provider;
import javax.inject.Singleton;
import javax.swing.SwingUtilities;
import lombok.Setter;
import lombok.extern.slf4j.Slf4j;
import net.runelite.client.events.SessionClose;
import net.runelite.client.events.SessionOpen;
import net.runelite.client.RuneLite;
import net.runelite.client.config.Config;
import net.runelite.client.config.ConfigGroup;
import net.runelite.client.config.ConfigManager;
import net.runelite.client.config.RuneLiteConfig;
import net.runelite.client.eventbus.EventBus;
import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.events.PluginChanged;
import net.runelite.client.task.Schedule;
import net.runelite.client.task.ScheduledMethod;
import net.runelite.client.task.Scheduler;
import net.runelite.client.util.GameEventManager;
@Singleton
@Slf4j
public class PluginManager
{
/**
* Base package where the core plugins are
*/
private static final String PLUGIN_PACKAGE = "net.runelite.client.plugins";
private final boolean developerMode;
private final EventBus eventBus;
private final Scheduler scheduler;
private final ConfigManager configManager;
private final ScheduledExecutorService executor;
private final Provider<GameEventManager> sceneTileManager;
private final List<Plugin> plugins = new CopyOnWriteArrayList<>();
private final List<Plugin> activePlugins = new CopyOnWriteArrayList<>();
private final String runeliteGroupName = RuneLiteConfig.class
.getAnnotation(ConfigGroup.class).value();
@Setter
boolean isOutdated;
@Inject
@VisibleForTesting
PluginManager(
@Named("developerMode") final boolean developerMode,
final EventBus eventBus,
final Scheduler scheduler,
final ConfigManager configManager,
final ScheduledExecutorService executor,
final Provider<GameEventManager> sceneTileManager)
{
this.developerMode = developerMode;
this.eventBus = eventBus;
this.scheduler = scheduler;
this.configManager = configManager;
this.executor = executor;
this.sceneTileManager = sceneTileManager;
}
@Subscribe
public void onSessionOpen(SessionOpen event)
{
refreshPlugins();
}
@Subscribe
public void onSessionClose(SessionClose event)
{
refreshPlugins();
}
private void refreshPlugins()
{
loadDefaultPluginConfiguration();
getPlugins()
.forEach(plugin -> executor.submit(() ->
{
try
{
if (!startPlugin(plugin))
{
stopPlugin(plugin);
}
}
catch (PluginInstantiationException e)
{
log.warn("Error during starting/stopping plugin {}. {}", plugin.getClass().getSimpleName(), e);
}
}));
}
public Config getPluginConfigProxy(Plugin plugin)
{
final Injector injector = plugin.getInjector();
for (Key<?> key : injector.getAllBindings().keySet())
{
Class<?> type = key.getTypeLiteral().getRawType();
if (Config.class.isAssignableFrom(type))
{
return (Config) injector.getInstance(key);
}
}
return null;
}
public List<Config> getPluginConfigProxies()
{
List<Injector> injectors = new ArrayList<>();
injectors.add(RuneLite.getInjector());
getPlugins().forEach(pl -> injectors.add(pl.getInjector()));
List<Config> list = new ArrayList<>();
for (Injector injector : injectors)
{
for (Key<?> key : injector.getAllBindings().keySet())
{
Class<?> type = key.getTypeLiteral().getRawType();
if (Config.class.isAssignableFrom(type))
{
Config config = (Config) injector.getInstance(key);
list.add(config);
}
}
}
return list;
}
public void loadDefaultPluginConfiguration()
{
for (Object config : getPluginConfigProxies())
{
configManager.setDefaultConfiguration(config, false);
}
}
public void loadCorePlugins() throws IOException
{
plugins.addAll(scanAndInstantiate(getClass().getClassLoader(), PLUGIN_PACKAGE));
}
public void startCorePlugins()
{
List<Plugin> scannedPlugins = new ArrayList<>(plugins);
for (Plugin plugin : scannedPlugins)
{
try
{
startPlugin(plugin);
}
catch (PluginInstantiationException ex)
{
log.warn("Unable to start plugin {}. {}", plugin.getClass().getSimpleName(), ex);
plugins.remove(plugin);
}
}
}
List<Plugin> scanAndInstantiate(ClassLoader classLoader, String packageName) throws IOException
{
MutableGraph<Class<? extends Plugin>> graph = GraphBuilder
.directed()
.build();
List<Plugin> scannedPlugins = new ArrayList<>();
ClassPath classPath = ClassPath.from(classLoader);
ImmutableSet<ClassInfo> classes = packageName == null ? classPath.getAllClasses()
: classPath.getTopLevelClassesRecursive(packageName);
for (ClassInfo classInfo : classes)
{
Class<?> clazz = classInfo.load();
PluginDescriptor pluginDescriptor = clazz.getAnnotation(PluginDescriptor.class);
if (pluginDescriptor == null)
{
if (clazz.getSuperclass() == Plugin.class)
{
log.warn("Class {} is a plugin, but has no plugin descriptor",
clazz);
}
continue;
}
if (clazz.getSuperclass() != Plugin.class)
{
log.warn("Class {} has plugin descriptor, but is not a plugin",
clazz);
continue;
}
if (!pluginDescriptor.loadWhenOutdated() && isOutdated)
{
continue;
}
if (pluginDescriptor.developerPlugin() && !developerMode)
{
continue;
}
Class<Plugin> pluginClass = (Class<Plugin>) clazz;
graph.addNode(pluginClass);
}
// Build plugin graph
for (Class<? extends Plugin> pluginClazz : graph.nodes())
{
PluginDependency[] pluginDependencies = pluginClazz.getAnnotationsByType(PluginDependency.class);
for (PluginDependency pluginDependency : pluginDependencies)
{
graph.putEdge(pluginClazz, pluginDependency.value());
}
}
if (Graphs.hasCycle(graph))
{
throw new RuntimeException("Plugin dependency graph contains a cycle!");
}
List<Class<? extends Plugin>> sortedPlugins = topologicalSort(graph);
sortedPlugins = Lists.reverse(sortedPlugins);
for (Class<? extends Plugin> pluginClazz : sortedPlugins)
{
Plugin plugin;
try
{
plugin = instantiate(scannedPlugins, (Class<Plugin>) pluginClazz);
}
catch (PluginInstantiationException ex)
{
log.warn("Error instantiating plugin!", ex);
continue;
}
scannedPlugins.add(plugin);
}
return scannedPlugins;
}
public synchronized boolean startPlugin(Plugin plugin) throws PluginInstantiationException
{
if (activePlugins.contains(plugin) || !isPluginEnabled(plugin))
{
return false;
}
activePlugins.add(plugin);
try
{
// plugins always start in the event thread
SwingUtilities.invokeAndWait(() ->
{
try
{
plugin.startUp();
}
catch (Exception ex)
{
throw new RuntimeException(ex);
}
});
log.debug("Plugin {} is now running", plugin.getClass().getSimpleName());
if (!isOutdated && sceneTileManager != null)
{
final GameEventManager gameEventManager = this.sceneTileManager.get();
if (gameEventManager != null)
{
gameEventManager.simulateGameEvents(plugin);
}
}
eventBus.register(plugin);
schedule(plugin);
eventBus.post(new PluginChanged(plugin, true));
}
catch (InterruptedException | InvocationTargetException | IllegalArgumentException ex)
{
throw new PluginInstantiationException(ex);
}
return true;
}
public synchronized boolean stopPlugin(Plugin plugin) throws PluginInstantiationException
{
if (!activePlugins.contains(plugin) || isPluginEnabled(plugin))
{
return false;
}
activePlugins.remove(plugin);
try
{
unschedule(plugin);
eventBus.unregister(plugin);
// plugins always stop in the event thread
SwingUtilities.invokeAndWait(() ->
{
try
{
plugin.shutDown();
}
catch (Exception ex)
{
throw new RuntimeException(ex);
}
});
log.debug("Plugin {} is now stopped", plugin.getClass().getSimpleName());
eventBus.post(new PluginChanged(plugin, false));
}
catch (InterruptedException | InvocationTargetException ex)
{
throw new PluginInstantiationException(ex);
}
return true;
}
public void setPluginEnabled(Plugin plugin, boolean enabled)
{
final String keyName = plugin.getClass().getSimpleName().toLowerCase();
configManager.setConfiguration(runeliteGroupName, keyName, String.valueOf(enabled));
}
public boolean isPluginEnabled(Plugin plugin)
{
final String keyName = plugin.getClass().getSimpleName().toLowerCase();
final String value = configManager.getConfiguration(runeliteGroupName, keyName);
if (value != null)
{
return Boolean.valueOf(value);
}
final PluginDescriptor pluginDescriptor = plugin.getClass().getAnnotation(PluginDescriptor.class);
return pluginDescriptor == null || pluginDescriptor.enabledByDefault();
}
private Plugin instantiate(List<Plugin> scannedPlugins, Class<Plugin> clazz) throws PluginInstantiationException
{
PluginDependency[] pluginDependencies = clazz.getAnnotationsByType(PluginDependency.class);
List<Plugin> deps = new ArrayList<>();
for (PluginDependency pluginDependency : pluginDependencies)
{
Optional<Plugin> dependency = scannedPlugins.stream().filter(p -> p.getClass() == pluginDependency.value()).findFirst();
if (!dependency.isPresent())
{
throw new PluginInstantiationException("Unmet dependency for " + clazz.getSimpleName() + ": " + pluginDependency.value().getSimpleName());
}
deps.add(dependency.get());
}
Plugin plugin;
try
{
plugin = clazz.newInstance();
}
catch (InstantiationException | IllegalAccessException ex)
{
throw new PluginInstantiationException(ex);
}
try
{
Module pluginModule = (Binder binder) ->
{
binder.bind(clazz).toInstance(plugin);
binder.install(plugin);
for (Plugin p : deps)
{
Module p2 = (Binder binder2) ->
{
binder2.bind((Class<Plugin>) p.getClass()).toInstance(p);
binder2.install(p);
};
binder.install(p2);
}
};
Injector pluginInjector = RuneLite.getInjector().createChildInjector(pluginModule);
pluginInjector.injectMembers(plugin);
plugin.injector = pluginInjector;
}
catch (CreationException ex)
{
throw new PluginInstantiationException(ex);
}
log.debug("Loaded plugin {}", clazz.getSimpleName());
return plugin;
}
void add(Plugin plugin)
{
plugins.add(plugin);
}
void remove(Plugin plugin)
{
plugins.remove(plugin);
}
public Collection<Plugin> getPlugins()
{
return plugins;
}
private void schedule(Plugin plugin)
{
for (Method method : plugin.getClass().getMethods())
{
Schedule schedule = method.getAnnotation(Schedule.class);
if (schedule == null)
{
continue;
}
ScheduledMethod scheduledMethod = new ScheduledMethod(schedule, method, plugin);
log.debug("Scheduled task {}", scheduledMethod);
scheduler.addScheduledMethod(scheduledMethod);
}
}
private void unschedule(Plugin plugin)
{
List<ScheduledMethod> methods = new ArrayList<>(scheduler.getScheduledMethods());
for (ScheduledMethod method : methods)
{
if (method.getObject() != plugin)
{
continue;
}
log.debug("Removing scheduled task {}", method);
scheduler.removeScheduledMethod(method);
}
}
/**
* Topologically sort a graph. Uses Kahn's algorithm.
* @param graph
* @param <T>
* @return
*/
private <T> List<T> topologicalSort(Graph<T> graph)
{
MutableGraph<T> graphCopy = Graphs.copyOf(graph);
List<T> l = new ArrayList<>();
Set<T> s = graphCopy.nodes().stream()
.filter(node -> graphCopy.inDegree(node) == 0)
.collect(Collectors.toSet());
while (!s.isEmpty())
{
Iterator<T> it = s.iterator();
T n = it.next();
it.remove();
l.add(n);
for (T m : graphCopy.successors(n))
{
graphCopy.removeEdge(n, m);
if (graphCopy.inDegree(m) == 0)
{
s.add(m);
}
}
}
if (!graphCopy.edges().isEmpty())
{
throw new RuntimeException("Graph has at least one cycle");
}
return l;
}
}
|
{
"content_hash": "f64523ee06eeb9730d823a2a205ed699",
"timestamp": "",
"source": "github",
"line_count": 522,
"max_line_length": 142,
"avg_line_length": 25.00191570881226,
"alnum_prop": 0.7138916558118152,
"repo_name": "abelbriggs1/runelite",
"id": "73d6bf32e4dc560d09addedbecd8ea90c087f106",
"size": "14435",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "runelite-client/src/main/java/net/runelite/client/plugins/PluginManager.java",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "GLSL",
"bytes": "41919"
},
{
"name": "HTML",
"bytes": "7055"
},
{
"name": "Java",
"bytes": "9389009"
},
{
"name": "Shell",
"bytes": "327"
}
]
}
|
package youtube
import (
"context"
"errors"
"fmt"
"log"
"os"
"path/filepath"
"regexp"
"strings"
)
type playerConfig []byte
var basejsPattern = regexp.MustCompile(`(/s/player/\w+/player_ias.vflset/\w+/base.js)`)
// we may use \d{5} instead of \d+ since currently its 5 digits, but i can't be sure it will be 5 digits always
var signatureRegexp = regexp.MustCompile(`(?m)(?:^|,)(?:signatureTimestamp:)(\d+)`)
func (c *Client) getPlayerConfig(ctx context.Context, videoID string) (playerConfig, error) {
embedURL := fmt.Sprintf("https://youtube.com/embed/%s?hl=en", videoID)
embedBody, err := c.httpGetBodyBytes(ctx, embedURL)
if err != nil {
return nil, err
}
// example: /s/player/f676c671/player_ias.vflset/en_US/base.js
playerPath := string(basejsPattern.Find(embedBody))
if playerPath == "" {
return nil, errors.New("unable to find basejs URL in playerConfig")
}
// for debugging
var artifactName string
if artifactsFolder != "" {
parts := strings.SplitN(playerPath, "/", 5)
artifactName = "player-" + parts[3] + ".js"
linkName := filepath.Join(artifactsFolder, "video-"+videoID+".js")
if err := os.Symlink(artifactName, linkName); err != nil {
log.Printf("unable to create symlink %s: %v", linkName, err)
}
}
config := c.playerCache.Get(playerPath)
if config != nil {
return config, nil
}
config, err = c.httpGetBodyBytes(ctx, "https://youtube.com"+playerPath)
if err != nil {
return nil, err
}
// for debugging
if artifactName != "" {
writeArtifact(artifactName, config)
}
c.playerCache.Set(playerPath, config)
return config, nil
}
|
{
"content_hash": "326717e351f8937f3099ad6266ba1d57",
"timestamp": "",
"source": "github",
"line_count": 63,
"max_line_length": 111,
"avg_line_length": 25.428571428571427,
"alnum_prop": 0.681023720349563,
"repo_name": "kkdai/youtube",
"id": "cf551aec1fcb17702df81d73b7e7f85c4fa3334f",
"size": "1602",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "player_parse.go",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Go",
"bytes": "90880"
},
{
"name": "Makefile",
"bytes": "1490"
}
]
}
|
import { Injectable } from '@angular/core';
import { Album } from './album';
import { Observable } from 'rxjs/Observable';
import 'rxjs/add/operator/mergeMap';
import 'rxjs/add/operator/publishReplay';
import 'rxjs/add/observable/forkJoin';
import 'rxjs/add/observable/defer';
import 'rxjs/add/operator/share';
import { Http, Response } from '@angular/http';
import { parseStringSync } from 'xml2js-parser';
import { ImageDetailsService } from './imageDetails.service';
import { ImageDetails } from './imageDetails';
@Injectable()
export class PicasaService {
public baseUrl: string = 'https://s3.amazonaws.com/picasa-exports/';
public defaultPrefix = '1024/';
private albums: Observable<Album[]>;
private cache: any = {};
constructor(private http: Http, private imageDetailsService: ImageDetailsService) { }
public getAlbums(name?: string): Observable<Album[]> {
let url = `${this.baseUrl}?delimiter=/`;
if (name) {
url += `&prefix=${this.defaultPrefix}${name}/`;
}
let bucketRequest = this.http.get(url)
.map(this.getXml)
.map((xml: string) => {
let x = parseStringSync(xml);
let results = x.ListBucketResult.CommonPrefixes
.map((commonPrefix) => {
let n = commonPrefix.Prefix[0];
n = n.substring(0, n.length - 1);
n = n.replace(`${name}/`, '');
return{
name: n,
image: ''
};
});
// console.log('mapped results: ', JSON.stringify(results));
return results;
});
return bucketRequest;
}
public getAlbum(name): Observable<Album> {
let url;
if (name) {
/* tslint:disable */
url = `${this.baseUrl}?delimiter=/&prefix=${this.defaultPrefix}${encodeURIComponent(name)}/images/`;
/* tslint:enable */
} else {
url = `${this.baseUrl}?delimiter=/&prefix=${this.defaultPrefix}images/`;
}
// console.log('sending request to ', url);
return this.imageDetailsService.getAllDetails().flatMap((imageDetails) => {
return this.http
.get(url)
.map(this.getXml)
.map( (t) => parseStringSync(t))
.map( (x) => {
return {
name,
images: x.ListBucketResult.Contents
.filter((c) => c.Key[0].endsWith('.jpg') &&
c.Key[0].indexOf('/thumbnails/') === -1)
.map((c) => {
// TODO, make this more abstract, merge imageDetails to results
let title = '';
let key = c.Key[0].replace(this.defaultPrefix, '');
let results = imageDetails[key] || {};
results.url = this.baseUrl + c.Key[0];
return results;
})
};
});
});
}
private getXml(res: Response) {
return res.text();
}
}
|
{
"content_hash": "8c2ae32ca57c597af6cdf6c9c9b38bec",
"timestamp": "",
"source": "github",
"line_count": 81,
"max_line_length": 112,
"avg_line_length": 39.67901234567901,
"alnum_prop": 0.5043559427504667,
"repo_name": "BedrockStone/web2",
"id": "822496f81dfde1b01444d3834041f8d8c9b60c39",
"size": "3214",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/app/picasa/picasa.service.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1670"
},
{
"name": "HTML",
"bytes": "3879"
},
{
"name": "JavaScript",
"bytes": "53515"
},
{
"name": "TypeScript",
"bytes": "294599"
}
]
}
|
package io.android_tech.myexample.Widgets;
import android.app.Activity;
import android.os.Bundle;
public class Widget_ImageView_08_Activity extends Activity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(io.android_tech.myexample.R.layout.activity_widgets_imageview_08);
}
}
|
{
"content_hash": "80059844d920fe22d4e4ff8aafb0c6cd",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 89,
"avg_line_length": 26.857142857142858,
"alnum_prop": 0.7579787234042553,
"repo_name": "Garbriel/AndroidExamples",
"id": "3d4806944c1a2c0aa7a548150f81faf9e0c766b5",
"size": "376",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/io/android_tech/myexample/Widgets/Widget_ImageView_08_Activity.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "785"
},
{
"name": "Java",
"bytes": "273690"
}
]
}
|
var fs = require('fs');
var glob = require('glob');
var path = require('path');
var gutil = require('gulp-util');
module.exports = function(file, options) {
options = options || {};
var startReg = /<!--\s*build:(\w+)(?:(?:\(([^\)]+?)\))?\s+(\/?([^\s]+?))?)?\s*-->/gim;
var endReg = /<!--\s*endbuild\s*-->/gim;
var jsReg = /<\s*script\s+.*?src\s*=\s*('[^']+'|"[^"]+"|[^ >]+).*?><\s*\/\s*script\s*>/gi;
var cssReg = /<\s*link\s+.*?href\s*=\s*('[^']+'|"[^"]+"|[^ >]+).*?>/gi;
var cssMediaReg = /<\s*link\s+.*?media\s*=\s*('[^']+'|"[^"]+"|[^ >]+).*?>/gi;
var startCondReg = /<!--\[[^\]]+\]>/gim;
var endCondReg = /<!\[endif\]-->/gim;
var basePath = file.base;
var mainPath = path.dirname(file.path);
var outputPath = options.outputRelativePath || '';
var content = String(file.contents);
var sections = content.split(endReg);
var blocks = [];
var cssMediaQuery = null;
function getFiles(type, content, reg, alternatePath) {
if (type.indexOf("replace") !== -1)
return [];
var paths = [];
var files = [];
cssMediaQuery = null;
content
.replace(startCondReg, '')
.replace(endCondReg, '')
.replace(/<!--(?:(?:.|\r|\n)*?)-->/gim, function (a) {
return options.enableHtmlComment ? a : '';
})
.replace(reg, function (a, b) {
var filePath = path.resolve(path.join(
alternatePath || options.path || mainPath,
b.replace(/^'|^"/, '').replace(/'$/, '').replace(/"$/, '')
));
if (options.assetsDir)
filePath = path.resolve(path.join(options.assetsDir, path.relative(basePath, filePath)));
paths.push(filePath);
});
if (reg === cssReg) {
content.replace(cssMediaReg, function(a, media) {
media = media.replace(/^'|^"/, '').replace(/'$/, '').replace(/"$/, '');
if (!cssMediaQuery) {
cssMediaQuery = media;
} else {
if (cssMediaQuery != media)
throw new gutil.PluginError('gulp-usemin', 'incompatible css media query for ' + a + ' detected.');
}
});
}
for (var i = 0, l = paths.length; i < l; ++i) {
var filepaths = glob.sync(paths[i]);
if(filepaths[0] === undefined) {
throw new gutil.PluginError('gulp-usemin', 'Path ' + paths[i] + ' not found!');
}
filepaths.forEach(function (filepath) {
files.push(new gutil.File({
path: filepath,
contents: fs.readFileSync(filepath)
}));
});
}
return files;
}
for (var i = 0, l = sections.length; i < l; ++i) {
if (sections[i].match(startReg)) {
var section = sections[i].split(startReg);
blocks.push(section[0]);
var startCondLine = section[5].match(startCondReg);
var endCondLine = section[5].match(endCondReg);
if (startCondLine && endCondLine)
blocks.push(startCondLine[0]);
if (section[1] !== 'remove') {
var type;
if (jsReg.test(section[5])) {
type = section[1].indexOf('inline') !== -1 ? 'inlinejs' : section[1].indexOf('replace') !== -1 ? 'replacejs' : 'js';
blocks.push({
type: type,
nameInHTML: section[3],
name: path.join(outputPath, section[4]),
files: getFiles(type, section[5], jsReg, section[2]),
tasks: options[section[1]]
});
} else {
type = section[1].indexOf('inline') !== -1 ? 'inlinecss' : section[1].indexOf('replace') !== -1 ? 'replacecss' : 'css';
blocks.push({
type: type,
nameInHTML: section[3],
name: path.join(outputPath, section[4]),
files: getFiles(type, section[5], cssReg, section[2]),
tasks: options[section[1]],
mediaQuery: cssMediaQuery
});
}
}
if (startCondLine && endCondLine)
blocks.push(endCondLine[0]);
} else
blocks.push(sections[i]);
}
return blocks;
};
|
{
"content_hash": "913fb1051acec015d7ed2d41b1ac972e",
"timestamp": "",
"source": "github",
"line_count": 123,
"max_line_length": 129,
"avg_line_length": 32.3739837398374,
"alnum_prop": 0.520843797086891,
"repo_name": "bassarisse/gulp-usemin",
"id": "8c6e457711cd6047ff6e0f7ba659d4fdf1bb3810",
"size": "3982",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/blocksBuilder.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "184"
},
{
"name": "HTML",
"bytes": "1807"
},
{
"name": "JavaScript",
"bytes": "27997"
}
]
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Windows.UI.Xaml.Data;
namespace MH4U_Database.Converters
{
class NoteImageConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, string language)
{
string r = value.ToString();
if (r.Equals("W"))
return "/Assets/icons_armor/Note.white.png";
else if(r.Equals("P"))
return "/Assets/icons_armor/Note.purple.png";
else if(r.Equals("B"))
return "/Assets/icons_armor/Note.blue.png";
else if(r.Equals("R"))
return "/Assets/icons_armor/Note.red.png";
else if(r.Equals("Y"))
return "/Assets/icons_armor/Note.yellow.png";
else if(r.Equals("O"))
return "/Assets/icons_armor/Note.orange.png";
else if(r.Equals("G"))
return "/Assets/icons_armor/Note.green.png";
else if(r.Equals("C"))
return "/Assets/icons_armor/Note.aqua.png";
return null;
}
public object ConvertBack(object value, Type targetType, object parameter, string language)
{
throw new NotImplementedException();
}
}
}
|
{
"content_hash": "48cf98b79bcdc7b806f6ef7da9f8f909",
"timestamp": "",
"source": "github",
"line_count": 39,
"max_line_length": 99,
"avg_line_length": 34.84615384615385,
"alnum_prop": 0.5710080941869021,
"repo_name": "JosephMichels/WP-MH4UDatabase",
"id": "b32db7cab145f893300958c101d37327102d1a19",
"size": "1361",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "MH4U_Database.Shared/Converters/NoteImageConverter.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "308029"
}
]
}
|
<chat chat-id="chatId" room-id="roomId"></chat>
|
{
"content_hash": "0aba7a86467fae43b5e45037ca033283",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 47,
"avg_line_length": 48,
"alnum_prop": 0.6666666666666666,
"repo_name": "purple-circle/chat",
"id": "a30d5d1b5cc61c92dd0190276f8dbaf89fa026ce",
"size": "49",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "public/views/index.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "19503"
},
{
"name": "CoffeeScript",
"bytes": "77274"
},
{
"name": "HTML",
"bytes": "15558"
},
{
"name": "JavaScript",
"bytes": "50658"
}
]
}
|
package agent;
import jason.environment.grid.Location;
public class CityAgent {
private String name;
private int id;
private Location[] homes;
private Location spawn;
private int startTime;
private int homeTime;
public CityAgent(int id, Location spawn, Location homes[]) {
this.name = "ricardo"+(id+1);
this.id = id;
this.spawn = spawn;
this.homes = homes;
}
public int getId() {
return id;
}
public Location[] getHomes() {
return homes;
}
public Location getSpawn() {
return spawn;
}
public String getName() {
return name;
}
public void setStartTime(int startTime) {
this.startTime = startTime;
}
public int getStartTime(){
return this.startTime;
}
public void setHomeTime(int homeTime){
this.homeTime = homeTime;
}
public int getHomeTime(){
return this.homeTime;
}
}
|
{
"content_hash": "3520d757e0a8345c298fd72fa06946d6",
"timestamp": "",
"source": "github",
"line_count": 53,
"max_line_length": 61,
"avg_line_length": 15.716981132075471,
"alnum_prop": 0.6902761104441777,
"repo_name": "ricpass/TCC",
"id": "5d10d05f52012296b47591526e5fc93463e4107e",
"size": "833",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "traffic/src/env/agent/CityAgent.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "58801"
}
]
}
|
using System;
namespace Evol.Configuration.Modules
{
[AttributeUsage(AttributeTargets.Class, AllowMultiple = true)]
public class DependOnAttribute : Attribute
{
public Type[] DependedModuleTypes;
public DependOnAttribute(params Type[] dependedModuleTypes)
{
DependedModuleTypes = dependedModuleTypes;
}
}
}
|
{
"content_hash": "7b4fff4865fde6f036e78f82a007a5c3",
"timestamp": "",
"source": "github",
"line_count": 14,
"max_line_length": 67,
"avg_line_length": 26.357142857142858,
"alnum_prop": 0.6829268292682927,
"repo_name": "supernebula/evol-core",
"id": "e877bd2e3cf9fcb9028fc39e3686371e9a3f33fb",
"size": "371",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Infrastructure/Evol.Configuration/Modules/DependModuleAttribute.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ASP",
"bytes": "112"
},
{
"name": "C#",
"bytes": "11926780"
},
{
"name": "CSS",
"bytes": "349708"
},
{
"name": "PHP",
"bytes": "7682"
},
{
"name": "Python",
"bytes": "32324"
},
{
"name": "Vue",
"bytes": "2051"
}
]
}
|
<?php
/**
* [Discuz!] (C)2001-2099 Comsenz Inc.
* This is NOT a freeware, use is subject to license terms
*
* $Id: helper_manyou.php 27449 2012-02-01 05:32:35Z zhangguosheng $
*/
if(!defined('IN_DISCUZ')) {
exit('Access Denied');
}
class helper_manyou {
public static function manyoulog($logtype, $uids, $action, $fid = '') {
global $_G;
if($_G['setting']['my_app_status'] && $logtype == 'user') {
$action = daddslashes($action);
$values = array();
$uids = is_array($uids) ? $uids : array($uids);
foreach($uids as $uid) {
$uid = intval($uid);
C::t('common_member_log')->insert(array('uid' => $uid, 'action' => $action, 'dateline' => TIMESTAMP), false, true);
}
}
}
public static function getuserapp($panel = 0) {
require_once libfile('function/manyou');
manyou_getuserapp($panel);
return true;
}
public static function getmyappiconpath($appid, $iconstatus=0) {
if($iconstatus > 0) {
return getglobal('setting/attachurl').'./'.'myapp/icon/'.$appid.'.jpg';
}
return 'http://appicon.manyou.com/icons/'.$appid;
}
public static function checkupdate() {
global $_G;
if($_G['setting']['my_app_status'] && empty($_G['setting']['my_closecheckupdate']) && $_G['group']['radminid'] == 1) {
$sid = $_G['setting']['my_siteid'];
$ts = $_G['timestamp'];
$key = md5($sid.$ts.$_G['setting']['my_sitekey']);
echo '<script type="text/javascript" src="http://notice.uchome.manyou.com/notice?sId='.$sid.'&ts='.$ts.'&key='.$key.'" charset="UTF-8"></script>';
}
}
}
?>
|
{
"content_hash": "120697068a3c213d0599aa945aa552ff",
"timestamp": "",
"source": "github",
"line_count": 55,
"max_line_length": 149,
"avg_line_length": 28.10909090909091,
"alnum_prop": 0.6009055627425615,
"repo_name": "buuug7/game4039",
"id": "c579354809c43ac2732c6925de73cb743830989e",
"size": "1546",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "bbs/source/class/helper/helper_manyou.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ApacheConf",
"bytes": "362"
},
{
"name": "Batchfile",
"bytes": "2069"
},
{
"name": "CSS",
"bytes": "4140352"
},
{
"name": "HTML",
"bytes": "3291125"
},
{
"name": "JavaScript",
"bytes": "2324364"
},
{
"name": "PHP",
"bytes": "11077339"
},
{
"name": "Python",
"bytes": "16281"
},
{
"name": "Shell",
"bytes": "1061"
}
]
}
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<!-- Mirrored from bvs.wikidot.com/system:list-all-pages/p/81 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 10 Jul 2022 06:19:20 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=utf-8" /><!-- /Added by HTTrack -->
<head>
<title>List All Pages - Billy Vs. SNAKEMAN Wiki</title>
<script type="text/javascript" src="http://d3g0gp89917ko0.cloudfront.net/v--291054f06006/common--javascript/init.combined.js"></script>
<script type="text/javascript">
var URL_HOST = 'www.wikidot.com';
var URL_DOMAIN = 'wikidot.com';
var USE_SSL = true ;
var URL_STATIC = 'http://d3g0gp89917ko0.cloudfront.net/v--291054f06006';
// global request information
var WIKIREQUEST = {};
WIKIREQUEST.info = {};
WIKIREQUEST.info.domain = "bvs.wikidot.com";
WIKIREQUEST.info.siteId = 32011;
WIKIREQUEST.info.siteUnixName = "bvs";
WIKIREQUEST.info.categoryId = 179316;
WIKIREQUEST.info.themeId = 9564;
WIKIREQUEST.info.requestPageName = "system:list-all-pages";
OZONE.request.timestamp = 1657433952;
OZONE.request.date = new Date();
WIKIREQUEST.info.lang = 'en';
WIKIREQUEST.info.pageUnixName = "system:list-all-pages";
WIKIREQUEST.info.pageId = 862986;
WIKIREQUEST.info.lang = "en";
OZONE.lang = "en";
var isUAMobile = !!/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
</script>
<script type="text/javascript">
require.config({
baseUrl: URL_STATIC + '/common--javascript',
paths: {
'jquery.ui': 'jquery-ui.min',
'jquery.form': 'jquery.form'
}
});
</script>
<meta http-equiv="content-type" content="text/html;charset=UTF-8"/>
<meta http-equiv="content-language" content="en"/>
<script type="text/javascript" src="http://d3g0gp89917ko0.cloudfront.net/v--291054f06006/common--javascript/WIKIDOT.combined.js"></script>
<style type="text/css" id="internal-style">
/* modules */
@import url(http://d3g0gp89917ko0.cloudfront.net/v--291054f06006/common--modules/css/list/WikiPagesModule.css);
/* theme */
@import url(http://d3g0gp89917ko0.cloudfront.net/v--291054f06006/common--theme/base/css/style.css);
@import url(http://bvs.wdfiles.com/local--theme/north/style.css);
</style>
<link rel="shortcut icon" href="../../local--favicon/favicon.gif"/>
<link rel="icon" type="image/gif" href="../../local--favicon/favicon.gif"/>
<link rel="apple-touch-icon" href="../../common--images/apple-touch-icon-57x57.png" />
<link rel="apple-touch-icon" sizes="72x72" href="../../common--images/apple-touch-icon-72x72.png" />
<link rel="apple-touch-icon" sizes="114x114" href="../../common--images/apple-touch-icon-114x114.png" />
<link rel="alternate" type="application/wiki" title="Edit this page" href="javascript:WIKIDOT.page.listeners.editClick()"/>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-18234656-1']);
_gaq.push(['_setDomainName', 'none']);
_gaq.push(['_setAllowLinker', true]);
_gaq.push(['_trackPageview']);
_gaq.push(['old._setAccount', 'UA-68540-5']);
_gaq.push(['old._setDomainName', 'none']);
_gaq.push(['old._setAllowLinker', true]);
_gaq.push(['old._trackPageview']);
_gaq.push(['userTracker._setAccount', 'UA-3581307-1']);
_gaq.push(['userTracker._trackPageview']);
</script>
<script type="text/javascript">
window.google_analytics_uacct = 'UA-18234656-1';
window.google_analytics_domain_name = 'none';
</script>
<link rel="manifest" href="../../onesignal/manifest.html" />
<script src="https://cdn.onesignal.com/sdks/OneSignalSDK.js" acync=""></script>
<script>
var OneSignal = window.OneSignal || [];
OneSignal.push(function() {
OneSignal.init({
appId: null,
});
});
</script>
</head>
<body id="html-body">
<div id="skrollr-body">
<a name="page-top"></a>
<div id="container-wrap-wrap">
<div id="container-wrap">
<div id="container">
<div id="header">
<h1><a href="../../index.html"><span>Billy Vs. SNAKEMAN Wiki</span></a></h1>
<h2><span>Be the Ultimate Ninja.</span></h2>
<!-- google_ad_section_start(weight=ignore) -->
<div id="search-top-box" class="form-search">
<form id="search-top-box-form" action="http://bvs.wikidot.com/system:list-all-pages/p/dummy" class="input-append">
<input id="search-top-box-input" class="text empty search-query" type="text" size="15" name="query" value="Search this site" onfocus="if(YAHOO.util.Dom.hasClass(this, 'empty')){YAHOO.util.Dom.removeClass(this,'empty'); this.value='';}"/><input class="button btn" type="submit" name="search" value="Search"/>
</form>
</div>
<div id="top-bar">
<ul>
<li><a href="../../allies.html">Allies</a>
<ul>
<li><strong><a href="../../untabbed_allies.html">Allies Untabbed</a></strong></li>
<li><a href="../../allies.html#toc7">Burger Ninja</a></li>
<li><a href="../../allies.html#toc5">Reaper</a></li>
<li><a href="../../allies.html#toc0">Regular</a></li>
<li><a href="../../allies.html#toc8">R00t</a></li>
<li><a href="../../allies.html#toc1">Season 2+</a></li>
<li><a href="../../allies.html#toc2">Season 3+</a></li>
<li><a href="../../allies.html#toc3">Season 4+</a></li>
<li><a href="../../allies.html#toc4">The Trade</a></li>
<li><a href="../../allies.html#toc6">Wasteland</a></li>
<li><a href="../../allies.html#toc9">World Kaiju</a></li>
<li><strong><a href="../../summons.html">Summons</a></strong></li>
<li><strong><a href="../../teams.html">Teams</a></strong></li>
</ul>
</li>
<li><a href="../../missions.html">Missions</a>
<ul>
<li><strong><a href="../../untabbed_missions.html">Missions Untabbed</a></strong></li>
<li><strong><em><a href="../../missions.html#toc0">D-Rank</a></em></strong></li>
<li><strong><em><a href="../../missions.html#toc1">C-Rank</a></em></strong></li>
<li><strong><em><a href="../../missions.html#toc2">B-Rank</a></em></strong></li>
<li><strong><em><a href="../../missions.html#toc3">A-Rank</a></em></strong></li>
<li><strong><em><a href="../../missions.html#toc4">AA-Rank</a></em></strong></li>
<li><strong><em><a href="../../missions.html#toc5">S-Rank</a></em></strong></li>
<li><a href="../../missions.html#toc10">BurgerNinja</a></li>
<li><a href="../../missions.html#toc14">Cave</a></li>
<li><a href="../../missions.html#toc13">Jungle</a></li>
<li><a href="../../missions.html#toc7">Monochrome</a></li>
<li><a href="../../missions.html#toc8">Outskirts</a></li>
<li><a href="../../missions.html#toc11">PizzaWitch</a></li>
<li><a href="../../missions.html#toc6">Reaper</a></li>
<li><a href="../../missions.html#toc9">Wasteland</a></li>
<li><a href="../../missions.html#toc12">Witching Hour</a></li>
<li><strong><em><a href="../../missions.html#toc14">Quests</a></em></strong></li>
<li><a href="../../wota.html">Mission Lady Alley</a></li>
</ul>
</li>
<li><a href="../../items.html">Items</a>
<ul>
<li><strong><a href="../../untabbed_items.html">Items Untabbed</a></strong></li>
<li><a href="../../items.html#toc6">Ally Drops and Other</a></li>
<li><a href="../../items.html#toc0">Permanent Items</a></li>
<li><a href="../../items.html#toc1">Potions/Crafting Items</a>
<ul>
<li><a href="../../items.html#toc4">Crafting</a></li>
<li><a href="../../items.html#toc3">Ingredients</a></li>
<li><a href="../../items.html#toc2">Potions</a></li>
</ul>
</li>
<li><a href="../../items.html#toc5">Wasteland Items</a></li>
<li><a href="../../sponsored-items.html">Sponsored Items</a></li>
</ul>
</li>
<li><a href="../../village.html">Village</a>
<ul>
<li><a href="../../billycon.html">BillyCon</a>
<ul>
<li><a href="../../billycon_billy-idol.html">Billy Idol</a></li>
<li><a href="../../billycon_cosplay.html">Cosplay</a></li>
<li><a href="../../billycon_dealer-s-room.html">Dealer's Room</a></li>
<li><a href="../../billycon_events.html">Events</a></li>
<li><a href="../../billycon_glowslinging.html">Glowslinging</a></li>
<li><a href="../../billycon_rave.html">Rave</a></li>
<li><a href="../../billycon_squee.html">Squee</a></li>
<li><a href="../../billycon_video-game-tournament.html">Video Game Tournament</a></li>
<li><a href="../../billycon_wander.html">Wander</a></li>
</ul>
</li>
<li><a href="../../billytv.html">BillyTV</a></li>
<li><a href="../../bingo-ing.html">Bingo'ing</a></li>
<li><a href="../../candyween.html">Candyween</a></li>
<li><a href="../../festival.html">Festival Day</a>
<ul>
<li><a href="../../festival_bargltron.html">Bargltron</a></li>
<li><a href="../../festival_billymaze.html">BillyMaze</a></li>
<li><a href="../../festival_dance-party.html">Dance Party</a></li>
<li><a href="../../festival_elevensnax.html">ElevenSnax</a></li>
<li><a href="../../festival_marksman.html">Marksman</a></li>
<li><a href="../../festival_raffle.html">Raffle</a></li>
<li><a href="../../festival_rngshack.html">RNGShack</a></li>
<li><a href="../../festival_tsukiroll.html">TsukiRoll</a></li>
<li><a href="../../festival_tunnel.html">Tunnel</a></li>
</ul>
</li>
<li><a href="../../hidden-hoclaus.html">Hidden HoClaus</a></li>
<li><a href="../../kaiju.html">Kaiju</a></li>
<li><a href="../../marketplace.html">Marketplace</a></li>
<li><a href="../../pizzawitch-garage.html">PizzaWitch Garage</a></li>
<li><a href="../../robo-fighto.html">Robo Fighto</a></li>
<li>R00t
<ul>
<li><a href="../../fields.html">Fields</a></li>
<li><a href="../../keys.html">Keys</a></li>
<li><a href="../../phases.html">Phases</a></li>
</ul>
</li>
<li><a href="../../upgrade_science-facility.html#toc2">SCIENCE!</a></li>
<li><a href="../../upgrades.html">Upgrades</a></li>
<li><a href="../../zombjas.html">Zombjas</a></li>
</ul>
</li>
<li><a href="../../misc_party-house.html">Party House</a>
<ul>
<li><a href="../../partyhouse_11dbhk-s-lottery.html">11DBHK's Lottery</a></li>
<li><a href="../../partyhouse_akatsukiball.html">AkaTsukiBall</a></li>
<li><a href="../../upgrade_claw-machines.html">Crane Game!</a></li>
<li><a href="../../upgrade_darts-hall.html">Darts!</a></li>
<li><a href="../../partyhouse_flower-wars.html">Flower Wars</a></li>
<li><a href="../../upgrade_juice-bar.html">'Juice' Bar</a></li>
<li><a href="../../partyhouse_mahjong.html">Mahjong</a></li>
<li><a href="../../partyhouse_ninja-jackpot.html">Ninja Jackpot!</a></li>
<li><a href="../../partyhouse_over-11-000.html">Over 11,000</a></li>
<li><a href="../../partyhouse_pachinko.html">Pachinko</a></li>
<li><a href="../../partyhouse_party-room.html">Party Room</a></li>
<li><a href="../../partyhouse_pigeons.html">Pigeons</a></li>
<li><a href="../../partyhouse_prize-wheel.html">Prize Wheel</a></li>
<li><a href="../../partyhouse_roulette.html">Roulette</a></li>
<li><a href="../../partyhouse_scratchy-tickets.html">Scratchy Tickets</a></li>
<li><a href="../../partyhouse_snakeman.html">SNAKEMAN</a></li>
<li><a href="../../partyhouse_superfail.html">SUPERFAIL</a></li>
<li><a href="../../partyhouse_tip-line.html">Tip Line</a></li>
<li><a href="../../partyhouse_the-big-board.html">The Big Board</a></li>
<li><a href="../../partyhouse_the-first-loser.html">The First Loser</a></li>
</ul>
</li>
<li><a href="../../guides.html">Guides</a>
<ul>
<li><a href="../../guide_billycon.html">BillyCon Guide</a></li>
<li><a href="../../guide_burgerninja.html">BurgerNinja Guide</a></li>
<li><a href="../../guide_candyween.html">Candyween Guide</a></li>
<li><a href="../../guide_glossary.html">Glossary</a></li>
<li><a href="../../guide_gs.html">Glowslinging Strategy Guide</a></li>
<li><a href="../../guide_hq.html">Hero's Quest</a></li>
<li><a href="../../guide_looping.html">Looping Guide</a></li>
<li><a href="../../guide_monochrome.html">Monochrome Guide</a></li>
<li><a href="../../overnight-bonuses.html">Overnight Bonuses</a></li>
<li><a href="../../guide_pizzawitch.html">PizzaWitch Guide</a></li>
<li><a href="../../tabbed_potions-crafting.html">Potions / Crafting</a>
<ul>
<li><a href="../../tabbed_potions-crafting.html#toc3">Crafting</a>
<ul>
<li><a href="../../tabbed_potions-crafting.html#toc4">Items</a></li>
<li><a href="../../tabbed_potions-crafting.html#toc5">Materials</a></li>
</ul>
</li>
<li><a href="../../tabbed_potions-crafting.html#toc0">Potion Mixing</a>
<ul>
<li><a href="../../tabbed_potions-crafting.html#toc2">Mixed Ingredients</a></li>
<li><a href="../../tabbed_potions-crafting.html#toc1">Potions</a></li>
</ul>
</li>
<li><a href="../../tabbed_potions-crafting.html#toc6">Reduction Laboratory</a>
<ul>
<li><a href="../../tabbed_potions-crafting.html#toc8">Potions and Ingredients</a></li>
<li><a href="../../tabbed_potions-crafting.html#toc7">Wasteland Items</a></li>
</ul>
</li>
</ul>
</li>
<li><a href="../../guide_impossible-mission.html">Impossible Mission Guide</a></li>
<li><a href="../../guide_xp.html">Ranking Guide</a></li>
<li><a href="../../guide_reaper.html">Reaper Guide</a></li>
<li><a href="../../guide_rgg.html">Reaper's Game Guide</a></li>
<li><a href="../../guide_r00t.html">R00t Guide</a></li>
<li><a href="../../guide_speed-content.html">Speed Content Guide</a></li>
<li><a href="../../guide_speedlooping.html">Speedlooping Guide</a></li>
<li><a href="../../guide_thetrade.html">The Trade Guide</a></li>
<li><a href="../../guide_wasteland.html">Wasteland Guide</a></li>
</ul>
</li>
<li>Other
<ul>
<li><a href="../../arena.html">Arena</a></li>
<li><a href="../../billy-club.html">Billy Club</a>
<ul>
<li><a href="../../boosters.html">Boosters</a></li>
<li><a href="../../karma.html">Karma</a></li>
</ul>
</li>
<li><a href="../../bloodline.html">Bloodlines</a></li>
<li><a href="../../jutsu.html">Jutsu</a>
<ul>
<li><a href="../../jutsu.html#toc2">Bloodline Jutsu</a></li>
<li><a href="../../jutsu.html#toc0">Regular Jutsu</a></li>
<li><a href="../../jutsu.html#toc1">Special Jutsu</a></li>
</ul>
</li>
<li><a href="../../mission-bonus.html">Mission Bonus</a></li>
<li><a href="../../news-archive.html">News Archive</a></li>
<li><a href="../../number-one.html">Number One</a></li>
<li><a href="../../old-news-archive.html">Old News Archive</a></li>
<li><a href="../../retail_perfect-poker.html">Perfect Poker Bosses</a></li>
<li><a href="../../pets.html">Pets</a></li>
<li><a href="../../retail.html">Retail</a></li>
<li><a href="../../ryo.html">Ryo</a></li>
<li><a href="../../spar.html">Spar With Friends</a></li>
<li><a href="../../sponsored-items.html">Sponsored Items</a></li>
<li><a href="../../store.html">Store</a></li>
<li><a href="../../themes.html">Themes</a></li>
<li><a href="../../trophies.html">Trophies</a></li>
<li><a href="../../untabbed.html">Untabbed</a>
<ul>
<li><a href="../../untabbed_allies.html">Allies</a></li>
<li><a href="../../untabbed_items.html">Items</a></li>
<li><a href="../../untabbed_jutsu.html">Jutsu</a></li>
<li><a href="../../untabbed_missions.html">Missions</a></li>
<li><a href="../../untabbed_potions-crafting.html">Potions / Crafting</a></li>
</ul>
</li>
<li><a href="../../world-kaiju.html">World Kaiju</a></li>
</ul>
</li>
<li><a href="../../utilities.html">Utilities</a>
<ul>
<li><a href="http://www.cobaltknight.clanteam.com/awesomecalc.html">Awesome Calculator</a></li>
<li><a href="http://timothydryke.byethost17.com/billy/itemchecker.php">Item Checker</a></li>
<li><a href="../../utility_calculator.html">Mission Calculator</a></li>
<li><a href="../../utility_r00t-calculator.html">R00t Calculator</a></li>
<li><a href="../../utility_success-calculator.html">Success Calculator</a></li>
<li><a href="../../templates.html">Templates</a></li>
<li><a href="../../utility_chat.html">Wiki Chat Box</a></li>
</ul>
</li>
</ul>
</div>
<div id="login-status"><a href="javascript:;" onclick="WIKIDOT.page.listeners.createAccount(event)" class="login-status-create-account btn">Create account</a> <span>or</span> <a href="javascript:;" onclick="WIKIDOT.page.listeners.loginClick(event)" class="login-status-sign-in btn btn-primary">Sign in</a> </div>
<div id="header-extra-div-1"><span></span></div><div id="header-extra-div-2"><span></span></div><div id="header-extra-div-3"><span></span></div>
</div>
<div id="content-wrap">
<div id="side-bar">
<h3 ><span><a href="http://www.animecubed.com/billy/?57639" onclick="window.open(this.href, '_blank'); return false;">Play BvS Now!</a></span></h3>
<ul>
<li><a href="../../system_members.html">Site members</a></li>
<li><a href="../../system_join.html">Wiki Membership</a></li>
</ul>
<hr />
<ul>
<li><a href="../../forum_start.html">Forum Main</a></li>
<li><a href="../../forum_recent-posts.html">Recent Posts</a></li>
</ul>
<hr />
<ul>
<li><a href="../../system_recent-changes.html">Recent changes</a></li>
<li><a href="../../system_list-all-pages.html">List all pages</a></li>
<li><a href="../../system_page-tags-list.html">Page Tags</a></li>
</ul>
<hr />
<ul>
<li><a href="../../players.html">Players</a></li>
<li><a href="../../villages.html">Villages</a></li>
<li><a href="../../other-resources.html">Other Resources</a></li>
</ul>
<hr />
<p style="text-align: center;"><span style="font-size:smaller;">Notice: Do not send bug reports based on the information on this site. If this site is not matching up with what you're experiencing in game, that is a problem with this site, not with the game.</span></p>
</div>
<!-- google_ad_section_end -->
<div id="main-content">
<div id="action-area-top"></div>
<div id="page-title">
List All Pages
</div>
<div id="page-content">
<div class="list-pages-box"> <div class="list-pages-item">
<div class="title">
<p><a href="../../player_kanzaki.html">Kanzaki</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../mission_karaoke-spying.html">Karaoke Spying</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../quest_karate-yes.html">Karate Yes!</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../allies_karen.html">Karen</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../allies_karen-lvl-2.html">Karen Lvl. 2</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../karma.html">Karma</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../player_konoha20.html">Katsumata</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../village_kawaii-village.html">Kawaii Village</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../player_kawaii13.html">kawaii13</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../player_kayaa.html">KaYaa</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../player_kayuga-kimimaro.html">Kayuga Kimimaro</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../player_kazenr.html">Kaze N. R.</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../player_kazeodori.html">Kazeodori</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../player_kazuki.html">Kazuki</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../player_kazunari.html">Kazunari</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../items_k-belt.html">K-Belt</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../allies_k-dog.html">K-Dog</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../allies_k-dog-lvl-2.html">K-Dog Lvl. 2</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../items_k-dog-s-headband.html">K-Dog's Headband</a></p>
</div>
</div>
<div class="list-pages-item">
<div class="title">
<p><a href="../../mission_keep-a-signal-fire-going.html">Keep a Signal Fire Going</a></p>
</div>
</div>
<div class="pager"><span class="pager-no">page 81 of 186</span><span class="target"><a href="80.html">« previous</a></span><span class="target"><a href="1.html">1</a></span><span class="target"><a href="2.html">2</a></span><span class="dots">...</span><span class="target"><a href="79.html">79</a></span><span class="target"><a href="80.html">80</a></span><span class="current">81</span><span class="target"><a href="82.html">82</a></span><span class="target"><a href="83.html">83</a></span><span class="dots">...</span><span class="target"><a href="185.html">185</a></span><span class="target"><a href="186.html">186</a></span><span class="target"><a href="82.html">next »</a></span></div>
</div>
</div>
<div id="page-info-break"></div>
<div id="page-options-container">
</div>
<div id="action-area" style="display: none;"></div>
</div>
</div>
<div id="footer" style="display: block; visibility: visible;">
<div class="options" style="display: block; visibility: visible;">
<a href="http://www.wikidot.com/doc" id="wikidot-help-button">Help</a>
|
<a href="http://www.wikidot.com/legal:terms-of-service" id="wikidot-tos-button">Terms of Service</a>
|
<a href="http://www.wikidot.com/legal:privacy-policy" id="wikidot-privacy-button">Privacy</a>
|
<a href="javascript:;" id="bug-report-button" onclick="WIKIDOT.page.listeners.pageBugReport(event)">Report a bug</a>
|
<a href="javascript:;" id="abuse-report-button" onclick="WIKIDOT.page.listeners.flagPageObjectionable(event)">Flag as objectionable</a>
</div>
Powered by <a href="http://www.wikidot.com/">Wikidot.com</a>
</div>
<div id="license-area" class="license-area">
Unless otherwise stated, the content of this page is licensed under <a rel="license" href="http://creativecommons.org/licenses/by-sa/3.0/">Creative Commons Attribution-ShareAlike 3.0 License</a>
</div>
<div id="extrac-div-1"><span></span></div><div id="extrac-div-2"><span></span></div><div id="extrac-div-3"><span></span></div>
</div>
</div>
<!-- These extra divs/spans may be used as catch-alls to add extra imagery. -->
<div id="extra-div-1"><span></span></div><div id="extra-div-2"><span></span></div><div id="extra-div-3"><span></span></div>
<div id="extra-div-4"><span></span></div><div id="extra-div-5"><span></span></div><div id="extra-div-6"><span></span></div>
</div>
</div>
<div id="dummy-ondomready-block" style="display: none;" ></div>
<!-- Google Analytics load -->
<script type="text/javascript">
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://' : 'http://') + 'stats.g.doubleclick.net/dc.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
<!-- Quantcast -->
<script type="text/javascript">
_qoptions={
qacct:"p-edL3gsnUjJzw-"
};
(function() {
var qc = document.createElement('script'); qc.type = 'text/javascript'; qc.async = true;
qc.src = ('https:' == document.location.protocol ? 'https://secure' : 'http://edge') + '.quantserve.com/quant.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(qc, s);
})();
</script>
<noscript>
<img src="http://pixel.quantserve.com/pixel/p-edL3gsnUjJzw-.gif" style="display: none;" border="0" height="1" width="1" alt="Quantcast"/>
</noscript>
<div id="page-options-bottom-tips" style="display: none;">
<div id="edit-button-hovertip">
Click here to edit contents of this page. </div>
</div>
<div id="page-options-bottom-2-tips" style="display: none;">
<div id="edit-sections-button-hovertip">
Click here to toggle editing of individual sections of the page (if possible). Watch headings for an "edit" link when available. </div>
<div id="edit-append-button-hovertip">
Append content without editing the whole page source. </div>
<div id="history-button-hovertip">
Check out how this page has evolved in the past. </div>
<div id="discuss-button-hovertip">
If you want to discuss contents of this page - this is the easiest way to do it. </div>
<div id="files-button-hovertip">
View and manage file attachments for this page. </div>
<div id="site-tools-button-hovertip">
A few useful tools to manage this Site. </div>
<div id="backlinks-button-hovertip">
See pages that link to and include this page. </div>
<div id="rename-move-button-hovertip">
Change the name (also URL address, possibly the category) of the page. </div>
<div id="view-source-button-hovertip">
View wiki source for this page without editing. </div>
<div id="parent-page-button-hovertip">
View/set parent page (used for creating breadcrumbs and structured layout). </div>
<div id="abuse-report-button-hovertip">
Notify administrators if there is objectionable content in this page. </div>
<div id="bug-report-button-hovertip">
Something does not work as expected? Find out what you can do. </div>
<div id="wikidot-help-button-hovertip">
General Wikidot.com documentation and help section. </div>
<div id="wikidot-tos-button-hovertip">
Wikidot.com Terms of Service - what you can, what you should not etc. </div>
<div id="wikidot-privacy-button-hovertip">
Wikidot.com Privacy Policy.
</div>
</div>
</body>
<!-- Mirrored from bvs.wikidot.com/system:list-all-pages/p/81 by HTTrack Website Copier/3.x [XR&CO'2014], Sun, 10 Jul 2022 06:19:21 GMT -->
</html>
|
{
"content_hash": "7e7fa45f821826e9dfaa454b35eb8c4b",
"timestamp": "",
"source": "github",
"line_count": 724,
"max_line_length": 706,
"avg_line_length": 38.50690607734806,
"alnum_prop": 0.5811901431184763,
"repo_name": "tn5421/tn5421.github.io",
"id": "f44b92cc2899b68764f9f49fa13a2d10d505ff63",
"size": "27879",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "bvs.wikidot.com/system_list-all-pages/p/81.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "400301089"
}
]
}
|
package com.chan.englishbaby.model.parse;
import android.text.TextUtils;
import com.chan.englishbaby.proto.EnglishBookProto;
import com.chan.englishbaby.core.AbstractBookParser;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
/**
* Created by chan on 16/6/21.
*/
public class BookParser extends AbstractBookParser {
private EnglishBookProto.EnglishBook.Builder m_englishBuilder;
private List<EnglishBookProto.Unit.Builder> m_unitBuilderContainer = new ArrayList<>();
private List<EnglishBookProto.Lesson.Builder> m_lessonBuilderContainer = new ArrayList<>();
private EnglishBookProto.Lesson.Builder m_currentLessonBuilder;
private EnglishBookProto.Word.Builder m_currentWordBuilder;
private EnglishBookProto.Unit.Builder m_currentUnitBuilder;
public BookParser(InputStream inputStream) {
super(inputStream);
}
public EnglishBookProto.EnglishBook loadBook() throws IOException {
m_englishBuilder = EnglishBookProto.EnglishBook.newBuilder();
parse();
return m_englishBuilder.build();
}
@Override
protected void parse() throws IOException {
m_currentUnitBuilder = null;
m_unitBuilderContainer.clear();
m_lessonBuilderContainer.clear();
super.parse();
}
@Override
protected void parsedUnit(String unit) {
//不是第一次分析Unit
if (m_currentUnitBuilder != null) {
//之后要把上一次的lesson入栈
pushBackLesson();
//一个单元分析完 直接返回
m_lessonBuilderContainer.clear();
}
EnglishBookProto.Unit.Builder builder = EnglishBookProto.Unit.newBuilder();
builder.setName(unit);
m_currentUnitBuilder = builder;
m_unitBuilderContainer.add(builder);
}
private void pushBackLesson() {
EnglishBookProto.Unit.Builder builder = m_unitBuilderContainer.get(m_unitBuilderContainer.size() - 1);
final int size = m_lessonBuilderContainer.size();
for (int i = 0; i < size; ++i) {
EnglishBookProto.Lesson.Builder lessonBuilder = m_lessonBuilderContainer.get(i);
builder.addLessons(lessonBuilder.build());
}
}
@Override
protected void parsedLesson(String lesson) {
EnglishBookProto.Lesson.Builder builder = EnglishBookProto.Lesson.newBuilder();
builder.setName(lesson);
m_currentLessonBuilder = builder;
m_lessonBuilderContainer.add(builder);
}
@Override
protected void parsedEnglishTitle(String title) {
m_currentLessonBuilder.setTitleEnglish(title);
}
@Override
protected void parsedChineseTitle(String title) {
m_currentLessonBuilder.setTitleChinese(title);
}
@Override
protected void parsedListenQuestion(String QuestionContent) {
m_currentLessonBuilder.setListenQuestion(QuestionContent);
}
@Override
protected void parsedContent(String segment) {
String previous = m_currentLessonBuilder.getContent();
if (TextUtils.isEmpty(previous)) {
m_currentLessonBuilder.setContent(segment);
} else {
m_currentLessonBuilder.setContent(previous + "\n" + segment);
}
}
@Override
protected void parsedWord(String word) {
m_currentWordBuilder = EnglishBookProto.Word.newBuilder();
m_currentWordBuilder.setContent(word);
}
@Override
protected void parsedWordAttribute(String attribute) {
m_currentWordBuilder.setAttribute(attribute);
m_currentLessonBuilder.addWords(m_currentWordBuilder.build());
}
@Override
protected void parsedWordTranslation(String segment) {
String previous = m_currentLessonBuilder.getTranslation();
if (TextUtils.isEmpty(previous)) {
m_currentLessonBuilder.setTranslation(segment);
} else {
m_currentLessonBuilder.setTranslation(previous + "\n" + segment);
}
}
@Override
protected void parseFinished() {
//最后一个分析的 unit是不会入栈的哦! 要加进去
//因为我们永远不知道一个unit何时会分析结束 除非我们已经知道
pushBackLesson();
for (EnglishBookProto.Unit.Builder builder : m_unitBuilderContainer) {
m_englishBuilder.addUnits(builder.build());
}
}
}
|
{
"content_hash": "312c3994fdb9667299c34d4b6cd5914e",
"timestamp": "",
"source": "github",
"line_count": 139,
"max_line_length": 110,
"avg_line_length": 30.992805755395683,
"alnum_prop": 0.6812906220984215,
"repo_name": "ChanJLee/EnglishBaby",
"id": "48fb9a795d3d7b5e25adc86a181aa6014499dec5",
"size": "4454",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "EnglishBabyProject/app/src/main/java/com/chan/englishbaby/model/parse/BookParser.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "89136"
},
{
"name": "Protocol Buffer",
"bytes": "637"
},
{
"name": "Shell",
"bytes": "160"
}
]
}
|
package com.hslg.controller.admin;
import javax.annotation.Resource;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import com.ezcloud.framework.controller.BaseController;
import com.ezcloud.framework.page.jdbc.Pageable;
import com.hslg.service.AgentService;
import com.hslg.service.RoomService;
import com.hslg.service.UserService;
@Controller("hslgPlatformReportController")
@RequestMapping("/hslgpage/platform/report")
public class ReportContrller extends BaseController{
@Resource(name = "fzbUserService")
private UserService userService;
@Resource(name = "fzbAgentService")
private AgentService agentService;
@Resource(name = "fzbRoomService")
private RoomService roomService;
/**
* 自定义桌面
* @param pageable
* @param model
* @return
*/
@RequestMapping(value = "/SummaryReport")
public String list(Pageable pageable, ModelMap model) {
//agent
int agentTotal =agentService.findTotalNum();
//user
int userTotal =userService.findTotalNum();
//room
int roomTotal =roomService.findTotalNum();
model.addAttribute("agentTotal", agentTotal);
model.addAttribute("userTotal", userTotal);
model.addAttribute("roomTotal", roomTotal);
return "/hslgpage/platform/webpart/SummaryReport";
}
}
|
{
"content_hash": "8559ec4160b74957fafc94b43f3d4c87",
"timestamp": "",
"source": "github",
"line_count": 51,
"max_line_length": 62,
"avg_line_length": 26.333333333333332,
"alnum_prop": 0.7773641102010425,
"repo_name": "javakaka/hslg",
"id": "48de6861dfc1471fb299c664eb1ef8649e351505",
"size": "1353",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "hslg/src/com/hslg/controller/admin/ReportContrller.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "600717"
},
{
"name": "HTML",
"bytes": "830915"
},
{
"name": "Java",
"bytes": "3765958"
},
{
"name": "JavaScript",
"bytes": "2452231"
},
{
"name": "PHP",
"bytes": "34258"
}
]
}
|
<?php
class Hadith_book extends CI_Controller{
function _remap( $method, $param ) {
if( $method == 'view' ):
//set default for parameter hadith_book_id
if( !isset( $param[0] ) ):
$param[0] = '';
endif;
//set default for parameter book_id
if( !isset( $param[1] ) ):
$param[1] = '';
endif;
//set default for parameter chapter_id
if( !isset( $param[2] ) ):
$param[2] = '';
endif;
//set default for parameter hadith_in_book_id
if( !isset( $param[3] ) ):
$param[3] = '';
endif;
$this->view( $param[0] ,$param[1] ,$param[2],$param[3]);
elseif( $method == 'add' ):
$this->add();
elseif( $method == 'display' ):
$this->display();
elseif( $method == 'update' ):
if( !isset( $param[0] ) ):
$param[0] = '';
endif;
$this->update($param[0]);
elseif( $method == 'delete' ):
//set default for parameter hadith_book_id
if( !isset( $param[0] ) ):
$param[0] = '';
endif;
$this->delete($param[0]);
//for all other method names, display an error message
else:
$list['error_msg'] = "The Page you are trying to view does not exists. Use the menu if you have access.";
$list['main_content'] = "message_view";
$this->load->view('includes/template', $list);
endif;
}
/*Method to view hadith book
*
*@param string $hadith_book_id Id of hadith_book
*@param string $book_id Id of book
*@param string $chapter_id Id of chapter
*@param string $hadith_in_book Id of hadith_in_book
*
*@return none
*
*/
public function view($hadith_book_id='',$book_id='',$chapter_id='',$hadith_in_book_id=''){
//if session is empty, then user_id will be empty string, otherwise it would get '0' from session array
$list['user_id'] = $user_id = empty($this->session->userdata('user_id'))?'':$this->session->userdata('user_id');
//get ajax request for tags
if( $this->input->is_ajax_request() ):
$data = $this->input->post('data');
if( $data['task'] == 'hadith-tag' ):
$this->load->model('tag_model');
$message=false;
//get selected hadith's tags
$hadith_tags_arr = $this->tag_model->get_hadith_tag_by_hadith_id_and_user_id( $data['hadith_id'], $user_id );
//for existing tags
if( !empty($data['tags_id']) ):
$tags_id = explode(',',$data['tags_id']);
//delete tags whcih were added before, n now user didnt select them
if( !empty( $hadith_tags_arr ) ):
foreach( $hadith_tags_arr as $row ):
if( !in_array($row->tag_id,$tags_id) ):
//delete tag
$this->tag_model->delete_hadith_tag_by_id( $row->hadith_tag_id );
endif;
endforeach;
endif;
//adding existing tags to hadith_tag
foreach( $tags_id as $tag_id ):
//check if that tag already exist in database
if( $this->tag_model->get_hadith_by_tag_and_hadith_id( $tag_id, $data['hadith_id'] ) === FALSE ):
$hadith_tag = array(
'hadith_id' => $data['hadith_id'],
'tag_id' => $tag_id,
'suggested_by'=>$user_id,
'approved_by'=>null
);
$message = $this->tag_model->add_hadith_tag( $hadith_tag );
endif;
endforeach;
else:
//if user didnt select any tag, delete tags which were added before
$this->tag_model->delete_hadith_tag( $data['hadith_id']);
endif;
//get new tags whcih are not avaialble in tag table
if( !empty($data['new_tags']) ):
$new_tags = explode(',',$data['new_tags']);
foreach( $new_tags as $new_tag ):
$tag_data = array(
'tag_title_en' =>$new_tag,
'suggested_by' => $user_id,
'approved_by' => null
);
//add tag in tag table
$message = $this->tag_model->add_tag( $tag_data );
$tag_id = $this->tag_model->get_last_tag_id();
//add that tag also in hadith tag
$hadith_tag = array(
'hadith_id' => $data['hadith_id'],
'tag_id' => $tag_id,
'suggested_by'=>$user_id,
'approved_by'=>null
);
$message = $this->tag_model->add_hadith_tag( $hadith_tag );
endforeach;
endif;
//get updated list of hadith_tags
$hadith_tags = $this->tag_model->get_hadith_tag_by_hadith_id_and_user_id( $data['hadith_id'], $user_id );
$hadith_tags_html ='';
$hadith_tags_options='';
//get html code for drop down and label
if(!empty( $hadith_tags )):
foreach( $hadith_tags as $hadith_tag ):
$hadith_tags_html .= '<span lang="EN" class="label label-default pull-right" style="margin-left: 5px;">'.$hadith_tag->tag_title_en.'</span>';
$hadith_tags_html .= '<span lang="UR" style="display: none;" class="label label-default pull-right" style="margin-left: 5px;">'.$hadith_tag->tag_title_ur.'</span>';
$hadith_tags_html .= '<span lang="AR" style="display: none;" class="label label-default pull-right" style="margin-left: 5px;">'.$hadith_tag->tag_title_ar.'</span>';
$hadith_tags_options .= '<option value="'. $hadith_tag->tag_id.'">'.$hadith_tag->tag_title_en.'</option>';
endforeach;
endif;
$data = new stdClass();
$data->message = $message;
$data->hadith_tags_html = $hadith_tags_html;
$data->hadith_tags_options = $hadith_tags_options;
echo json_encode( $data );
return;
elseif( $data['task'] == 'user-settings' ):
//unset task, to make data settings array only
unset( $data['task'] );
//if($data['email_subscription'] == true):
$this->load->model('user_model');
$user_data = array(
'email_subscription' => $data['email_subscription'] == TRUE? 1:0,
);
$this->user_model->update_user( $user_data);
//unset user_setting sessions
$this->session->unset_userdata($data);
//set user_setting sessions
$this->session->set_userdata( $data );
$this->load->model('user_model');
foreach( $data as $key => $value ):
//if user setting was not inserted
if( empty($this->user_model->get_user_setting_by_id($key, $user_id)) ):
$user_setting = array(
'setting_title' => $key,
'setting_value' => $value,
'user_id' => $user_id
);
//add setting by user id
$this->user_model->insert_user_setting( $user_setting );
else:
//update setting value
$this->user_model->update_user_setting($key, $user_id,array('setting_value'=>$value));
endif;
endforeach;
return;
elseif( $data['task'] == 'hadith-bookmark' ):
$this->load->model('user_model');
if( $data['book_mark'] == 'add' ):
$user_favorite = array(
'hadith_in_book_id' => $data['hadith_in_book_id'],
'hadith_book_id' => $data['hadith_book_id'],
'user_id' => $user_id
);
$this->user_model->insert_user_favorite( $user_favorite );
else:
//delete book mark by id's.
$this->user_model->delete_user_favorite( $data['hadith_in_book_id'], $data['hadith_book_id'], $user_id );
endif;
return;
elseif( $data['task'] == 'report-error' ):
$this->load->model('hadith_model');
$data['user_id'] = $user_id;
$data['timestamp'] = date('Y-m-d H:i:s');
unset($data['task']);
$this->hadith_model->insert_error_report( $data );
return;
endif;
endif;
$this->load->model('hadith_book_model');
if($hadith_book_id !='' AND $this->hadith_book_model->get_hadith_book_by_id( $hadith_book_id ) == FALSE ):
$list['error_msg'] = "Provided Page doesn't exist. Use the menu if you have access.";
$list['main_content'] = "message_view";
$this->load->view('includes/template', $list);
return;
endif;
$this->load->model('book_model');
if( $book_id != '' ):
//check book by its hadith book id
if($this->book_model->get_book_by_id( $book_id, $hadith_book_id ) == FALSE ):
$list['error_msg'] = "Provided Book doesn't exist.Use the menu if you have access.";
$list['main_content'] = "message_view";
$this->load->view('includes/template', $list);
return;
endif;
endif;
$this->load->model('chapter_model');
//if( $chapter_id != '' ):
// //check chapter by its book and hadith book id
// if( $this->chapter_model->get_chapter_by_id( $chapter_id, $book_id, $hadith_book_id ) == FALSE ):
// $list['error_msg'] = "Provided Chapter ID doesn't exist in given Hadith Book.Use the menu if you have access.";
// $list['main_content'] = "message_view";
// $this->load->view('includes/template', $list);
// return;
// endif;
//endif;
//check hadith by its chapter, book and hadith book id
if($hadith_in_book_id != '' AND $this->hadith_book_model->get_hadith_in_book_by_id( $hadith_in_book_id, $chapter_id, $book_id, $hadith_book_id ) == FALSE ):
$list['error_msg'] = "Provided Hadith In Book ID doesn't exist in given Book and Chapter.Use the menu if you have access.";
$list['main_content'] = "message_view";
$this->load->view('includes/template', $list);
return;
endif;
$list['ahadith_books'] = $this->hadith_book_model->get_books_by_hadith_book_id( $hadith_book_id );
$book_id = !empty($book_id)? $book_id: $list['ahadith_books'][0]->book_id;
//$chapter_id = !empty( $chapter_id )? $chapter_id:0;
$list['ahadith'] ='';
if( !empty( $hadith_book_id ) ):
$this->load->model('hadith_model');
$this->load->model('user_model');
$list['ahadith'] = $this->hadith_model->get_ahadith_by_hadith_book_id( $hadith_book_id, $book_id, $chapter_id, $hadith_in_book_id );
if(!empty( $list['ahadith'] )):
$this->load->model('tag_model');
$temp_chapter_id ='';
for( $i=0;$i<count($list['ahadith']);$i++ ):
if( $list['ahadith'][$i]->chapter_id != $temp_chapter_id ):
$list['ahadith'][$i]->chapter_title_en = $this->chapter_model->get_chapter_by_id( $list['ahadith'][$i]->chapter_id )->chapter_title_en;
$list['ahadith'][$i]->chapter_title_ar = $this->chapter_model->get_chapter_by_id( $list['ahadith'][$i]->chapter_id )->chapter_title_ar;
$list['ahadith'][$i]->chapter_title_ur = $this->chapter_model->get_chapter_by_id( $list['ahadith'][$i]->chapter_id )->chapter_title_ur;
endif;
//get ahadith tag, if user is not signed in, then get approved tags of hadith,otherwise get by user and hadith ID.
$list['ahadith'][$i]->hadith_tags = $this->tag_model->get_hadith_tag_by_hadith_id_and_user_id( $list['ahadith'][$i]->hadith_id, $user_id );
$list['ahadith'][$i]->book_mark = $this->user_model->get_user_favorite( $list['ahadith'][$i]->hadith_in_book_id,$list['ahadith'][$i]->hadith_book_id, $user_id );
$temp_chapter_id = $list['ahadith'][$i]->chapter_id;
endfor;
endif;
endif;
$list['book'] = $this->book_model->get_book_by_id( $book_id );
$list['chapters'] = $this->chapter_model->get_chapter_by_hadith_and_book_id( $hadith_book_id, $book_id );
$list['hadith_book'] = $this->hadith_book_model->get_hadith_book_by_id( $hadith_book_id );
$this->load->model('user_model');
//if session is empty then check its value in db, otherwise it would be empty
$list['chapter_display'] = empty($this->session->userdata('chapter_display'))? (!empty($this->user_model->get_user_setting_by_id('chapter_display',$user_id))? $this->user_model->get_user_setting_by_id('chapter_display',$user_id)->setting_value:'') : $this->session->userdata('chapter_display');
$list['chapter_language'] = empty($this->session->userdata('chapter_language'))? (!empty($this->user_model->get_user_setting_by_id('chapter_language',$user_id))? $this->user_model->get_user_setting_by_id('chapter_language',$user_id)->setting_value:'') : $this->session->userdata('chapter_language');
$list['display_arabic_text'] = empty($this->session->userdata('display_arabic_text'))? (!empty($this->user_model->get_user_setting_by_id('display_arabic_text',$user_id))? $this->user_model->get_user_setting_by_id('display_arabic_text',$user_id)->setting_value:'') : $this->session->userdata('display_arabic_text');
$list['display_english_text'] = empty($this->session->userdata('display_english_text'))? (!empty($this->user_model->get_user_setting_by_id('display_english_text',$user_id))? $this->user_model->get_user_setting_by_id('display_english_text',$user_id)->setting_value:'') : $this->session->userdata('display_english_text');
$list['display_urdu_text'] = empty($this->session->userdata('display_urdu_text'))? (!empty($this->user_model->get_user_setting_by_id('display_urdu_text',$user_id))? $this->user_model->get_user_setting_by_id('display_urdu_text',$user_id)->setting_value:'') : $this->session->userdata('display_urdu_text');
$list['email_subscription'] = empty($this->session->userdata('email_subscription'))? (!empty($this->user_model->get_user_setting_by_id('email_subscription',$user_id))? $this->user_model->get_user_setting_by_id('email_subscription',$user_id)->setting_value:'') : $this->session->userdata('email_subscription');
$this->load->model('tag_model');
//get tags by user_id
$list['tags'] = $this->tag_model->get_all_tags( $user_id );
$this->load->helper('form');
//pagination code
$this->load->library('pagination');
$config['base_url'] = base_url().$list['hadith_book']->hadith_book_id.'/book/'. $list['book']->book_id .'/chapter/';
$config['total_rows'] = $this->hadith_model->get_count_ahadith_by_hadith_book_id( $hadith_book_id, $book_id, $chapter_id, $hadith_in_book_id );
$config['per_page'] = 10;
$config['uri_segment'] = 5;
$this->pagination->initialize( $config );
$list['pages'] = $this->pagination->create_links();
$list['main_content'] ='hadith_book/index';
$this->load->view('includes/template', $list);
}
public function display(){
//limit view hadith book only to authorized
if( !$this->user_roles->is_authorized( array('admin_hadith_book_view') ) ):
$list['error_msg'] = "You are not authorized to view Hadith Book.";
$list['main_content'] = "message_view";
$this->load->view('includes/template', $list);
return;
endif;
$this->load->helper('form');
$this->load->model('hadith_book_model');
$list['hadith_books'] = $this->hadith_book_model->get_hadith_books();
$list['main_content'] = 'hadith_book/hadith_book_view';
$this->load->view('admin/includes/template',$list);
}
/*Method to create hadith_book
*
*@return none
*
*/
public function add(){
//limit add hadith book only to authorized
if( !$this->user_roles->is_authorized( array('admin_hadith_book_add') ) ):
$list['error_msg'] = "You are not authorized to add Hadith Book.";
$list['main_content'] = "message_view";
$this->load->view('includes/template', $list);
return;
endif;
$this->load->helper('form');
$this->load->library('form_validation');
$this->form_validation->set_rules('hadith_book_id', 'Hadith Book ID', 'trim|required|max_length[10]|unique_id[,Hadith Book ID]');
$this->form_validation->set_rules('hadith_book_title_ar', 'Hadith Book Arabic Title', 'trim|required|max_length[50]');
$this->form_validation->set_rules('hadith_book_title_en', 'Hadith Book English Title', 'trim|required|max_length[50]');
$this->form_validation->set_rules('hadith_book_title_ur', 'Hadith Book Urdu Title', 'trim|required|max_length[50]');
$list['main_content'] = 'hadith_book/add_hadith_book_view';
if ($this->form_validation->run() == FALSE):
$this->load->view('admin/includes/template',$list);
else:
$data['hadith_book_id'] = $this->input->post('hadith_book_id');
$data['hadith_book_title_ar'] = $this->input->post('hadith_book_title_ar');
$data['hadith_book_title_en'] = $this->input->post('hadith_book_title_en');
$data['hadith_book_title_ur'] = $this->input->post('hadith_book_title_ur');
$this->load->model('hadith_book_model');
$this->hadith_book_model->insert_hadith_book($data);
redirect('admin/hadith-book');
endif;
}
/*Method to update hadith_book
*
*@return none
*
*/
public function update($hadith_book_id){
//limit edit hadith book only to authorized
if( !$this->user_roles->is_authorized( array('admin_hadith_book_edit') ) ):
$list['error_msg'] = "You are not authorized to edit Hadith Book.";
$list['main_content'] = "message_view";
$this->load->view('includes/template', $list);
return;
endif;
$this->load->model('hadith_book_model');
if( $this->hadith_book_model->get_hadith_book_by_id($hadith_book_id) == FALSE ):
$list['error_msg'] = "No record found for the provided Hadith Book ID. Use the menu if you have access.";
$list['main_content'] = "message_view";
$this->load->view('admin/includes/template', $list);
return;
endif;
$this->load->helper('form');
$this->load->library('form_validation');
$this->form_validation->set_rules('hadith_book_id', 'Hadith Book ID', 'trim|required|max_length[10]|unique_id['.$hadith_book_id.',Hadith Book ID]');
$this->form_validation->set_rules('hadith_book_title_ar', 'Hadith Book Arabic Title', 'trim|required|max_length[50]');
$this->form_validation->set_rules('hadith_book_title_en', 'Hadith Book English Title', 'trim|required|max_length[50]');
$this->form_validation->set_rules('hadith_book_title_ur', 'Hadith Book Urdu Title', 'trim|required|max_length[50]');
$list['hadith_book_id'] = $hadith_book_id;
$list['hadith_books'] = $this->hadith_book_model->get_hadith_book_by_id($hadith_book_id);
$list['main_content'] = 'hadith_book/update_hadith_book_view';
if ($this->form_validation->run() == FALSE):
$this->load->view('admin/includes/template',$list);
else:
$data['hadith_book_id'] = $this->input->post('hadith_book_id');
$data['hadith_book_title_ar'] = $this->input->post('hadith_book_title_ar');
$data['hadith_book_title_en'] = $this->input->post('hadith_book_title_en');
$data['hadith_book_title_ur'] = $this->input->post('hadith_book_title_ur');
$this->load->model('hadith_book_model');
$this->hadith_book_model->update_hadith_book($hadith_book_id,$data);
redirect('admin/hadith-book');
endif;
}
/* Method to delete hadith_book
*
* @param string $hadith_book_id Id of hadith_book
*
* @return none
*/
public function delete($hadith_book_id){
//limit deleting of hadith book only to authorized
if( !$this->user_roles->is_authorized( array('admin_hadith_book_delete') ) ):
$list['error_msg'] = "You are not authorized to Delete Hadith Book.";
$list['main_content'] = "message_view";
$this->load->view('includes/template', $list);
return;
endif;
$this->load->model('hadith_book_model');
if( $this->hadith_book_model->get_hadith_book_by_id($hadith_book_id) == FALSE ):
$list['error_msg'] = "No record found for the provided Hadith Book ID. Use the menu if you have access.";
$list['main_content'] = "message_view";
$this->load->view('admin/includes/template', $list);
return;
endif;
$this->hadith_book_model->delete_hadith_book_by_id($hadith_book_id);
redirect('admin/hadith-book');
}
}
|
{
"content_hash": "c03e995f51cf8eb6bd8689d39e4859ef",
"timestamp": "",
"source": "github",
"line_count": 524,
"max_line_length": 321,
"avg_line_length": 36.969465648854964,
"alnum_prop": 0.6077328102415858,
"repo_name": "step4wd/ahadith",
"id": "721b876f27e2a4bf76e35fe916c764e95559c3db",
"size": "19372",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "application/controllers/hadith_book.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ApacheConf",
"bytes": "903"
},
{
"name": "CSS",
"bytes": "218008"
},
{
"name": "HTML",
"bytes": "146289"
},
{
"name": "JavaScript",
"bytes": "580810"
},
{
"name": "PHP",
"bytes": "1594433"
}
]
}
|
require "rss"
class Rebuild
def initialize
begin
@rss = RSS::Parser.parse("http://feeds.rebuild.fm/rebuildfm")
rescue SocketError
puts "Can't connect Internet"
end
@home = Dir.home
end
def download
create_directory
@rss.items.each do |item|
Dir.chdir(download_directory) do
title = item.title.delete("/")
next if File.exist?("#{title}.mp3")
puts "Now download -> #{title}"
system("curl",
"--location",
"--output",
"#{title}.mp3",
"#{item.enclosure.url}")
end
end
end
private
def download_directory
File.join(@home, "rebuild")
end
def create_directory
Dir.mkdir(download_directory) unless Dir.exist?(download_directory)
end
end
rebuild = Rebuild.new
rebuild.download
|
{
"content_hash": "bf047a5d6e131a337be319a939316de0",
"timestamp": "",
"source": "github",
"line_count": 40,
"max_line_length": 71,
"avg_line_length": 19.625,
"alnum_prop": 0.6280254777070063,
"repo_name": "sugryo/rebuild_downloader",
"id": "4e05b3524d44facd03eca18d3254f644c7423556",
"size": "807",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "download.rb",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "2050"
}
]
}
|
package writer
import "github.com/achilleasa/polaris/asset/scene"
// The Writer interface is implemented by all scene writers.
type Writer interface {
// Write scene definition
Write(*scene.Scene) error
}
// Write scene to binary format.
func WriteScene(sc *scene.Scene, filename string) error {
writer := newZipSceneWriter(filename)
return writer.Write(sc)
}
|
{
"content_hash": "1cd312940ad1edc414c7b7c912dd9c3d",
"timestamp": "",
"source": "github",
"line_count": 15,
"max_line_length": 60,
"avg_line_length": 24.466666666666665,
"alnum_prop": 0.7656675749318801,
"repo_name": "achilleasa/go-pathtrace",
"id": "9d8b7bb95c33827167825bd8e6b1fd6141642051",
"size": "367",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "asset/scene/writer/writer.go",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "95586"
},
{
"name": "Common Lisp",
"bytes": "154"
},
{
"name": "Go",
"bytes": "274202"
},
{
"name": "Yacc",
"bytes": "8335"
}
]
}
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1.0, user-scalable=no">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="msapplication-tap-highlight" content="no">
<meta name="description" content="Materialize is a Material Design Admin Template,It's modern, responsive and based on Material Design by Google. ">
<meta name="keywords" content="materialize, admin template, dashboard template, flat admin template, responsive admin template,">
<title><?php echo $this->Lang->write('app_browser_title');?></title>
<!-- CORE CSS-->
<link href="<?php print $this->TemplatePath; ?>min/css/app.min.css" type="text/css" rel="stylesheet" media="screen,projection">
<script>
var defaultmsg = {
"confirm_headline": {
"msg": "<?php echo $this->Lang->write('modal_confirmation_headline');?>"
},
"confirm_paragraph": {
"msg": "<?php echo $this->Lang->write('modal_confirmation_paragraph');?>"
}
};
<?php if(isset(CONFIG['pusher']) && isset(CONFIG['pusher']['key']) && !empty(CONFIG['pusher']['key'])) { ?>
pappkey = '<?php echo CONFIG['pusher']['key'];?>';
chanchan = '<?php echo CONFIG['pusher']['mainchannel'];?>';
cluster = '<?php echo CONFIG['pusher']['cluster'];?>';
hash = "<?php echo substr(md5($this->Session->getUserEmail()), 0, 12);?>";
<?php if(isset($_GET['rootid'])) { ?>
rooter = <?php echo (int)$_GET['rootid'];?>;
<?php }?>
<?php } ?>
</script>
<script type="text/javascript" src="<?php print $this->TemplatePath; ?>min/js/top.js"></script>
<?php $this->getStyles(); ?>
<?php $this->getScripts(); ?>
<?php $this->addModuleLanguageFromTemplate(array('account'));?>
<?php if(isset($this->tplVar['thislang']) && !empty($this->tplVar['thislang'])) { ?>
<script>var thislang = '<?php echo $this->tplVar['thislang'];?>';</script>
<?php } ?>
</head>
<body>
<!-- START HEADER -->
<header id="header" class="page-topbar">
<!-- start header nav-->
<div class="navbar-fixed">
<nav class="navbar-color">
<div class="nav-wrapper">
<ul class="left">
<li>
<h1 class="logo-wrapper">
<a href="/dashboard/index/index/" class="brand-logo darken-1">
<span class="page-h1">Database Admin</span>
</a>
</h1>
</li>
</ul>
<div class="header-search-wrapper hide-on-med-and-down">
</div>
<ul class="right hide-on-med-and-down">
<li>
<a href="javascript:void(0);" class="waves-effect waves-block waves-light translation-button" data-activates="translation-dropdown">
<img src="<?php print $this->TemplatePath; ?>images/flag-icons/<?php echo $this->tplVar['thislang'];?>.png" alt="<?php echo $this->tplVar['thislang'];?>" />
</a>
</li>
</ul>
<!-- translation-button -->
<ul id="translation-dropdown" class="dropdown-content">
<?php if(isset(CONFIG['langwhitelist']) && is_array(CONFIG['langwhitelist']) && count(CONFIG['langwhitelist'])) { ?>
<?php foreach(CONFIG['langwhitelist'] AS $key => $value) { ?>
<li>
<a href="/account/index/changelang/lang/<?php echo strtolower($key);?>/">
<img src="<?php print $this->TemplatePath; ?>images/flag-icons/<?php echo strtolower($key);?>.png" alt="<?php echo strtolower($key);?>" />
<span class="language-select"></span>
</a>
</li>
<?php } ?>
<?php } ?>
</ul>
</div>
</nav>
</div>
<!-- end header nav-->
</header>
<!-- END HEADER -->
<!-- START MAIN -->
<div id="main">
<!-- START WRAPPER -->
<div class="wrapper">
<!-- START LEFT SIDEBAR NAV-->
<aside id="left-sidebar-nav">
<ul id="slide-out" class="side-nav fixed leftside-navigation">
<li class="user-details light-blue darken-2">
<div class="row">
<div class="col col s4 m4 l4">
<?php echo $this->renderAvatar();?>
</div>
<div class="col col s8 m8 l8">
<ul id="profile-dropdown" class="dropdown-content">
<li><a href="/account/profile/index/"><i class="mdi-action-face-unlock"></i> Profile</a>
</li>
<li><a href="/account/settings/index/"><i class="mdi-action-settings"></i> Settings</a>
</li>
<li class="divider"></li>
<li><a href="/account/index/logout/"><i class="mdi-hardware-keyboard-tab"></i> Logout</a>
</li>
</ul>
<a class="btn-flat dropdown-button waves-effect waves-light white-text profile-btn" href="#" data-activates="profile-dropdown">
<?php echo $this->CurrentUser['username'];?> <i class="mdi-navigation-arrow-drop-down right"></i>
</a>
<p class="user-roal"></p>
</div>
</div>
</li>
<li>
<a class="waves-effect waves-light-blue" href="/dashboard/index/index/"><i class="mdi-action-dashboard"></i> <?php echo $this->Lang->write('app_main_navigation_dashboard_module');?></a>
</li>
<li>
<a class="waves-effect waves-light-blue" href="/dashboard/forum/index/"><i class="mdi-communication-chat"></i> <?php echo $this->Lang->write('app_main_navigation_forum_module');?></a>
</li>
<li>
<a class="waves-effect waves-light-blue" href="/directory/index/index/"><i class="mdi-action-view-module"></i> <?php echo $this->Lang->write('app_main_navigation_directory_module');?></a>
</li>
<li>
<a class="waves-effect waves-light-blue" href="/content/scenes/index/"><i class="mdi-action-view-list"></i> <?php echo $this->Lang->write('app_main_navigation_constent_module_scene');?></a>
</li>
<li>
<a class="waves-effect waves-light-blue" href="/account/user/index/"><i class="mdi-social-people"></i> <?php echo $this->Lang->write('app_main_navigation_account_module');?></a>
</li>
<!-- <li class="no-padding"> -->
<!-- <ul class="collapsible collapsible-accordion"> -->
<!-- <li class="bold"> -->
<!-- <a class="collapsible-header waves-effect waves-cyan">
<i class="mdi-social-people"></i> <?php //echo $this->Lang->write('app_main_navigation_accounts_account_module');?>
<!-- </a> -->
<!-- <div class="collapsible-body"> -->
<!-- <ul> -->
<!-- <li> -->
<!-- <a class="waves-effect waves-cyan" href="/account/user/index/">
<i class="mdi-social-group"></i> <?php //echo $this->Lang->write('app_main_navigation_accounts_user');?>
<!-- </a> -->
<!-- </li> -->
<!-- <li> -->
<!-- <a class="waves-effect waves-cyan" href="/account/group/index/">
<i class="mdi-action-lock"></i> <?php //echo $this->Lang->write('app_main_navigation_accounts_groups');?>
<!-- </a> -->
<!-- </li> -->
<!-- </ul> -->
<!-- </div> -->
<!-- </li> -->
<!-- </ul> -->
<!-- </li> -->
<li>
<a class="waves-effect waves-light-blue" href="/account/index/logout/"><i class="mdi-action-exit-to-app "></i> <?php echo $this->Lang->write('app_main_navigation_accounts_logout');?></a>
</li>
</ul>
<a href="#" data-activates="slide-out" class="sidebar-collapse btn-floating btn-medium waves-effect waves-light hide-on-large-only cyan"><i class="mdi-navigation-menu"></i></a>
</aside>
<!-- END LEFT SIDEBAR NAV-->
<!-- //////////////////////////////////////////////////////////////////////////// -->
<!-- START CONTENT -->
<section id="content">
<?php $this->renderErrors();?>
<?php $this->renderSuccess();?>
<?php $this->renderModule();?>
</section>
<!-- END CONTENT -->
<!-- //////////////////////////////////////////////////////////////////////////// -->
<!-- START RIGHT SIDEBAR NAV-->
<aside id="right-sidebar-nav">
<ul id="chat-out" class="side-nav rightside-navigation">
<li class="li-hover">
<a href="#" data-activates="chat-out" class="chat-close-collapse right"><i class="mdi-navigation-close"></i></a>
<div id="right-search" class="row">
<form class="col s12">
<div class="input-field">
<i class="mdi-action-search prefix"></i>
<input id="icon_prefix" type="text" class="validate">
<label for="icon_prefix">Search</label>
</div>
</form>
</div>
</li>
<li class="li-hover">
<ul class="chat-collapsible" data-collapsible="expandable">
<li>
<div class="collapsible-header teal white-text active"><i class="mdi-social-whatshot"></i>Recent Activity</div>
<div class="collapsible-body recent-activity">
<div class="recent-activity-list chat-out-list row">
<div class="col s3 recent-activity-list-icon"><i class="mdi-action-add-shopping-cart"></i>
</div>
<div class="col s9 recent-activity-list-text">
<a href="#">just now</a>
<p>Jim Doe Purchased new equipments for zonal office.</p>
</div>
</div>
<div class="recent-activity-list chat-out-list row">
<div class="col s3 recent-activity-list-icon"><i class="mdi-device-airplanemode-on"></i>
</div>
<div class="col s9 recent-activity-list-text">
<a href="#">Yesterday</a>
<p>Your Next flight for USA will be on 15th August 2015.</p>
</div>
</div>
<div class="recent-activity-list chat-out-list row">
<div class="col s3 recent-activity-list-icon"><i class="mdi-action-settings-voice"></i>
</div>
<div class="col s9 recent-activity-list-text">
<a href="#">5 Days Ago</a>
<p>Natalya Parker Send you a voice mail for next conference.</p>
</div>
</div>
<div class="recent-activity-list chat-out-list row">
<div class="col s3 recent-activity-list-icon"><i class="mdi-action-store"></i>
</div>
<div class="col s9 recent-activity-list-text">
<a href="#">Last Week</a>
<p>Jessy Jay open a new store at S.G Road.</p>
</div>
</div>
<div class="recent-activity-list chat-out-list row">
<div class="col s3 recent-activity-list-icon"><i class="mdi-action-settings-voice"></i>
</div>
<div class="col s9 recent-activity-list-text">
<a href="#">5 Days Ago</a>
<p>Natalya Parker Send you a voice mail for next conference.</p>
</div>
</div>
</div>
</li>
<li>
<div class="collapsible-header light-blue white-text active"><i class="mdi-editor-attach-money"></i>Sales Repoart</div>
<div class="collapsible-body sales-repoart">
<div class="sales-repoart-list chat-out-list row">
<div class="col s8">Target Salse</div>
<div class="col s4"><span id="sales-line-1"></span>
</div>
</div>
<div class="sales-repoart-list chat-out-list row">
<div class="col s8">Payment Due</div>
<div class="col s4"><span id="sales-bar-1"></span>
</div>
</div>
<div class="sales-repoart-list chat-out-list row">
<div class="col s8">Total Delivery</div>
<div class="col s4"><span id="sales-line-2"></span>
</div>
</div>
<div class="sales-repoart-list chat-out-list row">
<div class="col s8">Total Progress</div>
<div class="col s4"><span id="sales-bar-2"></span>
</div>
</div>
</div>
</li>
</ul>
</li>
</ul>
</aside>
<!-- LEFT RIGHT SIDEBAR NAV-->
</div>
<!-- END WRAPPER -->
</div>
<!-- END MAIN -->
<div id="confirmation-modal" class="modal modal-fixed-footer">
<div class="modal-content">
<h4></h4>
<p></p>
</div>
<div class="modal-footer">
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat agree">Yes</a>
<a href="#!" class="modal-action modal-close waves-effect waves-green btn-flat disagree">No</a>
</div>
</div>
<div id="blank-modal" class="modal modal-fixed-footer">
<div class="modal-content">
<div class="spinner-layer spinner-red">
<div class="circle-clipper left">
<div class="circle"></div>
</div><div class="gap-patch">
<div class="circle"></div>
</div><div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
</div>
</div>
<div class="lean-overlay" id="blanko-overlay"></div>
<!-- //////////////////////////////////////////////////////////////////////////// -->
<!-- START FOOTER -->
<!-- <footer class="page-footer"> -->
<!-- <div class="footer-copyright"> -->
<!-- <div class="container"> -->
<!-- </div> -->
<!-- </div> -->
<!-- </footer> -->
<!-- END FOOTER -->
<script type="text/javascript" src="<?php print $this->TemplatePath; ?>min/js/bottom.js"></script>
<script type="text/javascript" src="<?php print $this->TemplatePath; ?>min/js/modules.js"></script>
</body>
</html>
|
{
"content_hash": "5277d366ff814631f353a2772535a39c",
"timestamp": "",
"source": "github",
"line_count": 367,
"max_line_length": 193,
"avg_line_length": 43.735694822888284,
"alnum_prop": 0.45430191265341724,
"repo_name": "blumanski/bang_base",
"id": "fb29fd5908cd3c276a7ba577ac53d86be53f0650",
"size": "16051",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/backend/public/templates/default/index.php",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "704"
},
{
"name": "CSS",
"bytes": "587385"
},
{
"name": "JavaScript",
"bytes": "7774"
},
{
"name": "PHP",
"bytes": "135802"
}
]
}
|
#ifndef _QDS_SHORTCUTS_H
#define _QDS_SHORTCUTS_H
#include <QObject>
#include <QKeyEvent>
#include <QApplication>
/**
* \brief Listens for keyboard events and acts if a shortcut has been activated
*
* This allows us to implement safety features, such as triggering an emergency
* stop when pressing the spacebar, or disabling the robot when pressing enter.
*/
class Shortcuts : public QObject
{
Q_OBJECT
private:
bool eventFilter(QObject *object, QEvent *event);
};
#endif
|
{
"content_hash": "28069d5f70176625a566d95ab24c2378",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 79,
"avg_line_length": 21.416666666666668,
"alnum_prop": 0.7042801556420234,
"repo_name": "FRC-Utilities/QDriverStation",
"id": "d8befe1d3b7ef6aed282a06b6b2e93bf9d0b5748",
"size": "1682",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/shortcuts.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "1518"
},
{
"name": "C++",
"bytes": "90830"
},
{
"name": "JavaScript",
"bytes": "4235"
},
{
"name": "QML",
"bytes": "167015"
},
{
"name": "QMake",
"bytes": "6549"
}
]
}
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="me.sauce.injectExtra">
<application android:allowBackup="true" android:label="@string/app_name"
android:supportsRtl="true">
</application>
</manifest>
|
{
"content_hash": "06371faa7840c4cf47fd11a51963a11d",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 76,
"avg_line_length": 25.3,
"alnum_prop": 0.7035573122529645,
"repo_name": "unknownSauce/InjectExtra",
"id": "2af215bcc8c7e89aa41dcfe3406ae3f3af1abe2e",
"size": "253",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "injectExtra/src/main/AndroidManifest.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "41549"
}
]
}
|
End of preview.
No dataset card yet
- Downloads last month
- 3