text stringlengths 2 1.04M | meta dict |
|---|---|
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE ScopedTypeVariables #-}
module Leader
( StateId
, Judge
, Follower
, LeaderFunction
, FollowerFunction
, mkInMemoryJudge
, mkFollower
, debounceLeader
, killableFollower
, runFollower
) where
import ClassyPrelude.Conduit
import Control.Monad.Trans.Unlift (askRunBase, MonadBaseUnlift)
import Control.Concurrent.Async.Lifted.Safe (Concurrently (..), withAsync)
newtype StateId = StateId Word
deriving Eq
-- | Decides who will be the leader
newtype Judge m state = Judge (Follower m state -> m ())
mkInMemoryJudge :: forall state m n. (MonadIO m, MonadIO n, MonadBaseUnlift IO n) => m (Judge n state)
mkInMemoryJudge = liftIO $ do
leaderBaton <- newMVar ()
stateVar :: TVar (Maybe (StateId, state)) <- newTVarIO Nothing
stateIdVar <- newTVarIO 0
return $ Judge $ \Follower {..} -> do
let beLeader = withMVar leaderBaton $ const $ do
mstate <- atomically $ readTVar stateVar
let setState state = atomically $ do
next <- readTVar stateIdVar
writeTVar stateIdVar $! next + 1
writeTVar stateVar $ Just (StateId next, state)
runConduit
$ (followerOnLeader (snd <$> mstate) >>= yield)
.| awaitForever setState
beFollower = followerRun $ readTVar stateVar >>= maybe retrySTM return
unlift <- askRunBase
liftIO $
runConcurrently $ Concurrently (unlift beLeader)
*> Concurrently (unlift beFollower)
type LeaderFunction m state = Maybe state -> ConduitM () state m state
type FollowerFunction m state = STM (StateId, state) -> m ()
data Follower m state = Follower
{ followerOnLeader :: !(LeaderFunction m state)
, followerRun :: !(FollowerFunction m state)
}
runFollower :: Judge m state -> Follower m state -> m ()
runFollower (Judge run) = run
mkFollower :: LeaderFunction m state
-> FollowerFunction m state
-> Follower m state
mkFollower = Follower
debounceLeader :: (Monad m, Eq state) => LeaderFunction m state -> LeaderFunction m state
debounceLeader inner mstate =
(inner mstate >>= yield) .| debounce
where
debounce = await >>= maybe (error "impossible") (\state -> yield state *> loop state)
loop state1 = await >>= maybe (return state1)
(\state2 ->
if state1 == state2
then loop state1
else yield state2 >> loop state2)
killableFollower :: (MonadIO m, MonadBaseUnlift IO m)
=> (state -> m ()) -> FollowerFunction m state
killableFollower inner getState = do
unlift <- askRunBase
let loop (stateid, state) =
join $ withAsync (unlift (inner state)) $ const $ atomically $ do
(newid, newstate) <- getState
checkSTM $ stateid /= newid
return $ loop (newid, newstate)
liftIO $ atomically getState >>= loop
| {
"content_hash": "8f7508df7fa48c2d6ddebc0a3870f41d",
"timestamp": "",
"source": "github",
"line_count": 86,
"max_line_length": 102,
"avg_line_length": 34.26744186046512,
"alnum_prop": 0.6559212758737699,
"repo_name": "snoyberg/warp-letsencrypt",
"id": "123cddbbf30bb8216fdbfe3bb9f58fa1f98b6d14",
"size": "2947",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Leader.hs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Haskell",
"bytes": "12611"
},
{
"name": "Shell",
"bytes": "192"
}
],
"symlink_target": ""
} |
package net.didion.jwnl.data;
import net.didion.jwnl.JWNL;
import net.didion.jwnl.JWNLException;
import net.didion.jwnl.dictionary.Dictionary;
import java.io.IOException;
/**
* An <code>IndexWord</code> represents a line of the <var>pos</var><code>.index</code> file.
* An <code>IndexWord</code> is created or retrieved via {@link Dictionary#lookupIndexWord lookupIndexWord}.
*/
public class IndexWord implements DictionaryElement {
static final long serialVersionUID = -2136983562978852712L;
/** This word's part-of-speech */
private POS _pos;
/** The string representation of this IndexWord */
private String _lemma;
/** senses are initially stored as offsets, and paged in on demand.*/
private long[] _synsetOffsets;
/** This is null until getSenses has been called. */
private transient Synset[] _synsets;
/** True when all synsets have been loaded */
private transient boolean _synsetsLoaded = false;
public IndexWord(String lemma, POS pos, long[] synsetOffsets) {
_lemma = lemma;
_pos = pos;
_synsetOffsets = synsetOffsets;
_synsets = new Synset[synsetOffsets.length];
}
public DictionaryElementType getType() {
return DictionaryElementType.INDEX_WORD;
}
// Object methods //
public boolean equals(Object object) {
return (object instanceof IndexWord)
&& ((IndexWord) object).getLemma().equals(getLemma()) && ((IndexWord) object).getPOS().equals(getPOS());
}
public int hashCode() {
return getLemma().hashCode() ^ getPOS().hashCode();
}
private transient String _cachedToString = null;
public String toString() {
if (_cachedToString == null) {
_cachedToString = JWNL.resolveMessage("DATA_TOSTRING_002", new Object[]{getLemma(), getPOS()});
}
return _cachedToString;
}
// Accessors //
/** Get the word's part-of-speech. */
public POS getPOS() {
return _pos;
}
/**
* Return the word's <it>lemma</it>. Its lemma is its orthographic representation, for
* example <code>"dog"</code> or <code>"get up"</code>.
*/
public String getLemma() {
return _lemma;
}
public long[] getSynsetOffsets() {
return _synsetOffsets;
}
public Object getKey() {
return getLemma();
}
/** Get the word's sense count. */
public int getSenseCount() {
return _synsetOffsets.length;
}
/** Get an array of all the senses of this word.*/
public Synset[] getSenses() throws JWNLException {
if (!_synsetsLoaded) {
for (int i = 0; i < getSynsetOffsets().length; ++i)
loadSynset(i);
_synsetsLoaded = true;
}
return _synsets;
}
/** Get a particular sense of this word. Sense indices start at 1. */
public Synset getSense(int index) throws JWNLException {
loadSynset(index - 1);
return _synsets[index - 1];
}
private void loadSynset(int i) throws JWNLException {
if (_synsets[i] == null) {
_synsets[i] = Dictionary.getInstance().getSynsetAt(_pos, _synsetOffsets[i]);
}
}
private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
in.defaultReadObject();
// set POS to reference the static instance defined in the current runtime environment
_pos = POS.getPOSForKey(_pos.getKey());
_synsets = new Synset[_synsetOffsets.length];
}
} | {
"content_hash": "a9f625e80eb9eeb5986a4b52540332e6",
"timestamp": "",
"source": "github",
"line_count": 114,
"max_line_length": 110,
"avg_line_length": 28.096491228070175,
"alnum_prop": 0.6971589135185763,
"repo_name": "bitsetd4d/word-playground",
"id": "2eb30761cef1efb2d515a6ca55f56e224f6141c8",
"size": "3293",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "WordNet-JWNL/src/net/didion/jwnl/data/IndexWord.java",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "Groff",
"bytes": "3514417"
},
{
"name": "HTML",
"bytes": "1879"
},
{
"name": "IDL",
"bytes": "624"
},
{
"name": "Java",
"bytes": "453786"
},
{
"name": "Makefile",
"bytes": "20538"
}
],
"symlink_target": ""
} |
package com.amazonaws.services.apigateway.model;
import java.io.Serializable;
/**
* <p>
* Represents a collection of <a>ApiKey</a> resources.
* </p>
*/
public class GetApiKeysResult implements Serializable, Cloneable {
private String position;
/**
* <p>
* The current page of any <a>ApiKey</a> resources in the collection of
* <a>ApiKey</a> resources.
* </p>
*/
private java.util.List<ApiKey> items;
/**
* @param position
*/
public void setPosition(String position) {
this.position = position;
}
/**
* @return
*/
public String getPosition() {
return this.position;
}
/**
* @param position
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public GetApiKeysResult withPosition(String position) {
setPosition(position);
return this;
}
/**
* <p>
* The current page of any <a>ApiKey</a> resources in the collection of
* <a>ApiKey</a> resources.
* </p>
*
* @return The current page of any <a>ApiKey</a> resources in the collection
* of <a>ApiKey</a> resources.
*/
public java.util.List<ApiKey> getItems() {
return items;
}
/**
* <p>
* The current page of any <a>ApiKey</a> resources in the collection of
* <a>ApiKey</a> resources.
* </p>
*
* @param items
* The current page of any <a>ApiKey</a> resources in the collection
* of <a>ApiKey</a> resources.
*/
public void setItems(java.util.Collection<ApiKey> items) {
if (items == null) {
this.items = null;
return;
}
this.items = new java.util.ArrayList<ApiKey>(items);
}
/**
* <p>
* The current page of any <a>ApiKey</a> resources in the collection of
* <a>ApiKey</a> resources.
* </p>
* <p>
* <b>NOTE:</b> This method appends the values to the existing list (if
* any). Use {@link #setItems(java.util.Collection)} or
* {@link #withItems(java.util.Collection)} if you want to override the
* existing values.
* </p>
*
* @param items
* The current page of any <a>ApiKey</a> resources in the collection
* of <a>ApiKey</a> resources.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public GetApiKeysResult withItems(ApiKey... items) {
if (this.items == null) {
setItems(new java.util.ArrayList<ApiKey>(items.length));
}
for (ApiKey ele : items) {
this.items.add(ele);
}
return this;
}
/**
* <p>
* The current page of any <a>ApiKey</a> resources in the collection of
* <a>ApiKey</a> resources.
* </p>
*
* @param items
* The current page of any <a>ApiKey</a> resources in the collection
* of <a>ApiKey</a> resources.
* @return Returns a reference to this object so that method calls can be
* chained together.
*/
public GetApiKeysResult withItems(java.util.Collection<ApiKey> items) {
setItems(items);
return this;
}
/**
* Returns a string representation of this object; useful for testing and
* debugging.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getPosition() != null)
sb.append("Position: " + getPosition() + ",");
if (getItems() != null)
sb.append("Items: " + getItems());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetApiKeysResult == false)
return false;
GetApiKeysResult other = (GetApiKeysResult) obj;
if (other.getPosition() == null ^ this.getPosition() == null)
return false;
if (other.getPosition() != null
&& other.getPosition().equals(this.getPosition()) == false)
return false;
if (other.getItems() == null ^ this.getItems() == null)
return false;
if (other.getItems() != null
&& other.getItems().equals(this.getItems()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode
+ ((getPosition() == null) ? 0 : getPosition().hashCode());
hashCode = prime * hashCode
+ ((getItems() == null) ? 0 : getItems().hashCode());
return hashCode;
}
@Override
public GetApiKeysResult clone() {
try {
return (GetApiKeysResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException(
"Got a CloneNotSupportedException from Object.clone() "
+ "even though we're Cloneable!", e);
}
}
} | {
"content_hash": "faff319d97d9ba6876587a359f86c8b4",
"timestamp": "",
"source": "github",
"line_count": 189,
"max_line_length": 80,
"avg_line_length": 28.433862433862434,
"alnum_prop": 0.5478228507629327,
"repo_name": "trasa/aws-sdk-java",
"id": "f4d485c150c36fe3ad3a1a63cc65509c84dfc4d2",
"size": "5958",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "aws-java-sdk-api-gateway/src/main/java/com/amazonaws/services/apigateway/model/GetApiKeysResult.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "100011199"
},
{
"name": "Scilab",
"bytes": "2354"
}
],
"symlink_target": ""
} |
import os
import sys
# Get chrome/test/functional scripts into our path.
# TODO(tonyg): Move webpagereplay.py to a common location.
sys.path.append(
os.path.abspath(
os.path.join(os.path.dirname(__file__),
'../../../chrome/test/functional')))
import webpagereplay # pylint: disable=F0401
CHROME_FLAGS = webpagereplay.CHROME_FLAGS
class ReplayServer(object):
def __init__(self, browser_backend, path, is_record_mode):
self._browser_backend = browser_backend
self._forwarder = None
self._web_page_replay = None
self._is_record_mode = is_record_mode
# Note: This can cause flake if server doesn't shut down properly and keeps
# ports tied up. See crbug.com/157459.
self._forwarder = browser_backend.CreateForwarder(
(webpagereplay.HTTP_PORT, webpagereplay.HTTP_PORT),
(webpagereplay.HTTPS_PORT, webpagereplay.HTTPS_PORT))
options = []
if self._is_record_mode:
options.append('--record')
if not browser_backend.options.wpr_make_javascript_deterministic:
options.append('--inject_scripts=')
self._web_page_replay = webpagereplay.ReplayServer(path, options)
self._web_page_replay.StartServer()
def __enter__(self):
return self
def __exit__(self, *args):
self.Close()
def Close(self):
if self._forwarder:
self._forwarder.Close()
self._forwarder = None
if self._web_page_replay:
self._web_page_replay.StopServer()
self._web_page_replay = None
| {
"content_hash": "e244dbc7c876a619c0a229b64ef35732",
"timestamp": "",
"source": "github",
"line_count": 47,
"max_line_length": 79,
"avg_line_length": 31.93617021276596,
"alnum_prop": 0.6708860759493671,
"repo_name": "leighpauls/k2cro4",
"id": "ec8dd051c737006e55d1f7339b37848510805746",
"size": "1667",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "tools/telemetry/telemetry/wpr_server.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "ASP",
"bytes": "3062"
},
{
"name": "AppleScript",
"bytes": "25392"
},
{
"name": "Arduino",
"bytes": "464"
},
{
"name": "Assembly",
"bytes": "68131038"
},
{
"name": "C",
"bytes": "242794338"
},
{
"name": "C#",
"bytes": "11024"
},
{
"name": "C++",
"bytes": "353525184"
},
{
"name": "Common Lisp",
"bytes": "3721"
},
{
"name": "D",
"bytes": "1931"
},
{
"name": "Emacs Lisp",
"bytes": "1639"
},
{
"name": "F#",
"bytes": "4992"
},
{
"name": "FORTRAN",
"bytes": "10404"
},
{
"name": "Java",
"bytes": "3845159"
},
{
"name": "JavaScript",
"bytes": "39146656"
},
{
"name": "Lua",
"bytes": "13768"
},
{
"name": "Matlab",
"bytes": "22373"
},
{
"name": "Objective-C",
"bytes": "21887598"
},
{
"name": "PHP",
"bytes": "2344144"
},
{
"name": "Perl",
"bytes": "49033099"
},
{
"name": "Prolog",
"bytes": "2926122"
},
{
"name": "Python",
"bytes": "39863959"
},
{
"name": "R",
"bytes": "262"
},
{
"name": "Racket",
"bytes": "359"
},
{
"name": "Ruby",
"bytes": "304063"
},
{
"name": "Scheme",
"bytes": "14853"
},
{
"name": "Shell",
"bytes": "9195117"
},
{
"name": "Tcl",
"bytes": "1919771"
},
{
"name": "Verilog",
"bytes": "3092"
},
{
"name": "Visual Basic",
"bytes": "1430"
},
{
"name": "eC",
"bytes": "5079"
}
],
"symlink_target": ""
} |
namespace blink {
class DOMContentLoadedListener final
: public V8AbstractEventListener,
public ProcessingInstruction::DetachableEventListener {
USING_GARBAGE_COLLECTED_MIXIN(DOMContentLoadedListener);
public:
static DOMContentLoadedListener* create(ScriptState* scriptState,
ProcessingInstruction* pi) {
return new DOMContentLoadedListener(scriptState, pi);
}
bool operator==(const EventListener&) const override { return true; }
virtual void handleEvent(ScriptState* scriptState, Event* event) {
DCHECK(RuntimeEnabledFeatures::xsltEnabled());
DCHECK_EQ(event->type(), "DOMContentLoaded");
ScriptState::Scope scope(scriptState);
Document& document = *toDocument(scriptState->getExecutionContext());
DCHECK(!document.parsing());
// Processing instruction (XML documents only).
// We don't support linking to embedded CSS stylesheets,
// see <https://bugs.webkit.org/show_bug.cgi?id=49281> for discussion.
// Don't apply XSL transforms to already transformed documents.
if (DocumentXSLT::hasTransformSourceDocument(document))
return;
ProcessingInstruction* pi = DocumentXSLT::findXSLStyleSheet(document);
if (!pi || pi != m_processingInstruction || pi->isLoading())
return;
DocumentXSLT::applyXSLTransform(document, pi);
}
void detach() override { m_processingInstruction = nullptr; }
EventListener* toEventListener() override { return this; }
DEFINE_INLINE_VIRTUAL_TRACE() {
visitor->trace(m_processingInstruction);
V8AbstractEventListener::trace(visitor);
ProcessingInstruction::DetachableEventListener::trace(visitor);
}
private:
DOMContentLoadedListener(ScriptState* scriptState, ProcessingInstruction* pi)
: V8AbstractEventListener(false,
scriptState->world(),
scriptState->isolate()),
m_processingInstruction(pi) {}
virtual v8::Local<v8::Value> callListenerFunction(ScriptState*,
v8::Local<v8::Value>,
Event*) {
NOTREACHED();
return v8::Local<v8::Value>();
}
// If this event listener is attached to a ProcessingInstruction, keep a
// weak reference back to it. That ProcessingInstruction is responsible for
// detaching itself and clear out the reference.
Member<ProcessingInstruction> m_processingInstruction;
};
DocumentXSLT::DocumentXSLT() : m_transformSourceDocument(nullptr) {}
void DocumentXSLT::applyXSLTransform(Document& document,
ProcessingInstruction* pi) {
DCHECK(!pi->isLoading());
UseCounter::count(document, UseCounter::XSLProcessingInstruction);
XSLTProcessor* processor = XSLTProcessor::create(document);
processor->setXSLStyleSheet(toXSLStyleSheet(pi->sheet()));
String resultMIMEType;
String newSource;
String resultEncoding;
document.setParsingState(Document::Parsing);
if (!processor->transformToString(&document, resultMIMEType, newSource,
resultEncoding)) {
document.setParsingState(Document::FinishedParsing);
return;
}
// FIXME: If the transform failed we should probably report an error (like
// Mozilla does).
LocalFrame* ownerFrame = document.frame();
processor->createDocumentFromSource(newSource, resultEncoding, resultMIMEType,
&document, ownerFrame);
InspectorInstrumentation::frameDocumentUpdated(ownerFrame);
document.setParsingState(Document::FinishedParsing);
}
ProcessingInstruction* DocumentXSLT::findXSLStyleSheet(Document& document) {
for (Node* node = document.firstChild(); node; node = node->nextSibling()) {
if (node->getNodeType() != Node::kProcessingInstructionNode)
continue;
ProcessingInstruction* pi = toProcessingInstruction(node);
if (pi->isXSL())
return pi;
}
return nullptr;
}
bool DocumentXSLT::processingInstructionInsertedIntoDocument(
Document& document,
ProcessingInstruction* pi) {
if (!pi->isXSL())
return false;
if (!RuntimeEnabledFeatures::xsltEnabled() || !document.frame())
return true;
ScriptState* scriptState = ScriptState::forMainWorld(document.frame());
if (!scriptState)
return false;
DOMContentLoadedListener* listener =
DOMContentLoadedListener::create(scriptState, pi);
document.addEventListener(EventTypeNames::DOMContentLoaded, listener, false);
DCHECK(!pi->eventListenerForXSLT());
pi->setEventListenerForXSLT(listener);
return true;
}
bool DocumentXSLT::processingInstructionRemovedFromDocument(
Document& document,
ProcessingInstruction* pi) {
if (!pi->isXSL())
return false;
if (!pi->eventListenerForXSLT())
return true;
DCHECK(RuntimeEnabledFeatures::xsltEnabled());
document.removeEventListener(EventTypeNames::DOMContentLoaded,
pi->eventListenerForXSLT(), false);
pi->clearEventListenerForXSLT();
return true;
}
bool DocumentXSLT::sheetLoaded(Document& document, ProcessingInstruction* pi) {
if (!pi->isXSL())
return false;
if (RuntimeEnabledFeatures::xsltEnabled() && !document.parsing() &&
!pi->isLoading() && !DocumentXSLT::hasTransformSourceDocument(document)) {
if (findXSLStyleSheet(document) == pi)
applyXSLTransform(document, pi);
}
return true;
}
const char* DocumentXSLT::supplementName() {
return "DocumentXSLT";
}
bool DocumentXSLT::hasTransformSourceDocument(Document& document) {
return static_cast<DocumentXSLT*>(
Supplement<Document>::from(document, supplementName()));
}
DocumentXSLT& DocumentXSLT::from(Supplementable<Document>& document) {
DocumentXSLT* supplement = static_cast<DocumentXSLT*>(
Supplement<Document>::from(document, supplementName()));
if (!supplement) {
supplement = new DocumentXSLT;
Supplement<Document>::provideTo(document, supplementName(), supplement);
}
return *supplement;
}
DEFINE_TRACE(DocumentXSLT) {
visitor->trace(m_transformSourceDocument);
Supplement<Document>::trace(visitor);
}
} // namespace blink
| {
"content_hash": "459cb877b03285a01401ddceef4073b1",
"timestamp": "",
"source": "github",
"line_count": 177,
"max_line_length": 80,
"avg_line_length": 34.89265536723164,
"alnum_prop": 0.7011010362694301,
"repo_name": "Samsung/ChromiumGStreamerBackend",
"id": "b9b3f5e59293106ac76263130acf93da91f409bc",
"size": "6893",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "third_party/WebKit/Source/core/xml/DocumentXSLT.cpp",
"mode": "33188",
"license": "bsd-3-clause",
"language": [],
"symlink_target": ""
} |
from setuptools import setup, find_packages
setup(
name='grove',
version='0.0.1',
url='https://github.com/zivia/grove',
author='Troy Squillaci',
author_email='troysquillaci@gmail.com',
description='Genetic algorithm and grammatical evolution library.',
packages=find_packages(exclude=['tests']),
zip_safe=False,
include_package_data=True,
platforms='any',
license='MIT',
install_requires=[]
)
| {
"content_hash": "b13bc759db12f0cee0c662049fc4673d",
"timestamp": "",
"source": "github",
"line_count": 16,
"max_line_length": 71,
"avg_line_length": 27.625,
"alnum_prop": 0.6764705882352942,
"repo_name": "zivia/grove",
"id": "a8b5f33ae33cc9811df4870db7d64b09780d032d",
"size": "442",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "setup.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "81747"
}
],
"symlink_target": ""
} |
@interface SectionViewController : UIViewController <UIWebViewDelegate>
@property (strong, nonatomic) IBOutlet UIWebView *webView;
@property (strong, nonatomic) WebViewJavascriptBridge *bridge;
- (id)registeredSectionController;
- (void)setupWithData:(NSDictionary*)data;
+ (SectionViewController*)createWithData:(NSDictionary*)data;
- (void)forceContentLoad;
- (NSString*)requestedNavigationAnimation;
- (void) rightClickOnNavBarItem;
-(void) leftClickOnNavBarItem;
@end
| {
"content_hash": "446a4eb55d9c29d5b8ea2a0258d44afd",
"timestamp": "",
"source": "github",
"line_count": 15,
"max_line_length": 71,
"avg_line_length": 31.733333333333334,
"alnum_prop": 0.8088235294117647,
"repo_name": "AXEMAS/framework",
"id": "eb2c3d8bf6db39e37b9a7f2fb05e18447610a49d",
"size": "636",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ios/axemas/axemas/SectionViewController.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "99898"
},
{
"name": "CSS",
"bytes": "1097"
},
{
"name": "Groovy",
"bytes": "1152"
},
{
"name": "HTML",
"bytes": "17832"
},
{
"name": "Java",
"bytes": "78868"
},
{
"name": "JavaScript",
"bytes": "43421"
},
{
"name": "Objective-C",
"bytes": "783444"
},
{
"name": "Python",
"bytes": "7809"
},
{
"name": "Shell",
"bytes": "6460"
}
],
"symlink_target": ""
} |
package ua.org.dector.gcore.common;
import ua.org.dector.gcore.managers.PreferencesManager;
/**
* @author dector (dector9@gmail.com)
*/
public class Settings {
// Music/Sounds
private static final String MUSIC_VOLUME = "music.volume";
private static final String MUSIC_ENABLED = "music.enabled";
private static final String SFX_VOLUME = "sfx.volume";
private static final String SFX_ENABLED = "sfx.enabled";
private static final float DEFAULT_MUSIC_VOLUME = 1;
private static final boolean DEFAULT_MUSIC_ENABLED = true;
private static final float DEFAULT_SFX_VOLUME = 1;
private static final boolean DEFAULT_SFX_ENABLED = true;
// Screen
private static final String SCREEN_WIDTH = "screen.width";
private static final String SCREEN_HEIGHT = "screen.height";
private static final String SCREEN_FULLSCREEN = "screen.fullscreen";
private static final int DEFAULT_SCREEN_WIDTH = 800;
private static final int DEFAULT_SCREEN_HEIGHT = 600;
private static final boolean DEFAULT_SCREEN_FULLSCREEN = false;
private PreferencesManager prefs;
public Settings(String filename) {
prefs = new PreferencesManager(filename);
}
public float getMusicVolume() {
return prefs.getFloat(MUSIC_VOLUME, DEFAULT_MUSIC_VOLUME);
}
public void setMusicVolume(float volume) {
prefs.putFloat(MUSIC_VOLUME, volume);
}
public float getSfxVolume() {
return prefs.getFloat(SFX_VOLUME, DEFAULT_SFX_VOLUME);
}
public void setSfxVolume(float volume) {
prefs.putFloat(SFX_VOLUME, volume);
}
public boolean getMusicEnabled() {
return prefs.getBoolean(MUSIC_ENABLED, DEFAULT_MUSIC_ENABLED);
}
public void setMusicEnabled(boolean enabled) {
prefs.putBoolean(MUSIC_ENABLED, enabled);
}
public boolean getSfxEnabled() {
return prefs.getBoolean(SFX_ENABLED, DEFAULT_SFX_ENABLED);
}
public void setSfxEnabled(boolean enabled) {
prefs.putBoolean(SFX_ENABLED, enabled);
}
public int getScreenWidth() {
return prefs.getInt(SCREEN_WIDTH, DEFAULT_SCREEN_WIDTH);
}
public int getScreenHeight() {
return prefs.getInt(SCREEN_HEIGHT, DEFAULT_SCREEN_HEIGHT);
}
public boolean isFullscreen() {
return prefs.getBoolean(SCREEN_FULLSCREEN, DEFAULT_SCREEN_FULLSCREEN);
}
public void setScreenWidth(int width) {
prefs.putInt(SCREEN_WIDTH, width);
}
public void setScreenHeight(int height) {
prefs.putInt(SCREEN_HEIGHT, height);
}
public void setFullscreen(boolean fullscreen) {
prefs.putBoolean(SCREEN_FULLSCREEN, fullscreen);
}
public void save() {
prefs.save();
}
}
| {
"content_hash": "2c102253a4565b6f39c5eeffd39e7dee",
"timestamp": "",
"source": "github",
"line_count": 95,
"max_line_length": 78,
"avg_line_length": 29.473684210526315,
"alnum_prop": 0.675,
"repo_name": "dector/moon_lander",
"id": "550665fac6e61acfe320943292b0a4820fd233cd",
"size": "2800",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/ua/org/dector/gcore/common/Settings.java",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "Java",
"bytes": "73187"
}
],
"symlink_target": ""
} |
package com.alibaba.nacos.api.naming.remote.request;
/**
* Nacos naming query request.
*
* @author xiweng.yy
*/
public class ServiceQueryRequest extends AbstractNamingRequest {
private String cluster;
private boolean healthyOnly;
private int udpPort;
public ServiceQueryRequest() {
}
public ServiceQueryRequest(String namespace, String serviceName, String groupName) {
super(namespace, serviceName, groupName);
}
public String getCluster() {
return cluster;
}
public void setCluster(String cluster) {
this.cluster = cluster;
}
public boolean isHealthyOnly() {
return healthyOnly;
}
public void setHealthyOnly(boolean healthyOnly) {
this.healthyOnly = healthyOnly;
}
public int getUdpPort() {
return udpPort;
}
public void setUdpPort(int udpPort) {
this.udpPort = udpPort;
}
}
| {
"content_hash": "157ce71ba4e5f8d9b3f179a6613b4a16",
"timestamp": "",
"source": "github",
"line_count": 48,
"max_line_length": 88,
"avg_line_length": 20.208333333333332,
"alnum_prop": 0.6278350515463917,
"repo_name": "alibaba/nacos",
"id": "c1c60e2ada1e1dc09f3d7f837d6382ccc2ead1b4",
"size": "1585",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "api/src/main/java/com/alibaba/nacos/api/naming/remote/request/ServiceQueryRequest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "4434"
},
{
"name": "EJS",
"bytes": "2645"
},
{
"name": "Java",
"bytes": "9013127"
},
{
"name": "JavaScript",
"bytes": "7472"
},
{
"name": "SCSS",
"bytes": "80124"
},
{
"name": "Shell",
"bytes": "6330"
},
{
"name": "TypeScript",
"bytes": "4765"
}
],
"symlink_target": ""
} |
define("vs/base/common/worker/simpleWorker.nls.zh-cn",{"vs/base/common/platform":["_"]});
//# sourceMappingURL=../../../../../min-maps/vs/base/common/worker/simpleWorker.nls.zh-cn.js.map | {
"content_hash": "4430faa81f46aa7f8b67d2c51910d413",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 96,
"avg_line_length": 62.333333333333336,
"alnum_prop": 0.6844919786096256,
"repo_name": "cdnjs/cdnjs",
"id": "ef1e678c4f623a6bf3e2918439be1589ddd53f0a",
"size": "543",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ajax/libs/monaco-editor/0.34.0-dev.20220803/min/vs/base/common/worker/simpleWorker.nls.zh-cn.js",
"mode": "33188",
"license": "mit",
"language": [],
"symlink_target": ""
} |
package org.elasticsearch.mapping;
import java.beans.IntrospectionException;
import java.beans.Introspector;
import java.beans.PropertyDescriptor;
import java.lang.annotation.Annotation;
import java.lang.reflect.Field;
import java.lang.reflect.Modifier;
import java.util.*;
import org.elasticsearch.annotation.*;
import org.elasticsearch.annotation.query.*;
import org.elasticsearch.common.logging.ESLogger;
import org.elasticsearch.common.logging.Loggers;
import org.elasticsearch.mapping.parser.*;
import org.elasticsearch.util.MapUtil;
import org.springframework.util.ClassUtils;
/**
* Process fields in a class to fill-in the properties entry in the class definition map.
*
* @author luc boutier
*/
public class FieldsMappingBuilder {
private static final ESLogger LOGGER = Loggers.getLogger(MappingBuilder.class);
/**
* Parse fields from the given class to add properties mapping.
*
* @param clazz The class for which to parse fields.
* @param classDefinitionMap The map that contains the class definition (a "properties" entry will be added with field mapping content).
* @param facetFields A list that contains all the field facet mapping.
* @param filteredFields A list that contains all the field filters mapping.
* @param fetchContexts A list that contains all the fetch contexts mapping.
* @param pathPrefix A prefix which is a path (null for root object, and matching the field names for nested objects).
* @throws IntrospectionException In case we fail to use reflexion on the given class.
*/
@SuppressWarnings("unchecked")
public void parseFieldMappings(Class<?> clazz, Map<String, Object> classDefinitionMap, List<IFacetBuilderHelper> facetFields,
List<IFilterBuilderHelper> filteredFields, Map<String, SourceFetchContext> fetchContexts, String pathPrefix) throws IntrospectionException {
if (clazz.getSuperclass() != null && clazz.getSuperclass() != Object.class) {
parseFieldMappings(clazz.getSuperclass(), classDefinitionMap, facetFields, filteredFields, fetchContexts, pathPrefix);
}
List<Indexable> indexables = getIndexables(clazz);
Map<String, Object> propertiesDefinitionMap = (Map<String, Object>) classDefinitionMap.get("properties");
if (propertiesDefinitionMap == null) {
propertiesDefinitionMap = new HashMap<String, Object>();
classDefinitionMap.put("properties", propertiesDefinitionMap);
}
for (Indexable indexable : indexables) {
parseFieldMappings(clazz, classDefinitionMap, facetFields, filteredFields, fetchContexts, propertiesDefinitionMap, pathPrefix, indexable);
}
}
private void parseFieldMappings(Class<?> clazz, Map<String, Object> classDefinitionMap, List<IFacetBuilderHelper> facetFields,
List<IFilterBuilderHelper> filteredFields, Map<String, SourceFetchContext> fetchContexts, Map<String, Object> propertiesDefinitionMap,
String pathPrefix, Indexable indexable) {
String esFieldName = pathPrefix + indexable.getName();
if (pathPrefix == null || pathPrefix.isEmpty()) {
// Id, routing and boost are valid only for root object.
processIdAnnotation(classDefinitionMap, esFieldName, indexable);
processRoutingAnnotation(classDefinitionMap, esFieldName, indexable);
processBoostAnnotation(classDefinitionMap, esFieldName, indexable);
// Timestamp field annotation
processTimeStampAnnotation(classDefinitionMap, esFieldName, indexable);
}
processFetchContextAnnotation(fetchContexts, esFieldName, indexable);
processFilterAnnotation(filteredFields, esFieldName, indexable);
processFacetAnnotation(facetFields, filteredFields, esFieldName, indexable);
// process the fields
if (ClassUtils.isPrimitiveOrWrapper(indexable.getType()) || indexable.getType() == String.class) {
processStringOrPrimitive(clazz, propertiesDefinitionMap, pathPrefix, indexable);
} else {
Class<?> arrayType = indexable.getComponentType();
// mapping of a complex field
if (arrayType != null) {
// process the array type.
if (ClassUtils.isPrimitiveOrWrapper(arrayType) || arrayType == String.class) {
processStringOrPrimitive(clazz, propertiesDefinitionMap, pathPrefix, indexable);
} else if (arrayType.isEnum()) {
// if this is an enum and there is a String
StringField annotation = indexable.getAnnotation(StringField.class);
if (annotation != null) {
processStringOrPrimitive(clazz, propertiesDefinitionMap, pathPrefix, indexable);
}
} else {
processComplexType(clazz, propertiesDefinitionMap, pathPrefix, indexable, filteredFields, facetFields);
}
} else {
// process the type
processComplexType(clazz, propertiesDefinitionMap, pathPrefix, indexable, filteredFields, facetFields);
}
}
}
@SuppressWarnings("unchecked")
private void processIdAnnotation(Map<String, Object> classDefinitionMap, String esFieldName, Indexable indexable) {
Id id = indexable.getAnnotation(Id.class);
if (id != null) {
if (classDefinitionMap.containsKey("_id")) {
LOGGER.warn("An Id annotation is defined on field <" + esFieldName + "> of <" + indexable.getDeclaringClassName()
+ "> but an id has already be defined for <" + ((Map<String, Object>) classDefinitionMap.get("_id")).get("path") + ">");
} else {
classDefinitionMap.put("_id", MapUtil.getMap(new String[] { "path", "index", "store" }, new Object[] { esFieldName, id.index(), id.store() }));
}
}
}
@SuppressWarnings("unchecked")
private void processRoutingAnnotation(Map<String, Object> classDefinitionMap, String esFieldName, Indexable indexable) {
Routing routing = indexable.getAnnotation(Routing.class);
if (routing != null) {
if (classDefinitionMap.containsKey("_routing")) {
LOGGER.warn("A Routing annotation is defined on field <" + esFieldName + "> of <" + indexable.getDeclaringClassName()
+ "> but a routing has already be defined for <" + ((Map<String, Object>) classDefinitionMap.get("_routing")).get("path") + ">");
} else {
Map<String, Object> routingDef = new HashMap<String, Object>();
routingDef.put("path", esFieldName);
routingDef.put("required", routing.required());
classDefinitionMap.put("_routing", routingDef);
}
}
}
@SuppressWarnings("unchecked")
private void processBoostAnnotation(Map<String, Object> classDefinitionMap, String esFieldName, Indexable indexable) {
Boost boost = indexable.getAnnotation(Boost.class);
if (boost != null) {
if (classDefinitionMap.containsKey("_boost")) {
LOGGER.warn("A Boost annotation is defined on field <" + esFieldName + "> of <" + indexable.getDeclaringClassName()
+ "> but a boost has already be defined for <" + ((Map<String, Object>) classDefinitionMap.get("_boost")).get("name") + ">");
} else {
Map<String, Object> boostDef = new HashMap<String, Object>();
boostDef.put("name", esFieldName);
boostDef.put("null_value", boost.nullValue());
classDefinitionMap.put("_boost", boostDef);
}
}
}
@SuppressWarnings("unchecked")
private void processTimeStampAnnotation(Map<String, Object> classDefinitionMap, String esFieldName, Indexable indexable) {
TimeStamp timeStamp = indexable.getAnnotation(TimeStamp.class);
if (timeStamp != null) {
if (classDefinitionMap.containsKey("_timestamp")) {
LOGGER.warn("A TimeStamp annotation is defined on field <" + esFieldName + "> of <" + indexable.getDeclaringClassName()
+ "> but a boost has already be defined for <" + ((Map<String, Object>) classDefinitionMap.get("_timestamp")).get("name") + ">");
} else {
Map<String, Object> timeStampDefinition = new HashMap<String, Object>();
timeStampDefinition.put("enabled", true);
timeStampDefinition.put("path", indexable.getName());
if (!timeStamp.format().isEmpty()) {
timeStampDefinition.put("format", timeStamp.format());
}
classDefinitionMap.put("_timestamp", timeStampDefinition);
}
}
}
private void processFetchContextAnnotation(Map<String, SourceFetchContext> fetchContexts, String esFieldName, Indexable indexable) {
FetchContext fetchContext = indexable.getAnnotation(FetchContext.class);
if (fetchContext == null) {
return;
}
for (int i = 0; i < fetchContext.contexts().length; i++) {
String context = fetchContext.contexts()[i];
boolean isInclude = fetchContext.include()[i];
SourceFetchContext sourceFetchContext = fetchContexts.get(context);
if (sourceFetchContext == null) {
sourceFetchContext = new SourceFetchContext();
fetchContexts.put(context, sourceFetchContext);
}
if (isInclude) {
sourceFetchContext.getIncludes().add(esFieldName);
} else {
sourceFetchContext.getExcludes().add(esFieldName);
}
}
}
private void processFilterAnnotation(List<IFilterBuilderHelper> classFilters, String esFieldName, Indexable indexable) {
TermFilter termFilter = indexable.getAnnotation(TermFilter.class);
if (termFilter != null) {
String[] paths = termFilter.paths();
for (String path : paths) {
path = path.trim();
boolean isAnalyzed = isAnalyzed(indexable);
String nestedPath = indexable.getAnnotation(NestedObject.class) == null ? null : esFieldName;
if (nestedPath == null) {
int nestedIndicator = esFieldName.lastIndexOf(".");
if (nestedIndicator > 0) {
nestedPath = esFieldName.substring(0, nestedIndicator);
esFieldName = esFieldName.substring(nestedIndicator + 1, esFieldName.length());
}
}
String filterPath = getFilterPath(path, esFieldName);
classFilters.add(new TermsFilterBuilderHelper(isAnalyzed, nestedPath, filterPath));
}
return;
}
RangeFilter rangeFilter = indexable.getAnnotation(RangeFilter.class);
if (rangeFilter != null) {
IFilterBuilderHelper facetBuilderHelper = new RangeFilterBuilderHelper(null, esFieldName, rangeFilter);
classFilters.add(facetBuilderHelper);
}
}
private void processFacetAnnotation(List<IFacetBuilderHelper> classFacets, List<IFilterBuilderHelper> classFilters, String esFieldName, Indexable indexable) {
TermsFacet termsFacet = indexable.getAnnotation(TermsFacet.class);
if (termsFacet != null) {
String[] paths = termsFacet.paths();
for (String path : paths) {
path = path.trim();
boolean isAnalyzed = isAnalyzed(indexable);
String nestedPath = indexable.getAnnotation(NestedObject.class) == null ? null : esFieldName;
String filterPath = getFilterPath(path, esFieldName);
IFacetBuilderHelper facetBuilderHelper = new TermsFacetBuilderHelper(isAnalyzed, nestedPath, filterPath, termsFacet);
classFacets.add(facetBuilderHelper);
if (classFilters.contains(facetBuilderHelper)) {
classFilters.remove(facetBuilderHelper);
LOGGER.warn("Field <" + esFieldName + "> already had a filter that will be replaced by the defined facet. Only a single one is allowed.");
}
classFilters.add(facetBuilderHelper);
}
return;
}
RangeFacet rangeFacet = indexable.getAnnotation(RangeFacet.class);
if (rangeFacet != null) {
IFacetBuilderHelper facetBuilderHelper = new RangeFacetBuilderHelper(null, esFieldName, rangeFacet);
classFacets.add(facetBuilderHelper);
if (classFilters.contains(facetBuilderHelper)) {
classFilters.remove(facetBuilderHelper);
LOGGER.warn("Field <" + esFieldName + "> already had a filter that will be replaced by the defined facet. Only a single one is allowed.");
}
classFilters.add(facetBuilderHelper);
}
}
private String getFilterPath(String path, String esFieldName) {
return path.isEmpty() ? esFieldName : esFieldName + "." + path;
}
private boolean isAnalyzed(Indexable indexable) {
boolean isAnalysed = true;
StringField stringFieldAnnotation = indexable.getAnnotation(StringField.class);
if (stringFieldAnnotation != null && !IndexType.analyzed.equals(stringFieldAnnotation.indexType())) {
isAnalysed = false;
}
return isAnalysed;
}
private void processStringOrPrimitive(Class<?> clazz, Map<String, Object> propertiesDefinitionMap, String pathPrefix, Indexable indexable) {
processFieldAnnotation(IndexName.class, new IndexNameAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);
processFieldAnnotation(NullValue.class, new NullValueAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);
// String field annotations.
processFieldAnnotation(StringField.class, new StringFieldAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);
processFieldAnnotation(Analyser.class, new AnalyserAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);
processFieldAnnotation(IndexAnalyser.class, new IndexAnalyserAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);
processFieldAnnotation(SearchAnalyser.class, new SearchAnalyserAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);
// Numeric field annotation
processFieldAnnotation(NumberField.class, new NumberFieldAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);
// Date field annotation
processFieldAnnotation(DateField.class, new DateFieldAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);
processFieldAnnotation(DateFormat.class, new DateFormatAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);
// Boolean field annotation
processFieldAnnotation(BooleanField.class, new BooleanFieldAnnotationParser(), propertiesDefinitionMap, pathPrefix, indexable);
// TODO binary type mapping
}
private void processComplexType(Class<?> clazz, Map<String, Object> propertiesDefinitionMap, String pathPrefix, Indexable indexable,
List<IFilterBuilderHelper> filters, List<IFacetBuilderHelper> facets) {
NestedObjectFieldAnnotationParser parser = new NestedObjectFieldAnnotationParser(this, filters, facets);
processFieldAnnotation(NestedObject.class, parser, propertiesDefinitionMap, pathPrefix, indexable);
}
@SuppressWarnings("unchecked")
private <T extends Annotation> void processFieldAnnotation(Class<T> annotationClass, IPropertyAnnotationParser<T> propertyAnnotationParser,
Map<String, Object> propertiesDefinitionMap, String pathPrefix, Indexable indexable) {
T annotation = indexable.getAnnotation(annotationClass);
if (annotation != null) {
Map<String, Object> fieldDefinition = (Map<String, Object>) propertiesDefinitionMap.get(indexable.getName());
if (fieldDefinition == null) {
fieldDefinition = new HashMap<String, Object>();
propertiesDefinitionMap.put(indexable.getName(), fieldDefinition);
}
propertyAnnotationParser.parseAnnotation(annotation, fieldDefinition, pathPrefix, indexable);
}
}
/**
* Get all indexable member of a class (field or property)
*
* @param clazz class to check
* @return list of all indexable members
* @throws IntrospectionException
*/
private List<Indexable> getIndexables(Class<?> clazz) throws IntrospectionException {
List<Indexable> indexables = new ArrayList<Indexable>();
Map<String, PropertyDescriptor> pdMap = getValidPropertyDescriptorMap(clazz);
Map<String, Field> fdMap = new HashMap<String, Field>();
Field[] fdArr = clazz.getDeclaredFields();
for (Field field : fdArr) {
// Check not transient field
if (Modifier.isTransient(field.getModifiers())) {
continue;
}
String pdName = field.getName();
if (field.getType().equals(Boolean.TYPE) && field.getName().startsWith("is")) {
pdName = field.getName().substring(2, 3).toLowerCase() + field.getName().substring(3, field.getName().length());
}
PropertyDescriptor propertyDescriptor = pdMap.get(pdName);
if (propertyDescriptor == null || propertyDescriptor.getReadMethod() == null || propertyDescriptor.getWriteMethod() == null) {
LOGGER.debug("Field <" + field.getName() + "> of class <" + clazz.getName() + "> has no proper setter/getter and won't be persisted.");
} else {
fdMap.put(pdName, field);
}
}
Set<String> allIndexablesName = new HashSet<String>();
allIndexablesName.addAll(pdMap.keySet());
allIndexablesName.addAll(fdMap.keySet());
for (String name : allIndexablesName) {
indexables.add(new Indexable(fdMap.get(name), pdMap.get(name)));
}
return indexables;
}
private Map<String, PropertyDescriptor> getValidPropertyDescriptorMap(Class<?> clazz) throws IntrospectionException {
Map<String, PropertyDescriptor> pdMap = new HashMap<String, PropertyDescriptor>();
PropertyDescriptor[] pdArr = Introspector.getBeanInfo(clazz, clazz.getSuperclass()).getPropertyDescriptors();
if (pdArr == null) {
return pdMap;
}
for (PropertyDescriptor pd : pdArr) {
// Check valid getter setter
if (pd.getReadMethod() != null && pd.getWriteMethod() != null) {
pdMap.put(pd.getName(), pd);
}
}
return pdMap;
}
}
| {
"content_hash": "8e30ea6631964a09a9d6eb4fbec8dc00",
"timestamp": "",
"source": "github",
"line_count": 363,
"max_line_length": 162,
"avg_line_length": 52.548209366391184,
"alnum_prop": 0.6544167758846658,
"repo_name": "cmourouvin/elasticsearch-mapping-parent",
"id": "1ad4d9f385e830e8f235744cbe1b11691dfcb117",
"size": "19075",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "elasticsearch-mapping/src/main/java/org/elasticsearch/mapping/FieldsMappingBuilder.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "132048"
}
],
"symlink_target": ""
} |
<?php
namespace App\Http\Controllers\Admin;
use App\Models\Admin\AdminGroup;
use Illuminate\Http\Request;
use App\Http\Controllers\Admin\Controller;
class AdminGroupController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
$groups = AdminGroup::select([
'id',
'name',
'status',
])->get();
return view('admin.admin_group.index', [
'groups' => $groups,
]);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('admin.admin_group.create');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$group = new AdminGroup();
$group->name = $request->input('name', '');
$group->save();
return redirect()->route('admin-groups');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
$group = AdminGroup::select([
'id',
'name',
'status',
])->find($id);
return view('admin.admin_group.edit', [
'group' => $group,
]);
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
$group = [
'name' => $request->input('name', ''),
];
AdminGroup::where('id', $id)->limit(1)->update($group);
return redirect()->route('admin-groups');
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
AdminGroup::where('id', $id)->limit(1)->delete();
return redirect()->route('admin-groups');
}
}
| {
"content_hash": "c9c5d5b8e7505f4f3485a10b09b6f46b",
"timestamp": "",
"source": "github",
"line_count": 108,
"max_line_length": 63,
"avg_line_length": 22.833333333333332,
"alnum_prop": 0.5255474452554745,
"repo_name": "comoyi/skyline",
"id": "361bd261899d49ebf10885ef4d3effa318e93e67",
"size": "2466",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/Http/Controllers/Admin/AdminGroupController.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "553"
},
{
"name": "HTML",
"bytes": "94103"
},
{
"name": "PHP",
"bytes": "126735"
},
{
"name": "Vue",
"bytes": "563"
}
],
"symlink_target": ""
} |
import argparse
import os
import os.path
from ftplib import FTP
__version__ = '0.0.0'
TYPES = [
"precipitation",
"sun",
"air_temperature",
"solar",
"soil_temperature",
"cloudiness",
"pressure",
"wind"
]
CONFIG_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "etc"))
DEFAULT_DOWNLOAD_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "downloads"))
DEFAULT_OUT_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "out"))
FTP_SERVER = "ftp-cdc.dwd.de"
FTP_BASE_DIR = "/pub/CDC/observations_germany/climate/hourly"
def init_ftp():
ftp = FTP(FTP_SERVER)
ftp.login()
ftp.cwd(FTP_BASE_DIR)
return ftp
class FullPaths(argparse.Action):
"""Expand user- and relative-paths"""
def __call__(self, parser, namespace, values, option_string=None):
setattr(namespace, self.dest, os.path.abspath(os.path.expanduser(values)))
def is_dir(dirname):
"""
Checks if a path is an actual directory.
Tries to create the directory.
"""
if not os.path.isdir(dirname):
if not os.path.exists(dirname):
try:
os.makedirs(dirname)
except Exception as e:
raise argparse.ArgumentTypeError(
"could not create directory {0}".format(dirname))
else:
msg = "{0} exists but is not a directory".format(dirname)
raise argparse.ArgumentTypeError(msg)
else:
return dirname
| {
"content_hash": "20609092e5156a0080dd17482346c910",
"timestamp": "",
"source": "github",
"line_count": 57,
"max_line_length": 98,
"avg_line_length": 26.403508771929825,
"alnum_prop": 0.6119601328903654,
"repo_name": "mfelsche/dwd_weather_data",
"id": "82871899642912e678323212a1b1e5761ba16103",
"size": "1505",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "weather/__init__.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Python",
"bytes": "45404"
},
{
"name": "SQLPL",
"bytes": "2026"
}
],
"symlink_target": ""
} |
@interface DFDynamicPropertyDemoUITests : XCTestCase
@end
@implementation DFDynamicPropertyDemoUITests
- (void)setUp {
[super setUp];
// Put setup code here. This method is called before the invocation of each test method in the class.
// In UI tests it is usually best to stop immediately when a failure occurs.
self.continueAfterFailure = NO;
// UI tests must launch the application that they test. Doing this in setup will make sure it happens for each test method.
[[[XCUIApplication alloc] init] launch];
// In UI tests it’s important to set the initial state - such as interface orientation - required for your tests before they run. The setUp method is a good place to do this.
}
- (void)tearDown {
// Put teardown code here. This method is called after the invocation of each test method in the class.
[super tearDown];
}
- (void)testExample {
// Use recording to get started writing UI tests.
// Use XCTAssert and related functions to verify your tests produce the correct results.
}
@end
| {
"content_hash": "a0d94b2964a589fa47a2f39c73283d69",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 178,
"avg_line_length": 35.43333333333333,
"alnum_prop": 0.7243650047036688,
"repo_name": "wonderffee/DFDynamicProperty",
"id": "6619e36dae6f97084df39397e402f250e0136017",
"size": "1263",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Demo/DFDynamicPropertyDemoUITests/DFDynamicPropertyDemoUITests.m",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "725"
},
{
"name": "Objective-C",
"bytes": "25976"
},
{
"name": "Ruby",
"bytes": "996"
}
],
"symlink_target": ""
} |
/**
* @file lars_impl.hpp
* @author Ryan Curtin
*
* Implementation of templated LARS functions.
*
* This file is part of mlpack 2.0.1.
*
* mlpack is free software; you may redstribute it and/or modify it under the
* terms of the 3-clause BSD license. You should have received a copy of the
* 3-clause BSD license along with mlpack. If not, see
* http://www.opensource.org/licenses/BSD-3-Clause for more information.
*/
#ifndef __MLPACK_METHODS_LARS_LARS_IMPL_HPP
#define __MLPACK_METHODS_LARS_LARS_IMPL_HPP
//! In case it hasn't been included yet.
#include "lars.hpp"
namespace mlpack {
namespace regression {
/**
* Serialize the LARS model.
*/
template<typename Archive>
void LARS::Serialize(Archive& ar, const unsigned int /* version */)
{
using data::CreateNVP;
// If we're loading, we have to use the internal storage.
if (Archive::is_loading::value)
{
matGram = &matGramInternal;
ar & CreateNVP(matGramInternal, "matGramInternal");
}
else
{
ar & CreateNVP(const_cast<arma::mat&>(*matGram), "matGramInternal");
}
ar & CreateNVP(matUtriCholFactor, "matUtriCholFactor");
ar & CreateNVP(useCholesky, "useCholesky");
ar & CreateNVP(lasso, "lasso");
ar & CreateNVP(lambda1, "lambda1");
ar & CreateNVP(elasticNet, "elasticNet");
ar & CreateNVP(lambda2, "lambda2");
ar & CreateNVP(tolerance, "tolerance");
ar & CreateNVP(betaPath, "betaPath");
ar & CreateNVP(lambdaPath, "lambdaPath");
ar & CreateNVP(activeSet, "activeSet");
ar & CreateNVP(isActive, "isActive");
ar & CreateNVP(ignoreSet, "ignoreSet");
ar & CreateNVP(isIgnored, "isIgnored");
}
} // namespace regression
} // namespace mlpack
#endif
| {
"content_hash": "29175e06f6c1e612914d507d4696c1a6",
"timestamp": "",
"source": "github",
"line_count": 60,
"max_line_length": 77,
"avg_line_length": 27.916666666666668,
"alnum_prop": 0.6949253731343283,
"repo_name": "KaimingOuyang/HPC-K-Means",
"id": "b095ce1b2828f31add02a7fb6f044a3050462506",
"size": "1675",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/mlpack/methods/lars/lars_impl.hpp",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Assembly",
"bytes": "609"
},
{
"name": "C",
"bytes": "18803878"
},
{
"name": "C++",
"bytes": "113300862"
},
{
"name": "CMake",
"bytes": "433056"
},
{
"name": "Cuda",
"bytes": "26751"
},
{
"name": "FORTRAN",
"bytes": "394128"
},
{
"name": "Groff",
"bytes": "677565"
},
{
"name": "HTML",
"bytes": "1413540"
},
{
"name": "M4",
"bytes": "1204"
},
{
"name": "Makefile",
"bytes": "787790"
},
{
"name": "Matlab",
"bytes": "17397"
},
{
"name": "Objective-C",
"bytes": "847314"
},
{
"name": "Perl",
"bytes": "11571"
},
{
"name": "Prolog",
"bytes": "3949"
},
{
"name": "Python",
"bytes": "26431"
},
{
"name": "Shell",
"bytes": "79099"
}
],
"symlink_target": ""
} |
<?php
/**
* 家族成员申请记录
* the last known user to change this file in the repository <$LastChangedBy: hexin $>
* @author He xin <hexin@pipi.cn>
* @version $Id: 2013-8-6 下午3:28:20 hexin $
* @package
*/
class FamilyMemberApplyRecordsModel extends PipiActiveRecord {
/**
*
* @param string $className
* @return FamilyMemberApplyRecordsModel
*/
public static function model($className = __CLASS__){
return parent::model($className);
}
public function tableName(){
return '{{family_member_apply_records}}';
}
public function getDbConnection(){
return Yii::app()->db_family;
}
/**
* 获取未审核的申请记录
* @param int $family_id
* @param int $apply_type 申请的身份,默认为全部身份
* @param int $pageSize
* @param int $page
* @param boolean $pageEnable
* @return array(list=>array, count=>int)
*/
public function getApplyList($family_id, $apply_type = -1, $pageEnable = true, $offset = 0, $limit = 10){
$criteria = $this->getCommandBuilder()->createCriteria();
$criteria->condition = 'family_id='.$family_id.' and status = 0'.($apply_type != -1 ? ' and apply_type = '.$apply_type : '');
$return = array('list' => array(), 'count' => 0);
if($pageEnable){
$return['count'] = $this->count($criteria);
// $criteria->offset = $offset;
// $criteria->limit = $limit;
$pages=new CPagination($return['count']);
$pages->pageSize = $limit;
$pages->applyLimit($criteria);
$return['pages'] = $pages;
}
$return['list'] = $this->getCommandBuilder()->createFindCommand($this->tableName(), $criteria)->queryAll();
return $return;
}
/**
* 查询某些uid在某family的申请记录
* @param int $family_id
* @param array $uids
* @param int $status 申请状态
* @return array
*/
public function getApplyByUids($family_id, array $uids , $status = null){
if(empty($uids)) return array();
$criteria = $this->getCommandBuilder()->createCriteria();
$criteria->condition = 'family_id='.$family_id.' and uid in('.implode(',', $uids).')'.($status !== null ? ' and status = '.$status : '');
return $this->getCommandBuilder()->createFindCommand($this->tableName(), $criteria)->queryAll();
}
/**
* 批量更新申请记录状态
* @param int $family_id
* @param array $uids
* @param int $status
* @return boolean
*/
public function updateApplyStatus($family_id, array $uids, $status){
if(empty($uids)) return false;
$criteria = $this->getCommandBuilder()->createCriteria();
$criteria->condition = 'family_id='.$family_id.' and uid in ('.implode(',', $uids).')';
if($this->getCommandBuilder()->createUpdateCommand($this->tableName(), array('status' => $status), $criteria)->execute())
return true;
else return false;
}
}
| {
"content_hash": "43cf2dfc1597454a6404326e12781e0b",
"timestamp": "",
"source": "github",
"line_count": 82,
"max_line_length": 139,
"avg_line_length": 32.329268292682926,
"alnum_prop": 0.6457940399849114,
"repo_name": "klklmoon/pipishow",
"id": "22ed4ec1e7ad49f6445056cf26a6bc7e56e331d6",
"size": "2767",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "bll/model/family/FamilyMemberApplyRecordsModel.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ApacheConf",
"bytes": "42"
},
{
"name": "Batchfile",
"bytes": "1623"
},
{
"name": "CSS",
"bytes": "429510"
},
{
"name": "HTML",
"bytes": "20901"
},
{
"name": "JavaScript",
"bytes": "1270724"
},
{
"name": "PHP",
"bytes": "22607626"
},
{
"name": "Shell",
"bytes": "916"
}
],
"symlink_target": ""
} |
package com.cinchapi.concourse.data.transform;
import java.util.Map;
import java.util.Set;
import java.util.function.Supplier;
import com.cinchapi.common.collect.lazy.LazyTransformSet;
import com.cinchapi.concourse.data.Column;
import com.cinchapi.concourse.data.Row;
import com.cinchapi.concourse.thrift.TObject;
import com.cinchapi.concourse.util.Conversions;
import com.cinchapi.concourse.util.Convert;
import com.cinchapi.concourse.util.PrettyLinkedHashMap;
/**
* A {@link Row} based on a {@link TObject} result set, that transforms
* values on the fly.
*
* @author Jeff Nelson
*/
public abstract class DataColumn<F, T>
extends PrettyTransformMap<Long, Long, F, T> implements
Column<T> {
/**
* Return a {@link DataColumn} that contains multi-valued cells of
* {@link TObject} values that are converted to their Java equivalents.
*
* @param key
* @param data
* @return the {@link DataColumn}
*/
public static <T> DataColumn<Set<TObject>, Set<T>> multiValued(String key,
Map<Long, Set<TObject>> data) {
return new MultiValuedColumn<>(key, data);
}
/**
* Return a {@link DataColumn} that contains single-valued cells of
* {@link TObject} values that are converted to their Java equivalents.
*
* @param key
* @param data
* @return the {@link DataColumn}
*/
public static <T> DataColumn<TObject, T> singleValued(String key,
Map<Long, TObject> data) {
return new SingleValuedColumn<>(key, data);
}
/**
* The key to which values are implicitly associated.
*/
private final String key;
/**
* Construct a new instance.
*
* @param data
*/
private DataColumn(String key, Map<Long, F> data) {
super(data);
this.key = key;
}
@Override
protected Supplier<Map<Long, T>> $prettyMapSupplier() {
return () -> PrettyLinkedHashMap.create("Record", key);
}
@Override
protected Long transformKey(Long key) {
return key;
}
/**
* A {@link DataColumn} for multi-valued cells.
*
* @author Jeff Nelson
*/
private static class MultiValuedColumn<T>
extends DataColumn<Set<TObject>, Set<T>> {
/**
* Construct a new instance.
*
* @param key
* @param data
*/
protected MultiValuedColumn(String key, Map<Long, Set<TObject>> data) {
super(key, data);
}
@Override
protected Set<T> transformValue(Set<TObject> value) {
return LazyTransformSet.of(value, Conversions.thriftToJavaCasted());
}
}
/**
* A {@link DataColumn} for single-valued cells.
*
* @author Jeff Nelson
*/
private static class SingleValuedColumn<T> extends DataColumn<TObject, T> {
/**
* Construct a new instance.
*
* @param key
* @param data
*/
protected SingleValuedColumn(String key, Map<Long, TObject> data) {
super(key, data);
}
@SuppressWarnings("unchecked")
@Override
protected T transformValue(TObject value) {
return (T) Convert.thriftToJava(value);
}
}
}
| {
"content_hash": "bbe906e4a91d0616acc95f1d75fb759d",
"timestamp": "",
"source": "github",
"line_count": 127,
"max_line_length": 80,
"avg_line_length": 25.992125984251967,
"alnum_prop": 0.6049681914571342,
"repo_name": "cinchapi/concourse",
"id": "80cfa7d030aca9889e760f5bcf4040ea52930d87",
"size": "3902",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "concourse-driver-java/src/main/java/com/cinchapi/concourse/data/transform/DataColumn.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "6985"
},
{
"name": "Dockerfile",
"bytes": "2088"
},
{
"name": "Groovy",
"bytes": "160268"
},
{
"name": "HTML",
"bytes": "36688"
},
{
"name": "Java",
"bytes": "16299314"
},
{
"name": "Makefile",
"bytes": "123"
},
{
"name": "PHP",
"bytes": "227353"
},
{
"name": "Python",
"bytes": "178740"
},
{
"name": "Roff",
"bytes": "47944"
},
{
"name": "Ruby",
"bytes": "263785"
},
{
"name": "Shell",
"bytes": "134175"
},
{
"name": "Smarty",
"bytes": "1323"
},
{
"name": "Thrift",
"bytes": "273789"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_51) on Wed Apr 09 19:17:43 EEST 2014 -->
<title>org.apps8os.trafficsense Class Hierarchy</title>
<meta name="date" content="2014-04-09">
<link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="org.apps8os.trafficsense Class Hierarchy";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li>Use</li>
<li class="navBarCell1Rev">Tree</li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/google/android/gms/package-tree.html">Prev</a></li>
<li><a href="../../../org/apps8os/trafficsense/android/package-tree.html">Next</a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apps8os/trafficsense/package-tree.html" target="_top">Frames</a></li>
<li><a href="package-tree.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 class="title">Hierarchy For Package org.apps8os.trafficsense</h1>
<span class="strong">Package Hierarchies:</span>
<ul class="horizontal">
<li><a href="../../../overview-tree.html">All Packages</a></li>
</ul>
</div>
<div class="contentContainer">
<h2 title="Class Hierarchy">Class Hierarchy</h2>
<ul>
<li type="circle">java.lang.Object
<ul>
<li type="circle">org.apps8os.trafficsense.<a href="../../../org/apps8os/trafficsense/BuildConfig.html" title="class in org.apps8os.trafficsense"><span class="strong">BuildConfig</span></a></li>
<li type="circle">org.apps8os.trafficsense.<a href="../../../org/apps8os/trafficsense/R.html" title="class in org.apps8os.trafficsense"><span class="strong">R</span></a></li>
<li type="circle">org.apps8os.trafficsense.<a href="../../../org/apps8os/trafficsense/R.html" title="class in org.apps8os.trafficsense"><span class="strong">R</span></a></li>
<li type="circle">org.apps8os.trafficsense.<a href="../../../org/apps8os/trafficsense/R.html" title="class in org.apps8os.trafficsense"><span class="strong">R</span></a></li>
<li type="circle">org.apps8os.trafficsense.<a href="../../../org/apps8os/trafficsense/R.attr.html" title="class in org.apps8os.trafficsense"><span class="strong">R.attr</span></a></li>
<li type="circle">org.apps8os.trafficsense.<a href="../../../org/apps8os/trafficsense/R.color.html" title="class in org.apps8os.trafficsense"><span class="strong">R.color</span></a></li>
<li type="circle">org.apps8os.trafficsense.<a href="../../../org/apps8os/trafficsense/R.drawable.html" title="class in org.apps8os.trafficsense"><span class="strong">R.drawable</span></a></li>
<li type="circle">org.apps8os.trafficsense.<a href="../../../org/apps8os/trafficsense/R.id.html" title="class in org.apps8os.trafficsense"><span class="strong">R.id</span></a></li>
<li type="circle">org.apps8os.trafficsense.<a href="../../../org/apps8os/trafficsense/R.integer.html" title="class in org.apps8os.trafficsense"><span class="strong">R.integer</span></a></li>
<li type="circle">org.apps8os.trafficsense.<a href="../../../org/apps8os/trafficsense/R.layout.html" title="class in org.apps8os.trafficsense"><span class="strong">R.layout</span></a></li>
<li type="circle">org.apps8os.trafficsense.<a href="../../../org/apps8os/trafficsense/R.string.html" title="class in org.apps8os.trafficsense"><span class="strong">R.string</span></a></li>
<li type="circle">org.apps8os.trafficsense.<a href="../../../org/apps8os/trafficsense/R.style.html" title="class in org.apps8os.trafficsense"><span class="strong">R.style</span></a></li>
<li type="circle">org.apps8os.trafficsense.<a href="../../../org/apps8os/trafficsense/R.styleable.html" title="class in org.apps8os.trafficsense"><span class="strong">R.styleable</span></a></li>
<li type="circle">org.apps8os.trafficsense.<a href="../../../org/apps8os/trafficsense/TrafficsenseContainer.html" title="class in org.apps8os.trafficsense"><span class="strong">TrafficsenseContainer</span></a></li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li>Class</li>
<li>Use</li>
<li class="navBarCell1Rev">Tree</li>
<li><a href="../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../com/google/android/gms/package-tree.html">Prev</a></li>
<li><a href="../../../org/apps8os/trafficsense/android/package-tree.html">Next</a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apps8os/trafficsense/package-tree.html" target="_top">Frames</a></li>
<li><a href="package-tree.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
</body>
</html>
| {
"content_hash": "e7c9ef33363ca1bbb8e6510a81244f72",
"timestamp": "",
"source": "github",
"line_count": 141,
"max_line_length": 214,
"avg_line_length": 48.04964539007092,
"alnum_prop": 0.6571217712177122,
"repo_name": "apps8os/trafficsense",
"id": "4f270a0e6cb920ea57a822cd1e49db86231df6b7",
"size": "6775",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "doc/org/apps8os/trafficsense/package-tree.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "23014"
},
{
"name": "Java",
"bytes": "207377"
},
{
"name": "JavaScript",
"bytes": "11677"
},
{
"name": "Python",
"bytes": "882"
}
],
"symlink_target": ""
} |
package com.mc.hibernate.memcached;
public interface MemcacheClientFactory {
Memcache createMemcacheClient() throws Exception;
}
| {
"content_hash": "b04caf64bb67d26b5827d263dd88ce9f",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 53,
"avg_line_length": 15.333333333333334,
"alnum_prop": 0.7898550724637681,
"repo_name": "mihaicostin/hibernate-l2-memcached",
"id": "ba6adb41cb43a9b052d23bc91998df9e38e79e7f",
"size": "750",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/com/mc/hibernate/memcached/MemcacheClientFactory.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "82510"
},
{
"name": "Shell",
"bytes": "29"
}
],
"symlink_target": ""
} |
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
| {
"content_hash": "efead75dde4dd0af602566ee7e2e8457",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 60,
"avg_line_length": 16.857142857142858,
"alnum_prop": 0.7796610169491526,
"repo_name": "borjaIgartua/StrategyiOSExample",
"id": "4c063a069920a3cc3f954d1d0844a709b37c6427",
"size": "274",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "StragetyExample/AppDelegate.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Objective-C",
"bytes": "17022"
}
],
"symlink_target": ""
} |
if Rails.application.config.activeadmin_associations.autocomplete_models
models = Rails.application.config.activeadmin_associations.autocomplete_models.join('|')
Rails.application.routes.draw do
scope :admin do
get '/autocomplete/:model' => 'autocomplete#index', :model => /(#{models})/,
:defaults => { :format => 'json' }
end
end
end
| {
"content_hash": "fa7b736ae0dad87741412e37ea5d35ac",
"timestamp": "",
"source": "github",
"line_count": 9,
"max_line_length": 90,
"avg_line_length": 40.333333333333336,
"alnum_prop": 0.696969696969697,
"repo_name": "BookBub/active_admin_associations",
"id": "854ccaa12a8253d332b693f740f4275d78a238f4",
"size": "363",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "config/routes.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1130"
},
{
"name": "CoffeeScript",
"bytes": "29"
},
{
"name": "HTML",
"bytes": "5287"
},
{
"name": "JavaScript",
"bytes": "908"
},
{
"name": "Ruby",
"bytes": "74878"
}
],
"symlink_target": ""
} |
var request = require('request');
var apiOptions = {
server: 'http://localhost:3000'
};
/*if(process.env.NODE_ENV === 'production'){;
apiOptions.server = "https://wishuwerebeer.herokuapp.com"
}*/
// response placeholder
var sendJsonResponse = function(res, status, content){
res.status(status);
res.json(content);
};
// home page renderization
var renderHomepage = function(req,res,responseBody){
res.render('beers-list', {
title: 'Wish U Were Beer',
pageHeader:{
title: "Wish U Were Beer",
subtitle: "A pint for your thoughts"
},
beers: responseBody,
tapIt: "Tap It!"
});
};
/* Get Home Page */
module.exports.homeList = function(req, res){
//renderHomepage(req, res);
var requestOptions, path;
path = '/api/beers';
requestOptions = {
url: apiOptions.server + path,
method: "GET",
json: {}
};
request(
requestOptions,
function(err, response, body){
renderHomepage(req, res, body);
}
);
};
// callback function for beer information and refiew page
var getBeerInfo = function(req, res, callback){
var requestOptions, path;
path = '/api/beers/' + req.params.beerid;
requestOptions = {
url: apiOptions.server + path,
method: 'GET',
json: {}
};
request(
requestOptions,
function(err, response, body){
var beer = body;
if(response.statusCode == 200){
callback(req,res,beer);
}else{
sendJsonResponse(res, 404, error);
}
}
);
};
var renderBeerPage = function(req, res, beerDetail){
res.render('beer-info', {
beer:beerDetail,
title: beerDetail.name
});
};
/* Get Beer Info Page */
module.exports.beerInfo = function(req, res, callback){
getBeerInfo(req, res, function(req, res, resData){
renderBeerPage(req, res, resData);
});
};
var renderBeerReviewForm = function(req, res, beerDetail){
res.render('beer-review-form', {
beer: beerDetail,
title: beerDetail.name
});
}
/* Get Add Review Page */
module.exports.addReview = function(req, res, callback){
getBeerInfo(req, res, function(req, res, resData){
renderBeerReviewForm(req, res, resData);
});
};
/* Post Review */
module.exports.doAddReview = function(req, res){
var requestOptions, path, beerid, postData;
beerid = req.params.beerid;
path = "/api/beers/" + beerid + "/reviews";
postData = {
author: req.body.name,
rating: parseInt(req.body.rating, 10),
review: req.body.review
};
requestOptions = {
url : apiOptions.server + path,
method: "POST",
json: postData
};
request(
requestOptions,
function(err, response, body){
if(response.statusCode === 201){
res.redirect('/beer/' + beerid);
}else{
res.redirect(apiOptions.server + "/error");
}
}
);
};
module.exports.getLayout = function(req,res){
res.render('layout');
}; | {
"content_hash": "44864ce76e69f45cc362a7551708df8f",
"timestamp": "",
"source": "github",
"line_count": 129,
"max_line_length": 61,
"avg_line_length": 24.565891472868216,
"alnum_prop": 0.5736825497002209,
"repo_name": "brabmaio/wishuwerebeer",
"id": "056fbbc08c7c0ad97190d3058825936c893d25d1",
"size": "3169",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app_server/controllers/beers.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "2901"
},
{
"name": "HTML",
"bytes": "28519"
},
{
"name": "JavaScript",
"bytes": "50902"
}
],
"symlink_target": ""
} |
import * as apid from '../../../../../api';
export default interface IStorageApiModel {
getInfo(): Promise<apid.VersionInfo>;
}
| {
"content_hash": "eaf54ba9f1bfc1799acd64b6f8dca1bf",
"timestamp": "",
"source": "github",
"line_count": 5,
"max_line_length": 43,
"avg_line_length": 26.6,
"alnum_prop": 0.6466165413533834,
"repo_name": "l3tnun/EPGStation",
"id": "c3dd7a2e11826806ba7e05e488dccd3d22a33dcf",
"size": "133",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "client/src/model/api/version/IVersionApiModel.ts",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "1026"
},
{
"name": "JavaScript",
"bytes": "5904"
},
{
"name": "TypeScript",
"bytes": "1386848"
},
{
"name": "Vue",
"bytes": "538019"
}
],
"symlink_target": ""
} |
package com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation;
import com.rodrigodev.xgen4j.test.message.descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation.RootException.ExceptionType;
import java.util.Optional;
/**
* Autogenerated by XGen4J on January 1, 0001.
*/
public class ExceptionInfo {
final private Class<? extends RootException> clazz;
final private Optional<ExceptionType> type;
private ExceptionInfo(Optional<ExceptionType> type, Class<? extends RootException> clazz) {
this.type = type;
this.clazz = clazz;
}
public ExceptionInfo(Class<? extends RootException> clazz) {
this(Optional.<ExceptionType>empty(), clazz);
}
public ExceptionInfo(ExceptionType type, Class<? extends RootException> clazz) {
this(Optional.of(type), clazz);
}
public Class<? extends RootException> clazz() {
return clazz;
}
public Optional<ExceptionType> type() {
return type;
}
}
| {
"content_hash": "7ba19be1f5f8c5a59799e803875ac3b3",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 154,
"avg_line_length": 31.5,
"alnum_prop": 0.7329598506069094,
"repo_name": "RodrigoQuesadaDev/XGen4J",
"id": "0322e9e93dbb926a0fe403464e146371f7e6fcb5",
"size": "1071",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "xgen4j/src/test-gen/java/com/rodrigodev/xgen4j/test/message/descriptionWithCustomObjectThatGeneratesTheMessageCanBeUsed_inheritedImplementation/ExceptionInfo.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "1981849"
}
],
"symlink_target": ""
} |
<?php
namespace Epsilon\Router;
defined("EPSILON_EXEC") or die();
use App\Config;
use Epsilon\Factory;
use Epsilon\IO\Input;
use Epsilon\Object\Object;
use PDO;
use PDOException;
/**
* Class Router
*
* @package Epsilon\Router
*/
abstract class Router extends Object
{
protected static $Instance;
protected $ApplicationID;
protected $defaultRouteMap;
protected $arRouteMaps;
protected $Route;
protected $CurrentMenuID;
protected $strRoute;
/**
* @param array $Options
*/
public function __construct($Options = [])
{
parent::__construct($Options);
$this->arRouteMaps = $this->getRouteMaps();
$this->defaultRouteMap = $this->getDefaultRouteMap();
}
/**
* @param string $ApplicationID
*/
public static function getInstance($ApplicationID)
{
if (!isset(self::$Instance)) {
$Class = "\\App\\{$ApplicationID}Router";
if (!class_exists($Class)) {
Factory::getLogger()->emergency('RouterException: Can\'t read Router: {Router}', [
'Router' => $ApplicationID . 'Router'
]);
}
self::$Instance = new $Class([
'ApplicationID' => $ApplicationID
]);
}
return self::$Instance;
}
/**
* Define how the structure of the route is
* e.g: URI: schema://domain/index.php/Component/Action
* e.g: URI: schema://domain/index.php/Component/Action/ID
* e.g: URI: schema://domain/index.php/Component/Controller/Action/ID
* Component, Action and ID are mandatory
*
* @return array
*/
public function getRouteMaps()
{
return [
'<Component>/<Action>',
'<Component>/<Action>/<ID>',
'<Component>/<Controller>/<Action>/<ID>'
];
}
/**
* @return array
*/
abstract protected function getDefaultRouteMap();
/**
* @return array
*/
abstract protected function getRules();
/**
* @param $Key
* @return mixed
*/
public function getRoute($Key = null)
{
if (!isset($this->Route)) {
$this->route();
}
if (!is_null($Key)) {
$Route = isset($this->Route[$Key]) ? $this->Route[$Key] : null;
} else {
$Route = $this->Route;
}
return $Route;
}
/**
* @return string
*/
public function getRouteString()
{
if (!isset($this->Route)) {
if (Factory::getApplication()->isCLI()) {
$strRoute = Factory::getApplication()->getCLIOption('route');
} else {
$strRoute = Factory::getURI()->getInversePath();
}
if (strpos($strRoute, '/') === 0) {
$strRoute = substr($strRoute, 1);
}
$this->strRoute = $strRoute;
}
return $this->strRoute;
}
/**
* Creates the route to according to the URI
*/
public function route()
{
if (!isset($this->Route)) {
$strRoute = $this->getRouteString();
$Route = $this->getDefaultRouteMap();
$Params = [];
if (strlen($strRoute) >= 3) {
if ($Rules = $this->getRules()) {
foreach ($Rules as $rKey => $rV) {
if (preg_match($this->getRuleRegex($rKey), $strRoute)) {
$Params = $this->getMapFromRule($rKey, $strRoute);
$strRoute = $rV;
break;
}
}
}
foreach ($this->getRouteMaps() as $Map) {
if (substr_count($Map, '/') === substr_count($strRoute, '/')) {
$Route = [$Map => $strRoute];
}
}
}
$arMap = explode('/', Input::cleanVar(array_keys($Route)[0]));
$arPath = explode('/', Input::cleanVar(array_values($Route)[0]));
$cMap = count($arMap);
for ($f = 0; $f < $cMap; $f++) {
$this->Route[$arMap[$f]] = $arPath[$f];
}
foreach ($Params as $pKey => $pValue) {
$this->Route[$pKey] = $pValue;
}
if (!$this->Route) {
Factory::getLogger()->emergency('Can\'t Route Application exiting...');
}
}
}
/**
* @param string $Rule
* @return string
*/
private function getRuleRegex($Rule)
{
$Rule = explode('/', $Rule);
foreach ($Rule as &$item) {
if (strpos($item, ':')) {
$item = substr($item, strpos($item, ':') + 1, -1);
}
}
unset($item);
return '/' . str_replace('/', '\/', implode('/', $Rule)) . '/';
}
/**
* @param $Rule
* @param $Path
* @return array
*/
private function getMapFromRule($Rule, $Path)
{
$Params = [];
$Rule = explode('/', $Rule);
$Path = explode('/', $Path);
for ($f = 0; $f < count($Rule); $f++) {
if (strpos($Rule[$f], ':')) {
$Params[(substr($Rule[$f], 1, strpos($Rule[$f], ':') - 1))] = $Path[$f];
}
}
return $Params;
}
/**
* @param null $Route
* @param array $Parameters
* @param null $Fragment
* @return string
*/
public function getURL($Route = null, $Parameters = [], $Fragment = null)
{
$eURI = Factory::getURI();
$Query = null;
$arQuery = $Parameters;
if (($Rules = $this->getRules()) && is_array($Parameters)) {
$rRoute = $Route;
$HighestMatch = 0;
foreach ($Rules as $rKey => $rValue) {
$Match = 0;
if ($rValue == $rRoute) {
$replace = [];
foreach (explode('/', $rKey) as $item) {
if (strpos($item, ':')) {
$Key = substr($item, 1, strpos($item, ':') - 1);
if ((isset($Parameters[$Key]))) {
$replace[$item] = $Parameters[$Key];
unset($arQuery[$Key]);
$Match++;
}
}
}
$r = str_replace(array_keys($replace), array_values($replace), $rKey);
if (preg_match($this->getRuleRegex($rKey), $r)) {
if ($Match >= $HighestMatch) {
$HighestMatch = $Match;
$Route = $r;
}
}
}
}
}
if (!Config::PRETTY_URL && $Route) {
$Route = "?r={$Route}";
} elseif (strpos($Route, '/') !== 0 && $Route) {
$Route = '/' . $Route;
}
foreach ($arQuery as $Key => $Value) {
if (!$Query && Config::PRETTY_URL) {
$Query = '?' . $Key . '=' . $Value;
} else {
$Query = '&' . $Key . '=' . $Value;
}
}
if (is_string($Fragment)) {
$Fragment = "#{$Fragment}";
}
return $eURI->getRelativePath() . ((Config::SHOW_SCRIPT) ? 'index.php' : null) . $Route . $Query . $Fragment;
}
/**
* TODO: rewrite method
*
* @return mixed
*/
public function getCurrentMenuID()
{
if (!isset($this->CurrentMenuID)) {
$dbh = Factory::getDBH();
$App = Factory::getApplication();
$ComponentID = $App->get('Component')->get('ID');
$ApplicationID = $App->getApplicationID();
$URL = $this->getRouteString();
$ssql = 'SELECT m.MenuID AS MenuID FROM Menu m
INNER JOIN MenuBundle mb ON mb.MenuBundleID = m.MenuBundleID
WHERE (mb.ApplicationID = :AppID AND m.URL LIKE :URL) OR m.ComponentID = :ComponentID';
$stmt = $dbh->prepare($ssql);
try {
$this->bindMenuValues($stmt, $ApplicationID, $ComponentID, $URL, $MenuID);
$stmt->execute();
$stmt->fetch();
$sections = count(array_filter(explode('/', $URL)));
if ($sections == 5 && !$stmt->rowCount()) {
$URL = explode('/', $URL);
array_pop($URL);
$sections--;
$URL = implode('/', $URL) . '/';
$stmt = $dbh->prepare($ssql);
$this->bindMenuValues($stmt, $ApplicationID, $ComponentID, $URL, $MenuID);
$stmt->execute();
}
if ($sections == 4 && !$stmt->rowCount()) {
$URL = explode('/', $URL);
array_pop($URL);
$URL = implode('/', $URL) . '/';
$stmt = $dbh->prepare($ssql);
$this->bindMenuValues($stmt, $ApplicationID, $ComponentID, $URL, $MenuID);
$stmt->execute();
}
if ($stmt->rowCount() == 1) {
$stmt->fetch();
$this->CurrentMenuID = $MenuID;
}
} catch (PDOException $e) {
$dbh->catchException($e, $stmt->queryString);
}
}
return $this->CurrentMenuID;
}
/**
* @param \PDOStatement $stmt
* @param $AppID
* @param $ComponentID
* @param $URL
* @param $MenuID
*/
public function bindMenuValues($stmt, $AppID, $ComponentID, $URL, & $MenuID)
{
$stmt->bindValue(':AppID', $AppID, PDO::PARAM_STR);
$stmt->bindValue(':ComponentID', $ComponentID, PDO::PARAM_STR);
$stmt->bindValue(':URL', "%$URL", PDO::PARAM_STR);
$stmt->bindColumn('MenuID', $MenuID, PDO::PARAM_INT);
}
}
| {
"content_hash": "258d8ae5f01723f77958dfc2ab3ecd7f",
"timestamp": "",
"source": "github",
"line_count": 357,
"max_line_length": 117,
"avg_line_length": 28.714285714285715,
"alnum_prop": 0.43186030631157935,
"repo_name": "falmar/Epsilon",
"id": "951f80608e28c97149021a08b55d62168516a2e0",
"size": "10530",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Libraries/Epsilon/Router/Router.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "111"
},
{
"name": "PHP",
"bytes": "208864"
}
],
"symlink_target": ""
} |
ACCEPTED
#### According to
International Plant Names Index
#### Published in
null
#### Original name
null
### Remarks
null | {
"content_hash": "f653384867250510a52fab16542761b0",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 31,
"avg_line_length": 9.692307692307692,
"alnum_prop": 0.7063492063492064,
"repo_name": "mdoering/backbone",
"id": "9050e94f91d4a6a970f3053395361833d54af4b2",
"size": "178",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Magnoliophyta/Magnoliopsida/Santalales/Opiliaceae/Rhopalopilia/Rhopalopilia hallei/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
<?php
namespace Zym\Bundle\UserBundle\Model;
/**
* Interface FullNameInterface
*
* For users that support the ability to get their full name.
*
* @package Zym\Bundle\UserBundle\Model
* @author Geoffrey Tran <geoffrey.tran@gmail.com>
*/
interface FullNameInterface
{
/**
* Get the user's full name
*
* @return string
*/
public function getFullName();
} | {
"content_hash": "aaf48b0d7c90268ec882a73469f4db2d",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 61,
"avg_line_length": 16.217391304347824,
"alnum_prop": 0.6970509383378016,
"repo_name": "geoffreytran/zym",
"id": "4d45f125051982770cabba13ea4602d16b7a913a",
"size": "675",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/Zym/Bundle/UserBundle/Model/FullNameInterface.php",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "PHP",
"bytes": "993710"
},
{
"name": "Perl",
"bytes": "1474"
}
],
"symlink_target": ""
} |
package org.kie.workbench.common.stunner.svg.gen.translator.impl;
import org.kie.workbench.common.stunner.svg.gen.exception.TranslatorException;
import org.kie.workbench.common.stunner.svg.gen.model.ViewDefinition;
import org.kie.workbench.common.stunner.svg.gen.model.impl.ViewBoxDefinitionImpl;
import org.kie.workbench.common.stunner.svg.gen.translator.css.SVGAttributeParser;
/**
* A really basic parser implementation for an svg viewBox attribute.
*/
public class SVGViewBoxTranslator {
public static ViewDefinition.ViewBoxDefinition translate(final String raw) throws TranslatorException {
final String[] parsed = parse(raw);
return build(parsed[0],
parsed[1],
parsed[2],
parsed[3]);
}
private static String[] parse(final String raw) throws TranslatorException {
final String[] p = _parse(raw);
if (p.length != 4) {
throw new TranslatorException("ViewBox definition with value [" + raw + "] is not valid.");
}
return p;
}
private static String[] _parse(final String raw) {
return raw.replaceAll(",",
" ").split(" ");
}
private static ViewDefinition.ViewBoxDefinition build(final String x,
final String y,
final String width,
final String height) {
return new ViewBoxDefinitionImpl(SVGAttributeParser.toPixelValue(x,
0d),
SVGAttributeParser.toPixelValue(y,
0d),
SVGAttributeParser.toPixelValue(width),
SVGAttributeParser.toPixelValue(height));
}
}
| {
"content_hash": "b81a350f0a8352e4a87967df75b5191b",
"timestamp": "",
"source": "github",
"line_count": 47,
"max_line_length": 107,
"avg_line_length": 42.702127659574465,
"alnum_prop": 0.5311410064773293,
"repo_name": "manstis/kie-wb-common",
"id": "74164835f085cf9634d379884cf31db86ecc9632",
"size": "2626",
"binary": false,
"copies": "11",
"ref": "refs/heads/main",
"path": "kie-wb-common-stunner/kie-wb-common-stunner-extensions/kie-wb-common-stunner-svg/kie-wb-common-stunner-svg-gen/src/main/java/org/kie/workbench/common/stunner/svg/gen/translator/impl/SVGViewBoxTranslator.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "2591"
},
{
"name": "CSS",
"bytes": "171885"
},
{
"name": "Dockerfile",
"bytes": "210"
},
{
"name": "FreeMarker",
"bytes": "38625"
},
{
"name": "GAP",
"bytes": "86275"
},
{
"name": "HTML",
"bytes": "448968"
},
{
"name": "Java",
"bytes": "51124165"
},
{
"name": "JavaScript",
"bytes": "34587"
},
{
"name": "Shell",
"bytes": "905"
},
{
"name": "TypeScript",
"bytes": "26851"
},
{
"name": "VBA",
"bytes": "86549"
},
{
"name": "XSLT",
"bytes": "2327"
}
],
"symlink_target": ""
} |
<!doctype html>
<html class="theme-next pisces use-motion">
<head>
<meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>
<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />
<link href="/vendors/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css" />
<link href="//fonts.googleapis.com/css?family=Lato:300,300italic,400,400italic,700,700italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">
<link href="/vendors/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" type="text/css" />
<link href="/css/main.css?v=5.0.1" rel="stylesheet" type="text/css" />
<meta name="keywords" content="Hexo, NexT" />
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.0.1" />
<meta name="description" content="以在家上班为目标">
<meta property="og:type" content="website">
<meta property="og:title" content="WDBLOG">
<meta property="og:url" content="http://www.wdblog.xyz/tags/显卡/index.html">
<meta property="og:site_name" content="WDBLOG">
<meta property="og:description" content="以在家上班为目标">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="WDBLOG">
<meta name="twitter:description" content="以在家上班为目标">
<script type="text/javascript" id="hexo.configuration">
var NexT = window.NexT || {};
var CONFIG = {
scheme: 'Pisces',
sidebar: {"position":"left","display":"always"},
fancybox: true,
motion: true,
duoshuo: {
userId: 0,
author: '博主'
}
};
</script>
<title> 标签: 显卡 | WDBLOG </title>
</head>
<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">
<div class="container one-collumn sidebar-position-left ">
<div class="headband"></div>
<header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-meta ">
<div class="custom-logo-site-title">
<a href="/" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<span class="site-title">WDBLOG</span>
<span class="logo-line-after"><i></i></span>
</a>
</div>
<p class="site-subtitle"></p>
</div>
<div class="site-nav-toggle">
<button>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
<span class="btn-bar"></span>
</button>
</div>
<nav class="site-nav">
<ul id="menu" class="menu">
<li class="menu-item menu-item-home">
<a href="/." rel="section">
<i class="menu-item-icon fa fa-fw fa-home"></i> <br />
首页
</a>
</li>
<li class="menu-item menu-item-categories">
<a href="/categories" rel="section">
<i class="menu-item-icon fa fa-fw fa-th"></i> <br />
分类
</a>
</li>
<li class="menu-item menu-item-about">
<a href="/about" rel="section">
<i class="menu-item-icon fa fa-fw fa-user"></i> <br />
关于
</a>
</li>
<li class="menu-item menu-item-archives">
<a href="/archives" rel="section">
<i class="menu-item-icon fa fa-fw fa-archive"></i> <br />
归档
</a>
</li>
<li class="menu-item menu-item-tags">
<a href="/tags" rel="section">
<i class="menu-item-icon fa fa-fw fa-tags"></i> <br />
标签
</a>
</li>
<li class="menu-item menu-item-notes">
<a href="/notes" rel="section">
<i class="menu-item-icon fa fa-fw fa-sticky-note"></i> <br />
便利贴
</a>
</li>
</ul>
</nav>
</div>
</header>
<main id="main" class="main">
<div class="main-inner">
<div class="content-wrap">
<div id="content" class="content">
<div id="posts" class="posts-collapse">
<div class="collection-title">
<h2 >
显卡
<small>标签</small>
</h2>
</div>
<article class="post post-type-normal" itemscope itemtype="http://schema.org/Article">
<header class="post-header">
<h1 class="post-title">
<a class="post-title-link" href="/2014/11/15/2014-11-15-7950_flash_efi/" itemprop="url">
<span itemprop="name">AMD HD7950 刷 efi</span>
</a>
</h1>
<div class="post-meta">
<time class="post-time" itemprop="dateCreated"
datetime="2014-11-15T14:26:42+08:00"
content="2014-11-15" >
11-15
</time>
</div>
</header>
</article>
</div>
</div>
</div>
<div class="sidebar-toggle">
<div class="sidebar-toggle-line-wrap">
<span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
<span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
</div>
</div>
<aside id="sidebar" class="sidebar">
<div class="sidebar-inner">
<section class="site-overview sidebar-panel sidebar-panel-active ">
<div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
<img class="site-author-image" itemprop="image"
src="http://i.imgur.com/fMwQDsN.jpg"
alt="wudaown" />
<p class="site-author-name" itemprop="name">wudaown</p>
<p class="site-description motion-element" itemprop="description">以在家上班为目标</p>
</div>
<nav class="site-state motion-element">
<div class="site-state-item site-state-posts">
<a href="/archives">
<span class="site-state-item-count">27</span>
<span class="site-state-item-name">日志</span>
</a>
</div>
<div class="site-state-item site-state-categories">
<a href="/categories">
<span class="site-state-item-count">13</span>
<span class="site-state-item-name">分类</span>
</a>
</div>
<div class="site-state-item site-state-tags">
<a href="/tags">
<span class="site-state-item-count">56</span>
<span class="site-state-item-name">标签</span>
</a>
</div>
</nav>
<div class="links-of-author motion-element">
<span class="links-of-author-item">
<a href="https://github.com/wudaown" target="_blank" title="Github">
<i class="fa fa-fw fa-globe"></i>
Github
</a>
</span>
<span class="links-of-author-item">
<a href="https://twitter.com/wudaown" target="_blank" title="Twitter">
<i class="fa fa-fw fa-twitter"></i>
Twitter
</a>
</span>
</div>
</section>
</div>
</aside>
</div>
</main>
<footer id="footer" class="footer">
<div class="footer-inner">
<div class="copyright" >
© 2014 -
<span itemprop="copyrightYear">2017</span>
<span class="with-love">
<i class="fa fa-heart"></i>
</span>
<span class="author" itemprop="copyrightHolder">wudaown</span>
</div>
<div class="powered-by">
由 <a class="theme-link" href="http://hexo.io">Hexo</a> 强力驱动
</div>
<div class="theme-info">
主题 -
<a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
NexT.Pisces
</a>
</div>
</div>
</footer>
<div class="back-to-top">
<i class="fa fa-arrow-up"></i>
</div>
</div>
<script type="text/javascript">
if (Object.prototype.toString.call(window.Promise) !== '[object Function]') {
window.Promise = null;
}
</script>
<script type="text/javascript" src="/vendors/jquery/index.js?v=2.1.3"></script>
<script type="text/javascript" src="/vendors/fastclick/lib/fastclick.min.js?v=1.0.6"></script>
<script type="text/javascript" src="/vendors/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>
<script type="text/javascript" src="/vendors/velocity/velocity.min.js?v=1.2.1"></script>
<script type="text/javascript" src="/vendors/velocity/velocity.ui.min.js?v=1.2.1"></script>
<script type="text/javascript" src="/vendors/fancybox/source/jquery.fancybox.pack.js?v=2.1.5"></script>
<script type="text/javascript" src="/js/src/utils.js?v=5.0.1"></script>
<script type="text/javascript" src="/js/src/motion.js?v=5.0.1"></script>
<script type="text/javascript" src="/js/src/affix.js?v=5.0.1"></script>
<script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.0.1"></script>
<script type="text/javascript" src="/js/src/bootstrap.js?v=5.0.1"></script>
<script type="text/javascript">
var disqus_shortname = 'wudaown';
var disqus_identifier = 'tags/显卡/index.html';
var disqus_title = '';
var disqus_url = '';
function run_disqus_script(disqus_script){
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/' + disqus_script;
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
}
run_disqus_script('count.js');
</script>
</body>
</html>
| {
"content_hash": "f0c46e13844627a511e320b0c17eee66",
"timestamp": "",
"source": "github",
"line_count": 526,
"max_line_length": 154,
"avg_line_length": 19.863117870722434,
"alnum_prop": 0.5222052067381318,
"repo_name": "wudaown/wudaown.github.io",
"id": "aff01f0ea011b4838863d26aa0b6f57eb928144b",
"size": "10594",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "tags/显卡/index.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "87868"
},
{
"name": "HTML",
"bytes": "1916367"
},
{
"name": "JavaScript",
"bytes": "41610"
}
],
"symlink_target": ""
} |
<?php
namespace Google\AdsApi\AdManager\v202202;
/**
* This file was generated from WSDL. DO NOT EDIT.
*/
class DestinationUrlType
{
const UNKNOWN = 'UNKNOWN';
const CLICK_TO_WEB = 'CLICK_TO_WEB';
const CLICK_TO_APP = 'CLICK_TO_APP';
const CLICK_TO_CALL = 'CLICK_TO_CALL';
const NONE = 'NONE';
}
| {
"content_hash": "2dc5216bf8496011b77e2cecf2322e85",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 50,
"avg_line_length": 17.944444444444443,
"alnum_prop": 0.6470588235294118,
"repo_name": "googleads/googleads-php-lib",
"id": "8a461bd04ca684389c1ea3546a6466374a5cfb5b",
"size": "323",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "src/Google/AdsApi/AdManager/v202202/DestinationUrlType.php",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "PHP",
"bytes": "11415914"
}
],
"symlink_target": ""
} |
package com.lhkbob.entreri.property;
import java.lang.annotation.*;
import java.util.*;
/**
* Collection
* ==========
*
* Collection is an attribute that exposes configuration options for properties that have types of {@link
* java.util.List}, {@link java.util.Map}, or {@link java.util.Set}. It can configure whether or not these
* collections are allowed to store null elements (verified by the component implementation). For
* value-semantics collections, it can specify the implementation of the collection to use. This is
* configuration is ignored for reference-semantic collections because the implementation can be chosen on a
* per-reference basis.
*
* Additionally, it can be used to explicitly declare the collection type of the property if the component
* type does not specify methods that implicitly define the type. It is an error to declare one collection
* type that conflicts with the implicitly defined collection types inferred from the other component
* methods.
*
* @author Michael Ludwig
*/
@Documented
@Attribute
@Target({ ElementType.METHOD, ElementType.PARAMETER })
@Retention(RetentionPolicy.RUNTIME)
public @interface Collection {
public static enum Type {
LIST,
SET,
MAP,
UNSPECIFIED
}
/**
* Override the list class used for value-semantics list properties. The returned list type must have a
* public default constructor. This is ignored if the property does not store value lists.
*
* @return The list implementation used
*/
Class<? extends List> listImpl() default ArrayList.class;
/**
* Override the set class used for value-semantics set properties. The returned set type must have a
* public default constructor. This is ignored if the property does not store value sets.
*
* @return The set implementation used
*/
Class<? extends Set> setImpl() default HashSet.class;
/**
* Override the map class used for value-semantics map properties. The returned map type must have a
* public default constructor. This is ignored if the property does not store value maps.
*
* @return The map implementation used
*/
Class<? extends Map> mapImpl() default HashMap.class;
/**
* Specify the policy for if the collection may hold null elements. This will automatically be enforced
* by the generated components (and is not a responsibility of the property implementations). Setter
* methods that set the entire collection at once are also validated. Maps will disallow or allow `null`
* keys and values together.
*
* @return True if null elements are okay, or false if a NullPointerException should be thrown by the
* component methods when a null element passed to the collection
*/
boolean allowNullElements() default true;
/**
* Declare the collection type of the property. If UNSPECIFIED is used (the default) the collection type
* is inferred from the other methods that reference the property. However, if other methods do not
* provide such a known collection type, this must be declared explicitly to one of SET, LIST, or MAP.
*
* @return The collection type of the property
*/
Type type() default Type.UNSPECIFIED;
}
| {
"content_hash": "eb1b8619f6edffc68389b2749f040923",
"timestamp": "",
"source": "github",
"line_count": 81,
"max_line_length": 108,
"avg_line_length": 40.75308641975309,
"alnum_prop": 0.71644956073917,
"repo_name": "antag99/entreri",
"id": "ab2708a39e79dfbe0838c7c1fa4b13f8b20944df",
"size": "4741",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/main/java/com/lhkbob/entreri/property/Collection.java",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "Java",
"bytes": "773337"
}
],
"symlink_target": ""
} |
START_ATF_NAMESPACE
typedef tagVersionedStream *LPVERSIONEDSTREAM;
END_ATF_NAMESPACE
| {
"content_hash": "ec278b9896194788d975132d1a3b3937",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 50,
"avg_line_length": 29.666666666666668,
"alnum_prop": 0.8314606741573034,
"repo_name": "goodwinxp/Yorozuya",
"id": "ed248ab30b4093394eaf7cbbc46c711fe368fb12",
"size": "275",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "library/ATF/LPVERSIONEDSTREAM.hpp",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "207291"
},
{
"name": "C++",
"bytes": "21670817"
}
],
"symlink_target": ""
} |
class Ray :public PhysicalBody, public sf::Drawable
{
const int TILE_SIZE = 64;
private:
virtual void draw(sf::RenderTarget & target, sf::RenderStates states) const;
public:
enum Side
{
Up,
Down,
Left,
Right
};
Ray(Side side);
~Ray();
///Sets Animator
void SetAnimator(Animator& animator);
int GetSide();
void SetRaySpriteSize(unsigned short size);
void SetPosition(float x, float y);
void Update(float dt);
private:
/// True - horizontal, false - vertical
bool m_orientation;
sf::Sprite m_sprite;
sf::Texture * m_texture;
Side m_side;
unsigned short m_size;
Animator* m_animator;
};
| {
"content_hash": "9dc45415d67bd2714e1ca1fb080c0d62",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 77,
"avg_line_length": 16.72972972972973,
"alnum_prop": 0.6946688206785138,
"repo_name": "PiGames/Bomberman",
"id": "8ca3f7b0acbeaa12489fa234962d6297071295d9",
"size": "732",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Bomberman/Ray.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C++",
"bytes": "98115"
},
{
"name": "Makefile",
"bytes": "1475"
}
],
"symlink_target": ""
} |
ROCKSDB_WARNING("This file was moved to rocksdb/utilities/db_ttl.h")
#include "rocksdb/utilities/db_ttl.h"
| {
"content_hash": "48ace9a8b19a4e52ee1c0172b7e3b8ab",
"timestamp": "",
"source": "github",
"line_count": 3,
"max_line_length": 68,
"avg_line_length": 36,
"alnum_prop": 0.7685185185185185,
"repo_name": "tizzybec/rocksdb",
"id": "e50746be46a160f53f698a609165df83eb57e3ef",
"size": "460",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "include/utilities/db_ttl.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "84125"
},
{
"name": "C++",
"bytes": "5071646"
},
{
"name": "CMake",
"bytes": "12515"
},
{
"name": "Java",
"bytes": "758396"
},
{
"name": "Makefile",
"bytes": "64322"
},
{
"name": "PHP",
"bytes": "19548"
},
{
"name": "Python",
"bytes": "4208"
},
{
"name": "Ruby",
"bytes": "662"
},
{
"name": "Shell",
"bytes": "50628"
}
],
"symlink_target": ""
} |
package nl.pvanassen.geckoboard.api.widget;
import java.awt.Color;
import java.io.IOException;
import nl.pvanassen.geckoboard.api.JsonTestHelper;
import nl.pvanassen.geckoboard.api.json.list.ListItem;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.JsonProcessingException;
import org.junit.Assert;
import org.junit.Test;
public class ListWidgetTest {
@Test
public void testJson() throws JsonProcessingException, IOException {
ListWidget widget = new ListWidget("1234");
ListItem item;
item = widget.createItem("TestText1");
item.setDescription("Desc1");
item.setLabelColor(Color.RED);
item.setLabelName("LabelName1");
item.setTitleHighlight(false);
item = widget.createItem("TestText2");
item.setLabelColor(Color.YELLOW);
item.setLabelName("LabelName2");
item = widget.createItem("TestText3");
item.setDescription("Desc3");
item.setTitleHighlight(true);
item = widget.createItem("TestText4");
JsonNode data = JsonTestHelper.getJsonFromWidget(widget);
Assert.assertNotNull(data.get("data"));
JsonNode node = data.get("data");
Assert.assertNull(node.get("widgetKey"));
Assert.assertTrue(node.isArray());
Assert.assertEquals(4, node.size());
JsonNode item1 = node.get(0);
Assert.assertEquals("TestText1", item1.get("title").get("text").asText());
Assert.assertEquals("false", item1.get("title").get("highlight").asText());
JsonNode item2 = node.get(1);
Assert.assertEquals("TestText2", item2.get("title").get("text").asText());
Assert.assertNull(item2.get("title").get("highlight"));
JsonNode item3 = node.get(2);
Assert.assertEquals("TestText3", item3.get("title").get("text").asText());
Assert.assertEquals("true", item3.get("title").get("highlight").asText());
JsonNode item4 = node.get(3);
Assert.assertEquals("TestText4", item4.get("title").get("text").asText());
Assert.assertNull(item4.get("title").get("highlight"));
}
}
| {
"content_hash": "4455d550181cad33223bf8614f8ae1ff",
"timestamp": "",
"source": "github",
"line_count": 64,
"max_line_length": 83,
"avg_line_length": 33.296875,
"alnum_prop": 0.660722665415298,
"repo_name": "scoyo/geckoboard-java-api",
"id": "e63df2efb81902d8903c4e47d8e79c28fa49f3e4",
"size": "2131",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "src/test/java/nl/pvanassen/geckoboard/api/widget/ListWidgetTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "78809"
}
],
"symlink_target": ""
} |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl" lang="pl">
<head>
<meta http-equiv="Content-Language" content="pl" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<head>
<title>Docs For Class Pagination</title>
<link rel="stylesheet" type="text/css" href="../media/style.css">
</head>
<body>
<div id="container">
<div id="topBg"></div>
<a href=""><img alt="Logo" id="logo" src="../media/logo.gif" /></a>
<ul id="menu">
<li><a href="/index.php/Index/API"><span>API Doc</span></a></li>
<li><a href="/index.php/Index/Manual"><span>Manual</span></a></li>
</ul>
<div id="content">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr valign="top">
<td width="20%" class="menu">
<div class="package-title">Coyote-F</div>
<div class="package">
<div id="todolist">
<p><a href="../todolist.html">Todo List</a></p>
</div>
</div>
<b>Packages:</b><br />
<div class="package">
<a href="../li_Coyote-F.html">Coyote-F</a><br />
</div>
<br />
<b>Files:</b><br />
<div class="package">
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---element---abstract.class.php.html">abstract.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---feed---abstract.class.php.html">abstract.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---db---abstract.class.php.html">abstract.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---decorator---abstract.class.php.html">abstract.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---validate---abstract.class.php.html">abstract.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---element---abstract.class.php.html">abstract.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---acl.class.php.html">acl.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---lang---array.class.php.html">array.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_helper---array.helper.php.html">array.helper.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---feed---element---atom.class.php.html">atom.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---feed---atom.class.php.html">atom.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---benchmark.class.php.html">benchmark.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_helper---box.helper.php.html">box.helper.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_helper---breadcrumb.helper.php.html">breadcrumb.helper.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---element---button.class.php.html">button.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---cache.class.php.html">cache.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---element---checkbox.class.php.html">checkbox.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---element---checkbox.class.php.html">checkbox.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---config.class.php.html">config.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---view---config.class.php.html">config.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_template---confirm_box.php.html">confirm_box.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---context.class.php.html">context.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---controller.class.php.html">controller.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---core.class.php.html">core.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---lang---csv.class.php.html">csv.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---session---db.class.php.html">db.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---db.class.php.html">db.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_controller---db.php.html">db.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---debug.class.php.html">debug.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_template---debug---debug.php.html">debug.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_template---pagination---default.php.html">default.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_template---form---default.php.html">default.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---decorator---description.class.php.html">description.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---dispatcher.class.php.html">dispatcher.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_template---docs.php.html">docs.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---cache---eaccelerator.class.php.html">eaccelerator.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---email.class.php.html">email.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---validate---email.class.php.html">email.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---validate---equal.class.php.html">equal.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---decorator---errors.class.php.html">errors.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_template---error---Exception.php.html">Exception.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---feed.class.php.html">feed.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---decorator---fieldset.class.php.html">fieldset.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---element---file.class.php.html">file.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---session---file.class.php.html">file.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---element---file.class.php.html">file.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---cache---file.class.php.html">file.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_template---error---FileNotFoundException.php.html">FileNotFoundException.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---filter.class.php.html">filter.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---validate---float.class.php.html">float.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_controller---foo.php.html">foo.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---decorator---form.class.php.html">form.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_helper---form.helper.php.html">form.helper.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---forms.class.php.html">forms.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_controller---forms.php.html">forms.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---ftp.class.php.html">ftp.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---gpc.class.php.html">gpc.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---element---hash.class.php.html">hash.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---element---hidden.class.php.html">hidden.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---element---hidden.class.php.html">hidden.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_helper---html.helper.php.html">html.helper.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---image.class.php.html">image.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_template---index.php.html">index.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_controller---index.php.html">index.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_index.php.html">index.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_template---information_box.php.html">information_box.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---config---ini.class.php.html">ini.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---input.class.php.html">input.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---element---input.class.php.html">input.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---filter---input.class.php.html">input.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---validate---int.class.php.html">int.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_helper---Kopia time.helper.php.html">Kopia time.helper.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---decorator---label.class.php.html">label.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---lang.class.php.html">lang.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_template---layout.php.html">layout.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---load.class.php.html">load.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_controller---loader.php.html">loader.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---log.class.php.html">log.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_template---manual.php.html">manual.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---validate---match.class.php.html">match.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---model.class.php.html">model.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---db---mysql.class.php.html">mysql.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---validate---nip.class.php.html">nip.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---validate---notempty.class.php.html">notempty.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---element---option.class.php.html">option.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---element---option.class.php.html">option.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---orm.class.php.html">orm.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---output.class.php.html">output.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---pagination.class.php.html">pagination.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---element---password.class.php.html">password.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---element---password.class.php.html">password.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---db---pdo.class.php.html">pdo.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---config---php.class.php.html">php.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---db---postgres.php.html">postgres.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---db---profiler.class.php.html">profiler.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---element---radio.class.php.html">radio.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---element---radio.class.php.html">radio.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---validate---regon.class.php.html">regon.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---filter---replace.class.php.html">replace.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---router.class.php.html">router.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---feed---element---rss.class.php.html">rss.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---feed---rss.class.php.html">rss.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---element---select.class.php.html">select.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---element---select.class.php.html">select.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---session.class.php.html">session.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_helper---sort.helper.php.html">sort.helper.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_helper---sql.helper.php.html">sql.helper.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---validate---string.class.php.html">string.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---element---submit.class.php.html">submit.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---element---submit.class.php.html">submit.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_helper---system.helper.php.html">system.helper.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---decorator---tag.class.php.html">tag.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_controller---test.php.html">test.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---element---text.class.php.html">text.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---element---text.class.php.html">text.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_helper---text.helper.php.html">text.helper.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---form---element---textarea.class.php.html">textarea.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---element---textarea.class.php.html">textarea.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_helper---time.helper.php.html">time.helper.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---trigger.class.php.html">trigger.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---TriggerException.class.php.html">TriggerException.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---unit_test.class.php.html">unit_test.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---validate---upload.class.php.html">upload.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---upload.class.php.html">upload.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---validate---url.class.php.html">url.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_helper---url.helper.php.html">url.helper.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---validate.class.php.html">validate.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---view.class.php.html">view.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---view---xhtml.class.php.html">xhtml.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---config---xml.class.php.html">xml.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---filter---xss.class.php.html">xss.class.php</a></span><br />
<span style="padding-left: 1em;"><a href="../Coyote-F/_lib---zip.class.php.html">zip.class.php</a></span><br />
</div>
<br />
<b>Interfaces:</b><br />
<div class="package">
<a href="../Coyote-F/ICache.html">ICache</a> <br />
<a href="../Coyote-F/IConfig.html">IConfig</a> <br />
<a href="../Coyote-F/IContext.html">IContext</a> <br />
<a href="../Coyote-F/IDB.html">IDB</a> <br />
<a href="../Coyote-F/IElement.html">IElement</a> <br />
<a href="../Coyote-F/IFilter.html">IFilter</a> <br />
<a href="../Coyote-F/ISession.html">ISession</a> <br />
<a href="../Coyote-F/IValidate.html">IValidate</a> <br />
<a href="../Coyote-F/IView.html">IView</a> <br />
<a href="../Coyote-F/IZip.html">IZip</a> <br />
</div>
<b>Classes:</b><br />
<div class="package">
<a href="../Coyote-F/Acl.html">Acl</a> <br />
<a href="../Coyote-F/Benchmark.html">Benchmark</a> <br />
<a href="../Coyote-F/Box.html">Box</a> <br />
<a href="../Coyote-F/Breadcrumb.html">Breadcrumb</a> <br />
<a href="../Coyote-F/Cache.html">Cache</a> <br />
<a href="../Coyote-F/Cache_EAccelerator.html">Cache_EAccelerator</a> <br />
<a href="../Coyote-F/Cache_File.html">Cache_File</a> <br />
<a href="../Coyote-F/Config.html">Config</a> <br />
<a href="../Coyote-F/ConfigFileNotFoundException.html">ConfigFileNotFoundException</a> <br />
<a href="../Coyote-F/Config_INI.html">Config_INI</a> <br />
<a href="../Coyote-F/Config_PHP.html">Config_PHP</a> <br />
<a href="../Coyote-F/Config_XML.html">Config_XML</a> <br />
<a href="../Coyote-F/Context.html">Context</a> <br />
<a href="../Coyote-F/Controller.html">Controller</a> <br />
<a href="../Coyote-F/Cookie.html">Cookie</a> <br />
<a href="../Coyote-F/Core.html">Core</a> <br />
<a href="../Coyote-F/Db.html">Db</a> <br />
<a href="../Coyote-F/Db_Abstract.html">Db_Abstract</a> <br />
<a href="../Coyote-F/Db_Controller.html">Db_Controller</a> <br />
<a href="../Coyote-F/Db_Mysql.html">Db_Mysql</a> <br />
<a href="../Coyote-F/Db_PDO.html">Db_PDO</a> <br />
<a href="../Coyote-F/Db_Profiler.html">Db_Profiler</a> <br />
<a href="../Coyote-F/Db_Profiler_Query.html">Db_Profiler_Query</a> <br />
<a href="../Coyote-F/Db_Result.html">Db_Result</a> <br />
<a href="../Coyote-F/Debug.html">Debug</a> <br />
<a href="../Coyote-F/DirNotFoundException.html">DirNotFoundException</a> <br />
<a href="../Coyote-F/DirNotWriteable.html">DirNotWriteable</a> <br />
<a href="../Coyote-F/Dispatcher.html">Dispatcher</a> <br />
<a href="../Coyote-F/Element_Abstract.html">Element_Abstract</a> <br />
<a href="../Coyote-F/Element_Checkbox.html">Element_Checkbox</a> <br />
<a href="../Coyote-F/Element_File.html">Element_File</a> <br />
<a href="../Coyote-F/Element_Hidden.html">Element_Hidden</a> <br />
<a href="../Coyote-F/Element_Option.html">Element_Option</a> <br />
<a href="../Coyote-F/Element_Password.html">Element_Password</a> <br />
<a href="../Coyote-F/Element_Radio.html">Element_Radio</a> <br />
<a href="../Coyote-F/Element_Select.html">Element_Select</a> <br />
<a href="../Coyote-F/Element_Submit.html">Element_Submit</a> <br />
<a href="../Coyote-F/Element_Text.html">Element_Text</a> <br />
<a href="../Coyote-F/Element_Textarea.html">Element_Textarea</a> <br />
<a href="../Coyote-F/Email.html">Email</a> <br />
<a href="../Coyote-F/Feed.html">Feed</a> <br />
<a href="../Coyote-F/Feed_Abstract.html">Feed_Abstract</a> <br />
<a href="../Coyote-F/Feed_Atom.html">Feed_Atom</a> <br />
<a href="../Coyote-F/Feed_Element_Atom.html">Feed_Element_Atom</a> <br />
<a href="../Coyote-F/Feed_Element_Rss.html">Feed_Element_Rss</a> <br />
<a href="../Coyote-F/Feed_Rss.html">Feed_Rss</a> <br />
<a href="../Coyote-F/FileExistsException.html">FileExistsException</a> <br />
<a href="../Coyote-F/FileNotFoundException.html">FileNotFoundException</a> <br />
<a href="../Coyote-F/FileSendingFailedException.html">FileSendingFailedException</a> <br />
<a href="../Coyote-F/Filter.html">Filter</a> <br />
<a href="../Coyote-F/Filter_Input.html">Filter_Input</a> <br />
<a href="../Coyote-F/Filter_Replace.html">Filter_Replace</a> <br />
<a href="../Coyote-F/Filter_XSS.html">Filter_XSS</a> <br />
<a href="../Coyote-F/Foo.html">Foo</a> <br />
<a href="../Coyote-F/Form.html">Form</a> <br />
<a href="../Coyote-F/Forms.html">Forms</a> <br />
<a href="../Coyote-F/Forms_Controller.html">Forms_Controller</a> <br />
<a href="../Coyote-F/Form_Decorator_Abstract.html">Form_Decorator_Abstract</a> <br />
<a href="../Coyote-F/Form_Decorator_Description.html">Form_Decorator_Description</a> <br />
<a href="../Coyote-F/Form_Decorator_Errors.html">Form_Decorator_Errors</a> <br />
<a href="../Coyote-F/Form_Decorator_Fieldset.html">Form_Decorator_Fieldset</a> <br />
<a href="../Coyote-F/Form_Decorator_Form.html">Form_Decorator_Form</a> <br />
<a href="../Coyote-F/Form_Decorator_Label.html">Form_Decorator_Label</a> <br />
<a href="../Coyote-F/Form_Decorator_Tag.html">Form_Decorator_Tag</a> <br />
<a href="../Coyote-F/Form_Element_Abstract.html">Form_Element_Abstract</a> <br />
<a href="../Coyote-F/Form_Element_Button.html">Form_Element_Button</a> <br />
<a href="../Coyote-F/Form_Element_Checkbox.html">Form_Element_Checkbox</a> <br />
<a href="../Coyote-F/Form_Element_File.html">Form_Element_File</a> <br />
<a href="../Coyote-F/Form_Element_Hash.html">Form_Element_Hash</a> <br />
<a href="../Coyote-F/Form_Element_Hidden.html">Form_Element_Hidden</a> <br />
<a href="../Coyote-F/Form_Element_Option.html">Form_Element_Option</a> <br />
<a href="../Coyote-F/Form_Element_Password.html">Form_Element_Password</a> <br />
<a href="../Coyote-F/Form_Element_Radio.html">Form_Element_Radio</a> <br />
<a href="../Coyote-F/Form_Element_Select.html">Form_Element_Select</a> <br />
<a href="../Coyote-F/Form_Element_Submit.html">Form_Element_Submit</a> <br />
<a href="../Coyote-F/Form_Element_Text.html">Form_Element_Text</a> <br />
<a href="../Coyote-F/Form_Element_Textarea.html">Form_Element_Textarea</a> <br />
<a href="../Coyote-F/Ftp.html">Ftp</a> <br />
<a href="../Coyote-F/FtpCouldNotConnectException.html">FtpCouldNotConnectException</a> <br />
<a href="../Coyote-F/FtpCouldNotLoginException.html">FtpCouldNotLoginException</a> <br />
<a href="../Coyote-F/Get.html">Get</a> <br />
<a href="../Coyote-F/Gpc.html">Gpc</a> <br />
<a href="../Coyote-F/Html.html">Html</a> <br />
<a href="../Coyote-F/Image.html">Image</a> <br />
<a href="../Coyote-F/index.html">index</a> <br />
<a href="../Coyote-F/Input.html">Input</a> <br />
<a href="../Coyote-F/Lang.html">Lang</a> <br />
<a href="../Coyote-F/Lang_Abstract.html">Lang_Abstract</a> <br />
<a href="../Coyote-F/Lang_Array.html">Lang_Array</a> <br />
<a href="../Coyote-F/Lang_CSV.html">Lang_CSV</a> <br />
<a href="../Coyote-F/Load.html">Load</a> <br />
<a href="../Coyote-F/Loader.html">Loader</a> <br />
<a href="../Coyote-F/Log.html">Log</a> <br />
<a href="../Coyote-F/Model.html">Model</a> <br />
<a href="../Coyote-F/Mysql_Result.html">Mysql_Result</a> <br />
<a href="../Coyote-F/Orm.html">Orm</a> <br />
<a href="../Coyote-F/Output.html">Output</a> <br />
<a href="../Coyote-F/Pagination.html">Pagination</a> <br />
<a href="../Coyote-F/Pdo_Result.html">Pdo_Result</a> <br />
<a href="../Coyote-F/Post.html">Post</a> <br />
<a href="../Coyote-F/Router.html">Router</a> <br />
<a href="../Coyote-F/Server.html">Server</a> <br />
<a href="../Coyote-F/Session.html">Session</a> <br />
<a href="../Coyote-F/Session_Db.html">Session_Db</a> <br />
<a href="../Coyote-F/Session_File.html">Session_File</a> <br />
<a href="../Coyote-F/Sort.html">Sort</a> <br />
<a href="../Coyote-F/Sql.html">Sql</a> <br />
<a href="../Coyote-F/SQLCouldNotConnectException.html">SQLCouldNotConnectException</a> <br />
<a href="../Coyote-F/SQLCouldNotSelectDbException.html">SQLCouldNotSelectDbException</a> <br />
<a href="../Coyote-F/SQLQueryException.html">SQLQueryException</a> <br />
<a href="../Coyote-F/Sql_Query.html">Sql_Query</a> <br />
<a href="../Coyote-F/Test.html">Test</a> <br />
<a href="../Coyote-F/Text.html">Text</a> <br />
<a href="../Coyote-F/Time.html">Time</a> <br />
<a href="../Coyote-F/Trigger.html">Trigger</a> <br />
<a href="../Coyote-F/TriggerException.html">TriggerException</a> <br />
<a href="../Coyote-F/Unit_test.html">Unit_test</a> <br />
<a href="../Coyote-F/Upload.html">Upload</a> <br />
<a href="../Coyote-F/Url.html">Url</a> <br />
<a href="../Coyote-F/Validate.html">Validate</a> <br />
<a href="../Coyote-F/Validate_Abstract.html">Validate_Abstract</a> <br />
<a href="../Coyote-F/Validate_Email.html">Validate_Email</a> <br />
<a href="../Coyote-F/Validate_Equal.html">Validate_Equal</a> <br />
<a href="../Coyote-F/Validate_Float.html">Validate_Float</a> <br />
<a href="../Coyote-F/Validate_Int.html">Validate_Int</a> <br />
<a href="../Coyote-F/Validate_Match.html">Validate_Match</a> <br />
<a href="../Coyote-F/Validate_Nip.html">Validate_Nip</a> <br />
<a href="../Coyote-F/Validate_NotEmpty.html">Validate_NotEmpty</a> <br />
<a href="../Coyote-F/Validate_Regon.html">Validate_Regon</a> <br />
<a href="../Coyote-F/Validate_String.html">Validate_String</a> <br />
<a href="../Coyote-F/Validate_Upload.html">Validate_Upload</a> <br />
<a href="../Coyote-F/Validate_Url.html">Validate_Url</a> <br />
<a href="../Coyote-F/View.html">View</a> <br />
<a href="../Coyote-F/View_Config.html">View_Config</a> <br />
<a href="../Coyote-F/View_XHTML.html">View_XHTML</a> <br />
<a href="../Coyote-F/Zip.html">Zip</a> <br />
<a href="../Coyote-F/Zip_Gz.html">Zip_Gz</a> <br />
<a href="../Coyote-F/Zip_Zip.html">Zip_Zip</a> <br />
</div>
</td>
<td>
<table cellpadding="10" cellspacing="0" width="100%" border="0"><tr><td valign="top">
<h1>Class: Pagination</h1>
Source Location: /lib/pagination.class.php<br /><br />
<h2 class="class-name">Klasa Pagination</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Przegląd klasy</div>
<div class="nav-bar">
<span class="disabled">Class Overview</span>
| <a href="#sec-var-summary">Property Summary</a> | <a href="#sec-vars">Properties Detail</a>
| <a href="#sec-method-summary">Method Summary</a> | <a href="#sec-methods">Methods Detail</a>
</div>
<div class="info-box-body">
<table width="100%" border="0">
<tr><td valign="top" width="60%" class="class-overview">
<p align="center" class="short-description"><strong>Klasa Pagination (stronnicowanie)
</strong></p>
<p class="notes">
Located in <a class="field" href="_lib---pagination.class.php.html">/lib/pagination.class.php</a> [<span class="field">line 12</span>]
</p>
<pre></pre>
</td>
<td valign="top" width="20%" class="class-overview">
<p align="center" class="short-description"><strong><a href="#sec_vars">Properties</a></strong></p>
<ul>
<li><a href="../Coyote-F/Pagination.html#var$baseUrl">$baseUrl</a></li>
<li><a href="../Coyote-F/Pagination.html#var$currentItem">$currentItem</a></li>
<li><a href="../Coyote-F/Pagination.html#var$currentPage">$currentPage</a></li>
<li><a href="../Coyote-F/Pagination.html#var$itemsPerPage">$itemsPerPage</a></li>
<li><a href="../Coyote-F/Pagination.html#var$queryString">$queryString</a></li>
<li><a href="../Coyote-F/Pagination.html#var$totalItems">$totalItems</a></li>
</ul>
</td>
<td valign="top" width="20%" class="class-overview">
<p align="center" class="short-description"><strong><a href="#sec_methods">Methods</a></strong></p>
<ul>
<li><a href="../Coyote-F/Pagination.html#method__construct">__construct</a></li>
<li><a href="../Coyote-F/Pagination.html#methoddisplay">display</a></li>
<li><a href="../Coyote-F/Pagination.html#methodgetBaseUrl">getBaseUrl</a></li>
<li><a href="../Coyote-F/Pagination.html#methodgetCurrentItem">getCurrentItem</a></li>
<li><a href="../Coyote-F/Pagination.html#methodgetCurrentPage">getCurrentPage</a></li>
<li><a href="../Coyote-F/Pagination.html#methodgetItemsPerPage">getItemsPerPage</a></li>
<li><a href="../Coyote-F/Pagination.html#methodgetQueryString">getQueryString</a></li>
<li><a href="../Coyote-F/Pagination.html#methodgetTotalItems">getTotalItems</a></li>
<li><a href="../Coyote-F/Pagination.html#methodgetTotalPages">getTotalPages</a></li>
<li><a href="../Coyote-F/Pagination.html#methodsetBaseUrl">setBaseUrl</a></li>
<li><a href="../Coyote-F/Pagination.html#methodsetCurrentItem">setCurrentItem</a></li>
<li><a href="../Coyote-F/Pagination.html#methodsetCurrentPage">setCurrentPage</a></li>
<li><a href="../Coyote-F/Pagination.html#methodsetItemsPerPage">setItemsPerPage</a></li>
<li><a href="../Coyote-F/Pagination.html#methodsetQueryString">setQueryString</a></li>
<li><a href="../Coyote-F/Pagination.html#methodsetTotalItems">setTotalItems</a></li>
<li><a href="../Coyote-F/Pagination.html#method__toString">__toString</a></li>
</ul>
</td>
</tr></table>
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
</div>
<a name="sec-var-summary"></a>
<div class="info-box">
<div class="info-box-title">Property Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Class Overview</a>
| <span class="disabled">Property Summary</span> | <a href="#sec-vars">Properties Detail</a>
| <a href="#sec-method-summary">Method Summary</a> | <a href="#sec-methods">Methods Detail</a>
</div>
<div class="info-box-body">
<div class="var-summary">
<table border="0" cellspacing="0" cellpadding="0" class="var-summary">
<div class="var-title">
<tr><td class="var-title"><span class="var-type-summary">mixed</span> </td>
<td class="var-title"><a href="#$baseUrl" title="details" class="var-name-summary">$baseUrl</a> </td>
<td class="var-summary-description">Bazowy adres URL dla linkow</td></tr>
</div>
<div class="var-title">
<tr><td class="var-title"><span class="var-type-summary">mixed</span> </td>
<td class="var-title"><a href="#$currentItem" title="details" class="var-name-summary">$currentItem</a> </td>
<td class="var-summary-description">Aktualna pozycja (nie strona)</td></tr>
</div>
<div class="var-title">
<tr><td class="var-title"><span class="var-type-summary">mixed</span> </td>
<td class="var-title"><a href="#$currentPage" title="details" class="var-name-summary">$currentPage</a> </td>
<td class="var-summary-description">Aktualna strona na ktore przechywa uzytkownik</td></tr>
</div>
<div class="var-title">
<tr><td class="var-title"><span class="var-type-summary">mixed</span> </td>
<td class="var-title"><a href="#$itemsPerPage" title="details" class="var-name-summary">$itemsPerPage</a> </td>
<td class="var-summary-description">Liczba pozycji wyswietlanych na stronie (Np. 10 tematow na forum)</td></tr>
</div>
<div class="var-title">
<tr><td class="var-title"><span class="var-type-summary">mixed</span> </td>
<td class="var-title"><a href="#$queryString" title="details" class="var-name-summary">$queryString</a> </td>
<td class="var-summary-description">Wartosc QUERY_STRING, ktora ma byc dolaczna do URL'a</td></tr>
</div>
<div class="var-title">
<tr><td class="var-title"><span class="var-type-summary">mixed</span> </td>
<td class="var-title"><a href="#$totalItems" title="details" class="var-name-summary">$totalItems</a> </td>
<td class="var-summary-description">Liczba pozycji (nie stron!). Np. 200 tematow na forum</td></tr>
</div>
</table>
</div>
<br /><div class="top">[ <a href="#top">Top</a> ]</div>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Class Overview</a>
| <a href="#sec-var-summary">Property Summary</a> | <a href="#sec-vars">Properties Detail</a>
| <span class="disabled">Method Summary</span> | <a href="#sec-methods">Methods Detail</a>
</div>
<div class="info-box-body">
<div class="method-summary">
<table border="0" cellspacing="0" cellpadding="0" class="method-summary">
<div class="method-definition">
<tr><td class="method-definition"><span class="method-result">Pagination</span> </td>
<td class="method-definition"><a href="#__construct" title="details" class="method-name">__construct</a>() </td>
<td class="method-definition"></td></tr>
</div>
<div class="method-definition">
<tr><td class="method-definition"><span class="method-result">string</span> </td>
<td class="method-definition"><a href="#display" title="details" class="method-name">display</a>() </td>
<td class="method-definition">Wyswietlanie linkow w widoku</td></tr>
</div>
<div class="method-definition">
<tr><td class="method-definition"><span class="method-result">string</span> </td>
<td class="method-definition"><a href="#getBaseUrl" title="details" class="method-name">getBaseUrl</a>() </td>
<td class="method-definition">Zwraca bazowy adres dla URL</td></tr>
</div>
<div class="method-definition">
<tr><td class="method-definition"><span class="method-result">int</span> </td>
<td class="method-definition"><a href="#getCurrentItem" title="details" class="method-name">getCurrentItem</a>() </td>
<td class="method-definition">Zwraca aktualna pozycje</td></tr>
</div>
<div class="method-definition">
<tr><td class="method-definition"><span class="method-result">int</span> </td>
<td class="method-definition"><a href="#getCurrentPage" title="details" class="method-name">getCurrentPage</a>() </td>
<td class="method-definition">Zwraca numer aktualnej strony (np. 2 strona tematow na forum)</td></tr>
</div>
<div class="method-definition">
<tr><td class="method-definition"><span class="method-result">void</span> </td>
<td class="method-definition"><a href="#getItemsPerPage" title="details" class="method-name">getItemsPerPage</a>() </td>
<td class="method-definition">Zwraca ilosc rekorow (np. 200 tematow na forum</td></tr>
</div>
<div class="method-definition">
<tr><td class="method-definition"><span class="method-result">string</span> </td>
<td class="method-definition"><a href="#getQueryString" title="details" class="method-name">getQueryString</a>() </td>
<td class="method-definition">Zwraca wartosc QUERY_STRING ustawiona w klasie</td></tr>
</div>
<div class="method-definition">
<tr><td class="method-definition"><span class="method-result">int</span> </td>
<td class="method-definition"><a href="#getTotalItems" title="details" class="method-name">getTotalItems</a>() </td>
<td class="method-definition">Zwraca ogolna ilosc pozycji</td></tr>
</div>
<div class="method-definition">
<tr><td class="method-definition"><span class="method-result">int</span> </td>
<td class="method-definition"><a href="#getTotalPages" title="details" class="method-name">getTotalPages</a>() </td>
<td class="method-definition">Zwraca ilosc stron (Ilosc rekordow / Ilosc rekordow na jedna strone)</td></tr>
</div>
<div class="method-definition">
<tr><td class="method-definition"><span class="method-result">object</span> </td>
<td class="method-definition"><a href="#setBaseUrl" title="details" class="method-name">setBaseUrl</a>() </td>
<td class="method-definition">Ustawia bazowy adres dla linkow</td></tr>
</div>
<div class="method-definition">
<tr><td class="method-definition"><span class="method-result">object</span> </td>
<td class="method-definition"><a href="#setCurrentItem" title="details" class="method-name">setCurrentItem</a>() </td>
<td class="method-definition">Ustawia poczatkowa pozycje (np. odczytaj tematy na forum, poczawszy od setnego)</td></tr>
</div>
<div class="method-definition">
<tr><td class="method-definition"><span class="method-result">object</span> </td>
<td class="method-definition"><a href="#setCurrentPage" title="details" class="method-name">setCurrentPage</a>() </td>
<td class="method-definition">Ustawia aktualna strone (np. 2 strona tematow na forum)</td></tr>
</div>
<div class="method-definition">
<tr><td class="method-definition"><span class="method-result">object</span> </td>
<td class="method-definition"><a href="#setItemsPerPage" title="details" class="method-name">setItemsPerPage</a>() </td>
<td class="method-definition">Ustawia ilosc rekordow na jednej stronie (np. 10 tematow)</td></tr>
</div>
<div class="method-definition">
<tr><td class="method-definition"><span class="method-result">object</span> </td>
<td class="method-definition"><a href="#setQueryString" title="details" class="method-name">setQueryString</a>() </td>
<td class="method-definition">Ustawia wartosc QUERY_STRING dla URL'a</td></tr>
</div>
<div class="method-definition">
<tr><td class="method-definition"><span class="method-result">object</span> </td>
<td class="method-definition"><a href="#setTotalItems" title="details" class="method-name">setTotalItems</a>() </td>
<td class="method-definition">Ustawia ilosc rekordow na stronie (np. 200 tematow na forum)</td></tr>
</div>
<div class="method-definition">
<tr><td class="method-definition"><span class="method-result">void</span> </td>
<td class="method-definition"><a href="#__toString" title="details" class="method-name">__toString</a>() </td>
<td class="method-definition"></td></tr>
</div>
</table>
</div>
<br /><div class="top">[ <a href="#top">Top</a> ]</div>
</div>
</div>
<a name="sec-vars"></a>
<div class="info-box">
<div class="info-box-title">Properties</div>
<div class="nav-bar">
<a href="#sec-description">Class Overview</a>
| <a href="#sec-var-summary">Property Summary</a> | <span class="disabled">Properties Detail</span>
| <a href="#sec-method-summary">Method Summary</a> | <a href="#sec-methods">Methods Detail</a>
</div>
<div class="info-box-body">
<a name="var$baseUrl" id="$baseUrl"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$baseUrl</span>
<span class="smalllinenumber">[line 17]</span>
</span>
</div>
<p align="center" class="short-description"><strong>Bazowy adres URL dla linkow
</strong></p>
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>protected</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="var$currentItem" id="$currentItem"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$currentItem</span>
<span class="smalllinenumber">[line 33]</span>
</span>
</div>
<p align="center" class="short-description"><strong>Aktualna pozycja (nie strona)
</strong></p>
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>protected</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="var$currentPage" id="$currentPage"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$currentPage</span>
<span class="smalllinenumber">[line 29]</span>
</span>
</div>
<p align="center" class="short-description"><strong>Aktualna strona na ktore przechywa uzytkownik
</strong></p>
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>protected</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="var$itemsPerPage" id="$itemsPerPage"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$itemsPerPage</span>
<span class="smalllinenumber">[line 25]</span>
</span>
</div>
<p align="center" class="short-description"><strong>Liczba pozycji wyswietlanych na stronie (Np. 10 tematow na forum)
</strong></p>
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>protected</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="var$queryString" id="$queryString"><!-- --></A>
<div class="evenrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$queryString</span>
<span class="smalllinenumber">[line 37]</span>
</span>
</div>
<p align="center" class="short-description"><strong>Wartosc QUERY_STRING, ktora ma byc dolaczna do URL'a
</strong></p>
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>protected</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="var$totalItems" id="$totalItems"><!-- --></A>
<div class="oddrow">
<div class="var-header">
<span class="var-title">
<span class="var-type">mixed</span>
<span class="var-name">$totalItems</span>
<span class="smalllinenumber">[line 21]</span>
</span>
</div>
<p align="center" class="short-description"><strong>Liczba pozycji (nie stron!). Np. 200 tematow na forum
</strong></p>
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>protected</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Class Overview</a>
| <a href="#sec-var-summary">Property Summary</a> | <a href="#sec-vars">Properties Detail</a>
| <a href="#sec-method-summary">Method Summary</a> | <span class="disabled">Methods Detail</span>
</div>
<div class="info-box-body">
<a name='method_detail'></a>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> <span class="smalllinenumber">[line 39]</span>
</div>
<br />
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>Pagination __construct(
[
$baseUrl = ''], [
$totalItems = 0], [
$itemsPerPage = 10], [
$currentItem = 0]
)</code>
</td></tr></table>
</td></tr></table><br /></div>
<strong>Parameters:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr><td class="indent">
<span class="var-type"></span> </td>
<td>
<span class="var-name">$baseUrl: </span></td>
<td>
</td></tr>
<tr><td class="indent">
<span class="var-type"></span> </td>
<td>
<span class="var-name">$totalItems: </span></td>
<td>
</td></tr>
<tr><td class="indent">
<span class="var-type"></span> </td>
<td>
<span class="var-name">$itemsPerPage: </span></td>
<td>
</td></tr>
<tr><td class="indent">
<span class="var-type"></span> </td>
<td>
<span class="var-name">$currentItem: </span></td>
<td>
</td></tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methoddisplay" id="display"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">display</span> <span class="smalllinenumber">[line 204]</span>
</div>
<br />
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>string display(
[string
$template = 'default']
)</code>
</td></tr></table>
</td></tr></table><br /></div>
<p align="center" class="short-description"><strong>Wyswietlanie linkow w widoku
</strong></p>
<strong>Parameters:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr><td class="indent">
<span class="var-type">string</span> </td>
<td>
<span class="var-name">$template: </span></td>
<td>
<span class="var-description"> Nazwa szablonu</span> </td></tr>
</table>
<br />
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>public</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodgetBaseUrl" id="getBaseUrl"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getBaseUrl</span> <span class="smalllinenumber">[line 66]</span>
</div>
<br />
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>string getBaseUrl(
)</code>
</td></tr></table>
</td></tr></table><br /></div>
<p align="center" class="short-description"><strong>Zwraca bazowy adres dla URL
</strong></p>
<br />
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>public</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodgetCurrentItem" id="getCurrentItem"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getCurrentItem</span> <span class="smalllinenumber">[line 194]</span>
</div>
<br />
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>int getCurrentItem(
)</code>
</td></tr></table>
</td></tr></table><br /></div>
<p align="center" class="short-description"><strong>Zwraca aktualna pozycje
</strong></p>
<br />
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>public</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodgetCurrentPage" id="getCurrentPage"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getCurrentPage</span> <span class="smalllinenumber">[line 169]</span>
</div>
<br />
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>int getCurrentPage(
)</code>
</td></tr></table>
</td></tr></table><br /></div>
<p align="center" class="short-description"><strong>Zwraca numer aktualnej strony (np. 2 strona tematow na forum)
</strong></p>
<br />
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>public</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodgetItemsPerPage" id="getItemsPerPage"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getItemsPerPage</span> <span class="smalllinenumber">[line 132]</span>
</div>
<br />
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void getItemsPerPage(
)</code>
</td></tr></table>
</td></tr></table><br /></div>
<p align="center" class="short-description"><strong>Zwraca ilosc rekorow (np. 200 tematow na forum
</strong></p>
<br />
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>public</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodgetQueryString" id="getQueryString"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getQueryString</span> <span class="smalllinenumber">[line 86]</span>
</div>
<br />
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>string getQueryString(
)</code>
</td></tr></table>
</td></tr></table><br /></div>
<p align="center" class="short-description"><strong>Zwraca wartosc QUERY_STRING ustawiona w klasie
</strong></p>
<br />
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>public</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodgetTotalItems" id="getTotalItems"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getTotalItems</span> <span class="smalllinenumber">[line 150]</span>
</div>
<br />
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>int getTotalItems(
)</code>
</td></tr></table>
</td></tr></table><br /></div>
<p align="center" class="short-description"><strong>Zwraca ogolna ilosc pozycji
</strong></p>
<br />
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>public</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodgetTotalPages" id="getTotalPages"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getTotalPages</span> <span class="smalllinenumber">[line 141]</span>
</div>
<br />
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>int getTotalPages(
)</code>
</td></tr></table>
</td></tr></table><br /></div>
<p align="center" class="short-description"><strong>Zwraca ilosc stron (Ilosc rekordow / Ilosc rekordow na jedna strone)
</strong></p>
<br />
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>public</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodsetBaseUrl" id="setBaseUrl"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setBaseUrl</span> <span class="smalllinenumber">[line 52]</span>
</div>
<br />
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>object setBaseUrl(
string
$baseUrl
)</code>
</td></tr></table>
</td></tr></table><br /></div>
<p align="center" class="short-description"><strong>Ustawia bazowy adres dla linkow
</strong></p>
<strong>Parameters:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr><td class="indent">
<span class="var-type">string</span> </td>
<td>
<span class="var-name">$baseUrl: </span></td>
<td>
</td></tr>
</table>
<br />
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>public</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodsetCurrentItem" id="setCurrentItem"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">setCurrentItem</span> <span class="smalllinenumber">[line 183]</span>
</div>
<br />
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>object setCurrentItem(
int
$currentItem
)</code>
</td></tr></table>
</td></tr></table><br /></div>
<p align="center" class="short-description"><strong>Ustawia poczatkowa pozycje (np. odczytaj tematy na forum, poczawszy od setnego)
</strong></p>
<strong>Parameters:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr><td class="indent">
<span class="var-type">int</span> </td>
<td>
<span class="var-name">$currentItem: </span></td>
<td>
</td></tr>
</table>
<br />
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>public</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodsetCurrentPage" id="setCurrentPage"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setCurrentPage</span> <span class="smalllinenumber">[line 159]</span>
</div>
<br />
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>object setCurrentPage(
$currentPage
)</code>
</td></tr></table>
</td></tr></table><br /></div>
<p align="center" class="short-description"><strong>Ustawia aktualna strone (np. 2 strona tematow na forum)
</strong></p>
<strong>Parameters:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr><td class="indent">
<span class="var-type"></span> </td>
<td>
<span class="var-name">$currentPage: </span></td>
<td>
</td></tr>
</table>
<br />
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>public</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodsetItemsPerPage" id="setItemsPerPage"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">setItemsPerPage</span> <span class="smalllinenumber">[line 119]</span>
</div>
<br />
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>object setItemsPerPage(
int
$itemsPerPage
)</code>
</td></tr></table>
</td></tr></table><br /></div>
<p align="center" class="short-description"><strong>Ustawia ilosc rekordow na jednej stronie (np. 10 tematow)
</strong></p>
<strong>Parameters:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr><td class="indent">
<span class="var-type">int</span> </td>
<td>
<span class="var-name">$itemsPerPage: </span></td>
<td>
</td></tr>
</table>
<br />
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>public</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodsetQueryString" id="setQueryString"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">setQueryString</span> <span class="smalllinenumber">[line 76]</span>
</div>
<br />
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>object setQueryString(
string
$queryString
)</code>
</td></tr></table>
</td></tr></table><br /></div>
<p align="center" class="short-description"><strong>Ustawia wartosc QUERY_STRING dla URL'a
</strong></p>
<strong>Parameters:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr><td class="indent">
<span class="var-type">string</span> </td>
<td>
<span class="var-name">$queryString: </span></td>
<td>
</td></tr>
</table>
<br />
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>public</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="methodsetTotalItems" id="setTotalItems"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">setTotalItems</span> <span class="smalllinenumber">[line 108]</span>
</div>
<br />
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>object setTotalItems(
int
$totalItems
)</code>
</td></tr></table>
</td></tr></table><br /></div>
<p align="center" class="short-description"><strong>Ustawia ilosc rekordow na stronie (np. 200 tematow na forum)
</strong></p>
<strong>Parameters:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr><td class="indent">
<span class="var-type">int</span> </td>
<td>
<span class="var-name">$totalItems: </span></td>
<td>
</td></tr>
</table>
<br />
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>public</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
<a name="method__toString" id="__toString"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">__toString</span> <span class="smalllinenumber">[line 228]</span>
</div>
<br />
<div class="function">
<table width="90%" border="0" cellspacing="0" cellpadding="1"><tr><td class="code-border">
<table width="100%" border="0" cellspacing="0" cellpadding="2"><tr><td class="code">
<code>void __toString(
)</code>
</td></tr></table>
</td></tr></table><br /></div>
<br />
<strong>API Tags:</strong><br />
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="indent"><strong>Access:</strong> </td><td>public</td>
</tr>
</table>
<br />
<br />
<div class="top">[ <a href="#top">Top</a> ]</div>
</div>
</div>
</div>
<div class="credit">
<hr class="separator" />
Documentation generated on Tue, 22 Jun 2010 16:43:08 +0200 by <a href="http://www.phpdoc.org">phpDocumentor 1.4.0a2</a>
</div>
</td></tr></table>
</td>
</tr>
</table>
</body>
</html> | {
"content_hash": "33e22a1d7bcc1a4148b073cf091f256d",
"timestamp": "",
"source": "github",
"line_count": 1382,
"max_line_length": 175,
"avg_line_length": 48.42981186685962,
"alnum_prop": 0.5926789182728224,
"repo_name": "bkielbasa/coyote2",
"id": "ec815566ec15f1d5cbf7204be5ecc85ac2af4140",
"size": "66931",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "framework/docs/api/Coyote-F/Pagination.html",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "JavaScript",
"bytes": "1276073"
},
{
"name": "PHP",
"bytes": "4841082"
}
],
"symlink_target": ""
} |
package java.security;
public class SecurityPermission extends BasicPermission {
public SecurityPermission(String name) {
super(name);
}
}
| {
"content_hash": "0efb9d8f47fb487cce662122fcc67660",
"timestamp": "",
"source": "github",
"line_count": 11,
"max_line_length": 57,
"avg_line_length": 13.818181818181818,
"alnum_prop": 0.743421052631579,
"repo_name": "nmcl/wfswarm-example-arjuna-old",
"id": "194517c37828195064fdd5f5f303295b684af021",
"size": "501",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "avian/classpath/java/security/SecurityPermission.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "6903"
}
],
"symlink_target": ""
} |
package testesDeUnidadeServices;
import static junit.framework.Assert.assertTrue;
import static junit.framework.Assert.assertEquals;
import org.junit.After;
import org.junit.Test;
import com.br.uepb.dao.LoginDAO;
import com.br.uepb.dao.PacienteDAO;
import com.br.uepb.model.LoginDomain;
import com.br.uepb.model.PacienteDomain;
public class PersistenciaPacienteTests {
private int ultimoPaciente;
@Test
public void criarPacienteTest() {
PacienteDAO pacienteDAO = new PacienteDAO();
PacienteDomain novoPaciente = new PacienteDomain();
novoPaciente.setNome("João Lopes");
novoPaciente.setEndereco("Rua Coronel Falamansa");
novoPaciente.setCidade("Arco Verde");
novoPaciente.setSexo("M");
novoPaciente.setTelefoneCasa("8335640298");
pacienteDAO.salvaPaciente(novoPaciente);
assertTrue(novoPaciente.getId() > 0);
ultimoPaciente = novoPaciente.getId();
}
@Test
public void associarPacienteLogin(){
PacienteDAO pacienteDAO = new PacienteDAO();
LoginDAO loginDAO = new LoginDAO();
PacienteDomain novoPaciente = new PacienteDomain();
novoPaciente.setNome("João Lopes");
novoPaciente.setEndereco("Rua Coronel Falamansa");
novoPaciente.setCidade("Arco Verde");
novoPaciente.setSexo("M");
novoPaciente.setTelefoneCasa("8335640298");
pacienteDAO.salvaPaciente(novoPaciente);
ultimoPaciente = novoPaciente.getId();
LoginDomain login = new LoginDomain();
login.setLogin("jlopes");
login.setSenha("senha123");
login.setPaciente(novoPaciente);
// novoPaciente.setLogin(login);
pacienteDAO.salvaPaciente(novoPaciente);
assertEquals(novoPaciente.getId(), login.getPaciente().getId());
}
@After
public void limparDados(){
PacienteDAO pacienteDAO = new PacienteDAO();
PacienteDomain paciente = pacienteDAO.obtemPaciente(ultimoPaciente);
if(paciente != null)
pacienteDAO.excluiPaciente(paciente);
}
}
| {
"content_hash": "8566e1f0e2d18ce3498be9eadd46e5e2",
"timestamp": "",
"source": "github",
"line_count": 66,
"max_line_length": 70,
"avg_line_length": 29.53030303030303,
"alnum_prop": 0.7378142637249872,
"repo_name": "lukasteles/REIS",
"id": "1c91cfe8a8bddc714a60fe27ddbff4ee3041e9da",
"size": "1951",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "reisProject/reisProject-services/src/test/java/testesDeUnidadeServices/PersistenciaPacienteTests.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "635211"
},
{
"name": "HTML",
"bytes": "2668"
},
{
"name": "Java",
"bytes": "185733"
},
{
"name": "JavaScript",
"bytes": "1064488"
}
],
"symlink_target": ""
} |
<?php
namespace Drupal\file\Plugin\migrate\cckfield\d6;
@trigger_error('FileField is deprecated in Drupal 8.3.x and will be removed before Drupal 9.0.x. Use \Drupal\file\Plugin\migrate\field\d6\FileField instead.', E_USER_DEPRECATED);
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\Row;
use Drupal\migrate_drupal\Plugin\migrate\cckfield\CckFieldPluginBase;
/**
* @MigrateCckField(
* id = "filefield",
* core = {6},
* source_module = "filefield",
* destination_module = "file"
* )
*
* @deprecated in Drupal 8.3.x, to be removed before Drupal 9.0.x. Use
* \Drupal\file\Plugin\migrate\field\d6\FileField instead.
*
* @see https://www.drupal.org/node/2751897
*/
class FileField extends CckFieldPluginBase {
/**
* {@inheritdoc}
*/
public function getFieldWidgetMap() {
return [
'filefield_widget' => 'file_generic',
];
}
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {
return [
'default' => 'file_default',
'url_plain' => 'file_url_plain',
'path_plain' => 'file_url_plain',
'image_plain' => 'image',
'image_nodelink' => 'image',
'image_imagelink' => 'image',
];
}
/**
* {@inheritdoc}
*/
public function processCckFieldValues(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'd6_cck_file',
'source' => $field_name,
];
$migration->mergeProcessOfProperty($field_name, $process);
}
/**
* {@inheritdoc}
*/
public function getFieldType(Row $row) {
return $row->getSourceProperty('widget_type') == 'imagefield_widget' ? 'image' : 'file';
}
}
| {
"content_hash": "e53666b90c386da5788459714d6b8e31",
"timestamp": "",
"source": "github",
"line_count": 67,
"max_line_length": 178,
"avg_line_length": 24.73134328358209,
"alnum_prop": 0.6330718165359083,
"repo_name": "leorawe/sci-base",
"id": "8dba3b022a62b89e82dca7459de9767e187ffbdd",
"size": "1657",
"binary": false,
"copies": "41",
"ref": "refs/heads/master",
"path": "web/core/modules/file/src/Plugin/migrate/cckfield/d6/FileField.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "891567"
},
{
"name": "Gherkin",
"bytes": "3374"
},
{
"name": "HTML",
"bytes": "809692"
},
{
"name": "JavaScript",
"bytes": "1514397"
},
{
"name": "PHP",
"bytes": "36312357"
},
{
"name": "Ruby",
"bytes": "63696"
},
{
"name": "Shell",
"bytes": "59930"
}
],
"symlink_target": ""
} |
pageid: bser
title: BSER Binary Protocol
layout: docs
section: Internals
permalink: docs/bser.html
redirect_from: docs/bser/
---
The basic JSON protocol in watchman allows quick and easy integration.
Applications with higher performance requirements may want to consider the
binary protocol instead.
The binary protocol is enabled by the client sending the byte sequence
"\x00x\x01".
## PDU
A PDU is prefixed by its length expressed as an encoded integer. This allows
the peer to determine how much storage is required to read and decode it.
## Arrays
Arrays are indicated by a `0x00` byte value followed by an integer value to
indicate how many items follow. Then each item is encoded one after the other.
## Objects
Objects are indicated by a `0x01` byte value followed by an integer value to
indicate the number of properties in the object. Then each key/value pair is
encoded one after the other.
## Strings
Strings are indicated by a `0x02` byte value followed by an integer value to
indicate the number of bytes in the string, followed by the bytes of the
string.
### Encoding
Unlike JSON, strings are not defined as having any particular encoding; they
are transmitted as binary strings. This is because the underlying filesystem
APIs don't define any particular encoding for names.
*Exception:* Keys in objects that are defined by watchman commands are always
ASCII. In general, keys in objects are always UTF-8.
*Rationale:* Several programming languages like Python 3 expect all text to be
in a particular encoding and make it inconvenient to pass in bytestrings or
other encodings. Also, the primary purpose of not defining an encoding is that
filenames don't always have one, and filenames are unlikely to show up as keys.
## Integers
All integers are signed and transmitted in the host byte order of the system
running the watchman daemon.
* `0x03` indicates an int8_t. It is followed by the int8_t value.
* `0x04` indicates an int16_t. It is followed by the int16_t value.
* `0x05` indicates an int32_t. It is followed by the int32_t value.
* `0x06` indicates an int64_t. It is followed by the int64_t value.
## Real
A real number is indicated by a `0x07` byte followed by 8 bytes of double value.
## Boolean
* `0x08` indicates boolean true
* `0x09` indicates boolean false
## Null
`0x0a` indicates the null value
## Array of Templated Objects
`0x0b` indicates a compact array of objects follows. Some of the bigger
datastructures returned by watchman are tabular data expressed as an array
of objects. This serialization type factors out the repeated object keys
into a header array listing the keys, followed by an array containing
all the values of the objects.
To represent missing keys in templated arrays, the `0x0c` encoding value may
be present. If encountered it is interpreted as meaning that there is no value
for the key that would have been decoded in this position. This is distinct
from the null value.
For example:
~~~json
[
{"name": "fred", "age": 20},
{"name": "pete", "age": 30},
{"age": 25 },
]
~~~
is represented similar to:
~~~json
["name", "age"],
[
"fred", 20,
"pete", 30,
0x0c, 25
]
~~~
The precise sequence is:
~~~
0b template
00 array -- start prop names
0302 int, 2 -- two prop names
02 string -- first prop "name"
0304 int, 4
6e616d65 "name"
02 string -- 2nd prop "age"
0303 int, 3
616765 "age"
0303 int, 3 -- there are 3 objects
02 string -- object 1, prop 1 name=fred
0304 int, 4
66726564 "fred"
0314 int 0x14 -- object 1, prop 2 age=20
02 string -- object 2, prop 1 name=pete
0304 int 4
70657465 "pete"
031e int, 0x1e -- object 2, prop 2 age=30
0c skip -- object 3, prop 1, not set
0319 int, 0x19 -- object 3, prop 2 age=25
~~~
Note: to avoid hostile "decompression bombs", Watchman will reject parsing
template objects that have an empty set of keys.
| {
"content_hash": "18892fb259cb65106deb82d99ac5fe77",
"timestamp": "",
"source": "github",
"line_count": 135,
"max_line_length": 80,
"avg_line_length": 29.85925925925926,
"alnum_prop": 0.715703299429422,
"repo_name": "facebook/watchman",
"id": "35fe650925bb7be500a4b47706a7815001e8f9f9",
"size": "4035",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "website/_docs/BSER.markdown",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "366"
},
{
"name": "C",
"bytes": "68699"
},
{
"name": "C++",
"bytes": "1332177"
},
{
"name": "CMake",
"bytes": "111122"
},
{
"name": "CSS",
"bytes": "17348"
},
{
"name": "Dockerfile",
"bytes": "1599"
},
{
"name": "HTML",
"bytes": "37275"
},
{
"name": "Java",
"bytes": "153731"
},
{
"name": "JavaScript",
"bytes": "36532"
},
{
"name": "Python",
"bytes": "854340"
},
{
"name": "Ruby",
"bytes": "17037"
},
{
"name": "Rust",
"bytes": "228777"
},
{
"name": "SCSS",
"bytes": "25149"
},
{
"name": "Shell",
"bytes": "9516"
},
{
"name": "Starlark",
"bytes": "1317"
},
{
"name": "Thrift",
"bytes": "79532"
}
],
"symlink_target": ""
} |
extern void DisplaySproingies(int screen,int pause);
extern void NextSproingieDisplay(int screen,int pause);
extern void ReshapeSproingies(int w, int h);
extern void CleanupSproingies(int screen);
extern void InitSproingies(int wfmode, int grnd, int mspr, int smrtspr,
int screen, int numscreens, int mono);
| {
"content_hash": "5b619b14c46a0d06e3077c32be77fb3b",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 71,
"avg_line_length": 42.125,
"alnum_prop": 0.7359050445103857,
"repo_name": "AstralDynamics/photo-tagger",
"id": "81c6cb7e35d15334816e4c9a7bb2525353d18d98",
"size": "1125",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "xscreensaver-5.29/hacks/glx/sproingies.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "Assembly",
"bytes": "66335"
},
{
"name": "C",
"bytes": "11716548"
},
{
"name": "C++",
"bytes": "24496"
},
{
"name": "CSS",
"bytes": "1937"
},
{
"name": "JavaScript",
"bytes": "6785"
},
{
"name": "Objective-C",
"bytes": "472954"
},
{
"name": "PHP",
"bytes": "315"
},
{
"name": "Perl",
"bytes": "285988"
},
{
"name": "Ruby",
"bytes": "220"
},
{
"name": "Shell",
"bytes": "6185"
},
{
"name": "TeX",
"bytes": "12785"
}
],
"symlink_target": ""
} |
package volumedriver
import (
"encoding/json"
"errors"
"fmt"
"io/ioutil"
"net"
"net/http"
"os"
"path/filepath"
"regexp"
"time"
"github.com/emccode/rexray/daemon/module"
"github.com/emccode/rexray/config"
osm "github.com/emccode/rexray/os"
"github.com/emccode/rexray/storage"
"github.com/emccode/rexray/util"
"github.com/emccode/rexray/volume"
)
const MOD_ADDR = "unix:///run/docker/plugins/rexray.sock"
const MOD_PORT = 7980
const MOD_NAME = "DockerVolumeDriverModule"
const MOD_DESC = "The REX-Ray Docker VolumeDriver module"
type Module struct {
id int32
vdm *volume.VolumeDriverManager
name string
addr string
desc string
}
func init() {
//tcpAddr := fmt.Sprintf("tcp://:%d", MOD_PORT)
_, fsPath, parseAddrErr := util.ParseAddress(MOD_ADDR)
if parseAddrErr != nil {
panic(parseAddrErr)
}
fsPathDir := filepath.Dir(fsPath)
os.MkdirAll(fsPathDir, 0755)
mc := &module.ModuleConfig{
Address: MOD_ADDR,
Config: config.New(),
}
module.RegisterModule(MOD_NAME, true, Init, []*module.ModuleConfig{mc})
}
func (mod *Module) Id() int32 {
return mod.id
}
func Init(id int32, cfg *module.ModuleConfig) (module.Module, error) {
osdm, osdmErr := osm.NewOSDriverManager(cfg.Config)
if osdmErr != nil {
return nil, osdmErr
}
if len(osdm.Drivers) == 0 {
return nil, errors.New("no os drivers initialized")
}
sdm, sdmErr := storage.NewStorageDriverManager(cfg.Config)
if sdmErr != nil {
return nil, sdmErr
}
if len(sdm.Drivers) == 0 {
return nil, errors.New("no storage drivers initialized")
}
vdm, vdmErr := volume.NewVolumeDriverManager(cfg.Config, osdm, sdm)
if vdmErr != nil {
return nil, vdmErr
}
if len(vdm.Drivers) == 0 {
return nil, errors.New("no volume drivers initialized")
}
return &Module{
id: id,
vdm: vdm,
name: MOD_NAME,
desc: MOD_DESC,
addr: cfg.Address,
}, nil
}
const driverName = "dockervolumedriver"
var (
ErrMissingHost = errors.New("Missing host parameter")
ErrBadHostSpecified = errors.New("Bad host specified, ie. unix:///run/docker/plugins/rexray.sock or tcp://127.0.0.1:8080")
ErrBadProtocol = errors.New("Bad protocol specified with host, ie. unix:// or tcp://")
)
type pluginRequest struct {
Name string `json:"Name,omitempty"`
Opts volume.VolumeOpts `json:"Opts,omitempty"`
}
func (mod *Module) Start() error {
proto, addr, parseAddrErr := util.ParseAddress(mod.Address())
if parseAddrErr != nil {
return parseAddrErr
}
const validProtoPatt = "(?i)^unix|tcp$"
isProtoValid, matchProtoErr := regexp.MatchString(validProtoPatt, proto)
if matchProtoErr != nil {
return errors.New(fmt.Sprintf(
"Error matching protocol %s with pattern '%s' ERR: %v",
proto, validProtoPatt, matchProtoErr))
}
if !isProtoValid {
return errors.New(fmt.Sprintf("Invalid protocol %s", proto))
}
if err := os.MkdirAll("/etc/docker/plugins", 0755); err != nil {
return err
}
var specPath string
var startFunc func() error
mux := mod.buildMux()
if proto == "unix" {
sockFile := addr
sockFileDir := filepath.Dir(sockFile)
mkSockFileDirErr := os.MkdirAll(sockFileDir, 0755)
if mkSockFileDirErr != nil {
return mkSockFileDirErr
}
_ = os.RemoveAll(sockFile)
specPath = mod.Address()
startFunc = func() error {
l, lErr := net.Listen("unix", sockFile)
if lErr != nil {
return lErr
}
defer l.Close()
defer os.Remove(sockFile)
return http.Serve(l, mux)
}
} else {
specPath = addr
startFunc = func() error {
s := &http.Server{
Addr: addr,
Handler: mux,
ReadTimeout: 10 * time.Second,
WriteTimeout: 10 * time.Second,
MaxHeaderBytes: 1 << 20,
}
return s.ListenAndServe()
}
}
go func() {
sErr := startFunc()
if sErr != nil {
panic(sErr)
}
}()
writeSpecErr := ioutil.WriteFile(
"/etc/docker/plugins/rexray.spec", []byte(specPath), 0644)
if writeSpecErr != nil {
return writeSpecErr
}
return nil
}
func (mod *Module) Stop() error {
return nil
}
func (mod *Module) Name() string {
return mod.name
}
func (mod *Module) Description() string {
return mod.desc
}
func (mod *Module) Address() string {
return mod.addr
}
func (mod *Module) buildMux() *http.ServeMux {
mux := http.NewServeMux()
mux.HandleFunc("/Plugin.Activate", func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "appplication/vnd.docker.plugins.v1+json")
fmt.Fprintln(w, `{"Implements": ["VolumeDriver"]}`)
})
mux.HandleFunc("/VolumeDriver.Create", func(w http.ResponseWriter, r *http.Request) {
var pr pluginRequest
if err := json.NewDecoder(r.Body).Decode(&pr); err != nil {
http.Error(w, fmt.Sprintf("{\"Error\":\"%s\"}", err.Error()), 500)
return
}
err := mod.vdm.Create(pr.Name, pr.Opts)
if err != nil {
http.Error(w, fmt.Sprintf("{\"Error\":\"%s\"}", err.Error()), 500)
return
}
w.Header().Set("Content-Type", "appplication/vnd.docker.plugins.v1+json")
fmt.Fprintln(w, `{}`)
})
mux.HandleFunc("/VolumeDriver.Remove", func(w http.ResponseWriter, r *http.Request) {
var pr pluginRequest
if err := json.NewDecoder(r.Body).Decode(&pr); err != nil {
http.Error(w, fmt.Sprintf("{\"Error\":\"%s\"}", err.Error()), 500)
return
}
err := mod.vdm.Remove(pr.Name)
if err != nil {
http.Error(w, fmt.Sprintf("{\"Error\":\"%s\"}", err.Error()), 500)
return
}
w.Header().Set("Content-Type", "appplication/vnd.docker.plugins.v1+json")
fmt.Fprintln(w, `{}`)
})
mux.HandleFunc("/VolumeDriver.Path", func(w http.ResponseWriter, r *http.Request) {
var pr pluginRequest
if err := json.NewDecoder(r.Body).Decode(&pr); err != nil {
http.Error(w, fmt.Sprintf("{\"Error\":\"%s\"}", err.Error()), 500)
return
}
mountPath, err := mod.vdm.Path(pr.Name, "")
if err != nil {
http.Error(w, fmt.Sprintf("{\"Error\":\"%s\"}", err.Error()), 500)
return
}
w.Header().Set("Content-Type", "appplication/vnd.docker.plugins.v1+json")
fmt.Fprintln(w, fmt.Sprintf("{\"Mountpoint\": \"%s\"}", mountPath))
})
mux.HandleFunc("/VolumeDriver.Mount", func(w http.ResponseWriter, r *http.Request) {
var pr pluginRequest
if err := json.NewDecoder(r.Body).Decode(&pr); err != nil {
http.Error(w, fmt.Sprintf("{\"Error\":\"%s\"}", err.Error()), 500)
return
}
mountPath, err := mod.vdm.Mount(pr.Name, "", false, "")
if err != nil {
http.Error(w, fmt.Sprintf("{\"Error\":\"%s\"}", err.Error()), 500)
return
}
w.Header().Set("Content-Type", "appplication/vnd.docker.plugins.v1+json")
fmt.Fprintln(w, fmt.Sprintf("{\"Mountpoint\": \"%s\"}", mountPath))
})
mux.HandleFunc("/VolumeDriver.Unmount", func(w http.ResponseWriter, r *http.Request) {
var pr pluginRequest
if err := json.NewDecoder(r.Body).Decode(&pr); err != nil {
http.Error(w, fmt.Sprintf("{\"Error\":\"%s\"}", err.Error()), 500)
return
}
err := mod.vdm.Unmount(pr.Name, "")
if err != nil {
http.Error(w, fmt.Sprintf("{\"Error\":\"%s\"}", err.Error()), 500)
return
}
w.Header().Set("Content-Type", "appplication/vnd.docker.plugins.v1+json")
fmt.Fprintln(w, `{}`)
})
return mux
}
| {
"content_hash": "3b98584e9b8b5eb2a170b4ecff0a5a0c",
"timestamp": "",
"source": "github",
"line_count": 297,
"max_line_length": 123,
"avg_line_length": 23.993265993265993,
"alnum_prop": 0.6493123772102161,
"repo_name": "taik0/rexray",
"id": "6a8f0b820ee59482758e6be6a2ee93653d5fb4bd",
"size": "7126",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "daemon/module/docker/volumedriver/voldriver.go",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "2417"
},
{
"name": "Go",
"bytes": "337939"
},
{
"name": "HTML",
"bytes": "1939"
},
{
"name": "Makefile",
"bytes": "11107"
},
{
"name": "Shell",
"bytes": "1085"
}
],
"symlink_target": ""
} |
<!--
~ Copyright 2014 Mario Guggenberger <mg@protyposis.net>
~
~ Licensed under the Apache License, Version 2.0 (the "License");
~ you may not use this file except in compliance with the License.
~ You may obtain a copy of the License at
~
~ http://www.apache.org/licenses/LICENSE-2.0
~
~ Unless required by applicable law or agreed to in writing, software
~ distributed under the License is distributed on an "AS IS" BASIS,
~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
~ See the License for the specific language governing permissions and
~ limitations under the License.
-->
<resources>
<!-- Default screen margins, per the Android Design guidelines. -->
<dimen name="activity_horizontal_margin">16dp</dimen>
<dimen name="activity_vertical_margin">16dp</dimen>
<dimen name="activity_vertical_margin_half">8dp</dimen>
</resources>
| {
"content_hash": "7d96ffbee05717976516691d6033d090",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 76,
"avg_line_length": 41.40909090909091,
"alnum_prop": 0.716794731064764,
"repo_name": "protyposis/Spectaculum",
"id": "237094f975441c289f85696a2f21e65cf0f6d07e",
"size": "911",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "Spectaculum-Demo/src/main/res/values/dimens.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "598"
},
{
"name": "GLSL",
"bytes": "43877"
},
{
"name": "HTML",
"bytes": "6418"
},
{
"name": "Java",
"bytes": "381813"
}
],
"symlink_target": ""
} |
<?php
/**
* @file
* Contains \Drupal\config\Tests\ConfigExportUITest.
*/
namespace Drupal\config\Tests;
use Drupal\Component\Serialization\Yaml;
use Drupal\Core\Archiver\Tar;
use Drupal\simpletest\WebTestBase;
/**
* Tests the user interface for exporting configuration.
*
* @group config
*/
class ConfigExportUITest extends WebTestBase {
/**
* Modules to enable.
*
* @var array
*/
public static $modules = array('config', 'config_test', 'config_export_test');
/**
* {@inheritdoc}
*/
protected function setUp() {
parent::setUp();
$this->drupalLogin($this->drupalCreateUser(array('export configuration')));
}
/**
* Tests export of configuration.
*/
function testExport() {
// Verify the export page with export submit button is available.
$this->drupalGet('admin/config/development/configuration/full/export');
$this->assertFieldById('edit-submit', t('Export'));
// Submit the export form and verify response.
$this->drupalPostForm('admin/config/development/configuration/full/export', array(), t('Export'));
$this->assertResponse(200, 'User can access the download callback.');
// Test if header contains file name with hostname and timestamp.
$request = \Drupal::request();
$hostname = str_replace('.', '-', $request->getHttpHost());
$header_content_disposition = $this->drupalGetHeader('content-disposition');
$header_match = (boolean) preg_match('/attachment; filename="config-' . preg_quote($hostname) . '-\d{4}-\d{2}-\d{2}-\d{2}-\d{2}\.tar\.gz"/', $header_content_disposition);
$this->assertTrue($header_match, "Header with filename matches the expected format.");
// Get the archived binary file provided to user for download.
$archive_data = $this->getRawContent();
// Temporarily save the archive file.
$uri = file_unmanaged_save_data($archive_data, 'temporary://config.tar.gz');
// Extract the archive and verify it's not empty.
$file_path = file_directory_temp() . '/' . file_uri_target($uri);
$archiver = new Tar($file_path);
$archive_contents = $archiver->listContents();
$this->assert(!empty($archive_contents), 'Downloaded archive file is not empty.');
// Prepare the list of config files from active storage, see
// \Drupal\config\Controller\ConfigController::downloadExport().
$storage_active = $this->container->get('config.storage');
$config_files = array();
foreach ($storage_active->listAll() as $config_name) {
$config_files[] = $config_name . '.yml';
}
// Assert that the downloaded archive file contents are the same as the test
// site active store.
$this->assertIdentical($archive_contents, $config_files);
// Ensure the test configuration override is in effect but was not exported.
$this->assertIdentical(\Drupal::config('system.maintenance')->get('message'), 'Foo');
$archiver->extract(file_directory_temp(), array('system.maintenance.yml'));
$file_contents = file_get_contents(file_directory_temp() . '/' . 'system.maintenance.yml');
$exported = Yaml::decode($file_contents);
$this->assertNotIdentical($exported['message'], 'Foo');
}
}
| {
"content_hash": "4b9bcb17dd54f6adeb279a02170633a5",
"timestamp": "",
"source": "github",
"line_count": 87,
"max_line_length": 174,
"avg_line_length": 36.60919540229885,
"alnum_prop": 0.6756671899529042,
"repo_name": "komejo/d8demo-dev",
"id": "3c672da1de73e21a2d20f95a5812a44147b31545",
"size": "3185",
"binary": false,
"copies": "8",
"ref": "refs/heads/master",
"path": "web/core/modules/config/src/Tests/ConfigExportUITest.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "9118"
},
{
"name": "C++",
"bytes": "13044"
},
{
"name": "CSS",
"bytes": "291673"
},
{
"name": "HTML",
"bytes": "322832"
},
{
"name": "JavaScript",
"bytes": "838628"
},
{
"name": "PHP",
"bytes": "27260329"
},
{
"name": "Shell",
"bytes": "45206"
}
],
"symlink_target": ""
} |
From column: _url_
>``` python
return getCacheBaseUrl()+"page/"+get_url_hash(getValue("url"))+"/"+getValue("ad_timestamp")+"/processed"
```
#### _featureCollection_uri_
From column: _crawl_uri_
>``` python
return getValue("crawl_uri")+"/featurecollection"
```
#### _phoneslist_
From column: _phones_
>``` python
return splitPhoneField(getValue("phones"))
```
#### _phone_clean_
From column: _phones2 / Values_
>``` python
return clean_phone(getValue("Values"))
```
#### _phone_clean2_
From column: _phones2 / phone_clean_
>``` python
return getValue("phone_clean")
```
#### _phone_uri_
From column: _phones2 / phone_clean2_
>``` python
uri = phone_uri(getValue("phone_clean"))
if uri:
return getValue("featureCollection_uri") + "/" + uri
```
#### _phone_label_
From column: _phones2 / phone_uri_
>``` python
return getValue("phone_clean")
```
#### _phone_uri2_
From column: _phones2 / phone_label_
>``` python
return phone_uri(getValue("phone_clean"))
```
#### _exchange_uri_
From column: _phones2 / phone_uri2_
>``` python
if getValue("phone_clean"):
return phoneExchangeUri(getValue("phone_clean"))
```
#### _database_id_
From column: _phones2 / exchange_uri_
>``` python
if getValue("phone_clean"):
return getValue("ID")
return ''
```
#### _stanford_gentime_iso_
From column: _phones2 / stanford_gentime_
>``` python
if getValue("phone_clean"):
return iso8601date(getValue("stanford_gentime"))
return ''
```
### Semantic Types
| Column | Property | Class |
| ----- | -------- | ----- |
| _crawl_uri_ | `uri` | `schema:WebPage1`|
| _database_id_ | `memex:databaseId` | `prov:Activity1`|
| _exchange_uri_ | `uri` | `schema:Place1`|
| _featureCollection_uri_ | `uri` | `memex:FeatureCollection1`|
| _phone_clean_ | `memex:featureValue` | `memex:Feature1`|
| _phone_clean2_ | `memex:phonenumber` | `memex:Feature1`|
| _phone_label_ | `rdfs:label` | `memex:PhoneNumber1`|
| _phone_uri_ | `uri` | `memex:Feature1`|
| _phone_uri2_ | `uri` | `memex:PhoneNumber1`|
| _stanford_gentime_iso_ | `prov:endedAtTime` | `prov:Activity1`|
### Links
| From | Property | To |
| --- | -------- | ---|
| `memex:Feature1` | `memex:featureName` | `xsd:phonenumber`|
| `memex:Feature1` | `memex:featureObject` | `memex:PhoneNumber1`|
| `memex:Feature1` | `prov:wasGeneratedBy` | `prov:Activity1`|
| `memex:Feature1` | `prov:wasDerivedFrom` | `schema:WebPage1`|
| `memex:FeatureCollection1` | `memex:phonenumber_feature` | `memex:Feature1`|
| `memex:PhoneNumber1` | `schema:location` | `schema:Place1`|
| `prov:Activity1` | `prov:wasAttributedTo` | `xsd:http://memex.zapto.org/data/software/extractor/stanford/version/0.1`|
| `schema:WebPage1` | `memex:hasFeatureCollection` | `memex:FeatureCollection1`|
| {
"content_hash": "c05f5fc403fae2e73c551961c4598322",
"timestamp": "",
"source": "github",
"line_count": 100,
"max_line_length": 120,
"avg_line_length": 27.09,
"alnum_prop": 0.6563307493540051,
"repo_name": "darkshadows123/dig-alignment",
"id": "b096a72bbeb8fb70e956a7d7429c7c6f89fc6521",
"size": "2777",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "versions/1.0/datasets/istr/stanford-extractions/z-attic/model-phone/stanford-phone-model.md",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "494289"
},
{
"name": "Julia",
"bytes": "17139"
},
{
"name": "PHP",
"bytes": "2170107"
},
{
"name": "Python",
"bytes": "798362"
},
{
"name": "Shell",
"bytes": "37685"
},
{
"name": "Web Ontology Language",
"bytes": "13120"
}
],
"symlink_target": ""
} |
from django.db import models
from rest_framework.serializers import ModelSerializer
from mapentity.serializers import fields
class MapentityDatatableSerializer(ModelSerializer):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
# patch mapping fields to use datatables format
mappings = self.serializer_field_mapping.copy()
mappings.update({
models.BooleanField: fields.MapentityDatatableBooleanField,
models.DateTimeField: fields.MapentityDatatableDateTimeField,
models.DateField: fields.MapentityDatatableDateField,
})
self.serializer_field_mapping = mappings
| {
"content_hash": "8e2ef7e664ae85d44cfae80f481c8a27",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 73,
"avg_line_length": 39.64705882352941,
"alnum_prop": 0.712166172106825,
"repo_name": "makinacorpus/django-mapentity",
"id": "364510b1ed041455d396c9a59c3ae82cf967ee4e",
"size": "674",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "mapentity/serializers/datatables.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "43931"
},
{
"name": "Dockerfile",
"bytes": "743"
},
{
"name": "HTML",
"bytes": "97794"
},
{
"name": "JavaScript",
"bytes": "451716"
},
{
"name": "Python",
"bytes": "261566"
}
],
"symlink_target": ""
} |
extern crate test;
fn main() {
println!("{}", order("is2 Thi1s T4est 3a"));
}
// Description:
// Your task is to sort a given string. Each word in the String will contain a single number. This number is the position the word should have in the result.
// Note: Numbers can be from 1 to 9. So 1 will be the first word (not 0).
// If the input String is empty, return an empty String. The words in the input String will only contain valid consecutive numbers.
// For an input: "is2 Thi1s T4est 3a" the function should return "Thi1s is2 3a T4est"
pub fn order( input: &str ) -> String {
let split = input.split(" ");
let mut tokens = Vec::new();
for s in split {
tokens.push(s);
}
let nums = input.chars().filter_map(|a| a.to_digit(10)).collect::<Vec<_>>();
if tokens.len() < 2 {
return input.to_string()
}
if nums.len() != tokens.len() {
println!("Rules of the game weren't followed!");
return input.to_string()
}
// const val: usize = nums.len();
let mut ordered = vec![String::new(); nums.len()];
for idx in 0..nums.len() {
let n: u32 = nums[idx] - 1;
ordered[n as usize] = tokens[idx as usize].to_string();
}
let mut retval = String::new();
for o in ordered {
retval += &o;
retval += " ";
}
let r = retval.trim();
r.to_string()
}
#[cfg(test)]
mod tests {
use super::*;
use test::Bencher;
#[test]
fn returns_expected() {
assert_eq!(order("is2 Thi1s T4est 3a"), "Thi1s is2 3a T4est");
assert_eq!(order(""), "");
}
// #[bench]
// fn bench_order(b: &mut Bencher) {
// let bench_string = "fir6st at12 g11ood 5the someth13ing som3ething Suck1ing i4s 2at becom9ing 8to s10orta ste7p";
// let answer = "Suck1ing 2at som3ething i4s 5the fir6st ste7p 8to becom9ing s10orta g11ood at12 someth13ing";
// b.iter(|| {
// assert_eq!(order(bench_string), answer);
// });
// }
} | {
"content_hash": "ddf35e6a70552647e763f084c3387b9c",
"timestamp": "",
"source": "github",
"line_count": 76,
"max_line_length": 157,
"avg_line_length": 26.513157894736842,
"alnum_prop": 0.5851116625310173,
"repo_name": "snewt/rust-challenges",
"id": "b2705f917bd16ff6be1ae16dccba11d1fd2274c8",
"size": "2033",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "order/src/main.rs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "685"
},
{
"name": "Rust",
"bytes": "79548"
}
],
"symlink_target": ""
} |
set -e
echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}"
install_framework()
{
if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then
local source="${BUILT_PRODUCTS_DIR}/$1"
elif [ -r "${BUILT_PRODUCTS_DIR}/$(basename "$1")" ]; then
local source="${BUILT_PRODUCTS_DIR}/$(basename "$1")"
elif [ -r "$1" ]; then
local source="$1"
fi
local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}"
if [ -L "${source}" ]; then
echo "Symlinked..."
source="$(readlink "${source}")"
fi
# use filter instead of exclude so missing patterns dont' throw errors
echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\""
rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}"
local basename
basename="$(basename -s .framework "$1")"
binary="${destination}/${basename}.framework/${basename}"
if ! [ -r "$binary" ]; then
binary="${destination}/${basename}"
fi
# Strip invalid architectures so "fat" simulator / device frameworks work on device
if [[ "$(file "$binary")" == *"dynamically linked shared library"* ]]; then
strip_invalid_archs "$binary"
fi
# Resign the code if required by the build settings to avoid unstable apps
code_sign_if_enabled "${destination}/$(basename "$1")"
# Embed linked Swift runtime libraries. No longer necessary as of Xcode 7.
if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then
local swift_runtime_libs
swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]})
for lib in $swift_runtime_libs; do
echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\""
rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}"
code_sign_if_enabled "${destination}/${lib}"
done
fi
}
# Signs a framework with the provided identity
code_sign_if_enabled() {
if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then
# Use the current code_sign_identitiy
echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}"
local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'"
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
code_sign_cmd="$code_sign_cmd &"
fi
echo "$code_sign_cmd"
eval "$code_sign_cmd"
fi
}
# Strip invalid architectures
strip_invalid_archs() {
binary="$1"
# Get architectures for current file
archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)"
stripped=""
for arch in $archs; do
if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then
# Strip non-valid architectures in-place
lipo -remove "$arch" -output "$binary" "$binary" || exit 1
stripped="$stripped $arch"
fi
done
if [[ "$stripped" ]]; then
echo "Stripped $binary of architectures:$stripped"
fi
}
if [[ "$CONFIGURATION" == "Debug" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/JDCoordinator/JDCoordinator.framework"
fi
if [[ "$CONFIGURATION" == "Release" ]]; then
install_framework "$BUILT_PRODUCTS_DIR/JDCoordinator/JDCoordinator.framework"
fi
if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then
wait
fi
| {
"content_hash": "104d3df6b9ab87ab93c9d4c6210cfc72",
"timestamp": "",
"source": "github",
"line_count": 98,
"max_line_length": 209,
"avg_line_length": 37.92857142857143,
"alnum_prop": 0.6319612590799032,
"repo_name": "charmaex/JDCoordinator",
"id": "e61fdf0bab86e1e19a9058f87d8666258b7496f4",
"size": "3727",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Example/Pods/Target Support Files/Pods-JDCoordinator_Example/Pods-JDCoordinator_Example-frameworks.sh",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "Objective-C",
"bytes": "1440"
},
{
"name": "Ruby",
"bytes": "825"
},
{
"name": "Shell",
"bytes": "17333"
},
{
"name": "Swift",
"bytes": "48301"
}
],
"symlink_target": ""
} |
import { merge } from 'lodash';
import * as papaparse from 'papaparse';
const defaultOptions = {
skipEmptyLines: true,
};
export class ParserUtils {
/**
* parses the given csv file/blob using PapaParse
* @param data
* @param options additional options
* @return {Promise<R>|Promise}
*/
static parseCSV(data, options = {}) {
return new Promise((resolve, reject) => {
papaparse.parse(data, merge({
complete: (result) => resolve({ data: result.data, meta: result.meta }),
error: (error) => reject(error),
}, defaultOptions, options));
});
}
static streamCSV(data, chunk, options = {}) {
return new Promise((resolve, reject) => {
papaparse.parse(data, merge({
complete: (result) => resolve(null),
chunk: (result) => chunk({ data: result.data, meta: result.meta }),
error: (error) => reject(error),
}, defaultOptions, options));
});
}
}
//# sourceMappingURL=parser.js.map | {
"content_hash": "0283347d06a11d06c76b4c31bc3bb993",
"timestamp": "",
"source": "github",
"line_count": 31,
"max_line_length": 88,
"avg_line_length": 34.67741935483871,
"alnum_prop": 0.5553488372093023,
"repo_name": "datavisyn/tdp_core",
"id": "f4a0e23ca04fa39861c00c385dd4101e9b7295e0",
"size": "1075",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "dist/import/parser.js",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "EJS",
"bytes": "572"
},
{
"name": "HTML",
"bytes": "2127"
},
{
"name": "JavaScript",
"bytes": "13690"
},
{
"name": "Makefile",
"bytes": "1354"
},
{
"name": "Python",
"bytes": "234612"
},
{
"name": "SCSS",
"bytes": "82214"
},
{
"name": "TypeScript",
"bytes": "1520578"
}
],
"symlink_target": ""
} |
Ext.application({
views: [
'Main',
'DatabaseSelectionWindow',
'CreateCollectionWindow'
],
models: [
'Collection'
],
stores: [
'Collection'
],
autoCreateViewport: true,
name: 'datastore'
});
Ext.Loader.setConfig({
enabled: true
}); | {
"content_hash": "955a89001679c09e7f822678e1273040",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 35,
"avg_line_length": 18.5,
"alnum_prop": 0.4924924924924925,
"repo_name": "Gnail-nehc/datastore",
"id": "ed8f9829d9fddac2fcc2729cb274a489e3411c22",
"size": "333",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "WebContent/app.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "491"
},
{
"name": "Java",
"bytes": "28977"
},
{
"name": "JavaScript",
"bytes": "14859"
}
],
"symlink_target": ""
} |
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Android.App;
using Android.Content;
using Android.OS;
using Android.Runtime;
using Android.Views;
using Android.Widget;
namespace ProjectTracker.AndroidUI.ViewModels
{
public class MainPage : Csla.Axml.ViewModel<string[]>
{
}
} | {
"content_hash": "d2a78a6bdfd532e23877b8cbd90d2902",
"timestamp": "",
"source": "github",
"line_count": 18,
"max_line_length": 57,
"avg_line_length": 18.5,
"alnum_prop": 0.7687687687687688,
"repo_name": "BrettJaner/csla",
"id": "45a523ea88c43ecbf944bb8f493d65d87f50f63b",
"size": "333",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Samples/NET/cs/ProjectTracker/AndroidUI/ViewModels/MainPage.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "13295"
},
{
"name": "Batchfile",
"bytes": "1434"
},
{
"name": "C#",
"bytes": "4395424"
},
{
"name": "HTML",
"bytes": "52832"
},
{
"name": "PowerShell",
"bytes": "25361"
},
{
"name": "Shell",
"bytes": "533"
},
{
"name": "Visual Basic",
"bytes": "42440"
}
],
"symlink_target": ""
} |
@extends('layouts.app')
@section('content')
<section class="content-header">
<h1>
Comuna
</h1>
</section>
<div class="content">
<div class="box box-primary">
<div class="box-body">
<div class="row" style="padding-left: 20px">
@include('comunas.show_fields')
<a href="{!! route('comunas.index') !!}" class="btn btn-default">Back</a>
</div>
</div>
</div>
</div>
@endsection
| {
"content_hash": "48ea90a2fee1a8d160fa28184a5b102b",
"timestamp": "",
"source": "github",
"line_count": 19,
"max_line_length": 93,
"avg_line_length": 27.842105263157894,
"alnum_prop": 0.46502835538752363,
"repo_name": "chelopezlo/backend-congreso",
"id": "1271cad2f30269532a515fbb5713801c7cb99069",
"size": "529",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "resources/views/comunas/show.blade.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "553"
},
{
"name": "CSS",
"bytes": "72"
},
{
"name": "HTML",
"bytes": "110188"
},
{
"name": "JavaScript",
"bytes": "503"
},
{
"name": "PHP",
"bytes": "467517"
}
],
"symlink_target": ""
} |
require 'test_helper'
class OfferTest < ActiveSupport::TestCase
should_belong_to :account
should_validate_presence_of :name, :text, :account_id
end
| {
"content_hash": "9438e3ae2ebec3037692c43cf4db3321",
"timestamp": "",
"source": "github",
"line_count": 8,
"max_line_length": 55,
"avg_line_length": 19.625,
"alnum_prop": 0.7452229299363057,
"repo_name": "CarouselSMS/RecessApp",
"id": "e065f8abeaddbae2f6d034c5a22df4db1e624b0b",
"size": "157",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/unit/offer_test.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "113"
},
{
"name": "CSS",
"bytes": "68537"
},
{
"name": "HTML",
"bytes": "198237"
},
{
"name": "JavaScript",
"bytes": "39932"
},
{
"name": "Ruby",
"bytes": "332177"
}
],
"symlink_target": ""
} |
using System.Linq.Expressions;
using Polyglot;
using Cysharp.Threading.Tasks;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class SettingsScreen : Screen, ScreenChangeListener
{
public const string Id = "Settings";
public override string GetId() => Id;
public UpperOverlay upperOverlay;
public RectTransform generalTab;
public RectTransform gameplayTab;
public RectTransform visualTab;
public RectTransform advancedTab;
public ContentTabs contentTabs;
public override void OnScreenInitialized()
{
base.OnScreenInitialized();
contentTabs.onTabSelect.AddListener((index, _) =>
{
switch (index)
{
case 0:
upperOverlay.contentRect = generalTab;
break;
case 1:
upperOverlay.contentRect = gameplayTab;
break;
case 2:
upperOverlay.contentRect = visualTab;
break;
case 3:
upperOverlay.contentRect = advancedTab;
break;
}
});
}
public override void OnScreenBecameActive()
{
base.OnScreenBecameActive();
InstantiateSettings();
Context.OnLanguageChanged.AddListener(() =>
{
DestroySettings();
InstantiateSettings();
});
}
private void InstantiateSettings()
{
SettingsFactory.InstantiateGeneralSettings(generalTab, true);
SettingsFactory.InstantiateGameplaySettings(gameplayTab);
SettingsFactory.InstantiateVisualSettings(visualTab);
SettingsFactory.InstantiateAdvancedSettings(advancedTab, true);
async void Fix(Transform transform)
{
LayoutStaticizer.Activate(transform);
LayoutFixer.Fix(transform);
await UniTask.DelayFrame(5);
LayoutStaticizer.Staticize(transform);
}
Fix(generalTab.parent);
Fix(gameplayTab.parent);
Fix(visualTab.parent);
Fix(advancedTab.parent);
}
private void DestroySettings()
{
foreach (Transform child in generalTab) Destroy(child.gameObject);
foreach (Transform child in gameplayTab) Destroy(child.gameObject);
foreach (Transform child in visualTab) Destroy(child.gameObject);
foreach (Transform child in advancedTab) Destroy(child.gameObject);
}
public override void OnScreenChangeFinished(Screen from, Screen to)
{
base.OnScreenChangeFinished(from, to);
if (from == this) DestroySettings();
}
} | {
"content_hash": "11710cbcc9d09d0c2097f66f9e98ea0c",
"timestamp": "",
"source": "github",
"line_count": 90,
"max_line_length": 75,
"avg_line_length": 30.044444444444444,
"alnum_prop": 0.6168639053254438,
"repo_name": "TigerHix/Cytoid",
"id": "9cd338dd70b0509babad79168fa942c036a4d9a0",
"size": "2704",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "Assets/Scripts/Navigation/Screens/Settings/SettingsScreen.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "457486"
},
{
"name": "Objective-C++",
"bytes": "533"
},
{
"name": "ShaderLab",
"bytes": "22978"
}
],
"symlink_target": ""
} |
require 'base32/crockford'
| {
"content_hash": "124fb419e6de8c262115142c7818e2b4",
"timestamp": "",
"source": "github",
"line_count": 1,
"max_line_length": 26,
"avg_line_length": 27,
"alnum_prop": 0.8148148148148148,
"repo_name": "wrimle/base32_pure",
"id": "f31357da1784b49c7789d72a246fab8a3b42024b",
"size": "28",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/base32_pure.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Ruby",
"bytes": "7507"
}
],
"symlink_target": ""
} |
#pragma once
#ifdef WITH_EASTL
#include <EASTL/sort.h>
using eastl::sort;
#else
#include <algorithm>
using std::sort;
#endif
| {
"content_hash": "e67c74dbe0e9c1920008f8d9f8150eb9",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 23,
"avg_line_length": 10,
"alnum_prop": 0.7076923076923077,
"repo_name": "BSVino/Digitanks",
"id": "2d07eb49008fa65f43dad5f34b3a8ff989697f55",
"size": "1745",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "common/tsort.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "201109"
},
{
"name": "C++",
"bytes": "3156395"
},
{
"name": "Java",
"bytes": "49848"
},
{
"name": "Objective-C",
"bytes": "3541"
},
{
"name": "Shell",
"bytes": "516"
}
],
"symlink_target": ""
} |
/* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.flowable.idm.engine.impl.persistence.entity.data.impl;
import java.util.List;
import org.flowable.idm.engine.IdmEngineConfiguration;
import org.flowable.idm.engine.impl.persistence.entity.IdmByteArrayEntity;
import org.flowable.idm.engine.impl.persistence.entity.IdmByteArrayEntityImpl;
import org.flowable.idm.engine.impl.persistence.entity.data.AbstractIdmDataManager;
import org.flowable.idm.engine.impl.persistence.entity.data.ByteArrayDataManager;
/**
* @author Joram Barrez
*/
public class MybatisByteArrayDataManager extends AbstractIdmDataManager<IdmByteArrayEntity> implements ByteArrayDataManager {
public MybatisByteArrayDataManager(IdmEngineConfiguration idmEngineConfiguration) {
super(idmEngineConfiguration);
}
@Override
public IdmByteArrayEntity create() {
return new IdmByteArrayEntityImpl();
}
@Override
public Class<? extends IdmByteArrayEntity> getManagedEntityClass() {
return IdmByteArrayEntityImpl.class;
}
@Override
@SuppressWarnings("unchecked")
public List<IdmByteArrayEntity> findAll() {
return getDbSqlSession().selectList("selectIdmByteArrays");
}
@Override
public void deleteByteArrayNoRevisionCheck(String byteArrayEntityId) {
getDbSqlSession().delete("deleteIdmByteArrayNoRevisionCheck", byteArrayEntityId);
}
}
| {
"content_hash": "0f5c5caca4ced0d727375c65e7978179",
"timestamp": "",
"source": "github",
"line_count": 53,
"max_line_length": 125,
"avg_line_length": 36.39622641509434,
"alnum_prop": 0.7667185069984448,
"repo_name": "zwets/flowable-engine",
"id": "19090eb0bede459adff09de892a76ee549d4cd47",
"size": "1929",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "modules/flowable-idm-engine/src/main/java/org/flowable/idm/engine/impl/persistence/entity/data/impl/MybatisByteArrayDataManager.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "166"
},
{
"name": "CSS",
"bytes": "685672"
},
{
"name": "Groovy",
"bytes": "476"
},
{
"name": "HTML",
"bytes": "933494"
},
{
"name": "Java",
"bytes": "27523387"
},
{
"name": "JavaScript",
"bytes": "13015825"
},
{
"name": "PLSQL",
"bytes": "72105"
},
{
"name": "PLpgSQL",
"bytes": "8658"
},
{
"name": "Shell",
"bytes": "18141"
}
],
"symlink_target": ""
} |
<?php
/**
* Created by PhpStorm.
* User: yuriy
* Date: 26.10.17
* Time: 16.17
*/
namespace AppBundle\DBManager;
use Doctrine\Common\Persistence\ManagerRegistry;
use AppBundle\Entity\User;
use AppBundle\Entity\UserToken;
class UserDBManager
{
private $db;
const BYTE_COUNT = 32;
const REGISTRATION_TYPE = 'registration';
const RECOVER_TYPE = 'recover';
public function __construct(ManagerRegistry $doctrine)
{
$this->db = $doctrine->getManager();
}
public function addUser(User $user)
{
$userToken = new UserToken($user, self::REGISTRATION_TYPE, $this->getToken(), $this->getTime());
$user->setUserToken($userToken);
$this->db->persist($user);
$this->db->persist($userToken);
$this->db->flush();
}
public function getUser(string $email)
{
return $this->db
->getRepository('AppBundle\Entity\User')
->findOneBy(['email' => $email]);
}
public function isUserExist(string $email): bool
{
return null !== $this->getUser($email);
}
public function getUserByToken(string $token):? User
{
$userToken = $this->db
->getRepository('AppBundle\Entity\UserToken')
->findOneBy(['token' => $token]);
if ($userToken) {
return $userToken->getUser();
} else {
return null;
}
}
public function isUserExistByToken(string $token): bool
{
return null !== $this->getUserByToken($token);
}
public function getUserById(int $id):? User
{
return $this->db
->getRepository('AppBundle\Entity\User')
->findOneBy(['id' => $id]);
}
public function activateUser(User $user)
{
$user->setIsActive(true);
$userToken = $user->getUserToken();
$this->db->remove($userToken);
$this->db->flush();
}
public function resetPassword(User $user)
{
$userToken = new UserToken($user, self::RECOVER_TYPE, $this->getToken(), $this->getTime());
$user->setUserToken($userToken);
$this->db->persist($user);
$this->db->persist($userToken);
$this->db->flush();
}
public function updatePassword(User $user)
{
$userToken = $user->getUserToken();
$this->db->remove($userToken);
$this->db->persist($user);
$this->db->flush();
}
public function isRegistrationToken(string $token): bool
{
$userToken = $this->getUserByToken($token)->getUserToken();
return $userToken->getType() === self::REGISTRATION_TYPE;
}
public function isRecoverToken(string $token): bool
{
$userToken = $this->getUserByToken($token)->getUserToken();
return $userToken->getType() === self::RECOVER_TYPE;
}
private function getToken(): string
{
return bin2hex(openssl_random_pseudo_bytes(self::BYTE_COUNT));
}
private function getTime(): \DateTime
{
return new \DateTime();
}
} | {
"content_hash": "a00cb75d7187837418ce96715ed1e95d",
"timestamp": "",
"source": "github",
"line_count": 118,
"max_line_length": 104,
"avg_line_length": 25.85593220338983,
"alnum_prop": 0.5824319895116356,
"repo_name": "Kushnerevich/itransition_course_work",
"id": "19843d18b4c30619e71742d63199dd28a9e29636",
"size": "3051",
"binary": false,
"copies": "1",
"ref": "refs/heads/CreateLoginPage",
"path": "src/AppBundle/DBManager/UserDBManager.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "3539"
},
{
"name": "HTML",
"bytes": "5265"
},
{
"name": "PHP",
"bytes": "90588"
}
],
"symlink_target": ""
} |
module.exports = function(grunt) {
grunt.loadNpmTasks("grunt-clean")
grunt.loadNpmTasks("grunt-contrib-copy")
grunt.loadNpmTasks("grunt-contrib-coffee")
grunt.loadNpmTasks("grunt-contrib-watch")
grunt.initConfig({
clean: {
build: "public"
},
copy: {
assets: {
files: {
"public/": "client/assets/**"
}
}
},
coffee: {
compile: {
files: {
"public/*.js": "client/coffee/**"
}
}
},
watch: {
coffee: {
files: "client/coffee/**",
tasks: "coffee:compile"
}
}
})
grunt.registerTask("build", "clean:build copy:assets coffee:compile")
grunt.registerTask("build-watch", "build watch")
grunt.registerTask("default", "build")
}
| {
"content_hash": "23551d8135d753a5f8193dd512d67a6a",
"timestamp": "",
"source": "github",
"line_count": 38,
"max_line_length": 71,
"avg_line_length": 20.473684210526315,
"alnum_prop": 0.5449871465295629,
"repo_name": "michelt/orator",
"id": "462e8e5f973c5e39b2a91bc5325519bd3cb11956",
"size": "778",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "grunt.js",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "CoffeeScript",
"bytes": "26913"
},
{
"name": "F#",
"bytes": "3308"
},
{
"name": "JavaScript",
"bytes": "428830"
},
{
"name": "PHP",
"bytes": "184"
},
{
"name": "Perl",
"bytes": "1090"
}
],
"symlink_target": ""
} |
package main
import (
"net/http"
)
func ExtractApAiKeysFromRequest(r *http.Request) (searchApiKey string, displayApiKey string, err error) {
values := r.URL.Query()
searchApiKey = values.Get("search_api_key")
displayApiKey = values.Get("display_api_key")
if len(searchApiKey) == 0 || len(displayApiKey) == 0 {
err = MissingApiKeys{}
}
return
}
func ExtractGidFromRequest(r *http.Request) (string, error) {
params := r.URL.Query()
gid := params.Get("gid")
if len(gid) != 36 {
return gid, InvalidGid{ gid }
}
return gid, nil
}
| {
"content_hash": "61f48e64860bca3cb8c2b852346a764b",
"timestamp": "",
"source": "github",
"line_count": 28,
"max_line_length": 105,
"avg_line_length": 20.142857142857142,
"alnum_prop": 0.6631205673758865,
"repo_name": "pilu/microphone",
"id": "ec32fa8bb229cf0c37533c446651c7cd404b1a45",
"size": "564",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "utils.go",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Go",
"bytes": "6379"
}
],
"symlink_target": ""
} |
from keystone.backends.api import BaseUserAPI
#Base APIs
class RAXEXTBaseUserAPI(BaseUserAPI):
def get_by_group(self, user_id, group_id):
raise NotImplementedError
def tenant_group(self, values):
raise NotImplementedError
def tenant_group_delete(self, id, group_id):
raise NotImplementedError
def get_groups(self, id):
raise NotImplementedError
def users_tenant_group_get_page(self, group_id, marker, limit):
raise NotImplementedError
def users_tenant_group_get_page_markers(self, group_id, marker, limit):
raise NotImplementedError
def get_group_by_tenant(self, id):
raise NotImplementedError
def delete_tenant_user(self, id, tenant_id):
raise NotImplementedError
def users_get_by_tenant(self, user_id, tenant_id):
raise NotImplementedError
def user_role_add(self, values):
raise NotImplementedError
def user_get_update(self, id):
raise NotImplementedError
def users_get_page(self, marker, limit):
raise NotImplementedError
def users_get_page_markers(self, marker, limit):
raise NotImplementedError
def users_get_by_tenant_get_page(self, tenant_id, role_id, marker, limit):
raise NotImplementedError
def users_get_by_tenant_get_page_markers(self, tenant_id,
role_id, marker, limit):
raise NotImplementedError
def check_password(self, user, password):
raise NotImplementedError
class RAXEXTBaseTenantGroupAPI(object):
def create(self, values):
raise NotImplementedError
def is_empty(self, id):
raise NotImplementedError
def get(self, id, tenant):
raise NotImplementedError
def get_page(self, tenant_id, marker, limit):
raise NotImplementedError
def get_page_markers(self, tenant_id, marker, limit):
raise NotImplementedError
def update(self, id, tenant_id, values):
raise NotImplementedError
def delete(self, id, tenant_id):
raise NotImplementedError
class RAXEXTBaseGroupAPI(object):
def get(self, id):
raise NotImplementedError
def get_users(self, id):
raise NotImplementedError
def get_all(self):
raise NotImplementedError
def get_page(self, marker, limit):
raise NotImplementedError
def get_page_markers(self, marker, limit):
raise NotImplementedError
def delete(self, id):
raise NotImplementedError
def get_by_user_get_page(self, user_id, marker, limit):
raise NotImplementedError
def get_by_user_get_page_markers(self, user_id, marker, limit):
raise NotImplementedError
#API
#TODO(Yogi) Refactor all API to separate classes specific to models.
GROUP = RAXEXTBaseGroupAPI()
TENANT_GROUP = RAXEXTBaseTenantGroupAPI()
USER = RAXEXTBaseUserAPI()
# Function to dynamically set module references.
def set_value(variable_name, value):
if variable_name == 'group':
global GROUP
GROUP = value
elif variable_name == 'tenant_group':
global TENANT_GROUP
TENANT_GROUP = value
elif variable_name == 'user':
global USER
USER = value
| {
"content_hash": "8ebb22f3cab2e7e5905c3739ebedfcd0",
"timestamp": "",
"source": "github",
"line_count": 123,
"max_line_length": 78,
"avg_line_length": 26.341463414634145,
"alnum_prop": 0.6719135802469136,
"repo_name": "admiyo/keystone",
"id": "1882a13fecf408811c1f72883886fccf15938dfe",
"size": "3888",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "keystone/contrib/extensions/service/raxgrp/api.py",
"mode": "33261",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "32945"
},
{
"name": "JavaScript",
"bytes": "67937"
},
{
"name": "Python",
"bytes": "1339048"
},
{
"name": "Shell",
"bytes": "7400"
},
{
"name": "XSLT",
"bytes": "52086"
}
],
"symlink_target": ""
} |
using System;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection;
using Evergreen.Dwarf.Extensions;
using Evergreen.Dwarf.Interfaces;
using Evergreen.Dwarf.Utilities;
namespace Evergreen.Dwarf.Attributes
{
/// <summary>
/// Attribute for ManyToMany properies in Dwarf derived types.
/// </summary>
[AttributeUsage(AttributeTargets.Property)]
public class ManyToManyAttribute : Attribute, IUnvalidatable
{
#region Constructors
/// <summary>
/// Default Constructor
/// </summary>
public ManyToManyAttribute()
{
}
/// <summary>
/// Constructor will all parameters
/// </summary>
public ManyToManyAttribute(string tableName)
{
TableName = tableName;
}
#endregion Constructors
#region Properties
/// <summary>
/// Gets or Sets the name of the ManyTomany table
/// </summary>
public string TableName { get; set; }
#endregion Properties
#region Methods
#region GetAttribute
/// <summary>
/// Returns the OneToMany attribute if exists
/// </summary>
public static ManyToManyAttribute GetAttribute(PropertyInfo propertyInfo)
{
return propertyInfo.GetCustomAttributes(false).OfType<ManyToManyAttribute>().FirstOrDefault();
}
#endregion GetAttribute
#region GetTableName
/// <summary>
/// Returns the ManyToMany table name for the supplied criteria
/// </summary>
public static string GetTableName(Type type, PropertyInfo pi)
{
var att = GetAttribute(pi);
if (att == null)
throw new NullReferenceException(pi.Name + " is missing the OneToMany attribute...");
if (!string.IsNullOrEmpty(att.TableName))
return att.TableName;
return GetManyToManyTableName(type, pi.PropertyType.GetGenericArguments()[0]);
}
/// <summary>
/// Returns the ManyToMany table name for the supplied criteria
/// </summary>
public static string GetTableName<T>(Expression<Func<T, object>> exp)
{
var pi = PropertyHelper.GetProperty(DwarfHelper.DeProxyfy(typeof(T)), ReflectionHelper.GetPropertyName(exp));
return GetTableName(typeof(T), pi.ContainedProperty);
}
internal static string GetManyToManyTableName(Type type1, Type type2, string alternateTableName = null)
{
return alternateTableName ??
new[] { type1, type2 }.OrderBy(x => x.Name).Flatten(x => "To" + x.Name).TruncateStart(2);
}
#endregion GetTableName
#endregion Methods
}
}
| {
"content_hash": "102410b1b5064df3ca3a4b80140e6fdf",
"timestamp": "",
"source": "github",
"line_count": 98,
"max_line_length": 121,
"avg_line_length": 28.622448979591837,
"alnum_prop": 0.6103386809269162,
"repo_name": "GreenfieldVentures/Dwarf",
"id": "4bfc464a686c06b497dc6548b7da27dc9318d47c",
"size": "2807",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Attributes/ManyToManyAttribute.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "120"
},
{
"name": "C#",
"bytes": "388425"
}
],
"symlink_target": ""
} |
using log4net;
using log4net.Config;
using Nini.Config;
using OpenSim.Framework;
using System;
using System.IO;
using System.Reflection;
namespace pCampBot
{
/// <summary>
/// Event Types from the BOT. Add new events here
/// </summary>
public enum EventType : int
{
NONE = 0,
CONNECTED = 1,
DISCONNECTED = 2
}
public class pCampBot
{
public const string ConfigFileName = "pCampBot.ini";
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
[STAThread]
public static void Main(string[] args)
{
XmlConfigurator.Configure();
IConfig commandLineConfig = ParseConfig(args);
if (commandLineConfig.Get("help") != null || commandLineConfig.Get("loginuri") == null)
{
Help();
}
else if (
commandLineConfig.Get("firstname") == null
|| commandLineConfig.Get("lastname") == null
|| commandLineConfig.Get("password") == null)
{
Console.WriteLine("ERROR: You must supply a firstname, lastname and password for the bots.");
}
else
{
BotManager bm = new BotManager();
string iniFilePath = Path.GetFullPath(Path.Combine(Util.configDir(), ConfigFileName));
if (File.Exists(iniFilePath))
{
m_log.InfoFormat("[PCAMPBOT]: Reading configuration settings from {0}", iniFilePath);
IConfigSource configSource = new IniConfigSource(iniFilePath);
IConfig botManagerConfig = configSource.Configs["BotManager"];
if (botManagerConfig != null)
{
bm.LoginDelay = botManagerConfig.GetInt("LoginDelay", bm.LoginDelay);
}
IConfig botConfig = configSource.Configs["Bot"];
if (botConfig != null)
{
bm.InitBotSendAgentUpdates
= botConfig.GetBoolean("SendAgentUpdates", bm.InitBotSendAgentUpdates);
bm.InitBotRequestObjectTextures
= botConfig.GetBoolean("RequestObjectTextures", bm.InitBotRequestObjectTextures);
}
}
int botcount = commandLineConfig.GetInt("botcount", 1);
bool startConnected = commandLineConfig.Get("connect") != null;
bm.CreateBots(botcount, commandLineConfig);
if (startConnected)
bm.ConnectBots(botcount);
while (true)
{
try
{
MainConsole.Instance.Prompt();
}
catch (Exception e)
{
m_log.ErrorFormat("Command error: {0}", e);
}
}
}
}
private static void Help()
{
// Added the wear command. This allows the bot to wear real clothes instead of default locked ones.
// You can either say no, to not load anything, yes, to load one of the default wearables, a folder
// name, to load an specific folder, or save, to save an avatar with some already existing wearables
// worn to the folder MyAppearance/FirstName_LastName, and the load it.
Console.WriteLine(
"Usage: pCampBot -loginuri <loginuri> -firstname <first-name> -lastname <last-name> -password <password> [OPTIONS]\n"
+ "Spawns a set of bots to test an OpenSim region\n\n"
+ " -l, -loginuri loginuri for grid/standalone (required)\n"
+ " -s, -start start location for bots (default: last) (optional). Can be \"last\", \"home\" or a specific location with or without co-ords (e.g. \"region1\" or \"region2/50/30/90\"\n"
+ " -firstname first name for the bots (required)\n"
+ " -lastname lastname for the bots (required). Each lastname will have _<bot-number> appended, e.g. Ima Bot_0\n"
+ " -password password for the bots (required)\n"
+ " -n, -botcount number of bots to start (default: 1) (optional)\n"
+ " -f, -from starting number for login bot names, e.g. 25 will login Ima Bot_25, Ima Bot_26, etc. (default: 0) (optional)\n"
+ " -c, -connect connect all bots at startup (optional)\n"
+ " -b, behaviours behaviours for bots. Comma separated, e.g. p,g (default: p) (optional)\n"
+ " current options are:\n"
+ " p (physics - bots constantly move and jump around)\n"
+ " g (grab - bots randomly click prims whether set clickable or not)\n"
+ " n (none - bots do nothing)\n"
+ " t (teleport - bots regularly teleport between regions on the grid)\n"
// " c (cross)\n" +
+ " -wear folder from which to load appearance data, \"no\" if there is no such folder (default: no) (optional)\n"
+ " -h, -help show this message.\n");
}
private static IConfig ParseConfig(String[] args)
{
//Set up our nifty config.. thanks to nini
ArgvConfigSource cs = new ArgvConfigSource(args);
cs.AddSwitch("Startup", "connect", "c");
cs.AddSwitch("Startup", "botcount", "n");
cs.AddSwitch("Startup", "from", "f");
cs.AddSwitch("Startup", "loginuri", "l");
cs.AddSwitch("Startup", "start", "s");
cs.AddSwitch("Startup", "firstname");
cs.AddSwitch("Startup", "lastname");
cs.AddSwitch("Startup", "password");
cs.AddSwitch("Startup", "behaviours", "b");
cs.AddSwitch("Startup", "help", "h");
cs.AddSwitch("Startup", "wear");
IConfig ol = cs.Configs["Startup"];
return ol;
}
}
} | {
"content_hash": "e2f795a97442414e78d2c6fb6ab29bdb",
"timestamp": "",
"source": "github",
"line_count": 147,
"max_line_length": 214,
"avg_line_length": 43.64625850340136,
"alnum_prop": 0.5130922693266833,
"repo_name": "ft-/opensim-optimizations-wip-tests",
"id": "61a0895332cbb754c640627bff43e9d2c53f7def",
"size": "8033",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "OpenSim/Tools/pCampBot/pCampBot.cs",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C#",
"bytes": "2107516"
},
{
"name": "CSS",
"bytes": "1683"
},
{
"name": "JavaScript",
"bytes": "556"
},
{
"name": "Perl",
"bytes": "3578"
},
{
"name": "Ruby",
"bytes": "1111"
},
{
"name": "Shell",
"bytes": "4333"
}
],
"symlink_target": ""
} |
<query xmlns="http://labkey.org/data/xml/query">
<metadata>
<tables xmlns="http://labkey.org/data/xml">
<table tableName="project" tableDbType="TABLE">
<columns>
<column columnName="investigatorId">
<columnTitle>Investigator</columnTitle>
<nullable>false</nullable>
<isHidden>false</isHidden>
<fk>
<fkDbSchema>ehr</fkDbSchema>
<fkTable>investigatorsWithName</fkTable>
<fkColumnName>rowid</fkColumnName>
<fkDisplayColumnName>investigatorWithName</fkDisplayColumnName>
</fk>
</column>
<column columnName="account">
<fk>
<fkDbSchema>ehr_billing_public</fkDbSchema>
<fkTable>aliases</fkTable>
<fkColumnName>alias</fkColumnName>
</fk>
</column>
<column columnName="lastAssignment" wrappedColumnName="project">
<columnTitle>Last Assignment Date</columnTitle>
<isUnselectable>true</isUnselectable>
<fk>
<fkDbSchema>ehr</fkDbSchema>
<fkTable>projectLastAssignmentDate</fkTable>
<fkColumnName>project</fkColumnName>
</fk>
</column>
<column columnName="protocol">
<columnTitle>IACUC Protocol</columnTitle>
<fk>
<fkDbSchema>ehr</fkDbSchema>
<fkTable>protocol</fkTable>
<fkColumnName>protocol</fkColumnName>
</fk>
</column>
<column columnName="avail">
<columnTitle>Availability</columnTitle>
<fk>
<fkDbSchema>ehr_lookups</fkDbSchema>
<fkTable>avail_codes</fkTable>
<fkColumnName>value</fkColumnName>
</fk>
</column>
<column columnName="use_category">
<fk>
<fkDbSchema>ehr_lookups</fkDbSchema>
<fkTable>project_use_category</fkTable>
<fkColumnName>value</fkColumnName>
<fkDisplayColumnName useRawValue="true"/>
</fk>
</column>
<column columnName="projectType">
<fk>
<fkDbSchema>ehr_lookups</fkDbSchema>
<fkTable>project_types</fkTable>
<fkColumnName>value</fkColumnName>
<fkDisplayColumnName useRawValue="true"/>
</fk>
</column>
<column columnName="project"/>
<column columnName="qcstate">
<isHidden>true</isHidden>
</column>
<column columnName="inves">
<isHidden>true</isHidden>
<columnTitle>Other Investigator</columnTitle>
</column>
<column columnName="inves2">
<isHidden>true</isHidden>
</column>
<column columnName="reqname">
<columnTitle>Requestor Name</columnTitle>
</column>
</columns>
</table>
</tables>
</metadata>
</query>
| {
"content_hash": "e776f000f386ea88567d1a6b93c02525",
"timestamp": "",
"source": "github",
"line_count": 83,
"max_line_length": 91,
"avg_line_length": 47.674698795180724,
"alnum_prop": 0.4144553955016427,
"repo_name": "WNPRC-EHR-Services/wnprc-modules",
"id": "a32d14b9cb2b721c5b330d18d73f19e6edda7809",
"size": "3957",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "wnprc_billing/resources/queries/ehr/project.query.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "82228"
},
{
"name": "Dockerfile",
"bytes": "10292"
},
{
"name": "HTML",
"bytes": "365171"
},
{
"name": "Java",
"bytes": "2064544"
},
{
"name": "JavaScript",
"bytes": "2319537"
},
{
"name": "Perl",
"bytes": "186990"
},
{
"name": "R",
"bytes": "22703"
},
{
"name": "SCSS",
"bytes": "2816"
},
{
"name": "Shell",
"bytes": "18316"
},
{
"name": "TSQL",
"bytes": "332"
},
{
"name": "Twig",
"bytes": "925"
},
{
"name": "TypeScript",
"bytes": "324237"
}
],
"symlink_target": ""
} |
var mc;
(function (mc) {
(function (common) {
function remove(item) {
return new RemovalOptions(item);
}
common.remove = remove;
var RemovalOptions = (function () {
function RemovalOptions(item) {
this.item = item;
}
RemovalOptions.prototype.fromCollectionOf = function (items) {
items.splice(items.indexOf(this.item), 1);
};
return RemovalOptions;
})();
common.RemovalOptions = RemovalOptions;
})(mc.common || (mc.common = {}));
var common = mc.common;
})(mc || (mc = {}));
//# sourceMappingURL=Remove.js.map
| {
"content_hash": "1bc1972c6b0467e387658e8887516e49",
"timestamp": "",
"source": "github",
"line_count": 22,
"max_line_length": 74,
"avg_line_length": 30.681818181818183,
"alnum_prop": 0.5288888888888889,
"repo_name": "ifyio/angular-typescript-minicart",
"id": "a25162599a7083fecb8f50a18defc796290d11d0",
"size": "675",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/common/remove.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "19730"
},
{
"name": "TypeScript",
"bytes": "25420"
}
],
"symlink_target": ""
} |
<?php
/**
* Message translations.
*
* This file is automatically generated by 'yiic message' command.
* It contains the localizable messages extracted from source code.
* You may modify this file by translating the extracted messages.
*
* Each array element represents the translation (value) of a message (key).
* If the value is empty, the message is considered as not translated.
* Messages that no longer need translation will have their translations
* enclosed between a pair of '@@' marks.
*
* Message string can be used with plural forms format. Check i18n section
* of the guide for details.
*
* NOTE, this file must be saved in UTF-8 encoding.
*/
return array(
'Notify settings' => 'Настройки уведомлений',
'Users (last day / all)' => 'Пользователей (за сутки / всего)',
'Not active' => 'Не прошли активацию',
'Expire' => 'Истекает',
'Cookie auth' => 'Токен авторизации',
'Number of login attempts' => 'Кол-во попыток авторизации',
'Sent!' => 'Отправлено!',
'Users per page' => 'Пользователей на страницу',
'*unknown*' => '*неизвестно*',
'*no*' => '*нет*',
'0.5' => '0.5',
'Email' => 'Email',
'Email/Login' => 'Имя пользователя или Email',
'Email "{email}" was not found or user was blocked !' => 'Email "{email}" не найден или пользователь заблокирован !',
'Email or password was typed wrong!' => 'Email или пароль введены неверно!',
'From which email send a message' => 'Email от имени которого отправлять сообщение',
'Email was confirmed' => 'Email подтвержден',
'Email already busy' => 'Email уже занят',
'Email selected during registration was added to blacklist! Registration can\'t be continued' => 'Email указанный Вами при регистрации занесен в черный список! Регистрация невозможна!',
'Id' => 'Id',
'Activation Ip' => 'Ip активации',
'Register Ip' => 'Ip регистрации',
'htmlOptions must be array or not specified!' => 'htmlOptions не является массивом или не указан!',
'yupe team' => 'yupe team',
'Avatar' => 'Аватар',
'Generate nick automaticly and don\'t requre it during register' => 'Автоматически генерировать уникальный ник и не требовать его указания',
'Automatic password recovery' => 'Автоматическое восстановление пароля',
'Authorization' => 'Авторизация',
'Administrator' => 'Администратор',
'Account was activated!' => 'Аккаунт активирован!',
'Active' => 'Активен',
'Email with activate_key = {activate_key}, id = {id} was activated!' => 'Активирован e-mail с activate_key = {activate_key}, id = {id}!',
'Account with activate_key = {activate_key} was activated!' => 'Активирован аккаунт с activate_key = {activate_key}!',
'This section represents password recovery management!' => 'В данном разделе представлены средства управления восстановлениями паролей',
'This section represents account management!' => 'В данном разделе представлены средства управления пользователями',
'You need to confirm your e-mail. Please check the mail!' => 'Вам необходимо продтвердить новый e-mail, проверьте почту!',
'Your IP was added to blacklist! Registration can\'t be continued!' => 'Ваш IP занесен в черный список! Регистрация невозможна!',
'Your account on "{site}" was activated successfully!' => 'Ваш аккаунт на сайте "{site}" успешно активирован!',
'Your account on "{site}" was created successfully' => 'Ваш аккаунт на сайте "{site}" успешно создан!',
'Your new password : {password}' => 'Ваш новый пароль : {password}',
'Your password was changed successfully!' => 'Ваш пароль успешно изменен!',
'Your profile was changed successfully' => 'Ваш профиль успешно изменен!',
'Please enter the text from the image' => 'Введите текст указанный на картинке',
'Login' => 'Войти',
'Password recovery' => 'Восстановить пароль',
'Password recovery.' => 'Восстановление пароля',
'Password recovery - management' => 'Восстановление пароля - управление',
'Password recovery for "{site}"!' => 'Восстановление пароля для сайта "{site}"!',
'Email confirm for "{site}"!' => 'Подтверждение почты для сайта "{site}"!',
'Your new email is confirmed!' => 'Ваша почта подтверждена',
'Password recovery!' => 'Восстановление пароля!',
'Passwords recovery!' => 'Восстановления паролей',
'Session lifetime (in days) when "Remember me" options enabled' => 'Время жизни сессии (в днях) при включенной опции "Запомнить меня"',
'Do you really want to remove user?' => 'Вы уверены, что хотите удалить пользователя?',
'You authorized successfully!' => 'Вы успешно авторизовались!',
'You activate account successfully. Now you can login!' => 'Вы успешно активировали аккаунт! Теперь Вы можете войти!',
'You successfully registered on "{site}" !' => 'Вы успешно зарегистрировались на сайте "{site}" !',
'You confirmed new e-mail successfully!' => 'Вы успешно подтвердили новый e-mail!',
'Gravatar' => 'Граватар',
'Yes' => 'Да',
'Data was updated!' => 'Данные обновлены!',
'This email already use by another user' => 'Данный email уже используется другим пользователем',
'This nickname already use by another user' => 'Данный ник уже используется другим пользователем',
'Activated at' => 'Дата активации',
'Updated at' => 'Дата изменения',
'Register date' => 'Дата регистрации',
'Birthday date' => 'Дата рождения',
'Created at' => 'Дата создания',
'Birthday' => 'День рождения',
'Directory is not accessible "{dir}" for write or not exists! {link}' => 'Директория "{dir}" не доступна для записи или не существует! {link}',
'For account activation, click the' => 'Для активации аккаунта, пожалуйста, перейдите по',
'For password recovery - select e-mail you used in registration form.' => 'Для восстановления пароля - введите email, указанный при регистрации.',
'For password recovery, please click' => 'Для восстановления пароля, пожалуйста, перейдите по',
'For password reset, please click' => 'Для сброса пароля,пожалуйста, перейдите по ',
'Create user and close' => 'Добавить пользователя и закрыть',
'Create user and continue' => 'Добавить пользователя и продолжить',
'Create' => 'Добавление',
'Create user' => 'Добавление пользователя',
'Additional modules' => 'Дополнительные модули',
'Access' => 'Доступ',
'Just remove this letter if it addressed not for you.' => 'Если это были не вы - просто удалите это письмо.',
'Blocked' => 'Заблокирован',
'Forgot password?' => 'Забыли пароль?',
'Order development and support' => 'Заказать разработку или поддержку',
'Remember me' => 'Запомнить меня',
'requested page was not found!' => 'Запрошенная страница не найдена!',
'Automatic password recovery request' => 'Заявка на автоматическое восстановление пароля.',
'Password recovery request' => 'Заявка на восстановление пароля.',
'Profile for #{id}-{nick_name} was changed' => 'Изменен профиль учетной записи #{id}-{nick_name}!',
'Edit password' => 'Изменение пароля',
'Edit module settings' => 'Изменить настройки модуля',
'Change password' => 'Изменить пароль',
'Change user password' => 'Изменить пароль пользователя',
'Name' => 'Имя',
'User name' => 'Имя пользователя',
'Find password' => 'Искать пароль',
'Find user' => 'Искать пользователя',
'Directory for avatar uploading' => 'Каталог для загрузки аватарок',
'Code' => 'Код',
'Activation code' => 'Код активации',
'Recovery password code {code} was not found!' => 'Код восстановления пароля {code} не найден!',
'Recovery password code was not found! Please try one more!' => 'Код восстановления пароля не найден! Попробуйте еще раз!',
'Check code' => 'Код проверки',
'Check code incorrect' => 'Код проверки не корректен.',
'Server root' => 'Корень сервера',
'Somewho, maybe you request password recovery for "{site}"' => 'Кто-то, возможно вы, запросил сброс пароля для сайта "{site}".',
'Maximum captcha length' => 'Максимальная длинна капчи',
'Maximum avatar size' => 'Максимальный размер аватарки',
'Minimum password length' => 'Минимальная длина пароля',
'Minimum captcha length' => 'Минимальная длинна капчи',
'Module for user registration and authorization management' => 'Модуль для управления пользователями, регистрацией и авторизацией',
'Go home' => 'На сайт',
'Letter with password recovery instructions was sent on email which you choose during register' => 'На указанный email отправлено письмо с инструкцией по восстановлению пароля!',
'Security settings' => 'Настройки безопасности',
'Captcha settings' => 'Настройки капчи',
'Not activated' => 'Не активирован',
'It is not possible to create directory for avatars!' => 'Не удалось создать каталог для аватарок!',
'It is not possible to save avatar!' => 'Не удалось сохранить аватар!',
'Bad request. Please don\'t use similar requests anymore!' => 'Неверный запрос. Пожалуйста, больше не повторяйте такие запросы!',
'Bad field format for "{attribute}". You can use only letters and digits from 2 to 20 symbols' => 'Неверный формат поля "{attribute}" допустимы только буквы и цифры, от 2 до 20 символов',
'No' => 'Нет',
'Nick' => 'Ник',
'User name already exists' => 'Имя пользователя уже занято',
'New password' => 'Новый пароль',
'Confirm new password' => 'Новый пароль еще раз',
'New password was sent to your email' => 'Новый пароль отправлен Вам на email!',
'New user was created!' => 'Новый пользователь добавлен!',
'About Yupe!' => 'О Юпи!',
'About yourself' => 'О себе',
'General module settings' => 'Основные настройки модуля',
'Disable password recovery' => 'Отключить восстановление пароля',
'Disable registration' => 'Отключить регистрацию',
'Send activation confirm' => 'Отправить подтверждение активации',
'Family name' => 'Отчество',
'Official documentation' => 'Официальная документация',
'Official site' => 'Официальный сайт',
'Authorization error with IP-address {ip}! email => {email}, Password => {password}!' => 'Ошибка авторизации с IP-адресом {ip}! email => {email}, Password => {password}!',
'Activation error! Maybe e-mail already confirmed or incorrect activation code was used. Try to use another e-mail' => 'Ошибка активации! Возможно данный e-mail уже проверен или указан неверный ключ активации! Попробуйте другой e-mail.',
'There was a problem with the activation of the account. Please refer to the site\'s administration.' => 'Внимание! Возникла проблема с активацией аккаунта. Обратитесь к администрации сайта.',
'Error when change password automaticly! {error}' => 'Ошибка при автоматической смене пароля {error}!',
'Error when changing password!' => 'Ошибка при смене пароля!',
'Error when creating new account without activation!' => 'Ошибка при создании учетной записи без активации!',
'Error when creating new account!' => 'Ошибка при создании учетной записи!',
'Error when creating automatic password recovering order' => 'Ошибка при создании заявки на автоматическое восстановление пароля',
'Error when save profile! #{id}' => 'Ошибка при сохранении профиля! #{id}',
'Password is not coincide!' => 'Пароли не совпадают!',
'Password is not coincide' => 'Пароли не совпадают.',
'Password' => 'Пароль',
'Password was changed' => 'Пароль изменен!',
'Password was changed successfully' => 'Пароль успешно изменен!',
'Control panel' => 'Перейти на главную панели управления',
'Redirecting' => 'Перенаправления',
'Activation mail was sent to user with #{id}!' => 'Письмо с активацией отправлено пользователю #{id}!',
'Confirm account by Email' => 'Подтверждать аккаунт по Email',
'New e-mail confirmation for {site}!' => 'Подтверждение нового e-mail адреса на сайте {site} !',
'Password confirmation' => 'Подтверждение пароля',
'Authorize please' => 'Пожалуйста, авторизуйтесь',
'Only latin letters can use in login field' => 'Пожалуйста, имя пользователя и пароль заполняйте только латинскими буквами и цифрами.',
'Please, choose avatars directory! {link}' => 'Пожалуйста, укажите каталог для хранения аватарок! {link}',
'Find users' => 'Поиск пользователей',
'Show captcha on registration' => 'Показывать капчу при регистрации',
'Sex' => 'Пол',
'Users' => 'Пользователи',
'Users - create' => 'Пользователи - добавление',
'Users - password change' => 'Пользователи - изменение пароля',
'Users - show' => 'Пользователи - просмотр',
'Users - management' => 'Пользователи - управление',
'User' => 'Пользователь',
'User with #{id} was not found' => 'Пользователь #{id} не найден!',
'User with {email} was logined with IP-address {ip}!' => 'Пользователь {email} авторизовался с IP-адресом {ip}!',
'User {user} was logout!' => 'Пользователь {user} вышел!',
'User was not found' => 'Пользователь не найден!',
'Fields with' => 'Поля, отмеченные',
'Help' => 'Помощь',
'Menu items order' => 'Порядок следования в меню',
'Last visit' => 'Последний визит',
'Mail event for automatic password recovery' => 'Почтовое событие при автоматическом восстановлении пароля',
'Mail event for password recovery' => 'Почтовое событие при восстановлении пароля',
'Mail event when new user was registered without activation' => 'Почтовое событие при регистрации нового пользователя без активации',
'Mail event when new user was registered' => 'Почтовое событие при регистрации нового пользователя с активацией',
'Mail event when user was activated successfully' => 'Почтовое событие при успешной активации пользователя',
'Mail event when password was recovered successfully' => 'Почтовое событие при успешном восстановлении пароля',
'Mail notices' => 'Почтовые уведомления',
'There is an error when activating account with activate_key => {activate_key}' => 'При активации аккаунта c activate_key => {activate_key} произошла ошибка!',
'Account activation error! Try again later!' => 'При активации аккаунта произошла ошибка! Попробуйте позже!',
'Password recovery error.' => 'При восстановлении пароля произошла ошибка!',
'Password recovery error. Try again later' => 'При восстановлении пароля произошла ошибка! Повторите попытку позже!',
'There is an error {error} when confirm e-mail with activate_key => {activate_key}' => 'При подтверждении e-mail c activate_key => {activate_key} произошла ошибка {error}!',
'E-mail confirmation error. Please try again later' => 'При подтверждении e-mail произошла ошибка! Попробуйте позже!',
'There is an error when creating user!' => 'При создании учетной записи произошла ошибка!',
'Show user' => 'Просмотр пользователя',
'Profile was updated' => 'Профиль обновлен!',
'Empty avatar' => 'Пустой аватар',
'Development and support' => 'Разработка и поддержка',
'Location' => 'Расположение',
'Registration' => 'Регистрация',
'Registration on {site}' => 'Регистрация на сайте {site} !',
'Register new user' => 'Регистрация нового пользователя',
'Edit' => 'Редактирование',
'Edit user' => 'Редактирование пользователя',
'Best regards, "{site}" administration!' => 'С уважением, администрация сайта "{site}" !',
'Best regards, {site} administration!' => 'С уважением, администрация сайта {site} !',
'Site' => 'Сайт',
'Site/blog' => 'Сайт/блог',
'Reset password for site "{site}"' => 'Сброс пароля для сайта "{site}".',
'Changing password' => 'Сменя пароля',
'Account {nick_name} was created without activation' => 'Создана учетная запись {nick_name} без активации!',
'Account {nick_name} was created' => 'Создана учетная запись {nick_name}!',
'Salt' => 'Соль',
'Community in GitHub' => 'Сообщество на github',
'Report error' => 'Сообщить об ошибке',
'Save user and close' => 'Сохранить пользователя и закрыть',
'Save user and continue' => 'Сохранить пользователя и продолжить',
'Status' => 'Статус',
'Page after activation error' => 'Страница неудачной активации аккаунта',
'Page after authorization' => 'Страница после авторизации',
'Page after admin authorization' => 'Страница после авторизации админстратора',
'Page after account activation' => 'Страница после активации аккаунта',
'Page after login' => 'Страница после выхода с сайта',
'Page after success register' => 'Страница после успешной регистрации',
'Now You can' => 'Теперь Вы можете',
'Now you can' => 'Теперь вы можете',
'Remove user' => 'Удалить пользователя',
'Choose new password' => 'Укажите свой новый пароль!',
'Management' => 'Управление',
'Manage users' => 'Управление пользователями',
'Activation successed!' => 'Успешная активация аккаунта!',
'Password for {user} user was changed successfully' => 'Успешная смена пароля для пользоателя {user}!',
'Password recover successfully' => 'Успешное восстановление пароля!',
'Account was created!' => 'Учетная запись создана!',
'Account was created! Please authorize!' => 'Учетная запись создана! Пожалуйста, авторизуйтесь!',
'Account was created! Check your email!' => 'Учетная запись создана! Проверьте Вашу почту!',
'Last name' => 'Фамилия',
'Forum' => 'Форум',
'Yupe!' => 'Юпи!',
'login' => 'войти',
'create' => 'добавление',
'female' => 'женский',
'male' => 'мужской',
'not set' => 'не указан',
'are required' => 'обязательны.',
'link' => 'ссылке',
'status is not set' => 'статус не определен',
'management' => 'управление',
'Register' => 'Зарегестрироваться',
'Authorized' => 'Авторизован',
'Recovery password key was not found! Please try one more!' => 'Ключ сброса пароля не найден!',
'My profile' => 'Мой профиль',
'Edit profile' => 'Редактировать профиль',
'Last visit {last_visit}' => 'Был на сайте {last_visit}',
'Opinions' => 'Мнений',
'sign in' => 'авторизуйтесь',
'sign up' => 'зарегестрируйтесь',
'You can write something on my wall' => 'На моей стене можно что-то написать!',
'Please,' => 'Пожалуйста,',
'or' => 'или',
'- only authorized users can write on my wall =)' => '- только тогда можно писать на моей стене =)',
'Sign in' => 'Войти',
'Sign up' => 'Регистрация',
'Forgot your password?' => 'Забыли пароль?',
'Enter an email you have used during signup' => 'Введите email, указанный при регистрации',
'Recover password' => 'Восстановить пароль',
'User profile' => 'Профиль пользователя',
'If you do not use Gravatar feel free to upload your own.' => 'Если вы не пользуетесь Gravatar выберите аватарку из файла.',
'E-mail was verified' => 'E-Mail проверен',
'e-mail was not confirmed, please check you mail!' => 'e-mail не подтвержден, проверьте почту!',
'Warning! After changing your e-mail you will receive a message explaining how to verify it' => 'Внимание! После смены e-mail адреса, вам будет выслано письмо для его подтверждения.',
'If you do not want to change password, leave fields empty.' => 'Оставьте поля пустыми если не меняете пароль',
'show password' => 'показать пароль',
'Save profile' => 'Сохранить профиль',
'Your IP was added to blacklist. You can\'t register!' => 'Ваш IP занесен в черный список! Регистрация невозможна!',
'Your e-mail was added to blacklist! You can\'t register!' => 'Email указанный Вами при регистрации занесен в черный список! Регистрация невозможна!',
'You was successfully registered on "{site}" !' => 'Вы успешно зарегистрировались на сайте "{site}" !',
'To activate your account please go to ' => 'Для активации аккаунта, пожалуйста, перейдите по ',
'Truly yours, administration of "{site}" !' => 'С уважением, администрация сайта "{site}" !',
'Changing e-mail' => 'Изменение email!',
'You have successfully changed your email on "{site}"!' => 'Вы успешно изменили email на сайте "{site}" !',
'To activate your email please follow the {link}' => 'Для активации email, пожалуйста, перейдите по {link}',
'Password reset on "{site}".' => 'Сброс пароля для сайта "{site}".',
'Someone probably requested a password reset on "{site}".' => 'Кто-то, возможно, запросил сброс пароля для сайта "{site}".',
'If you did not requested this email just delete it.' => 'Если это были не Вы - просто удалите это письмо.',
'To reset your password please follow the link ' => 'Для сброса пароля,пожалуйста, перейдите по ',
'Your new pasword is: {password}' => 'Ваш новый пароль : {password}',
'To recover your password please follow the link' => 'Для восстановления пароля, пожалуйста, перейдите по',
'Your password was successfully changed!' => 'Ваш пароль успешно изменен!',
'You can\'t make this changes!' => 'Вы не можете сохранить эти изменения!',
'New record was created!' => 'Создана новая запись!',
'Tokens' => 'Токены',
'Token list' => 'Список токенов',
'New' => 'Новый',
'Activated' => 'Активирован',
'Compromised by' => 'Скомпроментирован',
'Type' => 'Тип',
'Created' => 'Создан',
'Updated' => 'Обновлён',
'User activate' => 'Активация пользователя',
'Change/reset password' => 'Изменение/сброс пароля',
'Reset' => 'Очистить форму',
'Token management' => 'Управление токенами',
'This section represents token management!' => 'В этом разделе предоставлено управление токенами',
'Find tokens' => 'Поиск токенов',
'Unknown token status' => 'Неизвестный статус токена',
'Unknown token type' => 'Неизвестный тип токена',
'Ip' => 'IP',
'Compromise' => 'Скомпроментировать',
'Token' => 'Токен',
'Are you sure you want to compromise this token?' => 'Вы уверены что хотите скомпрометировать данный токен?',
'View token' => 'Просмотр токена',
'view token' => 'просмотр токена',
'Update token' => 'Редактирование токена',
'update token' => 'редактирование токена',
'View' => 'Просмотр',
'Update' => 'Редактировать',
'Delete' => 'Удалить',
'Are you sure you want to delete this token?' => 'Вы действительно хотите удалить этот токен?',
'Create token and continue' => 'Создать токен и продолжить',
'Save token and continue' => 'Сохранить токен и продолжить',
'Create token and close' => 'Создать токен и закрыть',
'Save token and close' => 'Сохранить токен и закрыть',
'Create token' => 'Создать токен',
'create token' => 'создать токен',
'User #{id} is already activated' => 'Пользователь #{id} уже активирован',
'Full name' => 'ФИО',
'generate new password and send to user, without creation recovery token' => 'создать новый пароль и отправить пользователю, без создания токена восстановления',
'not recommended' => 'не рекомендуется',
'For login in, please follow this :link' => 'Для входа в систему, пожалуйста, перейдите по этой :link',
'For password recovery, please follow this :link' => 'Для восстановления пароля, пожалуйста, перейдите по этой :link',
'Your new password is {password} ' => 'Ваш новый пароль - {password}',
'Email verification' => 'Подтверждение email',
'User not found' => 'Пользователь не найден',
'Send a letter to verify email' => 'Отправить письмо для проверки email',
'Select {field}' => 'Выберите {field}',
'Creating user' => 'Создание пользователя',
'Removing user' => 'Удаление пользователя',
'List of users' => 'Просмотр списка пользователей',
'Editing users' => 'Редактирование пользователя',
'Viewing users' => 'Просмотр пользователя',
'Creating user token' => 'Создание токена пользователя',
'Removing user token' => 'Удаление токена пользователя',
'List of user tokens' => 'Просмотр списка токенов пользователей',
'Editing user tokens' => 'Редактирование токена пользователя',
'Viewing user tokens' => 'Просмотр токена пользователя',
'Change email' => 'Изменить email',
'Email was updated.' => 'Email был изменен.',
'Your password was changed successfully.' => 'Ваш пароль успешно изменен.',
'Avatar extensions' => 'Расширения аватаров',
'Meeting Date' => 'Дата встречи',
'Age' => 'Возраст',
'Params' => 'Параметры',
);
| {
"content_hash": "85d5786409a28d36357a60a23f112987",
"timestamp": "",
"source": "github",
"line_count": 370,
"max_line_length": 241,
"avg_line_length": 65.3945945945946,
"alnum_prop": 0.6792031740783601,
"repo_name": "Freedom777/yupelast",
"id": "8c66520eb30b56fdbc34e8f7dca5158513be6fb8",
"size": "32257",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "protected/modules/user/messages/ru/user.php",
"mode": "33261",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "419828"
},
{
"name": "JavaScript",
"bytes": "3262220"
},
{
"name": "PHP",
"bytes": "4246060"
},
{
"name": "Shell",
"bytes": "2950"
}
],
"symlink_target": ""
} |
import json
import glob
import xmltodict
import mysql.connector
# Load configurations file
configFile = open("config.xml", "r")
configDict = xmltodict.parse(configFile.read())
config = configDict["config"]["client"]["crawler"]
# Open database connection
config["connargs"]["charset"] = "utf8"
config["connargs"]["collation"] = "utf8_unicode_ci"
connection = mysql.connector.connect(**config["connargs"])
cursor = connection.cursor()
cursor.execute("SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci")
# # Check charset and collation variables
# print connection.charset, connection.collation
# cursor.execute("SHOW VARIABLES LIKE 'character_set%'")
# print cursor.fetchall()
# cursor.execute("SHOW VARIABLES LIKE 'collation%'")
# print cursor.fetchall()
# exit(0)
# Define setup variables
insert = "INSERT INTO users (`id`, `username`, `full_name`, `profile_picture`, `bio`, `website`, `counts_media`, `counts_follows`, `counts_followed_by`) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)"
usersDir = "../../data/users/"
filesList = glob.glob(usersDir + "valid_users_*")
remainingFiles = len(filesList)
# Do import
for fileName in filesList:
fileObj = open(fileName, "r")
input = json.load(fileObj)
fileObj.close()
data = []
remainingUsers = len(input)
for userInfo in input:
print "%d/%d" % (remainingFiles, remainingUsers)
data.append((userInfo["id"], userInfo["username"], userInfo["full_name"], userInfo["profile_picture"], userInfo["bio"], userInfo["website"], userInfo["counts"]["media"], userInfo["counts"]["follows"], userInfo["counts"]["followed_by"]))
remainingUsers -= 1
cursor.executemany(insert, data)
connection.commit()
remainingFiles -= 1
print "Finished."
| {
"content_hash": "d7380c01f27d9de0c3b47020e31f0029",
"timestamp": "",
"source": "github",
"line_count": 51,
"max_line_length": 244,
"avg_line_length": 34.05882352941177,
"alnum_prop": 0.690846286701209,
"repo_name": "fghso/instagram-crawler",
"id": "93a5365c11e49aaa739a6855ec55f9bef1b0d973",
"size": "1785",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "json2mysql/users.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "170483"
}
],
"symlink_target": ""
} |
@interface PodsDummy_Pods_SHTextViewBlocks : NSObject
@end
@implementation PodsDummy_Pods_SHTextViewBlocks
@end
| {
"content_hash": "ce27073062b3d0d1c9a1453adb9a0f7d",
"timestamp": "",
"source": "github",
"line_count": 4,
"max_line_length": 53,
"avg_line_length": 28,
"alnum_prop": 0.8482142857142857,
"repo_name": "seivan/SHUIKitBlocks",
"id": "d1976de9dda8f57ec1c808c2b32147d3d1daa939",
"size": "146",
"binary": false,
"copies": "3",
"ref": "refs/heads/develop",
"path": "TestsAndSample/Pods/Pods-SHTextViewBlocks-dummy.m",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "4896"
},
{
"name": "Objective-C",
"bytes": "287325"
},
{
"name": "Ruby",
"bytes": "8141"
},
{
"name": "Shell",
"bytes": "7104"
}
],
"symlink_target": ""
} |
package org.jabref.gui.preferences.journals;
import javafx.animation.Interpolator;
import javafx.animation.KeyFrame;
import javafx.animation.KeyValue;
import javafx.animation.Timeline;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.beans.property.SimpleStringProperty;
import javafx.beans.property.StringProperty;
import javafx.collections.transformation.FilteredList;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ComboBox;
import javafx.scene.control.Label;
import javafx.scene.control.ProgressIndicator;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.cell.TextFieldTableCell;
import javafx.scene.paint.Color;
import javafx.util.Duration;
import org.jabref.gui.icon.IconTheme;
import org.jabref.gui.preferences.AbstractPreferenceTabView;
import org.jabref.gui.preferences.PreferencesTab;
import org.jabref.gui.util.ColorUtil;
import org.jabref.gui.util.TaskExecutor;
import org.jabref.gui.util.ValueTableCellFactory;
import org.jabref.logic.journals.JournalAbbreviationRepository;
import org.jabref.logic.l10n.Localization;
import com.airhacks.afterburner.views.ViewLoader;
import com.tobiasdiez.easybind.EasyBind;
import jakarta.inject.Inject;
import org.controlsfx.control.textfield.CustomTextField;
/**
* This class controls the user interface of the journal abbreviations dialog. The UI elements and their layout are
* defined in the FXML file.
*/
public class JournalAbbreviationsTab extends AbstractPreferenceTabView<JournalAbbreviationsTabViewModel> implements PreferencesTab {
@FXML private Label loadingLabel;
@FXML private ProgressIndicator progressIndicator;
@FXML private TableView<AbbreviationViewModel> journalAbbreviationsTable;
@FXML private TableColumn<AbbreviationViewModel, String> journalTableNameColumn;
@FXML private TableColumn<AbbreviationViewModel, String> journalTableAbbreviationColumn;
@FXML private TableColumn<AbbreviationViewModel, String> journalTableShortestUniqueAbbreviationColumn;
@FXML private TableColumn<AbbreviationViewModel, String> actionsColumn;
private FilteredList<AbbreviationViewModel> filteredAbbreviations;
@FXML private ComboBox<AbbreviationsFileViewModel> journalFilesBox;
@FXML private Button addAbbreviationButton;
@FXML private Button removeAbbreviationListButton;
@FXML private CustomTextField searchBox;
@FXML private CheckBox useFJournal;
@Inject private TaskExecutor taskExecutor;
@Inject private JournalAbbreviationRepository abbreviationRepository;
private Timeline invalidateSearch;
public JournalAbbreviationsTab() {
ViewLoader.view(this)
.root(this)
.load();
}
@FXML
private void initialize() {
viewModel = new JournalAbbreviationsTabViewModel(preferencesService, dialogService, taskExecutor, abbreviationRepository);
filteredAbbreviations = new FilteredList<>(viewModel.abbreviationsProperty());
setUpTable();
setBindings();
setAnimations();
searchBox.setPromptText(Localization.lang("Search") + "...");
searchBox.setLeft(IconTheme.JabRefIcons.SEARCH.getGraphicNode());
}
private void setUpTable() {
journalTableNameColumn.setCellValueFactory(cellData -> cellData.getValue().nameProperty());
journalTableNameColumn.setCellFactory(TextFieldTableCell.forTableColumn());
journalTableAbbreviationColumn.setCellValueFactory(cellData -> cellData.getValue().abbreviationProperty());
journalTableAbbreviationColumn.setCellFactory(TextFieldTableCell.forTableColumn());
journalTableShortestUniqueAbbreviationColumn.setCellValueFactory(cellData -> cellData.getValue().shortestUniqueAbbreviationProperty());
journalTableShortestUniqueAbbreviationColumn.setCellFactory(TextFieldTableCell.forTableColumn());
actionsColumn.setCellValueFactory(cellData -> cellData.getValue().nameProperty());
new ValueTableCellFactory<AbbreviationViewModel, String>()
.withGraphic(name -> IconTheme.JabRefIcons.DELETE_ENTRY.getGraphicNode())
.withTooltip(name -> Localization.lang("Remove journal '%0'", name))
.withDisableExpression(item -> viewModel.isEditableAndRemovableProperty().not())
.withVisibleExpression(item -> viewModel.isEditableAndRemovableProperty())
.withOnMouseClickedEvent(item -> evt ->
viewModel.removeAbbreviation(journalAbbreviationsTable.getFocusModel().getFocusedItem()))
.install(actionsColumn);
}
private void setBindings() {
journalAbbreviationsTable.setItems(filteredAbbreviations);
EasyBind.subscribe(journalAbbreviationsTable.getSelectionModel().selectedItemProperty(), newValue ->
viewModel.currentAbbreviationProperty().set(newValue));
EasyBind.subscribe(viewModel.currentAbbreviationProperty(), newValue ->
journalAbbreviationsTable.getSelectionModel().select(newValue));
journalTableNameColumn.editableProperty().bind(viewModel.isAbbreviationEditableAndRemovable());
journalTableAbbreviationColumn.editableProperty().bind(viewModel.isAbbreviationEditableAndRemovable());
journalTableShortestUniqueAbbreviationColumn.editableProperty().bind(viewModel.isAbbreviationEditableAndRemovable());
removeAbbreviationListButton.disableProperty().bind(viewModel.isFileRemovableProperty().not());
journalFilesBox.itemsProperty().bindBidirectional(viewModel.journalFilesProperty());
journalFilesBox.valueProperty().bindBidirectional(viewModel.currentFileProperty());
addAbbreviationButton.disableProperty().bind(viewModel.isEditableAndRemovableProperty().not());
loadingLabel.visibleProperty().bind(viewModel.isLoadingProperty());
progressIndicator.visibleProperty().bind(viewModel.isLoadingProperty());
searchBox.textProperty().addListener((observable, previousText, searchTerm) -> {
filteredAbbreviations.setPredicate(abbreviation -> searchTerm.isEmpty() || abbreviation.containsCaseIndependent(searchTerm));
});
useFJournal.selectedProperty().bindBidirectional(viewModel.useFJournalProperty());
}
private void setAnimations() {
ObjectProperty<Color> flashingColor = new SimpleObjectProperty<>(Color.TRANSPARENT);
StringProperty flashingColorStringProperty = createFlashingColorStringProperty(flashingColor);
searchBox.styleProperty().bind(
new SimpleStringProperty("-fx-control-inner-background: ").concat(flashingColorStringProperty).concat(";")
);
invalidateSearch = new Timeline(
new KeyFrame(Duration.seconds(0), new KeyValue(flashingColor, Color.TRANSPARENT, Interpolator.LINEAR)),
new KeyFrame(Duration.seconds(0.25), new KeyValue(flashingColor, Color.RED, Interpolator.LINEAR)),
new KeyFrame(Duration.seconds(0.25), new KeyValue(searchBox.textProperty(), "", Interpolator.DISCRETE)),
new KeyFrame(Duration.seconds(0.25), (ActionEvent event) -> {
addAbbreviationActions();
}),
new KeyFrame(Duration.seconds(0.5), new KeyValue(flashingColor, Color.TRANSPARENT, Interpolator.LINEAR))
);
}
@FXML
private void addList() {
viewModel.addNewFile();
}
@FXML
private void openList() {
viewModel.openFile();
}
@FXML
private void removeList() {
viewModel.removeCurrentFile();
}
@FXML
private void addAbbreviation() {
if (!searchBox.getText().isEmpty()) {
invalidateSearch.play();
} else {
addAbbreviationActions();
}
}
private void addAbbreviationActions() {
viewModel.addAbbreviation();
selectNewAbbreviation();
editAbbreviation();
}
private static StringProperty createFlashingColorStringProperty(final ObjectProperty<Color> flashingColor) {
final StringProperty flashingColorStringProperty = new SimpleStringProperty();
setColorStringFromColor(flashingColorStringProperty, flashingColor);
flashingColor.addListener((observable, oldValue, newValue) -> setColorStringFromColor(flashingColorStringProperty, flashingColor));
return flashingColorStringProperty;
}
private static void setColorStringFromColor(StringProperty colorStringProperty, ObjectProperty<Color> color) {
colorStringProperty.set(ColorUtil.toRGBACode(color.get()));
}
@FXML
private void editAbbreviation() {
journalAbbreviationsTable.edit(
journalAbbreviationsTable.getSelectionModel().getSelectedIndex(),
journalTableNameColumn);
}
private void selectNewAbbreviation() {
int lastRow = viewModel.abbreviationsCountProperty().get() - 1;
journalAbbreviationsTable.scrollTo(lastRow);
journalAbbreviationsTable.getSelectionModel().select(lastRow);
journalAbbreviationsTable.getFocusModel().focus(lastRow, journalTableNameColumn);
}
@Override
public String getTabName() {
return Localization.lang("Journal abbreviations");
}
}
| {
"content_hash": "5f20fdbff62e7d179e2a560093a6cd07",
"timestamp": "",
"source": "github",
"line_count": 214,
"max_line_length": 143,
"avg_line_length": 44.299065420560744,
"alnum_prop": 0.7440928270042194,
"repo_name": "JabRef/jabref",
"id": "a915c2b69a85239a9abe630a6f7da350d24a8207",
"size": "9480",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "src/main/java/org/jabref/gui/preferences/journals/JournalAbbreviationsTab.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ANTLR",
"bytes": "3775"
},
{
"name": "AppleScript",
"bytes": "1378"
},
{
"name": "Batchfile",
"bytes": "637"
},
{
"name": "CSS",
"bytes": "53157"
},
{
"name": "Groovy",
"bytes": "5094"
},
{
"name": "Java",
"bytes": "8629609"
},
{
"name": "PowerShell",
"bytes": "2024"
},
{
"name": "Python",
"bytes": "9251"
},
{
"name": "Ruby",
"bytes": "20199"
},
{
"name": "Shell",
"bytes": "9437"
},
{
"name": "TeX",
"bytes": "705272"
},
{
"name": "XSLT",
"bytes": "2185"
}
],
"symlink_target": ""
} |
from brian import *
import time
import sys
import neurotools as nt
import pickle
if __name__=='__main__':
duration = 0.5*second
max_allowed_sims = 500
savelocation = \
"/home/achilleas/Documents/Uni/working_dir/simout.py/InputVsSlope/"
filename = savelocation+"ivs3.dat"
input_freqs = nt.unitrange(100*Hz, 101*Hz, 50*Hz)
input_num_sts = range(60, 80, 20)
input_volts = nt.unitrange(0.5*mV, 2*mV, 2.5*mV)
synchrony = arange(0, 1.01, 0.1)
jitter = nt.unitrange(0*ms, 4.01*ms, 0.5*ms)
numsims = len(input_freqs)*len(input_num_sts)*len(input_volts)*\
len(synchrony)*len(jitter)
numinputsts = len(input_freqs)*sum(input_num_sts)*len(input_volts)*\
len(synchrony)*len(jitter)
numconnections = numinputsts
if numsims > max_allowed_sims:
ans = None
print("The number of simulations is very large (%d > %d).\
This may make the script (or even the entire system) unresponsive."\
% (numsims, max_allowed_sims))
while ans != 'y' and ans != 'n' and ans != '':
ans = raw_input("Are you sure you want to continue? [y/N]")
ans = ans.lower()
if ans == 'n' or ans == '':
sys.exit("Exiting.")
print('Building %d simulations with %d input spike trains and %d \
connections' % (numsims, numinputsts, numconnections))
config_start = time.time()
V_reset = 0*mV
V_th = 15*mV
V_rest = 0*mV
tau_mem = 10*ms
refr = 2*ms
eqs = Equations('dV/dt = (-V+V_rest)/tau_mem : volt')
nrns = NeuronGroup(numsims,eqs,reset=V_reset,threshold='V>V_th',\
refractory=refr)
inp_spiketrains = []
configs = [] # list of configurations
for n in input_num_sts:
for r in input_freqs:
for v in input_volts:
for s in synchrony:
for j in jitter:
# using pre-generated spike times
inp_spiketrains.extend(nt.sync_inp(n, s, j, r,\
duration))
configs.append([n, r, v, s, j])
percent = len(configs)*100/numsims
print "%d/%d (%d%%)\r" %\
(len(configs), numsims, percent),
sys.stdout.flush()
inp = MultipleSpikeGeneratorGroup(inp_spiketrains)
con_matrix = zeros([numconnections, numsims])
nrn = 0
con = 0
for c,nrn in zip(configs, range(numsims)):
# c is a list: [n_inputs, input_rate, input_voltage, synchrony, jitter]
con_matrix[con:con+c[0], nrn] = ones(c[0])*c[2]
con += c[0]
if con != numconnections:
sys.exit("Something went wrong. Counted %d connections instead of %d"\
% (con, numconnections))
cons = Connection(source=inp, target=nrns, state='V',\
weight=con_matrix*volt)
inp_mon = SpikeMonitor(inp)
out_mon = SpikeMonitor(nrns)
mem_mon = StateMonitor(nrns,'V',record=True)
config_end = time.time()
config_dura = (config_end-config_start)*second
print "Simulation configuration completed in %s"\
% config_dura
print "Running",numsims,"simulations ..."
run(duration, report='stdout')
print "Done. Preparing results ..."
M = np.zeros(numsims)
for nrn in out_mon.spiketimes.iterkeys():
# pre-spike slope
m_slope, slopes = nt.npss(mem_mon[nrn], out_mon[nrn], V_th, 2*ms)
M[nrn] = m_slope
M2d = np.reshape(M, (len(synchrony), len(jitter))).transpose()
pickle.dump((synchrony,jitter,M2d), open(filename,'w'))
print("Data saved in %s" % filename)
print("Plot the data using `python plot_data.py %s`" % filename)
| {
"content_hash": "27a2fe7610fa4977cf1376c3fb74e9ad",
"timestamp": "",
"source": "github",
"line_count": 95,
"max_line_length": 79,
"avg_line_length": 39.463157894736845,
"alnum_prop": 0.572952787409976,
"repo_name": "achilleas-k/brian-scripts",
"id": "43939504bb6d13cae7191a20c96b9c44e94e84a9",
"size": "3749",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "input_vs_slope.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Matlab",
"bytes": "1219"
},
{
"name": "Python",
"bytes": "87385"
}
],
"symlink_target": ""
} |
package jp.co.se.android.recipe.chapter19;
import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v4.widget.SwipeRefreshLayout.OnRefreshListener;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.widget.ArrayAdapter;
import android.widget.ListView;
public class Ch1903 extends Activity implements OnRefreshListener {
private static final String TAG = Ch1903.class.getSimpleName();
private SwipeRefreshLayout mSwipeRefreshWidget;
private ListView mListView;
private AsyncTask<Void, Void, String[]> mTask;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.ch1903_main);
mSwipeRefreshWidget = (SwipeRefreshLayout) findViewById(R.id.swipe_refresh_widget);
mListView = (ListView) findViewById(android.R.id.list);
mSwipeRefreshWidget.setColorScheme(R.color.color1, R.color.color2,
R.color.color3, R.color.color4);
mSwipeRefreshWidget.setOnRefreshListener(this);
request();
}
@Override
public void onRefresh() {
request();
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.ch1903_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int itemId = item.getItemId();
if (itemId == R.id.action_refresh) {
request();
}
return super.onOptionsItemSelected(item);
}
private void request() {
if (mTask != null) {
return;
}
mSwipeRefreshWidget.setRefreshing(true);
mSwipeRefreshWidget.setEnabled(false);
mTask = new AsyncTask<Void, Void, String[]>() {
@Override
protected String[] doInBackground(Void... params) {
// Tv̽ßAêIÉX[vB
// {Ílbg[NANZXâd¢ªsíêéB
try {
Thread.sleep(2000);
} catch (InterruptedException e) {
Log.d(TAG, "Failed sleep", e);
}
// ÊÆÈé_~[f[^ðÔ·
final String[] words = { "Lorem", "ipsum", "dolor", "sit",
"amet,", "consectetur", "adipisicing", "elit,", "sed",
"do", "eiusmod", "tempor", "incididunt", "ut",
"labore", "et", "dolore", "magna", "aliqua.", };
return words;
}
@Override
protected void onPostExecute(String[] result) {
mSwipeRefreshWidget.setRefreshing(false);
mSwipeRefreshWidget.setEnabled(true);
ArrayAdapter<String> arrayAdapter = new ArrayAdapter<String>(
Ch1903.this, android.R.layout.simple_list_item_1,
android.R.id.text1, result);
mListView.setAdapter(arrayAdapter);
mTask = null;
}
};
mTask.execute();
}
}
| {
"content_hash": "fc5e2b3ad2ce31817d168d26cc923ca6",
"timestamp": "",
"source": "github",
"line_count": 98,
"max_line_length": 91,
"avg_line_length": 33.03061224489796,
"alnum_prop": 0.5795489650911337,
"repo_name": "ReKayo-System/android-recipe",
"id": "b9679e3f99d3abeff8a7c7c84862c4fc91306420",
"size": "3237",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Chapter19/src/jp/co/se/android/recipe/chapter19/Ch1903.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Groovy",
"bytes": "2256"
},
{
"name": "Java",
"bytes": "785394"
}
],
"symlink_target": ""
} |
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
<div ng-if="ctrl.loading" layout="row" layout-align="space-around" class="md-padding">
<md-progress-circular md-mode="indeterminate"></md-progress-circular>
</div>
<div ng-if="!ctrl.loading">
<md-content class="md-padding">
<!--<timer interval="1000">{{hhours}} hour{{hhoursS}}, {{mminutes}} minute{{minutesS}}, {{sseconds}} second{{secondsS}}.</timer>-->
<md-switch ng-model="ctrl.showFilteredRanking" aria-label="showFilter?" ng-change="ctrl.filterRanking()">
Show Filtered Rankings: {{ ctrl.showFilteredRanking }}
</md-switch>
<table class="events ranking">
<thead>
<tr>
<th>
<md-button>Rank</md-button>
</th>
<th>
<md-button>Registered ({{ctrl.cohortTotalParticipants.length}})</md-button>
</th>
<th ng-if="ctrl.showFilteredRanking">
<md-button>Qualified</md-button>
</th>
<th>
<md-button>Event</md-button>
</th>
<th ng-if="ctrl.showFilteredRanking">
<md-button ng-disabled="true">1st</md-button>
</th>
<th ng-if="ctrl.showFilteredRanking">
<md-button ng-disabled="true">2nd</md-button>
</th>
<th ng-if="ctrl.showFilteredRanking">
<md-button ng-disabled="true">3rd</md-button>
</th>
<th ng-if="ctrl.showFilteredRanking">
<md-button ng-disabled="true">4th</md-button>
</th>
</tr>
</thead>
<tbody>
<tr ng-if="!ctrl.showFilteredRanking" ng-repeat="event in ctrl.cohortEventData | orderBy:'-participants'" ng-class="'index-' + $index + ' ' + ($odd ? 'odd' : 'even')">
<th>
{{$index+1}}
</th>
<td>{{ event.participants.length }}</td>
<td><a href="#{{ 'oneEvent' | urlFor: {eventId: event.id} }}">{{ event.title }}</a></td>
</tr>
<tr ng-if="ctrl.showFilteredRanking && ctrl.cohort.title.toLowerCase().indexOf('junior') < 0" ng-repeat="event in ctrl.cohortEventData | orderBy:'-qualifiedParticipants'" ng-class="'index-' + $index + ' ' + ($odd ? 'odd' : 'even')">
<th>
{{$index+1}}
</th>
<td>{{ event.participants.length }}</td>
<td>{{ event.qualifiedParticipants.length }}</td>
<td><a href="#{{ 'oneEvent' | urlFor: {eventId: event.id} }}">{{ event.title }}</a></td>
<td ng-if="ctrl.showFilteredRanking && $index<6 && event.qualifiedParticipants[0]">{{event.qualifiedParticipants[0].displayName }} ({{event.qualifiedParticipants[0].score}})</td>
<td ng-if="ctrl.showFilteredRanking && $index<6 && event.qualifiedParticipants[1]">{{event.qualifiedParticipants[1].displayName }} ({{event.qualifiedParticipants[1].score}})</td>
<td ng-if="ctrl.showFilteredRanking && $index<2 && event.qualifiedParticipants[2]">{{event.qualifiedParticipants[2].displayName }} ({{event.qualifiedParticipants[2].score}})</td>
<td ng-if="ctrl.showFilteredRanking && $index<2 && event.qualifiedParticipants[3]">{{event.qualifiedParticipants[3].displayName }} ({{event.qualifiedParticipants[3].score}})</td>
</tr>
<tr ng-if="ctrl.showFilteredRanking && ctrl.cohort.title.toLowerCase().indexOf('junior') >= 0" ng-repeat="event in ctrl.cohortEventData | orderBy:'-qualifiedParticipants'" ng-class="'index-' + $index + ' ' + ($odd ? 'odd' : 'even')">
<th>
{{$index+1}}
</th>
<td>{{ event.participants.length }}</td>
<td>{{ event.qualifiedParticipants.length }}</td>
<td><a href="#{{ 'oneEvent' | urlFor: {eventId: event.id} }}">{{ event.title }}</a></td>
<td ng-if="ctrl.showFilteredRanking && $index<12 && event.qualifiedParticipants[0]">{{event.qualifiedParticipants[0].displayName }} ({{event.qualifiedParticipants[0].score}})</td>
<td ng-if="ctrl.showFilteredRanking && $index<12 && event.qualifiedParticipants[1]">{{event.qualifiedParticipants[1].displayName }} ({{event.qualifiedParticipants[1].score}})</td>
<td ng-if="ctrl.showFilteredRanking && $index<4 && event.qualifiedParticipants[2]">{{event.qualifiedParticipants[2].displayName }} ({{event.qualifiedParticipants[2].score}})</td>
<td ng-if="ctrl.showFilteredRanking && $index<4 && event.qualifiedParticipants[3]">{{event.qualifiedParticipants[3].displayName }} ({{event.qualifiedParticipants[3].score}})</td>
</tr>
</tbody>
</table>
</md-content>
<clm-pager options="ctrl.pagerOpts" class="md-padding"></clm-pager>
</div> | {
"content_hash": "bc084fde2d5c1b527d28ffda51faa75e",
"timestamp": "",
"source": "github",
"line_count": 78,
"max_line_length": 249,
"avg_line_length": 66.7948717948718,
"alnum_prop": 0.5403071017274472,
"repo_name": "dinoboff/classmentors-1",
"id": "df6d4647b1d049b4ea1ef33d3928c0f852a387d7",
"size": "5210",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/classmentors/components/cohorts/cohorts-view-cohort-ranking-page.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "6839"
},
{
"name": "HTML",
"bytes": "206089"
},
{
"name": "JavaScript",
"bytes": "596516"
}
],
"symlink_target": ""
} |
/* Rex: a portable socket library */
#ifndef _H_PROXYIO_REX_IF_
#define _H_PROXYIO_REX_IF_
#include <utils/list.h>
/* The underlying rex socket vfptr */
struct rex_vfptr {
int un_family;
int (*init)(struct rex_sock* rs);
int (*destroy)(struct rex_sock* rs);
int (*listen)(struct rex_sock* rs, const char* sock);
int (*accept)(struct rex_sock* rs, struct rex_sock* new);
int (*connect)(struct rex_sock* rs, const char* peer);
int (*send)(struct rex_sock* rs, struct rex_iov* iov, int niov);
int (*recv)(struct rex_sock* rs, struct rex_iov* iov, int niov);
int (*setopt)(struct rex_sock* rs, int opt, void* optval, int optlen);
int (*getopt)(struct rex_sock* rs, int opt, void* optval, int* optlen);
struct list_head item;
};
struct rex_vfptr* get_rex_vfptr(int un_family);
#endif
| {
"content_hash": "12b8de456e35bd75af15947825a9e72e",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 75,
"avg_line_length": 30.74074074074074,
"alnum_prop": 0.6493975903614457,
"repo_name": "proxyio/xio",
"id": "779dfad7a6350fa4dd5de14b0ed265bae41103a4",
"size": "1947",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/rex/rex_if.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "539071"
},
{
"name": "C++",
"bytes": "12833"
},
{
"name": "Go",
"bytes": "3064"
},
{
"name": "Lua",
"bytes": "890"
},
{
"name": "PHP",
"bytes": "1621"
},
{
"name": "Python",
"bytes": "2200"
},
{
"name": "Ruby",
"bytes": "907"
},
{
"name": "Shell",
"bytes": "1293"
}
],
"symlink_target": ""
} |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_112) on Thu Apr 06 08:02:45 MST 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Uses of Interface org.wildfly.swarm.config.management.ManagementOperationsServiceConsumer (Public javadocs 2017.4.0 API)</title>
<meta name="date" content="2017-04-06">
<link rel="stylesheet" type="text/css" href="../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Uses of Interface org.wildfly.swarm.config.management.ManagementOperationsServiceConsumer (Public javadocs 2017.4.0 API)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="interface in org.wildfly.swarm.config.management">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">WildFly Swarm API, 2017.4.0</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/wildfly/swarm/config/management/class-use/ManagementOperationsServiceConsumer.html" target="_top">Frames</a></li>
<li><a href="ManagementOperationsServiceConsumer.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h2 title="Uses of Interface org.wildfly.swarm.config.management.ManagementOperationsServiceConsumer" class="title">Uses of Interface<br>org.wildfly.swarm.config.management.ManagementOperationsServiceConsumer</h2>
</div>
<div class="classUseContainer">
<ul class="blockList">
<li class="blockList">
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing packages, and an explanation">
<caption><span>Packages that use <a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="interface in org.wildfly.swarm.config.management">ManagementOperationsServiceConsumer</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Package</th>
<th class="colLast" scope="col">Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><a href="#org.wildfly.swarm.config">org.wildfly.swarm.config</a></td>
<td class="colLast"> </td>
</tr>
<tr class="rowColor">
<td class="colFirst"><a href="#org.wildfly.swarm.config.management">org.wildfly.swarm.config.management</a></td>
<td class="colLast"> </td>
</tr>
</tbody>
</table>
</li>
<li class="blockList">
<ul class="blockList">
<li class="blockList"><a name="org.wildfly.swarm.config">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="interface in org.wildfly.swarm.config.management">ManagementOperationsServiceConsumer</a> in <a href="../../../../../../org/wildfly/swarm/config/package-summary.html">org.wildfly.swarm.config</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../org/wildfly/swarm/config/package-summary.html">org.wildfly.swarm.config</a> with parameters of type <a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="interface in org.wildfly.swarm.config.management">ManagementOperationsServiceConsumer</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code><a href="../../../../../../org/wildfly/swarm/config/ManagementCoreService.html" title="type parameter in ManagementCoreService">T</a></code></td>
<td class="colLast"><span class="typeNameLabel">ManagementCoreService.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/ManagementCoreService.html#managementOperationsService-org.wildfly.swarm.config.management.ManagementOperationsServiceConsumer-">managementOperationsService</a></span>(<a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="interface in org.wildfly.swarm.config.management">ManagementOperationsServiceConsumer</a> consumer)</code>
<div class="block">Execution of management operations.</div>
</td>
</tr>
</tbody>
</table>
</li>
<li class="blockList"><a name="org.wildfly.swarm.config.management">
<!-- -->
</a>
<h3>Uses of <a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="interface in org.wildfly.swarm.config.management">ManagementOperationsServiceConsumer</a> in <a href="../../../../../../org/wildfly/swarm/config/management/package-summary.html">org.wildfly.swarm.config.management</a></h3>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../org/wildfly/swarm/config/management/package-summary.html">org.wildfly.swarm.config.management</a> that return <a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="interface in org.wildfly.swarm.config.management">ManagementOperationsServiceConsumer</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>default <a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="interface in org.wildfly.swarm.config.management">ManagementOperationsServiceConsumer</a><<a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="type parameter in ManagementOperationsServiceConsumer">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">ManagementOperationsServiceConsumer.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html#andThen-org.wildfly.swarm.config.management.ManagementOperationsServiceConsumer-">andThen</a></span>(<a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="interface in org.wildfly.swarm.config.management">ManagementOperationsServiceConsumer</a><<a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="type parameter in ManagementOperationsServiceConsumer">T</a>> after)</code> </td>
</tr>
</tbody>
</table>
<table class="useSummary" border="0" cellpadding="3" cellspacing="0" summary="Use table, listing methods, and an explanation">
<caption><span>Methods in <a href="../../../../../../org/wildfly/swarm/config/management/package-summary.html">org.wildfly.swarm.config.management</a> with parameters of type <a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="interface in org.wildfly.swarm.config.management">ManagementOperationsServiceConsumer</a></span><span class="tabEnd"> </span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tbody>
<tr class="altColor">
<td class="colFirst"><code>default <a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="interface in org.wildfly.swarm.config.management">ManagementOperationsServiceConsumer</a><<a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="type parameter in ManagementOperationsServiceConsumer">T</a>></code></td>
<td class="colLast"><span class="typeNameLabel">ManagementOperationsServiceConsumer.</span><code><span class="memberNameLink"><a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html#andThen-org.wildfly.swarm.config.management.ManagementOperationsServiceConsumer-">andThen</a></span>(<a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="interface in org.wildfly.swarm.config.management">ManagementOperationsServiceConsumer</a><<a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="type parameter in ManagementOperationsServiceConsumer">T</a>> after)</code> </td>
</tr>
</tbody>
</table>
</li>
</ul>
</li>
</ul>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../overview-summary.html">Overview</a></li>
<li><a href="../package-summary.html">Package</a></li>
<li><a href="../../../../../../org/wildfly/swarm/config/management/ManagementOperationsServiceConsumer.html" title="interface in org.wildfly.swarm.config.management">Class</a></li>
<li class="navBarCell1Rev">Use</li>
<li><a href="../../../../../../overview-tree.html">Tree</a></li>
<li><a href="../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../help-doc.html">Help</a></li>
</ul>
<div class="aboutLanguage">WildFly Swarm API, 2017.4.0</div>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="../../../../../../index.html?org/wildfly/swarm/config/management/class-use/ManagementOperationsServiceConsumer.html" target="_top">Frames</a></li>
<li><a href="ManagementOperationsServiceConsumer.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright © 2017 <a href="http://www.jboss.org">JBoss by Red Hat</a>. All rights reserved.</small></p>
</body>
</html>
| {
"content_hash": "cf11eb800379d7cfac2842fbd43c8805",
"timestamp": "",
"source": "github",
"line_count": 205,
"max_line_length": 742,
"avg_line_length": 59.97560975609756,
"alnum_prop": 0.6934526230174868,
"repo_name": "wildfly-swarm/wildfly-swarm-javadocs",
"id": "61b5faaac4644a7988eeec470917c97fec297b7d",
"size": "12295",
"binary": false,
"copies": "1",
"ref": "refs/heads/gh-pages",
"path": "2017.4.0/apidocs/org/wildfly/swarm/config/management/class-use/ManagementOperationsServiceConsumer.html",
"mode": "33188",
"license": "apache-2.0",
"language": [],
"symlink_target": ""
} |
package r_kvstore
//Licensed under the Apache License, Version 2.0 (the "License");
//you may not use this file except in compliance with the License.
//You may obtain a copy of the License at
//
//http://www.apache.org/licenses/LICENSE-2.0
//
//Unless required by applicable law or agreed to in writing, software
//distributed under the License is distributed on an "AS IS" BASIS,
//WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//See the License for the specific language governing permissions and
//limitations under the License.
//
// Code generated by Alibaba Cloud SDK Code Generator.
// Changes may cause incorrect behavior and will be lost if the code is regenerated.
// Accounts is a nested struct in r_kvstore response
type Accounts struct {
Account []Account `json:"Account" xml:"Account"`
}
| {
"content_hash": "4281e05493d983da2670cbe080099460",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 84,
"avg_line_length": 39.666666666666664,
"alnum_prop": 0.7623049219687875,
"repo_name": "aliyun/alibaba-cloud-sdk-go",
"id": "9ff293436f50452acfa9f85ee7e297ad16d10e6c",
"size": "833",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "services/r-kvstore/struct_accounts.go",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Go",
"bytes": "734307"
},
{
"name": "Makefile",
"bytes": "183"
}
],
"symlink_target": ""
} |
package com.amazonaws.services.snowball.model.transform;
import javax.annotation.Generated;
import com.amazonaws.SdkClientException;
import com.amazonaws.services.snowball.model.*;
import com.amazonaws.protocol.*;
import com.amazonaws.annotation.SdkInternalApi;
/**
* GetJobManifestRequestMarshaller
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
@SdkInternalApi
public class GetJobManifestRequestMarshaller {
private static final MarshallingInfo<String> JOBID_BINDING = MarshallingInfo.builder(MarshallingType.STRING).marshallLocation(MarshallLocation.PAYLOAD)
.marshallLocationName("JobId").build();
private static final GetJobManifestRequestMarshaller instance = new GetJobManifestRequestMarshaller();
public static GetJobManifestRequestMarshaller getInstance() {
return instance;
}
/**
* Marshall the given parameter object.
*/
public void marshall(GetJobManifestRequest getJobManifestRequest, ProtocolMarshaller protocolMarshaller) {
if (getJobManifestRequest == null) {
throw new SdkClientException("Invalid argument passed to marshall(...)");
}
try {
protocolMarshaller.marshall(getJobManifestRequest.getJobId(), JOBID_BINDING);
} catch (Exception e) {
throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e);
}
}
}
| {
"content_hash": "ad3cedfbcd3afbb6684e87122e7786e4",
"timestamp": "",
"source": "github",
"line_count": 44,
"max_line_length": 155,
"avg_line_length": 32.18181818181818,
"alnum_prop": 0.7330508474576272,
"repo_name": "jentfoo/aws-sdk-java",
"id": "71ea45bb177e04489c5e3efea8c4090e4d3f5f06",
"size": "1996",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "aws-java-sdk-snowball/src/main/java/com/amazonaws/services/snowball/model/transform/GetJobManifestRequestMarshaller.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "270"
},
{
"name": "FreeMarker",
"bytes": "173637"
},
{
"name": "Gherkin",
"bytes": "25063"
},
{
"name": "Java",
"bytes": "356214839"
},
{
"name": "Scilab",
"bytes": "3924"
},
{
"name": "Shell",
"bytes": "295"
}
],
"symlink_target": ""
} |
#ifndef EventTarget_h
#define EventTarget_h
#include "bindings/core/v8/ScriptWrappable.h"
#include "core/events/EventListenerMap.h"
#include "core/events/ThreadLocalEventNames.h"
#include "platform/heap/Handle.h"
namespace blink {
class LocalDOMWindow;
class Event;
class ExceptionState;
class MessagePort;
class Node;
struct FiringEventIterator {
FiringEventIterator(const AtomicString& eventType, size_t& iterator, size_t& end)
: eventType(eventType)
, iterator(iterator)
, end(end)
{
}
const AtomicString& eventType;
size_t& iterator;
size_t& end;
};
typedef Vector<FiringEventIterator, 1> FiringEventIteratorVector;
struct EventTargetData {
WTF_MAKE_NONCOPYABLE(EventTargetData); WTF_MAKE_FAST_ALLOCATED;
public:
EventTargetData();
~EventTargetData();
EventListenerMap eventListenerMap;
OwnPtr<FiringEventIteratorVector> firingEventIterators;
};
// This is the base class for all DOM event targets. To make your class an
// EventTarget, follow these steps:
// - Make your IDL interface inherit from EventTarget.
// Optionally add "attribute EventHandler onfoo;" attributes.
// - Inherit from EventTargetWithInlineData (only in rare cases should you use
// EventTarget directly); or, if you want YourClass to be inherited from
// RefCountedGarbageCollected<YourClass> in addition to EventTargetWithInlineData,
// inherit from RefCountedGarbageCollectedEventTargetWithInlineData<YourClass>.
// - In your class declaration, EventTargetWithInlineData (or
// RefCountedGarbageCollectedEventTargetWithInlineData<>) must come first in
// the base class list. If your class is non-final, classes inheriting from
// your class need to come first, too.
// - Figure out if you now need to inherit from ActiveDOMObject as well.
// - In your class declaration, you will typically use
// REFCOUNTED_EVENT_TARGET(YourClass) if YourClass is a RefCounted<>,
// or DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(OtherRefCounted<YourClass>)
// if YourClass uses a different kind of reference counting template such as
// RefCountedGarbageCollected<YourClass>.
// - Make sure to include this header file in your .h file, or you will get
// very strange compiler errors.
// - If you added an onfoo attribute, use DEFINE_ATTRIBUTE_EVENT_LISTENER(foo)
// in your class declaration.
// - Override EventTarget::interfaceName() and executionContext(). The former
// will typically return EventTargetNames::YourClassName. The latter will
// return ActiveDOMObject::executionContext (if you are an ActiveDOMObject)
// or the document you're in.
// - Your trace() method will need to call EventTargetWithInlineData::trace
// or RefCountedGarbageCollectedEventTargetWithInlineData<YourClass>::trace,
// depending on the base class of your class.
//
// Optionally, add a FooEvent.idl class, but that's outside the scope of this
// comment (and much more straightforward).
class EventTarget : public NoBaseWillBeGarbageCollectedFinalized<EventTarget>, public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();
public:
virtual ~EventTarget();
#if !ENABLE(OILPAN)
void ref() { refEventTarget(); }
void deref() { derefEventTarget(); }
#endif
virtual const AtomicString& interfaceName() const = 0;
virtual ExecutionContext* executionContext() const = 0;
virtual Node* toNode();
virtual LocalDOMWindow* toDOMWindow();
virtual MessagePort* toMessagePort();
// FIXME: first 2 args to addEventListener and removeEventListener should
// be required (per spec), but throwing TypeError breaks legacy content.
// http://crbug.com/353484
bool addEventListener();
bool addEventListener(const AtomicString& eventType);
virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture = false);
bool removeEventListener();
bool removeEventListener(const AtomicString& eventType);
virtual bool removeEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture = false);
virtual void removeAllEventListeners();
virtual bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>);
bool dispatchEvent(PassRefPtrWillBeRawPtr<Event>, ExceptionState&); // DOM API
virtual void uncaughtExceptionInEventHandler();
// Used for legacy "onEvent" attribute APIs.
bool setAttributeEventListener(const AtomicString& eventType, PassRefPtr<EventListener>);
EventListener* getAttributeEventListener(const AtomicString& eventType);
bool hasEventListeners() const;
bool hasEventListeners(const AtomicString& eventType) const;
bool hasCapturingEventListeners(const AtomicString& eventType);
const EventListenerVector& getEventListeners(const AtomicString& eventType);
Vector<AtomicString> eventTypes();
bool fireEventListeners(Event*);
virtual void trace(Visitor*) { }
virtual bool keepEventInNode(Event*) { return false; };
#if ENABLE(OILPAN)
// Needed for TraceTrait<> specialization; see below.
void mark(Visitor*) const;
#if ENABLE(ASSERT)
void checkGCInfo() const;
#endif
#endif
protected:
EventTarget();
// Subclasses should likely not override these themselves; instead, they should subclass EventTargetWithInlineData.
virtual EventTargetData* eventTargetData() = 0;
virtual EventTargetData& ensureEventTargetData() = 0;
private:
#if !ENABLE(OILPAN)
// Subclasses should likely not override these themselves; instead, they should use the REFCOUNTED_EVENT_TARGET() macro.
virtual void refEventTarget() = 0;
virtual void derefEventTarget() = 0;
#endif
LocalDOMWindow* executingWindow();
void fireEventListeners(Event*, EventTargetData*, EventListenerVector&);
void countLegacyEvents(const AtomicString& legacyTypeName, EventListenerVector*, EventListenerVector*);
bool clearAttributeEventListener(const AtomicString& eventType);
friend class EventListenerIterator;
};
class EventTargetWithInlineData : public EventTarget {
protected:
virtual EventTargetData* eventTargetData() override final { return &m_eventTargetData; }
virtual EventTargetData& ensureEventTargetData() override final { return m_eventTargetData; }
private:
EventTargetData m_eventTargetData;
};
// Base class for classes that wish to inherit from RefCountedGarbageCollected (in non-Oilpan world) and
// EventTargetWithInlineData (in both worlds). For details about how to use this class template, see the comments for
// EventTargetWithInlineData above.
//
// This class template exists to circumvent Oilpan's "leftmost class rule", where the Oilpan classes must come first in
// the base class list to avoid memory offset adjustment. In non-Oilpan world, RefCountedGarbageCollected<T> must come
// first, but in Oilpan world EventTargetWithInlineData needs to come first. This class templates does the required
// #if-switch here, in order to avoid a lot of "#if ENABLE(OILPAN)"-s sprinkled in the derived classes.
#if ENABLE(OILPAN)
template <typename T>
class RefCountedGarbageCollectedEventTargetWithInlineData : public EventTargetWithInlineData { };
#else
template <typename T>
class RefCountedGarbageCollectedEventTargetWithInlineData : public RefCountedGarbageCollected<T>, public EventTargetWithInlineData {
public:
virtual void trace(Visitor* visitor) override { EventTargetWithInlineData::trace(visitor); }
};
#endif
// FIXME: These macros should be split into separate DEFINE and DECLARE
// macros to avoid causing so many header includes.
#define DEFINE_ATTRIBUTE_EVENT_LISTENER(attribute) \
EventListener* on##attribute() { return getAttributeEventListener(EventTypeNames::attribute); } \
void setOn##attribute(PassRefPtr<EventListener> listener) { setAttributeEventListener(EventTypeNames::attribute, listener); } \
#define DEFINE_STATIC_ATTRIBUTE_EVENT_LISTENER(attribute) \
static EventListener* on##attribute(EventTarget& eventTarget) { return eventTarget.getAttributeEventListener(EventTypeNames::attribute); } \
static void setOn##attribute(EventTarget& eventTarget, PassRefPtr<EventListener> listener) { eventTarget.setAttributeEventListener(EventTypeNames::attribute, listener); } \
#define DEFINE_WINDOW_ATTRIBUTE_EVENT_LISTENER(attribute) \
EventListener* on##attribute() { return document().getWindowAttributeEventListener(EventTypeNames::attribute); } \
void setOn##attribute(PassRefPtr<EventListener> listener) { document().setWindowAttributeEventListener(EventTypeNames::attribute, listener); } \
#define DEFINE_STATIC_WINDOW_ATTRIBUTE_EVENT_LISTENER(attribute) \
static EventListener* on##attribute(EventTarget& eventTarget) { \
if (Node* node = eventTarget.toNode()) \
return node->document().getWindowAttributeEventListener(EventTypeNames::attribute); \
ASSERT(eventTarget.toDOMWindow()); \
return eventTarget.getAttributeEventListener(EventTypeNames::attribute); \
} \
static void setOn##attribute(EventTarget& eventTarget, PassRefPtr<EventListener> listener) { \
if (Node* node = eventTarget.toNode()) \
node->document().setWindowAttributeEventListener(EventTypeNames::attribute, listener); \
else { \
ASSERT(eventTarget.toDOMWindow()); \
eventTarget.setAttributeEventListener(EventTypeNames::attribute, listener); \
} \
}
#define DEFINE_MAPPED_ATTRIBUTE_EVENT_LISTENER(attribute, eventName) \
EventListener* on##attribute() { return getAttributeEventListener(EventTypeNames::eventName); } \
void setOn##attribute(PassRefPtr<EventListener> listener) { setAttributeEventListener(EventTypeNames::eventName, listener); } \
#define DECLARE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(recipient, attribute) \
EventListener* on##attribute(); \
void setOn##attribute(PassRefPtr<EventListener> listener);
#define DEFINE_FORWARDING_ATTRIBUTE_EVENT_LISTENER(type, recipient, attribute) \
EventListener* type::on##attribute() { return recipient ? recipient->getAttributeEventListener(EventTypeNames::attribute) : 0; } \
void type::setOn##attribute(PassRefPtr<EventListener> listener) \
{ \
if (recipient) \
recipient->setAttributeEventListener(EventTypeNames::attribute, listener); \
}
inline bool EventTarget::hasEventListeners() const
{
// FIXME: We should have a const version of eventTargetData.
if (const EventTargetData* d = const_cast<EventTarget*>(this)->eventTargetData())
return !d->eventListenerMap.isEmpty();
return false;
}
inline bool EventTarget::hasEventListeners(const AtomicString& eventType) const
{
// FIXME: We should have const version of eventTargetData.
if (const EventTargetData* d = const_cast<EventTarget*>(this)->eventTargetData())
return d->eventListenerMap.contains(eventType);
return false;
}
inline bool EventTarget::hasCapturingEventListeners(const AtomicString& eventType)
{
EventTargetData* d = eventTargetData();
if (!d)
return false;
return d->eventListenerMap.containsCapturing(eventType);
}
} // namespace blink
#if ENABLE(OILPAN)
#define DEFINE_EVENT_TARGET_REFCOUNTING(baseClass)
#define DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(baseClass)
#else // !ENABLE(OILPAN)
#define DEFINE_EVENT_TARGET_REFCOUNTING(baseClass) \
public: \
using baseClass::ref; \
using baseClass::deref; \
private: \
virtual void refEventTarget() override final { ref(); } \
virtual void derefEventTarget() override final { deref(); } \
typedef int thisIsHereToForceASemiColonAfterThisEventTargetMacro
#define DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(baseClass) DEFINE_EVENT_TARGET_REFCOUNTING(baseClass)
#endif // ENABLE(OILPAN)
// Use this macro if your EventTarget subclass is also a subclass of WTF::RefCounted.
// A ref-counted class that uses a different method of refcounting should use DEFINE_EVENT_TARGET_REFCOUNTING directly.
// Both of these macros are meant to be placed just before the "public:" section of the class declaration.
#define REFCOUNTED_EVENT_TARGET(className) DEFINE_EVENT_TARGET_REFCOUNTING_WILL_BE_REMOVED(RefCounted<className>)
#endif // EventTarget_h
| {
"content_hash": "05a0287b52a49c5e2d32f26b38f558e5",
"timestamp": "",
"source": "github",
"line_count": 276,
"max_line_length": 176,
"avg_line_length": 44.22826086956522,
"alnum_prop": 0.7604653067911854,
"repo_name": "mxOBS/deb-pkg_trusty_chromium-browser",
"id": "c6697fa7126ebc16e24d9980ca9bf6157e42f25e",
"size": "13868",
"binary": false,
"copies": "4",
"ref": "refs/heads/master",
"path": "third_party/WebKit/Source/core/events/EventTarget.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "AppleScript",
"bytes": "8402"
},
{
"name": "Assembly",
"bytes": "230130"
},
{
"name": "Batchfile",
"bytes": "34966"
},
{
"name": "C",
"bytes": "12435900"
},
{
"name": "C++",
"bytes": "264378706"
},
{
"name": "CMake",
"bytes": "27829"
},
{
"name": "CSS",
"bytes": "795726"
},
{
"name": "Dart",
"bytes": "74976"
},
{
"name": "Emacs Lisp",
"bytes": "2360"
},
{
"name": "Go",
"bytes": "31783"
},
{
"name": "Groff",
"bytes": "5283"
},
{
"name": "HTML",
"bytes": "19491230"
},
{
"name": "Java",
"bytes": "7637875"
},
{
"name": "JavaScript",
"bytes": "12723911"
},
{
"name": "LLVM",
"bytes": "1169"
},
{
"name": "Logos",
"bytes": "6893"
},
{
"name": "Lua",
"bytes": "14392"
},
{
"name": "Makefile",
"bytes": "208315"
},
{
"name": "Objective-C",
"bytes": "1460032"
},
{
"name": "Objective-C++",
"bytes": "7760068"
},
{
"name": "PLpgSQL",
"bytes": "175360"
},
{
"name": "Perl",
"bytes": "63937"
},
{
"name": "Protocol Buffer",
"bytes": "427212"
},
{
"name": "Python",
"bytes": "11447382"
},
{
"name": "Ragel in Ruby Host",
"bytes": "104846"
},
{
"name": "Scheme",
"bytes": "10604"
},
{
"name": "Shell",
"bytes": "1208350"
},
{
"name": "Standard ML",
"bytes": "4965"
},
{
"name": "nesC",
"bytes": "18335"
}
],
"symlink_target": ""
} |
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>chainlink-parent</artifactId>
<groupId>io.machinecode.chainlink</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>chainlink-install</artifactId>
<packaging>pom</packaging>
<description>Pom used by install script to run mvn dependency:copy</description>
</project>
| {
"content_hash": "0f38d77e0e7bf07c8041d24484976fc1",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 108,
"avg_line_length": 38.1764705882353,
"alnum_prop": 0.6764252696456087,
"repo_name": "BrentDouglas/chainlink",
"id": "82adb79f85c1cd7f2f55575965ff93e2146ebd3d",
"size": "649",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "dist/install-pom.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Groovy",
"bytes": "38244"
},
{
"name": "Java",
"bytes": "3335539"
},
{
"name": "Shell",
"bytes": "46609"
}
],
"symlink_target": ""
} |
package ru.SnowVolf.translate.api.yandex.detect;
import android.util.Log;
import java.net.URL;
import java.net.URLEncoder;
import java.util.Locale;
import ru.SnowVolf.translate.api.yandex.APIKeys;
import ru.SnowVolf.translate.api.yandex.YandexAPI;
import ru.SnowVolf.translate.api.yandex.language.Language;
import ru.SnowVolf.translate.api.yandex.translate.Translate;
/**
* Created by Snow Volf on 21.05.2017, 11:16
*
* Расширение {@link YandexAPI} которое предоставляет возможность
* определить язык написанного текста
* путем отправки строки исходного текста на сервис перевода.
* В ответ получаем только объект {@link Language}
*/
public class Detect extends YandexAPI {
// URL сервиса
private static final String SERVICE_URL = "https://translate.yandex.net/api/v1.5/tr.json/detect?";
// Label параметра
private static final String DETECTION_LABEL = "lang";
// Рекомендуемый конструктор
// Предоставляет возможность расширения через другие классы
private Detect(){}
/**
* Тут короче кодируем всё, и отправляем на сервер (ждём ответа)
* Перед этим конечно же не забываем проверить API ключ на null и соответствие длине
* Ну и еще проверяем на количество символов. Не более 10000 за 1 перевод.
*/
public static Language execute(final String text) throws Exception{
validateServiceState(text);
final String params =
PARAM_API_KEY + URLEncoder.encode(apiKey, ENCODING) +
PARAM_TEXT + URLEncoder.encode(text, ENCODING);
final URL url = new URL(SERVICE_URL + params);
return Language.fromString(retrievePropArrString(url, DETECTION_LABEL));
}
/**
* Если в тексте больше 10000 символов - выбрасываем RuntimeException
* Потом проверяем API ключ на null и соответствие длине
*/
private static void validateServiceState(final String text){
final int byteLimit = text.getBytes().length;
if (byteLimit > 10000){
throw new RuntimeException(String.format(Locale.ENGLISH, "Maximum byte limit = 10000 digits, your byte limit = %d", byteLimit));
}
try {
validateServiceState();
} catch (Exception e) {
e.printStackTrace();
}
}
// Для теста
public static void main (String[] args){
try {
Translate.setKey(APIKeys.YANDEX_API_KEY);
Language translation = Detect.execute("Hello world!");
Log.i("VfTr", "Detected : " + translation.toString());
} catch (Exception e) {
e.printStackTrace();
}
}
}
| {
"content_hash": "bf9a7bb31820836a373180a5f25e6b8a",
"timestamp": "",
"source": "github",
"line_count": 74,
"max_line_length": 140,
"avg_line_length": 35.4054054054054,
"alnum_prop": 0.6709923664122137,
"repo_name": "SnowVolf/FF-Translator",
"id": "f1abb811610a44b334f4ce5cc6fbb49ed48ff073",
"size": "3716",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/src/main/java/ru/SnowVolf/translate/api/yandex/detect/Detect.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "1294"
},
{
"name": "Java",
"bytes": "379907"
},
{
"name": "JavaScript",
"bytes": "141"
}
],
"symlink_target": ""
} |
"""ADd cascades
Revision ID: def46e09c9ef
Revises: 3efdb537f933
Create Date: 2017-12-28 11:44:14.263012
"""
# revision identifiers, used by Alembic.
revision = 'def46e09c9ef'
down_revision = '3efdb537f933'
from alembic import op
import sqlalchemy as sa
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(u'RepositoryApp2languages_ibfk_2', 'RepositoryApp2languages', type_='foreignkey')
op.drop_constraint(u'RepositoryApp2languages_ibfk_1', 'RepositoryApp2languages', type_='foreignkey')
op.create_foreign_key(None, 'RepositoryApp2languages', 'RepositoryApps', ['repository_app_id'], ['id'], onupdate='CASCADE', ondelete='CASCADE')
op.create_foreign_key(None, 'RepositoryApp2languages', 'Languages', ['language_id'], ['id'], onupdate='CASCADE', ondelete='CASCADE')
op.drop_constraint(u'RepositoryAppCheckUrls_ibfk_1', 'RepositoryAppCheckUrls', type_='foreignkey')
op.create_foreign_key(None, 'RepositoryAppCheckUrls', 'RepositoryApps', ['repository_app_id'], ['id'], onupdate='CASCADE', ondelete='CASCADE')
op.drop_constraint(u'RepositoryAppFailures_ibfk_1', 'RepositoryAppFailures', type_='foreignkey')
op.create_foreign_key(None, 'RepositoryAppFailures', 'RepositoryAppCheckUrls', ['repository_app_check_url_id'], ['id'], onupdate='CASCADE', ondelete='CASCADE')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_constraint(None, 'RepositoryAppFailures', type_='foreignkey')
op.create_foreign_key(u'RepositoryAppFailures_ibfk_1', 'RepositoryAppFailures', 'RepositoryAppCheckUrls', ['repository_app_check_url_id'], ['id'])
op.drop_constraint(None, 'RepositoryAppCheckUrls', type_='foreignkey')
op.create_foreign_key(u'RepositoryAppCheckUrls_ibfk_1', 'RepositoryAppCheckUrls', 'RepositoryApps', ['repository_app_id'], ['id'])
op.drop_constraint(None, 'RepositoryApp2languages', type_='foreignkey')
op.drop_constraint(None, 'RepositoryApp2languages', type_='foreignkey')
op.create_foreign_key(u'RepositoryApp2languages_ibfk_1', 'RepositoryApp2languages', 'Languages', ['language_id'], ['id'])
op.create_foreign_key(u'RepositoryApp2languages_ibfk_2', 'RepositoryApp2languages', 'RepositoryApps', ['repository_app_id'], ['id'])
# ### end Alembic commands ###
| {
"content_hash": "eb94a37962614f185546b326cbac1458",
"timestamp": "",
"source": "github",
"line_count": 40,
"max_line_length": 163,
"avg_line_length": 58.875,
"alnum_prop": 0.7290870488322717,
"repo_name": "go-lab/appcomposer",
"id": "5a8737c9697f917928087fbb5b6d93d22c389b26",
"size": "2355",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "alembic/versions/def46e09c9ef_add_cascades.py",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "CSS",
"bytes": "16023"
},
{
"name": "HTML",
"bytes": "116481"
},
{
"name": "JavaScript",
"bytes": "164929"
},
{
"name": "Mako",
"bytes": "412"
},
{
"name": "Python",
"bytes": "552296"
},
{
"name": "Shell",
"bytes": "1436"
}
],
"symlink_target": ""
} |
#include <aws/ec2/model/ModifySubnetAttributeRequest.h>
#include <aws/core/utils/StringUtils.h>
#include <aws/core/utils/memory/stl/AWSStringStream.h>
using namespace Aws::EC2::Model;
using namespace Aws::Utils;
ModifySubnetAttributeRequest::ModifySubnetAttributeRequest() :
m_subnetIdHasBeenSet(false),
m_mapPublicIpOnLaunchHasBeenSet(false),
m_assignIpv6AddressOnCreationHasBeenSet(false)
{
}
Aws::String ModifySubnetAttributeRequest::SerializePayload() const
{
Aws::StringStream ss;
ss << "Action=ModifySubnetAttribute&";
if(m_subnetIdHasBeenSet)
{
ss << "SubnetId=" << StringUtils::URLEncode(m_subnetId.c_str()) << "&";
}
if(m_mapPublicIpOnLaunchHasBeenSet)
{
m_mapPublicIpOnLaunch.OutputToStream(ss, "MapPublicIpOnLaunch");
}
if(m_assignIpv6AddressOnCreationHasBeenSet)
{
m_assignIpv6AddressOnCreation.OutputToStream(ss, "AssignIpv6AddressOnCreation");
}
ss << "Version=2016-11-15";
return ss.str();
}
void ModifySubnetAttributeRequest::DumpBodyToUrl(Aws::Http::URI& uri ) const
{
uri.SetQueryString(SerializePayload());
}
| {
"content_hash": "b55ccc7db2a48ddc0d8c2a0cb667fe2b",
"timestamp": "",
"source": "github",
"line_count": 44,
"max_line_length": 84,
"avg_line_length": 24.84090909090909,
"alnum_prop": 0.747483989021043,
"repo_name": "chiaming0914/awe-cpp-sdk",
"id": "ac2fbfa9a5615fab741a5ced7dbaf6bbce90b2b5",
"size": "1666",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "aws-cpp-sdk-ec2/source/model/ModifySubnetAttributeRequest.cpp",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "2313"
},
{
"name": "C++",
"bytes": "98158533"
},
{
"name": "CMake",
"bytes": "437471"
},
{
"name": "HTML",
"bytes": "4471"
},
{
"name": "Java",
"bytes": "239297"
},
{
"name": "Python",
"bytes": "72827"
},
{
"name": "Shell",
"bytes": "2803"
}
],
"symlink_target": ""
} |
var fs = require("fs");
var redis = require("redis");
var redisClient = redis.createClient();
var mysql = require('mysql');
var sha256 = require("sha256");
var sqlConnection = mysql.createConnection(JSON.parse(fs.readFileSync("config.json", "utf8")));
function dump() {
redisClient.keys("hugs_*", function(err, keys) {
keys.forEach(function(currentKey) {
redisClient.get(currentKey, function(err, hugs) {
if (err) throw err;
var sql = "UPDATE profiles SET hugs = ? WHERE username = ?";
sqlConnection.query(sql, [hugs, currentKey.substr(5)], function (err) {
if (err) throw err;
});
})
})
})
}
setInterval(function () {
console.log("dumping...");
dump();
}, 5000) | {
"content_hash": "eb05edc6a0871c2f03fc03990593a1d7",
"timestamp": "",
"source": "github",
"line_count": 23,
"max_line_length": 99,
"avg_line_length": 35.91304347826087,
"alnum_prop": 0.5544794188861986,
"repo_name": "Kirschn/pleasehug.me",
"id": "e7816d619370ea93325733a1aa3d20b0dc267a70",
"size": "826",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "redisdumper.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "HTML",
"bytes": "7772"
},
{
"name": "JavaScript",
"bytes": "7636"
}
],
"symlink_target": ""
} |
namespace sample {
// create a shared pointer type for the class
typedef std::shared_ptr<class ViewController> ViewControllerRef;
// define the class
class ViewController
: public po::scene::ViewController
{
public:
static ViewControllerRef create();
void viewDidLoad() override;
protected:
private:
ViewController() {};
po::scene::ShapeViewRef mShapeView;
po::scene::TextViewRef mTextBottom;
// Container to hold the indicators
po::scene::ViewRef mIndicatorContainer;
// Alignment types mapped to indicators
std::vector<std::string> mIndicatorNames;
std::map<std::string, IndicatorRef> mIndicators;
void keyDown(ci::app::KeyEvent &event);
void createIndicators();
void activateIndicator(int num);
};
}
| {
"content_hash": "06fd10835d4b12a267fb10b8196c094f",
"timestamp": "",
"source": "github",
"line_count": 34,
"max_line_length": 65,
"avg_line_length": 22.794117647058822,
"alnum_prop": 0.7109677419354838,
"repo_name": "Potion/Cinder-poScene",
"id": "fbf74cf39d85363805c8b38a1049a774b949e5b2",
"size": "945",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "samples/AlignmentSample/src/MainViewController.h",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C++",
"bytes": "195119"
}
],
"symlink_target": ""
} |
DELIMITER /
UPDATE KRCR_PARM_T SET VAL = 'default.htm?turl=Documents/fundingsource.htm'
WHERE APPL_ID = 'KC' AND CMPNT_CD = 'Document' AND NMSPC_CD = 'KC-SUBAWARD' AND PARM_NM = 'subAwardFundingSourceHelpUrl' AND PARM_TYP_CD = 'HELP'
/
DELIMITER ;
| {
"content_hash": "f4ebad463744d7fe48aa1590dbd99730",
"timestamp": "",
"source": "github",
"line_count": 7,
"max_line_length": 145,
"avg_line_length": 35.714285714285715,
"alnum_prop": 0.728,
"repo_name": "blackcathacker/kc.preclean",
"id": "33754ed8701a19ac9fd1e5b042eb443c5af328f1",
"size": "250",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "coeus-db/coeus-db-sql/src/main/resources/org/kuali/coeus/coeus-sql/current_mysql/5.2.1/dml/KR_DML_01_KRACOEUS-7214_B000.sql",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "96034"
},
{
"name": "Java",
"bytes": "27623677"
},
{
"name": "JavaScript",
"bytes": "749782"
},
{
"name": "Perl",
"bytes": "1278"
},
{
"name": "Scheme",
"bytes": "8283377"
},
{
"name": "Shell",
"bytes": "69314"
},
{
"name": "XSLT",
"bytes": "20298494"
}
],
"symlink_target": ""
} |
package net.minecraft.src.nucleareal.animalcrossing;
import static cpw.mods.fml.relauncher.Side.CLIENT;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.block.BlockLeaves;
import net.minecraft.block.BlockLog;
import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.TextureManager;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemAxe;
import net.minecraft.item.ItemBlock;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.src.nucleareal.ConfigurationCreator;
import net.minecraft.src.nucleareal.IConfigurationLoader;
import net.minecraft.src.nucleareal.NBTTool;
import net.minecraft.src.nucleareal.NuclearealBase;
import net.minecraft.src.nucleareal.NullValue;
import net.minecraft.src.nucleareal.ObjectTriple;
import net.minecraft.src.nucleareal.Position;
import net.minecraft.src.nucleareal.animalcrossing.block.BlockColorableFlower;
import net.minecraft.src.nucleareal.animalcrossing.block.BlockFurniture;
import net.minecraft.src.nucleareal.animalcrossing.block.BlockInukichi;
import net.minecraft.src.nucleareal.animalcrossing.block.BlockInukichiDoor;
import net.minecraft.src.nucleareal.animalcrossing.block.BlockMyDesign;
import net.minecraft.src.nucleareal.animalcrossing.block.BlockRemoveProtectedStairs;
import net.minecraft.src.nucleareal.animalcrossing.block.tileentity.EnumFurniture;
import net.minecraft.src.nucleareal.animalcrossing.block.tileentity.FurniturePacketHandler;
import net.minecraft.src.nucleareal.animalcrossing.block.tileentity.TileFurniture;
import net.minecraft.src.nucleareal.animalcrossing.entity.EntityFallingTreePart;
import net.minecraft.src.nucleareal.animalcrossing.entity.EntityFishingFloat;
import net.minecraft.src.nucleareal.animalcrossing.entity.EntityFloatingBalloon;
import net.minecraft.src.nucleareal.animalcrossing.entity.EntityFloatingChest;
import net.minecraft.src.nucleareal.animalcrossing.entity.EntityInukichi;
import net.minecraft.src.nucleareal.animalcrossing.entity.EntityPachinkoBullet;
import net.minecraft.src.nucleareal.animalcrossing.inukichi.InukichiInteractHandler;
import net.minecraft.src.nucleareal.animalcrossing.inukichi.sell.InukichiSellHandler;
import net.minecraft.src.nucleareal.animalcrossing.item.ItemColorableFlower;
import net.minecraft.src.nucleareal.animalcrossing.item.ItemFish;
import net.minecraft.src.nucleareal.animalcrossing.item.ItemFishingBait;
import net.minecraft.src.nucleareal.animalcrossing.item.ItemFlowerDyePowder;
import net.minecraft.src.nucleareal.animalcrossing.item.ItemFurniture;
import net.minecraft.src.nucleareal.animalcrossing.item.ItemGreatFishingRod;
import net.minecraft.src.nucleareal.animalcrossing.item.ItemInukichi;
import net.minecraft.src.nucleareal.animalcrossing.item.ItemInukichiDoor;
import net.minecraft.src.nucleareal.animalcrossing.item.ItemMyDesign;
import net.minecraft.src.nucleareal.animalcrossing.item.ItemNugget;
import net.minecraft.src.nucleareal.animalcrossing.item.ItemPachinko;
import net.minecraft.src.nucleareal.animalcrossing.item.ItemShopCompass;
import net.minecraft.src.nucleareal.animalcrossing.item.ItemWateringCan;
import net.minecraft.src.nucleareal.animalcrossing.maplesisters.EntityMapleAkaha;
import net.minecraft.src.nucleareal.animalcrossing.maplesisters.EntityMapleKiyo;
import net.minecraft.src.nucleareal.animalcrossing.maplesisters.MapleSistersInteractHandler;
import net.minecraft.src.nucleareal.animalcrossing.maplesisters.OnMapleSistersAttackHandler;
import net.minecraft.src.nucleareal.animalcrossing.maplesisters.mydesign.MyDesignEditGuiHandler;
import net.minecraft.src.nucleareal.animalcrossing.recipe.RecipeFish;
import net.minecraft.src.nucleareal.animalcrossing.recipe.RecipeFishingBait;
import net.minecraft.src.nucleareal.animalcrossing.recipe.RecipeFishingRod;
import net.minecraft.src.nucleareal.animalcrossing.recipe.RecipeNugget;
import net.minecraft.src.nucleareal.animalcrossing.recipe.RecipePachinko;
import net.minecraft.src.nucleareal.animalcrossing.recipe.RecipeRoseDye;
import net.minecraft.src.nucleareal.animalcrossing.recipe.RecipeWateringCan;
import net.minecraft.src.nucleareal.animalcrossing.render.RenderFurniture;
import net.minecraft.src.nucleareal.animalcrossing.render.RenderMyDesign;
import net.minecraft.src.nucleareal.animalcrossing.render.RenderRose;
import net.minecraft.src.nucleareal.animalcrossing.untispacingchest.ACChestGuiHandler;
import net.minecraft.world.World;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.client.registry.ClientRegistry;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.network.NetworkRegistry;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.common.registry.TickRegistry;
@Mod(modid = "AnimalCrossing", name = "AnimalCrossing Mod", version = "1.0.0Final")
@NetworkMod(clientSideRequired = true, serverSideRequired = true, channels = "ACFurniture", packetHandler = FurniturePacketHandler.class)
public class AnimalCrossing extends NuclearealBase implements IConfigurationLoader
{
@Mod.Instance("AnimalCrossing")
public static AnimalCrossing instance;
public static final boolean DEBUG = true;
public static final String SPX = DEBUG ? "net.minecraft.src." : "";
public static final String CSD = SPX + "nucleareal.animalcrossing.client.ClientProxy";
public static final String SSD = SPX + "nucleareal.animalcrossing.CommonProxy";
@SidedProxy(clientSide = CSD, serverSide = SSD)
public static CommonProxy proxy;
private static final String CATEGORY_EFFECTIVES = "Effectives";
private static final String CATEGORY_GUI = "GuiID";
private static final String CATEGORY_DEBUG = "DEBUG";
public static int WideSearchMax = 1000;
private static int NO_MEANING_VALUE = Integer.MAX_VALUE;
private static String DefaultAxe = "";
private static String DefaultWood = "";
private static String DefaultLeaf = "";
private static String DefaultSword = "";
private static List<String> axeClass;
private static List<String> woodClass;
private static List<String> leafClass;
private static List<String> swordClass;
private static HashMap<String, NullValue> AxeList;
private static HashMap<String, NullValue> WoodList;
private static HashMap<String, NullValue> LeafList;
private static HashMap<String, NullValue> SwordList;
private static HashMap<String, Integer> TreeCountingMap;
public static Block Rose; public static Item RoseItem; public static int RoseID = 1220; public static int RoseRenderID = -1;
public static Item RoseDyeItem; public static int RoseDyeID = 24290;
public static Item Nuggets; public static int NuggetsID = 0;
public static Block RoseWither; public static Item RoseWitherItem; public static int RoseWitherID = 1221;
public static Item WateringCanGold; public static int WateringCanGoldID = 24300;
public static Item PachinkoGold; public static int PachinkoGoldID = 24301;
public static Item FishingRodGold; public static int FishingRodGoldID = 24302;
public static Item FishingBait; public static int FishingBaitID = 0;
public static Item Fish; public static int FishID = 24293;
public static Item ShopCompass; public static int ShopCompassID = 0;
public static Block Furniture; public static Item FurnitureItem; public static int FurnitureID = 1222; public static int FurnitureRenderID = -1;
public static Block InukichiDoor; public static Item InukichiDoorItem; public static int InukichiDoorID = 1223;
public static Block Inukichi; public static Item InukichiItem; public static int InukichiID = 1224;
public static Block InukichiStair; public static Item InukichiStairItem; public static int InukichiStairID = 1225;
public static Block MyDesign; public static Item MyDesignItem; public static int MyDesignID = 1226; public static int MyDesignRenderID = -1;
public static HashMap<String, ObjectTriple<ArrayList<ItemStack>, ArrayList<ItemStack>, Integer>> OreDictMap;
public static NBTTool NBT;
public static int RoseSpawnChance = 384;
public static int RoseWiltChance = 512;
public static int RoseDeadChance = 768;
public static int BlackToGoldChance = 16;
public static int SprintingDespawnChance = 96;
public static int BalloonSpawnChance = 8192;
public static int AchievementBeginID = 1073741823;
public static boolean AddRecipeInkVial = false;
public static boolean isForceRegisterAchievement = true;
public static boolean isNoDamageWithoutWeapon = true;
public static boolean PachinkoUsesBullet = false;
public static boolean FishingRodUsesBait = false;
public static boolean isLampPoweredBySignal = true;
public static boolean isChestForceEnabled = false;
private static int Entity_FallingBlockID = 0;
private static int Entity_FloatingBalloonnID = 1;
private static int Entity_FloatingChestID = 2;
private static int Entity_PachinkoBulletID = 3;
private static int Entity_FishingID = 4;
private static int Entity_InukichiID = 5;
private static int Entity_MapleAkahaID = 6;
private static int Entity_MapleKiyoID = 7;
public static int FurnitureChestGuiID = 1222;
public static int MyDesignEditGuiID = 1226;
public static int InukichiSellGuiID = 0;
public static CreativeTabs AnimalCrossingTab;
private static TickHandler Handler;
@Override
public void load()
{
}
@Override
protected String Version()
{
return "Alice For 1.6.2";
}
@Mod.PreInit
public void preInit(FMLPreInitializationEvent event)
{
NBT = new NBTTool("AnimalCrossing");
Handler = new TickHandler();
AxeList = new HashMap<String, NullValue>();
WoodList = new HashMap<String, NullValue>();
LeafList = new HashMap<String, NullValue>();
SwordList = new HashMap<String, NullValue>();
axeClass = new LinkedList<String>();
woodClass = new LinkedList<String>();
leafClass = new LinkedList<String>();
swordClass = new LinkedList<String>();
TreeCountingMap = new HashMap<String, Integer>();
GameRegistry.registerPlayerTracker(Handler);
TickRegistry.registerScheduledTickHandler(Handler, CLIENT);
ConfigurationCreator.create(event, this);
MinecraftForge.EVENT_BUS.register(new OreDictionaryHandler());
MinecraftForge.EVENT_BUS.register(new PickupHandler());
MinecraftForge.EVENT_BUS.register(new OnLivingAttackHandler());
MinecraftForge.EVENT_BUS.register(new OnMapleSistersAttackHandler());
GameRegistry.registerCraftingHandler(new CreateWateringCanHandler());
GameRegistry.registerCraftingHandler(new CraftingHandler());
}
@Mod.Init
public void init(FMLInitializationEvent event)
{
AnimalCrossingTab = new AnimalCrossingTab("Animal Crossing");
LanguageRegistry.instance().addStringLocalization("itemGroup.Animal Crossing", "en_US", "Animal Crossing");
LanguageRegistry.instance().addStringLocalization("itemGroup.Animal Crossing", "ja_JP", "どうぶつの森");
LocalizeWords.addTransision();
if(isValidBlockID(RoseID))
{
Rose = new BlockColorableFlower(RoseID).setUnlocalizedName("BlockRose").setTextureName("nc:B_Rose").setStepSound(Block.soundGrassFootstep);
GameRegistry.registerBlock(Rose, ItemColorableFlower.class, "FlowerRose", "AnimalCrossing");
RoseItem = new ItemColorableFlower(RoseID - 256, Rose).setUnlocalizedName("ItemRose").setTextureName("nc:I_Rose");
GameRegistry.registerItem(RoseItem, "Rose", "AnimalCrossing");
GameRegistry.registerWorldGenerator(new GeneratorRose());
for(int i = 0; i < RoseColor.getAllColors().size(); i++)
{
LanguageRegistry.instance().addNameForObject(new ItemStack(RoseItem, 1, i), "en_US", RoseColor.RoseColorNames[i]+" Rose");
LanguageRegistry.instance().addNameForObject(new ItemStack(RoseItem, 1, i), "ja_JP", RoseColor.RoseColorNames_jaJP[i]+"のバラ");
}
RoseRenderID = RenderingRegistry.getNextAvailableRenderId();
RenderingRegistry.registerBlockHandler(new RenderRose());
}
if(isValidBlockID(RoseWitherID))
{
RoseWither = new BlockColorableFlower(RoseWitherID).setUnlocalizedName("BlockRoseWither").setTextureName("nc:B_Rose").setStepSound(Block.soundGrassFootstep);
GameRegistry.registerBlock(RoseWither, ItemColorableFlower.class, "FlowerRoseWither", "AnimalCrossing");
RoseWitherItem = new ItemColorableFlower(RoseWitherID - 256, RoseWither).setUnlocalizedName("ItemRoseWither").setTextureName("nc:I_RoseWither");
GameRegistry.registerItem(RoseWitherItem, "RoseWither", "AnimalCrossing");
for(int i = 0; i < RoseColor.getAllColors().size(); i++)
{
LanguageRegistry.instance().addNameForObject(new ItemStack(RoseWitherItem, 1, i), "en_US", "Wilted "+RoseColor.RoseColorNames[i]+" Rose");
LanguageRegistry.instance().addNameForObject(new ItemStack(RoseWitherItem, 1, i), "ja_JP", "枯れた"+RoseColor.RoseColorNames_jaJP[i]+"のバラ");
}
if(RoseRenderID == -1)
{
RoseRenderID = RenderingRegistry.getNextAvailableRenderId();
RenderingRegistry.registerBlockHandler(new RenderRose());
}
}
if(isValidBlockID(FurnitureID))
{
Furniture = new BlockFurniture(FurnitureID).setUnlocalizedName("BlockFurniture").setTextureName("nc:B_Furniture").setStepSound(Block.soundMetalFootstep).setHardness(1F/24F);
GameRegistry.registerBlock(Furniture, ItemFurniture.class, "FurnitureBlock", "AnimalCrossing");
FurnitureItem = new ItemFurniture(FurnitureID - 256, Furniture).setUnlocalizedName("ItemFurniture").setTextureName("nc:B_Furniture");
GameRegistry.registerItem(FurnitureItem, "FurnitureItem", "AnimalCrossing");
for(int i = 0; i < EnumFurniture.size(); i++)
{
LanguageRegistry.instance().addNameForObject(new ItemStack(FurnitureItem, 1, i), "en_US", EnumFurniture.of(i).getFurnitureName());
}
FurnitureRenderID = RenderingRegistry.getNextAvailableRenderId();
RenderFurniture renderer = new RenderFurniture();
RenderingRegistry.registerBlockHandler(renderer);
ClientRegistry.registerTileEntity(TileFurniture.class, "Furniture", renderer);
}
if(isValidBlockID(InukichiDoorID))
{
InukichiDoor = new BlockInukichiDoor(InukichiDoorID).setUnlocalizedName("InukichiDoor").setTextureName("door_iron").setStepSound(Block.soundMetalFootstep).setBlockUnbreakable()
.setResistance(Float.MAX_VALUE);
GameRegistry.registerBlock(InukichiDoor, ItemInukichiDoor.class, "InukichiDoor", "AnimalCrossing");
InukichiDoorItem = new ItemInukichiDoor(InukichiDoorID-256, InukichiDoor).setUnlocalizedName("ItemInukichiDoor").setTextureName("door_iron");
GameRegistry.registerItem(InukichiDoorItem, "InukichiDoorItem", "AnimalCrossing");
LanguageRegistry.instance().addNameForObject(new ItemStack(InukichiDoorItem), "en_US", "Inukichi Door");
}
if(isValidBlockID(InukichiID))
{
Inukichi = new BlockInukichi(InukichiID).setUnlocalizedName("Inukichi").setTextureName("nc:B_Inukichi").setStepSound(Block.soundStoneFootstep).setBlockUnbreakable()
.setResistance(Float.MAX_VALUE);
GameRegistry.registerBlock(Inukichi, ItemInukichi.class, "Inukichi", "AnimalCrossing");
InukichiItem = new ItemInukichi(InukichiID - 256, Inukichi).setUnlocalizedName("Inukichi").setTextureName("nc:B_Inukichi");
GameRegistry.registerItem(InukichiItem, "InukichiItem", "AnimalCrossing");
for(int i = 0; i < 16; i++)
{
LanguageRegistry.instance().addNameForObject(new ItemStack(InukichiItem, 1, i), "en_US", "Inukichi "+BlockInukichi.getDisplayName(i));
}
}
if(isValidBlockID(InukichiID) && isValidBlockID(InukichiStairID))
{
InukichiStair = new BlockRemoveProtectedStairs(InukichiStairID, Inukichi, BlockInukichi.getStairMetadata())
.setUnlocalizedName("Inukichi").setTextureName("nc:B_Inukichi").setStepSound(Block.soundStoneFootstep).setBlockUnbreakable().setResistance(Float.MAX_VALUE);
GameRegistry.registerBlock(InukichiStair, ItemBlock.class, "InukichiStair", "AnimalCrossing");
GameRegistry.registerWorldGenerator(new GeneratorInukichiShop());
}
if(isValidBlockID(MyDesignID))
{
MyDesign = new BlockMyDesign(MyDesignID).setUnlocalizedName("MyDesign").setTextureName("nc:B_Furniture").setStepSound(Block.soundMetalFootstep).setHardness(1/24F);
GameRegistry.registerBlock(MyDesign, ItemMyDesign.class, "MyDesign", "AnimalCrossing");
for(int i = 0; i < 16; i++)
{
LanguageRegistry.instance().addNameForObject(new ItemStack(MyDesign, 1, i), "en_US", "MyDesign "+(i+1));
}
MyDesignRenderID = RenderingRegistry.getNextAvailableRenderId();
RenderMyDesign render = new RenderMyDesign();
RenderingRegistry.registerBlockHandler(render);
}
if(isValidItemID(RoseDyeID))
{
RoseDyeItem = new ItemFlowerDyePowder(RoseDyeID - 256).setUnlocalizedName("ItemDyeRose").setTextureName("nc:I_Dye");
GameRegistry.registerItem(RoseDyeItem, "RoseDye", "AnimalCrossing");
for(int i = 0; i < RoseColor.getAllColors().size(); i++)
{
LanguageRegistry.instance().addNameForObject(new ItemStack(RoseDyeItem, 1, i), "en_US", RoseColor.RoseColorNames[i]+" Dye Powder");
LanguageRegistry.instance().addNameForObject(new ItemStack(RoseDyeItem, 1, i), "ja_JP", RoseColor.RoseColorNames_jaJP[i]+"の染料");
}
if(isValidBlockID(RoseID))
{
new RecipeRoseDye(RoseItem, RoseDyeItem).RegisterAll();
}
}
if(isValidItemID(WateringCanGoldID))
{
WateringCanGold = new ItemWateringCan(WateringCanGoldID - 256, WateringCanMaterial.Gold).setUnlocalizedName("ItemWarteringCanGold").setTextureName("nc:I_WateringGold");
ItemWateringCan cnv = (ItemWateringCan)WateringCanGold;
GameRegistry.registerItem(WateringCanGold, "WateringCanGold", "AnimalCrossing");
String type = WateringCanMaterial.Names_enUS[cnv.getMaterial().ordinal()];
String enUS = type;
String jaJP = WateringCanMaterial.Names_jaJP[cnv.getMaterial().ordinal()];
LanguageRegistry.instance().addNameForObject(new ItemStack(WateringCanGold, 1, 0), "en_US", enUS+" Watering Can Part");
LanguageRegistry.instance().addNameForObject(new ItemStack(WateringCanGold, 1, 0), "ja_JP", jaJP+"のジョウロパーツ");
for(int i = 1; i <= cnv.getMaterial().getMaxUse(); i++)
{
LanguageRegistry.instance().addNameForObject(new ItemStack(WateringCanGold, 1, i), "en_US", enUS+" Watering Can");
LanguageRegistry.instance().addNameForObject(new ItemStack(WateringCanGold, 1, i), "ja_JP", jaJP+"のジョウロ");
}
RecipeWateringCan recipe = new RecipeWateringCan(cnv);
recipe.registerAllRecipes();
GameRegistry.addRecipe(recipe);
}
if(isValidItemID(PachinkoGoldID))
{
PachinkoGold = new ItemPachinko(PachinkoGoldID - 256, PachinkoMaterial.Gold).setUnlocalizedName("ItemPachinkoGold").setTextureName("nc:I_PachinkoGold");
ItemPachinko cnv = (ItemPachinko)PachinkoGold;
GameRegistry.registerItem(PachinkoGold, "PachinkoGold", "AnimalCrossing");
String type = PachinkoMaterial.Names_enUS[cnv.getMaterial().ordinal()];
String enUS = type;
String jaJP = PachinkoMaterial.Names_jaJP[cnv.getMaterial().ordinal()];
LanguageRegistry.instance().addNameForObject(new ItemStack(PachinkoGold, 1, 0), "en_US", enUS+" Pachinko Bullet");
LanguageRegistry.instance().addNameForObject(new ItemStack(PachinkoGold, 1, 0), "ja_JP", jaJP+"のパチンコの弾");
for(int i = 1; i <= cnv.getMaterial().getMaxUse(); i++)
{
LanguageRegistry.instance().addNameForObject(new ItemStack(PachinkoGold, 1, i), "en_US", enUS+" Pachinko");
LanguageRegistry.instance().addNameForObject(new ItemStack(PachinkoGold, 1, i), "ja_JP", jaJP+"のパチンコ");
}
RecipePachinko recipe = new RecipePachinko(cnv);
recipe.registerAllRecipes();
GameRegistry.addRecipe(recipe);
}
if(isValidItemID(FishID))
{
Fish = new ItemFish(FishID-256).setUnlocalizedName("ItemFish").setTextureName("nc:I_Fish");
GameRegistry.registerItem(Fish, "Fish", "AnimalCrossing");
for(int i = 0; i < FishType.size(); i++)
{
LanguageRegistry.instance().addNameForObject(new ItemStack(Fish,1,i), "en_US", FishType.of(i).name());
LanguageRegistry.instance().addNameForObject(new ItemStack(Fish,1,FishType.getRegisterLimit()+i), "en_US", "Cooked "+FishType.of(i).name());
}
RecipeFish recipe0 = new RecipeFish(Fish);
recipe0.registerAllRecipes();
if(isValidItemID(FishingRodGoldID))
{
FishingRodGold = new ItemGreatFishingRod(FishingRodGoldID - 256, FishingRodMaterial.Gold).setUnlocalizedName("ItemFishingRodGold").setTextureName("nc:I_FishingRodGold");
ItemGreatFishingRod cnv = (ItemGreatFishingRod)FishingRodGold;
GameRegistry.registerItem(FishingRodGold, "FishingRodGold", "AnimalCrossing");
String type = FishingRodMaterial.Names_enUS[cnv.getMaterial().ordinal()];
String enUS = type;
String jaJP = FishingRodMaterial.Names_jaJP[cnv.getMaterial().ordinal()];
LanguageRegistry.instance().addNameForObject(new ItemStack(FishingRodGold), "en_US", enUS+" FishingRod");
LanguageRegistry.instance().addNameForObject(new ItemStack(FishingRodGold), "ja_JP", jaJP+"のつりざお");
RecipeFishingRod recipe = new RecipeFishingRod(cnv);
recipe.registerAllRecipes();
GameRegistry.addRecipe(recipe);
}
}
if(isValidItemID(FishingBaitID))
{
FishingBait = new ItemFishingBait(FishingBaitID - 256, 1, false).setUnlocalizedName("ItemFishingBait").setTextureName("nc:I_FishingBait");
GameRegistry.registerItem(FishingBait, "FishingBait", "AnimalCrossing");
for(int i = 0; i < Bait.size(); i++)
{
LanguageRegistry.instance().addNameForObject(new ItemStack(FishingBait, 1, i), "en_US", Bait.Names_enUS[i]+" Bait");
LanguageRegistry.instance().addNameForObject(new ItemStack(FishingBait, 1, i), "ja_JP", Bait.Names_jaJP[i]+"魚の餌");
}
RecipeFishingBait recipe = new RecipeFishingBait(FishingBait);
recipe.registerAllRecipes();
}
else
{
FishingRodUsesBait = false;
}
if(isValidItemID(NuggetsID))
{
Nuggets = new ItemNugget(NuggetsID).setUnlocalizedName("ItemNugget").setTextureName("nc:I_Nugget_");
GameRegistry.registerItem(Nuggets, "Nuggets", "AnimalCrossing");
for(int i = 0; i < NuggetValue.getAllElements().size(); i++)
{
LanguageRegistry.instance().addNameForObject(new ItemStack(Nuggets, 1, i), "en_US", NuggetValue.of(i).name()+" Nugget");
LanguageRegistry.instance().addNameForObject(new ItemStack(Nuggets, 1, i), "ja_JP", NuggetValue.NamesjaJP[i]+"の破片");
}
}
if(isValidItemID(ShopCompassID))
{
ShopCompass = new ItemShopCompass(ShopCompassID).setUnlocalizedName("ItemShopCompass").setTextureName("nc:compass");
GameRegistry.registerItem(ShopCompass, "ShopCompass", "AnimalCrossing");
LanguageRegistry.addName(ShopCompass, "Shop Compass");
}
EntityRegistry.registerGlobalEntityID(EntityInukichi.class, "Inukichi", Entity_InukichiID, 0, 0);
EntityRegistry.registerGlobalEntityID(EntityMapleAkaha.class, "MapleAkaha", Entity_MapleAkahaID, 0xFF0000, 0xFF0000);
EntityRegistry.registerGlobalEntityID(EntityMapleKiyo.class, "MapleKiyo", Entity_MapleKiyoID, 0xFF7F00, 0xFF7F00);
EntityRegistry.registerModEntity(EntityFallingTreePart.class, "TreePart", Entity_FallingBlockID, this, 250, 5, true);
EntityRegistry.registerModEntity(EntityFloatingBalloon.class, "FloatingBalloon", Entity_FloatingBalloonnID, this, 250, 5, true);
EntityRegistry.registerModEntity(EntityFloatingChest.class, "FloatingChest", Entity_FloatingChestID, this, 250, 5, true);
EntityRegistry.registerModEntity(EntityPachinkoBullet.class, "PachinkoBullet", Entity_PachinkoBulletID, this, 250, 5, true);
EntityRegistry.registerModEntity(EntityFishingFloat.class, "FishingFloat", Entity_FishingID, this, 250, 5, true);
EntityRegistry.registerModEntity(EntityInukichi.class, "Inukichi", Entity_InukichiID, this, 250, 5, true);
EntityRegistry.registerModEntity(EntityMapleAkaha.class, "MapleAkaha", Entity_MapleAkahaID, this, 250, 5, true);
EntityRegistry.registerModEntity(EntityMapleKiyo.class, "MapleKiyo", Entity_MapleKiyoID, this, 250, 5, true);
proxy.registerRenderers();
LanguageRegistry.instance().addStringLocalization("entity.TreePart.name", "en_US", "FallingTreePart");
LanguageRegistry.instance().addStringLocalization("entity.FloatingBalloon.name", "en_US", "FloatingBalloon");
LanguageRegistry.instance().addStringLocalization("entity.FloatingChest.name", "en_US", "FloatingChest");
LanguageRegistry.instance().addStringLocalization("entity.PachinkoBullet.name", "en_US", "PachinkoBullet");
LanguageRegistry.instance().addStringLocalization("entity.FishingFloat.name", "en_US", "FishingFloat");
LanguageRegistry.instance().addStringLocalization("entity.Inukichi.name", "en_US", "Inukichi");
LanguageRegistry.instance().addStringLocalization("entity.MapleAkaha.name", "en_US", "MapleAkaha");
LanguageRegistry.instance().addStringLocalization("entity.MapleKiyo.name", "en_US", "MapleKiyo");
new Achievements("AnimalCrossing").doRegister();
NetworkRegistry.instance().registerGuiHandler(this, new ACGuiHandler());
ACGuiHandler.registerHandler(Integer.valueOf(FurnitureChestGuiID), new ACChestGuiHandler());
ACGuiHandler.registerHandler(Integer.valueOf(MyDesignEditGuiID), new ACChestGuiHandler());
ACGuiHandler.registerHandler(Integer.valueOf(InukichiSellGuiID), new InukichiSellHandler());
MinecraftForge.EVENT_BUS.register(new ACWorldLastHandler());
MinecraftForge.EVENT_BUS.register(new InukichiInteractHandler());
MinecraftForge.EVENT_BUS.register(new MapleSistersInteractHandler());
}
@Mod.PostInit
public void postInit(FMLPostInitializationEvent ev)
{
if(isValidBlockID(RoseID) && isValidItemID(NuggetsID))
{
OreDictionary.registerOre("goldNugget", new ItemStack(Item.goldNugget));
OreDictionary.registerOre("ingotGold", new ItemStack(Item.ingotGold));
OreDictionary.registerOre("ingotIron", new ItemStack(Item.ingotIron));
OreDictionary.registerOre("ingotDiamond",new ItemStack(Item.diamond));
OreDictionary.registerOre("ingotRedstone", new ItemStack(Item.redstone));
for(int i = 0; i < NuggetValue.getAllElements().size(); i++)
{
String key = NuggetValue.of(i).name();
String par = String.valueOf(key.charAt(0)).toLowerCase() + key.substring(1);
OreDictionary.registerOre(par + "Nugget", new ItemStack(Nuggets, 1, i));
}
OreDictMap = new HashMap<String, ObjectTriple<ArrayList<ItemStack>, ArrayList<ItemStack>, Integer>>();
for(int i = 0; i < NuggetValue.getAllElements().size(); i++)
{
getAndRegisterOre(NuggetValue.of(i).name(), i);
}
RecipeNugget recipe = new RecipeNugget();
recipe.RegisterAll();
}
}
public static boolean isValidBlockID(int ID)
{
return 0 < ID && ID < Block.blocksList.length;
}
public static boolean isValidItemID(int ID)
{
return 0 < ID && ID < Item.itemsList.length;
}
private void getAndRegisterOre(String key, int index)
{
String keyNugget = String.valueOf(key.charAt(0)).toLowerCase() + key.substring(1) + "Nugget";
String keyIngot = "ingot" + key;
ArrayList<ItemStack> nuggets = OreDictionary.getOres(keyNugget);
ArrayList<ItemStack> ingots = OreDictionary.getOres(keyIngot);
if(nuggets.size() > 0 && ingots.size() > 0)
{
OreDictMap.put(key, new ObjectTriple<ArrayList<ItemStack>, ArrayList<ItemStack>, Integer>(nuggets, ingots, index));
}
}
public static boolean counting(World world, int x, int y, int z)
{
Position pos = new Position(x, y, z);
String key = pos.getVisualityValue();
if(TreeCountingMap.containsKey(key))
{
Integer i = TreeCountingMap.get(key);
if(++i == 3)
{
TreeCountingMap.remove(key);
return true;
}
TreeCountingMap.put(key, i);
}
else
{
TreeCountingMap.put(key, 1);
}
return false;
}
public static void reset(World world, int x, int y, int z)
{
Position pos = new Position(x, y, z);
String key = pos.getVisualityValue();
if(TreeCountingMap.containsKey(key))
{
TreeCountingMap.remove(key);
}
}
public static TileFurniture getTileFurniture(World world, int x, int y, int z)
{
return ((BlockFurniture)Furniture).getTile(world, x, y, z);
}
private List<String> loadEffectives(Configuration conf, String desc, String defValue, HashMap<String, NullValue> list)
{
String ids = conf.get(CATEGORY_EFFECTIVES, desc, defValue).getString();
String classes = conf.get(CATEGORY_EFFECTIVES, desc.replace("Id", "Classe"), "").getString();
String[] idArray = ids.replace(" ", "").split(",");
for(String id : idArray)
{
if(id == null || id.isEmpty()) continue;
String res = id;
if(!id.contains(":"))
{
res += ":" + NO_MEANING_VALUE;
}
list.put(res, NullValue.get());
}
String[] classArray = classes.replace(" ", "").split(",");
List<String> res = new LinkedList<String>();
for(String cz : classArray)
{
if(cz == null || cz.isEmpty()) continue;
res.add(cz);
}
return res;
}
private static boolean isEffective(int id, int meta, HashMap<String, NullValue> list, List<String> cz, String clname)
{
return list.containsKey(String.format("%d:%d", id, NO_MEANING_VALUE)) ||
list.containsKey(String.format("%d:%d", id, meta)) ||
cz.contains(clname);
}
public static boolean isAxeTool(int id, int meta, String clanme)
{
return isEffective(id, meta, AxeList, axeClass, clanme) || Item.itemsList[id] instanceof ItemAxe;
}
public static boolean isWood(int id, int meta, String clanme)
{
return isEffective(id, meta, WoodList, woodClass, clanme) || Block.blocksList[id] instanceof BlockLog;
}
public static boolean isLeaf(int id, int meta, String clanme)
{
return isEffective(id, meta, LeafList, leafClass, clanme) || Block.blocksList[id] instanceof BlockLeaves;
}
public static boolean isSword(int id, int meta, String clanme)
{
return isEffective(id, meta, SwordList, swordClass, clanme) || Item.itemsList[id] instanceof ItemSword;
}
public void onLoad(Configuration conf)
{
axeClass = loadEffectives(conf, "AxeIds", DefaultAxe, AxeList);
woodClass = loadEffectives(conf, "WoodIds", DefaultWood, WoodList);
leafClass = loadEffectives(conf, "LeafIds", DefaultLeaf, LeafList);
swordClass = loadEffectives(conf, "SwordIds", DefaultSword, SwordList);
RoseID = conf.get(conf.CATEGORY_BLOCK, "RoseID", RoseID).getInt();
RoseWitherID = conf.get(conf.CATEGORY_BLOCK, "RoseWitherID", RoseWitherID).getInt();
FurnitureID = conf.get(conf.CATEGORY_BLOCK, "FurnitureID", FurnitureID).getInt();
InukichiDoorID = conf.get(conf.CATEGORY_BLOCK, "InukichiDoorID", InukichiDoorID).getInt();
InukichiID = conf.get(conf.CATEGORY_BLOCK, "InukichiID", InukichiID).getInt();
InukichiStairID = conf.get(conf.CATEGORY_BLOCK, "InukichiStairID", InukichiStairID).getInt();
MyDesignID = conf.get(conf.CATEGORY_BLOCK, "MyDesignBlockID", MyDesignID).getInt();
RoseDyeID = conf.get(conf.CATEGORY_ITEM, "RoseDyeID", RoseDyeID).getInt();
NuggetsID = conf.get(conf.CATEGORY_ITEM, "NuggetsID", NuggetsID).getInt();
WateringCanGoldID = conf.get(conf.CATEGORY_ITEM, "WateringCanGoldID", WateringCanGoldID).getInt();
PachinkoGoldID = conf.get(conf.CATEGORY_ITEM, "PachinkoGoldID", PachinkoGoldID).getInt();
FishingRodGoldID = conf.get(conf.CATEGORY_ITEM, "FishingRodGoldID", FishingRodGoldID).getInt();
FishingBaitID = conf.get(conf.CATEGORY_ITEM, "FishingBaitID", FishingBaitID).getInt();
FishID = conf.get(conf.CATEGORY_ITEM, "FishID", FishID).getInt();
if(new Object()==null) ShopCompassID = conf.get(conf.CATEGORY_ITEM, "ShopCompassID", ShopCompassID).getInt();
RoseSpawnChance = conf.get("Chance", "RoseSpawnDenominator", RoseSpawnChance).getInt();
RoseDeadChance = conf.get("Chance", "RoseDespawnDenominator", RoseDeadChance).getInt();
RoseWiltChance = conf.get("Chance", "RoseWiltDenominator", RoseWiltChance).getInt();
BlackToGoldChance = conf.get("Chance", "RoseBlackToGoldDenominator", BlackToGoldChance).getInt();
SprintingDespawnChance = conf.get("Chance", "RoseSprintDespawnDenominator", SprintingDespawnChance).getInt();
BalloonSpawnChance = conf.get("Chance", "FloatingBalloonSpawnChanceDenominator", BalloonSpawnChance).getInt();
AchievementBeginID = conf.get("Achievement", "AchievementBeginID", AchievementBeginID).getInt();
isForceRegisterAchievement = conf.get("Achievement", "isForceRegisterAchievement", isForceRegisterAchievement).getBoolean(isForceRegisterAchievement);
AddRecipeInkVial = conf.get(conf.CATEGORY_GENERAL, "EnableInkVialRecipe", AddRecipeInkVial).getBoolean(AddRecipeInkVial);
WideSearchMax = conf.get(conf.CATEGORY_GENERAL, "TreeCutSearchMax", WideSearchMax).getInt();
isNoDamageWithoutWeapon = conf.get(conf.CATEGORY_GENERAL, "SetNoDamageWithoutWeapon", isNoDamageWithoutWeapon).getBoolean(isNoDamageWithoutWeapon);
PachinkoUsesBullet = conf.get(conf.CATEGORY_GENERAL, "PachinkoUsesBullet", PachinkoUsesBullet).getBoolean(PachinkoUsesBullet);
FishingRodUsesBait = conf.get(conf.CATEGORY_GENERAL, "FishingRodUsesBait", FishingRodUsesBait).getBoolean(FishingRodUsesBait);
isLampPoweredBySignal = conf.get(conf.CATEGORY_GENERAL, "LampPoweredBySignal", isLampPoweredBySignal).getBoolean(isLampPoweredBySignal);
FurnitureChestGuiID = conf.get(CATEGORY_GUI, "FurnitureChestGuiID", FurnitureChestGuiID).getInt();
MyDesignEditGuiID = conf.get(CATEGORY_GUI, "MyDesignEditGuiID", MyDesignEditGuiID).getInt();
InukichiSellGuiID = conf.get(CATEGORY_GUI, "InukichiSellGuiID", InukichiSellGuiID).getInt();
isChestForceEnabled = conf.get(CATEGORY_DEBUG, "isChestForceEnabled", isChestForceEnabled).getBoolean(isChestForceEnabled);
}
}
| {
"content_hash": "7316e79ad1acc231a010f5eb21bbcd64",
"timestamp": "",
"source": "github",
"line_count": 692,
"max_line_length": 179,
"avg_line_length": 49.03468208092485,
"alnum_prop": 0.7753153365554639,
"repo_name": "Nucleareal/nucleareal",
"id": "9237c82984bc88d57015c50738f4b5fcb95932a2",
"size": "34040",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "animalcrossing/AnimalCrossing.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "404784"
}
],
"symlink_target": ""
} |
<?php
// ------ PHP functions ----------------
function redirectTo($newLocation) {
header("Location: " . $newLocation);
exit;
}
function signOut() {
$_SESSION['logged_in'] = 0;
redirectTo("index.php");
}
// --------------------------------------
// Included for debugging
//include 'ChromePhp.php';
// Start Session
// session_start();
// Logic for switching between pages
if (!isset($_GET['id'])) {
$home = 0;
} else if ($_GET['id'] == 1) {
$home = 1;
} else if ($_GET['id'] == 2) {
$home = 2;
} else if ($_GET['id'] == 3) {
$home = 3;
} else if ($_GET['id'] == 4) {
$home = 4;
} else if ($_GET['id'] == 5) {
$home = 5;
} else if ($_GET['id'] == 6) {
$home = 6;
} else if ($_GET['id'] == 7) {
$home = 7;
} else {
$home = 0;
}
/*
// ------ Attempt to gain access to mysql server -----
// Settings for login into database
$username = "root"; // Change to nonroot user - root / User_Level
$password = "C7t32813"; // Change to new user password - perkasie / work no pass / home C7t32813#
$dbhost = "127.0.0.1"; // Need to change for live server - nonlive 127.0.0.1
$dbname = "user_pass";
// Connect to DB server
$connection = mysqli_connect($dbhost, $username, $password, $dbname);
// Display db connection error if exists
if (mysqli_connect_errno()) {
die("Database Connection Failed " . mysqli_connect_error() .
mysqli_connect_error() .
" (" . mysqli_errno() . ")"
);
}
else {
// Connection is successful
// ChromePhp::log("Am I logged_in: " . $_SESSION['logged_in']);
// Checks to see if log_in_redirect is set
// Checks to see if the submit button was pressed
if (!empty($_POST['submit'])) {
// Get username and password from POST
$user = $_POST['username'];
$pass = $_POST['password'];
// SQL quere string
$query = "SELECT * FROM login_info ";
$query .= 'WHERE username = "' . $user . '" AND ';
$query .= 'password = "' . $pass . '"';
// See if there is a username/password match
$match = mysqli_query($connection, $query);
$match = mysqli_fetch_assoc($match);
//print_r($match);
//ChromePhp::log("not empty match: " . !empty($match));
// Set session value to logged in
if ( !empty($match) ) {
$_SESSION['user'] = $user; // Save username for welcome message
$_SESSION['logged_in'] = 1; // Sets the user login state
$_POST['log_in_redirect'] = 1; // Flag for after redirecting
redirectTo("index.php");
} else {
// No username/password match
$_SESSION['logged_in'] = 0;
}
} else if(!empty($_POST['log_out'])) {
// User clicks sign out link
$_SESSION['logged_in'] = 0;
$_POST['log_out'] = "";
redirectTo("index.php");
} else if (!empty($_POST['register'])) {
// User clicks button to register
// -- Using php because there are two buttons in form
redirectTo("index.php?id=4");
} else if (!empty($_POST['create_user'])) {
// Attempts to register user
// Checks to see if db already has username/email
$user = $_POST['email'];
$query = "SELECT * FROM login_info ";
$query .= "WHERE username = " . $user . '"';
$match = mysqli_query($connection, $query);
//$match = mysqli_fetch_assoc($match);
// If no email is found
// -- Insert new user into db
// -- Display Sucess message
if (empty($match)) {
// Username doesn't exist
$insert_user = "INSERT INTO login_info ";
$insert_user .= "(username, password, fName, lName, phone) ";
$insert_user .= "VALUES ('" . $_POST['email'] . "', '" .
$_POST['pass'] . "', '" .
$_POST['firstName'] . "', '" .
$_POST['lastName'] . "', '" .
$_POST['phone'] . "')";
$success_insert = mysqli_query($connection, $insert_user);
echo "<h1>" . $insert_user . "</h1>";
if (!empty($success_insert)) {
echo "<h1>Success</h1>";
// New User was sucessfully entered into DB
$_SESSION['success_insert'] = 1; // True
redirectTo("index.php?id=4"); // login page
} else {
// Unsuccessful db query
// TODO - Do something???
echo "<h1>Unsuccess</h1>";
$_SESSION['bad_query'] = 1;
}
} else {
// Username already exists
$_SESSION['user_already_exists'] = 1;
echo "<h1>UNSuccess</h1>";
//redirectTo("index.php?id=4");
}
// Else
// -- redirect to login page
// -- Display email is already used
} else if (!empty($_POST['pass_reset_button'])) {
// Forgot Password Button was pushed
redirectTo("index.php?id=5");
} else if (!empty($_POST['forgot_pass'])) {
// Resets user password
// Get all POST variables needed
$user_forgot = $_POST['user_forgot'];
$pass_forgot = $_POST['pass_forgot'];
$last_forgot = $_POST['last_forgot'];
// Checks to see if username and lName exists
$query = "SELECT * FROM login_info ";
$query .= "WHERE username = '" . $user_forgot . "' AND ";
$query .= "lName = '" . $last_forgot . "'";
$match = mysqli_query($connection, $query);
//$match = mysqli_fetch_assoc($match);
if (!empty($match)) {
// If the entry exists, update db with new password
$forgot_update = "UPDATE login_info ";
$forgot_update .= "SET password= '" . $pass_forgot . "' ";
$forgot_update .= "WHERE username= '" . $user_forgot . "'";
$success_update = mysqli_query($connection, $forgot_update);
if (!empty($success_update)) {
// Update was successful
// Set session variable to display output on login screen
$_SESSION['pass_reset_good'] = 1;
// redirect to login page
redirectTo("index.php?id=4");
} else {
// Update was unsuccessful
echo $query;
$_SESSION['pass_reset_bad'] = 1;
}
} else {
// No username/lName matches found
//echo $query;
$_SESSION['pass_reset_bad'] = 1; // Display
}
// else
// -- redirect to sign in page
// -- Display message that username is not valid
} else if(!empty($_GET['log_out'])) {
$_SESSION['logged_in'] = 0;
} else {
// Connection error
if (empty($_SESSION['logged_in'])) {
// Keeps user logged out if never logged in
$_SESSION['logged_in'] = "";
}
if ($_SESSION['logged_in'] != 1 && !empty($_POST['log_in_redirect']))
$_SESSION['logged_in'] = 0;
//ChromePhp::log("Not logged_in: " . $_SESSION['logged_in']);
}
}
// ---------------------------------------------------
*/
/*
// ----- Actions for when login form is submitted -------
if (isset($_POST['submit'])) { // Submit was pushed at least once
ChromePhp::log("submit was pushed");
// Check for redirect to login or failure
if ($_SESSION['logged_in'] == 1) { // Successful login
//redirectTo("index.php");
} else { // Uncessful login atempt
// Code......
}
} else { // Submit was never hit yet
$submit = 0;
}
// ----------------------------------------------------
*/
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Kyle O'Neill</title>
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta charset="utf-8">
<!-- Angular JS -->
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js"></script>
<!-- jQuery -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.11.1/jquery-ui.min.js"></script>
<!-- Bootstrap -->
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
<!-- Stylesheets -->
<link rel="stylesheet" type="text/css" href="./css/style.css">
<link rel="stylesheet" type="text/css" href="./css/Grid-Generator.css">
<!-- <link rel="stylesheet" type="text/css" href="./css/bank.css"> -->
<link href='https://fonts.googleapis.com/css?family=Lato' rel='stylesheet' type='text/css'>
<!-- Modules -->
<script type="text/javascript" src="./js/app.js"></script>
<!-- Controllers -->
<script src="./js/controllers/MainController.js"></script>
<!-- Directives -->
<script src="./js/directives/academics.js"></script>
<script src="./js/directives/techProj.js"></script>
<script src="./js/directives/signIn.js"></script>
<script src="./js/directives/giphy.js"></script>
<script src="./js/directives/bank-app.js"></script>
<script src="./js/directives/home-page.js"></script>
<script src="js/jquery-color-cycle-plugin-master/jquery.colorcycle.min.js"></script>
<script type="text/javascript" src="js/webpage.js"></script>
<script type="text/javascript" src="js/bank.js"></script>
<script type="text/javascript" src="js/Grid-Generator.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-68700814-1', 'auto');
ga('send', 'pageview');
</script>
</head>
<body ng-app="SomeDemo">
<div ng-controller="MainController" class="make-full">
<!--Bootstrap Fixed Navbar -->
<nav class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid" id="buttons-cont">
<div class="navbar-header">
<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="./">Kyle O'Neill</a>
</div>
<div id="navbar" class="navbar-collapse collapse" aria-expanded="false">
<ul class="nav navbar-nav navbar-text navbar-right" id="nav-right">
<?php if ($_SESSION['logged_in']==0) { ?>
<!-- <li><a href="#" onclick="location.href='index.php?id=3'">Sign In</a></li> -->
<?php } else { ?>
<!-- <form name="sign_out" action="index.php?id=4" method="post"> -->
<!-- <input type="hidden" name="log_out" value="1"> -->
<!-- <li id="signout"><a href="<?php //echo 'index.php?' . $_SERVER['QUERY_STRING'] . '&log_out=t' ?>">Sign Out</a></li> -->
<!-- </form> -->
<?php } ?>
</ul>
<ul class="nav navbar-nav navbar-text navbar-left">
<!-- <li><a href="index.php?id=1">Academic History</a></li>
<li><a href="index.php?id=2">Technical Projects</a></li>
<li><a href="resume.pdf">Resume</a></li>
<li><a href="index.php?id=7">Currency Converter</a></li>
<li><a href="index.php?id=6">Giphy App</a></li> -->
</ul>
</div>
</div>
</nav>
<div class="container-fluid no-padding make-full">
<?php if ($home == 0) {?>
<div id="photo-contanier" ng-show="<?php echo $home; ?> == 0">
</div>
<?php } ?>
<!-- Top Row -->
<div class="row <?php if ($home!=2) {echo "hidden-xs";}?>" id="top-empty">
<!-- EMPTY -->
</div>
<!-- Content Row -->
<div class="row" id="content">
<div class="col col-xs-0 col-md-1">
<!-- EMPTY -->
</div>
<div class="col col-xs-12 col-md-10" id="content-box" ng-hide="<?php echo $home; ?> == 0">
<div id="content-box-text">
<academics ng-show="<?php echo $home; ?> == 1"></academics>
<tech-proj ng-show="<?php echo $home; ?> == 2"></tech-proj>
<!-- <sign-in ng-show="<?php //echo $home; ?> == 3"></sign-in> -->
<div ng-show="<?php echo $home; ?> == 3" style="max-width: 500px; margin: 0 auto;">
<h1>Log In:</h1>
<form action="index.php?id=3" method="post">
<div class="form-group">
<label>Username</label>
<input type="email" name="username" class="form-group" value=""/>
</div>
<div class="form-group">
<label>Password</label>
<input type="password" name="password" class="form-group" value="" /><br />
</div>
<input type="submit" class="btn btn-default" name="submit" value="Submit" />
<input type="submit" class="btn btn-default" name="register" value="Register" />
<input type="submit" class="btn btn-default" name="pass_reset_button" value="Forgot Password" />
<br><br>
<?php
if (!empty($_POST['submit']) && $_SESSION['logged_in'] == 0) {
echo "Unsuccessful Login - Please Try Again";
}
?>
</form>
</div>
<div ng-show="<?php echo $home; ?> == 4" style="max-width: 500px; margin: 0 auto;">
<h1>Create An Account:</h1>
<form name="regForm" action="index.php?id=4" method="post">
<!-- Needs to make sure all input is entered before submitting-->
<div class="form-group">
<label>Email:</label>
<input type="email" name="email" value="" ng-model="email" class="form-group" required>
<span ng-show="regForm.email.$invalid && regForm.email.$dirty">
<span ng-show="regForm.email.$error.required">Email is Required</span>
<span ng-show="regForm.email.$error.email">Invalid email address.</span>
</span>
</div>
<div class="form-group">
<label>First Name:</label>
<input type="text" name="firstName" value="" ng-model="fName" class="form-group" required>
<span ng-show="regForm.firstName.$invalid && regForm.firstName.$dirty">
<span ng-show="regForm.firstName.$error.required">First Name is required</span>
</span>
</div>
<div class="form-group">
<label>Last Name:</label>
<input type="text" name="lastName" value="" ng-model="lName" class="form-group" required/>
<span ng-show="regForm.lastName.$invalid && regForm.lastName.$dirty">
<span ng-show="regForm.lastName.$error.required">Last Name is required</span>
</span>
</div>
<div class="form-group">
<label>Phone Number:</label>
<input type="text" name="phone" value="" ng-model="phone" class="form-group" required/>
<span ng-show="regForm.phone.$invalid && regForm.phone.$dirty">
<span ng-show="regForm.phone.$error.required">Phone Number is required</span>
</span>
</div>
<div class="form-group">
<label>Password:</label>
<input type="password" name="pass" value="" ng-model="pass" class="form-group" required/>
<span ng-show="regForm.pass.$invalid && regForm.pass.$dirty">
<span ng-show="regForm.pass.$error.required">Password is required</span>
</span>
</div>
<input class="btn btn-default" type="submit" name="create_user" value="Submit" ng-disabled="regForm.email.$invalid && regForm.email.$dirty ||
regForm.firstName.$invalid && regForm.firstName.$dirty ||
regForm.lastName.$invalid && regForm.lastName.$dirty ||
regForm.phone.$invalid && regForm.phone.$dirty ||
regForm.pass.$invalid && regForm.pass.$dirty"/>
<?php
if (!empty($_SESSION['user_already_exists'])) {
echo "Username already exist - Please Try Again";
$_SESSION['user_already_exists'] = null;
}
?>
</form>
</div>
<div ng-show="<?php echo $home; ?> == 5" style="max-width: 500px; margin: 0 auto;">
<h1>Reset Password:</h1>
<form name="resetPassword" action="index.php?id=5" method="post">
<div class="form-group">
<label>Username:</label>
<input type="text" class="form-group" name="user_forgot" value="" />
</div>
<div class="form-group">
<label>New Password:</label>
<input type="password" class="form-group" name="pass_forgot" />
</div>
<div class="form-group">
<label>Last Name:</label>
<input type="text" class="form-group" name="last_forgot" value="" />
</div>
<input class="btn btn-default" type="submit" name="forgot_pass" value="Reset Password">
<?php
if (!empty($_SESSION['pass_reset_bad'])) {
echo "Unable to reset password. Please Try Again";
$_SESSION['pass_reset_bad'] = null;
}
?>
</form>
</div>
<giphy ng-show="<?php echo $home; ?> == 6" ></giphy>
<bank ng-show="<?php echo $home; ?> == 7"></bank>
</div>
</div>
<div class="col-xs-0 col-md-1">
<!-- EMPTY -->
</div>
</div>
<!-- Bottom Row -->
<div class="row <?php if ($home!=6) {echo "hidden-xs";}?>" id="bottom-empty">
<div class="col-xs-0 col-lg-3">
<!-- Empty Col -->
</div>
<div class="no-padding col-xs-12 col-lg-6">
<div ng-show="<?php echo $home; ?> == 6" id="the-gif-cont">
<img src="" id="the-gif">
</div>
</div>
<div class="col-xs-0 col-lg-3">
<!-- Empty Col -->
</div>
</div>
</div> <!-- End of Container Fluid -->
</div>
</body>
</html>
<?php
// 5. Free Memory
mysqli_close($connection);
?>
| {
"content_hash": "510fb5b24397fc5f7341fe8e337e6494",
"timestamp": "",
"source": "github",
"line_count": 522,
"max_line_length": 152,
"avg_line_length": 33.310344827586206,
"alnum_prop": 0.5659075224292616,
"repo_name": "KyletheFox/4397_Demo_App",
"id": "5753c6550cd358ad7d4a08c1565baa84e7ff65dc",
"size": "17388",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "www/index.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "3009"
},
{
"name": "C",
"bytes": "1663"
},
{
"name": "C#",
"bytes": "20363"
},
{
"name": "C++",
"bytes": "211682"
},
{
"name": "CSS",
"bytes": "1713978"
},
{
"name": "HTML",
"bytes": "5630"
},
{
"name": "Java",
"bytes": "39600"
},
{
"name": "JavaScript",
"bytes": "10058256"
},
{
"name": "Objective-C",
"bytes": "326045"
},
{
"name": "PHP",
"bytes": "75305"
},
{
"name": "Shell",
"bytes": "4592"
}
],
"symlink_target": ""
} |
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>"bigint/docs/types/index.d" | stdlib</title>
<meta name="description" content="stdlib is a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing.">
<meta name="author" content="stdlib">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<!-- Icons -->
<link rel="apple-touch-icon" sizes="180x180" href="../apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="../favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="../favicon-16x16.png">
<link rel="manifest" href="../manifest.json">
<link rel="mask-icon" href="../safari-pinned-tab.svg" color="#5bbad5">
<meta name="theme-color" content="#ffffff">
<!-- Facebook Open Graph -->
<meta property="og:type" content="website">
<meta property="og:site_name" content="stdlib">
<meta property="og:url" content="https://stdlib.io/">
<meta property="og:title" content="A standard library for JavaScript and Node.js.">
<meta property="og:description" content="stdlib is a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing.">
<meta property="og:locale" content="en_US">
<meta property="og:image" content="">
<!-- Twitter -->
<meta name="twitter:card" content="A standard library for JavaScript and Node.js.">
<meta name="twitter:site" content="@stdlibjs">
<meta name="twitter:url" content="https://stdlib.io/">
<meta name="twitter:title" content="stdlib">
<meta name="twitter:description" content="stdlib is a standard library for JavaScript and Node.js, with an emphasis on numerical and scientific computing.">
<meta name="twitter:image" content="">
<link rel="stylesheet" href="../assets/css/main.css">
<link rel="stylesheet" href="../assets/css/theme.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.js" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title"><img src="../logo_white.svg" alt="stdlib"></a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="_bigint_docs_types_index_d_.html">"bigint/docs/types/index.d"</a>
</li>
</ul>
<h1>External module "bigint/docs/types/index.d"</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section tsd-is-not-exported">
<h3>Interfaces</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported"><a href="../interfaces/_bigint_docs_types_index_d_.namespace.html" class="tsd-kind-icon">Namespace</a></li>
</ul>
</section>
<section class="tsd-index-section tsd-is-not-exported">
<h3>Variables</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_bigint_docs_types_index_d_.html#bigint" class="tsd-kind-icon">Big<wbr>Int</a></li>
<li class="tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported"><a href="_bigint_docs_types_index_d_.html#ns" class="tsd-kind-icon">ns</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-not-exported">
<h2>Variables</h2>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a name="bigint" class="tsd-anchor"></a>
<h3>Big<wbr>Int</h3>
<div class="tsd-signature tsd-kind-icon">Big<wbr>Int<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">BigIntConstructor</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/stdlib-js/stdlib/blob/d09e97b9b/lib/node_modules/@stdlib/bigint/docs/types/index.d.ts#L24">lib/node_modules/@stdlib/bigint/docs/types/index.d.ts:24</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a name="ns" class="tsd-anchor"></a>
<h3>ns</h3>
<div class="tsd-signature tsd-kind-icon">ns<span class="tsd-signature-symbol">:</span> <a href="../interfaces/_array_base_docs_types_index_d_.namespace.html" class="tsd-signature-type">Namespace</a></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/stdlib-js/stdlib/blob/d09e97b9b/lib/node_modules/@stdlib/bigint/docs/types/index.d.ts#L47">lib/node_modules/@stdlib/bigint/docs/types/index.d.ts:47</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>BigInt.</p>
</div>
</div>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Packages</em></a>
</li>
<li class="current tsd-kind-external-module">
<a href="_bigint_docs_types_index_d_.html">"bigint/docs/types/index.d"</a>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
<li class=" tsd-kind-interface tsd-parent-kind-external-module tsd-is-not-exported">
<a href="../interfaces/_bigint_docs_types_index_d_.namespace.html" class="tsd-kind-icon">Namespace</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a href="_bigint_docs_types_index_d_.html#bigint" class="tsd-kind-icon">Big<wbr>Int</a>
</li>
<li class=" tsd-kind-variable tsd-parent-kind-external-module tsd-is-not-exported">
<a href="_bigint_docs_types_index_d_.html#ns" class="tsd-kind-icon">ns</a>
</li>
</ul>
</nav>
</div>
</div>
</div>
<footer>
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-module"><span class="tsd-kind-icon">Module</span></li>
<li class="tsd-kind-object-literal"><span class="tsd-kind-icon">Object literal</span></li>
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
<li class="tsd-kind-function"><span class="tsd-kind-icon">Function</span></li>
<li class="tsd-kind-function tsd-has-type-parameter"><span class="tsd-kind-icon">Function with type parameter</span></li>
<li class="tsd-kind-index-signature"><span class="tsd-kind-icon">Index signature</span></li>
<li class="tsd-kind-type-alias"><span class="tsd-kind-icon">Type alias</span></li>
<li class="tsd-kind-type-alias tsd-has-type-parameter"><span class="tsd-kind-icon">Type alias with type parameter</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-enum"><span class="tsd-kind-icon">Enumeration</span></li>
<li class="tsd-kind-enum-member"><span class="tsd-kind-icon">Enumeration member</span></li>
<li class="tsd-kind-property tsd-parent-kind-enum"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-enum"><span class="tsd-kind-icon">Method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-interface"><span class="tsd-kind-icon">Interface</span></li>
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-interface"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-interface"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-interface"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-index-signature tsd-parent-kind-interface"><span class="tsd-kind-icon">Index signature</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
<li class="tsd-kind-class tsd-has-type-parameter"><span class="tsd-kind-icon">Class with type parameter</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class"><span class="tsd-kind-icon">Accessor</span></li>
<li class="tsd-kind-index-signature tsd-parent-kind-class"><span class="tsd-kind-icon">Index signature</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-protected"><span class="tsd-kind-icon">Protected accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private method</span></li>
<li class="tsd-kind-accessor tsd-parent-kind-class tsd-is-private"><span class="tsd-kind-icon">Private accessor</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static property</span></li>
<li class="tsd-kind-call-signature tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</span></li>
</ul>
</div>
</div>
<div class="bottom-nav center border-top">
<a href="https://www.patreon.com/athan">Donate</a>
/
<a href="/docs/api/">Docs</a>
/
<a href="https://gitter.im/stdlib-js/stdlib">Chat</a>
/
<a href="https://twitter.com/stdlibjs">Twitter</a>
/
<a href="https://github.com/stdlib-js/stdlib">Contribute</a>
</div>
</footer>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<script src="../assets/js/theme.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-105890493-1', 'auto');
ga('send', 'pageview');
</script>
</body>
</html> | {
"content_hash": "e729b04fcf02e00a75bf1ace61151a6c",
"timestamp": "",
"source": "github",
"line_count": 254,
"max_line_length": 209,
"avg_line_length": 52.90944881889764,
"alnum_prop": 0.6632933998065332,
"repo_name": "stdlib-js/www",
"id": "a9e765dc2810496b32194c5179b1127bec3f3765",
"size": "13439",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "public/docs/ts/latest/modules/_bigint_docs_types_index_d_.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "190538"
},
{
"name": "HTML",
"bytes": "158086013"
},
{
"name": "Io",
"bytes": "14873"
},
{
"name": "JavaScript",
"bytes": "5395746994"
},
{
"name": "Makefile",
"bytes": "40479"
},
{
"name": "Shell",
"bytes": "9744"
}
],
"symlink_target": ""
} |
package controllers.traits.account
import config.{Authorised, BackController, NotAuthorised}
import models.account.{AccountSettings, UpdatedPassword, UserProfile}
import play.api.mvc.Action
import services._
import scala.concurrent.Future
import scala.concurrent.ExecutionContext.Implicits.global
trait AccountDetailsCtrl extends BackController {
val accountService : AccountService
def getAccountData : Action[String] = Action.async(parse.text) {
implicit request =>
authOpenAction {
case Authorised =>
decryptRequest[String] {
userID =>
accountService.getAccount(userID) map {
case Some(acc) => Ok(acc)
case None => InternalServerError
}
}
case NotAuthorised => Future.successful(Forbidden)
}
}
def updateProfileInformation() : Action[String] = Action.async(parse.text) {
implicit request =>
authOpenAction {
case Authorised =>
decryptRequest[UserProfile] {
profile =>
accountService.updateProfileInformation(profile) map {
case false => Ok
case true => InternalServerError
}
}
case NotAuthorised => Future.successful(Forbidden)
}
}
def updateUserPassword() : Action[String] = Action.async(parse.text) {
implicit request =>
authOpenAction {
case Authorised =>
decryptRequest[UpdatedPassword] {
passwordSet =>
accountService.updatePassword(passwordSet) map {
case InvalidOldPassword => Conflict
case PasswordUpdate(success) => success match {
case true => InternalServerError
case false => Ok
}
}
}
case NotAuthorised => Future.successful(Forbidden)
}
}
def updateUserSettings() : Action[String] = Action.async(parse.text) {
implicit request =>
authOpenAction {
case Authorised =>
decryptRequest[AccountSettings] {
settings =>
accountService.updateSettings(settings) map {
case UpdatedSettingsSuccess => Ok
case UpdatedSettingsFailed => InternalServerError
}
}
case NotAuthorised => Future.successful(Forbidden)
}
}
}
| {
"content_hash": "b98bccb65975c2939c0d82551ce70434",
"timestamp": "",
"source": "github",
"line_count": 77,
"max_line_length": 78,
"avg_line_length": 31.07792207792208,
"alnum_prop": 0.6013372335979942,
"repo_name": "cjww-development/rest-api",
"id": "02c79eed0ac008c0241aa3d2d20a9e6a8c3c8f43",
"size": "3123",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "app/controllers/traits/account/AccountDetailsCtrl.scala",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Scala",
"bytes": "111777"
}
],
"symlink_target": ""
} |
var defaults = function (target, source) {
source = source || {};
for (var key in source) {
if (source.hasOwnProperty(key) && target[key] === undefined) {
source[key] = target[key];
}
}
return target;
};
var pw = require('pw');
var readline = require('readline');
module.exports = function(questions, options, callback) {
if (typeof options === 'function') {
callback = options;
options = {};
}
options = defaults({
confirmFailMessage: 'values do not match',
confirmPostPrefix: 'your answer was:',
confirmMessage: 'is this correct? [n] >',
confirmPrefix: 'confirm',
promptSep: ' > ',
confirmString: 'y',
confirmStrToLower: true
}, options);
if (options.confirmPrefix.charAt(options.confirmPrefix.length - 1) !== ' ') {
options.confirmPrefix += ' ';
}
var rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
var answers = {};
var queue = [];
function write(msg) {
process.stdout.write(msg);
}
function done() {
if (options.doneMessage) {
write(options.doneMessage);
}
rl.close();
callback(null, answers);
};
function ask(inputs) {
var input, defaultInput, confirm, prompt;
var inputItem = inputs.shift();
if (typeof inputItem === 'string') {
input = inputItem;
question = inputItem;
defaultInput = false;
confirm = false;
mask = false;
}
else {
input = Object.keys(inputItem)[0];
defaultInput = inputItem[input];
if ({}.toString.call(defaultInput) === '[object Object]') {
confirm = defaultInput.confirm;
question = defaultInput.question || input;
mask = defaultInput.mask || false;
defaultInput = defaultInput.defaultValue;
}
else {
confirm = false;
question = input;
mask = false;
}
}
if (defaultInput) question += ' [' + defaultInput + ']';
question += options.promptSep;
if (mask) {
rl.close();
var confirmPwd = function (pwd, confirmPwd) {
if (pwd !== confirmPwd) {
console.log(options.confirmFailMessage);
inputs.unshift(inputItem);
}
else {
answers[input] = pwd;
}
if (inputs.length > 0) {
rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
ask(inputs);
}
else done();
};
process.stdout.write(question);
pw(function (password) {
if (confirm) {
write(options.confirmPrefix + question);
pw(function (confirmPassword) {
confirmPwd(password, confirmPassword);
});
}
else confirmPwd(password, password);
});
}
else {
rl.question(question, function (answer) {
var resolve = function (confirmed, answer) {
if (confirmed) answers[input] = answer;
else inputs.unshift(inputItem);
if (inputs.length > 0) ask(inputs);
else done();
};
if (answer.length === 0 && defaultInput)
answer = defaultInput;
if (confirm) {
console.log(options.confirmPostPrefix, answer);
rl.question(options.confirmMessage, function (confirmAnswer) {
if (options.confirmStrToLower) {
confirmAnswer = confirmAnswer.toLowerCase();
}
resolve(confirmAnswer === options.confirmString, answer);
});
}
else {
resolve(true, answer);
}
});
}
}
ask(questions);
}; | {
"content_hash": "c2e8af64d0fe00ae1141beae175c1891",
"timestamp": "",
"source": "github",
"line_count": 152,
"max_line_length": 82,
"avg_line_length": 29.848684210526315,
"alnum_prop": 0.44941591359929467,
"repo_name": "fshost/nodecli",
"id": "c1583b88c49cbffaf440cc50e4459bc658e2a69d",
"size": "4918",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "nodecli.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "9096"
}
],
"symlink_target": ""
} |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]-->
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="generator" content="Asciidoctor 1.5.5">
<title>git-replace(1)</title>
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700">
<style>
/* Asciidoctor default stylesheet | MIT License | http://asciidoctor.org */
/* Remove comment around @import statement below when using as a custom stylesheet */
/*@import "https://fonts.googleapis.com/css?family=Open+Sans:300,300italic,400,400italic,600,600italic%7CNoto+Serif:400,400italic,700,700italic%7CDroid+Sans+Mono:400,700";*/
article,aside,details,figcaption,figure,footer,header,hgroup,main,nav,section,summary{display:block}
audio,canvas,video{display:inline-block}
audio:not([controls]){display:none;height:0}
[hidden],template{display:none}
script{display:none!important}
html{font-family:sans-serif;-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}
a{background:transparent}
a:focus{outline:thin dotted}
a:active,a:hover{outline:0}
h1{font-size:2em;margin:.67em 0}
abbr[title]{border-bottom:1px dotted}
b,strong{font-weight:bold}
dfn{font-style:italic}
hr{-moz-box-sizing:content-box;box-sizing:content-box;height:0}
mark{background:#ff0;color:#000}
code,kbd,pre,samp{font-family:monospace;font-size:1em}
pre{white-space:pre-wrap}
q{quotes:"\201C" "\201D" "\2018" "\2019"}
small{font-size:80%}
sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}
sup{top:-.5em}
sub{bottom:-.25em}
img{border:0}
svg:not(:root){overflow:hidden}
figure{margin:0}
fieldset{border:1px solid silver;margin:0 2px;padding:.35em .625em .75em}
legend{border:0;padding:0}
button,input,select,textarea{font-family:inherit;font-size:100%;margin:0}
button,input{line-height:normal}
button,select{text-transform:none}
button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer}
button[disabled],html input[disabled]{cursor:default}
input[type="checkbox"],input[type="radio"]{box-sizing:border-box;padding:0}
input[type="search"]{-webkit-appearance:textfield;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box}
input[type="search"]::-webkit-search-cancel-button,input[type="search"]::-webkit-search-decoration{-webkit-appearance:none}
button::-moz-focus-inner,input::-moz-focus-inner{border:0;padding:0}
textarea{overflow:auto;vertical-align:top}
table{border-collapse:collapse;border-spacing:0}
*,*:before,*:after{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}
html,body{font-size:100%}
body{background:#fff;color:rgba(0,0,0,.8);padding:0;margin:0;font-family:"Noto Serif","DejaVu Serif",serif;font-weight:400;font-style:normal;line-height:1;position:relative;cursor:auto;tab-size:4;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased}
a:hover{cursor:pointer}
img,object,embed{max-width:100%;height:auto}
object,embed{height:100%}
img{-ms-interpolation-mode:bicubic}
.left{float:left!important}
.right{float:right!important}
.text-left{text-align:left!important}
.text-right{text-align:right!important}
.text-center{text-align:center!important}
.text-justify{text-align:justify!important}
.hide{display:none}
img,object,svg{display:inline-block;vertical-align:middle}
textarea{height:auto;min-height:50px}
select{width:100%}
.center{margin-left:auto;margin-right:auto}
.spread{width:100%}
p.lead,.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{font-size:1.21875em;line-height:1.6}
.subheader,.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{line-height:1.45;color:#7a2518;font-weight:400;margin-top:0;margin-bottom:.25em}
div,dl,dt,dd,ul,ol,li,h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6,pre,form,p,blockquote,th,td{margin:0;padding:0;direction:ltr}
a{color:#2156a5;text-decoration:underline;line-height:inherit}
a:hover,a:focus{color:#1d4b8f}
a img{border:none}
p{font-family:inherit;font-weight:400;font-size:1em;line-height:1.6;margin-bottom:1.25em;text-rendering:optimizeLegibility}
p aside{font-size:.875em;line-height:1.35;font-style:italic}
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{font-family:"Open Sans","DejaVu Sans",sans-serif;font-weight:300;font-style:normal;color:#ba3925;text-rendering:optimizeLegibility;margin-top:1em;margin-bottom:.5em;line-height:1.0125em}
h1 small,h2 small,h3 small,#toctitle small,.sidebarblock>.content>.title small,h4 small,h5 small,h6 small{font-size:60%;color:#e99b8f;line-height:0}
h1{font-size:2.125em}
h2{font-size:1.6875em}
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.375em}
h4,h5{font-size:1.125em}
h6{font-size:1em}
hr{border:solid #ddddd8;border-width:1px 0 0;clear:both;margin:1.25em 0 1.1875em;height:0}
em,i{font-style:italic;line-height:inherit}
strong,b{font-weight:bold;line-height:inherit}
small{font-size:60%;line-height:inherit}
code{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;color:rgba(0,0,0,.9)}
ul,ol,dl{font-size:1em;line-height:1.6;margin-bottom:1.25em;list-style-position:outside;font-family:inherit}
ul,ol,ul.no-bullet,ol.no-bullet{margin-left:1.5em}
ul li ul,ul li ol{margin-left:1.25em;margin-bottom:0;font-size:1em}
ul.square li ul,ul.circle li ul,ul.disc li ul{list-style:inherit}
ul.square{list-style-type:square}
ul.circle{list-style-type:circle}
ul.disc{list-style-type:disc}
ul.no-bullet{list-style:none}
ol li ul,ol li ol{margin-left:1.25em;margin-bottom:0}
dl dt{margin-bottom:.3125em;font-weight:bold}
dl dd{margin-bottom:1.25em}
abbr,acronym{text-transform:uppercase;font-size:90%;color:rgba(0,0,0,.8);border-bottom:1px dotted #ddd;cursor:help}
abbr{text-transform:none}
blockquote{margin:0 0 1.25em;padding:.5625em 1.25em 0 1.1875em;border-left:1px solid #ddd}
blockquote cite{display:block;font-size:.9375em;color:rgba(0,0,0,.6)}
blockquote cite:before{content:"\2014 \0020"}
blockquote cite a,blockquote cite a:visited{color:rgba(0,0,0,.6)}
blockquote,blockquote p{line-height:1.6;color:rgba(0,0,0,.85)}
@media only screen and (min-width:768px){h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2}
h1{font-size:2.75em}
h2{font-size:2.3125em}
h3,#toctitle,.sidebarblock>.content>.title{font-size:1.6875em}
h4{font-size:1.4375em}}
table{background:#fff;margin-bottom:1.25em;border:solid 1px #dedede}
table thead,table tfoot{background:#f7f8f7;font-weight:bold}
table thead tr th,table thead tr td,table tfoot tr th,table tfoot tr td{padding:.5em .625em .625em;font-size:inherit;color:rgba(0,0,0,.8);text-align:left}
table tr th,table tr td{padding:.5625em .625em;font-size:inherit;color:rgba(0,0,0,.8)}
table tr.even,table tr.alt,table tr:nth-of-type(even){background:#f8f8f7}
table thead tr th,table tfoot tr th,table tbody tr td,table tr td,table tfoot tr td{display:table-cell;line-height:1.6}
h1,h2,h3,#toctitle,.sidebarblock>.content>.title,h4,h5,h6{line-height:1.2;word-spacing:-.05em}
h1 strong,h2 strong,h3 strong,#toctitle strong,.sidebarblock>.content>.title strong,h4 strong,h5 strong,h6 strong{font-weight:400}
.clearfix:before,.clearfix:after,.float-group:before,.float-group:after{content:" ";display:table}
.clearfix:after,.float-group:after{clear:both}
*:not(pre)>code{font-size:.9375em;font-style:normal!important;letter-spacing:0;padding:.1em .5ex;word-spacing:-.15em;background-color:#f7f7f8;-webkit-border-radius:4px;border-radius:4px;line-height:1.45;text-rendering:optimizeSpeed;word-wrap:break-word}
*:not(pre)>code.nobreak{word-wrap:normal}
*:not(pre)>code.nowrap{white-space:nowrap}
pre,pre>code{line-height:1.45;color:rgba(0,0,0,.9);font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;font-weight:400;text-rendering:optimizeSpeed}
em em{font-style:normal}
strong strong{font-weight:400}
.keyseq{color:rgba(51,51,51,.8)}
kbd{font-family:"Droid Sans Mono","DejaVu Sans Mono",monospace;display:inline-block;color:rgba(0,0,0,.8);font-size:.65em;line-height:1.45;background-color:#f7f7f7;border:1px solid #ccc;-webkit-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em white inset;box-shadow:0 1px 0 rgba(0,0,0,.2),0 0 0 .1em #fff inset;margin:0 .15em;padding:.2em .5em;vertical-align:middle;position:relative;top:-.1em;white-space:nowrap}
.keyseq kbd:first-child{margin-left:0}
.keyseq kbd:last-child{margin-right:0}
.menuseq,.menu{color:rgba(0,0,0,.8)}
b.button:before,b.button:after{position:relative;top:-1px;font-weight:400}
b.button:before{content:"[";padding:0 3px 0 2px}
b.button:after{content:"]";padding:0 2px 0 3px}
p a>code:hover{color:rgba(0,0,0,.9)}
#header,#content,#footnotes,#footer{width:100%;margin-left:auto;margin-right:auto;margin-top:0;margin-bottom:0;max-width:62.5em;*zoom:1;position:relative;padding-left:.9375em;padding-right:.9375em}
#header:before,#header:after,#content:before,#content:after,#footnotes:before,#footnotes:after,#footer:before,#footer:after{content:" ";display:table}
#header:after,#content:after,#footnotes:after,#footer:after{clear:both}
#content{margin-top:1.25em}
#content:before{content:none}
#header>h1:first-child{color:rgba(0,0,0,.85);margin-top:2.25rem;margin-bottom:0}
#header>h1:first-child+#toc{margin-top:8px;border-top:1px solid #ddddd8}
#header>h1:only-child,body.toc2 #header>h1:nth-last-child(2){border-bottom:1px solid #ddddd8;padding-bottom:8px}
#header .details{border-bottom:1px solid #ddddd8;line-height:1.45;padding-top:.25em;padding-bottom:.25em;padding-left:.25em;color:rgba(0,0,0,.6);display:-ms-flexbox;display:-webkit-flex;display:flex;-ms-flex-flow:row wrap;-webkit-flex-flow:row wrap;flex-flow:row wrap}
#header .details span:first-child{margin-left:-.125em}
#header .details span.email a{color:rgba(0,0,0,.85)}
#header .details br{display:none}
#header .details br+span:before{content:"\00a0\2013\00a0"}
#header .details br+span.author:before{content:"\00a0\22c5\00a0";color:rgba(0,0,0,.85)}
#header .details br+span#revremark:before{content:"\00a0|\00a0"}
#header #revnumber{text-transform:capitalize}
#header #revnumber:after{content:"\00a0"}
#content>h1:first-child:not([class]){color:rgba(0,0,0,.85);border-bottom:1px solid #ddddd8;padding-bottom:8px;margin-top:0;padding-top:1rem;margin-bottom:1.25rem}
#toc{border-bottom:1px solid #efefed;padding-bottom:.5em}
#toc>ul{margin-left:.125em}
#toc ul.sectlevel0>li>a{font-style:italic}
#toc ul.sectlevel0 ul.sectlevel1{margin:.5em 0}
#toc ul{font-family:"Open Sans","DejaVu Sans",sans-serif;list-style-type:none}
#toc li{line-height:1.3334;margin-top:.3334em}
#toc a{text-decoration:none}
#toc a:active{text-decoration:underline}
#toctitle{color:#7a2518;font-size:1.2em}
@media only screen and (min-width:768px){#toctitle{font-size:1.375em}
body.toc2{padding-left:15em;padding-right:0}
#toc.toc2{margin-top:0!important;background-color:#f8f8f7;position:fixed;width:15em;left:0;top:0;border-right:1px solid #efefed;border-top-width:0!important;border-bottom-width:0!important;z-index:1000;padding:1.25em 1em;height:100%;overflow:auto}
#toc.toc2 #toctitle{margin-top:0;margin-bottom:.8rem;font-size:1.2em}
#toc.toc2>ul{font-size:.9em;margin-bottom:0}
#toc.toc2 ul ul{margin-left:0;padding-left:1em}
#toc.toc2 ul.sectlevel0 ul.sectlevel1{padding-left:0;margin-top:.5em;margin-bottom:.5em}
body.toc2.toc-right{padding-left:0;padding-right:15em}
body.toc2.toc-right #toc.toc2{border-right-width:0;border-left:1px solid #efefed;left:auto;right:0}}
@media only screen and (min-width:1280px){body.toc2{padding-left:20em;padding-right:0}
#toc.toc2{width:20em}
#toc.toc2 #toctitle{font-size:1.375em}
#toc.toc2>ul{font-size:.95em}
#toc.toc2 ul ul{padding-left:1.25em}
body.toc2.toc-right{padding-left:0;padding-right:20em}}
#content #toc{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
#content #toc>:first-child{margin-top:0}
#content #toc>:last-child{margin-bottom:0}
#footer{max-width:100%;background-color:rgba(0,0,0,.8);padding:1.25em}
#footer-text{color:rgba(255,255,255,.8);line-height:1.44}
.sect1{padding-bottom:.625em}
@media only screen and (min-width:768px){.sect1{padding-bottom:1.25em}}
.sect1+.sect1{border-top:1px solid #efefed}
#content h1>a.anchor,h2>a.anchor,h3>a.anchor,#toctitle>a.anchor,.sidebarblock>.content>.title>a.anchor,h4>a.anchor,h5>a.anchor,h6>a.anchor{position:absolute;z-index:1001;width:1.5ex;margin-left:-1.5ex;display:block;text-decoration:none!important;visibility:hidden;text-align:center;font-weight:400}
#content h1>a.anchor:before,h2>a.anchor:before,h3>a.anchor:before,#toctitle>a.anchor:before,.sidebarblock>.content>.title>a.anchor:before,h4>a.anchor:before,h5>a.anchor:before,h6>a.anchor:before{content:"\00A7";font-size:.85em;display:block;padding-top:.1em}
#content h1:hover>a.anchor,#content h1>a.anchor:hover,h2:hover>a.anchor,h2>a.anchor:hover,h3:hover>a.anchor,#toctitle:hover>a.anchor,.sidebarblock>.content>.title:hover>a.anchor,h3>a.anchor:hover,#toctitle>a.anchor:hover,.sidebarblock>.content>.title>a.anchor:hover,h4:hover>a.anchor,h4>a.anchor:hover,h5:hover>a.anchor,h5>a.anchor:hover,h6:hover>a.anchor,h6>a.anchor:hover{visibility:visible}
#content h1>a.link,h2>a.link,h3>a.link,#toctitle>a.link,.sidebarblock>.content>.title>a.link,h4>a.link,h5>a.link,h6>a.link{color:#ba3925;text-decoration:none}
#content h1>a.link:hover,h2>a.link:hover,h3>a.link:hover,#toctitle>a.link:hover,.sidebarblock>.content>.title>a.link:hover,h4>a.link:hover,h5>a.link:hover,h6>a.link:hover{color:#a53221}
.audioblock,.imageblock,.literalblock,.listingblock,.stemblock,.videoblock{margin-bottom:1.25em}
.admonitionblock td.content>.title,.audioblock>.title,.exampleblock>.title,.imageblock>.title,.listingblock>.title,.literalblock>.title,.stemblock>.title,.openblock>.title,.paragraph>.title,.quoteblock>.title,table.tableblock>.title,.verseblock>.title,.videoblock>.title,.dlist>.title,.olist>.title,.ulist>.title,.qlist>.title,.hdlist>.title{text-rendering:optimizeLegibility;text-align:left;font-family:"Noto Serif","DejaVu Serif",serif;font-size:1rem;font-style:italic}
table.tableblock>caption.title{white-space:nowrap;overflow:visible;max-width:0}
.paragraph.lead>p,#preamble>.sectionbody>.paragraph:first-of-type p{color:rgba(0,0,0,.85)}
table.tableblock #preamble>.sectionbody>.paragraph:first-of-type p{font-size:inherit}
.admonitionblock>table{border-collapse:separate;border:0;background:none;width:100%}
.admonitionblock>table td.icon{text-align:center;width:80px}
.admonitionblock>table td.icon img{max-width:none}
.admonitionblock>table td.icon .title{font-weight:bold;font-family:"Open Sans","DejaVu Sans",sans-serif;text-transform:uppercase}
.admonitionblock>table td.content{padding-left:1.125em;padding-right:1.25em;border-left:1px solid #ddddd8;color:rgba(0,0,0,.6)}
.admonitionblock>table td.content>:last-child>:last-child{margin-bottom:0}
.exampleblock>.content{border-style:solid;border-width:1px;border-color:#e6e6e6;margin-bottom:1.25em;padding:1.25em;background:#fff;-webkit-border-radius:4px;border-radius:4px}
.exampleblock>.content>:first-child{margin-top:0}
.exampleblock>.content>:last-child{margin-bottom:0}
.sidebarblock{border-style:solid;border-width:1px;border-color:#e0e0dc;margin-bottom:1.25em;padding:1.25em;background:#f8f8f7;-webkit-border-radius:4px;border-radius:4px}
.sidebarblock>:first-child{margin-top:0}
.sidebarblock>:last-child{margin-bottom:0}
.sidebarblock>.content>.title{color:#7a2518;margin-top:0;text-align:center}
.exampleblock>.content>:last-child>:last-child,.exampleblock>.content .olist>ol>li:last-child>:last-child,.exampleblock>.content .ulist>ul>li:last-child>:last-child,.exampleblock>.content .qlist>ol>li:last-child>:last-child,.sidebarblock>.content>:last-child>:last-child,.sidebarblock>.content .olist>ol>li:last-child>:last-child,.sidebarblock>.content .ulist>ul>li:last-child>:last-child,.sidebarblock>.content .qlist>ol>li:last-child>:last-child{margin-bottom:0}
.literalblock pre,.listingblock pre:not(.highlight),.listingblock pre[class="highlight"],.listingblock pre[class^="highlight "],.listingblock pre.CodeRay,.listingblock pre.prettyprint{background:#f7f7f8}
.sidebarblock .literalblock pre,.sidebarblock .listingblock pre:not(.highlight),.sidebarblock .listingblock pre[class="highlight"],.sidebarblock .listingblock pre[class^="highlight "],.sidebarblock .listingblock pre.CodeRay,.sidebarblock .listingblock pre.prettyprint{background:#f2f1f1}
.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{-webkit-border-radius:4px;border-radius:4px;word-wrap:break-word;padding:1em;font-size:.8125em}
.literalblock pre.nowrap,.literalblock pre[class].nowrap,.listingblock pre.nowrap,.listingblock pre[class].nowrap{overflow-x:auto;white-space:pre;word-wrap:normal}
@media only screen and (min-width:768px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:.90625em}}
@media only screen and (min-width:1280px){.literalblock pre,.literalblock pre[class],.listingblock pre,.listingblock pre[class]{font-size:1em}}
.literalblock.output pre{color:#f7f7f8;background-color:rgba(0,0,0,.9)}
.listingblock pre.highlightjs{padding:0}
.listingblock pre.highlightjs>code{padding:1em;-webkit-border-radius:4px;border-radius:4px}
.listingblock pre.prettyprint{border-width:0}
.listingblock>.content{position:relative}
.listingblock code[data-lang]:before{display:none;content:attr(data-lang);position:absolute;font-size:.75em;top:.425rem;right:.5rem;line-height:1;text-transform:uppercase;color:#999}
.listingblock:hover code[data-lang]:before{display:block}
.listingblock.terminal pre .command:before{content:attr(data-prompt);padding-right:.5em;color:#999}
.listingblock.terminal pre .command:not([data-prompt]):before{content:"$"}
table.pyhltable{border-collapse:separate;border:0;margin-bottom:0;background:none}
table.pyhltable td{vertical-align:top;padding-top:0;padding-bottom:0;line-height:1.45}
table.pyhltable td.code{padding-left:.75em;padding-right:0}
pre.pygments .lineno,table.pyhltable td:not(.code){color:#999;padding-left:0;padding-right:.5em;border-right:1px solid #ddddd8}
pre.pygments .lineno{display:inline-block;margin-right:.25em}
table.pyhltable .linenodiv{background:none!important;padding-right:0!important}
.quoteblock{margin:0 1em 1.25em 1.5em;display:table}
.quoteblock>.title{margin-left:-1.5em;margin-bottom:.75em}
.quoteblock blockquote,.quoteblock blockquote p{color:rgba(0,0,0,.85);font-size:1.15rem;line-height:1.75;word-spacing:.1em;letter-spacing:0;font-style:italic;text-align:justify}
.quoteblock blockquote{margin:0;padding:0;border:0}
.quoteblock blockquote:before{content:"\201c";float:left;font-size:2.75em;font-weight:bold;line-height:.6em;margin-left:-.6em;color:#7a2518;text-shadow:0 1px 2px rgba(0,0,0,.1)}
.quoteblock blockquote>.paragraph:last-child p{margin-bottom:0}
.quoteblock .attribution{margin-top:.5em;margin-right:.5ex;text-align:right}
.quoteblock .quoteblock{margin-left:0;margin-right:0;padding:.5em 0;border-left:3px solid rgba(0,0,0,.6)}
.quoteblock .quoteblock blockquote{padding:0 0 0 .75em}
.quoteblock .quoteblock blockquote:before{display:none}
.verseblock{margin:0 1em 1.25em 1em}
.verseblock pre{font-family:"Open Sans","DejaVu Sans",sans;font-size:1.15rem;color:rgba(0,0,0,.85);font-weight:300;text-rendering:optimizeLegibility}
.verseblock pre strong{font-weight:400}
.verseblock .attribution{margin-top:1.25rem;margin-left:.5ex}
.quoteblock .attribution,.verseblock .attribution{font-size:.9375em;line-height:1.45;font-style:italic}
.quoteblock .attribution br,.verseblock .attribution br{display:none}
.quoteblock .attribution cite,.verseblock .attribution cite{display:block;letter-spacing:-.025em;color:rgba(0,0,0,.6)}
.quoteblock.abstract{margin:0 0 1.25em 0;display:block}
.quoteblock.abstract blockquote,.quoteblock.abstract blockquote p{text-align:left;word-spacing:0}
.quoteblock.abstract blockquote:before,.quoteblock.abstract blockquote p:first-of-type:before{display:none}
table.tableblock{max-width:100%;border-collapse:separate}
table.tableblock td>.paragraph:last-child p>p:last-child,table.tableblock th>p:last-child,table.tableblock td>p:last-child{margin-bottom:0}
table.tableblock,th.tableblock,td.tableblock{border:0 solid #dedede}
table.grid-all th.tableblock,table.grid-all td.tableblock{border-width:0 1px 1px 0}
table.grid-all tfoot>tr>th.tableblock,table.grid-all tfoot>tr>td.tableblock{border-width:1px 1px 0 0}
table.grid-cols th.tableblock,table.grid-cols td.tableblock{border-width:0 1px 0 0}
table.grid-all *>tr>.tableblock:last-child,table.grid-cols *>tr>.tableblock:last-child{border-right-width:0}
table.grid-rows th.tableblock,table.grid-rows td.tableblock{border-width:0 0 1px 0}
table.grid-all tbody>tr:last-child>th.tableblock,table.grid-all tbody>tr:last-child>td.tableblock,table.grid-all thead:last-child>tr>th.tableblock,table.grid-rows tbody>tr:last-child>th.tableblock,table.grid-rows tbody>tr:last-child>td.tableblock,table.grid-rows thead:last-child>tr>th.tableblock{border-bottom-width:0}
table.grid-rows tfoot>tr>th.tableblock,table.grid-rows tfoot>tr>td.tableblock{border-width:1px 0 0 0}
table.frame-all{border-width:1px}
table.frame-sides{border-width:0 1px}
table.frame-topbot{border-width:1px 0}
th.halign-left,td.halign-left{text-align:left}
th.halign-right,td.halign-right{text-align:right}
th.halign-center,td.halign-center{text-align:center}
th.valign-top,td.valign-top{vertical-align:top}
th.valign-bottom,td.valign-bottom{vertical-align:bottom}
th.valign-middle,td.valign-middle{vertical-align:middle}
table thead th,table tfoot th{font-weight:bold}
tbody tr th{display:table-cell;line-height:1.6;background:#f7f8f7}
tbody tr th,tbody tr th p,tfoot tr th,tfoot tr th p{color:rgba(0,0,0,.8);font-weight:bold}
p.tableblock>code:only-child{background:none;padding:0}
p.tableblock{font-size:1em}
td>div.verse{white-space:pre}
ol{margin-left:1.75em}
ul li ol{margin-left:1.5em}
dl dd{margin-left:1.125em}
dl dd:last-child,dl dd:last-child>:last-child{margin-bottom:0}
ol>li p,ul>li p,ul dd,ol dd,.olist .olist,.ulist .ulist,.ulist .olist,.olist .ulist{margin-bottom:.625em}
ul.unstyled,ol.unnumbered,ul.checklist,ul.none{list-style-type:none}
ul.unstyled,ol.unnumbered,ul.checklist{margin-left:.625em}
ul.checklist li>p:first-child>.fa-square-o:first-child,ul.checklist li>p:first-child>.fa-check-square-o:first-child{width:1em;font-size:.85em}
ul.checklist li>p:first-child>input[type="checkbox"]:first-child{width:1em;position:relative;top:1px}
ul.inline{margin:0 auto .625em auto;margin-left:-1.375em;margin-right:0;padding:0;list-style:none;overflow:hidden}
ul.inline>li{list-style:none;float:left;margin-left:1.375em;display:block}
ul.inline>li>*{display:block}
.unstyled dl dt{font-weight:400;font-style:normal}
ol.arabic{list-style-type:decimal}
ol.decimal{list-style-type:decimal-leading-zero}
ol.loweralpha{list-style-type:lower-alpha}
ol.upperalpha{list-style-type:upper-alpha}
ol.lowerroman{list-style-type:lower-roman}
ol.upperroman{list-style-type:upper-roman}
ol.lowergreek{list-style-type:lower-greek}
.hdlist>table,.colist>table{border:0;background:none}
.hdlist>table>tbody>tr,.colist>table>tbody>tr{background:none}
td.hdlist1,td.hdlist2{vertical-align:top;padding:0 .625em}
td.hdlist1{font-weight:bold;padding-bottom:1.25em}
.literalblock+.colist,.listingblock+.colist{margin-top:-.5em}
.colist>table tr>td:first-of-type{padding:0 .75em;line-height:1}
.colist>table tr>td:last-of-type{padding:.25em 0}
.thumb,.th{line-height:0;display:inline-block;border:solid 4px #fff;-webkit-box-shadow:0 0 0 1px #ddd;box-shadow:0 0 0 1px #ddd}
.imageblock.left,.imageblock[style*="float: left"]{margin:.25em .625em 1.25em 0}
.imageblock.right,.imageblock[style*="float: right"]{margin:.25em 0 1.25em .625em}
.imageblock>.title{margin-bottom:0}
.imageblock.thumb,.imageblock.th{border-width:6px}
.imageblock.thumb>.title,.imageblock.th>.title{padding:0 .125em}
.image.left,.image.right{margin-top:.25em;margin-bottom:.25em;display:inline-block;line-height:0}
.image.left{margin-right:.625em}
.image.right{margin-left:.625em}
a.image{text-decoration:none;display:inline-block}
a.image object{pointer-events:none}
sup.footnote,sup.footnoteref{font-size:.875em;position:static;vertical-align:super}
sup.footnote a,sup.footnoteref a{text-decoration:none}
sup.footnote a:active,sup.footnoteref a:active{text-decoration:underline}
#footnotes{padding-top:.75em;padding-bottom:.75em;margin-bottom:.625em}
#footnotes hr{width:20%;min-width:6.25em;margin:-.25em 0 .75em 0;border-width:1px 0 0 0}
#footnotes .footnote{padding:0 .375em 0 .225em;line-height:1.3334;font-size:.875em;margin-left:1.2em;text-indent:-1.05em;margin-bottom:.2em}
#footnotes .footnote a:first-of-type{font-weight:bold;text-decoration:none}
#footnotes .footnote:last-of-type{margin-bottom:0}
#content #footnotes{margin-top:-.625em;margin-bottom:0;padding:.75em 0}
.gist .file-data>table{border:0;background:#fff;width:100%;margin-bottom:0}
.gist .file-data>table td.line-data{width:99%}
div.unbreakable{page-break-inside:avoid}
.big{font-size:larger}
.small{font-size:smaller}
.underline{text-decoration:underline}
.overline{text-decoration:overline}
.line-through{text-decoration:line-through}
.aqua{color:#00bfbf}
.aqua-background{background-color:#00fafa}
.black{color:#000}
.black-background{background-color:#000}
.blue{color:#0000bf}
.blue-background{background-color:#0000fa}
.fuchsia{color:#bf00bf}
.fuchsia-background{background-color:#fa00fa}
.gray{color:#606060}
.gray-background{background-color:#7d7d7d}
.green{color:#006000}
.green-background{background-color:#007d00}
.lime{color:#00bf00}
.lime-background{background-color:#00fa00}
.maroon{color:#600000}
.maroon-background{background-color:#7d0000}
.navy{color:#000060}
.navy-background{background-color:#00007d}
.olive{color:#606000}
.olive-background{background-color:#7d7d00}
.purple{color:#600060}
.purple-background{background-color:#7d007d}
.red{color:#bf0000}
.red-background{background-color:#fa0000}
.silver{color:#909090}
.silver-background{background-color:#bcbcbc}
.teal{color:#006060}
.teal-background{background-color:#007d7d}
.white{color:#bfbfbf}
.white-background{background-color:#fafafa}
.yellow{color:#bfbf00}
.yellow-background{background-color:#fafa00}
span.icon>.fa{cursor:default}
.admonitionblock td.icon [class^="fa icon-"]{font-size:2.5em;text-shadow:1px 1px 2px rgba(0,0,0,.5);cursor:default}
.admonitionblock td.icon .icon-note:before{content:"\f05a";color:#19407c}
.admonitionblock td.icon .icon-tip:before{content:"\f0eb";text-shadow:1px 1px 2px rgba(155,155,0,.8);color:#111}
.admonitionblock td.icon .icon-warning:before{content:"\f071";color:#bf6900}
.admonitionblock td.icon .icon-caution:before{content:"\f06d";color:#bf3400}
.admonitionblock td.icon .icon-important:before{content:"\f06a";color:#bf0000}
.conum[data-value]{display:inline-block;color:#fff!important;background-color:rgba(0,0,0,.8);-webkit-border-radius:100px;border-radius:100px;text-align:center;font-size:.75em;width:1.67em;height:1.67em;line-height:1.67em;font-family:"Open Sans","DejaVu Sans",sans-serif;font-style:normal;font-weight:bold}
.conum[data-value] *{color:#fff!important}
.conum[data-value]+b{display:none}
.conum[data-value]:after{content:attr(data-value)}
pre .conum[data-value]{position:relative;top:-.125em}
b.conum *{color:inherit!important}
.conum:not([data-value]):empty{display:none}
dt,th.tableblock,td.content,div.footnote{text-rendering:optimizeLegibility}
h1,h2,p,td.content,span.alt{letter-spacing:-.01em}
p strong,td.content strong,div.footnote strong{letter-spacing:-.005em}
p,blockquote,dt,td.content,span.alt{font-size:1.0625rem}
p{margin-bottom:1.25rem}
.sidebarblock p,.sidebarblock dt,.sidebarblock td.content,p.tableblock{font-size:1em}
.exampleblock>.content{background-color:#fffef7;border-color:#e0e0dc;-webkit-box-shadow:0 1px 4px #e0e0dc;box-shadow:0 1px 4px #e0e0dc}
.print-only{display:none!important}
@media print{@page{margin:1.25cm .75cm}
*{-webkit-box-shadow:none!important;box-shadow:none!important;text-shadow:none!important}
a{color:inherit!important;text-decoration:underline!important}
a.bare,a[href^="#"],a[href^="mailto:"]{text-decoration:none!important}
a[href^="http:"]:not(.bare):after,a[href^="https:"]:not(.bare):after{content:"(" attr(href) ")";display:inline-block;font-size:.875em;padding-left:.25em}
abbr[title]:after{content:" (" attr(title) ")"}
pre,blockquote,tr,img,object,svg{page-break-inside:avoid}
thead{display:table-header-group}
svg{max-width:100%}
p,blockquote,dt,td.content{font-size:1em;orphans:3;widows:3}
h2,h3,#toctitle,.sidebarblock>.content>.title{page-break-after:avoid}
#toc,.sidebarblock,.exampleblock>.content{background:none!important}
#toc{border-bottom:1px solid #ddddd8!important;padding-bottom:0!important}
.sect1{padding-bottom:0!important}
.sect1+.sect1{border:0!important}
#header>h1:first-child{margin-top:1.25rem}
body.book #header{text-align:center}
body.book #header>h1:first-child{border:0!important;margin:2.5em 0 1em 0}
body.book #header .details{border:0!important;display:block;padding:0!important}
body.book #header .details span:first-child{margin-left:0!important}
body.book #header .details br{display:block}
body.book #header .details br+span:before{content:none!important}
body.book #toc{border:0!important;text-align:left!important;padding:0!important;margin:0!important}
body.book #toc,body.book #preamble,body.book h1.sect0,body.book .sect1>h2{page-break-before:always}
.listingblock code[data-lang]:before{display:block}
#footer{background:none!important;padding:0 .9375em}
#footer-text{color:rgba(0,0,0,.6)!important;font-size:.9em}
.hide-on-print{display:none!important}
.print-only{display:block!important}
.hide-for-print{display:none!important}
.show-for-print{display:inherit!important}}
</style>
</head>
<body class="manpage">
<div id="header">
<h1>git-replace(1) Manual Page</h1>
<h2>NAME</h2>
<div class="sectionbody">
<p>git-replace - Create, list, delete refs to replace objects</p>
</div>
</div>
<div id="content">
<div class="sect1">
<h2 id="_synopsis">SYNOPSIS</h2>
<div class="sectionbody">
<div class="verseblock">
<pre class="content"><em>git replace</em> [-f] <object> <replacement>
<em>git replace</em> [-f] --edit <object>
<em>git replace</em> [-f] --graft <commit> [<parent>…​]
<em>git replace</em> -d <object>…​
<em>git replace</em> [--format=<format>] [-l [<pattern>]]</pre>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_description">DESCRIPTION</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Adds a <em>replace</em> reference in <code>refs/replace/</code> namespace.</p>
</div>
<div class="paragraph">
<p>The name of the <em>replace</em> reference is the SHA-1 of the object that is
replaced. The content of the <em>replace</em> reference is the SHA-1 of the
replacement object.</p>
</div>
<div class="paragraph">
<p>The replaced object and the replacement object must be of the same type.
This restriction can be bypassed using <code>-f</code>.</p>
</div>
<div class="paragraph">
<p>Unless <code>-f</code> is given, the <em>replace</em> reference must not yet exist.</p>
</div>
<div class="paragraph">
<p>There is no other restriction on the replaced and replacement objects.
Merge commits can be replaced by non-merge commits and vice versa.</p>
</div>
<div class="paragraph">
<p>Replacement references will be used by default by all Git commands
except those doing reachability traversal (prune, pack transfer and
fsck).</p>
</div>
<div class="paragraph">
<p>It is possible to disable use of replacement references for any
command using the <code>--no-replace-objects</code> option just after <em>git</em>.</p>
</div>
<div class="paragraph">
<p>For example if commit <em>foo</em> has been replaced by commit <em>bar</em>:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>$ git --no-replace-objects cat-file commit foo</pre>
</div>
</div>
<div class="paragraph">
<p>shows information about commit <em>foo</em>, while:</p>
</div>
<div class="listingblock">
<div class="content">
<pre>$ git cat-file commit foo</pre>
</div>
</div>
<div class="paragraph">
<p>shows information about commit <em>bar</em>.</p>
</div>
<div class="paragraph">
<p>The <code>GIT_NO_REPLACE_OBJECTS</code> environment variable can be set to
achieve the same effect as the <code>--no-replace-objects</code> option.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_options">OPTIONS</h2>
<div class="sectionbody">
<div class="dlist">
<dl>
<dt class="hdlist1">-f</dt>
<dt class="hdlist1">--force</dt>
<dd>
<p>If an existing replace ref for the same object exists, it will
be overwritten (instead of failing).</p>
</dd>
<dt class="hdlist1">-d</dt>
<dt class="hdlist1">--delete</dt>
<dd>
<p>Delete existing replace refs for the given objects.</p>
</dd>
<dt class="hdlist1">--edit <object></dt>
<dd>
<p>Edit an object’s content interactively. The existing content
for <object> is pretty-printed into a temporary file, an
editor is launched on the file, and the result is parsed to
create a new object of the same type as <object>. A
replacement ref is then created to replace <object> with the
newly created object. See <a href="git-var.html">git-var</a>(1) for details about
how the editor will be chosen.</p>
</dd>
<dt class="hdlist1">--raw</dt>
<dd>
<p>When editing, provide the raw object contents rather than
pretty-printed ones. Currently this only affects trees, which
will be shown in their binary form. This is harder to work with,
but can help when repairing a tree that is so corrupted it
cannot be pretty-printed. Note that you may need to configure
your editor to cleanly read and write binary data.</p>
</dd>
<dt class="hdlist1">--graft <commit> [<parent>…​]</dt>
<dd>
<p>Create a graft commit. A new commit is created with the same
content as <commit> except that its parents will be
[<parent>…​] instead of <commit>'s parents. A replacement ref
is then created to replace <commit> with the newly created
commit. See contrib/convert-grafts-to-replace-refs.sh for an
example script based on this option that can convert grafts to
replace refs.</p>
</dd>
<dt class="hdlist1">-l <pattern></dt>
<dt class="hdlist1">--list <pattern></dt>
<dd>
<p>List replace refs for objects that match the given pattern (or
all if no pattern is given).
Typing "git replace" without arguments, also lists all replace
refs.</p>
</dd>
<dt class="hdlist1">--format=<format></dt>
<dd>
<p>When listing, use the specified <format>, which can be one of
<em>short</em>, <em>medium</em> and <em>long</em>. When omitted, the format
defaults to <em>short</em>.</p>
</dd>
</dl>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_formats">FORMATS</h2>
<div class="sectionbody">
<div class="paragraph">
<p>The following format are available:</p>
</div>
<div class="ulist">
<ul>
<li>
<p><em>short</em>:
<replaced sha1></p>
</li>
<li>
<p><em>medium</em>:
<replaced sha1> → <replacement sha1></p>
</li>
<li>
<p><em>long</em>:
<replaced sha1> (<replaced type>) → <replacement sha1> (<replacement type>)</p>
</li>
</ul>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_creating_replacement_objects">CREATING REPLACEMENT OBJECTS</h2>
<div class="sectionbody">
<div class="paragraph">
<p><a href="git-filter-branch.html">git-filter-branch</a>(1), <a href="git-hash-object.html">git-hash-object</a>(1) and
<a href="git-rebase.html">git-rebase</a>(1), among other git commands, can be used to create
replacement objects from existing objects. The <code>--edit</code> option can
also be used with <em>git replace</em> to create a replacement object by
editing an existing object.</p>
</div>
<div class="paragraph">
<p>If you want to replace many blobs, trees or commits that are part of a
string of commits, you may just want to create a replacement string of
commits and then only replace the commit at the tip of the target
string of commits with the commit at the tip of the replacement string
of commits.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_bugs">BUGS</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Comparing blobs or trees that have been replaced with those that
replace them will not work properly. And using <code>git reset --hard</code> to
go back to a replaced commit will move the branch to the replacement
commit instead of the replaced commit.</p>
</div>
<div class="paragraph">
<p>There may be other problems when using <em>git rev-list</em> related to
pending objects.</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_see_also">SEE ALSO</h2>
<div class="sectionbody">
<div class="paragraph">
<p><a href="git-hash-object.html">git-hash-object</a>(1)
<a href="git-filter-branch.html">git-filter-branch</a>(1)
<a href="git-rebase.html">git-rebase</a>(1)
<a href="git-tag.html">git-tag</a>(1)
<a href="git-branch.html">git-branch</a>(1)
<a href="git-commit.html">git-commit</a>(1)
<a href="git-var.html">git-var</a>(1)
<a href="git.html">git</a>(1)</p>
</div>
</div>
</div>
<div class="sect1">
<h2 id="_git">GIT</h2>
<div class="sectionbody">
<div class="paragraph">
<p>Part of the <a href="git.html">git</a>(1) suite</p>
</div>
</div>
</div>
</div>
<div id="footer">
<div id="footer-text">
Last updated 2017-06-26 14:52:01 W. Europe Daylight Time
</div>
</div>
</body>
</html> | {
"content_hash": "a1602c8be63e4aeb4e017e9011d43bcf",
"timestamp": "",
"source": "github",
"line_count": 649,
"max_line_length": 471,
"avg_line_length": 58.453004622496145,
"alnum_prop": 0.7644453816954871,
"repo_name": "operepo/ope",
"id": "1215d7d9a558316a0f3cce53800c6d0f063d3baa",
"size": "37936",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "PortableGit/mingw64/share/doc/git-doc/git-replace.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "AL",
"bytes": "40379"
},
{
"name": "Awk",
"bytes": "22377"
},
{
"name": "Batchfile",
"bytes": "81725"
},
{
"name": "C",
"bytes": "655"
},
{
"name": "C++",
"bytes": "200907"
},
{
"name": "CMake",
"bytes": "8149"
},
{
"name": "CSS",
"bytes": "103747"
},
{
"name": "Dockerfile",
"bytes": "47152"
},
{
"name": "Emacs Lisp",
"bytes": "90665"
},
{
"name": "HTML",
"bytes": "37373861"
},
{
"name": "Java",
"bytes": "916104"
},
{
"name": "JavaScript",
"bytes": "9115492"
},
{
"name": "Makefile",
"bytes": "7428"
},
{
"name": "NewLisp",
"bytes": "111955"
},
{
"name": "PHP",
"bytes": "5053"
},
{
"name": "Perl",
"bytes": "45839826"
},
{
"name": "PostScript",
"bytes": "192210"
},
{
"name": "PowerShell",
"bytes": "2870"
},
{
"name": "Procfile",
"bytes": "114"
},
{
"name": "Prolog",
"bytes": "248055"
},
{
"name": "Python",
"bytes": "9037346"
},
{
"name": "QML",
"bytes": "125647"
},
{
"name": "QMake",
"bytes": "7566"
},
{
"name": "Raku",
"bytes": "7174577"
},
{
"name": "Roff",
"bytes": "25148"
},
{
"name": "Ruby",
"bytes": "162111"
},
{
"name": "Shell",
"bytes": "2574077"
},
{
"name": "Smalltalk",
"bytes": "77031"
},
{
"name": "SystemVerilog",
"bytes": "83394"
},
{
"name": "Tcl",
"bytes": "7061959"
},
{
"name": "Vim script",
"bytes": "27705984"
},
{
"name": "kvlang",
"bytes": "60630"
}
],
"symlink_target": ""
} |
<div>
<section class="content-header" ng-hide="dashboard">
<ol class="breadcrumb">
<li><a ui-sref="admin"><i class="fa fa-dashboard"></i> OK Dashboard </a></li>
<li><a ui-sref="course.list"><i class="fa fa-list"></i> All Courses</a></li>
<li><a ui-sref="course.detail.stats({courseId: course.id})"><i class="fa fa-institution"></i> {{course.display_name}}</a></li>
<li><a ui-sref="course.assignment.list({courseId: course.id})"><i class="fa fa-list"> All Assignments</i></a></li>
<li class="active"><i class="fa fa-plus"></i> New Assignment</li>
</ol>
</section>
<section>
<div class="row">
<div class="col-md-3">
</div>
<div class="col-md-6">
<div class="box" >
<form >
<div class="box-body">
<div class="form-group">
<label>Assignment Name</label>
<input ng-model="newAssign.display_name" type="text" class="form-control input-lg" placeholder="Scheme Project">
</div>
<div class="form-group">
<label>Assignment URL</label>
<input ng-model="newAssign.url" type="text" class="form-control input-lg" placeholder="cs61a.org/hw1">
</div>
<div class="form-group">
<label>Endpoint</label>
<input ng-model="newAssign.endpoint" type="text" class="form-control input-lg" placeholder="cal/cs61a/sp15/scheme">
</div>
<div class="form-group">
<label>Points</label>
<input ng-model="newAssign.points" type="number" step="any" min="0" class="form-control" placeholder="">
</div>
<div class="form-group">
<label>Max Group Size</label>
<input ng-model="newAssign.max_group_size" type="number" min="1" class="form-control" placeholder="">
</div>
<div class="form-group">
<label>Due Date</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input type="text" ng-model="newAssign.due_date" class="form-control" placeholder="YYYY-MM-DD">
</div><!-- /.input group -->
</div>
<div class="form-group">
<label>Time Due</label>
<input ng-model="newAssign.due_time" type="text" class="form-control">
</div>
<div class="form-group">
<label>Lock Date</label>
<div class="input-group">
<div class="input-group-addon">
<i class="fa fa-calendar"></i>
</div>
<input type="text" ng-model="newAssign.lock_date" class="form-control" placeholder="YYYY-MM-DD">
</div><!-- /.input group -->
</div>
<div class="form-group">
<label>Lock Time</label>
<input ng-model="newAssign.lock_time" type="text" class="form-control">
</div>
<div class="form-group">
<label>Revisions On?</label>
<select class="form-control" required ng-model="newAssign.revisions" ng-options="option for option in [true, false]">
</select>
</div>
<div class="form-group">
<label>Course</label>
<select class="form-control" required ng-model="newAssign.course" ng-options="course as course.display_name+' ('+course.offering+')' for course in courses">
</select>
</div>
<div class="form-group">
<label>Autograding Enabled?</label>
<select class="form-control" required ng-model="newAssign.autograding_enabled" ng-options="option for option in [false, true]">
</select>
</div>
<div ng-hide="!newAssign.autograding_enabled">
<div class="form-group">
<label>Autograder Key (ID of Assignment in Autograder)</label>
<input ng-model="newAssign.autograding_key" type="text" class="form-control" placeholder="5abc3....">
</div>
</div>
<button ng-click="createAssign()" class="btn btn-block btn-primary btn-lg">Create Assignment</button>
</div>
</form>
</div>
</div> <!-- xs.col.6 -->
</div> <!-- row -->
</section>
</div>
| {
"content_hash": "a69b5e949c0513c8dc9116e89fefb920",
"timestamp": "",
"source": "github",
"line_count": 107,
"max_line_length": 167,
"avg_line_length": 40.10280373831776,
"alnum_prop": 0.5471917967839665,
"repo_name": "jordonwii/ok",
"id": "9bf6fd1bcddd6692e50178fcd2d9db34c353dc2f",
"size": "4313",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "server/static/partials/admin/assignment.create.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "142239"
},
{
"name": "HTML",
"bytes": "140360"
},
{
"name": "JavaScript",
"bytes": "156494"
},
{
"name": "Makefile",
"bytes": "332"
},
{
"name": "Python",
"bytes": "537699"
},
{
"name": "Scheme",
"bytes": "27816"
},
{
"name": "Shell",
"bytes": "688"
}
],
"symlink_target": ""
} |
module Jobs
class ConfirmAkismetFlaggedPosts < ::Jobs::Base
def execute(args)
raise Discourse::InvalidParameters.new(:user_id) unless args[:user_id]
raise Discourse::InvalidParameters.new(:performed_by_id) unless args[:performed_by_id]
performed_by = User.find_by(id: args[:performed_by_id])
post_ids = Post.with_deleted.where(user_id: args[:user_id]).pluck(:id)
ReviewableAkismetPost.where(target_id: post_ids, status: Reviewable.statuses[:pending]).find_each do |reviewable|
reviewable.perform(performed_by, :confirm_spam)
end
end
end
end
| {
"content_hash": "6a10186315b75bcc39aefea03d312449",
"timestamp": "",
"source": "github",
"line_count": 15,
"max_line_length": 119,
"avg_line_length": 39.93333333333333,
"alnum_prop": 0.7045075125208681,
"repo_name": "discourse/discourse-akismet",
"id": "2c2befc7c24581158b7a6fba220d1eff0c06f79a",
"size": "630",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "jobs/regular/confirm_akismet_flagged_posts.rb",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Handlebars",
"bytes": "2218"
},
{
"name": "JavaScript",
"bytes": "875"
},
{
"name": "Ruby",
"bytes": "90716"
},
{
"name": "SCSS",
"bytes": "161"
}
],
"symlink_target": ""
} |
<meta charset="utf-8">
{% include seo.html %}
<link href="{% if site.atom_feed.path %}{{ site.atom_feed.path }}{% else %}{{ '/feed.xml' | absolute_url }}{% endif %}" type="application/atom+xml" rel="alternate" title="{{ site.title }} Feed">
<!-- http://t.co/dKP3o1e -->
<meta name="HandheldFriendly" content="True">
<meta name="MobileOptimized" content="320">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script>
document.documentElement.className = document.documentElement.className.replace(/\bno-js\b/g, '') + ' js ';
</script>
<!-- For all browsers -->
<link rel="stylesheet" href="{{ '/assets/css/main.css' | absolute_url }}">
<meta http-equiv="cleartype" content="on">
{% if site.mathjax == true %}
<!-- MathJax -->
<script type="text/javascript" async
src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-MML-AM_CHTML">
</script>
{% endif %} | {
"content_hash": "a6490d3912375f336e99ae05022118c1",
"timestamp": "",
"source": "github",
"line_count": 27,
"max_line_length": 194,
"avg_line_length": 33.111111111111114,
"alnum_prop": 0.6610738255033557,
"repo_name": "ryzalk/ryzalk.github.io",
"id": "4e8334d78003303dc2103ddac36ed01bbe4f3f38",
"size": "894",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "_includes/head.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "70000"
},
{
"name": "HTML",
"bytes": "32865570"
},
{
"name": "JavaScript",
"bytes": "52978"
},
{
"name": "R",
"bytes": "1308"
},
{
"name": "Ruby",
"bytes": "2997"
}
],
"symlink_target": ""
} |
package io.selendroid.standalone.server.model;
import com.beust.jcommander.internal.Lists;
import io.netty.handler.codec.http.HttpMethod;
import io.selendroid.common.SelendroidCapabilities;
import io.selendroid.server.common.ServerDetails;
import io.selendroid.server.common.exceptions.AppCrashedException;
import io.selendroid.server.common.exceptions.SelendroidException;
import io.selendroid.server.common.exceptions.SessionNotCreatedException;
import io.selendroid.standalone.SelendroidConfiguration;
import io.selendroid.standalone.android.AndroidApp;
import io.selendroid.standalone.android.AndroidDevice;
import io.selendroid.standalone.android.AndroidEmulator;
import io.selendroid.standalone.android.AndroidSdk;
import io.selendroid.standalone.android.DeviceManager;
import io.selendroid.standalone.android.impl.DefaultAndroidEmulator;
import io.selendroid.standalone.android.impl.DefaultDeviceManager;
import io.selendroid.standalone.android.impl.DefaultHardwareDevice;
import io.selendroid.standalone.android.impl.InstalledAndroidApp;
import io.selendroid.standalone.builder.AndroidDriverAPKBuilder;
import io.selendroid.standalone.builder.SelendroidServerBuilder;
import io.selendroid.standalone.exceptions.AndroidDeviceException;
import io.selendroid.standalone.exceptions.AndroidSdkException;
import io.selendroid.standalone.exceptions.ShellCommandException;
import io.selendroid.standalone.server.util.FolderMonitor;
import io.selendroid.standalone.server.util.HttpClientUtil;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.openqa.selenium.By;
import org.openqa.selenium.remote.BrowserType;
import org.openqa.selenium.remote.RemoteWebDriver;
import org.openqa.selenium.support.ui.ExpectedConditions;
import org.openqa.selenium.support.ui.WebDriverWait;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.logging.Level;
import java.util.logging.Logger;
public class SelendroidStandaloneDriver implements ServerDetails {
public static final String WD_RESP_KEY_VALUE = "value";
public static final String WD_RESP_KEY_STATUS = "status";
public static final String WD_RESP_KEY_SESSION_ID = "sessionId";
public static final String APP_BASE_PACKAGE = "basePackage";
public static final String APP_ID = "appId";
private static int selendroidServerPort = 38080;
private static final Logger log = Logger.getLogger(SelendroidStandaloneDriver.class.getName());
private Map<String, AndroidApp> appsStore = new HashMap<String, AndroidApp>();
private Map<String, AndroidApp> selendroidServers = new HashMap<String, AndroidApp>();
private Map<String, ActiveSession> sessions = new HashMap<String, ActiveSession>();
private DeviceStore deviceStore = null;
private SelendroidServerBuilder selendroidApkBuilder = null;
private AndroidDriverAPKBuilder androidDriverAPKBuilder = null;
private SelendroidConfiguration serverConfiguration = null;
private DeviceManager deviceManager;
private FolderMonitor folderMonitor = null;
private SelendroidStandaloneDriverEventListener eventListener
= new DummySelendroidStandaloneDriverEventListener();
public SelendroidStandaloneDriver(SelendroidConfiguration serverConfiguration)
throws AndroidSdkException, AndroidDeviceException {
this.serverConfiguration = serverConfiguration;
selendroidApkBuilder = new SelendroidServerBuilder(serverConfiguration);
androidDriverAPKBuilder = new AndroidDriverAPKBuilder();
selendroidServerPort = serverConfiguration.getSelendroidServerPort();
if (serverConfiguration.getAppFolderToMonitor() != null) {
startFolderMonitor();
}
initApplicationsUnderTest(serverConfiguration);
initAndroidDevices();
deviceStore.setClearData(!serverConfiguration.isNoClearData());
deviceStore.setKeepEmulator(serverConfiguration.isKeepEmulator());
}
/**
* For testing only
*/
SelendroidStandaloneDriver(SelendroidServerBuilder builder, DeviceManager deviceManager,
AndroidDriverAPKBuilder androidDriverAPKBuilder) {
this.selendroidApkBuilder = builder;
this.deviceManager = deviceManager;
this.androidDriverAPKBuilder = androidDriverAPKBuilder;
}
/**
* This function will sign an android app and add it to the App Store. The function is made public because it also be
* invoked by the Folder Monitor each time a new application dropped into this folder.
*
* @param file
* - The file to be added to the app store
* @throws AndroidSdkException
*/
public void addToAppsStore(File file) throws AndroidSdkException {
AndroidApp app = null;
try {
app = selendroidApkBuilder.resignApp(file);
} catch (Exception e) {
throw new SessionNotCreatedException(
"An error occurred while resigning the app '" + file.getName()
+ "'. ", e);
}
String appId = null;
try {
appId = app.getAppId();
} catch (AndroidSdkException e) {
log.info("Ignoring app because an error occurred reading the app details: "
+ file.getAbsolutePath());
log.info(e.getMessage());
}
if (appId != null && !appsStore.containsKey(appId)) {
appsStore.put(appId, app);
log.info("App " + appId
+ " has been added to selendroid standalone server.");
}
}
/* package */void initApplicationsUnderTest(SelendroidConfiguration serverConfiguration)
throws AndroidSdkException {
if (serverConfiguration == null) {
throw new SelendroidException("Configuration error - serverConfiguration can't be null.");
}
this.serverConfiguration = serverConfiguration;
// each of the apps specified on the command line need to get resigned
// and 'stored' to be installed on the device
for (String appPath : serverConfiguration.getSupportedApps()) {
File file = new File(appPath);
if (file.exists()) {
addToAppsStore(file);
} else {
log.severe("Ignoring app because it was not found: " + file.getAbsolutePath());
}
}
if (!serverConfiguration.isNoWebViewApp()) {
// extract the 'AndroidDriver' app and show it as available
try {
// using "android" as the app name, because that is the desired capability default in
// selenium for
// DesiredCapabilities.ANDROID
File androidAPK = androidDriverAPKBuilder.extractAndroidDriverAPK();
if(serverConfiguration != null && serverConfiguration.isDeleteTmpFiles()) {
androidAPK.deleteOnExit(); //Deletes temporary files if flag set
}
AndroidApp app =
selendroidApkBuilder.resignApp(androidAPK);
appsStore.put(BrowserType.ANDROID, app);
} catch (Exception e) {
throw new RuntimeException(e);
}
}
}
/* package */void initAndroidDevices() throws AndroidDeviceException {
deviceManager =
new DefaultDeviceManager(AndroidSdk.adb().getAbsolutePath(),
serverConfiguration.shouldKeepAdbAlive());
deviceStore = new DeviceStore(serverConfiguration.getEmulatorPort(), deviceManager);
deviceStore.initAndroidDevices(new DefaultHardwareDeviceListener(deviceStore, this),
serverConfiguration.shouldKeepAdbAlive());
}
@Override
public String getServerVersion() {
return SelendroidServerBuilder.getJarVersionNumber();
}
@Override
public String getCpuArch() {
return System.getProperty("os.arch");
}
@Override
public String getOsVersion() {
return System.getProperty("os.version");
}
@Override
public String getOsName() {
return System.getProperty("os.name");
}
protected SelendroidConfiguration getSelendroidConfiguration() {
return serverConfiguration;
}
public String createNewTestSession(JSONObject caps) {
return createNewTestSession(caps, serverConfiguration.getServerStartRetries());
}
public String createNewTestSession(JSONObject caps, Integer retries) {
AndroidDevice device = null;
AndroidApp app = null;
Exception lastException = null;
while (retries >= 0) {
try {
SelendroidCapabilities desiredCapabilities = getSelendroidCapabilities(caps);
String desiredAut = desiredCapabilities.getDefaultApp(appsStore.keySet());
app = getAndroidApp(desiredCapabilities, desiredAut);
log.info("'" + desiredAut + "' will be used as app under test.");
device = deviceStore.findAndroidDevice(desiredCapabilities);
// If we are using an emulator need to start it up
if (device instanceof AndroidEmulator) {
startAndroidEmulator(desiredCapabilities, (AndroidEmulator) device);
// If we are using an android device
} else {
device.unlockScreen();
}
boolean appInstalledOnDevice = device.isInstalled(app) || app instanceof InstalledAndroidApp;
if (!appInstalledOnDevice || serverConfiguration.isForceReinstall()) {
device.install(app);
} else {
log.info("the app under test is already installed.");
}
if(!serverConfiguration.isNoClearData()) {
device.clearUserData(app);
}
int port = serverConfiguration.isReuseSelendroidServerPort()
? serverConfiguration.getSelendroidServerPort()
: getNextSelendroidServerPort();
boolean serverInstalled = device.isInstalled("io.selendroid." + app.getBasePackage());
if (!serverInstalled || serverConfiguration.isForceReinstall()) {
try {
device.install(createSelendroidServerApk(app));
} catch (AndroidSdkException e) {
throw new SessionNotCreatedException("Could not install selendroid-server on the device", e);
}
} else {
log.info(
"Not creating and installing selendroid-server because it is already installed for this app under test.");
}
// Run any adb commands requested in the capabilities
List<String> preSessionAdbCommands = desiredCapabilities.getPreSessionAdbCommands();
runPreSessionCommands(device, preSessionAdbCommands);
// Push extension dex to device if specified
String extensionFile = desiredCapabilities.getSelendroidExtensions();
pushExtensionsToDevice(device, extensionFile);
// Configure logging on the device
device.setLoggingEnabled(serverConfiguration.isDeviceLog());
// It's GO TIME!
// start the selendroid server on the device and make sure it's up
eventListener.onBeforeDeviceServerStart();
device.startSelendroid(app, port, desiredCapabilities);
waitForServerStart(device);
eventListener.onAfterDeviceServerStart();
// arbitrary sleeps? yay...
// looks like after the server starts responding
// we need to give it a moment before starting a session?
try {
Thread.sleep(500);
} catch (InterruptedException e1) {
Thread.currentThread().interrupt();
}
// create the new session on the device server
RemoteWebDriver driver =
new RemoteWebDriver(new URL("http://localhost:" + port + "/wd/hub"), desiredCapabilities);
String sessionId = driver.getSessionId().toString();
SelendroidCapabilities requiredCapabilities =
new SelendroidCapabilities(driver.getCapabilities().asMap());
ActiveSession session =
new ActiveSession(sessionId, requiredCapabilities, app, device, port, this);
this.sessions.put(sessionId, session);
// We are requesting an "AndroidDriver" so automatically switch to the webview
if (BrowserType.ANDROID.equals(desiredCapabilities.getAut())) {
switchToWebView(driver);
}
return sessionId;
} catch (Exception e) {
lastException = e;
log.log(Level.SEVERE, "Error occurred while starting Selendroid session", e);
retries--;
// Return device to store
if (device != null) {
deviceStore.release(device, app);
device = null;
}
}
}
if (lastException instanceof RuntimeException) {
// Don't wrap the exception
throw (RuntimeException)lastException;
} else {
throw new SessionNotCreatedException("Error starting Selendroid session", lastException);
}
}
private void switchToWebView(RemoteWebDriver driver) {
// arbitrarily high wait time, will this cover our slowest possible device/emulator?
WebDriverWait wait = new WebDriverWait(driver, 60);
// wait for the WebView to appear
wait.until(ExpectedConditions.visibilityOfElementLocated(By.className("android.webkit.WebView")));
driver.switchTo().window("WEBVIEW");
// the 'android-driver' webview has an h1 with id 'AndroidDriver' embedded in it
wait.until(ExpectedConditions.visibilityOfElementLocated(By.id("AndroidDriver")));
}
private void waitForServerStart(AndroidDevice device) {
long startTimeout = serverConfiguration.getServerStartTimeout();
long timeoutEnd = System.currentTimeMillis() + startTimeout;
log.info("Waiting for the Selendroid server to start.");
while (!device.isSelendroidRunning()) {
if (timeoutEnd >= System.currentTimeMillis()) {
try {
Thread.sleep(2000);
String crashMessage = device.getCrashLog();
if (!crashMessage.isEmpty()) {
throw new AppCrashedException(crashMessage);
}
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
} else {
throw new SelendroidException("Selendroid server on the device didn't come up after "
+ startTimeout / 1000 + "sec:");
}
}
log.info("Selendroid server has started.");
}
private void pushExtensionsToDevice(AndroidDevice device, String extensionFile) {
if (extensionFile != null) {
String externalStorageDirectory = device.getExternalStoragePath();
String deviceDexPath = new File(externalStorageDirectory, "extension.dex").getAbsolutePath();
device.runAdbCommand(String.format("push %s %s", extensionFile, deviceDexPath));
}
}
private void runPreSessionCommands(AndroidDevice device, List<String> preSessionAdbCommands) {
List<String> adbCommands = new ArrayList<String>();
adbCommands.add("shell setprop log.tag.SELENDROID " + serverConfiguration.getLogLevel().name());
adbCommands.addAll(preSessionAdbCommands);
for (String adbCommandParameter : adbCommands) {
device.runAdbCommand(adbCommandParameter);
}
}
private void startAndroidEmulator(SelendroidCapabilities desiredCapabilities, AndroidEmulator device) throws AndroidDeviceException {
AndroidEmulator emulator = device;
if (emulator.isEmulatorStarted()) {
emulator.unlockScreen();
} else {
Map<String, Object> config = new HashMap<String, Object>();
if (serverConfiguration.getEmulatorOptions() != null) {
config.put(AndroidEmulator.EMULATOR_OPTIONS, serverConfiguration.getEmulatorOptions());
}
config.put(AndroidEmulator.TIMEOUT_OPTION, serverConfiguration.getTimeoutEmulatorStart());
if (desiredCapabilities.asMap().containsKey(SelendroidCapabilities.DISPLAY)) {
Object d = desiredCapabilities.getCapability(SelendroidCapabilities.DISPLAY);
config.put(AndroidEmulator.DISPLAY_OPTION, String.valueOf(d));
}
Locale locale = parseLocale(desiredCapabilities);
emulator.start(locale, deviceStore.nextEmulatorPort(), config);
}
emulator.setIDevice(deviceManager.getVirtualDevice(emulator.getAvdName()));
}
private AndroidApp getAndroidApp(SelendroidCapabilities desiredCapabilities, String aut) {
AndroidApp app = appsStore.get(aut);
if (app == null) {
if (desiredCapabilities.getLaunchActivity() != null) {
String appInfo = String.format("%s/%s", aut, desiredCapabilities.getLaunchActivity());
log.log(Level.INFO, "The requested application under test is not configured in selendroid server, " +
"assuming the " + appInfo + " is installed on the device.");
app = new InstalledAndroidApp(appInfo);
} else {
throw new SessionNotCreatedException(
"The requested application under test is not configured in selendroid server.");
}
}
// adjust app based on capabilities (some parameters are session specific)
app = augmentApp(app, desiredCapabilities);
return app;
}
private SelendroidCapabilities getSelendroidCapabilities(JSONObject caps) {
SelendroidCapabilities desiredCapabilities;// Convert the JSON capabilities to SelendroidCapabilities
try {
desiredCapabilities = new SelendroidCapabilities(caps);
} catch (JSONException e) {
throw new SelendroidException("Desired capabilities cannot be parsed.");
}
return desiredCapabilities;
}
/**
* Augment the application with parameters from {@code desiredCapabilities}
*
* @param app to be augmented
* @param desiredCapabilities configuration requested for this session
*/
private AndroidApp augmentApp(AndroidApp app, SelendroidCapabilities desiredCapabilities) {
if (desiredCapabilities.getLaunchActivity() != null) {
app.setMainActivity(desiredCapabilities.getLaunchActivity());
}
return app;
}
private AndroidApp createSelendroidServerApk(AndroidApp aut) throws AndroidSdkException {
if (!selendroidServers.containsKey(aut.getAppId())) {
try {
AndroidApp selendroidServer = selendroidApkBuilder.createSelendroidServer(aut);
selendroidServers.put(aut.getAppId(), selendroidServer);
} catch (Exception e) {
log.log(Level.SEVERE, "Cannot build the Selendroid server APK", e);
throw new SessionNotCreatedException(
"Cannot build the Selendroid server APK for application '" + aut + "': " + e.getMessage());
}
}
return selendroidServers.get(aut.getAppId());
}
private Locale parseLocale(SelendroidCapabilities capa) {
if (capa.getLocale() == null) {
return null;
}
String[] localeStr = capa.getLocale().split("_");
return new Locale(localeStr[0], localeStr[1]);
}
// This function will start a separate thread to monitor the
// Applications folder.
private void startFolderMonitor() {
if (serverConfiguration.getAppFolderToMonitor() != null) {
try {
folderMonitor = new FolderMonitor(this, serverConfiguration);
folderMonitor.start();
} catch (IOException e) {
log.warning("Could not monitor the given folder: "
+ serverConfiguration.getAppFolderToMonitor());
}
}
}
/**
* For testing only
*/
/* package */Map<String, AndroidApp> getConfiguredApps() {
return Collections.unmodifiableMap(appsStore);
}
/**
* For testing only
*/
/* package */void setDeviceStore(DeviceStore store) {
this.deviceStore = store;
}
private synchronized int getNextSelendroidServerPort() {
return selendroidServerPort++;
}
/**
* FOR TESTING ONLY
*/
public List<ActiveSession> getActiveSessions() {
return Lists.newArrayList(sessions.values());
}
public boolean isValidSession(String sessionId) {
return sessionId != null && !sessionId.isEmpty() && sessions.containsKey(sessionId);
}
public void stopSession(String sessionId) throws AndroidDeviceException {
if (isValidSession(sessionId)) {
ActiveSession session = sessions.get(sessionId);
session.stopSessionTimer();
try {
HttpClientUtil.executeRequest(
"http://localhost:" + session.getSelendroidServerPort() + "/wd/hub/session/" + sessionId,
HttpMethod.DELETE);
} catch (Exception e) {
log.log(Level.WARNING, "Error stopping session, safe to ignore", e);
}
deviceStore.release(session.getDevice(), session.getAut());
sessions.remove(sessionId);
}
}
public void quitSelendroid() {
List<String> sessionsToQuit = Lists.newArrayList(sessions.keySet());
if (!sessionsToQuit.isEmpty()) {
for (String sessionId : sessionsToQuit) {
try {
stopSession(sessionId);
} catch (AndroidDeviceException e) {
log.log(Level.SEVERE, "Error occurred while stopping session", e);
}
}
}
deviceManager.shutdown();
}
public SelendroidCapabilities getSessionCapabilities(String sessionId) {
if (sessions.containsKey(sessionId)) {
return sessions.get(sessionId).getDesiredCapabilities();
}
return null;
}
public ActiveSession getActiveSession(String sessionId) {
if (sessionId != null && sessions.containsKey(sessionId)) {
return sessions.get(sessionId);
}
return null;
}
@Override
public synchronized JSONArray getSupportedApps() {
JSONArray list = new JSONArray();
for (AndroidApp app : appsStore.values()) {
JSONObject appInfo = new JSONObject();
try {
appInfo.put(APP_ID, app.getAppId());
appInfo.put(APP_BASE_PACKAGE, app.getBasePackage());
appInfo.put("mainActivity", app.getMainActivity());
list.put(appInfo);
} catch (Exception e) {
}
}
return list;
}
@Override
public synchronized JSONArray getSupportedDevices() {
JSONArray list = new JSONArray();
for (AndroidDevice device : deviceStore.getDevices()) {
JSONObject deviceInfo = new JSONObject();
try {
if (device instanceof DefaultAndroidEmulator) {
deviceInfo.put(SelendroidCapabilities.EMULATOR, true);
deviceInfo.put("avdName", ((DefaultAndroidEmulator) device).getAvdName());
} else {
deviceInfo.put(SelendroidCapabilities.EMULATOR, false);
deviceInfo.put(SelendroidCapabilities.MODEL, ((DefaultHardwareDevice) device).getModel());
deviceInfo.put(SelendroidCapabilities.SERIAL,((DefaultHardwareDevice) device).getSerial());
}
deviceInfo.put(SelendroidCapabilities.API_TARGET_TYPE,
device.getAPITargetType());
deviceInfo
.put(SelendroidCapabilities.PLATFORM_VERSION, device.getTargetPlatform().getApi());
deviceInfo.put(SelendroidCapabilities.SCREEN_SIZE, device.getScreenSize());
list.put(deviceInfo);
} catch (Exception e) {
log.info("Error occurred when building supported device info: " + e.getMessage());
}
}
return list;
}
protected ActiveSession findActiveSession(AndroidDevice device) {
for (ActiveSession session : sessions.values()) {
if (session.getDevice().equals(device)) {
return session;
}
}
return null;
}
public byte[] takeScreenshot(String sessionId) throws AndroidDeviceException {
if (sessionId == null || !sessions.containsKey(sessionId)) {
throw new SelendroidException("The given session id '" + sessionId + "' was not found.");
}
return sessions.get(sessionId).getDevice().takeScreenshot();
}
public void setEventListener(SelendroidStandaloneDriverEventListener eventListener) {
this.eventListener = eventListener;
}
}
| {
"content_hash": "b89cb465ff33a86f6acff35bb353290a",
"timestamp": "",
"source": "github",
"line_count": 605,
"max_line_length": 135,
"avg_line_length": 38.71404958677686,
"alnum_prop": 0.7049355306976347,
"repo_name": "sri096/selendroid",
"id": "c8913fd057b20512929a8710f0861329f9cc1e0d",
"size": "24054",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "selendroid-standalone/src/main/java/io/selendroid/standalone/server/model/SelendroidStandaloneDriver.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "15838"
},
{
"name": "HTML",
"bytes": "39116"
},
{
"name": "Java",
"bytes": "2206567"
},
{
"name": "JavaScript",
"bytes": "765640"
},
{
"name": "Ruby",
"bytes": "4196"
},
{
"name": "Shell",
"bytes": "2508"
}
],
"symlink_target": ""
} |
var express = require('express')
var path = require('path')
var favicon = require('serve-favicon')
var logger = require('morgan')
var cookieParser = require('cookie-parser')
var bodyParser = require('body-parser')
var index = require('./routes/index')
var users = require('./routes/users')
var blogs = require('./routes/blogs')
var app = express()
// view engine setup
app.set('views', path.join(__dirname, 'views'))
app.set('view engine', 'ejs')
// uncomment after placing your favicon in /public
app.use(favicon(path.join(__dirname, 'public', 'favicon.ico')))
app.use(logger('dev'))
app.use(bodyParser.json())
app.use(bodyParser.urlencoded({ extended: false }))
app.use(cookieParser())
app.use(express.static(path.join(__dirname, 'public')))
app.use('/', index)
app.use('/users', users)
app.use('/api/blogs', blogs)
// catch 404 and forward to error handler
app.use(function (req, res, next) {
var err = new Error('Not Found')
err.status = 404
next(err)
})
// error handler
app.use(function (err, req, res, next) {
// set locals, only providing error in development
res.locals.message = err.message
res.locals.error = req.app.get('env') === 'development' ? err : {}
// render the error page
res.status(err.status || 500)
res.render('error')
})
module.exports = app
| {
"content_hash": "11176c22495998e502c92e82c03e4326",
"timestamp": "",
"source": "github",
"line_count": 48,
"max_line_length": 68,
"avg_line_length": 26.958333333333332,
"alnum_prop": 0.6846986089644513,
"repo_name": "MarkH817/blog-single-page-application",
"id": "f29bbebab46899f37d62f8b0364e4d7801d19785",
"size": "1294",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "329"
},
{
"name": "HTML",
"bytes": "4770"
},
{
"name": "JavaScript",
"bytes": "8952"
}
],
"symlink_target": ""
} |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-GB" xml:lang="en-GB" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Tense</title>
<link rel="root" href=""/> <!-- for JS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.4.0/css/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="../../css/jquery-ui-redmond.css"/>
<link rel="stylesheet" type="text/css" href="../../css/style.css"/>
<link rel="stylesheet" type="text/css" href="../../css/style-vis.css"/>
<link rel="stylesheet" type="text/css" href="../../css/hint.css"/>
<script type="text/javascript" src="../../lib/ext/head.load.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/anchor-js/3.2.2/anchor.min.js"></script>
<script>document.addEventListener("DOMContentLoaded", function(event) {anchors.add();});</script>
<!-- Set up this custom Google search at https://cse.google.com/cse/business/settings?cx=001145188882102106025:dl1mehhcgbo -->
<!-- DZ 2021-01-22: I am temporarily hiding the search field to find out whether it slows down loading of the title page.
<script>
(function() {
var cx = '001145188882102106025:dl1mehhcgbo';
var gcse = document.createElement('script');
gcse.type = 'text/javascript';
gcse.async = true;
gcse.src = 'https://cse.google.com/cse.js?cx=' + cx;
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(gcse, s);
})();
</script> -->
<!-- <link rel="shortcut icon" href="favicon.ico"/> -->
</head>
<body>
<div id="main" class="center">
<div id="hp-header">
<table width="100%"><tr><td width="50%">
<span class="header-text"><a href="http://universaldependencies.org/#language-gub">home</a></span>
<span class="header-text"><a href="https://github.com/universaldependencies/docs/edit/pages-source/_gub/feat/Tense.md" target="#">edit page</a></span>
<span class="header-text"><a href="https://github.com/universaldependencies/docs/issues">issue tracker</a></span>
</td><td>
<gcse:search></gcse:search>
</td></tr></table>
</div>
<hr/>
<div class="v2complete">
This page pertains to UD version 2.
</div>
<div id="content">
<noscript>
<div id="noscript">
It appears that you have Javascript disabled.
Please consider enabling Javascript for this page to see the visualizations.
</div>
</noscript>
<!-- The content may include scripts and styles, hence we must load the shared libraries before the content. -->
<script type="text/javascript">
console.time('loading libraries');
var root = '../../'; // filled in by jekyll
head.js(
// External libraries
// DZ: Copied from embedding.html. I don't know which one is needed for what, so I'm currently keeping them all.
root + 'lib/ext/jquery.min.js',
root + 'lib/ext/jquery.svg.min.js',
root + 'lib/ext/jquery.svgdom.min.js',
root + 'lib/ext/jquery.timeago.js',
root + 'lib/ext/jquery-ui.min.js',
root + 'lib/ext/waypoints.min.js',
root + 'lib/ext/jquery.address.min.js'
);
</script>
<style>h3 {display:block;background-color:#dfeffc}</style>
<h2><code>Tense</code>: tense</h2>
<table class="typeindex" border="1">
<tr>
<td style="background-color:cornflowerblue;color:white"><strong>Values:</strong> </td>
<td><a href="#Fut">Fut</a></td>
<td><a href="#Past">Past</a></td>
</tr>
</table>
<p>The only <code class="language-plaintext highlighter-rouge">Tense</code></p>
<h3 id="fut-future"><a name="Fut"><code class="language-plaintext highlighter-rouge">Fut</code></a>: Future</h3>
<p>Usually realised in adverbs</p>
<h4 id="examples">Examples</h4>
<ul>
<li><em><b>oho putar</b> </em> “He/she/they will go”</li>
</ul>
<p><code class="language-plaintext highlighter-rouge">Past</code> is not a feature of the verb in Guajajara. Some evidential partiles also carry tense, as <em>kakwez</em>,
which always appears in second position and inindicates an attested event in a distant past.</p>
<h3 id="past-past"><a name="Past"><code class="language-plaintext highlighter-rouge">Past</code></a>: Past</h3>
<p>Usually realised in adverbs</p>
<h4 id="examples-1">Examples</h4>
<ul>
<li><em><b>Ukwaw kakwez zeʔengete imungetahaw aʔe wə kurɨ</b> </em> “They know (attested in the distant past) how to read Guajajara”</li>
</ul>
<h2 id="diffs">Diffs</h2>
<h3 id="prague-dependency-treebank">Prague Dependency Treebank</h3>
<p>The PDT tagset does not distinguish <code class="language-plaintext highlighter-rouge">Ptan</code> from <code class="language-plaintext highlighter-rouge">Plur</code> and <code class="language-plaintext highlighter-rouge">Coll</code> from <code class="language-plaintext highlighter-rouge">Sing</code>,
therefore this distinction is not being made in the converted data.
<!-- Interlanguage links updated Po lis 14 15:34:59 CET 2022 --></p>
<!-- "in other languages" links -->
<hr/>
Tense in other languages:
[<a href="../../abq/feat/Tense.html">abq</a>]
[<a href="../../aqz/feat/Tense.html">aqz</a>]
[<a href="../../arr/feat/Tense.html">arr</a>]
[<a href="../../bej/feat/Tense.html">bej</a>]
[<a href="../../bg/feat/Tense.html">bg</a>]
[<a href="../../bm/feat/Tense.html">bm</a>]
[<a href="../../cs/feat/Tense.html">cs</a>]
[<a href="../../cy/feat/Tense.html">cy</a>]
[<a href="../../el/feat/Tense.html">el</a>]
[<a href="../../en/feat/Tense.html">en</a>]
[<a href="../../fi/feat/Tense.html">fi</a>]
[<a href="../../fr/feat/Tense.html">fr</a>]
[<a href="../../ga/feat/Tense.html">ga</a>]
[<a href="../../gn/feat/Tense.html">gn</a>]
[<a href="../../gub/feat/Tense.html">gub</a>]
[<a href="../../hu/feat/Tense.html">hu</a>]
[<a href="../../hy/feat/Tense.html">hy</a>]
[<a href="../../it/feat/Tense.html">it</a>]
[<a href="../../jaa/feat/Tense.html">jaa</a>]
[<a href="../../pcm/feat/Tense.html">pcm</a>]
[<a href="../../qpm/feat/Tense.html">qpm</a>]
[<a href="../../ru/feat/Tense.html">ru</a>]
[<a href="../../sah/feat/Tense.html">sah</a>]
[<a href="../../say/feat/Tense.html">say</a>]
[<a href="../../sl/feat/Tense.html">sl</a>]
[<a href="../../sv/feat/Tense.html">sv</a>]
[<a href="../../tr/feat/Tense.html">tr</a>]
[<a href="../../tt/feat/Tense.html">tt</a>]
[<a href="../../u/feat/Tense.html">u</a>]
[<a href="../../uk/feat/Tense.html">uk</a>]
[<a href="../../urb/feat/Tense.html">urb</a>]
[<a href="../../urj/feat/Tense.html">urj</a>]
</div>
<!-- support for embedded visualizations -->
<script type="text/javascript">
var root = '../../'; // filled in by jekyll
head.js(
// We assume that external libraries such as jquery.min.js have already been loaded outside!
// (See _layouts/base.html.)
// brat helper modules
root + 'lib/brat/configuration.js',
root + 'lib/brat/util.js',
root + 'lib/brat/annotation_log.js',
root + 'lib/ext/webfont.js',
// brat modules
root + 'lib/brat/dispatcher.js',
root + 'lib/brat/url_monitor.js',
root + 'lib/brat/visualizer.js',
// embedding configuration
root + 'lib/local/config.js',
// project-specific collection data
root + 'lib/local/collections.js',
// Annodoc
root + 'lib/annodoc/annodoc.js',
// NOTE: non-local libraries
'https://spyysalo.github.io/conllu.js/conllu.js'
);
var webFontURLs = [
// root + 'static/fonts/Astloch-Bold.ttf',
root + 'static/fonts/PT_Sans-Caption-Web-Regular.ttf',
root + 'static/fonts/Liberation_Sans-Regular.ttf'
];
var setupTimeago = function() {
jQuery("time.timeago").timeago();
};
head.ready(function() {
setupTimeago();
// mark current collection (filled in by Jekyll)
Collections.listing['_current'] = 'gub';
// perform all embedding and support functions
Annodoc.activate(Config.bratCollData, Collections.listing);
});
</script>
<!-- google analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-55233688-1', 'auto');
ga('send', 'pageview');
</script>
<div id="footer">
<p class="footer-text">© 2014–2021
<a href="http://universaldependencies.org/introduction.html#contributors" style="color:gray">Universal Dependencies contributors</a>.
Site powered by <a href="http://spyysalo.github.io/annodoc" style="color:gray">Annodoc</a> and <a href="http://brat.nlplab.org/" style="color:gray">brat</a></p>.
</div>
</div>
</body>
</html>
| {
"content_hash": "426e0b63128851794a9660afe7040bec",
"timestamp": "",
"source": "github",
"line_count": 271,
"max_line_length": 305,
"avg_line_length": 34.55719557195572,
"alnum_prop": 0.607367859049653,
"repo_name": "UniversalDependencies/universaldependencies.github.io",
"id": "58ebfbed229664221cf00d3746177d120fe339ba",
"size": "9381",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "gub/feat/Tense.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "CSS",
"bytes": "64420"
},
{
"name": "HTML",
"bytes": "383191916"
},
{
"name": "JavaScript",
"bytes": "687350"
},
{
"name": "Perl",
"bytes": "7788"
},
{
"name": "Python",
"bytes": "21203"
},
{
"name": "Shell",
"bytes": "7253"
}
],
"symlink_target": ""
} |
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:rabbit="http://www.springframework.org/schema/rabbit"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/rabbit
http://www.springframework.org/schema/rabbit/spring-rabbit.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- Connexion RabbitMQ -->
<rabbit:connection-factory id="connectionFactory"
host="localhost" port="5672" username="guest" password="guest"/>
<bean id="echoService" class="org.resthub.rpc.AMQPHessianProxyFactoryBean">
<property name="connectionFactory" ref="connectionFactory"/>
<property name="serviceInterface" value="org.resthub.rpc.service.EchoService"/>
</bean>
<bean id="echoServiceTest" class="org.resthub.rpc.AMQPHessianProxyFactoryBean">
<property name="connectionFactory" ref="connectionFactory"/>
<property name="serviceInterface" value="org.resthub.rpc.service.EchoService"/>
<property name="readTimeout" value="5000"/>
</bean>
<bean id="echoServiceExceptionTest" class="org.resthub.rpc.AMQPHessianProxyFactoryBean">
<property name="connectionFactory" ref="connectionFactory"/>
<property name="serviceInterface" value="org.resthub.rpc.service.EchoService"/>
<property name="readTimeout" value="5000"/>
<property name="compressed" value="true"/>
</bean>
<bean id="echoServicePrefix" class="org.resthub.rpc.AMQPHessianProxyFactoryBean">
<property name="connectionFactory" ref="connectionFactory"/>
<property name="serviceInterface" value="org.resthub.rpc.service.EchoService"/>
<property name="queuePrefix" value="foo"/>
</bean>
<bean id="testTimeout" class="org.resthub.rpc.AMQPHessianProxyFactoryBean">
<property name="connectionFactory" ref="connectionFactory"/>
<property name="serviceInterface" value="org.resthub.rpc.service.FailingService"/>
<property name="readTimeout" value="3000"/>
</bean>
<bean id="serializationError" class="org.resthub.rpc.AMQPHessianProxyFactoryBean">
<property name="connectionFactory" ref="connectionFactory"/>
<property name="serviceInterface" value="org.resthub.rpc.service.FailingService"/>
<property name="readTimeout" value="5000"/>
</bean>
<bean id="personServiceProxy" class="org.resthub.rpc.AMQPHessianProxyFactoryBean">
<property name="connectionFactory" ref="connectionFactory"/>
<property name="serviceInterface" value="org.resthub.rpc.jpa.service.PersonService"/>
</bean>
</beans> | {
"content_hash": "7b5e2021692f4fe6e4e63115c60bf1d8",
"timestamp": "",
"source": "github",
"line_count": 56,
"max_line_length": 93,
"avg_line_length": 55.44642857142857,
"alnum_prop": 0.6669887278582931,
"repo_name": "resthub/spring-amqp-hessian",
"id": "648f459349cd19ee957e3d12a83e72c45bf242e2",
"size": "3105",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/test/resources/applicationContext-client.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "68979"
}
],
"symlink_target": ""
} |
/*
* auth_unix.c, Implements UNIX style authentication parameters.
*
* The system is very weak. The client uses no encryption for it's
* credentials and only sends null verifiers. The server sends backs
* null verifiers or optionally a verifier that suggests a new short hand
* for the credentials.
*/
#include <errno.h>
#include <limits.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <libintl.h>
#include <sys/param.h>
#include <wchar.h>
#include <rpc/types.h>
#include <rpc/xdr.h>
#include <rpc/auth.h>
#include <rpc/auth_unix.h>
/*
* Unix authenticator operations vector
*/
static void authunix_nextverf (AUTH *);
static bool_t authunix_marshal (AUTH *, XDR *);
static bool_t authunix_validate (AUTH *, struct opaque_auth *);
static bool_t authunix_refresh (AUTH *);
static void authunix_destroy (AUTH *);
static const struct auth_ops auth_unix_ops = {
authunix_nextverf,
authunix_marshal,
authunix_validate,
authunix_refresh,
authunix_destroy
};
/*
* This struct is pointed to by the ah_private field of an auth_handle.
*/
struct audata {
struct opaque_auth au_origcred; /* original credentials */
struct opaque_auth au_shcred; /* short hand cred */
u_long au_shfaults; /* short hand cache faults */
char au_marshed[MAX_AUTH_BYTES];
u_int au_mpos; /* xdr pos at end of marshed */
};
#define AUTH_PRIVATE(auth) ((struct audata *)auth->ah_private)
static bool_t marshal_new_auth (AUTH *) internal_function;
/*
* Create a unix style authenticator.
* Returns an auth handle with the given stuff in it.
*/
AUTH *
authunix_create (char *machname, uid_t uid, gid_t gid, int len,
gid_t *aup_gids)
{
struct authunix_parms aup;
char mymem[MAX_AUTH_BYTES];
struct timeval now;
XDR xdrs;
AUTH *auth;
struct audata *au;
/*
* Allocate and set up auth handle
*/
auth = (AUTH *) mem_alloc (sizeof (*auth));
au = (struct audata *) mem_alloc (sizeof (*au));
if (auth == NULL || au == NULL)
{
no_memory:
(void) __fxprintf (NULL, "%s: %s", __func__, _("out of memory\n"));
mem_free (auth, sizeof (*auth));
mem_free (au, sizeof (*au));
return NULL;
}
auth->ah_ops = (struct auth_ops *) &auth_unix_ops;
auth->ah_private = (caddr_t) au;
auth->ah_verf = au->au_shcred = _null_auth;
au->au_shfaults = 0;
/*
* fill in param struct from the given params
*/
(void) __gettimeofday (&now, (struct timezone *) 0);
aup.aup_time = now.tv_sec;
aup.aup_machname = machname;
aup.aup_uid = uid;
aup.aup_gid = gid;
aup.aup_len = (u_int) len;
aup.aup_gids = aup_gids;
/*
* Serialize the parameters into origcred
*/
xdrmem_create (&xdrs, mymem, MAX_AUTH_BYTES, XDR_ENCODE);
if (!xdr_authunix_parms (&xdrs, &aup))
abort ();
au->au_origcred.oa_length = len = XDR_GETPOS (&xdrs);
au->au_origcred.oa_flavor = AUTH_UNIX;
au->au_origcred.oa_base = mem_alloc ((u_int) len);
if (au->au_origcred.oa_base == NULL)
goto no_memory;
memcpy(au->au_origcred.oa_base, mymem, (u_int) len);
/*
* set auth handle to reflect new cred.
*/
auth->ah_cred = au->au_origcred;
marshal_new_auth (auth);
return auth;
}
libc_hidden_nolink (authunix_create, GLIBC_2_0)
/*
* Returns an auth handle with parameters determined by doing lots of
* syscalls.
*/
AUTH *
authunix_create_default (void)
{
char machname[MAX_MACHINE_NAME + 1];
if (__gethostname (machname, MAX_MACHINE_NAME) == -1)
abort ();
machname[MAX_MACHINE_NAME] = 0;
uid_t uid = __geteuid ();
gid_t gid = __getegid ();
int max_nr_groups;
/* When we have to try a second time, do not use alloca() again. We
might have reached the stack limit already. */
bool retry = false;
again:
/* Ask the kernel how many groups there are exactly. Note that we
might have to redo all this if the number of groups has changed
between the two calls. */
max_nr_groups = __getgroups (0, NULL);
/* Just some random reasonable stack limit. */
#define ALLOCA_LIMIT (1024 / sizeof (gid_t))
gid_t *gids = NULL;
if (max_nr_groups < ALLOCA_LIMIT && ! retry)
gids = (gid_t *) alloca (max_nr_groups * sizeof (gid_t));
else
{
gids = (gid_t *) malloc (max_nr_groups * sizeof (gid_t));
if (gids == NULL)
return NULL;
}
int len = __getgroups (max_nr_groups, gids);
if (len == -1)
{
if (errno == EINVAL)
{
/* New groups added in the meantime. Try again. */
if (max_nr_groups >= ALLOCA_LIMIT || retry)
free (gids);
retry = true;
goto again;
}
/* No other error can happen. */
abort ();
}
/* This braindamaged Sun code forces us here to truncate the
list of groups to NGRPS members since the code in
authuxprot.c transforms a fixed array. Grrr. */
AUTH *result = authunix_create (machname, uid, gid, MIN (NGRPS, len), gids);
if (max_nr_groups >= ALLOCA_LIMIT || retry)
free (gids);
return result;
}
#ifdef EXPORT_RPC_SYMBOLS
libc_hidden_def (authunix_create_default)
#else
libc_hidden_nolink (authunix_create_default, GLIBC_2_0)
#endif
/*
* authunix operations
*/
static void
authunix_nextverf (AUTH *auth)
{
/* no action necessary */
}
static bool_t
authunix_marshal (AUTH *auth, XDR *xdrs)
{
struct audata *au = AUTH_PRIVATE (auth);
return XDR_PUTBYTES (xdrs, au->au_marshed, au->au_mpos);
}
static bool_t
authunix_validate (AUTH *auth, struct opaque_auth *verf)
{
struct audata *au;
XDR xdrs;
if (verf->oa_flavor == AUTH_SHORT)
{
au = AUTH_PRIVATE (auth);
xdrmem_create (&xdrs, verf->oa_base, verf->oa_length, XDR_DECODE);
if (au->au_shcred.oa_base != NULL)
{
mem_free (au->au_shcred.oa_base,
au->au_shcred.oa_length);
au->au_shcred.oa_base = NULL;
}
if (xdr_opaque_auth (&xdrs, &au->au_shcred))
{
auth->ah_cred = au->au_shcred;
}
else
{
xdrs.x_op = XDR_FREE;
(void) xdr_opaque_auth (&xdrs, &au->au_shcred);
au->au_shcred.oa_base = NULL;
auth->ah_cred = au->au_origcred;
}
marshal_new_auth (auth);
}
return TRUE;
}
static bool_t
authunix_refresh (AUTH *auth)
{
struct audata *au = AUTH_PRIVATE (auth);
struct authunix_parms aup;
struct timeval now;
XDR xdrs;
int stat;
if (auth->ah_cred.oa_base == au->au_origcred.oa_base)
{
/* there is no hope. Punt */
return FALSE;
}
au->au_shfaults++;
/* first deserialize the creds back into a struct authunix_parms */
aup.aup_machname = NULL;
aup.aup_gids = (gid_t *) NULL;
xdrmem_create (&xdrs, au->au_origcred.oa_base,
au->au_origcred.oa_length, XDR_DECODE);
stat = xdr_authunix_parms (&xdrs, &aup);
if (!stat)
goto done;
/* update the time and serialize in place */
(void) __gettimeofday (&now, (struct timezone *) 0);
aup.aup_time = now.tv_sec;
xdrs.x_op = XDR_ENCODE;
XDR_SETPOS (&xdrs, 0);
stat = xdr_authunix_parms (&xdrs, &aup);
if (!stat)
goto done;
auth->ah_cred = au->au_origcred;
marshal_new_auth (auth);
done:
/* free the struct authunix_parms created by deserializing */
xdrs.x_op = XDR_FREE;
(void) xdr_authunix_parms (&xdrs, &aup);
XDR_DESTROY (&xdrs);
return stat;
}
static void
authunix_destroy (AUTH *auth)
{
struct audata *au = AUTH_PRIVATE (auth);
mem_free (au->au_origcred.oa_base, au->au_origcred.oa_length);
if (au->au_shcred.oa_base != NULL)
mem_free (au->au_shcred.oa_base, au->au_shcred.oa_length);
mem_free (auth->ah_private, sizeof (struct audata));
if (auth->ah_verf.oa_base != NULL)
mem_free (auth->ah_verf.oa_base, auth->ah_verf.oa_length);
mem_free ((caddr_t) auth, sizeof (*auth));
}
/*
* Marshals (pre-serializes) an auth struct.
* sets private data, au_marshed and au_mpos
*/
static bool_t
internal_function
marshal_new_auth (AUTH *auth)
{
XDR xdr_stream;
XDR *xdrs = &xdr_stream;
struct audata *au = AUTH_PRIVATE (auth);
xdrmem_create (xdrs, au->au_marshed, MAX_AUTH_BYTES, XDR_ENCODE);
if ((!xdr_opaque_auth (xdrs, &(auth->ah_cred))) ||
(!xdr_opaque_auth (xdrs, &(auth->ah_verf))))
perror (_("auth_unix.c: Fatal marshalling problem"));
else
au->au_mpos = XDR_GETPOS (xdrs);
XDR_DESTROY (xdrs);
return TRUE;
}
| {
"content_hash": "3fbd87c16564f4f13b936539fc670e52",
"timestamp": "",
"source": "github",
"line_count": 327,
"max_line_length": 78,
"avg_line_length": 25.07645259938838,
"alnum_prop": 0.6396341463414634,
"repo_name": "endplay/omniplay",
"id": "d3b5dc7deec4939ab17986027f308c68e8ebf46d",
"size": "9836",
"binary": false,
"copies": "5",
"ref": "refs/heads/master",
"path": "eglibc-2.15/sunrpc/auth_unix.c",
"mode": "33188",
"license": "bsd-2-clause",
"language": [
{
"name": "ASP",
"bytes": "4528"
},
{
"name": "Assembly",
"bytes": "17491433"
},
{
"name": "Awk",
"bytes": "79791"
},
{
"name": "Batchfile",
"bytes": "903"
},
{
"name": "C",
"bytes": "444772157"
},
{
"name": "C++",
"bytes": "10631343"
},
{
"name": "GDB",
"bytes": "17950"
},
{
"name": "HTML",
"bytes": "47935"
},
{
"name": "Java",
"bytes": "2193"
},
{
"name": "Lex",
"bytes": "44513"
},
{
"name": "M4",
"bytes": "9029"
},
{
"name": "Makefile",
"bytes": "1758605"
},
{
"name": "Objective-C",
"bytes": "5278898"
},
{
"name": "Perl",
"bytes": "649746"
},
{
"name": "Perl 6",
"bytes": "1101"
},
{
"name": "Python",
"bytes": "585875"
},
{
"name": "RPC",
"bytes": "97869"
},
{
"name": "Roff",
"bytes": "2522798"
},
{
"name": "Scilab",
"bytes": "21433"
},
{
"name": "Shell",
"bytes": "426172"
},
{
"name": "TeX",
"bytes": "283872"
},
{
"name": "UnrealScript",
"bytes": "6143"
},
{
"name": "XS",
"bytes": "1240"
},
{
"name": "Yacc",
"bytes": "93190"
},
{
"name": "sed",
"bytes": "9202"
}
],
"symlink_target": ""
} |
b3e.editor.ShortcutManager = function(editor) {
"use strict";
this._applySettings = function(settings) {}
} | {
"content_hash": "5024ffa013e94a422ad17a06a5773381",
"timestamp": "",
"source": "github",
"line_count": 5,
"max_line_length": 47,
"avg_line_length": 22.4,
"alnum_prop": 0.7142857142857143,
"repo_name": "renatopp/behavior3editor",
"id": "1d3419c1060798109d8089f5d10c2650689e3d3b",
"size": "112",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/editor/editor/managers/ShortcutManager.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "21532"
},
{
"name": "HTML",
"bytes": "40714"
},
{
"name": "JavaScript",
"bytes": "151216"
}
],
"symlink_target": ""
} |
using Microsoft.Xna.Framework;
namespace Nez
{
public struct SubpixelVector2
{
SubpixelFloat _x;
SubpixelFloat _y;
/// <summary>
/// increments s/y remainders by amount, truncates the values to an int, stores off the new remainders and sets amount to the current value.
/// </summary>
/// <param name="amount">Amount.</param>
public void Update(ref Vector2 amount)
{
_x.Update(ref amount.X);
_y.Update(ref amount.Y);
}
/// <summary>
/// resets the remainder to 0. Useful when an object collides with an immovable object. In that case you will want to zero out the
/// subpixel remainder since it is null and void due to the collision.
/// </summary>
public void Reset()
{
_x.Reset();
_y.Reset();
}
}
} | {
"content_hash": "63404420bc4a53edee5758ac26bc5c3e",
"timestamp": "",
"source": "github",
"line_count": 32,
"max_line_length": 142,
"avg_line_length": 23.5625,
"alnum_prop": 0.669761273209549,
"repo_name": "prime31/Nez",
"id": "318b1e8cb6d56a782e186a1b43e2d0710440bab8",
"size": "756",
"binary": false,
"copies": "3",
"ref": "refs/heads/master",
"path": "Nez.Portable/Math/SubpixelVector2.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C#",
"bytes": "3511214"
},
{
"name": "CSS",
"bytes": "1333"
},
{
"name": "HLSL",
"bytes": "44623"
},
{
"name": "JavaScript",
"bytes": "6935"
},
{
"name": "Shell",
"bytes": "554"
}
],
"symlink_target": ""
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.