Dataset Preview
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed
Error code: DatasetGenerationError
Exception: ArrowInvalid
Message: JSON parse error: Incorrect hex digit after \u escape in string. in row 1310
Traceback: Traceback (most recent call last):
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 145, in _generate_tables
dataset = json.load(f)
File "/usr/local/lib/python3.9/json/__init__.py", line 293, in load
return loads(fp.read(),
File "/usr/local/lib/python3.9/json/__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/local/lib/python3.9/json/decoder.py", line 340, in decode
raise JSONDecodeError("Extra data", s, end)
json.decoder.JSONDecodeError: Extra data: line 2 column 1 (char 1668)
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1995, in _prepare_split_single
for _, table in generator:
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 148, in _generate_tables
raise e
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/packaged_modules/json/json.py", line 122, in _generate_tables
pa_table = paj.read_json(
File "pyarrow/_json.pyx", line 308, in pyarrow._json.read_json
File "pyarrow/error.pxi", line 154, in pyarrow.lib.pyarrow_internal_check_status
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: JSON parse error: Incorrect hex digit after \u escape in string. in row 1310
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1529, in compute_config_parquet_and_info_response
parquet_operations = convert_to_parquet(builder)
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1154, in convert_to_parquet
builder.download_and_prepare(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1027, in download_and_prepare
self._download_and_prepare(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1122, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1882, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2038, in _prepare_split_single
raise DatasetGenerationError("An error occurred while generating the dataset") from e
datasets.exceptions.DatasetGenerationError: An error occurred while generating the datasetNeed help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
text
string | meta
dict |
|---|---|
import matplotlib.pyplot as plt
import numpy as np
import json
import sys
data = json.load(open(sys.argv[1]))
def get_bbox(country):
maxLat = None
maxLon = None
minLat = None
minLon = None
for polygon in country["geometry"]["coordinates"]:
coords = np.array(polygon)[0]
curMaxLat = np.max(coords.T[1])
curMinLat = np.min(coords.T[1])
curMaxLon = np.max(coords.T[0])
curMinLon = np.min(coords.T[0])
if maxLat is None or curMaxLat > maxLat:
maxLat = curMaxLat
if maxLon is None or curMaxLon > maxLon:
maxLon = curMaxLon
if minLat is None or curMinLat < minLat:
minLat = curMinLat
if minLon is None or curMinLon < minLon:
minLon = curMinLon
return maxLat, maxLon, minLat, minLon
def plot_country(country):
for polygon in country["geometry"]["coordinates"]:
coords = np.array(polygon[0])
plt.plot(coords.T[0], coords.T[1])
for country in data["features"]:
plot_country(country)
maxLat, maxLon, minLat, minLon = 73, 88, -24, -94 #get_bbox(country)
plt.xlim(minLon, maxLon)
plt.ylim(minLat, maxLat)
plt.show()
|
{
"content_hash": "d4134c852791c2d97c2f1cd722fa33c1",
"timestamp": "",
"source": "github",
"line_count": 50,
"max_line_length": 68,
"avg_line_length": 21.22,
"alnum_prop": 0.6965127238454288,
"repo_name": "bmtgoncalves/TorinoCourse",
"id": "6fec74bde971c464cc61342c30dba64f95ae0750",
"size": "1061",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Lecture IV/plot_geojson.py",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "52819"
}
]
}
|
"""
There are N network nodes, labelled 1 to N.
Given times, a list of travel times as directed edges times[i] = (u, v, w),
where u is the source node, v is the target node, and w is the time it takes for
a signal to travel from source to target.
Now, we send a signal from a certain node K. How long will it take for all nodes
to receive the signal? If it is impossible, return -1.
Note:
N will be in the range [1, 100].
K will be in the range [1, N].
The length of times will be in the range [1, 6000].
All edges times[i] = (u, v, w) will have 1 <= u, v <= N and 0 <= w <= 100.
"""
from typing import List
from collections import defaultdict
import heapq
class Solution:
def networkDelayTime(self, times: List[List[int]], N: int, K: int) -> int:
"""
Dijkstra's algorithm
"""
G = defaultdict(dict)
reach_time = [float('inf') for _ in range(N + 1)]
for u, v, w in times:
G[u][v] = w
h = [(0, K)]
reach_time[K] = 0
while h:
t, s = heapq.heappop(h)
if s in G:
for d, w in G[s].items():
if t + w < reach_time[d]:
reach_time[d] = t + w
heapq.heappush(h, (t + w, d))
ret = max(reach_time[1:]) # notice reach_time[0] is dummy
if ret == float('inf'):
return -1
return ret
if __name__ == "__main__":
assert Solution().networkDelayTime([[2,1,1],[2,3,1],[3,4,1]], 4, 2) == 2
|
{
"content_hash": "8accbf25f12bb0eccc20518e67c07c2e",
"timestamp": "",
"source": "github",
"line_count": 50,
"max_line_length": 80,
"avg_line_length": 30.24,
"alnum_prop": 0.5436507936507936,
"repo_name": "algorhythms/LeetCode",
"id": "7f759ff71d918ce992e22f7a8124e2e8df63b613",
"size": "1531",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "743 Network Delay Time.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "1444167"
}
]
}
|
ACCEPTED
#### According to
Index Fungorum
#### Published in
Mem. Amer. Acad. Arts 16: 294 (1931)
#### Original name
Misgomyces perigonae Thaxt.
### Remarks
null
|
{
"content_hash": "6ad4680c991a6b35b8e7d76420140303",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 36,
"avg_line_length": 12.615384615384615,
"alnum_prop": 0.6951219512195121,
"repo_name": "mdoering/backbone",
"id": "04d87365cf99e17683038df5c36d6d19ade73ee6",
"size": "215",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Fungi/Ascomycota/Laboulbeniomycetes/Laboulbeniales/Laboulbeniaceae/Misgomyces/Misgomyces perigonae/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": []
}
|
@interface AppDelegate ()
// Properties
@property (nonatomic, strong) UIViewController *rootViewController;
@end
@implementation AppDelegate
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
ApplesViewController *applesViewController = [[ApplesViewController alloc] init];
self.window.rootViewController = applesViewController;
self.window.backgroundColor = [UIColor whiteColor];
[self.window makeKeyAndVisible];
return YES;
}
- (void)applicationWillResignActive:(UIApplication *)application
{
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}
- (void)applicationDidEnterBackground:(UIApplication *)application
{
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}
- (void)applicationWillEnterForeground:(UIApplication *)application
{
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}
- (void)applicationDidBecomeActive:(UIApplication *)application
{
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
}
- (void)applicationWillTerminate:(UIApplication *)application
{
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}
@end
|
{
"content_hash": "1d182eba56cc31f9a027b1f983c855a1",
"timestamp": "",
"source": "github",
"line_count": 49,
"max_line_length": 281,
"avg_line_length": 45.224489795918366,
"alnum_prop": 0.7824909747292419,
"repo_name": "jansenmaarten/iOS_Apples",
"id": "0b615fe12fd194da1e316a5187f1021c1bddc424",
"size": "2408",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Apples/AppDelegate.m",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Objective-C",
"bytes": "5897"
},
{
"name": "Ruby",
"bytes": "570"
}
]
}
|
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/*
|--------------------------------------------------------------------------
| Base Site URL
|--------------------------------------------------------------------------
|
| URL to your CodeIgniter root. Typically this will be your base URL,
| WITH a trailing slash:
|
| http://example.com/
|
| WARNING: You MUST set this value!
|
| If it is not set, then CodeIgniter will try guess the protocol and path
| your installation, but due to security concerns the hostname will be set
| to $_SERVER['SERVER_ADDR'] if available, or localhost otherwise.
| The auto-detection mechanism exists only for convenience during
| development and MUST NOT be used in production!
|
| If you need to allow multiple domains, remember that this file is still
| a PHP script and you can easily do that on your own.
|
*/
$config['base_url'] = 'https://proyecto-web-facyt-mpigorini.c9users.io';
/*
|--------------------------------------------------------------------------
| Index File
|--------------------------------------------------------------------------
|
| Typically this will be your index.php file, unless you've renamed it to
| something else. If you are using mod_rewrite to remove the page set this
| variable so that it is blank.
|
*/
$config['index_page'] = 'index.php';
/*
|--------------------------------------------------------------------------
| URI PROTOCOL
|--------------------------------------------------------------------------
|
| This item determines which server global should be used to retrieve the
| URI string. The default setting of 'REQUEST_URI' works for most servers.
| If your links do not seem to work, try one of the other delicious flavors:
|
| 'REQUEST_URI' Uses $_SERVER['REQUEST_URI']
| 'QUERY_STRING' Uses $_SERVER['QUERY_STRING']
| 'PATH_INFO' Uses $_SERVER['PATH_INFO']
|
| WARNING: If you set this to 'PATH_INFO', URIs will always be URL-decoded!
*/
$config['uri_protocol'] = 'REQUEST_URI';
/*
|--------------------------------------------------------------------------
| URL suffix
|--------------------------------------------------------------------------
|
| This option allows you to add a suffix to all URLs generated by CodeIgniter.
| For more information please see the user guide:
|
| https://codeigniter.com/user_guide/general/urls.html
*/
$config['url_suffix'] = '';
/*
|--------------------------------------------------------------------------
| Default Language
|--------------------------------------------------------------------------
|
| This determines which set of language files should be used. Make sure
| there is an available translation if you intend to use something other
| than english.
|
*/
$config['language'] = 'english';
/*
|--------------------------------------------------------------------------
| Default Character Set
|--------------------------------------------------------------------------
|
| This determines which character set is used by default in various methods
| that require a character set to be provided.
|
| See http://php.net/htmlspecialchars for a list of supported charsets.
|
*/
$config['charset'] = 'UTF-8';
/*
|--------------------------------------------------------------------------
| Enable/Disable System Hooks
|--------------------------------------------------------------------------
|
| If you would like to use the 'hooks' feature you must enable it by
| setting this variable to TRUE (boolean). See the user guide for details.
|
*/
$config['enable_hooks'] = FALSE;
/*
|--------------------------------------------------------------------------
| Class Extension Prefix
|--------------------------------------------------------------------------
|
| This item allows you to set the filename/classname prefix when extending
| native libraries. For more information please see the user guide:
|
| https://codeigniter.com/user_guide/general/core_classes.html
| https://codeigniter.com/user_guide/general/creating_libraries.html
|
*/
$config['subclass_prefix'] = 'MY_';
/*
|--------------------------------------------------------------------------
| Composer auto-loading
|--------------------------------------------------------------------------
|
| Enabling this setting will tell CodeIgniter to look for a Composer
| package auto-loader script in application/vendor/autoload.php.
|
| $config['composer_autoload'] = TRUE;
|
| Or if you have your vendor/ directory located somewhere else, you
| can opt to set a specific path as well:
|
| $config['composer_autoload'] = '/path/to/vendor/autoload.php';
|
| For more information about Composer, please visit http://getcomposer.org/
|
| Note: This will NOT disable or override the CodeIgniter-specific
| autoloading (application/config/autoload.php)
*/
$config['composer_autoload'] = './vendor/autoload.php';
/*
|--------------------------------------------------------------------------
| Allowed URL Characters
|--------------------------------------------------------------------------
|
| This lets you specify which characters are permitted within your URLs.
| When someone tries to submit a URL with disallowed characters they will
| get a warning message.
|
| As a security measure you are STRONGLY encouraged to restrict URLs to
| as few characters as possible. By default only these are allowed: a-z 0-9~%.:_-
|
| Leave blank to allow all characters -- but only if you are insane.
|
| The configured value is actually a regular expression character group
| and it will be executed as: ! preg_match('/^[<permitted_uri_chars>]+$/i
|
| DO NOT CHANGE THIS UNLESS YOU FULLY UNDERSTAND THE REPERCUSSIONS!!
|
*/
$config['permitted_uri_chars'] = 'a-z 0-9~%.:_\-';
/*
|--------------------------------------------------------------------------
| Enable Query Strings
|--------------------------------------------------------------------------
|
| By default CodeIgniter uses search-engine friendly segment based URLs:
| example.com/who/what/where/
|
| By default CodeIgniter enables access to the $_GET array. If for some
| reason you would like to disable it, set 'allow_get_array' to FALSE.
|
| You can optionally enable standard query string based URLs:
| example.com?who=me&what=something&where=here
|
| Options are: TRUE or FALSE (boolean)
|
| The other items let you set the query string 'words' that will
| invoke your controllers and its functions:
| example.com/index.php?c=controller&m=function
|
| Please note that some of the helpers won't work as expected when
| this feature is enabled, since CodeIgniter is designed primarily to
| use segment based URLs.
|
*/
$config['allow_get_array'] = TRUE;
$config['enable_query_strings'] = FALSE;
$config['controller_trigger'] = 'c';
$config['function_trigger'] = 'm';
$config['directory_trigger'] = 'd';
/*
|--------------------------------------------------------------------------
| Error Logging Threshold
|--------------------------------------------------------------------------
|
| You can enable error logging by setting a threshold over zero. The
| threshold determines what gets logged. Threshold options are:
|
| 0 = Disables logging, Error logging TURNED OFF
| 1 = Error Messages (including PHP errors)
| 2 = Debug Messages
| 3 = Informational Messages
| 4 = All Messages
|
| You can also pass an array with threshold levels to show individual error types
|
| array(2) = Debug Messages, without Error Messages
|
| For a live site you'll usually only enable Errors (1) to be logged otherwise
| your log files will fill up very fast.
|
*/
$config['log_threshold'] = 0;
/*
|--------------------------------------------------------------------------
| Error Logging Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/logs/ directory. Use a full server path with trailing slash.
|
*/
$config['log_path'] = '';
/*
|--------------------------------------------------------------------------
| Log File Extension
|--------------------------------------------------------------------------
|
| The default filename extension for log files. The default 'php' allows for
| protecting the log files via basic scripting, when they are to be stored
| under a publicly accessible directory.
|
| Note: Leaving it blank will default to 'php'.
|
*/
$config['log_file_extension'] = '';
/*
|--------------------------------------------------------------------------
| Log File Permissions
|--------------------------------------------------------------------------
|
| The file system permissions to be applied on newly created log files.
|
| IMPORTANT: This MUST be an integer (no quotes) and you MUST use octal
| integer notation (i.e. 0700, 0644, etc.)
*/
$config['log_file_permissions'] = 0644;
/*
|--------------------------------------------------------------------------
| Date Format for Logs
|--------------------------------------------------------------------------
|
| Each item that is logged has an associated date. You can use PHP date
| codes to set your own date formatting
|
*/
$config['log_date_format'] = 'Y-m-d H:i:s';
/*
|--------------------------------------------------------------------------
| Error Views Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/views/errors/ directory. Use a full server path with trailing slash.
|
*/
$config['error_views_path'] = '';
/*
|--------------------------------------------------------------------------
| Cache Directory Path
|--------------------------------------------------------------------------
|
| Leave this BLANK unless you would like to set something other than the default
| application/cache/ directory. Use a full server path with trailing slash.
|
*/
$config['cache_path'] = '';
/*
|--------------------------------------------------------------------------
| Cache Include Query String
|--------------------------------------------------------------------------
|
| Whether to take the URL query string into consideration when generating
| output cache files. Valid options are:
|
| FALSE = Disabled
| TRUE = Enabled, take all query parameters into account.
| Please be aware that this may result in numerous cache
| files generated for the same page over and over again.
| array('q') = Enabled, but only take into account the specified list
| of query parameters.
|
*/
$config['cache_query_string'] = FALSE;
/*
|--------------------------------------------------------------------------
| Encryption Key
|--------------------------------------------------------------------------
|
| If you use the Encryption class, you must set an encryption key.
| See the user guide for more info.
|
| https://codeigniter.com/user_guide/libraries/encryption.html
|
*/
$config['encryption_key'] = '';
/*
|--------------------------------------------------------------------------
| Session Variables
|--------------------------------------------------------------------------
|
| 'sess_driver'
|
| The storage driver to use: files, database, redis, memcached
|
| 'sess_cookie_name'
|
| The session cookie name, must contain only [0-9a-z_-] characters
|
| 'sess_expiration'
|
| The number of SECONDS you want the session to last.
| Setting to 0 (zero) means expire when the browser is closed.
|
| 'sess_save_path'
|
| The location to save sessions to, driver dependent.
|
| For the 'files' driver, it's a path to a writable directory.
| WARNING: Only absolute paths are supported!
|
| For the 'database' driver, it's a table name.
| Please read up the manual for the format with other session drivers.
|
| IMPORTANT: You are REQUIRED to set a valid save path!
|
| 'sess_match_ip'
|
| Whether to match the user's IP address when reading the session data.
|
| WARNING: If you're using the database driver, don't forget to update
| your session table's PRIMARY KEY when changing this setting.
|
| 'sess_time_to_update'
|
| How many seconds between CI regenerating the session ID.
|
| 'sess_regenerate_destroy'
|
| Whether to destroy session data associated with the old session ID
| when auto-regenerating the session ID. When set to FALSE, the data
| will be later deleted by the garbage collector.
|
| Other session cookie settings are shared with the rest of the application,
| except for 'cookie_prefix' and 'cookie_httponly', which are ignored here.
|
*/
$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;
/*
|--------------------------------------------------------------------------
| Cookie Related Variables
|--------------------------------------------------------------------------
|
| 'cookie_prefix' = Set a cookie name prefix if you need to avoid collisions
| 'cookie_domain' = Set to .your-domain.com for site-wide cookies
| 'cookie_path' = Typically will be a forward slash
| 'cookie_secure' = Cookie will only be set if a secure HTTPS connection exists.
| 'cookie_httponly' = Cookie will only be accessible via HTTP(S) (no javascript)
|
| Note: These settings (with the exception of 'cookie_prefix' and
| 'cookie_httponly') will also affect sessions.
|
*/
$config['cookie_prefix'] = '';
$config['cookie_domain'] = '';
$config['cookie_path'] = '/';
$config['cookie_secure'] = FALSE;
$config['cookie_httponly'] = FALSE;
/*
|--------------------------------------------------------------------------
| Standardize newlines
|--------------------------------------------------------------------------
|
| Determines whether to standardize newline characters in input data,
| meaning to replace \r\n, \r, \n occurrences with the PHP_EOL value.
|
| This is particularly useful for portability between UNIX-based OSes,
| (usually \n) and Windows (\r\n).
|
*/
$config['standardize_newlines'] = FALSE;
/*
|--------------------------------------------------------------------------
| Global XSS Filtering
|--------------------------------------------------------------------------
|
| Determines whether the XSS filter is always active when GET, POST or
| COOKIE data is encountered
|
| WARNING: This feature is DEPRECATED and currently available only
| for backwards compatibility purposes!
|
*/
$config['global_xss_filtering'] = FALSE;
/*
|--------------------------------------------------------------------------
| Cross Site Request Forgery
|--------------------------------------------------------------------------
| Enables a CSRF cookie token to be set. When set to TRUE, token will be
| checked on a submitted form. If you are accepting user data, it is strongly
| recommended CSRF protection be enabled.
|
| 'csrf_token_name' = The token name
| 'csrf_cookie_name' = The cookie name
| 'csrf_expire' = The number in seconds the token should expire.
| 'csrf_regenerate' = Regenerate token on every submission
| 'csrf_exclude_uris' = Array of URIs which ignore CSRF checks
*/
$config['csrf_protection'] = FALSE;
$config['csrf_token_name'] = 'csrf_test_name';
$config['csrf_cookie_name'] = 'csrf_cookie_name';
$config['csrf_expire'] = 7200;
$config['csrf_regenerate'] = TRUE;
$config['csrf_exclude_uris'] = array();
/*
|--------------------------------------------------------------------------
| Output Compression
|--------------------------------------------------------------------------
|
| Enables Gzip output compression for faster page loads. When enabled,
| the output class will test whether your server supports Gzip.
| Even if it does, however, not all browsers support compression
| so enable only if you are reasonably sure your visitors can handle it.
|
| Only used if zlib.output_compression is turned off in your php.ini.
| Please do not use it together with httpd-level output compression.
|
| VERY IMPORTANT: If you are getting a blank page when compression is enabled it
| means you are prematurely outputting something to your browser. It could
| even be a line of whitespace at the end of one of your scripts. For
| compression to work, nothing can be sent before the output buffer is called
| by the output class. Do not 'echo' any values with compression enabled.
|
*/
$config['compress_output'] = FALSE;
/*
|--------------------------------------------------------------------------
| Master Time Reference
|--------------------------------------------------------------------------
|
| Options are 'local' or any PHP supported timezone. This preference tells
| the system whether to use your server's local time as the master 'now'
| reference, or convert it to the configured one timezone. See the 'date
| helper' page of the user guide for information regarding date handling.
|
*/
$config['time_reference'] = 'local';
/*
|--------------------------------------------------------------------------
| Rewrite PHP Short Tags
|--------------------------------------------------------------------------
|
| If your PHP installation does not have short tag support enabled CI
| can rewrite the tags on-the-fly, enabling you to utilize that syntax
| in your view files. Options are TRUE or FALSE (boolean)
|
| Note: You need to have eval() enabled for this to work.
|
*/
$config['rewrite_short_tags'] = FALSE;
/*
|--------------------------------------------------------------------------
| Reverse Proxy IPs
|--------------------------------------------------------------------------
|
| If your server is behind a reverse proxy, you must whitelist the proxy
| IP addresses from which CodeIgniter should trust headers such as
| HTTP_X_FORWARDED_FOR and HTTP_CLIENT_IP in order to properly identify
| the visitor's IP address.
|
| You can use both an array or a comma-separated list of proxy addresses,
| as well as specifying whole subnets. Here are a few examples:
|
| Comma-separated: '10.0.1.200,192.168.5.0/24'
| Array: array('10.0.1.200', '192.168.5.0/24')
*/
$config['proxy_ips'] = '';
|
{
"content_hash": "6cbeda37e0f22c18f34810f0cb2735bc",
"timestamp": "",
"source": "github",
"line_count": 514,
"max_line_length": 83,
"avg_line_length": 35.39494163424124,
"alnum_prop": 0.5462540537569395,
"repo_name": "mpigorini/ProyectoWebFacyt",
"id": "92b37171b3fef7b4b8c9e4d19a658d6e84ad891f",
"size": "18193",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "application/config/config.php",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "257"
},
{
"name": "CSS",
"bytes": "341010"
},
{
"name": "HTML",
"bytes": "27222"
},
{
"name": "JavaScript",
"bytes": "1645639"
},
{
"name": "PHP",
"bytes": "5442360"
}
]
}
|
package lobo;
// source:
import nl.esciencecenter.ptk.vbrowser.ui.StartVBrowser;
import nl.esciencecenter.ptk.vbrowser.ui.browser.BrowserPlatform;
import nl.esciencecenter.ptk.vbrowser.viewers.loboviewer.LoboBrowser;
import nl.esciencecenter.ptk.vbrowser.viewers.loboviewer.LoboBrowserInit;
import nl.esciencecenter.vbrowser.vrs.VRSContext;
public class StartLoboVBrowser
{
protected static BrowserPlatform platform = null;
public static void main(String args[])
{
try
{
BrowserPlatform platform = StartVBrowser.getPlatform();
VRSContext context = platform.getVRSContext();
context.getRegistry().registerFactory(nl.esciencecenter.ptk.vbrowser.viewers.loboviewer.resfs.ResFS.class);
platform.getViewerRegistry().registerPlugin(LoboBrowser.class);
LoboBrowserInit.initPlatform(platform);
StartVBrowser.startVBrowser(args);
}
catch (Exception e)
{
e.printStackTrace();
}
// frame.setRoot(root);
}
}
|
{
"content_hash": "90ebcf79a79c7d9c3437dbe787a93e67",
"timestamp": "",
"source": "github",
"line_count": 42,
"max_line_length": 119,
"avg_line_length": 25.833333333333332,
"alnum_prop": 0.680184331797235,
"repo_name": "NLeSC/Platinum",
"id": "f6261dcf704bad9fb5976ff2eff7d8f1fe310213",
"size": "1923",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "ptk-vbrowser-start/src/test/java/lobo/StartLoboVBrowser.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C++",
"bytes": "7985"
},
{
"name": "Java",
"bytes": "2714273"
},
{
"name": "Shell",
"bytes": "3672"
}
]
}
|
set -e
# color in stdout
NO_COLOR='\033[0m'
OK_COLOR='\033[32;01m'
ERROR_COLOR='\033[31;01m'
WARN_COLOR='\033[33;01m'
echo -e "${WARN_COLOR}===== Installing Utilities =====${NO_COLOR}"
sudo apt udpate && sudo apt install -y --no-install-recommends mc htop nano ncdu git curl screen
sh ./wifi-connection.sh
sh ./swap-configuration.sh
if ! which docker 1>/dev/null; then
echo -e "${WARN_COLOR}===== Installing docker =====${NO_COLOR}"
curl -sSL https://get.docker.com/ | sh
sudo usermod -aG docker $USER
fi
if ! which docker-compose 1>/dev/null; then
echo -e "${WARN_COLOR}===== Installing docker-compose =====${NO_COLOR}"
sudo apt-get -y install python-pip
sudo pip install docker-compose
fi
echo -e "${WARN_COLOR}===== Configuring logrotate for docker logs =====${NO_COLOR}"
sudo su -c 'echo "/var/lib/docker/containers/*/*.log {
daily
rotate 7rm dock
copytruncate
missingok
compress
notifempty
}" > /etc/logrotate.d/docker'
echo -e "${WARN_COLOR}===== Adding deploy keys =====${NO_COLOR}"
mkdir -p ~/.ssh
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDtT9e4pDwpGZ9FDuuS5HWTY6BV2NgmNauPRzM8rX6cpK8S5gCYMSwJg4NxTPH+n9T9pSb2/2OsFuK6XoDVt4VWaCc8a1HwcXzkfS7HQJFV8t2hWHgvrUB09jkchQPdhqt9iLTo2jsErHfrZ2VpRhB+d2C125g0LYsuuvxXl9OIYzDPM/b557TBe5WfmMgRqMysLgd6YsXohR8Zfa3yZIjhZpsVG4c8NQzXdjnhwmtP1QdNlMpTX0L5MA4p9Wqu5L2JEFlzfWWJl6NnRr4gGAaVhnsIz0utpW5/ppR+7N9EehxORd6IiKfFt2sN3dfD0yMA1eaF/7fBLMaKVKcKaEJB deploy" > ~/.ssh/authorized_keys
echo -e "${WARN_COLOR}===== Enabling and starting SSH service =====${NO_COLOR}"
sudo systemctl enable ssh
sudo service ssh start
echo -e "${WARN_COLOR}===== Change default screen framebuffer size =====${NO_COLOR}"
sudo su -c 'echo "framebuffer_width=1280
framebuffer_height=720" >> /boot/config.txt'
echo -e "${WARN_COLOR}===== Installing teamviewer =====${NO_COLOR}"
wget https://download.teamviewer.com/download/linux/teamviewer-host_armhf.deb
sudo gdebi teamviewer-host_armhf.deb
echo -e "${WARN_COLOR}===== Installing tinc VPN =====${NO_COLOR}"
mkdir -p ~/docker/tinc
echo "tinc:
restart: always
image: byscontrol/tinc-rpi
container_name: tinc
net: host
cap_add:
- NET_ADMIN
devices:
- "/dev/net/tun"
volumes:
- "tinc:/etc/tinc"
environment:
- TINC_NAME=node_name
- TINC_IP=10.100.0.xx/16
- TINC_SUBNET=10.100.0.xx
- TINC_INTERFACE=tun0
- TINC_CONNECT_TO=server
" > ~/docker/tinc/docker-compose.yml
echo -e "${WARN_COLOR}===== Installing monitoring service (prometheus + node_exporter + grafana) =====${NO_COLOR}"
mkdir -p ~/docker/prometheus
git clone -b devel-rpi --single-branch https://github.com/bys-control/docker-prometheus-monitoring --depth 1 ~/docker/prometheus
echo -e "${WARN_COLOR}===== Installing portainer =====${NO_COLOR}"
mkdir -p ~/docker/portainer
echo "ui:
image: portainer/portainer:linux-arm
restart: always
volumes:
- '/var/run/docker.sock:/var/run/docker.sock'
expose:
- 9000
ports:
- 8080:9000
" > ~/docker/portainer/docker-compose.yml
echo -e "${WARN_COLOR}===== DONE!!! =====${NO_COLOR}"
|
{
"content_hash": "e34ea3e9069bccee86ffe1408b104ff7",
"timestamp": "",
"source": "github",
"line_count": 92,
"max_line_length": 419,
"avg_line_length": 33.391304347826086,
"alnum_prop": 0.7014973958333334,
"repo_name": "bys-control/install_host_docker",
"id": "cd69679bd39f80fab592380478592ae01f0b22b7",
"size": "3084",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "install_docker_rpi.sh",
"mode": "33261",
"license": "mit",
"language": [
{
"name": "Makefile",
"bytes": "411"
},
{
"name": "Shell",
"bytes": "7959"
}
]
}
|
ACCEPTED
#### According to
The Catalogue of Life, 3rd January 2011
#### Published in
null
#### Original name
null
### Remarks
null
|
{
"content_hash": "772ae78e6b6d219302071dad1f377bd9",
"timestamp": "",
"source": "github",
"line_count": 13,
"max_line_length": 39,
"avg_line_length": 10.307692307692308,
"alnum_prop": 0.6940298507462687,
"repo_name": "mdoering/backbone",
"id": "eee19eb27e3605aca34196e9c1f352f145d9d634",
"size": "186",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "life/Plantae/Chlorophyta/Zygnematophyceae/Zygnematales/Zygnemataceae/Zygnema/Zygnema spontaneum/README.md",
"mode": "33188",
"license": "apache-2.0",
"language": []
}
|
#ifndef _FPU_CONTROL_H
#define _FPU_CONTROL_H
#include <features.h>
/* These bits are reserved are not changed. */
#define _FPU_RESERVED 0x0707FFFC
/* The fdlibm code requires no interrupts for exceptions. Don't
change the rounding mode, it would break long double I/O! */
#define _FPU_DEFAULT 0x00000000 /* Default value. */
/* Type of the control word. */
typedef unsigned int fpu_control_t;
/* Macros for accessing the hardware control word. */
#define _FPU_GETCW(cw) __asm__ __volatile__ ("efpc %0,0" : "=d" (cw))
#define _FPU_SETCW(cw) __asm__ __volatile__ ("sfpc %0,0" : : "d" (cw))
/* Default control word set at startup. */
extern fpu_control_t __fpu_control;
#endif /* _FPU_CONTROL_H */
|
{
"content_hash": "9a929a6878a46886aab1b21c660ddc44",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 72,
"avg_line_length": 28.72,
"alnum_prop": 0.6643454038997214,
"repo_name": "raulgrell/zig",
"id": "3ca492fd63f207ce6b3ef3d03cf170395385eacf",
"size": "1666",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "lib/libc/include/s390x-linux-gnu/fpu_control.h",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Batchfile",
"bytes": "1187"
},
{
"name": "C",
"bytes": "187893"
},
{
"name": "C++",
"bytes": "3749750"
},
{
"name": "CMake",
"bytes": "38091"
},
{
"name": "HTML",
"bytes": "15836"
},
{
"name": "JavaScript",
"bytes": "73253"
},
{
"name": "Shell",
"bytes": "17887"
},
{
"name": "Zig",
"bytes": "17407339"
}
]
}
|
<?php
class model_fixture extends CI_Model {
function __construct() {
parent::__construct();
}
function User()
{
parent::Controller();
$this->view_data['base_url'] = base_url();
}
function index(){
$this->welcome_message;
}
function submit(){
$this->load->view('welcome_message',$this->view_data);
}
function getRound(){
$query = $this->db->query('SELECT Round FROM 2017_AFL_Fixture WHERE Date >= CURDATE() ORDER BY Date ASC');
if ($query->num_rows()>0) {
return $query->result();
}else{
return NULL;
}
}
function getTeam(){
$query = $this->db->query('SELECT * FROM 2017_AFL_Teams');
if ($query->num_rows()>0) {
return $query->result();
}else{
return NULL;
}
}
function getFixture(){
$query = $this->db->query('SELECT Game, Date, (SELECT Team FROM 2017_AFL_Teams WHERE 2017_AFL_Fixture.Home = 2017_AFL_Teams.ID) AS Home_Team, (SELECT Team FROM 2017_AFL_Teams WHERE 2017_AFL_Fixture.Away = 2017_AFL_Teams.ID) AS Away_Team, Ground, Time_EST FROM 2017_AFL_Fixture WHERE Round = (SELECT Round FROM 2017_AFL_Fixture WHERE Date >= CURDATE() ORDER BY date ASC LIMIT 1)');
if ($query->num_rows()>0) {
return $query->result();
}else{
return NULL;
}
}
}
?>
|
{
"content_hash": "5f1a3d47e0d938f92f285a7d6476c7ff",
"timestamp": "",
"source": "github",
"line_count": 60,
"max_line_length": 386,
"avg_line_length": 22.983333333333334,
"alnum_prop": 0.5692530819434373,
"repo_name": "DanLeeHill/SportsTipping",
"id": "560af2b8c1e129e352eb92c6654a5eeead7d406d",
"size": "1379",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "application/models/model_fixture.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ApacheConf",
"bytes": "240"
},
{
"name": "CSS",
"bytes": "14838"
},
{
"name": "HTML",
"bytes": "8429724"
},
{
"name": "JavaScript",
"bytes": "56182"
},
{
"name": "PHP",
"bytes": "1764454"
}
]
}
|
namespace net {
namespace {
GURL GenerateSpawnerCommandURL(const std::string& command, uint16_t port) {
// Always performs HTTP request for sending command to the spawner server.
return GURL(base::StringPrintf("%s:%u/%s", "http://127.0.0.1", port,
command.c_str()));
}
int kBufferSize = 2048;
// A class to hold all data needed to send a command to spawner server.
class SpawnerRequestData : public base::SupportsUserData::Data {
public:
SpawnerRequestData(int id, int* result_code, std::string* data_received)
: request_id_(id),
buf_(new IOBuffer(kBufferSize)),
result_code_(result_code),
data_received_(data_received),
response_started_count_(0) {
DCHECK(result_code);
*result_code_ = OK;
DCHECK(data_received);
data_received_->clear();
}
~SpawnerRequestData() override {}
bool DoesRequestIdMatch(int request_id) const {
return request_id_ == request_id;
}
IOBuffer* buf() const { return buf_.get(); }
bool IsResultOK() const { return *result_code_ == OK; }
void ClearReceivedData() { data_received_->clear(); }
void SetResultCode(int result_code) { *result_code_ = result_code; }
void IncreaseResponseStartedCount() { response_started_count_++; }
int response_started_count() const { return response_started_count_; }
// Write data read from URLRequest::Read() to |data_received_|. Returns true
// if |num_bytes| is great than 0. |num_bytes| is 0 for EOF, < 0 on errors.
bool ConsumeBytesRead(int num_bytes) {
// Error while reading, or EOF.
if (num_bytes <= 0)
return false;
data_received_->append(buf_->data(), num_bytes);
return true;
}
private:
// Unique ID for the current request.
int request_id_;
// Buffer that URLRequest writes into.
scoped_refptr<IOBuffer> buf_;
// Holds the error condition that was hit on the current request, or OK.
int* result_code_;
// Data received from server;
std::string* data_received_;
// Used to track how many times the OnResponseStarted get called after
// sending a command to spawner server.
int response_started_count_;
DISALLOW_COPY_AND_ASSIGN(SpawnerRequestData);
};
} // namespace
SpawnerCommunicator::SpawnerCommunicator(uint16_t port)
: io_thread_("spawner_communicator"),
event_(false, false),
port_(port),
next_id_(0),
is_running_(false),
weak_factory_(this) {}
SpawnerCommunicator::~SpawnerCommunicator() {
DCHECK(!is_running_);
}
void SpawnerCommunicator::WaitForResponse() {
DCHECK_NE(base::MessageLoop::current(), io_thread_.message_loop());
event_.Wait();
event_.Reset();
}
void SpawnerCommunicator::StartIOThread() {
DCHECK_NE(base::MessageLoop::current(), io_thread_.message_loop());
if (is_running_)
return;
allowed_port_.reset(new ScopedPortException(port_));
base::Thread::Options options;
options.message_loop_type = base::MessageLoop::TYPE_IO;
is_running_ = io_thread_.StartWithOptions(options);
DCHECK(is_running_);
}
void SpawnerCommunicator::Shutdown() {
DCHECK_NE(base::MessageLoop::current(), io_thread_.message_loop());
DCHECK(is_running_);
// The request and its context should be created and destroyed only on the
// IO thread.
DCHECK(!cur_request_.get());
DCHECK(!context_.get());
is_running_ = false;
io_thread_.Stop();
allowed_port_.reset();
}
void SpawnerCommunicator::SendCommandAndWaitForResult(
const std::string& command,
const std::string& post_data,
int* result_code,
std::string* data_received) {
if (!result_code || !data_received)
return;
// Start the communicator thread to talk to test server spawner.
StartIOThread();
DCHECK(io_thread_.message_loop());
// Since the method will be blocked until SpawnerCommunicator gets result
// from the spawner server or timed-out. It's safe to use base::Unretained
// when using base::Bind.
io_thread_.message_loop()->PostTask(FROM_HERE, base::Bind(
&SpawnerCommunicator::SendCommandAndWaitForResultOnIOThread,
base::Unretained(this), command, post_data, result_code, data_received));
WaitForResponse();
}
void SpawnerCommunicator::SendCommandAndWaitForResultOnIOThread(
const std::string& command,
const std::string& post_data,
int* result_code,
std::string* data_received) {
base::MessageLoop* loop = io_thread_.message_loop();
DCHECK(loop);
DCHECK_EQ(base::MessageLoop::current(), loop);
// Prepare the URLRequest for sending the command.
DCHECK(!cur_request_.get());
context_.reset(new TestURLRequestContext);
cur_request_ = context_->CreateRequest(
GenerateSpawnerCommandURL(command, port_), DEFAULT_PRIORITY, this);
DCHECK(cur_request_);
int current_request_id = ++next_id_;
SpawnerRequestData* data = new SpawnerRequestData(current_request_id,
result_code,
data_received);
DCHECK(data);
cur_request_->SetUserData(this, data);
if (post_data.empty()) {
cur_request_->set_method("GET");
} else {
cur_request_->set_method("POST");
scoped_ptr<UploadElementReader> reader(
UploadOwnedBytesElementReader::CreateWithString(post_data));
cur_request_->set_upload(
ElementsUploadDataStream::CreateWithReader(reader.Pass(), 0));
HttpRequestHeaders headers;
headers.SetHeader(HttpRequestHeaders::kContentType,
"application/json");
cur_request_->SetExtraRequestHeaders(headers);
}
// Post a task to timeout this request if it takes too long.
base::MessageLoop::current()->PostDelayedTask(
FROM_HERE,
base::Bind(&SpawnerCommunicator::OnTimeout,
weak_factory_.GetWeakPtr(),
current_request_id),
TestTimeouts::action_max_timeout());
// Start the request.
cur_request_->Start();
}
void SpawnerCommunicator::OnTimeout(int id) {
// Timeout tasks may outlive the URLRequest they reference. Make sure it
// is still applicable.
if (!cur_request_.get())
return;
SpawnerRequestData* data =
static_cast<SpawnerRequestData*>(cur_request_->GetUserData(this));
DCHECK(data);
if (!data->DoesRequestIdMatch(id))
return;
// Set the result code and cancel the timed-out task.
data->SetResultCode(ERR_TIMED_OUT);
cur_request_->Cancel();
OnSpawnerCommandCompleted(cur_request_.get());
}
void SpawnerCommunicator::OnSpawnerCommandCompleted(URLRequest* request) {
if (!cur_request_.get())
return;
DCHECK_EQ(request, cur_request_.get());
SpawnerRequestData* data =
static_cast<SpawnerRequestData*>(cur_request_->GetUserData(this));
DCHECK(data);
// If request is faild,return the error code.
if (!cur_request_->status().is_success())
data->SetResultCode(cur_request_->status().error());
if (!data->IsResultOK()) {
LOG(ERROR) << "request failed, status: "
<< static_cast<int>(request->status().status())
<< ", error: " << request->status().error();
// Clear the buffer of received data if any net error happened.
data->ClearReceivedData();
} else {
DCHECK_EQ(1, data->response_started_count());
}
// Clear current request to indicate the completion of sending a command
// to spawner server and getting the result.
cur_request_.reset();
context_.reset();
// Invalidate the weak pointers on the IO thread.
weak_factory_.InvalidateWeakPtrs();
// Wakeup the caller in user thread.
event_.Signal();
}
void SpawnerCommunicator::ReadResult(URLRequest* request) {
DCHECK_EQ(request, cur_request_.get());
SpawnerRequestData* data =
static_cast<SpawnerRequestData*>(cur_request_->GetUserData(this));
DCHECK(data);
IOBuffer* buf = data->buf();
// Read as many bytes as are available synchronously.
while (true) {
int num_bytes;
if (!request->Read(buf, kBufferSize, &num_bytes)) {
// Check whether the read failed synchronously.
if (!request->status().is_io_pending())
OnSpawnerCommandCompleted(request);
return;
}
if (!data->ConsumeBytesRead(num_bytes)) {
OnSpawnerCommandCompleted(request);
return;
}
}
}
void SpawnerCommunicator::OnResponseStarted(URLRequest* request) {
DCHECK_EQ(request, cur_request_.get());
SpawnerRequestData* data =
static_cast<SpawnerRequestData*>(cur_request_->GetUserData(this));
DCHECK(data);
data->IncreaseResponseStartedCount();
if (!request->status().is_success()) {
OnSpawnerCommandCompleted(request);
return;
}
// Require HTTP responses to have a success status code.
if (request->GetResponseCode() != 200) {
LOG(ERROR) << "Spawner server returned bad status: "
<< request->response_headers()->GetStatusLine();
data->SetResultCode(ERR_FAILED);
request->Cancel();
OnSpawnerCommandCompleted(request);
return;
}
ReadResult(request);
}
void SpawnerCommunicator::OnReadCompleted(URLRequest* request, int num_bytes) {
if (!cur_request_.get())
return;
DCHECK_EQ(request, cur_request_.get());
SpawnerRequestData* data =
static_cast<SpawnerRequestData*>(cur_request_->GetUserData(this));
DCHECK(data);
if (data->ConsumeBytesRead(num_bytes)) {
// Keep reading.
ReadResult(request);
} else {
OnSpawnerCommandCompleted(request);
}
}
bool SpawnerCommunicator::StartServer(const std::string& arguments,
uint16_t* port) {
*port = 0;
// Send the start command to spawner server to start the Python test server
// on remote machine.
std::string server_return_data;
int result_code;
SendCommandAndWaitForResult("start", arguments, &result_code,
&server_return_data);
if (OK != result_code || server_return_data.empty())
return false;
// Check whether the data returned from spawner server is JSON-formatted.
scoped_ptr<base::Value> value = base::JSONReader::Read(server_return_data);
if (!value.get() || !value->IsType(base::Value::TYPE_DICTIONARY)) {
LOG(ERROR) << "Invalid server data: " << server_return_data.c_str();
return false;
}
// Check whether spawner server returns valid data.
base::DictionaryValue* server_data =
static_cast<base::DictionaryValue*>(value.get());
std::string message;
if (!server_data->GetString("message", &message) || message != "started") {
LOG(ERROR) << "Invalid message in server data: ";
return false;
}
int int_port;
if (!server_data->GetInteger("port", &int_port) || int_port <= 0 ||
int_port > std::numeric_limits<uint16_t>::max()) {
LOG(ERROR) << "Invalid port value: " << int_port;
return false;
}
*port = static_cast<uint16_t>(int_port);
return true;
}
bool SpawnerCommunicator::StopServer() {
// It's OK to stop the SpawnerCommunicator without starting it. Some tests
// have test server on their test fixture but do not actually use it.
if (!is_running_)
return true;
// When the test is done, ask the test server spawner to kill the test server
// on the remote machine.
std::string server_return_data;
int result_code;
SendCommandAndWaitForResult("kill", "", &result_code, &server_return_data);
Shutdown();
if (OK != result_code || server_return_data != "killed")
return false;
return true;
}
} // namespace net
|
{
"content_hash": "12573a3ffe1b43f8722c096a0588e45c",
"timestamp": "",
"source": "github",
"line_count": 358,
"max_line_length": 79,
"avg_line_length": 31.81564245810056,
"alnum_prop": 0.6687445127304653,
"repo_name": "Workday/OpenFrame",
"id": "0962143bfe136d2e4d7103a1263a9e03c9cde7f5",
"size": "12191",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "net/test/spawned_test_server/spawner_communicator.cc",
"mode": "33188",
"license": "bsd-3-clause",
"language": []
}
|
package com.google.api.client.util;
import com.google.common.collect.ImmutableMap;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.AbstractList;
import java.util.AbstractMap;
import java.util.AbstractQueue;
import java.util.AbstractSet;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Date;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.SortedMap;
import java.util.SortedSet;
import java.util.TreeMap;
import java.util.TreeSet;
import java.util.concurrent.ConcurrentMap;
import junit.framework.TestCase;
/**
* Tests {@link Data}.
*
* @author Yaniv Inbar
*/
public class DataTest extends TestCase {
public void testNullOf() {
assertEquals("java.lang.Object", Data.nullOf(Object.class).getClass().getName());
assertEquals("java.lang.String", Data.nullOf(String.class).getClass().getName());
assertEquals("java.lang.Integer", Data.nullOf(Integer.class).getClass().getName());
assertEquals("[[[[Ljava.lang.String;", Data.nullOf(String[][][][].class).getClass().getName());
assertEquals("[[[I", Data.nullOf(int[][][].class).getClass().getName());
assertNotNull(Data.nullOf(Object.class));
assertEquals(Data.<Object>nullOf(Object.class), Data.<Object>nullOf(Object.class));
assertFalse(Data.nullOf(String.class).equals(Data.nullOf(Object.class)));
try {
Data.nullOf(int.class);
fail("expected " + IllegalArgumentException.class);
} catch (IllegalArgumentException e) {
}
try {
Data.nullOf(List.class);
fail("expected " + IllegalArgumentException.class);
} catch (IllegalArgumentException e) {
}
}
public void testNullOfTemplateTypes() {
String nullValue = Data.nullOf(String.class);
Map<String, String> nullField = ImmutableMap.of("v", nullValue);
assertEquals(nullValue, nullField.get("v"));
}
public void testIsNull() {
assertTrue(Data.isNull(Data.NULL_BOOLEAN));
assertTrue(Data.isNull(Data.NULL_STRING));
assertTrue(Data.isNull(Data.NULL_CHARACTER));
assertTrue(Data.isNull(Data.NULL_BYTE));
assertTrue(Data.isNull(Data.NULL_SHORT));
assertTrue(Data.isNull(Data.NULL_INTEGER));
assertTrue(Data.isNull(Data.NULL_LONG));
assertTrue(Data.isNull(Data.NULL_FLOAT));
assertTrue(Data.isNull(Data.NULL_DOUBLE));
assertTrue(Data.isNull(Data.NULL_BIG_INTEGER));
assertTrue(Data.isNull(Data.NULL_BIG_DECIMAL));
assertTrue(Data.isNull(Data.NULL_DATE_TIME));
assertFalse(Data.isNull(null));
assertFalse(Data.isNull(""));
assertFalse(Data.isNull(false));
assertFalse(Data.isNull(true));
assertFalse(Data.isNull((byte) 0));
assertFalse(Data.isNull((short) 0));
assertFalse(Data.isNull(0));
assertFalse(Data.isNull(0L));
assertFalse(Data.isNull((float) 0));
assertFalse(Data.isNull((double) 0));
assertFalse(Data.isNull(BigDecimal.ZERO));
assertFalse(Data.isNull(BigInteger.ZERO));
}
public void testClone_array() {
String[] orig = new String[] {"a", "b", "c"};
String[] result = Data.clone(orig);
assertTrue(orig != result);
assertTrue(Arrays.equals(orig, result));
}
public void testClone_intArray() {
int[] orig = new int[] {1, 2, 3};
int[] result = Data.clone(orig);
assertTrue(orig != result);
assertTrue(Arrays.equals(orig, result));
}
public void testClone_arrayMap() {
ArrayMap<String, Integer> map = ArrayMap.of();
map.add("a", 1);
assertEquals(map, Data.clone(map));
}
public void testClone_ArraysAsList() {
{
List<Object> orig = Arrays.<Object>asList("a", "b", "c", new ArrayList<Object>());
List<Object> result = Data.clone(orig);
assertTrue(orig != result);
assertEquals(orig, result);
assertTrue(orig.get(3) != result.get(3));
}
{
List<String> orig = Arrays.asList(new String[] {"a", "b", "c"});
List<String> result = Data.clone(orig);
assertTrue(orig != result);
assertEquals(orig, result);
}
}
public void testNewCollectionInstance() throws Exception {
assertEquals(ArrayList.class, Data.newCollectionInstance(null).getClass());
assertEquals(ArrayList.class, Data.newCollectionInstance(String[].class).getClass());
assertEquals(ArrayList.class, Data.newCollectionInstance(Object.class).getClass());
assertEquals(ArrayList.class, Data.newCollectionInstance(List.class).getClass());
assertEquals(ArrayList.class, Data.newCollectionInstance(AbstractList.class).getClass());
assertEquals(ArrayList.class, Data.newCollectionInstance(ArrayList.class).getClass());
assertEquals(LinkedList.class, Data.newCollectionInstance(LinkedList.class).getClass());
assertEquals(HashSet.class, Data.newCollectionInstance(Set.class).getClass());
assertEquals(HashSet.class, Data.newCollectionInstance(AbstractSet.class).getClass());
assertEquals(HashSet.class, Data.newCollectionInstance(HashSet.class).getClass());
assertEquals(TreeSet.class, Data.newCollectionInstance(SortedSet.class).getClass());
assertEquals(TreeSet.class, Data.newCollectionInstance(TreeSet.class).getClass());
try {
Data.newMapInstance(AbstractQueue.class);
fail("expected " + IllegalArgumentException.class);
} catch (IllegalArgumentException e) {
// expected
}
try {
Data.newMapInstance(String.class);
fail("expected " + ClassCastException.class);
} catch (ClassCastException e) {
// expected
}
TypeVariable<?> tTypeVar = (TypeVariable<?>) Resolve.class.getField("t").getGenericType();
try {
assertNull(Data.newCollectionInstance(tTypeVar));
fail("expected " + IllegalArgumentException.class);
} catch (IllegalArgumentException e) {
// expected
}
}
public void testNewMapInstance() {
assertEquals(ArrayMap.class, Data.newMapInstance(Object.class).getClass());
assertEquals(ArrayMap.class, Data.newMapInstance(Map.class).getClass());
assertEquals(ArrayMap.class, Data.newMapInstance(Cloneable.class).getClass());
assertEquals(ArrayMap.class, Data.newMapInstance(AbstractMap.class).getClass());
assertEquals(ArrayMap.class, Data.newMapInstance(ArrayMap.class).getClass());
assertEquals(TreeMap.class, Data.newMapInstance(SortedMap.class).getClass());
assertEquals(TreeMap.class, Data.newMapInstance(TreeMap.class).getClass());
assertEquals(HashMap.class, Data.newMapInstance(HashMap.class).getClass());
try {
Data.newMapInstance(ConcurrentMap.class);
fail("expected " + IllegalArgumentException.class);
} catch (IllegalArgumentException e) {
// expected
}
try {
Data.newMapInstance(String.class);
fail("expected " + ClassCastException.class);
} catch (ClassCastException e) {
// expected
}
}
public void testIsPrimitive() {
assertFalse(Data.isPrimitive(null));
assertTrue(Data.isPrimitive(int.class));
assertTrue(Data.isPrimitive(Integer.class));
}
public void testParsePrimitiveValue() {
assertNull(Data.parsePrimitiveValue(Boolean.class, null));
assertEquals("abc", Data.parsePrimitiveValue(null, "abc"));
assertEquals("abc", Data.parsePrimitiveValue(String.class, "abc"));
assertEquals("abc", Data.parsePrimitiveValue(Object.class, "abc"));
assertEquals('a', Data.parsePrimitiveValue(Character.class, "a"));
assertEquals(true, Data.parsePrimitiveValue(boolean.class, "true"));
assertEquals(true, Data.parsePrimitiveValue(Boolean.class, "true"));
assertEquals(
new Byte(Byte.MAX_VALUE),
Data.parsePrimitiveValue(Byte.class, String.valueOf(Byte.MAX_VALUE)));
assertEquals(
new Byte(Byte.MAX_VALUE),
Data.parsePrimitiveValue(byte.class, String.valueOf(Byte.MAX_VALUE)));
assertEquals(
new Short(Short.MAX_VALUE),
Data.parsePrimitiveValue(Short.class, String.valueOf(Short.MAX_VALUE)));
assertEquals(
new Short(Short.MAX_VALUE),
Data.parsePrimitiveValue(short.class, String.valueOf(Short.MAX_VALUE)));
assertEquals(
new Integer(Integer.MAX_VALUE),
Data.parsePrimitiveValue(Integer.class, String.valueOf(Integer.MAX_VALUE)));
assertEquals(
new Integer(Integer.MAX_VALUE),
Data.parsePrimitiveValue(int.class, String.valueOf(Integer.MAX_VALUE)));
assertEquals(
new Long(Long.MAX_VALUE),
Data.parsePrimitiveValue(Long.class, String.valueOf(Long.MAX_VALUE)));
assertEquals(
new Long(Long.MAX_VALUE),
Data.parsePrimitiveValue(long.class, String.valueOf(Long.MAX_VALUE)));
assertEquals(
new Float(Float.MAX_VALUE),
Data.parsePrimitiveValue(Float.class, String.valueOf(Float.MAX_VALUE)));
assertEquals(
new Float(Float.MAX_VALUE),
Data.parsePrimitiveValue(float.class, String.valueOf(Float.MAX_VALUE)));
assertEquals(
new Double(Double.MAX_VALUE),
Data.parsePrimitiveValue(Double.class, String.valueOf(Double.MAX_VALUE)));
assertEquals(
new Double(Double.MAX_VALUE),
Data.parsePrimitiveValue(double.class, String.valueOf(Double.MAX_VALUE)));
BigInteger bigint = BigInteger.valueOf(Long.MAX_VALUE);
assertEquals(
bigint, Data.parsePrimitiveValue(BigInteger.class, String.valueOf(Long.MAX_VALUE)));
BigDecimal bigdec = BigDecimal.valueOf(Double.MAX_VALUE);
assertEquals(
bigdec, Data.parsePrimitiveValue(BigDecimal.class, String.valueOf(Double.MAX_VALUE)));
DateTime now = new DateTime(new Date());
assertEquals(now, Data.parsePrimitiveValue(DateTime.class, now.toStringRfc3339()));
try {
Data.parsePrimitiveValue(char.class, "abc");
fail();
} catch (IllegalArgumentException e) {
// expected
}
assertNull(Data.parsePrimitiveValue(Void.class, "abc"));
assertNull(Data.parsePrimitiveValue(Enum.class, null));
}
private enum MyEnum {
A("a");
private final String s;
MyEnum(String s) {
this.s = s;
}
}
public void testParsePrimitiveValueWithUnknownEnum() {
try {
Data.parsePrimitiveValue(MyEnum.class, "foo");
fail("expected " + IllegalArgumentException.class);
} catch (IllegalArgumentException e) {
// expected
}
}
static class Resolve<X, T extends Number> {
public T t;
public X x;
}
static class IntegerResolve extends Resolve<Boolean, Integer> {}
static class MedResolve<T extends Number> extends Resolve<Boolean, T> {}
static class DoubleResolve extends MedResolve<Double> {}
static class Med2Resolve<T extends Number> extends MedResolve<T> {}
static class LongResolve extends Med2Resolve<Long> {}
static class ArrayResolve extends Resolve<Boolean[], Integer> {}
static class ParameterizedResolve extends Resolve<Collection<Integer>, Integer> {}
static class MedXResolve<Y extends Number, X extends Y> extends Resolve<X, Integer> {}
public void testResolveWildcardTypeOrTypeVariable() throws Exception {
// t
TypeVariable<?> tTypeVar = (TypeVariable<?>) Resolve.class.getField("t").getGenericType();
assertEquals(Number.class, resolveWildcardTypeOrTypeVariable(Object.class, tTypeVar));
assertEquals(Number.class, resolveWildcardTypeOrTypeVariable(Resolve.class, tTypeVar));
assertEquals(Integer.class, resolveWildcardTypeOrTypeVariable(IntegerResolve.class, tTypeVar));
assertEquals(Long.class, resolveWildcardTypeOrTypeVariable(LongResolve.class, tTypeVar));
assertEquals(Double.class, resolveWildcardTypeOrTypeVariable(DoubleResolve.class, tTypeVar));
// partially resolved
assertEquals(Number.class, resolveWildcardTypeOrTypeVariable(MedResolve.class, tTypeVar));
// x
TypeVariable<?> xTypeVar = (TypeVariable<?>) Resolve.class.getField("x").getGenericType();
assertEquals(Object.class, resolveWildcardTypeOrTypeVariable(Object.class, xTypeVar));
assertEquals(
Boolean.class,
Types.getArrayComponentType(
resolveWildcardTypeOrTypeVariable(ArrayResolve.class, xTypeVar)));
assertEquals(
Collection.class,
Types.getRawClass(
(ParameterizedType)
resolveWildcardTypeOrTypeVariable(ParameterizedResolve.class, xTypeVar)));
assertEquals(Number.class, resolveWildcardTypeOrTypeVariable(MedXResolve.class, xTypeVar));
}
private static Type resolveWildcardTypeOrTypeVariable(
Type context, TypeVariable<?> typeVariable) {
return Data.resolveWildcardTypeOrTypeVariable(Arrays.asList(context), typeVariable);
}
}
|
{
"content_hash": "9c98379d05ccc3d01cccdad26a5bd65b",
"timestamp": "",
"source": "github",
"line_count": 323,
"max_line_length": 99,
"avg_line_length": 39.538699690402474,
"alnum_prop": 0.711377339284316,
"repo_name": "googleapis/google-http-java-client",
"id": "5cce2816a0d6a4972b51944b09897096b3934a75",
"size": "13359",
"binary": false,
"copies": "1",
"ref": "refs/heads/main",
"path": "google-http-client/src/test/java/com/google/api/client/util/DataTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Batchfile",
"bytes": "801"
},
{
"name": "HTML",
"bytes": "769"
},
{
"name": "Java",
"bytes": "1588457"
},
{
"name": "Python",
"bytes": "952"
},
{
"name": "Shell",
"bytes": "25995"
}
]
}
|
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"><title>CloseDatabase</title></head>
<body bgcolor="#EFF1F0" link="#3A3966" vlink="#000000" alink="#000000">
<font face="Verdana, sans-serif" size="2"><p align="center"><b><font size="4">CloseDatabase()</font></b></p>
<p><b>语法</b></p><blockquote>
<font color="#3A3966"><b>CloseDatabase</b></font>(#Database)</blockquote>
</blockquote>
<b>概要</b><br><blockquote>
Close the specified #Database (and connections/transactions if any). No further operations
are allowed on this database.
</blockquote><p><b>参数</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>#Database</i></td>
<td width="90%">
The database to close. If <font color="#924B72">#PB_All</font> is specified, all remaining databases are closed.
</td></tr>
</table>
</blockquote><p><b>返回值</b></p><blockquote>
无.
</blockquote><p><b>备注</b></p><blockquote>
All remaining opened databases are automatically closed when the program ends.
</blockquote><p><b>参阅</b></p><blockquote>
<a href="opendatabase.html">OpenDatabase()</a>, <a href="opendatabaserequester.html">OpenDatabaseRequester()</a>
</Blockquote><p><b>已支持操作系统 </b><Blockquote>所有</Blockquote></p><center><- <a href=checkdatabasenull.html>CheckDatabaseNull()</a> - <a href="index.html">Database Index</a> - <a href="databasecolumnindex.html">DatabaseColumnIndex()</a> -><br><br>
</body></html>
|
{
"content_hash": "63ef1598213c10e3e193f0329baf3570",
"timestamp": "",
"source": "github",
"line_count": 51,
"max_line_length": 249,
"avg_line_length": 33.96078431372549,
"alnum_prop": 0.6916859122401847,
"repo_name": "PureBasicCN/PureBasicPreference",
"id": "2be010b4ce598f6abb9441992021c1fd5f42d20a",
"size": "1778",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "target_dir/documentation/database/closedatabase.html",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "HTML",
"bytes": "13068252"
}
]
}
|
package org.lable.oss.uniqueid;
import org.junit.Test;
import org.lable.oss.uniqueid.bytes.Mode;
public class LocalUniqueIDGeneratorFactoryTest {
@Test(expected = IllegalArgumentException.class)
public void outOfBoundsGeneratorIDTest() {
LocalUniqueIDGeneratorFactory.generatorFor(2048, 0, Mode.SPREAD);
}
@Test(expected = IllegalArgumentException.class)
public void outOfBoundsClusterIDTest() {
LocalUniqueIDGeneratorFactory.generatorFor(0, 16, Mode.SPREAD);
}
@Test(expected = IllegalArgumentException.class)
public void outOfBoundsGeneratorIDNegativeTest() {
LocalUniqueIDGeneratorFactory.generatorFor(-1, 0, Mode.SPREAD);
}
@Test(expected = IllegalArgumentException.class)
public void outOfBoundsClusterIDNegativeTest() {
LocalUniqueIDGeneratorFactory.generatorFor(0, -1, Mode.SPREAD);
}
}
|
{
"content_hash": "81f9411fbfc0c8b3010d13a74398c2be",
"timestamp": "",
"source": "github",
"line_count": 28,
"max_line_length": 73,
"avg_line_length": 31.428571428571427,
"alnum_prop": 0.7477272727272727,
"repo_name": "LableOrg/java-uniqueid",
"id": "5262e995b166eef052ded4b7f3edafbf7ec9eb12",
"size": "1492",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "uniqueid-core/src/test/java/org/lable/oss/uniqueid/LocalUniqueIDGeneratorFactoryTest.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "237546"
}
]
}
|
<?php
/* AcmeDemoBundle::layout.html.twig */
class __TwigTemplate_85d0470112f20fab5ab548d530a65c3e extends Twig_Template
{
public function __construct(Twig_Environment $env)
{
parent::__construct($env);
$this->parent = $this->env->loadTemplate("TwigBundle::layoutBackend.html.twig");
$this->blocks = array(
'head' => array($this, 'block_head'),
'title' => array($this, 'block_title'),
'body' => array($this, 'block_body'),
'content_header' => array($this, 'block_content_header'),
'content_header_more' => array($this, 'block_content_header_more'),
'content' => array($this, 'block_content'),
);
}
protected function doGetParent(array $context)
{
return "TwigBundle::layoutBackend.html.twig";
}
protected function doDisplay(array $context, array $blocks = array())
{
$this->parent->display($context, array_merge($this->blocks, $blocks));
}
// line 3
public function block_head($context, array $blocks = array())
{
// line 4
echo " <link rel=\"icon\" sizes=\"16x16\" href=\"";
echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("favicon.ico"), "html", null, true);
echo "\" />
<link rel=\"stylesheet\" href=\"";
// line 5
echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/acmedemo/css/demo.css"), "html", null, true);
echo "\" />
";
}
// line 8
public function block_title($context, array $blocks = array())
{
echo "Llibreria22";
}
// line 10
public function block_body($context, array $blocks = array())
{
// line 11
echo " ";
$context['_parent'] = (array) $context;
$context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getAttribute($this->getAttribute((isset($context["app"]) ? $context["app"] : $this->getContext($context, "app")), "session"), "flashbag"), "get", array(0 => "notice"), "method"));
foreach ($context['_seq'] as $context["_key"] => $context["flashMessage"]) {
// line 12
echo " <div class=\"flash-message\">
<em>Notice</em>: ";
// line 13
echo twig_escape_filter($this->env, (isset($context["flashMessage"]) ? $context["flashMessage"] : $this->getContext($context, "flashMessage")), "html", null, true);
echo "
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['flashMessage'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo "
";
// line 17
$this->displayBlock('content_header', $context, $blocks);
// line 26
echo "
<div class=\"block\">
";
// line 28
$this->displayBlock('content', $context, $blocks);
// line 29
echo " </div>
";
// line 31
if (array_key_exists("code", $context)) {
// line 32
echo " <h2>Code behind this page</h2>
<div class=\"block\">
<div class=\"symfony-content\">";
// line 34
echo (isset($context["code"]) ? $context["code"] : $this->getContext($context, "code"));
echo "</div>
</div>
";
}
}
// line 17
public function block_content_header($context, array $blocks = array())
{
// line 18
echo " <ul id=\"menu\">
";
// line 19
$this->displayBlock('content_header_more', $context, $blocks);
// line 22
echo " </ul>
<div style=\"clear: both\"></div>
";
}
// line 19
public function block_content_header_more($context, array $blocks = array())
{
// line 20
echo " <li><a href=\"";
echo $this->env->getExtension('routing')->getPath("_demo");
echo "\">Demo Home</a></li>
";
}
// line 28
public function block_content($context, array $blocks = array())
{
}
public function getTemplateName()
{
return "AcmeDemoBundle::layout.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 127 => 28, 120 => 20, 117 => 19, 110 => 22, 108 => 19, 105 => 18, 102 => 17, 94 => 34, 90 => 32, 88 => 31, 84 => 29, 82 => 28, 78 => 26, 76 => 17, 73 => 16, 64 => 13, 61 => 12, 53 => 10, 36 => 4, 33 => 3, 56 => 11, 50 => 14, 47 => 8, 41 => 5, 39 => 10, 31 => 4, 28 => 3,);
}
}
|
{
"content_hash": "775fb8f14384fca953bddf50bc08340b",
"timestamp": "",
"source": "github",
"line_count": 145,
"max_line_length": 322,
"avg_line_length": 33.39310344827586,
"alnum_prop": 0.5142503097893433,
"repo_name": "kimy82/llibreria",
"id": "22236fd196e523ce93caf6fc338ad4efa4b5746f",
"size": "4842",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/cache/dev/twig/85/d0/470112f20fab5ab548d530a65c3e.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "11432"
},
{
"name": "CSS",
"bytes": "89238"
},
{
"name": "ColdFusion",
"bytes": "4950"
},
{
"name": "JavaScript",
"bytes": "450180"
},
{
"name": "PHP",
"bytes": "1091647"
}
]
}
|
<?php
namespace AutoMapperPlus\MappingOperation;
use AutoMapperPlus\PropertyAccessor\PropertyAccessorInterface;
use AutoMapperPlus\PropertyAccessor\PropertyReaderInterface;
class DefaultMappingOperationChild extends DefaultMappingOperation {
/**
* @var PropertyAccessorInterface
*/
private $propertyAccessor;
public function __construct(PropertyAccessorInterface $propertyAccessor)
{
$this->propertyAccessor = $propertyAccessor;
}
protected function getPropertyReader(): PropertyReaderInterface
{
return $this->propertyAccessor;
}
};
|
{
"content_hash": "b811b3493130d13dcaf864d3971f58a0",
"timestamp": "",
"source": "github",
"line_count": 24,
"max_line_length": 76,
"avg_line_length": 24.916666666666668,
"alnum_prop": 0.7575250836120402,
"repo_name": "mark-gerarts/automapper-plus",
"id": "27c3d0971283770c65e95450f7a8de6bae58e1c9",
"size": "598",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "test/MappingOperation/DefaultMappingOperationChild.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "PHP",
"bytes": "203757"
}
]
}
|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NHibernate.Mapping.Attributes;
using Iesi.Collections.Generic;
namespace DbModel
{
[Class(Table = "combine_geometry")]
public class CombineGeometry
{
[Id(0, TypeType = typeof(int))]
[Key(1)]
[Generator(2, Class = "native")]
public virtual int ID { get; set; }
[SetRawXml(After = typeof(IdAttribute), Id = "combine_geometry_id", Name = "Meshs", Type = typeof(Mesh))]
public virtual ISet<Mesh> Meshs { get; set; }
[SetRawXml(After = typeof(IdAttribute), Id = "combine_geometry_id", Name = "Shells", Type = typeof(Shell))]
public virtual ISet<Shell> Shells { get; set; }
[SetRawXml(After = typeof(IdAttribute), Id = "combine_geometry_id", Name = "Polygons", Type = typeof(Polygon))]
public virtual ISet<Polygon> Polygons { get; set; }
[Property(Column = "color")]
public virtual int Color { get; set; }
}
}
|
{
"content_hash": "631f275f61de15199933a90dcc0db6f5",
"timestamp": "",
"source": "github",
"line_count": 30,
"max_line_length": 113,
"avg_line_length": 31,
"alnum_prop": 0.6903225806451613,
"repo_name": "icedream2linxi/PDMS_ExportModel",
"id": "898294e597677a316c7329c791a5b4fef3121546",
"size": "932",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "DbModel/CombineGeometry.cs",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "C",
"bytes": "6232062"
},
{
"name": "C#",
"bytes": "100291"
},
{
"name": "C++",
"bytes": "1859477"
},
{
"name": "Objective-C",
"bytes": "956"
}
]
}
|
({
dir: "build",
mainConfigFile: 'public/modules/config.js',
//A function that will be called for every write to an optimized bundle
//of modules. This allows transforms of the content before serialization.
// Overwrite the moduleName on optimized js to excute the module on load the js.
onBuildWrite: function(moduleName, path, contents) {
return contents.replace(/define\(\'\w+\/module\'\,/g, 'define(');
}
})
|
{
"content_hash": "e87a0a7543380feace243ffed43e2c5a",
"timestamp": "",
"source": "github",
"line_count": 10,
"max_line_length": 84,
"avg_line_length": 44.7,
"alnum_prop": 0.6845637583892618,
"repo_name": "gsaini/angular-lazyload",
"id": "306f1991122f35e4937b19f90655420b31d446ae",
"size": "447",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "build.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "1411"
},
{
"name": "JavaScript",
"bytes": "1009706"
}
]
}
|
BlackLib library is wrote for controlling Beaglebone Black's feature. It takes power from C++ language. It is created for reading analog input, generating pwm signal, using gpio pins, and communicating with other devices over uart, spi and i2c. In addition to them, it includes debugging feature. So you can check errors after call any function in the library.
--------------------------------------------------------------------------------
## Debugging
It always tracks member functions errors and records these errors to data structures. All end nodes which interact with end users, have overloaded fail() functions. So you can check all errors or specific error whichever you want.
--------------------------------------------------------------------------------
## Class Hierarchy
### Library Core
BlackLib includes BlackCore class for doing core process. End users can't access to it. Because it is abstract class and all member functions, except constructor and destructor, are private or protected.
### Sub Level Cores
BlackLib includes sub level cores for GPIO, ADC and PWM features. Preparing stages are realized in here, at sub level cores. Therefore, if you don't like end nodes or you don't want to use these, you can derive your own class(es), from these sub level cores. But end nodes designed for taking care of your all need.
### End Node Classes
End node classes are designed for interacting with end user. You can read, set or control Beaglebone Black's ADC, GPIO or PWM features or you can communicate with other devices with using UART, SPI or I2C protocol, from these classes. These classes include primary functions like read or set properties of Beaglebone Black's features and include additional functions like ADC parser, gpio pin toggle etc. to make easier your life.
--------------------------------------------------------------------------------
## Definitions
BlackLib includes enum type definitions for your and Beaglebone Black's safety. GPIO, ADC, PWM, UART, SPI, I2C names; PWM, GPIO values; GPIO directions and a lot more features defined with enums. It means you can't call some member functions without use this enums. These enums avoid user errors like write 345 to gpio export file instead of 34.
--------------------------------------------------------------------------------
## Contact
For any comment or suggestion please contact the creator of BlackLib Library at contact[at]blacklib.yigityuce.com
--------------------------------------------------------------------------------
http://blacklib.yigityuce.com
|
{
"content_hash": "bbc75665b9e75dfdfe42c96c34a6dcaa",
"timestamp": "",
"source": "github",
"line_count": 39,
"max_line_length": 430,
"avg_line_length": 66.05128205128206,
"alnum_prop": 0.6653726708074534,
"repo_name": "conwill708/Mobot_EPCA",
"id": "36a56e272e9ff48030475630004ac03e1c61152c",
"size": "2580",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/BlackLib/README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "2301"
},
{
"name": "C++",
"bytes": "401644"
},
{
"name": "Makefile",
"bytes": "1155"
},
{
"name": "Python",
"bytes": "1533"
},
{
"name": "Shell",
"bytes": "1284"
}
]
}
|
* Use `Dir.tmpdir` instead of explicit `/tmp`.
[Boris Bügling](https://github.com/neonichu)
[#34](https://github.com/CocoaPods/cocoapods-try/pull/34)
* Automatically detect JSON podspecs.
[Samuel Giddins](https://github.com/segiddins)
[#35](https://github.com/CocoaPods/cocoapods-try/issues/35)
## 0.4.4
##### Bug Fixes
* Fix working with the CocoaPods download cache introduced in 0.37.
[Samuel Giddins](https://github.com/)
[#30](https://github.com/CocoaPods/cocoapods-try/issues/30)
## 0.4.3
##### Bug Fixes
* Ensure that the master repo is setup on try.
[Daniel Tomlinson](https://github.com/DanielTomlinson)
[CocoaPods/CocoaPods#2563](https://github.com/CocoaPods/CocoaPods/pull/2563)
## 0.4.2
* Prefer projects or workspaces with the name including Sample over others.
[Kyle Fuller](https://github.com/kylef)
## 0.4.1
* Add `--no-repo-update` option.
[Eloy Durán](https://github.com/alloy)
## 0.4.0
### Enhancements
* Adopted new argument format of CLAide.
[Olivier Halligon](https://github.com/AliSoftware)
## 0.3.0
### Enhancements
* Adopted new CLAide release.
[Fabio Pelosin](https://github.com/irrationalfab)
## 0.2.0
### Enhancements
* Added support for the specification of an URL instead of the name of a Pod.
[David Grandinetti](https://github.com/dbgrandi)
[Fabio Pelosin](https://github.com/irrationalfab)
## 0.1.2
### Enhancements
* Prefer workspaces over projects.
[Kyle Fuller](https://github.com/kylef)
* Open workspaces if available.
[Kyle Fuller](https://github.com/kylef)
### Fixes
* Don't consider workspaces in bundles.
[Eloy Durán](https://github.com/alloy)
* Typo fixes.
[Mark Townsend](https://github.com/markltownsend)
## 0.1.0
* Initial implementation.
[Fabio Pelosin](https://github.com/fabiopelosin)
|
{
"content_hash": "c74ebd2b27efd9d735c1671bd51e031c",
"timestamp": "",
"source": "github",
"line_count": 80,
"max_line_length": 79,
"avg_line_length": 22.875,
"alnum_prop": 0.6950819672131148,
"repo_name": "esttorhe/SlackTeamExplorer",
"id": "24ad567e91c521c2e222919d4b681074b9452c0e",
"size": "1888",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "SlackTeamExplorer/vendor/bundle/ruby/2.1.0/gems/cocoapods-try-0.4.5/CHANGELOG.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "C",
"bytes": "63140"
},
{
"name": "C++",
"bytes": "698"
},
{
"name": "DTrace",
"bytes": "412"
},
{
"name": "Makefile",
"bytes": "324"
},
{
"name": "Objective-C",
"bytes": "765101"
},
{
"name": "Ruby",
"bytes": "2474"
},
{
"name": "Shell",
"bytes": "36781"
},
{
"name": "Swift",
"bytes": "290616"
}
]
}
|
import _pyndn
import utils
from utils import Const
from Name import Name
from SignedInfo import SignedInfo
from Signature import Signature
class Data (object):
def __init__ (self, name = None, content = None, signed_info = None):
if isinstance (name, Name):
self.name = name
else:
self.name = Name (name)
self.content = content
self.signedInfo = signed_info or SignedInfo ()
# generated
self.signature = None
# this is the finalization step
# must pass a key here, there is no "default key" because
# an NDN Face is not required to create the content object
# thus there is no access to the ndn library keystore.
#
def sign(self, key):
self.ndn_data = _pyndn.encode_Data (self,
self.name.ndn_data,
self.content,
self.signedInfo.ndn_data, key)
@staticmethod
def fromWire (wire):
return _pyndn.Data_obj_from_ndn_buffer (wire)
def toWire (self):
"""
Convert Data packet to wire format
Note that packet MUST be signed (or has been created from wire) before this call can succeed
"""
return _pyndn.dump_charbuf (self.ndn_data)
def __setattr__(self, name, value):
if name != "ndn_data":
object.__setattr__ (self, 'ndn_data', None)
if name == 'content':
object.__setattr__(self, name, _pyndn.content_to_bytes (value))
else:
object.__setattr__(self, name, value)
object.__setattr__ (self, name, value)
def __getattribute__(self, name):
if name == "ndn_data":
if not object.__getattribute__ (self, 'ndn_data'):
object.__setattr__ (self, 'ndn_data', _pyndn.Interest_obj_to_ndn (self))
# elif name == "exclude":
# return Exclude.ConstExclude (object.__getattribute__ (self, name))
return object.__getattribute__ (self, name)
def __getattribute__(self, name):
if name == "ndn_data":
if not object.__getattribute__ (self, "ndn_data"):
raise DataException ("Wire requested before Data packet is signed (use 'sign' call with appropriate key)")
elif name == "name" or name == "signedInfo":
return Const (object.__getattribute__ (self, name))
return object.__getattribute__(self, name)
def digest(self):
return _pyndn.digest_contentobject(self.ndn_data)
def verify_content(self, handle):
return _pyndn.verify_content(handle.ndn_data, self.ndn_data)
def verify_signature(self, key):
return _pyndn.verify_signature(self.ndn_data, key.ndn_data_public)
def matchesInterest(self, interest):
return _pyndn.content_matches_interest(self.ndn_data, interest.ndn_data)
# Where do we support versioning and segmentation?
def __str__(self):
ret = []
ret.append("Name: %s" % self.name)
ret.append("Content: %r" % self.content)
ret.append("SignedInfo: %s" % self.signedInfo)
ret.append("Signature: %s" % self.signature)
return "\n".join(ret)
def __repr__(self):
args = []
if self.name is not None:
args += ["name=%r" % self.name]
if self.content is not None:
args += ["content=%r" % self.content]
if self.signedInfo is not None:
args += ["signed_info=%r" % self.signedInfo]
if self.signature is not None:
args += ["<signed>"]
return "ndn.Data(%s)" % ", ".join(args)
class DataException (Exception):
pass
|
{
"content_hash": "6602d83b7098fc9cf7985bb30fc642e8",
"timestamp": "",
"source": "github",
"line_count": 115,
"max_line_length": 122,
"avg_line_length": 32.63478260869565,
"alnum_prop": 0.5678124167332801,
"repo_name": "cawka/packaging-PyNDN-dev",
"id": "b281e55f4e9bf118a623ff82e35a1879a9c41d46",
"size": "4057",
"binary": false,
"copies": "1",
"ref": "refs/heads/ubuntu/precise",
"path": "python/ndn/Data.py",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "C",
"bytes": "187338"
},
{
"name": "C++",
"bytes": "8531"
},
{
"name": "Python",
"bytes": "145586"
},
{
"name": "Shell",
"bytes": "54"
}
]
}
|
package com.amazonaws.services.workdocs.model;
import javax.annotation.Generated;
/**
* <p>
* The storage limit will be exceeded.
* </p>
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class StorageLimitWillExceedException extends com.amazonaws.services.workdocs.model.AmazonWorkDocsException {
private static final long serialVersionUID = 1L;
/**
* Constructs a new StorageLimitWillExceedException with the specified error message.
*
* @param message
* Describes the error encountered.
*/
public StorageLimitWillExceedException(String message) {
super(message);
}
}
|
{
"content_hash": "eb200058e8e246e49c59667034e58d2f",
"timestamp": "",
"source": "github",
"line_count": 25,
"max_line_length": 116,
"avg_line_length": 26,
"alnum_prop": 0.7153846153846154,
"repo_name": "aws/aws-sdk-java",
"id": "9ab75e7e311123994b5eb8c6315fd8732591d2eb",
"size": "1230",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "aws-java-sdk-workdocs/src/main/java/com/amazonaws/services/workdocs/model/StorageLimitWillExceedException.java",
"mode": "33188",
"license": "apache-2.0",
"language": []
}
|
package me.yokeyword.indexablerv;
import com.github.promeg.pinyinhelper.Pinyin;
import java.util.regex.Pattern;
/**
* Created by YoKey on 16/3/20.
*/
public class PinyinUtil {
private static final String PATTERN_POLYPHONE = "^#[a-zA-Z]+#.+";
private static final String PATTERN_LETTER = "^[a-zA-Z].*+";
/**
* Chinese character -> Pinyin
*/
public static String getPingYin(String inputString) {
char[] input = inputString.trim().toCharArray();
String output = "";
for (int i = 0; i < input.length; i++) {
output += Pinyin.toPinyin(input[i]);
}
return output.toLowerCase();
}
/**
* Are start with a letter
* @return if return false, index should be #
*/
static boolean matchingLetter(String inputString) {
return Pattern.matches(PATTERN_LETTER, inputString);
}
static boolean matchingPolyphone(String inputString) {
return Pattern.matches(PATTERN_POLYPHONE, inputString);
}
static String gePolyphoneInitial(String inputString) {
return inputString.substring(1, 2);
}
static String getPolyphoneRealPinyin(String inputString) {
String[] splits = inputString.split("#");
return splits[1];
}
static String getPolyphoneRealHanzi(String inputString) {
String[] splits = inputString.split("#");
return splits[2];
}
}
|
{
"content_hash": "536d893de45519c77a11297b8b4887a9",
"timestamp": "",
"source": "github",
"line_count": 51,
"max_line_length": 69,
"avg_line_length": 27.764705882352942,
"alnum_prop": 0.632768361581921,
"repo_name": "garyhu1/collapselrecycler",
"id": "7301921f20ad9471e0c645b4decfb6471832936b",
"size": "1416",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "indexablerecyclerview/src/main/java/me/yokeyword/indexablerv/PinyinUtil.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "663189"
}
]
}
|
"""Tag class for TVM operators."""
import warnings
from ._ffi.base import decorate
class TagScope(object):
"""Tag scope object to set tag for operators, working as context
manager and decorator both. See also tag_scope.
"""
_current = None
@classmethod
def get_current(cls):
if cls._current:
cls._current.accessed = True
return cls._current
def __init__(self, tag):
self._old_scope = None
self.tag = tag
self.accessed = False
def __enter__(self):
if TagScope._current is not None:
raise ValueError("nested op_tag is not allowed for now")
self._old_scope = TagScope._current
TagScope._current = self
return self
def __exit__(self, ptype, value, trace):
assert self._old_scope is None
if not self.accessed:
warnings.warn("Tag '%s' declared via TagScope was not used." % (self.tag,))
TagScope._current = self._old_scope
def __call__(self, fdecl):
def tagged_fdecl(func, *args, **kwargs):
with self:
return func(*args, **kwargs)
return decorate(fdecl, tagged_fdecl)
def tag_scope(tag):
"""The operator tag scope.
Parameters
----------
tag: str
The tag name.
Returns
-------
tag_scope: TagScope
The tag scope object, which can be used as decorator or
context manger.
Example
-------
.. code-block:: python
n = tvm.var('n')
m = tvm.var('m')
l = tvm.var('l')
A = tvm.placeholder((n, l), name='A')
B = tvm.placeholder((m, l), name='B')
k = tvm.reduce_axis((0, l), name='k')
with tvm.tag_scope(tag='matmul'):
C = tvm.compute((n, m), lambda i, j: tvm.sum(A[i, k] * B[j, k], axis=k))
# or use tag_scope as decorator
@tvm.tag_scope(tag="conv")
def compute_relu(data):
return tvm.compute(data.shape, lambda *i: tvm.select(data(*i) < 0, 0.0, data(*i)))
"""
return TagScope(tag)
|
{
"content_hash": "e9e10c058cc9e5ae570e4b6cceb7ff65",
"timestamp": "",
"source": "github",
"line_count": 75,
"max_line_length": 94,
"avg_line_length": 27.6,
"alnum_prop": 0.5521739130434783,
"repo_name": "mlperf/training_results_v0.6",
"id": "de9f8403de2aa3179d7f4f3275f95795f18758d5",
"size": "2070",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/tvm/python/tvm/tag.py",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "ANTLR",
"bytes": "1731"
},
{
"name": "Batchfile",
"bytes": "13941"
},
{
"name": "C",
"bytes": "208630"
},
{
"name": "C++",
"bytes": "10999411"
},
{
"name": "CMake",
"bytes": "129712"
},
{
"name": "CSS",
"bytes": "64767"
},
{
"name": "Clojure",
"bytes": "396764"
},
{
"name": "Cuda",
"bytes": "2272433"
},
{
"name": "Dockerfile",
"bytes": "67820"
},
{
"name": "Groovy",
"bytes": "62557"
},
{
"name": "HTML",
"bytes": "19753082"
},
{
"name": "Java",
"bytes": "166294"
},
{
"name": "JavaScript",
"bytes": "71846"
},
{
"name": "Julia",
"bytes": "408765"
},
{
"name": "Jupyter Notebook",
"bytes": "2713169"
},
{
"name": "Lua",
"bytes": "4430"
},
{
"name": "MATLAB",
"bytes": "34903"
},
{
"name": "Makefile",
"bytes": "115694"
},
{
"name": "Perl",
"bytes": "1535873"
},
{
"name": "Perl 6",
"bytes": "7280"
},
{
"name": "PowerShell",
"bytes": "6150"
},
{
"name": "Python",
"bytes": "24905683"
},
{
"name": "R",
"bytes": "351865"
},
{
"name": "Roff",
"bytes": "293052"
},
{
"name": "Scala",
"bytes": "1189019"
},
{
"name": "Shell",
"bytes": "794096"
},
{
"name": "Smalltalk",
"bytes": "3497"
},
{
"name": "TypeScript",
"bytes": "361164"
}
]
}
|
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal"
android:id="@+id/linearLayoutParent" >
<!--ImageView
android:id="@+id/icon"
android:layout_width="90dp"
android:layout_height="90dp" /-->
<usbong.android.community.SquareImageView
android:id="@+id/icon"
android:layout_width="90dp"
android:layout_height="90dp"
android:scaleType="centerCrop" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:id="@+id/linearLayoutchild" >
<TextView
android:id="@+id/fileName"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="2dp"
android:textSize="20sp"
android:textColor="@android:color/black"
android:text="Testing" />
<Button
android:id="@+id/overflow"
android:layout_width="30dp"
android:layout_height="30dp"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_alignParentStart="false"
android:layout_alignParentLeft="false"
android:scaleType="fitEnd"
android:background="@drawable/overflow_selector" />
</RelativeLayout>
<TextView
android:id="@+id/uploadername"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/linearLayoutchild"
android:textSize="15sp"
android:padding="2dp"
android:textColor="#404041"/>
<TextView
android:id="@+id/downloadCount"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/uploadername"
android:layout_alignLeft="@+id/uploadername"
android:textColor="@android:color/black"
android:padding="2dp"
android:textSize="15sp" />
</RelativeLayout>
</LinearLayout>
|
{
"content_hash": "e015451ddb162b7353be4fd49c53def2",
"timestamp": "",
"source": "github",
"line_count": 68,
"max_line_length": 72,
"avg_line_length": 35.11764705882353,
"alnum_prop": 0.6314907872696818,
"repo_name": "usbong/usbong_pagtsing",
"id": "114459e05927d591d6790ccf1a3ae41f8a922552",
"size": "2388",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "res/layout/listview_item.xml",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "407336"
}
]
}
|
<!-- front-matter
id: javascript-and-gulpfiles
title: JavaScript and Gulpfiles
hide_title: true
sidebar_label: JavaScript and Gulpfiles
-->
# JavaScript and Gulpfiles
Gulp allows you to use existing JavaScript knowledge to write gulpfiles or to use your experience with gulpfiles to write plain JavaScript. Although a few utilities are provided to simplify working with the filesystem and command line, everything else you write is pure JavaScript.
## Gulpfile explained
A gulpfile is a file in your project directory titled `gulpfile.js` (or capitalized as `Gulpfile.js`, like Makefile), that automatically loads when you run the `gulp` command. Within this file, you'll often see gulp APIs, like `src()`, `dest()`, `series()`, or `parallel()` but any vanilla JavaScript or Node modules can be used. Any exported functions will be registered into gulp's task system.
## Transpilation
You can write a gulpfile using a language that requires transpilation, like TypeScript or Babel, by changing the extension on your `gulpfile.js` to indicate the language and install the matching transpiler module.
* For TypeScript, rename to `gulpfile.ts` and install the [ts-node][ts-node-module] module.
* For Babel, rename to `gulpfile.babel.js` and install the [@babel/register][babel-register-module] module.
__Most new versions of node support most features that TypeScript or Babel provide, except the `import`/`export` syntax. When only that syntax is desired, rename to `gulpfile.esm.js` and install the [esm][esm-module] module.__
For a more advanced dive into this topic and the full list of supported extensions, see our [gulpfile transpilation][gulpfile-transpilation-advanced] documentation.
## Splitting a gulpfile
Many users start by adding all logic to a gulpfile. If it ever grows too big, it can be refactored into separate files.
Each task can be split into its own file, then imported into your gulpfile for composition. Not only does this keep things organized, but it allows you to test each task independently or vary composition based on conditions.
Node's module resolution allows you to replace your `gulpfile.js` file with a directory named `gulpfile.js` that contains an `index.js` file which is treated as a `gulpfile.js`. This directory could then contain your individual modules for tasks. If you are using a transpiler, name the folder and file accordingly.
[gulpfile-transpilation-advanced]: ../documentation-missing.md
[ts-node-module]: https://www.npmjs.com/package/ts-node
[babel-register-module]: https://www.npmjs.com/package/@babel/register
[esm-module]: https://www.npmjs.com/package/esm
|
{
"content_hash": "df9679c01f261e6b091344cdea48ca53",
"timestamp": "",
"source": "github",
"line_count": 38,
"max_line_length": 396,
"avg_line_length": 69.21052631578948,
"alnum_prop": 0.7832699619771863,
"repo_name": "sttk/gulp",
"id": "a15fad112b58f5f6335afc1d699821545346a1d7",
"size": "2630",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "docs/getting-started/2-javascript-and-gulpfiles.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "JavaScript",
"bytes": "17347"
}
]
}
|
You will need to symlink the libraries/ directory to your project.
The libraries/ folder should contain a symlink to your copy of the
Atmel Software Framework (such as asf-3.21.0/).
Symlink the boards/femtobeacon/ folder to make it available as
libraries/<your asf folder>/sam0/boards/femtobeacon/
Finally, grab a checkout of the Femto.io "MPU9250" library from git at
https://github.com/femtoio/MPU9250, and symlink it to the
libraries/<your asf folder>/thirdparty/ folder, resulting in a directory
that looks like this:
libraries/<your asf folder/thirdparty/MPU9250
...Eclipse C++ with the GNU ARM Eclipse plugin should compile your project
just fine now.
|
{
"content_hash": "6c2082f09b113ee31390a77832d57c0b",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 75,
"avg_line_length": 39.35294117647059,
"alnum_prop": 0.7802690582959642,
"repo_name": "femtoio/femto-beacon",
"id": "9951e7f6022248cd592de32c5060fdc0c2ccfa53",
"size": "669",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "examples/sam-r21-imu/README.md",
"mode": "33188",
"license": "mit",
"language": []
}
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>dom4j - 1.6.1</title>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../style.css" TITLE="Style">
</head>
<body>
<TABLE cellspacing="0" cellpadding="2"><TBODY>
<!-- C:\ Projects\ dom4j_1.x_branch\ dom4j\ src\ java\ org\ dom4j\ tree\ AbstractDocumentType.java -->
<TR>
<TD colspan="6" class="reportHeader">
<TABLE width="100%"><TR>
<TD valign="top" class="titleText">Clover coverage report - dom4j - 1.6.1 <DIV class="timestamp"><b>Coverage timestamp:</b> ma mei 16 2005 14:23:01 GMT+01:00</DIV>
<DIV class="navBar"><a href="../../../pkgs-summary.html"><b>Overview</b></a> <a href="pkg-summary.html"><b>Package</b></a> <font class="navBarCurrent">File</font></DIV>
<DIV class="navBarLink">
<A HREF="../../../index.html" TARGET="_top">FRAMES</A>
<A HREF="AbstractDocumentType.html" TARGET="_top">NO FRAMES</A>
</DIV>
</TD>
<td class="headerStats" valign="top" width="40%" align="right">
<table align="right">
<tr>
<td nowrap><b>file stats:</b></td>
<td align="right"><b>LOC:</b></td>
<td align="right">203</td>
<td width="10%"> </td>
<td align="right"><b>Methods:</b></td>
<td align="right">11</td>
</tr>
<tr>
<td></td>
<td align="right"><b>NCLOC:</b></td>
<td align="right">107</td>
<td width="10%"> </td>
<td align="right"><b>Classes:</b></td>
<td align="right">1</td>
</tr>
</table>
</td>
</TR></TABLE>
</TD>
</TR>
<TR><TD class="hbreak" colspan="6"> </TD></TR>
<TR>
<TD class="graphHeaderLeft"><b> Source file</b></TD>
<TD class="graphHeader">Conditionals</TD>
<TD class="graphHeader">Statements</TD>
<TD class="graphHeader">Methods</TD>
<TD class="graphHeader" align="left" colspan="2"><B>TOTAL</B></TD>
</TR>
<TR>
<TD class="graphItem">
AbstractDocumentType.java
</TD>
<TD class="graphPercent" align="center">40,9%</TD>
<TD class="graphPercent" align="center">52,4%</TD>
<TD class="graphPercent" align="center">54,5%</TD>
<TD class="graphBarLeft" align="center"><B>50%</B></TD>
<TD class="graphBar">
<TABLE class="barGraph" cellspacing="0">
<TBODY>
<TR>
<TD class="covered"><img alt="coverage" src="../../../img/trans.gif"
width="100" height="12"></TD>
<TD class="uncovered"><img alt="coverage" src="../../../img/trans.gif"
width="100" height="12"></TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
</TBODY></TABLE><TABLE cellspacing="0" cellpadding="0" class="srcView"><TBODY>
<TR><TD align="right" class="lineCount">
1</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"></span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
7</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCount">
8</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="keyword">package</span> org.dom4j.tree;</SPAN></TD></TR><TR><TD align="right" class="lineCount">
9</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCount">
10</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="keyword">import</span> java.io.IOException;</SPAN></TD></TR><TR><TD align="right" class="lineCount">
11</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="keyword">import</span> java.io.Writer;</SPAN></TD></TR><TR><TD align="right" class="lineCount">
12</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="keyword">import</span> java.util.Iterator;</SPAN></TD></TR><TR><TD align="right" class="lineCount">
13</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="keyword">import</span> java.util.List;</SPAN></TD></TR><TR><TD align="right" class="lineCount">
14</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCount">
15</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="keyword">import</span> org.dom4j.DocumentType;</SPAN></TD></TR><TR><TD align="right" class="lineCount">
16</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="keyword">import</span> org.dom4j.Element;</SPAN></TD></TR><TR><TD align="right" class="lineCount">
17</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="keyword">import</span> org.dom4j.Visitor;</SPAN></TD></TR><TR><TD align="right" class="lineCount">
18</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCount">
19</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment">/**</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
20</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * <p></span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
21</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * <code>AbstractDocumentType</code> is an abstract base class for tree</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
22</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * implementors to use for implementation inheritence.</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
23</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * </p></span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
24</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * </span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
25</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * <span class="javadoc">@author</span> <a href="mailto:james.strachan@metastuff.com">James Strachan </a></span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
26</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * <span class="javadoc">@version</span> $Revision: 1.17 $</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
27</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> */</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
<A name="AbstractDocumentType"> 28</A></TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="keyword">public</span> abstract <span class="keyword">class</span> AbstractDocumentType <span class="keyword">extends</span> AbstractNode <span class="keyword">implements</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
29</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> DocumentType {</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
30</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 30: method entered 14 times."> 14</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 30: method entered 14 times."> <span class="keyword">public</span> AbstractDocumentType() {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
31</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
32</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
33</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 33: method entered 1 time."> 1</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 33: method entered 1 time."> <span class="keyword">public</span> <span class="keyword">short</span> getNodeType() {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
34</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 34: statement executed 1 time."> 1</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 34: statement executed 1 time."> <span class="keyword">return</span> DOCUMENT_TYPE_NODE;</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
35</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
36</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
37</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 37: method entered 2 times."> 2</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 37: method entered 2 times."> <span class="keyword">public</span> String getName() {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
38</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 38: statement executed 2 times."> 2</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 38: statement executed 2 times."> <span class="keyword">return</span> getElementName();</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
39</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
40</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
41</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 41: method not entered."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 41: method not entered."> <span class="keyword">public</span> <span class="keyword">void</span> setName(String name) {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
42</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 42: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 42: statement not executed."> setElementName(name);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
43</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
44</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
45</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 45: method not entered."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 45: method not entered."> <span class="keyword">public</span> String getPath(Element context) {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
46</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> <span class="comment">// not available in XPath</span></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
47</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 47: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 47: statement not executed."> <span class="keyword">return</span> <span class="string">""</span>;</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
48</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
49</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
50</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 50: method not entered."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 50: method not entered."> <span class="keyword">public</span> String getUniquePath(Element context) {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
51</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> <span class="comment">// not available in XPath</span></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
52</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 52: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 52: statement not executed."> <span class="keyword">return</span> <span class="string">""</span>;</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
53</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
54</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCount">
55</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> <span class="comment">/**</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
56</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * Returns the text format of the declarations if applicable, or the empty</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
57</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * String</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
58</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * </span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
59</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * <span class="javadoc">@return</span> DOCUMENT ME!</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
60</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> */</span></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
61</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 61: method not entered."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 61: method not entered."> <span class="keyword">public</span> String getText() {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
62</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 62: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 62: statement not executed."> List list = getInternalDeclarations();</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
63</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
64</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 64: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 64: statement not executed."> <span class="keyword">if</span> ((list != <span class="keyword">null</span>) && (list.size() > 0)) {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
65</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 65: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 65: statement not executed."> StringBuffer buffer = <span class="keyword">new</span> StringBuffer();</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
66</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 66: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 66: statement not executed."> Iterator iter = list.iterator();</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
67</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
68</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 68: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 68: statement not executed."> <span class="keyword">if</span> (iter.hasNext()) {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
69</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 69: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 69: statement not executed."> Object decl = iter.next();</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
70</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 70: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 70: statement not executed."> buffer.append(decl.toString());</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
71</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
72</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 72: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 72: statement not executed."> <span class="keyword">while</span> (iter.hasNext()) {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
73</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 73: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 73: statement not executed."> decl = iter.next();</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
74</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 74: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 74: statement not executed."> buffer.append(<span class="string">"\n"</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
75</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 75: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 75: statement not executed."> buffer.append(decl.toString());</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
76</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
77</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
78</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
79</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 79: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 79: statement not executed."> <span class="keyword">return</span> buffer.toString();</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
80</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
81</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
82</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 82: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 82: statement not executed."> <span class="keyword">return</span> <span class="string">""</span>;</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
83</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
84</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
85</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 85: method entered 6 times."> 6</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 85: method entered 6 times."> <span class="keyword">public</span> String toString() {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
86</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 86: statement executed 6 times."> 6</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 86: statement executed 6 times."> <span class="keyword">return</span> <span class="keyword">super</span>.toString() + <span class="string">" [DocumentType: "</span> + asXML() + <span class="string">"]"</span>;</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
87</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
88</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
89</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 89: method entered 6 times."> 6</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 89: method entered 6 times."> <span class="keyword">public</span> String asXML() {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
90</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 90: statement executed 6 times."> 6</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 90: statement executed 6 times."> StringBuffer buffer = <span class="keyword">new</span> StringBuffer(<span class="string">"<!DOCTYPE "</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
91</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 91: statement executed 6 times."> 6</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 91: statement executed 6 times."> buffer.append(getElementName());</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
92</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
93</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 93: statement executed 6 times."> 6</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 93: statement executed 6 times."> <span class="keyword">boolean</span> hasPublicID = <span class="keyword">false</span>;</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
94</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 94: statement executed 6 times."> 6</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 94: statement executed 6 times."> String publicID = getPublicID();</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
95</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
96</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 96: expression evaluated to true 0 times, false 6 times."> 6</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 96: expression evaluated to true 0 times, false 6 times."> <span class="keyword">if</span> ((publicID != <span class="keyword">null</span>) && (publicID.length() > 0)) {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
97</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 97: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 97: statement not executed."> buffer.append(<span class="string">" PUBLIC \""</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
98</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 98: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 98: statement not executed."> buffer.append(publicID);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
99</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 99: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 99: statement not executed."> buffer.append(<span class="string">"\""</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
100</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 100: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 100: statement not executed."> hasPublicID = <span class="keyword">true</span>;</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
101</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
102</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
103</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 103: statement executed 6 times."> 6</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 103: statement executed 6 times."> String systemID = getSystemID();</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
104</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
105</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 105: statement executed 6 times."> 6</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 105: statement executed 6 times."> <span class="keyword">if</span> ((systemID != <span class="keyword">null</span>) && (systemID.length() > 0)) {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
106</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 106: expression evaluated to true 4 times, false 0 times."> 4</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 106: expression evaluated to true 4 times, false 0 times."> <span class="keyword">if</span> (!hasPublicID) {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
107</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 107: statement executed 4 times."> 4</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 107: statement executed 4 times."> buffer.append(<span class="string">" SYSTEM"</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
108</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
109</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
110</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 110: statement executed 4 times."> 4</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 110: statement executed 4 times."> buffer.append(<span class="string">" \""</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
111</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 111: statement executed 4 times."> 4</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 111: statement executed 4 times."> buffer.append(systemID);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
112</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 112: statement executed 4 times."> 4</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 112: statement executed 4 times."> buffer.append(<span class="string">"\""</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
113</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
114</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
115</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 115: statement executed 6 times."> 6</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 115: statement executed 6 times."> buffer.append(<span class="string">">"</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
116</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
117</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 117: statement executed 6 times."> 6</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 117: statement executed 6 times."> <span class="keyword">return</span> buffer.toString();</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
118</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
119</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
120</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 120: method entered 1 time."> 1</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 120: method entered 1 time."> <span class="keyword">public</span> <span class="keyword">void</span> write(Writer writer) <span class="keyword">throws</span> IOException {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
121</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 121: statement executed 1 time."> 1</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 121: statement executed 1 time."> writer.write(<span class="string">"<!DOCTYPE "</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
122</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 122: statement executed 1 time."> 1</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 122: statement executed 1 time."> writer.write(getElementName());</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
123</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
124</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 124: statement executed 1 time."> 1</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 124: statement executed 1 time."> <span class="keyword">boolean</span> hasPublicID = <span class="keyword">false</span>;</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
125</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 125: statement executed 1 time."> 1</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 125: statement executed 1 time."> String publicID = getPublicID();</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
126</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
127</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 127: expression evaluated to true 0 times, false 1 time."> 1</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 127: expression evaluated to true 0 times, false 1 time."> <span class="keyword">if</span> ((publicID != <span class="keyword">null</span>) && (publicID.length() > 0)) {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
128</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 128: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 128: statement not executed."> writer.write(<span class="string">" PUBLIC \""</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
129</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 129: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 129: statement not executed."> writer.write(publicID);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
130</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 130: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 130: statement not executed."> writer.write(<span class="string">"\""</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
131</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 131: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 131: statement not executed."> hasPublicID = <span class="keyword">true</span>;</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
132</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
133</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
134</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 134: statement executed 1 time."> 1</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 134: statement executed 1 time."> String systemID = getSystemID();</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
135</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
136</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 136: expression evaluated to true 0 times, false 1 time."> 1</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 136: expression evaluated to true 0 times, false 1 time."> <span class="keyword">if</span> ((systemID != <span class="keyword">null</span>) && (systemID.length() > 0)) {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
137</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 137: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 137: statement not executed."> <span class="keyword">if</span> (!hasPublicID) {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
138</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 138: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 138: statement not executed."> writer.write(<span class="string">" SYSTEM"</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
139</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
140</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
141</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 141: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 141: statement not executed."> writer.write(<span class="string">" \""</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
142</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 142: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 142: statement not executed."> writer.write(systemID);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
143</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 143: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 143: statement not executed."> writer.write(<span class="string">"\""</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
144</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
145</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
146</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 146: statement executed 1 time."> 1</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 146: statement executed 1 time."> List list = getInternalDeclarations();</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
147</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
148</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 148: expression evaluated to true 1 time, false 0 times."> 1</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 148: expression evaluated to true 1 time, false 0 times."> <span class="keyword">if</span> ((list != <span class="keyword">null</span>) && (list.size() > 0)) {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
149</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 149: statement executed 1 time."> 1</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 149: statement executed 1 time."> writer.write(<span class="string">" ["</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
150</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
151</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 151: statement executed 1 time."> 1</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 151: statement executed 1 time."> <span class="keyword">for</span> (Iterator iter = list.iterator(); iter.hasNext();) {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
152</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 152: statement executed 10 times."> 10</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 152: statement executed 10 times."> Object decl = iter.next();</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
153</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 153: statement executed 10 times."> 10</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 153: statement executed 10 times."> writer.write(<span class="string">"\n "</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
154</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 154: statement executed 10 times."> 10</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 154: statement executed 10 times."> writer.write(decl.toString());</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
155</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
156</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
157</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 157: statement executed 1 time."> 1</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 157: statement executed 1 time."> writer.write(<span class="string">"\n]"</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
158</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
159</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
160</TD>
<TD align="right" class="lineCountHilight">
<A title="Line 160: statement executed 1 time."> 1</A>
</TD><TD class="srcCell"><SPAN class="srcLine"><A title="Line 160: statement executed 1 time."> writer.write(<span class="string">">"</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
161</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
162</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
163</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 163: method not entered."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 163: method not entered."> <span class="keyword">public</span> <span class="keyword">void</span> accept(Visitor visitor) {</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCountHilight">
164</TD>
<TD align="right" class="coverageCountHilight">
<A title="Line 164: statement not executed."> 0</A>
</TD><TD class="srcCell"><SPAN class="srcLineHilight"><A title="Line 164: statement not executed."> visitor.visit(<span class="keyword">this</span>);</A>
</SPAN></TD></TR><TR><TD align="right" class="lineCount">
165</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"> }</SPAN></TD></TR><TR><TD align="right" class="lineCount">
166</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine">}</SPAN></TD></TR><TR><TD align="right" class="lineCount">
167</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"></SPAN></TD></TR><TR><TD align="right" class="lineCount">
168</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment">/*</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
169</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * Redistribution and use of this software and associated documentation</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
170</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * ("Software"), with or without modification, are permitted provided that the</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
171</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * following conditions are met:</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
172</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * </span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
173</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * 1. Redistributions of source code must retain copyright statements and</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
174</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * notices. Redistributions must also contain a copy of this document.</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
175</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * </span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
176</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * 2. Redistributions in binary form must reproduce the above copyright notice,</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
177</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * this list of conditions and the following disclaimer in the documentation</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
178</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * and/or other materials provided with the distribution.</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
179</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * </span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
180</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * 3. The name "DOM4J" must not be used to endorse or promote products derived</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
181</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * from this Software without prior written permission of MetaStuff, Ltd. For</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
182</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * written permission, please contact dom4j-info@metastuff.com.</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
183</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * </span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
184</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * 4. Products derived from this Software may not be called "DOM4J" nor may</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
185</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * "DOM4J" appear in their names without prior written permission of MetaStuff,</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
186</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * Ltd. DOM4J is a registered trademark of MetaStuff, Ltd.</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
187</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * </span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
188</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * 5. Due credit should be given to the DOM4J Project - http://www.dom4j.org</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
189</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * </span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
190</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * THIS SOFTWARE IS PROVIDED BY METASTUFF, LTD. AND CONTRIBUTORS ``AS IS'' AND</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
191</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
192</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
193</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * ARE DISCLAIMED. IN NO EVENT SHALL METASTUFF, LTD. OR ITS CONTRIBUTORS BE</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
194</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
195</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
196</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
197</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
198</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
199</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
200</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * POSSIBILITY OF SUCH DAMAGE.</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
201</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * </span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
202</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> * Copyright 2001-2005 (C) MetaStuff, Ltd. All Rights Reserved.</span></SPAN></TD></TR><TR><TD align="right" class="lineCount">
203</TD>
<TD align="right" class="coverageCount">
</TD><TD class="srcCell"><SPAN class="srcLine"><span class="comment"> */</span></SPAN></TD></TR></TBODY></TABLE>
<TABLE width="100%"><TR><TD class="hbreak" colspan="6"> </TD></TR>
<TR><TD class="footer" colspan="6">
<table>
<tr>
<td><a target="_new" href="http://www.cenqua.com/clover"><img alt="Clover" src="../../../img/logo.gif" border="0"></a></td><td nowrap><i>Report generated by </i><a target="_new" href="http://www.cenqua.com/clover">Clover Code Coverage v1.3.5</a><i><BR>ma mei 16 2005 14:23:02 GMT+01:00</i>.</td>
<td> </td><td style="BORDER-LEFT: #9c9c9c 1px solid;"> </td><td>Open Source License registered to the dom4j Project. This license of Clover is provided to support the development of dom4j only. </td>
</tr>
</table>
</td>
</tr></TABLE>
|
{
"content_hash": "05ffdc0ac73f51546d0a21e419baa092",
"timestamp": "",
"source": "github",
"line_count": 955,
"max_line_length": 296,
"avg_line_length": 60.23141361256545,
"alnum_prop": 0.6519705846560386,
"repo_name": "teslaworksumn/lightshow-visualizer",
"id": "a6268c4446d530399ae9cef42cd8ba252ef71c16",
"size": "58695",
"binary": false,
"copies": "2",
"ref": "refs/heads/master",
"path": "lib/dom4j-1.6.1/docs/clover/org/dom4j/tree/AbstractDocumentType.html",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "30882"
},
{
"name": "HTML",
"bytes": "32645056"
},
{
"name": "Java",
"bytes": "2249039"
},
{
"name": "XSLT",
"bytes": "7439"
}
]
}
|
using AlisonVogel.Web.App_Start;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Web.Optimization;
using System.Web.Routing;
namespace AlisonVogel.Web
{
public class MvcApplication : System.Web.HttpApplication
{
protected void Application_Start()
{
AreaRegistration.RegisterAllAreas();
RouteConfig.RegisterRoutes(RouteTable.Routes);
BundleConfig.RegisterBundles(BundleTable.Bundles);
}
}
}
|
{
"content_hash": "14892b19142f1820870c0d5775558b11",
"timestamp": "",
"source": "github",
"line_count": 21,
"max_line_length": 62,
"avg_line_length": 25.523809523809526,
"alnum_prop": 0.707089552238806,
"repo_name": "alisonvogel12/personalsite",
"id": "dab0503eb1911426e65bb46f26973e8b390f55b2",
"size": "538",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "AlisonVogel.Web/Global.asax.cs",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "ASP",
"bytes": "1143"
},
{
"name": "C#",
"bytes": "16021"
},
{
"name": "CSS",
"bytes": "1717"
},
{
"name": "HTML",
"bytes": "973"
}
]
}
|
package org.knowm.xchange.bitcoinde.dto.account;
import java.math.BigDecimal;
import java.util.HashMap;
import java.util.Map;
import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"available_amount",
"reserved_amount",
"total_amount"
})
public class BitcoindeBalance {
@JsonProperty("available_amount")
private BigDecimal availableAmount;
@JsonProperty("reserved_amount")
private BigDecimal reservedAmount;
@JsonProperty("total_amount")
private BigDecimal totalAmount;
@JsonIgnore
private Map<String, Object> additionalProperties = new HashMap<String, Object>();
/**
* No args constructor for use in serialization
*
*/
public BitcoindeBalance() {
}
/**
*
* @param availableAmount
* @param reservedAmount
* @param totalAmount
*/
public BitcoindeBalance(BigDecimal availableAmount, BigDecimal reservedAmount, BigDecimal totalAmount) {
super();
this.availableAmount = availableAmount;
this.reservedAmount = reservedAmount;
this.totalAmount = totalAmount;
}
@JsonProperty("available_amount")
public BigDecimal getAvailableAmount() {
return availableAmount;
}
@JsonProperty("available_amount")
public void setAvailableAmount(BigDecimal availableAmount) {
this.availableAmount = availableAmount;
}
@JsonProperty("reserved_amount")
public BigDecimal getReservedAmount() {
return reservedAmount;
}
@JsonProperty("reserved_amount")
public void setReservedAmount(BigDecimal reservedAmount) {
this.reservedAmount = reservedAmount;
}
@JsonProperty("total_amount")
public BigDecimal getTotalAmount() {
return totalAmount;
}
@JsonProperty("total_amount")
public void setTotalAmount(BigDecimal totalAmount) {
this.totalAmount = totalAmount;
}
@JsonAnyGetter
public Map<String, Object> getAdditionalProperties() {
return this.additionalProperties;
}
@JsonAnySetter
public void setAdditionalProperty(String name, Object value) {
this.additionalProperties.put(name, value);
}
}
|
{
"content_hash": "dd000c5a2bd03daa4631eb74db063059",
"timestamp": "",
"source": "github",
"line_count": 92,
"max_line_length": 108,
"avg_line_length": 27.347826086956523,
"alnum_prop": 0.7114467408585056,
"repo_name": "evdubs/XChange",
"id": "cf6fcb2c69af7e477ebc3f9722fc71fa23be6792",
"size": "2516",
"binary": false,
"copies": "1",
"ref": "refs/heads/develop",
"path": "xchange-bitcoinde/src/main/java/org/knowm/xchange/bitcoinde/dto/account/BitcoindeBalance.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "5220592"
}
]
}
|
'use strict';
/**
* Module dependencies.
*/
var mongoose = require('mongoose'),
<%= classifiedSingularName %> = mongoose.model('<%= classifiedSingularName %>'),
_ = require('lodash');
/**
* Get the error message from error object
*/
var getErrorMessage = function(err) {
var message = '';
if (err.code) {
switch (err.code) {
case 11000:
case 11001:
message = '<%= humanizedSingularName %> already exists';
break;
default:
message = 'Something went wrong';
}
} else {
for (var errName in err.errors) {
if (err.errors[errName].message) message = err.errors[errName].message;
}
}
return message;
};
/**
* Create a <%= humanizedSingularName %>
*/
exports.create = function(req, res) {
var <%= camelizedSingularName %> = new <%= classifiedSingularName %>(req.body);
<%= camelizedSingularName %>.user = req.user;
<%= camelizedSingularName %>.save(function(err) {
if (err) {
return res.send(400, {
message: getErrorMessage(err)
});
} else {
res.jsonp(<%= camelizedSingularName %>);
}
});
};
/**
* Show the current <%= humanizedSingularName %>
*/
exports.read = function(req, res) {
res.jsonp(req.<%= camelizedSingularName %>);
};
/**
* Update a <%= humanizedSingularName %>
*/
exports.update = function(req, res) {
var <%= camelizedSingularName %> = req.<%= camelizedSingularName %>;
<%= camelizedSingularName %> = _.extend(<%= camelizedSingularName %>, req.body);
<%= camelizedSingularName %>.save(function(err) {
if (err) {
return res.send(400, {
message: getErrorMessage(err)
});
} else {
res.jsonp(<%= camelizedSingularName %>);
}
});
};
/**
* Delete an <%= humanizedSingularName %>
*/
exports.delete = function(req, res) {
var <%= camelizedSingularName %> = req.<%= camelizedSingularName %>;
<%= camelizedSingularName %>.remove(function(err) {
if (err) {
return res.send(400, {
message: getErrorMessage(err)
});
} else {
res.jsonp(<%= camelizedSingularName %>);
}
});
};
/**
* List of <%= humanizedPluralName %>
*/
exports.list = function(req, res) {
<%= classifiedSingularName %>.find().sort('-created').populate('user', 'displayName').exec(function(err, <%= camelizedPluralName %>) {
if (err) {
return res.send(400, {
message: getErrorMessage(err)
});
} else {
res.jsonp(<%= camelizedPluralName %>);
}
});
};
/**
* <%= humanizedSingularName %> middleware
*/
exports.<%= camelizedSingularName %>ByID = function(req, res, next, id) {
<%= classifiedSingularName %>.findById(id).populate('user', 'displayName').exec(function(err, <%= camelizedSingularName %>) {
if (err) return next(err);
if (!<%= camelizedSingularName %>) return next(new Error('Failed to load <%= humanizedSingularName %> ' + id));
req.<%= camelizedSingularName %> = <%= camelizedSingularName %>;
next();
});
};
/**
* <%= humanizedSingularName %> authorization middleware
*/
exports.hasAuthorization = function(req, res, next) {
if (req.<%= camelizedSingularName %>.user.id !== req.user.id) {
return res.send(403, 'User is not authorized');
}
next();
};
|
{
"content_hash": "dfda8dd036a248e89f254aa5096714df",
"timestamp": "",
"source": "github",
"line_count": 130,
"max_line_length": 135,
"avg_line_length": 23.807692307692307,
"alnum_prop": 0.6319870759289176,
"repo_name": "arvindr21/slush-meanjs",
"id": "7af1df0ddce02c7354ae7757cacd6ec5d95953f6",
"size": "3095",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "templates/crud-module/express-module/app/controllers/_.server.controller.js",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "CSS",
"bytes": "407"
},
{
"name": "JavaScript",
"bytes": "109906"
},
{
"name": "Perl",
"bytes": "48"
}
]
}
|
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'}
DOCUMENTATION = """
---
module: cp_mgmt_application_site_category_facts
short_description: Get application-site-category objects facts on Check Point over Web Services API
description:
- Get application-site-category objects facts on Check Point devices.
- All operations are performed over Web Services API.
- This module handles both operations, get a specific object and get several objects,
For getting a specific object use the parameter 'name'.
version_added: "2.9"
author: "Or Soffer (@chkp-orso)"
options:
name:
description:
- Object name.
This parameter is relevant only for getting a specific object.
type: str
details_level:
description:
- The level of detail for some of the fields in the response can vary from showing only the UID value of the object to a fully detailed
representation of the object.
type: str
choices: ['uid', 'standard', 'full']
limit:
description:
- No more than that many results will be returned.
This parameter is relevant only for getting few objects.
type: int
offset:
description:
- Skip that many results before beginning to return them.
This parameter is relevant only for getting few objects.
type: int
order:
description:
- Sorts results by the given field. By default the results are sorted in the ascending order by name.
This parameter is relevant only for getting few objects.
type: list
suboptions:
ASC:
description:
- Sorts results by the given field in ascending order.
type: str
choices: ['name']
DESC:
description:
- Sorts results by the given field in descending order.
type: str
choices: ['name']
extends_documentation_fragment: checkpoint_facts
"""
EXAMPLES = """
- name: show-application-site-category
cp_mgmt_application_site_category_facts:
name: Social Networking
- name: show-application-site-categories
cp_mgmt_application_site_category_facts:
details_level: standard
limit: 50
offset: 0
"""
RETURN = """
ansible_facts:
description: The checkpoint object facts.
returned: always.
type: dict
"""
from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.checkpoint.checkpoint import checkpoint_argument_spec_for_facts, api_call_facts
def main():
argument_spec = dict(
name=dict(type='str'),
details_level=dict(type='str', choices=['uid', 'standard', 'full']),
limit=dict(type='int'),
offset=dict(type='int'),
order=dict(type='list', options=dict(
ASC=dict(type='str', choices=['name']),
DESC=dict(type='str', choices=['name'])
))
)
argument_spec.update(checkpoint_argument_spec_for_facts)
module = AnsibleModule(argument_spec=argument_spec)
api_call_object = "application-site-category"
api_call_object_plural_version = "application-site-categories"
result = api_call_facts(module, api_call_object, api_call_object_plural_version)
module.exit_json(ansible_facts=result)
if __name__ == '__main__':
main()
|
{
"content_hash": "12caee084473e3ab8666662011a3847d",
"timestamp": "",
"source": "github",
"line_count": 107,
"max_line_length": 141,
"avg_line_length": 31.654205607476637,
"alnum_prop": 0.6722763507528786,
"repo_name": "thaim/ansible",
"id": "b6d37ddd9ce5d95aca3866ac11fab35c1138cec2",
"size": "4112",
"binary": false,
"copies": "19",
"ref": "refs/heads/fix-broken-link",
"path": "lib/ansible/modules/network/check_point/cp_mgmt_application_site_category_facts.py",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "7"
},
{
"name": "Shell",
"bytes": "246"
}
]
}
|
<?php
class Series
{
/**
* The the digits to test
*
* @var string
*/
private $digitSequence;
/**
* The length of digits
*
* @var int
*/
private $sequenceLength;
/**
* Series constructor.
*
* @param string $digits
*/
public function __construct($digits)
{
$this->validateSequence($digits);
$this->digitSequence = $digits;
$this->sequenceLength = strlen($digits);
}
/**
* Return the largest product from the series of digits
*
* @param int $span
* @return int
*/
public function largestProduct($span) : int
{
if (0 == $span) {
return 1;
}
$this->validateSpan($span);
return $this->largestSeriesProduct($span);
}
/**
* Make sure the span is valid
*
* @param int $span
* @throws InvalidArgumentException
*/
private function validateSpan($span) : void
{
if ($span < 0) {
throw new InvalidArgumentException(sprintf(
'$span must be greater than or equal to 0. [%s] was given',
$span
));
}
if ($span > $this->sequenceLength) {
throw new InvalidArgumentException(sprintf(
'$span can not be greater than the length of the sequence. $span:[%s], sequenceLength:[%s]',
$span,
$this->sequenceLength
));
}
}
/**
* Returns the largest product of a string of digits of length $span
*
* @param int $span
* @return int
*/
private function largestSeriesProduct($span) : int
{
$products = [];
for ($start = 0; $start <= $this->sequenceLength - $span; $start++) {
$products[] = $this->multiplyStringSection(substr($this->digitSequence, $start, $span));
}
return max($products);
}
/**
* Multiplies a numerical string section
*
* @param string $stringSection
* @return int
*/
private function multiplyStringSection($stringSection) : int
{
return array_product(str_split($stringSection));
}
/**
* Validate the given sequence
*
* @param $digits
* @throws InvalidArgumentException
*/
private function validateSequence($digits) : void
{
if (! empty($digits) && ! is_numeric($digits)) {
throw new InvalidArgumentException(sprintf(
"Must supply a non-empty, numeric only sequence. [%s] was given",
$digits
));
}
}
}
|
{
"content_hash": "67931f6d7315572b139299dadf3b878e",
"timestamp": "",
"source": "github",
"line_count": 114,
"max_line_length": 108,
"avg_line_length": 23.219298245614034,
"alnum_prop": 0.5228560634680771,
"repo_name": "camilopayan/xphp",
"id": "e56e451c8153ffd803546028b8b39a69e1306e69",
"size": "2647",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "exercises/largest-series-product/example.php",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Makefile",
"bytes": "2480"
},
{
"name": "PHP",
"bytes": "218163"
},
{
"name": "Shell",
"bytes": "640"
}
]
}
|
package org.bychan.core.langs.calculator.manual;
import org.bychan.core.basic.Lexeme;
import org.bychan.core.basic.Lexer;
import org.bychan.core.basic.PrattParser;
import org.bychan.core.langs.calculator.nodes.CalculatorNode;
import org.jetbrains.annotations.NotNull;
import java.util.List;
class CalculatorParser {
@NotNull
public CalculatorNode parse(@NotNull final String input) {
List<Lexeme<CalculatorNode>> lexemes = new Lexer<>(CalculatorTokens.get()).lex(input);
return new PrattParser<>(lexemes, input).expr(null, 0);
}
}
|
{
"content_hash": "0de12cb6fa633f9180f2981fc07427a1",
"timestamp": "",
"source": "github",
"line_count": 17,
"max_line_length": 94,
"avg_line_length": 33.05882352941177,
"alnum_prop": 0.7562277580071174,
"repo_name": "atorstling/bychan",
"id": "b4629bf0fdcfe29418d2a5fac0405ee976d79492",
"size": "562",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "src/test/java/org/bychan/core/langs/calculator/manual/CalculatorParser.java",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Java",
"bytes": "222677"
}
]
}
|
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
<!-- Iron elements -->
<link rel="import" href="../bower_components/iron-meta/iron-meta.html">
<link rel="import" href="../bower_components/iron-flex-layout/classes/iron-flex-layout.html">
<link rel="import" href="../bower_components/iron-icons/iron-icons.html">
<link rel="import" href="../bower_components/iron-pages/iron-pages.html">
<link rel="import" href="../bower_components/iron-selector/iron-selector.html">
<link rel="import" href="../bower_components/iron-dropdown/iron-dropdown.html">
<!-- Paper elements -->
<link rel="import" href="../bower_components/paper-ripple/paper-ripple.html">
<link rel="import" href="../bower_components/paper-drawer-panel/paper-drawer-panel.html">
<link rel="import" href="../bower_components/paper-icon-button/paper-icon-button.html">
<link rel="import" href="../bower_components/paper-item/paper-item.html">
<link rel="import" href="../bower_components/paper-material/paper-material.html">
<link rel="import" href="../bower_components/paper-menu/paper-menu.html">
<link rel="import" href="../bower_components/paper-dropdown-menu/paper-dropdown-menu.html">
<link rel="import" href="../bower_components/paper-scroll-header-panel/paper-scroll-header-panel.html">
<link rel="import" href="../bower_components/paper-styles/paper-styles-classes.html">
<link rel="import" href="../bower_components/paper-toast/paper-toast.html">
<link rel="import" href="../bower_components/paper-toolbar/paper-toolbar.html">
<link rel="import" href="../bower_components/paper-fab/paper-fab.html">
<link rel="import" href="../bower_components/paper-progress/paper-progress.html">
<link rel="import" href="../bower_components/paper-listbox/paper-listbox.html">
<link rel="import" href="../bower_components/paper-tooltip/paper-tooltip.html">
<link rel="import" href="../bower_components/paper-dialog/paper-dialog.html">
<link rel="import" href="../bower_components/paper-dialog-scrollable/paper-dialog-scrollable.html">
<link rel="import" href="../bower_components/paper-button/paper-button.html">
<link rel="import" href="../bower_components/paper-spinner/paper-spinner.html">
<link rel="import" href="../bower_components/neon-page-behavior/neon-page-behavior.html">
<!-- Platinum elements -->
<link rel="import" href="../bower_components/platinum-sw/platinum-sw-cache.html">
<link rel="import" href="../bower_components/platinum-sw/platinum-sw-register.html">
<!-- Neon elements -->
<link rel="import" href="../bower_components/neon-animation/web-animations.html">
<link rel="import" href="../bower_components/neon-animation/neon-animated-pages.html">
<link rel="import" href="../bower_components/neon-animation/neon-animations.html">
<link rel="import" href="../bower_components/neon-animation/neon-shared-element-animatable-behavior.html">
<link rel="import" href="../bower_components/neon-animation/neon-animation-behavior.html">
<!-- Configure your routes here -->
<link rel="import" href="routing.html">
<!-- App elements -->
<link rel="import" href="../styles/app-theme.html">
<link rel="import" href="../styles/shared-styles.html">
<link rel="import" href="busy-indicator/busy-indicator.html">
<link rel="import" href="numbers-presenter/numbers-presenter.html">
<link rel="import" href="animations/rotate-clockwise-animation.html">
<link rel="import" href="animations/rotate-anticlockwise-animation.html">
<link rel="import" href="flyout-text/flyout-text.html">
<link rel="import" href="bottom-popup-list/bottom-popup-list.html">
<link rel="import" href="icon-transition-button/icon-transition-button.html">
<link rel="import" href="spread-menu-button/spread-menu-button.html">
<link rel="import" href="data-grid/data-grid.html">
<link rel="import" href="charts/chartjs-import.html">
<link rel="import" href="charts/bar-chart/bar-chart.html">
<link rel="import" href="charts/line-chart/line-chart.html">
<link rel="import" href="secondary-heading/secondary-heading.html">
<link rel="import" href="value-cards/value-card-number/value-card-number.html">
<link rel="import" href="value-cards/value-card-chart/value-card-chart.html">
<link rel="import" href="value-cards/value-card-grid/value-card-grid.html">
<link rel="import" href="a/home-menu-item/home-menu-item.html">
<link rel="import" href="a/module-menu-item/module-menu-item.html">
<link rel="import" href="module-card/module-card.html">
<link rel="import" href="report-card/report-card.html">
<link rel="import" href="home-last-visited/home-last-visited.html">
<link rel="import" href="report-card-list/report-card-list.html">
<link rel="import" href="section-card/section-card.html">
<link rel="import" href="section-card-list/section-card-list.html">
<link rel="import" href="section-detail/section-detail.html">
<link rel="import" href="filters/app-filters/app-filters.html">
|
{
"content_hash": "6805124709fd53c33b23cdf2de99a9ef",
"timestamp": "",
"source": "github",
"line_count": 83,
"max_line_length": 106,
"avg_line_length": 63.6144578313253,
"alnum_prop": 0.7471590909090909,
"repo_name": "JustinXinLiu/polymer-app-design",
"id": "61d61019a9babf1a6654f7eb6a2388466189c340",
"size": "5280",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "app/elements/elements.html",
"mode": "33188",
"license": "bsd-3-clause",
"language": [
{
"name": "CSS",
"bytes": "650"
},
{
"name": "HTML",
"bytes": "82084"
},
{
"name": "JavaScript",
"bytes": "54205"
}
]
}
|
Monitoring and Exporting of live tweets of twitter users and doing Sentiment Analysis on them.
This application basically consists of 3 main areas to focus:
1. Monitoring : Real time streaming of tweets on screen and it's respective sentimental value
2. Downloading / Exporting : Exporting the tweet data with details including
- Tweet created_at,
- User's screen_name,
- language of tweet,
- Tweet text,
- UserProfileName,
- UserDescription,
- UserLocation,
- FavoritesCount,
- TotalTweetsCount,
- UserFriendCount,
- UserFollowersCount,
- TimeZone,
- UTCOffset Value,
- GeoEnabled,
- IfUserVerified,
- IfContributors,
- TweetSource,
- coordinates,
- SentimentPolarity,
- SentimentSubjectivity
Here we are using SQLite3 database to export these details.
3. Sentimental Analysis: We are using module 'Textblob' to do sentimental analysis. In this module, sentimental value is further categorized into two sub-parts SentimentPolarity and SentimentSubjectivity. The value of SentimentPolarity range from -1 to +1.
- -1 indicates sentiments of give text is Negative
- +1 indicates sentiments of give text is Positive
- 0 indicates sentiments of give text is Neutral
Future room for upgrade / enhancements:
1. Can improve analysis part.
|
{
"content_hash": "9a6cc00151477f2b9efbb8280616a3a4",
"timestamp": "",
"source": "github",
"line_count": 37,
"max_line_length": 256,
"avg_line_length": 36.54054054054054,
"alnum_prop": 0.7248520710059172,
"repo_name": "aniketyevankar/Twitter-Sentiment-Analysis",
"id": "8fb4089642d06ec5a54fb66bbb6437212f9c0503",
"size": "1381",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "README.md",
"mode": "33188",
"license": "mit",
"language": [
{
"name": "Python",
"bytes": "2693"
}
]
}
|
#include <QApplication>
#include <QPainter>
#include <qmath.h>
#include <QDebug>
#include <QMenu>
#include <qmath.h>
#include "efxitem.h"
#include "trackitem.h"
#include "headeritems.h"
#include "audiodecoder.h"
EFXItem::EFXItem(EFX *efx, ShowFunction *func)
: ShowItem(func)
, m_efx(efx)
{
Q_ASSERT(efx != NULL);
if (func->color().isValid())
setColor(func->color());
else
setColor(ShowFunction::defaultColor(Function::EFX));
calculateWidth();
connect(m_efx, SIGNAL(changed(quint32)), this, SLOT(slotEFXChanged(quint32)));
}
void EFXItem::calculateWidth()
{
int newWidth = 0;
qint64 efx_duration = m_function->duration();
if (efx_duration != 0)
newWidth = ((50/(float)getTimeScale()) * (float)efx_duration) / 1000;
else
newWidth = 100;
if (newWidth < (50 / m_timeScale))
newWidth = 50 / m_timeScale;
setWidth(newWidth);
}
void EFXItem::paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
{
Q_UNUSED(option);
Q_UNUSED(widget);
float xpos = 0;
float timeScale = 50/(float)m_timeScale;
quint32 efxDuration = m_efx->totalDuration();
ShowItem::paint(painter, option, widget);
int loopCount = (efxDuration == 0) ? 0 : qFloor(m_function->duration() / efxDuration);
for (int i = 0; i < loopCount; i++)
{
xpos += ((timeScale * (float)efxDuration) / 1000);
// draw loop vertical delimiter
painter->setPen(QPen(Qt::white, 1));
painter->drawLine(xpos, 1, xpos, TRACK_HEIGHT - 5);
}
ShowItem::postPaint(painter);
}
void EFXItem::setTimeScale(int val)
{
ShowItem::setTimeScale(val);
calculateWidth();
}
void EFXItem::setDuration(quint32 msec, bool stretch)
{
if (stretch == true)
m_efx->setDuration(msec);
else
{
if (m_function)
m_function->setDuration(msec);
prepareGeometryChange();
calculateWidth();
updateTooltip();
}
}
QString EFXItem::functionName()
{
if (m_efx)
return m_efx->name();
return QString();
}
EFX *EFXItem::getEFX()
{
return m_efx;
}
void EFXItem::slotEFXChanged(quint32)
{
prepareGeometryChange();
if (m_function)
m_function->setDuration(m_efx->totalDuration());
calculateWidth();
updateTooltip();
}
void EFXItem::contextMenuEvent(QGraphicsSceneContextMenuEvent *)
{
QMenu menu;
QFont menuFont = qApp->font();
menuFont.setPixelSize(14);
menu.setFont(menuFont);
foreach(QAction *action, getDefaultActions())
menu.addAction(action);
menu.exec(QCursor::pos());
}
|
{
"content_hash": "f979bf1127ce4e7df008a072eb699ae9",
"timestamp": "",
"source": "github",
"line_count": 120,
"max_line_length": 95,
"avg_line_length": 21.975,
"alnum_prop": 0.6310200985968905,
"repo_name": "nedmech/qlcplus",
"id": "6ed5744fa0a4c0b0912cdcdf7d442929bdabd602",
"size": "3264",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "ui/src/showmanager/efxitem.cpp",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "AppleScript",
"bytes": "3195"
},
{
"name": "Batchfile",
"bytes": "1428"
},
{
"name": "C",
"bytes": "154731"
},
{
"name": "C++",
"bytes": "5946569"
},
{
"name": "CSS",
"bytes": "10584"
},
{
"name": "Groff",
"bytes": "6300"
},
{
"name": "HTML",
"bytes": "449229"
},
{
"name": "JavaScript",
"bytes": "154990"
},
{
"name": "NSIS",
"bytes": "8778"
},
{
"name": "QML",
"bytes": "493402"
},
{
"name": "QMake",
"bytes": "157251"
},
{
"name": "Ruby",
"bytes": "17169"
},
{
"name": "Shell",
"bytes": "28866"
}
]
}
|
package org.pac4j.oauth.run;
import org.pac4j.core.client.IndirectClient;
import org.pac4j.core.profile.CommonProfile;
import org.pac4j.core.run.RunClient;
import org.pac4j.core.profile.Gender;
import org.pac4j.core.profile.ProfileHelper;
import org.pac4j.core.util.CommonHelper;
import org.pac4j.oauth.client.LinkedIn2Client;
import org.pac4j.oauth.profile.linkedin2.*;
import java.util.List;
import static org.junit.Assert.*;
/**
* Run manually a test for the {@link LinkedIn2Client}.
*
* @author Jerome Leleu
* @since 1.9.0
*/
public final class RunLinkedIn2Client extends RunClient {
public static void main(String[] args) {
new RunLinkedIn2Client().run();
}
@Override
protected String getLogin() {
return "testscribeup@gmail.com";
}
@Override
protected String getPassword() {
return "testpwdscribeup56";
}
@Override
protected IndirectClient getClient() {
final LinkedIn2Client client = new LinkedIn2Client();
client.setKey("gsqj8dn56ayn");
client.setSecret("kUFAZ2oYvwMQ6HFl");
client.setScope("r_basicprofile r_emailaddress rw_company_admin w_share");
client.setCallbackUrl(PAC4J_URL);
return client;
}
@Override
protected boolean canCancel() {
return true;
}
@Override
protected void verifyProfile(CommonProfile userProfile) {
final LinkedIn2Profile profile = (LinkedIn2Profile) userProfile;
assertEquals("JJjS_5BOzW", profile.getId());
assertEquals(LinkedIn2Profile.class.getName() + CommonProfile.SEPARATOR + "JJjS_5BOzW",
profile.getTypedId());
assertTrue(ProfileHelper.isTypedIdOf(profile.getTypedId(), LinkedIn2Profile.class));
assertTrue(CommonHelper.isNotBlank(profile.getAccessToken()));
assertCommonProfile(userProfile,
"testscribeup@gmail.com",
"test",
"scribeUp",
"test scribeUp",
null,
Gender.UNSPECIFIED,
null,
"https://media.licdn.com/dms/image/C5603AQHfitHQ5I8fcg/profile-displayphoto-shrink_100_100/" +
"0?e=1527703200&v=alpha&t=6Vxlhr64CF5LP_O9_YJwQv8Ar_TZjnZ_4C53xoygjfI",
"https://www.linkedin.com/in/test-scribeup-16b0aa48", "Paris Area, France");
final LinkedIn2Location location = profile.getCompleteLocation();
assertEquals("Paris Area, France", location.getName());
assertNull(profile.getMaidenName());
assertEquals("ScribeUP développeur chez OpenSource", profile.getHeadline());
assertEquals("Information Technology and Services", profile.getIndustry());
assertEquals(1, profile.getNumConnections().intValue());
assertEquals("This is a summary...", profile.getSummary());
assertNull(profile.getSpecialties());
final List<LinkedIn2Position> positions = profile.getPositions();
assertEquals(2, positions.size());
final LinkedIn2Position position = positions.get(0);
assertEquals("417494299", position.getId());
assertEquals("Developer", position.getTitle());
assertEquals("Desc", position.getSummary());
final LinkedIn2Date startDate = position.getStartDate();
assertEquals(2012, startDate.getYear().intValue());
assertEquals(3, startDate.getMonth().intValue());
assertNull(position.getEndDate());
final LinkedIn2Company company = position.getCompany();
assertEquals("PAC4J", company.getName());
assertNull(company.getIndustry());
assertEquals("https://www.linkedin.com/profile/view?id=AAoAAAn67mMBxVIxeJXn2T6XBvOFEAMLv7RiJQQ"
+ "&authType=name&authToken=_IWF&trk=api*a167383*s175634*",
profile.getSiteStandardProfileRequest());
assertEquals("AAoAAAn67mMBxVIxeJXn2T6XBvOFEAMLv7RiJQQ", profile.getOAuth10Id());
assertEquals(16, profile.getAttributes().size());
}
}
|
{
"content_hash": "f6fb4ce0c188809b5d1931651933b2f9",
"timestamp": "",
"source": "github",
"line_count": 99,
"max_line_length": 110,
"avg_line_length": 40.494949494949495,
"alnum_prop": 0.6719880269393864,
"repo_name": "zawn/pac4j",
"id": "21dcb6e266ea5faf0b2fd8fdb0899ab9f07717bb",
"size": "4010",
"binary": false,
"copies": "1",
"ref": "refs/heads/master",
"path": "pac4j-oauth/src/test/java/org/pac4j/oauth/run/RunLinkedIn2Client.java",
"mode": "33188",
"license": "apache-2.0",
"language": [
{
"name": "Java",
"bytes": "1980245"
},
{
"name": "Shell",
"bytes": "2446"
}
]
}
|
End of preview.
No dataset card yet
- Downloads last month
- 2